 All Classes
AbstractAllGroupHeadsCollector
AbstractAllGroupHeadsCollector.GroupHead
AbstractAllGroupsCollector
AbstractAllTermDocs
AbstractEncoder
AbstractField
AbstractFirstPassGroupingCollector
AbstractQueryConfig
AbstractQueryMaker
AbstractRangeQueryNode
AbstractSecondPassGroupingCollector
AdaptiveFacetsAccumulator
AddDocTask
AddFacetedDocTask
Aggregator
Algorithm
AllowLeadingWildcardAttribute
AllowLeadingWildcardAttributeImpl
AllowLeadingWildcardProcessor
AlreadyClosedException
Among
Analyzer
AnalyzerAttribute
AnalyzerAttributeImpl
AnalyzerProfile
AnalyzerQueryNodeProcessor
AnalyzingQueryParser
AndQuery
AndQueryNode
AnyQueryNode
AnyQueryNodeBuilder
ArabicAnalyzer
ArabicLetterTokenizer
ArabicNormalizationFilter
ArabicNormalizer
ArabicStemFilter
ArabicStemmer
ArmenianAnalyzer
ArmenianStemmer
ArrayHashMap
ArrayUtil
ASCIIFoldingFilter
AssertingIndexSearcher
AssociationEnhancement
AssociationFloatProperty
AssociationFloatSumAggregator
AssociationFloatSumFacetRequest
AssociationIntProperty
AssociationIntSumAggregator
AssociationIntSumFacetRequest
AssociationListTokenizer
AssociationProperty
AssociationsPayloadIterator
Attribute
AttributeImpl
AttributeReflector
AttributeSource
AttributeSource.AttributeFactory
AttributeSource.State
AveragePayloadFunction
BalancedSegmentMergePolicy
BalancedSegmentMergePolicy.MergePolicyParams
BaseCharFilter
BaseFormAttribute
BaseFormAttributeImpl
BaseFragmentsBuilder
BaseTokenStreamTestCase
BaseTokenStreamTestCase.CheckClearAttributesAttribute
BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl
BasicQueryFactory
BasqueAnalyzer
BasqueStemmer
BeiderMorseFilter
Benchmark
BenchmarkHighlighter
BinaryDictionary
Bits
Bits.MatchAllBits
Bits.MatchNoBits
BitUtil
BitVector
BlockGroupingCollector
BooleanClause
BooleanClause.Occur
BooleanFilter
BooleanFilterBuilder
BooleanModifierNode
BooleanModifiersQueryNodeProcessor
BooleanQuery
BooleanQuery.TooManyClauses
BooleanQueryBuilder
BooleanQueryNode
BooleanQueryNodeBuilder
BooleanSingleChildOptimizationQueryNodeProcessor
BoostAttribute
BoostAttributeImpl
BoostingQuery
BoostingQueryBuilder
BoostingTermBuilder
BoostQueryNode
BoostQueryNodeBuilder
BoostQueryNodeProcessor
BoundaryScanner
BrazilianAnalyzer
BrazilianStemFilter
BrazilianStemmer
BreakIteratorBoundaryScanner
BufferedIndexInput
BufferedIndexOutput
BufferingTermFreqIteratorWrapper
Builder
Builder.Arc
Builder.FreezeTail
Builder.UnCompiledNode
BulgarianAnalyzer
BulgarianStemFilter
BulgarianStemmer
ByteArrayDataInput
ByteArrayDataOutput
ByteBlockPool
ByteBlockPool.Allocator
ByteBlockPool.DirectAllocator
ByteBlockPool.DirectTrackingAllocator
ByteFieldSource
ByteSequenceOutputs
BytesRef
BytesRefFSTEnum
BytesRefFSTEnum.InputOutput
BytesRefHash
BytesRefHash.BytesStartArray
BytesRefHash.DirectBytesStartArray
BytesRefHash.MaxBytesLengthExceededException
BytesRefHash.TrackingDirectBytesStartArray
BytesRefIterator
BytesRefList
BytesRefSorter
ByteVector
CachedFilterBuilder
CachingCollector
CachingSpanFilter
CachingTokenFilter
CachingWrapperFilter
CachingWrapperFilter.DeletesMode
CachingWrapperFilterHelper
CannedTokenStream
CarmelTopKTermPruningPolicy
CarmelTopKTermPruningPolicy.ByDocComparator
CarmelUniformTermPruningPolicy
CarmelUniformTermPruningPolicy.ByDocComparator
CartesianPoint
CartesianPolyFilterBuilder
CartesianShapeFilter
CartesianTierPlotter
CatalanAnalyzer
CatalanStemmer
CategoryAttribute
CategoryAttributeImpl
CategoryAttributesIterable
CategoryAttributesStream
CategoryContainer
CategoryDocumentBuilder
CategoryEnhancement
CategoryListCache
CategoryListData
CategoryListIterator
CategoryListParams
CategoryListPayloadStream
CategoryListTokenizer
CategoryParentsStream
CategoryPath
CategoryProperty
CategoryTokenizer
CategoryTokenizerBase
ChainedFilter
CharacterDefinition
CharacterUtils
CharacterUtils.CharacterBuffer
CharArrayIterator
CharArrayMap
CharArraySet
CharFilter
CharReader
CharsRef
CharStream
CharStream
CharStream
CharTermAttribute
CharTermAttributeImpl
CharTokenizer
CharType
CharVector
CheckHits
CheckHits.ExplanationAsserter
CheckHits.ExplanationAssertingSearcher
CheckHits.SetCollector
CheckIndex
CheckIndex.Status
CheckIndex.Status.FieldNormStatus
CheckIndex.Status.SegmentInfoStatus
CheckIndex.Status.StoredFieldStatus
CheckIndex.Status.TermIndexStatus
CheckIndex.Status.TermVectorStatus
ChecksumIndexInput
ChecksumIndexOutput
ChineseAnalyzer
ChineseFilter
ChineseTokenizer
ChunksIntEncoder
CJKAnalyzer
CJKBigramFilter
CJKTokenizer
CJKWidthFilter
Cl2oTaxonomyWriterCache
ClassicAnalyzer
ClassicFilter
ClassicTokenizer
ClearStatsTask
CloseableThreadLocal
CloseIndexTask
CloseReaderTask
CloseTaxonomyIndexTask
CloseTaxonomyReaderTask
CodecUtil
CollationKeyAnalyzer
CollationKeyFilter
CollationTestBase
CollectionUtil
Collector
CollisionMap
CommandLineUtil
CommitIndexTask
CommitTaxonomyIndexTask
CompactLabelToOrdinal
Compile
ComplementCountingAggregator
ComplexExplanation
ComplexPhraseQueryParser
ComposedQuery
CompoundFileExtractor
CompoundFileWriter
CompoundWordTokenFilterBase
CompressionTools
ConcurrentMergeScheduler
Config
ConfigAttribute
ConfigurationKey
ConnectionCosts
Constants
Constants
ConstantScoreQuery
ConstantScoreQueryBuilder
ConsumeContentSourceTask
ContentItemsSource
ContentSource
CoreParser
CorePlusExtensionsParser
CorruptIndexException
Counter
CountFacetRequest
CountingAggregator
CountingListTokenizer
CreateIndexTask
CreateTaxonomyIndexTask
CSVUtil
CustomScoreProvider
CustomScoreQuery
CzechAnalyzer
CzechStemFilter
CzechStemmer
DanishAnalyzer
DanishStemmer
DataInput
DataOutput
DateField
DateRecognizerSinkFilter
DateResolutionAttribute
DateResolutionAttributeImpl
DateTools
DateTools.Resolution
DefaultEncoder
DefaultEnhancementsIndexingParams
DefaultFacetIndexingParams
DefaultICUTokenizerConfig
DefaultOperatorAttribute
DefaultOperatorAttribute.Operator
DefaultOperatorAttributeImpl
DefaultOrdinalPolicy
DefaultPathPolicy
DefaultPhraseSlopAttribute
DefaultPhraseSlopAttributeImpl
DefaultPhraseSlopQueryNodeProcessor
DefaultSimilarity
DeleteByPercentTask
DeleteDocTask
DeletedQueryNode
DelimitedPayloadTokenFilter
DemoHTMLParser
DGapIntDecoder
DGapIntEncoder
Dictionary
Dictionary
DictionaryCompoundWordTokenFilter
Diff
DiffIt
DirContentSource
DirContentSource.Iterator
DirectIOLinuxDirectory
Directory
DirectoryTaxonomyReader
DirectoryTaxonomyWriter
DirectoryTaxonomyWriter.DiskOrdinalMap
DirectoryTaxonomyWriter.MemoryOrdinalMap
DirectoryTaxonomyWriter.OrdinalMap
DisjunctionMaxQuery
DistanceApproximation
DistanceFieldComparatorSource
DistanceFilter
DistanceHandler
DistanceHandler.Precision
DistanceQuery
DistanceQueryBuilder
DistanceSubQuery
DistanceUnits
DistanceUtils
DocData
DocIdBitSet
DocIdSet
DocIdSetIterator
DocMaker
DocNameExtractor
Document
DocValues
DOMUtils
DoubleBarrelLRUCache
DoubleBarrelLRUCache.CloneableKey
DoubleIterator
DoubleMetaphoneFilter
DrillDown
DummyConcurrentLock
DummyQueryNodeBuilder
DuplicateFilter
DuplicateFilterBuilder
DutchAnalyzer
DutchStemFilter
DutchStemmer
DutchStemmer
EdgeNGramTokenFilter
EdgeNGramTokenFilter.Side
EdgeNGramTokenizer
EdgeNGramTokenizer.Side
EightFlagsIntDecoder
EightFlagsIntEncoder
ElisionFilter
Ellipse
EmptyTokenizer
EmptyTokenStream
Encoder
English
EnglishAnalyzer
EnglishMinimalStemFilter
EnglishMinimalStemmer
EnglishPossessiveFilter
EnglishStemmer
EnhancementsCategoryTokenizer
EnhancementsDocumentBuilder
EnhancementsIndexingParams
EnhancementsPayloadIterator
Entities
EnwikiContentSource
EnwikiQueryMaker
EscapeQuerySyntax
EscapeQuerySyntax.Type
EscapeQuerySyntaxImpl
Explanation
Explanation.IDFExplanation
ExtendableQueryParser
ExtensionQuery
Extensions
Extensions.Pair
ExternalRefSorter
ExtractReuters
ExtractWikipedia
FacetArrays
FacetException
FacetIndexingParams
FacetParamsMissingPropertyException
FacetRequest
FacetRequest.ResultMode
FacetRequest.SortBy
FacetRequest.SortOrder
FacetResult
FacetResultNode
FacetResultsHandler
FacetsAccumulator
FacetsCollector
FacetSearchParams
FacetSource
FacetsPayloadProcessorProvider
FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor
FacetsPayloadProcessorProvider.FacetsPayloadProcessor
FastCharStream
FastCharStream
FastVectorHighlighter
Field
Field.Index
Field.Store
Field.TermVector
Fieldable
FieldableNode
FieldBoostMapAttribute
FieldBoostMapAttributeImpl
FieldBoostMapFCListener
FieldCache
FieldCache.ByteParser
FieldCache.CacheEntry
FieldCache.CreationPlaceholder
FieldCache.DoubleParser
FieldCache.FloatParser
FieldCache.IntParser
FieldCache.LongParser
FieldCache.Parser
FieldCache.ShortParser
FieldCache.StringIndex
FieldCacheDocIdSet
FieldCacheRangeFilter
FieldCacheSanityChecker
FieldCacheSanityChecker.Insanity
FieldCacheSanityChecker.InsanityType
FieldCacheSource
FieldCacheTermsFilter
FieldComparator
FieldComparator.ByteComparator
FieldComparator.DocComparator
FieldComparator.DoubleComparator
FieldComparator.FloatComparator
FieldComparator.IntComparator
FieldComparator.LongComparator
FieldComparator.NumericComparator
FieldComparator.RelevanceComparator
FieldComparator.ShortComparator
FieldComparator.StringComparatorLocale
FieldComparator.StringOrdValComparator
FieldComparator.StringValComparator
FieldComparatorSource
FieldConfig
FieldConfigListener
FieldDateResolutionFCListener
FieldDateResolutionMapAttribute
FieldDateResolutionMapAttributeImpl
FieldDoc
FieldFragList
FieldFragList.WeightedFragInfo
FieldFragList.WeightedFragInfo.SubInfo
FieldInfo
FieldInfo.IndexOptions
FieldInfos
FieldInvertState
FieldMaskingSpanQuery
FieldNormModifier
FieldPhraseList
FieldPhraseList.WeightedPhraseInfo
FieldPhraseList.WeightedPhraseInfo.Toffs
FieldQuery
FieldQuery.QueryPhraseMap
FieldQueryNode
FieldQueryNodeBuilder
FieldReaderException
FieldScoreQuery
FieldScoreQuery.Type
FieldSelector
FieldSelectorResult
FieldSortedTermVectorMapper
FieldsQuery
FieldTermStack
FieldTermStack.TermInfo
FieldValueFilter
FieldValueHitQueue
FieldValueHitQueue.Entry
FieldValuePairQueryNode
FileBasedQueryMaker
FileDictionary
FileSwitchDirectory
FileUtils
Filter
FilterBuilder
FilterBuilderFactory
FilterClause
FilteredDocIdSet
FilteredDocIdSetIterator
FilteredQuery
FilteredQueryBuilder
FilteredTermEnum
FilterIndexReader
FilterIndexReader.FilterTermDocs
FilterIndexReader.FilterTermEnum
FilterIndexReader.FilterTermPositions
FilteringTokenFilter
FilterManager
FinnishAnalyzer
FinnishLightStemFilter
FinnishLightStemmer
FinnishStemmer
FixedBitSet
FixedLatLng
FlagsAttribute
FlagsAttributeImpl
FloatArrayAllocator
FloatEncoder
FloatFieldSource
FloatIterator
FloatLatLng
FloatToObjectMap
FlushReaderTask
ForceMergeTask
Format
Formatter
FourFlagsIntDecoder
FourFlagsIntEncoder
FragListBuilder
Fragmenter
FragmentsBuilder
FrenchAnalyzer
FrenchLightStemFilter
FrenchLightStemmer
FrenchMinimalStemFilter
FrenchMinimalStemmer
FrenchStemFilter
FrenchStemmer
FrenchStemmer
FSDirectory
FSDirectory.FSIndexOutput
FSLockFactory
FST
FST.Arc
FST.BytesReader
FST.INPUT_TYPE
FSTCompletion
FSTCompletion.Completion
FSTCompletionBuilder
FSTCompletionLookup
FSTLookup
FuzzyAttribute
FuzzyAttributeImpl
FuzzyConfig
FuzzyLikeThisQuery
FuzzyLikeThisQueryBuilder
FuzzyQuery
FuzzyQueryNode
FuzzyQueryNodeBuilder
FuzzyQueryNodeProcessor
FuzzyTermEnum
GalicianAnalyzer
GalicianMinimalStemFilter
GalicianMinimalStemmer
GalicianStemFilter
GalicianStemmer
Gener
GeoHashDistanceFilter
GeoHashUtils
Geometry2D
German2Stemmer
GermanAnalyzer
GermanLightStemFilter
GermanLightStemmer
GermanMinimalStemFilter
GermanMinimalStemmer
GermanNormalizationFilter
GermanStemFilter
GermanStemmer
GermanStemmer
GetTermInfo
GradientFormatter
GraphvizFormatter
GreekAnalyzer
GreekLowerCaseFilter
GreekStemFilter
GreekStemmer
GroupDocs
GroupQueryNode
GroupQueryNodeBuilder
GroupQueryNodeProcessor
GrowableWriter
Heap
HHMMSegmenter
HighFreqTerms
HighFrequencyDictionary
Highlighter
HindiAnalyzer
HindiNormalizationFilter
HindiNormalizer
HindiStemFilter
HindiStemmer
HTMLParser
HTMLParser
HTMLParserConstants
HTMLParserTokenManager
HTMLStripCharFilter
HungarianAnalyzer
HungarianLightStemFilter
HungarianLightStemmer
HungarianStemmer
HunspellAffix
HunspellDictionary
HunspellStemFilter
HunspellStemmer
HunspellStemmer.Stem
HunspellWord
Hyphen
Hyphenation
HyphenationCompoundWordTokenFilter
HyphenationException
HyphenationTree
ICUCollationKeyAnalyzer
ICUCollationKeyFilter
ICUFoldingFilter
ICUNormalizer2Filter
ICUTokenizer
ICUTokenizerConfig
ICUTransformFilter
IdentityEncoder
InconsistentTaxonomyException
IndexableBinaryStringTools
IndexCommit
IndexDeletionPolicy
IndexFileNameFilter
IndexFileNames
IndexFiles
IndexFormatTooNewException
IndexFormatTooOldException
IndexInput
IndexMergeTool
IndexNotFoundException
IndexOutput
IndexReader
IndexReader.ReaderClosedListener
IndexSearcher
IndexSorter
IndexSplitter
IndexUpgrader
IndexWriter
IndexWriter.IndexReaderWarmer
IndexWriter.MaxFieldLength
IndexWriterConfig
IndexWriterConfig.OpenMode
IndicNormalizationFilter
IndicNormalizer
IndicTokenizer
IndonesianAnalyzer
IndonesianStemFilter
IndonesianStemmer
InflectionAttribute
InflectionAttributeImpl
InMemorySorter
InputStreamDataInput
InstantiatedDocument
InstantiatedIndex
InstantiatedIndexReader
InstantiatedIndexWriter
InstantiatedTerm
InstantiatedTermDocs
InstantiatedTermDocumentInformation
InstantiatedTermEnum
InstantiatedTermFreqVector
InstantiatedTermPositions
InstantiatedTermPositionVector
IntArray
IntArrayAllocator
IntDecoder
IntegerEncoder
IntEncoder
IntEncoderFilter
IntermediateFacetResult
IntersectCase
IntFieldSource
IntHashSet
IntIterator
IntSequenceOutputs
IntsRef
IntsRefFSTEnum
IntsRefFSTEnum.InputOutput
IntToDoubleMap
IntToIntMap
IntToObjectMap
InvalidGeoException
InvalidTokenOffsetsException
IOUtils
IProjector
IrishAnalyzer
IrishLowerCaseFilter
IrishStemmer
ISOLatin1AccentFilter
ItalianAnalyzer
ItalianLightStemFilter
ItalianLightStemmer
ItalianStemmer
JakartaRegexpCapabilities
JapaneseAnalyzer
JapaneseBaseFormFilter
JapaneseKatakanaStemFilter
JapanesePartOfSpeechStopFilter
JapaneseReadingFormFilter
JapaneseTokenizer
JapaneseTokenizer.Mode
JaroWinklerDistance
JaspellLookup
JaspellTernarySearchTrie
JavaCharStream
JavaUtilRegexCapabilities
JoinUtil
Judge
KeepOnlyLastCommitDeletionPolicy
KeywordAnalyzer
KeywordAttribute
KeywordAttributeImpl
KeywordMarkerFilter
KeywordTokenizer
KpStemmer
KStemFilter
KStemmer
LabelToOrdinal
LaoBreakIterator
LatLng
LatLongDistanceFilter
LatvianAnalyzer
LatvianStemFilter
LatvianStemmer
LengthFilter
LetterTokenizer
LevensteinDistance
Lift
LikeThisQueryBuilder
LimitTokenCountAnalyzer
LimitTokenCountFilter
LineDocSource
LineDocSource.HeaderLineParser
LineDocSource.LineParser
LineDocSource.SimpleLineParser
LineFileDocs
LineSegment
LLRect
LoadFirstFieldSelector
LocaleAttribute
LocaleAttributeImpl
Lock
Lock.With
LockFactory
LockObtainFailedException
LockReleaseFailedException
LockStressTest
LockVerifyServer
LogByteSizeMergePolicy
LogDocMergePolicy
LogMergePolicy
LongToEnglishContentSource
LongToEnglishQueryMaker
LookaheadTokenFilter
LookaheadTokenFilter.Position
Lookup
Lookup.LookupPriorityQueue
Lookup.LookupResult
LovinsStemmer
LowercaseExpandedTermsAttribute
LowercaseExpandedTermsAttributeImpl
LowercaseExpandedTermsQueryNodeProcessor
LowerCaseFilter
LowerCaseTokenizer
LRUHashMap
LruTaxonomyWriterCache
LruTaxonomyWriterCache.LRUType
LuceneDictionary
LuceneJUnitDividingSelector
LuceneJUnitResultFormatter
LucenePackage
LuceneTestCase
LuceneTestCase.Nightly
LuceneTestCaseRunner
MapBackedSet
MapFieldSelector
MapOfSets
MappingCharFilter
MatchAllDocsQuery
MatchAllDocsQueryBuilder
MatchAllDocsQueryNode
MatchAllDocsQueryNodeBuilder
MatchAllDocsQueryNodeProcessor
MatchNoDocsQueryNode
MatchNoDocsQueryNodeBuilder
MaxPayloadFunction
MemoryIndex
MergePolicy
MergePolicy.MergeAbortedException
MergePolicy.MergeException
MergePolicy.MergeSpecification
MergePolicy.OneMerge
MergeScheduler
Message
MessageImpl
MinPayloadFunction
MMapDirectory
MockAnalyzer
MockCharFilter
MockDirectoryWrapper
MockDirectoryWrapper.Failure
MockDirectoryWrapper.Throttling
MockFixedLengthPayloadFilter
MockGraphTokenFilter
MockHoleInjectingTokenFilter
MockIndexInput
MockIndexInputWrapper
MockIndexOutputWrapper
MockLockFactoryWrapper
MockRandomLookaheadTokenFilter
MockRandomMergePolicy
MockReaderWrapper
MockTokenizer
MockVariableLengthPayloadFilter
ModifierQueryNode
ModifierQueryNode.Modifier
ModifierQueryNodeBuilder
MoreLikeThis
MoreLikeThisQuery
MultiCategoryListIterator
MultiCollector
MultiFieldAttribute
MultiFieldAttributeImpl
MultiFieldQueryNodeProcessor
MultiFieldQueryParser
MultiFieldQueryParserWrapper
MultiPassIndexSplitter
MultiPhraseQuery
MultiPhraseQueryNode
MultiPhraseQueryNodeBuilder
MultipleTermPositions
MultiReader
MultiSearcher
MultiTermQuery
MultiTermQuery.ConstantScoreAutoRewrite
MultiTermQuery.RewriteMethod
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite
MultiTermQuery.TopTermsScoringBooleanQueryRewrite
MultiTermQueryWrapperFilter
MultiTermRewriteMethodAttribute
MultiTermRewriteMethodAttributeImpl
MultiTermRewriteMethodProcessor
MultiTrie
MultiTrie2
MutableFacetResultNode
NamedThreadFactory
NameHashIntCacheLRU
NativeFSLockFactory
NativePosixUtil
NearRealtimeReaderTask
NearSpansOrdered
NearSpansUnordered
NewAnalyzerTask
NewCollationAnalyzerTask
NewCollationAnalyzerTask.Implementation
NewLocaleTask
NewRoundTask
NewShingleAnalyzerTask
NGramDistance
NGramPhraseQuery
NGramTokenFilter
NGramTokenizer
NIOFSDirectory
NIOFSDirectory.NIOFSIndexInput
NLS
NLSException
NoChildOptimizationQueryNodeProcessor
NoDeletionPolicy
NoLockFactory
NoMergePolicy
NoMergeScheduler
NoMoreDataException
NOnesIntDecoder
NOnesIntEncoder
NonTopLevelOrdinalPolicy
NonTopLevelPathPolicy
NoOutputs
NormalizeCharMap
NorwegianAnalyzer
NorwegianLightStemFilter
NorwegianLightStemmer
NorwegianMinimalStemFilter
NorwegianMinimalStemmer
NorwegianStemmer
NoSuchDirectoryException
NoTokenFoundQueryNode
NotQuery
NRTCachingDirectory
NRTManager
NRTManager.TrackingIndexWriter
NRTManager.WaitingListener
NRTManagerReopenThread
NullFragmenter
NumberDateFormat
NumberTools
NumericConfig
NumericField
NumericField.DataType
NumericFieldConfigListener
NumericPayloadTokenFilter
NumericQueryNode
NumericQueryNodeProcessor
NumericRangeFilter
NumericRangeFilterBuilder
NumericRangeQuery
NumericRangeQueryBuilder
NumericRangeQueryNode
NumericRangeQueryNodeBuilder
NumericRangeQueryNodeProcessor
NumericTokenStream
NumericUtils
NumericUtils.IntRangeBuilder
NumericUtils.LongRangeBuilder
ObjectToFloatMap
ObjectToIntMap
OffsetAttribute
OffsetAttributeImpl
OffsetLimitTokenFilter
OpaqueQueryNode
OpenBitSet
OpenBitSetDISI
OpenBitSetIterator
OpenIndexTask
OpenReaderTask
OpenStringBuilder
OpenTaxonomyIndexTask
OpenTaxonomyReaderTask
Optimizer
Optimizer2
OrdFieldSource
OrdinalPolicy
OrdinalProperty
OrQuery
OrQueryNode
Outputs
OutputStreamDataOutput
PackedInts
PackedInts.Mutable
PackedInts.Reader
PackedInts.ReaderImpl
PackedInts.Writer
PagedBytes
PagedBytes.Reader
PairOutputs
PairOutputs.Pair
ParallelMultiSearcher
ParallelReader
Parameter
ParametricQueryNode
ParametricQueryNode.CompareOperator
ParametricRangeQueryNode
ParametricRangeQueryNodeProcessor
ParseException
ParseException
ParseException
ParseException
ParserException
ParserExtension
PartitionsUtils
PartOfSpeechAttribute
PartOfSpeechAttributeImpl
PathHierarchyTokenizer
PathPolicy
PathQueryNode
PathQueryNode.QueryText
PatternAnalyzer
PatternConsumer
PatternParser
Payload
PayloadAttribute
PayloadAttributeImpl
PayloadEncoder
PayloadFunction
PayloadHelper
PayloadIntDecodingIterator
PayloadIterator
PayloadNearQuery
PayloadProcessorProvider
PayloadProcessorProvider.DirPayloadProcessor
PayloadProcessorProvider.PayloadProcessor
PayloadProcessorProvider.ReaderPayloadProcessor
PayloadSpanUtil
PayloadTermQuery
PerDimensionIndexingParams
PerFieldAnalyzerWrapper
PerfRunData
PerfTask
PersianAnalyzer
PersianCharFilter
PersianNormalizationFilter
PersianNormalizer
PersistentSnapshotDeletionPolicy
PhoneticFilter
PhraseQuery
PhraseQueryNodeBuilder
PhraseSlopQueryNode
PhraseSlopQueryNodeProcessor
PKIndexSplitter
PlainTextDictionary
Point2D
Points
PolishAnalyzer
PorterStemFilter
PorterStemmer
PortugueseAnalyzer
PortugueseLightStemFilter
PortugueseLightStemmer
PortugueseMinimalStemFilter
PortugueseMinimalStemmer
PortugueseStemFilter
PortugueseStemmer
PortugueseStemmer
PositionBasedTermVectorMapper
PositionBasedTermVectorMapper.TVPositionInfo
PositionFilter
PositionIncrementAttribute
PositionIncrementAttributeImpl
PositionIncrementsAttribute
PositionIncrementsAttributeImpl
PositionLengthAttribute
PositionLengthAttributeImpl
PositionSpan
PositiveIntOutputs
PositiveScoresOnlyCollector
PrecedenceQueryNodeProcessorPipeline
PrecedenceQueryParser
PrefixAndSuffixAwareTokenFilter
PrefixAwareTokenFilter
PrefixFilter
PrefixQuery
PrefixTermEnum
PrefixWildcardQueryNode
PrefixWildcardQueryNodeBuilder
PrintReaderTask
PriorityQueue
ProximityQueryNode
ProximityQueryNode.ProximityType
ProximityQueryNode.Type
PruningPolicy
PruningReader
PruningTool
QualityBenchmark
QualityQueriesFinder
QualityQuery
QualityQueryParser
QualityStats
QualityStats.RecallPoint
Query
QueryAutoStopWordAnalyzer
QueryBuilder
QueryBuilder
QueryBuilderFactory
QueryConfigHandler
QueryDriver
QueryMaker
QueryNode
QueryNodeError
QueryNodeException
QueryNodeImpl
QueryNodeOperation
QueryNodeParseException
QueryNodeProcessor
QueryNodeProcessorImpl
QueryNodeProcessorPipeline
QueryParser
QueryParser
QueryParser.Operator
QueryParserConstants
QueryParserConstants
QueryParserHelper
QueryParserMessages
QueryParserTestBase
QueryParserTestBase.QPTestAnalyzer
QueryParserTestBase.QPTestFilter
QueryParserTestBase.QPTestParser
QueryParserTokenManager
QueryParserTokenManager
QueryParserUtil
QueryParserWrapper
QueryParserWrapper.Operator
QueryScorer
QueryTemplateManager
QueryTermExtractor
QueryTermScorer
QueryTermVector
QueryTreeBuilder
QueryUtils
QueryWrapperFilter
QuotedFieldQueryNode
RAMDirectory
RAMFile
RAMInputStream
RAMOutputStream
RamUsageEstimator
RamUsageEstimator.JvmFeature
RandomFacetSource
RandomIndexWriter
RandomSampler
RangeCollatorAttribute
RangeCollatorAttributeImpl
RangeFilterBuilder
RangeQueryNode
RangeQueryNode
RangeQueryNodeBuilder
RawTermFilter
ReaderUtil
ReaderUtil.Gather
ReadingAttribute
ReadingAttributeImpl
ReadTask
ReadTokensTask
Rectangle
RecyclingByteBlockAllocator
Reduce
ReferenceManager
RegexCapabilities
RegexQuery
RegexQueryCapable
RegexTermEnum
RemoteCachingWrapperFilter
RemoteSearchable
RemoveDeletedQueryNodesProcessor
RemoveEmptyNonLeafQueryNodeProcessor
ReopenReaderTask
RepAllTask
RepeatableSampler
Report
ReportTask
RepSelectByPrefTask
RepSumByNameRoundTask
RepSumByNameTask
RepSumByPrefRoundTask
RepSumByPrefTask
ResetInputsTask
ResetSystemEraseTask
ResetSystemSoftTask
ResultSortUtils
Rethrow
ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
ReutersContentSource
ReutersQueryMaker
ReverseOrdFieldSource
ReversePathHierarchyTokenizer
ReverseStringFilter
RIDFTermPruningPolicy
RMIRemoteSearchable
RollbackIndexTask
RollingBuffer
RollingBuffer.Resettable
RollingCharBuffer
RomanianAnalyzer
RomanianStemmer
Row
RSLPStemmerBase
RSLPStemmerBase.Rule
RSLPStemmerBase.RuleWithSetExceptions
RSLPStemmerBase.RuleWithSuffixExceptions
RSLPStemmerBase.Step
RussianAnalyzer
RussianLetterTokenizer
RussianLightStemFilter
RussianLightStemmer
RussianLowerCaseFilter
RussianStemFilter
RussianStemmer
Sample
SampleFixer
Sampler
Sampler.SampleResult
SamplingAccumulator
SamplingParams
SamplingWrapper
ScoreCachingWrappingScorer
ScoredDocIdCollector
ScoredDocIDs
ScoredDocIDsIterator
ScoredDocIdsUtils
ScoreDoc
ScoreFacetRequest
ScoreOrderFragmentsBuilder
ScoreOrderFragmentsBuilder.ScoreComparator
Scorer
Scorer
Scorer.ScorerVisitor
ScorerDocQueue
ScoringAggregator
ScoringRewrite
ScriptAttribute
ScriptAttributeImpl
Searchable
SearchEquivalenceTestBase
Searcher
SearcherFactory
SearcherLifetimeManager
SearcherLifetimeManager.PruneByAge
SearcherLifetimeManager.Pruner
SearcherManager
SearchFiles
SearchGroup
SearchTask
SearchTravRetHighlightTask
SearchTravRetLoadFieldSelectorTask
SearchTravRetTask
SearchTravRetVectorHighlightTask
SearchTravTask
SearchWithCollectorTask
SearchWithSortTask
SegmentInfo
SegmentInfos
SegmentInfos.FindSegmentsFile
SegmentReader
SegmentReader.CoreClosedListener
SegmentWriteState
SegToken
SegTokenFilter
SentenceTokenizer
SentinelIntSet
SerialMergeScheduler
SetBasedFieldSelector
SetOnce
SetOnce.AlreadySetException
SetPropTask
Shape
ShingleAnalyzerWrapper
ShingleFilter
ShingleMatrixFilter
ShingleMatrixFilter.Matrix
ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec
ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec
ShingleMatrixFilter.TokenPositioner
ShingleMatrixFilter.TokenSettingsCodec
ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec
ShortFieldSource
Similarity
SimilarityDelegator
SimilarityQueries
SimpleAnalyzer
SimpleBoundaryScanner
SimpleCharStream
SimpleFragListBuilder
SimpleFragmenter
SimpleFragmentsBuilder
SimpleFSDirectory
SimpleFSDirectory.SimpleFSIndexInput
SimpleFSDirectory.SimpleFSIndexInput.Descriptor
SimpleFSLockFactory
SimpleHTMLEncoder
SimpleHTMLFormatter
SimpleIntDecoder
SimpleIntEncoder
SimpleQQParser
SimpleQueryMaker
SimpleSloppyPhraseQueryMaker
SimpleSpanFragmenter
SimpleStringInterner
SimpleTerm
SimpleTerm.MatchingTermVisitor
SingleDocSource
SingleFragListBuilder
SingleInstanceLockFactory
SingleTermEnum
SingleTokenTokenStream
SinusoidalProjector
SlopQueryNode
SlopQueryNodeBuilder
SlowMultiReaderWrapper
SmallFloat
SmartChineseAnalyzer
SmartRandom
SnapshotDeletionPolicy
SnowballAnalyzer
SnowballFilter
SnowballProgram
SolrSynonymParser
Sort
Sort
Sort.BufferSize
Sort.ByteSequencesReader
Sort.ByteSequencesWriter
SortableSingleDocSource
SortedTermFreqIteratorWrapper
SortedTermVectorMapper
SortedVIntList
SorterTemplate
SortField
SortingIntEncoder
SpanBuilderBase
SpanFilter
SpanFilterResult
SpanFilterResult.PositionInfo
SpanFilterResult.StartEnd
SpanFirstBuilder
SpanFirstQuery
SpanGradientFormatter
SpanishAnalyzer
SpanishLightStemFilter
SpanishLightStemmer
SpanishStemmer
SpanMultiTermQueryWrapper
SpanMultiTermQueryWrapper.SpanRewriteMethod
SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite
SpanNearBuilder
SpanNearClauseFactory
SpanNearPayloadCheckQuery
SpanNearQuery
SpanNotBuilder
SpanNotQuery
SpanOrBuilder
SpanOrQuery
SpanOrTermsBuilder
SpanPayloadCheckQuery
SpanPositionCheckQuery
SpanPositionCheckQuery.AcceptStatus
SpanPositionRangeQuery
SpanQuery
SpanQueryBuilder
SpanQueryBuilderFactory
SpanQueryFilter
SpanRegexQuery
Spans
SpanScorer
SpanTermBuilder
SpanTermQuery
SpanWeight
SpellChecker
SrndPrefixQuery
SrndQuery
SrndTermQuery
SrndTruncQuery
StaleReaderException
StandardAnalyzer
StandardBooleanQueryNode
StandardBooleanQueryNodeBuilder
StandardFacetsAccumulator
StandardFilter
StandardQueryBuilder
StandardQueryConfigHandler
StandardQueryConfigHandler.ConfigurationKeys
StandardQueryConfigHandler.Operator
StandardQueryNodeProcessorPipeline
StandardQueryParser
StandardQueryTreeBuilder
StandardSyntaxParser
StandardSyntaxParserConstants
StandardSyntaxParserTokenManager
StandardTokenizer
StandardTokenizerImpl
StandardTokenizerImpl31
StandardTokenizerInterface
StemmerOverrideFilter
StemmerUtil
StempelFilter
StempelStemmer
StopAnalyzer
StopFilter
StopwordAnalyzerBase
StoreClassNameRule
StorePruningPolicy
StreamUtils
StreamUtils.Type
StringBuilderReader
StringDistance
StringHelper
StringInterner
StringUtils
SubmissionReport
SuggestMode
SuggestWord
SuggestWordFrequencyComparator
SuggestWordQueue
SuggestWordScoreComparator
SwedishAnalyzer
SwedishLightStemFilter
SwedishLightStemmer
SwedishStemmer
SweetSpotSimilarity
SynonymFilter
SynonymMap
SynonymMap.Builder
SyntaxParser
SystemPropertiesInvariantRule
SystemPropertiesRestoreRule
Tags
TaskSequence
TaskStats
TaxonomyReader
TaxonomyReader.ChildrenArrays
TaxonomyWriter
TaxonomyWriterCache
TeeSinkTokenFilter
TeeSinkTokenFilter.SinkFilter
TeeSinkTokenFilter.SinkTokenStream
TemporaryObjectAllocator
Term
TermAllGroupHeadsCollector
TermAllGroupsCollector
TermAttribute
TermAttributeImpl
TermDocs
TermEnum
TermFirstPassGroupingCollector
TermFreqIterator
TermFreqIterator.TermFreqIteratorWrapper
TermFreqVector
TermPositions
TermPositionVector
TermPruningPolicy
TermQuery
TermQueryBuilder
TermRangeFilter
TermRangeQuery
TermRangeQueryNode
TermRangeQueryNodeBuilder
TermRangeTermEnum
TermSecondPassGroupingCollector
TermsFilter
TermsFilterBuilder
TermSpans
TermsQueryBuilder
TermVectorAccessor
TermVectorEntry
TermVectorEntryFreqSortedComparator
TermVectorMapper
TermVectorOffsetInfo
TernaryTree
TernaryTreeNode
TestApp
TextableQueryNode
TextFragment
TFTermPruningPolicy
ThaiAnalyzer
ThaiWordFilter
ThreadedIndexingAndSearchingTestCase
ThreadInterruptedException
ThrottledIndexOutput
TieredMergePolicy
TieredMergePolicy.MergeScore
TimeLimitingCollector
TimeLimitingCollector.TimeExceededException
TimeLimitingCollector.TimerThread
ToChildBlockJoinQuery
Token
Token
Token
Token
Token
Token
Token.TokenAttributeFactory
TokenFilter
TokenGroup
TokenInfoDictionary
TokenInfoFST
TokenizedPhraseQueryNode
Tokenizer
TokenMgrError
TokenMgrError
TokenMgrError
TokenMgrError
TokenOffsetPayloadTokenFilter
TokenRangeSinkFilter
TokenSources
TokenStream
TokenStreamFromTermPositionVector
TokenStreamToDot
TokenTypeSinkFilter
TooManyBasicQueries
ToParentBlockJoinCollector
ToParentBlockJoinQuery
ToParentBlockJoinQuery.ScoreMode
TopDocs
TopDocsCollector
TopFieldCollector
TopFieldDocs
TopGroups
TopKFacetResultsHandler
TopKInEachNodeHandler
TopKInEachNodeHandler.IntermediateFacetResultWithHash
TopScoreDocCollector
TopTermsRewrite
ToStringUtil
ToStringUtils
TotalFacetCounts
TotalFacetCountsCache
TotalHitCountCollector
Trec1MQReader
TrecContentSource
TrecDocParser
TrecDocParser.ParsePathType
TrecFBISParser
TrecFR94Parser
TrecFTParser
TrecGov2Parser
TrecJudge
TrecLATimesParser
TrecParserByPath
TrecTopicsReader
Trie
TSTAutocomplete
TSTLookup
TurkishAnalyzer
TurkishLowerCaseFilter
TurkishStemmer
TwoPhaseCommit
TwoPhaseCommitTool
TwoPhaseCommitTool.CommitFailException
TwoPhaseCommitTool.PrepareCommitFailException
TwoPhaseCommitTool.TwoPhaseCommitWrapper
TypeAsPayloadTokenFilter
TypeAttribute
TypeAttributeImpl
TypeTokenFilter
UAX29URLEmailAnalyzer
UAX29URLEmailTokenizer
UAX29URLEmailTokenizerImpl
UAX29URLEmailTokenizerImpl31
UAX29URLEmailTokenizerImpl34
UncaughtExceptionsRule
UncaughtExceptionsRule.UncaughtExceptionEntry
UnescapedCharSequence
UnicodeUtil
UnicodeUtil.UTF16Result
UnicodeUtil.UTF8Result
UniqueValuesIntEncoder
UnknownDictionary
UnsafeByteArrayInputStream
UnsafeByteArrayOutputStream
UnsortedTermFreqIteratorWrapper
UpdateDocTask
UpgradeIndexMergePolicy
UpToTwoPositiveIntOutputs
UpToTwoPositiveIntOutputs.TwoLongs
UserDictionary
UserInputQueryBuilder
Util
Util.MinResult
Utility
ValidatingTokenFilter
ValueQueryNode
ValueSource
ValueSourceQuery
Vector2D
VerifyingLockFactory
Version
Vint8
Vint8.Position
VInt8IntDecoder
VInt8IntEncoder
VirtualMethod
VocabularyAssert
WaitForMergesTask
WaitTask
WarmTask
WeakIdentityMap
Weight
WeightedSpanTerm
WeightedSpanTermExtractor
WeightedSpanTermExtractor.PositionCheckingMap
WeightedTerm
WFSTCompletionLookup
WhitespaceAnalyzer
WhitespaceTokenizer
WikipediaTokenizer
WildcardQuery
WildcardQueryNode
WildcardQueryNodeBuilder
WildcardQueryNodeProcessor
WildcardTermEnum
WindowsDirectory
WindowsDirectory.WindowsIndexInput
WordlistLoader
WordnetSynonymParser
WordTokenFilter
WordType
WriteLineDocTask
_TestHelper
_TestUtil


Constant Field Values

Contents
  • org.apache.*
org.apache.*

org.apache.lucene.analysis.MockTokenizer
public static final int | DEFAULT_MAX_TOKEN_LENGTH | 2147483647
public static final int | KEYWORD | 1
public static final int | SIMPLE | 2
public static final int | WHITESPACE | 0

org.apache.lucene.analysis.NumericTokenStream
public static final String | TOKEN_TYPE_FULL_PREC | "fullPrecNumeric"
public static final String | TOKEN_TYPE_LOWER_PREC | "lowerPrecNumeric"

org.apache.lucene.analysis.ar.ArabicAnalyzer
public static final String | DEFAULT_STOPWORD_FILE | "stopwords.txt"
public static final String | STOPWORDS_COMMENT | "#"

org.apache.lucene.analysis.ar.ArabicNormalizer
public static final char | ALEF | 1575
public static final char | ALEF_HAMZA_ABOVE | 1571
public static final char | ALEF_HAMZA_BELOW | 1573
public static final char | ALEF_MADDA | 1570
public static final char | DAMMA | 1615
public static final char | DAMMATAN | 1612
public static final char | DOTLESS_YEH | 1609
public static final char | FATHA | 1614
public static final char | FATHATAN | 1611
public static final char | HEH | 1607
public static final char | KASRA | 1616
public static final char | KASRATAN | 1613
public static final char | SHADDA | 1617
public static final char | SUKUN | 1618
public static final char | TATWEEL | 1600
public static final char | TEH_MARBUTA | 1577
public static final char | YEH | 1610

org.apache.lucene.analysis.ar.ArabicStemmer
public static final char | ALEF | 1575
public static final char | BEH | 1576
public static final char | FEH | 1601
public static final char | HEH | 1607
public static final char | KAF | 1603
public static final char | LAM | 1604
public static final char | NOON | 1606
public static final char | TEH | 1578
public static final char | TEH_MARBUTA | 1577
public static final char | WAW | 1608
public static final char | YEH | 1610

org.apache.lucene.analysis.bg.BulgarianAnalyzer
public static final String | DEFAULT_STOPWORD_FILE | "stopwords.txt"
public static final String | STOPWORDS_COMMENT | "#"

org.apache.lucene.analysis.br.BrazilianAnalyzer
public static final String DEFAULT_STOPWORD_FILE "stopwords.txt"

org.apache.lucene.analysis.ca.CatalanAnalyzer
public static final String DEFAULT_STOPWORD_FILE "stopwords.txt"

org.apache.lucene.analysis.cjk.CJKBigramFilter
public static final String | DOUBLE_TYPE | "<DOUBLE>"
public static final int | HAN | 1
public static final int | HANGUL | 8
public static final int | HIRAGANA | 2
public static final int | KATAKANA | 4
public static final String | SINGLE_TYPE | "<SINGLE>"

org.apache.lucene.analysis.cn.smart.CharType
public static final int | DELIMITER | 0
public static final int | DIGIT | 2
public static final int | FULLWIDTH_DIGIT | 6
public static final int | FULLWIDTH_LETTER | 5
public static final int | HANZI | 3
public static final int | LETTER | 1
public static final int | OTHER | 7
public static final int | SPACE_LIKE | 4

org.apache.lucene.analysis.cn.smart.Utility
public static final int | MAX_FREQUENCE | 2159997
public static final String | SPACES | " \u3000\t\r\n"

org.apache.lucene.analysis.cn.smart.WordType
public static final int | CHINESE_WORD | 2
public static final int | DELIMITER | 5
public static final int | FULLWIDTH_NUMBER | 7
public static final int | FULLWIDTH_STRING | 6
public static final int | NUMBER | 4
public static final int | SENTENCE_BEGIN | 0
public static final int | SENTENCE_END | 1
public static final int | STRING | 3

org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
public static final int | DEFAULT_MAX_SUBWORD_SIZE | 15
public static final int | DEFAULT_MIN_SUBWORD_SIZE | 2
public static final int | DEFAULT_MIN_WORD_SIZE | 5

org.apache.lucene.analysis.compound.hyphenation.TernaryTree
protected static final int BLOCK_SIZE 2048

org.apache.lucene.analysis.cz.CzechAnalyzer
public static final String DEFAULT_STOPWORD_FILE "stopwords.txt"

org.apache.lucene.analysis.da.DanishAnalyzer
public static final String DEFAULT_STOPWORD_FILE "danish_stop.txt"

org.apache.lucene.analysis.de.GermanAnalyzer
public static final String DEFAULT_STOPWORD_FILE "german_stop.txt"

org.apache.lucene.analysis.el.GreekAnalyzer
public static final String DEFAULT_STOPWORD_FILE "stopwords.txt"

org.apache.lucene.analysis.es.SpanishAnalyzer
public static final String DEFAULT_STOPWORD_FILE "spanish_stop.txt"

org.apache.lucene.analysis.eu.BasqueAnalyzer
public static final String DEFAULT_STOPWORD_FILE "stopwords.txt"

org.apache.lucene.analysis.fa.PersianAnalyzer
public static final String | DEFAULT_STOPWORD_FILE | "stopwords.txt"
public static final String | STOPWORDS_COMMENT | "#"

org.apache.lucene.analysis.fa.PersianNormalizer
public static final char | FARSI_YEH | 1740
public static final char | HAMZA_ABOVE | 1620
public static final char | HEH | 1607
public static final char | HEH_GOAL | 1729
public static final char | HEH_YEH | 1728
public static final char | KAF | 1603
public static final char | KEHEH | 1705
public static final char | YEH | 1610
public static final char | YEH_BARREE | 1746

org.apache.lucene.analysis.fi.FinnishAnalyzer
public static final String DEFAULT_STOPWORD_FILE "finnish_stop.txt"

org.apache.lucene.analysis.fr.FrenchAnalyzer
public static final String DEFAULT_STOPWORD_FILE "french_stop.txt"

org.apache.lucene.analysis.ga.IrishAnalyzer
public static final String DEFAULT_STOPWORD_FILE "stopwords.txt"

org.apache.lucene.analysis.gl.GalicianAnalyzer
public static final String DEFAULT_STOPWORD_FILE "stopwords.txt"

org.apache.lucene.analysis.hi.HindiAnalyzer
public static final String DEFAULT_STOPWORD_FILE "stopwords.txt"

org.apache.lucene.analysis.hu.HungarianAnalyzer
public static final String DEFAULT_STOPWORD_FILE "hungarian_stop.txt"

org.apache.lucene.analysis.hy.ArmenianAnalyzer
public static final String DEFAULT_STOPWORD_FILE "stopwords.txt"

org.apache.lucene.analysis.id.IndonesianAnalyzer
public static final String DEFAULT_STOPWORD_FILE "stopwords.txt"

org.apache.lucene.analysis.it.ItalianAnalyzer
public static final String DEFAULT_STOPWORD_FILE "italian_stop.txt"

org.apache.lucene.analysis.ja.JapaneseKatakanaStemFilter
public static final int DEFAULT_MINIMUM_LENGTH 4

org.apache.lucene.analysis.ja.dict.BinaryDictionary
public static final String | DICT_FILENAME_SUFFIX | "$buffer.dat"
public static final String | DICT_HEADER | "kuromoji_dict"
public static final int | HAS_BASEFORM | 1
public static final int | HAS_PRONUNCIATION | 4
public static final int | HAS_READING | 2
public static final String | POSDICT_FILENAME_SUFFIX | "$posDict.dat"
public static final String | POSDICT_HEADER | "kuromoji_dict_pos"
public static final String | TARGETMAP_FILENAME_SUFFIX | "$targetMap.dat"
public static final String | TARGETMAP_HEADER | "kuromoji_dict_map"
public static final int | VERSION | 1

org.apache.lucene.analysis.ja.dict.CharacterDefinition
public static final String | FILENAME_SUFFIX | ".dat"
public static final String | HEADER | "kuromoji_cd"
public static final int | VERSION | 1

org.apache.lucene.analysis.ja.dict.ConnectionCosts
public static final String | FILENAME_SUFFIX | ".dat"
public static final String | HEADER | "kuromoji_cc"
public static final int | VERSION | 1

org.apache.lucene.analysis.ja.dict.Dictionary
public static final String INTERNAL_SEPARATOR "\u0000"

org.apache.lucene.analysis.ja.dict.TokenInfoDictionary
public static final String FST_FILENAME_SUFFIX "$fst.dat"

org.apache.lucene.analysis.ja.dict.UserDictionary
public static final int | LEFT_ID | 5
public static final int | RIGHT_ID | 5
public static final int | WORD_COST | -100000

org.apache.lucene.analysis.lv.LatvianAnalyzer
public static final String DEFAULT_STOPWORD_FILE "stopwords.txt"

org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter
public static final int | DEFAULT_MAX_GRAM_SIZE | 1
public static final int | DEFAULT_MIN_GRAM_SIZE | 1

org.apache.lucene.analysis.ngram.EdgeNGramTokenizer
public static final int | DEFAULT_MAX_GRAM_SIZE | 1
public static final int | DEFAULT_MIN_GRAM_SIZE | 1

org.apache.lucene.analysis.ngram.NGramTokenFilter
public static final int | DEFAULT_MAX_NGRAM_SIZE | 2
public static final int | DEFAULT_MIN_NGRAM_SIZE | 1

org.apache.lucene.analysis.ngram.NGramTokenizer
public static final int | DEFAULT_MAX_NGRAM_SIZE | 2
public static final int | DEFAULT_MIN_NGRAM_SIZE | 1

org.apache.lucene.analysis.nl.DutchAnalyzer
public static final String DEFAULT_STOPWORD_FILE "dutch_stop.txt"

org.apache.lucene.analysis.no.NorwegianAnalyzer
public static final String DEFAULT_STOPWORD_FILE "norwegian_stop.txt"

org.apache.lucene.analysis.path.PathHierarchyTokenizer
public static final char | DEFAULT_DELIMITER | 47
public static final int | DEFAULT_SKIP | 0

org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer
public static final char | DEFAULT_DELIMITER | 47
public static final int | DEFAULT_SKIP | 0

org.apache.lucene.analysis.payloads.DelimitedPayloadTokenFilter
public static final char DEFAULT_DELIMITER 124

org.apache.lucene.analysis.pl.PolishAnalyzer
public static final String | DEFAULT_STEMMER_FILE | "stemmer_20000.tbl"
public static final String | DEFAULT_STOPWORD_FILE | "stopwords.txt"

org.apache.lucene.analysis.pt.PortugueseAnalyzer
public static final String DEFAULT_STOPWORD_FILE "portuguese_stop.txt"

org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
public static final float defaultMaxDocFreqPercent 0.4000000059604645f

org.apache.lucene.analysis.reverse.ReverseStringFilter
public static final char | INFORMATION_SEPARATOR_MARKER | 31
public static final char | PUA_EC00_MARKER | 60416
public static final char | RTL_DIRECTION_MARKER | 8207
public static final char | START_OF_HEADING_MARKER | 1

org.apache.lucene.analysis.ro.RomanianAnalyzer
public static final String DEFAULT_STOPWORD_FILE "stopwords.txt"

org.apache.lucene.analysis.ru.RussianAnalyzer
public static final String DEFAULT_STOPWORD_FILE "russian_stop.txt"

org.apache.lucene.analysis.shingle.ShingleFilter
public static final int | DEFAULT_MAX_SHINGLE_SIZE | 2
public static final int | DEFAULT_MIN_SHINGLE_SIZE | 2
public static final String | DEFAULT_TOKEN_TYPE | "shingle"
public static final String | TOKEN_SEPARATOR | " "

org.apache.lucene.analysis.sinks.DateRecognizerSinkFilter
public static final String DATE_TYPE "date"

org.apache.lucene.analysis.standard.ClassicAnalyzer
public static final int DEFAULT_MAX_TOKEN_LENGTH 255

org.apache.lucene.analysis.standard.ClassicTokenizer
public static final int | ACRONYM | 2
public static final int | ACRONYM_DEP | 8
public static final int | ALPHANUM | 0
public static final int | APOSTROPHE | 1
public static final int | CJ | 7
public static final int | COMPANY | 3
public static final int | EMAIL | 4
public static final int | HOST | 5
public static final int | NUM | 6

org.apache.lucene.analysis.standard.StandardAnalyzer
public static final int DEFAULT_MAX_TOKEN_LENGTH 255

org.apache.lucene.analysis.standard.StandardTokenizer
public static final int | ACRONYM | 2
public static final int | ACRONYM_DEP | 8
public static final int | ALPHANUM | 0
public static final int | APOSTROPHE | 1
public static final int | CJ | 7
public static final int | COMPANY | 3
public static final int | EMAIL | 4
public static final int | HANGUL | 13
public static final int | HIRAGANA | 11
public static final int | HOST | 5
public static final int | IDEOGRAPHIC | 10
public static final int | KATAKANA | 12
public static final int | NUM | 6
public static final int | SOUTHEAST_ASIAN | 9

org.apache.lucene.analysis.standard.StandardTokenizerImpl
public static final int | HANGUL_TYPE | 13
public static final int | HIRAGANA_TYPE | 11
public static final int | IDEOGRAPHIC_TYPE | 10
public static final int | KATAKANA_TYPE | 12
public static final int | NUMERIC_TYPE | 6
public static final int | SOUTH_EAST_ASIAN_TYPE | 9
public static final int | WORD_TYPE | 0
public static final int | YYEOF | -1
public static final int | YYINITIAL | 0

org.apache.lucene.analysis.standard.StandardTokenizerInterface
public static final int YYEOF -1

org.apache.lucene.analysis.standard.UAX29URLEmailAnalyzer
public static final int DEFAULT_MAX_TOKEN_LENGTH 255

org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
public static final int | ALPHANUM | 0
public static final int | EMAIL | 8
public static final int | HANGUL | 6
public static final int | HIRAGANA | 4
public static final int | IDEOGRAPHIC | 3
public static final int | KATAKANA | 5
public static final int | NUM | 1
public static final int | SOUTHEAST_ASIAN | 2
public static final int | URL | 7

org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
public static final int | EMAIL_TYPE | 8
public static final int | HANGUL_TYPE | 6
public static final int | HIRAGANA_TYPE | 4
public static final int | IDEOGRAPHIC_TYPE | 3
public static final int | KATAKANA_TYPE | 5
public static final int | NUMERIC_TYPE | 1
public static final int | SOUTH_EAST_ASIAN_TYPE | 2
public static final int | URL_TYPE | 7
public static final int | WORD_TYPE | 0
public static final int | YYEOF | -1
public static final int | YYINITIAL | 0

org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
public static final int | HANGUL_TYPE | 13
public static final int | HIRAGANA_TYPE | 11
public static final int | IDEOGRAPHIC_TYPE | 10
public static final int | KATAKANA_TYPE | 12
public static final int | NUMERIC_TYPE | 6
public static final int | SOUTH_EAST_ASIAN_TYPE | 9
public static final int | WORD_TYPE | 0
public static final int | YYEOF | -1
public static final int | YYINITIAL | 0

org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
public static final int | EMAIL_TYPE | 8
public static final int | HANGUL_TYPE | 6
public static final int | HIRAGANA_TYPE | 4
public static final int | IDEOGRAPHIC_TYPE | 3
public static final int | KATAKANA_TYPE | 5
public static final int | NUMERIC_TYPE | 1
public static final int | SOUTH_EAST_ASIAN_TYPE | 2
public static final int | URL_TYPE | 7
public static final int | WORD_TYPE | 0
public static final int | YYEOF | -1
public static final int | YYINITIAL | 0

org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
public static final int | EMAIL_TYPE | 8
public static final int | HANGUL_TYPE | 6
public static final int | HIRAGANA_TYPE | 4
public static final int | IDEOGRAPHIC_TYPE | 3
public static final int | KATAKANA_TYPE | 5
public static final int | NUMERIC_TYPE | 1
public static final int | SOUTH_EAST_ASIAN_TYPE | 2
public static final int | URL_TYPE | 7
public static final int | WORD_TYPE | 0
public static final int | YYEOF | -1
public static final int | YYINITIAL | 0

org.apache.lucene.analysis.stempel.StempelFilter
public static final int DEFAULT_MIN_LENGTH 3

org.apache.lucene.analysis.sv.SwedishAnalyzer
public static final String DEFAULT_STOPWORD_FILE "swedish_stop.txt"

org.apache.lucene.analysis.synonym.SynonymFilter
public static final String TYPE_SYNONYM "SYNONYM"

org.apache.lucene.analysis.synonym.SynonymMap
public static final char WORD_SEPARATOR 0

org.apache.lucene.analysis.th.ThaiAnalyzer
public static final String DEFAULT_STOPWORD_FILE "stopwords.txt"

org.apache.lucene.analysis.tokenattributes.TypeAttribute
public static final String DEFAULT_TYPE "word"

org.apache.lucene.analysis.tr.TurkishAnalyzer
public static final String DEFAULT_STOPWORD_FILE "stopwords.txt"

org.apache.lucene.analysis.wikipedia.WikipediaTokenizer
public static final int | ACRONYM_ID | 2
public static final int | ALPHANUM_ID | 0
public static final int | APOSTROPHE_ID | 1
public static final String | BOLD | "b"
public static final int | BOLD_ID | 12
public static final String | BOLD_ITALICS | "bi"
public static final int | BOLD_ITALICS_ID | 14
public static final int | BOTH | 2
public static final String | CATEGORY | "c"
public static final int | CATEGORY_ID | 11
public static final String | CITATION | "ci"
public static final int | CITATION_ID | 10
public static final int | CJ_ID | 7
public static final int | COMPANY_ID | 3
public static final int | EMAIL_ID | 4
public static final String | EXTERNAL_LINK | "el"
public static final int | EXTERNAL_LINK_ID | 9
public static final String | EXTERNAL_LINK_URL | "elu"
public static final int | EXTERNAL_LINK_URL_ID | 17
public static final String | HEADING | "h"
public static final int | HEADING_ID | 15
public static final int | HOST_ID | 5
public static final String | INTERNAL_LINK | "il"
public static final int | INTERNAL_LINK_ID | 8
public static final String | ITALICS | "i"
public static final int | ITALICS_ID | 13
public static final int | NUM_ID | 6
public static final String | SUB_HEADING | "sh"
public static final int | SUB_HEADING_ID | 16
public static final int | TOKENS_ONLY | 0
public static final int | UNTOKENIZED_ONLY | 1
public static final int | UNTOKENIZED_TOKEN_FLAG | 1

org.apache.lucene.benchmark.Constants
public static final int | DEFAULT_LOG_STEP | 1000
public static final int | DEFAULT_MAXIMUM_DOCUMENTS | 2147483647
public static final int | DEFAULT_RUN_COUNT | 5
public static final int | DEFAULT_SCALE_UP | 5

org.apache.lucene.benchmark.byTask.feeds.DocMaker
public static final String | BODY_FIELD | "body"
public static final String | BYTES_FIELD | "bytes"
public static final String | DATE_FIELD | "docdate"
public static final String | DATE_MSEC_FIELD | "docdatenum"
public static final String | ID_FIELD | "docid"
public static final String | NAME_FIELD | "docname"
public static final String | TIME_SEC_FIELD | "doctimesecnum"
public static final String | TITLE_FIELD | "doctitle"

org.apache.lucene.benchmark.byTask.feeds.TrecContentSource
public static final String | DOC | "<DOC>"
public static final String | DOCNO | "<DOCNO>"
public static final String | TERMINATING_DOC | "</DOC>"
public static final String | TERMINATING_DOCNO | "</DOCNO>"

org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
public static final int | AfterEquals | 3
public static final int | ArgEquals | 17
public static final int | ArgName | 16
public static final int | ArgQuote1 | 20
public static final int | ArgQuote2 | 21
public static final int | ArgValue | 19
public static final int | CloseQuote1 | 24
public static final int | CloseQuote2 | 26
public static final int | Comment1 | 4
public static final int | Comment2 | 5
public static final int | CommentEnd1 | 28
public static final int | CommentEnd2 | 30
public static final int | CommentText1 | 27
public static final int | CommentText2 | 29
public static final int | DeclName | 3
public static final int | DEFAULT | 0
public static final int | Entity | 10
public static final int | EOF | 0
public static final int | HEX | 9
public static final int | LET | 7
public static final int | NUM | 8
public static final int | Punct | 13
public static final int | Quote1Text | 23
public static final int | Quote2Text | 25
public static final int | ScriptEnd | 15
public static final int | ScriptStart | 1
public static final int | ScriptText | 14
public static final int | SP | 12
public static final int | Space | 11
public static final int | TagEnd | 18
public static final int | TagName | 2
public static final int | WithinComment1 | 6
public static final int | WithinComment2 | 7
public static final int | WithinQuote1 | 4
public static final int | WithinQuote2 | 5
public static final int | WithinScript | 1
public static final int | WithinTag | 2
public static final int | Word | 6

org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
public static final boolean staticFlag false

org.apache.lucene.benchmark.byTask.tasks.DeleteDocTask
public static final int DEFAULT_DOC_DELETE_STEP 8

org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask
public static final int | DEFAULT_MAX_BUFFERED | -1
public static final int | DEFAULT_MERGE_PFACTOR | 10
public static final double | DEFAULT_RAM_FLUSH_MB | 16.0

org.apache.lucene.benchmark.byTask.tasks.OpenReaderTask
public static final String USER_DATA "userData"

org.apache.lucene.benchmark.byTask.tasks.ReportTask
protected static final String | ELAPSED | " elapsedSec"
protected static final String | OP | "Operation "
protected static final String | RECCNT | " recsPerRun"
protected static final String | RECSEC | " rec/s"
protected static final String | ROUND | " round"
protected static final String | RUNCNT | " runCnt"
protected static final String | TOTMEM | " avgTotalMem"
protected static final String | USEDMEM | " avgUsedMem"

org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask
public static final String | DEFAULT_SUFFICIENT_FIELDS | "doctitle,body"
public static final String | FIELDS_HEADER_INDICATOR | "FIELDS_HEADER_INDICATOR###"
public static final char | SEP | 9

org.apache.lucene.benchmark.byTask.utils.StreamUtils
public static final int BUFFER_SIZE 65536

org.apache.lucene.benchmark.quality.QualityStats
public static final int MAX_POINTS 20

org.apache.lucene.document.NumberTools
public static final String | MAX_STRING_VALUE | "01y2p0ij32e8e7"
public static final String | MIN_STRING_VALUE | "-0000000000000"

org.apache.lucene.facet.enhancements.association.AssociationsPayloadIterator
public static final long NO_ASSOCIATION -2147483648L

org.apache.lucene.facet.index.categorypolicy.NonTopLevelPathPolicy
public final int DEFAULT_MINIMAL_SUBPATH_LENGTH 2

org.apache.lucene.facet.index.params.DefaultFacetIndexingParams
public static final char DEFAULT_FACET_DELIM_CHAR 63305

org.apache.lucene.facet.search.FacetsAccumulator
public static final double | DEFAULT_COMPLEMENT_THRESHOLD | 0.6
public static final double | DISABLE_COMPLEMENT | 1d/0d
public static final double | FORCE_COMPLEMENT | 0.0

org.apache.lucene.facet.search.ScoredDocIDsIterator
public static final float DEFAULT_SCORE 1.0f

org.apache.lucene.facet.search.TotalFacetCountsCache
public static final int DEFAULT_CACHE_SIZE 2

org.apache.lucene.facet.search.params.FacetRequest
public static final int DEFAULT_DEPTH 1

org.apache.lucene.facet.search.sampling.SamplingParams
public static final int | DEFAULT_MAX_SAMPLE_SIZE | 10000
public static final int | DEFAULT_MIN_SAMPLE_SIZE | 100
public static final double | DEFAULT_OVERSAMPLE_FACTOR | 2.0
public static final double | DEFAULT_SAMPLE_RATIO | 0.01
public static final int | DEFAULT_SAMPLING_THRESHOLD | 75000

org.apache.lucene.facet.taxonomy.TaxonomyReader
public static final int | INVALID_ORDINAL | -1
public static final int | ROOT_ORDINAL | 0

org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
public static final String INDEX_CREATE_TIME "index.create.time"

org.apache.lucene.facet.taxonomy.writercache.cl2o.CompactLabelToOrdinal
public static final float DefaultLoadFactor 0.15000000596046448f

org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal
public static final int InvalidOrdinal -2

org.apache.lucene.index.BalancedSegmentMergePolicy
public static final int DEFAULT_NUM_LARGE_SEGMENTS 10

org.apache.lucene.index.FieldInfos
public static final int | FORMAT_OMIT_POSITIONS | -3
public static final int | FORMAT_PRE | -1
public static final int | FORMAT_START | -2

org.apache.lucene.index.IndexFileNames
public static final String | COMPOUND_FILE_EXTENSION | "cfs"
public static final String | COMPOUND_FILE_STORE_EXTENSION | "cfx"
public static final String | DELETABLE | "deletable"
public static final String | DELETES_EXTENSION | "del"
public static final String | FIELD_INFOS_EXTENSION | "fnm"
public static final String | FIELDS_EXTENSION | "fdt"
public static final String | FIELDS_INDEX_EXTENSION | "fdx"
public static final String | FREQ_EXTENSION | "frq"
public static final String | GEN_EXTENSION | "gen"
public static final String | NORMS_EXTENSION | "nrm"
public static final String | PLAIN_NORMS_EXTENSION | "f"
public static final String | PROX_EXTENSION | "prx"
public static final String | SEGMENTS | "segments"
public static final String | SEGMENTS_GEN | "segments.gen"
public static final String | SEPARATE_NORMS_EXTENSION | "s"
public static final String | TERMS_EXTENSION | "tis"
public static final String | TERMS_INDEX_EXTENSION | "tii"
public static final String | VECTORS_DOCUMENTS_EXTENSION | "tvd"
public static final String | VECTORS_FIELDS_EXTENSION | "tvf"
public static final String | VECTORS_INDEX_EXTENSION | "tvx"

org.apache.lucene.index.IndexWriter
public static final int | DEFAULT_MAX_BUFFERED_DELETE_TERMS | -1
public static final int | DEFAULT_MAX_BUFFERED_DOCS | -1
public static final double | DEFAULT_RAM_BUFFER_SIZE_MB | 16.0
public static final int | DEFAULT_TERM_INDEX_INTERVAL | 128
public static final int | DISABLE_AUTO_FLUSH | -1
public static final int | MAX_TERM_LENGTH | 16383
public static final String | WRITE_LOCK_NAME | "write.lock"

org.apache.lucene.index.IndexWriterConfig
public static final int | DEFAULT_MAX_BUFFERED_DELETE_TERMS | -1
public static final int | DEFAULT_MAX_BUFFERED_DOCS | -1
public static final int | DEFAULT_MAX_THREAD_STATES | 8
public static final double | DEFAULT_RAM_BUFFER_SIZE_MB | 16.0
public static final boolean | DEFAULT_READER_POOLING | false
public static final int | DEFAULT_TERM_INDEX_INTERVAL | 128
public static final int | DISABLE_AUTO_FLUSH | -1

org.apache.lucene.index.LogByteSizeMergePolicy
public static final double | DEFAULT_MAX_MERGE_MB | 2048.0
public static final double | DEFAULT_MAX_MERGE_MB_FOR_FORCED_MERGE | 9.223372036854776E18
public static final double | DEFAULT_MIN_MERGE_MB | 1.6

org.apache.lucene.index.LogDocMergePolicy
public static final int DEFAULT_MIN_MERGE_DOCS 1000

org.apache.lucene.index.LogMergePolicy
public static final int | DEFAULT_MAX_MERGE_DOCS | 2147483647
public static final int | DEFAULT_MERGE_FACTOR | 10
public static final double | DEFAULT_NO_CFS_RATIO | 0.1
public static final double | LEVEL_LOG_SPAN | 0.75

org.apache.lucene.index.SegmentInfos
public static final int | CURRENT_FORMAT | -11
public static final int | FORMAT | -1
public static final int | FORMAT_3_1 | -11
public static final int | FORMAT_CHECKSUM | -5
public static final int | FORMAT_DEL_COUNT | -6
public static final int | FORMAT_DIAGNOSTICS | -9
public static final int | FORMAT_HAS_PROX | -7
public static final int | FORMAT_HAS_VECTORS | -10
public static final int | FORMAT_LOCKLESS | -2
public static final int | FORMAT_MAXIMUM | -11
public static final int | FORMAT_MINIMUM | -1
public static final int | FORMAT_SHARED_DOC_STORE | -4
public static final int | FORMAT_SINGLE_NORM_FILE | -3
public static final int | FORMAT_USER_DATA | -8

org.apache.lucene.index.SegmentWriteState
public final int | maxSkipLevels | 10
public final int | skipInterval | 16

org.apache.lucene.index.SortedTermVectorMapper
public static final String ALL "_ALL_"

org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy
public static final float | DEFAULT_EPSILON | 0.0010000000474974513f
public static final int | DEFAULT_R | 1
public static final int | DEFAULT_TOP_K | 10

org.apache.lucene.index.pruning.PruningPolicy
public static final int | DEL_ALL | 255
public static final int | DEL_PAYLOADS | 8
public static final int | DEL_POSTINGS | 1
public static final int | DEL_STORED | 2
public static final int | DEL_VECTOR | 4

org.apache.lucene.misc.HighFreqTerms
public static final int DEFAULTnumTerms 100

org.apache.lucene.queryParser.QueryParserConstants
public static final int | _ESCAPED_CHAR | 2
public static final int | _NUM_CHAR | 1
public static final int | _QUOTED_CHAR | 6
public static final int | _TERM_CHAR | 4
public static final int | _TERM_START_CHAR | 3
public static final int | _WHITESPACE | 5
public static final int | AND | 8
public static final int | BAREOPER | 13
public static final int | Boost | 0
public static final int | CARAT | 18
public static final int | COLON | 16
public static final int | DEFAULT | 3
public static final int | EOF | 0
public static final int | FUZZY_SLOP | 21
public static final int | LPAREN | 14
public static final int | MINUS | 12
public static final int | NOT | 10
public static final int | NUMBER | 26
public static final int | OR | 9
public static final int | PLUS | 11
public static final int | PREFIXTERM | 22
public static final int | QUOTED | 19
public static final int | RangeEx | 1
public static final int | RANGEEX_END | 32
public static final int | RANGEEX_GOOP | 34
public static final int | RANGEEX_QUOTED | 33
public static final int | RANGEEX_START | 25
public static final int | RANGEEX_TO | 31
public static final int | RangeIn | 2
public static final int | RANGEIN_END | 28
public static final int | RANGEIN_GOOP | 30
public static final int | RANGEIN_QUOTED | 29
public static final int | RANGEIN_START | 24
public static final int | RANGEIN_TO | 27
public static final int | RPAREN | 15
public static final int | STAR | 17
public static final int | TERM | 20
public static final int | WILDTERM | 23

org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
public static final String PLAINTEXT_FIELD_NAME "_plain"

org.apache.lucene.queryParser.ext.Extensions
public static final char DEFAULT_EXTENSION_FIELD_DELIMITER 58

org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute
public static final String TAG_ID "MultiTermRewriteMethodConfiguration"

org.apache.lucene.queryParser.standard.parser.JavaCharStream
public static final boolean staticFlag false

org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
public static final int | _ESCAPED_CHAR | 2
public static final int | _NUM_CHAR | 1
public static final int | _QUOTED_CHAR | 6
public static final int | _TERM_CHAR | 4
public static final int | _TERM_START_CHAR | 3
public static final int | _WHITESPACE | 5
public static final int | AND | 8
public static final int | Boost | 0
public static final int | CARAT | 16
public static final int | COLON | 15
public static final int | DEFAULT | 3
public static final int | EOF | 0
public static final int | FUZZY_SLOP | 19
public static final int | LPAREN | 13
public static final int | MINUS | 12
public static final int | NOT | 10
public static final int | NUMBER | 22
public static final int | OR | 9
public static final int | PLUS | 11
public static final int | QUOTED | 17
public static final int | RangeEx | 1
public static final int | RANGEEX_END | 28
public static final int | RANGEEX_GOOP | 30
public static final int | RANGEEX_QUOTED | 29
public static final int | RANGEEX_START | 21
public static final int | RANGEEX_TO | 27
public static final int | RangeIn | 2
public static final int | RANGEIN_END | 24
public static final int | RANGEIN_GOOP | 26
public static final int | RANGEIN_QUOTED | 25
public static final int | RANGEIN_START | 20
public static final int | RANGEIN_TO | 23
public static final int | RPAREN | 14
public static final int | TERM | 18

org.apache.lucene.queryParser.standard.processors.MultiTermRewriteMethodProcessor
public static final String TAG_ID "MultiTermRewriteMethodConfiguration"

org.apache.lucene.queryParser.surround.parser.QueryParserConstants
public static final int | _DISTOP_NUM | 6
public static final int | _NUM_CHAR | 1
public static final int | _ONE_CHAR | 5
public static final int | _STAR | 4
public static final int | _TERM_CHAR | 2
public static final int | _WHITESPACE | 3
public static final int | AND | 9
public static final int | Boost | 0
public static final int | CARAT | 17
public static final int | COLON | 16
public static final int | COMMA | 15
public static final int | DEFAULT | 1
public static final int | EOF | 0
public static final int | LPAREN | 13
public static final int | N | 12
public static final int | NOT | 10
public static final int | NUMBER | 23
public static final int | OR | 8
public static final int | QUOTED | 19
public static final int | RPAREN | 14
public static final int | SUFFIXTERM | 20
public static final int | TERM | 22
public static final int | TRUNCQUOTED | 18
public static final int | TRUNCTERM | 21
public static final int | W | 11

org.apache.lucene.search.ChainedFilter
public static final int | AND | 1
public static final int | ANDNOT | 2
public static final int | OR | 0
public static final int | XOR | 3

org.apache.lucene.search.DocIdSetIterator
public static final int NO_MORE_DOCS 2147483647

org.apache.lucene.search.DuplicateFilter
public static final int | KM_USE_FIRST_OCCURRENCE | 1
public static final int | KM_USE_LAST_OCCURRENCE | 2
public static final int | PM_FAST_INVALIDATION | 2
public static final int | PM_FULL_VALIDATION | 1

org.apache.lucene.search.FieldCache
public static final int STRING_INDEX -1

org.apache.lucene.search.FilterManager
protected static final int | DEFAULT_CACHE_CLEAN_SIZE | 100
protected static final long | DEFAULT_CACHE_SLEEP_TIME | 600000L

org.apache.lucene.search.FuzzyQuery
public static final int | defaultMaxExpansions | 2147483647
public static final float | defaultMinSimilarity | 0.5f
public static final int | defaultPrefixLength | 0

org.apache.lucene.search.Similarity
public static final int NO_DOC_ID_PROVIDED -1

org.apache.lucene.search.SortField
public static final int | BYTE | 10
public static final int | CUSTOM | 9
public static final int | DOC | 1
public static final int | DOUBLE | 7
public static final int | FLOAT | 5
public static final int | INT | 4
public static final int | LONG | 6
public static final int | SCORE | 0
public static final int | SHORT | 8
public static final int | STRING | 3
public static final int | STRING_VAL | 11

org.apache.lucene.search.TimeLimitingCollector.TimerThread
public static final int | DEFAULT_RESOLUTION | 20
public static final String | THREAD_NAME | "TimeLimitedCollector timer thread"

org.apache.lucene.search.WildcardTermEnum
public static final char | WILDCARD_CHAR | 63
public static final char | WILDCARD_STRING | 42

org.apache.lucene.search.highlight.Highlighter
public static final int DEFAULT_MAX_CHARS_TO_ANALYZE 51200

org.apache.lucene.search.regex.JakartaRegexpCapabilities
public static final int | FLAG_MATCH_CASEINDEPENDENT | 1
public static final int | FLAG_MATCH_NORMAL | 0

org.apache.lucene.search.regex.JavaUtilRegexCapabilities
public static final int | FLAG_CANON_EQ | 128
public static final int | FLAG_CASE_INSENSITIVE | 2
public static final int | FLAG_COMMENTS | 4
public static final int | FLAG_DOTALL | 32
public static final int | FLAG_LITERAL | 16
public static final int | FLAG_MULTILINE | 8
public static final int | FLAG_UNICODE_CASE | 64
public static final int | FLAG_UNIX_LINES | 1

org.apache.lucene.search.similar.MoreLikeThis
public static final boolean | DEFAULT_BOOST | false
public static final int | DEFAULT_MAX_DOC_FREQ | 2147483647
public static final int | DEFAULT_MAX_NUM_TOKENS_PARSED | 5000
public static final int | DEFAULT_MAX_QUERY_TERMS | 25
public static final int | DEFAULT_MAX_WORD_LENGTH | 0
public static final int | DEFAULT_MIN_DOC_FREQ | 5
public static final int | DEFAULT_MIN_TERM_FREQ | 2
public static final int | DEFAULT_MIN_WORD_LENGTH | 0

org.apache.lucene.search.spell.SpellChecker
public static final float | DEFAULT_ACCURACY | 0.5f
public static final String | F_WORD | "word"

org.apache.lucene.search.suggest.fst.FSTCompletion
public static final int DEFAULT_BUCKETS 10

org.apache.lucene.search.suggest.fst.FSTCompletionBuilder
public static final int DEFAULT_BUCKETS 10

org.apache.lucene.search.suggest.fst.FSTLookup
public static final String FILENAME "fst.dat"

org.apache.lucene.search.suggest.fst.Sort
public static final long | ABSOLUTE_MIN_SORT_BUFFER_SIZE | 524288L
public static final long | GB | 1073741824L
public static final int | MAX_TEMPFILES | 128
public static final long | MB | 1048576L
public static final long | MIN_BUFFER_SIZE_MB | 32L

org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode
protected static final int | EQKID | 2
protected static final int | HIKID | 3
protected static final int | LOKID | 1
protected static final int | PARENT | 0

org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
public static final boolean | DEFAULT_FIELD_MATCH | true
public static final boolean | DEFAULT_PHRASE_HIGHLIGHT | true

org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner
public static final int DEFAULT_MAX_SCAN 20

org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder
public static final int | MARGIN_DEFAULT | 6
public static final int | MIN_FRAG_CHAR_SIZE_FACTOR | 3

org.apache.lucene.spatial.DistanceUtils
public static final double | DEG_180_AS_RADS | 3.141592653589793
public static final double | DEG_225_AS_RADS | 3.9269908169872414
public static final double | DEG_270_AS_RADS | 4.71238898038469
public static final double | DEG_45_AS_RADS | 0.7853981633974483
public static final double | DEG_90_AS_RADS | 1.5707963267948966
public static final double | DEGREES_TO_RADIANS | 0.017453292519943295
public static final double | EARTH_EQUATORIAL_RADIUS_KM | 6378.16018752
public static final double | EARTH_EQUATORIAL_RADIUS_MI | 3963.205
public static final double | EARTH_MEAN_RADIUS_KM | 6371.009
public static final double | EARTH_MEAN_RADIUS_MI | 3958.7614580847844
public static final double | KM_TO_MILES | 0.621371192
public static final double | MILES_TO_KM | 1.609344
public static final double | RADIANS_TO_DEGREES | 57.29577951308232

org.apache.lucene.spatial.geometry.FixedLatLng
public static final double | SCALE_FACTOR | 1000000.0
public static final int | SCALE_FACTOR_INT | 1000000

org.apache.lucene.spatial.geometry.shape.DistanceApproximation
public static final double | KILOMETERS_PER_MILE | 1.6093469858169556
public static final double | MILES_PER_LATITUDE | 69.17097473144531

org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder
public static final double MILES_FLOOR 1.0

org.apache.lucene.spatial.tier.projections.CartesianTierPlotter
public static final String DEFALT_FIELD_PREFIX "_tier_"

org.apache.lucene.store.BufferedIndexInput
public static final int BUFFER_SIZE 1024

org.apache.lucene.store.Lock
public static final long LOCK_OBTAIN_WAIT_FOREVER -1L

org.apache.lucene.store.NativePosixUtil
public static final int | DONTNEED | 4
public static final int | NOREUSE | 5
public static final int | NORMAL | 0
public static final int | RANDOM | 2
public static final int | SEQUENTIAL | 1
public static final int | WILLNEED | 3

org.apache.lucene.util.ByteBlockPool
public static final int | BYTE_BLOCK_MASK | 32767
public static final int | BYTE_BLOCK_SHIFT | 15
public static final int | BYTE_BLOCK_SIZE | 32768

org.apache.lucene.util.BytesRefHash
public static final int DEFAULT_CAPACITY 16

org.apache.lucene.util.IOUtils
public static final String UTF_8 "UTF-8"

org.apache.lucene.util.NumericUtils
public static final int | BUF_SIZE_INT | 6
public static final int | BUF_SIZE_LONG | 11
public static final int | PRECISION_STEP_DEFAULT | 4
public static final char | SHIFT_START_INT | 96
public static final char | SHIFT_START_LONG | 32

org.apache.lucene.util.RamUsageEstimator
public static final int | NUM_BYTES_BOOLEAN | 1
public static final int | NUM_BYTES_BYTE | 1
public static final int | NUM_BYTES_CHAR | 2
public static final int | NUM_BYTES_DOUBLE | 8
public static final int | NUM_BYTES_FLOAT | 4
public static final int | NUM_BYTES_INT | 4
public static final int | NUM_BYTES_LONG | 8
public static final int | NUM_BYTES_SHORT | 2
public static final long | ONE_GB | 1073741824L
public static final long | ONE_KB | 1024L
public static final long | ONE_MB | 1048576L

org.apache.lucene.util.RecyclingByteBlockAllocator
public static final int DEFAULT_BUFFERED_BLOCKS 64

org.apache.lucene.util.ThrottledIndexOutput
public static final int DEFAULT_MIN_WRITTEN_BYTES 1024

org.apache.lucene.util.UnicodeUtil
public static final int | UNI_REPLACEMENT_CHAR | 65533
public static final int | UNI_SUR_HIGH_END | 56319
public static final int | UNI_SUR_HIGH_START | 55296
public static final int | UNI_SUR_LOW_END | 57343
public static final int | UNI_SUR_LOW_START | 56320

org.apache.lucene.util.Vint8
public static final int MAXIMUM_BYTES_NEEDED 5

org.apache.lucene.util.collections.IntToDoubleMap
public static final double GROUND 0d/0d

org.apache.lucene.util.collections.IntToIntMap
public static final int GROUD -1

org.apache.lucene.util.encoding.IntDecoder
public static final long EOS 4294967296L

org.apache.lucene.util.fst.FST<T>
public static final int END_LABEL -1

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Deprecated List

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES

Deprecated API

Contents
  • Deprecated Interfaces
  • Deprecated Classes
  • Deprecated Enums
  • Deprecated Exceptions
  • Deprecated Fields
  • Deprecated Methods
  • Deprecated Constructors
  • Deprecated Enum Constants
Deprecated Interfaces
org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttribute
org.apache.lucene.queryParser.standard.config.AnalyzerAttribute
org.apache.lucene.queryParser.standard.config.BoostAttribute
org.apache.lucene.queryParser.core.config.ConfigAttribute
org.apache.lucene.queryParser.standard.config.DateResolutionAttribute
org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute
org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttribute
org.apache.lucene.queryParser.standard.config.FieldBoostMapAttribute
org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttribute
org.apache.lucene.queryParser.standard.config.FuzzyAttribute
org.apache.lucene.spatial.geometry.shape.Geometry2D
org.apache.lucene.spatial.tier.projections.IProjector
org.apache.lucene.queryParser.standard.config.LocaleAttribute
org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttribute
org.apache.lucene.messages.Message
Will be moved to a private package inside flexible query parser (Lucene 4.0).
org.apache.lucene.queryParser.standard.config.MultiFieldAttribute
org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute
org.apache.lucene.messages.NLSException
Will be moved to a private package inside flexible query parser (Lucene 4.0).
org.apache.lucene.queryParser.standard.config.PositionIncrementsAttribute
org.apache.lucene.queryParser.standard.config.RangeCollatorAttribute
org.apache.lucene.search.RMIRemoteSearchable
This package (all of contrib/remote) will be removed in 4.0.
org.apache.lucene.search.Searchable
In 4.0 this interface is removed/absorbed into IndexSearcher
org.apache.lucene.analysis.tokenattributes.TermAttribute
Use CharTermAttribute instead.

Deprecated Classes
org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl
org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl
org.apache.lucene.analysis.ar.ArabicLetterTokenizer
(3.1) Use StandardTokenizer instead.
org.apache.lucene.queryParser.standard.config.BoostAttributeImpl
org.apache.lucene.spatial.geometry.CartesianPoint
org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder
org.apache.lucene.spatial.tier.CartesianShapeFilter
org.apache.lucene.spatial.tier.projections.CartesianTierPlotter
org.apache.lucene.analysis.CharArraySet.CharArraySetIterator
Use the standard iterator, which returns char[] instances.
org.apache.lucene.analysis.cn.ChineseAnalyzer
Use StandardAnalyzer instead, which has the same functionality. This analyzer will be removed in Lucene 5.0
org.apache.lucene.analysis.cn.ChineseFilter
Use StopFilter instead, which has the same functionality. This filter will be removed in Lucene 5.0
org.apache.lucene.analysis.cn.ChineseTokenizer
Use StandardTokenizer instead, which has the same functionality. This filter will be removed in Lucene 5.0
org.apache.lucene.analysis.cjk.CJKTokenizer
Use StandardTokenizer, CJKWidthFilter, CJKBigramFilter, and LowerCaseFilter instead.
org.apache.lucene.document.DateField
If you build a new index, use DateTools or NumericField instead. This class is included for use with existing indices and will be removed in a future release (possibly Lucene 4.0).
org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl
org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl
org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl
org.apache.lucene.spatial.geometry.shape.DistanceApproximation
This has been replaced with more accurate math in LLRect. This class will be removed in a future release.
org.apache.lucene.spatial.tier.DistanceFieldComparatorSource
org.apache.lucene.spatial.tier.DistanceFilter
org.apache.lucene.spatial.tier.DistanceHandler
org.apache.lucene.spatial.tier.DistanceQueryBuilder
org.apache.lucene.spatial.DistanceUtils
org.apache.lucene.analysis.nl.DutchStemFilter
Use SnowballFilter with DutchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0
org.apache.lucene.analysis.nl.DutchStemmer
Use DutchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0
org.apache.lucene.spatial.geometry.shape.Ellipse
org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl
org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl
org.apache.lucene.index.FieldNormModifier
This class is broken, as it does not correctly take position overlaps into account.
org.apache.lucene.search.FilterManager
used by remote package which is deprecated as well. You should use CachingWrapperFilter if you wish to cache Filters.
org.apache.lucene.spatial.geometry.FixedLatLng
org.apache.lucene.spatial.geometry.FloatLatLng
org.apache.lucene.analysis.fr.FrenchStemFilter
Use SnowballFilter with FrenchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0
org.apache.lucene.analysis.fr.FrenchStemmer
Use FrenchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0
org.apache.lucene.search.suggest.fst.FSTLookup
Use FSTCompletionLookup instead.
org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl
org.apache.lucene.spatial.geohash.GeoHashDistanceFilter
org.apache.lucene.spatial.geohash.GeoHashUtils
org.apache.lucene.index.IndexWriter.MaxFieldLength
use LimitTokenCountAnalyzer instead.
org.apache.lucene.analysis.in.IndicTokenizer
(3.6) Use StandardTokenizer instead.
org.apache.lucene.store.instantiated.InstantiatedIndex
contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM
org.apache.lucene.store.instantiated.InstantiatedIndexReader
contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM
org.apache.lucene.store.instantiated.InstantiatedIndexWriter
contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM
org.apache.lucene.analysis.ISOLatin1AccentFilter
If you build a new index, use ASCIIFoldingFilter which covers a superset of Latin 1. This class is included for use with existing indexes and will be removed in a future release (possibly Lucene 4.0).
org.apache.lucene.spatial.geometry.LatLng
org.apache.lucene.spatial.tier.LatLongDistanceFilter
org.apache.lucene.spatial.geometry.shape.LineSegment
org.apache.lucene.spatial.geometry.shape.LLRect
org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl
org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl
org.apache.lucene.messages.MessageImpl
Will be moved to a private package inside flexible query parser (Lucene 4.0).
org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl
org.apache.lucene.queryParser.standard.MultiFieldQueryParserWrapper
this class will be removed soon, it's a temporary class to be used along the transition from the old query parser to the new one
org.apache.lucene.search.MultiSearcher
If you are using MultiSearcher over IndexSearchers, please use MultiReader instead; this class does not properly handle certain kinds of queries (see LUCENE-2756).
org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl
org.apache.lucene.messages.NLS
Will be moved to a private package inside flexible query parser (Lucene 4.0).
org.apache.lucene.document.NumberTools
For new indexes use NumericUtils instead, which provides a sortable binary representation (prefix encoded) of numeric values. To index and efficiently query numeric values use NumericField and NumericRangeQuery. This class is included for use with existing indices and will be removed in a future release (possibly Lucene 4.0).
org.apache.lucene.search.ParallelMultiSearcher
Please pass an ExecutorService to IndexSearcher, instead.
org.apache.lucene.util.Parameter
Use Java 5 enum, will be removed in a later Lucene 3.x release.
org.apache.lucene.queryParser.core.nodes.ParametricQueryNode
this class will be removed in future. FieldQueryNode should be used instead.
org.apache.lucene.index.PayloadProcessorProvider.DirPayloadProcessor
Use PayloadProcessorProvider.ReaderPayloadProcessor instead.
org.apache.lucene.spatial.geometry.shape.Point2D
org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl
org.apache.lucene.queryParser.standard.QueryParserWrapper
this class will be removed soon, it's a temporary class to be used along the transition from the old query parser to the new one
org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl
org.apache.lucene.queryParser.standard.nodes.RangeQueryNode
this class will be removed in future, TermRangeQueryNode should be used instead
org.apache.lucene.queryParser.standard.builders.RangeQueryNodeBuilder
this builder will be removed in future together with RangeQueryNode
org.apache.lucene.spatial.geometry.shape.Rectangle
org.apache.lucene.search.RemoteCachingWrapperFilter
This package (all of contrib/remote) will be removed in 4.0.
org.apache.lucene.search.RemoteSearchable
This package (all of contrib/remote) will be removed in 4.0.
org.apache.lucene.analysis.ru.RussianLetterTokenizer
Use StandardTokenizer instead, which has the same functionality. This filter will be removed in Lucene 5.0
org.apache.lucene.analysis.ru.RussianLowerCaseFilter
Use LowerCaseFilter instead, which has the same functionality. This filter will be removed in Lucene 4.0
org.apache.lucene.analysis.ru.RussianStemFilter
Use SnowballFilter with RussianStemmer instead, which has the same functionality. This filter will be removed in Lucene 4.0
org.apache.lucene.search.Searcher
In 4.0 this abstract class is removed/absorbed into IndexSearcher
org.apache.lucene.spatial.tier.Shape
org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Will be removed in Lucene 4.0. This filter is unmaintained and might not behave correctly if used with custom Attributes, i.e. Attributes other than the ones located in org.apache.lucene.analysis.tokenattributes. It also uses hardcoded payload encoders which makes it not easily adaptable to other use-cases.
org.apache.lucene.search.SimilarityDelegator
this class will be removed in 4.0. Please subclass Similarity or DefaultSimilarity instead.
org.apache.lucene.spatial.tier.projections.SinusoidalProjector
Until we can put in place proper tests and a proper fix.
org.apache.lucene.analysis.snowball.SnowballAnalyzer
Use the language-specific analyzer in contrib/analyzers instead. This analyzer will be removed in Lucene 5.0
org.apache.lucene.search.regex.SpanRegexQuery
Use new SpanMultiTermQueryWrapper<RegexQuery>(new RegexQuery()) instead. This query will be removed in Lucene 4.0
org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
This class is only for exact backwards compatibility
org.apache.lucene.analysis.tokenattributes.TermAttributeImpl
This class is not used anymore. The backwards layer in AttributeFactory uses the replacement implementation.
org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
This class is only for exact backwards compatibility
org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
This class is only for exact backwards compatibility
org.apache.lucene.spatial.geometry.shape.Vector2D

Deprecated Enums
org.apache.lucene.spatial.geometry.DistanceUnits
org.apache.lucene.spatial.geometry.shape.IntersectCase

Deprecated Exceptions
org.apache.lucene.spatial.tier.InvalidGeoException

Deprecated Fields
org.apache.lucene.analysis.standard.StandardTokenizer.ACRONYM
org.apache.lucene.analysis.standard.StandardTokenizer.ACRONYM_DEP
this solves a bug where HOSTs that end with '.' are identified as ACRONYMs.
org.apache.lucene.analysis.standard.ClassicTokenizer.ACRONYM_DEP
this solves a bug where HOSTs that end with '.' are identified as ACRONYMs.
org.apache.lucene.analysis.standard.StandardTokenizer.APOSTROPHE
org.apache.lucene.analysis.br.BrazilianAnalyzer.BRAZILIAN_STOP_WORDS
use BrazilianAnalyzer.getDefaultStopSet() instead
org.apache.lucene.analysis.payloads.IdentityEncoder.charsetName
This field is no longer used. Use IdentityEncoder.charset instead.
org.apache.lucene.analysis.standard.StandardTokenizer.CJ
org.apache.lucene.analysis.standard.StandardTokenizer.COMPANY
org.apache.lucene.analysis.cz.CzechAnalyzer.CZECH_STOP_WORDS
use CzechAnalyzer.getDefaultStopSet() instead
org.apache.lucene.search.similar.MoreLikeThis.DEFAULT_ANALYZER
This default will be removed in Lucene 4.0 (with the default being null). If you are not using term vectors, explicitly set your analyzer instead.
org.apache.lucene.index.IndexWriter.DEFAULT_MAX_BUFFERED_DELETE_TERMS
use IndexWriterConfig.DEFAULT_MAX_BUFFERED_DELETE_TERMS instead
org.apache.lucene.index.IndexWriter.DEFAULT_MAX_BUFFERED_DOCS
use IndexWriterConfig.DEFAULT_MAX_BUFFERED_DOCS instead.
org.apache.lucene.index.IndexWriter.DEFAULT_MAX_FIELD_LENGTH
see IndexWriterConfig
org.apache.lucene.index.IndexWriter.DEFAULT_RAM_BUFFER_SIZE_MB
use IndexWriterConfig.DEFAULT_RAM_BUFFER_SIZE_MB instead.
org.apache.lucene.index.IndexWriter.DEFAULT_TERM_INDEX_INTERVAL
use IndexWriterConfig.DEFAULT_TERM_INDEX_INTERVAL instead.
org.apache.lucene.index.IndexWriter.DISABLE_AUTO_FLUSH
use IndexWriterConfig.DISABLE_AUTO_FLUSH instead
org.apache.lucene.analysis.nl.DutchAnalyzer.DUTCH_STOP_WORDS
use DutchAnalyzer.getDefaultStopSet() instead
org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer.EMAIL_TYPE
use UAX29URLEmailTokenizer.TOKEN_TYPES instead
org.apache.lucene.util.AttributeImpl.enableBackwards
this will be removed in Lucene 4.0.
org.apache.lucene.analysis.fr.FrenchAnalyzer.FRENCH_STOP_WORDS
use FrenchAnalyzer.getDefaultStopSet() instead
org.apache.lucene.analysis.de.GermanAnalyzer.GERMAN_STOP_WORDS
use GermanAnalyzer.getDefaultStopSet() instead
org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer.HANGUL_TYPE
use UAX29URLEmailTokenizer.TOKEN_TYPES instead
org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer.HIRAGANA_TYPE
use UAX29URLEmailTokenizer.TOKEN_TYPES instead
org.apache.lucene.analysis.standard.StandardTokenizer.HOST
org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer.IDEOGRAPHIC_TYPE
use UAX29URLEmailTokenizer.TOKEN_TYPES instead
org.apache.lucene.util.Constants.JAVA_1_1
This constant is useless since Lucene is on Java 5
org.apache.lucene.util.Constants.JAVA_1_2
This constant is useless since Lucene is on Java 5
org.apache.lucene.util.Constants.JAVA_1_3
This constant is useless since Lucene is on Java 5
org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer.KATAKANA_TYPE
use UAX29URLEmailTokenizer.TOKEN_TYPES instead
org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer.NUMERIC_TYPE
use UAX29URLEmailTokenizer.TOKEN_TYPES instead
org.apache.lucene.index.SegmentReader.readOnly
org.apache.lucene.search.CheckHits.ExplanationAsserter.SCORE_TOLERANCE_DELTA
org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer.SOUTH_EAST_ASIAN_TYPE
use UAX29URLEmailTokenizer.TOKEN_TYPES instead
org.apache.lucene.analysis.cjk.CJKAnalyzer.STOP_WORDS
use CJKAnalyzer.getDefaultStopSet() instead
org.apache.lucene.analysis.ar.ArabicAnalyzer.STOPWORDS_COMMENT
use WordlistLoader.getWordSet(Reader, String, Version) directly
org.apache.lucene.analysis.bg.BulgarianAnalyzer.STOPWORDS_COMMENT
use WordlistLoader.getWordSet(Reader, String, Version) directly
org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer.URL_TYPE
use UAX29URLEmailTokenizer.TOKEN_TYPES instead
org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer.WORD_TYPE
use UAX29URLEmailTokenizer.TOKEN_TYPES instead
org.apache.lucene.index.IndexWriter.WRITE_LOCK_TIMEOUT
use IndexWriterConfig.WRITE_LOCK_TIMEOUT instead

Deprecated Methods
org.apache.lucene.index.IndexReader.acquireWriteLock()
Write support will be removed in Lucene 4.0.
org.apache.lucene.analysis.PerFieldAnalyzerWrapper.addAnalyzer(String, Analyzer)
Changing the Analyzer for a field after instantiation prevents reusability. Analyzers for fields should be set during construction.
org.apache.lucene.index.IndexWriter.addIndexesNoOptimize(Directory...)
use IndexWriter.addIndexes(Directory...) instead
org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline.addProcessor(QueryNodeProcessor)
this class now conforms to List interface, so use QueryNodeProcessorPipeline.add(QueryNodeProcessor) instead
org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer.addStopWords(IndexReader)
Stopwords should be calculated at instantiation using QueryAutoStopWordAnalyzer.QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader)
org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer.addStopWords(IndexReader, float)
Stowords should be calculated at instantiation using QueryAutoStopWordAnalyzer.QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, float)
org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer.addStopWords(IndexReader, int)
Stopwords should be calculated at instantiation using QueryAutoStopWordAnalyzer.QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, int)
org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer.addStopWords(IndexReader, String, float)
Stowords should be calculated at instantiation using QueryAutoStopWordAnalyzer.QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, Collection, float)
org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer.addStopWords(IndexReader, String, int)
Stowords should be calculated at instantiation using QueryAutoStopWordAnalyzer.QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, Collection, int)
org.apache.lucene.util._TestUtil.arrayToString(int[])
-- in 3.0 we can use Arrays.toString instead
org.apache.lucene.util._TestUtil.arrayToString(Object[])
-- in 3.0 we can use Arrays.toString instead
org.apache.lucene.util.LuceneTestCase.assertEquals(double, double)
org.apache.lucene.util.LuceneTestCase.assertEquals(float, float)
org.apache.lucene.util.LuceneTestCase.assertEquals(String, double, double)
org.apache.lucene.util.LuceneTestCase.assertEquals(String, float, float)
org.apache.lucene.search.MultiTermQuery.clearTotalNumberOfTerms()
Don't use this method, as its not thread safe and useless.
org.apache.lucene.search.MultiTermQueryWrapperFilter.clearTotalNumberOfTerms()
Don't use this method, as its not thread safe and useless.
org.apache.lucene.index.IndexReader.clone(boolean)
Write support will be removed in Lucene 4.0. Use IndexReader.clone() instead.
org.apache.lucene.index.MultiReader.clone(boolean)
Write support will be removed in Lucene 4.0. Use MultiReader.clone() instead.
org.apache.lucene.index.SegmentReader.clone(boolean)
org.apache.lucene.index.ParallelReader.clone(boolean)
Write support will be removed in Lucene 4.0. Use ParallelReader.clone() instead.
org.apache.lucene.index.SegmentReader.cloneDeletedDocs(BitVector)
org.apache.lucene.index.SegmentReader.cloneNormBytes(byte[])
org.apache.lucene.index.IndexReader.commit()
Write support will be removed in Lucene 4.0.
org.apache.lucene.index.IndexReader.commit(Map)
Write support will be removed in Lucene 4.0.
org.apache.lucene.queryParser.core.nodes.QueryNode.containsTag(CharSequence)
use QueryNode.containsTag(String) instead
org.apache.lucene.queryParser.core.nodes.QueryNodeImpl.containsTag(CharSequence)
use QueryNodeImpl.containsTag(String) instead
org.apache.lucene.store.Directory.copy(Directory, Directory, boolean)
should be replaced with calls to Directory.copy(Directory, String, String) for every file that needs copying. You can use the following code:
 IndexFileNameFilter filter = IndexFileNameFilter.getFilter();
 for (String file : src.listAll()) {
   if (filter.accept(null, file)) {
     src.copy(dest, file, file);
   }
 }
org.apache.lucene.analysis.CharArraySet.copy(Set)
use CharArraySet.copy(Version, Set) instead.
org.apache.lucene.search.Searcher.createWeight(Query)
never ever use this method in Weight implementations. Subclasses of Searcher should use Searcher.createNormalizedWeight(org.apache.lucene.search.Query), instead.
org.apache.lucene.util.IndexableBinaryStringTools.decode(CharBuffer)
Use IndexableBinaryStringTools.decode(char[], int, int, byte[], int, int) instead. This method will be removed in Lucene 4.0
org.apache.lucene.util.IndexableBinaryStringTools.decode(CharBuffer, ByteBuffer)
Use IndexableBinaryStringTools.decode(char[], int, int, byte[], int, int) instead. This method will be removed in Lucene 4.0
org.apache.lucene.search.Similarity.decodeNorm(byte)
Use Similarity.decodeNormValue(byte) instead.
org.apache.lucene.index.IndexReader.deleteDocument(int)
Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
org.apache.lucene.index.IndexReader.deleteDocuments(Term)
Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
org.apache.lucene.index.IndexReader.doCommit(Map)
Write support will be removed in Lucene 4.0.
org.apache.lucene.index.MultiReader.doCommit(Map)
org.apache.lucene.index.SegmentReader.doCommit(Map)
org.apache.lucene.index.ParallelReader.doCommit(Map)
org.apache.lucene.index.FilterIndexReader.doCommit(Map)
org.apache.lucene.index.IndexReader.doDelete(int)
Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
org.apache.lucene.index.MultiReader.doDelete(int)
org.apache.lucene.index.SegmentReader.doDelete(int)
org.apache.lucene.index.ParallelReader.doDelete(int)
org.apache.lucene.index.FilterIndexReader.doDelete(int)
org.apache.lucene.index.IndexReader.doOpenIfChanged(boolean)
Write support will be removed in Lucene 4.0. Use IndexReader.doOpenIfChanged() instead
org.apache.lucene.index.MultiReader.doOpenIfChanged(boolean)
Write support will be removed in Lucene 4.0. Use MultiReader.doOpenIfChanged() instead.
org.apache.lucene.index.SegmentReader.doOpenIfChanged(boolean)
org.apache.lucene.index.ParallelReader.doOpenIfChanged(boolean)
Write support will be removed in Lucene 4.0. Use ParallelReader.doOpenIfChanged() instead.
org.apache.lucene.index.IndexReader.doSetNorm(int, String, byte)
Write support will be removed in Lucene 4.0. There will be no replacement for this method.
org.apache.lucene.index.MultiReader.doSetNorm(int, String, byte)
org.apache.lucene.index.SegmentReader.doSetNorm(int, String, byte)
org.apache.lucene.index.ParallelReader.doSetNorm(int, String, byte)
org.apache.lucene.index.FilterIndexReader.doSetNorm(int, String, byte)
org.apache.lucene.index.IndexReader.doUndeleteAll()
Write support will be removed in Lucene 4.0. There will be no replacement for this method.
org.apache.lucene.index.MultiReader.doUndeleteAll()
org.apache.lucene.index.SegmentReader.doUndeleteAll()
org.apache.lucene.index.ParallelReader.doUndeleteAll()
org.apache.lucene.index.FilterIndexReader.doUndeleteAll()
org.apache.lucene.util.IndexableBinaryStringTools.encode(ByteBuffer)
Use IndexableBinaryStringTools.encode(byte[], int, int, char[], int, int) instead. This method will be removed in Lucene 4.0
org.apache.lucene.util.IndexableBinaryStringTools.encode(ByteBuffer, CharBuffer)
Use IndexableBinaryStringTools.encode(byte[], int, int, char[], int, int) instead. This method will be removed in Lucene 4.0
org.apache.lucene.search.Similarity.encodeNorm(float)
Use Similarity.encodeNormValue(float) instead.
org.tartarus.snowball.SnowballProgram.eq_s_b(int, String)
for binary back compat. Will be removed in Lucene 4.0
org.tartarus.snowball.SnowballProgram.eq_s(int, String)
for binary back compat. Will be removed in Lucene 4.0
org.tartarus.snowball.SnowballProgram.eq_v_b(StringBuilder)
for binary back compat. Will be removed in Lucene 4.0
org.tartarus.snowball.SnowballProgram.eq_v(StringBuilder)
for binary back compat. Will be removed in Lucene 4.0
org.apache.lucene.util.RamUsageEstimator.estimateRamUsage(Object)
Don't create instances of this class, instead use the static RamUsageEstimator.sizeOf(Object) method.
org.apache.lucene.index.IndexWriter.expungeDeletes()
org.apache.lucene.index.IndexWriter.expungeDeletes(boolean)
org.apache.lucene.store.Directory.fileModified(String)
org.apache.lucene.search.ChainedFilter.finalResult(OpenBitSetDISI, int)
Either use CachingWrapperFilter, or switch to a different DocIdSet implementation yourself. This method will be removed in Lucene 4.0
org.apache.lucene.index.IndexReader.flush()
Write support will be removed in Lucene 4.0.
org.apache.lucene.index.IndexReader.flush(Map)
Write support will be removed in Lucene 4.0.
org.apache.lucene.queryParser.CharStream.getColumn()
org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream.getColumn()
org.apache.lucene.queryParser.standard.parser.JavaCharStream.getColumn()
org.apache.lucene.queryParser.surround.parser.CharStream.getColumn()
org.apache.lucene.index.IndexReader.getCommitUserData()
Call IndexReader.getIndexCommit() and then call IndexCommit.getUserData().
org.apache.lucene.index.IndexReader.getCommitUserData(Directory)
Call IndexReader.getIndexCommit() on an open IndexReader, and then call IndexCommit.getUserData().
org.apache.lucene.index.IndexReader.getCurrentVersion(Directory)
Use IndexReader.getVersion() on an opened IndexReader.
org.apache.lucene.util.IndexableBinaryStringTools.getDecodedLength(CharBuffer)
Use IndexableBinaryStringTools.getDecodedLength(char[], int, int) instead. This method will be removed in Lucene 4.0
org.apache.lucene.index.IndexWriter.getDefaultWriteLockTimeout()
use IndexWriterConfig.getDefaultWriteLockTimeout() instead
org.apache.lucene.index.PayloadProcessorProvider.getDirProcessor(Directory)
Use PayloadProcessorProvider.getReaderProcessor(org.apache.lucene.index.IndexReader) instead. You can still select by Directory, if you retrieve the underlying directory from IndexReader.directory().
org.apache.lucene.analysis.StopFilter.getEnablePositionIncrementsVersionDefault(Version)
use StopFilter.StopFilter(Version, TokenStream, Set) instead
org.apache.lucene.util.IndexableBinaryStringTools.getEncodedLength(ByteBuffer)
Use IndexableBinaryStringTools.getEncodedLength(byte[], int, int) instead. This method will be removed in Lucene 4.0
org.apache.lucene.document.Document.getField(String)
use Document.getFieldable(java.lang.String) instead and cast depending on data type.
org.apache.lucene.queryParser.core.config.QueryConfigHandler.getFieldConfig(CharSequence)
use QueryConfigHandler.getFieldConfig(String) instead
org.apache.lucene.queryParser.core.config.FieldConfig.getFieldName()
use FieldConfig.getField() instead
org.apache.lucene.queryParser.QueryParser.getFieldQuery(String, String)
Use QueryParser.getFieldQuery(String,String,boolean) instead.
org.apache.lucene.queryParser.standard.QueryParserWrapper.getFieldQuery(String, String)
Use QueryParserWrapper.getFieldQuery(String, String, boolean) instead
org.apache.lucene.document.Document.getFields(String)
use Document.getFieldable(java.lang.String) instead and cast depending on data type.
org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder.getFieldValues(IndexReader, int, String)
org.apache.lucene.store.FSDirectory.getFile()
Use FSDirectory.getDirectory() instead.
org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder.getFragmentSource(StringBuilder, int[], String[], int, int)
org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter.getHyphenationTree(Reader)
Don't use Readers with fixed charset to load XML files, unless programatically created. Use HyphenationCompoundWordTokenFilter.getHyphenationTree(InputSource) instead, where you can supply default charset and input stream, if you like.
org.apache.lucene.queryParser.CharStream.getLine()
org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream.getLine()
org.apache.lucene.queryParser.standard.parser.JavaCharStream.getLine()
org.apache.lucene.queryParser.surround.parser.CharStream.getLine()
org.apache.lucene.index.IndexWriter.getMaxBufferedDeleteTerms()
use IndexWriterConfig.getMaxBufferedDeleteTerms() instead
org.apache.lucene.index.IndexWriter.getMaxBufferedDocs()
use IndexWriterConfig.getMaxBufferedDocs() instead.
org.apache.lucene.index.IndexWriter.getMaxFieldLength()
use LimitTokenCountAnalyzer to limit number of tokens.
org.apache.lucene.index.IndexWriter.getMaxMergeDocs()
use LogMergePolicy.getMaxMergeDocs() directly.
org.apache.lucene.index.LogByteSizeMergePolicy.getMaxMergeMBForOptimize()
Renamed to LogByteSizeMergePolicy.getMaxMergeMBForForcedMerge()
org.apache.lucene.index.IndexWriter.getMergedSegmentWarmer()
use IndexWriterConfig.getMergedSegmentWarmer() instead.
org.apache.lucene.index.IndexWriter.getMergeFactor()
use LogMergePolicy.getMergeFactor() directly.
org.apache.lucene.index.IndexWriter.getMergePolicy()
use IndexWriterConfig.getMergePolicy() instead
org.apache.lucene.index.IndexWriter.getMergeScheduler()
use IndexWriterConfig.getMergeScheduler() instead
org.apache.lucene.search.Similarity.getNormDecoder()
Use instance methods for encoding/decoding norm values to enable customization.
org.apache.lucene.document.AbstractField.getOmitTermFreqAndPositions()
use AbstractField.getIndexOptions() instead.
org.apache.lucene.index.IndexWriter.getRAMBufferSizeMB()
use IndexWriterConfig.getRAMBufferSizeMB() instead.
org.apache.lucene.index.IndexWriter.getReader()
Please use IndexReader.open(IndexWriter,boolean) instead.
org.apache.lucene.index.IndexWriter.getReader(int)
Please use IndexReader.open(IndexWriter,boolean) instead. Furthermore, this method cannot guarantee the reader (and its sub-readers) will be opened with the termInfosIndexDivisor setting because some of them may have already been opened according to IndexWriterConfig.setReaderTermsIndexDivisor(int). You should set the requested termInfosIndexDivisor through IndexWriterConfig.setReaderTermsIndexDivisor(int) and use IndexWriter.getReader().
org.apache.lucene.index.IndexWriter.getReaderTermsIndexDivisor()
use IndexWriterConfig.getReaderTermsIndexDivisor() instead.
org.apache.lucene.index.IndexWriter.getSimilarity()
use IndexWriterConfig.getSimilarity() instead
org.apache.lucene.search.Scorer.getSimilarity()
Store any Similarity you might need privately in your implementation instead.
org.apache.lucene.search.Query.getSimilarity(Searcher)
Instead of using "runtime" subclassing/delegation, subclass the Weight instead.
org.apache.lucene.queryParser.core.nodes.QueryNode.getTag(CharSequence)
use QueryNode.getTag(String) instead
org.apache.lucene.queryParser.core.nodes.QueryNodeImpl.getTag(CharSequence)
use QueryNodeImpl.getTag(String) instead
org.apache.lucene.queryParser.core.nodes.QueryNode.getTags()
use QueryNode.getTagMap()
org.apache.lucene.queryParser.core.nodes.QueryNodeImpl.getTags()
use QueryNodeImpl.getTagMap() instead
org.apache.lucene.index.IndexWriter.getTermIndexInterval()
use IndexWriterConfig.getTermIndexInterval()
org.apache.lucene.index.IndexCommit.getTimestamp()
If you need to track commit time of an index, you can store it in the commit data (see IndexWriter.commit(Map)
org.apache.lucene.search.MultiTermQuery.getTotalNumberOfTerms()
Don't use this method, as its not thread safe and useless.
org.apache.lucene.search.MultiTermQueryWrapperFilter.getTotalNumberOfTerms()
Don't use this method, as its not thread safe and useless.
org.apache.lucene.index.IndexWriter.getUseCompoundFile()
use LogMergePolicy.getUseCompoundFile()
org.apache.lucene.index.IndexCommit.getVersion()
use IndexCommit.getGeneration() instead
org.apache.lucene.index.IndexWriter.getWriteLockTimeout()
use IndexWriterConfig.getWriteLockTimeout()
org.apache.lucene.search.MultiTermQuery.incTotalNumberOfTerms(int)
Don't use this method, as its not thread safe and useless.
org.tartarus.snowball.SnowballProgram.insert(int, int, String)
for binary back compat. Will be removed in Lucene 4.0
org.tartarus.snowball.SnowballProgram.insert(int, int, StringBuilder)
for binary back compat. Will be removed in Lucene 4.0
org.apache.lucene.index.IndexReader.isOptimized()
Check segment count using IndexReader.getSequentialSubReaders() instead.
org.apache.lucene.index.MultiReader.isOptimized()
org.apache.lucene.index.ParallelReader.isOptimized()
org.apache.lucene.index.FilterIndexReader.isOptimized()
org.apache.lucene.store.instantiated.InstantiatedIndexReader.isOptimized()
org.apache.lucene.analysis.standard.StandardTokenizer.isReplaceInvalidAcronym()
Remove in 3.X and make true the only valid value
org.apache.lucene.analysis.standard.ClassicTokenizer.isReplaceInvalidAcronym()
Remove in 3.X and make true the only valid value
org.apache.lucene.analysis.CharTokenizer.isTokenChar(char)
use CharTokenizer.isTokenChar(int) instead. This method will be removed in Lucene 4.0.
org.apache.lucene.index.IndexReader.lastModified(Directory)
If you need to track commit time of an index, you can store it in the commit data (see IndexWriter.commit(Map)
org.apache.lucene.search.Similarity.lengthNorm(String, int)
Please override computeNorm instead
org.apache.lucene.search.similar.MoreLikeThis.like(File)
use MoreLikeThis.like(Reader, String) instead
org.apache.lucene.search.similar.MoreLikeThis.like(InputStream)
use MoreLikeThis.like(Reader, String) instead
org.apache.lucene.search.similar.MoreLikeThis.like(Reader)
use MoreLikeThis.like(Reader, String) instead
org.apache.lucene.search.similar.MoreLikeThis.like(URL)
use MoreLikeThis.like(Reader, String) instead
org.apache.lucene.analysis.cz.CzechAnalyzer.loadStopWords(InputStream, String)
use WordlistLoader.getWordSet(Reader, String, Version) and CzechAnalyzer.CzechAnalyzer(Version, Set) instead
org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase.makeDictionary(Version, String[])
Only available for backwards compatibility.
org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder.makeFragment(StringBuilder, int[], String[], FieldFragList.WeightedFragInfo)
org.apache.lucene.analysis.StopFilter.makeStopSet(List)
use StopFilter.makeStopSet(Version, List) instead
org.apache.lucene.analysis.StopFilter.makeStopSet(List, boolean)
use StopFilter.makeStopSet(Version, List, boolean) instead
org.apache.lucene.analysis.StopFilter.makeStopSet(String...)
use StopFilter.makeStopSet(Version, String...) instead
org.apache.lucene.analysis.StopFilter.makeStopSet(String[], boolean)
use StopFilter.makeStopSet(Version, String[], boolean) instead;
org.apache.lucene.search.SearcherManager.maybeReopen()
see ReferenceManager.maybeRefresh().
org.apache.lucene.analysis.CharTokenizer.normalize(char)
use CharTokenizer.normalize(int) instead. This method will be removed in Lucene 4.0.
org.apache.lucene.index.IndexReader.open(Directory, boolean)
Write support will be removed in Lucene 4.0. Use IndexReader.open(Directory) instead
org.apache.lucene.index.IndexReader.open(Directory, IndexDeletionPolicy, boolean)
Write support will be removed in Lucene 4.0. Use IndexReader.open(Directory) instead
org.apache.lucene.index.IndexReader.open(Directory, IndexDeletionPolicy, boolean, int)
Write support will be removed in Lucene 4.0. Use IndexReader.open(Directory,int) instead
org.apache.lucene.index.IndexReader.open(IndexCommit, boolean)
Write support will be removed in Lucene 4.0. Use IndexReader.open(IndexCommit) instead
org.apache.lucene.index.IndexReader.open(IndexCommit, IndexDeletionPolicy, boolean)
Write support will be removed in Lucene 4.0. Use IndexReader.open(IndexCommit) instead
org.apache.lucene.index.IndexReader.open(IndexCommit, IndexDeletionPolicy, boolean, int)
Write support will be removed in Lucene 4.0. Use IndexReader.open(IndexCommit,int) instead
org.apache.lucene.index.IndexReader.openIfChanged(IndexReader, boolean)
Write support will be removed in Lucene 4.0. Use IndexReader.openIfChanged(IndexReader) instead
org.apache.lucene.index.IndexWriter.optimize()
org.apache.lucene.index.IndexWriter.optimize(boolean)
org.apache.lucene.index.IndexWriter.optimize(int)
org.apache.lucene.index.SegmentInfos.range(int, int)
use asList().subList(first, last) instead.
org.apache.lucene.store.DataInput.readChars(char[], int, int)
-- please use readString or readBytes instead, and construct the string from those utf8 bytes
org.apache.lucene.index.SegmentInfos.readCurrentVersion(Directory)
Load the SegmentInfos and then call SegmentInfos.getVersion().
org.apache.lucene.index.IndexReader.reopen()
Use IndexReader.openIfChanged(IndexReader) instead
org.apache.lucene.index.IndexReader.reopen(boolean)
Write support will be removed in Lucene 4.0. Use IndexReader.openIfChanged(IndexReader) instead
org.apache.lucene.index.IndexReader.reopen(IndexCommit)
Use IndexReader.openIfChanged(IndexReader,IndexCommit) instead
org.apache.lucene.index.IndexReader.reopen(IndexWriter, boolean)
Use IndexReader.openIfChanged(IndexReader,IndexWriter,boolean) instead
org.tartarus.snowball.SnowballProgram.replace_s(int, int, String)
for binary back compat. Will be removed in Lucene 4.0
org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl.resizeTermBuffer(int)
org.apache.lucene.search.similar.MoreLikeThis.retrieveInterestingTerms(Reader)
use MoreLikeThis.retrieveInterestingTerms(Reader, String) instead.
org.apache.lucene.search.similar.MoreLikeThis.retrieveTerms(Reader)
use MoreLikeThis.retrieveTerms(Reader, String) instead
org.apache.lucene.analysis.reverse.ReverseStringFilter.reverse(char[])
use ReverseStringFilter.reverse(Version, char[]) instead. This method will be removed in Lucene 4.0
org.apache.lucene.analysis.reverse.ReverseStringFilter.reverse(char[], int)
use ReverseStringFilter.reverse(Version, char[], int) instead. This method will be removed in Lucene 4.0
org.apache.lucene.analysis.reverse.ReverseStringFilter.reverse(char[], int, int)
use ReverseStringFilter.reverse(Version, char[], int, int) instead. This method will be removed in Lucene 4.0
org.apache.lucene.analysis.reverse.ReverseStringFilter.reverse(String)
use ReverseStringFilter.reverse(Version, String) instead. This method will be removed in Lucene 4.0
org.apache.lucene.analysis.fr.ElisionFilter.setArticles(Set)
use ElisionFilter.setArticles(Version, Set) instead
org.apache.lucene.analysis.fr.ElisionFilter.setArticles(Version, Set)
use ElisionFilter.ElisionFilter(Version, TokenStream, Set) instead
org.apache.lucene.queryParser.core.builders.QueryTreeBuilder.setBuilder(CharSequence, QueryBuilder)
use QueryTreeBuilder.setBuilder(String, QueryBuilder) instead
org.apache.lucene.queryParser.standard.StandardQueryParser.setDateResolution(Map)
this method was renamed to StandardQueryParser.setDateResolutionMap(Map)
org.apache.lucene.queryParser.standard.StandardQueryParser.setDefaultOperator(DefaultOperatorAttribute.Operator)
org.apache.lucene.queryParser.standard.StandardQueryParser.setDefaultPhraseSlop(int)
renamed to StandardQueryParser.setPhraseSlop(int)
org.apache.lucene.index.IndexWriter.setDefaultWriteLockTimeout(long)
use IndexWriterConfig.setDefaultWriteLockTimeout(long) instead
org.apache.lucene.analysis.de.GermanStemFilter.setExclusionSet(Set)
use KeywordAttribute with KeywordMarkerFilter instead.
org.apache.lucene.analysis.nl.DutchStemFilter.setExclusionTable(HashSet)
use KeywordAttribute with KeywordMarkerFilter instead.
org.apache.lucene.analysis.fr.FrenchStemFilter.setExclusionTable(Map)
use KeywordAttribute with KeywordMarkerFilter instead.
org.apache.lucene.index.IndexWriter.setMaxBufferedDeleteTerms(int)
use IndexWriterConfig.setMaxBufferedDeleteTerms(int) instead.
org.apache.lucene.index.IndexWriter.setMaxBufferedDocs(int)
use IndexWriterConfig.setMaxBufferedDocs(int) instead.
org.apache.lucene.index.IndexWriter.setMaxFieldLength(int)
use LimitTokenCountAnalyzer instead. Note that the behvaior slightly changed - the analyzer limits the number of tokens per token stream created, while this setting limits the total number of tokens to index. This only matters if you index many multi-valued fields though.
org.apache.lucene.index.IndexWriter.setMaxMergeDocs(int)
use LogMergePolicy.setMaxMergeDocs(int) directly.
org.apache.lucene.index.LogByteSizeMergePolicy.setMaxMergeMBForOptimize(double)
Renamed to LogByteSizeMergePolicy.setMaxMergeMBForForcedMerge(double)
org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper.setMaxShingleSize(int)
Setting maxShingleSize after Analyzer instantiation prevents reuse. Confgure maxShingleSize during construction.
org.apache.lucene.index.IndexWriter.setMergedSegmentWarmer(IndexWriter.IndexReaderWarmer)
use IndexWriterConfig.setMergedSegmentWarmer(org.apache.lucene.index.IndexWriter.IndexReaderWarmer) instead.
org.apache.lucene.index.IndexWriter.setMergeFactor(int)
use LogMergePolicy.setMergeFactor(int) directly.
org.apache.lucene.index.IndexWriter.setMergePolicy(MergePolicy)
use IndexWriterConfig.setMergePolicy(MergePolicy) instead.
org.apache.lucene.index.IndexWriter.setMergeScheduler(MergeScheduler)
use IndexWriterConfig.setMergeScheduler(MergeScheduler) instead
org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper.setMinShingleSize(int)
Setting minShingleSize after Analyzer instantiation prevents reuse. Confgure minShingleSize during construction.
org.apache.lucene.index.IndexReader.setNorm(int, String, byte)
Write support will be removed in Lucene 4.0. There will be no replacement for this method.
org.apache.lucene.index.IndexReader.setNorm(int, String, float)
Write support will be removed in Lucene 4.0. There will be no replacement for this method.
org.apache.lucene.document.AbstractField.setOmitTermFreqAndPositions(boolean)
use AbstractField.setIndexOptions(FieldInfo.IndexOptions) instead.
org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper.setOutputUnigrams(boolean)
Setting outputUnigrams after Analyzer instantiation prevents reuse. Confgure outputUnigrams during construction.
org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper.setOutputUnigramsIfNoShingles(boolean)
Setting outputUnigramsIfNoShingles after Analyzer instantiation prevents reuse. Confgure outputUnigramsIfNoShingles during construction.
org.apache.lucene.index.IndexWriter.setRAMBufferSizeMB(double)
use IndexWriterConfig.setRAMBufferSizeMB(double) instead.
org.apache.lucene.index.IndexWriter.setReaderTermsIndexDivisor(int)
use IndexWriterConfig.setReaderTermsIndexDivisor(int) instead.
org.apache.lucene.analysis.standard.StandardTokenizer.setReplaceInvalidAcronym(boolean)
Remove in 3.X and make true the only valid value See https://issues.apache.org/jira/browse/LUCENE-1068
org.apache.lucene.analysis.standard.ClassicTokenizer.setReplaceInvalidAcronym(boolean)
Remove in 3.X and make true the only valid value See https://issues.apache.org/jira/browse/LUCENE-1068
org.apache.lucene.index.IndexWriter.setSimilarity(Similarity)
use IndexWriterConfig.setSimilarity(Similarity) instead
org.apache.lucene.analysis.nl.DutchAnalyzer.setStemDictionary(File)
This prevents reuse of TokenStreams. If you wish to use a custom stem dictionary, create your own Analyzer with StemmerOverrideFilter
org.apache.lucene.analysis.br.BrazilianAnalyzer.setStemExclusionTable(File)
use BrazilianAnalyzer.BrazilianAnalyzer(Version, Set, Set) instead
org.apache.lucene.analysis.de.GermanAnalyzer.setStemExclusionTable(File)
use GermanAnalyzer.GermanAnalyzer(Version, Set, Set) instead
org.apache.lucene.analysis.fr.FrenchAnalyzer.setStemExclusionTable(File)
use FrenchAnalyzer.FrenchAnalyzer(Version, Set, Set) instead
org.apache.lucene.analysis.nl.DutchAnalyzer.setStemExclusionTable(File)
use DutchAnalyzer.DutchAnalyzer(Version, Set, Set) instead
org.apache.lucene.analysis.nl.DutchAnalyzer.setStemExclusionTable(HashSet)
use DutchAnalyzer.DutchAnalyzer(Version, Set, Set) instead
org.apache.lucene.analysis.br.BrazilianAnalyzer.setStemExclusionTable(Map)
use BrazilianAnalyzer.BrazilianAnalyzer(Version, Set, Set) instead
org.apache.lucene.analysis.de.GermanAnalyzer.setStemExclusionTable(Map)
use GermanAnalyzer.GermanAnalyzer(Version, Set, Set) instead
org.apache.lucene.analysis.fr.FrenchAnalyzer.setStemExclusionTable(Map)
use FrenchAnalyzer.FrenchAnalyzer(Version, Set, Set) instead
org.apache.lucene.analysis.br.BrazilianAnalyzer.setStemExclusionTable(String...)
use BrazilianAnalyzer.BrazilianAnalyzer(Version, Set, Set) instead
org.apache.lucene.analysis.fr.FrenchAnalyzer.setStemExclusionTable(String...)
use FrenchAnalyzer.FrenchAnalyzer(Version, Set, Set) instead
org.apache.lucene.analysis.nl.DutchAnalyzer.setStemExclusionTable(String...)
use DutchAnalyzer.DutchAnalyzer(Version, Set, Set) instead
org.apache.lucene.analysis.de.GermanAnalyzer.setStemExclusionTable(String[])
use GermanAnalyzer.GermanAnalyzer(Version, Set, Set) instead
org.apache.lucene.queryParser.core.nodes.QueryNode.setTag(CharSequence, Object)
use QueryNode.setTag(String, Object) instead
org.apache.lucene.queryParser.core.nodes.QueryNodeImpl.setTag(CharSequence, Object)
use QueryNodeImpl.setTag(String, Object) instead
org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl.setTermBuffer(char[], int, int)
org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl.setTermBuffer(String)
org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl.setTermBuffer(String, int, int)
org.apache.lucene.index.IndexWriter.setTermIndexInterval(int)
use IndexWriterConfig.setTermIndexInterval(int)
org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl.setTermLength(int)
org.apache.lucene.index.ConcurrentMergeScheduler.setTestMode()
this test mode code will be removed in a future release
org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper.setTokenSeparator(String)
Setting tokenSeparator after Analyzer instantiation prevents reuse. Confgure tokenSeparator during construction.
org.apache.lucene.index.IndexWriter.setUseCompoundFile(boolean)
use LogMergePolicy.setUseCompoundFile(boolean).
org.apache.lucene.index.IndexWriter.setWriteLockTimeout(long)
use IndexWriterConfig.setWriteLockTimeout(long) instead
org.apache.lucene.store.IndexInput.skipChars(int)
this method operates on old "modified utf8" encoded strings
org.tartarus.snowball.SnowballProgram.slice_from(String)
for binary back compat. Will be removed in Lucene 4.0
org.tartarus.snowball.SnowballProgram.slice_from(StringBuilder)
for binary back compat. Will be removed in Lucene 4.0
org.apache.lucene.index.MultiPassIndexSplitter.split(IndexReader, Directory[], boolean)
use MultiPassIndexSplitter.split(Version, IndexReader, Directory[], boolean) instead. This method will be removed in Lucene 4.0.
org.apache.lucene.analysis.CharArraySet.stringIterator()
Use CharArraySet.iterator(), which returns char[] instances.
org.apache.lucene.search.spell.SpellChecker.suggestSimilar(String, int, IndexReader, String, boolean)
use suggestSimilar(String, int, IndexReader, String, SuggestMode)
  • SuggestMode.SUGGEST_WHEN_NOT_IN_INDEX instead of morePopular=false
  • SuggestMode.SuGGEST_MORE_POPULAR instead of morePopular=true
org.apache.lucene.search.spell.SpellChecker.suggestSimilar(String, int, IndexReader, String, boolean, float)
use suggestSimilar(String, int, IndexReader, String, SuggestMode, float)
  • SuggestMode.SUGGEST_WHEN_NOT_IN_INDEX instead of morePopular=false
  • SuggestMode.SuGGEST_MORE_POPULAR instead of morePopular=true
org.apache.lucene.store.MockDirectoryWrapper.sync(String)
org.apache.lucene.store.Directory.sync(String)
use Directory.sync(Collection) instead. For easy migration you can change your code to call sync(Collections.singleton(name))
org.apache.lucene.store.FileSwitchDirectory.sync(String)
org.apache.lucene.store.FSDirectory.sync(String)
org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl.term()
org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl.termBuffer()
org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl.termLength()
org.apache.lucene.store.MockDirectoryWrapper.touchFile(String)
org.apache.lucene.store.Directory.touchFile(String)
Lucene never uses this API; it will be removed in 4.0.
org.apache.lucene.store.NRTCachingDirectory.touchFile(String)
org.apache.lucene.store.FileSwitchDirectory.touchFile(String)
org.apache.lucene.store.FSDirectory.touchFile(String)
Lucene never uses this API; it will be removed in 4.0.
org.apache.lucene.store.RAMDirectory.touchFile(String)
Lucene never uses this API; it will be removed in 4.0.
org.apache.lucene.index.IndexReader.undeleteAll()
Write support will be removed in Lucene 4.0. There will be no replacement for this method.
org.apache.lucene.queryParser.core.nodes.QueryNode.unsetTag(CharSequence)
use QueryNode.unsetTag(String) instead
org.apache.lucene.queryParser.core.nodes.QueryNodeImpl.unsetTag(CharSequence)
use QueryNodeImpl.unsetTag(String)
org.apache.lucene.search.Query.weight(Searcher)
never ever use this method in Weight implementations. Subclasses of Query should use Query.createWeight(org.apache.lucene.search.Searcher), instead.
org.apache.lucene.store.DataOutput.writeChars(char[], int, int)
-- please pre-convert to utf8 bytes instead or use DataOutput.writeString(java.lang.String)
org.apache.lucene.store.DataOutput.writeChars(String, int, int)
-- please pre-convert to utf8 bytes instead or use DataOutput.writeString(java.lang.String)

Deprecated Constructors
org.apache.lucene.analysis.ar.ArabicAnalyzer(Version, File)
use ArabicAnalyzer.ArabicAnalyzer(Version, Set) instead
org.apache.lucene.analysis.ar.ArabicAnalyzer(Version, Hashtable)
use ArabicAnalyzer.ArabicAnalyzer(Version, Set) instead
org.apache.lucene.analysis.ar.ArabicAnalyzer(Version, String...)
use ArabicAnalyzer.ArabicAnalyzer(Version, Set) instead
org.apache.lucene.analysis.ar.ArabicLetterTokenizer(AttributeSource.AttributeFactory, Reader)
use ArabicLetterTokenizer.ArabicLetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.analysis.ar.ArabicLetterTokenizer(AttributeSource, Reader)
use ArabicLetterTokenizer.ArabicLetterTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.analysis.ar.ArabicLetterTokenizer(Reader)
use ArabicLetterTokenizer.ArabicLetterTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.util.ArrayUtil()
This constructor was not intended to be public and should not be used. This class contains solely a static utility methods. It will be made private in Lucene 4.0
org.apache.lucene.analysis.br.BrazilianAnalyzer(Version, File)
use BrazilianAnalyzer.BrazilianAnalyzer(Version, Set) instead
org.apache.lucene.analysis.br.BrazilianAnalyzer(Version, Map)
use BrazilianAnalyzer.BrazilianAnalyzer(Version, Set) instead
org.apache.lucene.analysis.br.BrazilianAnalyzer(Version, String...)
use BrazilianAnalyzer.BrazilianAnalyzer(Version, Set) instead
org.apache.lucene.analysis.br.BrazilianStemFilter(TokenStream, Set)
use KeywordAttribute with KeywordMarkerFilter instead.
org.apache.lucene.store.BufferedIndexInput()
please pass resourceDesc
org.apache.lucene.store.BufferedIndexInput(int)
please pass resourceDesc
org.apache.lucene.analysis.CharArraySet(Collection, boolean)
use CharArraySet.CharArraySet(Version, Collection, boolean) instead
org.apache.lucene.analysis.CharArraySet(int, boolean)
use CharArraySet.CharArraySet(Version, int, boolean) instead
org.apache.lucene.analysis.CharTokenizer(AttributeSource.AttributeFactory, Reader)
use CharTokenizer.CharTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.analysis.CharTokenizer(AttributeSource, Reader)
use CharTokenizer.CharTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.analysis.CharTokenizer(Reader)
use CharTokenizer.CharTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.analysis.cjk.CJKAnalyzer(Version, String...)
use CJKAnalyzer.CJKAnalyzer(Version, Set) instead
org.apache.lucene.analysis.standard.ClassicAnalyzer(Version, File)
Use ClassicAnalyzer.ClassicAnalyzer(Version, Reader) instead.
org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase(TokenStream, Set)
use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, Set) instead
org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase(TokenStream, Set, boolean)
use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, Set, boolean) instead
org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase(TokenStream, Set, int, int, int, boolean)
use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, Set, int, int, int, boolean) instead
org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase(TokenStream, String[])
use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, String[]) instead
org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase(TokenStream, String[], boolean)
use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, String[], boolean) instead
org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase(TokenStream, String[], int, int, int, boolean)
use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, String[], int, int, int, boolean) instead
org.apache.lucene.analysis.cz.CzechAnalyzer(Version, File)
use CzechAnalyzer.CzechAnalyzer(Version, Set) instead
org.apache.lucene.analysis.cz.CzechAnalyzer(Version, HashSet)
use CzechAnalyzer.CzechAnalyzer(Version, Set) instead
org.apache.lucene.analysis.cz.CzechAnalyzer(Version, String...)
use CzechAnalyzer.CzechAnalyzer(Version, Set) instead
org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter(TokenStream, Set)
use DictionaryCompoundWordTokenFilter.DictionaryCompoundWordTokenFilter(Version, TokenStream, Set) instead
org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter(TokenStream, Set, int, int, int, boolean)
use DictionaryCompoundWordTokenFilter.DictionaryCompoundWordTokenFilter(Version, TokenStream, Set, int, int, int, boolean) instead
org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter(TokenStream, String[])
use DictionaryCompoundWordTokenFilter.DictionaryCompoundWordTokenFilter(Version, TokenStream, String[]) instead
org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter(TokenStream, String[], int, int, int, boolean)
use DictionaryCompoundWordTokenFilter.DictionaryCompoundWordTokenFilter(Version, TokenStream, String[], int, int, int, boolean) instead
org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter(Version, TokenStream, String[])
Use the constructors taking Set
org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter(Version, TokenStream, String[], int, int, int, boolean)
Use the constructors taking Set
org.apache.lucene.analysis.nl.DutchAnalyzer(Version, File)
use DutchAnalyzer.DutchAnalyzer(Version, Set) instead
org.apache.lucene.analysis.nl.DutchAnalyzer(Version, HashSet)
use DutchAnalyzer.DutchAnalyzer(Version, Set) instead
org.apache.lucene.analysis.nl.DutchAnalyzer(Version, String...)
use DutchAnalyzer.DutchAnalyzer(Version, Set) instead
org.apache.lucene.analysis.nl.DutchStemFilter(TokenStream, Set)
use KeywordAttribute with KeywordMarkerFilter instead.
org.apache.lucene.analysis.nl.DutchStemFilter(TokenStream, Set, Map)
use KeywordAttribute with KeywordMarkerFilter instead.
org.apache.lucene.analysis.fr.ElisionFilter(TokenStream)
use ElisionFilter.ElisionFilter(Version, TokenStream) instead
org.apache.lucene.analysis.fr.ElisionFilter(TokenStream, Set)
use ElisionFilter.ElisionFilter(Version, TokenStream, Set) instead
org.apache.lucene.analysis.fr.ElisionFilter(TokenStream, String[])
use ElisionFilter.ElisionFilter(Version, TokenStream, Set) instead
org.apache.lucene.analysis.en.EnglishPossessiveFilter(TokenStream)
Use EnglishPossessiveFilter.EnglishPossessiveFilter(Version, TokenStream) instead.
org.apache.lucene.document.Field(String, byte[], Field.Store)
Use instead
org.apache.lucene.document.Field(String, byte[], int, int, Field.Store)
Use instead
org.apache.lucene.queryParser.core.config.FieldConfig(CharSequence)
use FieldConfig.FieldConfig(String) instead
org.apache.lucene.analysis.fr.FrenchAnalyzer(Version, File)
use FrenchAnalyzer.FrenchAnalyzer(Version, Set) instead
org.apache.lucene.analysis.fr.FrenchAnalyzer(Version, String...)
use FrenchAnalyzer.FrenchAnalyzer(Version, Set) instead
org.apache.lucene.analysis.fr.FrenchStemFilter(TokenStream, Set)
use KeywordAttribute with KeywordMarkerFilter instead.
org.apache.lucene.analysis.de.GermanAnalyzer(Version, File)
use GermanAnalyzer.GermanAnalyzer(Version, Set)
org.apache.lucene.analysis.de.GermanAnalyzer(Version, Map)
use GermanAnalyzer.GermanAnalyzer(Version, Set)
org.apache.lucene.analysis.de.GermanAnalyzer(Version, String...)
use GermanAnalyzer.GermanAnalyzer(Version, Set)
org.apache.lucene.analysis.de.GermanStemFilter(TokenStream, Set)
use KeywordAttribute with KeywordMarkerFilter instead.
org.apache.lucene.analysis.el.GreekAnalyzer(Version, Map)
use GreekAnalyzer.GreekAnalyzer(Version, Set) instead
org.apache.lucene.analysis.el.GreekAnalyzer(Version, String...)
use GreekAnalyzer.GreekAnalyzer(Version, Set) instead
org.apache.lucene.analysis.el.GreekLowerCaseFilter(TokenStream)
Use GreekLowerCaseFilter.GreekLowerCaseFilter(Version, TokenStream) instead.
org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter(TokenStream, HyphenationTree, Set)
use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set) instead.
org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter(TokenStream, HyphenationTree, Set, int, int, int, boolean)
use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set, int, int, int, boolean) instead.
org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter(TokenStream, HyphenationTree, String[])
use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[]) instead.
org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter(TokenStream, HyphenationTree, String[], int, int, int, boolean)
use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[], int, int, int, boolean) instead.
org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[])
Use the constructors taking Set
org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[], int, int, int, boolean)
Use the constructors taking Set
org.apache.lucene.store.IndexInput()
please pass resourceDescription
org.apache.lucene.search.IndexSearcher(Directory)
use IndexSearcher.IndexSearcher(IndexReader) instead.
org.apache.lucene.search.IndexSearcher(Directory, boolean)
Use IndexSearcher.IndexSearcher(IndexReader) instead.
org.apache.lucene.index.IndexWriter(Directory, Analyzer, boolean, IndexDeletionPolicy, IndexWriter.MaxFieldLength)
use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
org.apache.lucene.index.IndexWriter(Directory, Analyzer, boolean, IndexWriter.MaxFieldLength)
use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
org.apache.lucene.index.IndexWriter(Directory, Analyzer, IndexDeletionPolicy, IndexWriter.MaxFieldLength)
use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
org.apache.lucene.index.IndexWriter(Directory, Analyzer, IndexDeletionPolicy, IndexWriter.MaxFieldLength, IndexCommit)
use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
org.apache.lucene.index.IndexWriter(Directory, Analyzer, IndexWriter.MaxFieldLength)
use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
org.apache.lucene.analysis.LengthFilter(TokenStream, int, int)
Use LengthFilter.LengthFilter(boolean, TokenStream, int, int) instead.
org.apache.lucene.analysis.LetterTokenizer(AttributeSource.AttributeFactory, Reader)
use LetterTokenizer.LetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.analysis.LetterTokenizer(AttributeSource, Reader)
use LetterTokenizer.LetterTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.analysis.LetterTokenizer(Reader)
use LetterTokenizer.LetterTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.analysis.LowerCaseFilter(TokenStream)
Use LowerCaseFilter.LowerCaseFilter(Version, TokenStream) instead.
org.apache.lucene.analysis.LowerCaseTokenizer(AttributeSource.AttributeFactory, Reader)
use LowerCaseTokenizer.LowerCaseTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.analysis.LowerCaseTokenizer(AttributeSource, Reader)
use LowerCaseTokenizer.LowerCaseTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.analysis.LowerCaseTokenizer(Reader)
use LowerCaseTokenizer.LowerCaseTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.search.similar.MoreLikeThisQuery(String, String[], Analyzer)
use MoreLikeThisQuery.MoreLikeThisQuery(String, String[], Analyzer, String) instead.
org.apache.lucene.store.NoLockFactory()
This constructor was not intended to be public and should not be used. It will be made private in Lucene 4.0
org.apache.lucene.analysis.fa.PersianAnalyzer(Version, File)
use PersianAnalyzer.PersianAnalyzer(Version, Set) instead
org.apache.lucene.analysis.fa.PersianAnalyzer(Version, Hashtable)
use PersianAnalyzer.PersianAnalyzer(Version, Set) instead
org.apache.lucene.analysis.fa.PersianAnalyzer(Version, String...)
use PersianAnalyzer.PersianAnalyzer(Version, Set) instead
org.apache.lucene.index.PKIndexSplitter(Directory, Directory, Directory, Filter)
use PKIndexSplitter.PKIndexSplitter(Version, Directory, Directory, Directory, Filter) instead. This constructor will be removed in Lucene 4.0.
org.apache.lucene.index.PKIndexSplitter(Directory, Directory, Directory, Term)
use PKIndexSplitter.PKIndexSplitter(Version, Directory, Directory, Directory, Term) instead. This constructor will be removed in Lucene 4.0.
org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer(Version, Analyzer)
Stopwords should be calculated at instantiation using one of the other constructors
org.apache.lucene.store.RAMInputStream(RAMFile)
org.apache.lucene.util.RamUsageEstimator()
Don't create instances of this class, instead use the static RamUsageEstimator.sizeOf(Object) method that has no intern checking, too.
org.apache.lucene.util.RamUsageEstimator(boolean)
Don't create instances of this class, instead use the static RamUsageEstimator.sizeOf(Object) method.
org.apache.lucene.analysis.reverse.ReverseStringFilter(TokenStream)
use ReverseStringFilter.ReverseStringFilter(Version, TokenStream) instead. This constructor will be removed in Lucene 4.0
org.apache.lucene.analysis.reverse.ReverseStringFilter(TokenStream, char)
use ReverseStringFilter.ReverseStringFilter(Version, TokenStream, char) instead. This constructor will be removed in Lucene 4.0
org.apache.lucene.analysis.ru.RussianAnalyzer(Version, Map)
use RussianAnalyzer.RussianAnalyzer(Version, Set) instead
org.apache.lucene.analysis.ru.RussianAnalyzer(Version, String...)
use RussianAnalyzer.RussianAnalyzer(Version, Set) instead
org.apache.lucene.analysis.ru.RussianLetterTokenizer(AttributeSource.AttributeFactory, Reader)
use RussianLetterTokenizer.RussianLetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.analysis.ru.RussianLetterTokenizer(AttributeSource, Reader)
use RussianLetterTokenizer.RussianLetterTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.analysis.ru.RussianLetterTokenizer(Reader)
use RussianLetterTokenizer.RussianLetterTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.search.Scorer(Similarity)
Use Scorer.Scorer(Weight) instead.
org.apache.lucene.search.Scorer(Similarity, Weight)
Use Scorer.Scorer(Weight) instead.
org.apache.lucene.analysis.SimpleAnalyzer()
use SimpleAnalyzer.SimpleAnalyzer(Version) instead
org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput(File, int, int)
please pass resourceDesc
org.apache.lucene.analysis.snowball.SnowballAnalyzer(Version, String, String[])
Use SnowballAnalyzer.SnowballAnalyzer(Version, String, Set) instead.
org.apache.lucene.analysis.standard.StandardAnalyzer(Version, File)
Use StandardAnalyzer.StandardAnalyzer(Version, Reader) instead.
org.apache.lucene.analysis.standard.StandardFilter(TokenStream)
Use StandardFilter.StandardFilter(Version, TokenStream) instead.
org.apache.lucene.analysis.StopFilter(boolean, TokenStream, Set)
use StopFilter.StopFilter(Version, TokenStream, Set) instead
org.apache.lucene.analysis.StopFilter(boolean, TokenStream, Set, boolean)
Use StopFilter.StopFilter(Version, TokenStream, Set) instead
org.apache.lucene.analysis.StopFilter(Version, TokenStream, Set, boolean)
Use StopFilter.StopFilter(Version, TokenStream, Set) instead
org.apache.lucene.search.highlight.TextFragment(StringBuffer, int, int)
Use TextFragment.TextFragment(CharSequence, int, int) instead. This constructor will be removed in Lucene 4.0
org.apache.lucene.analysis.th.ThaiWordFilter(TokenStream)
Use the ctor with matchVersion instead!
org.apache.lucene.analysis.Tokenizer()
use Tokenizer.Tokenizer(Reader) instead.
org.apache.lucene.analysis.Tokenizer(AttributeSource.AttributeFactory)
use Tokenizer.Tokenizer(AttributeSource.AttributeFactory, Reader) instead.
org.apache.lucene.analysis.Tokenizer(AttributeSource)
use Tokenizer.Tokenizer(AttributeSource, Reader) instead.
org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer(AttributeSource.AttributeFactory, Reader)
use UAX29URLEmailTokenizer.UAX29URLEmailTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead.
org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer(AttributeSource, Reader)
use UAX29URLEmailTokenizer.UAX29URLEmailTokenizer(Version, AttributeSource, Reader) instead.
org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer(InputStream)
use UAX29URLEmailTokenizer.UAX29URLEmailTokenizer(Version, Reader) instead.
org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer(Reader)
use UAX29URLEmailTokenizer.UAX29URLEmailTokenizer(Version, Reader) instead.
org.apache.lucene.analysis.WhitespaceAnalyzer()
use WhitespaceAnalyzer.WhitespaceAnalyzer(Version) instead
org.apache.lucene.analysis.WhitespaceTokenizer(AttributeSource.AttributeFactory, Reader)
use WhitespaceTokenizer.WhitespaceTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.analysis.WhitespaceTokenizer(AttributeSource, Reader)
use WhitespaceTokenizer.WhitespaceTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
org.apache.lucene.analysis.WhitespaceTokenizer(Reader)
use WhitespaceTokenizer.WhitespaceTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.

Deprecated Enum Constants
org.apache.lucene.util.Version.LUCENE_20
(3.1) Use latest
org.apache.lucene.util.Version.LUCENE_21
(3.1) Use latest
org.apache.lucene.util.Version.LUCENE_22
(3.1) Use latest
org.apache.lucene.util.Version.LUCENE_23
(3.1) Use latest
org.apache.lucene.util.Version.LUCENE_24
(3.1) Use latest
org.apache.lucene.util.Version.LUCENE_29
(3.1) Use latest
org.apache.lucene.util.Version.LUCENE_CURRENT
Use an actual version instead.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


API Help

PREV NEXT FRAMES NO FRAMES

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

Overview

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

Package

Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

  • Interfaces (italic)
  • Classes
  • Enums
  • Exceptions
  • Errors
  • Annotation Types

Class/Interface

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description

  • Nested Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary

  • Field Detail
  • Constructor Detail
  • Method Detail
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

Annotation Type

Each annotation type has its own separate page with the following sections:

  • Annotation Type declaration
  • Annotation Type description
  • Required Element Summary
  • Optional Element Summary
  • Element Detail

Enum

Each enum has its own separate page with the following sections:

  • Enum declaration
  • Enum description
  • Enum Constant Summary
  • Enum Constant Detail

Use

Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

Tree (Class Hierarchy)

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

Deprecated API

The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

Index

The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

Prev/Next

These links take you to the next or previous class, interface, package, or related page.

Frames/No Frames

These links show and hide the HTML frames. All pages are available with or without frames.

Serialized Form

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

Constant Field Values

The Constant Field Values page lists the static final fields and their values.

This help file applies to API documentation generated using the standard doclet.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Lucene 3.6.1 API

Frame Alert

This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
Link toNon-frame version.


Index

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

PREV NEXT

FRAMES NO FRAMES

A B C D E F G H I J K L M N O P Q R S T U V W X Y _

A

A - Variable in class org.apache.lucene.spatial.geometry.shape.LineSegment
Deprecated.
abort() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
ABSOLUTE_MIN_SORT_BUFFER_SIZE - Static variable in class org.apache.lucene.search.suggest.fst.Sort
Absolute minimum required buffer size for sorting.
AbstractAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead> - Class in org.apache.lucene.search.grouping
This collector specializes in collecting the most relevant document (group head) for each group that match the query.
AbstractAllGroupHeadsCollector(int) - Constructor for class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector

AbstractAllGroupHeadsCollector.GroupHead<GROUP_VALUE_TYPE> - Class in org.apache.lucene.search.grouping
Represents a group head.
AbstractAllGroupHeadsCollector.GroupHead(GROUP_VALUE_TYPE, int) - Constructor for class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.GroupHead

AbstractAllGroupHeadsCollector.TemporalResult - Class in org.apache.lucene.search.grouping
Contains the result of group head retrieval.
AbstractAllGroupHeadsCollector.TemporalResult() - Constructor for class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.TemporalResult

AbstractAllGroupsCollector<GROUP_VALUE_TYPE> - Class in org.apache.lucene.search.grouping
A collector that collects all groups that match the query.
AbstractAllGroupsCollector() - Constructor for class org.apache.lucene.search.grouping.AbstractAllGroupsCollector

AbstractAllTermDocs - Class in org.apache.lucene.index
Base class for enumerating all but deleted docs.
AbstractAllTermDocs(int) - Constructor for class org.apache.lucene.index.AbstractAllTermDocs

AbstractEncoder - Class in org.apache.lucene.analysis.payloads
Base class for payload encoders.
AbstractEncoder() - Constructor for class org.apache.lucene.analysis.payloads.AbstractEncoder

AbstractField - Class in org.apache.lucene.document
Base class for Field implementations
AbstractField() - Constructor for class org.apache.lucene.document.AbstractField

AbstractField(String, Field.Store, Field.Index, Field.TermVector) - Constructor for class org.apache.lucene.document.AbstractField

AbstractFirstPassGroupingCollector<GROUP_VALUE_TYPE> - Class in org.apache.lucene.search.grouping
FirstPassGroupingCollector is the first of two passes necessary to collect grouped hits.
AbstractFirstPassGroupingCollector(Sort, int) - Constructor for class org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector
Create the first pass collector.
AbstractQueryConfig - Class in org.apache.lucene.queryParser.core.config
This class is the base of QueryConfigHandler and FieldConfig.
AbstractQueryMaker - Class in org.apache.lucene.benchmark.byTask.feeds
Abstract base query maker.
AbstractQueryMaker() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker

AbstractRangeQueryNode<T extends FieldValuePairQueryNode<?>> - Class in org.apache.lucene.queryParser.standard.nodes
This class should be extended by nodes intending to represent range queries.
AbstractRangeQueryNode() - Constructor for class org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode
Constructs an AbstractRangeQueryNode, it should be invoked only by its extenders.
AbstractSecondPassGroupingCollector<GROUP_VALUE_TYPE> - Class in org.apache.lucene.search.grouping
SecondPassGroupingCollector is the second of two passes necessary to collect grouped docs.
AbstractSecondPassGroupingCollector(Collection<SearchGroup<GROUP_VALUE_TYPE>>, Sort, Sort, int, boolean, boolean, boolean) - Constructor for class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector

AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE> - Class in org.apache.lucene.search.grouping

AbstractSecondPassGroupingCollector.SearchGroupDocs(GROUP_VALUE_TYPE, TopDocsCollector<?>) - Constructor for class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector.SearchGroupDocs

accept() - Method in class org.apache.lucene.analysis.FilteringTokenFilter
Override this method and return if the current input token should be returned by FilteringTokenFilter.incrementToken().
accept() - Method in class org.apache.lucene.analysis.ja.JapanesePartOfSpeechStopFilter

accept() - Method in class org.apache.lucene.analysis.LengthFilter

accept(AttributeSource) - Method in class org.apache.lucene.analysis.sinks.DateRecognizerSinkFilter

accept(AttributeSource) - Method in class org.apache.lucene.analysis.sinks.TokenRangeSinkFilter

accept(AttributeSource) - Method in class org.apache.lucene.analysis.sinks.TokenTypeSinkFilter

accept() - Method in class org.apache.lucene.analysis.StopFilter
Returns the next input Token whose term() is not a stop word.
accept(AttributeSource) - Method in class org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter
Returns true, iff the current state of the passed-in AttributeSource shall be stored in the sink.
accept() - Method in class org.apache.lucene.analysis.TypeTokenFilter
By default accept the token if its type is not a stop type.
accept(String) - Method in interface org.apache.lucene.document.FieldSelector

accept(String) - Method in class org.apache.lucene.document.LoadFirstFieldSelector

accept(String) - Method in class org.apache.lucene.document.MapFieldSelector
Load field according to its associated value in fieldSelections
accept(String) - Method in class org.apache.lucene.document.SetBasedFieldSelector
Indicate whether to load the field with the given name or not.
accept(File, String) - Method in class org.apache.lucene.index.IndexFileNameFilter

accept(IndexReader, int, String, TermVectorMapper) - Method in class org.apache.lucene.index.TermVectorAccessor
Visits the TermVectorMapper and populates it with terms available for a given document, either via a vector created at index time or by resolving them from the inverted index.
acceptPosition(Spans) - Method in class org.apache.lucene.search.spans.SpanFirstQuery

acceptPosition(Spans) - Method in class org.apache.lucene.search.spans.SpanNearPayloadCheckQuery

acceptPosition(Spans) - Method in class org.apache.lucene.search.spans.SpanPayloadCheckQuery

acceptPosition(Spans) - Method in class org.apache.lucene.search.spans.SpanPositionCheckQuery
Implementing classes are required to return whether the current position is a match for the passed in "match" SpanQuery.
acceptPosition(Spans) - Method in class org.apache.lucene.search.spans.SpanPositionRangeQuery

acceptsDocsOutOfOrder() - Method in class org.apache.lucene.facet.search.FacetsCollector

acceptsDocsOutOfOrder() - Method in class org.apache.lucene.search.CachingCollector

acceptsDocsOutOfOrder() - Method in class org.apache.lucene.search.CheckHits.ExplanationAsserter

acceptsDocsOutOfOrder() - Method in class org.apache.lucene.search.CheckHits.SetCollector

acceptsDocsOutOfOrder() - Method in class org.apache.lucene.search.Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
acceptsDocsOutOfOrder() - Method in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector

acceptsDocsOutOfOrder() - Method in class org.apache.lucene.search.grouping.AbstractAllGroupsCollector

acceptsDocsOutOfOrder() - Method in class org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector

acceptsDocsOutOfOrder() - Method in class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector

acceptsDocsOutOfOrder() - Method in class org.apache.lucene.search.grouping.BlockGroupingCollector

acceptsDocsOutOfOrder() - Method in class org.apache.lucene.search.join.ToParentBlockJoinCollector

acceptsDocsOutOfOrder() - Method in class org.apache.lucene.search.MultiCollector

acceptsDocsOutOfOrder() - Method in class org.apache.lucene.search.PositiveScoresOnlyCollector

acceptsDocsOutOfOrder() - Method in class org.apache.lucene.search.TimeLimitingCollector

acceptsDocsOutOfOrder() - Method in class org.apache.lucene.search.TopFieldCollector

acceptsDocsOutOfOrder() - Method in class org.apache.lucene.search.TotalHitCountCollector

accumulate(ScoredDocIDs) - Method in class org.apache.lucene.facet.search.AdaptiveFacetsAccumulator

accumulate(ScoredDocIDs) - Method in class org.apache.lucene.facet.search.FacetsAccumulator
Accumulate facets over given documents, according to facet requests in effect.
accumulate(ScoredDocIDs) - Method in class org.apache.lucene.facet.search.sampling.SamplingAccumulator

accumulate(ScoredDocIDs) - Method in class org.apache.lucene.facet.search.SamplingWrapper

accumulate(ScoredDocIDs) - Method in class org.apache.lucene.facet.search.StandardFacetsAccumulator

acquire() - Method in class org.apache.lucene.search.ReferenceManager
Obtain the current reference.
acquire(long) - Method in class org.apache.lucene.search.SearcherLifetimeManager
Retrieve a previously recorded IndexSearcher, if it has not yet been closed
acquireWriteLock() - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0.
ACRONYM - Static variable in class org.apache.lucene.analysis.standard.ClassicTokenizer

ACRONYM - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizer
Deprecated.
ACRONYM_DEP - Static variable in class org.apache.lucene.analysis.standard.ClassicTokenizer
Deprecated. this solves a bug where HOSTs that end with '.' are identified as ACRONYMs.
ACRONYM_DEP - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizer
Deprecated. this solves a bug where HOSTs that end with '.' are identified as ACRONYMs.
ACRONYM_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

actualDocsToAccumulate(ScoredDocIDs) - Method in class org.apache.lucene.facet.search.sampling.SamplingAccumulator

actualDocsToAccumulate(ScoredDocIDs) - Method in class org.apache.lucene.facet.search.StandardFacetsAccumulator
Set the actual set of documents over which accumulation should take place.
actualEnum - Variable in class org.apache.lucene.search.FilteredTermEnum
the delegate enum - to set this member use FilteredTermEnum.setEnum(org.apache.lucene.index.TermEnum)
actualSampleRatio - Variable in class org.apache.lucene.facet.search.sampling.Sampler.SampleResult

AdaptiveFacetsAccumulator - Class in org.apache.lucene.facet.search
FacetsAccumulator whose behavior regarding complements, sampling, etc.
AdaptiveFacetsAccumulator(FacetSearchParams, IndexReader, TaxonomyReader) - Constructor for class org.apache.lucene.facet.search.AdaptiveFacetsAccumulator
Create an AdaptiveFacetsAccumulator
AdaptiveFacetsAccumulator(FacetSearchParams, IndexReader, TaxonomyReader, IntArrayAllocator, FloatArrayAllocator) - Constructor for class org.apache.lucene.facet.search.AdaptiveFacetsAccumulator
Create an AdaptiveFacetsAccumulator
add(Object) - Method in class org.apache.lucene.analysis.CharArraySet

add(CharSequence) - Method in class org.apache.lucene.analysis.CharArraySet
Add this CharSequence into the set
add(String) - Method in class org.apache.lucene.analysis.CharArraySet
Add this String into the set
add(char[]) - Method in class org.apache.lucene.analysis.CharArraySet
Add this char[] directly to the set.
add(AttributeSource.State) - Method in class org.apache.lucene.analysis.LookaheadTokenFilter.Position

add(String, String) - Method in class org.apache.lucene.analysis.NormalizeCharMap
Records a replacement to be applied to the inputs stream.
add(Reader) - Method in class org.apache.lucene.analysis.synonym.SolrSynonymParser

add(CharsRef, CharsRef, boolean) - Method in class org.apache.lucene.analysis.synonym.SynonymMap.Builder
Add a phrase->phrase synonym mapping.
add(Reader) - Method in class org.apache.lucene.analysis.synonym.WordnetSynonymParser

add(TaskStats) - Method in class org.apache.lucene.benchmark.byTask.stats.TaskStats
Add data from another stat, for aggregation
add(Fieldable) - Method in class org.apache.lucene.document.Document
Adds a field to a document.
add(T) - Method in interface org.apache.lucene.facet.search.Heap
Add a new value to the heap, return the new top().
add(CharSequence) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Add the given component to the end of the path.
add(CharSequence, char) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Add the given components to the end of the path.
add(FieldInfos) - Method in class org.apache.lucene.index.FieldInfos

add(Document) - Method in class org.apache.lucene.index.FieldInfos
Adds field info for a Document.
add(String, boolean) - Method in class org.apache.lucene.index.FieldInfos
Calls 5 parameter add with false for all TermVector parameters.
add(String, boolean, boolean) - Method in class org.apache.lucene.index.FieldInfos
Calls 5 parameter add with false for term vector positions and offsets.
add(String, boolean, boolean, boolean) - Method in class org.apache.lucene.index.FieldInfos
If the field is not yet known, adds it.
add(String, boolean, boolean, boolean, boolean, FieldInfo.IndexOptions) - Method in class org.apache.lucene.index.FieldInfos
If the field is not yet known, adds it.
add(FieldInfo) - Method in class org.apache.lucene.index.FieldInfos

add(MergePolicy.OneMerge) - Method in class org.apache.lucene.index.MergePolicy.MergeSpecification

add(IndexReader) - Method in class org.apache.lucene.index.ParallelReader
Add an IndexReader.
add(IndexReader, boolean) - Method in class org.apache.lucene.index.ParallelReader
Add an IndexReader whose stored fields will not be returned.
add(SegmentInfo) - Method in class org.apache.lucene.index.SegmentInfos

add(QueryNode) - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode

add(List<QueryNode>) - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode

add(QueryNode) - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

add(List<QueryNode>) - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

add(QueryNodeProcessor) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

add(int, QueryNodeProcessor) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

add(String, ParserExtension) - Method in class org.apache.lucene.queryParser.ext.Extensions
Adds a new ParserExtension instance associated with the given key.
add(FilterClause) - Method in class org.apache.lucene.search.BooleanFilter
Adds a new FilterClause to the Boolean Filter container
add(Filter, BooleanClause.Occur) - Method in class org.apache.lucene.search.BooleanFilter

add(Query, BooleanClause.Occur) - Method in class org.apache.lucene.search.BooleanQuery
Adds a clause to a boolean query.
add(BooleanClause) - Method in class org.apache.lucene.search.BooleanQuery
Adds a clause to a boolean query.
add(Query) - Method in class org.apache.lucene.search.DisjunctionMaxQuery
Add a subquery to this disjunction
add(Collection<Query>) - Method in class org.apache.lucene.search.DisjunctionMaxQuery
Add a collection of disjuncts to this disjunction via Iterable
add(Term) - Method in class org.apache.lucene.search.MultiPhraseQuery
Add a single term at the next position in the phrase.
add(Term[]) - Method in class org.apache.lucene.search.MultiPhraseQuery
Add multiple terms at the next position in the phrase.
add(Term[], int) - Method in class org.apache.lucene.search.MultiPhraseQuery
Allows to specify the relative position of terms within the phrase.
add(Term) - Method in class org.apache.lucene.search.PhraseQuery
Adds a term to the end of the query phrase.
add(Term, int) - Method in class org.apache.lucene.search.PhraseQuery
Adds a term to the end of the query phrase.
add(BytesRef) - Method in interface org.apache.lucene.search.suggest.fst.BytesRefSorter
Adds a single suggestion entry (possibly compound with its bucket).
add(BytesRef) - Method in class org.apache.lucene.search.suggest.fst.ExternalRefSorter

add(BytesRef, int) - Method in class org.apache.lucene.search.suggest.fst.FSTCompletionBuilder
Appends a single suggestion and its weight to the internal buffers.
add(BytesRef) - Method in class org.apache.lucene.search.suggest.fst.InMemorySorter

add(CharSequence, Object) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellLookup

add(CharSequence, Object) - Method in class org.apache.lucene.search.suggest.tst.TSTLookup

add(int, int, List<FieldPhraseList.WeightedPhraseInfo>) - Method in class org.apache.lucene.search.vectorhighlight.FieldFragList
convert the list of WeightedPhraseInfo to WeightedFragInfo, then add it to the fragInfos
add(Vector2D) - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
add(Point2D) - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
add(BytesRef) - Method in class org.apache.lucene.util.BytesRefHash
Adds a new BytesRef
add(BytesRef, int) - Method in class org.apache.lucene.util.BytesRefHash
Adds a new BytesRef with a pre-calculated hash code.
add(int) - Method in class org.apache.lucene.util.collections.IntHashSet
Add a mapping int key -> int value.
add(IntsRef, T) - Method in class org.apache.lucene.util.fst.Builder
It's OK to add the same input twice in a row with different outputs, as long as outputs impls the merge method.
add(BytesRef, BytesRef) - Method in class org.apache.lucene.util.fst.ByteSequenceOutputs

add(IntsRef, IntsRef) - Method in class org.apache.lucene.util.fst.IntSequenceOutputs

add(Object, Object) - Method in class org.apache.lucene.util.fst.NoOutputs

add(T, T) - Method in class org.apache.lucene.util.fst.Outputs
Eg add("foo", "bar") -> "foobar"
add(PairOutputs.Pair<A, B>, PairOutputs.Pair<A, B>) - Method in class org.apache.lucene.util.fst.PairOutputs

add(Long, Long) - Method in class org.apache.lucene.util.fst.PositiveIntOutputs

add(Object, Object) - Method in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs

add(E) - Method in class org.apache.lucene.util.MapBackedSet

add(long) - Method in class org.apache.lucene.util.packed.PackedInts.Writer

add(T) - Method in class org.apache.lucene.util.PriorityQueue
Adds an Object to a PriorityQueue in log(size) time.
add(int, IndexReader) - Method in class org.apache.lucene.util.ReaderUtil.Gather

add(CharSequence, CharSequence) - Method in class org.egothor.stemmer.MultiTrie
Add an element to this structure consisting of the given key and patch command.
add(CharSequence, CharSequence) - Method in class org.egothor.stemmer.MultiTrie2
Add an element to this structure consisting of the given key and patch command.
add(CharSequence, CharSequence) - Method in class org.egothor.stemmer.Trie
Add the given key associated with the given patch command.
add_escapes(String) - Method in exception org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException
Used to convert raw characters to their escaped version when these raw version cannot be used as part of an ASCII string literal.
add_escapes(String) - Method in exception org.apache.lucene.queryParser.surround.parser.ParseException
Used to convert raw characters to their escaped version when these raw version cannot be used as part of an ASCII string literal.
addAll(Iterable<SegmentInfo>) - Method in class org.apache.lucene.index.SegmentInfos

addAll(Collection<? extends QueryNodeProcessor>) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

addAll(int, Collection<? extends QueryNodeProcessor>) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

addAnalyzer(String, Analyzer) - Method in class org.apache.lucene.analysis.PerFieldAnalyzerWrapper
Deprecated. Changing the Analyzer for a field after instantiation prevents reusability. Analyzers for fields should be set during construction.
addAndGet(long) - Method in class org.apache.lucene.util.Counter
Adds the given delta to the counters current value
addArc(int, Builder.Node) - Method in class org.apache.lucene.util.fst.Builder.UnCompiledNode

addAttribute(Class<A>) - Method in class org.apache.lucene.queryParser.core.config.AbstractQueryConfig

addAttribute(Class<A>) - Method in class org.apache.lucene.util.AttributeSource
The caller must pass in a Class<? extends Attribute> value.
addAttributeImpl(AttributeImpl) - Method in class org.apache.lucene.util.AttributeSource
Expert: Adds a custom AttributeImpl instance with one or more Attribute interfaces.
addBox(double) - Method in class org.apache.lucene.spatial.tier.Shape
Deprecated.
addBuffer(int) - Method in class org.apache.lucene.store.RAMFile

addBuilder(String, SpanQueryBuilder) - Method in class org.apache.lucene.xmlparser.builders.SpanQueryBuilderFactory

addBuilder(String, FilterBuilder) - Method in class org.apache.lucene.xmlparser.FilterBuilderFactory

addBuilder(String, QueryBuilder) - Method in class org.apache.lucene.xmlparser.QueryBuilderFactory

addByPoolOffset(int) - Method in class org.apache.lucene.util.BytesRefHash

addBytes(long) - Method in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
update count of bytes generated by this source
addCategory(CategoryPath) - Method in class org.apache.lucene.facet.index.CategoryContainer
Add a category.
addCategory(CategoryPath, CategoryProperty) - Method in class org.apache.lucene.facet.index.CategoryContainer
Add a category with a property.
addCategory(CategoryPath, CategoryProperty...) - Method in class org.apache.lucene.facet.index.CategoryContainer
Add a category with multiple properties.
addCategory(CategoryAttribute) - Method in class org.apache.lucene.facet.index.CategoryContainer
Add an entire CategoryAttribute.
addCategory(CategoryPath) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter

addCategory(CategoryPath) - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyWriter
addCategory() adds a category with a given path name to the taxonomy, and returns its ordinal.
addCategoryDocument(CategoryPath, int, int) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter

addCategoryEnhancements(CategoryEnhancement...) - Method in class org.apache.lucene.facet.enhancements.params.DefaultEnhancementsIndexingParams

addCategoryEnhancements(CategoryEnhancement...) - Method in interface org.apache.lucene.facet.enhancements.params.EnhancementsIndexingParams
Add CategoryEnhancements to the indexing parameters
addCategoryListParams(CategoryPath, CategoryListParams) - Method in class org.apache.lucene.facet.index.params.PerDimensionIndexingParams
Add a CategoryListParams for a given CategoryPath's dimension or "zero-th" category.
addClass(String) - Method in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree
Add a character class to the tree.
addClass(String) - Method in interface org.apache.lucene.analysis.compound.hyphenation.PatternConsumer
Add a character class.
addClass(String) - Method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser

addClause(List<BooleanClause>, int, int, Query) - Method in class org.apache.lucene.queryParser.QueryParser

addClause(BooleanQuery, Term, float) - Method in class org.apache.lucene.search.MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite

addClause(BooleanQuery, Term, float) - Method in class org.apache.lucene.search.MultiTermQuery.TopTermsScoringBooleanQueryRewrite

addClause(SpanQuery) - Method in class org.apache.lucene.search.spans.SpanOrQuery
Adds a clause to this query
addCoreClosedListener(SegmentReader.CoreClosedListener) - Method in class org.apache.lucene.index.SegmentReader
Expert: adds a CoreClosedListener to this reader's shared core
addCount - Variable in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

addDefaultQueryTemplate(InputStream) - Method in class org.apache.lucene.xmlparser.QueryTemplateManager

addDetail(Explanation) - Method in class org.apache.lucene.search.Explanation
Adds a sub-node to this explanation node.
AddDocTask - Class in org.apache.lucene.benchmark.byTask.tasks
Add a document, optionally of a certain size.
AddDocTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.AddDocTask

addDocument(Document) - Method in class org.apache.lucene.index.IndexWriter
Adds a document to this index.
addDocument(Document, Analyzer) - Method in class org.apache.lucene.index.IndexWriter
Adds a document to this index, using the provided analyzer instead of the value of IndexWriter.getAnalyzer().
addDocument(Document) - Method in class org.apache.lucene.index.RandomIndexWriter
Adds a Document.
addDocument(Term, Document) - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

addDocument(Document, Analyzer) - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

addDocument(Document) - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

addDocument(Document) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated. Adds a document to this index.
addDocument(Document, Analyzer) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated. Adds a document to this index, using the provided analyzer instead of the value of InstantiatedIndexWriter.getAnalyzer().
addDocument(InstantiatedDocument, Analyzer) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated. Tokenizes a document and adds it to the buffer.
addDocuments(Collection<Document>) - Method in class org.apache.lucene.index.IndexWriter
Atomically adds a block of documents with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
addDocuments(Collection<Document>, Analyzer) - Method in class org.apache.lucene.index.IndexWriter
Atomically adds a block of documents, analyzed using the provided analyzer, with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
addDocuments(Collection<Document>) - Method in class org.apache.lucene.index.RandomIndexWriter

addDocuments(Term, Collection<Document>) - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

addDocuments(Collection<Document>, Analyzer) - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

addDocuments(Collection<Document>) - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

addDone() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.DiskOrdinalMap

addDone() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.MemoryOrdinalMap

addDone() - Method in interface org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.OrdinalMap
Call addDone() to say that all addMapping() have been done.
addError(Test, Throwable) - Method in class org.apache.lucene.util.LuceneJUnitResultFormatter
A test caused an error.
addEscapes(String) - Static method in error org.apache.lucene.benchmark.byTask.feeds.demohtml.TokenMgrError
Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string
addEscapes(String) - Static method in error org.apache.lucene.queryParser.standard.parser.TokenMgrError
Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string
addEscapes(String) - Static method in error org.apache.lucene.queryParser.surround.parser.TokenMgrError
Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string
addEscapes(String) - Static method in error org.apache.lucene.queryParser.TokenMgrError
Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string
addException(String, ArrayList<Object>) - Method in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree
Add an exception to the tree.
addException(String, ArrayList<Object>) - Method in interface org.apache.lucene.analysis.compound.hyphenation.PatternConsumer
Add a hyphenation exception.
addException(String, ArrayList<Object>) - Method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser

AddFacetedDocTask - Class in org.apache.lucene.benchmark.byTask.tasks
Add a faceted document.
AddFacetedDocTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.AddFacetedDocTask

addFacetRequest(FacetRequest) - Method in class org.apache.lucene.facet.search.params.FacetSearchParams
Add a facet request to apply for this faceted search.
addFailure(Test, Throwable) - Method in class org.apache.lucene.util.LuceneJUnitResultFormatter
Interface TestListener for JUnit <= 3.4.
addFailure(Test, AssertionFailedError) - Method in class org.apache.lucene.util.LuceneJUnitResultFormatter
Interface TestListener for JUnit > 3.4.
addField(String, String, Analyzer) - Method in class org.apache.lucene.index.memory.MemoryIndex
Convenience method; Tokenizes the given field text and adds the resulting terms to the index; Equivalent to adding an indexed non-keyword Lucene Field that is tokenized, not stored, termVectorStored with positions (or termVectorStored with positions and offsets),
addField(String, TokenStream) - Method in class org.apache.lucene.index.memory.MemoryIndex
Equivalent to addField(fieldName, stream, 1.0f).
addField(String, TokenStream, float) - Method in class org.apache.lucene.index.memory.MemoryIndex
Iterates over the given token stream and adds the resulting terms to the index; Equivalent to adding a tokenized, indexed, termVectorStored, unstored, Lucene Field.
addFieldConfigListener(FieldConfigListener) - Method in class org.apache.lucene.queryParser.core.config.QueryConfigHandler
Adds a listener.
addFile(String) - Method in class org.apache.lucene.index.CompoundFileWriter
Add a source stream.
addFile(String, Directory) - Method in class org.apache.lucene.index.CompoundFileWriter
Same as CompoundFileWriter.addFile(String), only for files that are found in an external Directory.
addFilterBuilder(String, FilterBuilder) - Method in class org.apache.lucene.xmlparser.CoreParser

addIndexes(Directory...) - Method in class org.apache.lucene.index.IndexWriter
Adds all segments from an array of indexes into this index.
addIndexes(IndexReader...) - Method in class org.apache.lucene.index.IndexWriter
Merges the provided indexes into this index.
addIndexes(Directory...) - Method in class org.apache.lucene.index.RandomIndexWriter

addIndexes(IndexReader...) - Method in class org.apache.lucene.index.RandomIndexWriter

addIndexes(Directory...) - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

addIndexes(IndexReader...) - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

addIndexes(IndexReader[]) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
addIndexesNoOptimize(Directory...) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriter.addIndexes(Directory...) instead
addItem() - Method in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
update count of items generated by this source
addLabel(CategoryPath, int, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap

addLabel(CategoryPath, int, int, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap

addLabel(CategoryPath, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.CompactLabelToOrdinal

addLabel(CategoryPath, int, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.CompactLabelToOrdinal

addLabel(CategoryPath, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal
Adds a new label if its not yet in the table.
addLabel(CategoryPath, int, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal
Adds a new label if its not yet in the table.
addLabelOffset(int, int, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap
This method does not check if the same value is already in the map because we pass in an char-array offset, so so we now that we're in resize-mode here.
addMapping(int, int) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.DiskOrdinalMap

addMapping(int, int) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.MemoryOrdinalMap

addMapping(int, int) - Method in interface org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.OrdinalMap

addOffCorrectMap(int, int) - Method in class org.apache.lucene.analysis.BaseCharFilter
Adds an offset correction mapping at the given output stream offset.
addOffCorrectMap(int, int) - Method in class org.apache.lucene.analysis.MockCharFilter

addPattern(String, String) - Method in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree
Add a pattern to the tree.
addPattern(String, String) - Method in interface org.apache.lucene.analysis.compound.hyphenation.PatternConsumer
Add hyphenation patterns.
addPattern(String, String) - Method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser

addPosition(int, int) - Method in class org.apache.lucene.search.SpanFilterResult.PositionInfo

addPositionSpans(List<PositionSpan>) - Method in class org.apache.lucene.search.highlight.WeightedSpanTerm

addPrefix(HunspellAffix) - Method in class org.apache.lucene.analysis.hunspell.HunspellStemmer.Stem
Adds a prefix to the list of prefixes used to generate this stem.
addProcessor(QueryNodeProcessor) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline
Deprecated. this class now conforms to List interface, so use QueryNodeProcessorPipeline.add(QueryNodeProcessor) instead
addProperty(CategoryProperty) - Method in interface org.apache.lucene.facet.index.attributes.CategoryAttribute
Add a property.
addProperty(CategoryProperty) - Method in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

addQueryBuilder(String, QueryBuilder) - Method in class org.apache.lucene.xmlparser.CoreParser

addQueryTemplate(String, InputStream) - Method in class org.apache.lucene.xmlparser.QueryTemplateManager

addRange(String, String) - Method in class org.apache.lucene.util.NumericUtils.IntRangeBuilder
Overwrite this method, if you like to receive the already prefix encoded range bounds.
addRange(int, int, int) - Method in class org.apache.lucene.util.NumericUtils.IntRangeBuilder
Overwrite this method, if you like to receive the raw int range bounds.
addRange(String, String) - Method in class org.apache.lucene.util.NumericUtils.LongRangeBuilder
Overwrite this method, if you like to receive the already prefix encoded range bounds.
addRange(long, long, int) - Method in class org.apache.lucene.util.NumericUtils.LongRangeBuilder
Overwrite this method, if you like to receive the raw long range bounds.
addReaderClosedListener(IndexReader.ReaderClosedListener) - Method in class org.apache.lucene.index.IndexReader
Expert: adds a IndexReader.ReaderClosedListener.
addResult(int, boolean, long) - Method in class org.apache.lucene.benchmark.quality.QualityStats
Add a (possibly relevant) doc.
addRetainableProperty(Class<? extends CategoryProperty>) - Method in class org.apache.lucene.facet.index.streaming.CategoryParentsStream
Add a CategoryProperty class which is retained when creating parent tokens.
addSinkTokenStream(TeeSinkTokenFilter.SinkTokenStream) - Method in class org.apache.lucene.analysis.TeeSinkTokenFilter
Adds a TeeSinkTokenFilter.SinkTokenStream created by another TeeSinkTokenFilter to this one.
addSpanNearQuery(Query) - Method in class org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory

addSpanQueries(SpanNearClauseFactory) - Method in class org.apache.lucene.queryParser.surround.query.DistanceQuery

addSpanQueries(SpanNearClauseFactory) - Method in interface org.apache.lucene.queryParser.surround.query.DistanceSubQuery

addSpanQueries(SpanNearClauseFactory) - Method in class org.apache.lucene.queryParser.surround.query.OrQuery

addSpanQueries(SpanNearClauseFactory) - Method in class org.apache.lucene.queryParser.surround.query.SimpleTerm

addSpanQueryWeighted(SpanQuery, float) - Method in class org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory

addStopWords(IndexReader) - Method in class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
Deprecated. Stopwords should be calculated at instantiation using QueryAutoStopWordAnalyzer.QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader)
addStopWords(IndexReader, int) - Method in class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
Deprecated. Stopwords should be calculated at instantiation using QueryAutoStopWordAnalyzer.QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, int)
addStopWords(IndexReader, float) - Method in class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
Deprecated. Stowords should be calculated at instantiation using QueryAutoStopWordAnalyzer.QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, float)
addStopWords(IndexReader, String, float) - Method in class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
Deprecated. Stowords should be calculated at instantiation using QueryAutoStopWordAnalyzer.QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, Collection, float)
addStopWords(IndexReader, String, int) - Method in class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
Deprecated. Stowords should be calculated at instantiation using QueryAutoStopWordAnalyzer.QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, Collection, int)
addSuffix(HunspellAffix) - Method in class org.apache.lucene.analysis.hunspell.HunspellStemmer.Stem
Adds a suffix to the list of suffixes used to generate this stem.
addTask(PerfTask) - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

addTaxonomy(Directory, DirectoryTaxonomyWriter.OrdinalMap) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Takes the categories from the given taxonomy directory, and adds the missing ones to this taxonomy.
addTerm(Term) - Method in class org.apache.lucene.search.TermsFilter
Adds a term to the list of acceptable terms
addTerms(String, String, float, int) - Method in class org.apache.lucene.search.FuzzyLikeThisQuery
Adds user input for "fuzzification"
addTermWeighted(Term, float) - Method in class org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory

addToArray(int) - Method in class org.apache.lucene.util.collections.IntArray
Adds a value to the array.
addWaitingListener(NRTManager.WaitingListener) - Method in class org.apache.lucene.search.NRTManager
Adds a listener, to be notified when a caller is waiting for a specific generation searcher to be visible.
adjustBeginLineColumn(int, int) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Method to adjust line and column numbers for the start of a token.
adjustBeginLineColumn(int, int) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Method to adjust line and column numbers for the start of a token.
AdjustBuffSize() - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

adjustTop() - Method in class org.apache.lucene.util.ScorerDocQueue
Should be called when the scorer at top changes doc() value.
advance(int) - Method in class org.apache.lucene.search.ConstantScoreQuery.ConstantScorer

advance(int) - Method in class org.apache.lucene.search.DocIdSetIterator
Advances to the first beyond (see NOTE below) the current whose document number is greater than or equal to target.
advance(int) - Method in class org.apache.lucene.search.FilteredDocIdSetIterator

advance(int) - Method in class org.apache.lucene.search.ScoreCachingWrappingScorer

advance(int) - Method in class org.apache.lucene.search.spans.SpanScorer

advance(int) - Method in class org.apache.lucene.util.OpenBitSetIterator

advise(FileDescriptor, long, long, int) - Static method in class org.apache.lucene.store.NativePosixUtil

afterClass() - Static method in class org.apache.lucene.search.SearchEquivalenceTestBase

afterClassLuceneTestCaseJ4() - Static method in class org.apache.lucene.util.LuceneTestCase

afterClose() - Method in class org.apache.lucene.search.NRTManager

afterClose() - Method in class org.apache.lucene.search.ReferenceManager
Called after close(), so subclass can free any resources.
AfterEquals - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
Lexical state.
afterPosition() - Method in class org.apache.lucene.analysis.LookaheadTokenFilter
This is called when all input tokens leaving a given position have been returned.
afterPosition() - Method in class org.apache.lucene.analysis.MockGraphTokenFilter

afterPosition() - Method in class org.apache.lucene.analysis.MockRandomLookaheadTokenFilter

afterRefresh() - Method in class org.apache.lucene.search.NRTManager

afterRefresh() - Method in class org.apache.lucene.search.ReferenceManager
Called after swapReference has installed a new instance.
aggregate(int) - Method in interface org.apache.lucene.facet.search.aggregator.Aggregator
Collect (and do whatever an implementation deems appropriate) the category given by its ordinal.
aggregate(int) - Method in class org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator

aggregate(int) - Method in class org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator

aggregate(int) - Method in class org.apache.lucene.facet.search.aggregator.ComplementCountingAggregator

aggregate(int) - Method in class org.apache.lucene.facet.search.aggregator.CountingAggregator

aggregate(int) - Method in class org.apache.lucene.facet.search.aggregator.ScoringAggregator

Aggregator - Interface in org.apache.lucene.facet.search.aggregator
An Aggregator is the analogue of Lucene's Collector (see Collector), for processing the categories belonging to a certain document.
ALEF - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

ALEF - Static variable in class org.apache.lucene.analysis.ar.ArabicStemmer

ALEF_HAMZA_ABOVE - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

ALEF_HAMZA_BELOW - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

ALEF_MADDA - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

Algorithm - Class in org.apache.lucene.benchmark.byTask.utils
Test algorithm, as read from file
Algorithm(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.utils.Algorithm
Read algorithm from file Property examined: alt.tasks.packages == comma separated list of alternate package names where tasks would be searched for, when not found in the default package (that of PerfTask Object.getClass()).
alignObjectSize(long) - Static method in class org.apache.lucene.util.RamUsageEstimator
Aligns an object size to be the next multiple of RamUsageEstimator.NUM_BYTES_OBJECT_ALIGNMENT.
ALL - Static variable in class org.apache.lucene.index.SortedTermVectorMapper
Stand-in name for the field in TermVectorEntry.
allFragmentsProcessed() - Method in class org.apache.lucene.search.highlight.QueryTermScorer

alloc(int) - Method in class org.apache.lucene.analysis.compound.hyphenation.ByteVector
This is to implement memory allocation in the array.
alloc(int) - Method in class org.apache.lucene.analysis.compound.hyphenation.CharVector

allocate() - Method in class org.apache.lucene.facet.search.TemporaryObjectAllocator
Allocate a new object.
allocate() - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

allocSlice(byte[], int) - Method in class org.apache.lucene.util.ByteBlockPool

ALLOW_LEADING_WILDCARD - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set whether leading wildcards are supported
allowedSuffix(String) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

allowedTruncation(String) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

AllowLeadingWildcardAttribute - Interface in org.apache.lucene.queryParser.standard.config
Deprecated.
AllowLeadingWildcardAttributeImpl - Class in org.apache.lucene.queryParser.standard.config
Deprecated.
AllowLeadingWildcardAttributeImpl() - Constructor for class org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl
Deprecated.
AllowLeadingWildcardProcessor - Class in org.apache.lucene.queryParser.standard.processors
This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.ALLOW_LEADING_WILDCARD is defined in the QueryConfigHandler.
AllowLeadingWildcardProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.AllowLeadingWildcardProcessor

ALPHA - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

ALPHANUM - Static variable in class org.apache.lucene.analysis.standard.ClassicTokenizer

ALPHANUM - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizer

ALPHANUM - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

ALPHANUM_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

AlreadyClosedException - Exception in org.apache.lucene.store
This exception is thrown when there is an attempt to access something that has already been closed.
AlreadyClosedException(String) - Constructor for exception org.apache.lucene.store.AlreadyClosedException

alwaysIgnoredTestMethod() - Method in class org.apache.lucene.util.LuceneTestCase

Among - Class in org.tartarus.snowball

Among(String, int, int, String, SnowballProgram) - Constructor for class org.tartarus.snowball.Among

ANALYSIS_DATA_DIR - Static variable in class org.apache.lucene.analysis.cn.smart.AnalyzerProfile
Global indicating the configured analysis data directory
analyze(Analyzer, String, CharsRef) - Static method in class org.apache.lucene.analysis.synonym.SynonymMap.Builder
Sugar: analyzes the text with the analyzer and separates by SynonymMap.WORD_SEPARATOR.
Analyzer - Class in org.apache.lucene.analysis
An Analyzer builds TokenStreams, which analyze text.
Analyzer() - Constructor for class org.apache.lucene.analysis.Analyzer

ANALYZER - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set the Analyzer used for terms found in the query
analyzer - Static variable in class org.apache.lucene.search.SearchEquivalenceTestBase

analyzer - Variable in class org.apache.lucene.xmlparser.CoreParser

AnalyzerAttribute - Interface in org.apache.lucene.queryParser.standard.config
Deprecated.
AnalyzerAttributeImpl - Class in org.apache.lucene.queryParser.standard.config
Deprecated.
AnalyzerAttributeImpl() - Constructor for class org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl
Deprecated.
AnalyzerProfile - Class in org.apache.lucene.analysis.cn.smart
Manages analysis data configuration for SmartChineseAnalyzer
AnalyzerProfile() - Constructor for class org.apache.lucene.analysis.cn.smart.AnalyzerProfile

AnalyzerQueryNodeProcessor - Class in org.apache.lucene.queryParser.standard.processors
This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.ANALYZER is defined in the QueryConfigHandler.
AnalyzerQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.AnalyzerQueryNodeProcessor

AnalyzingQueryParser - Class in org.apache.lucene.queryParser.analyzing
Overrides Lucene's default QueryParser so that Fuzzy-, Prefix-, Range-, and WildcardQuerys are also passed through the given analyzer, but wild card characters (like *) don't get removed from the search terms.
AnalyzingQueryParser(Version, String, Analyzer) - Constructor for class org.apache.lucene.queryParser.analyzing.AnalyzingQueryParser
Constructs a query parser.
AND - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
AND - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
AND - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
AND - Static variable in class org.apache.lucene.search.ChainedFilter

and(DocIdSetIterator) - Method in class org.apache.lucene.util.FixedBitSet
Does in-place AND of the bits provided by the iterator.
and(FixedBitSet) - Method in class org.apache.lucene.util.FixedBitSet
this = this AND other
and(OpenBitSet) - Method in class org.apache.lucene.util.OpenBitSet

AND_OPERATOR - Static variable in class org.apache.lucene.queryParser.QueryParser
Alternative form of QueryParser.Operator.AND
AND_OPERATOR - Static variable in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated. Alternative form of QueryParser.Operator.AND
ANDNOT - Static variable in class org.apache.lucene.search.ChainedFilter

andNot(DocIdSetIterator) - Method in class org.apache.lucene.util.FixedBitSet
Does in-place AND NOT of the bits provided by the iterator.
andNot(FixedBitSet) - Method in class org.apache.lucene.util.FixedBitSet
this = this AND NOT other
andNot(OpenBitSet) - Method in class org.apache.lucene.util.OpenBitSet

andNotCount(OpenBitSet, OpenBitSet) - Static method in class org.apache.lucene.util.OpenBitSet
Returns the popcount or cardinality of "a and not b" or "intersection(a, not(b))".
AndQuery() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

AndQuery - Class in org.apache.lucene.queryParser.surround.query

AndQuery(List<SrndQuery>, boolean, String) - Constructor for class org.apache.lucene.queryParser.surround.query.AndQuery

AndQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A AndQueryNode represents an AND boolean operation performed on a list of nodes.
AndQueryNode(List<QueryNode>) - Constructor for class org.apache.lucene.queryParser.core.nodes.AndQueryNode

angularDistance(double, double) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated. distance/radius.
anyFilesExceptWriteLock(Directory) - Static method in class org.apache.lucene.util._TestUtil

AnyQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A AnyQueryNode represents an ANY operator performed on a list of nodes.
AnyQueryNode(List<QueryNode>, CharSequence, int) - Constructor for class org.apache.lucene.queryParser.core.nodes.AnyQueryNode

AnyQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders

AnyQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.AnyQueryNodeBuilder

anyUnhandledExceptions() - Static method in class org.apache.lucene.index.ConcurrentMergeScheduler
Used for testing
APOSTROPHE - Static variable in class org.apache.lucene.analysis.standard.ClassicTokenizer

APOSTROPHE - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizer
Deprecated.
APOSTROPHE_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

append(CharSequence) - Method in interface org.apache.lucene.analysis.tokenattributes.CharTermAttribute

append(CharSequence, int, int) - Method in interface org.apache.lucene.analysis.tokenattributes.CharTermAttribute

append(char) - Method in interface org.apache.lucene.analysis.tokenattributes.CharTermAttribute

append(String) - Method in interface org.apache.lucene.analysis.tokenattributes.CharTermAttribute
Appends the specified String to this character sequence.
append(StringBuilder) - Method in interface org.apache.lucene.analysis.tokenattributes.CharTermAttribute
Appends the specified StringBuilder to this character sequence.
append(CharTermAttribute) - Method in interface org.apache.lucene.analysis.tokenattributes.CharTermAttribute
Appends the contents of the other CharTermAttribute to this character sequence.
append(CharSequence) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

append(CharSequence, int, int) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

append(char) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

append(String) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

append(StringBuilder) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

append(CharTermAttribute) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

append(CharSequence) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

append(CharSequence, int, int) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

append(char) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

append(BytesRef) - Method in class org.apache.lucene.search.suggest.BytesRefList
Appends a copy of the given BytesRef to this BytesRefList.
append(BytesRef) - Method in class org.apache.lucene.util.BytesRef
Appends the bytes from the given BytesRef
append(char[], int, int) - Method in class org.apache.lucene.util.CharsRef
Appends the given array to this CharsRef
append(String) - Method in class org.apache.lucene.util.LuceneJUnitResultFormatter

append(long) - Method in class org.apache.lucene.util.LuceneJUnitResultFormatter

appendIntToStream(int) - Method in class org.apache.lucene.facet.index.CategoryListPayloadStream
Appends an integer to the stream.
appendRegExpForChar(char, StringBuilder) - Method in class org.apache.lucene.queryParser.surround.query.SrndTruncQuery

appendSubResult(FacetResultNode) - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode
Append a sub result (as last).
appendTo(Appendable, char) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Build a string representation of the path, with its components separated by the given delimiter character.
appendTo(Appendable, char, int) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
like CategoryPath.appendTo(Appendable, char), but takes only a prefix of the path, rather than the whole path.
appendTo(Appendable, char, int, int) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
like CategoryPath.appendTo(Appendable, char), but takes only a part of the path, rather than the whole path.
apply(char[], int) - Method in class org.apache.lucene.analysis.pt.RSLPStemmerBase.Step

apply(Statement, Description) - Method in class org.apache.lucene.util.StoreClassNameRule

apply(Statement, Description) - Method in class org.apache.lucene.util.SystemPropertiesInvariantRule

apply(Statement, Description) - Method in class org.apache.lucene.util.SystemPropertiesRestoreRule

apply(Statement, Description) - Method in class org.apache.lucene.util.UncaughtExceptionsRule

apply(StringBuilder, CharSequence) - Static method in class org.egothor.stemmer.Diff
Apply the given patch string diff to the given string dest.
applyAffix(char[], int, HunspellAffix, int) - Method in class org.apache.lucene.analysis.hunspell.HunspellStemmer
Applies the affix rule to the given word, producing a list of stems if any are found
ArabicAnalyzer - Class in org.apache.lucene.analysis.ar
Analyzer for Arabic.
ArabicAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.ar.ArabicAnalyzer
Builds an analyzer with the default stop words: ArabicAnalyzer.DEFAULT_STOPWORD_FILE.
ArabicAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.ar.ArabicAnalyzer
Builds an analyzer with the given stop words
ArabicAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.ar.ArabicAnalyzer
Builds an analyzer with the given stop word.
ArabicAnalyzer(Version, String...) - Constructor for class org.apache.lucene.analysis.ar.ArabicAnalyzer
Deprecated. use ArabicAnalyzer.ArabicAnalyzer(Version, Set) instead
ArabicAnalyzer(Version, Hashtable<?, ?>) - Constructor for class org.apache.lucene.analysis.ar.ArabicAnalyzer
Deprecated. use ArabicAnalyzer.ArabicAnalyzer(Version, Set) instead
ArabicAnalyzer(Version, File) - Constructor for class org.apache.lucene.analysis.ar.ArabicAnalyzer
Deprecated. use ArabicAnalyzer.ArabicAnalyzer(Version, Set) instead
ArabicLetterTokenizer - Class in org.apache.lucene.analysis.ar
Deprecated. (3.1) Use StandardTokenizer instead.
ArabicLetterTokenizer(Version, Reader) - Constructor for class org.apache.lucene.analysis.ar.ArabicLetterTokenizer
Deprecated. Construct a new ArabicLetterTokenizer.
ArabicLetterTokenizer(Version, AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.ar.ArabicLetterTokenizer
Deprecated. Construct a new ArabicLetterTokenizer using a given AttributeSource.
ArabicLetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.ar.ArabicLetterTokenizer
Deprecated. Construct a new ArabicLetterTokenizer using a given AttributeSource.AttributeFactory.
ArabicLetterTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.ar.ArabicLetterTokenizer
Deprecated. use ArabicLetterTokenizer.ArabicLetterTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
ArabicLetterTokenizer(AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.ar.ArabicLetterTokenizer
Deprecated. use ArabicLetterTokenizer.ArabicLetterTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
ArabicLetterTokenizer(AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.ar.ArabicLetterTokenizer
Deprecated. use ArabicLetterTokenizer.ArabicLetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
ArabicNormalizationFilter - Class in org.apache.lucene.analysis.ar
A TokenFilter that applies ArabicNormalizer to normalize the orthography.
ArabicNormalizationFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.ar.ArabicNormalizationFilter

ArabicNormalizer - Class in org.apache.lucene.analysis.ar
Normalizer for Arabic.
ArabicNormalizer() - Constructor for class org.apache.lucene.analysis.ar.ArabicNormalizer

ArabicStemFilter - Class in org.apache.lucene.analysis.ar
A TokenFilter that applies ArabicStemmer to stem Arabic words..
ArabicStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.ar.ArabicStemFilter

ArabicStemmer - Class in org.apache.lucene.analysis.ar
Stemmer for Arabic.
ArabicStemmer() - Constructor for class org.apache.lucene.analysis.ar.ArabicStemmer

arcCount - Variable in class org.apache.lucene.util.fst.FST

arcDistance(LatLng) - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated. Calculates the distance between two lat/lng's in miles.
arcDistance(LatLng, DistanceUnits) - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated. Calculates the distance between two lat/lng's in miles or meters.
arcs - Variable in class org.apache.lucene.util.fst.Builder.UnCompiledNode

arcWithOutputCount - Variable in class org.apache.lucene.util.fst.FST

area() - Method in class org.apache.lucene.spatial.geometry.shape.Ellipse
Deprecated.
area() - Method in interface org.apache.lucene.spatial.geometry.shape.Geometry2D
Deprecated. Return the area
area() - Method in class org.apache.lucene.spatial.geometry.shape.LLRect
Deprecated. Return the area in units of lat-lng squared.
area() - Method in class org.apache.lucene.spatial.geometry.shape.Rectangle
Deprecated.
ArgEquals - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
ArgName - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
ArgQuote1 - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
ArgQuote2 - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
ArgValue() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser

ArgValue - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
ArmenianAnalyzer - Class in org.apache.lucene.analysis.hy
Analyzer for Armenian.
ArmenianAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.hy.ArmenianAnalyzer
Builds an analyzer with the default stop words: ArmenianAnalyzer.DEFAULT_STOPWORD_FILE.
ArmenianAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.hy.ArmenianAnalyzer
Builds an analyzer with the given stop words.
ArmenianAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.hy.ArmenianAnalyzer
Builds an analyzer with the given stop words.
ArmenianStemmer - Class in org.tartarus.snowball.ext
This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.
ArmenianStemmer() - Constructor for class org.tartarus.snowball.ext.ArmenianStemmer

ArrayHashMap<K,V> - Class in org.apache.lucene.util.collections
An Array-based hashtable which maps, similar to Java's HashMap, only performance tests showed it performs better.
ArrayHashMap() - Constructor for class org.apache.lucene.util.collections.ArrayHashMap
Constructs a map with default capacity.
ArrayHashMap(int) - Constructor for class org.apache.lucene.util.collections.ArrayHashMap
Constructs a map with given capacity.
arrayToString(int[]) - Static method in class org.apache.lucene.util._TestUtil
Deprecated. -- in 3.0 we can use Arrays.toString instead
arrayToString(Object[]) - Static method in class org.apache.lucene.util._TestUtil
Deprecated. -- in 3.0 we can use Arrays.toString instead
ArrayUtil - Class in org.apache.lucene.util
Methods for manipulating arrays.
ArrayUtil() - Constructor for class org.apache.lucene.util.ArrayUtil
Deprecated. This constructor was not intended to be public and should not be used. This class contains solely a static utility methods. It will be made private in Lucene 4.0
ASCIIFoldingFilter - Class in org.apache.lucene.analysis
This class converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if one exists.
ASCIIFoldingFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.ASCIIFoldingFilter

asList() - Method in class org.apache.lucene.index.SegmentInfos
Returns all contained segments as an unmodifiable List view.
assertAnalyzesTo(Analyzer, String, String[], int[], int[], String[], int[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertAnalyzesTo(Analyzer, String, String[], int[], int[], String[], int[], int[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertAnalyzesTo(Analyzer, String, String[], int[], int[], String[], int[], int[], boolean) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertAnalyzesTo(Analyzer, String, String[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertAnalyzesTo(Analyzer, String, String[], String[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertAnalyzesTo(Analyzer, String, String[], int[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertAnalyzesTo(Analyzer, String, String[], int[], int[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertAnalyzesTo(Analyzer, String, String[], int[], int[], int[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertAnalyzesToPositions(Analyzer, String, String[], int[], int[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertAnalyzesToReuse(Analyzer, String, String[], int[], int[], String[], int[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertAnalyzesToReuse(Analyzer, String, String[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertAnalyzesToReuse(Analyzer, String, String[], String[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertAnalyzesToReuse(Analyzer, String, String[], int[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertAnalyzesToReuse(Analyzer, String, String[], int[], int[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertAnalyzesToReuse(Analyzer, String, String[], int[], int[], int[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertAttributeReflection(AttributeImpl, Map<String, T>) - Static method in class org.apache.lucene.util._TestUtil
Checks some basic behaviour of an AttributeImpl
assertDateRangeQueryEquals(QueryParser, String, String, String, Date, DateTools.Resolution) - Method in class org.apache.lucene.queryParser.QueryParserTestBase

assertEquals(TopDocs, TopDocs) - Static method in class org.apache.lucene.util._TestUtil

assertEquals(double, double) - Static method in class org.apache.lucene.util.LuceneTestCase
Deprecated.
assertEquals(String, double, double) - Static method in class org.apache.lucene.util.LuceneTestCase
Deprecated.
assertEquals(float, float) - Static method in class org.apache.lucene.util.LuceneTestCase
Deprecated.
assertEquals(String, float, float) - Static method in class org.apache.lucene.util.LuceneTestCase
Deprecated.
assertEscapedQueryEquals(String, Analyzer, String) - Method in class org.apache.lucene.queryParser.QueryParserTestBase

AssertingIndexSearcher - Class in org.apache.lucene.search
Helper class that adds some extra checks to ensure correct usage of IndexSearcher and Weight.
AssertingIndexSearcher(IndexReader) - Constructor for class org.apache.lucene.search.AssertingIndexSearcher

AssertingIndexSearcher(IndexReader, ExecutorService) - Constructor for class org.apache.lucene.search.AssertingIndexSearcher

assertParseException(String) - Method in class org.apache.lucene.queryParser.QueryParserTestBase

assertQueryEquals(String, Analyzer, String) - Method in class org.apache.lucene.queryParser.QueryParserTestBase

assertQueryEquals(QueryParser, String, String, String) - Method in class org.apache.lucene.queryParser.QueryParserTestBase

assertQueryEqualsDOA(String, Analyzer, String) - Method in class org.apache.lucene.queryParser.QueryParserTestBase

assertSameSet(Query, Query) - Method in class org.apache.lucene.search.SearchEquivalenceTestBase
Asserts that the documents returned by q1 are the same as of those returned by q2
assertSaneFieldCaches(String) - Method in class org.apache.lucene.util.LuceneTestCase
Asserts that FieldCacheSanityChecker does not detect any problems with FieldCache.DEFAULT.
assertSubsetOf(Query, Query) - Method in class org.apache.lucene.search.SearchEquivalenceTestBase
Asserts that the documents returned by q1 are a subset of those returned by q2
assertSubsetOf(Query, Query, Filter) - Method in class org.apache.lucene.search.SearchEquivalenceTestBase
Asserts that the documents returned by q1 are a subset of those returned by q2.
assertThreadSafe(Analyzer) - Method in class org.apache.lucene.analysis.CollationTestBase

assertTokenStreamContents(TokenStream, String[], int[], int[], String[], int[], int[], Integer, boolean) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertTokenStreamContents(TokenStream, String[], int[], int[], String[], int[], int[], Integer) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertTokenStreamContents(TokenStream, String[], int[], int[], String[], int[], Integer) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertTokenStreamContents(TokenStream, String[], int[], int[], String[], int[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertTokenStreamContents(TokenStream, String[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertTokenStreamContents(TokenStream, String[], String[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertTokenStreamContents(TokenStream, String[], int[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertTokenStreamContents(TokenStream, String[], int[], int[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertTokenStreamContents(TokenStream, String[], int[], int[], Integer) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertTokenStreamContents(TokenStream, String[], int[], int[], int[]) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertTokenStreamContents(TokenStream, String[], int[], int[], int[], Integer) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertTokenStreamContents(TokenStream, String[], int[], int[], int[], int[], Integer) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

assertVocabulary(Analyzer, InputStream, InputStream) - Static method in class org.apache.lucene.analysis.VocabularyAssert
Run a vocabulary test against two data files.
assertVocabulary(Analyzer, InputStream) - Static method in class org.apache.lucene.analysis.VocabularyAssert
Run a vocabulary test against one file: tab separated.
assertVocabulary(Analyzer, File, String, String) - Static method in class org.apache.lucene.analysis.VocabularyAssert
Run a vocabulary test against two data files inside a zip file
assertVocabulary(Analyzer, File, String) - Static method in class org.apache.lucene.analysis.VocabularyAssert
Run a vocabulary test against a tab-separated data file inside a zip file
assertWildcardQueryEquals(String, boolean, String, boolean) - Method in class org.apache.lucene.queryParser.QueryParserTestBase

assertWildcardQueryEquals(String, boolean, String) - Method in class org.apache.lucene.queryParser.QueryParserTestBase

assertWildcardQueryEquals(String, String) - Method in class org.apache.lucene.queryParser.QueryParserTestBase

asSet() - Method in class org.apache.lucene.index.SegmentInfos
Returns all contained segments as an unmodifiable Set view.
asSet(T...) - Static method in class org.apache.lucene.util.LuceneTestCase

assign_to(StringBuilder) - Method in class org.tartarus.snowball.SnowballProgram

association - Variable in class org.apache.lucene.facet.enhancements.association.AssociationProperty

ASSOCIATION_POSTING_TERM - Static variable in class org.apache.lucene.facet.enhancements.association.AssociationsPayloadIterator
Default Term for associations
AssociationEnhancement - Class in org.apache.lucene.facet.enhancements.association
A CategoryEnhancement for adding associations data to the index (categories with AssociationPropertys).
AssociationEnhancement() - Constructor for class org.apache.lucene.facet.enhancements.association.AssociationEnhancement

AssociationFloatProperty - Class in org.apache.lucene.facet.enhancements.association
An AssociationProperty which treats the association as float - the association bits are actually float bits, and thus merging two associations is done by float summation.
AssociationFloatProperty(float) - Constructor for class org.apache.lucene.facet.enhancements.association.AssociationFloatProperty
Constructor.
AssociationFloatSumAggregator - Class in org.apache.lucene.facet.search.aggregator.association
An Aggregator which updates the weight of a category by summing the weights of the float association it finds for every document.
AssociationFloatSumAggregator(IndexReader, float[]) - Constructor for class org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator

AssociationFloatSumAggregator(String, IndexReader, float[]) - Constructor for class org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator

AssociationFloatSumFacetRequest - Class in org.apache.lucene.facet.search.params.association
Facet request for weighting facets according to their float association by summing the association values.
AssociationFloatSumFacetRequest(CategoryPath, int) - Constructor for class org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest
Create a float association facet request for a given node in the taxonomy.
AssociationIntProperty - Class in org.apache.lucene.facet.enhancements.association
An AssociationProperty which treats the association as int - merges two associations by summation.
AssociationIntProperty(int) - Constructor for class org.apache.lucene.facet.enhancements.association.AssociationIntProperty

AssociationIntSumAggregator - Class in org.apache.lucene.facet.search.aggregator.association
An Aggregator which updates the weight of a category by summing the weights of the integer association it finds for every document.
AssociationIntSumAggregator(IndexReader, int[]) - Constructor for class org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator

AssociationIntSumAggregator(String, IndexReader, int[]) - Constructor for class org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator

AssociationIntSumFacetRequest - Class in org.apache.lucene.facet.search.params.association
Facet request for weighting facets according to their integer association by summing the association values.
AssociationIntSumFacetRequest(CategoryPath, int) - Constructor for class org.apache.lucene.facet.search.params.association.AssociationIntSumFacetRequest
Create an integer association facet request for a given node in the taxonomy.
AssociationListTokenizer - Class in org.apache.lucene.facet.enhancements.association
Tokenizer for associations of a category
AssociationListTokenizer(TokenStream, EnhancementsIndexingParams, CategoryEnhancement) - Constructor for class org.apache.lucene.facet.enhancements.association.AssociationListTokenizer

AssociationProperty - Class in org.apache.lucene.facet.enhancements.association
A CategoryProperty associating a single integer value to a CategoryAttribute.
AssociationProperty(int) - Constructor for class org.apache.lucene.facet.enhancements.association.AssociationProperty
Construct an AssociationProperty.
AssociationsPayloadIterator - Class in org.apache.lucene.facet.enhancements.association
Allows easy iteration over the associations payload, decoding and breaking it to (ordinal, value) pairs, stored in a hash.
AssociationsPayloadIterator(IndexReader, String) - Constructor for class org.apache.lucene.facet.enhancements.association.AssociationsPayloadIterator
Construct a new association-iterator, initializing the inner payload iterator, with the supplied term and checking whether there are any associations within the given index
associationsPayloadIterator - Variable in class org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator

associationsPayloadIterator - Variable in class org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator

assumeFalse(String, boolean) - Static method in class org.apache.lucene.util.LuceneTestCase

assumeNoException(String, Exception) - Static method in class org.apache.lucene.util.LuceneTestCase

assumeTrue(String, boolean) - Static method in class org.apache.lucene.util.LuceneTestCase

atLeast(Random, int) - Static method in class org.apache.lucene.util.LuceneTestCase
Returns a number of at least i
atLeast(int) - Static method in class org.apache.lucene.util.LuceneTestCase

Attribute - Interface in org.apache.lucene.util
Base interface for attributes.
AttributeImpl - Class in org.apache.lucene.util
Base class for Attributes that can be added to a AttributeSource.
AttributeImpl() - Constructor for class org.apache.lucene.util.AttributeImpl

AttributeReflector - Interface in org.apache.lucene.util
This interface is used to reflect contents of AttributeSource or AttributeImpl.
AttributeSource - Class in org.apache.lucene.util
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
AttributeSource() - Constructor for class org.apache.lucene.util.AttributeSource
An AttributeSource using the default attribute factory AttributeSource.AttributeFactory.DEFAULT_ATTRIBUTE_FACTORY.
AttributeSource(AttributeSource) - Constructor for class org.apache.lucene.util.AttributeSource
An AttributeSource that uses the same attributes as the supplied one.
AttributeSource(AttributeSource.AttributeFactory) - Constructor for class org.apache.lucene.util.AttributeSource
An AttributeSource using the supplied AttributeSource.AttributeFactory for creating new Attribute instances.
AttributeSource.AttributeFactory - Class in org.apache.lucene.util
An AttributeFactory creates instances of AttributeImpls.
AttributeSource.AttributeFactory() - Constructor for class org.apache.lucene.util.AttributeSource.AttributeFactory

AttributeSource.State - Class in org.apache.lucene.util
This class holds the state of an AttributeSource.
AttributeSource.State() - Constructor for class org.apache.lucene.util.AttributeSource.State

automatic() - Static method in class org.apache.lucene.search.suggest.fst.Sort.BufferSize
Approximately half of the currently available free heap, but no less than Sort.ABSOLUTE_MIN_SORT_BUFFER_SIZE.
available() - Method in class org.apache.lucene.util.UnsafeByteArrayInputStream

average(QualityStats[]) - Static method in class org.apache.lucene.benchmark.quality.QualityStats
Create a QualityStats object that is the average of the input QualityStats objects.
AveragePayloadFunction - Class in org.apache.lucene.search.payloads
Calculate the final score as the average score of all payloads seen.
AveragePayloadFunction() - Constructor for class org.apache.lucene.search.payloads.AveragePayloadFunction

B

B - Variable in class org.apache.lucene.spatial.geometry.shape.LineSegment
Deprecated.
backup(int) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Backup a number of characters.
backup(int) - Method in interface org.apache.lucene.queryParser.CharStream
Backs up the input stream by amount steps.
backup(int) - Method in class org.apache.lucene.queryParser.FastCharStream

backup(int) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Retreat.
backup(int) - Method in interface org.apache.lucene.queryParser.surround.parser.CharStream
Backs up the input stream by amount steps.
backup(int) - Method in class org.apache.lucene.queryParser.surround.parser.FastCharStream

balance() - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree
Balance the tree for best search performance
BalancedSegmentMergePolicy - Class in org.apache.lucene.index
Merge policy that tries to balance not doing large segment merges with not accumulating too many segments in the index, to provide for better performance in near real-time setting.
BalancedSegmentMergePolicy() - Constructor for class org.apache.lucene.index.BalancedSegmentMergePolicy

BalancedSegmentMergePolicy.MergePolicyParams - Class in org.apache.lucene.index
Specifies configuration parameters for BalancedSegmentMergePolicy.
BalancedSegmentMergePolicy.MergePolicyParams() - Constructor for class org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams

balancedTree(Object[], Object[], int, int, TernaryTreeNode) - Method in class org.apache.lucene.search.suggest.tst.TSTAutocomplete
Inserting keys in TST in the order middle,small,big (lexicographic measure) recursively creates a balanced tree which reduces insertion and search times significantly.
BAREOPER - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
base - Variable in class org.apache.lucene.index.UpgradeIndexMergePolicy

base - Variable in class org.apache.lucene.search.CachingCollector

BaseCharFilter - Class in org.apache.lucene.analysis
Base utility class for implementing a CharFilter.
BaseCharFilter(CharStream) - Constructor for class org.apache.lucene.analysis.BaseCharFilter

BaseFormAttribute - Interface in org.apache.lucene.analysis.ja.tokenattributes
Attribute for Token.getBaseForm().
BaseFormAttributeImpl - Class in org.apache.lucene.analysis.ja.tokenattributes
Attribute for Token.getBaseForm().
BaseFormAttributeImpl() - Constructor for class org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttributeImpl

BaseFragmentsBuilder - Class in org.apache.lucene.search.vectorhighlight

BaseFragmentsBuilder() - Constructor for class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

BaseFragmentsBuilder(String[], String[]) - Constructor for class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

BaseFragmentsBuilder(BoundaryScanner) - Constructor for class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

BaseFragmentsBuilder(String[], String[], BoundaryScanner) - Constructor for class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

baselineTf(float) - Method in class org.apache.lucene.misc.SweetSpotSimilarity
Implemented as: (x <= min) ? base : sqrt(x+(base**2)-min) ...but with a special case check for 0.
BaseTokenStreamTestCase - Class in org.apache.lucene.analysis
Base class for all Lucene unit tests that use TokenStreams.
BaseTokenStreamTestCase() - Constructor for class org.apache.lucene.analysis.BaseTokenStreamTestCase

BaseTokenStreamTestCase.CheckClearAttributesAttribute - Interface in org.apache.lucene.analysis
Attribute that records if it was cleared or not.
BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl - Class in org.apache.lucene.analysis
Attribute that records if it was cleared or not.
BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl() - Constructor for class org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl

BasicQueryFactory - Class in org.apache.lucene.queryParser.surround.query

BasicQueryFactory(int) - Constructor for class org.apache.lucene.queryParser.surround.query.BasicQueryFactory

BasicQueryFactory() - Constructor for class org.apache.lucene.queryParser.surround.query.BasicQueryFactory

BasqueAnalyzer - Class in org.apache.lucene.analysis.eu
Analyzer for Basque.
BasqueAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.eu.BasqueAnalyzer
Builds an analyzer with the default stop words: BasqueAnalyzer.DEFAULT_STOPWORD_FILE.
BasqueAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.eu.BasqueAnalyzer
Builds an analyzer with the given stop words.
BasqueAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.eu.BasqueAnalyzer
Builds an analyzer with the given stop words.
BasqueStemmer - Class in org.tartarus.snowball.ext
This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.
BasqueStemmer() - Constructor for class org.tartarus.snowball.ext.BasqueStemmer

beforeClass() - Static method in class org.apache.lucene.search.SearchEquivalenceTestBase

beforeClassLuceneTestCaseJ4() - Static method in class org.apache.lucene.util.LuceneTestCase

begin - Variable in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
The term's begin position.
beginColumn - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token
The column number of the first character of this Token.
beginColumn - Variable in class org.apache.lucene.queryParser.standard.parser.Token
The column number of the first character of this Token.
beginColumn - Variable in class org.apache.lucene.queryParser.surround.parser.Token
The column number of the first character of this Token.
beginColumn - Variable in class org.apache.lucene.queryParser.Token
The column number of the first character of this Token.
beginLine - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token
The line number of the first character of this Token.
beginLine - Variable in class org.apache.lucene.queryParser.standard.parser.Token
The line number of the first character of this Token.
beginLine - Variable in class org.apache.lucene.queryParser.surround.parser.Token
The line number of the first character of this Token.
beginLine - Variable in class org.apache.lucene.queryParser.Token
The line number of the first character of this Token.
BeginToken() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Start.
BeginToken() - Method in interface org.apache.lucene.queryParser.CharStream
Returns the next character that marks the beginning of the next token.
BeginToken() - Method in class org.apache.lucene.queryParser.FastCharStream

BeginToken() - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

BeginToken() - Method in interface org.apache.lucene.queryParser.surround.parser.CharStream
Returns the next character that marks the beginning of the next token.
BeginToken() - Method in class org.apache.lucene.queryParser.surround.parser.FastCharStream

BEH - Static variable in class org.apache.lucene.analysis.ar.ArabicStemmer

BeiderMorseFilter - Class in org.apache.lucene.analysis.phonetic
TokenFilter for Beider-Morse phonetic encoding.
BeiderMorseFilter(TokenStream, PhoneticEngine) - Constructor for class org.apache.lucene.analysis.phonetic.BeiderMorseFilter
Calls BeiderMorseFilter(input, engine, null)
BeiderMorseFilter(TokenStream, PhoneticEngine, Languages.LanguageSet) - Constructor for class org.apache.lucene.analysis.phonetic.BeiderMorseFilter
Create a new BeiderMorseFilter
Benchmark - Class in org.apache.lucene.benchmark.byTask
Run the benchmark algorithm.
Benchmark(Reader) - Constructor for class org.apache.lucene.benchmark.byTask.Benchmark

BenchmarkHighlighter - Class in org.apache.lucene.benchmark.byTask.tasks

BenchmarkHighlighter() - Constructor for class org.apache.lucene.benchmark.byTask.tasks.BenchmarkHighlighter

bestFit(double) - Method in class org.apache.lucene.spatial.tier.projections.CartesianTierPlotter
Deprecated. Find the tier with the best fit for a bounding box Best fit is defined as the ceiling of log2 (circumference of earth / distance) distance is defined as the smallest box fitting the corner between a radius and a bounding box.
BinaryDictionary - Class in org.apache.lucene.analysis.ja.dict
Base class for a binary-encoded in-memory dictionary.
BinaryDictionary() - Constructor for class org.apache.lucene.analysis.ja.dict.BinaryDictionary

binaryLength - Variable in class org.apache.lucene.document.AbstractField

binaryOffset - Variable in class org.apache.lucene.document.AbstractField

binarySearch(String[], String) - Static method in class org.apache.lucene.search.FieldComparator

binarySearch(String[], String, int, int) - Static method in class org.apache.lucene.search.FieldComparator

binarySearchAssociatedDocuments(int) - Method in class org.apache.lucene.store.instantiated.InstantiatedTerm

binarySearchAssociatedDocuments(int, int) - Method in class org.apache.lucene.store.instantiated.InstantiatedTerm

binarySearchAssociatedDocuments(int, int, int) - Method in class org.apache.lucene.store.instantiated.InstantiatedTerm

binarySearchLookup(String) - Method in class org.apache.lucene.search.FieldCache.StringIndex

bitlist - Static variable in class org.apache.lucene.util.OpenBitSetIterator

Bits - Interface in org.apache.lucene.util
Interface for Bitset-like structures.
bits - Variable in class org.apache.lucene.util.OpenBitSet

Bits.MatchAllBits - Class in org.apache.lucene.util
Bits impl of the specified length with all bits set.
Bits.MatchAllBits(int) - Constructor for class org.apache.lucene.util.Bits.MatchAllBits

Bits.MatchNoBits - Class in org.apache.lucene.util
Bits impl of the specified length with no bits set.
Bits.MatchNoBits(int) - Constructor for class org.apache.lucene.util.Bits.MatchNoBits

bits2words(int) - Static method in class org.apache.lucene.util.FixedBitSet
returns the number of 64 bit words it would take to hold numBits
bits2words(long) - Static method in class org.apache.lucene.util.OpenBitSet
returns the number of 64 bit words it would take to hold numBits
bitSpans(IndexReader) - Method in class org.apache.lucene.search.CachingSpanFilter

bitSpans(IndexReader) - Method in class org.apache.lucene.search.SpanFilter
Returns a SpanFilterResult with true for documents which should be permitted in search results, and false for those that should not and Spans for where the true docs match.
bitSpans(IndexReader) - Method in class org.apache.lucene.search.SpanQueryFilter

bitsPerValue - Variable in class org.apache.lucene.util.packed.PackedInts.ReaderImpl

bitsPerValue - Variable in class org.apache.lucene.util.packed.PackedInts.Writer

bitsRequired(long) - Static method in class org.apache.lucene.util.packed.PackedInts
Returns how many bits are required to hold values up to and including maxValue
BitUtil - Class in org.apache.lucene.util
A variety of high efficiency bit twiddling routines.
BitVector - Class in org.apache.lucene.util
Optimized implementation of a vector of bits.
BitVector(int) - Constructor for class org.apache.lucene.util.BitVector
Constructs a vector capable of holding n bits.
BitVector(Directory, String) - Constructor for class org.apache.lucene.util.BitVector
Constructs a bit vector from the file name in Directory d, as written by the BitVector.write(org.apache.lucene.store.Directory, java.lang.String) method.
BLOCK_SIZE - Static variable in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

BlockGroupingCollector - Class in org.apache.lucene.search.grouping
BlockGroupingCollector performs grouping with a single pass collector, as long as you are grouping by a doc block field, ie all documents sharing a given group value were indexed as a doc block using the atomic IndexWriter.addDocuments(java.util.Collection) or IndexWriter.updateDocuments(org.apache.lucene.index.Term, java.util.Collection) API.
BlockGroupingCollector(Sort, int, boolean, Filter) - Constructor for class org.apache.lucene.search.grouping.BlockGroupingCollector
Create the single pass collector.
blockSize - Variable in class org.apache.lucene.util.ByteBlockPool.Allocator

BODY_FIELD - Static variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

bodyIndexVal - Variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

bodyStoreVal - Variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

BOLD - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

BOLD_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

BOLD_ITALICS - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

BOLD_ITALICS_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

BooleanClause - Class in org.apache.lucene.search
A clause in a BooleanQuery.
BooleanClause(Query, BooleanClause.Occur) - Constructor for class org.apache.lucene.search.BooleanClause
Constructs a BooleanClause.
BooleanClause.Occur - Enum in org.apache.lucene.search
Specifies how clauses are to occur in matching documents.
BooleanFilter - Class in org.apache.lucene.search
A container Filter that allows Boolean composition of Filters.
BooleanFilter() - Constructor for class org.apache.lucene.search.BooleanFilter

BooleanFilterBuilder - Class in org.apache.lucene.xmlparser.builders

BooleanFilterBuilder(FilterBuilder) - Constructor for class org.apache.lucene.xmlparser.builders.BooleanFilterBuilder

BooleanModifierNode - Class in org.apache.lucene.queryParser.standard.nodes
A BooleanModifierNode has the same behaviour as ModifierQueryNode, it only indicates that this modifier was added by GroupQueryNodeProcessor and not by the user.
BooleanModifierNode(QueryNode, ModifierQueryNode.Modifier) - Constructor for class org.apache.lucene.queryParser.standard.nodes.BooleanModifierNode

BooleanModifiersQueryNodeProcessor - Class in org.apache.lucene.queryParser.precedence.processors
This processor is used to apply the correct ModifierQueryNode to BooleanQueryNodes children.
BooleanModifiersQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.precedence.processors.BooleanModifiersQueryNodeProcessor

BooleanQuery - Class in org.apache.lucene.search
A Query that matches documents matching boolean combinations of other queries, e.g.
BooleanQuery() - Constructor for class org.apache.lucene.search.BooleanQuery
Constructs an empty boolean query.
BooleanQuery(boolean) - Constructor for class org.apache.lucene.search.BooleanQuery
Constructs an empty boolean query.
BooleanQuery.BooleanWeight - Class in org.apache.lucene.search
Expert: the Weight for BooleanQuery, used to normalize, score and explain these queries.
BooleanQuery.BooleanWeight(Searcher, boolean) - Constructor for class org.apache.lucene.search.BooleanQuery.BooleanWeight

BooleanQuery.TooManyClauses - Exception in org.apache.lucene.search
Thrown when an attempt is made to add more than BooleanQuery.getMaxClauseCount() clauses.
BooleanQuery.TooManyClauses() - Constructor for exception org.apache.lucene.search.BooleanQuery.TooManyClauses

BooleanQueryBuilder - Class in org.apache.lucene.xmlparser.builders

BooleanQueryBuilder(QueryBuilder) - Constructor for class org.apache.lucene.xmlparser.builders.BooleanQueryBuilder

BooleanQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A BooleanQueryNode represents a list of elements which do not have an explicit boolean operator defined between them.
BooleanQueryNode(List<QueryNode>) - Constructor for class org.apache.lucene.queryParser.core.nodes.BooleanQueryNode

BooleanQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
Builds a BooleanQuery object from a BooleanQueryNode object.
BooleanQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.BooleanQueryNodeBuilder

BOOLEANS - Static variable in class org.apache.lucene.benchmark.Constants

BooleanSingleChildOptimizationQueryNodeProcessor - Class in org.apache.lucene.queryParser.standard.processors
This processor removes every BooleanQueryNode that contains only one child and returns this child.
BooleanSingleChildOptimizationQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.BooleanSingleChildOptimizationQueryNodeProcessor

boost - Variable in class org.apache.lucene.document.AbstractField

Boost - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
Lexical state.
BOOST - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set the boost value in FieldConfig objects.
Boost - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
Lexical state.
Boost - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
Lexical state.
boost(float) - Static method in class org.apache.lucene.util.ToStringUtils
for printing boost only if not 1.0
BoostAttribute - Interface in org.apache.lucene.queryParser.standard.config
Deprecated.
BoostAttributeImpl - Class in org.apache.lucene.queryParser.standard.config
Deprecated.
BoostAttributeImpl() - Constructor for class org.apache.lucene.queryParser.standard.config.BoostAttributeImpl
Deprecated.
BoostingQuery - Class in org.apache.lucene.search
The BoostingQuery class can be used to effectively demote results that match a given query.
BoostingQuery(Query, Query, float) - Constructor for class org.apache.lucene.search.BoostingQuery

BoostingQueryBuilder - Class in org.apache.lucene.xmlparser.builders

BoostingQueryBuilder(QueryBuilder) - Constructor for class org.apache.lucene.xmlparser.builders.BoostingQueryBuilder

BoostingTermBuilder - Class in org.apache.lucene.xmlparser.builders

BoostingTermBuilder() - Constructor for class org.apache.lucene.xmlparser.builders.BoostingTermBuilder

BoostQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A BoostQueryNode boosts the QueryNode tree which is under this node.
BoostQueryNode(QueryNode, float) - Constructor for class org.apache.lucene.queryParser.core.nodes.BoostQueryNode
Constructs a boost node
BoostQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
This builder basically reads the Query object set on the BoostQueryNode child using QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID and applies the boost value defined in the BoostQueryNode.
BoostQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.BoostQueryNodeBuilder

BoostQueryNodeProcessor - Class in org.apache.lucene.queryParser.standard.processors
This processor iterates the query node tree looking for every FieldableNode that has StandardQueryConfigHandler.ConfigurationKeys.BOOST in its config.
BoostQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.BoostQueryNodeProcessor

boosts - Variable in class org.apache.lucene.queryParser.MultiFieldQueryParser

BOTH - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer
Output the both the untokenized token and the splits
boundaryChars - Variable in class org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner

BoundaryScanner - Interface in org.apache.lucene.search.vectorhighlight

bra - Variable in class org.tartarus.snowball.SnowballProgram

BRAZILIAN_STOP_WORDS - Static variable in class org.apache.lucene.analysis.br.BrazilianAnalyzer
Deprecated. use BrazilianAnalyzer.getDefaultStopSet() instead
BrazilianAnalyzer - Class in org.apache.lucene.analysis.br
Analyzer for Brazilian Portuguese language.
BrazilianAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.br.BrazilianAnalyzer
Builds an analyzer with the default stop words (BrazilianAnalyzer.getDefaultStopSet()).
BrazilianAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.br.BrazilianAnalyzer
Builds an analyzer with the given stop words
BrazilianAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.br.BrazilianAnalyzer
Builds an analyzer with the given stop words and stemming exclusion words
BrazilianAnalyzer(Version, String...) - Constructor for class org.apache.lucene.analysis.br.BrazilianAnalyzer
Deprecated. use BrazilianAnalyzer.BrazilianAnalyzer(Version, Set) instead
BrazilianAnalyzer(Version, Map<?, ?>) - Constructor for class org.apache.lucene.analysis.br.BrazilianAnalyzer
Deprecated. use BrazilianAnalyzer.BrazilianAnalyzer(Version, Set) instead
BrazilianAnalyzer(Version, File) - Constructor for class org.apache.lucene.analysis.br.BrazilianAnalyzer
Deprecated. use BrazilianAnalyzer.BrazilianAnalyzer(Version, Set) instead
BrazilianStemFilter - Class in org.apache.lucene.analysis.br
A TokenFilter that applies BrazilianStemmer.
BrazilianStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.br.BrazilianStemFilter
Creates a new BrazilianStemFilter
BrazilianStemFilter(TokenStream, Set<?>) - Constructor for class org.apache.lucene.analysis.br.BrazilianStemFilter
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
BrazilianStemmer - Class in org.apache.lucene.analysis.br
A stemmer for Brazilian Portuguese words.
BrazilianStemmer() - Constructor for class org.apache.lucene.analysis.br.BrazilianStemmer

BreakIteratorBoundaryScanner - Class in org.apache.lucene.search.vectorhighlight
A BoundaryScanner implementation that uses BreakIterator to find boundaries in the text.
BreakIteratorBoundaryScanner(BreakIterator) - Constructor for class org.apache.lucene.search.vectorhighlight.BreakIteratorBoundaryScanner

bucket - Variable in class org.apache.lucene.search.suggest.fst.FSTCompletion.Completion

buf - Variable in class org.apache.lucene.analysis.util.OpenStringBuilder

BUF_SIZE_INT - Static variable in class org.apache.lucene.util.NumericUtils
Expert: The maximum term length (used for char[] buffer size) for encoding int values.
BUF_SIZE_LONG - Static variable in class org.apache.lucene.util.NumericUtils
Expert: The maximum term length (used for char[] buffer size) for encoding long values.
bufcolumn - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

bufcolumn - Variable in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

buffer() - Method in interface org.apache.lucene.analysis.tokenattributes.CharTermAttribute
Returns the internal termBuffer character array which you can then directly alter.
buffer() - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

buffer - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

buffer - Variable in class org.apache.lucene.facet.search.PayloadIterator

buffer - Variable in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

buffer - Variable in class org.apache.lucene.store.BufferedIndexInput

buffer - Variable in class org.apache.lucene.util.ByteBlockPool

BUFFER_SIZE - Static variable in class org.apache.lucene.benchmark.byTask.utils.StreamUtils
Buffer size used across the benchmark package
BUFFER_SIZE - Static variable in class org.apache.lucene.store.BufferedIndexInput
Default buffer size
BufferedIndexInput - Class in org.apache.lucene.store
Base implementation class for buffered IndexInput.
BufferedIndexInput() - Constructor for class org.apache.lucene.store.BufferedIndexInput
Deprecated. please pass resourceDesc
BufferedIndexInput(String) - Constructor for class org.apache.lucene.store.BufferedIndexInput

BufferedIndexInput(int) - Constructor for class org.apache.lucene.store.BufferedIndexInput
Deprecated. please pass resourceDesc
BufferedIndexInput(String, int) - Constructor for class org.apache.lucene.store.BufferedIndexInput
Inits BufferedIndexInput with a specific bufferSize
BufferedIndexOutput - Class in org.apache.lucene.store
Base implementation class for buffered IndexOutput.
BufferedIndexOutput() - Constructor for class org.apache.lucene.store.BufferedIndexOutput

BufferingTermFreqIteratorWrapper - Class in org.apache.lucene.search.suggest
This wrapper buffers incoming elements.
BufferingTermFreqIteratorWrapper(TermFreqIterator) - Constructor for class org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper

buffers - Variable in class org.apache.lucene.store.RAMFile

buffers - Variable in class org.apache.lucene.util.ByteBlockPool

bufferSize - Variable in class org.apache.lucene.search.suggest.fst.Sort.SortInfo

bufline - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

bufline - Variable in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

bufpos - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Position in buffer.
bufpos - Variable in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Position in buffer.
build() - Method in class org.apache.lucene.analysis.synonym.SynonymMap.Builder
Builds an SynonymMap and returns it.
build(Document) - Method in class org.apache.lucene.facet.index.CategoryDocumentBuilder
Adds the fields created in one of the "set" methods to the document
build(QueryNode) - Method in interface org.apache.lucene.queryParser.core.builders.QueryBuilder
Builds some kind of object from a query tree.
build(QueryNode) - Method in class org.apache.lucene.queryParser.core.builders.QueryTreeBuilder
Builds some kind of object from a query tree.
build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.AnyQueryNodeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.BooleanQueryNodeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.BoostQueryNodeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.DummyQueryNodeBuilder
Always return null.
build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.FieldQueryNodeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.FuzzyQueryNodeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.GroupQueryNodeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.MatchAllDocsQueryNodeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.MatchNoDocsQueryNodeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.ModifierQueryNodeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.MultiPhraseQueryNodeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.NumericRangeQueryNodeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.PhraseQueryNodeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.PrefixWildcardQueryNodeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.RangeQueryNodeBuilder
Deprecated.
build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.SlopQueryNodeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.StandardBooleanQueryNodeBuilder

build(QueryNode) - Method in interface org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.StandardQueryTreeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.TermRangeQueryNodeBuilder

build(QueryNode) - Method in class org.apache.lucene.queryParser.standard.builders.WildcardQueryNodeBuilder

build() - Method in class org.apache.lucene.search.suggest.fst.FSTCompletionBuilder
Builds the final automaton from a list of added entries.
build(TermFreqIterator) - Method in class org.apache.lucene.search.suggest.fst.FSTCompletionLookup
Builds up a new internal Lookup representation based on the given TermFreqIterator.
build(TermFreqIterator) - Method in class org.apache.lucene.search.suggest.fst.FSTLookup
Deprecated.
build(TermFreqIterator) - Method in class org.apache.lucene.search.suggest.fst.WFSTCompletionLookup

build(TermFreqIterator) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellLookup

build(Dictionary) - Method in class org.apache.lucene.search.suggest.Lookup
Build lookup from a dictionary.
build(TermFreqIterator) - Method in class org.apache.lucene.search.suggest.Lookup
Builds up a new internal Lookup representation based on the given TermFreqIterator.
build(TermFreqIterator) - Method in class org.apache.lucene.search.suggest.tst.TSTLookup

Builder<T> - Class in org.apache.lucene.util.fst
Builds a minimal FST (maps an IntsRef term to an arbitrary output) from pre-sorted terms with outputs.
Builder(FST.INPUT_TYPE, Outputs<T>) - Constructor for class org.apache.lucene.util.fst.Builder
Instantiates an FST/FSA builder without any pruning.
Builder(FST.INPUT_TYPE, int, int, boolean, boolean, int, Outputs<T>, Builder.FreezeTail<T>, boolean) - Constructor for class org.apache.lucene.util.fst.Builder
Instantiates an FST/FSA builder with all the possible tuning and construction tweaks.
Builder.Arc<T> - Class in org.apache.lucene.util.fst
Expert: holds a pending (seen but not yet serialized) arc.
Builder.Arc() - Constructor for class org.apache.lucene.util.fst.Builder.Arc

Builder.FreezeTail<T> - Class in org.apache.lucene.util.fst
Expert: this is invoked by Builder whenever a suffix is serialized.
Builder.FreezeTail() - Constructor for class org.apache.lucene.util.fst.Builder.FreezeTail

Builder.UnCompiledNode<T> - Class in org.apache.lucene.util.fst
Expert: holds a pending (seen but not yet serialized) Node.
Builder.UnCompiledNode(Builder<T>, int) - Constructor for class org.apache.lucene.util.fst.Builder.UnCompiledNode

buildExtensionField(String) - Method in class org.apache.lucene.queryParser.ext.Extensions
Builds an extension field string from a given extension key and the default query field.
buildExtensionField(String, String) - Method in class org.apache.lucene.queryParser.ext.Extensions
Builds an extension field string from a given extension key and the extensions field.
buildFieldConfig(FieldConfig) - Method in interface org.apache.lucene.queryParser.core.config.FieldConfigListener
This method is called ever time a field configuration is requested.
buildFieldConfig(FieldConfig) - Method in class org.apache.lucene.queryParser.standard.config.FieldBoostMapFCListener

buildFieldConfig(FieldConfig) - Method in class org.apache.lucene.queryParser.standard.config.FieldDateResolutionFCListener

buildFieldConfig(FieldConfig) - Method in class org.apache.lucene.queryParser.standard.config.NumericFieldConfigListener

BulgarianAnalyzer - Class in org.apache.lucene.analysis.bg
Analyzer for Bulgarian.
BulgarianAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.bg.BulgarianAnalyzer
Builds an analyzer with the default stop words: BulgarianAnalyzer.DEFAULT_STOPWORD_FILE.
BulgarianAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.bg.BulgarianAnalyzer
Builds an analyzer with the given stop words.
BulgarianAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.bg.BulgarianAnalyzer
Builds an analyzer with the given stop words and a stem exclusion set.
BulgarianStemFilter - Class in org.apache.lucene.analysis.bg
A TokenFilter that applies BulgarianStemmer to stem Bulgarian words.
BulgarianStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.bg.BulgarianStemFilter

BulgarianStemmer - Class in org.apache.lucene.analysis.bg
Light Stemmer for Bulgarian.
BulgarianStemmer() - Constructor for class org.apache.lucene.analysis.bg.BulgarianStemmer

BYTE - Static variable in class org.apache.lucene.search.function.FieldScoreQuery.Type
field values are interpreted as numeric byte values.
BYTE - Static variable in class org.apache.lucene.search.SortField
Sort using term values as encoded Bytes.
byte315ToFloat(byte) - Static method in class org.apache.lucene.util.SmallFloat
byteToFloat(b, mantissaBits=3, zeroExponent=15)
byte52ToFloat(byte) - Static method in class org.apache.lucene.util.SmallFloat
byteToFloat(b, mantissaBits=5, zeroExponent=2)
BYTE_BLOCK_MASK - Static variable in class org.apache.lucene.util.ByteBlockPool

BYTE_BLOCK_SHIFT - Static variable in class org.apache.lucene.util.ByteBlockPool

BYTE_BLOCK_SIZE - Static variable in class org.apache.lucene.util.ByteBlockPool

byteArray(StringBuilder, byte[]) - Static method in class org.apache.lucene.util.ToStringUtils

ByteArrayDataInput - Class in org.apache.lucene.store
DataInput backed by a byte array.
ByteArrayDataInput(byte[]) - Constructor for class org.apache.lucene.store.ByteArrayDataInput

ByteArrayDataInput(byte[], int, int) - Constructor for class org.apache.lucene.store.ByteArrayDataInput

ByteArrayDataInput() - Constructor for class org.apache.lucene.store.ByteArrayDataInput

ByteArrayDataOutput - Class in org.apache.lucene.store
DataOutput backed by a byte array.
ByteArrayDataOutput(byte[]) - Constructor for class org.apache.lucene.store.ByteArrayDataOutput

ByteArrayDataOutput(byte[], int, int) - Constructor for class org.apache.lucene.store.ByteArrayDataOutput

ByteArrayDataOutput() - Constructor for class org.apache.lucene.store.ByteArrayDataOutput

byteAt(int) - Method in class org.apache.lucene.index.Payload
Returns the byte at the given index.
ByteBlockPool - Class in org.apache.lucene.util
Class that Posting and PostingVector use to write byte streams into shared fixed-size byte[] arrays.
ByteBlockPool(ByteBlockPool.Allocator) - Constructor for class org.apache.lucene.util.ByteBlockPool

ByteBlockPool.Allocator - Class in org.apache.lucene.util
Abstract class for allocating and freeing byte blocks.
ByteBlockPool.Allocator(int) - Constructor for class org.apache.lucene.util.ByteBlockPool.Allocator

ByteBlockPool.DirectAllocator - Class in org.apache.lucene.util
A simple ByteBlockPool.Allocator that never recycles.
ByteBlockPool.DirectAllocator() - Constructor for class org.apache.lucene.util.ByteBlockPool.DirectAllocator

ByteBlockPool.DirectAllocator(int) - Constructor for class org.apache.lucene.util.ByteBlockPool.DirectAllocator

ByteBlockPool.DirectTrackingAllocator - Class in org.apache.lucene.util
A simple ByteBlockPool.Allocator that never recycles, but tracks how much total RAM is in use.
ByteBlockPool.DirectTrackingAllocator(AtomicLong) - Constructor for class org.apache.lucene.util.ByteBlockPool.DirectTrackingAllocator

ByteBlockPool.DirectTrackingAllocator(int, AtomicLong) - Constructor for class org.apache.lucene.util.ByteBlockPool.DirectTrackingAllocator

ByteFieldSource - Class in org.apache.lucene.search.function
Expert: obtains single byte field values from the FieldCache using getBytes() and makes those values available as other numeric types, casting as needed.
ByteFieldSource(String) - Constructor for class org.apache.lucene.search.function.ByteFieldSource
Create a cached byte field source with default string-to-byte parser.
ByteFieldSource(String, FieldCache.ByteParser) - Constructor for class org.apache.lucene.search.function.ByteFieldSource
Create a cached byte field source with a specific string-to-byte parser.
byteOffset - Variable in class org.apache.lucene.util.ByteBlockPool

bytes - Variable in class org.apache.lucene.util.BytesRef
The contents of the BytesRef.
bytes - Variable in class org.apache.lucene.util.fst.FST.BytesReader

BYTES_FIELD - Static variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

bytesDifference(byte[], int, byte[], int) - Static method in class org.apache.lucene.util.StringHelper
Compares two byte[] arrays, element by element, and returns the number of elements common to both arrays.
bytesEquals(BytesRef) - Method in class org.apache.lucene.util.BytesRef
Expert: compares the bytes against another BytesRef, returning true if the bytes are equal.
ByteSequenceOutputs - Class in org.apache.lucene.util.fst
An FST Outputs implementation where each output is a sequence of bytes.
bytesNeeded(int) - Static method in class org.apache.lucene.util.Vint8
Returns the number of bytes needed to encode number.
BytesRef - Class in org.apache.lucene.util
Represents byte[], as a slice (offset + length) into an existing byte[].
BytesRef() - Constructor for class org.apache.lucene.util.BytesRef
Create a BytesRef with BytesRef.EMPTY_BYTES
BytesRef(byte[], int, int) - Constructor for class org.apache.lucene.util.BytesRef
This instance will directly reference bytes w/o making a copy.
BytesRef(byte[]) - Constructor for class org.apache.lucene.util.BytesRef
This instance will directly reference bytes w/o making a copy.
BytesRef(int) - Constructor for class org.apache.lucene.util.BytesRef
Create a BytesRef pointing to a new array of size capacity.
BytesRef(CharSequence) - Constructor for class org.apache.lucene.util.BytesRef
Initialize the byte[] from the UTF8 bytes for the provided String.
BytesRefFSTEnum<T> - Class in org.apache.lucene.util.fst
Enumerates all input (BytesRef) + output pairs in an FST.
BytesRefFSTEnum(FST<T>) - Constructor for class org.apache.lucene.util.fst.BytesRefFSTEnum
doFloor controls the behavior of advance: if it's true doFloor is true, advance positions to the biggest term before target.
BytesRefFSTEnum.InputOutput<T> - Class in org.apache.lucene.util.fst
Holds a single input (BytesRef) + output pair.
BytesRefFSTEnum.InputOutput() - Constructor for class org.apache.lucene.util.fst.BytesRefFSTEnum.InputOutput

BytesRefHash - Class in org.apache.lucene.util
BytesRefHash is a special purpose hash-map like data-structure optimized for BytesRef instances.
BytesRefHash() - Constructor for class org.apache.lucene.util.BytesRefHash
Creates a new BytesRefHash with a ByteBlockPool using a ByteBlockPool.DirectAllocator.
BytesRefHash(ByteBlockPool) - Constructor for class org.apache.lucene.util.BytesRefHash
Creates a new BytesRefHash
BytesRefHash(ByteBlockPool, int, BytesRefHash.BytesStartArray) - Constructor for class org.apache.lucene.util.BytesRefHash
Creates a new BytesRefHash
BytesRefHash.BytesStartArray - Class in org.apache.lucene.util
Manages allocation of the per-term addresses.
BytesRefHash.BytesStartArray() - Constructor for class org.apache.lucene.util.BytesRefHash.BytesStartArray

BytesRefHash.DirectBytesStartArray - Class in org.apache.lucene.util
A simple BytesRefHash.BytesStartArray that tracks memory allocation using a private AtomicLong instance.
BytesRefHash.DirectBytesStartArray(int) - Constructor for class org.apache.lucene.util.BytesRefHash.DirectBytesStartArray

BytesRefHash.MaxBytesLengthExceededException - Exception in org.apache.lucene.util
Thrown if a BytesRef exceeds the BytesRefHash limit of ByteBlockPool.BYTE_BLOCK_SIZE-2.
BytesRefHash.TrackingDirectBytesStartArray - Class in org.apache.lucene.util
A simple BytesRefHash.BytesStartArray that tracks all memory allocation using a shared AtomicLong instance.
BytesRefHash.TrackingDirectBytesStartArray(int, AtomicLong) - Constructor for class org.apache.lucene.util.BytesRefHash.TrackingDirectBytesStartArray

BytesRefIterator - Interface in org.apache.lucene.util
A simple iterator interface for BytesRef iteration.
BytesRefList - Class in org.apache.lucene.search.suggest
A simple append only random-access BytesRef array that stores full copies of the appended bytes in a ByteBlockPool.
BytesRefList() - Constructor for class org.apache.lucene.search.suggest.BytesRefList
Creates a new BytesRefList
BytesRefSorter - Interface in org.apache.lucene.search.suggest.fst
Collects BytesRef and then allows one to iterate over their sorted order.
byteStart(int) - Method in class org.apache.lucene.util.BytesRefHash
Returns the bytesStart offset into the internally used ByteBlockPool for the given ord
bytesToCharSequence(BytesRef, Random) - Static method in class org.apache.lucene.util._TestUtil

bytesUsed() - Method in class org.apache.lucene.search.suggest.BytesRefList
Returns the number internally used bytes to hold the appended bytes in memory
bytesUsed() - Method in class org.apache.lucene.util.BytesRefHash.BytesStartArray
A AtomicLong reference holding the number of bytes used by this BytesRefHash.BytesStartArray.
bytesUsed() - Method in class org.apache.lucene.util.BytesRefHash.DirectBytesStartArray

bytesUsed - Variable in class org.apache.lucene.util.BytesRefHash.TrackingDirectBytesStartArray

bytesUsed() - Method in class org.apache.lucene.util.BytesRefHash.TrackingDirectBytesStartArray

bytesUsed() - Method in class org.apache.lucene.util.RecyclingByteBlockAllocator

byteToFloat(byte, int, int) - Static method in class org.apache.lucene.util.SmallFloat
Converts an 8 bit float to a 32 bit float.
byteUpto - Variable in class org.apache.lucene.util.ByteBlockPool

ByteVector - Class in org.apache.lucene.analysis.compound.hyphenation
This class implements a simple byte vector with access to the underlying array.
ByteVector() - Constructor for class org.apache.lucene.analysis.compound.hyphenation.ByteVector

ByteVector(int) - Constructor for class org.apache.lucene.analysis.compound.hyphenation.ByteVector

ByteVector(byte[]) - Constructor for class org.apache.lucene.analysis.compound.hyphenation.ByteVector

ByteVector(byte[], int) - Constructor for class org.apache.lucene.analysis.compound.hyphenation.ByteVector

C

cache - Variable in class org.apache.lucene.search.CachingWrapperFilter

cache - Variable in class org.apache.lucene.search.FilterManager
Deprecated. The cache itself
cacheCleanSize - Variable in class org.apache.lucene.search.FilterManager
Deprecated. Maximum allowed cache size
cachedDocs - Variable in class org.apache.lucene.search.CachingCollector

cachedFieldSourceEquals(FieldCacheSource) - Method in class org.apache.lucene.search.function.ByteFieldSource

cachedFieldSourceEquals(FieldCacheSource) - Method in class org.apache.lucene.search.function.FieldCacheSource
Check if equals to another FieldCacheSource, already knowing that cache and field are equal.
cachedFieldSourceEquals(FieldCacheSource) - Method in class org.apache.lucene.search.function.FloatFieldSource

cachedFieldSourceEquals(FieldCacheSource) - Method in class org.apache.lucene.search.function.IntFieldSource

cachedFieldSourceEquals(FieldCacheSource) - Method in class org.apache.lucene.search.function.ShortFieldSource

cachedFieldSourceHashCode() - Method in class org.apache.lucene.search.function.ByteFieldSource

cachedFieldSourceHashCode() - Method in class org.apache.lucene.search.function.FieldCacheSource
Return a hash code of a FieldCacheSource, without the hash-codes of the field and the cache (those are taken care of elsewhere).
cachedFieldSourceHashCode() - Method in class org.apache.lucene.search.function.FloatFieldSource

cachedFieldSourceHashCode() - Method in class org.apache.lucene.search.function.IntFieldSource

cachedFieldSourceHashCode() - Method in class org.apache.lucene.search.function.ShortFieldSource

CachedFilterBuilder - Class in org.apache.lucene.xmlparser.builders
Filters are cached in an LRU Cache keyed on the contained query or filter object.
CachedFilterBuilder(QueryBuilderFactory, FilterBuilderFactory, int) - Constructor for class org.apache.lucene.xmlparser.builders.CachedFilterBuilder

cachedSegs - Variable in class org.apache.lucene.search.CachingCollector

CachingCollector - Class in org.apache.lucene.search
Caches all docs, and optionally also scores, coming from a search, and is then able to replay them to another collector.
CachingSpanFilter - Class in org.apache.lucene.search
Wraps another SpanFilter's result and caches it.
CachingSpanFilter(SpanFilter) - Constructor for class org.apache.lucene.search.CachingSpanFilter
New deletions always result in a cache miss, by default (CachingWrapperFilter.DeletesMode.RECACHE.
CachingSpanFilter(SpanFilter, CachingWrapperFilter.DeletesMode) - Constructor for class org.apache.lucene.search.CachingSpanFilter

CachingTokenFilter - Class in org.apache.lucene.analysis
This class can be used if the token attributes of a TokenStream are intended to be consumed more than once.
CachingTokenFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.CachingTokenFilter

CachingWrapperFilter - Class in org.apache.lucene.search
Wraps another filter's result and caches it.
CachingWrapperFilter(Filter) - Constructor for class org.apache.lucene.search.CachingWrapperFilter
New deletes are ignored by default, which gives higher cache hit rate on reopened readers.
CachingWrapperFilter(Filter, CachingWrapperFilter.DeletesMode) - Constructor for class org.apache.lucene.search.CachingWrapperFilter
Expert: by default, the cached filter will be shared across reopened segments that only had changes to their deletions.
CachingWrapperFilter.DeletesMode - Enum in org.apache.lucene.search
Expert: Specifies how new deletions against a reopened reader should be handled.
CachingWrapperFilterHelper - Class in org.apache.lucene.search
A unit test helper class to test when the filter is getting cached and when it is not.
CachingWrapperFilterHelper(Filter) - Constructor for class org.apache.lucene.search.CachingWrapperFilterHelper

calcBaseHashIndex(K) - Method in class org.apache.lucene.util.collections.ArrayHashMap
Calculating the baseHash index using the internal internal hashFactor.
calcBaseHashIndex(float) - Method in class org.apache.lucene.util.collections.FloatToObjectMap
Calculating the baseHash index using the internal hashFactor.
calcBaseHashIndex(int) - Method in class org.apache.lucene.util.collections.IntHashSet
Calculating the baseHash index using the internal hashFactor .
calcBaseHashIndex(int) - Method in class org.apache.lucene.util.collections.IntToDoubleMap
Calculating the baseHash index using the internal hashFactor .
calcBaseHashIndex(int) - Method in class org.apache.lucene.util.collections.IntToIntMap
Calculating the baseHash index using the internal hashFactor.
calcBaseHashIndex(int) - Method in class org.apache.lucene.util.collections.IntToObjectMap
Calculating the baseHash index using the internal hashFactor.
calcBaseHashIndex(K) - Method in class org.apache.lucene.util.collections.ObjectToFloatMap
Calculating the baseHash index using the internal hashFactor.
calcBaseHashIndex(K) - Method in class org.apache.lucene.util.collections.ObjectToIntMap
Calculating the baseHash index using the internal hashFactor.
calculateMidpoint(LatLng) - Method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
calculateMidpoint(LatLng) - Method in class org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.
calculateMidpoint(LatLng) - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated. Calculate the midpoint between this point an another.
calculateShingleWeight(Token, List<Token>, int, List<ShingleMatrixFilter.Matrix.Column.Row>, List<Token>) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated. Evaluates the new shingle token weight.
calibrateSizeByDeletes - Variable in class org.apache.lucene.index.LogMergePolicy

CannedTokenStream - Class in org.apache.lucene.analysis
TokenStream from a canned list of Tokens.
CannedTokenStream(Token...) - Constructor for class org.apache.lucene.analysis.CannedTokenStream

cantOpenSegments - Variable in class org.apache.lucene.index.CheckIndex.Status
True if we were unable to open the segments_N file.
capacity() - Method in class org.apache.lucene.analysis.compound.hyphenation.ByteVector
returns current capacity of array
capacity() - Method in class org.apache.lucene.analysis.compound.hyphenation.CharVector
returns current capacity of array
capacity() - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

capacity() - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap

capacity() - Method in class org.apache.lucene.util.OpenBitSet
Returns the current capacity in bits (1 greater than the index of the last bit)
capacityChars() - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Returns the current character capacity of the CategoryPath.
capacityComponents() - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Returns the current component capacity of the CategoryPath.
captureState() - Method in class org.apache.lucene.util.AttributeSource
Captures the state of all Attributes.
CARAT - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
CARAT - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
CARAT - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
cardinality() - Method in class org.apache.lucene.util.FixedBitSet
Returns number of set bits.
cardinality() - Method in class org.apache.lucene.util.OpenBitSet

CarmelTopKTermPruningPolicy - Class in org.apache.lucene.index.pruning
Pruning policy with a search quality parameterized guarantee - configuration of this policy allows to specify two parameters: k and ε such that:
CarmelTopKTermPruningPolicy(IndexReader, Map<String, Integer>) - Constructor for class org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy
Constructor with default parameters
CarmelTopKTermPruningPolicy(IndexReader, Map<String, Integer>, int, float, int, Similarity) - Constructor for class org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy
Constructor with specific settings
CarmelTopKTermPruningPolicy.ByDocComparator - Class in org.apache.lucene.index.pruning

CarmelTopKTermPruningPolicy.ByDocComparator() - Constructor for class org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy.ByDocComparator

CarmelUniformTermPruningPolicy - Class in org.apache.lucene.index.pruning
Enhanced implementation of Carmel Uniform Pruning,
CarmelUniformTermPruningPolicy(IndexReader, Map<String, Integer>, Map<String, Float>, float, Similarity) - Constructor for class org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy

CarmelUniformTermPruningPolicy.ByDocComparator - Class in org.apache.lucene.index.pruning

CarmelUniformTermPruningPolicy.ByDocComparator() - Constructor for class org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy.ByDocComparator

CartesianPoint - Class in org.apache.lucene.spatial.geometry
Deprecated.
CartesianPoint(int, int) - Constructor for class org.apache.lucene.spatial.geometry.CartesianPoint
Deprecated.
CartesianPolyFilterBuilder - Class in org.apache.lucene.spatial.tier
Deprecated.
CartesianPolyFilterBuilder(String, int, int) - Constructor for class org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder
Deprecated.
CartesianShapeFilter - Class in org.apache.lucene.spatial.tier
Deprecated.
CartesianTierPlotter - Class in org.apache.lucene.spatial.tier.projections
Deprecated.
CartesianTierPlotter(int, IProjector, String) - Constructor for class org.apache.lucene.spatial.tier.projections.CartesianTierPlotter
Deprecated.
CatalanAnalyzer - Class in org.apache.lucene.analysis.ca
Analyzer for Catalan.
CatalanAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.ca.CatalanAnalyzer
Builds an analyzer with the default stop words: CatalanAnalyzer.DEFAULT_STOPWORD_FILE.
CatalanAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.ca.CatalanAnalyzer
Builds an analyzer with the given stop words.
CatalanAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.ca.CatalanAnalyzer
Builds an analyzer with the given stop words.
CatalanStemmer - Class in org.tartarus.snowball.ext
This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.
CatalanStemmer() - Constructor for class org.tartarus.snowball.ext.CatalanStemmer

categoriesMap - Variable in class org.apache.lucene.facet.index.CategoryDocumentBuilder

CATEGORY - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

CATEGORY_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

CategoryAttribute - Interface in org.apache.lucene.facet.index.attributes
An attribute which contains for a certain category the CategoryPath and additional properties.
categoryAttribute - Variable in class org.apache.lucene.facet.index.streaming.CategoryAttributesStream

categoryAttribute - Variable in class org.apache.lucene.facet.index.streaming.CategoryParentsStream
An attribute containing all data related to the category
categoryAttribute - Variable in class org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
The stream's category attributes.
CategoryAttributeImpl - Class in org.apache.lucene.facet.index.attributes
An implementation of CategoryAttribute.
CategoryAttributeImpl() - Constructor for class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl
Construct an empty CategoryAttributeImpl.
CategoryAttributeImpl(CategoryPath) - Constructor for class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl
Construct a CategoryAttributeImpl with the given CategoryPath.
CategoryAttributesIterable - Class in org.apache.lucene.facet.index.attributes
This class transforms an Iterable of CategoryPath objects into an Iterable of CategoryAttribute objects, which can be used to construct a CategoryAttributesStream.
CategoryAttributesIterable(Iterable<CategoryPath>) - Constructor for class org.apache.lucene.facet.index.attributes.CategoryAttributesIterable

CategoryAttributesStream - Class in org.apache.lucene.facet.index.streaming
An attribute stream built from an Iterable of CategoryAttribute.
CategoryAttributesStream(Iterable<CategoryAttribute>) - Constructor for class org.apache.lucene.facet.index.streaming.CategoryAttributesStream
Constructor
CategoryContainer - Class in org.apache.lucene.facet.index
A container to add categories which are to be introduced to CategoryDocumentBuilder.setCategories(Iterable).
CategoryContainer() - Constructor for class org.apache.lucene.facet.index.CategoryContainer
Constructor.
CategoryDocumentBuilder - Class in org.apache.lucene.facet.index
A utility class which allows attachment of CategoryPaths or CategoryAttributes to a given document using a taxonomy.
Construction could be done with either a given FacetIndexingParams or the default implementation DefaultFacetIndexingParams.
A CategoryDocumentBuilder can be reused by repeatedly setting the categories and building the document.
CategoryDocumentBuilder(TaxonomyWriter) - Constructor for class org.apache.lucene.facet.index.CategoryDocumentBuilder
Creating a facets document builder with default facet indexing parameters.
See: CategoryDocumentBuilder.CategoryDocumentBuilder(TaxonomyWriter, FacetIndexingParams)
CategoryDocumentBuilder(TaxonomyWriter, FacetIndexingParams) - Constructor for class org.apache.lucene.facet.index.CategoryDocumentBuilder
Creating a facets document builder with a given facet indexing parameters object.

CategoryEnhancement - Interface in org.apache.lucene.facet.enhancements
This interface allows easy addition of enhanced category features.
CategoryListCache - Class in org.apache.lucene.facet.search.cache
Cache for CategoryListData, per CategoryListParams.
CategoryListCache() - Constructor for class org.apache.lucene.facet.search.cache.CategoryListCache

CategoryListData - Class in org.apache.lucene.facet.search.cache
Category list data maintained in RAM.
CategoryListData() - Constructor for class org.apache.lucene.facet.search.cache.CategoryListData
Empty constructor for extensions with modified computation of the data.
CategoryListIterator - Interface in org.apache.lucene.facet.search
An interface for iterating over a "category list", i.e., the list of categories per document.
CategoryListParams - Class in org.apache.lucene.facet.index.params
Contains parameters for a category list *
CategoryListParams() - Constructor for class org.apache.lucene.facet.index.params.CategoryListParams
Constructs a default category list parameters object, using CategoryListParams.DEFAULT_TERM.
CategoryListParams(Term) - Constructor for class org.apache.lucene.facet.index.params.CategoryListParams
Constructs a category list parameters object, using the given Term.
CategoryListPayloadStream - Class in org.apache.lucene.facet.index
Accumulates category IDs for a single document, for writing in byte array form, for example, to a Lucene Payload.
CategoryListPayloadStream(IntEncoder) - Constructor for class org.apache.lucene.facet.index.CategoryListPayloadStream
Creates a Payload stream using the specified encoder.
CategoryListTokenizer - Class in org.apache.lucene.facet.index.streaming
A base class for category list tokenizers, which add category list tokens to category streams.
CategoryListTokenizer(TokenStream, FacetIndexingParams) - Constructor for class org.apache.lucene.facet.index.streaming.CategoryListTokenizer

CategoryParentsStream - Class in org.apache.lucene.facet.index.streaming
This class adds parents to a CategoryAttributesStream.
CategoryParentsStream(CategoryAttributesStream, TaxonomyWriter, FacetIndexingParams) - Constructor for class org.apache.lucene.facet.index.streaming.CategoryParentsStream
Constructor.
categoryPath - Variable in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl
The category path instance.
CategoryPath - Class in org.apache.lucene.facet.taxonomy
A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.
CategoryPath(int, int) - Constructor for class org.apache.lucene.facet.taxonomy.CategoryPath
Construct a new empty CategoryPath object.
CategoryPath() - Constructor for class org.apache.lucene.facet.taxonomy.CategoryPath
Create an empty CategoryPath object.
CategoryPath(String, char) - Constructor for class org.apache.lucene.facet.taxonomy.CategoryPath
Construct a new CategoryPath object, given a single string with components separated by a given delimiter character.
CategoryPath(CharSequence...) - Constructor for class org.apache.lucene.facet.taxonomy.CategoryPath
Construct a new CategoryPath object, copying an existing path given as an array of strings.
CategoryPath(CategoryPath) - Constructor for class org.apache.lucene.facet.taxonomy.CategoryPath
Construct a new CategoryPath object, copying the path given in an existing CategoryPath object.
CategoryPath(CategoryPath, int) - Constructor for class org.apache.lucene.facet.taxonomy.CategoryPath
Construct a new CategoryPath object, copying a prefix with the given number of components of the path given in an existing CategoryPath object.
CategoryProperty - Interface in org.apache.lucene.facet.index.attributes
Property that can be added to CategoryAttributes during indexing.
CategoryTokenizer - Class in org.apache.lucene.facet.index.streaming
Basic class for setting the CharTermAttributes and PayloadAttributes of category tokens.
CategoryTokenizer(TokenStream, FacetIndexingParams) - Constructor for class org.apache.lucene.facet.index.streaming.CategoryTokenizer

CategoryTokenizerBase - Class in org.apache.lucene.facet.index.streaming
A base class for all token filters which add term and payload attributes to tokens and are to be used in CategoryDocumentBuilder.
CategoryTokenizerBase(TokenStream, FacetIndexingParams) - Constructor for class org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
Constructor.
centroid() - Method in class org.apache.lucene.spatial.geometry.shape.Ellipse
Deprecated.
centroid() - Method in interface org.apache.lucene.spatial.geometry.shape.Geometry2D
Deprecated. Return the centroid
centroid() - Method in class org.apache.lucene.spatial.geometry.shape.Rectangle
Deprecated.
ChainedFilter - Class in org.apache.lucene.search
Allows multiple Filters to be chained.
ChainedFilter(Filter[]) - Constructor for class org.apache.lucene.search.ChainedFilter
Ctor.
ChainedFilter(Filter[], int[]) - Constructor for class org.apache.lucene.search.ChainedFilter
Ctor.
ChainedFilter(Filter[], int) - Constructor for class org.apache.lucene.search.ChainedFilter
Ctor.
changed() - Method in class org.apache.lucene.index.SegmentInfos
Call this before committing if changes have been made to the segments.
CharacterDefinition - Class in org.apache.lucene.analysis.ja.dict
Character category data.
characters(char[], int, int) - Method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser

CharacterUtils - Class in org.apache.lucene.util
CharacterUtils provides a unified interface to Character-related operations to implement backwards compatible character operations based on a Version instance.
CharacterUtils() - Constructor for class org.apache.lucene.util.CharacterUtils

CharacterUtils.CharacterBuffer - Class in org.apache.lucene.util
A simple IO buffer to use with CharacterUtils.fill(CharacterBuffer, Reader).
charArray - Variable in class org.apache.lucene.analysis.cn.smart.hhmm.SegToken
Character array containing token text
CharArrayIterator - Class in org.apache.lucene.analysis.util
A CharacterIterator used internally for use with BreakIterator
CharArrayIterator() - Constructor for class org.apache.lucene.analysis.util.CharArrayIterator

CharArrayMap<V> - Class in org.apache.lucene.analysis
A simple class that stores key Strings as char[]'s in a hash table.
CharArrayMap(Version, int, boolean) - Constructor for class org.apache.lucene.analysis.CharArrayMap
Create map with enough capacity to hold startSize terms
CharArrayMap(Version, Map<?, ? extends V>, boolean) - Constructor for class org.apache.lucene.analysis.CharArrayMap
Creates a map from the mappings in another map.
CharArrayMap.EntryIterator - Class in org.apache.lucene.analysis
public iterator class so efficient methods are exposed to users
CharArrayMap.EntrySet - Class in org.apache.lucene.analysis
public EntrySet class so efficient methods are exposed to users
CharArraySet - Class in org.apache.lucene.analysis
A simple class that stores Strings as char[]'s in a hash table.
CharArraySet(Version, int, boolean) - Constructor for class org.apache.lucene.analysis.CharArraySet
Create set with enough capacity to hold startSize terms
CharArraySet(Version, Collection<?>, boolean) - Constructor for class org.apache.lucene.analysis.CharArraySet
Creates a set from a Collection of objects.
CharArraySet(int, boolean) - Constructor for class org.apache.lucene.analysis.CharArraySet
Deprecated. use CharArraySet.CharArraySet(Version, int, boolean) instead
CharArraySet(Collection<?>, boolean) - Constructor for class org.apache.lucene.analysis.CharArraySet
Deprecated. use CharArraySet.CharArraySet(Version, Collection, boolean) instead
CharArraySet.CharArraySetIterator - Class in org.apache.lucene.analysis
Deprecated. Use the standard iterator, which returns char[] instances.
charAt(int) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

charAt(int) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

charAt(int) - Method in class org.apache.lucene.queryParser.core.util.UnescapedCharSequence

charAt(int) - Method in class org.apache.lucene.util.CharsRef

CharFilter - Class in org.apache.lucene.analysis
Subclasses of CharFilter can be chained to filter CharStream.
CharFilter(CharStream) - Constructor for class org.apache.lucene.analysis.CharFilter

CharReader - Class in org.apache.lucene.analysis
CharReader is a Reader wrapper.
chars - Variable in class org.apache.lucene.facet.taxonomy.CategoryPath

chars - Variable in class org.apache.lucene.util.CharsRef

charsEquals(CharsRef) - Method in class org.apache.lucene.util.CharsRef

CHARSEQUENCE_COMPARATOR - Static variable in class org.apache.lucene.search.suggest.Lookup
A simple char-by-char comparator for CharSequence
charset - Variable in class org.apache.lucene.analysis.payloads.IdentityEncoder

CHARSET_UTF_8 - Static variable in class org.apache.lucene.util.IOUtils
UTF-8 Charset instance to prevent repeated Charset.forName(String) lookups
charsetName - Variable in class org.apache.lucene.analysis.payloads.IdentityEncoder
Deprecated. This field is no longer used. Use IdentityEncoder.charset instead.
charsNeededForFullPath() - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Returns the number of characters required to represent this entire category path, if written using CategoryPath.copyToCharArray(char[], int, int, char) or CategoryPath.appendTo(Appendable, char).
CharsRef - Class in org.apache.lucene.util
Represents char[], as a slice (offset + length) into an existing char[].
CharsRef() - Constructor for class org.apache.lucene.util.CharsRef
Creates a new CharsRef initialized an empty array zero-length
CharsRef(int) - Constructor for class org.apache.lucene.util.CharsRef
Creates a new CharsRef initialized with an array of the given capacity
CharsRef(char[], int, int) - Constructor for class org.apache.lucene.util.CharsRef
Creates a new CharsRef initialized with the given array, offset and length
CharsRef(String) - Constructor for class org.apache.lucene.util.CharsRef
Creates a new CharsRef initialized with the given Strings character array
CharStream - Class in org.apache.lucene.analysis
CharStream adds CharStream.correctOffset(int) functionality over Reader.
CharStream() - Constructor for class org.apache.lucene.analysis.CharStream

CharStream - Interface in org.apache.lucene.queryParser
This interface describes a character stream that maintains line and column number positions of the characters.
CharStream - Interface in org.apache.lucene.queryParser.surround.parser
This interface describes a character stream that maintains line and column number positions of the characters.
CharTermAttribute - Interface in org.apache.lucene.analysis.tokenattributes
The term text of a Token.
CharTermAttributeImpl - Class in org.apache.lucene.analysis.tokenattributes
The term text of a Token.
CharTermAttributeImpl() - Constructor for class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

CharTokenizer - Class in org.apache.lucene.analysis
An abstract base class for simple, character-oriented tokenizers.
CharTokenizer(Version, Reader) - Constructor for class org.apache.lucene.analysis.CharTokenizer
Creates a new CharTokenizer instance
CharTokenizer(Version, AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.CharTokenizer
Creates a new CharTokenizer instance
CharTokenizer(Version, AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.CharTokenizer
Creates a new CharTokenizer instance
CharTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.CharTokenizer
Deprecated. use CharTokenizer.CharTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
CharTokenizer(AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.CharTokenizer
Deprecated. use CharTokenizer.CharTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
CharTokenizer(AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.CharTokenizer
Deprecated. use CharTokenizer.CharTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
CharType - Class in org.apache.lucene.analysis.cn.smart
Internal SmartChineseAnalyzer character type constants.
CharType() - Constructor for class org.apache.lucene.analysis.cn.smart.CharType

CharVector - Class in org.apache.lucene.analysis.compound.hyphenation
This class implements a simple char vector with access to the underlying array.
CharVector() - Constructor for class org.apache.lucene.analysis.compound.hyphenation.CharVector

CharVector(int) - Constructor for class org.apache.lucene.analysis.compound.hyphenation.CharVector

CharVector(char[]) - Constructor for class org.apache.lucene.analysis.compound.hyphenation.CharVector

CharVector(char[], int) - Constructor for class org.apache.lucene.analysis.compound.hyphenation.CharVector

check(Query) - Static method in class org.apache.lucene.search.QueryUtils
Check the types of things query objects should be able to do.
check(Random, Query, Searcher) - Static method in class org.apache.lucene.search.QueryUtils
Various query sanity checks on a searcher, some checks are only done for instanceof IndexSearcher.
check(Random, Query, Searcher, boolean) - Static method in class org.apache.lucene.search.QueryUtils

check(FieldCache.CacheEntry...) - Method in class org.apache.lucene.util.FieldCacheSanityChecker
Tests a CacheEntry[] for indication of "insane" cache usage.
checkAnalysisConsistency(Random, Analyzer, boolean, String) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

checkAnalysisConsistency(Random, Analyzer, boolean, String, boolean) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

checkCondition(CharSequence) - Method in class org.apache.lucene.analysis.hunspell.HunspellAffix
Checks whether the given text matches the conditional pattern on this affix
checkDistanceSubQueries(DistanceQuery, String) - Static method in class org.apache.lucene.queryParser.surround.parser.QueryParser

checkDocIds(String, int[], ScoreDoc[]) - Static method in class org.apache.lucene.search.CheckHits
Tests that a Hits has an expected order of documents
checkEqual(Query, ScoreDoc[], ScoreDoc[]) - Static method in class org.apache.lucene.search.CheckHits

checkEqual(Query, Query) - Static method in class org.apache.lucene.search.QueryUtils

checkExplanations(Query, String, Searcher) - Static method in class org.apache.lucene.search.CheckHits
Asserts that the explanation value for every document matching a query corresponds with the true score.
checkExplanations(Query, String, Searcher, boolean) - Static method in class org.apache.lucene.search.CheckHits
Asserts that the explanation value for every document matching a query corresponds with the true score.
checkExplanations(Query) - Method in class org.apache.lucene.search.CheckHits.ExplanationAssertingSearcher

checkExplanations(Query, Searcher) - Static method in class org.apache.lucene.search.QueryUtils
deep check that explanations of a query 'score' correctly
checkHashEquals(Query) - Static method in class org.apache.lucene.search.QueryUtils
check very basic hashCode and equals
checkHeader(DataInput, String, int, int) - Static method in class org.apache.lucene.util.CodecUtil

checkHitCollector(Random, Query, String, Searcher, int[]) - Static method in class org.apache.lucene.search.CheckHits
Tests that a query matches the an expected set of documents using a HitCollector.
CheckHits - Class in org.apache.lucene.search
Utility class for asserting expected hits in tests.
CheckHits() - Constructor for class org.apache.lucene.search.CheckHits

checkHits(Random, Query, String, Searcher, int[]) - Static method in class org.apache.lucene.search.CheckHits
Tests that a query matches the an expected set of documents using Hits.
CheckHits.ExplanationAsserter - Class in org.apache.lucene.search
Asserts that the score explanation for every document matching a query corresponds with the true score.
CheckHits.ExplanationAsserter(Query, String, Searcher) - Constructor for class org.apache.lucene.search.CheckHits.ExplanationAsserter
Constructs an instance which does shallow tests on the Explanation
CheckHits.ExplanationAsserter(Query, String, Searcher, boolean) - Constructor for class org.apache.lucene.search.CheckHits.ExplanationAsserter

CheckHits.ExplanationAssertingSearcher - Class in org.apache.lucene.search
an IndexSearcher that implicitly checks hte explanation of every match whenever it executes a search.
CheckHits.ExplanationAssertingSearcher(IndexReader) - Constructor for class org.apache.lucene.search.CheckHits.ExplanationAssertingSearcher

CheckHits.SetCollector - Class in org.apache.lucene.search
Just collects document ids into a set.
CheckHits.SetCollector(Set<Integer>) - Constructor for class org.apache.lucene.search.CheckHits.SetCollector

checkHitsQuery(Query, ScoreDoc[], ScoreDoc[], int[]) - Static method in class org.apache.lucene.search.CheckHits
Tests that two queries have an expected order of documents, and that the two queries have the same score values.
CheckIndex - Class in org.apache.lucene.index
Basic tool and API to check the health of an index and write a new segments file that removes reference to problematic segments.
CheckIndex(Directory) - Constructor for class org.apache.lucene.index.CheckIndex
Create a new CheckIndex on the directory.
checkIndex() - Method in class org.apache.lucene.index.CheckIndex
Returns a CheckIndex.Status instance detailing the state of the index.
checkIndex(List<String>) - Method in class org.apache.lucene.index.CheckIndex
Returns a CheckIndex.Status instance detailing the state of the index.
checkIndex(Directory) - Static method in class org.apache.lucene.util._TestUtil
This runs the CheckIndex tool on the index in.
CheckIndex.Status - Class in org.apache.lucene.index
Returned from CheckIndex.checkIndex() detailing the health and status of the index.
CheckIndex.Status() - Constructor for class org.apache.lucene.index.CheckIndex.Status

CheckIndex.Status.FieldNormStatus - Class in org.apache.lucene.index
Status from testing field norms.
CheckIndex.Status.FieldNormStatus() - Constructor for class org.apache.lucene.index.CheckIndex.Status.FieldNormStatus

CheckIndex.Status.SegmentInfoStatus - Class in org.apache.lucene.index
Holds the status of each segment in the index.
CheckIndex.Status.SegmentInfoStatus() - Constructor for class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus

CheckIndex.Status.StoredFieldStatus - Class in org.apache.lucene.index
Status from testing stored fields.
CheckIndex.Status.StoredFieldStatus() - Constructor for class org.apache.lucene.index.CheckIndex.Status.StoredFieldStatus

CheckIndex.Status.TermIndexStatus - Class in org.apache.lucene.index
Status from testing term index.
CheckIndex.Status.TermIndexStatus() - Constructor for class org.apache.lucene.index.CheckIndex.Status.TermIndexStatus

CheckIndex.Status.TermVectorStatus - Class in org.apache.lucene.index
Status from testing stored fields.
CheckIndex.Status.TermVectorStatus() - Constructor for class org.apache.lucene.index.CheckIndex.Status.TermVectorStatus

checkNoMatchExplanations(Query, String, Searcher, int[]) - Static method in class org.apache.lucene.search.CheckHits
Tests that all documents up to maxDoc which are *not* in the expected result set, have an explanation which indicates that the document does not match
checkOneTerm(Analyzer, String, String) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

checkOneTermReuse(Analyzer, String, String) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

checkPosition(int) - Method in class org.apache.lucene.search.highlight.WeightedSpanTerm
Checks to see if this term is valid at position.
checkRandomData(Random, Analyzer, int) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase
utility method for blasting tokenstreams with data to make sure they don't do anything crazy
checkRandomData(Random, Analyzer, int, int) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase
utility method for blasting tokenstreams with data to make sure they don't do anything crazy
checkRandomData(Random, Analyzer, int, boolean) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase
utility method for blasting tokenstreams with data to make sure they don't do anything crazy
checkRandomData(Random, Analyzer, int, int, boolean) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

checkRandomData(Random, Analyzer, int, int, boolean, boolean) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

checkSanity(FieldCache) - Static method in class org.apache.lucene.util.FieldCacheSanityChecker
Quick and dirty convenience method
checkSanity(FieldCache.CacheEntry...) - Static method in class org.apache.lucene.util.FieldCacheSanityChecker
Quick and dirty convenience method that instantiates an instance with "good defaults" and uses it to test the CacheEntrys
checkSkipTo(Query, IndexSearcher) - Static method in class org.apache.lucene.search.QueryUtils
alternate scorer skipTo(),skipTo(),next(),next(),skipTo(),skipTo(), etc and ensure a hitcollector receives same docs and scores
checkSnapshotted(String) - Method in class org.apache.lucene.index.SnapshotDeletionPolicy
Checks if the given id is already used by another snapshot, and throws IllegalStateException if it is.
ChecksumIndexInput - Class in org.apache.lucene.store
Writes bytes through to a primary IndexOutput, computing checksum as it goes.
ChecksumIndexInput(IndexInput) - Constructor for class org.apache.lucene.store.ChecksumIndexInput

ChecksumIndexOutput - Class in org.apache.lucene.store
Writes bytes through to a primary IndexOutput, computing checksum.
ChecksumIndexOutput(IndexOutput) - Constructor for class org.apache.lucene.store.ChecksumIndexOutput

checkUnequal(Query, Query) - Static method in class org.apache.lucene.search.QueryUtils

CHINESE_WORD - Static variable in class org.apache.lucene.analysis.cn.smart.WordType
Chinese Word
ChineseAnalyzer - Class in org.apache.lucene.analysis.cn
Deprecated. Use StandardAnalyzer instead, which has the same functionality. This analyzer will be removed in Lucene 5.0
ChineseAnalyzer() - Constructor for class org.apache.lucene.analysis.cn.ChineseAnalyzer
Deprecated.
ChineseFilter - Class in org.apache.lucene.analysis.cn
Deprecated. Use StopFilter instead, which has the same functionality. This filter will be removed in Lucene 5.0
ChineseFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.cn.ChineseFilter
Deprecated.
ChineseTokenizer - Class in org.apache.lucene.analysis.cn
Deprecated. Use StandardTokenizer instead, which has the same functionality. This filter will be removed in Lucene 5.0
ChineseTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.cn.ChineseTokenizer
Deprecated.
ChineseTokenizer(AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.cn.ChineseTokenizer
Deprecated.
ChineseTokenizer(AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.cn.ChineseTokenizer
Deprecated.
ChunksIntEncoder - Class in org.apache.lucene.util.encoding
An IntEncoder which encodes values in chunks.
ChunksIntEncoder(int) - Constructor for class org.apache.lucene.util.encoding.ChunksIntEncoder

chunkSize - Variable in class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput

CITATION - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

CITATION_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

CJ - Static variable in class org.apache.lucene.analysis.standard.ClassicTokenizer

CJ - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizer
Deprecated.
CJ_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

CJKAnalyzer - Class in org.apache.lucene.analysis.cjk
An Analyzer that tokenizes text with StandardTokenizer, normalizes content with CJKWidthFilter, folds case with LowerCaseFilter, forms bigrams of CJK with CJKBigramFilter, and filters stopwords with StopFilter
CJKAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.cjk.CJKAnalyzer
Builds an analyzer which removes words in CJKAnalyzer.getDefaultStopSet().
CJKAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.cjk.CJKAnalyzer
Builds an analyzer with the given stop words
CJKAnalyzer(Version, String...) - Constructor for class org.apache.lucene.analysis.cjk.CJKAnalyzer
Deprecated. use CJKAnalyzer.CJKAnalyzer(Version, Set) instead
CJKBigramFilter - Class in org.apache.lucene.analysis.cjk
Forms bigrams of CJK terms that are generated from StandardTokenizer or ICUTokenizer.
CJKBigramFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.cjk.CJKBigramFilter
Calls CJKBigramFilter(HAN | HIRAGANA | KATAKANA | HANGUL)
CJKBigramFilter(TokenStream, int) - Constructor for class org.apache.lucene.analysis.cjk.CJKBigramFilter
Create a new CJKBigramFilter, specifying which writing systems should be bigrammed.
CJKTokenizer - Class in org.apache.lucene.analysis.cjk
Deprecated. Use StandardTokenizer, CJKWidthFilter, CJKBigramFilter, and LowerCaseFilter instead.
CJKTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.cjk.CJKTokenizer
Deprecated. Construct a token stream processing the given input.
CJKTokenizer(AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.cjk.CJKTokenizer
Deprecated.
CJKTokenizer(AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.cjk.CJKTokenizer
Deprecated.
CJKWidthFilter - Class in org.apache.lucene.analysis.cjk
A TokenFilter that normalizes CJK width differences: Folds fullwidth ASCII variants into the equivalent basic latin Folds halfwidth Katakana variants into the equivalent kana
CJKWidthFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.cjk.CJKWidthFilter

Cl2oTaxonomyWriterCache - Class in org.apache.lucene.facet.taxonomy.writercache.cl2o
TaxonomyWriterCache using CompactLabelToOrdinal.
Cl2oTaxonomyWriterCache(int, float, int) - Constructor for class org.apache.lucene.facet.taxonomy.writercache.cl2o.Cl2oTaxonomyWriterCache

CLASS_COUNT - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

ClassicAnalyzer - Class in org.apache.lucene.analysis.standard
Filters ClassicTokenizer with ClassicFilter, LowerCaseFilter and StopFilter, using a list of English stop words.
ClassicAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.standard.ClassicAnalyzer
Builds an analyzer with the given stop words.
ClassicAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.standard.ClassicAnalyzer
Builds an analyzer with the default stop words (ClassicAnalyzer.STOP_WORDS_SET).
ClassicAnalyzer(Version, File) - Constructor for class org.apache.lucene.analysis.standard.ClassicAnalyzer
Deprecated. Use ClassicAnalyzer.ClassicAnalyzer(Version, Reader) instead.
ClassicAnalyzer(Version, Reader) - Constructor for class org.apache.lucene.analysis.standard.ClassicAnalyzer
Builds an analyzer with the stop words from the given reader.
ClassicFilter - Class in org.apache.lucene.analysis.standard
Normalizes tokens extracted with ClassicTokenizer.
ClassicFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.standard.ClassicFilter
Construct filtering in.
ClassicTokenizer - Class in org.apache.lucene.analysis.standard
A grammar-based tokenizer constructed with JFlex
ClassicTokenizer(Version, Reader) - Constructor for class org.apache.lucene.analysis.standard.ClassicTokenizer
Creates a new instance of the ClassicTokenizer.
ClassicTokenizer(Version, AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.standard.ClassicTokenizer
Creates a new ClassicTokenizer with a given AttributeSource.
ClassicTokenizer(Version, AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.standard.ClassicTokenizer
Creates a new ClassicTokenizer with a given AttributeSource.AttributeFactory
classmap - Variable in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree
This map stores the character classes
classRules - Static variable in class org.apache.lucene.util.LuceneTestCase
This controls how suite-level rules are nested.
Clause(String) - Method in class org.apache.lucene.queryParser.QueryParser

Clause(CharSequence) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser

clauses() - Method in class org.apache.lucene.search.BooleanFilter
Returns the list of clauses
clauses() - Method in class org.apache.lucene.search.BooleanQuery
Returns the list of clauses in this query.
clauses - Variable in class org.apache.lucene.search.spans.SpanNearQuery

clean - Variable in class org.apache.lucene.index.CheckIndex.Status
True if no problems were found with the index.
cleanSleepTime - Variable in class org.apache.lucene.search.FilterManager
Deprecated. Cache cleaning frequency
cleanUp() - Method in class org.apache.lucene.spatial.tier.DistanceFieldComparatorSource
Deprecated.
clear() - Method in class org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl

clear() - Method in class org.apache.lucene.analysis.CharArrayMap
Clears all entries in this map.
clear() - Method in class org.apache.lucene.analysis.CharArrayMap.EntrySet

clear() - Method in class org.apache.lucene.analysis.CharArraySet
Clears all entries in this set.
clear() - Method in class org.apache.lucene.analysis.compound.hyphenation.CharVector
Reset Vector but don't resize or clear elements
clear() - Method in class org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl

clear() - Method in class org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttributeImpl

clear() - Method in class org.apache.lucene.analysis.ja.tokenattributes.InflectionAttributeImpl

clear() - Method in class org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttributeImpl

clear() - Method in class org.apache.lucene.analysis.ja.tokenattributes.ReadingAttributeImpl

clear() - Method in class org.apache.lucene.analysis.Token
Resets the term text, payload, flags, and positionIncrement, startOffset, endOffset and token type to default.
clear() - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

clear() - Method in class org.apache.lucene.analysis.tokenattributes.FlagsAttributeImpl

clear() - Method in class org.apache.lucene.analysis.tokenattributes.KeywordAttributeImpl

clear() - Method in class org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl

clear() - Method in class org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl

clear() - Method in class org.apache.lucene.analysis.tokenattributes.PositionIncrementAttributeImpl

clear() - Method in class org.apache.lucene.analysis.tokenattributes.PositionLengthAttributeImpl

clear() - Method in class org.apache.lucene.analysis.tokenattributes.TypeAttributeImpl

clear() - Method in class org.apache.lucene.benchmark.byTask.feeds.DocData

clear() - Method in interface org.apache.lucene.facet.index.attributes.CategoryAttribute
Resets this attribute to its initial value: a null category path and no properties.
clear() - Method in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

clear() - Method in class org.apache.lucene.facet.index.attributes.OrdinalProperty

clear() - Method in class org.apache.lucene.facet.index.CategoryContainer
Remove all categories.
clear(float[]) - Method in class org.apache.lucene.facet.search.FloatArrayAllocator

clear() - Method in interface org.apache.lucene.facet.search.Heap
Clear the heap
clear(int[]) - Method in class org.apache.lucene.facet.search.IntArrayAllocator

clear(T) - Method in class org.apache.lucene.facet.search.TemporaryObjectAllocator
Subclasses must override this method to clear an existing object of the desired type, to prepare it for reuse.
clear() - Method in class org.apache.lucene.facet.search.TotalFacetCountsCache
Clear the cache.
clear() - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Empty the CategoryPath object, so that it has zero components.
clear() - Method in class org.apache.lucene.index.SegmentInfos

clear() - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

clear() - Method in class org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl
Deprecated.
clear() - Method in class org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl
Deprecated.
clear() - Method in class org.apache.lucene.queryParser.standard.config.BoostAttributeImpl
Deprecated.
clear() - Method in class org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl
Deprecated.
clear() - Method in class org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl
Deprecated.
clear() - Method in class org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl
Deprecated.
clear() - Method in class org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl
Deprecated.
clear() - Method in class org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl
Deprecated.
clear() - Method in class org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl
Deprecated.
clear() - Method in class org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl
Deprecated.
clear() - Method in class org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl
Deprecated.
clear() - Method in class org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl
Deprecated.
clear() - Method in class org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl
Deprecated.
clear() - Method in class org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl
Deprecated.
clear() - Method in class org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl
Deprecated.
clear() - Method in class org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory

clear() - Method in class org.apache.lucene.search.grouping.SentinelIntSet

clear() - Method in class org.apache.lucene.search.suggest.BytesRefList
Clears this BytesRefList
clear() - Method in class org.apache.lucene.util.AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value.
clear(int) - Method in class org.apache.lucene.util.BitVector
Sets the value of bit to zero.
clear() - Method in class org.apache.lucene.util.BytesRefHash.BytesStartArray
clears the BytesRefHash.BytesStartArray and returns the cleared instance.
clear(boolean) - Method in class org.apache.lucene.util.BytesRefHash
Clears the BytesRef which maps to the given BytesRef
clear() - Method in class org.apache.lucene.util.BytesRefHash

clear() - Method in class org.apache.lucene.util.BytesRefHash.DirectBytesStartArray

clear() - Method in class org.apache.lucene.util.BytesRefHash.TrackingDirectBytesStartArray

clear() - Method in class org.apache.lucene.util.collections.ArrayHashMap
Empties the map.
clear() - Method in class org.apache.lucene.util.collections.FloatToObjectMap
Empties the map.
clear(boolean) - Method in class org.apache.lucene.util.collections.IntArray
Clear the IntArray (set all elements to zero).
clear() - Method in class org.apache.lucene.util.collections.IntHashSet
Empties the map.
clear() - Method in class org.apache.lucene.util.collections.IntToDoubleMap
Empties the map.
clear() - Method in class org.apache.lucene.util.collections.IntToIntMap
Empties the map.
clear() - Method in class org.apache.lucene.util.collections.IntToObjectMap
Empties the map.
clear() - Method in class org.apache.lucene.util.collections.ObjectToFloatMap
Empties the map.
clear() - Method in class org.apache.lucene.util.collections.ObjectToIntMap
Empties the map.
clear(int) - Method in class org.apache.lucene.util.FixedBitSet

clear(int, int) - Method in class org.apache.lucene.util.FixedBitSet
Clears a range of bits.
clear() - Method in class org.apache.lucene.util.fst.Builder.UnCompiledNode

clear() - Method in class org.apache.lucene.util.MapBackedSet

clear(long) - Method in class org.apache.lucene.util.OpenBitSet
clears a bit, allowing access beyond the current set size without changing the size.
clear(int, int) - Method in class org.apache.lucene.util.OpenBitSet
Clears a range of bits.
clear(long, long) - Method in class org.apache.lucene.util.OpenBitSet
Clears a range of bits.
clear() - Method in class org.apache.lucene.util.packed.GrowableWriter

clear() - Method in interface org.apache.lucene.util.packed.PackedInts.Mutable
Sets all values to 0.
clear() - Method in class org.apache.lucene.util.PriorityQueue
Removes all entries from the PriorityQueue.
clear() - Method in class org.apache.lucene.util.ScorerDocQueue
Removes all entries from the ScorerDocQueue.
clear() - Method in class org.apache.lucene.util.WeakIdentityMap

clearAttributes() - Method in class org.apache.lucene.util.AttributeSource
Resets all Attributes in this AttributeSource by calling AttributeImpl.clear() on each Attribute implementation.
clearCategoryProperties() - Method in class org.apache.lucene.facet.index.streaming.CategoryParentsStream
Clear the properties of the current CategoryAttribute attribute before setting the parent attributes.
clearCrash() - Method in class org.apache.lucene.store.MockDirectoryWrapper

clearData() - Method in class org.apache.lucene.benchmark.byTask.stats.Points
Clear all data, prepare for more tests.
clearDoFail() - Method in class org.apache.lucene.store.MockDirectoryWrapper.Failure

clearIndex() - Method in class org.apache.lucene.search.spell.SpellChecker
Removes all terms from the spell check index.
clearLock(String) - Method in class org.apache.lucene.store.Directory
Attempt to clear (forcefully unlock and remove) the specified lock.
clearLock(String) - Method in class org.apache.lucene.store.LockFactory
Attempt to clear (forcefully unlock and remove) the specified lock.
clearLock(String) - Method in class org.apache.lucene.store.MockDirectoryWrapper

clearLock(String) - Method in class org.apache.lucene.store.MockLockFactoryWrapper

clearLock(String) - Method in class org.apache.lucene.store.NativeFSLockFactory

clearLock(String) - Method in class org.apache.lucene.store.NoLockFactory

clearLock(String) - Method in class org.apache.lucene.store.NRTCachingDirectory

clearLock(String) - Method in class org.apache.lucene.store.SimpleFSLockFactory

clearLock(String) - Method in class org.apache.lucene.store.SingleInstanceLockFactory

clearLock(String) - Method in class org.apache.lucene.store.VerifyingLockFactory

clearProperties() - Method in interface org.apache.lucene.facet.index.attributes.CategoryAttribute
Clear all properties.
clearProperties() - Method in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

ClearStatsTask - Class in org.apache.lucene.benchmark.byTask.tasks
Clear statistics data.
ClearStatsTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.ClearStatsTask

clearTotalNumberOfTerms() - Method in class org.apache.lucene.search.MultiTermQuery
Deprecated. Don't use this method, as its not thread safe and useless.
clearTotalNumberOfTerms() - Method in class org.apache.lucene.search.MultiTermQueryWrapperFilter
Deprecated. Don't use this method, as its not thread safe and useless.
clearUnhandledExceptions() - Static method in class org.apache.lucene.index.ConcurrentMergeScheduler

clnName - Variable in class org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask

clone() - Method in class org.apache.lucene.analysis.compound.hyphenation.CharVector

clone() - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

clone() - Method in class org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator
Clone method.
clone() - Method in class org.apache.lucene.analysis.Token

clone(char[], int, int, int, int) - Method in class org.apache.lucene.analysis.Token
Makes a clone, but replaces the term buffer & start/end offset in the process.
clone() - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

clone() - Method in class org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl

clone() - Method in class org.apache.lucene.analysis.util.CharArrayIterator

clone() - Method in class org.apache.lucene.benchmark.byTask.stats.TaskStats

clone() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

clone() - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

clone() - Method in interface org.apache.lucene.facet.index.attributes.CategoryAttribute
Clone this CategoryAttribute.
clone() - Method in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

clone() - Method in class org.apache.lucene.facet.search.params.FacetRequest

clone() - Method in class org.apache.lucene.facet.taxonomy.CategoryPath

clone() - Method in class org.apache.lucene.index.FieldInfo

clone() - Method in class org.apache.lucene.index.FieldInfos
Returns a deep clone of this FieldInfos instance.
clone() - Method in class org.apache.lucene.index.IndexReader
Efficiently clones the IndexReader (sharing most internal state).
clone(boolean) - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.clone() instead.
clone() - Method in class org.apache.lucene.index.IndexWriterConfig

clone() - Method in class org.apache.lucene.index.MultiReader

clone(boolean) - Method in class org.apache.lucene.index.MultiReader
Deprecated. Write support will be removed in Lucene 4.0. Use MultiReader.clone() instead.
clone() - Method in class org.apache.lucene.index.ParallelReader

clone(boolean) - Method in class org.apache.lucene.index.ParallelReader
Deprecated. Write support will be removed in Lucene 4.0. Use ParallelReader.clone() instead.
clone() - Method in class org.apache.lucene.index.Payload
Clones this payload by creating a copy of the underlying byte array.
clone() - Method in class org.apache.lucene.index.SegmentInfo

clone() - Method in class org.apache.lucene.index.SegmentInfos
Returns a copy of this instance, also copying each SegmentInfo.
clone() - Method in class org.apache.lucene.index.SegmentReader

clone(boolean) - Method in class org.apache.lucene.index.SegmentReader
Deprecated.
clone() - Method in class org.apache.lucene.queryParser.core.nodes.PathQueryNode.QueryText

clone() - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

clone() - Method in class org.apache.lucene.queryParser.surround.query.SrndQuery

clone() - Method in class org.apache.lucene.search.BooleanQuery

clone() - Method in class org.apache.lucene.search.DisjunctionMaxQuery
Create a shallow copy of us -- used in rewriting if necessary
clone() - Method in class org.apache.lucene.search.function.CustomScoreQuery

clone() - Method in class org.apache.lucene.search.join.ToChildBlockJoinQuery

clone() - Method in class org.apache.lucene.search.join.ToParentBlockJoinQuery

clone() - Method in class org.apache.lucene.search.payloads.PayloadNearQuery

clone() - Method in class org.apache.lucene.search.Query
Returns a clone of this query.
clone() - Method in class org.apache.lucene.search.spans.SpanFirstQuery

clone() - Method in class org.apache.lucene.search.spans.SpanNearPayloadCheckQuery

clone() - Method in class org.apache.lucene.search.spans.SpanNearQuery

clone() - Method in class org.apache.lucene.search.spans.SpanNotQuery

clone() - Method in class org.apache.lucene.search.spans.SpanOrQuery

clone() - Method in class org.apache.lucene.search.spans.SpanPayloadCheckQuery

clone() - Method in class org.apache.lucene.search.spans.SpanPositionRangeQuery

clone() - Method in class org.apache.lucene.store.BufferedIndexInput

clone() - Method in class org.apache.lucene.store.DataInput
Returns a clone of this stream.
clone() - Method in class org.apache.lucene.store.MockIndexInputWrapper

clone() - Method in class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput

clone() - Method in class org.apache.lucene.store.WindowsDirectory.WindowsIndexInput

clone() - Method in class org.apache.lucene.util.AttributeImpl
Shallow clone.
clone() - Method in class org.apache.lucene.util.AttributeSource.State

clone() - Method in class org.apache.lucene.util.BitVector

clone() - Method in class org.apache.lucene.util.BytesRef

clone() - Method in class org.apache.lucene.util.CharsRef

clone() - Method in class org.apache.lucene.util.DoubleBarrelLRUCache.CloneableKey

clone() - Method in class org.apache.lucene.util.FixedBitSet

clone() - Method in class org.apache.lucene.util.IntsRef

clone() - Method in class org.apache.lucene.util.OpenBitSet

clone() - Method in class org.apache.lucene.util.PagedBytes.PagedBytesDataInput

cloneAttributes() - Method in class org.apache.lucene.util.AttributeSource
Performs a clone of all AttributeImpl instances returned in a new AttributeSource instance.
cloneDeletedDocs(BitVector) - Method in class org.apache.lucene.index.SegmentReader
Deprecated.
cloneDocument(Document) - Static method in class org.apache.lucene.util._TestUtil

cloneNormBytes(byte[]) - Method in class org.apache.lucene.index.SegmentReader
Deprecated.
cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.AnyQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.BooleanQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.BoostQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.DeletedQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.GroupQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.MatchAllDocsQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.ModifierQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.NoTokenFoundQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.ParametricQueryNode
Deprecated.
cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.PathQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.PhraseSlopQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode

cloneTree() - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.SlopQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.core.nodes.TokenizedPhraseQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.standard.nodes.MultiPhraseQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.standard.nodes.PrefixWildcardQueryNode

cloneTree() - Method in class org.apache.lucene.queryParser.standard.nodes.WildcardQueryNode

close() - Method in class org.apache.lucene.analysis.Analyzer
Frees persistent resources used by this Analyzer
close() - Method in class org.apache.lucene.analysis.CharFilter

close() - Method in class org.apache.lucene.analysis.charfilter.HTMLStripCharFilter

close() - Method in class org.apache.lucene.analysis.CharReader

close() - Method in class org.apache.lucene.analysis.miscellaneous.PrefixAndSuffixAwareTokenFilter

close() - Method in class org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter

close() - Method in class org.apache.lucene.analysis.MockCharFilter

close() - Method in class org.apache.lucene.analysis.MockReaderWrapper

close() - Method in class org.apache.lucene.analysis.MockTokenizer

close() - Method in class org.apache.lucene.analysis.TokenFilter
Close the input TokenStream.
close() - Method in class org.apache.lucene.analysis.Tokenizer
By default, closes the input Reader.
close() - Method in class org.apache.lucene.analysis.TokenStream
Releases resources associated with this stream.
close() - Method in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
Called when reading from this content source is no longer required.
close() - Method in class org.apache.lucene.benchmark.byTask.feeds.DirContentSource

close() - Method in class org.apache.lucene.benchmark.byTask.feeds.DocMaker
Closes the DocMaker.
close() - Method in class org.apache.lucene.benchmark.byTask.feeds.EnwikiContentSource

close() - Method in class org.apache.lucene.benchmark.byTask.feeds.LineDocSource

close() - Method in class org.apache.lucene.benchmark.byTask.feeds.LongToEnglishContentSource

close() - Method in class org.apache.lucene.benchmark.byTask.feeds.RandomFacetSource

close() - Method in class org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource

close() - Method in class org.apache.lucene.benchmark.byTask.feeds.SingleDocSource

close() - Method in class org.apache.lucene.benchmark.byTask.feeds.TrecContentSource

close() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

close() - Method in class org.apache.lucene.benchmark.byTask.tasks.ConsumeContentSourceTask

close() - Method in class org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask

close() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

close() - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

close() - Method in class org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask

close() - Method in class org.apache.lucene.benchmark.byTask.utils.StringBuilderReader

close() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader

close() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Frees used resources as well as closes the underlying IndexWriter, which commits whatever changes made to it to the underlying Directory.
close() - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.Cl2oTaxonomyWriterCache

close() - Method in class org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache

close() - Method in interface org.apache.lucene.facet.taxonomy.writercache.TaxonomyWriterCache
Let go of whatever resources the cache is holding.
close() - Method in class org.apache.lucene.index.AbstractAllTermDocs

close() - Method in class org.apache.lucene.index.CompoundFileWriter
Merge files with the extensions added up to now.
close() - Method in class org.apache.lucene.index.ConcurrentMergeScheduler

close() - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermDocs

close() - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermEnum

close() - Method in class org.apache.lucene.index.IndexReader
Closes files associated with this index.
close() - Method in class org.apache.lucene.index.IndexWriter
Commits all changes to an index and closes all associated files.
close(boolean) - Method in class org.apache.lucene.index.IndexWriter
Closes the index with or without waiting for currently running merges to finish.
close() - Method in class org.apache.lucene.index.LogMergePolicy

close() - Method in class org.apache.lucene.index.MergePolicy
Release all resources for the policy.
close() - Method in class org.apache.lucene.index.MergeScheduler
Close this MergeScheduler.
close() - Method in class org.apache.lucene.index.MockIndexInput

close() - Method in class org.apache.lucene.index.MockRandomMergePolicy

close() - Method in class org.apache.lucene.index.MultipleTermPositions

close() - Method in class org.apache.lucene.index.NoMergePolicy

close() - Method in class org.apache.lucene.index.NoMergeScheduler

close() - Method in class org.apache.lucene.index.PersistentSnapshotDeletionPolicy
Closes the index which writes the snapshots to the directory.
close() - Method in class org.apache.lucene.index.RandomIndexWriter
Close this writer.
close() - Method in class org.apache.lucene.index.SerialMergeScheduler

close() - Method in interface org.apache.lucene.index.TermDocs
Frees associated resources.
close() - Method in class org.apache.lucene.index.TermEnum
Closes the enumeration to further activity, freeing resources.
close() - Method in class org.apache.lucene.index.TieredMergePolicy

close() - Method in class org.apache.lucene.index.UpgradeIndexMergePolicy

close() - Method in class org.apache.lucene.search.FilteredTermEnum
Closes the enumeration to further activity, freeing resources.
close() - Method in class org.apache.lucene.search.FuzzyTermEnum
Closes the enumeration to further activity, freeing resources.
close() - Method in class org.apache.lucene.search.IndexSearcher
Note that the underlying IndexReader is not closed, if IndexSearcher was constructed with IndexSearcher(IndexReader r).
close() - Method in class org.apache.lucene.search.MultiSearcher
Deprecated.
close() - Method in class org.apache.lucene.search.NRTManagerReopenThread

close() - Method in class org.apache.lucene.search.ParallelMultiSearcher
Deprecated.
close() - Method in class org.apache.lucene.search.ReferenceManager
Close this ReferenceManager to future acquiring.
close() - Method in class org.apache.lucene.search.regex.RegexTermEnum

close() - Method in class org.apache.lucene.search.RemoteSearchable
Deprecated.
close() - Method in interface org.apache.lucene.search.Searchable
Deprecated. Frees resources associated with this Searcher.
close() - Method in class org.apache.lucene.search.Searcher
Deprecated.
close() - Method in class org.apache.lucene.search.SearcherLifetimeManager
Close this to future searching; any searches still in process in other threads won't be affected, and they should still call SearcherLifetimeManager.release(org.apache.lucene.search.IndexSearcher) after they are done.
close() - Method in class org.apache.lucene.search.spell.SpellChecker
Close the IndexSearcher used by this SpellChecker
close() - Method in class org.apache.lucene.search.suggest.fst.ExternalRefSorter
Removes any written temporary files.
close() - Method in class org.apache.lucene.search.suggest.fst.Sort.ByteSequencesReader
Closes the provided DataInput if it is Closeable.
close() - Method in class org.apache.lucene.search.suggest.fst.Sort.ByteSequencesWriter
Closes the provided DataOutput if it is Closeable.
close() - Method in class org.apache.lucene.store.BufferedIndexOutput
Closes this stream to further operations.
close() - Method in class org.apache.lucene.store.ChecksumIndexInput

close() - Method in class org.apache.lucene.store.ChecksumIndexOutput

close() - Method in class org.apache.lucene.store.Directory
Closes the store.
close() - Method in class org.apache.lucene.store.FileSwitchDirectory

close() - Method in class org.apache.lucene.store.FSDirectory
Closes the store to future operations.
close() - Method in class org.apache.lucene.store.FSDirectory.FSIndexOutput

close() - Method in class org.apache.lucene.store.IndexInput
Closes the stream to further operations.
close() - Method in class org.apache.lucene.store.IndexOutput
Closes this stream to further operations.
close() - Method in class org.apache.lucene.store.InputStreamDataInput

close() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndex
Deprecated.
close() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated. Flushes all changes to an index and closes all associated files.
close() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermDocs
Does nothing
close() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermEnum
Closes the enumeration to further activity, freeing resources.
close() - Method in class org.apache.lucene.store.MockDirectoryWrapper

close() - Method in class org.apache.lucene.store.MockIndexInputWrapper

close() - Method in class org.apache.lucene.store.MockIndexOutputWrapper

close() - Method in class org.apache.lucene.store.NIOFSDirectory.NIOFSIndexInput

close() - Method in class org.apache.lucene.store.NRTCachingDirectory
Close this directory, which flushes any cached files to the delegate and then closes the delegate.
close() - Method in class org.apache.lucene.store.OutputStreamDataOutput

close() - Method in class org.apache.lucene.store.RAMDirectory
Closes the store to future operations, releasing associated memory.
close() - Method in class org.apache.lucene.store.RAMInputStream

close() - Method in class org.apache.lucene.store.RAMOutputStream

close() - Method in class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput

close() - Method in class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput.Descriptor

close() - Method in class org.apache.lucene.store.WindowsDirectory.WindowsIndexInput

close() - Method in class org.apache.lucene.util.BytesRefHash
Closes the BytesRefHash and releases all internally used memory
close() - Method in class org.apache.lucene.util.CloseableThreadLocal

close() - Method in class org.apache.lucene.util.encoding.ChunksIntEncoder

close() - Method in class org.apache.lucene.util.encoding.IntEncoder
Instructs the encoder to finish the encoding process.
close() - Method in class org.apache.lucene.util.encoding.IntEncoderFilter

close() - Method in class org.apache.lucene.util.encoding.NOnesIntEncoder

close() - Method in class org.apache.lucene.util.encoding.SortingIntEncoder

close(Closeable...) - Static method in class org.apache.lucene.util.IOUtils
Closes all given Closeables.
close(Iterable<? extends Closeable>) - Static method in class org.apache.lucene.util.IOUtils

close() - Method in class org.apache.lucene.util.LineFileDocs

close() - Method in class org.apache.lucene.util.ThrottledIndexOutput

CloseableThreadLocal<T> - Class in org.apache.lucene.util
Java's builtin ThreadLocal has a serious flaw: it can take an arbitrarily long amount of time to dereference the things you had stored in it, even once the ThreadLocal instance itself is no longer referenced.
CloseableThreadLocal() - Constructor for class org.apache.lucene.util.CloseableThreadLocal

CloseIndexTask - Class in org.apache.lucene.benchmark.byTask.tasks
Close index writer.
CloseIndexTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.CloseIndexTask

CloseQuote1 - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
CloseQuote2 - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
CloseReaderTask - Class in org.apache.lucene.benchmark.byTask.tasks
Close index reader.
CloseReaderTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.CloseReaderTask

closeResources() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
A hook for extending classes to close additional resources that were used.
CloseTaxonomyIndexTask - Class in org.apache.lucene.benchmark.byTask.tasks
Close taxonomy index.
CloseTaxonomyIndexTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyIndexTask

CloseTaxonomyReaderTask - Class in org.apache.lucene.benchmark.byTask.tasks
Close taxonomy reader.
CloseTaxonomyReaderTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyReaderTask

closeWhileHandlingException(E, Closeable...) - Static method in class org.apache.lucene.util.IOUtils
Closes all given Closeables, suppressing all thrown exceptions.
closeWhileHandlingException(E, Iterable<? extends Closeable>) - Static method in class org.apache.lucene.util.IOUtils

closeWhileHandlingException(Closeable...) - Static method in class org.apache.lucene.util.IOUtils
Closes all given Closeables, suppressing all thrown exceptions.
closeWhileHandlingException(Iterable<? extends Closeable>) - Static method in class org.apache.lucene.util.IOUtils

CodecUtil - Class in org.apache.lucene.util
Utility class for reading and writing versioned headers.
codePointAt(char[], int) - Method in class org.apache.lucene.util.CharacterUtils
Returns the code point at the given index of the char array.
codePointAt(CharSequence, int) - Method in class org.apache.lucene.util.CharacterUtils
Returns the code point at the given index of the CharSequence.
codePointAt(char[], int, int) - Method in class org.apache.lucene.util.CharacterUtils
Returns the code point at the given index of the char array where only elements with index less than the limit are used.
CollationKeyAnalyzer - Class in org.apache.lucene.collation
Filters KeywordTokenizer with CollationKeyFilter.
CollationKeyAnalyzer(Collator) - Constructor for class org.apache.lucene.collation.CollationKeyAnalyzer

CollationKeyFilter - Class in org.apache.lucene.collation
Converts each token into its CollationKey, and then encodes the CollationKey with IndexableBinaryStringTools, to allow it to be stored as an index term.
CollationKeyFilter(TokenStream, Collator) - Constructor for class org.apache.lucene.collation.CollationKeyFilter

CollationTestBase - Class in org.apache.lucene.analysis
Base test class for testing Unicode collation.
CollationTestBase() - Constructor for class org.apache.lucene.analysis.CollationTestBase

collect(int) - Method in class org.apache.lucene.facet.search.FacetsCollector

collect(int) - Method in class org.apache.lucene.search.CheckHits.ExplanationAsserter

collect(int) - Method in class org.apache.lucene.search.CheckHits.SetCollector

collect(int) - Method in class org.apache.lucene.search.Collector
Called once for every document matching a query, with the unbased document number.
collect(int) - Method in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector

collect(int) - Method in class org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector

collect(int) - Method in class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector

collect(int) - Method in class org.apache.lucene.search.grouping.BlockGroupingCollector

collect(int) - Method in class org.apache.lucene.search.grouping.TermAllGroupsCollector

collect(int) - Method in class org.apache.lucene.search.join.ToParentBlockJoinCollector

collect(int) - Method in class org.apache.lucene.search.MultiCollector

collect(int) - Method in class org.apache.lucene.search.PositiveScoresOnlyCollector

collect(int) - Method in class org.apache.lucene.search.TimeLimitingCollector
Calls Collector.collect(int) on the decorated Collector unless the allowed time has passed, in which case it throws an exception.
collect(int) - Method in class org.apache.lucene.search.TotalHitCountCollector

collectFiles(File, ArrayList<File>) - Method in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
A convenience method for collecting all the files of a content source from a given directory.
CollectionUtil - Class in org.apache.lucene.util
Methods for manipulating (sorting) collections.
Collector - Class in org.apache.lucene.search
Expert: Collectors are primarily meant to be used to gather raw results from a search, and implement sorting or custom result filtering, collation, etc.
Collector() - Constructor for class org.apache.lucene.search.Collector

collector - Variable in class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector.SearchGroupDocs

collectSpanQueryFields(SpanQuery, Set<String>) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor

CollisionMap - Class in org.apache.lucene.facet.taxonomy.writercache.cl2o
HashMap to store colliding labels.
CollisionMap(CharBlockArray) - Constructor for class org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap

CollisionMap(int, CharBlockArray) - Constructor for class org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap

COLON - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
COLON - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
COLON - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
COLORED_POST_TAGS - Static variable in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

COLORED_PRE_TAGS - Static variable in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

COLS - Static variable in class org.apache.lucene.benchmark.byTask.tasks.ReportTask

column - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

column - Variable in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

combine(Query[]) - Method in class org.apache.lucene.search.Query
Expert: called when re-writing queries under MultiSearcher.
COMMA - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
CommandLineUtil - Class in org.apache.lucene.util
Class containing some useful methods used by command line tools
Comment1 - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
Comment2 - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
CommentEnd1 - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
CommentEnd2 - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
CommentTag() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser

CommentText1 - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
CommentText2 - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
commit() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Calling commit() ensures that all the categories written so far are visible to a reader that is opened (or reopened) after that call.
commit(Map<String, String>) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Like commit(), but also store properties with the index.
commit() - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0.
commit(Map<String, String>) - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0.
commit() - Method in class org.apache.lucene.index.IndexWriter
Commits all pending changes (added & deleted documents, segment merges, added indexes, etc.) to the index, and syncs all referenced index files, such that a reader will see the changes and the index updates will survive an OS or machine crash or power loss.
commit(Map<String, String>) - Method in class org.apache.lucene.index.IndexWriter
Commits all changes to the index, specifying a commitUserData Map (String -> String).
commit() - Method in class org.apache.lucene.index.RandomIndexWriter

commit() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated. Locks the index and commits the buffered documents.
commit() - Method in interface org.apache.lucene.util.TwoPhaseCommit
The second phase of a 2-phase commit.
commit(Map<String, String>) - Method in interface org.apache.lucene.util.TwoPhaseCommit
Like TwoPhaseCommit.commit(), but takes an additional commit data to be included w/ the commit.
commit() - Method in class org.apache.lucene.util.TwoPhaseCommitTool.TwoPhaseCommitWrapper

commit(Map<String, String>) - Method in class org.apache.lucene.util.TwoPhaseCommitTool.TwoPhaseCommitWrapper

CommitIndexTask - Class in org.apache.lucene.benchmark.byTask.tasks
Commits the IndexWriter.
CommitIndexTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.CommitIndexTask

CommitTaxonomyIndexTask - Class in org.apache.lucene.benchmark.byTask.tasks
Commits the Taxonomy Index.
CommitTaxonomyIndexTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.CommitTaxonomyIndexTask

common(BytesRef, BytesRef) - Method in class org.apache.lucene.util.fst.ByteSequenceOutputs

common(IntsRef, IntsRef) - Method in class org.apache.lucene.util.fst.IntSequenceOutputs

common(Object, Object) - Method in class org.apache.lucene.util.fst.NoOutputs

common(T, T) - Method in class org.apache.lucene.util.fst.Outputs
Eg common("foo", "foobar") -> "foo"
common(PairOutputs.Pair<A, B>, PairOutputs.Pair<A, B>) - Method in class org.apache.lucene.util.fst.PairOutputs

common(Long, Long) - Method in class org.apache.lucene.util.fst.PositiveIntOutputs

common(Object, Object) - Method in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs

COMMON_DELIMITER - Static variable in class org.apache.lucene.analysis.cn.smart.Utility
Delimiters will be filtered to this character by SegTokenFilter
compact() - Method in class org.apache.lucene.util.BytesRefHash
Returns the ords array in arbitrary order.
CompactLabelToOrdinal - Class in org.apache.lucene.facet.taxonomy.writercache.cl2o
This is a very efficient LabelToOrdinal implementation that uses a CharBlockArray to store all labels and a configurable number of HashArrays to reference the labels.
CompactLabelToOrdinal(int, float, int) - Constructor for class org.apache.lucene.facet.taxonomy.writercache.cl2o.CompactLabelToOrdinal

COMPANY - Static variable in class org.apache.lucene.analysis.standard.ClassicTokenizer

COMPANY - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizer
Deprecated.
COMPANY_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

comparator - Static variable in class org.apache.lucene.store.instantiated.InstantiatedTerm

comparators - Variable in class org.apache.lucene.search.FieldValueHitQueue

compare(ScoreDoc, ScoreDoc) - Method in class org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy.ByDocComparator

compare(ScoreDoc, ScoreDoc) - Method in class org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy.ByDocComparator

compare(TermVectorEntry, TermVectorEntry) - Method in class org.apache.lucene.index.TermVectorEntryFreqSortedComparator

compare(int, int) - Method in class org.apache.lucene.search.FieldComparator.ByteComparator

compare(int, int) - Method in class org.apache.lucene.search.FieldComparator
Compare hit at slot1 with hit at slot2.
compare(int, int) - Method in class org.apache.lucene.search.FieldComparator.DocComparator

compare(int, int) - Method in class org.apache.lucene.search.FieldComparator.DoubleComparator

compare(int, int) - Method in class org.apache.lucene.search.FieldComparator.FloatComparator

compare(int, int) - Method in class org.apache.lucene.search.FieldComparator.IntComparator

compare(int, int) - Method in class org.apache.lucene.search.FieldComparator.LongComparator

compare(int, int) - Method in class org.apache.lucene.search.FieldComparator.RelevanceComparator

compare(int, int) - Method in class org.apache.lucene.search.FieldComparator.ShortComparator

compare(int, int) - Method in class org.apache.lucene.search.FieldComparator.StringComparatorLocale

compare(int, int) - Method in class org.apache.lucene.search.FieldComparator.StringOrdValComparator

compare(int, int) - Method in class org.apache.lucene.search.FieldComparator.StringValComparator

compare(int, int) - Method in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.GroupHead
Compares the specified document for a specified comparator against the current most relevant document.
compare(SuggestWord, SuggestWord) - Method in class org.apache.lucene.search.spell.SuggestWordFrequencyComparator

compare(SuggestWord, SuggestWord) - Method in class org.apache.lucene.search.spell.SuggestWordScoreComparator

compare(FieldFragList.WeightedFragInfo, FieldFragList.WeightedFragInfo) - Method in class org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder.ScoreComparator

compare(int, int) - Method in class org.apache.lucene.util.SorterTemplate
Compares slots i and j of you data.
compareArray(char[], int, char[], int) - Static method in class org.apache.lucene.analysis.cn.smart.Utility
compare two arrays starting at the specified offsets.
compareArrayByPrefix(char[], int, char[], int) - Static method in class org.apache.lucene.analysis.cn.smart.Utility
Compare two arrays, starting at the specified offsets, but treating shortArray as a prefix to longArray.
compareBottom(int) - Method in class org.apache.lucene.search.FieldComparator.ByteComparator

compareBottom(int) - Method in class org.apache.lucene.search.FieldComparator
Compare the bottom of the queue with doc.
compareBottom(int) - Method in class org.apache.lucene.search.FieldComparator.DocComparator

compareBottom(int) - Method in class org.apache.lucene.search.FieldComparator.DoubleComparator

compareBottom(int) - Method in class org.apache.lucene.search.FieldComparator.FloatComparator

compareBottom(int) - Method in class org.apache.lucene.search.FieldComparator.IntComparator

compareBottom(int) - Method in class org.apache.lucene.search.FieldComparator.LongComparator

compareBottom(int) - Method in class org.apache.lucene.search.FieldComparator.RelevanceComparator

compareBottom(int) - Method in class org.apache.lucene.search.FieldComparator.ShortComparator

compareBottom(int) - Method in class org.apache.lucene.search.FieldComparator.StringComparatorLocale

compareBottom(int) - Method in class org.apache.lucene.search.FieldComparator.StringOrdValComparator

compareBottom(int) - Method in class org.apache.lucene.search.FieldComparator.StringValComparator

compareByMergeDocCount - Static variable in class org.apache.lucene.index.ConcurrentMergeScheduler

compareImplementationDistance(Class<? extends C>, VirtualMethod<C>, VirtualMethod<C>) - Static method in class org.apache.lucene.util.VirtualMethod
Utility method that compares the implementation/override distance of two methods.
comparePivot(int) - Method in class org.apache.lucene.util.SorterTemplate
Implements the compare function for the previously stored pivot value.
compareTo(QualityQuery) - Method in class org.apache.lucene.benchmark.quality.QualityQuery

compareTo(CategoryPath) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Compares this CategoryPath with the other CategoryPath for lexicographic order.
compareTo(IndexCommit) - Method in class org.apache.lucene.index.IndexCommit

compareTo(Term) - Method in class org.apache.lucene.index.Term
Compares two terms, returning a negative integer if this term belongs before the argument, zero if this term is equal to the argument, and a positive integer if this term belongs after the argument.
compareTo(SimpleTerm) - Method in class org.apache.lucene.queryParser.surround.query.SimpleTerm

compareTo(FSTCompletion.Completion) - Method in class org.apache.lucene.search.suggest.fst.FSTCompletion.Completion

compareTo(Lookup.LookupResult) - Method in class org.apache.lucene.search.suggest.Lookup.LookupResult
Compare alphabetically.
compareTo(FieldTermStack.TermInfo) - Method in class org.apache.lucene.search.vectorhighlight.FieldTermStack.TermInfo

compareTo(BytesRef) - Method in class org.apache.lucene.util.BytesRef
Unsigned byte order comparison
compareTo(CharsRef) - Method in class org.apache.lucene.util.CharsRef
Signed int order comparison
compareTo(Util.MinResult<T>) - Method in class org.apache.lucene.util.fst.Util.MinResult

compareTo(IntsRef) - Method in class org.apache.lucene.util.IntsRef
Signed int order comparison
compareValues(T, T) - Method in class org.apache.lucene.search.FieldComparator
Returns -1 if first is less than second.
compareValues(Float, Float) - Method in class org.apache.lucene.search.FieldComparator.RelevanceComparator

compareValues(String, String) - Method in class org.apache.lucene.search.FieldComparator.StringComparatorLocale

compareValues(String, String) - Method in class org.apache.lucene.search.FieldComparator.StringOrdValComparator

compareValues(String, String) - Method in class org.apache.lucene.search.FieldComparator.StringValComparator

compIDXEnd - Variable in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector

compile(String) - Method in class org.apache.lucene.search.regex.JakartaRegexpCapabilities

compile(String) - Method in class org.apache.lucene.search.regex.JavaUtilRegexCapabilities

compile(String) - Method in interface org.apache.lucene.search.regex.RegexCapabilities
Called by the constructor of RegexTermEnum allowing implementations to cache a compiled version of the regular expression pattern.
Compile - Class in org.egothor.stemmer
The Compile class is used to compile a stemmer table.
Compile() - Constructor for class org.egothor.stemmer.Compile

ComplementCountingAggregator - Class in org.apache.lucene.facet.search.aggregator
A CountingAggregator used during complement counting.
ComplementCountingAggregator(int[]) - Constructor for class org.apache.lucene.facet.search.aggregator.ComplementCountingAggregator

ComplexExplanation - Class in org.apache.lucene.search
Expert: Describes the score computation for document and query, and can distinguish a match independent of a positive value.
ComplexExplanation() - Constructor for class org.apache.lucene.search.ComplexExplanation

ComplexExplanation(boolean, float, String) - Constructor for class org.apache.lucene.search.ComplexExplanation

ComplexPhraseQueryParser - Class in org.apache.lucene.queryParser.complexPhrase
QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*".
ComplexPhraseQueryParser(Version, String, Analyzer) - Constructor for class org.apache.lucene.queryParser.complexPhrase.ComplexPhraseQueryParser

ComposedQuery - Class in org.apache.lucene.queryParser.surround.query

ComposedQuery(List, boolean, String) - Constructor for class org.apache.lucene.queryParser.surround.query.ComposedQuery

compound - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
True if segment is compound file format.
COMPOUND_EXTENSIONS - Static variable in class org.apache.lucene.index.IndexFileNames
File extensions of old-style index files
COMPOUND_FILE_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of compound file
COMPOUND_FILE_STORE_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of compound file for doc store files
COMPOUND_FILES - Static variable in class org.apache.lucene.index.NoMergePolicy
A singleton NoMergePolicy which indicates the index uses compound files.
CompoundFileExtractor - Class in org.apache.lucene.index
Command-line tool for extracting sub-files out of a compound file.
CompoundFileExtractor() - Constructor for class org.apache.lucene.index.CompoundFileExtractor

CompoundFileWriter - Class in org.apache.lucene.index
Combines multiple files into a single compound file.
CompoundFileWriter(Directory, String) - Constructor for class org.apache.lucene.index.CompoundFileWriter
Create the compound stream in the specified file.
CompoundWordTokenFilterBase - Class in org.apache.lucene.analysis.compound
Base class for decomposition token filters.
CompoundWordTokenFilterBase(TokenStream, String[], int, int, int, boolean) - Constructor for class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
Deprecated. use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, String[], int, int, int, boolean) instead
CompoundWordTokenFilterBase(TokenStream, String[], boolean) - Constructor for class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
Deprecated. use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, String[], boolean) instead
CompoundWordTokenFilterBase(TokenStream, Set<?>, boolean) - Constructor for class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
Deprecated. use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, Set, boolean) instead
CompoundWordTokenFilterBase(TokenStream, String[]) - Constructor for class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
Deprecated. use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, String[]) instead
CompoundWordTokenFilterBase(TokenStream, Set<?>) - Constructor for class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
Deprecated. use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, Set) instead
CompoundWordTokenFilterBase(TokenStream, Set<?>, int, int, int, boolean) - Constructor for class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
Deprecated. use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, Set, int, int, int, boolean) instead
CompoundWordTokenFilterBase(Version, TokenStream, String[], int, int, int, boolean) - Constructor for class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

CompoundWordTokenFilterBase(Version, TokenStream, String[], boolean) - Constructor for class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

CompoundWordTokenFilterBase(Version, TokenStream, Set<?>, boolean) - Constructor for class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

CompoundWordTokenFilterBase(Version, TokenStream, String[]) - Constructor for class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

CompoundWordTokenFilterBase(Version, TokenStream, Set<?>) - Constructor for class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

CompoundWordTokenFilterBase(Version, TokenStream, Set<?>, int, int, int, boolean) - Constructor for class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

CompoundWordTokenFilterBase.CompoundToken - Class in org.apache.lucene.analysis.compound
Helper class to hold decompounded token information
CompoundWordTokenFilterBase.CompoundToken(int, int) - Constructor for class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase.CompoundToken
Construct the compound token based on a slice of the current CompoundWordTokenFilterBase.termAtt.
compress(byte[], int, int, int) - Static method in class org.apache.lucene.document.CompressionTools
Compresses the specified byte range using the specified compressionLevel (constants are defined in java.util.zip.Deflater).
compress(byte[], int, int) - Static method in class org.apache.lucene.document.CompressionTools
Compresses the specified byte range, with default BEST_COMPRESSION level
compress(byte[]) - Static method in class org.apache.lucene.document.CompressionTools
Compresses all bytes in the array, with default BEST_COMPRESSION level
CompressionTools - Class in org.apache.lucene.document
Simple utility class providing static methods to compress and decompress binary data for stored fields.
compressString(String) - Static method in class org.apache.lucene.document.CompressionTools
Compresses the String value, with default BEST_COMPRESSION level
compressString(String, int) - Static method in class org.apache.lucene.document.CompressionTools
Compresses the String value using the specified compressionLevel (constants are defined in java.util.zip.Deflater).
computeLengthNorm(String, int) - Method in class org.apache.lucene.misc.SweetSpotSimilarity
Implemented as: 1/sqrt( steepness * (abs(x-min) + abs(x-max) - (max-min)) + 1 ) .
computeNorm(String, FieldInvertState) - Method in class org.apache.lucene.misc.SweetSpotSimilarity
Implemented as state.getBoost() * lengthNorm(fieldName, numTokens) where numTokens does not count overlap tokens if discountOverlaps is true by default or true for this specific field.
computeNorm(String, FieldInvertState) - Method in class org.apache.lucene.search.DefaultSimilarity
Implemented as state.getBoost()*lengthNorm(numTerms), where numTerms is FieldInvertState.getLength() if DefaultSimilarity.setDiscountOverlaps(boolean) is false, else it's FieldInvertState.getLength() - FieldInvertState.getNumOverlap().
computeNorm(String, FieldInvertState) - Method in class org.apache.lucene.search.Similarity
Computes the normalization value for a field, given the accumulated state of term processing for this field (see FieldInvertState).
computeNorm(String, FieldInvertState) - Method in class org.apache.lucene.search.SimilarityDelegator
Deprecated.
computeTestMethods() - Method in class org.apache.lucene.util.LuceneTestCaseRunner

ConcurrentMergeScheduler - Class in org.apache.lucene.index
A MergeScheduler that runs each merge using a separate thread.
ConcurrentMergeScheduler() - Constructor for class org.apache.lucene.index.ConcurrentMergeScheduler

ConcurrentMergeScheduler.MergeThread - Class in org.apache.lucene.index

ConcurrentMergeScheduler.MergeThread(IndexWriter, MergePolicy.OneMerge) - Constructor for class org.apache.lucene.index.ConcurrentMergeScheduler.MergeThread

config - Variable in class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker

config - Variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

Config - Class in org.apache.lucene.benchmark.byTask.utils
Perf run configuration properties.
Config(Reader) - Constructor for class org.apache.lucene.benchmark.byTask.utils.Config
Read both algorithm and config properties.
Config(Properties) - Constructor for class org.apache.lucene.benchmark.byTask.utils.Config
Create config without algorithm - useful for a programmatic perf test.
ConfigAttribute - Interface in org.apache.lucene.queryParser.core.config
Deprecated.
ConfigurationKey<T> - Class in org.apache.lucene.queryParser.core.config
An instance of this class represents a key that is used to retrieve a value from AbstractQueryConfig.
configureWriter(Config, PerfRunData, IndexWriterConfig.OpenMode, IndexCommit) - Static method in class org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask

ConjQuery(CharSequence) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser

Conjunction() - Method in class org.apache.lucene.queryParser.QueryParser

Conjunction() - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser

ConnectionCosts - Class in org.apache.lucene.analysis.ja.dict
n-gram connection cost data
CONSTANT_SCORE_AUTO_REWRITE_DEFAULT - Static variable in class org.apache.lucene.search.MultiTermQuery
Read-only default instance of MultiTermQuery.ConstantScoreAutoRewrite, with ConstantScoreAutoRewrite.setTermCountCutoff(int) set to ConstantScoreAutoRewrite.DEFAULT_TERM_COUNT_CUTOFF and ConstantScoreAutoRewrite.setDocCountPercent(double) set to ConstantScoreAutoRewrite.DEFAULT_DOC_COUNT_PERCENT.
CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE - Static variable in class org.apache.lucene.search.MultiTermQuery
Like MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE except scores are not computed.
CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE - Static variable in class org.apache.lucene.search.ScoringRewrite
Like ScoringRewrite.SCORING_BOOLEAN_QUERY_REWRITE except scores are not computed.
CONSTANT_SCORE_FILTER_REWRITE - Static variable in class org.apache.lucene.search.MultiTermQuery
A rewrite method that first creates a private Filter, by visiting each term in sequence and marking all docs for that term.
Constants - Class in org.apache.lucene.benchmark
Various benchmarking constants (mostly defaults)
Constants() - Constructor for class org.apache.lucene.benchmark.Constants

Constants - Class in org.apache.lucene.util
Some useful constants.
ConstantScoreQuery - Class in org.apache.lucene.search
A query that wraps another query or a filter and simply returns a constant score equal to the query boost for every document that matches the filter or query.
ConstantScoreQuery(Query) - Constructor for class org.apache.lucene.search.ConstantScoreQuery
Strips off scores from the passed in Query.
ConstantScoreQuery(Filter) - Constructor for class org.apache.lucene.search.ConstantScoreQuery
Wraps a Filter as a Query.
ConstantScoreQuery.ConstantScorer - Class in org.apache.lucene.search

ConstantScoreQuery.ConstantScorer(Similarity, DocIdSetIterator, Weight) - Constructor for class org.apache.lucene.search.ConstantScoreQuery.ConstantScorer

ConstantScoreQuery.ConstantWeight - Class in org.apache.lucene.search

ConstantScoreQuery.ConstantWeight(Searcher) - Constructor for class org.apache.lucene.search.ConstantScoreQuery.ConstantWeight

ConstantScoreQueryBuilder - Class in org.apache.lucene.xmlparser.builders

ConstantScoreQueryBuilder(FilterBuilderFactory) - Constructor for class org.apache.lucene.xmlparser.builders.ConstantScoreQueryBuilder

consumeAllTokens() - Method in class org.apache.lucene.analysis.TeeSinkTokenFilter
TeeSinkTokenFilter passes all tokens to the added sinks when itself is consumed.
ConsumeContentSourceTask - Class in org.apache.lucene.benchmark.byTask.tasks
Consumes a ContentSource.
ConsumeContentSourceTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.ConsumeContentSourceTask

contains(Object) - Method in class org.apache.lucene.analysis.CharArrayMap.EntrySet

contains(char[], int, int) - Method in class org.apache.lucene.analysis.CharArraySet
true if the len chars of text starting at off are in the set
contains(CharSequence) - Method in class org.apache.lucene.analysis.CharArraySet
true if the CharSequence is in the set
contains(Object) - Method in class org.apache.lucene.analysis.CharArraySet

contains(SegmentInfo) - Method in class org.apache.lucene.index.SegmentInfos

contains(Object) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

contains(Point2D) - Method in class org.apache.lucene.spatial.geometry.shape.Ellipse
Deprecated.
contains(Point2D) - Method in interface org.apache.lucene.spatial.geometry.shape.Geometry2D
Deprecated. Does the shape contain the given point
contains(Point2D) - Method in class org.apache.lucene.spatial.geometry.shape.Rectangle
Deprecated.
contains(int) - Method in class org.apache.lucene.util.collections.IntHashSet
Checks if a given key exists in the map.
contains(Object) - Method in class org.apache.lucene.util.MapBackedSet

containsAll(Collection<?>) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

containsKey(char[], int, int) - Method in class org.apache.lucene.analysis.CharArrayMap
true if the len chars of text starting at off are in the CharArrayMap.keySet
containsKey(CharSequence) - Method in class org.apache.lucene.analysis.CharArrayMap
true if the CharSequence is in the CharArrayMap.keySet
containsKey(Object) - Method in class org.apache.lucene.analysis.CharArrayMap

containsKey(K) - Method in class org.apache.lucene.util.collections.ArrayHashMap
Returns true iff the key exists in the map.
containsKey(float) - Method in class org.apache.lucene.util.collections.FloatToObjectMap
Checks if a given key exists in the map.
containsKey(int) - Method in class org.apache.lucene.util.collections.IntToDoubleMap
Checks if a given key exists in the map.
containsKey(int) - Method in class org.apache.lucene.util.collections.IntToIntMap
Checks if a given key exists in the map.
containsKey(int) - Method in class org.apache.lucene.util.collections.IntToObjectMap
Checks if a given key exists in the map.
containsKey(K) - Method in class org.apache.lucene.util.collections.ObjectToFloatMap
Checks if a given key exists in the map.
containsKey(K) - Method in class org.apache.lucene.util.collections.ObjectToIntMap
Checks if a given key exists in the map.
containsKey(Object) - Method in class org.apache.lucene.util.WeakIdentityMap

containsTag(String) - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode
verify if a node contains a tag
containsTag(CharSequence) - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode
Deprecated. use QueryNode.containsTag(String) instead
containsTag(CharSequence) - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
Deprecated. use QueryNodeImpl.containsTag(String) instead
containsTag(String) - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
verify if a node contains a tag
containsValue(Object) - Method in class org.apache.lucene.util.collections.ArrayHashMap
Returns true iff the object exists in the map.
containsValue(Object) - Method in class org.apache.lucene.util.collections.FloatToObjectMap
Checks if the given object exists in the map.
This method iterates over the collection, trying to find an equal object.
containsValue(double) - Method in class org.apache.lucene.util.collections.IntToDoubleMap
Checks if the given value exists in the map.
This method iterates over the collection, trying to find an equal object.
containsValue(int) - Method in class org.apache.lucene.util.collections.IntToIntMap
Checks if the given object exists in the map.
This method iterates over the collection, trying to find an equal object.
containsValue(Object) - Method in class org.apache.lucene.util.collections.IntToObjectMap
Checks if the given object exists in the map.
This method iterates over the collection, trying to find an equal object.
containsValue(float) - Method in class org.apache.lucene.util.collections.ObjectToFloatMap
Checks if the given object exists in the map.
This method iterates over the collection, trying to find an equal object.
containsValue(int) - Method in class org.apache.lucene.util.collections.ObjectToIntMap
Checks if the given object exists in the map.
This method iterates over the collection, trying to find an equal object.
ContentItemsSource - Class in org.apache.lucene.benchmark.byTask.feeds
Base class for source of data for benchmarking
ContentItemsSource() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource

ContentSource - Class in org.apache.lucene.benchmark.byTask.feeds
Represents content from a specified source, such as TREC, Reuters etc.
ContentSource() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.ContentSource

convert(double, DistanceUnits) - Method in enum org.apache.lucene.spatial.geometry.DistanceUnits
Deprecated. Converts the given distance in given DistanceUnit, to a distance in the unit represented by this
convertStreamToByteArray() - Method in class org.apache.lucene.facet.index.CategoryListPayloadStream
Returns the streamed bytes so far accumulated, as an array of bytes.
coord(int, int) - Method in class org.apache.lucene.search.DefaultSimilarity
Implemented as overlap / maxOverlap.
coord(int, int) - Method in class org.apache.lucene.search.Similarity
Computes a score factor based on the fraction of all query terms that a document contains.
coord(int, int) - Method in class org.apache.lucene.search.SimilarityDelegator
Deprecated.
coords(double, double) - Method in interface org.apache.lucene.spatial.tier.projections.IProjector
Deprecated.
coords(double, double) - Method in class org.apache.lucene.spatial.tier.projections.SinusoidalProjector
Deprecated.
coordsAsString(double, double) - Method in interface org.apache.lucene.spatial.tier.projections.IProjector
Deprecated.
coordsAsString(double, double) - Method in class org.apache.lucene.spatial.tier.projections.SinusoidalProjector
Deprecated.
copy(Version, Map<?, ? extends V>) - Static method in class org.apache.lucene.analysis.CharArrayMap
Returns a copy of the given map as a CharArrayMap.
copy(Set<?>) - Static method in class org.apache.lucene.analysis.CharArraySet
Deprecated. use CharArraySet.copy(Version, Set) instead.
copy(Version, Set<?>) - Static method in class org.apache.lucene.analysis.CharArraySet
Returns a copy of the given set as a CharArraySet.
copy(int, int) - Method in class org.apache.lucene.search.FieldComparator.ByteComparator

copy(int, int) - Method in class org.apache.lucene.search.FieldComparator
This method is called when a new hit is competitive.
copy(int, int) - Method in class org.apache.lucene.search.FieldComparator.DocComparator

copy(int, int) - Method in class org.apache.lucene.search.FieldComparator.DoubleComparator

copy(int, int) - Method in class org.apache.lucene.search.FieldComparator.FloatComparator

copy(int, int) - Method in class org.apache.lucene.search.FieldComparator.IntComparator

copy(int, int) - Method in class org.apache.lucene.search.FieldComparator.LongComparator

copy(int, int) - Method in class org.apache.lucene.search.FieldComparator.RelevanceComparator

copy(int, int) - Method in class org.apache.lucene.search.FieldComparator.ShortComparator

copy(int, int) - Method in class org.apache.lucene.search.FieldComparator.StringComparatorLocale

copy(int, int) - Method in class org.apache.lucene.search.FieldComparator.StringOrdValComparator

copy(int, int) - Method in class org.apache.lucene.search.FieldComparator.StringValComparator

copy() - Method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
copy() - Method in class org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.
copy() - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated.
copy(Directory, String, String) - Method in class org.apache.lucene.store.Directory
Copies the file src to Directory to under the new file name dest.
copy(Directory, Directory, boolean) - Static method in class org.apache.lucene.store.Directory
Deprecated. should be replaced with calls to Directory.copy(Directory, String, String) for every file that needs copying. You can use the following code:
 IndexFileNameFilter filter = IndexFileNameFilter.getFilter();
 for (String file : src.listAll()) {
   if (filter.accept(null, file)) {
     src.copy(dest, file, file);
   }
 }
copy(Directory, String, String) - Method in class org.apache.lucene.store.MockDirectoryWrapper

copy(BytesRef) - Method in class org.apache.lucene.util.ByteBlockPool
Copies the given BytesRef at the current positions ( ByteBlockPool.byteUpto across buffer boundaries
copy(IndexInput, long) - Method in class org.apache.lucene.util.PagedBytes
Read this many bytes from in
copy(BytesRef) - Method in class org.apache.lucene.util.PagedBytes
Copy BytesRef in
copy(BytesRef, BytesRef) - Method in class org.apache.lucene.util.PagedBytes
Copy BytesRef in, setting BytesRef out to the result.
copy_from(SnowballProgram) - Method in class org.tartarus.snowball.SnowballProgram

copyBuffer(char[], int, int) - Method in interface org.apache.lucene.analysis.tokenattributes.CharTermAttribute
Copies the contents of buffer, starting at offset for length characters, into the termBuffer array.
copyBuffer(char[], int, int) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

copyBytes(IndexOutput, long) - Method in class org.apache.lucene.store.BufferedIndexInput

copyBytes(DataInput, long) - Method in class org.apache.lucene.store.DataOutput
Copy numBytes bytes from input to ourself.
copyBytes(IndexOutput, long) - Method in class org.apache.lucene.store.IndexInput
Copies numBytes bytes to the given IndexOutput.
copyBytes(IndexOutput, long) - Method in class org.apache.lucene.store.MockIndexInputWrapper

copyBytes(DataInput, long) - Method in class org.apache.lucene.store.MockIndexOutputWrapper

copyBytes(IndexOutput, long) - Method in class org.apache.lucene.store.RAMInputStream

copyBytes(DataInput, long) - Method in class org.apache.lucene.store.RAMOutputStream

copyBytes(IndexOutput, long) - Method in class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput

copyBytes(BytesRef) - Method in class org.apache.lucene.util.BytesRef
Copies the bytes from the given BytesRef
copyBytes(DataInput, long) - Method in class org.apache.lucene.util.ThrottledIndexOutput

copyChars(CharSequence) - Method in class org.apache.lucene.util.BytesRef
Copies the UTF8 bytes for this string.
copyChars(char[], int, int) - Method in class org.apache.lucene.util.BytesRef
Copies the UTF8 bytes for this string.
copyChars(CharsRef) - Method in class org.apache.lucene.util.CharsRef
Copies the given CharsRef referenced content into this instance.
copyChars(char[], int, int) - Method in class org.apache.lucene.util.CharsRef
Copies the given array into this CharsRef.
copyDocGroupValue(GROUP_VALUE_TYPE, GROUP_VALUE_TYPE) - Method in class org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector
Returns a copy of the specified group value by creating a new instance and copying the value from the specified groupValue in the new instance.
copyDocGroupValue(String, String) - Method in class org.apache.lucene.search.grouping.TermFirstPassGroupingCollector

copyFrom(BytesRef) - Method in class org.apache.lucene.util.ByteBlockPool

copyFrom(FST.Arc<T>) - Method in class org.apache.lucene.util.fst.FST.Arc
Returns this
copyInts(IntsRef) - Method in class org.apache.lucene.util.IntsRef

copyText(UnicodeUtil.UTF16Result) - Method in class org.apache.lucene.util.UnicodeUtil.UTF16Result

copyTo(AttributeImpl) - Method in class org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl

copyTo(AttributeImpl) - Method in class org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl

copyTo(AttributeImpl) - Method in class org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttributeImpl

copyTo(AttributeImpl) - Method in class org.apache.lucene.analysis.ja.tokenattributes.InflectionAttributeImpl

copyTo(AttributeImpl) - Method in class org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttributeImpl

copyTo(AttributeImpl) - Method in class org.apache.lucene.analysis.ja.tokenattributes.ReadingAttributeImpl

copyTo(AttributeImpl) - Method in class org.apache.lucene.analysis.Token

copyTo(AttributeImpl) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

copyTo(AttributeImpl) - Method in class org.apache.lucene.analysis.tokenattributes.FlagsAttributeImpl

copyTo(AttributeImpl) - Method in class org.apache.lucene.analysis.tokenattributes.KeywordAttributeImpl

copyTo(AttributeImpl) - Method in class org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl

copyTo(AttributeImpl) - Method in class org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl

copyTo(AttributeImpl) - Method in class org.apache.lucene.analysis.tokenattributes.PositionIncrementAttributeImpl

copyTo(AttributeImpl) - Method in class org.apache.lucene.analysis.tokenattributes.PositionLengthAttributeImpl

copyTo(AttributeImpl) - Method in class org.apache.lucene.analysis.tokenattributes.TypeAttributeImpl

copyTo(AttributeImpl) - Method in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

copyTo(byte[], int) - Method in class org.apache.lucene.index.Payload
Copies the payload data to a byte array.
copyTo(AttributeImpl) - Method in class org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl
Deprecated.
copyTo(AttributeImpl) - Method in class org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl
Deprecated.
copyTo(AttributeImpl) - Method in class org.apache.lucene.queryParser.standard.config.BoostAttributeImpl
Deprecated.
copyTo(AttributeImpl) - Method in class org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl
Deprecated.
copyTo(AttributeImpl) - Method in class org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl
Deprecated.
copyTo(AttributeImpl) - Method in class org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl
Deprecated.
copyTo(AttributeImpl) - Method in class org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl
Deprecated.
copyTo(AttributeImpl) - Method in class org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl
Deprecated.
copyTo(AttributeImpl) - Method in class org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl
Deprecated.
copyTo(AttributeImpl) - Method in class org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl
Deprecated.
copyTo(AttributeImpl) - Method in class org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl
Deprecated.
copyTo(AttributeImpl) - Method in class org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl
Deprecated.
copyTo(AttributeImpl) - Method in class org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl
Deprecated.
copyTo(AttributeImpl) - Method in class org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl
Deprecated.
copyTo(AttributeImpl) - Method in class org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl
Deprecated.
copyTo(AttributeImpl) - Method in class org.apache.lucene.util.AttributeImpl
Copies the values from this Attribute into the passed-in target attribute.
copyTo(AttributeSource) - Method in class org.apache.lucene.util.AttributeSource
Copies the contents of this AttributeSource to the given target AttributeSource.
copyToCharArray(char[], int, int, char) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Copies the specified number of components from this category path to the specified character array, with the components separated by a given delimiter character.
copyUsingLengthPrefix(BytesRef) - Method in class org.apache.lucene.util.PagedBytes
Copy bytes in, writing the length as a 1 or 2 byte vInt prefix.
CoreParser - Class in org.apache.lucene.xmlparser
Assembles a QueryBuilder which uses only core Lucene Query objects
CoreParser(Analyzer, QueryParser) - Constructor for class org.apache.lucene.xmlparser.CoreParser
Construct an XML parser that uses a single instance QueryParser for handling UserQuery tags - all parse operations are synchronised on this parser
CoreParser(String, Analyzer) - Constructor for class org.apache.lucene.xmlparser.CoreParser
Constructs an XML parser that creates a QueryParser for each UserQuery request.
CoreParser(String, Analyzer, QueryParser) - Constructor for class org.apache.lucene.xmlparser.CoreParser

CorePlusExtensionsParser - Class in org.apache.lucene.xmlparser

CorePlusExtensionsParser(Analyzer, QueryParser) - Constructor for class org.apache.lucene.xmlparser.CorePlusExtensionsParser
Construct an XML parser that uses a single instance QueryParser for handling UserQuery tags - all parse operations are synchronized on this parser
CorePlusExtensionsParser(String, Analyzer) - Constructor for class org.apache.lucene.xmlparser.CorePlusExtensionsParser
Constructs an XML parser that creates a QueryParser for each UserQuery request.
correct(int) - Method in class org.apache.lucene.analysis.BaseCharFilter
Retrieve the corrected offset.
correct(int) - Method in class org.apache.lucene.analysis.CharFilter
Subclass may want to override to correct the current offset.
correctOffset(int) - Method in class org.apache.lucene.analysis.CharFilter
Chains the corrected offset through the input CharFilter.
correctOffset(int) - Method in class org.apache.lucene.analysis.CharReader

correctOffset(int) - Method in class org.apache.lucene.analysis.CharStream
Called by CharFilter(s) and Tokenizer to correct token offset.
correctOffset(int) - Method in class org.apache.lucene.analysis.MockCharFilter

correctOffset(int) - Method in class org.apache.lucene.analysis.Tokenizer
Return the corrected offset.
CorruptIndexException - Exception in org.apache.lucene.index
This exception is thrown when Lucene detects an inconsistency in the index.
CorruptIndexException(String) - Constructor for exception org.apache.lucene.index.CorruptIndexException

COULD_NOT_PARSE_NUMBER - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

count - Static variable in class org.apache.lucene.benchmark.utils.ExtractWikipedia

count - Variable in class org.apache.lucene.search.grouping.SentinelIntSet

count - Variable in class org.apache.lucene.search.spans.TermSpans

count() - Method in class org.apache.lucene.util.BitVector
Returns the total number of one bits in this vector.
counter - Variable in class org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal

counter - Variable in class org.apache.lucene.index.SegmentInfos

Counter - Class in org.apache.lucene.util
Simple counter class
Counter() - Constructor for class org.apache.lucene.util.Counter

counterArray - Variable in class org.apache.lucene.facet.search.aggregator.CountingAggregator

CountFacetRequest - Class in org.apache.lucene.facet.search.params
Facet request for counting facets.
CountFacetRequest(CategoryPath, int) - Constructor for class org.apache.lucene.facet.search.params.CountFacetRequest
Create a count facet request for a given node in the taxonomy.
CountingAggregator - Class in org.apache.lucene.facet.search.aggregator
A CountingAggregator updates a counter array with the size of the whole taxonomy, counting the number of times each category appears in the given set of documents.
CountingAggregator(int[]) - Constructor for class org.apache.lucene.facet.search.aggregator.CountingAggregator

CountingListTokenizer - Class in org.apache.lucene.facet.index.streaming
CategoryListTokenizer for facet counting
CountingListTokenizer(TokenStream, FacetIndexingParams) - Constructor for class org.apache.lucene.facet.index.streaming.CountingListTokenizer

cp - Variable in class org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint

crash() - Method in class org.apache.lucene.store.MockDirectoryWrapper
Simulates a crash of OS or machine by overwriting unsynced files.
create(String, String, String, String) - Method in class org.apache.lucene.benchmark.utils.ExtractWikipedia

create() - Method in class org.apache.lucene.facet.search.FloatArrayAllocator

create() - Method in class org.apache.lucene.facet.search.IntArrayAllocator

create(int, boolean) - Static method in class org.apache.lucene.facet.search.ScoredDocIdCollector
Creates a new ScoredDocIdCollector with the given parameters.
create() - Method in class org.apache.lucene.facet.search.TemporaryObjectAllocator
Subclasses must override this method to actually create a new object of the desired type.
create(boolean, boolean, double) - Static method in class org.apache.lucene.search.CachingCollector
Creates a CachingCollector which does not wrap another collector.
create(Collector, boolean, double) - Static method in class org.apache.lucene.search.CachingCollector
Create a new CachingCollector that wraps the given collector and caches documents and scores up to the specified RAM threshold.
create(Collector, boolean, int) - Static method in class org.apache.lucene.search.CachingCollector
Create a new CachingCollector that wraps the given collector and caches documents and scores up to the specified max docs threshold.
create(SortField[], int) - Static method in class org.apache.lucene.search.FieldValueHitQueue
Creates a hit queue sorted by the given list of fields.
create(String, Sort) - Static method in class org.apache.lucene.search.grouping.TermAllGroupHeadsCollector
Creates an AbstractAllGroupHeadsCollector instance based on the supplied arguments.
create(String, Sort, int) - Static method in class org.apache.lucene.search.grouping.TermAllGroupHeadsCollector
Creates an AbstractAllGroupHeadsCollector instance based on the supplied arguments.
create(Sort, int, boolean, boolean, boolean, boolean) - Static method in class org.apache.lucene.search.TopFieldCollector
Creates a new TopFieldCollector from the given arguments.
create(int, boolean) - Static method in class org.apache.lucene.search.TopScoreDocCollector
Creates a new TopScoreDocCollector given the number of hits to collect and whether documents are scored in order by the input Scorer to TopScoreDocCollector.setScorer(Scorer).
create(int, ScoreDoc, boolean) - Static method in class org.apache.lucene.search.TopScoreDocCollector
Creates a new TopScoreDocCollector given the number of hits to collect, the bottom of the previous page, and whether documents are scored in order by the input Scorer to TopScoreDocCollector.setScorer(Scorer).
createAggregator(boolean, FacetArrays, IndexReader, TaxonomyReader) - Method in class org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest

createAggregator(boolean, FacetArrays, IndexReader, TaxonomyReader) - Method in class org.apache.lucene.facet.search.params.association.AssociationIntSumFacetRequest

createAggregator(boolean, FacetArrays, IndexReader, TaxonomyReader) - Method in class org.apache.lucene.facet.search.params.CountFacetRequest

createAggregator(boolean, FacetArrays, IndexReader, TaxonomyReader) - Method in class org.apache.lucene.facet.search.params.FacetRequest
Create an aggregator for this facet request.
createAggregator(boolean, FacetArrays, IndexReader, TaxonomyReader) - Method in class org.apache.lucene.facet.search.params.ScoreFacetRequest

createAllDocsScoredDocIDs(IndexReader) - Static method in class org.apache.lucene.facet.util.ScoredDocIdsUtils
Creates a ScoredDocIDs which returns document IDs all non-deleted doc ids according to the given reader.
createAnalyzer(String) - Static method in class org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask

createAttributeInstance(Class<? extends Attribute>) - Method in class org.apache.lucene.analysis.Token.TokenAttributeFactory

createAttributeInstance(Class<? extends Attribute>) - Method in class org.apache.lucene.util.AttributeSource.AttributeFactory
returns an AttributeImpl for the supplied Attribute interface class.
createBox(LatLng, double, double) - Static method in class org.apache.lucene.spatial.geometry.shape.LLRect
Deprecated. Approximates a box centered at the given point with the given width and height in miles.
createCategoryListIterator(IndexReader, int) - Method in class org.apache.lucene.facet.index.params.CategoryListParams
Create the category list iterator for the specified partition.
createCategoryListIterator(IndexReader, TaxonomyReader, FacetSearchParams, int) - Method in class org.apache.lucene.facet.search.params.FacetRequest
Create the category list iterator for the specified partition.
createCollector() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask

createCollector() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask

createComponents(String, Reader) - Method in class org.apache.lucene.analysis.ar.ArabicAnalyzer
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.bg.BulgarianAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.br.BrazilianAnalyzer
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.ca.CatalanAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.cjk.CJKAnalyzer

createComponents(String, Reader) - Method in class org.apache.lucene.analysis.cn.ChineseAnalyzer
Deprecated. Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.cz.CzechAnalyzer
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.da.DanishAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.de.GermanAnalyzer
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.el.GreekAnalyzer
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.en.EnglishAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.es.SpanishAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.eu.BasqueAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.fa.PersianAnalyzer
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.fi.FinnishAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.fr.FrenchAnalyzer
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.ga.IrishAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.gl.GalicianAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.hi.HindiAnalyzer
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.hu.HungarianAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.hy.ArmenianAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.id.IndonesianAnalyzer
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.it.ItalianAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.ja.JapaneseAnalyzer

createComponents(String, Reader) - Method in class org.apache.lucene.analysis.KeywordAnalyzer

createComponents(String, Reader) - Method in class org.apache.lucene.analysis.lv.LatvianAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader, String) - Method in class org.apache.lucene.analysis.miscellaneous.PatternAnalyzer
Creates a token stream that tokenizes the given string into token terms (aka words).
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.miscellaneous.PatternAnalyzer
Creates a token stream that tokenizes all the text in the given Reader; This implementation forwards to tokenStream(String, Reader, String) and is less efficient than tokenStream(String, Reader, String).
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.nl.DutchAnalyzer
Returns a (possibly reused) TokenStream which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.no.NorwegianAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.pl.PolishAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.pt.PortugueseAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.ReusableAnalyzerBase
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.ro.RomanianAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.ru.RussianAnalyzer
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.SimpleAnalyzer

createComponents(String, Reader) - Method in class org.apache.lucene.analysis.standard.ClassicAnalyzer

createComponents(String, Reader) - Method in class org.apache.lucene.analysis.standard.StandardAnalyzer

createComponents(String, Reader) - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailAnalyzer

createComponents(String, Reader) - Method in class org.apache.lucene.analysis.StopAnalyzer
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.sv.SwedishAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.th.ThaiAnalyzer
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.tr.TurkishAnalyzer
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
createComponents(String, Reader) - Method in class org.apache.lucene.analysis.WhitespaceAnalyzer

createEncoder() - Method in class org.apache.lucene.facet.index.params.CategoryListParams
Allows to override how categories are encoded and decoded.
createFacetResultsHandler(TaxonomyReader) - Method in class org.apache.lucene.facet.search.params.FacetRequest
Creates a new FacetResultsHandler that matches the request logic and current settings, such as depth, limits-mode, etc, as well as the passed in TaxonomyReader.
createFieldFragList(FieldPhraseList, int) - Method in interface org.apache.lucene.search.vectorhighlight.FragListBuilder
create a FieldFragList.
createFieldFragList(FieldPhraseList, int) - Method in class org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder

createFieldFragList(FieldPhraseList, int) - Method in class org.apache.lucene.search.vectorhighlight.SingleFragListBuilder

createFragment(IndexReader, int, String, FieldFragList) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

createFragment(IndexReader, int, String, FieldFragList, String[], String[], Encoder) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

createFragment(IndexReader, int, String, FieldFragList) - Method in interface org.apache.lucene.search.vectorhighlight.FragmentsBuilder
create a fragment.
createFragment(IndexReader, int, String, FieldFragList, String[], String[], Encoder) - Method in interface org.apache.lucene.search.vectorhighlight.FragmentsBuilder
create a fragment.
createFragments(IndexReader, int, String, FieldFragList, int) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

createFragments(IndexReader, int, String, FieldFragList, int, String[], String[], Encoder) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

createFragments(IndexReader, int, String, FieldFragList, int) - Method in interface org.apache.lucene.search.vectorhighlight.FragmentsBuilder
create multiple fragments.
createFragments(IndexReader, int, String, FieldFragList, int, String[], String[], Encoder) - Method in interface org.apache.lucene.search.vectorhighlight.FragmentsBuilder
create multiple fragments.
CreateIndexTask - Class in org.apache.lucene.benchmark.byTask.tasks
Create an index.
CreateIndexTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask

createIndexWriterConfig(IndexWriterConfig.OpenMode) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Create the IndexWriterConfig that would be used for opening the internal index writer.
createJoinQuery(String, String, Query, IndexSearcher) - Static method in class org.apache.lucene.search.join.JoinUtil
Method for query time joining.
createMatchingDecoder() - Method in class org.apache.lucene.util.encoding.DGapIntEncoder

createMatchingDecoder() - Method in class org.apache.lucene.util.encoding.EightFlagsIntEncoder

createMatchingDecoder() - Method in class org.apache.lucene.util.encoding.FourFlagsIntEncoder

createMatchingDecoder() - Method in class org.apache.lucene.util.encoding.IntEncoder
Returns an IntDecoder which matches this encoder.
createMatchingDecoder() - Method in class org.apache.lucene.util.encoding.NOnesIntEncoder

createMatchingDecoder() - Method in class org.apache.lucene.util.encoding.SimpleIntEncoder

createMatchingDecoder() - Method in class org.apache.lucene.util.encoding.SortingIntEncoder

createMatchingDecoder() - Method in class org.apache.lucene.util.encoding.UniqueValuesIntEncoder

createMatchingDecoder() - Method in class org.apache.lucene.util.encoding.VInt8IntEncoder

createNormalizedWeight(Query) - Method in class org.apache.lucene.search.AssertingIndexSearcher
Ensures, that the returned Weight is not normalized again, which may produce wrong scores.
createNormalizedWeight(Query) - Method in class org.apache.lucene.search.IndexSearcher
Creates a normalized weight for a top-level Query.
createNormalizedWeight(Query) - Method in class org.apache.lucene.search.MultiSearcher
Deprecated. Create weight in multiple index scenario.
createNormalizedWeight(Query) - Method in class org.apache.lucene.search.Searcher
Deprecated. Creates a normalized weight for a top-level Query.
createOutput(String) - Method in class org.apache.lucene.store.DirectIOLinuxDirectory

createOutput(String) - Method in class org.apache.lucene.store.Directory
Creates a new, empty file in the directory with the given name.
createOutput(String) - Method in class org.apache.lucene.store.FileSwitchDirectory

createOutput(String) - Method in class org.apache.lucene.store.FSDirectory
Creates an IndexOutput for the file with the given name.
createOutput(String) - Method in class org.apache.lucene.store.MockDirectoryWrapper

createOutput(String) - Method in class org.apache.lucene.store.NRTCachingDirectory

createOutput(String) - Method in class org.apache.lucene.store.RAMDirectory
Creates a new, empty file in the directory with the given name.
createQueryParser(String, Analyzer) - Method in class org.apache.lucene.xmlparser.builders.UserInputQueryBuilder
Method to create a QueryParser - designed to be overridden
createSample(ScoredDocIDs, int, int) - Method in class org.apache.lucene.facet.search.sampling.RandomSampler

createSample(ScoredDocIDs, int, int) - Method in class org.apache.lucene.facet.search.sampling.RepeatableSampler

createSample(ScoredDocIDs, int, int) - Method in class org.apache.lucene.facet.search.sampling.Sampler
Create and return a sample of the input set
createScoredDocIds(DocIdSet, int) - Static method in class org.apache.lucene.facet.util.ScoredDocIdsUtils
Create a ScoredDocIDs out of a given docIdSet and the total number of documents in an index
createScoredDocIDsSubset(ScoredDocIDs, int[]) - Static method in class org.apache.lucene.facet.util.ScoredDocIdsUtils
Create a subset of an existing ScoredDocIDs object.
createSearcher() - Method in class org.apache.lucene.index.memory.MemoryIndex
Creates and returns a searcher that can be used to execute arbitrary Lucene queries and to collect the resulting query results as hits.
createSuitableHeap(FacetRequest) - Static method in class org.apache.lucene.facet.util.ResultSortUtils
Create a suitable heap according to facet request being served.
CreateTaxonomyIndexTask - Class in org.apache.lucene.benchmark.byTask.tasks
Create a taxonomy index.
CreateTaxonomyIndexTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.CreateTaxonomyIndexTask

createTempFile(String, String, File) - Static method in class org.apache.lucene.util._TestUtil
insecure, fast version of File.createTempFile uses Random instead of SecureRandom.
createTerm(String) - Method in class org.apache.lucene.index.Term
Optimized construction of new Terms by reusing same field as this Term - avoids field.intern() overhead
createWeight(Searcher) - Method in class org.apache.lucene.search.BooleanQuery

createWeight(Searcher) - Method in class org.apache.lucene.search.ConstantScoreQuery

createWeight(Searcher) - Method in class org.apache.lucene.search.DisjunctionMaxQuery
Create the Weight used to score us
createWeight(Searcher) - Method in class org.apache.lucene.search.FilteredQuery
Returns a Weight that applies the filter to the enclosed query's Weight.
createWeight(Searcher) - Method in class org.apache.lucene.search.function.CustomScoreQuery

createWeight(Searcher) - Method in class org.apache.lucene.search.function.ValueSourceQuery

createWeight(Searcher) - Method in class org.apache.lucene.search.join.ToChildBlockJoinQuery

createWeight(Searcher) - Method in class org.apache.lucene.search.join.ToParentBlockJoinQuery

createWeight(Searcher) - Method in class org.apache.lucene.search.MatchAllDocsQuery

createWeight(Searcher) - Method in class org.apache.lucene.search.MultiPhraseQuery

createWeight(Searcher) - Method in class org.apache.lucene.search.payloads.PayloadNearQuery

createWeight(Searcher) - Method in class org.apache.lucene.search.payloads.PayloadTermQuery

createWeight(Searcher) - Method in class org.apache.lucene.search.PhraseQuery

createWeight(Searcher) - Method in class org.apache.lucene.search.Query
Expert: Constructs an appropriate Weight implementation for this query.
createWeight(Query) - Method in class org.apache.lucene.search.Searcher
Deprecated. never ever use this method in Weight implementations. Subclasses of Searcher should use Searcher.createNormalizedWeight(org.apache.lucene.search.Query), instead.
createWeight(Searcher) - Method in class org.apache.lucene.search.spans.FieldMaskingSpanQuery

createWeight(Searcher) - Method in class org.apache.lucene.search.spans.SpanQuery

createWeight(Searcher) - Method in class org.apache.lucene.search.TermQuery

createWriterConfig(Config, PerfRunData, IndexWriterConfig.OpenMode, IndexCommit) - Static method in class org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask

CSVUtil - Class in org.apache.lucene.analysis.ja.util
Utility class for parsing CSV text
cud - Variable in class org.apache.lucene.queryParser.ext.Extensions.Pair

cur - Variable in class org.apache.lucene.queryParser.ext.Extensions.Pair

curChar - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager

curChar - Variable in class org.apache.lucene.queryParser.QueryParserTokenManager

curChar - Variable in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager

curChar - Variable in class org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager

curDocs - Variable in class org.apache.lucene.search.CachingCollector

curPos - Variable in class org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper

current() - Method in class org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator

current() - Method in class org.apache.lucene.analysis.util.CharArrayIterator

current - Variable in class org.apache.lucene.search.ReferenceManager

current() - Method in class org.apache.lucene.util.fst.BytesRefFSTEnum

current() - Method in class org.apache.lucene.util.fst.IntsRefFSTEnum

CURRENT_FORMAT - Static variable in class org.apache.lucene.index.SegmentInfos

currentDocumentInformation - Variable in class org.apache.lucene.store.instantiated.InstantiatedTermDocs

currentScore(int, String, int, int, int, float, float) - Method in class org.apache.lucene.search.payloads.AveragePayloadFunction

currentScore(int, String, int, int, int, float, float) - Method in class org.apache.lucene.search.payloads.MaxPayloadFunction

currentScore(int, String, int, int, int, float, float) - Method in class org.apache.lucene.search.payloads.MinPayloadFunction

currentScore(int, String, int, int, int, float, float) - Method in class org.apache.lucene.search.payloads.PayloadFunction
Calculate the score up to this point for this doc and field
currentTerm - Variable in class org.apache.lucene.search.FilteredTermEnum
the current term
currentTerm - Variable in class org.apache.lucene.store.instantiated.InstantiatedTermDocs

currentToken - Variable in exception org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException
This is the last token that has been consumed successfully.
currentToken - Variable in exception org.apache.lucene.queryParser.ParseException
This is the last token that has been consumed successfully.
currentToken - Variable in exception org.apache.lucene.queryParser.standard.parser.ParseException
This is the last token that has been consumed successfully.
currentToken - Variable in exception org.apache.lucene.queryParser.surround.parser.ParseException
This is the last token that has been consumed successfully.
currentValue() - Method in class org.apache.lucene.analysis.CharArrayMap.EntryIterator
returns the value associated with the last key returned
cursor - Variable in class org.tartarus.snowball.SnowballProgram

curThr - Variable in class org.apache.lucene.index.pruning.TFTermPruningPolicy

CUSTOM - Static variable in class org.apache.lucene.search.SortField
Sort using a custom Comparator.
customExplain(int, Explanation, Explanation[]) - Method in class org.apache.lucene.search.function.CustomScoreProvider
Explain the custom score.
customExplain(int, Explanation, Explanation) - Method in class org.apache.lucene.search.function.CustomScoreProvider
Explain the custom score.
customScore(int, float, float[]) - Method in class org.apache.lucene.search.function.CustomScoreProvider
Compute a custom score by the subQuery score and a number of ValueSourceQuery scores.
customScore(int, float, float) - Method in class org.apache.lucene.search.function.CustomScoreProvider
Compute a custom score by the subQuery score and the ValueSourceQuery score.
CustomScoreProvider - Class in org.apache.lucene.search.function
An instance of this subclass should be returned by CustomScoreQuery.getCustomScoreProvider(org.apache.lucene.index.IndexReader), if you want to modify the custom score calculation of a CustomScoreQuery.
CustomScoreProvider(IndexReader) - Constructor for class org.apache.lucene.search.function.CustomScoreProvider
Creates a new instance of the provider class for the given IndexReader.
CustomScoreQuery - Class in org.apache.lucene.search.function
Query that sets document score as a programmatic function of several (sub) scores: the score of its subQuery (any query) (optional) the score of its ValueSourceQuery (or queries).
CustomScoreQuery(Query) - Constructor for class org.apache.lucene.search.function.CustomScoreQuery
Create a CustomScoreQuery over input subQuery.
CustomScoreQuery(Query, ValueSourceQuery) - Constructor for class org.apache.lucene.search.function.CustomScoreQuery
Create a CustomScoreQuery over input subQuery and a ValueSourceQuery.
CustomScoreQuery(Query, ValueSourceQuery...) - Constructor for class org.apache.lucene.search.function.CustomScoreQuery
Create a CustomScoreQuery over input subQuery and a ValueSourceQuery.
CYRILLIC - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

CZECH_STOP_WORDS - Static variable in class org.apache.lucene.analysis.cz.CzechAnalyzer
Deprecated. use CzechAnalyzer.getDefaultStopSet() instead
CzechAnalyzer - Class in org.apache.lucene.analysis.cz
Analyzer for Czech language.
CzechAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.cz.CzechAnalyzer
Builds an analyzer with the default stop words (CzechAnalyzer.getDefaultStopSet()).
CzechAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.cz.CzechAnalyzer
Builds an analyzer with the given stop words.
CzechAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.cz.CzechAnalyzer
Builds an analyzer with the given stop words and a set of work to be excluded from the CzechStemFilter.
CzechAnalyzer(Version, String...) - Constructor for class org.apache.lucene.analysis.cz.CzechAnalyzer
Deprecated. use CzechAnalyzer.CzechAnalyzer(Version, Set) instead
CzechAnalyzer(Version, HashSet<?>) - Constructor for class org.apache.lucene.analysis.cz.CzechAnalyzer
Deprecated. use CzechAnalyzer.CzechAnalyzer(Version, Set) instead
CzechAnalyzer(Version, File) - Constructor for class org.apache.lucene.analysis.cz.CzechAnalyzer
Deprecated. use CzechAnalyzer.CzechAnalyzer(Version, Set) instead
CzechStemFilter - Class in org.apache.lucene.analysis.cz
A TokenFilter that applies CzechStemmer to stem Czech words.
CzechStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.cz.CzechStemFilter

CzechStemmer - Class in org.apache.lucene.analysis.cz
Light Stemmer for Czech.
CzechStemmer() - Constructor for class org.apache.lucene.analysis.cz.CzechStemmer

D

DAMMA - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

DAMMATAN - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

DanishAnalyzer - Class in org.apache.lucene.analysis.da
Analyzer for Danish.
DanishAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.da.DanishAnalyzer
Builds an analyzer with the default stop words: DanishAnalyzer.DEFAULT_STOPWORD_FILE.
DanishAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.da.DanishAnalyzer
Builds an analyzer with the given stop words.
DanishAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.da.DanishAnalyzer
Builds an analyzer with the given stop words.
DanishStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
DanishStemmer() - Constructor for class org.tartarus.snowball.ext.DanishStemmer

data - Variable in class org.apache.lucene.index.Payload
the byte array containing the payload data
data - Variable in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode
The key to the node.
DataInput - Class in org.apache.lucene.store
Abstract base class for performing read operations of Lucene's low-level data types.
DataInput() - Constructor for class org.apache.lucene.store.DataInput

DataOutput - Class in org.apache.lucene.store
Abstract base class for performing write operations of Lucene's low-level data types.
DataOutput() - Constructor for class org.apache.lucene.store.DataOutput

DATE_FIELD - Static variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

DATE_MSEC_FIELD - Static variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

DATE_RESOLUTION - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set default DateTools.Resolution.
DATE_TYPE - Static variable in class org.apache.lucene.analysis.sinks.DateRecognizerSinkFilter

DateField - Class in org.apache.lucene.document
Deprecated. If you build a new index, use DateTools or NumericField instead. This class is included for use with existing indices and will be removed in a future release (possibly Lucene 4.0).
dateFormat - Variable in class org.apache.lucene.analysis.sinks.DateRecognizerSinkFilter

DateRecognizerSinkFilter - Class in org.apache.lucene.analysis.sinks
Attempts to parse the CharTermAttributeImpl.termBuffer() as a Date using a DateFormat.
DateRecognizerSinkFilter() - Constructor for class org.apache.lucene.analysis.sinks.DateRecognizerSinkFilter
Uses DateFormat.getDateInstance() as the DateFormat object.
DateRecognizerSinkFilter(DateFormat) - Constructor for class org.apache.lucene.analysis.sinks.DateRecognizerSinkFilter

DateResolutionAttribute - Interface in org.apache.lucene.queryParser.standard.config
Deprecated.
DateResolutionAttributeImpl - Class in org.apache.lucene.queryParser.standard.config
Deprecated.
DateResolutionAttributeImpl() - Constructor for class org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl
Deprecated.
DateTools - Class in org.apache.lucene.document
Provides support for converting dates to strings and vice-versa.
DateTools.Resolution - Enum in org.apache.lucene.document
Specifies the time granularity.
dateToString(Date) - Static method in class org.apache.lucene.document.DateField
Deprecated. Converts a Date to a string suitable for indexing.
dateToString(Date, DateTools.Resolution) - Static method in class org.apache.lucene.document.DateTools
Converts a Date to a string suitable for indexing.
DBBI_AVAILABLE - Static variable in class org.apache.lucene.analysis.th.ThaiWordFilter
True if the JRE supports a working dictionary-based breakiterator for Thai.
debugStream - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager
Debug output.
debugStream - Variable in class org.apache.lucene.queryParser.QueryParserTokenManager
Debug output.
debugStream - Variable in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager
Debug output.
debugStream - Variable in class org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager
Debug output.
Decl() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser

DeclName - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
decode(BytesRef, ByteArrayDataInput) - Method in class org.apache.lucene.search.suggest.SortedTermFreqIteratorWrapper

decode(String) - Static method in class org.apache.lucene.spatial.geohash.GeoHashUtils
Deprecated. Decodes the given geohash into a latitude and longitude
decode() - Method in class org.apache.lucene.util.encoding.DGapIntDecoder

decode() - Method in class org.apache.lucene.util.encoding.EightFlagsIntDecoder

decode() - Method in class org.apache.lucene.util.encoding.FourFlagsIntDecoder

decode() - Method in class org.apache.lucene.util.encoding.IntDecoder
Decodes data received from the input stream, and returns one decoded integer.
decode() - Method in class org.apache.lucene.util.encoding.NOnesIntDecoder

decode() - Method in class org.apache.lucene.util.encoding.SimpleIntDecoder

decode() - Method in class org.apache.lucene.util.encoding.VInt8IntDecoder

decode(CharBuffer, ByteBuffer) - Static method in class org.apache.lucene.util.IndexableBinaryStringTools
Deprecated. Use IndexableBinaryStringTools.decode(char[], int, int, byte[], int, int) instead. This method will be removed in Lucene 4.0
decode(char[], int, int, byte[], int, int) - Static method in class org.apache.lucene.util.IndexableBinaryStringTools
Decodes the input char sequence into the output byte sequence.
decode(CharBuffer) - Static method in class org.apache.lucene.util.IndexableBinaryStringTools
Deprecated. Use IndexableBinaryStringTools.decode(char[], int, int, byte[], int, int) instead. This method will be removed in Lucene 4.0
decode(byte[], Vint8.Position) - Static method in class org.apache.lucene.util.Vint8
Decodes a 32-bit integer from bytes, beginning at offset pos.pos.
decode(InputStream) - Static method in class org.apache.lucene.util.Vint8
Decodes a 32-bit integer from bytes read from in.
decodeFloat(byte[]) - Static method in class org.apache.lucene.analysis.payloads.PayloadHelper

decodeFloat(byte[], int) - Static method in class org.apache.lucene.analysis.payloads.PayloadHelper
Decode the payload that was encoded using PayloadHelper.encodeFloat(float).
decodeInt(byte[], int) - Static method in class org.apache.lucene.analysis.payloads.PayloadHelper

decodeNorm(byte) - Static method in class org.apache.lucene.search.Similarity
Deprecated. Use Similarity.decodeNormValue(byte) instead.
decodeNormValue(byte) - Method in class org.apache.lucene.search.Similarity
Decodes a normalization factor stored in an index.
decompose() - Method in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
Decomposes the current CompoundWordTokenFilterBase.termAtt and places CompoundWordTokenFilterBase.CompoundToken instances in the CompoundWordTokenFilterBase.tokens list.
decompose() - Method in class org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter

decompose() - Method in class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter

decompose(CharSequence) - Method in class org.egothor.stemmer.MultiTrie2
Break the given patch command into its constituent pieces.
decompress(byte[]) - Static method in class org.apache.lucene.document.CompressionTools
Decompress the byte array previously returned by compress
decompressString(byte[]) - Static method in class org.apache.lucene.document.CompressionTools
Decompress the byte array previously returned by compressString back into a String
decRef() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader
Expert: decreases the refCount of this TaxonomyReader instance.
decRef() - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyReader
Expert: decreases the refCount of this TaxonomyReader instance.
decRef() - Method in class org.apache.lucene.index.IndexReader
Expert: decreases the refCount of this IndexReader instance.
decRef(IndexSearcher) - Method in class org.apache.lucene.search.NRTManager

decRef(G) - Method in class org.apache.lucene.search.ReferenceManager
Decrement reference counting on the given reference.
decRef(IndexSearcher) - Method in class org.apache.lucene.search.SearcherManager

deepCopyOf(BytesRef) - Static method in class org.apache.lucene.util.BytesRef
Creates a new BytesRef that points to a copy of the bytes from other
deepCopyOf(CharsRef) - Static method in class org.apache.lucene.util.CharsRef
Creates a new CharsRef that points to a copy of the chars from other
deepCopyOf(IntsRef) - Static method in class org.apache.lucene.util.IntsRef
Creates a new IntsRef that points to a copy of the ints from other
DEFALT_FIELD_PREFIX - Static variable in class org.apache.lucene.spatial.tier.projections.CartesianTierPlotter
Deprecated.
DEFAULT - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

DEFAULT - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
Lexical state.
DEFAULT - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
Lexical state.
DEFAULT - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
Lexical state.
DEFAULT - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
Lexical state.
DEFAULT - Static variable in class org.apache.lucene.search.ChainedFilter
Logical operation when none is declared.
DEFAULT - Static variable in interface org.apache.lucene.search.FieldCache
Expert: The cache used internally by sorting and range query classes.
DEFAULT_ACCURACY - Static variable in class org.apache.lucene.search.spell.SpellChecker
The default minimum score to use, if not specified by calling SpellChecker.setAccuracy(float) .
DEFAULT_ANALYZER - Static variable in class org.apache.lucene.analysis.miscellaneous.PatternAnalyzer
A lower-casing word analyzer with English stop words (can be shared freely across threads without harm); global per class loader.
DEFAULT_ANALYZER - Static variable in class org.apache.lucene.search.similar.MoreLikeThis
Deprecated. This default will be removed in Lucene 4.0 (with the default being null). If you are not using term vectors, explicitly set your analyzer instead.
DEFAULT_ATTRIBUTE_FACTORY - Static variable in class org.apache.lucene.util.AttributeSource.AttributeFactory
This is the default factory that creates AttributeImpls using the class name of the supplied Attribute interface class by appending Impl to it.
DEFAULT_BOOST - Static variable in class org.apache.lucene.search.similar.MoreLikeThis
Boost terms in query based on score.
DEFAULT_BOUNDARY_CHARS - Static variable in class org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner

DEFAULT_BUCKETS - Static variable in class org.apache.lucene.search.suggest.fst.FSTCompletion
Default number of buckets.
DEFAULT_BUCKETS - Static variable in class org.apache.lucene.search.suggest.fst.FSTCompletionBuilder
Default number of buckets.
DEFAULT_BUFFERED_BLOCKS - Static variable in class org.apache.lucene.util.RecyclingByteBlockAllocator

DEFAULT_BYTE_PARSER - Static variable in interface org.apache.lucene.search.FieldCache
The default parser for byte values, which are encoded by Byte.toString(byte)
DEFAULT_CACHE_CLEAN_SIZE - Static variable in class org.apache.lucene.search.FilterManager
Deprecated. The default maximum number of Filters in the cache
DEFAULT_CACHE_SIZE - Static variable in class org.apache.lucene.facet.search.TotalFacetCountsCache
Default size of in memory cache for computed total facet counts.
DEFAULT_CACHE_SLEEP_TIME - Static variable in class org.apache.lucene.search.FilterManager
Deprecated. The default frequency of cache cleanup
DEFAULT_CAPACITY - Static variable in class org.apache.lucene.util.BytesRefHash

DEFAULT_COMPARATOR - Static variable in class org.apache.lucene.search.spell.SuggestWordQueue

DEFAULT_COMPARATOR - Static variable in class org.apache.lucene.search.suggest.fst.Sort

DEFAULT_COMPLEMENT_THRESHOLD - Static variable in class org.apache.lucene.facet.search.FacetsAccumulator
Default threshold for using the complements optimization.
DEFAULT_DELIMITER - Static variable in class org.apache.lucene.analysis.path.PathHierarchyTokenizer

DEFAULT_DELIMITER - Static variable in class org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

DEFAULT_DELIMITER - Static variable in class org.apache.lucene.analysis.payloads.DelimitedPayloadTokenFilter

DEFAULT_DEPTH - Static variable in class org.apache.lucene.facet.search.params.FacetRequest
Default depth for facets accumulation.
DEFAULT_DOC_DELETE_STEP - Static variable in class org.apache.lucene.benchmark.byTask.tasks.DeleteDocTask
Gap between ids of deleted docs, applies when no docid param is provided.
DEFAULT_DOUBLE_PARSER - Static variable in interface org.apache.lucene.search.FieldCache
The default parser for double values, which are encoded by Double.toString(double)
DEFAULT_EPSILON - Static variable in class org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy
Default largest meaningless score difference
DEFAULT_EXTENSION_FIELD_DELIMITER - Static variable in class org.apache.lucene.queryParser.ext.Extensions
The default extension field delimiter character.
DEFAULT_FACET_DELIM_CHAR - Static variable in class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams
delimiter between a categories in a path, e.g.
DEFAULT_FIELD_MATCH - Static variable in class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter

DEFAULT_FIELD_NAMES - Static variable in class org.apache.lucene.search.similar.MoreLikeThis
Default field names.
DEFAULT_FIELDS - Static variable in class org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask
Fields to be written by default
DEFAULT_FLOAT_PARSER - Static variable in interface org.apache.lucene.search.FieldCache
The default parser for float values, which are encoded by Float.toString(float)
DEFAULT_INT_PARSER - Static variable in interface org.apache.lucene.search.FieldCache
The default parser for int values, which are encoded by Integer.toString(int)
DEFAULT_LOG_STEP - Static variable in class org.apache.lucene.benchmark.Constants

DEFAULT_LONG_PARSER - Static variable in interface org.apache.lucene.search.FieldCache
The default parser for long values, which are encoded by Long.toString(long)
DEFAULT_MAX_BUFF - Static variable in class org.apache.lucene.store.MMapDirectory

DEFAULT_MAX_BUFFERED - Static variable in class org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask

DEFAULT_MAX_BUFFERED_DELETE_TERMS - Static variable in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.DEFAULT_MAX_BUFFERED_DELETE_TERMS instead
DEFAULT_MAX_BUFFERED_DELETE_TERMS - Static variable in class org.apache.lucene.index.IndexWriterConfig
Disabled by default (because IndexWriter flushes by RAM usage by default).
DEFAULT_MAX_BUFFERED_DOCS - Static variable in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.DEFAULT_MAX_BUFFERED_DOCS instead.
DEFAULT_MAX_BUFFERED_DOCS - Static variable in class org.apache.lucene.index.IndexWriterConfig
Disabled by default (because IndexWriter flushes by RAM usage by default).
DEFAULT_MAX_CHARS_TO_ANALYZE - Static variable in class org.apache.lucene.search.highlight.Highlighter

DEFAULT_MAX_DOC_FREQ - Static variable in class org.apache.lucene.search.similar.MoreLikeThis
Ignore words which occur in more than this many docs.
DEFAULT_MAX_FIELD_LENGTH - Static variable in class org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask

DEFAULT_MAX_FIELD_LENGTH - Static variable in class org.apache.lucene.index.IndexWriter
Deprecated. see IndexWriterConfig
DEFAULT_MAX_GRAM_SIZE - Static variable in class org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter

DEFAULT_MAX_GRAM_SIZE - Static variable in class org.apache.lucene.analysis.ngram.EdgeNGramTokenizer

DEFAULT_MAX_MERGE_DOCS - Static variable in class org.apache.lucene.index.LogMergePolicy
Default maximum segment size.
DEFAULT_MAX_MERGE_MB - Static variable in class org.apache.lucene.index.LogByteSizeMergePolicy
Default maximum segment size.
DEFAULT_MAX_MERGE_MB_FOR_FORCED_MERGE - Static variable in class org.apache.lucene.index.LogByteSizeMergePolicy
Default maximum segment size.
DEFAULT_MAX_NGRAM_SIZE - Static variable in class org.apache.lucene.analysis.ngram.NGramTokenFilter

DEFAULT_MAX_NGRAM_SIZE - Static variable in class org.apache.lucene.analysis.ngram.NGramTokenizer

DEFAULT_MAX_NUM_TOKENS_PARSED - Static variable in class org.apache.lucene.search.similar.MoreLikeThis
Default maximum number of tokens to parse in each example doc field that is not stored with TermVector support.
DEFAULT_MAX_QUERY_TERMS - Static variable in class org.apache.lucene.search.similar.MoreLikeThis
Return a Query with no more than this many terms.
DEFAULT_MAX_SAMPLE_SIZE - Static variable in class org.apache.lucene.facet.search.sampling.SamplingParams
Default maximum size of sample.
DEFAULT_MAX_SCAN - Static variable in class org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner

DEFAULT_MAX_SHINGLE_SIZE - Static variable in class org.apache.lucene.analysis.shingle.ShingleFilter
default maximum shingle size is 2.
DEFAULT_MAX_SUBWORD_SIZE - Static variable in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
The default for maximal length of subwords that get propagated to the output of this filter
DEFAULT_MAX_THREAD_STATES - Static variable in class org.apache.lucene.index.IndexWriterConfig
The maximum number of simultaneous threads that may be indexing documents at once in IndexWriter; if more than this many threads arrive they will wait for others to finish.
DEFAULT_MAX_TOKEN_LENGTH - Static variable in class org.apache.lucene.analysis.MockTokenizer

DEFAULT_MAX_TOKEN_LENGTH - Static variable in class org.apache.lucene.analysis.standard.ClassicAnalyzer
Default maximum allowed token length
DEFAULT_MAX_TOKEN_LENGTH - Static variable in class org.apache.lucene.analysis.standard.StandardAnalyzer
Default maximum allowed token length
DEFAULT_MAX_TOKEN_LENGTH - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailAnalyzer
Default maximum allowed token length
DEFAULT_MAX_WORD_LENGTH - Static variable in class org.apache.lucene.search.similar.MoreLikeThis
Ignore words greater than this length or if 0 then this has no effect.
DEFAULT_MAXIMUM_DOCUMENTS - Static variable in class org.apache.lucene.benchmark.Constants

DEFAULT_MERGE_FACTOR - Static variable in class org.apache.lucene.index.LogMergePolicy
Default merge factor, which is how many segments are merged at a time
DEFAULT_MERGE_PFACTOR - Static variable in class org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask

DEFAULT_MIN_DOC_FREQ - Static variable in class org.apache.lucene.search.similar.MoreLikeThis
Ignore words which do not occur in at least this many docs.
DEFAULT_MIN_GRAM_SIZE - Static variable in class org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter

DEFAULT_MIN_GRAM_SIZE - Static variable in class org.apache.lucene.analysis.ngram.EdgeNGramTokenizer

DEFAULT_MIN_LENGTH - Static variable in class org.apache.lucene.analysis.stempel.StempelFilter
Minimum length of input words to be processed.
DEFAULT_MIN_MERGE_DOCS - Static variable in class org.apache.lucene.index.LogDocMergePolicy
Default minimum segment size.
DEFAULT_MIN_MERGE_MB - Static variable in class org.apache.lucene.index.LogByteSizeMergePolicy
Default minimum segment size.
DEFAULT_MIN_NGRAM_SIZE - Static variable in class org.apache.lucene.analysis.ngram.NGramTokenFilter

DEFAULT_MIN_NGRAM_SIZE - Static variable in class org.apache.lucene.analysis.ngram.NGramTokenizer

DEFAULT_MIN_SAMPLE_SIZE - Static variable in class org.apache.lucene.facet.search.sampling.SamplingParams
Default minimum size of sample.
DEFAULT_MIN_SHINGLE_SIZE - Static variable in class org.apache.lucene.analysis.shingle.ShingleFilter
default minimum shingle size is 2.
DEFAULT_MIN_SUBWORD_SIZE - Static variable in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
The default for minimal length of subwords that get propagated to the output of this filter
DEFAULT_MIN_TERM_FREQ - Static variable in class org.apache.lucene.search.similar.MoreLikeThis
Ignore terms with less than this frequency in the source doc.
DEFAULT_MIN_WORD_LENGTH - Static variable in class org.apache.lucene.search.similar.MoreLikeThis
Ignore words less than this length or if 0 then this has no effect.
DEFAULT_MIN_WORD_SIZE - Static variable in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
The default for minimal word length that gets decomposed
DEFAULT_MIN_WRITTEN_BYTES - Static variable in class org.apache.lucene.util.ThrottledIndexOutput

DEFAULT_MINIMAL_SUBPATH_LENGTH - Variable in class org.apache.lucene.facet.index.categorypolicy.NonTopLevelPathPolicy
The shortest path length delivered is two components (root + one child).
DEFAULT_MINIMUM_LENGTH - Static variable in class org.apache.lucene.analysis.ja.JapaneseKatakanaStemFilter

DEFAULT_MODE - Static variable in class org.apache.lucene.analysis.ja.JapaneseTokenizer
Default tokenization mode.
DEFAULT_NO_CFS_RATIO - Static variable in class org.apache.lucene.index.LogMergePolicy
Default noCFSRatio.
DEFAULT_NUM_LARGE_SEGMENTS - Static variable in class org.apache.lucene.index.BalancedSegmentMergePolicy

DEFAULT_OPERATOR - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set the default boolean operator
DEFAULT_OVERSAMPLE_FACTOR - Static variable in class org.apache.lucene.facet.search.sampling.SamplingParams
Default factor by which more results are requested over the sample set.
DEFAULT_PATH_TYPE - Static variable in class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
trec parser type used for unknown extensions
DEFAULT_PHRASE_HIGHLIGHT - Static variable in class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter

DEFAULT_R - Static variable in class org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy
Default number of query terms
DEFAULT_RAM_BUFFER_SIZE_MB - Static variable in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.DEFAULT_RAM_BUFFER_SIZE_MB instead.
DEFAULT_RAM_BUFFER_SIZE_MB - Static variable in class org.apache.lucene.index.IndexWriterConfig
Default value is 16 MB (which means flush when buffered docs consume approximately 16 MB RAM).
DEFAULT_RAM_FLUSH_MB - Static variable in class org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask

DEFAULT_READ_CHUNK_SIZE - Static variable in class org.apache.lucene.store.FSDirectory
Default read chunk size.
DEFAULT_READER_POOLING - Static variable in class org.apache.lucene.index.IndexWriterConfig
Default setting for IndexWriterConfig.setReaderPooling(boolean).
DEFAULT_READER_TERMS_INDEX_DIVISOR - Static variable in class org.apache.lucene.index.IndexWriterConfig
Default value is 1.
DEFAULT_RESOLUTION - Static variable in class org.apache.lucene.search.TimeLimitingCollector.TimerThread

DEFAULT_RESULT_MODE - Static variable in class org.apache.lucene.facet.search.params.FacetRequest
Default result mode
DEFAULT_RUN_COUNT - Static variable in class org.apache.lucene.benchmark.Constants

DEFAULT_SAMPLE_RATIO - Static variable in class org.apache.lucene.facet.search.sampling.SamplingParams
Default ratio between size of sample to original size of document set.
DEFAULT_SAMPLING_THRESHOLD - Static variable in class org.apache.lucene.facet.search.sampling.SamplingParams
Default sampling threshold, if number of results is less than this number - no sampling will take place
DEFAULT_SCALE_UP - Static variable in class org.apache.lucene.benchmark.Constants

DEFAULT_SCORE - Static variable in interface org.apache.lucene.facet.search.ScoredDocIDsIterator
Default score used in case scoring is disabled.
DEFAULT_SHORT_PARSER - Static variable in interface org.apache.lucene.search.FieldCache
The default parser for short values, which are encoded by Short.toString(short)
DEFAULT_SIDE - Static variable in class org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter

DEFAULT_SIDE - Static variable in class org.apache.lucene.analysis.ngram.EdgeNGramTokenizer

DEFAULT_SKIP - Static variable in class org.apache.lucene.analysis.path.PathHierarchyTokenizer

DEFAULT_SKIP - Static variable in class org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

DEFAULT_SORT_BY - Static variable in class org.apache.lucene.facet.search.params.FacetRequest
Default sort mode.
DEFAULT_STEMMER_FILE - Static variable in class org.apache.lucene.analysis.pl.PolishAnalyzer
File containing default Polish stemmer table.
DEFAULT_STOP_WORDS - Static variable in class org.apache.lucene.search.similar.MoreLikeThis
Default set of stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.ar.ArabicAnalyzer
File containing default Arabic stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.bg.BulgarianAnalyzer
File containing default Bulgarian stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.br.BrazilianAnalyzer
File containing default Brazilian Portuguese stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.ca.CatalanAnalyzer
File containing default Catalan stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.cz.CzechAnalyzer
File containing default Czech stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.da.DanishAnalyzer
File containing default Danish stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.de.GermanAnalyzer
File containing default German stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.el.GreekAnalyzer
File containing default Greek stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.es.SpanishAnalyzer
File containing default Spanish stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.eu.BasqueAnalyzer
File containing default Basque stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.fa.PersianAnalyzer
File containing default Persian stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.fi.FinnishAnalyzer
File containing default Italian stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.fr.FrenchAnalyzer
File containing default French stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.ga.IrishAnalyzer
File containing default Irish stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.gl.GalicianAnalyzer
File containing default Galician stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.hi.HindiAnalyzer
File containing default Hindi stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.hu.HungarianAnalyzer
File containing default Hungarian stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.hy.ArmenianAnalyzer
File containing default Armenian stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.id.IndonesianAnalyzer
File containing default Indonesian stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.it.ItalianAnalyzer
File containing default Italian stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.lv.LatvianAnalyzer
File containing default Latvian stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.nl.DutchAnalyzer
File containing default Dutch stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.no.NorwegianAnalyzer
File containing default Norwegian stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.pl.PolishAnalyzer
File containing default Polish stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.pt.PortugueseAnalyzer
File containing default Portuguese stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.ro.RomanianAnalyzer
File containing default Romanian stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.ru.RussianAnalyzer
File containing default Russian stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.sv.SwedishAnalyzer
File containing default Swedish stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.th.ThaiAnalyzer
File containing default Thai stopwords.
DEFAULT_STOPWORD_FILE - Static variable in class org.apache.lucene.analysis.tr.TurkishAnalyzer
File containing default Turkish stopwords.
DEFAULT_SUFFICIENT_FIELDS - Static variable in class org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask
Default fields which at least one of them is required to not skip the doc.
DEFAULT_TERM - Static variable in class org.apache.lucene.facet.index.params.CategoryListParams
The default term used to store the facets information.
DEFAULT_TERM_INDEX_INTERVAL - Static variable in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.DEFAULT_TERM_INDEX_INTERVAL instead.
DEFAULT_TERM_INDEX_INTERVAL - Static variable in class org.apache.lucene.index.IndexWriterConfig
Default value is 128.
DEFAULT_TOKEN_TYPE - Static variable in class org.apache.lucene.analysis.shingle.ShingleFilter
default token type attribute value is "shingle"
DEFAULT_TOP_K - Static variable in class org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy
Default number of guaranteed top K scores
DEFAULT_TYPE - Static variable in interface org.apache.lucene.analysis.tokenattributes.TypeAttribute
the default type
DefaultEncoder - Class in org.apache.lucene.search.highlight
Simple Encoder implementation that does not modify the output
DefaultEncoder() - Constructor for class org.apache.lucene.search.highlight.DefaultEncoder

DefaultEnhancementsIndexingParams - Class in org.apache.lucene.facet.enhancements.params
Default implementation of EnhancementsIndexingParams
DefaultEnhancementsIndexingParams(CategoryEnhancement...) - Constructor for class org.apache.lucene.facet.enhancements.params.DefaultEnhancementsIndexingParams
Construct with a certain enhancement
DefaultEnhancementsIndexingParams(CategoryListParams, CategoryEnhancement...) - Constructor for class org.apache.lucene.facet.enhancements.params.DefaultEnhancementsIndexingParams
Construct with certain enhancements and CategoryListParams
DefaultFacetIndexingParams - Class in org.apache.lucene.facet.index.params
Default implementation for FacetIndexingParams.
DefaultFacetIndexingParams() - Constructor for class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams

DefaultFacetIndexingParams(CategoryListParams) - Constructor for class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams

DefaultICUTokenizerConfig - Class in org.apache.lucene.analysis.icu.segmentation
Default ICUTokenizerConfig that is generally applicable to many languages.
DefaultICUTokenizerConfig() - Constructor for class org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig

DefaultLoadFactor - Static variable in class org.apache.lucene.facet.taxonomy.writercache.cl2o.CompactLabelToOrdinal

defaultMaxDocFreqPercent - Static variable in class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer

defaultMaxExpansions - Static variable in class org.apache.lucene.search.FuzzyQuery

defaultMinSimilarity - Static variable in class org.apache.lucene.search.FuzzyQuery

DEFAULTnumTerms - Static variable in class org.apache.lucene.misc.HighFreqTerms

DefaultOperatorAttribute - Interface in org.apache.lucene.queryParser.standard.config
Deprecated.
DefaultOperatorAttribute.Operator - Enum in org.apache.lucene.queryParser.standard.config
Deprecated.
DefaultOperatorAttributeImpl - Class in org.apache.lucene.queryParser.standard.config
Deprecated.
DefaultOperatorAttributeImpl() - Constructor for class org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl
Deprecated.
DefaultOrdinalPolicy - Class in org.apache.lucene.facet.index.categorypolicy
This class filters our the ROOT category ID.
DefaultOrdinalPolicy() - Constructor for class org.apache.lucene.facet.index.categorypolicy.DefaultOrdinalPolicy

DefaultPathPolicy - Class in org.apache.lucene.facet.index.categorypolicy
This class filters our the ROOT category path.
DefaultPathPolicy() - Constructor for class org.apache.lucene.facet.index.categorypolicy.DefaultPathPolicy

DefaultPhraseSlopAttribute - Interface in org.apache.lucene.queryParser.standard.config
Deprecated.
DefaultPhraseSlopAttributeImpl - Class in org.apache.lucene.queryParser.standard.config
Deprecated.
DefaultPhraseSlopAttributeImpl() - Constructor for class org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl
Deprecated.
DefaultPhraseSlopQueryNodeProcessor - Class in org.apache.lucene.queryParser.standard.processors
This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.PHRASE_SLOP is defined in the QueryConfigHandler.
DefaultPhraseSlopQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.DefaultPhraseSlopQueryNodeProcessor

defaultPrefixLength - Static variable in class org.apache.lucene.search.FuzzyQuery

defaultSettingsCodec - Static variable in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated.
DefaultSimilarity - Class in org.apache.lucene.search
Expert: Default scoring implementation.
DefaultSimilarity() - Constructor for class org.apache.lucene.search.DefaultSimilarity

defaultSpacerCharacter - Static variable in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated.
defaultTaxonomyWriterCache() - Static method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Defines the default TaxonomyWriterCache to use in constructors which do not specify one.
defaultTempDir() - Static method in class org.apache.lucene.search.suggest.fst.Sort
Returns the default temporary directory.
defThreshold - Variable in class org.apache.lucene.index.pruning.TFTermPruningPolicy

DEG_180_AS_RADS - Static variable in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
DEG_225_AS_RADS - Static variable in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
DEG_270_AS_RADS - Static variable in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
DEG_45_AS_RADS - Static variable in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
DEG_90_AS_RADS - Static variable in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
DEGREES_TO_RADIANS - Static variable in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
DEL_ALL - Static variable in class org.apache.lucene.index.pruning.PruningPolicy
Delete all data for this field.
DEL_PAYLOADS - Static variable in class org.apache.lucene.index.pruning.PruningPolicy
Delete (some or all) payloads in these fields.
DEL_POSTINGS - Static variable in class org.apache.lucene.index.pruning.PruningPolicy
Delete (some or all) postings for this field.
DEL_STORED - Static variable in class org.apache.lucene.index.pruning.PruningPolicy
Delete (some or all) stored values for this field.
DEL_VECTOR - Static variable in class org.apache.lucene.index.pruning.PruningPolicy
Delete term frequency vectors for this field (whole vectors or individual terms).
delCount - Variable in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

DELETABLE - Static variable in class org.apache.lucene.index.IndexFileNames
Name of the index deletable file (only used in pre-lockless indices)
delete(char[], int, int) - Static method in class org.apache.lucene.analysis.util.StemmerUtil
Delete a character in-place
delete() - Method in class org.apache.lucene.index.IndexCommit
Delete this commit point.
delete() - Method in class org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint

deleteAll() - Method in class org.apache.lucene.index.IndexWriter
Delete all documents in the index.
deleteAll - Variable in class org.apache.lucene.index.pruning.StorePruningPolicy
Fields to be completely deleted
deleteAll() - Method in class org.apache.lucene.index.RandomIndexWriter

deleteAll() - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

DeleteByPercentTask - Class in org.apache.lucene.benchmark.byTask.tasks
Deletes a percentage of documents from an index randomly over the number of documents.
DeleteByPercentTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.DeleteByPercentTask

deletedDocs - Variable in class org.apache.lucene.index.SegmentWriteState

DeleteDocTask - Class in org.apache.lucene.benchmark.byTask.tasks
Delete a document by docid.
DeleteDocTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.DeleteDocTask

deleteDocument(int) - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
deleteDocuments(Term) - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
deleteDocuments(Term) - Method in class org.apache.lucene.index.IndexWriter
Deletes the document(s) containing term.
deleteDocuments(Term...) - Method in class org.apache.lucene.index.IndexWriter
Deletes the document(s) containing any of the terms.
deleteDocuments(Query) - Method in class org.apache.lucene.index.IndexWriter
Deletes the document(s) matching the provided query.
deleteDocuments(Query...) - Method in class org.apache.lucene.index.IndexWriter
Deletes the document(s) matching any of the provided queries.
deleteDocuments(Term) - Method in class org.apache.lucene.index.RandomIndexWriter

deleteDocuments(Query) - Method in class org.apache.lucene.index.RandomIndexWriter

deleteDocuments(Term) - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

deleteDocuments(Term) - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

deleteDocuments(Term...) - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

deleteDocuments(Query) - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

deleteDocuments(Query...) - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

deleteDocuments(Term) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
deleteDocuments(Term[]) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
DeletedQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A DeletedQueryNode represents a node that was deleted from the query node tree.
DeletedQueryNode() - Constructor for class org.apache.lucene.queryParser.core.nodes.DeletedQueryNode

deleteFile(String) - Method in class org.apache.lucene.store.Directory
Removes an existing file in the directory.
deleteFile(String) - Method in class org.apache.lucene.store.FileSwitchDirectory

deleteFile(String) - Method in class org.apache.lucene.store.FSDirectory
Removes an existing file in the directory.
deleteFile(String) - Method in class org.apache.lucene.store.MockDirectoryWrapper

deleteFile(String) - Method in class org.apache.lucene.store.NRTCachingDirectory

deleteFile(String) - Method in class org.apache.lucene.store.RAMDirectory
Removes an existing file in the directory.
deleteLast(int, Builder.Node) - Method in class org.apache.lucene.util.fst.Builder.UnCompiledNode

deleteN(char[], int, int, int) - Static method in class org.apache.lucene.analysis.util.StemmerUtil
Delete n characters in-place
DELETES_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of deletes
deleteUnusedFiles() - Method in class org.apache.lucene.index.IndexWriter
Expert: remove any index files that are no longer used.
deletionsFileName - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
Name of the current deletions file name.
delFields - Variable in class org.apache.lucene.index.pruning.StorePruningPolicy

DelimitedPayloadTokenFilter - Class in org.apache.lucene.analysis.payloads
Characters before the delimiter are the "token", those after are the payload.
DelimitedPayloadTokenFilter(TokenStream, char, PayloadEncoder) - Constructor for class org.apache.lucene.analysis.payloads.DelimitedPayloadTokenFilter

DELIMITER - Static variable in class org.apache.lucene.analysis.cn.smart.CharType
Punctuation Characters
DELIMITER - Static variable in class org.apache.lucene.analysis.cn.smart.WordType
Punctuation Symbol
delTermCount - Variable in class org.apache.lucene.index.PruningReader

delVecCount - Variable in class org.apache.lucene.index.PruningReader

DemoHTMLParser - Class in org.apache.lucene.benchmark.byTask.feeds
HTML Parser that is based on Lucene's demo HTML parser.
DemoHTMLParser() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.DemoHTMLParser

depth - Variable in class org.apache.lucene.util.fst.Builder.UnCompiledNode
This node's depth, starting from the automaton root.
describeParams() - Method in class org.apache.lucene.search.similar.MoreLikeThis
Describe the parameters that control how the "more like this" query is formed.
description() - Method in class org.apache.lucene.search.function.ByteFieldSource

description() - Method in class org.apache.lucene.search.function.FieldCacheSource

description() - Method in class org.apache.lucene.search.function.FloatFieldSource

description() - Method in class org.apache.lucene.search.function.IntFieldSource

description() - Method in class org.apache.lucene.search.function.OrdFieldSource

description() - Method in class org.apache.lucene.search.function.ReverseOrdFieldSource

description() - Method in class org.apache.lucene.search.function.ShortFieldSource

description() - Method in class org.apache.lucene.search.function.ValueSource
description of field, used in explain()
description - Variable in enum org.apache.lucene.util.RamUsageEstimator.JvmFeature

deserializeCategoryAttribute(ObjectInputStream) - Method in class org.apache.lucene.facet.index.CategoryContainer
De-Serialize each of the CategoryAttributes from the given ObjectInputStream.
deserializeFromStreamReader(InputStreamReader) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Serializes the content of this CategoryPath to a byte stream, using UTF-8 encoding to convert characters to bytes, and treating the ends as 16-bit characters.
DGapIntDecoder - Class in org.apache.lucene.util.encoding
An IntDecoder which wraps another IntDecoder and reverts the d-gap that was encoded by DGapIntEncoder.
DGapIntDecoder(IntDecoder) - Constructor for class org.apache.lucene.util.encoding.DGapIntDecoder

DGapIntEncoder - Class in org.apache.lucene.util.encoding
An IntEncoderFilter which encodes the gap between the given values, rather than the values themselves.
DGapIntEncoder(IntEncoder) - Constructor for class org.apache.lucene.util.encoding.DGapIntEncoder
Initializes with the given encoder.
diagnostics - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
Map that includes certain debugging details that IndexWriter records into each segment it creates
DICT_FILENAME_SUFFIX - Static variable in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

DICT_HEADER - Static variable in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

dictionary - Variable in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

Dictionary - Interface in org.apache.lucene.analysis.ja.dict
Dictionary interface for retrieving morphological data by id.
Dictionary - Interface in org.apache.lucene.search.spell
A simple interface representing a Dictionary.
DictionaryCompoundWordTokenFilter - Class in org.apache.lucene.analysis.compound
A TokenFilter that decomposes compound words found in many Germanic languages.
DictionaryCompoundWordTokenFilter(TokenStream, String[], int, int, int, boolean) - Constructor for class org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter
Deprecated. use DictionaryCompoundWordTokenFilter.DictionaryCompoundWordTokenFilter(Version, TokenStream, String[], int, int, int, boolean) instead
DictionaryCompoundWordTokenFilter(TokenStream, String[]) - Constructor for class org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter
Deprecated. use DictionaryCompoundWordTokenFilter.DictionaryCompoundWordTokenFilter(Version, TokenStream, String[]) instead
DictionaryCompoundWordTokenFilter(TokenStream, Set) - Constructor for class org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter
Deprecated. use DictionaryCompoundWordTokenFilter.DictionaryCompoundWordTokenFilter(Version, TokenStream, Set) instead
DictionaryCompoundWordTokenFilter(TokenStream, Set, int, int, int, boolean) - Constructor for class org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter
Deprecated. use DictionaryCompoundWordTokenFilter.DictionaryCompoundWordTokenFilter(Version, TokenStream, Set, int, int, int, boolean) instead
DictionaryCompoundWordTokenFilter(Version, TokenStream, String[], int, int, int, boolean) - Constructor for class org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter
Deprecated. Use the constructors taking Set
DictionaryCompoundWordTokenFilter(Version, TokenStream, String[]) - Constructor for class org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter
Deprecated. Use the constructors taking Set
DictionaryCompoundWordTokenFilter(Version, TokenStream, Set<?>) - Constructor for class org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter
Creates a new DictionaryCompoundWordTokenFilter
DictionaryCompoundWordTokenFilter(Version, TokenStream, Set<?>, int, int, int, boolean) - Constructor for class org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter
Creates a new DictionaryCompoundWordTokenFilter
Diff - Class in org.egothor.stemmer
The Diff object generates a patch string.
Diff() - Constructor for class org.egothor.stemmer.Diff
Constructor for the Diff object.
Diff(int, int, int, int) - Constructor for class org.egothor.stemmer.Diff
Constructor for the Diff object
difference() - Method in class org.apache.lucene.search.FilteredTermEnum
Equality measure on the term
difference() - Method in class org.apache.lucene.search.FuzzyTermEnum
Equality measure on the term
difference() - Method in class org.apache.lucene.search.PrefixTermEnum

difference() - Method in class org.apache.lucene.search.regex.RegexTermEnum

difference() - Method in class org.apache.lucene.search.SingleTermEnum

difference() - Method in class org.apache.lucene.search.TermRangeTermEnum

difference() - Method in class org.apache.lucene.search.WildcardTermEnum

DiffIt - Class in org.egothor.stemmer
The DiffIt class is a means generate patch commands from an already prepared stemmer table.
DiffIt() - Constructor for class org.egothor.stemmer.DiffIt

DIGIT - Static variable in class org.apache.lucene.analysis.cn.smart.CharType
Numeric Digits
dir - Variable in class org.apache.lucene.index.CheckIndex.Status
Directory index is in.
dir - Variable in class org.apache.lucene.index.ConcurrentMergeScheduler

dir - Variable in class org.apache.lucene.index.SegmentInfo

dir - Variable in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

DirContentSource - Class in org.apache.lucene.benchmark.byTask.feeds
A ContentSource using the Dir collection for its input.
DirContentSource() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.DirContentSource

DirContentSource.Iterator - Class in org.apache.lucene.benchmark.byTask.feeds
Iterator over the files in the directory
DirContentSource.Iterator(File) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.DirContentSource.Iterator

DirectIOLinuxDirectory - Class in org.apache.lucene.store
An Directory implementation that uses the Linux-specific O_DIRECT flag to bypass all OS level caching.
DirectIOLinuxDirectory(File, LockFactory, int) - Constructor for class org.apache.lucene.store.DirectIOLinuxDirectory
Create a new NIOFSDirectory for the named location.
directory(int, File) - Method in class org.apache.lucene.benchmark.utils.ExtractWikipedia

directory() - Method in class org.apache.lucene.index.FilterIndexReader

directory() - Method in class org.apache.lucene.index.IndexReader
Returns the directory associated with this index.
directory() - Method in class org.apache.lucene.index.SegmentReader
Returns the directory this index resides in.
directory - Variable in class org.apache.lucene.index.SegmentWriteState

directory - Static variable in class org.apache.lucene.search.SearchEquivalenceTestBase

Directory - Class in org.apache.lucene.store
A Directory is a flat list of files.
Directory() - Constructor for class org.apache.lucene.store.Directory

directory - Variable in class org.apache.lucene.store.FSDirectory

directory() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
DirectoryTaxonomyReader - Class in org.apache.lucene.facet.taxonomy.directory
A TaxonomyReader which retrieves stored taxonomy information from a Directory.
DirectoryTaxonomyReader(Directory) - Constructor for class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader
Open for reading a taxonomy stored in a given Directory.
DirectoryTaxonomyWriter - Class in org.apache.lucene.facet.taxonomy.directory
TaxonomyWriter which uses a Directory to store the taxonomy information on disk, and keeps an additional in-memory cache of some or all categories.
DirectoryTaxonomyWriter(Directory, IndexWriterConfig.OpenMode, TaxonomyWriterCache) - Constructor for class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Construct a Taxonomy writer.
DirectoryTaxonomyWriter(Directory, IndexWriterConfig.OpenMode) - Constructor for class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Creates a new instance with a default cached as defined by DirectoryTaxonomyWriter.defaultTaxonomyWriterCache().
DirectoryTaxonomyWriter(Directory) - Constructor for class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter

DirectoryTaxonomyWriter.DiskOrdinalMap - Class in org.apache.lucene.facet.taxonomy.directory
DirectoryTaxonomyWriter.OrdinalMap maintained on file system
DirectoryTaxonomyWriter.DiskOrdinalMap(File) - Constructor for class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.DiskOrdinalMap

DirectoryTaxonomyWriter.MemoryOrdinalMap - Class in org.apache.lucene.facet.taxonomy.directory
DirectoryTaxonomyWriter.OrdinalMap maintained in memory
DirectoryTaxonomyWriter.MemoryOrdinalMap() - Constructor for class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.MemoryOrdinalMap

DirectoryTaxonomyWriter.OrdinalMap - Interface in org.apache.lucene.facet.taxonomy.directory
Mapping from old ordinal to new ordinals, used when merging indexes wit separate taxonomies.
DISABLE_AUTO_FLUSH - Static variable in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.DISABLE_AUTO_FLUSH instead
DISABLE_AUTO_FLUSH - Static variable in class org.apache.lucene.index.IndexWriterConfig
Denotes a flush trigger is disabled.
DISABLE_COMPLEMENT - Static variable in class org.apache.lucene.facet.search.FacetsAccumulator
Passing this to FacetsAccumulator.setComplementThreshold(double) will disable using complement optimization.
disable_tracing() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Disable tracing.
disable_tracing() - Method in class org.apache.lucene.queryParser.QueryParser
Disable tracing.
disable_tracing() - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Disable tracing.
disable_tracing() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser
Disable tracing.
discardEscapeChar(CharSequence) - Static method in class org.apache.lucene.queryParser.standard.parser.EscapeQuerySyntaxImpl
Returns a String where the escape char has been removed, or kept only once if there was a double escape.
discountOverlaps - Variable in class org.apache.lucene.search.DefaultSimilarity

DisjQuery(CharSequence) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser

DisjunctionMaxQuery - Class in org.apache.lucene.search
A query that generates the union of documents produced by its subqueries, and that scores each document with the maximum score for that document as produced by any subquery, plus a tie breaking increment for any additional matching subqueries.
DisjunctionMaxQuery(float) - Constructor for class org.apache.lucene.search.DisjunctionMaxQuery
Creates a new empty DisjunctionMaxQuery.
DisjunctionMaxQuery(Collection<Query>, float) - Constructor for class org.apache.lucene.search.DisjunctionMaxQuery
Creates a new DisjunctionMaxQuery
DisjunctionMaxQuery.DisjunctionMaxWeight - Class in org.apache.lucene.search
Expert: the Weight for DisjunctionMaxQuery, used to normalize, score and explain these queries.
DisjunctionMaxQuery.DisjunctionMaxWeight(Searcher) - Constructor for class org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight
Construct the Weight for this Query searched by searcher.
distance(Point2D, Point2D) - Method in class org.apache.lucene.spatial.geometry.shape.LineSegment
Deprecated. Finds the distance of a specified point from the line segment and the closest point on the segment to the specified point.
distance - Variable in class org.apache.lucene.spatial.tier.DistanceFilter
Deprecated.
DistanceApproximation - Class in org.apache.lucene.spatial.geometry.shape
Deprecated. This has been replaced with more accurate math in LLRect. This class will be removed in a future release.
DistanceApproximation() - Constructor for class org.apache.lucene.spatial.geometry.shape.DistanceApproximation
Deprecated.
DistanceFieldComparatorSource - Class in org.apache.lucene.spatial.tier
Deprecated.
DistanceFieldComparatorSource(Filter) - Constructor for class org.apache.lucene.spatial.tier.DistanceFieldComparatorSource
Deprecated.
DistanceFilter - Class in org.apache.lucene.spatial.tier
Deprecated.
DistanceFilter(Filter, double) - Constructor for class org.apache.lucene.spatial.tier.DistanceFilter
Deprecated. Filters the startingFilter by precise distance checking filter
DistanceHandler - Class in org.apache.lucene.spatial.tier
Deprecated.
DistanceHandler(Map<Integer, Double>, Map<String, Double>, DistanceHandler.Precision) - Constructor for class org.apache.lucene.spatial.tier.DistanceHandler
Deprecated.
DistanceHandler.Precision - Enum in org.apache.lucene.spatial.tier
Deprecated.
distanceLookupCache - Variable in class org.apache.lucene.spatial.tier.DistanceFilter
Deprecated.
DistanceQuery - Class in org.apache.lucene.queryParser.surround.query

DistanceQuery(List<SrndQuery>, boolean, int, String, boolean) - Constructor for class org.apache.lucene.queryParser.surround.query.DistanceQuery

DistanceQueryBuilder - Class in org.apache.lucene.spatial.tier
Deprecated.
DistanceQueryBuilder(double, double, double, String, String, String, boolean, int, int) - Constructor for class org.apache.lucene.spatial.tier.DistanceQueryBuilder
Deprecated. Create a distance query using a boundary box wrapper around a more precise DistanceFilter.
DistanceQueryBuilder(double, double, double, String, String, boolean, int, int) - Constructor for class org.apache.lucene.spatial.tier.DistanceQueryBuilder
Deprecated. Create a distance query using a boundary box wrapper around a more precise DistanceFilter.
distances - Variable in class org.apache.lucene.spatial.tier.DistanceFilter
Deprecated.
DistanceSubQuery - Interface in org.apache.lucene.queryParser.surround.query

distanceSubQueryNotAllowed() - Method in class org.apache.lucene.queryParser.surround.query.DistanceQuery

distanceSubQueryNotAllowed() - Method in interface org.apache.lucene.queryParser.surround.query.DistanceSubQuery
When distanceSubQueryNotAllowed() returns non null, the reason why the subquery is not allowed as a distance subquery is returned.
distanceSubQueryNotAllowed() - Method in class org.apache.lucene.queryParser.surround.query.OrQuery

distanceSubQueryNotAllowed() - Method in class org.apache.lucene.queryParser.surround.query.SimpleTerm

DistanceUnits - Enum in org.apache.lucene.spatial.geometry
Deprecated.
DistanceUtils - Class in org.apache.lucene.spatial
Deprecated.
DistanceUtils() - Constructor for class org.apache.lucene.spatial.DistanceUtils
Deprecated.
doAfterFlush() - Method in class org.apache.lucene.index.IndexWriter
A hook for extending classes to execute operations after pending added and deleted documents have been flushed to the Directory but before the change is committed (new segments_N file written).
doAfterIndexingThreadDone() - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

doAfterWriter(ExecutorService) - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

doBeforeFlush() - Method in class org.apache.lucene.index.IndexWriter
A hook for extending classes to execute operations before pending added and deleted documents are flushed to the Directory.
doBody(String) - Method in class org.apache.lucene.index.SegmentInfos.FindSegmentsFile
Subclass must implement this.
doBody() - Method in class org.apache.lucene.store.Lock.With
Code to execute with exclusive access.
DOC - Static variable in class org.apache.lucene.benchmark.byTask.feeds.TrecContentSource

doc - Variable in class org.apache.lucene.benchmark.byTask.tasks.AddDocTask
volatile data passed between setup(), doLogic(), tearDown().
doc - Variable in class org.apache.lucene.index.AbstractAllTermDocs

doc() - Method in class org.apache.lucene.index.AbstractAllTermDocs

doc() - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermDocs

doc() - Method in class org.apache.lucene.index.MultipleTermPositions

doc() - Method in interface org.apache.lucene.index.TermDocs
Returns the current document number.
doc - Variable in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.GroupHead

doc(int) - Method in class org.apache.lucene.search.IndexSearcher

doc(int, FieldSelector) - Method in class org.apache.lucene.search.IndexSearcher

doc(int) - Method in class org.apache.lucene.search.MultiSearcher
Deprecated.
doc(int, FieldSelector) - Method in class org.apache.lucene.search.MultiSearcher
Deprecated.
doc(int) - Method in class org.apache.lucene.search.RemoteSearchable
Deprecated.
doc(int, FieldSelector) - Method in class org.apache.lucene.search.RemoteSearchable
Deprecated.
doc - Variable in class org.apache.lucene.search.ScoreDoc
Expert: A hit document's number.
doc(int) - Method in interface org.apache.lucene.search.Searchable
Deprecated. Returns the stored fields of document i.
doc(int, FieldSelector) - Method in interface org.apache.lucene.search.Searchable
Deprecated. Get the Document at the nth position.
doc(int) - Method in class org.apache.lucene.search.Searcher
Deprecated.
doc(int, FieldSelector) - Method in class org.apache.lucene.search.Searcher
Deprecated.
DOC - Static variable in class org.apache.lucene.search.SortField
Sort by document number (index order).
doc() - Method in class org.apache.lucene.search.spans.NearSpansOrdered

doc() - Method in class org.apache.lucene.search.spans.NearSpansUnordered

doc() - Method in class org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan

doc() - Method in class org.apache.lucene.search.spans.Spans
Returns the document number of the current match.
doc - Variable in class org.apache.lucene.search.spans.SpanScorer

doc - Variable in class org.apache.lucene.search.spans.TermSpans

doc() - Method in class org.apache.lucene.search.spans.TermSpans

doc() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermDocs

doCacheWrite(String) - Method in class org.apache.lucene.store.NRTCachingDirectory
Subclass can override this to customize logic; return true if this file should be written to the RAMDirectory.
docBase - Variable in class org.apache.lucene.facet.search.ScoredDocIdCollector

docCount - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
Document count (does not take deletions into account).
docCount - Variable in class org.apache.lucene.index.CheckIndex.Status.StoredFieldStatus
Number of documents tested.
docCount - Variable in class org.apache.lucene.index.CheckIndex.Status.TermVectorStatus
Number of documents tested.
docCount - Variable in class org.apache.lucene.index.PruningReader

docCount - Variable in class org.apache.lucene.index.SegmentInfo

docCount() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated. Returns the number of documents currently in this index.
DocData - Class in org.apache.lucene.benchmark.byTask.feeds
Output of parsing (e.g.
DocData() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.DocData

docFreq(Term) - Method in class org.apache.lucene.index.FilterIndexReader

docFreq() - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermEnum

docFreq(Term) - Method in class org.apache.lucene.index.IndexReader
Returns the number of documents containing the term t.
docFreq(Term) - Method in class org.apache.lucene.index.MultiReader

docFreq(Term) - Method in class org.apache.lucene.index.ParallelReader

docFreq(Term) - Method in class org.apache.lucene.index.SegmentReader

docFreq() - Method in class org.apache.lucene.index.TermEnum
Returns the docFreq of the current Term in the enumeration.
docFreq() - Method in class org.apache.lucene.search.FilteredTermEnum
Returns the docFreq of the current Term in the enumeration.
docFreq(Term) - Method in class org.apache.lucene.search.IndexSearcher
Returns total docFreq for this term.
docFreq(Term) - Method in class org.apache.lucene.search.MultiSearcher
Deprecated.
docFreq(Term) - Method in class org.apache.lucene.search.ParallelMultiSearcher
Deprecated. Executes each Searchable's docFreq() in its own thread and waits for each search to complete and merge the results back together.
docFreq(Term) - Method in class org.apache.lucene.search.RemoteSearchable
Deprecated.
docFreq(Term) - Method in interface org.apache.lucene.search.Searchable
Deprecated. Expert: Returns the number of documents containing term.
docFreq(Term) - Method in class org.apache.lucene.search.Searcher
Deprecated.
docFreq(Term) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
docFreq() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermEnum
Returns the docFreq of the current Term in the enumeration.
docFreqs(Term[]) - Method in class org.apache.lucene.search.RemoteSearchable
Deprecated.
docFreqs(Term[]) - Method in interface org.apache.lucene.search.Searchable
Deprecated. Expert: For each term in the terms array, calculates the number of documents containing term.
docFreqs(Term[]) - Method in class org.apache.lucene.search.Searcher
Deprecated.
docID() - Method in class org.apache.lucene.search.ConstantScoreQuery.ConstantScorer

docID() - Method in class org.apache.lucene.search.DocIdSetIterator
Returns the following: -1 or DocIdSetIterator.NO_MORE_DOCS if DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) were not called yet.
docID() - Method in class org.apache.lucene.search.FilteredDocIdSetIterator

docID() - Method in class org.apache.lucene.search.ScoreCachingWrappingScorer

docID() - Method in class org.apache.lucene.search.spans.SpanScorer

docID() - Method in class org.apache.lucene.util.OpenBitSetIterator

DocIdBitSet - Class in org.apache.lucene.util
Simple DocIdSet and DocIdSetIterator backed by a BitSet
DocIdBitSet(BitSet) - Constructor for class org.apache.lucene.util.DocIdBitSet

docids - Variable in class org.apache.lucene.facet.search.sampling.Sampler.SampleResult

docIds - Variable in class org.apache.lucene.facet.search.ScoredDocIdCollector

DocIdSet - Class in org.apache.lucene.search
A DocIdSet contains a set of doc ids.
DocIdSet() - Constructor for class org.apache.lucene.search.DocIdSet

DocIdSetIterator - Class in org.apache.lucene.search
This abstract class defines methods to iterate over a set of non-decreasing doc ids.
DocIdSetIterator() - Constructor for class org.apache.lucene.search.DocIdSetIterator

docIdSetToCache(DocIdSet, IndexReader) - Method in class org.apache.lucene.search.CachingWrapperFilter
Provide the DocIdSet to be cached, using the DocIdSet provided by the wrapped Filter.
doClose() - Method in class org.apache.lucene.index.FilterIndexReader

doClose() - Method in class org.apache.lucene.index.IndexReader
Implements close.
doClose() - Method in class org.apache.lucene.index.MultiReader

doClose() - Method in class org.apache.lucene.index.ParallelReader

doClose() - Method in class org.apache.lucene.index.SegmentReader

doClose() - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

doClose() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
DocMaker - Class in org.apache.lucene.benchmark.byTask.feeds
Creates Document objects.
DocMaker() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.DocMaker

docMaker - Variable in class org.apache.lucene.benchmark.utils.ExtractWikipedia

docName(IndexSearcher, int) - Method in class org.apache.lucene.benchmark.quality.utils.DocNameExtractor
Extract the name of the input doc from the index.
DocNameExtractor - Class in org.apache.lucene.benchmark.quality.utils
Utility: extract doc names from an index
DocNameExtractor(String) - Constructor for class org.apache.lucene.benchmark.quality.utils.DocNameExtractor
Constructor for DocNameExtractor.
docNameField - Variable in class org.apache.lucene.benchmark.quality.QualityBenchmark
index field to extract doc name for each search result; used for judging the results.
DOCNO - Static variable in class org.apache.lucene.benchmark.byTask.feeds.TrecContentSource

doCommit(Map<String, String>) - Method in class org.apache.lucene.index.FilterIndexReader
Deprecated.
doCommit(Map<String, String>) - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0.
doCommit(Map<String, String>) - Method in class org.apache.lucene.index.MultiReader
Deprecated.
doCommit(Map<String, String>) - Method in class org.apache.lucene.index.ParallelReader
Deprecated.
doCommit(Map<String, String>) - Method in class org.apache.lucene.index.SegmentReader
Deprecated.
doCommit(Map<String, String>) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
docScore(int, String, int, float) - Method in class org.apache.lucene.search.payloads.AveragePayloadFunction

docScore(int, String, int, float) - Method in class org.apache.lucene.search.payloads.MaxPayloadFunction

docScore(int, String, int, float) - Method in class org.apache.lucene.search.payloads.MinPayloadFunction

docScore(int, String, int, float) - Method in class org.apache.lucene.search.payloads.PayloadFunction
Calculate the final score for all the payloads seen so far for this doc/field
docStarts - Variable in class org.apache.lucene.search.IndexSearcher

docStoreCompoundFile - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
True if the shared doc store files are compound file format.
docStoreOffset - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
Doc store offset, if this segment shares the doc store files (stored fields and term vectors) with other segments.
docStoreSegment - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
String of the shared doc store segment, or null if this segment does not share the doc store files.
docsWithField - Variable in class org.apache.lucene.search.FieldComparator.NumericComparator

Document - Class in org.apache.lucene.document
Documents are the unit of indexing and search.
Document() - Constructor for class org.apache.lucene.document.Document
Constructs a new document with no fields.
document(int, FieldSelector) - Method in class org.apache.lucene.index.FilterIndexReader

document(int) - Method in class org.apache.lucene.index.IndexReader
Returns the stored fields of the nth Document in this index.
document(int, FieldSelector) - Method in class org.apache.lucene.index.IndexReader
Get the Document at the n th position.
document(int, FieldSelector) - Method in class org.apache.lucene.index.MultiReader

document(int, FieldSelector) - Method in class org.apache.lucene.index.ParallelReader

document(int, FieldSelector) - Method in class org.apache.lucene.index.PruningReader
Applies a StorePruningPolicy to stored fields of a document.
document(int, FieldSelector) - Method in class org.apache.lucene.index.SegmentReader

document(int, FieldSelector) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated. Return the Document at the nth position.
documentNumberComparator - Static variable in class org.apache.lucene.store.instantiated.InstantiatedTermDocumentInformation

DocValues - Class in org.apache.lucene.search.function
Expert: represents field values as different types.
DocValues() - Constructor for class org.apache.lucene.search.function.DocValues

doDelete(int) - Method in class org.apache.lucene.index.FilterIndexReader
Deprecated.
doDelete(int) - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
doDelete(int) - Method in class org.apache.lucene.index.MultiReader
Deprecated.
doDelete(int) - Method in class org.apache.lucene.index.ParallelReader
Deprecated.
doDelete(int) - Method in class org.apache.lucene.index.SegmentReader
Deprecated.
doDelete(int) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
doFail - Variable in class org.apache.lucene.store.MockDirectoryWrapper.Failure

doHighlight(IndexReader, int, String, Document, Analyzer, String) - Method in class org.apache.lucene.benchmark.byTask.tasks.BenchmarkHighlighter

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.AddDocTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.AddFacetedDocTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.ClearStatsTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.CloseIndexTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.CloseReaderTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyIndexTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyReaderTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.CommitIndexTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.CommitTaxonomyIndexTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.ConsumeContentSourceTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.CreateTaxonomyIndexTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.DeleteByPercentTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.DeleteDocTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.FlushReaderTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.ForceMergeTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.NewLocaleTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.NewRoundTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.NewShingleAnalyzerTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.OpenReaderTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyIndexTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyReaderTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.PrintReaderTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTokensTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReopenReaderTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.RepAllTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.ResetInputsTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.ResetSystemEraseTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.ResetSystemSoftTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.RollbackIndexTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.SetPropTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.UpdateDocTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.WaitForMergesTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.WaitTask

doLogic() - Method in class org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask

doMerge(MergePolicy.OneMerge) - Method in class org.apache.lucene.index.ConcurrentMergeScheduler
Does the actual merge, by calling IndexWriter.merge(org.apache.lucene.index.MergePolicy.OneMerge)
DOMUtils - Class in org.apache.lucene.xmlparser

DOMUtils() - Constructor for class org.apache.lucene.xmlparser.DOMUtils

Done() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Reset buffer when finished.
Done() - Method in interface org.apache.lucene.queryParser.CharStream
The lexer calls this function to indicate that it is done with the stream and hence implementations can free any resources held by this class.
Done() - Method in class org.apache.lucene.queryParser.FastCharStream

Done() - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Set buffers back to null when finished.
Done() - Method in interface org.apache.lucene.queryParser.surround.parser.CharStream
The lexer calls this function to indicate that it is done with the stream and hence implementations can free any resources held by this class.
Done() - Method in class org.apache.lucene.queryParser.surround.parser.FastCharStream

doNext() - Method in class org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan

DONTNEED - Static variable in class org.apache.lucene.store.NativePosixUtil

doOpenIfChanged() - Method in class org.apache.lucene.index.IndexReader
If the index has changed since it was opened, open and return a new reader; else, return null.
doOpenIfChanged(boolean) - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.doOpenIfChanged() instead
doOpenIfChanged(IndexCommit) - Method in class org.apache.lucene.index.IndexReader
If the index has changed since it was opened, open and return a new reader; else, return null.
doOpenIfChanged(IndexWriter, boolean) - Method in class org.apache.lucene.index.IndexReader
If the index has changed since it was opened, open and return a new reader; else, return null.
doOpenIfChanged() - Method in class org.apache.lucene.index.MultiReader

doOpenIfChanged(boolean) - Method in class org.apache.lucene.index.MultiReader
Deprecated. Write support will be removed in Lucene 4.0. Use MultiReader.doOpenIfChanged() instead.
doOpenIfChanged() - Method in class org.apache.lucene.index.ParallelReader

doOpenIfChanged(boolean) - Method in class org.apache.lucene.index.ParallelReader
Deprecated. Write support will be removed in Lucene 4.0. Use ParallelReader.doOpenIfChanged() instead.
doOpenIfChanged() - Method in class org.apache.lucene.index.SegmentReader

doOpenIfChanged(boolean) - Method in class org.apache.lucene.index.SegmentReader
Deprecated.
doPagingSearch(BufferedReader, IndexSearcher, Query, int, boolean, boolean) - Static method in class org.apache.lucene.demo.SearchFiles
This demonstrates a typical paging search scenario, where the search engine presents pages of size n to the user.
doPrune(double, IndexSearcher) - Method in class org.apache.lucene.search.SearcherLifetimeManager.PruneByAge

doPrune(double, IndexSearcher) - Method in interface org.apache.lucene.search.SearcherLifetimeManager.Pruner
Return true if this searcher should be removed.
doSearching(ExecutorService, long) - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

doSetNorm(int, String, byte) - Method in class org.apache.lucene.index.FilterIndexReader
Deprecated.
doSetNorm(int, String, byte) - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
doSetNorm(int, String, byte) - Method in class org.apache.lucene.index.MultiReader
Deprecated.
doSetNorm(int, String, byte) - Method in class org.apache.lucene.index.ParallelReader
Deprecated.
doSetNorm(int, String, byte) - Method in class org.apache.lucene.index.SegmentReader
Deprecated.
doSetNorm(int, String, byte) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
dot(Vector2D) - Method in class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated.
DOTLESS_YEH - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

DOUBLE - Static variable in class org.apache.lucene.search.SortField
Sort using term values as encoded Doubles.
DOUBLE_TYPE - Static variable in class org.apache.lucene.analysis.cjk.CJKBigramFilter
when we emit a bigram, its then marked as this type
DoubleBarrelLRUCache<K extends DoubleBarrelLRUCache.CloneableKey,V> - Class in org.apache.lucene.util
Simple concurrent LRU cache, using a "double barrel" approach where two ConcurrentHashMaps record entries.
DoubleBarrelLRUCache(int) - Constructor for class org.apache.lucene.util.DoubleBarrelLRUCache

DoubleBarrelLRUCache.CloneableKey - Class in org.apache.lucene.util
Object providing clone(); the key class must subclass this.
DoubleBarrelLRUCache.CloneableKey() - Constructor for class org.apache.lucene.util.DoubleBarrelLRUCache.CloneableKey

DoubleIterator - Interface in org.apache.lucene.util.collections
Iterator interface for primitive double iteration.
DoubleMetaphoneFilter - Class in org.apache.lucene.analysis.phonetic
Filter for DoubleMetaphone (supporting secondary codes)
DoubleMetaphoneFilter(TokenStream, int, boolean) - Constructor for class org.apache.lucene.analysis.phonetic.DoubleMetaphoneFilter

doubleToFixed(double) - Static method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
doubleToPrefixCoded(double) - Static method in class org.apache.lucene.util.NumericUtils

doubleToSortableLong(double) - Static method in class org.apache.lucene.util.NumericUtils
Converts a double value to a sortable signed long.
doubleVal(int) - Method in class org.apache.lucene.search.function.DocValues
Return doc value as a double.
doumentNumberIntegerComparator - Static variable in class org.apache.lucene.store.instantiated.InstantiatedTermDocumentInformation

doUndeleteAll() - Method in class org.apache.lucene.index.FilterIndexReader
Deprecated.
doUndeleteAll() - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
doUndeleteAll() - Method in class org.apache.lucene.index.MultiReader
Deprecated.
doUndeleteAll() - Method in class org.apache.lucene.index.ParallelReader
Deprecated.
doUndeleteAll() - Method in class org.apache.lucene.index.SegmentReader
Deprecated.
doUndeleteAll() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
DrillDown - Class in org.apache.lucene.facet.search
Creation of drill down term or query.
DrillDown() - Constructor for class org.apache.lucene.facet.search.DrillDown

drillDownTermText(CategoryPath, char[]) - Method in class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams

drillDownTermText(CategoryPath, char[]) - Method in interface org.apache.lucene.facet.index.params.FacetIndexingParams
Return the drilldown Term-Text which does not need to do any allocations.
dropBuffersAndReset() - Method in class org.apache.lucene.util.ByteBlockPool

DummyConcurrentLock - Class in org.apache.lucene.util
A dummy lock as a replacement for ReentrantLock to disable locking
DummyConcurrentLock() - Constructor for class org.apache.lucene.util.DummyConcurrentLock

DummyQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
This builder does nothing.
DummyQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.DummyQueryNodeBuilder
Constructs a DummyQueryNodeBuilder object.
dumpArray(String, Object[], PrintStream) - Static method in class org.apache.lucene.util.LuceneTestCase
Convenience method for logging an array.
dumpIterator(String, Iterator<?>, PrintStream) - Static method in class org.apache.lucene.util.LuceneTestCase
Convenience method for logging an iterator.
DuplicateFilter - Class in org.apache.lucene.search

DuplicateFilter(String) - Constructor for class org.apache.lucene.search.DuplicateFilter

DuplicateFilter(String, int, int) - Constructor for class org.apache.lucene.search.DuplicateFilter

DuplicateFilterBuilder - Class in org.apache.lucene.xmlparser.builders

DuplicateFilterBuilder() - Constructor for class org.apache.lucene.xmlparser.builders.DuplicateFilterBuilder

DUTCH_STOP_WORDS - Static variable in class org.apache.lucene.analysis.nl.DutchAnalyzer
Deprecated. use DutchAnalyzer.getDefaultStopSet() instead
DutchAnalyzer - Class in org.apache.lucene.analysis.nl
Analyzer for Dutch language.
DutchAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.nl.DutchAnalyzer
Builds an analyzer with the default stop words (DutchAnalyzer.getDefaultStopSet()) and a few default entries for the stem exclusion table.
DutchAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.nl.DutchAnalyzer

DutchAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.nl.DutchAnalyzer

DutchAnalyzer(Version, Set<?>, Set<?>, CharArrayMap<String>) - Constructor for class org.apache.lucene.analysis.nl.DutchAnalyzer

DutchAnalyzer(Version, String...) - Constructor for class org.apache.lucene.analysis.nl.DutchAnalyzer
Deprecated. use DutchAnalyzer.DutchAnalyzer(Version, Set) instead
DutchAnalyzer(Version, HashSet<?>) - Constructor for class org.apache.lucene.analysis.nl.DutchAnalyzer
Deprecated. use DutchAnalyzer.DutchAnalyzer(Version, Set) instead
DutchAnalyzer(Version, File) - Constructor for class org.apache.lucene.analysis.nl.DutchAnalyzer
Deprecated. use DutchAnalyzer.DutchAnalyzer(Version, Set) instead
DutchStemFilter - Class in org.apache.lucene.analysis.nl
Deprecated. Use SnowballFilter with DutchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0
DutchStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.nl.DutchStemFilter
Deprecated.
DutchStemFilter(TokenStream, Set<?>) - Constructor for class org.apache.lucene.analysis.nl.DutchStemFilter
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
DutchStemFilter(TokenStream, Map<?, ?>) - Constructor for class org.apache.lucene.analysis.nl.DutchStemFilter
Deprecated.
DutchStemFilter(TokenStream, Set<?>, Map<?, ?>) - Constructor for class org.apache.lucene.analysis.nl.DutchStemFilter
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
DutchStemmer - Class in org.apache.lucene.analysis.nl
Deprecated. Use DutchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0
DutchStemmer() - Constructor for class org.apache.lucene.analysis.nl.DutchStemmer
Deprecated.
DutchStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
DutchStemmer() - Constructor for class org.tartarus.snowball.ext.DutchStemmer

E

EARTH_EQUATORIAL_RADIUS_KM - Static variable in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
EARTH_EQUATORIAL_RADIUS_MI - Static variable in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
EARTH_MEAN_RADIUS_KM - Static variable in class org.apache.lucene.spatial.DistanceUtils
Deprecated. The International Union of Geodesy and Geophysics says the Earth's mean radius in KM is: [1] http://en.wikipedia.org/wiki/Earth_radius
EARTH_MEAN_RADIUS_MI - Static variable in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
earthCircumference() - Method in enum org.apache.lucene.spatial.geometry.DistanceUnits
Deprecated. Returns the circumference of the Earth
earthRadius() - Method in enum org.apache.lucene.spatial.geometry.DistanceUnits
Deprecated. Returns the average earth radius
eat(Row, int[]) - Method in class org.egothor.stemmer.Gener
Test whether the given Row of Cells in a Trie should be included in an optimized Trie.
EdgeNGramTokenFilter - Class in org.apache.lucene.analysis.ngram
Tokenizes the given token into n-grams of given size(s).
EdgeNGramTokenFilter(TokenStream, EdgeNGramTokenFilter.Side, int, int) - Constructor for class org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter
Creates EdgeNGramTokenFilter that can generate n-grams in the sizes of the given range
EdgeNGramTokenFilter(TokenStream, String, int, int) - Constructor for class org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter
Creates EdgeNGramTokenFilter that can generate n-grams in the sizes of the given range
EdgeNGramTokenFilter.Side - Enum in org.apache.lucene.analysis.ngram
Specifies which side of the input the n-gram should be generated from
EdgeNGramTokenizer - Class in org.apache.lucene.analysis.ngram
Tokenizes the input from an edge into n-grams of given size(s).
EdgeNGramTokenizer(Reader, EdgeNGramTokenizer.Side, int, int) - Constructor for class org.apache.lucene.analysis.ngram.EdgeNGramTokenizer
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
EdgeNGramTokenizer(AttributeSource, Reader, EdgeNGramTokenizer.Side, int, int) - Constructor for class org.apache.lucene.analysis.ngram.EdgeNGramTokenizer
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
EdgeNGramTokenizer(AttributeSource.AttributeFactory, Reader, EdgeNGramTokenizer.Side, int, int) - Constructor for class org.apache.lucene.analysis.ngram.EdgeNGramTokenizer
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
EdgeNGramTokenizer(Reader, String, int, int) - Constructor for class org.apache.lucene.analysis.ngram.EdgeNGramTokenizer
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
EdgeNGramTokenizer(AttributeSource, Reader, String, int, int) - Constructor for class org.apache.lucene.analysis.ngram.EdgeNGramTokenizer
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
EdgeNGramTokenizer(AttributeSource.AttributeFactory, Reader, String, int, int) - Constructor for class org.apache.lucene.analysis.ngram.EdgeNGramTokenizer
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
EdgeNGramTokenizer.Side - Enum in org.apache.lucene.analysis.ngram
Specifies which side of the input the n-gram should be generated from
EightFlagsIntDecoder - Class in org.apache.lucene.util.encoding
Decodes data which was encoded by EightFlagsIntEncoder.
EightFlagsIntDecoder() - Constructor for class org.apache.lucene.util.encoding.EightFlagsIntDecoder

EightFlagsIntEncoder - Class in org.apache.lucene.util.encoding
A ChunksIntEncoder which encodes data in chunks of 8.
EightFlagsIntEncoder() - Constructor for class org.apache.lucene.util.encoding.EightFlagsIntEncoder

ELAPSED - Static variable in class org.apache.lucene.benchmark.byTask.tasks.ReportTask

ElisionFilter - Class in org.apache.lucene.analysis.fr
Removes elisions from a TokenStream.
ElisionFilter(Version, TokenStream) - Constructor for class org.apache.lucene.analysis.fr.ElisionFilter
Constructs an elision filter with standard stop words
ElisionFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.fr.ElisionFilter
Deprecated. use ElisionFilter.ElisionFilter(Version, TokenStream) instead
ElisionFilter(TokenStream, Set<?>) - Constructor for class org.apache.lucene.analysis.fr.ElisionFilter
Deprecated. use ElisionFilter.ElisionFilter(Version, TokenStream, Set) instead
ElisionFilter(Version, TokenStream, Set<?>) - Constructor for class org.apache.lucene.analysis.fr.ElisionFilter
Constructs an elision filter with a Set of stop words
ElisionFilter(TokenStream, String[]) - Constructor for class org.apache.lucene.analysis.fr.ElisionFilter
Deprecated. use ElisionFilter.ElisionFilter(Version, TokenStream, Set) instead
Ellipse - Class in org.apache.lucene.spatial.geometry.shape
Deprecated.
Ellipse() - Constructor for class org.apache.lucene.spatial.geometry.shape.Ellipse
Deprecated.
Ellipse(Point2D, Point2D, double) - Constructor for class org.apache.lucene.spatial.geometry.shape.Ellipse
Deprecated. Constructor given bounding rectangle and a rotation.
EMAIL - Static variable in class org.apache.lucene.analysis.standard.ClassicTokenizer

EMAIL - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizer

EMAIL - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

EMAIL_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

EMAIL_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated.
EMAIL_TYPE - Static variable in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated.
EMAIL_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Deprecated. use UAX29URLEmailTokenizer.TOKEN_TYPES instead
EMAIL_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl

EMPTY - Static variable in interface org.apache.lucene.util.BytesRefIterator
Singleton BytesRefIterator that iterates over 0 BytesRefs.
EMPTY_ARRAY - Static variable in interface org.apache.lucene.util.Bits

EMPTY_BYTES - Static variable in class org.apache.lucene.util.BytesRef
An empty byte array for convenience
EMPTY_CHARS - Static variable in class org.apache.lucene.util.CharsRef

EMPTY_DOCIDSET - Static variable in class org.apache.lucene.search.DocIdSet
An empty DocIdSet instance for easy use, e.g.
EMPTY_INTS - Static variable in class org.apache.lucene.util.IntsRef

EMPTY_MESSAGE - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

EMPTY_OFFSET_INFO - Static variable in class org.apache.lucene.index.TermVectorOffsetInfo
Convenience declaration when creating a TermPositionVector that stores only position information.
EMPTY_SET - Static variable in class org.apache.lucene.analysis.CharArraySet

EMPTY_TOPDOCS - Static variable in class org.apache.lucene.search.TopDocsCollector

emptyMap() - Static method in class org.apache.lucene.analysis.CharArrayMap
Returns an empty, unmodifiable map.
EmptyTokenizer - Class in org.apache.lucene.analysis
Emits no tokens
EmptyTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.EmptyTokenizer

EmptyTokenStream - Class in org.apache.lucene.analysis.miscellaneous
An always exhausted token stream.
EmptyTokenStream() - Constructor for class org.apache.lucene.analysis.miscellaneous.EmptyTokenStream

emptyVal - Variable in class org.apache.lucene.search.grouping.SentinelIntSet

ENABLE_POSITION_INCREMENTS - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set whether position increments is enabled
enable_tracing() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Enable tracing.
enable_tracing() - Method in class org.apache.lucene.queryParser.QueryParser
Enable tracing.
enable_tracing() - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Enable tracing.
enable_tracing() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser
Enable tracing.
enableBackwards - Variable in class org.apache.lucene.util.AttributeImpl
Deprecated. this will be removed in Lucene 4.0.
encode(char[]) - Method in class org.apache.lucene.analysis.payloads.AbstractEncoder

encode(char[], int, int) - Method in class org.apache.lucene.analysis.payloads.FloatEncoder

encode(char[], int, int) - Method in class org.apache.lucene.analysis.payloads.IdentityEncoder

encode(char[], int, int) - Method in class org.apache.lucene.analysis.payloads.IntegerEncoder

encode(char[]) - Method in interface org.apache.lucene.analysis.payloads.PayloadEncoder

encode(char[], int, int) - Method in interface org.apache.lucene.analysis.payloads.PayloadEncoder
Convert a char array to a Payload
encode(String) - Static method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.Entities

encode(Sort.ByteSequencesWriter, ByteArrayDataOutput, byte[], BytesRef, long) - Method in class org.apache.lucene.search.suggest.SortedTermFreqIteratorWrapper

encode(double, double) - Static method in class org.apache.lucene.spatial.geohash.GeoHashUtils
Deprecated. Encodes the given latitude and longitude into a geohash
encode(int) - Method in class org.apache.lucene.util.encoding.DGapIntEncoder

encode(int) - Method in class org.apache.lucene.util.encoding.EightFlagsIntEncoder

encode(int) - Method in class org.apache.lucene.util.encoding.FourFlagsIntEncoder
Small values (<=3) are stored in the indicator while larger values are saved for later encoding in the ChunksIntEncoder.encodeQueue.
encode(int) - Method in class org.apache.lucene.util.encoding.IntEncoder
Encodes an integer to the output stream given in reInit
encode(int) - Method in class org.apache.lucene.util.encoding.NOnesIntEncoder

encode(int) - Method in class org.apache.lucene.util.encoding.SimpleIntEncoder
This method makes sure the value wasn't previously encoded by checking against the Set.
encode(int) - Method in class org.apache.lucene.util.encoding.SortingIntEncoder

encode(int) - Method in class org.apache.lucene.util.encoding.UniqueValuesIntEncoder

encode(int) - Method in class org.apache.lucene.util.encoding.VInt8IntEncoder

encode(ByteBuffer, CharBuffer) - Static method in class org.apache.lucene.util.IndexableBinaryStringTools
Deprecated. Use IndexableBinaryStringTools.encode(byte[], int, int, char[], int, int) instead. This method will be removed in Lucene 4.0
encode(byte[], int, int, char[], int, int) - Static method in class org.apache.lucene.util.IndexableBinaryStringTools
Encodes the input byte sequence into the output char sequence.
encode(ByteBuffer) - Static method in class org.apache.lucene.util.IndexableBinaryStringTools
Deprecated. Use IndexableBinaryStringTools.encode(byte[], int, int, char[], int, int) instead. This method will be removed in Lucene 4.0
encode(int, OutputStream) - Static method in class org.apache.lucene.util.Vint8
Encodes number to out.
encode(int, byte[], int) - Static method in class org.apache.lucene.util.Vint8
Encodes number into dest, starting at offset start from the beginning of the array.
encodeChunk() - Method in class org.apache.lucene.util.encoding.ChunksIntEncoder
Encodes the values of the current chunk.
encodeCollationKey(byte[]) - Method in class org.apache.lucene.analysis.CollationTestBase
Convenience method to perform the same function as CollationKeyFilter.
encodeFloat(float) - Static method in class org.apache.lucene.analysis.payloads.PayloadHelper

encodeFloat(float, byte[], int) - Static method in class org.apache.lucene.analysis.payloads.PayloadHelper

encodeInt(int) - Static method in class org.apache.lucene.analysis.payloads.PayloadHelper

encodeInt(int, byte[], int) - Static method in class org.apache.lucene.analysis.payloads.PayloadHelper

encodeNorm(float) - Static method in class org.apache.lucene.search.Similarity
Deprecated. Use Similarity.encodeNormValue(float) instead.
encodeNormValue(float) - Method in class org.apache.lucene.search.Similarity
Encodes a normalization factor for storage in an index.
encodeQueue - Variable in class org.apache.lucene.util.encoding.ChunksIntEncoder
Holds the values which must be encoded, outside the indicator.
encodeQueueSize - Variable in class org.apache.lucene.util.encoding.ChunksIntEncoder

encoder - Variable in class org.apache.lucene.analysis.phonetic.PhoneticFilter

Encoder - Interface in org.apache.lucene.search.highlight
Encodes original text.
encoder - Variable in class org.apache.lucene.util.encoding.ChunksIntEncoder
Encoder used to encode values outside the indicator.
encoder - Variable in class org.apache.lucene.util.encoding.IntEncoderFilter

encodeText(String) - Method in class org.apache.lucene.search.highlight.DefaultEncoder

encodeText(String) - Method in interface org.apache.lucene.search.highlight.Encoder

encodeText(String) - Method in class org.apache.lucene.search.highlight.SimpleHTMLEncoder

encoding - Variable in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource

end() - Method in class org.apache.lucene.analysis.CachingTokenFilter

end() - Method in class org.apache.lucene.analysis.CharTokenizer

end() - Method in class org.apache.lucene.analysis.cjk.CJKTokenizer
Deprecated.
end() - Method in class org.apache.lucene.analysis.cn.ChineseTokenizer
Deprecated.
end() - Method in class org.apache.lucene.analysis.cn.smart.SentenceTokenizer

end() - Method in class org.apache.lucene.analysis.icu.segmentation.ICUTokenizer

end() - Method in class org.apache.lucene.analysis.ja.JapaneseTokenizer

end() - Method in class org.apache.lucene.analysis.KeywordTokenizer

end - Variable in class org.apache.lucene.analysis.LookaheadTokenFilter

end() - Method in class org.apache.lucene.analysis.miscellaneous.PrefixAndSuffixAwareTokenFilter

end() - Method in class org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter

end() - Method in class org.apache.lucene.analysis.MockTokenizer

end() - Method in class org.apache.lucene.analysis.ngram.EdgeNGramTokenizer

end() - Method in class org.apache.lucene.analysis.ngram.NGramTokenizer

end() - Method in class org.apache.lucene.analysis.path.PathHierarchyTokenizer

end() - Method in class org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

end() - Method in class org.apache.lucene.analysis.standard.ClassicTokenizer

end() - Method in class org.apache.lucene.analysis.standard.StandardTokenizer

end() - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

end() - Method in class org.apache.lucene.analysis.TeeSinkTokenFilter

end() - Method in class org.apache.lucene.analysis.TeeSinkTokenFilter.SinkTokenStream

end() - Method in class org.apache.lucene.analysis.TokenFilter
Performs end-of-stream operations, if any, and calls then end() on the input TokenStream.
NOTE: Be sure to call super.end() first when overriding this method.
end() - Method in class org.apache.lucene.analysis.TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
end() - Method in class org.apache.lucene.analysis.ValidatingTokenFilter

end() - Method in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

end - Variable in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
The term's end position.
end() - Method in class org.apache.lucene.search.spans.NearSpansOrdered

end() - Method in class org.apache.lucene.search.spans.NearSpansUnordered

end() - Method in class org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan

end - Variable in class org.apache.lucene.search.spans.SpanPositionRangeQuery

end() - Method in class org.apache.lucene.search.spans.Spans
Returns the end position of the current match.
end() - Method in class org.apache.lucene.search.spans.TermSpans

END_CHAR_ARRAY - Static variable in class org.apache.lucene.analysis.cn.smart.Utility

END_LABEL - Static variable in class org.apache.lucene.util.fst.FST

endColumn - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token
The column number of the last character of this Token.
endColumn - Variable in class org.apache.lucene.queryParser.standard.parser.Token
The column number of the last character of this Token.
endColumn - Variable in class org.apache.lucene.queryParser.surround.parser.Token
The column number of the last character of this Token.
endColumn - Variable in class org.apache.lucene.queryParser.Token
The column number of the last character of this Token.
endElement(String, String, String) - Method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser

endEnum() - Method in class org.apache.lucene.search.FilteredTermEnum
Indicates the end of the enumeration has been reached
endEnum() - Method in class org.apache.lucene.search.FuzzyTermEnum
Indicates the end of the enumeration has been reached
endEnum() - Method in class org.apache.lucene.search.PrefixTermEnum

endEnum() - Method in class org.apache.lucene.search.regex.RegexTermEnum

endEnum() - Method in class org.apache.lucene.search.SingleTermEnum

endEnum() - Method in class org.apache.lucene.search.TermRangeTermEnum

endEnum() - Method in class org.apache.lucene.search.WildcardTermEnum

endLine - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token
The line number of the last character of this Token.
endLine - Variable in class org.apache.lucene.queryParser.standard.parser.Token
The line number of the last character of this Token.
endLine - Variable in class org.apache.lucene.queryParser.surround.parser.Token
The line number of the last character of this Token.
endLine - Variable in class org.apache.lucene.queryParser.Token
The line number of the last character of this Token.
endOffset - Variable in class org.apache.lucene.analysis.cn.smart.hhmm.SegToken
end offset into original sentence
endOffset - Variable in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase.CompoundToken

endOffset - Variable in class org.apache.lucene.analysis.LookaheadTokenFilter.Position

endOffset() - Method in class org.apache.lucene.analysis.Token
Returns this Token's ending offset, one greater than the position of the last character corresponding to this token in the source text.
endOffset() - Method in interface org.apache.lucene.analysis.tokenattributes.OffsetAttribute
Returns this Token's ending offset, one greater than the position of the last character corresponding to this token in the source text.
endOffset() - Method in class org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl
Returns this Token's ending offset, one greater than the position of the last character corresponding to this token in the source text.
ends - Variable in class org.apache.lucene.facet.taxonomy.CategoryPath

endsWith(char[], int, String) - Static method in class org.apache.lucene.analysis.util.StemmerUtil
Returns true if the character array ends with the suffix.
endsWith(char[], int, char[]) - Static method in class org.apache.lucene.analysis.util.StemmerUtil
Returns true if the character array ends with the suffix.
endsWith(BytesRef) - Method in class org.apache.lucene.util.BytesRef

endTest(Test) - Method in class org.apache.lucene.util.LuceneJUnitResultFormatter
A test ended.
endTestSuite(JUnitTest) - Method in class org.apache.lucene.util.LuceneJUnitResultFormatter
The whole testsuite ended.
English - Class in org.apache.lucene.util

ENGLISH_STOP_WORDS_SET - Static variable in class org.apache.lucene.analysis.StopAnalyzer
An unmodifiable set containing some common English words that are not usually useful for searching.
EnglishAnalyzer - Class in org.apache.lucene.analysis.en
Analyzer for English.
EnglishAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.en.EnglishAnalyzer
Builds an analyzer with the default stop words: EnglishAnalyzer.getDefaultStopSet().
EnglishAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.en.EnglishAnalyzer
Builds an analyzer with the given stop words.
EnglishAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.en.EnglishAnalyzer
Builds an analyzer with the given stop words.
EnglishMinimalStemFilter - Class in org.apache.lucene.analysis.en
A TokenFilter that applies EnglishMinimalStemmer to stem English words.
EnglishMinimalStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.en.EnglishMinimalStemFilter

EnglishMinimalStemmer - Class in org.apache.lucene.analysis.en
Minimal plural stemmer for English.
EnglishMinimalStemmer() - Constructor for class org.apache.lucene.analysis.en.EnglishMinimalStemmer

EnglishPossessiveFilter - Class in org.apache.lucene.analysis.en
TokenFilter that removes possessives (trailing 's) from words.
EnglishPossessiveFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.en.EnglishPossessiveFilter
Deprecated. Use EnglishPossessiveFilter.EnglishPossessiveFilter(Version, TokenStream) instead.
EnglishPossessiveFilter(Version, TokenStream) - Constructor for class org.apache.lucene.analysis.en.EnglishPossessiveFilter

EnglishStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
EnglishStemmer() - Constructor for class org.tartarus.snowball.ext.EnglishStemmer

enhancementBytes - Variable in class org.apache.lucene.facet.enhancements.EnhancementsCategoryTokenizer
Buffers for enhancement payload bytes
enhancements - Variable in class org.apache.lucene.facet.enhancements.EnhancementsCategoryTokenizer
The category enhancements to handle
EnhancementsCategoryTokenizer - Class in org.apache.lucene.facet.enhancements
A tokenizer which adds to each category token payload according to the CategoryEnhancements defined in the given EnhancementsIndexingParams.
EnhancementsCategoryTokenizer(TokenStream, EnhancementsIndexingParams) - Constructor for class org.apache.lucene.facet.enhancements.EnhancementsCategoryTokenizer
Constructor.
EnhancementsDocumentBuilder - Class in org.apache.lucene.facet.enhancements
An EnhancementsDocumentBuilder is a CategoryDocumentBuilder which adds categories to documents according to the list of CategoryEnhancements from EnhancementsIndexingParams.
EnhancementsDocumentBuilder(TaxonomyWriter, EnhancementsIndexingParams) - Constructor for class org.apache.lucene.facet.enhancements.EnhancementsDocumentBuilder

EnhancementsIndexingParams - Interface in org.apache.lucene.facet.enhancements.params
Facet indexing parameters for defining category enhancements.
EnhancementsPayloadIterator - Class in org.apache.lucene.facet.enhancements
A PayloadIterator for iterating over category posting lists generated using EnhancementsCategoryTokenizer.
EnhancementsPayloadIterator(List<CategoryEnhancement>, IndexReader, Term) - Constructor for class org.apache.lucene.facet.enhancements.EnhancementsPayloadIterator
Constructor.
ensureCanWrite(String) - Method in class org.apache.lucene.store.FSDirectory

ensureCapacity(long) - Method in class org.apache.lucene.util.OpenBitSet
Ensure that the long[] is big enough to hold numBits, expanding it if necessary.
ensureCapacityWords(int) - Method in class org.apache.lucene.util.OpenBitSet
Expand the long[] with the size given as a number of words (64 bit longs).
ensureOpen() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader

ensureOpen() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Verifies that this instance wasn't closed, or throws AlreadyClosedException if it is.
ensureOpen() - Method in class org.apache.lucene.index.IndexReader

ensureOpen(boolean) - Method in class org.apache.lucene.index.IndexWriter
Used internally to throw an AlreadyClosedException if this IndexWriter has been closed.
ensureOpen() - Method in class org.apache.lucene.index.IndexWriter

ensureOpen() - Method in class org.apache.lucene.store.Directory

Entities - Class in org.apache.lucene.benchmark.byTask.feeds.demohtml

Entities() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.Entities

Entity - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
entries - Variable in class org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper

entrySet() - Method in class org.apache.lucene.analysis.CharArrayMap

EnwikiContentSource - Class in org.apache.lucene.benchmark.byTask.feeds
A ContentSource which reads the English Wikipedia dump.
EnwikiContentSource() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.EnwikiContentSource

EnwikiQueryMaker - Class in org.apache.lucene.benchmark.byTask.feeds
A QueryMaker that uses common and uncommon actual Wikipedia queries for searching the English Wikipedia collection.
EnwikiQueryMaker() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.EnwikiQueryMaker

EOF - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
End of File.
EOF - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
End of File.
EOF - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
End of File.
EOF - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
End of File.
eof() - Method in class org.apache.lucene.store.ByteArrayDataInput

eol - Variable in exception org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException
The end of line string for this machine.
eol - Variable in exception org.apache.lucene.queryParser.ParseException
The end of line string for this machine.
eol - Variable in exception org.apache.lucene.queryParser.standard.parser.ParseException
The end of line string for this machine.
eol - Variable in exception org.apache.lucene.queryParser.surround.parser.ParseException
The end of line string for this machine.
EOS - Static variable in class org.apache.lucene.util.encoding.IntDecoder
A special long value which is used to indicate end-of-stream has reached.
eq - Variable in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree
Pointer to equal branch and to data when this node is a string terminator.
eq_s(int, CharSequence) - Method in class org.tartarus.snowball.SnowballProgram

eq_s(int, String) - Method in class org.tartarus.snowball.SnowballProgram
Deprecated. for binary back compat. Will be removed in Lucene 4.0
eq_s_b(int, CharSequence) - Method in class org.tartarus.snowball.SnowballProgram

eq_s_b(int, String) - Method in class org.tartarus.snowball.SnowballProgram
Deprecated. for binary back compat. Will be removed in Lucene 4.0
eq_v(CharSequence) - Method in class org.tartarus.snowball.SnowballProgram

eq_v(StringBuilder) - Method in class org.tartarus.snowball.SnowballProgram
Deprecated. for binary back compat. Will be removed in Lucene 4.0
eq_v_b(CharSequence) - Method in class org.tartarus.snowball.SnowballProgram

eq_v_b(StringBuilder) - Method in class org.tartarus.snowball.SnowballProgram
Deprecated. for binary back compat. Will be removed in Lucene 4.0
EQKID - Static variable in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode
Index values for accessing relatives array.
equals(Object) - Method in class org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl

equals(Object) - Method in class org.apache.lucene.analysis.cn.smart.hhmm.SegToken

equals(Object) - Method in class org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl

equals(Object) - Method in class org.apache.lucene.analysis.miscellaneous.PatternAnalyzer
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in class org.apache.lucene.analysis.Token

equals(Object) - Method in class org.apache.lucene.analysis.Token.TokenAttributeFactory

equals(Object) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

equals(Object) - Method in class org.apache.lucene.analysis.tokenattributes.FlagsAttributeImpl

equals(Object) - Method in class org.apache.lucene.analysis.tokenattributes.KeywordAttributeImpl

equals(Object) - Method in class org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl

equals(Object) - Method in class org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl

equals(Object) - Method in class org.apache.lucene.analysis.tokenattributes.PositionIncrementAttributeImpl

equals(Object) - Method in class org.apache.lucene.analysis.tokenattributes.PositionLengthAttributeImpl

equals(Object) - Method in class org.apache.lucene.analysis.tokenattributes.TypeAttributeImpl

equals(Object) - Method in class org.apache.lucene.facet.enhancements.association.AssociationEnhancement

equals(Object) - Method in class org.apache.lucene.facet.enhancements.association.AssociationFloatProperty

equals(Object) - Method in class org.apache.lucene.facet.enhancements.association.AssociationIntProperty

equals(Object) - Method in class org.apache.lucene.facet.enhancements.association.AssociationsPayloadIterator

equals(Object) - Method in interface org.apache.lucene.facet.enhancements.CategoryEnhancement
Category enhancements must override Object.equals(Object), as it is used in EnhancementsPayloadIterator.getCategoryData(CategoryEnhancement).
equals(Object) - Method in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

equals(Object) - Method in class org.apache.lucene.facet.index.attributes.OrdinalProperty

equals(Object) - Method in class org.apache.lucene.facet.index.CategoryContainer

equals(Object) - Method in class org.apache.lucene.facet.index.params.CategoryListParams
Equality is defined by the 'term' that defines this category list.
equals(Object) - Method in class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams

equals(Object) - Method in class org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator

equals(Object) - Method in class org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator

equals(Object) - Method in class org.apache.lucene.facet.search.aggregator.CountingAggregator

equals(Object) - Method in class org.apache.lucene.facet.search.aggregator.ScoringAggregator

equals(Object) - Method in class org.apache.lucene.facet.search.params.FacetRequest

equals(Object) - Method in class org.apache.lucene.facet.search.PayloadIntDecodingIterator

equals(Object) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Compare the given CategoryPath to another one.
equals(Object) - Method in class org.apache.lucene.index.IndexCommit
Two IndexCommits are equal if both their Directory and versions are equal.
equals(Object) - Method in class org.apache.lucene.index.Payload

equals(Object) - Method in class org.apache.lucene.index.SegmentInfo
We consider another SegmentInfo instance equal if it has the same dir and same name.
equals(Object) - Method in class org.apache.lucene.index.Term

equals(Object) - Method in class org.apache.lucene.index.TermVectorEntry

equals(Object) - Method in class org.apache.lucene.index.TermVectorOffsetInfo
Two TermVectorOffsetInfos are equals if both the start and end offsets are the same
equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl
Deprecated.
equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl
Deprecated.
equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.BoostAttributeImpl
Deprecated.
equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl
Deprecated.
equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl
Deprecated.
equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl
Deprecated.
equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl
Deprecated.
equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl
Deprecated.
equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl
Deprecated.
equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl
Deprecated.
equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl
Deprecated.
equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl
Deprecated.
equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl
Deprecated.
equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.NumericConfig

equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl
Deprecated.
equals(Object) - Method in class org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl
Deprecated.
equals(Object) - Method in class org.apache.lucene.search.BooleanClause
Returns true if o is equal to this.
equals(Object) - Method in class org.apache.lucene.search.BooleanFilter

equals(Object) - Method in class org.apache.lucene.search.BooleanQuery
Returns true iff o is equal to this.
equals(Object) - Method in class org.apache.lucene.search.BoostingQuery

equals(Object) - Method in class org.apache.lucene.search.CachingSpanFilter

equals(Object) - Method in class org.apache.lucene.search.CachingWrapperFilter

equals(Object) - Method in class org.apache.lucene.search.CachingWrapperFilterHelper

equals(Object) - Method in class org.apache.lucene.search.ConstantScoreQuery

equals(Object) - Method in class org.apache.lucene.search.DisjunctionMaxQuery
Return true iff we represent the same query as o
equals(Object) - Method in class org.apache.lucene.search.DuplicateFilter

equals(Object) - Method in class org.apache.lucene.search.FieldCacheRangeFilter

equals(Object) - Method in class org.apache.lucene.search.FieldValueFilter

equals(Object) - Method in class org.apache.lucene.search.FilterClause

equals(Object) - Method in class org.apache.lucene.search.FilteredQuery
Returns true iff o is equal to this.
equals(Object) - Method in class org.apache.lucene.search.function.CustomScoreQuery
Returns true if o is equal to this.
equals(Object) - Method in class org.apache.lucene.search.function.FieldCacheSource

equals(Object) - Method in class org.apache.lucene.search.function.OrdFieldSource

equals(Object) - Method in class org.apache.lucene.search.function.ReverseOrdFieldSource

equals(Object) - Method in class org.apache.lucene.search.function.ValueSource
Needed for possible caching of query results - used by ValueSourceQuery.equals(Object).
equals(Object) - Method in class org.apache.lucene.search.function.ValueSourceQuery
Returns true if o is equal to this.
equals(Object) - Method in class org.apache.lucene.search.FuzzyLikeThisQuery

equals(Object) - Method in class org.apache.lucene.search.FuzzyQuery

equals(Object) - Method in class org.apache.lucene.search.grouping.SearchGroup

equals(Object) - Method in class org.apache.lucene.search.join.ToChildBlockJoinQuery

equals(Object) - Method in class org.apache.lucene.search.join.ToParentBlockJoinQuery

equals(Object) - Method in class org.apache.lucene.search.MatchAllDocsQuery

equals(Object) - Method in class org.apache.lucene.search.MultiPhraseQuery
Returns true if o is equal to this.
equals(Object) - Method in class org.apache.lucene.search.MultiTermQuery

equals(Object) - Method in class org.apache.lucene.search.MultiTermQueryWrapperFilter

equals(Object) - Method in class org.apache.lucene.search.NGramPhraseQuery
Returns true iff o is equal to this.
equals(Object) - Method in class org.apache.lucene.search.NumericRangeQuery

equals(Object) - Method in class org.apache.lucene.search.payloads.AveragePayloadFunction

equals(Object) - Method in class org.apache.lucene.search.payloads.MaxPayloadFunction

equals(Object) - Method in class org.apache.lucene.search.payloads.MinPayloadFunction

equals(Object) - Method in class org.apache.lucene.search.payloads.PayloadFunction

equals(Object) - Method in class org.apache.lucene.search.payloads.PayloadNearQuery

equals(Object) - Method in class org.apache.lucene.search.payloads.PayloadTermQuery

equals(Object) - Method in class org.apache.lucene.search.PhraseQuery
Returns true iff o is equal to this.
equals(Object) - Method in class org.apache.lucene.search.PrefixQuery

equals(Object) - Method in class org.apache.lucene.search.Query

equals(Object) - Method in class org.apache.lucene.search.QueryWrapperFilter

equals(Object) - Method in class org.apache.lucene.search.regex.JakartaRegexpCapabilities

equals(Object) - Method in class org.apache.lucene.search.regex.JavaUtilRegexCapabilities

equals(Object) - Method in class org.apache.lucene.search.regex.RegexQuery

equals(Object) - Method in class org.apache.lucene.search.Sort
Returns true if o is equal to this.
equals(Object) - Method in class org.apache.lucene.search.SortField
Returns true if o is equal to this.
equals(Object) - Method in class org.apache.lucene.search.SpanQueryFilter

equals(Object) - Method in class org.apache.lucene.search.spans.FieldMaskingSpanQuery

equals(Object) - Method in class org.apache.lucene.search.spans.SpanFirstQuery

equals(Object) - Method in class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper

equals(Object) - Method in class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite

equals(Object) - Method in class org.apache.lucene.search.spans.SpanNearPayloadCheckQuery

equals(Object) - Method in class org.apache.lucene.search.spans.SpanNearQuery
Returns true iff o is equal to this.
equals(Object) - Method in class org.apache.lucene.search.spans.SpanNotQuery
Returns true iff o is equal to this.
equals(Object) - Method in class org.apache.lucene.search.spans.SpanOrQuery

equals(Object) - Method in class org.apache.lucene.search.spans.SpanPayloadCheckQuery

equals(Object) - Method in class org.apache.lucene.search.spans.SpanPositionRangeQuery

equals(Object) - Method in class org.apache.lucene.search.spans.SpanTermQuery

equals(Object) - Method in class org.apache.lucene.search.TermQuery
Returns true iff o is equal to this.
equals(Object) - Method in class org.apache.lucene.search.TermRangeQuery

equals(Object) - Method in class org.apache.lucene.search.TermsFilter

equals(Object) - Method in class org.apache.lucene.search.TopTermsRewrite

equals(Object) - Method in class org.apache.lucene.search.WildcardQuery

equals(Object) - Method in class org.apache.lucene.spatial.geohash.GeoHashDistanceFilter
Deprecated. Returns true if o is equal to this.
equals(Object) - Method in class org.apache.lucene.spatial.geometry.CartesianPoint
Deprecated.
equals(Object) - Method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
equals(Object) - Method in class org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.
equals(Object) - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated.
equals(Object) - Method in class org.apache.lucene.spatial.geometry.shape.LineSegment
Deprecated.
equals(Object) - Method in class org.apache.lucene.spatial.geometry.shape.LLRect
Deprecated.
equals(Object) - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
equals(Object) - Method in class org.apache.lucene.spatial.geometry.shape.Rectangle
Deprecated.
equals(Vector2D) - Method in class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated.
equals(Object) - Method in class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated.
equals(Object) - Method in class org.apache.lucene.spatial.tier.DistanceFilter
Deprecated. Returns true if o is equal to this.
equals(Object) - Method in class org.apache.lucene.spatial.tier.LatLongDistanceFilter
Deprecated. Returns true if o is equal to this.
equals(char[], int, char[], int, int) - Static method in class org.apache.lucene.util.ArrayUtil
See if two array slices are the same.
equals(int[], int, int[], int, int) - Static method in class org.apache.lucene.util.ArrayUtil
See if two array slices are the same.
equals(Object) - Method in class org.apache.lucene.util.AttributeSource

equals(Object) - Method in class org.apache.lucene.util.BytesRef

equals(Object) - Method in class org.apache.lucene.util.CharsRef

equals(Object) - Method in class org.apache.lucene.util.collections.ArrayHashMap

equals(Object) - Method in class org.apache.lucene.util.collections.FloatToObjectMap

equals(Object) - Method in class org.apache.lucene.util.collections.IntArray
Equals method.
equals(Object) - Method in class org.apache.lucene.util.collections.IntToDoubleMap

equals(Object) - Method in class org.apache.lucene.util.collections.IntToIntMap

equals(Object) - Method in class org.apache.lucene.util.collections.IntToObjectMap

equals(Object) - Method in class org.apache.lucene.util.collections.ObjectToFloatMap

equals(Object) - Method in class org.apache.lucene.util.collections.ObjectToIntMap

equals(Object) - Method in class org.apache.lucene.util.FixedBitSet
returns true if both sets have the same bits set
equals(Object) - Method in class org.apache.lucene.util.fst.PairOutputs.Pair

equals(Object) - Method in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs.TwoLongs

equals(Object) - Method in class org.apache.lucene.util.IntsRef

equals(Object) - Method in class org.apache.lucene.util.OpenBitSet
returns true if both sets have the same bits set
equals(Object) - Method in class org.tartarus.snowball.ext.ArmenianStemmer

equals(Object) - Method in class org.tartarus.snowball.ext.BasqueStemmer

equals(Object) - Method in class org.tartarus.snowball.ext.CatalanStemmer

equals(Object) - Method in class org.tartarus.snowball.ext.IrishStemmer

equalsToSerialized(CharSequence, int) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Check whether the current path is identical to the one serialized (with CategoryPath.serializeAppendTo(Appendable)) in the given buffer, at the given offset.
equalsToSerialized(int, CharSequence, int) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Just like CategoryPath.equalsToSerialized(CharSequence, int), but compare to a prefix of the CategoryPath, instead of the whole CategoryPath.
error - Variable in class org.apache.lucene.index.CheckIndex.Status.FieldNormStatus
Exception thrown during term index test (null on success)
error - Variable in class org.apache.lucene.index.CheckIndex.Status.StoredFieldStatus
Exception thrown during stored fields test (null on success)
error - Variable in class org.apache.lucene.index.CheckIndex.Status.TermIndexStatus
Exception thrown during term index test (null on success)
error - Variable in class org.apache.lucene.index.CheckIndex.Status.TermVectorStatus
Exception thrown during term vector test (null on success)
escape(String) - Static method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

escape(CharSequence, Locale, EscapeQuerySyntax.Type) - Method in interface org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax

escape(String) - Static method in class org.apache.lucene.queryParser.QueryParser
Returns a String where those characters that QueryParser expects to be escaped are escaped by a preceding \.
escape(CharSequence, Locale, EscapeQuerySyntax.Type) - Method in class org.apache.lucene.queryParser.standard.parser.EscapeQuerySyntaxImpl

escape(String) - Static method in class org.apache.lucene.queryParser.standard.QueryParserUtil
Returns a String where those characters that TextParser expects to be escaped are escaped by a preceding \.
escape(String) - Static method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated. Returns a String where those characters that QueryParser expects to be escaped are escaped by a preceding \.
escapeExtensionField(String) - Method in class org.apache.lucene.queryParser.ext.Extensions
Escapes an extension field.
EscapeQuerySyntax - Interface in org.apache.lucene.queryParser.core.parser
A parser needs to implement EscapeQuerySyntax to allow the QueryNode to escape the queries, when the toQueryString method is called.
EscapeQuerySyntax.Type - Enum in org.apache.lucene.queryParser.core.parser

EscapeQuerySyntaxImpl - Class in org.apache.lucene.queryParser.standard.parser

EscapeQuerySyntaxImpl() - Constructor for class org.apache.lucene.queryParser.standard.parser.EscapeQuerySyntaxImpl

estimatedMergeBytes - Variable in class org.apache.lucene.index.MergePolicy.OneMerge

estimateRamUsage(Object) - Method in class org.apache.lucene.util.RamUsageEstimator
Deprecated. Don't create instances of this class, instead use the static RamUsageEstimator.sizeOf(Object) method.
estimateSize() - Method in class org.apache.lucene.search.FieldCache.CacheEntry
Computes (and stores) the estimated size of the cache Value
eval(MockDirectoryWrapper) - Method in class org.apache.lucene.store.MockDirectoryWrapper.Failure
eval is called on the first write of every new file.
exception - Variable in class org.apache.lucene.util.UncaughtExceptionsRule.UncaughtExceptionEntry

exceptions - Variable in class org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSetExceptions

exceptions - Variable in class org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSuffixExceptions

exec(String[]) - Static method in class org.apache.lucene.benchmark.byTask.Benchmark
Utility: execute benchmark from command line
exec(String, String) - Method in class org.egothor.stemmer.Diff
Construct a patch string that transforms a to b.
execute() - Method in class org.apache.lucene.benchmark.byTask.Benchmark
Execute this benchmark
execute() - Method in class org.apache.lucene.benchmark.byTask.utils.Algorithm
Execute this algorithm
execute(Judge, SubmissionReport, PrintWriter) - Method in class org.apache.lucene.benchmark.quality.QualityBenchmark
Run the quality benchmark.
execute(TwoPhaseCommit...) - Static method in class org.apache.lucene.util.TwoPhaseCommitTool
Executes a 2-phase commit algorithm by first TwoPhaseCommit.prepareCommit() all objects and only if all succeed, it proceeds with TwoPhaseCommit.commit().
exist(String) - Method in class org.apache.lucene.search.spell.SpellChecker
Check whether the word exists in the index.
exists(int) - Method in class org.apache.lucene.search.grouping.SentinelIntSet

ExpandBuff(boolean) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

ExpandBuff(boolean) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

expandingWordNum(long) - Method in class org.apache.lucene.util.OpenBitSet

EXPECTED - Static variable in class org.apache.lucene.util.FieldCacheSanityChecker.InsanityType
Indicates an expected bit of "insanity".
expectedTokenSequences - Variable in exception org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException
Each entry in this array is an array of integers.
expectedTokenSequences - Variable in exception org.apache.lucene.queryParser.ParseException
Each entry in this array is an array of integers.
expectedTokenSequences - Variable in exception org.apache.lucene.queryParser.standard.parser.ParseException
Each entry in this array is an array of integers.
expectedTokenSequences - Variable in exception org.apache.lucene.queryParser.surround.parser.ParseException
Each entry in this array is an array of integers.
explain(IndexReader, int) - Method in class org.apache.lucene.search.BooleanQuery.BooleanWeight

explain(IndexReader, int) - Method in class org.apache.lucene.search.ConstantScoreQuery.ConstantWeight

explain(IndexReader, int) - Method in class org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight
Explain the score we computed for doc
explain() - Method in class org.apache.lucene.search.Explanation.IDFExplanation
This should be calculated lazily if possible.
explain(int) - Method in class org.apache.lucene.search.function.DocValues
Explain the scoring value for the input doc.
explain(Query, int) - Method in class org.apache.lucene.search.IndexSearcher
Returns an Explanation that describes how doc scored against query.
explain(Weight, int) - Method in class org.apache.lucene.search.IndexSearcher
Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.
explain(Weight, int) - Method in class org.apache.lucene.search.MultiSearcher
Deprecated.
explain(int, int, float) - Method in class org.apache.lucene.search.payloads.AveragePayloadFunction

explain(int, int, float) - Method in class org.apache.lucene.search.payloads.MaxPayloadFunction

explain(int, int, float) - Method in class org.apache.lucene.search.payloads.MinPayloadFunction

explain(int, int, float) - Method in class org.apache.lucene.search.payloads.PayloadFunction

explain(int) - Method in class org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanScorer

explain(IndexReader, int) - Method in class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight

explain(int) - Method in class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

explain(Weight, int) - Method in class org.apache.lucene.search.RemoteSearchable
Deprecated.
explain(Weight, int) - Method in interface org.apache.lucene.search.Searchable
Deprecated. Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.
explain(Query, int) - Method in class org.apache.lucene.search.Searcher
Deprecated. Returns an Explanation that describes how doc scored against query.
explain(Weight, int) - Method in class org.apache.lucene.search.Searcher
Deprecated.
explain(int) - Method in class org.apache.lucene.search.spans.SpanScorer
This method is no longer an official member of Scorer, but it is needed by SpanWeight to build an explanation.
explain(IndexReader, int) - Method in class org.apache.lucene.search.spans.SpanWeight

explain(IndexReader, int) - Method in class org.apache.lucene.search.Weight
An explanation of the score computation for the named document.
EXPLAIN_SCORE_TOLERANCE_DELTA - Static variable in class org.apache.lucene.search.CheckHits
Some explains methods calculate their values though a slightly different order of operations from the actual scoring method ...
Explanation - Class in org.apache.lucene.search
Expert: Describes the score computation for document and query.
Explanation() - Constructor for class org.apache.lucene.search.Explanation

Explanation(float, String) - Constructor for class org.apache.lucene.search.Explanation

Explanation.IDFExplanation - Class in org.apache.lucene.search
Small Util class used to pass both an idf factor as well as an explanation for that factor.
Explanation.IDFExplanation() - Constructor for class org.apache.lucene.search.Explanation.IDFExplanation

expungeDeletes(boolean) - Method in class org.apache.lucene.index.IndexWriter
Deprecated.
expungeDeletes() - Method in class org.apache.lucene.index.IndexWriter
Deprecated.
ExtendableQueryParser - Class in org.apache.lucene.queryParser.ext
The ExtendableQueryParser enables arbitrary query parser extension based on a customizable field naming scheme.
ExtendableQueryParser(Version, String, Analyzer) - Constructor for class org.apache.lucene.queryParser.ext.ExtendableQueryParser
Creates a new ExtendableQueryParser instance
ExtendableQueryParser(Version, String, Analyzer, Extensions) - Constructor for class org.apache.lucene.queryParser.ext.ExtendableQueryParser
Creates a new ExtendableQueryParser instance
EXTENDED_ANALYZER - Static variable in class org.apache.lucene.analysis.miscellaneous.PatternAnalyzer
A lower-casing word analyzer with extended English stop words (can be shared freely across threads without harm); global per class loader.
ExtensionQuery - Class in org.apache.lucene.queryParser.ext
ExtensionQuery holds all query components extracted from the original query string like the query field and the extension query string.
ExtensionQuery(QueryParser, String, String) - Constructor for class org.apache.lucene.queryParser.ext.ExtensionQuery
Creates a new ExtensionQuery
Extensions - Class in org.apache.lucene.queryParser.ext
The Extensions class represents an extension mapping to associate ParserExtension instances with extension keys.
Extensions() - Constructor for class org.apache.lucene.queryParser.ext.Extensions
Creates a new Extensions instance with the Extensions.DEFAULT_EXTENSION_FIELD_DELIMITER as a delimiter character.
Extensions(char) - Constructor for class org.apache.lucene.queryParser.ext.Extensions
Creates a new Extensions instance
Extensions.Pair<Cur,Cud> - Class in org.apache.lucene.queryParser.ext
This class represents a generic pair.
Extensions.Pair(Cur, Cud) - Constructor for class org.apache.lucene.queryParser.ext.Extensions.Pair
Creates a new Pair
EXTERNAL_LINK - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

EXTERNAL_LINK_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

EXTERNAL_LINK_URL - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

EXTERNAL_LINK_URL_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

ExternalRefSorter - Class in org.apache.lucene.search.suggest.fst
Builds and iterates over sequences stored on disk.
ExternalRefSorter(Sort) - Constructor for class org.apache.lucene.search.suggest.fst.ExternalRefSorter
Will buffer all sequences to a temporary file and then sort (all on-disk).
extract(StringBuilder, String, String, int, String[]) - Static method in class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
Extract from buf the text of interest within specified tags
extract() - Method in class org.apache.lucene.benchmark.utils.ExtractReuters

extract() - Method in class org.apache.lucene.benchmark.utils.ExtractWikipedia

extract(Query, Map<String, WeightedSpanTerm>) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor
Fills a Map with <@link WeightedSpanTerm>s using the terms from the supplied Query.
extractCategoryTokenData(byte[], int, int) - Method in class org.apache.lucene.facet.enhancements.association.AssociationEnhancement

extractCategoryTokenData(byte[], int, int) - Method in interface org.apache.lucene.facet.enhancements.CategoryEnhancement
Get the data of this enhancement from a category token payload.
extractFile(File) - Method in class org.apache.lucene.benchmark.utils.ExtractReuters
Override if you wish to change what is extracted
ExtractReuters - Class in org.apache.lucene.benchmark.utils
Split the Reuters SGML documents into Simple Text files containing: Title, Date, Dateline, Body
ExtractReuters(File, File) - Constructor for class org.apache.lucene.benchmark.utils.ExtractReuters

extractTasks() - Method in class org.apache.lucene.benchmark.byTask.utils.Algorithm
Expert: for test purposes, return all tasks participating in this algorithm.
extractTerms(Set<Term>) - Method in class org.apache.lucene.search.BooleanQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.ConstantScoreQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.DisjunctionMaxQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.FilteredQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.function.CustomScoreQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.function.ValueSourceQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.join.ToChildBlockJoinQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.join.ToParentBlockJoinQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.MatchAllDocsQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.MultiPhraseQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.PhraseQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.Query
Expert: adds all terms occurring in this query to the terms set.
extractTerms(Set<Term>) - Method in class org.apache.lucene.search.spans.FieldMaskingSpanQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.spans.SpanNearQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.spans.SpanNotQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.spans.SpanOrQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.spans.SpanPositionCheckQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.spans.SpanTermQuery

extractTerms(Set<Term>) - Method in class org.apache.lucene.search.TermQuery

extractUnknownQuery(Query, Map<String, WeightedSpanTerm>) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor

extractWeightedSpanTerms(Map<String, WeightedSpanTerm>, SpanQuery) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor
Fills a Map with <@link WeightedSpanTerm>s using the terms from the supplied SpanQuery.
extractWeightedTerms(Map<String, WeightedSpanTerm>, Query) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor
Fills a Map with <@link WeightedSpanTerm>s using the terms from the supplied Query.
ExtractWikipedia - Class in org.apache.lucene.benchmark.utils
Extract the downloaded Wikipedia dump into separate files for indexing.
ExtractWikipedia(DocMaker, File) - Constructor for class org.apache.lucene.benchmark.utils.ExtractWikipedia

F

F_WORD - Static variable in class org.apache.lucene.search.spell.SpellChecker
Field name for each word in the ngram index.
FacetArrays - Class in org.apache.lucene.facet.search
Provider of arrays used for facet operations such as counting.
FacetArrays(IntArrayAllocator, FloatArrayAllocator) - Constructor for class org.apache.lucene.facet.search.FacetArrays
Create a FacetArrays with certain array allocators.
FacetException - Exception in org.apache.lucene.facet
A parent class for exceptions thrown by the Facets code.
FacetException() - Constructor for exception org.apache.lucene.facet.FacetException

FacetException(String) - Constructor for exception org.apache.lucene.facet.FacetException

FacetException(String, Throwable) - Constructor for exception org.apache.lucene.facet.FacetException

FacetException(Throwable) - Constructor for exception org.apache.lucene.facet.FacetException

FacetIndexingParams - Interface in org.apache.lucene.facet.index.params
Parameters on how facets are to be written to the index.
FacetParamsMissingPropertyException - Exception in org.apache.lucene.facet.index.params
Thrown when the facets params are missing a property.
FacetParamsMissingPropertyException(String) - Constructor for exception org.apache.lucene.facet.index.params.FacetParamsMissingPropertyException

facetRequest - Variable in class org.apache.lucene.facet.search.FacetResultsHandler
Facet request served by this handler.
FacetRequest - Class in org.apache.lucene.facet.search.params
Request to accumulate facet information for a specified facet and possibly also some of its descendants, upto a specified depth.
FacetRequest(CategoryPath, int) - Constructor for class org.apache.lucene.facet.search.params.FacetRequest
Initialize the request with a given path, and a requested number of facets results.
FacetRequest.ResultMode - Enum in org.apache.lucene.facet.search.params
Result structure manner of applying request's limits such as FacetRequest.getNumLabel() and FacetRequest.getNumResults().
FacetRequest.SortBy - Enum in org.apache.lucene.facet.search.params
Sort options for facet results.
FacetRequest.SortOrder - Enum in org.apache.lucene.facet.search.params
Requested sort order for the results.
facetRequests - Variable in class org.apache.lucene.facet.search.params.FacetSearchParams

FacetResult - Class in org.apache.lucene.facet.search.results
Result of faceted search.
FacetResult(FacetRequest, FacetResultNode, int) - Constructor for class org.apache.lucene.facet.search.results.FacetResult

FacetResultNode - Interface in org.apache.lucene.facet.search.results
Result of faceted search for a certain taxonomy node.
FacetResultsHandler - Class in org.apache.lucene.facet.search
Handler for facet results.
FacetResultsHandler(TaxonomyReader, FacetRequest) - Constructor for class org.apache.lucene.facet.search.FacetResultsHandler
Create a faceted search handler.
FacetsAccumulator - Class in org.apache.lucene.facet.search
Driver for Accumulating facets of faceted search requests over given documents.
FacetsAccumulator(FacetSearchParams, IndexReader, TaxonomyReader) - Constructor for class org.apache.lucene.facet.search.FacetsAccumulator

facetsAccumulator - Variable in class org.apache.lucene.facet.search.FacetsCollector

FacetsCollector - Class in org.apache.lucene.facet.search
Collector for facet accumulation.
FacetsCollector(FacetSearchParams, IndexReader, TaxonomyReader) - Constructor for class org.apache.lucene.facet.search.FacetsCollector
Create a collector for accumulating facets while collecting documents during search.
FacetSearchParams - Class in org.apache.lucene.facet.search.params
Faceted search parameters indicate for which facets should info be gathered.
FacetSearchParams(FacetIndexingParams) - Constructor for class org.apache.lucene.facet.search.params.FacetSearchParams
Construct with specific faceted indexing parameters.
FacetSearchParams() - Constructor for class org.apache.lucene.facet.search.params.FacetSearchParams
Construct with default faceted indexing parameters.
FacetSource - Class in org.apache.lucene.benchmark.byTask.feeds
Source items for facets.
FacetSource() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.FacetSource

FacetsPayloadProcessorProvider - Class in org.apache.lucene.facet.index
A PayloadProcessorProvider for updating facets ordinal references, based on an ordinal map.
FacetsPayloadProcessorProvider(Directory, int[], FacetIndexingParams) - Constructor for class org.apache.lucene.facet.index.FacetsPayloadProcessorProvider
Construct FacetsPayloadProcessorProvider with FacetIndexingParams
FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor - Class in org.apache.lucene.facet.index

FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor(FacetIndexingParams, int[]) - Constructor for class org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor
Construct FacetsDirPayloadProcessor with custom FacetIndexingParams
FacetsPayloadProcessorProvider.FacetsPayloadProcessor - Class in org.apache.lucene.facet.index
A PayloadProcessor for updating facets ordinal references, based on an ordinal map
FacetsPayloadProcessorProvider.FacetsPayloadProcessor(CategoryListParams, int[]) - Constructor for class org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsPayloadProcessor

failed - Variable in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

failOn(MockDirectoryWrapper.Failure) - Method in class org.apache.lucene.store.MockDirectoryWrapper
add a Failure object to the list of objects to be evaluated at every potential failure point
failureReason - Variable in class org.apache.lucene.store.Lock
If a lock obtain called, this failureReason may be set with the "root cause" Exception as to why the lock was not obtained.
FARSI_YEH - Static variable in class org.apache.lucene.analysis.fa.PersianNormalizer

FastCharStream - Class in org.apache.lucene.queryParser
An efficient implementation of JavaCC's CharStream interface.
FastCharStream(Reader) - Constructor for class org.apache.lucene.queryParser.FastCharStream
Constructs from a Reader.
FastCharStream - Class in org.apache.lucene.queryParser.surround.parser
An efficient implementation of JavaCC's CharStream interface.
FastCharStream(Reader) - Constructor for class org.apache.lucene.queryParser.surround.parser.FastCharStream
Constructs from a Reader.
fastClear(int) - Method in class org.apache.lucene.util.OpenBitSet
clears a bit.
fastClear(long) - Method in class org.apache.lucene.util.OpenBitSet
clears a bit.
fastFlip(int) - Method in class org.apache.lucene.util.OpenBitSet
flips a bit.
fastFlip(long) - Method in class org.apache.lucene.util.OpenBitSet
flips a bit.
fastGet(int) - Method in class org.apache.lucene.util.OpenBitSet
Returns true or false for the specified bit index.
fastGet(long) - Method in class org.apache.lucene.util.OpenBitSet
Returns true or false for the specified bit index.
fastSet(int) - Method in class org.apache.lucene.util.OpenBitSet
Sets the bit at the specified index.
fastSet(long) - Method in class org.apache.lucene.util.OpenBitSet
Sets the bit at the specified index.
FastVectorHighlighter - Class in org.apache.lucene.search.vectorhighlight
Another highlighter implementation.
FastVectorHighlighter() - Constructor for class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
the default constructor.
FastVectorHighlighter(boolean, boolean) - Constructor for class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
a constructor.
FastVectorHighlighter(boolean, boolean, FragListBuilder, FragmentsBuilder) - Constructor for class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
a constructor.
FATHA - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

FATHATAN - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

FEH - Static variable in class org.apache.lucene.analysis.ar.ArabicStemmer

fetchPartitionResult(FacetArrays, int) - Method in class org.apache.lucene.facet.search.FacetResultsHandler
Fetch results of a single partition, given facet arrays for that partition, and based on the matching documents and faceted search parameters.
fetchPartitionResult(FacetArrays, int) - Method in class org.apache.lucene.facet.search.TopKFacetResultsHandler

fetchPartitionResult(FacetArrays, int) - Method in class org.apache.lucene.facet.search.TopKInEachNodeHandler
Recursively explore all facets that can be potentially included in the FacetResult to be generated, and that belong to the given partition, so that values can be examined and collected.
Field - Class in org.apache.lucene.document
A field is a section of a Document.
Field(String, String, Field.Store, Field.Index) - Constructor for class org.apache.lucene.document.Field
Create a field by specifying its name, value and how it will be saved in the index.
Field(String, String, Field.Store, Field.Index, Field.TermVector) - Constructor for class org.apache.lucene.document.Field
Create a field by specifying its name, value and how it will be saved in the index.
Field(String, boolean, String, Field.Store, Field.Index, Field.TermVector) - Constructor for class org.apache.lucene.document.Field
Create a field by specifying its name, value and how it will be saved in the index.
Field(String, Reader) - Constructor for class org.apache.lucene.document.Field
Create a tokenized and indexed field that is not stored.
Field(String, Reader, Field.TermVector) - Constructor for class org.apache.lucene.document.Field
Create a tokenized and indexed field that is not stored, optionally with storing term vectors.
Field(String, TokenStream) - Constructor for class org.apache.lucene.document.Field
Create a tokenized and indexed field that is not stored.
Field(String, TokenStream, Field.TermVector) - Constructor for class org.apache.lucene.document.Field
Create a tokenized and indexed field that is not stored, optionally with storing term vectors.
Field(String, byte[], Field.Store) - Constructor for class org.apache.lucene.document.Field
Deprecated. Use instead
Field(String, byte[]) - Constructor for class org.apache.lucene.document.Field
Create a stored field with binary value.
Field(String, byte[], int, int, Field.Store) - Constructor for class org.apache.lucene.document.Field
Deprecated. Use instead
Field(String, byte[], int, int) - Constructor for class org.apache.lucene.document.Field
Create a stored field with binary value.
field - Variable in class org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator

field - Variable in class org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator

field() - Method in class org.apache.lucene.index.Term
Returns the field of this term, an interned string.
field - Variable in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
The term's field
field - Variable in class org.apache.lucene.search.FieldComparator.NumericComparator

field() - Method in class org.apache.lucene.search.FieldValueFilter
Returns the field this filter is applied on.
field - Variable in class org.apache.lucene.search.function.OrdFieldSource

field - Variable in class org.apache.lucene.search.function.ReverseOrdFieldSource

field - Variable in class org.apache.lucene.search.spans.SpanNearQuery

field() - Method in class org.apache.lucene.store.instantiated.InstantiatedTerm

Field.Index - Enum in org.apache.lucene.document
Specifies whether and how a field should be indexed.
Field.Store - Enum in org.apache.lucene.document
Specifies whether and how a field should be stored.
Field.TermVector - Enum in org.apache.lucene.document
Specifies whether and how a field should have term vectors.
FIELD_BOOST_MAP - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set a field to boost map that is used to set the boost for each field
FIELD_DATE_RESOLUTION_MAP - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set a field to DateTools.Resolution map that is used to normalize each date field value.
FIELD_DOC - Static variable in class org.apache.lucene.search.SortField
Represents sorting by document number (index order).
FIELD_INFOS_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of field infos
FIELD_SCORE - Static variable in class org.apache.lucene.search.SortField
Represents sorting by document score (relevance).
Fieldable - Interface in org.apache.lucene.document
Synonymous with Field.
FieldableNode - Interface in org.apache.lucene.queryParser.core.nodes
A query node implements FieldableNode interface to indicate that its children and itself are associated to a specific field.
FieldBoostMapAttribute - Interface in org.apache.lucene.queryParser.standard.config
Deprecated.
FieldBoostMapAttributeImpl - Class in org.apache.lucene.queryParser.standard.config
Deprecated.
FieldBoostMapAttributeImpl() - Constructor for class org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl
Deprecated.
FieldBoostMapFCListener - Class in org.apache.lucene.queryParser.standard.config
This listener listens for every field configuration request and assign a StandardQueryConfigHandler.ConfigurationKeys.BOOST to the equivalent FieldConfig based on a defined map: fieldName -> boostValue stored in StandardQueryConfigHandler.ConfigurationKeys.FIELD_BOOST_MAP.
FieldBoostMapFCListener(QueryConfigHandler) - Constructor for class org.apache.lucene.queryParser.standard.config.FieldBoostMapFCListener

FieldCache - Interface in org.apache.lucene.search
Expert: Maintains caches of term values.
FieldCache.ByteParser - Interface in org.apache.lucene.search
Interface to parse bytes from document fields.
FieldCache.CacheEntry - Class in org.apache.lucene.search
EXPERT: A unique Identifier/Description for each item in the FieldCache.
FieldCache.CacheEntry() - Constructor for class org.apache.lucene.search.FieldCache.CacheEntry

FieldCache.CreationPlaceholder - Class in org.apache.lucene.search

FieldCache.CreationPlaceholder() - Constructor for class org.apache.lucene.search.FieldCache.CreationPlaceholder

FieldCache.DoubleParser - Interface in org.apache.lucene.search
Interface to parse doubles from document fields.
FieldCache.FloatParser - Interface in org.apache.lucene.search
Interface to parse floats from document fields.
FieldCache.IntParser - Interface in org.apache.lucene.search
Interface to parse ints from document fields.
FieldCache.LongParser - Interface in org.apache.lucene.search
Interface to parse long from document fields.
FieldCache.Parser - Interface in org.apache.lucene.search
Marker interface as super-interface to all parsers.
FieldCache.ShortParser - Interface in org.apache.lucene.search
Interface to parse shorts from document fields.
FieldCache.StringIndex - Class in org.apache.lucene.search
Expert: Stores term text values and document ordering data.
FieldCache.StringIndex(int[], String[]) - Constructor for class org.apache.lucene.search.FieldCache.StringIndex
Creates one of these objects
FieldCacheDocIdSet - Class in org.apache.lucene.search
Base class for DocIdSet to be used with FieldCache.
FieldCacheDocIdSet(IndexReader) - Constructor for class org.apache.lucene.search.FieldCacheDocIdSet

FieldCacheRangeFilter<T> - Class in org.apache.lucene.search
A range filter built on top of a cached single term field (in FieldCache).
FieldCacheSanityChecker - Class in org.apache.lucene.util
Provides methods for sanity checking that entries in the FieldCache are not wasteful or inconsistent.
FieldCacheSanityChecker() - Constructor for class org.apache.lucene.util.FieldCacheSanityChecker

FieldCacheSanityChecker.Insanity - Class in org.apache.lucene.util
Simple container for a collection of related CacheEntry objects that in conjunction with each other represent some "insane" usage of the FieldCache.
FieldCacheSanityChecker.Insanity(FieldCacheSanityChecker.InsanityType, String, FieldCache.CacheEntry...) - Constructor for class org.apache.lucene.util.FieldCacheSanityChecker.Insanity

FieldCacheSanityChecker.InsanityType - Class in org.apache.lucene.util
An Enumeration of the different types of "insane" behavior that may be detected in a FieldCache.
FieldCacheSource - Class in org.apache.lucene.search.function
Expert: A base class for ValueSource implementations that retrieve values for a single field from the FieldCache.
FieldCacheSource(String) - Constructor for class org.apache.lucene.search.function.FieldCacheSource
Create a cached field source for the input field.
FieldCacheTermsFilter - Class in org.apache.lucene.search
A Filter that only accepts documents whose single term value in the specified field is contained in the provided set of allowed terms.
FieldCacheTermsFilter(String, String...) - Constructor for class org.apache.lucene.search.FieldCacheTermsFilter

FieldComparator<T> - Class in org.apache.lucene.search
Expert: a FieldComparator compares hits so as to determine their sort order when collecting the top results with TopFieldCollector.
FieldComparator() - Constructor for class org.apache.lucene.search.FieldComparator

FieldComparator.ByteComparator - Class in org.apache.lucene.search
Parses field's values as byte (using FieldCache.getBytes(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
FieldComparator.DocComparator - Class in org.apache.lucene.search
Sorts by ascending docID
FieldComparator.DoubleComparator - Class in org.apache.lucene.search
Parses field's values as double (using FieldCache.getDoubles(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
FieldComparator.FloatComparator - Class in org.apache.lucene.search
Parses field's values as float (using FieldCache.getFloats(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
FieldComparator.IntComparator - Class in org.apache.lucene.search
Parses field's values as int (using FieldCache.getInts(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
FieldComparator.LongComparator - Class in org.apache.lucene.search
Parses field's values as long (using FieldCache.getLongs(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
FieldComparator.NumericComparator<T extends Number> - Class in org.apache.lucene.search

FieldComparator.NumericComparator(String, T) - Constructor for class org.apache.lucene.search.FieldComparator.NumericComparator

FieldComparator.RelevanceComparator - Class in org.apache.lucene.search
Sorts by descending relevance.
FieldComparator.ShortComparator - Class in org.apache.lucene.search
Parses field's values as short (using FieldCache.getShorts(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
FieldComparator.StringComparatorLocale - Class in org.apache.lucene.search
Sorts by a field's value using the Collator for a given Locale.
FieldComparator.StringOrdValComparator - Class in org.apache.lucene.search
Sorts by field's natural String sort order, using ordinals.
FieldComparator.StringOrdValComparator(int, String, int, boolean) - Constructor for class org.apache.lucene.search.FieldComparator.StringOrdValComparator

FieldComparator.StringValComparator - Class in org.apache.lucene.search
Sorts by field's natural String sort order.
FieldComparatorSource - Class in org.apache.lucene.search
Provides a FieldComparator for custom field sorting.
FieldComparatorSource() - Constructor for class org.apache.lucene.search.FieldComparatorSource

FieldConfig - Class in org.apache.lucene.queryParser.core.config
This class represents a field configuration.
FieldConfig(CharSequence) - Constructor for class org.apache.lucene.queryParser.core.config.FieldConfig
Deprecated. use FieldConfig.FieldConfig(String) instead
FieldConfig(String) - Constructor for class org.apache.lucene.queryParser.core.config.FieldConfig
Constructs a FieldConfig
FieldConfigListener - Interface in org.apache.lucene.queryParser.core.config
This interface should be implemented by classes that wants to listen for field configuration requests.
FieldDateResolutionFCListener - Class in org.apache.lucene.queryParser.standard.config
This listener listens for every field configuration request and assign a DateResolutionAttribute to the equivalent FieldConfig based on a defined map: fieldName -> DateTools.Resolution stored in FieldDateResolutionMapAttribute in the DateResolutionAttribute.
FieldDateResolutionFCListener(QueryConfigHandler) - Constructor for class org.apache.lucene.queryParser.standard.config.FieldDateResolutionFCListener

FieldDateResolutionMapAttribute - Interface in org.apache.lucene.queryParser.standard.config
Deprecated.
FieldDateResolutionMapAttributeImpl - Class in org.apache.lucene.queryParser.standard.config
Deprecated.
FieldDateResolutionMapAttributeImpl() - Constructor for class org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl
Deprecated.
FieldDoc - Class in org.apache.lucene.search
Expert: A ScoreDoc which also contains information about how to sort the referenced document.
FieldDoc(int, float) - Constructor for class org.apache.lucene.search.FieldDoc
Expert: Creates one of these objects with empty sort information.
FieldDoc(int, float, Object[]) - Constructor for class org.apache.lucene.search.FieldDoc
Expert: Creates one of these objects with the given sort information.
FieldDoc(int, float, Object[], int) - Constructor for class org.apache.lucene.search.FieldDoc
Expert: Creates one of these objects with the given sort information.
fieldFlags - Variable in class org.apache.lucene.index.pruning.StorePruningPolicy
Pruning in effect for each field
fieldFlags - Variable in class org.apache.lucene.index.pruning.TermPruningPolicy
Pruning operations to be conducted on fields.
FieldFragList - Class in org.apache.lucene.search.vectorhighlight
FieldFragList has a list of "frag info" that is used by FragmentsBuilder class to create fragments (snippets).
FieldFragList(int) - Constructor for class org.apache.lucene.search.vectorhighlight.FieldFragList
a constructor.
FieldFragList.WeightedFragInfo - Class in org.apache.lucene.search.vectorhighlight

FieldFragList.WeightedFragInfo(int, int, List<FieldPhraseList.WeightedPhraseInfo>) - Constructor for class org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo

FieldFragList.WeightedFragInfo.SubInfo - Class in org.apache.lucene.search.vectorhighlight

FieldInfo - Class in org.apache.lucene.index
Access to the Fieldable Info file that describes document fields and whether or not they are indexed.
fieldInfo(String) - Method in class org.apache.lucene.index.FieldInfos

fieldInfo(int) - Method in class org.apache.lucene.index.FieldInfos
Return the fieldinfo object referenced by the fieldNumber.
FieldInfo.IndexOptions - Enum in org.apache.lucene.index
Controls how much information is stored in the postings lists.
FieldInfos - Class in org.apache.lucene.index
Collection of FieldInfos (accessible by number or by name).
FieldInfos() - Constructor for class org.apache.lucene.index.FieldInfos

FieldInfos(Directory, String) - Constructor for class org.apache.lucene.index.FieldInfos
Construct a FieldInfos object using the directory and the name of the file IndexInput
fieldInfos - Variable in class org.apache.lucene.index.SegmentWriteState

FieldInvertState - Class in org.apache.lucene.index
This class tracks the number and position / offset parameters of terms being added to the index.
FieldInvertState() - Constructor for class org.apache.lucene.index.FieldInvertState

FieldInvertState(int, int, int, int, float) - Constructor for class org.apache.lucene.index.FieldInvertState

fieldList - Variable in class org.apache.lucene.facet.index.CategoryDocumentBuilder
A list of fields which is filled at ancestors' construction and used during CategoryDocumentBuilder.build(Document).
FieldMaskingSpanQuery - Class in org.apache.lucene.search.spans
Wrapper to allow SpanQuery objects participate in composite single-field SpanQueries by 'lying' about their search field.
FieldMaskingSpanQuery(SpanQuery, String) - Constructor for class org.apache.lucene.search.spans.FieldMaskingSpanQuery

fieldName(int) - Method in class org.apache.lucene.index.FieldInfos
Return the fieldName identified by its number.
fieldName - Variable in class org.apache.lucene.search.payloads.PayloadNearQuery

fieldNameComparator(String) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor
Necessary to implement matches for queries against defaultField
fieldNamesToString(StringBuilder) - Method in class org.apache.lucene.queryParser.surround.query.FieldsQuery

FieldNormModifier - Class in org.apache.lucene.index
Deprecated. This class is broken, as it does not correctly take position overlaps into account.
FieldNormModifier(Directory, Similarity) - Constructor for class org.apache.lucene.index.FieldNormModifier
Deprecated. Constructor for code that wishes to use this class programmatically If Similarity is null, kill the field norms.
fieldNormStatus - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
Status for testing of field norms (null if field norms could not be tested).
fieldNumber(String) - Method in class org.apache.lucene.index.FieldInfos
lookup the number of a field by name.
FieldPhraseList - Class in org.apache.lucene.search.vectorhighlight
FieldPhraseList has a list of WeightedPhraseInfo that is used by FragListBuilder to create a FieldFragList object.
FieldPhraseList(FieldTermStack, FieldQuery) - Constructor for class org.apache.lucene.search.vectorhighlight.FieldPhraseList
create a FieldPhraseList that has no limit on the number of phrases to analyze
FieldPhraseList(FieldTermStack, FieldQuery, int) - Constructor for class org.apache.lucene.search.vectorhighlight.FieldPhraseList
a constructor.
FieldPhraseList.WeightedPhraseInfo - Class in org.apache.lucene.search.vectorhighlight

FieldPhraseList.WeightedPhraseInfo(LinkedList<FieldTermStack.TermInfo>, float) - Constructor for class org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo

FieldPhraseList.WeightedPhraseInfo(LinkedList<FieldTermStack.TermInfo>, float, int) - Constructor for class org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo

FieldPhraseList.WeightedPhraseInfo.Toffs - Class in org.apache.lucene.search.vectorhighlight

FieldPhraseList.WeightedPhraseInfo.Toffs(int, int) - Constructor for class org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo.Toffs

FieldQuery - Class in org.apache.lucene.search.vectorhighlight
FieldQuery breaks down query object into terms/phrases and keep them in QueryPhraseMap structure.
FieldQuery.QueryPhraseMap - Class in org.apache.lucene.search.vectorhighlight

FieldQuery.QueryPhraseMap(FieldQuery) - Constructor for class org.apache.lucene.search.vectorhighlight.FieldQuery.QueryPhraseMap

FieldQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A FieldQueryNode represents a element that contains field/text tuple
FieldQueryNode(CharSequence, CharSequence, int, int) - Constructor for class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

FieldQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
Builds a TermQuery object from a FieldQueryNode object.
FieldQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.FieldQueryNodeBuilder

FieldReaderException - Exception in org.apache.lucene.index
Exception thrown when stored fields have an unexpected format.
FieldReaderException() - Constructor for exception org.apache.lucene.index.FieldReaderException
Constructs a new runtime exception with null as its detail message.
FieldReaderException(Throwable) - Constructor for exception org.apache.lucene.index.FieldReaderException
Constructs a new runtime exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
FieldReaderException(String) - Constructor for exception org.apache.lucene.index.FieldReaderException
Constructs a new runtime exception with the specified detail message.
FieldReaderException(String, Throwable) - Constructor for exception org.apache.lucene.index.FieldReaderException
Constructs a new runtime exception with the specified detail message and cause.
fields - Variable in class org.apache.lucene.queryParser.MultiFieldQueryParser

fields - Variable in class org.apache.lucene.search.FieldDoc
Expert: The values which are used to sort the referenced document.
fields - Variable in class org.apache.lucene.search.FieldValueHitQueue
Stores the sort criteria being used.
fields - Variable in class org.apache.lucene.search.TopFieldDocs
The fields which were used to sort results by.
FIELDS_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of stored fields file
FIELDS_HEADER_INDICATOR - Static variable in class org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask

FIELDS_INDEX_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of stored fields index file
FieldScoreQuery - Class in org.apache.lucene.search.function
A query that scores each document as the value of the numeric input field.
FieldScoreQuery(String, FieldScoreQuery.Type) - Constructor for class org.apache.lucene.search.function.FieldScoreQuery
Create a FieldScoreQuery - a query that scores each document as the value of the numeric input field.
FieldScoreQuery.Type - Class in org.apache.lucene.search.function
Type of score field, indicating how field values are interpreted/parsed.
fieldsData - Variable in class org.apache.lucene.document.AbstractField

fieldSelector - Variable in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetLoadFieldSelectorTask

FieldSelector - Interface in org.apache.lucene.document
Similar to a FileFilter, the FieldSelector allows one to make decisions about what Fields get loaded on a Document by IndexReader.document(int,org.apache.lucene.document.FieldSelector)
FieldSelectorResult - Enum in org.apache.lucene.document
Provides information about what should be done with this Field
FieldSortedTermVectorMapper - Class in org.apache.lucene.index
For each Field, store a sorted collection of TermVectorEntrys
This is not thread-safe.
FieldSortedTermVectorMapper(Comparator<TermVectorEntry>) - Constructor for class org.apache.lucene.index.FieldSortedTermVectorMapper

FieldSortedTermVectorMapper(boolean, boolean, Comparator<TermVectorEntry>) - Constructor for class org.apache.lucene.index.FieldSortedTermVectorMapper

FieldsQuery() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

FieldsQuery - Class in org.apache.lucene.queryParser.surround.query

FieldsQuery(SrndQuery, List<String>, char) - Constructor for class org.apache.lucene.queryParser.surround.query.FieldsQuery

FieldsQuery(SrndQuery, String, char) - Constructor for class org.apache.lucene.queryParser.surround.query.FieldsQuery

FieldsQueryList() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

FieldTermStack - Class in org.apache.lucene.search.vectorhighlight
FieldTermStack is a stack that keeps query terms in the specified field of the document to be highlighted.
FieldTermStack(IndexReader, int, String, FieldQuery) - Constructor for class org.apache.lucene.search.vectorhighlight.FieldTermStack
a constructor.
FieldTermStack.TermInfo - Class in org.apache.lucene.search.vectorhighlight

FieldValueFilter - Class in org.apache.lucene.search
A Filter that accepts all documents that have one or more values in a given field.
FieldValueFilter(String) - Constructor for class org.apache.lucene.search.FieldValueFilter
Creates a new FieldValueFilter
FieldValueFilter(String, boolean) - Constructor for class org.apache.lucene.search.FieldValueFilter
Creates a new FieldValueFilter
FieldValueHitQueue<T extends FieldValueHitQueue.Entry> - Class in org.apache.lucene.search
Expert: A hit queue for sorting by hits by terms in more than one field.
FieldValueHitQueue.Entry - Class in org.apache.lucene.search

FieldValueHitQueue.Entry(int, int, float) - Constructor for class org.apache.lucene.search.FieldValueHitQueue.Entry

FieldValuePairQueryNode<T> - Interface in org.apache.lucene.queryParser.core.nodes
This interface should be implemented by QueryNode that holds a field and an arbitrary value.
file - Variable in class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput

FileBasedQueryMaker - Class in org.apache.lucene.benchmark.byTask.feeds
Create queries from a FileReader.
FileBasedQueryMaker() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.FileBasedQueryMaker

FileDictionary - Class in org.apache.lucene.search.suggest
Dictionary represented by a text file.
FileDictionary(InputStream) - Constructor for class org.apache.lucene.search.suggest.FileDictionary

FileDictionary(Reader) - Constructor for class org.apache.lucene.search.suggest.FileDictionary
Creates a dictionary based on a reader.
fileExists(String) - Method in class org.apache.lucene.store.Directory
Returns true iff a file with the given name exists.
fileExists(String) - Method in class org.apache.lucene.store.FileSwitchDirectory

fileExists(String) - Method in class org.apache.lucene.store.FSDirectory
Returns true iff a file with the given name exists.
fileExists(String) - Method in class org.apache.lucene.store.MockDirectoryWrapper

fileExists(String) - Method in class org.apache.lucene.store.NRTCachingDirectory

fileExists(String) - Method in class org.apache.lucene.store.RAMDirectory
Returns true iff the named file exists in this directory.
fileLength(String) - Method in class org.apache.lucene.store.Directory
Returns the length of a file in the directory.
fileLength(String) - Method in class org.apache.lucene.store.FileSwitchDirectory

fileLength(String) - Method in class org.apache.lucene.store.FSDirectory
Returns the length in bytes of a file in the directory.
fileLength(String) - Method in class org.apache.lucene.store.MockDirectoryWrapper

fileLength(String) - Method in class org.apache.lucene.store.NRTCachingDirectory

fileLength(String) - Method in class org.apache.lucene.store.RAMDirectory
Returns the length in bytes of a file in the directory.
fileMap - Variable in class org.apache.lucene.store.RAMDirectory

fileModified(String) - Method in class org.apache.lucene.store.Directory
Deprecated.
fileModified(String) - Method in class org.apache.lucene.store.FileSwitchDirectory

fileModified(String) - Method in class org.apache.lucene.store.FSDirectory
Returns the time the named file was last modified.
fileModified(File, String) - Static method in class org.apache.lucene.store.FSDirectory
Returns the time the named file was last modified.
fileModified(String) - Method in class org.apache.lucene.store.MockDirectoryWrapper

fileModified(String) - Method in class org.apache.lucene.store.NRTCachingDirectory

fileModified(String) - Method in class org.apache.lucene.store.RAMDirectory
Returns the time the named file was last modified.
FILENAME - Static variable in class org.apache.lucene.search.suggest.fst.FSTLookup
Deprecated. Serialized automaton file name (storage).
FILENAME_SUFFIX - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

FILENAME_SUFFIX - Static variable in class org.apache.lucene.analysis.ja.dict.ConnectionCosts

fileNameFromGeneration(String, String, long) - Static method in class org.apache.lucene.index.IndexFileNames
Computes the full file name from base, extension and generation.
files() - Method in class org.apache.lucene.index.SegmentInfo

files(Directory, boolean) - Method in class org.apache.lucene.index.SegmentInfos
Returns all file names referenced by SegmentInfo instances matching the provided Directory (ie files associated with any "external" segments are skipped).
FileSwitchDirectory - Class in org.apache.lucene.store
Expert: A Directory instance that switches files between two other Directory instances.
FileSwitchDirectory(Set<String>, Directory, Directory, boolean) - Constructor for class org.apache.lucene.store.FileSwitchDirectory

FileUtils - Class in org.apache.lucene.benchmark.byTask.utils
File utilities.
FileUtils() - Constructor for class org.apache.lucene.benchmark.byTask.utils.FileUtils

fill(CharacterUtils.CharacterBuffer, Reader) - Method in class org.apache.lucene.util.CharacterUtils
Fills the CharacterUtils.CharacterBuffer with characters read from the given reader Reader.
fill(BytesRef, long) - Method in class org.apache.lucene.util.PagedBytes.Reader
Reads length as 1 or 2 byte vInt prefix, starting at start.
fillAndGetIndex(BytesRef, long) - Method in class org.apache.lucene.util.PagedBytes.Reader
Reads length as 1 or 2 byte vInt prefix, starting at start.
fillAndGetStart(BytesRef, long) - Method in class org.apache.lucene.util.PagedBytes.Reader
Reads length as 1 or 2 byte vInt prefix, starting at start and returns the start offset of the next part, suitable as start parameter on next call to sequentially read all BytesRef.
FillBuff() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

FillBuff() - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

fillCategoriesMap(Iterable<CategoryAttribute>) - Method in class org.apache.lucene.facet.index.CategoryDocumentBuilder
Fills the categories mapping between a field name and a list of categories that belongs to it according to this builder's FacetIndexingParams object
FILLER_TOKEN - Static variable in class org.apache.lucene.analysis.shingle.ShingleFilter
filler token for when positionIncrement is more than 1
fillSlice(BytesRef, long, int) - Method in class org.apache.lucene.util.PagedBytes.Reader
Gets a slice out of PagedBytes starting at start with a given length.
fillSliceWithPrefix(BytesRef, long) - Method in class org.apache.lucene.util.PagedBytes.Reader
Gets a slice out of PagedBytes starting at start, the length is read as 1 or 2 byte vInt prefix.
fillTotalCountsForPartition(int[], int) - Method in class org.apache.lucene.facet.search.TotalFacetCounts
Fill a partition's array with the TotalCountsArray values.
filter(SegToken) - Method in class org.apache.lucene.analysis.cn.smart.hhmm.SegTokenFilter
Filter an input SegToken
filter - Variable in class org.apache.lucene.search.ConstantScoreQuery

Filter - Class in org.apache.lucene.search
Abstract base class for restricting which documents may be returned during searching.
Filter() - Constructor for class org.apache.lucene.search.Filter

filter - Variable in class org.apache.lucene.search.FilterManager.FilterItem
Deprecated.
filter - Variable in class org.apache.lucene.search.RemoteCachingWrapperFilter
Deprecated.
FilterBuilder - Interface in org.apache.lucene.xmlparser

FilterBuilderFactory - Class in org.apache.lucene.xmlparser

FilterBuilderFactory() - Constructor for class org.apache.lucene.xmlparser.FilterBuilderFactory

FilterClause - Class in org.apache.lucene.search
A Filter that wrapped with an indication of how that filter is used when composed with another filter.
FilterClause(Filter, BooleanClause.Occur) - Constructor for class org.apache.lucene.search.FilterClause
Create a new FilterClause
filterCleaner - Variable in class org.apache.lucene.search.FilterManager
Deprecated. Cache cleaner that runs in a separate thread
FilteredDocIdSet - Class in org.apache.lucene.search
Abstract decorator class for a DocIdSet implementation that provides on-demand filtering/validation mechanism on a given DocIdSet.
FilteredDocIdSet(DocIdSet) - Constructor for class org.apache.lucene.search.FilteredDocIdSet
Constructor.
FilteredDocIdSetIterator - Class in org.apache.lucene.search
Abstract decorator class of a DocIdSetIterator implementation that provides on-demand filter/validation mechanism on an underlying DocIdSetIterator.
FilteredDocIdSetIterator(DocIdSetIterator) - Constructor for class org.apache.lucene.search.FilteredDocIdSetIterator
Constructor.
FilteredQuery - Class in org.apache.lucene.search
A query that applies a filter to the results of another query.
FilteredQuery(Query, Filter) - Constructor for class org.apache.lucene.search.FilteredQuery
Constructs a new query which applies a filter to the results of the original query.
FilteredQueryBuilder - Class in org.apache.lucene.xmlparser.builders

FilteredQueryBuilder(FilterBuilder, QueryBuilder) - Constructor for class org.apache.lucene.xmlparser.builders.FilteredQueryBuilder

FilteredTermEnum - Class in org.apache.lucene.search
Abstract class for enumerating a subset of all terms.
FilteredTermEnum() - Constructor for class org.apache.lucene.search.FilteredTermEnum

filterFactory - Variable in class org.apache.lucene.xmlparser.CoreParser

FilterIndexReader - Class in org.apache.lucene.index
A FilterIndexReader contains another IndexReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
FilterIndexReader(IndexReader) - Constructor for class org.apache.lucene.index.FilterIndexReader
Construct a FilterIndexReader based on the specified base reader.
FilterIndexReader.FilterTermDocs - Class in org.apache.lucene.index
Base class for filtering TermDocs implementations.
FilterIndexReader.FilterTermDocs(TermDocs) - Constructor for class org.apache.lucene.index.FilterIndexReader.FilterTermDocs

FilterIndexReader.FilterTermEnum - Class in org.apache.lucene.index
Base class for filtering TermEnum implementations.
FilterIndexReader.FilterTermEnum(TermEnum) - Constructor for class org.apache.lucene.index.FilterIndexReader.FilterTermEnum

FilterIndexReader.FilterTermPositions - Class in org.apache.lucene.index
Base class for filtering TermPositions implementations.
FilterIndexReader.FilterTermPositions(TermPositions) - Constructor for class org.apache.lucene.index.FilterIndexReader.FilterTermPositions

FilteringTokenFilter - Class in org.apache.lucene.analysis
Abstract base class for TokenFilters that may remove tokens.
FilteringTokenFilter(boolean, TokenStream) - Constructor for class org.apache.lucene.analysis.FilteringTokenFilter

FilterManager - Class in org.apache.lucene.search
Deprecated. used by remote package which is deprecated as well. You should use CachingWrapperFilter if you wish to cache Filters.
FilterManager() - Constructor for class org.apache.lucene.search.FilterManager
Deprecated. Sets up the FilterManager singleton.
FilterManager.FilterCleaner - Class in org.apache.lucene.search
Deprecated. Keeps the cache from getting too big.
FilterManager.FilterCleaner() - Constructor for class org.apache.lucene.search.FilterManager.FilterCleaner
Deprecated.
FilterManager.FilterItem - Class in org.apache.lucene.search
Deprecated. Holds the filter and the last time the filter was used, to make LRU-based cache cleaning possible.
FilterManager.FilterItem(Filter) - Constructor for class org.apache.lucene.search.FilterManager.FilterItem
Deprecated.
finalResult(OpenBitSetDISI, int) - Method in class org.apache.lucene.search.ChainedFilter
Deprecated. Either use CachingWrapperFilter, or switch to a different DocIdSet implementation yourself. This method will be removed in Lucene 4.0
find(String) - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

find(char[], int) - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

find(int) - Method in class org.apache.lucene.search.grouping.SentinelIntSet
returns the slot for this key, or -slot-1 if not found
find(K) - Method in class org.apache.lucene.util.collections.ArrayHashMap
Returns the index of the given key, or zero if the key wasn't found.
find(float) - Method in class org.apache.lucene.util.collections.FloatToObjectMap
Find the actual index of a given key.
find(int) - Method in class org.apache.lucene.util.collections.IntHashSet
Find the actual index of a given key.
find(int) - Method in class org.apache.lucene.util.collections.IntToDoubleMap
Find the actual index of a given key.
find(int) - Method in class org.apache.lucene.util.collections.IntToIntMap
Find the actual index of a given key.
find(int) - Method in class org.apache.lucene.util.collections.IntToObjectMap
Find the actual index of a given key.
find(K) - Method in class org.apache.lucene.util.collections.ObjectToFloatMap
Find the actual index of a given key.
find(K) - Method in class org.apache.lucene.util.collections.ObjectToIntMap
Find the actual index of a given key.
find_among(Among[], int) - Method in class org.tartarus.snowball.SnowballProgram

find_among_b(Among[], int) - Method in class org.tartarus.snowball.SnowballProgram

findCategory(CategoryPath) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Look up the given category in the cache and/or the on-disk storage, returning the category's ordinal, or a negative number in case the category does not yet exist in the taxonomy.
findDistanceUnit(String) - Static method in enum org.apache.lucene.spatial.geometry.DistanceUnits
Deprecated. Returns the DistanceUnit which represents the given unit
findEndOffset(StringBuilder, int) - Method in interface org.apache.lucene.search.vectorhighlight.BoundaryScanner
Scan forward to find start offset.
findEndOffset(StringBuilder, int) - Method in class org.apache.lucene.search.vectorhighlight.BreakIteratorBoundaryScanner

findEndOffset(StringBuilder, int) - Method in class org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner

findForcedDeletesMerges(SegmentInfos) - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy

findForcedDeletesMerges(SegmentInfos) - Method in class org.apache.lucene.index.LogMergePolicy
Finds merges necessary to force-merge all deletes from the index.
findForcedDeletesMerges(SegmentInfos) - Method in class org.apache.lucene.index.MergePolicy
Determine what set of merge operations is necessary in order to expunge all deletes from the index.
findForcedDeletesMerges(SegmentInfos) - Method in class org.apache.lucene.index.MockRandomMergePolicy

findForcedDeletesMerges(SegmentInfos) - Method in class org.apache.lucene.index.NoMergePolicy

findForcedDeletesMerges(SegmentInfos) - Method in class org.apache.lucene.index.TieredMergePolicy

findForcedDeletesMerges(SegmentInfos) - Method in class org.apache.lucene.index.UpgradeIndexMergePolicy

findForcedMerges(SegmentInfos, int, Map<SegmentInfo, Boolean>) - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy

findForcedMerges(SegmentInfos, int, Map<SegmentInfo, Boolean>) - Method in class org.apache.lucene.index.LogMergePolicy
Returns the merges necessary to merge the index down to a specified number of segments.
findForcedMerges(SegmentInfos, int, Map<SegmentInfo, Boolean>) - Method in class org.apache.lucene.index.MergePolicy
Determine what set of merge operations is necessary in order to merge to <= the specified segment count.
findForcedMerges(SegmentInfos, int, Map<SegmentInfo, Boolean>) - Method in class org.apache.lucene.index.MockRandomMergePolicy

findForcedMerges(SegmentInfos, int, Map<SegmentInfo, Boolean>) - Method in class org.apache.lucene.index.NoMergePolicy

findForcedMerges(SegmentInfos, int, Map<SegmentInfo, Boolean>) - Method in class org.apache.lucene.index.TieredMergePolicy

findForcedMerges(SegmentInfos, int, Map<SegmentInfo, Boolean>) - Method in class org.apache.lucene.index.UpgradeIndexMergePolicy

findIndexCommit(Directory, String) - Static method in class org.apache.lucene.benchmark.byTask.tasks.OpenReaderTask

findMerges(SegmentInfos) - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy

findMerges(SegmentInfos) - Method in class org.apache.lucene.index.LogMergePolicy
Checks if any merges are now necessary and returns a MergePolicy.MergeSpecification if so.
findMerges(SegmentInfos) - Method in class org.apache.lucene.index.MergePolicy
Determine what set of merge operations are now necessary on the index.
findMerges(SegmentInfos) - Method in class org.apache.lucene.index.MockRandomMergePolicy

findMerges(SegmentInfos) - Method in class org.apache.lucene.index.NoMergePolicy

findMerges(SegmentInfos) - Method in class org.apache.lucene.index.TieredMergePolicy

findMerges(SegmentInfos) - Method in class org.apache.lucene.index.UpgradeIndexMergePolicy

findPattern(String) - Method in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree

findStartOffset(StringBuilder, int) - Method in interface org.apache.lucene.search.vectorhighlight.BoundaryScanner
Scan backward to find end offset.
findStartOffset(StringBuilder, int) - Method in class org.apache.lucene.search.vectorhighlight.BreakIteratorBoundaryScanner

findStartOffset(StringBuilder, int) - Method in class org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner

findTargetArc(int, FST.Arc<Long>, FST.Arc<Long>, boolean, FST.BytesReader) - Method in class org.apache.lucene.analysis.ja.dict.TokenInfoFST

findTargetArc(int, FST.Arc<T>, FST.Arc<T>, FST.BytesReader) - Method in class org.apache.lucene.util.fst.FST
Finds an arc leaving the incoming arc, replacing the arc in place.
finish() - Method in class org.apache.lucene.analysis.ja.GraphvizFormatter

finish() - Method in class org.apache.lucene.util.fst.Builder
Returns final FST.
finish() - Method in class org.apache.lucene.util.packed.PackedInts.Writer

finishCommit() - Method in class org.apache.lucene.store.ChecksumIndexOutput
See ChecksumIndexOutput.prepareCommit()
FinnishAnalyzer - Class in org.apache.lucene.analysis.fi
Analyzer for Finnish.
FinnishAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.fi.FinnishAnalyzer
Builds an analyzer with the default stop words: FinnishAnalyzer.DEFAULT_STOPWORD_FILE.
FinnishAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.fi.FinnishAnalyzer
Builds an analyzer with the given stop words.
FinnishAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.fi.FinnishAnalyzer
Builds an analyzer with the given stop words.
FinnishLightStemFilter - Class in org.apache.lucene.analysis.fi
A TokenFilter that applies FinnishLightStemmer to stem Finnish words.
FinnishLightStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.fi.FinnishLightStemFilter

FinnishLightStemmer - Class in org.apache.lucene.analysis.fi
Light Stemmer for Finnish.
FinnishLightStemmer() - Constructor for class org.apache.lucene.analysis.fi.FinnishLightStemmer

FinnishStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
FinnishStemmer() - Constructor for class org.tartarus.snowball.ext.FinnishStemmer

first() - Method in class org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator

first() - Method in class org.apache.lucene.analysis.util.CharArrayIterator

first - Variable in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs.TwoLongs

FIRST_LEVEL_SIZE - Static variable in class org.apache.lucene.util.ByteBlockPool

firstRangeBeginningOriginal - Variable in class org.apache.lucene.analysis.CollationTestBase

firstRangeEndOriginal - Variable in class org.apache.lucene.analysis.CollationTestBase

FixedBitSet - Class in org.apache.lucene.util
BitSet of fixed length (numBits), backed by accessible (FixedBitSet.getBits()) long[], accessed with an int index, implementing Bits and DocIdSet.
FixedBitSet(int) - Constructor for class org.apache.lucene.util.FixedBitSet

FixedBitSet(FixedBitSet) - Constructor for class org.apache.lucene.util.FixedBitSet
Makes full copy.
FixedLatLng - Class in org.apache.lucene.spatial.geometry
Deprecated.
FixedLatLng(int, int) - Constructor for class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
FixedLatLng(LatLng) - Constructor for class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
fixedOrdinalPolicy() - Method in class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams
"fixed" ordinal policy.
fixedPartitionSize() - Method in class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams
"fixed" partition size.
fixedPathPolicy() - Method in class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams
"fixed" path policy.
fixedToDouble(int) - Static method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
fixIndex(CheckIndex.Status) - Method in class org.apache.lucene.index.CheckIndex
Repairs the index using previously returned result from CheckIndex.checkIndex().
fixResult(ScoredDocIDs, FacetResult) - Method in interface org.apache.lucene.facet.search.sampling.SampleFixer
Alter the input result, fixing it to account for the sampling.
FLAG_CANON_EQ - Static variable in class org.apache.lucene.search.regex.JavaUtilRegexCapabilities

FLAG_CASE_INSENSITIVE - Static variable in class org.apache.lucene.search.regex.JavaUtilRegexCapabilities

FLAG_COMMENTS - Static variable in class org.apache.lucene.search.regex.JavaUtilRegexCapabilities

FLAG_DOTALL - Static variable in class org.apache.lucene.search.regex.JavaUtilRegexCapabilities

FLAG_LITERAL - Static variable in class org.apache.lucene.search.regex.JavaUtilRegexCapabilities

FLAG_MATCH_CASEINDEPENDENT - Static variable in class org.apache.lucene.search.regex.JakartaRegexpCapabilities
Flag to specify that matching should be case-independent (folded)
FLAG_MATCH_NORMAL - Static variable in class org.apache.lucene.search.regex.JakartaRegexpCapabilities
Flag to specify normal, case-sensitive matching behaviour.
FLAG_MULTILINE - Static variable in class org.apache.lucene.search.regex.JavaUtilRegexCapabilities

FLAG_UNICODE_CASE - Static variable in class org.apache.lucene.search.regex.JavaUtilRegexCapabilities

FLAG_UNIX_LINES - Static variable in class org.apache.lucene.search.regex.JavaUtilRegexCapabilities

FlagsAttribute - Interface in org.apache.lucene.analysis.tokenattributes
This attribute can be used to pass different flags down the Tokenizer chain, eg from one TokenFilter to another one.
FlagsAttributeImpl - Class in org.apache.lucene.analysis.tokenattributes
This attribute can be used to pass different flags down the tokenizer chain, eg from one TokenFilter to another one.
FlagsAttributeImpl() - Constructor for class org.apache.lucene.analysis.tokenattributes.FlagsAttributeImpl

flip(int, int) - Method in class org.apache.lucene.util.FixedBitSet
Flips a range of bits
flip(long) - Method in class org.apache.lucene.util.OpenBitSet
flips a bit, expanding the set size if necessary
flip(long, long) - Method in class org.apache.lucene.util.OpenBitSet
Flips a range of bits, expanding the set size if necessary
flipAndGet(int) - Method in class org.apache.lucene.util.OpenBitSet
flips a bit and returns the resulting bit value.
flipAndGet(long) - Method in class org.apache.lucene.util.OpenBitSet
flips a bit and returns the resulting bit value.
FLOAT - Static variable in class org.apache.lucene.search.function.FieldScoreQuery.Type
field values are interpreted as numeric float values.
FLOAT - Static variable in class org.apache.lucene.search.SortField
Sort using term values as encoded Floats.
FloatArrayAllocator - Class in org.apache.lucene.facet.search
An FloatArrayAllocator is an object which manages float array objects of a certain size.
FloatArrayAllocator(int, int) - Constructor for class org.apache.lucene.facet.search.FloatArrayAllocator
Construct an allocator for float arrays of size size, keeping around a pool of up to maxArrays old arrays.
floatArrayAllocator - Variable in class org.apache.lucene.facet.search.StandardFacetsAccumulator

FloatEncoder - Class in org.apache.lucene.analysis.payloads
Encode a character array Float as a Payload.
FloatEncoder() - Constructor for class org.apache.lucene.analysis.payloads.FloatEncoder

FloatFieldSource - Class in org.apache.lucene.search.function
Expert: obtains float field values from the FieldCache using getFloats() and makes those values available as other numeric types, casting as needed.
FloatFieldSource(String) - Constructor for class org.apache.lucene.search.function.FloatFieldSource
Create a cached float field source with default string-to-float parser.
FloatFieldSource(String, FieldCache.FloatParser) - Constructor for class org.apache.lucene.search.function.FloatFieldSource
Create a cached float field source with a specific string-to-float parser.
FloatIterator - Interface in org.apache.lucene.util.collections
Iterator interface for primitive int iteration.
FloatLatLng - Class in org.apache.lucene.spatial.geometry
Deprecated.
FloatLatLng(double, double) - Constructor for class org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.
FloatLatLng(LatLng) - Constructor for class org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.
floatToByte(float, int, int) - Static method in class org.apache.lucene.util.SmallFloat
Converts a 32 bit float to an 8 bit float.
floatToByte315(float) - Static method in class org.apache.lucene.util.SmallFloat
floatToByte(b, mantissaBits=3, zeroExponent=15)
smallest non-zero value = 5.820766E-10
largest value = 7.5161928E9
epsilon = 0.125
floatToByte52(float) - Static method in class org.apache.lucene.util.SmallFloat
floatToByte(b, mantissaBits=5, zeroExponent=2)
smallest nonzero value = 0.033203125
largest value = 1984.0
epsilon = 0.03125
FloatToObjectMap<T> - Class in org.apache.lucene.util.collections
An Array-based hashtable which maps primitive float to Objects of generic type T.
The hashtable is constracted with a given capacity, or 16 as a default.
FloatToObjectMap() - Constructor for class org.apache.lucene.util.collections.FloatToObjectMap
Constructs a map with default capacity.
FloatToObjectMap(int) - Constructor for class org.apache.lucene.util.collections.FloatToObjectMap
Constructs a map with given capacity.
floatToPrefixCoded(float) - Static method in class org.apache.lucene.util.NumericUtils

floatToSortableInt(float) - Static method in class org.apache.lucene.util.NumericUtils
Converts a float value to a sortable signed int.
floatVal(int) - Method in class org.apache.lucene.search.function.DocValues
Return doc value as a float.
flush() - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

flush() - Method in class org.apache.lucene.benchmark.quality.utils.SubmissionReport

flush() - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0.
flush(Map<String, String>) - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0.
flush(boolean, boolean, boolean) - Method in class org.apache.lucene.index.IndexWriter
NOTE: flushDocStores is ignored now (hardwired to true); this method is only here for backwards compatibility
flush(boolean, boolean) - Method in class org.apache.lucene.index.IndexWriter
Flush all in-memory buffered updates (adds and deletes) to the Directory.
flush() - Method in class org.apache.lucene.store.BufferedIndexOutput
Forces any buffered output to be written.
flush() - Method in class org.apache.lucene.store.ChecksumIndexOutput

flush() - Method in class org.apache.lucene.store.IndexOutput
Forces any buffered output to be written.
flush() - Method in class org.apache.lucene.store.MockIndexOutputWrapper

flush() - Method in class org.apache.lucene.store.RAMOutputStream

flush() - Method in class org.apache.lucene.util.ThrottledIndexOutput

flushBuffer(IndexOutput, long) - Method in class org.apache.lucene.store.BufferedIndexInput
Flushes the in-memory bufer to the given output, copying at most numBytes.
flushBuffer(byte[], int, int) - Method in class org.apache.lucene.store.BufferedIndexOutput
Expert: implements buffer write.
flushBuffer(byte[], int, int) - Method in class org.apache.lucene.store.FSDirectory.FSIndexOutput
output methods:
FlushReaderTask - Class in org.apache.lucene.benchmark.byTask.tasks
Commits via IndexReader.
FlushReaderTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.FlushReaderTask

foldToASCII(char[], int) - Method in class org.apache.lucene.analysis.ASCIIFoldingFilter
Converts characters above ASCII to their ASCII equivalents.
foldToASCII(char[], int, char[], int, int) - Static method in class org.apache.lucene.analysis.ASCIIFoldingFilter
Converts characters above ASCII to their ASCII equivalents.
following(int) - Method in class org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator

follows(TextFragment) - Method in class org.apache.lucene.search.highlight.TextFragment

FORCE_COMPLEMENT - Static variable in class org.apache.lucene.facet.search.FacetsAccumulator
Passing this to FacetsAccumulator.setComplementThreshold(double) will force using complement optimization.
forceMerge(int) - Method in class org.apache.lucene.index.IndexWriter
Forces merge policy to merge segments until there's <= maxNumSegments.
forceMerge(int, boolean) - Method in class org.apache.lucene.index.IndexWriter
Just like IndexWriter.forceMerge(int), except you can specify whether the call should block until all merging completes.
forceMerge(int) - Method in class org.apache.lucene.index.RandomIndexWriter
Forces a forceMerge.
forceMergeDeletes(boolean) - Method in class org.apache.lucene.index.IndexWriter
Just like IndexWriter.forceMergeDeletes(), except you can specify whether the call should block until the operation completes.
forceMergeDeletes() - Method in class org.apache.lucene.index.IndexWriter
Forces merging of all segments that have deleted documents.
forceMergeDeletes(boolean) - Method in class org.apache.lucene.index.RandomIndexWriter

forceMergeDeletes() - Method in class org.apache.lucene.index.RandomIndexWriter

ForceMergeTask - Class in org.apache.lucene.benchmark.byTask.tasks
Runs forceMerge on the index.
ForceMergeTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.ForceMergeTask

forever - Variable in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource

Format - Class in org.apache.lucene.benchmark.byTask.utils
Formatting utilities (for reports).
Format() - Constructor for class org.apache.lucene.benchmark.byTask.utils.Format

format(int, float, String) - Static method in class org.apache.lucene.benchmark.byTask.utils.Format
Padd a number from left.
format(int, double, String) - Static method in class org.apache.lucene.benchmark.byTask.utils.Format

format(int, String) - Static method in class org.apache.lucene.benchmark.byTask.utils.Format
Pad a number from left.
format(String, String) - Static method in class org.apache.lucene.benchmark.byTask.utils.Format
Pad a string from right.
FORMAT - Static variable in class org.apache.lucene.index.SegmentInfos
The file format version, a negative number.
format(double, StringBuffer, FieldPosition) - Method in class org.apache.lucene.queryParser.standard.config.NumberDateFormat

format(long, StringBuffer, FieldPosition) - Method in class org.apache.lucene.queryParser.standard.config.NumberDateFormat

format(Object, StringBuffer, FieldPosition) - Method in class org.apache.lucene.queryParser.standard.config.NumberDateFormat

FORMAT_3_1 - Static variable in class org.apache.lucene.index.SegmentInfos
Each segment records the Lucene version that created it.
FORMAT_CHECKSUM - Static variable in class org.apache.lucene.index.SegmentInfos
This format adds a checksum at the end of the file to ensure all bytes were successfully written.
FORMAT_DEL_COUNT - Static variable in class org.apache.lucene.index.SegmentInfos
This format adds the deletion count for each segment.
FORMAT_DIAGNOSTICS - Static variable in class org.apache.lucene.index.SegmentInfos
This format adds optional per-segment String diagnostics storage, and switches userData to Map
FORMAT_HAS_PROX - Static variable in class org.apache.lucene.index.SegmentInfos
This format adds the boolean hasProx to record if any fields in the segment store prox information (ie, have omitTermFreqAndPositions==false)
FORMAT_HAS_VECTORS - Static variable in class org.apache.lucene.index.SegmentInfos
Each segment records whether it has term vectors
FORMAT_LOCKLESS - Static variable in class org.apache.lucene.index.SegmentInfos
This format adds details used for lockless commits.
FORMAT_MAXIMUM - Static variable in class org.apache.lucene.index.SegmentInfos

FORMAT_MINIMUM - Static variable in class org.apache.lucene.index.SegmentInfos

FORMAT_OMIT_POSITIONS - Static variable in class org.apache.lucene.index.FieldInfos

FORMAT_PRE - Static variable in class org.apache.lucene.index.FieldInfos

FORMAT_SHARED_DOC_STORE - Static variable in class org.apache.lucene.index.SegmentInfos
This format allows multiple segments to share a single vectors and stored fields file.
FORMAT_SINGLE_NORM_FILE - Static variable in class org.apache.lucene.index.SegmentInfos
This format adds a "hasSingleNormFile" flag into each segment info.
FORMAT_START - Static variable in class org.apache.lucene.index.FieldInfos

FORMAT_USER_DATA - Static variable in class org.apache.lucene.index.SegmentInfos
This format adds optional commit userData (String) storage.
formatError(String, Test, Throwable) - Method in class org.apache.lucene.util.LuceneJUnitResultFormatter
Format an error and print it.
formatPaddLeft(String, String) - Static method in class org.apache.lucene.benchmark.byTask.utils.Format
Pad a string from left.
formatPaddRight(int, float, String) - Static method in class org.apache.lucene.benchmark.byTask.utils.Format
Pad a number from right.
formatPaddRight(int, double, String) - Static method in class org.apache.lucene.benchmark.byTask.utils.Format

Formatter - Interface in org.apache.lucene.search.highlight
Processes terms found in the original text, typically by applying some form of mark-up to highlight terms in HTML search results pages.
formatTest(Test) - Method in class org.apache.lucene.util.LuceneJUnitResultFormatter
Format the test for printing..
formSimilarQuery(String, Analyzer, String, Set<?>) - Static method in class org.apache.lucene.search.similar.SimilarityQueries
Simple similarity query generators.
FourFlagsIntDecoder - Class in org.apache.lucene.util.encoding
Decodes data which was encoded by FourFlagsIntEncoder.
FourFlagsIntDecoder() - Constructor for class org.apache.lucene.util.encoding.FourFlagsIntDecoder

FourFlagsIntEncoder - Class in org.apache.lucene.util.encoding
A ChunksIntEncoder which encodes values in chunks of 4.
FourFlagsIntEncoder() - Constructor for class org.apache.lucene.util.encoding.FourFlagsIntEncoder

FragListBuilder - Interface in org.apache.lucene.search.vectorhighlight
FragListBuilder is an interface for FieldFragList builder classes.
Fragmenter - Interface in org.apache.lucene.search.highlight
Implements the policy for breaking text into multiple fragments for consideration by the Highlighter class.
FragmentsBuilder - Interface in org.apache.lucene.search.vectorhighlight
FragmentsBuilder is an interface for fragments (snippets) builder classes.
fragSize - Variable in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask

free() - Method in class org.apache.lucene.facet.search.FacetArrays
Notify allocators that they can free arrays allocated on behalf of this FacetArrays object.
free(T) - Method in class org.apache.lucene.facet.search.TemporaryObjectAllocator
Return a no-longer-needed object back to the pool.
freeBefore(int) - Method in class org.apache.lucene.util.RollingBuffer

freeBefore(int) - Method in class org.apache.lucene.util.RollingCharBuffer
Call this to notify us that no chars before this absolute position are needed anymore.
freeBlocks(int) - Method in class org.apache.lucene.util.RecyclingByteBlockAllocator
Removes the given number of byte blocks from the buffer if possible.
freenode - Variable in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

freeze(Builder.UnCompiledNode<T>[], int, IntsRef) - Method in class org.apache.lucene.util.fst.Builder.FreezeTail

freeze(boolean) - Method in class org.apache.lucene.util.PagedBytes
Commits final byte[], trimming it if necessary and if trim=true
FRENCH_STOP_WORDS - Static variable in class org.apache.lucene.analysis.fr.FrenchAnalyzer
Deprecated. use FrenchAnalyzer.getDefaultStopSet() instead
FrenchAnalyzer - Class in org.apache.lucene.analysis.fr
Analyzer for French language.
FrenchAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.fr.FrenchAnalyzer
Builds an analyzer with the default stop words (FrenchAnalyzer.getDefaultStopSet()).
FrenchAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.fr.FrenchAnalyzer
Builds an analyzer with the given stop words
FrenchAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.fr.FrenchAnalyzer
Builds an analyzer with the given stop words
FrenchAnalyzer(Version, String...) - Constructor for class org.apache.lucene.analysis.fr.FrenchAnalyzer
Deprecated. use FrenchAnalyzer.FrenchAnalyzer(Version, Set) instead
FrenchAnalyzer(Version, File) - Constructor for class org.apache.lucene.analysis.fr.FrenchAnalyzer
Deprecated. use FrenchAnalyzer.FrenchAnalyzer(Version, Set) instead
FrenchLightStemFilter - Class in org.apache.lucene.analysis.fr
A TokenFilter that applies FrenchLightStemmer to stem French words.
FrenchLightStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.fr.FrenchLightStemFilter

FrenchLightStemmer - Class in org.apache.lucene.analysis.fr
Light Stemmer for French.
FrenchLightStemmer() - Constructor for class org.apache.lucene.analysis.fr.FrenchLightStemmer

FrenchMinimalStemFilter - Class in org.apache.lucene.analysis.fr
A TokenFilter that applies FrenchMinimalStemmer to stem French words.
FrenchMinimalStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.fr.FrenchMinimalStemFilter

FrenchMinimalStemmer - Class in org.apache.lucene.analysis.fr
Light Stemmer for French.
FrenchMinimalStemmer() - Constructor for class org.apache.lucene.analysis.fr.FrenchMinimalStemmer

FrenchStemFilter - Class in org.apache.lucene.analysis.fr
Deprecated. Use SnowballFilter with FrenchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0
FrenchStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.fr.FrenchStemFilter
Deprecated.
FrenchStemFilter(TokenStream, Set<?>) - Constructor for class org.apache.lucene.analysis.fr.FrenchStemFilter
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
FrenchStemmer - Class in org.apache.lucene.analysis.fr
Deprecated. Use FrenchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0
FrenchStemmer() - Constructor for class org.apache.lucene.analysis.fr.FrenchStemmer
Deprecated.
FrenchStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
FrenchStemmer() - Constructor for class org.tartarus.snowball.ext.FrenchStemmer

freq() - Method in class org.apache.lucene.index.AbstractAllTermDocs

freq() - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermDocs

freq() - Method in class org.apache.lucene.index.MultipleTermPositions

freq() - Method in interface org.apache.lucene.index.TermDocs
Returns the frequency of the term within the current document.
freq() - Method in class org.apache.lucene.search.Scorer
Returns number of matches for the current document.
freq - Variable in class org.apache.lucene.search.spans.SpanScorer

freq() - Method in class org.apache.lucene.search.spans.SpanScorer

freq - Variable in class org.apache.lucene.search.spans.TermSpans

freq - Variable in class org.apache.lucene.search.spell.SuggestWord
The freq of the word
freq() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermDocs

FREQ_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of freq postings file
freqs - Variable in class org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper

fromCartesian(CartesianPoint) - Static method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated. The inverse of toCartesian().
fs - Variable in class org.apache.lucene.index.pruning.StorePruningPolicy

FSDirectory - Class in org.apache.lucene.store
Base class for Directory implementations that store index files in the file system.
FSDirectory(File, LockFactory) - Constructor for class org.apache.lucene.store.FSDirectory
Create a new FSDirectory for the named location (ctor for subclasses).
FSDirectory.FSIndexOutput - Class in org.apache.lucene.store

FSDirectory.FSIndexOutput(FSDirectory, String) - Constructor for class org.apache.lucene.store.FSDirectory.FSIndexOutput

FSLockFactory - Class in org.apache.lucene.store
Base class for file system based locking implementation.
FSLockFactory() - Constructor for class org.apache.lucene.store.FSLockFactory

fst - Variable in class org.apache.lucene.analysis.synonym.SynonymMap
map>
FST<T> - Class in org.apache.lucene.util.fst
Represents an finite state machine (FST), using a compact byte[] format.
FST(DataInput, Outputs<T>) - Constructor for class org.apache.lucene.util.fst.FST
Load a previously saved FST.
FST.Arc<T> - Class in org.apache.lucene.util.fst
Represents a single arc.
FST.Arc() - Constructor for class org.apache.lucene.util.fst.FST.Arc

FST.BytesReader - Class in org.apache.lucene.util.fst
Reads the bytes from this FST.
FST.BytesReader(byte[], int) - Constructor for class org.apache.lucene.util.fst.FST.BytesReader

FST.INPUT_TYPE - Enum in org.apache.lucene.util.fst
Specifies allowed range of each int input label for this FST.
FST_FILENAME_SUFFIX - Static variable in class org.apache.lucene.analysis.ja.dict.TokenInfoDictionary

FSTCompletion - Class in org.apache.lucene.search.suggest.fst
Finite state automata based implementation of "autocomplete" functionality.
FSTCompletion(FST<Object>, boolean, boolean) - Constructor for class org.apache.lucene.search.suggest.fst.FSTCompletion

FSTCompletion(FST<Object>) - Constructor for class org.apache.lucene.search.suggest.fst.FSTCompletion
Defaults to higher weights first and exact first.
FSTCompletion.Completion - Class in org.apache.lucene.search.suggest.fst
A single completion for a given key.
FSTCompletionBuilder - Class in org.apache.lucene.search.suggest.fst
Finite state automata based implementation of "autocomplete" functionality.
FSTCompletionBuilder() - Constructor for class org.apache.lucene.search.suggest.fst.FSTCompletionBuilder
Creates an FSTCompletion with default options: 10 buckets, exact match promoted to first position and InMemorySorter with a comparator obtained from BytesRef.getUTF8SortedAsUnicodeComparator().
FSTCompletionBuilder(int, BytesRefSorter, int) - Constructor for class org.apache.lucene.search.suggest.fst.FSTCompletionBuilder

FSTCompletionLookup - Class in org.apache.lucene.search.suggest.fst
An adapter from Lookup API to FSTCompletion.
FSTCompletionLookup() - Constructor for class org.apache.lucene.search.suggest.fst.FSTCompletionLookup
This constructor prepares for creating a suggested FST using the FSTCompletionLookup.build(TermFreqIterator) method.
FSTCompletionLookup(int, boolean) - Constructor for class org.apache.lucene.search.suggest.fst.FSTCompletionLookup
This constructor prepares for creating a suggested FST using the FSTCompletionLookup.build(TermFreqIterator) method.
FSTCompletionLookup(FSTCompletion, boolean) - Constructor for class org.apache.lucene.search.suggest.fst.FSTCompletionLookup
This constructor takes a pre-built automaton.
FSTLookup - Class in org.apache.lucene.search.suggest.fst
Deprecated. Use FSTCompletionLookup instead.
FSTLookup() - Constructor for class org.apache.lucene.search.suggest.fst.FSTLookup
Deprecated.
FSTLookup(int, boolean) - Constructor for class org.apache.lucene.search.suggest.fst.FSTLookup
Deprecated.
fsync(String) - Method in class org.apache.lucene.store.FSDirectory

FULLWIDTH_DIGIT - Static variable in class org.apache.lucene.analysis.cn.smart.CharType
Full-Width alphanumeric characters
FULLWIDTH_LETTER - Static variable in class org.apache.lucene.analysis.cn.smart.CharType
Full-Width letters
FULLWIDTH_NUMBER - Static variable in class org.apache.lucene.analysis.cn.smart.WordType
Full-Width Alphanumeric
FULLWIDTH_STRING - Static variable in class org.apache.lucene.analysis.cn.smart.WordType
Full-Width String
fullyDelete(File) - Static method in class org.apache.lucene.benchmark.byTask.utils.FileUtils
Delete files and directories, even if non-empty.
function - Variable in class org.apache.lucene.search.payloads.PayloadNearQuery

function - Variable in class org.apache.lucene.search.payloads.PayloadTermQuery

FUZZY_CONFIG - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set the FuzzyConfig used to create fuzzy queries.
FUZZY_SLOP - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
FUZZY_SLOP - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
FuzzyAttribute - Interface in org.apache.lucene.queryParser.standard.config
Deprecated.
FuzzyAttributeImpl - Class in org.apache.lucene.queryParser.standard.config
Deprecated.
FuzzyAttributeImpl() - Constructor for class org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl
Deprecated.
FuzzyConfig - Class in org.apache.lucene.queryParser.standard.config

FuzzyConfig() - Constructor for class org.apache.lucene.queryParser.standard.config.FuzzyConfig

FuzzyLikeThisQuery - Class in org.apache.lucene.search
Fuzzifies ALL terms provided as strings and then picks the best n differentiating terms.
FuzzyLikeThisQuery(int, Analyzer) - Constructor for class org.apache.lucene.search.FuzzyLikeThisQuery

FuzzyLikeThisQueryBuilder - Class in org.apache.lucene.xmlparser.builders

FuzzyLikeThisQueryBuilder(Analyzer) - Constructor for class org.apache.lucene.xmlparser.builders.FuzzyLikeThisQueryBuilder

FuzzyQuery - Class in org.apache.lucene.search
Implements the fuzzy search query.
FuzzyQuery(Term, float, int, int) - Constructor for class org.apache.lucene.search.FuzzyQuery
Create a new FuzzyQuery that will match terms with a similarity of at least minimumSimilarity to term.
FuzzyQuery(Term, float, int) - Constructor for class org.apache.lucene.search.FuzzyQuery
Calls FuzzyQuery(term, minimumSimilarity, prefixLength, Integer.MAX_VALUE).
FuzzyQuery(Term, float) - Constructor for class org.apache.lucene.search.FuzzyQuery
Calls FuzzyQuery(term, minimumSimilarity, 0, Integer.MAX_VALUE).
FuzzyQuery(Term) - Constructor for class org.apache.lucene.search.FuzzyQuery
Calls FuzzyQuery(term, 0.5f, 0, Integer.MAX_VALUE).
FuzzyQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A FuzzyQueryNode represents a element that contains field/text/similarity tuple
FuzzyQueryNode(CharSequence, CharSequence, float, int, int) - Constructor for class org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode

FuzzyQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
Builds a FuzzyQuery object from a FuzzyQueryNode object.
FuzzyQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.FuzzyQueryNodeBuilder

FuzzyQueryNodeProcessor - Class in org.apache.lucene.queryParser.standard.processors
This processor iterates the query node tree looking for every FuzzyQueryNode, when this kind of node is found, it checks on the query configuration for StandardQueryConfigHandler.ConfigurationKeys.FUZZY_CONFIG, gets the fuzzy prefix length and default similarity from it and set to the fuzzy node.
FuzzyQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.FuzzyQueryNodeProcessor

FuzzyTermEnum - Class in org.apache.lucene.search
Subclass of FilteredTermEnum for enumerating all terms that are similar to the specified filter term.
FuzzyTermEnum(IndexReader, Term) - Constructor for class org.apache.lucene.search.FuzzyTermEnum
Creates a FuzzyTermEnum with an empty prefix and a minSimilarity of 0.5f.
FuzzyTermEnum(IndexReader, Term, float) - Constructor for class org.apache.lucene.search.FuzzyTermEnum
Creates a FuzzyTermEnum with an empty prefix.
FuzzyTermEnum(IndexReader, Term, float, int) - Constructor for class org.apache.lucene.search.FuzzyTermEnum
Constructor for enumeration of all terms from specified reader which share a prefix of length prefixLength with term and which have a fuzzy similarity > minSimilarity.

G

GalicianAnalyzer - Class in org.apache.lucene.analysis.gl
Analyzer for Galician.
GalicianAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.gl.GalicianAnalyzer
Builds an analyzer with the default stop words: GalicianAnalyzer.DEFAULT_STOPWORD_FILE.
GalicianAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.gl.GalicianAnalyzer
Builds an analyzer with the given stop words.
GalicianAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.gl.GalicianAnalyzer
Builds an analyzer with the given stop words.
GalicianMinimalStemFilter - Class in org.apache.lucene.analysis.gl
A TokenFilter that applies GalicianMinimalStemmer to stem Galician words.
GalicianMinimalStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.gl.GalicianMinimalStemFilter

GalicianMinimalStemmer - Class in org.apache.lucene.analysis.gl
Minimal Stemmer for Galician
GalicianMinimalStemmer() - Constructor for class org.apache.lucene.analysis.gl.GalicianMinimalStemmer

GalicianStemFilter - Class in org.apache.lucene.analysis.gl
A TokenFilter that applies GalicianStemmer to stem Galician words.
GalicianStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.gl.GalicianStemFilter

GalicianStemmer - Class in org.apache.lucene.analysis.gl
Galician stemmer implementing "Regras do lematizador para o galego".
GalicianStemmer() - Constructor for class org.apache.lucene.analysis.gl.GalicianStemmer

gatherSubReaders(List<IndexReader>, IndexReader) - Method in class org.apache.lucene.search.IndexSearcher

gatherSubReaders(List<IndexReader>, IndexReader) - Static method in class org.apache.lucene.util.ReaderUtil
Gathers sub-readers from reader into a List.
GB - Static variable in class org.apache.lucene.search.suggest.fst.Sort

GEN_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of gen file
Gener - Class in org.egothor.stemmer
The Gener object helps in the discarding of nodes which break the reduction effort and defend the structure against large reductions.
Gener() - Constructor for class org.egothor.stemmer.Gener
Constructor for the Gener object.
generateParseException() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Generate ParseException.
generateParseException() - Method in class org.apache.lucene.queryParser.QueryParser
Generate ParseException.
generateParseException() - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Generate ParseException.
generateParseException() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
generateParseException() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser
Generate ParseException.
generatesCategoryList() - Method in class org.apache.lucene.facet.enhancements.association.AssociationEnhancement

generatesCategoryList() - Method in interface org.apache.lucene.facet.enhancements.CategoryEnhancement
Declarative method to indicate whether this enhancement generates separate category list.
generationFromSegmentsFileName(String) - Static method in class org.apache.lucene.index.SegmentInfos
Parse the generation off the segments file name and return it.
genPartialReport(int, LinkedHashMap<String, TaskStats>, int) - Method in class org.apache.lucene.benchmark.byTask.tasks.ReportTask

GeoHashDistanceFilter - Class in org.apache.lucene.spatial.geohash
Deprecated.
GeoHashDistanceFilter(Filter, double, double, double, String) - Constructor for class org.apache.lucene.spatial.geohash.GeoHashDistanceFilter
Deprecated. Provide a distance filter based from a center point with a radius in miles
GeoHashUtils - Class in org.apache.lucene.spatial.geohash
Deprecated.
Geometry2D - Interface in org.apache.lucene.spatial.geometry.shape
Deprecated.
German2Stemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
German2Stemmer() - Constructor for class org.tartarus.snowball.ext.German2Stemmer

GERMAN_STOP_WORDS - Static variable in class org.apache.lucene.analysis.de.GermanAnalyzer
Deprecated. use GermanAnalyzer.getDefaultStopSet() instead
GermanAnalyzer - Class in org.apache.lucene.analysis.de
Analyzer for German language.
GermanAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.de.GermanAnalyzer
Builds an analyzer with the default stop words: GermanAnalyzer.getDefaultStopSet().
GermanAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.de.GermanAnalyzer
Builds an analyzer with the given stop words
GermanAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.de.GermanAnalyzer
Builds an analyzer with the given stop words
GermanAnalyzer(Version, String...) - Constructor for class org.apache.lucene.analysis.de.GermanAnalyzer
Deprecated. use GermanAnalyzer.GermanAnalyzer(Version, Set)
GermanAnalyzer(Version, Map<?, ?>) - Constructor for class org.apache.lucene.analysis.de.GermanAnalyzer
Deprecated. use GermanAnalyzer.GermanAnalyzer(Version, Set)
GermanAnalyzer(Version, File) - Constructor for class org.apache.lucene.analysis.de.GermanAnalyzer
Deprecated. use GermanAnalyzer.GermanAnalyzer(Version, Set)
GermanLightStemFilter - Class in org.apache.lucene.analysis.de
A TokenFilter that applies GermanLightStemmer to stem German words.
GermanLightStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.de.GermanLightStemFilter

GermanLightStemmer - Class in org.apache.lucene.analysis.de
Light Stemmer for German.
GermanLightStemmer() - Constructor for class org.apache.lucene.analysis.de.GermanLightStemmer

GermanMinimalStemFilter - Class in org.apache.lucene.analysis.de
A TokenFilter that applies GermanMinimalStemmer to stem German words.
GermanMinimalStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.de.GermanMinimalStemFilter

GermanMinimalStemmer - Class in org.apache.lucene.analysis.de
Minimal Stemmer for German.
GermanMinimalStemmer() - Constructor for class org.apache.lucene.analysis.de.GermanMinimalStemmer

GermanNormalizationFilter - Class in org.apache.lucene.analysis.de
Normalizes German characters according to the heuristics of the German2 snowball algorithm.
GermanNormalizationFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.de.GermanNormalizationFilter

GermanStemFilter - Class in org.apache.lucene.analysis.de
A TokenFilter that stems German words.
GermanStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.de.GermanStemFilter
Creates a GermanStemFilter instance
GermanStemFilter(TokenStream, Set<?>) - Constructor for class org.apache.lucene.analysis.de.GermanStemFilter
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
GermanStemmer - Class in org.apache.lucene.analysis.de
A stemmer for German words.
GermanStemmer() - Constructor for class org.apache.lucene.analysis.de.GermanStemmer

GermanStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
GermanStemmer() - Constructor for class org.tartarus.snowball.ext.GermanStemmer

get(char[], int, int) - Method in class org.apache.lucene.analysis.CharArrayMap
returns the value of the mapping of len chars of text starting at off
get(CharSequence) - Method in class org.apache.lucene.analysis.CharArrayMap
returns the value of the mapping of the chars inside this CharSequence
get(Object) - Method in class org.apache.lucene.analysis.CharArrayMap

get(Reader) - Static method in class org.apache.lucene.analysis.CharReader

get(int) - Method in class org.apache.lucene.analysis.compound.hyphenation.ByteVector

get(int) - Method in class org.apache.lucene.analysis.compound.hyphenation.CharVector

get(int, int) - Method in class org.apache.lucene.analysis.ja.dict.ConnectionCosts

get(String, String) - Method in class org.apache.lucene.benchmark.byTask.utils.Config
Return a string property.
get(String, int) - Method in class org.apache.lucene.benchmark.byTask.utils.Config
Return an int property.
get(String, double) - Method in class org.apache.lucene.benchmark.byTask.utils.Config
Return a double property.
get(String, boolean) - Method in class org.apache.lucene.benchmark.byTask.utils.Config
Return a boolean property.
get(String) - Method in class org.apache.lucene.document.Document
Returns the string value of the field with the given name if any exist in this document, or null.
get(CategoryListParams) - Method in class org.apache.lucene.facet.search.cache.CategoryListCache
Fetch the cached CategoryListData for a given CategoryListParams.
get(CategoryPath) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.Cl2oTaxonomyWriterCache

get(CategoryPath, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.Cl2oTaxonomyWriterCache

get(CategoryPath, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap

get(CategoryPath, int, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap

get(CategoryPath) - Method in class org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache

get(CategoryPath, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache

get(CategoryPath) - Method in interface org.apache.lucene.facet.taxonomy.writercache.TaxonomyWriterCache
Lookup a category in the cache, returning its ordinal, or a negative number if the category is not in the cache.
get(CategoryPath, int) - Method in interface org.apache.lucene.facet.taxonomy.writercache.TaxonomyWriterCache
Like TaxonomyWriterCache.get(CategoryPath), but for a given prefix of the category path.
get(boolean, SegmentInfo, int) - Static method in class org.apache.lucene.index.SegmentReader

get(boolean, Directory, SegmentInfo, int, boolean, int) - Static method in class org.apache.lucene.index.SegmentReader

get() - Static method in class org.apache.lucene.LucenePackage
Return Lucene's package, including version information.
get(ConfigurationKey<T>) - Method in class org.apache.lucene.queryParser.core.config.AbstractQueryConfig
Returns the value held by the given key.
get(ConfigurationKey<T>, T) - Method in class org.apache.lucene.queryParser.core.config.AbstractQueryConfig
Returns the value held by the given key or the given default value if the key is not found.
get(int) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

get(BytesRef, int) - Method in class org.apache.lucene.search.suggest.BytesRefList
Returns the n'th element of this BytesRefList
get(CharSequence) - Method in class org.apache.lucene.search.suggest.fst.FSTCompletionLookup

get(CharSequence) - Method in class org.apache.lucene.search.suggest.fst.FSTLookup
Deprecated. Get the (approximated) weight of a single key (if there is a perfect match for it in the automaton).
get(CharSequence) - Method in class org.apache.lucene.search.suggest.fst.WFSTCompletionLookup
Returns the weight associated with an input string, or null if it does not exist.
get(CharSequence) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellLookup

get(CharSequence) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Retrieve the object indexed by a key.
get(CharSequence) - Method in class org.apache.lucene.search.suggest.tst.TSTLookup

get(int) - Method in interface org.apache.lucene.util.Bits

get(int) - Method in class org.apache.lucene.util.Bits.MatchAllBits

get(int) - Method in class org.apache.lucene.util.Bits.MatchNoBits

get(int) - Method in class org.apache.lucene.util.BitVector
Returns true if bit is one and false if it is zero.
get(int, BytesRef) - Method in class org.apache.lucene.util.BytesRefHash
Populates and returns a BytesRef with the bytes for the given ord.
get() - Method in class org.apache.lucene.util.CloseableThreadLocal

get(K) - Method in class org.apache.lucene.util.collections.ArrayHashMap
Returns the object mapped with the given key, or null if the key wasn't found.
get(float) - Method in class org.apache.lucene.util.collections.FloatToObjectMap
Returns the object mapped with the given key.
get(int) - Method in class org.apache.lucene.util.collections.IntArray
Get an element from a specific index.
get(int) - Method in class org.apache.lucene.util.collections.IntToDoubleMap
Returns the value mapped with the given key.
get(int) - Method in class org.apache.lucene.util.collections.IntToIntMap
Returns the object mapped with the given key.
get(int) - Method in class org.apache.lucene.util.collections.IntToObjectMap
Returns the object mapped with the given key.
get(K) - Method in class org.apache.lucene.util.collections.ObjectToFloatMap
Returns the float mapped with the given key.
get(K) - Method in class org.apache.lucene.util.collections.ObjectToIntMap
Returns the int mapped with the given key.
get() - Method in class org.apache.lucene.util.Counter
Returns the counters current value
get(K) - Method in class org.apache.lucene.util.DoubleBarrelLRUCache

get(int) - Method in class org.apache.lucene.util.FixedBitSet

get(long) - Method in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs

get(long, long) - Method in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs

get(FST<T>, IntsRef) - Static method in class org.apache.lucene.util.fst.Util
Looks up the output for this input, or null if the input is not accepted.
get(FST<T>, BytesRef) - Static method in class org.apache.lucene.util.fst.Util
Looks up the output for this input, or null if the input is not accepted
get(int) - Method in class org.apache.lucene.util.OpenBitSet
Returns true or false for the specified bit index.
get(long) - Method in class org.apache.lucene.util.OpenBitSet
Returns true or false for the specified bit index
get(int) - Method in class org.apache.lucene.util.packed.GrowableWriter

get(int) - Method in interface org.apache.lucene.util.packed.PackedInts.Reader

get(int) - Method in class org.apache.lucene.util.RollingBuffer
Get T instance for this absolute position; this is allowed to be arbitrarily far "in the future" but cannot be before the last freeBefore.
get(int) - Method in class org.apache.lucene.util.RollingCharBuffer

get(int, int) - Method in class org.apache.lucene.util.RollingCharBuffer

get() - Method in class org.apache.lucene.util.SetOnce
Returns the object set by SetOnce.set(Object).
get(Object) - Method in class org.apache.lucene.util.WeakIdentityMap

getAccuracy() - Method in class org.apache.lucene.search.spell.SpellChecker
The accuracy (minimum score) to be used, unless overridden in SpellChecker.suggestSimilar(String, int, org.apache.lucene.index.IndexReader, String, boolean, float), to decide whether a suggestion is included or not.
getAlgorithm() - Method in class org.apache.lucene.benchmark.byTask.Benchmark

getAlgorithmText() - Method in class org.apache.lucene.benchmark.byTask.utils.Config

getAll(CharSequence) - Method in class org.egothor.stemmer.Trie
Gets the all attribute of the Trie object
getAllCategoryListParams() - Method in class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams

getAllCategoryListParams() - Method in interface org.apache.lucene.facet.index.params.FacetIndexingParams
Return info about all category lists in the index.
getAllCategoryListParams() - Method in class org.apache.lucene.facet.index.params.PerDimensionIndexingParams
Get all the categoryListParams, including the default.
getAllowLeadingWildcard() - Method in class org.apache.lucene.queryParser.QueryParser

getAllowLeadingWildcard() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getAllowLeadingWildcard() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser

getAnalyzer() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

getAnalyzer() - Method in class org.apache.lucene.index.IndexWriter
Returns the analyzer used by this index.
getAnalyzer() - Method in class org.apache.lucene.index.IndexWriterConfig
Returns the default analyzer to use for indexing documents.
getAnalyzer() - Method in class org.apache.lucene.queryParser.QueryParser

getAnalyzer() - Method in interface org.apache.lucene.queryParser.standard.config.AnalyzerAttribute
Deprecated.
getAnalyzer() - Method in class org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl
Deprecated.
getAnalyzer() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getAnalyzer() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser

getAnalyzer() - Method in class org.apache.lucene.search.similar.MoreLikeThis
Returns an analyzer that will be used to parse source doc with.
getAnalyzer() - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

getAnalyzer() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
getAndClear(int) - Method in class org.apache.lucene.util.FixedBitSet

getAndIncrement(String) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Retrieve the Float indexed by key, increment it by one unit and store the new Float.
getAndQuery(List<SrndQuery>, boolean, Token) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

getAndResetClearCalled() - Method in interface org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttribute

getAndResetClearCalled() - Method in class org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl

getAndSet(int) - Method in class org.apache.lucene.util.BitVector
Sets the value of bit to true, and returns true if bit was already set
getAndSet(int) - Method in class org.apache.lucene.util.FixedBitSet

getAndSet(int) - Method in class org.apache.lucene.util.OpenBitSet
Sets a bit and returns the previous value.
getAndSet(long) - Method in class org.apache.lucene.util.OpenBitSet
Sets a bit and returns the previous value.
getAnyTokenStream(IndexReader, int, String, Document, Analyzer) - Static method in class org.apache.lucene.search.highlight.TokenSources
A convenience method that tries to first get a TermPositionVector for the specified docId, then, falls back to using the passed in Document to retrieve the TokenStream.
getAnyTokenStream(IndexReader, int, String, Analyzer) - Static method in class org.apache.lucene.search.highlight.TokenSources
A convenience method that tries a number of approaches to getting a token stream.
getAppend() - Method in class org.apache.lucene.analysis.hunspell.HunspellAffix
Returns the append defined for the affix
getAppendFlags() - Method in class org.apache.lucene.analysis.hunspell.HunspellAffix
Returns the flags defined for the affix append
getArcCount() - Method in class org.apache.lucene.util.fst.FST

getArcWithOutputCount() - Method in class org.apache.lucene.util.fst.FST

getArea() - Method in class org.apache.lucene.spatial.tier.Shape
Deprecated.
getArguments() - Method in interface org.apache.lucene.messages.Message
Deprecated.
getArguments() - Method in class org.apache.lucene.messages.MessageImpl
Deprecated.
getArray() - Method in class org.apache.lucene.analysis.compound.hyphenation.ByteVector

getArray() - Method in class org.apache.lucene.analysis.compound.hyphenation.CharVector

getArray() - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

getArray() - Method in class org.apache.lucene.util.packed.GrowableWriter

getArray() - Method in interface org.apache.lucene.util.packed.PackedInts.Reader
Expert: if the bit-width of this reader matches one of java's native types, returns the underlying array (ie, byte[], short[], int[], long[]); else, returns null.
getArray() - Method in class org.apache.lucene.util.packed.PackedInts.ReaderImpl

getArraysLength() - Method in class org.apache.lucene.facet.search.FacetArrays
Return the arrays length
getAssociatedDocument(int) - Method in class org.apache.lucene.store.instantiated.InstantiatedTerm
Navigates to the view of this occurrences of this term in a specific document.
getAssociatedDocuments() - Method in class org.apache.lucene.store.instantiated.InstantiatedTerm
Meta data per document in which this term is occurring.
getAssociatedOrdinals() - Method in class org.apache.lucene.facet.enhancements.association.AssociationsPayloadIterator
Get an iterator over the ordinals which has an association for the document set by AssociationsPayloadIterator.setNextDoc(int).
getAssociation() - Method in class org.apache.lucene.facet.enhancements.association.AssociationProperty
Returns the association value.
getAssociation(int) - Method in class org.apache.lucene.facet.enhancements.association.AssociationsPayloadIterator
Get int association value for the given ordinal.
getAssociationProperty(CategoryAttribute) - Static method in class org.apache.lucene.facet.enhancements.association.AssociationEnhancement

getAttribute(Class<A>) - Method in class org.apache.lucene.util.AttributeSource
The caller must pass in a Class<? extends Attribute> value.
getAttribute(Element, String, String) - Static method in class org.apache.lucene.xmlparser.DOMUtils

getAttribute(Element, String, float) - Static method in class org.apache.lucene.xmlparser.DOMUtils

getAttribute(Element, String, int) - Static method in class org.apache.lucene.xmlparser.DOMUtils

getAttribute(Element, String, boolean) - Static method in class org.apache.lucene.xmlparser.DOMUtils

getAttributeClassesIterator() - Method in class org.apache.lucene.util.AttributeSource
Returns a new iterator that iterates the attribute classes in the same order they were added in.
getAttributeFactory() - Method in class org.apache.lucene.util.AttributeSource
returns the used AttributeFactory.
getAttributeImplsIterator() - Method in class org.apache.lucene.util.AttributeSource
Returns a new iterator that iterates all unique Attribute implementations.
getAttributeOrFail(Element, String) - Static method in class org.apache.lucene.xmlparser.DOMUtils

getAttributeSource() - Method in class org.apache.lucene.index.FieldInvertState

getAttributeWithInheritance(Element, String) - Static method in class org.apache.lucene.xmlparser.DOMUtils
Returns an attribute value from this node, or first parent node with this attribute defined
getAttributeWithInheritanceOrFail(Element, String) - Static method in class org.apache.lucene.xmlparser.DOMUtils

getAutoGeneratePhraseQueries() - Method in class org.apache.lucene.queryParser.QueryParser

getAverageValue() - Method in class org.apache.lucene.search.function.DocValues
Returns the average of all values or Float.NaN if this DocValues instance does not contain any value.
getAvp() - Method in class org.apache.lucene.benchmark.quality.QualityStats
Return the average precision at recall points.
getBackgroundColorString(float) - Method in class org.apache.lucene.search.highlight.GradientFormatter

getBackgroundDeltaPriority() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

getBaseForm(int, char[], int, int) - Method in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

getBaseForm(int, char[], int, int) - Method in interface org.apache.lucene.analysis.ja.dict.Dictionary
Get base form of word
getBaseForm(int, char[], int, int) - Method in class org.apache.lucene.analysis.ja.dict.UserDictionary

getBaseForm() - Method in class org.apache.lucene.analysis.ja.Token

getBaseForm() - Method in interface org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttribute

getBaseForm() - Method in class org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttributeImpl

getBasicQueryFactory() - Method in class org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory

getBegin() - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

getBegin() - Method in class org.apache.lucene.queryParser.core.nodes.PathQueryNode.QueryText

getBeginColumn() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Get token beginning column number.
getBeginColumn() - Method in interface org.apache.lucene.queryParser.CharStream
Returns the column number of the first character for current token (being matched after the last call to BeginTOken).
getBeginColumn() - Method in exception org.apache.lucene.queryParser.core.QueryNodeParseException
For EndOfLine and EndOfFile ("") parsing problems the last char in the string is returned For the case where the parser is not able to figure out the line and column number -1 will be returned
getBeginColumn() - Method in class org.apache.lucene.queryParser.FastCharStream

getBeginColumn() - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

getBeginColumn() - Method in interface org.apache.lucene.queryParser.surround.parser.CharStream
Returns the column number of the first character for current token (being matched after the last call to BeginTOken).
getBeginColumn() - Method in class org.apache.lucene.queryParser.surround.parser.FastCharStream

getBeginIndex() - Method in class org.apache.lucene.analysis.util.CharArrayIterator

getBeginLine() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Get token beginning line number.
getBeginLine() - Method in interface org.apache.lucene.queryParser.CharStream
Returns the line number of the first character for current token (being matched after the last call to BeginTOken).
getBeginLine() - Method in exception org.apache.lucene.queryParser.core.QueryNodeParseException
For EndOfLine and EndOfFile ("") parsing problems the last char in the string is returned For the case where the parser is not able to figure out the line and column number -1 will be returned
getBeginLine() - Method in class org.apache.lucene.queryParser.FastCharStream

getBeginLine() - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

getBeginLine() - Method in interface org.apache.lucene.queryParser.surround.parser.CharStream
Returns the line number of the first character for current token (being matched after the last call to BeginTOken).
getBeginLine() - Method in class org.apache.lucene.queryParser.surround.parser.FastCharStream

getBenchmarkHighlighter(Query) - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask
Return an appropriate highlighter to be used with highlighting tasks
getBenchmarkHighlighter(Query) - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

getBenchmarkHighlighter(Query) - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask

getBestFragment(Analyzer, String, String) - Method in class org.apache.lucene.search.highlight.Highlighter
Highlights chosen terms in a text, extracting the most relevant section.
getBestFragment(TokenStream, String) - Method in class org.apache.lucene.search.highlight.Highlighter
Highlights chosen terms in a text, extracting the most relevant section.
getBestFragment(FieldQuery, IndexReader, int, String, int) - Method in class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
return the best fragment.
getBestFragment(FieldQuery, IndexReader, int, String, int, FragListBuilder, FragmentsBuilder, String[], String[], Encoder) - Method in class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
return the best fragment.
getBestFragments(Analyzer, String, String, int) - Method in class org.apache.lucene.search.highlight.Highlighter
Highlights chosen terms in a text, extracting the most relevant sections.
getBestFragments(TokenStream, String, int) - Method in class org.apache.lucene.search.highlight.Highlighter
Highlights chosen terms in a text, extracting the most relevant sections.
getBestFragments(TokenStream, String, int, String) - Method in class org.apache.lucene.search.highlight.Highlighter
Highlights terms in the text , extracting the most relevant sections and concatenating the chosen fragments with a separator (typically "...").
getBestFragments(FieldQuery, IndexReader, int, String, int, int) - Method in class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
return the best fragments.
getBestFragments(FieldQuery, IndexReader, int, String, int, int, FragListBuilder, FragmentsBuilder, String[], String[], Encoder) - Method in class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
return the best fragments.
getBestTextFragments(TokenStream, String, boolean, int) - Method in class org.apache.lucene.search.highlight.Highlighter
Low level api to get the most relevant (formatted) sections of the document.
getBinaryLength() - Method in class org.apache.lucene.document.AbstractField
Returns length of byte[] segment that is used as value, if Field is not binary returned value is undefined
getBinaryLength() - Method in interface org.apache.lucene.document.Fieldable
Returns length of byte[] segment that is used as value, if Field is not binary returned value is undefined
getBinaryOffset() - Method in class org.apache.lucene.document.AbstractField
Returns offset into byte[] segment that is used as value, if Field is not binary returned value is undefined
getBinaryOffset() - Method in interface org.apache.lucene.document.Fieldable
Returns offset into byte[] segment that is used as value, if Field is not binary returned value is undefined
getBinaryValue() - Method in class org.apache.lucene.document.AbstractField
Return the raw byte[] for the binary field.
getBinaryValue(byte[]) - Method in class org.apache.lucene.document.AbstractField

getBinaryValue(String) - Method in class org.apache.lucene.document.Document
Returns an array of bytes for the first (or only) field that has the name specified as the method parameter.
getBinaryValue() - Method in interface org.apache.lucene.document.Fieldable
Return the raw byte[] for the binary field.
getBinaryValue(byte[]) - Method in interface org.apache.lucene.document.Fieldable
Return the raw byte[] for the binary field.
getBinaryValue(byte[]) - Method in class org.apache.lucene.document.NumericField
Returns always null for numeric fields
getBinaryValues(String) - Method in class org.apache.lucene.document.Document
Returns an array of byte arrays for of the fields that have the name specified as the method parameter.
getBit(int) - Method in class org.apache.lucene.util.OpenBitSet
returns 1 if the bit is set, 0 if not.
getBits() - Method in class org.apache.lucene.util.FixedBitSet
Expert.
getBits() - Method in class org.apache.lucene.util.OpenBitSet
Expert: returns the long[] storing the bits
getBitSet() - Method in class org.apache.lucene.util.DocIdBitSet
Returns the underlying BitSet.
getBitsPerValue() - Method in class org.apache.lucene.util.packed.GrowableWriter

getBitsPerValue() - Method in interface org.apache.lucene.util.packed.PackedInts.Reader

getBitsPerValue() - Method in class org.apache.lucene.util.packed.PackedInts.ReaderImpl

getBlockEnds() - Method in class org.apache.lucene.util.PagedBytes.Reader

getBlocks() - Method in class org.apache.lucene.util.PagedBytes.Reader

getBody() - Method in class org.apache.lucene.benchmark.byTask.feeds.DocData

getBooleanQuery(List<BooleanClause>) - Method in class org.apache.lucene.queryParser.QueryParser
Factory method for generating query, given a set of clauses.
getBooleanQuery(List<BooleanClause>, boolean) - Method in class org.apache.lucene.queryParser.QueryParser
Factory method for generating query, given a set of clauses.
getBooleanQuery(List<BooleanClause>, boolean) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getBoost() - Method in class org.apache.lucene.document.AbstractField
Returns the boost factor for hits for this field.
getBoost() - Method in class org.apache.lucene.document.Document
Returns, at indexing time, the boost factor as set by Document.setBoost(float).
getBoost() - Method in interface org.apache.lucene.document.Fieldable
Returns the boost factor for hits for this field.
getBoost() - Method in class org.apache.lucene.index.FieldInvertState
Get boost value.
getBoost() - Method in interface org.apache.lucene.queryParser.standard.config.BoostAttribute
Deprecated.
getBoost() - Method in class org.apache.lucene.queryParser.standard.config.BoostAttributeImpl
Deprecated.
getBoost() - Method in class org.apache.lucene.search.Query
Gets the boost for this clause.
getBoost() - Method in class org.apache.lucene.search.vectorhighlight.FieldQuery.QueryPhraseMap

getBoostFactor() - Method in class org.apache.lucene.search.similar.MoreLikeThis
Returns the boost factor used when boosting terms
getBottomSlot() - Method in class org.apache.lucene.search.FieldComparator.StringOrdValComparator

getBoundary(double, double, double) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
getBoundingArea(double, double, double) - Method in class org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder
Deprecated.
getBoxShape(double, double, double) - Method in class org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder
Deprecated.
getBracketClose() - Method in class org.apache.lucene.queryParser.surround.query.ComposedQuery

getBracketOpen() - Method in class org.apache.lucene.queryParser.surround.query.ComposedQuery

getBreakIterator(int) - Method in class org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig

getBreakIterator(int) - Method in class org.apache.lucene.analysis.icu.segmentation.ICUTokenizerConfig
Return a breakiterator capable of processing a given script.
getBucket(CharSequence) - Method in class org.apache.lucene.search.suggest.fst.FSTCompletion
Returns the bucket assigned to a given key (if found) or -1 if no exact match exists.
getBucketCount() - Method in class org.apache.lucene.search.suggest.fst.FSTCompletion
Returns the bucket count (discretization thresholds).
getBuffer() - Method in class org.apache.lucene.facet.search.PayloadIterator
Get the buffer with the content of the last read payload.
getBuffer(int) - Method in class org.apache.lucene.store.RAMFile

getBuffer() - Method in class org.apache.lucene.util.CharacterUtils.CharacterBuffer
Returns the internal buffer
getBufferSize() - Method in class org.apache.lucene.store.BufferedIndexInput
Returns buffer size.
getByOutput(FST<Long>, long) - Static method in class org.apache.lucene.util.fst.Util
Reverse lookup (lookup by output instead of by input), in the special case when your FSTs outputs are strictly ascending.
getByteBlock() - Method in class org.apache.lucene.util.ByteBlockPool.Allocator

getByteBlock() - Method in class org.apache.lucene.util.ByteBlockPool.DirectTrackingAllocator

getByteBlock() - Method in class org.apache.lucene.util.RecyclingByteBlockAllocator

getBytes(IndexReader, String) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as a single byte and returns an array of size reader.maxDoc() of the value each document has in the given field.
getBytes(IndexReader, String, FieldCache.ByteParser) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as bytes and returns an array of size reader.maxDoc() of the value each document has in the given field.
getBytes(IndexReader, String, FieldCache.ByteParser, boolean) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as bytes and returns an array of size reader.maxDoc() of the value each document has in the given field.
getBytesCount() - Method in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
Returns the number of bytes generated since last reset.
getBytesCount() - Method in class org.apache.lucene.benchmark.byTask.feeds.DocMaker
Returns the number of bytes generated by the content source since last reset.
getByteSize() - Method in class org.apache.lucene.util.SortedVIntList

getBytesReader(int) - Method in class org.apache.lucene.analysis.ja.dict.TokenInfoFST

getBytesReader(int) - Method in class org.apache.lucene.util.fst.FST

getCachedFieldValues(FieldCache, String, IndexReader) - Method in class org.apache.lucene.search.function.ByteFieldSource

getCachedFieldValues(FieldCache, String, IndexReader) - Method in class org.apache.lucene.search.function.FieldCacheSource
Return cached DocValues for input field and reader.
getCachedFieldValues(FieldCache, String, IndexReader) - Method in class org.apache.lucene.search.function.FloatFieldSource

getCachedFieldValues(FieldCache, String, IndexReader) - Method in class org.apache.lucene.search.function.IntFieldSource

getCachedFieldValues(FieldCache, String, IndexReader) - Method in class org.apache.lucene.search.function.ShortFieldSource

getCacheEntries() - Method in interface org.apache.lucene.search.FieldCache
EXPERT: Generates an array of CacheEntry objects representing all items currently in the FieldCache.
getCacheEntries() - Method in class org.apache.lucene.util.FieldCacheSanityChecker.Insanity
CacheEntry objects which suggest a problem
getCacheMemoryUsage() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Returns the number of memory bytes used by the cache.
getCacheSize() - Method in class org.apache.lucene.facet.search.TotalFacetCountsCache

getCacheType() - Method in class org.apache.lucene.search.FieldCache.CacheEntry

getCalibrateSizeByDeletes() - Method in class org.apache.lucene.index.LogMergePolicy
Returns true if the segment size should be calibrated by the number of deletes when choosing segments for merge.
getCategoryAttribute(CategoryPath) - Method in class org.apache.lucene.facet.index.CategoryContainer
Get the CategoryAttribute this container has for a certain category, or null if the category is not in the container.
getCategoryData(CategoryEnhancement) - Method in class org.apache.lucene.facet.enhancements.EnhancementsPayloadIterator
Get the data of the current category and document for a certain enhancement, or null if no such enhancement exists.
getCategoryEnhancements() - Method in class org.apache.lucene.facet.enhancements.params.DefaultEnhancementsIndexingParams

getCategoryEnhancements() - Method in interface org.apache.lucene.facet.enhancements.params.EnhancementsIndexingParams
Get a list of the active category enhancements.
getCategoryListMap(FacetArrays, int) - Method in class org.apache.lucene.facet.search.StandardFacetsAccumulator
Create an Aggregator and a CategoryListIterator for each and every FacetRequest.
getCategoryListParams(CategoryPath) - Method in class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams

getCategoryListParams(CategoryPath) - Method in interface org.apache.lucene.facet.index.params.FacetIndexingParams
The name of the category-list to put this category in, or null if this category should not be aggregatable.
getCategoryListParams(CategoryPath) - Method in class org.apache.lucene.facet.index.params.PerDimensionIndexingParams
Get the CategoryListParams based on the dimension or "zero-th category" of the specified CategoryPath.
getCategoryListTermText() - Method in class org.apache.lucene.facet.enhancements.association.AssociationEnhancement

getCategoryListTermText() - Method in interface org.apache.lucene.facet.enhancements.CategoryEnhancement
Returns the text of this enhancement's category list term.
getCategoryListTokenizer(TokenStream, EnhancementsIndexingParams, TaxonomyWriter) - Method in class org.apache.lucene.facet.enhancements.association.AssociationEnhancement

getCategoryListTokenizer(TokenStream, EnhancementsIndexingParams, TaxonomyWriter) - Method in interface org.apache.lucene.facet.enhancements.CategoryEnhancement
Get the CategoryListTokenizer which generates the category list for this enhancement.
getCategoryListTokenizer(TokenStream) - Method in class org.apache.lucene.facet.enhancements.EnhancementsDocumentBuilder

getCategoryListTokenizer(TokenStream) - Method in class org.apache.lucene.facet.index.CategoryDocumentBuilder
Get a category list tokenizer (or a series of such tokenizers) to create the category list tokens.
getCategoryPath() - Method in interface org.apache.lucene.facet.index.attributes.CategoryAttribute
Returns the value of this attribute: a category path.
getCategoryPath() - Method in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl
Returns the category path value.
getCategoryPath() - Method in class org.apache.lucene.facet.search.params.FacetRequest
The root category of this facet request.
getCategoryTokenBytes(CategoryAttribute) - Method in class org.apache.lucene.facet.enhancements.association.AssociationEnhancement

getCategoryTokenBytes(CategoryAttribute) - Method in interface org.apache.lucene.facet.enhancements.CategoryEnhancement
Get the bytes to be added to the category token payload for this enhancement.
getCategoryTokenizer(TokenStream) - Method in class org.apache.lucene.facet.enhancements.EnhancementsDocumentBuilder

getCategoryTokenizer(TokenStream) - Method in class org.apache.lucene.facet.index.CategoryDocumentBuilder
Get a CategoryTokenizer to create the category tokens.
getCells() - Method in class org.egothor.stemmer.Row
Return the number of cells in use.
getCells() - Method in class org.egothor.stemmer.Trie
Return the number of cells in this Trie object.
getCellsPnt() - Method in class org.egothor.stemmer.Row
Return the number of references (how many transitions) to other rows.
getCellsPnt() - Method in class org.egothor.stemmer.Trie
Gets the cellsPnt attribute of the Trie object
getCellsVal() - Method in class org.egothor.stemmer.Row
Return the number of patch commands saved in this Row.
getCellsVal() - Method in class org.egothor.stemmer.Trie
Gets the cellsVal attribute of the Trie object
getCharacterClass(char) - Method in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

getCharacterDefinition() - Method in class org.apache.lucene.analysis.ja.dict.UnknownDictionary

getCharType(char) - Static method in class org.apache.lucene.analysis.cn.smart.Utility
Return the internal CharType constant of a given character.
getCheckIndexOnClose() - Method in class org.apache.lucene.store.MockDirectoryWrapper

getChecksum() - Method in class org.apache.lucene.store.ChecksumIndexInput

getChecksum() - Method in class org.apache.lucene.store.ChecksumIndexOutput

getChild() - Method in class org.apache.lucene.queryParser.core.nodes.BoostQueryNode
Returns the single child which this node boosts.
getChild() - Method in class org.apache.lucene.queryParser.core.nodes.GroupQueryNode

getChild() - Method in class org.apache.lucene.queryParser.core.nodes.ModifierQueryNode

getChild() - Method in class org.apache.lucene.queryParser.core.nodes.PhraseSlopQueryNode

getChild() - Method in class org.apache.lucene.queryParser.core.nodes.SlopQueryNode

getChildByTagName(Element, String) - Static method in class org.apache.lucene.xmlparser.DOMUtils

getChildByTagOrFail(Element, String) - Static method in class org.apache.lucene.xmlparser.DOMUtils

getChildren() - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode
get Children nodes
getChildren() - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

getChildrenArrays() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader

getChildrenArrays() - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyReader
getChildrenArrays() returns a TaxonomyReader.ChildrenArrays object which can be used together to efficiently enumerate the children of any category.
getChildTextByTagName(Element, String) - Static method in class org.apache.lucene.xmlparser.DOMUtils

getClassResource(Class<?>, String) - Static method in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

getClauses() - Method in class org.apache.lucene.search.BooleanQuery
Returns the set of clauses in this query.
getClauses() - Method in class org.apache.lucene.search.spans.SpanNearQuery
Return the clauses whose spans are matched.
getClauses() - Method in class org.apache.lucene.search.spans.SpanOrQuery
Return the clauses whose spans are matched.
getClCache() - Method in class org.apache.lucene.facet.search.params.FacetSearchParams

getCmd(Character) - Method in class org.egothor.stemmer.Row
Return the command in the Cell associated with the given Character.
getCnt(Character) - Method in class org.egothor.stemmer.Row
Return the number of patch commands were in the Cell associated with the given Character before the Trie containing this Row was reduced.
getCode() - Method in interface org.apache.lucene.analysis.icu.tokenattributes.ScriptAttribute
Get the numeric code for this script value.
getCode() - Method in class org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl

getCollator() - Method in class org.apache.lucene.queryParser.standard.nodes.RangeQueryNode
Deprecated.
getCollator() - Method in class org.apache.lucene.search.TermRangeFilter
Returns the collator used to determine range inclusion, if any.
getCollator() - Method in class org.apache.lucene.search.TermRangeQuery
Returns the collator used to determine range inclusion, if any.
getCollectedGroupHeads() - Method in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector
Returns the collected group heads.
getColsNamesForValsByRound() - Method in class org.apache.lucene.benchmark.byTask.utils.Config

getColsValuesForValsByRound(int) - Method in class org.apache.lucene.benchmark.byTask.utils.Config

getColumn() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column.Row
Deprecated.
getColumn() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Deprecated.
getColumn() - Method in interface org.apache.lucene.queryParser.CharStream
Deprecated.
getColumn() - Method in class org.apache.lucene.queryParser.FastCharStream

getColumn() - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Deprecated.
getColumn() - Method in interface org.apache.lucene.queryParser.surround.parser.CharStream
Deprecated.
getColumn() - Method in class org.apache.lucene.queryParser.surround.parser.FastCharStream

getColumns() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix
Deprecated.
getCommitUserData() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader

getCommitUserData() - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyReader
Retrieve user committed data.
getCommitUserData() - Method in class org.apache.lucene.index.FilterIndexReader

getCommitUserData(Directory) - Static method in class org.apache.lucene.index.IndexReader
Deprecated. Call IndexReader.getIndexCommit() on an open IndexReader, and then call IndexCommit.getUserData().
getCommitUserData() - Method in class org.apache.lucene.index.IndexReader
Deprecated. Call IndexReader.getIndexCommit() and then call IndexCommit.getUserData().
getComparator() - Method in class org.apache.lucene.index.FieldSortedTermVectorMapper

getComparator(int, int) - Method in class org.apache.lucene.search.SortField
Returns the FieldComparator to use for sorting.
getComparator() - Method in class org.apache.lucene.search.spell.SpellChecker

getComparator() - Method in class org.apache.lucene.search.spell.TermFreqIterator.TermFreqIteratorWrapper

getComparator() - Method in class org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper

getComparator() - Method in interface org.apache.lucene.search.suggest.fst.BytesRefSorter

getComparator() - Method in class org.apache.lucene.search.suggest.fst.ExternalRefSorter

getComparator() - Method in class org.apache.lucene.search.suggest.fst.InMemorySorter

getComparator() - Method in class org.apache.lucene.search.suggest.fst.Sort

getComparator() - Method in class org.apache.lucene.search.suggest.SortedTermFreqIteratorWrapper

getComparator() - Method in interface org.apache.lucene.util.BytesRefIterator
Return the BytesRef Comparator used to sort terms provided by the iterator.
getComparators() - Method in class org.apache.lucene.search.FieldValueHitQueue

getComparatorSource() - Method in class org.apache.lucene.search.SortField
Returns the FieldComparatorSource used for custom sorting
getComplementSet(ScoredDocIDs, IndexReader) - Static method in class org.apache.lucene.facet.util.ScoredDocIdsUtils
Create a complement of the input set.
getComplementThreshold() - Method in class org.apache.lucene.facet.search.FacetsAccumulator

getComplementThreshold() - Method in class org.apache.lucene.facet.search.SamplingWrapper

getComponent(int) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Return the i'th component of the path, in a new String object.
getCondition() - Method in class org.apache.lucene.analysis.hunspell.HunspellAffix
Returns the condition that must be met before the affix can be applied
getConfig() - Method in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource

getConfig() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

getConfig() - Method in class org.apache.lucene.index.IndexWriter
Returns the private IndexWriterConfig, cloned from the IndexWriterConfig passed to IndexWriter.IndexWriter(Directory, IndexWriterConfig).
getCoreCacheKey() - Method in class org.apache.lucene.index.FilterIndexReader
If the subclass of FilteredIndexReader modifies the contents of the FieldCache, you must override this method to provide a different key
getCoreCacheKey() - Method in class org.apache.lucene.index.IndexReader
Expert
getCoreCacheKey() - Method in class org.apache.lucene.index.SegmentReader

getCount() - Method in class org.apache.lucene.benchmark.byTask.feeds.DirContentSource.Iterator

getCount() - Method in class org.apache.lucene.benchmark.byTask.stats.TaskStats

getCountingListTokenizer(TokenStream) - Method in class org.apache.lucene.facet.index.CategoryDocumentBuilder
Get a CountingListTokenizer for creating counting list token.
getCountsByTime() - Method in class org.apache.lucene.benchmark.byTask.stats.TaskStats

getCountsByTimeStepMSec() - Method in class org.apache.lucene.benchmark.byTask.stats.TaskStats

getCurrent() - Method in class org.tartarus.snowball.SnowballProgram
Get the current string.
getCurrentBuffer() - Method in class org.tartarus.snowball.SnowballProgram
Get the current buffer containing the stem.
getCurrentBufferLength() - Method in class org.tartarus.snowball.SnowballProgram
Get the valid length of the character array in SnowballProgram.getCurrentBuffer().
getCurrentLabel() - Method in class org.apache.lucene.util.fst.BytesRefFSTEnum

getCurrentLabel() - Method in class org.apache.lucene.util.fst.IntsRefFSTEnum

getCurrentMerge() - Method in class org.apache.lucene.index.ConcurrentMergeScheduler.MergeThread

getCurrentSearcher() - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

getCurrentSearchingGen() - Method in class org.apache.lucene.search.NRTManager
Returns generation of current searcher.
getCurrentStats() - Method in class org.apache.lucene.benchmark.byTask.stats.Points

getCurrentVersion(Directory) - Static method in class org.apache.lucene.index.IndexReader
Deprecated. Use IndexReader.getVersion() on an opened IndexReader.
getCustom() - Method in class org.apache.lucene.search.FieldCache.CacheEntry

getCustomScoreProvider(IndexReader) - Method in class org.apache.lucene.search.function.CustomScoreQuery
Returns a CustomScoreProvider that calculates the custom scores for the given IndexReader.
getData() - Method in class org.apache.lucene.index.Payload
Returns a reference to the underlying byte array that holds this payloads data.
getDataFile(String) - Method in class org.apache.lucene.util.LuceneTestCase
Gets a resource from the classpath as File.
getDataInput() - Method in class org.apache.lucene.util.PagedBytes
Returns a DataInput to read values from this PagedBytes instance.
getDataOutput() - Method in class org.apache.lucene.util.PagedBytes
Returns a DataOutput that you may use to write into this PagedBytes instance.
getDataType() - Method in class org.apache.lucene.document.NumericField
Returns the data type of the current value, null if not yet set.
getDate() - Method in class org.apache.lucene.benchmark.byTask.feeds.DocData

getDateResolution(String) - Method in class org.apache.lucene.queryParser.QueryParser
Returns the date resolution that is used by RangeQueries for the given field.
getDateResolution() - Method in interface org.apache.lucene.queryParser.standard.config.DateResolutionAttribute
Deprecated.
getDateResolution() - Method in class org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl
Deprecated.
getDateResolution(String) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getDateResolution() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Returns the default DateTools.Resolution used for certain field when no DateTools.Resolution is defined for this field.
getDateResolutionMap() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Returns the field to DateTools.Resolution map used to normalize each date field.
getDecodedLength(CharBuffer) - Static method in class org.apache.lucene.util.IndexableBinaryStringTools
Deprecated. Use IndexableBinaryStringTools.getDecodedLength(char[], int, int) instead. This method will be removed in Lucene 4.0
getDecodedLength(char[], int, int) - Static method in class org.apache.lucene.util.IndexableBinaryStringTools
Returns the number of bytes required to decode the given char sequence.
getDecodingReader(InputStream, Charset) - Static method in class org.apache.lucene.util.IOUtils
Wrapping the given InputStream in a reader using a CharsetDecoder.
getDecodingReader(File, Charset) - Static method in class org.apache.lucene.util.IOUtils
Opens a Reader for the given File using a CharsetDecoder.
getDecodingReader(Class<?>, String, Charset) - Static method in class org.apache.lucene.util.IOUtils
Opens a Reader for the given resource using a CharsetDecoder.
getDefault() - Static method in class org.apache.lucene.search.Similarity
Return the default Similarity implementation used by indexing and search code.
getDefaultGenLookahedCount() - Static method in class org.apache.lucene.index.SegmentInfos

getDefaultInfoStream() - Static method in class org.apache.lucene.index.IndexWriter
Returns the current default infoStream for newly instantiated IndexWriters.
getDefaultOperator() - Method in class org.apache.lucene.queryParser.QueryParser
Gets implicit operator setting, which will be either AND_OPERATOR or OR_OPERATOR.
getDefaultOperator() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getDefaultOperator() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Gets implicit operator setting, which will be either StandardQueryConfigHandler.Operator.AND or StandardQueryConfigHandler.Operator.OR.
getDefaultPhraseSlop() - Method in interface org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttribute
Deprecated.
getDefaultPhraseSlop() - Method in class org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl
Deprecated.
getDefaultScore() - Method in class org.apache.lucene.facet.search.ScoredDocIdCollector
Returns the default score used when scoring is disabled.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.ar.ArabicAnalyzer
Returns an unmodifiable instance of the default stop-words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.bg.BulgarianAnalyzer
Returns an unmodifiable instance of the default stop-words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.br.BrazilianAnalyzer
Returns an unmodifiable instance of the default stop-words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.ca.CatalanAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.cjk.CJKAnalyzer
Returns an unmodifiable instance of the default stop-words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer
Returns an unmodifiable instance of the default stop-words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.cz.CzechAnalyzer
Returns a set of default Czech-stopwords
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.da.DanishAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.de.GermanAnalyzer
Returns a set of default German-stopwords
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.el.GreekAnalyzer
Returns a set of default Greek-stopwords
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.en.EnglishAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.es.SpanishAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.eu.BasqueAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.fa.PersianAnalyzer
Returns an unmodifiable instance of the default stop-words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.fi.FinnishAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.fr.FrenchAnalyzer
Returns an unmodifiable instance of the default stop-words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.ga.IrishAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.gl.GalicianAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.hi.HindiAnalyzer
Returns an unmodifiable instance of the default stop-words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.hu.HungarianAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.hy.ArmenianAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.id.IndonesianAnalyzer
Returns an unmodifiable instance of the default stop-words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.it.ItalianAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.ja.JapaneseAnalyzer

getDefaultStopSet() - Static method in class org.apache.lucene.analysis.lv.LatvianAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.nl.DutchAnalyzer
Returns an unmodifiable instance of the default stop-words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.no.NorwegianAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.pl.PolishAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.pt.PortugueseAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.ro.RomanianAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.ru.RussianAnalyzer
Returns an unmodifiable instance of the default stop-words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.sv.SwedishAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.th.ThaiAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopSet() - Static method in class org.apache.lucene.analysis.tr.TurkishAnalyzer
Returns an unmodifiable instance of the default stop words set.
getDefaultStopTags() - Static method in class org.apache.lucene.analysis.ja.JapaneseAnalyzer

getDefaultWriteLockTimeout() - Static method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.getDefaultWriteLockTimeout() instead
getDefaultWriteLockTimeout() - Static method in class org.apache.lucene.index.IndexWriterConfig
Returns the default write lock timeout for newly instantiated IndexWriterConfigs.
getDelay(boolean) - Method in class org.apache.lucene.util.ThrottledIndexOutput

getDelCount() - Method in class org.apache.lucene.index.SegmentInfo

getDeletedDocuments() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndex
Deprecated.
getDeletesCacheKey() - Method in class org.apache.lucene.index.FilterIndexReader
If the subclass of FilteredIndexReader modifies the deleted docs, you must override this method to provide a different key
getDeletesCacheKey() - Method in class org.apache.lucene.index.IndexReader
Expert.
getDeletesCacheKey() - Method in class org.apache.lucene.index.SegmentReader

getDelFileName() - Method in class org.apache.lucene.index.SegmentInfo

getDepth() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

getDepth() - Method in class org.apache.lucene.facet.search.params.FacetRequest
How deeply to look under the given category.
getDescription() - Method in class org.apache.lucene.search.Explanation
A description of this explanation node.
getDetails() - Method in class org.apache.lucene.search.Explanation
The sub-nodes of this explanation node.
getDiagnostics() - Method in class org.apache.lucene.index.SegmentInfo

getDirectory() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

getDirectory() - Method in class org.apache.lucene.index.CompoundFileWriter
Returns the directory of the compound file.
getDirectory() - Method in class org.apache.lucene.index.IndexCommit
Returns the Directory for the index.
getDirectory() - Method in class org.apache.lucene.index.IndexWriter
Returns the Directory used by this index.
getDirectory() - Method in exception org.apache.lucene.index.MergePolicy.MergeException
Returns the Directory of the index that hit the exception.
getDirectory() - Method in class org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint

getDirectory(Directory) - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

getDirectory() - Method in class org.apache.lucene.store.FSDirectory

getDirProcessor(Directory) - Method in class org.apache.lucene.index.PayloadProcessorProvider
Deprecated. Use PayloadProcessorProvider.getReaderProcessor(org.apache.lucene.index.IndexReader) instead. You can still select by Directory, if you retrieve the underlying directory from IndexReader.directory().
getDiscountOverlaps() - Method in class org.apache.lucene.search.DefaultSimilarity

getDistance() - Method in class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode

getDistance(String, String) - Method in class org.apache.lucene.search.spell.JaroWinklerDistance

getDistance(String, String) - Method in class org.apache.lucene.search.spell.LevensteinDistance

getDistance(String, String) - Method in class org.apache.lucene.search.spell.NGramDistance

getDistance(String, String) - Method in interface org.apache.lucene.search.spell.StringDistance
Returns a float between 0 and 1 based on how similar the specified strings are to one another.
getDistance(int) - Method in class org.apache.lucene.spatial.tier.DistanceFilter
Deprecated.
getDistance(int, double, double, double, double) - Method in class org.apache.lucene.spatial.tier.DistanceHandler
Deprecated.
getDistanceFilter() - Method in class org.apache.lucene.spatial.tier.DistanceQueryBuilder
Deprecated.
getDistanceMi(double, double, double, double) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
getDistanceQuery(List<SrndQuery>, boolean, Token, boolean) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

getDistances() - Method in class org.apache.lucene.spatial.tier.DistanceFilter
Deprecated.
getDistanceSq(double, double) - Method in class org.apache.lucene.spatial.geometry.shape.DistanceApproximation
Deprecated.
getDistanceSq(double, double, double, double) - Method in class org.apache.lucene.spatial.geometry.shape.DistanceApproximation
Deprecated.
getDoc() - Method in class org.apache.lucene.search.SpanFilterResult.PositionInfo

getDocGroupValue(int) - Method in class org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector
Returns the group value for the specified doc.
getDocGroupValue(int) - Method in class org.apache.lucene.search.grouping.TermFirstPassGroupingCollector

getDocID() - Method in interface org.apache.lucene.facet.search.ScoredDocIDsIterator
Returns the ID of the current document.
getDocIDs() - Method in interface org.apache.lucene.facet.search.ScoredDocIDs
Returns the set of doc IDs.
getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.BooleanFilter
Returns the a DocIdSetIterator representing the Boolean composition of the filters that have been added.
getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.CachingSpanFilter

getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.CachingWrapperFilter

getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.CachingWrapperFilterHelper

getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.ChainedFilter
Filter.getDocIdSet(org.apache.lucene.index.IndexReader).
getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.DuplicateFilter

getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.FieldCacheRangeFilter
This method is implemented for each data type
getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.FieldCacheTermsFilter

getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.FieldValueFilter

getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.Filter
Creates a DocIdSet enumerating the documents that should be permitted in search results.
getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.join.RawTermFilter

getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.MultiTermQueryWrapperFilter
Returns a DocIdSet with documents that should be permitted in search results.
getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.QueryWrapperFilter

getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.RemoteCachingWrapperFilter
Deprecated. Uses the FilterManager to keep the cache for a filter on the searcher side of a remote connection.
getDocIdSet() - Method in class org.apache.lucene.search.SpanFilterResult
Returns the docIdSet
getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.SpanQueryFilter

getDocIdSet(IndexReader) - Method in class org.apache.lucene.search.TermsFilter

getDocIdSet(IndexReader) - Method in class org.apache.lucene.spatial.geohash.GeoHashDistanceFilter
Deprecated.
getDocIdSet(IndexReader) - Method in class org.apache.lucene.spatial.tier.CartesianShapeFilter
Deprecated.
getDocIdSet(IndexReader) - Method in class org.apache.lucene.spatial.tier.LatLongDistanceFilter
Deprecated.
getDocMaker() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData
Returns the docMaker.
getDocNamesExtractTime() - Method in class org.apache.lucene.benchmark.quality.QualityStats
Returns the time it took to extract doc names for judging the measured query, in milliseconds.
getDocState() - Method in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

getDocStoreIsCompoundFile() - Method in class org.apache.lucene.index.SegmentInfo

getDocStoreOffset() - Method in class org.apache.lucene.index.SegmentInfo

getDocStoreSegment() - Method in class org.apache.lucene.index.SegmentInfo

getDocsWithField(IndexReader, String) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field and returns a bit set at the size of reader.maxDoc(), with turned on bits for each docid that does have a value for this field.
getDocument() - Method in class org.apache.lucene.store.instantiated.InstantiatedDocument

getDocument() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermDocumentInformation

getDocumentNumber() - Method in class org.apache.lucene.store.instantiated.InstantiatedDocument

getDocumentsByNumber() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndex
Deprecated.
getDoubles(IndexReader, String) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
getDoubles(IndexReader, String, FieldCache.DoubleParser) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as doubles and returns an array of size reader.maxDoc() of the value each document has in the given field.
getDoubles(IndexReader, String, FieldCache.DoubleParser, boolean) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as doubles and returns an array of size reader.maxDoc() of the value each document has in the given field.
getElapsed() - Method in class org.apache.lucene.benchmark.byTask.stats.TaskStats

getEmptyOutput() - Method in class org.apache.lucene.util.fst.FST

getEnablePositionIncrements() - Method in class org.apache.lucene.analysis.FilteringTokenFilter

getEnablePositionIncrements() - Method in class org.apache.lucene.queryParser.QueryParser

getEnablePositionIncrements() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getEnablePositionIncrements() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser

getEnablePositionIncrementsVersionDefault(Version) - Static method in class org.apache.lucene.analysis.StopFilter
Deprecated. use StopFilter.StopFilter(Version, TokenStream, Set) instead
getEncodedLength(ByteBuffer) - Static method in class org.apache.lucene.util.IndexableBinaryStringTools
Deprecated. Use IndexableBinaryStringTools.getEncodedLength(byte[], int, int) instead. This method will be removed in Lucene 4.0
getEncodedLength(byte[], int, int) - Static method in class org.apache.lucene.util.IndexableBinaryStringTools
Returns the number of chars required to encode the given bytes.
getEncoder() - Method in class org.apache.lucene.search.highlight.Highlighter

getEnd() - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

getEnd() - Method in class org.apache.lucene.queryParser.core.nodes.PathQueryNode.QueryText

getEnd() - Method in class org.apache.lucene.search.SpanFilterResult.StartEnd

getEnd() - Method in class org.apache.lucene.search.spans.SpanPositionRangeQuery

getEndColumn() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Get token end column number.
getEndColumn() - Method in interface org.apache.lucene.queryParser.CharStream
Returns the column number of the last character for current token (being matched after the last call to BeginTOken).
getEndColumn() - Method in class org.apache.lucene.queryParser.FastCharStream

getEndColumn() - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Get end column.
getEndColumn() - Method in interface org.apache.lucene.queryParser.surround.parser.CharStream
Returns the column number of the last character for current token (being matched after the last call to BeginTOken).
getEndColumn() - Method in class org.apache.lucene.queryParser.surround.parser.FastCharStream

getEndIndex() - Method in class org.apache.lucene.analysis.util.CharArrayIterator

getEndLine() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Get token end line number.
getEndLine() - Method in interface org.apache.lucene.queryParser.CharStream
Returns the line number of the last character for current token (being matched after the last call to BeginTOken).
getEndLine() - Method in class org.apache.lucene.queryParser.FastCharStream

getEndLine() - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Get end line.
getEndLine() - Method in interface org.apache.lucene.queryParser.surround.parser.CharStream
Returns the line number of the last character for current token (being matched after the last call to BeginTOken).
getEndLine() - Method in class org.apache.lucene.queryParser.surround.parser.FastCharStream

getEndOffset() - Method in class org.apache.lucene.index.TermVectorOffsetInfo
The accessor for the ending offset for the term
getEndOffset() - Method in class org.apache.lucene.search.highlight.TokenGroup

getEndOffset() - Method in class org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo

getEndOffset() - Method in class org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo

getEndOffset() - Method in class org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo.Toffs

getEndOffset() - Method in class org.apache.lucene.search.vectorhighlight.FieldTermStack.TermInfo

getEnum(IndexReader) - Method in class org.apache.lucene.search.FuzzyQuery

getEnum(IndexReader) - Method in class org.apache.lucene.search.MultiTermQuery
Construct the enumeration to be used, expanding the pattern term.
getEnum(IndexReader) - Method in class org.apache.lucene.search.NumericRangeQuery

getEnum(IndexReader) - Method in class org.apache.lucene.search.PrefixQuery

getEnum(IndexReader) - Method in class org.apache.lucene.search.regex.RegexQuery

getEnum(IndexReader) - Method in class org.apache.lucene.search.TermRangeQuery

getEnum(IndexReader) - Method in class org.apache.lucene.search.WildcardQuery

getErrorToken() - Method in exception org.apache.lucene.queryParser.core.QueryNodeParseException

getEstimatedSize() - Method in class org.apache.lucene.search.FieldCache.CacheEntry
The most recently estimated size of the value, null unless estimateSize has been called.
getExceptionWord(ArrayList<?>) - Method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser

getExclude() - Method in class org.apache.lucene.search.spans.SpanNotQuery
Return the SpanQuery whose matches must not overlap those returned.
getExpandMultiTermQuery() - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor

getExtension(String) - Method in class org.apache.lucene.queryParser.ext.Extensions
Returns the ParserExtension instance for the given key or null if no extension can be found for the key.
getExtension(String) - Static method in class org.apache.lucene.store.FileSwitchDirectory
Utility method to return a file's extension.
getExtensionFieldDelimiter() - Method in class org.apache.lucene.queryParser.ext.ExtendableQueryParser
Returns the extension field delimiter character.
getExtensionFieldDelimiter() - Method in class org.apache.lucene.queryParser.ext.Extensions
Returns the extension field delimiter
getFacetDelimChar() - Method in class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams
Use DefaultFacetIndexingParams.DEFAULT_FACET_DELIM_CHAR as the delimiter.
getFacetDelimChar() - Method in interface org.apache.lucene.facet.index.params.FacetIndexingParams
Get the delimiter character used internally for drill-down terms
getFacetIndexingParams() - Method in class org.apache.lucene.facet.search.params.FacetSearchParams
A list of FacetRequest objects, determining what to count.
getFacetRequest() - Method in class org.apache.lucene.facet.search.FacetResultsHandler
Return the facet request served by this handler.
getFacetRequest() - Method in class org.apache.lucene.facet.search.results.FacetResult
Request for which this result was obtained.
getFacetRequest() - Method in interface org.apache.lucene.facet.search.results.IntermediateFacetResult
Facet request for which this temporary result was created.
getFacetRequest() - Method in class org.apache.lucene.facet.search.TopKInEachNodeHandler.IntermediateFacetResultWithHash

getFacetRequests() - Method in class org.apache.lucene.facet.search.params.FacetSearchParams
Parameters which controlled the indexing of facets, and which are also needed during search.
getFacetResultNode() - Method in class org.apache.lucene.facet.search.results.FacetResult
Facet result node matching the root of the facet request.
getFacetResults() - Method in class org.apache.lucene.facet.search.FacetsCollector
Return accumulated facets results (according to faceted search parameters) for collected documents.
getFacetSource() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData
Returns the facet source.
getField(String) - Method in class org.apache.lucene.document.Document
Deprecated. use Document.getFieldable(java.lang.String) instead and cast depending on data type.
getField() - Method in interface org.apache.lucene.index.TermFreqVector
The Fieldable name.
getField() - Method in class org.apache.lucene.index.TermVectorEntry

getField() - Method in class org.apache.lucene.queryParser.core.config.FieldConfig
Returns the field name this configuration represents.
getField() - Method in class org.apache.lucene.queryParser.core.nodes.AnyQueryNode
returns null if the field was not specified
getField() - Method in interface org.apache.lucene.queryParser.core.nodes.FieldableNode
Returns the field associated to the node and every node under it.
getField() - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

getField() - Method in class org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode

getField() - Method in class org.apache.lucene.queryParser.core.nodes.PhraseSlopQueryNode

getField() - Method in class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode
returns null if the field was not specified in the query string
getField() - Method in class org.apache.lucene.queryParser.core.nodes.SlopQueryNode

getField() - Method in class org.apache.lucene.queryParser.core.nodes.TokenizedPhraseQueryNode

getField() - Method in class org.apache.lucene.queryParser.ext.ExtensionQuery
Returns the query field
getField() - Method in class org.apache.lucene.queryParser.QueryParser

getField() - Method in class org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode
Returns the field associated with this node.
getField() - Method in class org.apache.lucene.queryParser.standard.nodes.MultiPhraseQueryNode

getField() - Method in class org.apache.lucene.queryParser.standard.nodes.NumericQueryNode
Returns the field associated with this node.
getField() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getField() - Method in class org.apache.lucene.search.FieldCacheRangeFilter
Returns the field name for this filter
getField() - Method in class org.apache.lucene.search.FieldComparator.StringOrdValComparator

getField() - Method in class org.apache.lucene.search.NumericRangeFilter
Returns the field name for this filter
getField() - Method in class org.apache.lucene.search.NumericRangeQuery
Returns the field name for this query
getField() - Method in class org.apache.lucene.search.QueryTermVector

getField() - Method in class org.apache.lucene.search.SortField
Returns the name of the field.
getField() - Method in class org.apache.lucene.search.spans.FieldMaskingSpanQuery

getField() - Method in class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper

getField() - Method in class org.apache.lucene.search.spans.SpanNearQuery

getField() - Method in class org.apache.lucene.search.spans.SpanNotQuery

getField() - Method in class org.apache.lucene.search.spans.SpanOrQuery

getField() - Method in class org.apache.lucene.search.spans.SpanPositionCheckQuery

getField() - Method in class org.apache.lucene.search.spans.SpanQuery
Returns the name of the field matched by this query.
getField() - Method in class org.apache.lucene.search.spans.SpanTermQuery

getField() - Method in class org.apache.lucene.search.TermRangeFilter
Returns the field name for this filter
getField() - Method in class org.apache.lucene.search.TermRangeQuery
Returns the field name for this query
getField() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermFreqVector

getFieldable(String) - Method in class org.apache.lucene.document.Document
Returns a field with the given name if any exist in this document, or null.
getFieldables(String) - Method in class org.apache.lucene.document.Document
Returns an array of Fieldables with the given name.
getFieldAsString() - Method in class org.apache.lucene.queryParser.core.nodes.AnyQueryNode
returns - null if the field was not specified
getFieldAsString() - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
returns null if the field was not specified in the query string
getFieldAsString() - Method in class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode
returns null if the field was not specified in the query string
getFieldBoostMap() - Method in interface org.apache.lucene.queryParser.standard.config.FieldBoostMapAttribute
Deprecated.
getFieldBoostMap() - Method in class org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl
Deprecated.
getFieldCache() - Method in class org.apache.lucene.search.FieldCacheTermsFilter

getFieldConfig(CharSequence) - Method in class org.apache.lucene.queryParser.core.config.QueryConfigHandler
Deprecated. use QueryConfigHandler.getFieldConfig(String) instead
getFieldConfig(String) - Method in class org.apache.lucene.queryParser.core.config.QueryConfigHandler
Returns an implementation of FieldConfig for a specific field name.
getFieldDateResolutionMap() - Method in interface org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttribute
Deprecated.
getFieldDateResolutionMap() - Method in class org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl
Deprecated.
getFieldInfos() - Method in class org.apache.lucene.index.FilterIndexReader

getFieldInfos() - Method in class org.apache.lucene.index.IndexReader
Get the FieldInfos describing all fields in this reader.
getFieldInfos() - Method in class org.apache.lucene.index.MultiReader

getFieldInfos() - Method in class org.apache.lucene.index.ParallelReader

getFieldInfos(FieldInfos) - Method in class org.apache.lucene.index.pruning.StorePruningPolicy
Compute field infos that should be retained
getFieldInfos() - Method in class org.apache.lucene.index.PruningReader
Applies a StorePruningPolicy to the list of available field infos.
getFieldInfos() - Method in class org.apache.lucene.index.SegmentReader

getFieldInfos() - Method in class org.apache.lucene.index.SlowMultiReaderWrapper

getFieldInfos() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndex
Deprecated.
getFieldInfos() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
getFieldName() - Method in class org.apache.lucene.queryParser.core.config.FieldConfig
Deprecated. use FieldConfig.getField() instead
getFieldName() - Method in class org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory

getFieldName() - Method in class org.apache.lucene.search.DuplicateFilter

getFieldName() - Method in class org.apache.lucene.search.FieldCache.CacheEntry

getFieldName() - Method in class org.apache.lucene.search.vectorhighlight.FieldTermStack

getFieldNames() - Method in class org.apache.lucene.queryParser.surround.query.FieldsQuery

getFieldNames() - Method in class org.apache.lucene.search.similar.MoreLikeThis
Returns the field names that will be used when generating the 'More Like This' query.
getFieldOperator() - Method in class org.apache.lucene.queryParser.surround.query.FieldsQuery

getFieldOperator() - Method in class org.apache.lucene.queryParser.surround.query.SimpleTerm

getFieldQuery(String, String, int) - Method in class org.apache.lucene.queryParser.complexPhrase.ComplexPhraseQueryParser

getFieldQuery(String, String, boolean) - Method in class org.apache.lucene.queryParser.ext.ExtendableQueryParser

getFieldQuery(String, String, int) - Method in class org.apache.lucene.queryParser.MultiFieldQueryParser

getFieldQuery(String, String, boolean) - Method in class org.apache.lucene.queryParser.MultiFieldQueryParser

getFieldQuery(String, String) - Method in class org.apache.lucene.queryParser.QueryParser
Deprecated. Use QueryParser.getFieldQuery(String,String,boolean) instead.
getFieldQuery(String, String, boolean) - Method in class org.apache.lucene.queryParser.QueryParser

getFieldQuery(String, String, int) - Method in class org.apache.lucene.queryParser.QueryParser
Base implementation delegates to QueryParser.getFieldQuery(String,String,boolean).
getFieldQuery(String, String) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated. Use QueryParserWrapper.getFieldQuery(String, String, boolean) instead
getFieldQuery(String, String, boolean) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getFieldQuery(String, String, int) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated. Base implementation delegates to QueryParserWrapper.getFieldQuery(String,String).
getFieldQuery(Query) - Method in class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
create a FieldQuery object.
getFieldQuery(Query, IndexReader) - Method in class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
create a FieldQuery object.
getFields() - Method in class org.apache.lucene.document.Document
Returns a List of all the fields in a document.
getFields(String) - Method in class org.apache.lucene.document.Document
Deprecated. use Document.getFieldable(java.lang.String) instead and cast depending on data type.
getFields() - Method in interface org.apache.lucene.queryParser.standard.config.MultiFieldAttribute
Deprecated.
getFields() - Method in class org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl
Deprecated.
getFields(IndexReader, int, String) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

getFieldsBoost() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Returns the field to boost map used to set boost for each field.
getFieldsQuery(SrndQuery, ArrayList<String>) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

getFieldsToHighlight(Document) - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask
Define the fields to highlight.
getFieldsToHighlight(Document) - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

getFieldsToHighlight(Document) - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask

getFieldTermMap(String, String) - Method in class org.apache.lucene.search.vectorhighlight.FieldQuery

getFieldToTerms() - Method in class org.apache.lucene.index.FieldSortedTermVectorMapper
Get the mapping between fields and terms, sorted by the comparator
getFieldToTerms() - Method in class org.apache.lucene.index.PositionBasedTermVectorMapper
Get the mapping between fields and terms, sorted by the comparator
getFieldValues(IndexReader, int, String) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder
Deprecated.
getFile() - Method in class org.apache.lucene.store.FSDirectory
Deprecated. Use FSDirectory.getDirectory() instead.
getFileNames() - Method in class org.apache.lucene.index.IndexCommit
Returns all index files referenced by this commit point.
getFileNames() - Method in class org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint

getFilePointer() - Method in class org.apache.lucene.store.BufferedIndexInput

getFilePointer() - Method in class org.apache.lucene.store.BufferedIndexOutput
Returns the current position in this file, where the next write will occur.
getFilePointer() - Method in class org.apache.lucene.store.ChecksumIndexInput

getFilePointer() - Method in class org.apache.lucene.store.ChecksumIndexOutput

getFilePointer() - Method in class org.apache.lucene.store.IndexInput
Returns the current position in this file, where the next read will occur.
getFilePointer() - Method in class org.apache.lucene.store.IndexOutput
Returns the current position in this file, where the next write will occur.
getFilePointer() - Method in class org.apache.lucene.store.MockIndexInputWrapper

getFilePointer() - Method in class org.apache.lucene.store.MockIndexOutputWrapper

getFilePointer() - Method in class org.apache.lucene.store.RAMInputStream

getFilePointer() - Method in class org.apache.lucene.store.RAMOutputStream

getFilePointer() - Method in class org.apache.lucene.util.ThrottledIndexOutput

getFilter() - Static method in class org.apache.lucene.index.IndexFileNameFilter

getFilter() - Method in class org.apache.lucene.search.ConstantScoreQuery
Returns the encapsulated filter, returns null if a query is wrapped.
getFilter() - Method in class org.apache.lucene.search.FilterClause
Returns this FilterClause's filter
getFilter() - Method in class org.apache.lucene.search.FilteredQuery

getFilter(Filter) - Method in class org.apache.lucene.search.FilterManager
Deprecated. Returns the cached version of the filter.
getFilter() - Method in class org.apache.lucene.spatial.tier.DistanceQueryBuilder
Deprecated. Create a distance query using a boundary box wrapper around a more precise DistanceFilter.
getFilter(Query) - Method in class org.apache.lucene.spatial.tier.DistanceQueryBuilder
Deprecated.
getFilter(Element) - Method in class org.apache.lucene.xmlparser.builders.BooleanFilterBuilder

getFilter(Element) - Method in class org.apache.lucene.xmlparser.builders.CachedFilterBuilder

getFilter(Element) - Method in class org.apache.lucene.xmlparser.builders.DuplicateFilterBuilder

getFilter(Element) - Method in class org.apache.lucene.xmlparser.builders.NumericRangeFilterBuilder

getFilter(Element) - Method in class org.apache.lucene.xmlparser.builders.RangeFilterBuilder

getFilter(Element) - Method in class org.apache.lucene.xmlparser.builders.TermsFilterBuilder

getFilter(Element) - Method in interface org.apache.lucene.xmlparser.FilterBuilder

getFilter(Element) - Method in class org.apache.lucene.xmlparser.FilterBuilderFactory

getFilterBuilder(String) - Method in class org.apache.lucene.xmlparser.FilterBuilderFactory

getFinalSearcher() - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

getFirstArc(FST.Arc<Long>) - Method in class org.apache.lucene.analysis.ja.dict.TokenInfoFST

getFirstArc(FST.Arc<T>) - Method in class org.apache.lucene.util.fst.FST
Fills virtual 'start' arc, ie, an empty incoming arc to the FST's start node
getFirstChildElement(Element) - Static method in class org.apache.lucene.xmlparser.DOMUtils

getFirstChildOrFail(Element) - Static method in class org.apache.lucene.xmlparser.DOMUtils

getFirstPathElement() - Method in class org.apache.lucene.queryParser.core.nodes.PathQueryNode
Returns the CharSequence value of a specific QueryText element
getFixedLat() - Method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
getFixedLat() - Method in class org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.
getFixedLat() - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated.
getFixedLng() - Method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
getFixedLng() - Method in class org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.
getFixedLng() - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated.
getFlag() - Method in class org.apache.lucene.analysis.hunspell.HunspellAffix
Returns the affix flag
getFlags() - Method in class org.apache.lucene.analysis.hunspell.HunspellWord
Returns the flags associated with the word
getFlags() - Method in class org.apache.lucene.analysis.Token

Get the bitset for any bits that have been set.
getFlags() - Method in interface org.apache.lucene.analysis.tokenattributes.FlagsAttribute

Get the bitset for any bits that have been set.
getFlags() - Method in class org.apache.lucene.analysis.tokenattributes.FlagsAttributeImpl

Get the bitset for any bits that have been set.
getFloatArray() - Method in class org.apache.lucene.facet.search.FacetArrays
Obtain a float array, e.g.
getFloatAssociation() - Method in class org.apache.lucene.facet.enhancements.association.AssociationFloatProperty

getFloats(IndexReader, String) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.
getFloats(IndexReader, String, FieldCache.FloatParser) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.
getFloats(IndexReader, String, FieldCache.FloatParser, boolean) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.
getFloorSegmentMB() - Method in class org.apache.lucene.index.TieredMergePolicy

getForceMergeDeletesPctAllowed() - Method in class org.apache.lucene.index.TieredMergePolicy

getForegroundColorString(float) - Method in class org.apache.lucene.search.highlight.GradientFormatter

getFormat() - Method in class org.apache.lucene.index.SegmentInfos

getFragInfos() - Method in class org.apache.lucene.search.vectorhighlight.FieldFragList
return the list of WeightedFragInfos.
getFragmentScore() - Method in class org.apache.lucene.search.highlight.QueryScorer

getFragmentScore() - Method in class org.apache.lucene.search.highlight.QueryTermScorer

getFragmentScore() - Method in interface org.apache.lucene.search.highlight.Scorer
Called when the Highlighter has no more tokens for the current fragment - the Scorer returns the weighting it has derived for the most recent fragment, typically based on the results of Scorer.getTokenScore().
getFragmentScorer() - Method in class org.apache.lucene.search.highlight.Highlighter

getFragmentSize() - Method in class org.apache.lucene.search.highlight.SimpleFragmenter

getFragmentSource(StringBuilder, int[], String[], int, int) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder
Deprecated.
getFragmentSource(StringBuilder, int[], Field[], int, int) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

getFragmentSourceMSO(StringBuilder, int[], Field[], int, int, int[]) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

getFragNum() - Method in class org.apache.lucene.search.highlight.TextFragment

getFrequency() - Method in class org.apache.lucene.index.TermVectorEntry

getFST() - Method in class org.apache.lucene.analysis.ja.dict.TokenInfoDictionary

getFST() - Method in class org.apache.lucene.analysis.ja.dict.UserDictionary

getFST() - Method in class org.apache.lucene.search.suggest.fst.FSTCompletion
Returns the internal automaton.
getFully(CharSequence) - Method in class org.egothor.stemmer.MultiTrie
Return the element that is stored in a cell associated with the given key.
getFully(CharSequence) - Method in class org.egothor.stemmer.MultiTrie2
Return the element that is stored in a cell associated with the given key.
getFully(CharSequence) - Method in class org.egothor.stemmer.Trie
Return the element that is stored in a cell associated with the given key.
getFuzzyMinSim() - Method in class org.apache.lucene.queryParser.QueryParser
Get the minimal similarity for fuzzy queries.
getFuzzyMinSim() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getFuzzyMinSim() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Get the minimal similarity for fuzzy queries.
getFuzzyMinSimilarity() - Method in interface org.apache.lucene.queryParser.standard.config.FuzzyAttribute
Deprecated.
getFuzzyMinSimilarity() - Method in class org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl
Deprecated.
getFuzzyPrefixLength() - Method in class org.apache.lucene.queryParser.QueryParser
Get the prefix length for fuzzy queries.
getFuzzyPrefixLength() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getFuzzyPrefixLength() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Get the prefix length for fuzzy queries.
getFuzzyQuery(String, String, float) - Method in class org.apache.lucene.queryParser.analyzing.AnalyzingQueryParser
Called when parser parses an input term token that has the fuzzy suffix (~) appended.
getFuzzyQuery(String, String, float) - Method in class org.apache.lucene.queryParser.complexPhrase.ComplexPhraseQueryParser

getFuzzyQuery(String, String, float) - Method in class org.apache.lucene.queryParser.MultiFieldQueryParser

getFuzzyQuery(String, String, float) - Method in class org.apache.lucene.queryParser.QueryParser
Factory method for generating a query (similar to QueryParser.getWildcardQuery(java.lang.String, java.lang.String)).
getFuzzyQuery(String, String, float) - Method in class org.apache.lucene.queryParser.QueryParserTestBase.QPTestParser

getFuzzyQuery(String, String, float) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getGeneration() - Method in class org.apache.lucene.index.IndexCommit
Returns the generation (the _N in segments_N) for this IndexCommit
getGeneration() - Method in class org.apache.lucene.index.SegmentInfos

getGeneration() - Method in class org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint

getGeneration() - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

getGlobalCounter() - Static method in class org.apache.lucene.search.TimeLimitingCollector
Returns the global TimerThreads Counter
getGlobalTimerThread() - Static method in class org.apache.lucene.search.TimeLimitingCollector
Returns the global TimeLimitingCollector.TimerThread.
getGroupCount() - Method in class org.apache.lucene.search.grouping.AbstractAllGroupsCollector
Returns the total number of groups for the executed search.
getGroups() - Method in class org.apache.lucene.search.grouping.AbstractAllGroupsCollector
Returns the group values
This is an unordered collections of group values.
getGroups() - Method in class org.apache.lucene.search.grouping.TermAllGroupsCollector
Returns the group values
This is an unordered collections of group values.
getHasProx() - Method in class org.apache.lucene.index.SegmentInfo

getHasVectors() - Method in class org.apache.lucene.index.SegmentInfo

getHeapArray() - Method in class org.apache.lucene.util.PriorityQueue
This method returns the internal heap array as Object[].
getHighFreqTerms(IndexReader, int, String) - Static method in class org.apache.lucene.misc.HighFreqTerms

getHyphenationPoints() - Method in class org.apache.lucene.analysis.compound.hyphenation.Hyphenation

getHyphenationTree(String) - Static method in class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
Create a hyphenator tree
getHyphenationTree(File) - Static method in class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
Create a hyphenator tree
getHyphenationTree(Reader) - Static method in class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
Deprecated. Don't use Readers with fixed charset to load XML files, unless programatically created. Use HyphenationCompoundWordTokenFilter.getHyphenationTree(InputSource) instead, where you can supply default charset and input stream, if you like.
getHyphenationTree(InputSource) - Static method in class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
Create a hyphenator tree
getID() - Method in class org.apache.lucene.benchmark.byTask.feeds.DocData

getIdf() - Method in class org.apache.lucene.search.Explanation.IDFExplanation

getIdfWeightedTerms(Query, IndexReader, String) - Static method in class org.apache.lucene.search.highlight.QueryTermExtractor
Extracts all terms texts of a given Query into an array of WeightedTerms
GetImage() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Get token literal value.
GetImage() - Method in interface org.apache.lucene.queryParser.CharStream
Returns a string made up of characters from the marked token beginning to the current buffer position.
GetImage() - Method in class org.apache.lucene.queryParser.FastCharStream

GetImage() - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

GetImage() - Method in interface org.apache.lucene.queryParser.surround.parser.CharStream
Returns a string made up of characters from the marked token beginning to the current buffer position.
GetImage() - Method in class org.apache.lucene.queryParser.surround.parser.FastCharStream

getImplementationDistance(Class<? extends C>) - Method in class org.apache.lucene.util.VirtualMethod
Returns the distance from the baseClass in which this method is overridden/implemented in the inheritance path between baseClass and the given subclass subclazz.
getInclude() - Method in class org.apache.lucene.search.spans.SpanNotQuery
Return the SpanQuery whose matches are filtered.
getIndex() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column
Deprecated.
getIndex() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column.Row
Deprecated.
getIndex() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenPositioner
Deprecated.
getIndex() - Method in class org.apache.lucene.analysis.util.CharArrayIterator

getIndex() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
getIndexCommit() - Method in class org.apache.lucene.index.FilterIndexReader

getIndexCommit() - Method in class org.apache.lucene.index.IndexReader
Expert: return the IndexCommit that this reader has opened.
getIndexCommit() - Method in class org.apache.lucene.index.IndexWriterConfig
Returns the IndexCommit as specified in IndexWriterConfig.setIndexCommit(IndexCommit) or the default, null which specifies to open the latest index commit point.
getIndexDeletionPolicy(Config) - Static method in class org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask

getIndexDeletionPolicy() - Method in class org.apache.lucene.index.IndexWriterConfig
Returns the IndexDeletionPolicy specified in IndexWriterConfig.setIndexDeletionPolicy(IndexDeletionPolicy) or the default KeepOnlyLastCommitDeletionPolicy/
getIndexedFields(IndexReader) - Static method in class org.apache.lucene.util.ReaderUtil

getIndexOptions() - Method in class org.apache.lucene.document.AbstractField

getIndexOptions() - Method in interface org.apache.lucene.document.Fieldable

getIndexReader() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

getIndexReader() - Method in class org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory

getIndexReader() - Method in class org.apache.lucene.search.IndexSearcher
Return the IndexReader this searches.
getIndexSearcher() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

getIndexWriter() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

getIndexWriter() - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

getInflectedFormTranslation(String) - Static method in class org.apache.lucene.analysis.ja.util.ToStringUtil
Get the english form of inflected form
getInflectionForm(int) - Method in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

getInflectionForm(int) - Method in interface org.apache.lucene.analysis.ja.dict.Dictionary
Get inflection form of tokens
getInflectionForm(int) - Method in class org.apache.lucene.analysis.ja.dict.UnknownDictionary

getInflectionForm(int) - Method in class org.apache.lucene.analysis.ja.dict.UserDictionary

getInflectionForm() - Method in class org.apache.lucene.analysis.ja.Token

getInflectionForm() - Method in interface org.apache.lucene.analysis.ja.tokenattributes.InflectionAttribute

getInflectionForm() - Method in class org.apache.lucene.analysis.ja.tokenattributes.InflectionAttributeImpl

getInflectionType(int) - Method in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

getInflectionType(int) - Method in interface org.apache.lucene.analysis.ja.dict.Dictionary
Get inflection type of tokens
getInflectionType(int) - Method in class org.apache.lucene.analysis.ja.dict.UnknownDictionary

getInflectionType(int) - Method in class org.apache.lucene.analysis.ja.dict.UserDictionary

getInflectionType() - Method in class org.apache.lucene.analysis.ja.Token

getInflectionType() - Method in interface org.apache.lucene.analysis.ja.tokenattributes.InflectionAttribute

getInflectionType() - Method in class org.apache.lucene.analysis.ja.tokenattributes.InflectionAttributeImpl

getInflectionTypeTranslation(String) - Static method in class org.apache.lucene.analysis.ja.util.ToStringUtil
Get the english form of inflection type
getInfoStream() - Method in class org.apache.lucene.index.IndexWriter
Returns the current infoStream in use by this writer.
getInfoStream() - Static method in class org.apache.lucene.index.SegmentInfos

getInfoStream() - Method in interface org.apache.lucene.search.FieldCache
counterpart of FieldCache.setInfoStream(PrintStream)
getInfoStream() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
getInputCloneCount() - Method in class org.apache.lucene.store.MockDirectoryWrapper

getInputType() - Method in class org.apache.lucene.util.fst.FST

getInstance() - Static method in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

getInstance() - Static method in class org.apache.lucene.analysis.ja.dict.ConnectionCosts

getInstance() - Static method in class org.apache.lucene.analysis.ja.dict.TokenInfoDictionary

getInstance() - Static method in class org.apache.lucene.analysis.ja.dict.UnknownDictionary

getInstance() - Static method in class org.apache.lucene.search.FilterManager
Deprecated.
getInstance(Version) - Static method in class org.apache.lucene.util.CharacterUtils
Returns a CharacterUtils implementation according to the given Version instance.
getIntArray() - Method in class org.apache.lucene.facet.search.FacetArrays
Obtain an int array, e.g.
getInterletterValues(String) - Static method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser

getInts(IndexReader, String) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
getInts(IndexReader, String, FieldCache.IntParser) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
getInts(IndexReader, String, FieldCache.IntParser, boolean) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
getItemsCount() - Method in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
Returns the number of generated items since last reset.
getKeepMode() - Method in class org.apache.lucene.search.DuplicateFilter

getKey() - Method in interface org.apache.lucene.messages.Message
Deprecated.
getKey() - Method in class org.apache.lucene.messages.MessageImpl
Deprecated.
getKey(JaspellTernarySearchTrie.TSTNode) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Returns the key that indexes the node argument.
getLabel() - Method in enum org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter.Side

getLabel() - Method in enum org.apache.lucene.analysis.ngram.EdgeNGramTokenizer.Side

getLabel() - Method in interface org.apache.lucene.facet.search.results.FacetResultNode
Category path of the category of this result, or null if not computed, because the application did not request to compute it.
getLabel(TaxonomyReader) - Method in interface org.apache.lucene.facet.search.results.FacetResultNode
Category path of the category of this result.
getLabel() - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode

getLabel(TaxonomyReader) - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode

getLastCommitGeneration(String[]) - Static method in class org.apache.lucene.index.SegmentInfos
Get the generation of the most recent commit to the list of index files (N in the segments_N file).
getLastCommitGeneration(Directory) - Static method in class org.apache.lucene.index.SegmentInfos
Get the generation of the most recent commit to the index in this directory (N in the segments_N file).
getLastCommitSegmentsFileName(String[]) - Static method in class org.apache.lucene.index.SegmentInfos
Get the filename of the segments_N file for the most recent commit in the list of index files.
getLastCommitSegmentsFileName(Directory) - Static method in class org.apache.lucene.index.SegmentInfos
Get the filename of the segments_N file for the most recent commit to the index in this Directory.
getLastCumulativeDiff() - Method in class org.apache.lucene.analysis.BaseCharFilter

getLastDocCollected() - Method in exception org.apache.lucene.search.TimeLimitingCollector.TimeExceededException
Returns last doc (absolute doc id) that was collected when the search time exceeded.
getLastGeneration() - Method in class org.apache.lucene.index.SegmentInfos

getLastModified() - Method in class org.apache.lucene.store.RAMFile

getLastOnPath(CharSequence) - Method in class org.egothor.stemmer.MultiTrie
Return the element that is stored as last on a path belonging to the given key.
getLastOnPath(CharSequence) - Method in class org.egothor.stemmer.MultiTrie2
Return the element that is stored as last on a path belonging to the given key.
getLastOnPath(CharSequence) - Method in class org.egothor.stemmer.Trie
Return the element that is stored as last on a path associated with the given key.
getLastOutput(int) - Method in class org.apache.lucene.util.fst.Builder.UnCompiledNode

getLat() - Method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
getLat() - Method in class org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.
getLat() - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated.
getLat() - Method in class org.apache.lucene.spatial.tier.DistanceQueryBuilder
Deprecated.
getLeftId(int) - Method in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

getLeftId(int) - Method in interface org.apache.lucene.analysis.ja.dict.Dictionary
Get left id of specified word
getLeftId(int) - Method in class org.apache.lucene.analysis.ja.dict.UserDictionary

getLength() - Method in class org.apache.lucene.analysis.ja.Token

getLength() - Method in class org.apache.lucene.analysis.util.CharArrayIterator

getLength() - Method in class org.apache.lucene.index.FieldInvertState
Get total number of terms in this field.
getLength() - Method in class org.apache.lucene.store.RAMFile

getLength() - Method in class org.apache.lucene.util.CharacterUtils.CharacterBuffer
Return the length of the data in the internal buffer starting at CharacterUtils.CharacterBuffer.getOffset()
getLikeText() - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

getLimit() - Method in class org.apache.lucene.index.IndexWriter.MaxFieldLength
Deprecated.
getLine() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Deprecated.
getLine() - Method in interface org.apache.lucene.queryParser.CharStream
Deprecated.
getLine() - Method in class org.apache.lucene.queryParser.FastCharStream

getLine() - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Deprecated.
getLine() - Method in interface org.apache.lucene.queryParser.surround.parser.CharStream
Deprecated.
getLine() - Method in class org.apache.lucene.queryParser.surround.parser.FastCharStream

getLLMDistance(double, double, double, double) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
getLng() - Method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
getLng() - Method in class org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.
getLng() - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated.
getLng() - Method in class org.apache.lucene.spatial.tier.DistanceQueryBuilder
Deprecated.
getLocale() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

getLocale() - Method in class org.apache.lucene.queryParser.QueryParser
Returns current locale, allowing access by subclasses.
getLocale() - Method in interface org.apache.lucene.queryParser.standard.config.LocaleAttribute
Deprecated.
getLocale() - Method in class org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl
Deprecated.
getLocale() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getLocale() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Returns current locale, allowing access by subclasses.
getLocale() - Method in class org.apache.lucene.search.SortField
Returns the Locale by which term values are interpreted.
getLocalizedMessage() - Method in interface org.apache.lucene.messages.Message
Deprecated.
getLocalizedMessage(Locale) - Method in interface org.apache.lucene.messages.Message
Deprecated.
getLocalizedMessage() - Method in class org.apache.lucene.messages.MessageImpl
Deprecated.
getLocalizedMessage(Locale) - Method in class org.apache.lucene.messages.MessageImpl
Deprecated.
getLocalizedMessage(String) - Static method in class org.apache.lucene.messages.NLS
Deprecated.
getLocalizedMessage(String, Locale) - Static method in class org.apache.lucene.messages.NLS
Deprecated.
getLocalizedMessage(String, Locale, Object...) - Static method in class org.apache.lucene.messages.NLS
Deprecated.
getLocalizedMessage(String, Object...) - Static method in class org.apache.lucene.messages.NLS
Deprecated.
getLocalizedMessage() - Method in exception org.apache.lucene.queryParser.core.QueryNodeException

getLocalizedMessage(Locale) - Method in exception org.apache.lucene.queryParser.core.QueryNodeException

getLockDir() - Method in class org.apache.lucene.store.FSLockFactory
Retrieve the lock directory.
getLockFactory() - Method in class org.apache.lucene.store.Directory
Get the LockFactory that this Directory instance is using for its locking implementation.
getLockFactory() - Method in class org.apache.lucene.store.MockDirectoryWrapper

getLockFactory() - Method in class org.apache.lucene.store.NRTCachingDirectory

getLockID() - Method in class org.apache.lucene.store.Directory
Return a string identifier that uniquely differentiates this Directory instance from other Directory instances.
getLockID() - Method in class org.apache.lucene.store.FSDirectory

getLockID() - Method in class org.apache.lucene.store.MockDirectoryWrapper

getLockID() - Method in class org.apache.lucene.store.NRTCachingDirectory

getLockPrefix() - Method in class org.apache.lucene.store.LockFactory
Get the prefix in use for all locks created in this LockFactory.
getLockPrefix() - Method in class org.apache.lucene.store.MockLockFactoryWrapper

getLogMessage(int) - Method in class org.apache.lucene.benchmark.byTask.tasks.AddDocTask

getLogMessage(int) - Method in class org.apache.lucene.benchmark.byTask.tasks.AddFacetedDocTask

getLogMessage(int) - Method in class org.apache.lucene.benchmark.byTask.tasks.ConsumeContentSourceTask

getLogMessage(int) - Method in class org.apache.lucene.benchmark.byTask.tasks.DeleteDocTask

getLogMessage(int) - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

getLogMessage(int) - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTokensTask

getLogMessage(int) - Method in class org.apache.lucene.benchmark.byTask.tasks.UpdateDocTask

getLogMessage(int) - Method in class org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask

getLongs(IndexReader, String) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.
getLongs(IndexReader, String, FieldCache.LongParser) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.
getLongs(IndexReader, String, FieldCache.LongParser, boolean) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.
getLowerBound() - Method in class org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode

getLowerBound() - Method in interface org.apache.lucene.queryParser.core.nodes.RangeQueryNode

getLowerBound() - Method in class org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode
Returns the lower bound node.
getLowerBound() - Method in class org.apache.lucene.queryParser.standard.nodes.RangeQueryNode
Deprecated.
getLowercaseExpandedTerms() - Method in class org.apache.lucene.queryParser.QueryParser

getLowercaseExpandedTerms() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getLowercaseExpandedTerms() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser

getLowerLeft() - Method in class org.apache.lucene.spatial.geometry.shape.LLRect
Deprecated.
getLowerTerm() - Method in class org.apache.lucene.search.TermRangeFilter
Returns the lower value of this range filter
getLowerTerm() - Method in class org.apache.lucene.search.TermRangeQuery
Returns the lower value of this range query
getLowerVal() - Method in class org.apache.lucene.search.FieldCacheRangeFilter
Returns the lower value of this range filter
getLucenePrefixTerm(String) - Method in class org.apache.lucene.queryParser.surround.query.SrndPrefixQuery

getLuceneTerm(String) - Method in class org.apache.lucene.queryParser.surround.query.SrndTermQuery

getMap() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.DiskOrdinalMap

getMap() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.MemoryOrdinalMap

getMap() - Method in interface org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.OrdinalMap
Return the map from the taxonomy's original (consecutive) ordinals to the new taxonomy's ordinals.
getMap() - Method in class org.apache.lucene.util.MapOfSets

getMappedStateCount() - Method in class org.apache.lucene.util.fst.Builder

getMaskedQuery() - Method in class org.apache.lucene.search.spans.FieldMaskingSpanQuery

getMatch() - Method in class org.apache.lucene.search.ComplexExplanation
The match status of this explanation node.
getMatch() - Method in class org.apache.lucene.search.spans.SpanPositionCheckQuery

getMatrix() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated.
getMatrix() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column
Deprecated.
getMax() - Method in class org.apache.lucene.search.NumericRangeFilter
Returns the upper value of this range filter
getMax() - Method in class org.apache.lucene.search.NumericRangeQuery
Returns the upper value of this range query
getMaxBasicQueries() - Method in class org.apache.lucene.queryParser.surround.query.BasicQueryFactory

getMaxBufferedDeleteTerms() - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.getMaxBufferedDeleteTerms() instead
getMaxBufferedDeleteTerms() - Method in class org.apache.lucene.index.IndexWriterConfig
Returns the number of buffered deleted terms that will trigger a flush if enabled.
getMaxBufferedDocs() - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.getMaxBufferedDocs() instead.
getMaxBufferedDocs() - Method in class org.apache.lucene.index.IndexWriterConfig
Returns the number of buffered added documents that will trigger a flush if enabled.
getMaxChunkSize() - Method in class org.apache.lucene.store.MMapDirectory
Returns the current mmap chunk size.
getMaxClauseCount() - Static method in class org.apache.lucene.search.BooleanQuery
Return the maximum number of clauses permitted, 1024 by default.
getMaxDocCharsToAnalyze() - Method in class org.apache.lucene.search.highlight.Highlighter

getMaxDocFreq() - Method in class org.apache.lucene.search.similar.MoreLikeThis
Returns the maximum frequency in which words may still appear.
getMaxFieldLength() - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use LimitTokenCountAnalyzer to limit number of tokens.
getMaxFieldLength() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
getMaxGoodPoints() - Method in class org.apache.lucene.benchmark.quality.QualityStats
Returns the maximal number of good points.
getMaximumShingleSize() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated.
getMaxMergeAtOnce() - Method in class org.apache.lucene.index.TieredMergePolicy

getMaxMergeAtOnceExplicit() - Method in class org.apache.lucene.index.TieredMergePolicy

getMaxMergeCount() - Method in class org.apache.lucene.index.ConcurrentMergeScheduler
See ConcurrentMergeScheduler.setMaxMergeCount(int).
getMaxMergeDocs() - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams

getMaxMergeDocs() - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use LogMergePolicy.getMaxMergeDocs() directly.
getMaxMergeDocs() - Method in class org.apache.lucene.index.LogMergePolicy
Returns the largest segment (measured by document count) that may be merged with other segments.
getMaxMergedSegmentMB() - Method in class org.apache.lucene.index.TieredMergePolicy

getMaxMergeMB() - Method in class org.apache.lucene.index.LogByteSizeMergePolicy
Returns the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments.
getMaxMergeMBForForcedMerge() - Method in class org.apache.lucene.index.LogByteSizeMergePolicy
Returns the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments during forceMerge.
getMaxMergeMBForOptimize() - Method in class org.apache.lucene.index.LogByteSizeMergePolicy
Deprecated. Renamed to LogByteSizeMergePolicy.getMaxMergeMBForForcedMerge()
getMaxNumTokensParsed() - Method in class org.apache.lucene.search.similar.MoreLikeThis

getMaxOrdinal() - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal
return the maximal Ordinal assigned so far
getMaxPoint() - Method in class org.apache.lucene.spatial.geometry.shape.Rectangle
Deprecated.
getMaxQueries() - Method in class org.apache.lucene.benchmark.quality.QualityBenchmark

getMaxQueryTerms() - Method in class org.apache.lucene.search.similar.MoreLikeThis
Returns the maximum number of query terms that will be included in any generated query.
getMaxQueryTerms() - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

getMaxResults() - Method in class org.apache.lucene.benchmark.quality.QualityBenchmark

getMaxSampleSize() - Method in class org.apache.lucene.facet.search.sampling.SamplingParams
Return the maxSampleSize.
getMaxScore() - Method in class org.apache.lucene.search.TopDocs
Returns the maximum score value encountered.
getMaxShingleSize() - Method in class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper
The max shingle (token ngram) size
getMaxSize() - Method in class org.apache.lucene.search.MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite

getMaxSize() - Method in class org.apache.lucene.search.MultiTermQuery.TopTermsScoringBooleanQueryRewrite

getMaxSize() - Method in class org.apache.lucene.search.TopTermsRewrite
return the maximum size of the priority queue (for boolean rewrites this is BooleanQuery#getMaxClauseCount).
getMaxSize() - Method in class org.apache.lucene.util.collections.LRUHashMap
Return the max size
getMaxSizeInBytes() - Method in class org.apache.lucene.store.MockDirectoryWrapper

getMaxSmallSegments() - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy

getMaxSmallSegments() - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams

getMaxTermFrequency() - Method in class org.apache.lucene.index.FieldInvertState
Get the maximum term-frequency encountered for any term in the field.
getMaxTermWeight() - Method in class org.apache.lucene.search.highlight.QueryScorer

getMaxTermWeight() - Method in class org.apache.lucene.search.highlight.QueryTermScorer

getMaxThreadCount() - Method in class org.apache.lucene.index.ConcurrentMergeScheduler

getMaxThreadStates() - Method in class org.apache.lucene.index.IndexWriterConfig
Returns the max number of simultaneous threads that may be indexing documents at once in IndexWriter.
getMaxTokenLength() - Method in class org.apache.lucene.analysis.standard.ClassicAnalyzer

getMaxTokenLength() - Method in class org.apache.lucene.analysis.standard.ClassicTokenizer

getMaxTokenLength() - Method in class org.apache.lucene.analysis.standard.StandardAnalyzer

getMaxTokenLength() - Method in class org.apache.lucene.analysis.standard.StandardTokenizer

getMaxTokenLength() - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailAnalyzer

getMaxTokenLength() - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

getMaxTotMem() - Method in class org.apache.lucene.benchmark.byTask.stats.TaskStats

getMaxUsedMem() - Method in class org.apache.lucene.benchmark.byTask.stats.TaskStats

getMaxUsedSizeInBytes() - Method in class org.apache.lucene.store.MockDirectoryWrapper
Returns the peek actual storage used (bytes) in this directory.
getMaxValue() - Method in class org.apache.lucene.search.function.DocValues
Returns the maximum of all values or Float.NaN if this DocValues instance does not contain any value.
getMaxValue() - Method in class org.apache.lucene.util.packed.PackedInts.ReaderImpl

getMaxWordLen() - Method in class org.apache.lucene.search.similar.MoreLikeThis
Returns the maximum word length above which words will be ignored.
getMemorySize() - Method in class org.apache.lucene.index.memory.MemoryIndex
Returns a reasonable approximation of the main memory [bytes] consumed by this instance.
getMemoryUsage() - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.Cl2oTaxonomyWriterCache
Returns the number of bytes in memory used by this object.
getMergedFieldInfos(IndexReader) - Static method in class org.apache.lucene.util.ReaderUtil
Call this to get the (merged) FieldInfos for a composite reader
getMergedSegmentWarmer() - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.getMergedSegmentWarmer() instead.
getMergedSegmentWarmer() - Method in class org.apache.lucene.index.IndexWriterConfig
Returns the current merged segment warmer.
getMergeFactor() - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams

getMergeFactor() - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use LogMergePolicy.getMergeFactor() directly.
getMergeFactor() - Method in class org.apache.lucene.index.LogMergePolicy
Returns the number of segments that are merged at once and also controls the total number of segments allowed to accumulate in the index.
getMergeFactor() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
getMergePolicy() - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.getMergePolicy() instead
getMergePolicy() - Method in class org.apache.lucene.index.IndexWriterConfig
Returns the current MergePolicy in use by this writer.
getMergeScheduler() - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.getMergeScheduler() instead
getMergeScheduler() - Method in class org.apache.lucene.index.IndexWriterConfig
Returns the MergeScheduler that was set by IndexWriterConfig.setMergeScheduler(MergeScheduler)
getMergeScheduler() - Method in class org.apache.lucene.store.NRTCachingDirectory

getMergeThread(IndexWriter, MergePolicy.OneMerge) - Method in class org.apache.lucene.index.ConcurrentMergeScheduler
Create and return a new MergeThread
getMergeThreadPriority() - Method in class org.apache.lucene.index.ConcurrentMergeScheduler
Return the priority that merge threads run at.
getMergingSegments() - Method in class org.apache.lucene.index.IndexWriter
Expert: to be used by a MergePolicy to avoid selecting merges for segments already being merged.
getMessage() - Method in exception org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException
This method has the standard behavior when this object has been created using the standard constructors.
getMessage() - Method in error org.apache.lucene.benchmark.byTask.feeds.demohtml.TokenMgrError
You can also modify the body of this method to customize your error messages.
getMessage() - Method in exception org.apache.lucene.queryParser.core.QueryNodeException

getMessage() - Method in error org.apache.lucene.queryParser.standard.parser.TokenMgrError
You can also modify the body of this method to customize your error messages.
getMessage() - Method in exception org.apache.lucene.queryParser.surround.parser.ParseException
This method has the standard behavior when this object has been created using the standard constructors.
getMessage() - Method in error org.apache.lucene.queryParser.surround.parser.TokenMgrError
You can also modify the body of this method to customize your error messages.
getMessage() - Method in error org.apache.lucene.queryParser.TokenMgrError
You can also modify the body of this method to customize your error messages.
getMessageObject() - Method in interface org.apache.lucene.messages.NLSException
Deprecated.
getMessageObject() - Method in error org.apache.lucene.queryParser.core.QueryNodeError

getMessageObject() - Method in exception org.apache.lucene.queryParser.core.QueryNodeException

getMetaTags() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser

getMidpoint() - Method in class org.apache.lucene.spatial.geometry.shape.LLRect
Deprecated.
getMiles() - Method in class org.apache.lucene.spatial.tier.DistanceQueryBuilder
Deprecated.
getMilesPerLatDeg() - Static method in class org.apache.lucene.spatial.geometry.shape.DistanceApproximation
Deprecated.
getMilesPerLngDeg(double) - Static method in class org.apache.lucene.spatial.geometry.shape.DistanceApproximation
Deprecated.
getMilliseconds() - Method in class org.apache.lucene.search.TimeLimitingCollector.TimerThread
Get the timer value in milliseconds.
getMin() - Method in class org.apache.lucene.search.NumericRangeFilter
Returns the lower value of this range filter
getMin() - Method in class org.apache.lucene.search.NumericRangeQuery
Returns the lower value of this range query
getMinDocFreq() - Method in class org.apache.lucene.search.similar.MoreLikeThis
Returns the frequency at which words will be ignored which do not occur in at least this many docs.
getMinDocFreq() - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

getMinimumMatchingElements() - Method in class org.apache.lucene.queryParser.core.nodes.AnyQueryNode

getMinimumNumberShouldMatch() - Method in class org.apache.lucene.search.BooleanQuery
Gets the minimum number of the optional BooleanClauses which must be satisfied.
getMinimumShingleSize() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated.
getMinMergeDocs() - Method in class org.apache.lucene.index.LogDocMergePolicy
Get the minimum size for a segment to remain un-merged.
getMinMergeMB() - Method in class org.apache.lucene.index.LogByteSizeMergePolicy
Get the minimum size for a segment to remain un-merged.
getMinPoint() - Method in class org.apache.lucene.spatial.geometry.shape.Rectangle
Deprecated.
getMinSampleSize() - Method in class org.apache.lucene.facet.search.sampling.SamplingParams
Return the minSampleSize.
getMinShingleSize() - Method in class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper
The min shingle (token ngram) size
getMinSimilarity() - Method in class org.apache.lucene.queryParser.standard.config.FuzzyConfig

getMinSimilarity() - Method in class org.apache.lucene.search.FuzzyQuery
Returns the minimum similarity that is required for this query to match.
getMinTermFreq() - Method in class org.apache.lucene.search.similar.MoreLikeThis
Returns the frequency below which terms will be ignored in the source doc.
getMinTermFrequency() - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

getMinValue() - Method in class org.apache.lucene.search.function.DocValues
Returns the minimum of all values or Float.NaN if this DocValues instance does not contain any value.
getMinWordLen() - Method in class org.apache.lucene.search.similar.MoreLikeThis
Returns the minimum word length below which words will be ignored.
getModifier() - Method in class org.apache.lucene.queryParser.core.nodes.ModifierQueryNode

getMoreLikeFields() - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

getMRR() - Method in class org.apache.lucene.benchmark.quality.QualityStats
Returns the Mean reciprocal rank over the queries or RR for a single query.
getMsg() - Method in class org.apache.lucene.util.FieldCacheSanityChecker.Insanity
Description of hte insane behavior
getMultiFields(CharSequence[]) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Returns the fields used to expand the query when the field for a certain query is null
getMultiTermRewriteMethod() - Method in class org.apache.lucene.queryParser.QueryParser

getMultiTermRewriteMethod() - Method in interface org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute
Deprecated.
getMultiTermRewriteMethod() - Method in class org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl
Deprecated.
getMultiTermRewriteMethod() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getMultiTermRewriteMethod() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser

getMultiValuedSeparator() - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

getMutable() - Method in class org.apache.lucene.util.packed.GrowableWriter

getMutable(int, int) - Static method in class org.apache.lucene.util.packed.PackedInts
Create a packed integer array with the given amount of values initialized to 0.
getName() - Method in interface org.apache.lucene.analysis.icu.tokenattributes.ScriptAttribute
Get the full name.
getName() - Method in class org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl

getName() - Method in class org.apache.lucene.benchmark.byTask.feeds.DocData

getName() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

getName() - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

getName() - Method in class org.apache.lucene.index.CompoundFileWriter
Returns the name of the compound file.
getName() - Method in class org.apache.lucene.util.LuceneTestCase

getNames() - Method in class org.apache.lucene.benchmark.quality.QualityQuery
Return all the names of name-value-pairs in this QualityQuery.
getNextDocData(DocData) - Method in class org.apache.lucene.benchmark.byTask.feeds.ContentSource
Returns the next DocData from the content source.
getNextDocData(DocData) - Method in class org.apache.lucene.benchmark.byTask.feeds.DirContentSource

getNextDocData(DocData) - Method in class org.apache.lucene.benchmark.byTask.feeds.EnwikiContentSource

getNextDocData(DocData) - Method in class org.apache.lucene.benchmark.byTask.feeds.LineDocSource

getNextDocData(DocData) - Method in class org.apache.lucene.benchmark.byTask.feeds.LongToEnglishContentSource

getNextDocData(DocData) - Method in class org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource

getNextDocData(DocData) - Method in class org.apache.lucene.benchmark.byTask.feeds.SingleDocSource

getNextDocData(DocData) - Method in class org.apache.lucene.benchmark.byTask.feeds.SortableSingleDocSource

getNextDocData(DocData) - Method in class org.apache.lucene.benchmark.byTask.feeds.TrecContentSource

getNextFacets(CategoryContainer) - Method in class org.apache.lucene.benchmark.byTask.feeds.FacetSource
Returns the next facets content item.
getNextFacets(CategoryContainer) - Method in class org.apache.lucene.benchmark.byTask.feeds.RandomFacetSource

getNextFixedSize(int) - Static method in class org.apache.lucene.util.packed.PackedInts
Rounds bitsPerValue up to 8, 16, 32 or 64.
getNextMerge() - Method in class org.apache.lucene.index.IndexWriter
Expert: the MergeScheduler calls this method to retrieve the next merge requested by the MergePolicy
getNextOrdinal() - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal
Returns the next unassigned ordinal.
getNextSegmentFileName() - Method in class org.apache.lucene.index.SegmentInfos
Get the next segments_N filename that will be written.
getNextToken() - Method in class org.apache.lucene.analysis.standard.StandardTokenizerImpl
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
getNextToken() - Method in interface org.apache.lucene.analysis.standard.StandardTokenizerInterface
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
getNextToken() - Method in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
getNextToken() - Method in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
getNextToken() - Method in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
getNextToken() - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
getNextToken() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Get the next Token.
getNextToken() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager
Get the next Token.
getNextToken() - Method in class org.apache.lucene.queryParser.QueryParser
Get the next Token.
getNextToken() - Method in class org.apache.lucene.queryParser.QueryParserTokenManager
Get the next Token.
getNextToken() - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Get the next Token.
getNextToken() - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager
Get the next Token.
getNextToken() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser
Get the next Token.
getNextToken() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager
Get the next Token.
getNoCFSRatio() - Method in class org.apache.lucene.index.LogMergePolicy

getNoCFSRatio() - Method in class org.apache.lucene.index.TieredMergePolicy

getNode(CharSequence) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Returns the node indexed by key, or null if that node doesn't exist.
getNode(CharSequence, JaspellTernarySearchTrie.TSTNode) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Returns the node indexed by key, or null if that node doesn't exist.
getNodeCount() - Method in class org.apache.lucene.util.fst.FST

getNoDeleteOpenFile() - Method in class org.apache.lucene.store.MockDirectoryWrapper

getNoLockFactory() - Static method in class org.apache.lucene.store.NoLockFactory

getNonBlankTextOrFail(Element) - Static method in class org.apache.lucene.xmlparser.DOMUtils

getNoOutput() - Method in class org.apache.lucene.util.fst.ByteSequenceOutputs

getNoOutput() - Method in class org.apache.lucene.util.fst.IntSequenceOutputs

getNoOutput() - Method in class org.apache.lucene.util.fst.NoOutputs

getNoOutput() - Method in class org.apache.lucene.util.fst.Outputs
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output
getNoOutput() - Method in class org.apache.lucene.util.fst.PairOutputs

getNoOutput() - Method in class org.apache.lucene.util.fst.PositiveIntOutputs

getNoOutput() - Method in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs

getNormDecoder() - Static method in class org.apache.lucene.search.Similarity
Deprecated. Use instance methods for encoding/decoding norm values to enable customization.
getNormFileName(int) - Method in class org.apache.lucene.index.SegmentInfo
Get the file name for the norms file for this field.
getNormsByFieldNameAndDocumentNumber() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndex
Deprecated.
getNotQuery(List<SrndQuery>, Token) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

getNrQueriesMade() - Method in class org.apache.lucene.queryParser.surround.query.BasicQueryFactory

getNrSubQueries() - Method in class org.apache.lucene.queryParser.surround.query.ComposedQuery

getNumberFormat() - Method in class org.apache.lucene.queryParser.standard.config.NumericConfig
Returns the NumberFormat used to parse a String to Number
getNumberFormat() - Method in class org.apache.lucene.queryParser.standard.nodes.NumericQueryNode
Returns the NumberFormat used to convert the value to String.
getNumericConfig() - Method in class org.apache.lucene.queryParser.standard.nodes.NumericRangeQueryNode
Returns the NumericConfig associated with the lower and upper bounds.
getNumericConfigMap() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser

getNumericValue() - Method in class org.apache.lucene.document.NumericField
Returns the current numeric value as a subclass of Number, null if not yet initialized.
getNumGoodPoints() - Method in class org.apache.lucene.benchmark.quality.QualityStats
Returns the number of good points (only relevant points).
getNumLabel() - Method in class org.apache.lucene.facet.search.params.FacetRequest
If getNumLabel()getNumLargeSegments() - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy

getNumLargeSegments() - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams

getNumOverlap() - Method in class org.apache.lucene.index.FieldInvertState
Get the number of terms with positionIncrement == 0.
getNumParallelTasks() - Method in class org.apache.lucene.benchmark.byTask.stats.TaskStats

getNumPoints() - Method in class org.apache.lucene.benchmark.quality.QualityStats
Returns the number of points (both relevant and irrelevant points).
getNumResults() - Method in class org.apache.lucene.facet.search.params.FacetRequest
The number of sub-categories to return (at most).
getNumRuns() - Method in class org.apache.lucene.benchmark.byTask.stats.TaskStats

getNumSubResults() - Method in interface org.apache.lucene.facet.search.results.FacetResultNode
Number of sub results
getNumSubResults() - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode

getNumTokens() - Method in class org.apache.lucene.search.highlight.TokenGroup

getNumValidDescendants() - Method in class org.apache.lucene.facet.search.results.FacetResult
Number of descendants of root facet result node, up till the requested depth, which are valid by the results handler in effect.
getNumWords() - Method in class org.apache.lucene.util.OpenBitSet
Expert: gets the number of longs in the array that are in use
getOccur() - Method in class org.apache.lucene.search.BooleanClause

getOccur() - Method in class org.apache.lucene.search.FilterClause
Returns this FilterClause's occur parameter
getOffset() - Method in class org.apache.lucene.analysis.ja.Token

getOffset() - Method in class org.apache.lucene.index.FieldInvertState
Get end offset of the last processed term.
getOffset() - Method in class org.apache.lucene.index.Payload
Returns the offset in the underlying byte array
getOffset() - Method in class org.apache.lucene.util.CharacterUtils.CharacterBuffer
Returns the data offset in the internal buffer.
getOffsetGap(Fieldable) - Method in class org.apache.lucene.analysis.Analyzer
Just like Analyzer.getPositionIncrementGap(java.lang.String), except for Token offsets instead.
getOffsetGap(Fieldable) - Method in class org.apache.lucene.analysis.LimitTokenCountAnalyzer

getOffsetGap(Fieldable) - Method in class org.apache.lucene.analysis.PerFieldAnalyzerWrapper
Return the offsetGap from the analyzer assigned to field
getOffsets() - Method in class org.apache.lucene.index.PositionBasedTermVectorMapper.TVPositionInfo
Parallel list (to PositionBasedTermVectorMapper.TVPositionInfo.getTerms()) of TermVectorOffsetInfo objects.
getOffsets(int) - Method in interface org.apache.lucene.index.TermPositionVector
Returns an array of TermVectorOffsetInfo in which the term is found.
getOffsets() - Method in class org.apache.lucene.index.TermVectorEntry

getOffsets(int) - Method in class org.apache.lucene.store.instantiated.InstantiatedTermPositionVector

getOlderSiblingArray() - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyReader.ChildrenArrays
getOlderSiblingArray() returns an int array of size getSize() listing for each category the ordinal of its immediate older sibling (the sibling in the taxonomy tree with the highest ordinal below that of the given ordinal).
getOmitNorms() - Method in class org.apache.lucene.document.AbstractField
True if norms are omitted for this indexed field
getOmitNorms() - Method in interface org.apache.lucene.document.Fieldable
True if norms are omitted for this indexed field
getOmitTermFreqAndPositions() - Method in class org.apache.lucene.document.AbstractField
Deprecated. use AbstractField.getIndexOptions() instead.
getOpDistance(String) - Static method in class org.apache.lucene.queryParser.surround.parser.QueryParser

getOpDistance() - Method in class org.apache.lucene.queryParser.surround.query.DistanceQuery

getOpenDeletedFiles() - Method in class org.apache.lucene.store.MockDirectoryWrapper

getOpenMode() - Method in class org.apache.lucene.index.IndexWriterConfig
Returns the IndexWriterConfig.OpenMode set by IndexWriterConfig.setOpenMode(OpenMode).
getOperand() - Method in class org.apache.lucene.queryParser.core.nodes.ParametricQueryNode
Deprecated.
getOperator() - Method in class org.apache.lucene.queryParser.core.nodes.ParametricQueryNode
Deprecated.
getOperator() - Method in interface org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute
Deprecated.
getOperator() - Method in class org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl
Deprecated.
getOperatorName() - Method in class org.apache.lucene.queryParser.surround.query.ComposedQuery

getOrCreateNode(CharSequence) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Returns the node indexed by key, creating that node if it doesn't exist, and creating any required intermediate nodes if they don't exist.
getOrderedTerms() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndex
Deprecated.
getOrdinal() - Method in class org.apache.lucene.facet.index.attributes.OrdinalProperty

getOrdinal() - Method in interface org.apache.lucene.facet.search.results.FacetResultNode
Ordinal of the category of this result.
getOrdinal() - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode

getOrdinal(CategoryPath) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader

getOrdinal(CategoryPath) - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyReader
getOrdinal() returns the ordinal of the category given as a path.
getOrdinal(CategoryPath) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.CompactLabelToOrdinal

getOrdinal(CategoryPath, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.CompactLabelToOrdinal

getOrdinal(CategoryPath) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal

getOrdinal(CategoryPath, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal

getOrdinalPolicy() - Method in class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams

getOrdinalPolicy() - Method in interface org.apache.lucene.facet.index.params.FacetIndexingParams
Get the policy for indexing category ordinals, used for deciding how "high" to climb in taxonomy from a category when ingesting its ordinals
getOrQuery(List<SrndQuery>, boolean, Token) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

getOutOf() - Method in class org.apache.lucene.benchmark.byTask.stats.Report
Returns total number of stats points when this report was created.
getOversampleFactor() - Method in class org.apache.lucene.facet.search.sampling.SamplingParams
Return the oversampleFactor.
getParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

getParent() - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

getParent(int) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader

getParent(int) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter

getParent(int) - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyReader
getParent() returns the ordinal of the parent category of the category with the given ordinal.
getParent(int) - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyWriter
getParent() returns the ordinal of the parent category of the category with the given ordinal.
getParent() - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode

getParent() - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

getParentArray() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader
getParentArray() returns an int array of size getSize() listing the ordinal of the parent category of each category in the taxonomy.
getParentArray() - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyReader
getParentArray() returns an int array of size getSize() listing the ordinal of the parent category of each category in the taxonomy.
getParentsStream(CategoryAttributesStream) - Method in class org.apache.lucene.facet.enhancements.EnhancementsDocumentBuilder

getParentsStream(CategoryAttributesStream) - Method in class org.apache.lucene.facet.index.CategoryDocumentBuilder
Get a stream of categories which includes the parents, according to policies defined in indexing parameters.
getParser(Analyzer) - Method in class org.apache.lucene.queryParser.QueryParserTestBase

getParser() - Method in class org.apache.lucene.search.FieldCacheRangeFilter
Returns the current numeric parser (null for T is String}
getParser() - Method in class org.apache.lucene.search.SortField
Returns the instance of a FieldCache parser that fits to the given sort type.
getPartialExpunge() - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy

getPartialExpunge() - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams

getPartitionSize() - Method in class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams

getPartitionSize() - Method in interface org.apache.lucene.facet.index.params.FacetIndexingParams
Get the partition size.
getPartOfSpeech(int) - Method in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

getPartOfSpeech(int) - Method in interface org.apache.lucene.analysis.ja.dict.Dictionary
Get Part-Of-Speech of tokens
getPartOfSpeech(int) - Method in class org.apache.lucene.analysis.ja.dict.UserDictionary

getPartOfSpeech() - Method in class org.apache.lucene.analysis.ja.Token

getPartOfSpeech() - Method in interface org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttribute

getPartOfSpeech() - Method in class org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttributeImpl

getPath(int) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader

getPath(int, CategoryPath) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader

getPath(int) - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyReader
getPath() returns the path name of the category with the given ordinal.
getPath(int, CategoryPath) - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyReader
getPath() returns the path name of the category with the given ordinal.
getPathElement(int) - Method in class org.apache.lucene.queryParser.core.nodes.PathQueryNode
Returns the a specific QueryText element
getPathElements() - Method in class org.apache.lucene.queryParser.core.nodes.PathQueryNode
Returns the a List with all QueryText elements
getPathElements(int) - Method in class org.apache.lucene.queryParser.core.nodes.PathQueryNode
Returns a List QueryText element from position startIndex
getPathPolicy() - Method in class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams

getPathPolicy() - Method in interface org.apache.lucene.facet.index.params.FacetIndexingParams
Get the policy for indexing category paths, used for deciding how "high" to climb in taxonomy from a category when ingesting its category paths.
getPattern(String) - Static method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser

getPause() - Method in class org.apache.lucene.index.MergePolicy.OneMerge

getPayload() - Method in class org.apache.lucene.analysis.Token
Returns this Token's payload.
getPayload() - Method in interface org.apache.lucene.analysis.tokenattributes.PayloadAttribute
Returns this Token's payload.
getPayload() - Method in class org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl
Returns this Token's payload.
getPayload(byte[], int) - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermPositions

getPayload(byte[], int) - Method in class org.apache.lucene.index.MultipleTermPositions
Not implemented.
getPayload(byte[], int) - Method in interface org.apache.lucene.index.TermPositions
Returns the payload data at the current term position.
getPayload() - Method in class org.apache.lucene.search.spans.NearSpansOrdered

getPayload() - Method in class org.apache.lucene.search.spans.NearSpansUnordered
WARNING: The List is not necessarily in order of the the positions
getPayload() - Method in class org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan

getPayload() - Method in class org.apache.lucene.search.spans.Spans
Returns the payload data for the current span.
getPayload() - Method in class org.apache.lucene.search.spans.TermSpans

getPayload(byte[], int) - Method in class org.apache.lucene.store.instantiated.InstantiatedTermPositions

getPayloadLength() - Method in class org.apache.lucene.facet.search.PayloadIterator
Get the length of the last read payload.
getPayloadLength() - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermPositions

getPayloadLength() - Method in class org.apache.lucene.index.MultipleTermPositions
Not implemented.
getPayloadLength() - Method in interface org.apache.lucene.index.TermPositions
Returns the length of the payload at the current term position.
getPayloadLength() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermPositions

getPayloadProcessorProvider() - Method in class org.apache.lucene.index.IndexWriter
Returns the PayloadProcessorProvider that is used during segment merges to process payloads.
getPayloads(Spans[]) - Method in class org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanScorer

getPayloads() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermDocumentInformation

getPayloadScore() - Method in class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer
The score for the payload
getPayloadsForQuery(Query) - Method in class org.apache.lucene.search.payloads.PayloadSpanUtil
Query should be rewritten for wild/fuzzy support.
getPayloadStream(CategoryPath, int) - Method in class org.apache.lucene.facet.index.streaming.CountingListTokenizer

getPercentTermsToMatch() - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

getPerfObject(String) - Method in class org.apache.lucene.benchmark.byTask.PerfRunData
Returns an object that was previously set by PerfRunData.setPerfObject(String, Object).
getPhraseLimit() - Method in class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter

getPhraseSlop() - Method in class org.apache.lucene.queryParser.QueryParser
Gets the default slop for phrases.
getPhraseSlop() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getPhraseSlop() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Gets the default slop for phrases.
getPointer() - Method in class org.apache.lucene.util.PagedBytes

getPoints() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

getPosition() - Method in class org.apache.lucene.analysis.ja.Token
Get index of this token in input text
getPosition() - Method in class org.apache.lucene.index.FieldInvertState
Get the last processed term position.
getPosition() - Method in class org.apache.lucene.index.PositionBasedTermVectorMapper.TVPositionInfo

getPosition() - Method in class org.apache.lucene.search.vectorhighlight.FieldTermStack.TermInfo

getPosition() - Method in class org.apache.lucene.store.ByteArrayDataInput

getPosition() - Method in class org.apache.lucene.store.ByteArrayDataOutput

getPosition() - Method in class org.apache.lucene.util.PagedBytes.PagedBytesDataInput
Returns the current byte position.
getPosition() - Method in class org.apache.lucene.util.PagedBytes.PagedBytesDataOutput
Return the current byte position.
getPositionIncrement() - Method in class org.apache.lucene.analysis.Token
Returns the position increment of this Token.
getPositionIncrement() - Method in interface org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute
Returns the position increment of this Token.
getPositionIncrement() - Method in class org.apache.lucene.analysis.tokenattributes.PositionIncrementAttributeImpl
Returns the position increment of this Token.
getPositionIncrement() - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

getPositionIncrementGap(String) - Method in class org.apache.lucene.analysis.Analyzer
Invoked before indexing a Fieldable instance if terms have already been added to that field.
getPositionIncrementGap(String) - Method in class org.apache.lucene.analysis.LimitTokenCountAnalyzer

getPositionIncrementGap(String) - Method in class org.apache.lucene.analysis.MockAnalyzer

getPositionIncrementGap(String) - Method in class org.apache.lucene.analysis.PerFieldAnalyzerWrapper
Return the positionIncrementGap from the analyzer assigned to fieldName
getPositionLength() - Method in class org.apache.lucene.analysis.ja.Token
Get the length (in tokens) of this token.
getPositionLength() - Method in class org.apache.lucene.analysis.Token
Get the position length.
getPositionLength() - Method in interface org.apache.lucene.analysis.tokenattributes.PositionLengthAttribute
Returns the position length of this Token.
getPositionLength() - Method in class org.apache.lucene.analysis.tokenattributes.PositionLengthAttributeImpl
Returns the position length of this Token.
getPositions() - Method in class org.apache.lucene.index.TermVectorEntry

getPositions() - Method in class org.apache.lucene.search.MultiPhraseQuery
Returns the relative positions of terms in this phrase.
getPositions() - Method in class org.apache.lucene.search.PhraseQuery
Returns the relative positions of terms in this phrase.
getPositions() - Method in class org.apache.lucene.search.SpanFilterResult
The first entry in the array corresponds to the first "on" bit.
getPositions() - Method in class org.apache.lucene.search.SpanFilterResult.PositionInfo

getPositions() - Method in class org.apache.lucene.search.spans.TermSpans

getPositionSpans() - Method in class org.apache.lucene.search.highlight.WeightedSpanTerm

getPOSTranslation(String) - Static method in class org.apache.lucene.analysis.ja.util.ToStringUtil
Get the english form of a POS tag
getPostTag(int) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

getPostTag(String[], int) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

getPrecision(double, DistanceHandler.Precision) - Static method in class org.apache.lucene.spatial.tier.DistanceHandler
Deprecated.
getPrecision() - Method in class org.apache.lucene.spatial.tier.DistanceHandler
Deprecated.
getPrecisionAt(int) - Method in class org.apache.lucene.benchmark.quality.QualityStats
Return the precision at rank n: |{relevant hits within first n hits}| / n.
getPrecisionStep() - Method in class org.apache.lucene.analysis.NumericTokenStream
Returns the precision step.
getPrecisionStep() - Method in class org.apache.lucene.document.NumericField
Returns the precision step.
getPrecisionStep() - Method in class org.apache.lucene.queryParser.standard.config.NumericConfig
Returns the precision used to index the numeric values
getPrecisionStep() - Method in class org.apache.lucene.search.NumericRangeFilter
Returns the precision step.
getPrecisionStep() - Method in class org.apache.lucene.search.NumericRangeQuery
Returns the precision step.
getPrefix() - Method in class org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter

getPrefix() - Method in class org.apache.lucene.queryParser.surround.query.SrndPrefixQuery

getPrefix() - Method in class org.apache.lucene.search.PrefixFilter

getPrefix() - Method in class org.apache.lucene.search.PrefixQuery
Returns the prefix of this query.
getPrefixes() - Method in class org.apache.lucene.analysis.hunspell.HunspellStemmer.Stem
Returns the list of prefixes used to generate the stem
getPrefixLength() - Method in class org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode

getPrefixLength() - Method in interface org.apache.lucene.queryParser.standard.config.FuzzyAttribute
Deprecated.
getPrefixLength() - Method in class org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl
Deprecated.
getPrefixLength() - Method in class org.apache.lucene.queryParser.standard.config.FuzzyConfig

getPrefixLength() - Method in class org.apache.lucene.search.FuzzyQuery
Returns the non-fuzzy prefix length.
getPrefixQuery(String, String) - Method in class org.apache.lucene.queryParser.analyzing.AnalyzingQueryParser
Called when parser parses an input term token that uses prefix notation; that is, contains a single '*' wildcard character as its last character.
getPrefixQuery(String, String) - Method in class org.apache.lucene.queryParser.MultiFieldQueryParser

getPrefixQuery(String, String) - Method in class org.apache.lucene.queryParser.QueryParser
Factory method for generating a query (similar to QueryParser.getWildcardQuery(java.lang.String, java.lang.String)).
getPrefixQuery(String, String) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getPrefixQuery(String, boolean) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

getPrefixSeparator() - Method in class org.apache.lucene.queryParser.surround.query.ComposedQuery

getPrefixTerm() - Method in class org.apache.lucene.search.PrefixTermEnum

getPreTag(int) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

getPreTag(String[], int) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

getPreviousTokenStream() - Method in class org.apache.lucene.analysis.Analyzer
Used by Analyzers that implement reusableTokenStream to retrieve previously saved TokenStreams for re-use by the same thread.
getPrimaryDir() - Method in class org.apache.lucene.store.FileSwitchDirectory
Return the primary directory
getProcessingMode() - Method in class org.apache.lucene.search.DuplicateFilter

getProcessor(Term) - Method in class org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor

getProcessor(Term) - Method in class org.apache.lucene.index.PayloadProcessorProvider.ReaderPayloadProcessor
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for the given term.
getPronunciation(int, char[], int, int) - Method in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

getPronunciation(int, char[], int, int) - Method in interface org.apache.lucene.analysis.ja.dict.Dictionary
Get pronunciation of tokens
getPronunciation(int, char[], int, int) - Method in class org.apache.lucene.analysis.ja.dict.UserDictionary

getPronunciation() - Method in class org.apache.lucene.analysis.ja.Token

getPronunciation() - Method in interface org.apache.lucene.analysis.ja.tokenattributes.ReadingAttribute

getPronunciation() - Method in class org.apache.lucene.analysis.ja.tokenattributes.ReadingAttributeImpl

getProperty(Class<? extends CategoryProperty>) - Method in interface org.apache.lucene.facet.index.attributes.CategoryAttribute
Get a property of a certain property class.
getProperty(Collection<Class<? extends CategoryProperty>>) - Method in interface org.apache.lucene.facet.index.attributes.CategoryAttribute
Get a property of one of given property classes.
getProperty(Class<? extends CategoryProperty>) - Method in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

getProperty(Collection<Class<? extends CategoryProperty>>) - Method in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

getPropertyClasses() - Method in interface org.apache.lucene.facet.index.attributes.CategoryAttribute
Get all the active property classes.
getPropertyClasses() - Method in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

getProps() - Method in class org.apache.lucene.benchmark.byTask.feeds.DocData

getProximityType() - Method in class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode

getQuery() - Method in exception org.apache.lucene.queryParser.core.QueryNodeParseException

getQuery(String, Analyzer) - Method in class org.apache.lucene.queryParser.QueryParserTestBase

getQuery() - Method in class org.apache.lucene.search.BooleanClause

getQuery() - Method in class org.apache.lucene.search.BooleanQuery.BooleanWeight

getQuery() - Method in class org.apache.lucene.search.ConstantScoreQuery.ConstantWeight

getQuery() - Method in class org.apache.lucene.search.ConstantScoreQuery
Returns the encapsulated query, returns null if a filter is wrapped.
getQuery() - Method in class org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight
Return our associated DisjunctionMaxQuery
getQuery() - Method in class org.apache.lucene.search.FilteredQuery

getQuery() - Method in class org.apache.lucene.search.SpanQueryFilter

getQuery() - Method in class org.apache.lucene.search.spans.SpanWeight

getQuery() - Method in class org.apache.lucene.search.Weight
The query that this concerns.
getQuery(Query) - Method in class org.apache.lucene.spatial.tier.DistanceQueryBuilder
Deprecated.
getQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.BooleanQueryBuilder

getQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.BoostingQueryBuilder

getQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.ConstantScoreQueryBuilder

getQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.FilteredQueryBuilder

getQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.FuzzyLikeThisQueryBuilder

getQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.LikeThisQueryBuilder

getQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.MatchAllDocsQueryBuilder

getQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.NumericRangeQueryBuilder

getQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.SpanBuilderBase

getQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.SpanQueryBuilderFactory

getQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.TermQueryBuilder

getQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.TermsQueryBuilder

getQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.UserInputQueryBuilder

getQuery(Element) - Method in class org.apache.lucene.xmlparser.CoreParser

getQuery(Element) - Method in interface org.apache.lucene.xmlparser.QueryBuilder

getQuery(Element) - Method in class org.apache.lucene.xmlparser.QueryBuilderFactory

getQueryAsDOM(Properties, String) - Method in class org.apache.lucene.xmlparser.QueryTemplateManager

getQueryAsDOM(Properties) - Method in class org.apache.lucene.xmlparser.QueryTemplateManager

getQueryAsDOM(Properties, Templates) - Static method in class org.apache.lucene.xmlparser.QueryTemplateManager
Fast means of constructing query using a cached,precompiled stylesheet
getQueryAsDOM(Properties, InputStream) - Static method in class org.apache.lucene.xmlparser.QueryTemplateManager
Slow means of constructing query - parses stylesheet from input stream
getQueryAsXmlString(Properties, String) - Method in class org.apache.lucene.xmlparser.QueryTemplateManager

getQueryAsXmlString(Properties) - Method in class org.apache.lucene.xmlparser.QueryTemplateManager

getQueryAsXmlString(Properties, Templates) - Static method in class org.apache.lucene.xmlparser.QueryTemplateManager
Fast means of constructing query using a precompiled stylesheet
getQueryAsXmlString(Properties, InputStream) - Static method in class org.apache.lucene.xmlparser.QueryTemplateManager
Slow means of constructing query parsing a stylesheet from an input stream
getQueryBuilder() - Method in class org.apache.lucene.queryParser.core.QueryParserHelper
Returns the query builder used to build a object from the query node tree.
getQueryBuilder(String) - Method in class org.apache.lucene.xmlparser.QueryBuilderFactory

getQueryConfigHandler() - Method in interface org.apache.lucene.queryParser.core.processors.QueryNodeProcessor
Returns the QueryConfigHandler associated to the query tree if any, otherwise it returns null
getQueryConfigHandler() - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
For reference about this method check: QueryNodeProcessor.getQueryConfigHandler().
getQueryConfigHandler() - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline
For reference about this method check: QueryNodeProcessor.getQueryConfigHandler().
getQueryConfigHandler() - Method in class org.apache.lucene.queryParser.core.QueryParserHelper
Returns the query configuration handler, which is used during the query node tree processing.
getQueryConfigHandler() - Method in class org.apache.lucene.queryParser.standard.processors.GroupQueryNodeProcessor

getQueryConfigHandler() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated. Returns the query config handler used by this query parser
getQueryDOA(String, Analyzer) - Method in class org.apache.lucene.queryParser.QueryParserTestBase

getQueryID() - Method in class org.apache.lucene.benchmark.quality.QualityQuery
Return the ID of this query.
getQueryMaker(ReadTask) - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

getQueryMaker() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask
Return query maker used for this task.
getQueryMaker() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTask

getQueryMaker() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask

getQueryMaker() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask

getQueryMaker() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask

getQueryMaker() - Method in class org.apache.lucene.benchmark.byTask.tasks.WarmTask

getQueryNodeProcessor() - Method in class org.apache.lucene.queryParser.core.QueryParserHelper
Returns the processor object used to process the query node tree, it returns null if no processor is used.
getQueryProcessor() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated. Returns QueryNodeProcessor used to process the query node tree generated by the StandardSyntaxParser.
getQuote() - Method in class org.apache.lucene.queryParser.surround.query.SimpleTerm

getRAMBufferSizeMB() - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.getRAMBufferSizeMB() instead.
getRAMBufferSizeMB() - Method in class org.apache.lucene.index.IndexWriterConfig
Returns the value set by IndexWriterConfig.setRAMBufferSizeMB(double) if enabled.
getRandomIOExceptionRate() - Method in class org.apache.lucene.store.MockDirectoryWrapper

getRangeCollator() - Method in class org.apache.lucene.queryParser.QueryParser

getRangeCollator() - Method in interface org.apache.lucene.queryParser.standard.config.RangeCollatorAttribute
Deprecated.
getRangeCollator() - Method in class org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl
Deprecated.
getRangeCollator() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getRangeCollator() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser

getRangeQuery(String, String, String, boolean) - Method in class org.apache.lucene.queryParser.analyzing.AnalyzingQueryParser
Overrides super class, by passing terms through analyzer.
getRangeQuery(String, String, String, boolean) - Method in class org.apache.lucene.queryParser.complexPhrase.ComplexPhraseQueryParser

getRangeQuery(String, String, String, boolean) - Method in class org.apache.lucene.queryParser.MultiFieldQueryParser

getRangeQuery(String, String, String, boolean) - Method in class org.apache.lucene.queryParser.QueryParser

getRangeQuery(String, String, String, boolean) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getRank() - Method in class org.apache.lucene.benchmark.quality.QualityStats.RecallPoint
Returns the rank: where on the list of returned docs this relevant doc appeared.
getRate() - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence
Returns the rate per minute: how many operations should be performed in a minute.
getRawQueryString() - Method in class org.apache.lucene.queryParser.ext.ExtensionQuery
Returns the raw extension query string
getReadChunkSize() - Method in class org.apache.lucene.store.FSDirectory
The maximum number of bytes to read at once from the underlying file during DataInput.readBytes(byte[], int, int).
getReader() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser

getReader() - Method in class org.apache.lucene.index.IndexWriter
Deprecated. Please use IndexReader.open(IndexWriter,boolean) instead.
getReader(int) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. Please use IndexReader.open(IndexWriter,boolean) instead. Furthermore, this method cannot guarantee the reader (and its sub-readers) will be opened with the termInfosIndexDivisor setting because some of them may have already been opened according to IndexWriterConfig.setReaderTermsIndexDivisor(int). You should set the requested termInfosIndexDivisor through IndexWriterConfig.setReaderTermsIndexDivisor(int) and use IndexWriter.getReader().
getReader() - Method in class org.apache.lucene.index.RandomIndexWriter

getReader(boolean) - Method in class org.apache.lucene.index.RandomIndexWriter

getReader(DataInput) - Static method in class org.apache.lucene.util.packed.PackedInts
Retrieve PackedInt data from the DataInput and return a packed int structure based on it.
getReaderForField(String) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor

getReaderKey() - Method in class org.apache.lucene.search.FieldCache.CacheEntry

getReaderPooling() - Method in class org.apache.lucene.index.IndexWriterConfig
Returns true if IndexWriter should pool readers even if IndexWriter.getReader() has not been called.
getReaderProcessor(IndexReader) - Method in class org.apache.lucene.facet.index.FacetsPayloadProcessorProvider

getReaderProcessor(IndexReader) - Method in class org.apache.lucene.index.PayloadProcessorProvider
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for the given Directory, through which PayloadProcessorProvider.ReaderPayloadProcessors can be obtained for each Term, or null if none should be used.
getReaderTermsIndexDivisor() - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.getReaderTermsIndexDivisor() instead.
getReaderTermsIndexDivisor() - Method in class org.apache.lucene.index.IndexWriterConfig

getReading(int, char[], int, int) - Method in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

getReading(int, char[], int, int) - Method in interface org.apache.lucene.analysis.ja.dict.Dictionary
Get reading of tokens
getReading(int, char[], int, int) - Method in class org.apache.lucene.analysis.ja.dict.UnknownDictionary

getReading(int, char[], int, int) - Method in class org.apache.lucene.analysis.ja.dict.UserDictionary

getReading() - Method in class org.apache.lucene.analysis.ja.Token

getReading() - Method in interface org.apache.lucene.analysis.ja.tokenattributes.ReadingAttribute

getReading() - Method in class org.apache.lucene.analysis.ja.tokenattributes.ReadingAttributeImpl

getRecall() - Method in class org.apache.lucene.benchmark.quality.QualityStats
Return the recall: |{relevant hits found}| / |{relevant hits existing}|.
getRecall() - Method in class org.apache.lucene.benchmark.quality.QualityStats.RecallPoint
Returns the recall: how many relevant docs were returned up to this point, inclusive.
getRecallPoints() - Method in class org.apache.lucene.benchmark.quality.QualityStats
Returns the recallPoints.
getReclaimDeletesWeight() - Method in class org.apache.lucene.index.TieredMergePolicy
See TieredMergePolicy.setReclaimDeletesWeight(double).
getRecomputedActualSizeInBytes() - Method in class org.apache.lucene.store.MockDirectoryWrapper
Like getRecomputedSizeInBytes(), but, uses actual file lengths rather than buffer allocations (which are quantized up to nearest RAMOutputStream.BUFFER_SIZE (now 1024) bytes.
getRecomputedCount() - Method in class org.apache.lucene.util.BitVector
For testing
getRecomputedSizeInBytes() - Method in class org.apache.lucene.store.MockDirectoryWrapper
Provided for testing purposes.
getRef(Character) - Method in class org.egothor.stemmer.Row
Return the reference to the next Row in the Cell associated with the given Character.
getRefCount() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader
Expert: returns the current refCount for this taxonomy reader
getRefCount() - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyReader
Expert: returns the current refCount for this taxonomy reader
getRefCount() - Method in class org.apache.lucene.index.IndexReader
Expert: returns the current refCount for this reader
getRegexImplementation() - Method in class org.apache.lucene.search.regex.RegexQuery

getRegexImplementation() - Method in interface org.apache.lucene.search.regex.RegexQueryCapable

getRegexImplementation() - Method in class org.apache.lucene.search.regex.SpanRegexQuery
Deprecated.
getRepetitions() - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

getReported() - Method in class org.apache.lucene.benchmark.byTask.stats.Report
Returns number of stats points represented in this report.
getResidue() - Method in interface org.apache.lucene.facet.search.results.FacetResultNode
Value of screened out sub results.
getResidue() - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode

getResolution() - Method in class org.apache.lucene.search.TimeLimitingCollector.TimerThread
Return the timer resolution.
getResource(String) - Method in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

getResultMode() - Method in class org.apache.lucene.facet.search.params.FacetRequest
Return the requested result mode.
getResults() - Method in class org.apache.lucene.search.suggest.Lookup.LookupPriorityQueue
Returns the top N results in descending order.
getRetainableProperties() - Method in class org.apache.lucene.facet.enhancements.params.DefaultEnhancementsIndexingParams

getRetainableProperties() - Method in interface org.apache.lucene.facet.enhancements.params.EnhancementsIndexingParams
Get a list of CategoryProperty classes to be retained when creating CategoryParentsStream.
getRetainableProperty() - Method in class org.apache.lucene.facet.enhancements.association.AssociationEnhancement

getRetainableProperty() - Method in interface org.apache.lucene.facet.enhancements.CategoryEnhancement
Get a CategoryProperty class to be retained when creating CategoryParentsStream.
getReverse() - Method in class org.apache.lucene.search.SortField
Returns whether the sort should be reversed.
getReverseMul() - Method in class org.apache.lucene.search.FieldValueHitQueue

getRewriteMethod() - Method in class org.apache.lucene.search.MultiTermQuery

getRewriteMethod() - Method in class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper
Expert: returns the rewriteMethod
getRightId(int) - Method in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

getRightId(int) - Method in interface org.apache.lucene.analysis.ja.dict.Dictionary
Get right id of specified word
getRightId(int) - Method in class org.apache.lucene.analysis.ja.dict.UserDictionary

getRomanization(String) - Static method in class org.apache.lucene.analysis.ja.util.ToStringUtil
Romanize katakana with modified hepburn
getRomanization(Appendable, CharSequence) - Static method in class org.apache.lucene.analysis.ja.util.ToStringUtil
Romanize katakana with modified hepburn
getRound() - Method in class org.apache.lucene.benchmark.byTask.stats.TaskStats

getRoundedFixedSize(int) - Static method in class org.apache.lucene.util.packed.PackedInts
Possibly wastes some storage in exchange for faster lookups
getRoundNumber() - Method in class org.apache.lucene.benchmark.byTask.utils.Config

getRows() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column
Deprecated.
getRunData() - Method in class org.apache.lucene.benchmark.byTask.Benchmark

getRunData() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

getRunInBackground() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

getRunningMerge() - Method in class org.apache.lucene.index.ConcurrentMergeScheduler.MergeThread

getSampleFixer(IndexReader, TaxonomyReader, FacetSearchParams) - Method in class org.apache.lucene.facet.search.sampling.Sampler
Get a fixer of sample facet accumulation results.
getSampler() - Method in class org.apache.lucene.facet.search.AdaptiveFacetsAccumulator

getSampleRatio() - Method in class org.apache.lucene.facet.search.sampling.SamplingParams

getSampleSet(ScoredDocIDs) - Method in class org.apache.lucene.facet.search.sampling.Sampler
Compute a sample set out of the input set, based on the SamplingParams.getSampleRatio() in effect.
getSamplingParams() - Method in class org.apache.lucene.facet.search.sampling.Sampler
Return the sampling params in effect
getSamplingThreshold() - Method in class org.apache.lucene.facet.search.sampling.SamplingParams
Return the samplingThreshold.
getSchema() - Method in class org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode

getScore() - Method in interface org.apache.lucene.facet.search.ScoredDocIDsIterator
Returns the score of the current document.
getScore() - Method in class org.apache.lucene.search.highlight.TextFragment

getScore(int) - Method in class org.apache.lucene.search.highlight.TokenGroup

getScoredDocIDs() - Method in class org.apache.lucene.facet.search.ScoredDocIdCollector

getSearchables() - Method in class org.apache.lucene.search.MultiSearcher
Deprecated. Return the array of Searchables this searches.
getSearchTime() - Method in class org.apache.lucene.benchmark.quality.QualityStats
Returns the search time in milliseconds for the measured query.
getSecondaryDir() - Method in class org.apache.lucene.store.FileSwitchDirectory
Return the secondary directory
getSegmentCount() - Method in class org.apache.lucene.index.IndexCommit
Returns number of segments referenced by this commit.
getSegmentCount() - Method in class org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint

getSegmentName() - Method in class org.apache.lucene.index.SegmentReader
Return the name of the segment this reader is reading.
getSegmentsFileName() - Method in class org.apache.lucene.index.IndexCommit
Get the segments file (segments_N) associated with this commit point.
getSegmentsFileName() - Method in class org.apache.lucene.index.SegmentInfos
Get the segments_N filename in use by this segment infos.
getSegmentsFileName() - Method in class org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint

getSegmentsPerTier() - Method in class org.apache.lucene.index.TieredMergePolicy

getSentinelObject() - Method in class org.apache.lucene.util.PriorityQueue
This method can be overridden by extending classes to return a sentinel object which will be used by PriorityQueue.initialize(int) to fill the queue, so that the code which uses that queue can always assume it's full and only change the top without attempting to insert any new object.
Those sentinel values should always compare worse than any non-sentinel value (i.e., PriorityQueue.lessThan(T, T) should always favor the non-sentinel values).
By default, this method returns false, which means the queue will not be filled with sentinel values.
getSeqnum() - Method in class org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo.SubInfo

getSequentialSubReaders() - Method in class org.apache.lucene.index.FilterIndexReader

getSequentialSubReaders() - Method in class org.apache.lucene.index.IndexReader
Expert: returns the sequential sub readers that this reader is logically composed of.
getSequentialSubReaders() - Method in class org.apache.lucene.index.MultiReader

getSequentialSubReaders() - Method in class org.apache.lucene.index.PruningReader

getSequentialSubReaders() - Method in class org.apache.lucene.index.SlowMultiReaderWrapper

getShapeLoop(Shape, CartesianTierPlotter, double, double, double, double) - Method in class org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder
Deprecated.
getShortName() - Method in interface org.apache.lucene.analysis.icu.tokenattributes.ScriptAttribute
Get the abbreviated name.
getShortName() - Method in class org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl

getShorts(IndexReader, String) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.
getShorts(IndexReader, String, FieldCache.ShortParser) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.
getShorts(IndexReader, String, FieldCache.ShortParser, boolean) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.
getShrinkSize(int, int, int) - Static method in class org.apache.lucene.util.ArrayUtil

getSide(String) - Static method in enum org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter.Side

getSide(String) - Static method in enum org.apache.lucene.analysis.ngram.EdgeNGramTokenizer.Side

getSimilarity() - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.getSimilarity() instead
getSimilarity() - Method in class org.apache.lucene.index.IndexWriterConfig
Expert: returns the Similarity implementation used by this IndexWriter.
getSimilarity() - Method in class org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode

getSimilarity() - Method in class org.apache.lucene.search.IndexSearcher

getSimilarity(Searcher) - Method in class org.apache.lucene.search.Query
Deprecated. Instead of using "runtime" subclassing/delegation, subclass the Weight instead.
getSimilarity() - Method in class org.apache.lucene.search.ScoreCachingWrappingScorer

getSimilarity() - Method in class org.apache.lucene.search.Scorer
Deprecated. Store any Similarity you might need privately in your implementation instead.
getSimilarity() - Method in class org.apache.lucene.search.Searcher
Deprecated. Expert: Return the Similarity implementation used by this Searcher.
getSimilarity() - Method in class org.apache.lucene.search.similar.MoreLikeThis

getSimilarity() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
getSingleton() - Static method in class org.apache.lucene.facet.search.TotalFacetCountsCache
Get the single instance of this cache
getSingleton() - Static method in class org.apache.lucene.util.fst.ByteSequenceOutputs

getSingleton() - Static method in class org.apache.lucene.util.fst.IntSequenceOutputs

getSingleton() - Static method in class org.apache.lucene.util.fst.NoOutputs

getSingleton(boolean) - Static method in class org.apache.lucene.util.fst.PositiveIntOutputs

getSingleton(boolean) - Static method in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs

getSize() - Method in class org.apache.lucene.benchmark.byTask.stats.Report
Returns number of lines in the report.
getSize() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader

getSize() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
getSize() returns the number of categories in the taxonomy.
getSize() - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyReader
getSize() returns the number of categories in the taxonomy.
getSize() - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyWriter
getSize() returns the number of categories in the taxonomy.
getSize() - Method in class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite
return the maximum priority queue size
getSize() - Method in class org.apache.lucene.search.TopTermsRewrite
return the maximum priority queue size
getSizeInBytes() - Method in class org.apache.lucene.store.RAMFile

getSlop() - Method in class org.apache.lucene.search.MultiPhraseQuery
Sets the phrase slop for this query.
getSlop() - Method in class org.apache.lucene.search.PhraseQuery
Returns the slop.
getSlop() - Method in class org.apache.lucene.search.spans.SpanNearQuery
Return the maximum number of intervening unmatched positions permitted.
getSlop() - Method in class org.apache.lucene.search.vectorhighlight.FieldQuery.QueryPhraseMap

getSlot(int) - Method in class org.apache.lucene.search.grouping.SentinelIntSet
returns the slot for this key
getSnapshot(String) - Method in class org.apache.lucene.index.SnapshotDeletionPolicy
Get a snapshotted IndexCommit by ID.
getSnapshots() - Method in class org.apache.lucene.index.SnapshotDeletionPolicy
Get all the snapshots in a map of snapshot IDs to the segments they 'cover.' This can be passed to SnapshotDeletionPolicy.SnapshotDeletionPolicy(IndexDeletionPolicy, Map) in order to initialize snapshots at construction.
getSnowballWordSet(Reader, CharArraySet) - Static method in class org.apache.lucene.analysis.WordlistLoader
Reads stopwords from a stopword list in Snowball format.
getSnowballWordSet(Reader, Version) - Static method in class org.apache.lucene.analysis.WordlistLoader
Reads stopwords from a stopword list in Snowball format.
getSort() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask

getSort() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask

getSort() - Method in class org.apache.lucene.search.Sort
Representation of the sort criteria.
getSortBy() - Method in class org.apache.lucene.facet.search.params.FacetRequest
Specify how should results be sorted.
getSortOrder() - Method in class org.apache.lucene.facet.search.params.FacetRequest
Return the requested order of results.
getSpacerCharacter() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated.
getSpanNearQuery(IndexReader, String, float, BasicQueryFactory) - Method in class org.apache.lucene.queryParser.surround.query.DistanceQuery

getSpanQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.BoostingTermBuilder

getSpanQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.SpanFirstBuilder

getSpanQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.SpanNearBuilder

getSpanQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.SpanNotBuilder

getSpanQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.SpanOrBuilder

getSpanQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.SpanOrTermsBuilder

getSpanQuery(Element) - Method in interface org.apache.lucene.xmlparser.builders.SpanQueryBuilder

getSpanQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.SpanQueryBuilderFactory

getSpanQuery(Element) - Method in class org.apache.lucene.xmlparser.builders.SpanTermBuilder

getSpans(IndexReader) - Method in class org.apache.lucene.search.spans.FieldMaskingSpanQuery

getSpans(IndexReader) - Method in class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper

getSpans(IndexReader) - Method in class org.apache.lucene.search.spans.SpanNearQuery

getSpans(IndexReader) - Method in class org.apache.lucene.search.spans.SpanNotQuery

getSpans(IndexReader) - Method in class org.apache.lucene.search.spans.SpanOrQuery

getSpans(IndexReader) - Method in class org.apache.lucene.search.spans.SpanPositionCheckQuery

getSpans(IndexReader) - Method in class org.apache.lucene.search.spans.SpanQuery
Expert: Returns the matches for this query in an index.
getSpans(IndexReader) - Method in class org.apache.lucene.search.spans.SpanTermQuery

getSpanScore() - Method in class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer
Returns the SpanScorer score only.
getStart() - Method in class org.apache.lucene.analysis.util.CharArrayIterator

getStart() - Method in class org.apache.lucene.search.SpanFilterResult.StartEnd
The Start position
getStart() - Method in class org.apache.lucene.search.spans.SpanPositionRangeQuery

getStartOffset() - Method in class org.apache.lucene.index.TermVectorOffsetInfo
The accessor for the starting offset of the term.
getStartOffset() - Method in class org.apache.lucene.search.highlight.TokenGroup

getStartOffset() - Method in class org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo

getStartOffset() - Method in class org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo

getStartOffset() - Method in class org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo.Toffs

getStartOffset() - Method in class org.apache.lucene.search.vectorhighlight.FieldTermStack.TermInfo

getStartPos() - Method in class org.apache.lucene.util.UnsafeByteArrayOutputStream
Returns the start position data was written to.
getStarts() - Method in class org.apache.lucene.search.MultiSearcher
Deprecated.
getStartTimeMillis() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

getStem() - Method in class org.apache.lucene.analysis.hunspell.HunspellStemmer.Stem
Returns the actual word stem itself
getStemDict(Reader, CharArrayMap<String>) - Static method in class org.apache.lucene.analysis.WordlistLoader
Reads a stem dictionary.
getStemLength() - Method in class org.apache.lucene.analysis.hunspell.HunspellStemmer.Stem

getStemString() - Method in class org.apache.lucene.analysis.hunspell.HunspellStemmer.Stem

getStopWords(String) - Method in class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
Provides information on which stop words have been identified for a field
getStopWords() - Method in class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
Provides information on which stop words have been identified for all fields
getStopWords() - Method in class org.apache.lucene.search.similar.MoreLikeThis
Get the current stop words being used.
getStopWords() - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

getStopwordSet() - Method in class org.apache.lucene.analysis.StopwordAnalyzerBase
Returns the analyzer's stopword set or an empty set if the analyzer has no stopwords
getStringDistance() - Method in class org.apache.lucene.search.spell.SpellChecker
Returns the StringDistance instance used by this SpellChecker instance.
getStringIndex(IndexReader, String) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found reads the term values in field and returns an array of them in natural order, along with an array telling which element in the term array each document uses.
getStrings(IndexReader, String) - Method in interface org.apache.lucene.search.FieldCache
Checks the internal cache for an appropriate entry, and if none is found, reads the term values in field and returns an array of size reader.maxDoc() containing the value each document has in the given field.
getStrip() - Method in class org.apache.lucene.analysis.hunspell.HunspellAffix
Returns the stripping characters defined for the affix
getSubInfos() - Method in class org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo

getSubQueriesIterator() - Method in class org.apache.lucene.queryParser.surround.query.ComposedQuery

getSubQuery(int) - Method in class org.apache.lucene.queryParser.surround.query.ComposedQuery

getSubReaders() - Method in class org.apache.lucene.search.IndexSearcher
Returns the atomic subReaders used by this searcher.
getSubResults() - Method in interface org.apache.lucene.facet.search.results.FacetResultNode
Contained sub results.
getSubResults() - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode

getSubSpans() - Method in class org.apache.lucene.search.spans.NearSpansOrdered

getSubSpans() - Method in class org.apache.lucene.search.spans.NearSpansUnordered

getSuffix() - Method in class org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter

GetSuffix(int) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Get the suffix.
GetSuffix(int) - Method in interface org.apache.lucene.queryParser.CharStream
Returns an array of characters that make up the suffix of length 'len' for the currently matched token.
GetSuffix(int) - Method in class org.apache.lucene.queryParser.FastCharStream

GetSuffix(int) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

GetSuffix(int) - Method in interface org.apache.lucene.queryParser.surround.parser.CharStream
Returns an array of characters that make up the suffix of length 'len' for the currently matched token.
GetSuffix(int) - Method in class org.apache.lucene.queryParser.surround.parser.FastCharStream

getSuffixes() - Method in class org.apache.lucene.analysis.hunspell.HunspellStemmer.Stem
Returns the list of suffixes used to generate the stem
getSuffixOperator() - Method in class org.apache.lucene.queryParser.surround.query.SrndPrefixQuery

getSummary() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser

getSummary() - Method in class org.apache.lucene.search.ComplexExplanation

getSummary() - Method in class org.apache.lucene.search.Explanation
A short one line summary which should contain all high level information about this Explanation, without the "Details"
getSupportedFeatures() - Static method in class org.apache.lucene.util.RamUsageEstimator
Return the set of supported JVM features that improve the estimation.
getSurfaceForm() - Method in class org.apache.lucene.analysis.ja.Token

getSurfaceFormString() - Method in class org.apache.lucene.analysis.ja.Token

getSyntaxParser() - Method in class org.apache.lucene.queryParser.core.QueryParserHelper
Returns the text parser used to build a query node tree from a query string.
getTabSize(int) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

getTabSize(int) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

getTag(String) - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode

getTag(CharSequence) - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode
Deprecated. use QueryNode.getTag(String) instead
getTag(CharSequence) - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
Deprecated. use QueryNodeImpl.getTag(String) instead
getTag(String) - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

getTagMap() - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode
Returns a map containing all tags attached to this query node.
getTagMap() - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
Returns a map containing all tags attached to this query node.
getTags() - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode
Deprecated. use QueryNode.getTagMap()
getTags() - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
Deprecated. use QueryNodeImpl.getTagMap() instead
getTargetLabel() - Method in class org.apache.lucene.util.fst.BytesRefFSTEnum

getTargetLabel() - Method in class org.apache.lucene.util.fst.IntsRefFSTEnum

getTask() - Method in class org.apache.lucene.benchmark.byTask.stats.TaskStats

getTaskRunNum() - Method in class org.apache.lucene.benchmark.byTask.stats.TaskStats

getTasks() - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

getTaxonomyDir() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

getTaxonomyReader() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

getTaxonomyReader() - Method in class org.apache.lucene.facet.search.FacetResultsHandler
Return taxonomy reader used for current facets accumulation operation.
getTaxonomyWriter() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

getTempDir(String) - Static method in class org.apache.lucene.util._TestUtil
Returns temp dir, based on String arg in its name; does not create the directory.
getTemplates(InputStream) - Static method in class org.apache.lucene.xmlparser.QueryTemplateManager
Parses a query stylesheet for repeated use
getTerm() - Method in class org.apache.lucene.facet.index.params.CategoryListParams
A Term who's payload holds the category-list.
getTerm() - Method in class org.apache.lucene.index.TermVectorEntry

getTerm() - Method in class org.apache.lucene.search.FuzzyQuery
Returns the pattern term.
getTerm() - Method in class org.apache.lucene.search.highlight.WeightedTerm

getTerm() - Method in class org.apache.lucene.search.regex.RegexQuery

getTerm() - Method in class org.apache.lucene.search.regex.SpanRegexQuery
Deprecated.
getTerm() - Method in class org.apache.lucene.search.spans.SpanTermQuery
Return the term whose spans are matched.
getTerm() - Method in class org.apache.lucene.search.TermQuery
Returns the term of this query.
getTerm() - Method in class org.apache.lucene.search.WildcardQuery
Returns the pattern term.
getTerm() - Method in class org.apache.lucene.store.instantiated.InstantiatedTerm

getTerm() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermDocumentInformation

getTermArrays() - Method in class org.apache.lucene.search.MultiPhraseQuery
Returns a List of the terms in the multiphrase.
getTermCount() - Method in class org.apache.lucene.util.fst.Builder

getTermDocumentInformations() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermFreqVector

getTermEnum(String) - Method in class org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory

getTermEscaped(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

getTermEscaped(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.standard.nodes.NumericQueryNode
This method is used to get the value converted to String and escaped using the given EscapeQuerySyntax.
getTermEscapeQuoted(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

getTermFrequencies() - Method in interface org.apache.lucene.index.TermFreqVector
Array of term frequencies.
getTermFrequencies() - Method in class org.apache.lucene.search.QueryTermVector

getTermFrequencies() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermFreqVector

getTermFreqVector(int, String) - Method in class org.apache.lucene.index.FilterIndexReader

getTermFreqVector(int, String, TermVectorMapper) - Method in class org.apache.lucene.index.FilterIndexReader

getTermFreqVector(int, TermVectorMapper) - Method in class org.apache.lucene.index.FilterIndexReader

getTermFreqVector(int, String) - Method in class org.apache.lucene.index.IndexReader
Return a term frequency vector for the specified document and field.
getTermFreqVector(int, String, TermVectorMapper) - Method in class org.apache.lucene.index.IndexReader
Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the TermFreqVector.
getTermFreqVector(int, TermVectorMapper) - Method in class org.apache.lucene.index.IndexReader
Map all the term vectors for all fields in a Document
getTermFreqVector(int, String) - Method in class org.apache.lucene.index.MultiReader

getTermFreqVector(int, String, TermVectorMapper) - Method in class org.apache.lucene.index.MultiReader

getTermFreqVector(int, TermVectorMapper) - Method in class org.apache.lucene.index.MultiReader

getTermFreqVector(int, String) - Method in class org.apache.lucene.index.ParallelReader

getTermFreqVector(int, String, TermVectorMapper) - Method in class org.apache.lucene.index.ParallelReader

getTermFreqVector(int, TermVectorMapper) - Method in class org.apache.lucene.index.ParallelReader

getTermFreqVector(int, String) - Method in class org.apache.lucene.index.SegmentReader
Return a term frequency vector for the specified document and field.
getTermFreqVector(int, String, TermVectorMapper) - Method in class org.apache.lucene.index.SegmentReader

getTermFreqVector(int, TermVectorMapper) - Method in class org.apache.lucene.index.SegmentReader

getTermFreqVector(int, String) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
getTermFreqVector(int, String, TermVectorMapper) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
getTermFreqVector(int, TermVectorMapper) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
getTermFreqVectors(int) - Method in class org.apache.lucene.index.FilterIndexReader

getTermFreqVectors(int) - Method in class org.apache.lucene.index.IndexReader
Return an array of term frequency vectors for the specified document.
getTermFreqVectors(int) - Method in class org.apache.lucene.index.MultiReader

getTermFreqVectors(int) - Method in class org.apache.lucene.index.ParallelReader

getTermFreqVectors(int) - Method in class org.apache.lucene.index.PruningReader
Applies TermPruningPolicy to terms inside term vectors.
getTermFreqVectors(int) - Method in class org.apache.lucene.index.SegmentReader
Return an array of term frequency vectors for the specified document.
getTermFreqVectors(int) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
getTermIndex() - Method in class org.apache.lucene.store.instantiated.InstantiatedTerm

getTermIndexInterval() - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.getTermIndexInterval()
getTermIndexInterval() - Method in class org.apache.lucene.index.IndexWriterConfig
Returns the interval between indexed terms.
GetTermInfo - Class in org.apache.lucene.misc
Utility to get document frequency and total number of occurrences (sum of the tf for each doc) of a term.
GetTermInfo() - Constructor for class org.apache.lucene.misc.GetTermInfo

getTermInfo(Directory, Term) - Static method in class org.apache.lucene.misc.GetTermInfo

getTermInfosIndexDivisor() - Method in class org.apache.lucene.index.FilterIndexReader

getTermInfosIndexDivisor() - Method in class org.apache.lucene.index.IndexReader
For IndexReader implementations that use TermInfosReader to read terms, this returns the current indexDivisor as specified when the reader was opened.
getTermInfosIndexDivisor() - Method in class org.apache.lucene.index.SegmentReader

getTermMap(String) - Method in class org.apache.lucene.search.vectorhighlight.FieldQuery.QueryPhraseMap

getTermOffsets() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermDocumentInformation

getTermOrPhraseNumber() - Method in class org.apache.lucene.search.vectorhighlight.FieldQuery.QueryPhraseMap

getTermPositions(int) - Method in interface org.apache.lucene.index.TermPositionVector
Returns an array of positions in which the term is found.
getTermPositions() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermDocumentInformation

getTermPositions(int) - Method in class org.apache.lucene.store.instantiated.InstantiatedTermPositionVector

getTermQuery(String, boolean) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

getTerms() - Method in class org.apache.lucene.index.PositionBasedTermVectorMapper.TVPositionInfo
Note, there may be multiple terms at the same position
getTerms() - Method in interface org.apache.lucene.index.TermFreqVector

getTerms(Query) - Static method in class org.apache.lucene.search.highlight.QueryTermExtractor
Extracts all terms texts of a given Query into an array of WeightedTerms
getTerms(Query, boolean, String) - Static method in class org.apache.lucene.search.highlight.QueryTermExtractor
Extracts all terms texts of a given Query into an array of WeightedTerms
getTerms(Query, boolean) - Static method in class org.apache.lucene.search.highlight.QueryTermExtractor
Extracts all terms texts of a given Query into an array of WeightedTerms
getTerms() - Method in class org.apache.lucene.search.PhraseQuery
Returns the set of terms in this phrase.
getTerms() - Method in class org.apache.lucene.search.QueryTermVector

getTerms() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermFreqVector

getTermsByFieldAndText() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndex
Deprecated.
getTermsEnum(IndexReader, MultiTermQuery) - Method in class org.apache.lucene.search.MultiTermQuery.RewriteMethod
Returns the MultiTermQuerys FilteredTermEnum
getTermsOffsets() - Method in class org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo.SubInfo

getTermText() - Method in class org.apache.lucene.queryParser.surround.query.SrndTermQuery

getTermVectorEntrySet() - Method in class org.apache.lucene.index.SortedTermVectorMapper
The TermVectorEntrySet.
getTestClass() - Static method in class org.apache.lucene.util.LuceneTestCase
Return the current class being tested.
getTestClass() - Method in class org.apache.lucene.util.StoreClassNameRule
Returns the test class currently executing in this rule.
getTestLabel() - Method in class org.apache.lucene.util.LuceneTestCase

getText() - Method in class org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator

getText(CharTermAttribute) - Method in class org.apache.lucene.analysis.standard.StandardTokenizerImpl
Fills CharTermAttribute with the current token text.
getText(CharTermAttribute) - Method in interface org.apache.lucene.analysis.standard.StandardTokenizerInterface
Copies the matched text into the CharTermAttribute
getText(CharTermAttribute) - Method in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. Fills CharTermAttribute with the current token text.
getText(CharTermAttribute) - Method in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. Fills CharTermAttribute with the current token text.
getText(CharTermAttribute) - Method in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. Fills CharTermAttribute with the current token text.
getText(CharTermAttribute) - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
Fills CharTermAttribute with the current token text.
getText() - Method in class org.apache.lucene.analysis.util.CharArrayIterator

getText() - Method in class org.apache.lucene.benchmark.byTask.stats.Report
Returns the report text.
getText() - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
Returns the term.
getText() - Method in interface org.apache.lucene.queryParser.core.nodes.TextableQueryNode

getText() - Method in class org.apache.lucene.search.vectorhighlight.FieldTermStack.TermInfo

getText(Node) - Static method in class org.apache.lucene.xmlparser.DOMUtils

getTextAsString() - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

getTextFragmenter() - Method in class org.apache.lucene.search.highlight.Highlighter

getThreshold() - Method in class org.apache.lucene.search.spell.JaroWinklerDistance
Returns the current value of the threshold used for adding the Winkler bonus.
getTierBoxId(double, double) - Method in class org.apache.lucene.spatial.tier.projections.CartesianTierPlotter
Deprecated. TierBoxId is latitude box id + longitude box id where latitude box id, and longitude box id are transposed in to position coordinates.
getTierFieldName() - Method in class org.apache.lucene.spatial.tier.projections.CartesianTierPlotter
Deprecated. get the string name representing current tier _localTier<tiedId>
getTierFieldName(int) - Method in class org.apache.lucene.spatial.tier.projections.CartesianTierPlotter
Deprecated. get the string name representing tierId _localTier<tierId>
getTierId() - Method in class org.apache.lucene.spatial.tier.Shape
Deprecated.
getTierVerticalPosDivider() - Method in class org.apache.lucene.spatial.tier.projections.CartesianTierPlotter
Deprecated.
getTimeAllowed() - Method in exception org.apache.lucene.search.TimeLimitingCollector.TimeExceededException
Returns allowed time (milliseconds).
getTimeElapsed() - Method in exception org.apache.lucene.search.TimeLimitingCollector.TimeExceededException
Returns elapsed time (milliseconds).
getTimestamp() - Method in class org.apache.lucene.index.IndexCommit
Deprecated. If you need to track commit time of an index, you can store it in the commit data (see IndexWriter.commit(Map)
getTitle() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser

getTitle() - Method in class org.apache.lucene.benchmark.byTask.feeds.DocData

getToken() - Method in class org.apache.lucene.analysis.miscellaneous.SingleTokenTokenStream

getToken(int) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Get the specific Token.
getToken(int) - Method in class org.apache.lucene.queryParser.QueryParser
Get the specific Token.
getToken(int) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Get the specific Token.
getToken(int) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser
Get the specific Token.
getToken(int) - Method in class org.apache.lucene.search.highlight.TokenGroup

getTokenPositioner(Token) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec
Deprecated.
getTokenPositioner(Token) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec
Deprecated.
getTokenPositioner(Token) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec
Deprecated. Retrieves information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
getTokenPositioner(Token) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec
Deprecated.
getTokens() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column.Row
Deprecated.
getTokenScore() - Method in class org.apache.lucene.search.highlight.QueryScorer

getTokenScore() - Method in class org.apache.lucene.search.highlight.QueryTermScorer

getTokenScore() - Method in interface org.apache.lucene.search.highlight.Scorer
Called for each token in the current fragment.
getTokenSeparator() - Method in class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper

getTokenStream() - Method in class org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents
Returns the sink TokenStream
getTokenStream(TermPositionVector) - Static method in class org.apache.lucene.search.highlight.TokenSources

getTokenStream(TermPositionVector, boolean) - Static method in class org.apache.lucene.search.highlight.TokenSources
Low level api.
getTokenStream(IndexReader, int, String) - Static method in class org.apache.lucene.search.highlight.TokenSources

getTokenStream(IndexReader, int, String, Analyzer) - Static method in class org.apache.lucene.search.highlight.TokenSources

getTokenStream(Document, String, Analyzer) - Static method in class org.apache.lucene.search.highlight.TokenSources

getTokenStream(String, String, Analyzer) - Static method in class org.apache.lucene.search.highlight.TokenSources

getTokenStream() - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor

getTopGroups(int, boolean) - Method in class org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector
Returns top groups, starting from offset.
getTopGroups(int) - Method in class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector

getTopGroups(Sort, int, int, int, boolean) - Method in class org.apache.lucene.search.grouping.BlockGroupingCollector
Returns the grouped results.
getTopGroups(ToParentBlockJoinQuery, Sort, int, int, int, boolean) - Method in class org.apache.lucene.search.join.ToParentBlockJoinCollector
Return the TopGroups for the specified BlockJoinQuery.
getTopLevelParser() - Method in class org.apache.lucene.queryParser.ext.ExtensionQuery
Returns the top level parser which created this ExtensionQuery
getTopLevelQuery() - Method in class org.apache.lucene.search.MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite

getTopLevelQuery() - Method in class org.apache.lucene.search.MultiTermQuery.TopTermsScoringBooleanQueryRewrite

getTotalBoost() - Method in class org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo

getTotalBytesCount() - Method in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
Returns the total number of bytes that were generated by this source.
getTotalBytesCount() - Method in class org.apache.lucene.benchmark.byTask.feeds.DocMaker
Returns the total number of bytes that were generated by the content source defined to that doc maker.
getTotalCount(int) - Method in class org.apache.lucene.facet.search.TotalFacetCounts
Return the total count of an input category
getTotalCounts(IndexReader, TaxonomyReader, FacetIndexingParams, CategoryListCache) - Method in class org.apache.lucene.facet.search.TotalFacetCountsCache
Get the total facet counts for a reader/taxonomy pair and facet indexing parameters.
getTotalCountsFactor() - Method in class org.apache.lucene.facet.search.sampling.SamplingAccumulator

getTotalCountsFactor() - Method in class org.apache.lucene.facet.search.StandardFacetsAccumulator
Expert: factor by which counts should be multiplied when initializing the count arrays from total counts.
getTotalHits() - Method in class org.apache.lucene.search.TopDocsCollector
The total number of documents that matched this query.
getTotalHits() - Method in class org.apache.lucene.search.TotalHitCountCollector
Returns how many hits matched the search.
getTotalItemsCount() - Method in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
Returns the total number of generated items.
getTotalNumberOfTerms() - Method in class org.apache.lucene.search.MultiTermQuery
Deprecated. Don't use this method, as its not thread safe and useless.
getTotalNumberOfTerms() - Method in class org.apache.lucene.search.MultiTermQueryWrapperFilter
Deprecated. Don't use this method, as its not thread safe and useless.
getTotalScore() - Method in class org.apache.lucene.search.highlight.TokenGroup

getTotalTermFreq(IndexReader, Term) - Static method in class org.apache.lucene.misc.HighFreqTerms

getTotStateCount() - Method in class org.apache.lucene.util.fst.Builder

getTruncated() - Method in class org.apache.lucene.queryParser.surround.query.SrndTruncQuery

getTruncQuery(String) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

getType(int, int) - Method in class org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig

getType(int, int) - Method in class org.apache.lucene.analysis.icu.segmentation.ICUTokenizerConfig
Return a token type value for a given script and BreakIterator rule status.
getType() - Method in class org.apache.lucene.queryParser.standard.config.NumericConfig
Returns the numeric type used to index the numeric values
getType() - Method in class org.apache.lucene.search.SortField
Returns the type of contents in the field.
getType() - Method in class org.apache.lucene.util.FieldCacheSanityChecker.Insanity
Type of insane behavior this object represents
getUniqueTermCount() - Method in class org.apache.lucene.index.FieldInvertState
Return the number of unique terms encountered in this field.
getUniqueTermCount() - Method in class org.apache.lucene.index.FilterIndexReader

getUniqueTermCount() - Method in class org.apache.lucene.index.IndexReader
Returns the number of unique terms (across all fields) in this reader.
getUniqueTermCount() - Method in class org.apache.lucene.index.SegmentReader

getUnit() - Method in enum org.apache.lucene.spatial.geometry.DistanceUnits
Deprecated. Returns the string representation of the distance unit
getUnsupportedFeatures() - Static method in class org.apache.lucene.util.RamUsageEstimator
Return the set of unsupported JVM features that improve the estimation.
getUpperBound() - Method in class org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode

getUpperBound() - Method in interface org.apache.lucene.queryParser.core.nodes.RangeQueryNode

getUpperBound() - Method in class org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode
Returns the upper bound node.
getUpperBound() - Method in class org.apache.lucene.queryParser.standard.nodes.RangeQueryNode
Deprecated.
getUpperRight() - Method in class org.apache.lucene.spatial.geometry.shape.LLRect
Deprecated.
getUpperTerm() - Method in class org.apache.lucene.search.TermRangeFilter
Returns the upper value of this range filter
getUpperTerm() - Method in class org.apache.lucene.search.TermRangeQuery
Returns the upper value of this range query
getUpperVal() - Method in class org.apache.lucene.search.FieldCacheRangeFilter
Returns the upper value of this range filter
getUseCompoundFile() - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use LogMergePolicy.getUseCompoundFile()
getUseCompoundFile() - Method in class org.apache.lucene.index.LogMergePolicy
Returns true if newly flushed and newly merge segments are written in compound file format.
getUseCompoundFile() - Method in class org.apache.lucene.index.SegmentInfo
Returns true if this segment is stored as a compound file; else, false.
getUseCompoundFile() - Method in class org.apache.lucene.index.TieredMergePolicy

getUseOldRangeQuery() - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getUserData() - Method in class org.apache.lucene.index.IndexCommit
Returns userData, previously passed to IndexWriter.commit(Map) for this commit.
getUserData() - Method in class org.apache.lucene.index.SegmentInfos

getUserData() - Method in class org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint

getUseUnmap() - Method in class org.apache.lucene.store.MMapDirectory
Returns true, if the unmap workaround is enabled.
getUTF16SortedAsUTF8Comparator() - Static method in class org.apache.lucene.util.CharsRef

getUTF8SortedAsUnicodeComparator() - Static method in class org.apache.lucene.util.BytesRef

getUTF8SortedAsUTF16Comparator() - Static method in class org.apache.lucene.util.BytesRef

getValue() - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree.Iterator

getValue() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token
An optional attribute value of the Token.
getValue(String) - Method in class org.apache.lucene.benchmark.quality.QualityQuery
Return the value of a certain name-value pair.
getValue() - Method in interface org.apache.lucene.facet.search.results.FacetResultNode
Value of this result - usually either count or a value derived from some computing on the association of it.
getValue() - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode

getValue() - Method in class org.apache.lucene.queryParser.core.nodes.BoostQueryNode
Returns the boost value.
getValue() - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

getValue() - Method in class org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode

getValue() - Method in class org.apache.lucene.queryParser.core.nodes.PathQueryNode.QueryText

getValue() - Method in class org.apache.lucene.queryParser.core.nodes.PhraseSlopQueryNode

getValue() - Method in class org.apache.lucene.queryParser.core.nodes.SlopQueryNode

getValue() - Method in interface org.apache.lucene.queryParser.core.nodes.ValueQueryNode

getValue() - Method in class org.apache.lucene.queryParser.standard.nodes.NumericQueryNode
Returns the numeric value as Number.
getValue() - Method in class org.apache.lucene.queryParser.standard.parser.Token
An optional attribute value of the Token.
getValue() - Method in class org.apache.lucene.queryParser.surround.parser.Token
An optional attribute value of the Token.
getValue() - Method in class org.apache.lucene.queryParser.Token
An optional attribute value of the Token.
getValue() - Method in class org.apache.lucene.search.BooleanQuery.BooleanWeight

getValue() - Method in class org.apache.lucene.search.ConstantScoreQuery.ConstantWeight

getValue() - Method in class org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight
Return our boost
getValue() - Method in class org.apache.lucene.search.Explanation
The value assigned to this explanation node.
getValue() - Method in class org.apache.lucene.search.FieldCache.CacheEntry

getValue() - Method in class org.apache.lucene.search.spans.SpanWeight

getValue() - Method in class org.apache.lucene.search.Weight
The weight for this query.
getValueOf(FacetArrays, int) - Method in class org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest

getValueOf(FacetArrays, int) - Method in class org.apache.lucene.facet.search.params.association.AssociationIntSumFacetRequest

getValueOf(FacetArrays, int) - Method in class org.apache.lucene.facet.search.params.CountFacetRequest

getValueOf(FacetArrays, int) - Method in class org.apache.lucene.facet.search.params.FacetRequest
Return the value of a category used for facets computations for this request.
getValueOf(FacetArrays, int) - Method in class org.apache.lucene.facet.search.params.ScoreFacetRequest

getValues(int) - Method in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree

getValues(String) - Method in class org.apache.lucene.document.Document
Returns an array of values of the field specified as the method parameter.
getValues() - Method in class org.apache.lucene.search.FieldComparator.StringOrdValComparator

getValues(IndexReader) - Method in class org.apache.lucene.search.function.FieldCacheSource

getValues(IndexReader) - Method in class org.apache.lucene.search.function.OrdFieldSource

getValues(IndexReader) - Method in class org.apache.lucene.search.function.ReverseOrdFieldSource

getValues(IndexReader) - Method in class org.apache.lucene.search.function.ValueSource
Return the DocValues used by the function query.
getVectorSpace() - Method in class org.apache.lucene.store.instantiated.InstantiatedDocument

getVersion() - Method in class org.apache.lucene.analysis.hunspell.HunspellDictionary

getVersion() - Method in class org.apache.lucene.index.FilterIndexReader

getVersion() - Method in class org.apache.lucene.index.IndexCommit
Deprecated. use IndexCommit.getGeneration() instead
getVersion() - Method in class org.apache.lucene.index.IndexReader
Version number when this IndexReader was opened.
getVersion() - Method in class org.apache.lucene.index.MultiReader
Not implemented.
getVersion() - Method in class org.apache.lucene.index.ParallelReader
Not implemented.
getVersion() - Method in class org.apache.lucene.index.SegmentInfo
Returns the version of the code which wrote the segment.
getVersion() - Method in class org.apache.lucene.index.SegmentInfos
version number when this SegmentInfos was generated.
getVersion() - Method in class org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint

getVersion() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndex
Deprecated.
getVersion() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated. An InstantiatedIndexReader is not a snapshot in time, it is completely in sync with the latest commit to the store!
getVersionComparator() - Static method in class org.apache.lucene.util.StringHelper

getWeight(Token) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec
Deprecated.
getWeight(Token) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec
Deprecated. Returns a 32 bit float from the payload, or 1f it null.
getWeight(Token) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec
Deprecated. Have this method return 1f in order to 'disable' weights.
getWeight(Token) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec
Deprecated.
getWeight() - Method in class org.apache.lucene.queryParser.surround.query.SrndQuery

getWeight() - Method in class org.apache.lucene.search.highlight.WeightedTerm

getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo>) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo>) - Method in class org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder
Sort by score the list of WeightedFragInfo
getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo>) - Method in class org.apache.lucene.search.vectorhighlight.SimpleFragmentsBuilder
do nothing.
getWeightedSpanTerm(String) - Method in class org.apache.lucene.search.highlight.QueryScorer
Retrieve the WeightedSpanTerm for the specified token.
getWeightedSpanTerms(Query, TokenStream) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor
Creates a Map of WeightedSpanTerms from the given Query and TokenStream.
getWeightedSpanTerms(Query, TokenStream, String) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor
Creates a Map of WeightedSpanTerms from the given Query and TokenStream.
getWeightedSpanTermsWithScores(Query, TokenStream, String, IndexReader) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor
Creates a Map of WeightedSpanTerms from the given Query and TokenStream.
getWeightOperator() - Method in class org.apache.lucene.queryParser.surround.query.SrndQuery

getWeightString() - Method in class org.apache.lucene.queryParser.surround.query.SrndQuery

getWildcardQuery(String, String) - Method in class org.apache.lucene.queryParser.analyzing.AnalyzingQueryParser
Called when parser parses an input term token that contains one or more wildcard characters (like *), but is not a prefix term token (one that has just a single * character at the end).
getWildcardQuery(String, String) - Method in class org.apache.lucene.queryParser.complexPhrase.ComplexPhraseQueryParser

getWildcardQuery(String, String) - Method in class org.apache.lucene.queryParser.MultiFieldQueryParser

getWildcardQuery(String, String) - Method in class org.apache.lucene.queryParser.QueryParser
Factory method for generating a query.
getWildcardQuery(String, String) - Method in class org.apache.lucene.queryParser.QueryParserTestBase.QPTestParser

getWildcardQuery(String, String) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
getWordCost(int) - Method in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

getWordCost(int) - Method in interface org.apache.lucene.analysis.ja.dict.Dictionary
Get word cost of specified word
getWordCost(int) - Method in class org.apache.lucene.analysis.ja.dict.UserDictionary

getWordSet(Reader, CharArraySet) - Static method in class org.apache.lucene.analysis.WordlistLoader
Reads lines from a Reader and adds every line as an entry to a CharArraySet (omitting leading and trailing whitespace).
getWordSet(Reader, Version) - Static method in class org.apache.lucene.analysis.WordlistLoader
Reads lines from a Reader and adds every line as an entry to a CharArraySet (omitting leading and trailing whitespace).
getWordSet(Reader, String, Version) - Static method in class org.apache.lucene.analysis.WordlistLoader
Reads lines from a Reader and adds every non-comment line as an entry to a CharArraySet (omitting leading and trailing whitespace).
getWordSet(Reader, String, CharArraySet) - Static method in class org.apache.lucene.analysis.WordlistLoader
Reads lines from a Reader and adds every non-comment line as an entry to a CharArraySet (omitting leading and trailing whitespace).
getWordsIterator() - Method in interface org.apache.lucene.search.spell.Dictionary
Return all words present in the dictionary
getWordsIterator() - Method in class org.apache.lucene.search.spell.HighFrequencyDictionary

getWordsIterator() - Method in class org.apache.lucene.search.spell.LuceneDictionary

getWordsIterator() - Method in class org.apache.lucene.search.spell.PlainTextDictionary

getWordsIterator() - Method in class org.apache.lucene.search.suggest.FileDictionary

getWriteLockTimeout() - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.getWriteLockTimeout()
getWriteLockTimeout() - Method in class org.apache.lucene.index.IndexWriterConfig
Returns allowed timeout when acquiring the write lock.
getWriter(DataOutput, int, int) - Static method in class org.apache.lucene.util.packed.PackedInts
Create a packed integer array writer for the given number of values at the given bits/value.
getX() - Method in class org.apache.lucene.spatial.geometry.CartesianPoint
Deprecated.
getX() - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
getX() - Method in class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated.
getY() - Method in class org.apache.lucene.spatial.geometry.CartesianPoint
Deprecated.
getY() - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
getY() - Method in class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated.
getYoungestChildArray() - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyReader.ChildrenArrays
getYoungestChildArray() returns an int array of size getSize() listing the ordinal of the youngest (highest numbered) child category of each category in the taxonomy.
GradientFormatter - Class in org.apache.lucene.search.highlight
Formats text with different color intensity depending on the score of the term.
GradientFormatter(float, String, String, String, String) - Constructor for class org.apache.lucene.search.highlight.GradientFormatter
Sets the color range for the IDF scores
GraphvizFormatter - Class in org.apache.lucene.analysis.ja
Outputs the dot (graphviz) string for the viterbi lattice.
GraphvizFormatter(ConnectionCosts) - Constructor for class org.apache.lucene.analysis.ja.GraphvizFormatter

GREEK - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

GreekAnalyzer - Class in org.apache.lucene.analysis.el
Analyzer for the Greek language.
GreekAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.el.GreekAnalyzer
Builds an analyzer with the default stop words.
GreekAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.el.GreekAnalyzer
Builds an analyzer with the given stop words.
GreekAnalyzer(Version, String...) - Constructor for class org.apache.lucene.analysis.el.GreekAnalyzer
Deprecated. use GreekAnalyzer.GreekAnalyzer(Version, Set) instead
GreekAnalyzer(Version, Map<?, ?>) - Constructor for class org.apache.lucene.analysis.el.GreekAnalyzer
Deprecated. use GreekAnalyzer.GreekAnalyzer(Version, Set) instead
GreekLowerCaseFilter - Class in org.apache.lucene.analysis.el
Normalizes token text to lower case, removes some Greek diacritics, and standardizes final sigma to sigma.
GreekLowerCaseFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.el.GreekLowerCaseFilter
Deprecated. Use GreekLowerCaseFilter.GreekLowerCaseFilter(Version, TokenStream) instead.
GreekLowerCaseFilter(Version, TokenStream) - Constructor for class org.apache.lucene.analysis.el.GreekLowerCaseFilter
Create a GreekLowerCaseFilter that normalizes Greek token text.
GreekStemFilter - Class in org.apache.lucene.analysis.el
A TokenFilter that applies GreekStemmer to stem Greek words.
GreekStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.el.GreekStemFilter

GreekStemmer - Class in org.apache.lucene.analysis.el
A stemmer for Greek words, according to: Development of a Stemmer for the Greek Language. Georgios Ntais
GreekStemmer() - Constructor for class org.apache.lucene.analysis.el.GreekStemmer

GROUD - Static variable in class org.apache.lucene.util.collections.IntToIntMap

GROUND - Static variable in class org.apache.lucene.util.collections.IntToDoubleMap

groupDocs - Variable in class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector

GroupDocs<GROUP_VALUE_TYPE> - Class in org.apache.lucene.search.grouping
Represents one group in the results.
GroupDocs(float, int, ScoreDoc[], GROUP_VALUE_TYPE, Object[]) - Constructor for class org.apache.lucene.search.grouping.GroupDocs

groupHead - Variable in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.TemporalResult

groupHeadsSize() - Method in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector

groupMap - Variable in class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector

GroupQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A GroupQueryNode represents a location where the original user typed real parenthesis on the query string.
GroupQueryNode(QueryNode) - Constructor for class org.apache.lucene.queryParser.core.nodes.GroupQueryNode
This QueryNode is used to identify parenthesis on the original query string
GroupQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
Builds no object, it only returns the Query object set on the GroupQueryNode object using a QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID tag.
GroupQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.GroupQueryNodeBuilder

GroupQueryNodeProcessor - Class in org.apache.lucene.queryParser.standard.processors
The SyntaxParser generates query node trees that consider the boolean operator precedence, but Lucene current syntax does not support boolean precedence, so this processor remove all the precedence and apply the equivalent modifier according to the boolean operation defined on an specific query node.
GroupQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.GroupQueryNodeProcessor

groups - Variable in class org.apache.lucene.search.grouping.TopGroups
Group results in groupSort order
groupSort - Variable in class org.apache.lucene.search.grouping.TopGroups
How groups are sorted against each other
groupSortValues - Variable in class org.apache.lucene.search.grouping.GroupDocs
Matches the groupSort passed to AbstractFirstPassGroupingCollector.
groupValue - Variable in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.GroupHead

groupValue - Variable in class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector.SearchGroupDocs

groupValue - Variable in class org.apache.lucene.search.grouping.GroupDocs
The groupField value for all docs in this group; this may be null if hits did not have the groupField.
groupValue - Variable in class org.apache.lucene.search.grouping.SearchGroup
The value that defines this group
grow(short[], int) - Static method in class org.apache.lucene.util.ArrayUtil

grow(short[]) - Static method in class org.apache.lucene.util.ArrayUtil

grow(float[], int) - Static method in class org.apache.lucene.util.ArrayUtil

grow(float[]) - Static method in class org.apache.lucene.util.ArrayUtil

grow(double[], int) - Static method in class org.apache.lucene.util.ArrayUtil

grow(double[]) - Static method in class org.apache.lucene.util.ArrayUtil

grow(int[], int) - Static method in class org.apache.lucene.util.ArrayUtil

grow(int[]) - Static method in class org.apache.lucene.util.ArrayUtil

grow(long[], int) - Static method in class org.apache.lucene.util.ArrayUtil

grow(long[]) - Static method in class org.apache.lucene.util.ArrayUtil

grow(byte[], int) - Static method in class org.apache.lucene.util.ArrayUtil

grow(byte[]) - Static method in class org.apache.lucene.util.ArrayUtil

grow(boolean[], int) - Static method in class org.apache.lucene.util.ArrayUtil

grow(boolean[]) - Static method in class org.apache.lucene.util.ArrayUtil

grow(char[], int) - Static method in class org.apache.lucene.util.ArrayUtil

grow(char[]) - Static method in class org.apache.lucene.util.ArrayUtil

grow(int[][], int) - Static method in class org.apache.lucene.util.ArrayUtil

grow(int[][]) - Static method in class org.apache.lucene.util.ArrayUtil

grow(float[][], int) - Static method in class org.apache.lucene.util.ArrayUtil

grow(float[][]) - Static method in class org.apache.lucene.util.ArrayUtil

grow(int) - Method in class org.apache.lucene.util.BytesRef
Used to grow the reference array.
grow() - Method in class org.apache.lucene.util.BytesRefHash.BytesStartArray
Grows the BytesRefHash.BytesStartArray
grow() - Method in class org.apache.lucene.util.BytesRefHash.DirectBytesStartArray

grow() - Method in class org.apache.lucene.util.BytesRefHash.TrackingDirectBytesStartArray

grow(int) - Method in class org.apache.lucene.util.CharsRef
Used to grow the reference array.
grow() - Method in class org.apache.lucene.util.collections.ArrayHashMap
Allocates a new map of double the capacity, and fast-insert the old key-value pairs.
grow() - Method in class org.apache.lucene.util.collections.FloatToObjectMap
Grows the map.
grow() - Method in class org.apache.lucene.util.collections.IntHashSet
Grows the map.
grow() - Method in class org.apache.lucene.util.collections.IntToDoubleMap
Grows the map.
grow() - Method in class org.apache.lucene.util.collections.IntToIntMap
Grows the map.
grow() - Method in class org.apache.lucene.util.collections.IntToObjectMap
Grows the map.
grow() - Method in class org.apache.lucene.util.collections.ObjectToFloatMap
Grows the map.
grow() - Method in class org.apache.lucene.util.collections.ObjectToIntMap
Grows the map.
grow() - Method in class org.apache.lucene.util.fst.BytesRefFSTEnum

grow() - Method in class org.apache.lucene.util.fst.IntsRefFSTEnum

grow(int) - Method in class org.apache.lucene.util.IntsRef
Used to grow the reference array.
GrowableWriter - Class in org.apache.lucene.util.packed
Implements PackedInts.Mutable, but grows the bit count of the underlying packed ints on-demand.
GrowableWriter(int, int, boolean) - Constructor for class org.apache.lucene.util.packed.GrowableWriter

H

HAMZA_ABOVE - Static variable in class org.apache.lucene.analysis.fa.PersianNormalizer

HAN - Static variable in class org.apache.lucene.analysis.cjk.CJKBigramFilter
bigram flag for Han Ideographs
handleEndOfInput() - Method in class org.apache.lucene.facet.index.streaming.CategoryListTokenizer
A method invoked once when the input stream ends, for subclass-specific processing.
handleMergeException(Throwable) - Method in class org.apache.lucene.index.ConcurrentMergeScheduler
Called when an exception is hit in a background merge thread
handleStartOfInput() - Method in class org.apache.lucene.facet.enhancements.association.AssociationListTokenizer

handleStartOfInput() - Method in class org.apache.lucene.facet.index.streaming.CategoryListTokenizer
A method invoked once when the input stream begins, for subclass-specific processing.
handleStartOfInput() - Method in class org.apache.lucene.facet.index.streaming.CountingListTokenizer

HANGUL - Static variable in class org.apache.lucene.analysis.cjk.CJKBigramFilter
bigram flag for Hangul
HANGUL - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizer

HANGUL - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

HANGUL_TYPE - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizerImpl

HANGUL_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated.
HANGUL_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated.
HANGUL_TYPE - Static variable in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated.
HANGUL_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Deprecated. use UAX29URLEmailTokenizer.TOKEN_TYPES instead
HANGUL_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl

HANZI - Static variable in class org.apache.lucene.analysis.cn.smart.CharType
Han Ideographs
has(ConfigurationKey<T>) - Method in class org.apache.lucene.queryParser.core.config.AbstractQueryConfig
Returns true if there is a value set with the given key, otherwise false.
HAS_BASEFORM - Static variable in class org.apache.lucene.analysis.ja.dict.BinaryDictionary
flag that the entry has baseform data.
HAS_BUGGY_BREAKITERATORS - Static variable in class org.apache.lucene.analysis.util.CharArrayIterator
True if this JRE has a buggy BreakIterator implementation
HAS_PRONUNCIATION - Static variable in class org.apache.lucene.analysis.ja.dict.BinaryDictionary
flag that the entry has pronunciation data.
HAS_READING - Static variable in class org.apache.lucene.analysis.ja.dict.BinaryDictionary
flag that the entry has reading data.
hasArray() - Method in class org.apache.lucene.util.packed.GrowableWriter

hasArray() - Method in interface org.apache.lucene.util.packed.PackedInts.Reader
Returns true if this implementation is backed by a native java array.
hasArray() - Method in class org.apache.lucene.util.packed.PackedInts.ReaderImpl

hasAttribute(Class<? extends Attribute>) - Method in class org.apache.lucene.util.AttributeSource
The caller must pass in a Class<? extends Attribute> value.
hasAttributes() - Method in class org.apache.lucene.util.AttributeSource
Returns true, iff this AttributeSource has any attributes
hasBeenSet() - Method in class org.apache.lucene.facet.enhancements.association.AssociationProperty
Returns whether this attribute has been set (not all categories have an association).
hasBeenSet() - Method in class org.apache.lucene.facet.index.attributes.OrdinalProperty

hasChanges - Variable in class org.apache.lucene.index.IndexReader

hasDeletions - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
True if this segment has pending deletions.
hasDeletions() - Method in class org.apache.lucene.index.FilterIndexReader

hasDeletions() - Method in class org.apache.lucene.index.IndexReader
Returns true if any documents have been deleted
hasDeletions() - Method in class org.apache.lucene.index.IndexWriter

hasDeletions() - Method in class org.apache.lucene.index.MultiReader

hasDeletions() - Method in class org.apache.lucene.index.ParallelReader

hasDeletions() - Method in class org.apache.lucene.index.SegmentInfo

hasDeletions() - Method in class org.apache.lucene.index.SegmentReader

hasDeletions() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
hasFlag(char) - Method in class org.apache.lucene.analysis.hunspell.HunspellWord
Checks whether the word has the given flag associated with it
hash(int) - Method in class org.apache.lucene.search.grouping.SentinelIntSet

hashCode() - Method in class org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl

hashCode() - Method in class org.apache.lucene.analysis.cn.smart.hhmm.SegToken

hashCode() - Method in class org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl

hashCode() - Method in class org.apache.lucene.analysis.miscellaneous.PatternAnalyzer
Returns a hash code value for the object.
hashCode() - Method in class org.apache.lucene.analysis.Token

hashCode() - Method in class org.apache.lucene.analysis.Token.TokenAttributeFactory

hashCode() - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

hashCode() - Method in class org.apache.lucene.analysis.tokenattributes.FlagsAttributeImpl

hashCode() - Method in class org.apache.lucene.analysis.tokenattributes.KeywordAttributeImpl

hashCode() - Method in class org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl

hashCode() - Method in class org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl

hashCode() - Method in class org.apache.lucene.analysis.tokenattributes.PositionIncrementAttributeImpl

hashCode() - Method in class org.apache.lucene.analysis.tokenattributes.PositionLengthAttributeImpl

hashCode() - Method in class org.apache.lucene.analysis.tokenattributes.TypeAttributeImpl

hashCode() - Method in class org.apache.lucene.facet.enhancements.association.AssociationEnhancement

hashCode() - Method in class org.apache.lucene.facet.enhancements.association.AssociationFloatProperty

hashCode() - Method in class org.apache.lucene.facet.enhancements.association.AssociationIntProperty

hashCode() - Method in class org.apache.lucene.facet.enhancements.association.AssociationsPayloadIterator

hashCode() - Method in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

hashCode() - Method in class org.apache.lucene.facet.index.attributes.OrdinalProperty

hashCode() - Method in class org.apache.lucene.facet.index.CategoryContainer

hashCode() - Method in class org.apache.lucene.facet.index.params.CategoryListParams
Hashcode is similar to CategoryListParams.equals(Object), in that it uses the term that defines this category list to derive the hashcode.
hashCode() - Method in class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams

hashCode() - Method in class org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator

hashCode() - Method in class org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator

hashCode() - Method in class org.apache.lucene.facet.search.aggregator.CountingAggregator

hashCode() - Method in class org.apache.lucene.facet.search.aggregator.ScoringAggregator

hashCode() - Method in class org.apache.lucene.facet.search.params.FacetRequest

hashCode() - Method in class org.apache.lucene.facet.search.PayloadIntDecodingIterator

hashCode() - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Calculate a hashCode for this path, used when a CategoryPath serves as a hash-table key.
hashCode(int) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Like CategoryPath.hashCode(), but find the hash function of a prefix with the given number of components, rather than of the entire path.
hashCode() - Method in class org.apache.lucene.index.IndexCommit

hashCode() - Method in class org.apache.lucene.index.Payload

hashCode() - Method in class org.apache.lucene.index.SegmentInfo

hashCode() - Method in class org.apache.lucene.index.Term

hashCode() - Method in class org.apache.lucene.index.TermVectorEntry

hashCode() - Method in class org.apache.lucene.index.TermVectorOffsetInfo

hashCode() - Method in class org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl
Deprecated.
hashCode() - Method in class org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl
Deprecated.
hashCode() - Method in class org.apache.lucene.queryParser.standard.config.BoostAttributeImpl
Deprecated.
hashCode() - Method in class org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl
Deprecated.
hashCode() - Method in class org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl
Deprecated.
hashCode() - Method in class org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl
Deprecated.
hashCode() - Method in class org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl
Deprecated.
hashCode() - Method in class org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl
Deprecated.
hashCode() - Method in class org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl
Deprecated.
hashCode() - Method in class org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl
Deprecated.
hashCode() - Method in class org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl
Deprecated.
hashCode() - Method in class org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl
Deprecated.
hashCode() - Method in class org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl
Deprecated.
hashCode() - Method in class org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl
Deprecated.
hashCode() - Method in class org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl
Deprecated.
hashCode() - Method in class org.apache.lucene.search.BooleanClause
Returns a hash code value for this object.
hashCode() - Method in class org.apache.lucene.search.BooleanFilter

hashCode() - Method in class org.apache.lucene.search.BooleanQuery
Returns a hash code value for this object.
hashCode() - Method in class org.apache.lucene.search.BoostingQuery

hashCode() - Method in class org.apache.lucene.search.CachingSpanFilter

hashCode() - Method in class org.apache.lucene.search.CachingWrapperFilter

hashCode() - Method in class org.apache.lucene.search.CachingWrapperFilterHelper

hashCode() - Method in class org.apache.lucene.search.ConstantScoreQuery

hashCode() - Method in class org.apache.lucene.search.DisjunctionMaxQuery
Compute a hash code for hashing us
hashCode() - Method in class org.apache.lucene.search.DuplicateFilter

hashCode() - Method in class org.apache.lucene.search.FieldCacheRangeFilter

hashCode() - Method in class org.apache.lucene.search.FieldValueFilter

hashCode() - Method in class org.apache.lucene.search.FilterClause

hashCode() - Method in class org.apache.lucene.search.FilteredQuery
Returns a hash code value for this object.
hashCode() - Method in class org.apache.lucene.search.function.CustomScoreQuery
Returns a hash code value for this object.
hashCode() - Method in class org.apache.lucene.search.function.FieldCacheSource

hashCode() - Method in class org.apache.lucene.search.function.OrdFieldSource

hashCode() - Method in class org.apache.lucene.search.function.ReverseOrdFieldSource

hashCode() - Method in class org.apache.lucene.search.function.ValueSource
Needed for possible caching of query results - used by ValueSourceQuery.hashCode().
hashCode() - Method in class org.apache.lucene.search.function.ValueSourceQuery
Returns a hash code value for this object.
hashCode() - Method in class org.apache.lucene.search.FuzzyLikeThisQuery

hashCode() - Method in class org.apache.lucene.search.FuzzyQuery

hashCode() - Method in class org.apache.lucene.search.grouping.SearchGroup

hashCode() - Method in class org.apache.lucene.search.join.ToChildBlockJoinQuery

hashCode() - Method in class org.apache.lucene.search.join.ToParentBlockJoinQuery

hashCode() - Method in class org.apache.lucene.search.MatchAllDocsQuery

hashCode() - Method in class org.apache.lucene.search.MultiPhraseQuery
Returns a hash code value for this object.
hashCode() - Method in class org.apache.lucene.search.MultiTermQuery

hashCode() - Method in class org.apache.lucene.search.MultiTermQueryWrapperFilter

hashCode() - Method in class org.apache.lucene.search.NGramPhraseQuery
Returns a hash code value for this object.
hashCode() - Method in class org.apache.lucene.search.NumericRangeQuery

hashCode() - Method in class org.apache.lucene.search.payloads.AveragePayloadFunction

hashCode() - Method in class org.apache.lucene.search.payloads.MaxPayloadFunction

hashCode() - Method in class org.apache.lucene.search.payloads.MinPayloadFunction

hashCode() - Method in class org.apache.lucene.search.payloads.PayloadFunction

hashCode() - Method in class org.apache.lucene.search.payloads.PayloadNearQuery

hashCode() - Method in class org.apache.lucene.search.payloads.PayloadTermQuery

hashCode() - Method in class org.apache.lucene.search.PhraseQuery
Returns a hash code value for this object.
hashCode() - Method in class org.apache.lucene.search.PrefixQuery

hashCode() - Method in class org.apache.lucene.search.Query

hashCode() - Method in class org.apache.lucene.search.QueryWrapperFilter

hashCode() - Method in class org.apache.lucene.search.regex.JakartaRegexpCapabilities

hashCode() - Method in class org.apache.lucene.search.regex.JavaUtilRegexCapabilities

hashCode() - Method in class org.apache.lucene.search.regex.RegexQuery

hashCode() - Method in class org.apache.lucene.search.Sort
Returns a hash code value for this object.
hashCode() - Method in class org.apache.lucene.search.SortField
Returns true if o is equal to this.
hashCode() - Method in class org.apache.lucene.search.SpanQueryFilter

hashCode() - Method in class org.apache.lucene.search.spans.FieldMaskingSpanQuery

hashCode() - Method in class org.apache.lucene.search.spans.SpanFirstQuery

hashCode() - Method in class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper

hashCode() - Method in class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite

hashCode() - Method in class org.apache.lucene.search.spans.SpanNearPayloadCheckQuery

hashCode() - Method in class org.apache.lucene.search.spans.SpanNearQuery

hashCode() - Method in class org.apache.lucene.search.spans.SpanNotQuery

hashCode() - Method in class org.apache.lucene.search.spans.SpanOrQuery

hashCode() - Method in class org.apache.lucene.search.spans.SpanPayloadCheckQuery

hashCode() - Method in class org.apache.lucene.search.spans.SpanPositionRangeQuery

hashCode() - Method in class org.apache.lucene.search.spans.SpanTermQuery

hashCode() - Method in class org.apache.lucene.search.TermQuery
Returns a hash code value for this object.
hashCode() - Method in class org.apache.lucene.search.TermRangeQuery

hashCode() - Method in class org.apache.lucene.search.TermsFilter

hashCode() - Method in class org.apache.lucene.search.TopTermsRewrite

hashCode() - Method in class org.apache.lucene.search.WildcardQuery

hashCode() - Method in class org.apache.lucene.spatial.geohash.GeoHashDistanceFilter
Deprecated. Returns a hash code value for this object.
hashCode() - Method in class org.apache.lucene.spatial.geometry.CartesianPoint
Deprecated.
hashCode() - Method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
hashCode() - Method in class org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.
hashCode() - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated.
hashCode() - Method in class org.apache.lucene.spatial.geometry.shape.LineSegment
Deprecated.
hashCode() - Method in class org.apache.lucene.spatial.geometry.shape.LLRect
Deprecated.
hashCode() - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
hashCode() - Method in class org.apache.lucene.spatial.geometry.shape.Rectangle
Deprecated.
hashCode() - Method in class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated.
hashCode() - Method in class org.apache.lucene.spatial.tier.DistanceFilter
Deprecated. Returns a hash code value for this object.
hashCode() - Method in class org.apache.lucene.spatial.tier.LatLongDistanceFilter
Deprecated. Returns a hash code value for this object.
hashCode(char[], int, int) - Static method in class org.apache.lucene.util.ArrayUtil
Returns hash of chars in range start (inclusive) to end (inclusive)
hashCode(byte[], int, int) - Static method in class org.apache.lucene.util.ArrayUtil
Returns hash of bytes in range start (inclusive) to end (inclusive)
hashCode() - Method in class org.apache.lucene.util.AttributeSource

hashCode() - Method in class org.apache.lucene.util.BytesRef
Calculates the hash code as required by TermsHash during indexing.
hashCode() - Method in class org.apache.lucene.util.CharsRef

hashCode() - Method in class org.apache.lucene.util.collections.ArrayHashMap

hashCode() - Method in class org.apache.lucene.util.collections.FloatToObjectMap

hashCode() - Method in class org.apache.lucene.util.collections.IntArray
Calculates a hash-code for HashTables
hashCode() - Method in class org.apache.lucene.util.collections.IntToDoubleMap

hashCode() - Method in class org.apache.lucene.util.collections.IntToIntMap

hashCode() - Method in class org.apache.lucene.util.collections.IntToObjectMap

hashCode() - Method in class org.apache.lucene.util.collections.ObjectToFloatMap

hashCode() - Method in class org.apache.lucene.util.collections.ObjectToIntMap

hashCode() - Method in class org.apache.lucene.util.FixedBitSet

hashCode() - Method in class org.apache.lucene.util.fst.PairOutputs.Pair

hashCode() - Method in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs.TwoLongs

hashCode() - Method in class org.apache.lucene.util.IntsRef

hashCode() - Method in class org.apache.lucene.util.OpenBitSet

hashCode() - Method in class org.tartarus.snowball.ext.ArmenianStemmer

hashCode() - Method in class org.tartarus.snowball.ext.BasqueStemmer

hashCode() - Method in class org.tartarus.snowball.ext.CatalanStemmer

hashCode() - Method in class org.tartarus.snowball.ext.IrishStemmer

hashCodeOfSerialized(CharSequence, int) - Static method in class org.apache.lucene.facet.taxonomy.CategoryPath
This method calculates a hash function of a path that has been written to (using CategoryPath.serializeAppendTo(Appendable)) a character buffer.
hasMoreElements() - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree.Iterator

hasNext() - Method in class org.apache.lucene.analysis.CharArrayMap.EntryIterator

hasNext() - Method in class org.apache.lucene.analysis.CharArraySet.CharArraySetIterator
Deprecated.
hasNext() - Method in class org.apache.lucene.benchmark.byTask.feeds.DirContentSource.Iterator

hasNext() - Method in interface org.apache.lucene.util.collections.DoubleIterator

hasNext() - Method in interface org.apache.lucene.util.collections.FloatIterator

hasNext() - Method in interface org.apache.lucene.util.collections.IntIterator

hasNorms(String) - Method in class org.apache.lucene.index.FilterIndexReader

hasNorms(String) - Method in class org.apache.lucene.index.IndexReader
Returns true if there are norms stored for this field.
hasNorms(String) - Method in class org.apache.lucene.index.MultiReader

hasNorms(String) - Method in class org.apache.lucene.index.ParallelReader

hasNorms(String) - Method in class org.apache.lucene.index.SegmentReader

hasProx - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
True if at least one of the fields in this segment has position data
hasProx() - Method in class org.apache.lucene.index.FieldInfos
Returns true if any fields do not omitTermFreqAndPositions
hasRoom(int) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.Cl2oTaxonomyWriterCache

hasRoom(int) - Method in class org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache

hasRoom(int) - Method in interface org.apache.lucene.facet.taxonomy.writercache.TaxonomyWriterCache
Sometimes the cache is either unlimited in size, or limited by a very big size, and in that case when we add a lot of categories it might make sense to pre-load the cache with all the existing categories.
hasSeparateNorms(int) - Method in class org.apache.lucene.index.SegmentInfo
Returns true if this field for this segment has saved a separate norms file (__N.sX).
hasSeparateNorms() - Method in class org.apache.lucene.index.SegmentInfo
Returns true if any fields in this segment have separate norms.
hasUncaughtExceptions() - Method in class org.apache.lucene.util.UncaughtExceptionsRule
Just a check if anything's been caught.
hasVectors() - Method in class org.apache.lucene.index.FieldInfos

hasVectors - Variable in class org.apache.lucene.index.SegmentWriteState

haversine(double, double, double, double, double) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated. Computes the haversine distance between two points.
HEADER - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

HEADER - Static variable in class org.apache.lucene.analysis.ja.dict.ConnectionCosts

header - Variable in class org.apache.lucene.benchmark.byTask.feeds.LineDocSource.LineParser

headerLength(String) - Static method in class org.apache.lucene.util.CodecUtil

HEADING - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

HEADING_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

Heap<T> - Interface in org.apache.lucene.facet.search
Declares an interface for heap (and heap alike) structures, handling a given type T
HEH - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

HEH - Static variable in class org.apache.lucene.analysis.ar.ArabicStemmer

HEH - Static variable in class org.apache.lucene.analysis.fa.PersianNormalizer

HEH_GOAL - Static variable in class org.apache.lucene.analysis.fa.PersianNormalizer

HEH_YEH - Static variable in class org.apache.lucene.analysis.fa.PersianNormalizer

HEX - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
hexToInt(String) - Static method in class org.apache.lucene.search.highlight.GradientFormatter
Converts a hex string into an int.
HHMMSegmenter - Class in org.apache.lucene.analysis.cn.smart.hhmm
Finds the optimal segmentation of a sentence into Chinese words
HHMMSegmenter() - Constructor for class org.apache.lucene.analysis.cn.smart.hhmm.HHMMSegmenter

hi - Variable in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree
Pointer to high branch.
HighFreqTerms - Class in org.apache.lucene.misc
HighFreqTerms class extracts the top n most frequent terms (by document frequency ) from an existing Lucene index and reports their document frequency.
HighFreqTerms() - Constructor for class org.apache.lucene.misc.HighFreqTerms

HighFrequencyDictionary - Class in org.apache.lucene.search.spell
HighFrequencyDictionary: terms taken from the given field of a Lucene index, which appear in a number of documents above a given threshold.
HighFrequencyDictionary(IndexReader, String, float) - Constructor for class org.apache.lucene.search.spell.HighFrequencyDictionary

highlightBackground - Variable in class org.apache.lucene.search.highlight.GradientFormatter

highlighter - Variable in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

highlighter - Variable in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask

Highlighter - Class in org.apache.lucene.search.highlight
Class used to markup highlighted terms found in the best sections of a text, using configurable Fragmenter, Scorer, Formatter, Encoder and tokenizers.
Highlighter(Scorer) - Constructor for class org.apache.lucene.search.highlight.Highlighter

Highlighter(Formatter, Scorer) - Constructor for class org.apache.lucene.search.highlight.Highlighter

Highlighter(Formatter, Encoder, Scorer) - Constructor for class org.apache.lucene.search.highlight.Highlighter

highlightForeground - Variable in class org.apache.lucene.search.highlight.GradientFormatter

highlightTerm(String, TokenGroup) - Method in interface org.apache.lucene.search.highlight.Formatter

highlightTerm(String, TokenGroup) - Method in class org.apache.lucene.search.highlight.GradientFormatter

highlightTerm(String, TokenGroup) - Method in class org.apache.lucene.search.highlight.SimpleHTMLFormatter

highlightTerm(String, TokenGroup) - Method in class org.apache.lucene.search.highlight.SpanGradientFormatter

HIKID - Static variable in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode
Index values for accessing relatives array.
HindiAnalyzer - Class in org.apache.lucene.analysis.hi
Analyzer for Hindi.
HindiAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.hi.HindiAnalyzer
Builds an analyzer with the given stop words
HindiAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.hi.HindiAnalyzer
Builds an analyzer with the given stop words
HindiAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.hi.HindiAnalyzer
Builds an analyzer with the default stop words: HindiAnalyzer.DEFAULT_STOPWORD_FILE.
HindiNormalizationFilter - Class in org.apache.lucene.analysis.hi
A TokenFilter that applies HindiNormalizer to normalize the orthography.
HindiNormalizationFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.hi.HindiNormalizationFilter

HindiNormalizer - Class in org.apache.lucene.analysis.hi
Normalizer for Hindi.
HindiNormalizer() - Constructor for class org.apache.lucene.analysis.hi.HindiNormalizer

HindiStemFilter - Class in org.apache.lucene.analysis.hi
A TokenFilter that applies HindiStemmer to stem Hindi words.
HindiStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.hi.HindiStemFilter

HindiStemmer - Class in org.apache.lucene.analysis.hi
Light Stemmer for Hindi.
HindiStemmer() - Constructor for class org.apache.lucene.analysis.hi.HindiStemmer

HIRAGANA - Static variable in class org.apache.lucene.analysis.cjk.CJKBigramFilter
bigram flag for Hiragana
HIRAGANA - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

HIRAGANA - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizer

HIRAGANA - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

HIRAGANA_TYPE - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizerImpl

HIRAGANA_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated.
HIRAGANA_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated.
HIRAGANA_TYPE - Static variable in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated.
HIRAGANA_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Deprecated. use UAX29URLEmailTokenizer.TOKEN_TYPES instead
HIRAGANA_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl

hits2str(ScoreDoc[], ScoreDoc[], int, int) - Static method in class org.apache.lucene.search.CheckHits

HOST - Static variable in class org.apache.lucene.analysis.standard.ClassicTokenizer

HOST - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizer
Deprecated.
HOST_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

hstrcmp(char[], int, char[], int) - Method in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree
String compare, returns 0 if equal or t is a substring of s
HTMLDocument() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser

htmlEncode(String) - Static method in class org.apache.lucene.search.highlight.SimpleHTMLEncoder
Encode string into HTML
HTMLParser - Class in org.apache.lucene.benchmark.byTask.feeds.demohtml

HTMLParser(InputStream) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Constructor with InputStream.
HTMLParser(InputStream, String) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Constructor with InputStream and supplied encoding
HTMLParser(Reader) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Constructor.
HTMLParser(HTMLParserTokenManager) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Constructor with generated Token Manager.
HTMLParser - Interface in org.apache.lucene.benchmark.byTask.feeds
HTML Parsing Interface for test purposes
HTMLParserConstants - Interface in org.apache.lucene.benchmark.byTask.feeds.demohtml
Token literal values and constants.
HTMLParserTokenManager - Class in org.apache.lucene.benchmark.byTask.feeds.demohtml
Token Manager.
HTMLParserTokenManager(SimpleCharStream) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager
Constructor.
HTMLParserTokenManager(SimpleCharStream, int) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager
Constructor.
HTMLStripCharFilter - Class in org.apache.lucene.analysis.charfilter
A CharFilter that wraps another Reader and attempts to strip out HTML constructs.
HTMLStripCharFilter(CharStream) - Constructor for class org.apache.lucene.analysis.charfilter.HTMLStripCharFilter

HTMLStripCharFilter(CharStream, Set<String>) - Constructor for class org.apache.lucene.analysis.charfilter.HTMLStripCharFilter

humanReadableUnits(long) - Static method in class org.apache.lucene.util.RamUsageEstimator
Returns size in human-readable units (GB, MB, KB or bytes).
humanReadableUnits(long, DecimalFormat) - Static method in class org.apache.lucene.util.RamUsageEstimator
Returns size in human-readable units (GB, MB, KB or bytes).
humanSizeOf(Object) - Static method in class org.apache.lucene.util.RamUsageEstimator
Return a human-readable size of a given object.
HungarianAnalyzer - Class in org.apache.lucene.analysis.hu
Analyzer for Hungarian.
HungarianAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.hu.HungarianAnalyzer
Builds an analyzer with the default stop words: HungarianAnalyzer.DEFAULT_STOPWORD_FILE.
HungarianAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.hu.HungarianAnalyzer
Builds an analyzer with the given stop words.
HungarianAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.hu.HungarianAnalyzer
Builds an analyzer with the given stop words.
HungarianLightStemFilter - Class in org.apache.lucene.analysis.hu
A TokenFilter that applies HungarianLightStemmer to stem Hungarian words.
HungarianLightStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.hu.HungarianLightStemFilter

HungarianLightStemmer - Class in org.apache.lucene.analysis.hu
Light Stemmer for Hungarian.
HungarianLightStemmer() - Constructor for class org.apache.lucene.analysis.hu.HungarianLightStemmer

HungarianStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
HungarianStemmer() - Constructor for class org.tartarus.snowball.ext.HungarianStemmer

HunspellAffix - Class in org.apache.lucene.analysis.hunspell
Wrapper class representing a hunspell affix
HunspellAffix() - Constructor for class org.apache.lucene.analysis.hunspell.HunspellAffix

HunspellDictionary - Class in org.apache.lucene.analysis.hunspell
In-memory structure for the dictionary (.dic) and affix (.aff) data of a hunspell dictionary.
HunspellDictionary(InputStream, InputStream, Version) - Constructor for class org.apache.lucene.analysis.hunspell.HunspellDictionary
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files.
HunspellDictionary(InputStream, InputStream, Version, boolean) - Constructor for class org.apache.lucene.analysis.hunspell.HunspellDictionary
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files.
HunspellDictionary(InputStream, List<InputStream>, Version, boolean) - Constructor for class org.apache.lucene.analysis.hunspell.HunspellDictionary
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files.
HunspellStemFilter - Class in org.apache.lucene.analysis.hunspell
TokenFilter that uses hunspell affix rules and words to stem tokens.
HunspellStemFilter(TokenStream, HunspellDictionary) - Constructor for class org.apache.lucene.analysis.hunspell.HunspellStemFilter
Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using affix rules in the provided HunspellDictionary
HunspellStemFilter(TokenStream, HunspellDictionary, boolean) - Constructor for class org.apache.lucene.analysis.hunspell.HunspellStemFilter
Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using affix rules in the provided HunspellDictionary
HunspellStemmer - Class in org.apache.lucene.analysis.hunspell
HunspellStemmer uses the affix rules declared in the HunspellDictionary to generate one or more stems for a word.
HunspellStemmer(HunspellDictionary) - Constructor for class org.apache.lucene.analysis.hunspell.HunspellStemmer
Constructs a new HunspellStemmer which will use the provided HunspellDictionary to create its stems
HunspellStemmer.Stem - Class in org.apache.lucene.analysis.hunspell
Stem represents all information known about a stem of a word.
HunspellStemmer.Stem(char[], int) - Constructor for class org.apache.lucene.analysis.hunspell.HunspellStemmer.Stem
Creates a new Stem wrapping the given word stem
HunspellWord - Class in org.apache.lucene.analysis.hunspell
A dictionary (.dic) entry with its associated flags.
HunspellWord() - Constructor for class org.apache.lucene.analysis.hunspell.HunspellWord
Creates a new HunspellWord with no associated flags
HunspellWord(char[]) - Constructor for class org.apache.lucene.analysis.hunspell.HunspellWord
Constructs a new HunspellWord with the given flags
hyperbolicTf(float) - Method in class org.apache.lucene.misc.SweetSpotSimilarity
Uses a hyperbolic tangent function that allows for a hard max...
Hyphen - Class in org.apache.lucene.analysis.compound.hyphenation
This class represents a hyphen.
hyphenate(String, int, int) - Method in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree
Hyphenate word and return a Hyphenation object.
hyphenate(char[], int, int, int, int) - Method in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree
Hyphenate word and return an array of hyphenation points.
Hyphenation - Class in org.apache.lucene.analysis.compound.hyphenation
This class represents a hyphenated word.
HyphenationCompoundWordTokenFilter - Class in org.apache.lucene.analysis.compound
A TokenFilter that decomposes compound words found in many Germanic languages.
HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[], int, int, int, boolean) - Constructor for class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
Deprecated. Use the constructors taking Set
HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[]) - Constructor for class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
Deprecated. Use the constructors taking Set
HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set<?>) - Constructor for class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
Creates a new HyphenationCompoundWordTokenFilter instance.
HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set<?>, int, int, int, boolean) - Constructor for class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
Creates a new HyphenationCompoundWordTokenFilter instance.
HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, int, int, int) - Constructor for class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
Create a HyphenationCompoundWordTokenFilter with no dictionary.
HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree) - Constructor for class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
Create a HyphenationCompoundWordTokenFilter with no dictionary.
HyphenationCompoundWordTokenFilter(TokenStream, HyphenationTree, String[], int, int, int, boolean) - Constructor for class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
Deprecated. use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[], int, int, int, boolean) instead.
HyphenationCompoundWordTokenFilter(TokenStream, HyphenationTree, String[]) - Constructor for class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
Deprecated. use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[]) instead.
HyphenationCompoundWordTokenFilter(TokenStream, HyphenationTree, Set<?>) - Constructor for class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
Deprecated. use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set) instead.
HyphenationCompoundWordTokenFilter(TokenStream, HyphenationTree, Set<?>, int, int, int, boolean) - Constructor for class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
Deprecated. use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set, int, int, int, boolean) instead.
HyphenationException - Exception in org.apache.lucene.analysis.compound.hyphenation
This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/).
HyphenationException(String) - Constructor for exception org.apache.lucene.analysis.compound.hyphenation.HyphenationException

HyphenationTree - Class in org.apache.lucene.analysis.compound.hyphenation
This tree structure stores the hyphenation patterns in an efficient way for fast lookup.
HyphenationTree() - Constructor for class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree

I

ICUCollationKeyAnalyzer - Class in org.apache.lucene.collation
Filters KeywordTokenizer with ICUCollationKeyFilter.
ICUCollationKeyAnalyzer(Collator) - Constructor for class org.apache.lucene.collation.ICUCollationKeyAnalyzer

ICUCollationKeyFilter - Class in org.apache.lucene.collation
Converts each token into its CollationKey, and then encodes the CollationKey with IndexableBinaryStringTools, to allow it to be stored as an index term.
ICUCollationKeyFilter(TokenStream, Collator) - Constructor for class org.apache.lucene.collation.ICUCollationKeyFilter

ICUFoldingFilter - Class in org.apache.lucene.analysis.icu
A TokenFilter that applies search term folding to Unicode text, applying foldings from UTR#30 Character Foldings.
ICUFoldingFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.icu.ICUFoldingFilter
Create a new ICUFoldingFilter on the specified input
ICUNormalizer2Filter - Class in org.apache.lucene.analysis.icu
Normalize token text with ICU's Normalizer2
ICUNormalizer2Filter(TokenStream) - Constructor for class org.apache.lucene.analysis.icu.ICUNormalizer2Filter
Create a new Normalizer2Filter that combines NFKC normalization, Case Folding, and removes Default Ignorables (NFKC_Casefold)
ICUNormalizer2Filter(TokenStream, Normalizer2) - Constructor for class org.apache.lucene.analysis.icu.ICUNormalizer2Filter
Create a new Normalizer2Filter with the specified Normalizer2
ICUTokenizer - Class in org.apache.lucene.analysis.icu.segmentation
Breaks text into words according to UAX #29: Unicode Text Segmentation (http://www.unicode.org/reports/tr29/)
ICUTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.icu.segmentation.ICUTokenizer
Construct a new ICUTokenizer that breaks text into words from the given Reader.
ICUTokenizer(Reader, ICUTokenizerConfig) - Constructor for class org.apache.lucene.analysis.icu.segmentation.ICUTokenizer
Construct a new ICUTokenizer that breaks text into words from the given Reader, using a tailored BreakIterator configuration.
ICUTokenizerConfig - Class in org.apache.lucene.analysis.icu.segmentation
Class that allows for tailored Unicode Text Segmentation on a per-writing system basis.
ICUTokenizerConfig() - Constructor for class org.apache.lucene.analysis.icu.segmentation.ICUTokenizerConfig

ICUTransformFilter - Class in org.apache.lucene.analysis.icu
A TokenFilter that transforms text with ICU.
ICUTransformFilter(TokenStream, Transliterator) - Constructor for class org.apache.lucene.analysis.icu.ICUTransformFilter
Create a new ICUTransformFilter that transforms text on the given stream.
ID_FIELD - Static variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

IdentityEncoder - Class in org.apache.lucene.analysis.payloads
Does nothing other than convert the char array to a byte array using the specified encoding.
IdentityEncoder() - Constructor for class org.apache.lucene.analysis.payloads.IdentityEncoder

IdentityEncoder(Charset) - Constructor for class org.apache.lucene.analysis.payloads.IdentityEncoder

IDEOGRAPHIC - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizer

IDEOGRAPHIC - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

IDEOGRAPHIC_TYPE - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizerImpl

IDEOGRAPHIC_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated.
IDEOGRAPHIC_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated.
IDEOGRAPHIC_TYPE - Static variable in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated.
IDEOGRAPHIC_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Deprecated. use UAX29URLEmailTokenizer.TOKEN_TYPES instead
IDEOGRAPHIC_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl

idf(int, int) - Method in class org.apache.lucene.search.DefaultSimilarity
Implemented as log(numDocs/(docFreq+1)) + 1.
idf(int, int) - Method in class org.apache.lucene.search.Similarity
Computes a score factor based on a term's document frequency (the number of documents which contain the term).
idf(int, int) - Method in class org.apache.lucene.search.SimilarityDelegator
Deprecated.
idf - Variable in class org.apache.lucene.search.spans.SpanWeight

idfExplain(Term, Searcher, int) - Method in class org.apache.lucene.search.Similarity
Computes a score factor for a simple term and returns an explanation for that score factor.
idfExplain(Term, Searcher) - Method in class org.apache.lucene.search.Similarity
This method forwards to Similarity.idfExplain(Term,Searcher,int) by passing searcher.docFreq(term) as the docFreq.
idfExplain(Collection<Term>, Searcher) - Method in class org.apache.lucene.search.Similarity
Computes a score factor for a phrase.
ignoringSinglePrefixOrSuffixShingleByDefault - Static variable in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated.
image - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token
The string image of the token.
image - Variable in class org.apache.lucene.queryParser.standard.parser.Token
The string image of the token.
image - Variable in class org.apache.lucene.queryParser.surround.parser.Token
The string image of the token.
image - Variable in class org.apache.lucene.queryParser.Token
The string image of the token.
in - Variable in class org.apache.lucene.index.FilterIndexReader.FilterTermDocs

in - Variable in class org.apache.lucene.index.FilterIndexReader.FilterTermEnum

in - Variable in class org.apache.lucene.index.FilterIndexReader

in - Variable in class org.apache.lucene.index.pruning.StorePruningPolicy

in - Variable in class org.apache.lucene.index.pruning.TermPruningPolicy

in - Variable in class org.apache.lucene.util.encoding.IntDecoder
Input stream from which the encoded bytes are read
in_grouping(char[], int, int) - Method in class org.tartarus.snowball.SnowballProgram

in_grouping_b(char[], int, int) - Method in class org.tartarus.snowball.SnowballProgram

in_range(int, int) - Method in class org.tartarus.snowball.SnowballProgram

in_range_b(int, int) - Method in class org.tartarus.snowball.SnowballProgram

inBuf - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

inBuf - Variable in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

includesLower() - Method in class org.apache.lucene.search.FieldCacheRangeFilter
Returns true if the lower endpoint is inclusive
includesLower() - Method in class org.apache.lucene.search.TermRangeFilter
Returns true if the lower endpoint is inclusive
includesLower() - Method in class org.apache.lucene.search.TermRangeQuery
Returns true if the lower endpoint is inclusive
includesMax() - Method in class org.apache.lucene.search.NumericRangeFilter
Returns true if the upper endpoint is inclusive
includesMax() - Method in class org.apache.lucene.search.NumericRangeQuery
Returns true if the upper endpoint is inclusive
includesMin() - Method in class org.apache.lucene.search.NumericRangeFilter
Returns true if the lower endpoint is inclusive
includesMin() - Method in class org.apache.lucene.search.NumericRangeQuery
Returns true if the lower endpoint is inclusive
includesUpper() - Method in class org.apache.lucene.search.FieldCacheRangeFilter
Returns true if the upper endpoint is inclusive
includesUpper() - Method in class org.apache.lucene.search.TermRangeFilter
Returns true if the upper endpoint is inclusive
includesUpper() - Method in class org.apache.lucene.search.TermRangeQuery
Returns true if the upper endpoint is inclusive
InconsistentTaxonomyException - Exception in org.apache.lucene.facet.taxonomy
Exception indicating that a certain operation could not be performed on a taxonomy related object because of an inconsistency.
InconsistentTaxonomyException(String) - Constructor for exception org.apache.lucene.facet.taxonomy.InconsistentTaxonomyException

InconsistentTaxonomyException() - Constructor for exception org.apache.lucene.facet.taxonomy.InconsistentTaxonomyException

increaseResidue(double) - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode
increase the residue for this result.
increaseValue(double) - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode
increase the value for this result.
incRef() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader
Expert: increments the refCount of this TaxonomyReader instance.
incRef() - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyReader
Expert: increments the refCount of this TaxonomyReader instance.
incRef() - Method in class org.apache.lucene.index.IndexReader
Expert: increments the refCount of this IndexReader instance.
incrementToken() - Method in class org.apache.lucene.analysis.ar.ArabicNormalizationFilter

incrementToken() - Method in class org.apache.lucene.analysis.ar.ArabicStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.ASCIIFoldingFilter

incrementToken() - Method in class org.apache.lucene.analysis.bg.BulgarianStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.br.BrazilianStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.CachingTokenFilter

incrementToken() - Method in class org.apache.lucene.analysis.CannedTokenStream

incrementToken() - Method in class org.apache.lucene.analysis.CharTokenizer

incrementToken() - Method in class org.apache.lucene.analysis.cjk.CJKBigramFilter

incrementToken() - Method in class org.apache.lucene.analysis.cjk.CJKTokenizer
Deprecated. Returns true for the next token in the stream, or false at EOS.
incrementToken() - Method in class org.apache.lucene.analysis.cjk.CJKWidthFilter

incrementToken() - Method in class org.apache.lucene.analysis.cn.ChineseFilter
Deprecated.
incrementToken() - Method in class org.apache.lucene.analysis.cn.ChineseTokenizer
Deprecated.
incrementToken() - Method in class org.apache.lucene.analysis.cn.smart.SentenceTokenizer

incrementToken() - Method in class org.apache.lucene.analysis.cn.smart.WordTokenFilter

incrementToken() - Method in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

incrementToken() - Method in class org.apache.lucene.analysis.cz.CzechStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.de.GermanLightStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.de.GermanMinimalStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.de.GermanNormalizationFilter

incrementToken() - Method in class org.apache.lucene.analysis.de.GermanStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.el.GreekLowerCaseFilter

incrementToken() - Method in class org.apache.lucene.analysis.el.GreekStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.EmptyTokenizer

incrementToken() - Method in class org.apache.lucene.analysis.en.EnglishMinimalStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.en.EnglishPossessiveFilter

incrementToken() - Method in class org.apache.lucene.analysis.en.KStemFilter
Returns the next, stemmed, input Token.
incrementToken() - Method in class org.apache.lucene.analysis.es.SpanishLightStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.fa.PersianNormalizationFilter

incrementToken() - Method in class org.apache.lucene.analysis.fi.FinnishLightStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.FilteringTokenFilter

incrementToken() - Method in class org.apache.lucene.analysis.fr.ElisionFilter
Increments the TokenStream with a CharTermAttribute without elisioned start
incrementToken() - Method in class org.apache.lucene.analysis.fr.FrenchLightStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.fr.FrenchMinimalStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.fr.FrenchStemFilter
Deprecated.
incrementToken() - Method in class org.apache.lucene.analysis.ga.IrishLowerCaseFilter

incrementToken() - Method in class org.apache.lucene.analysis.gl.GalicianMinimalStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.gl.GalicianStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.hi.HindiNormalizationFilter

incrementToken() - Method in class org.apache.lucene.analysis.hi.HindiStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.hu.HungarianLightStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.hunspell.HunspellStemFilter
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
incrementToken() - Method in class org.apache.lucene.analysis.icu.ICUNormalizer2Filter

incrementToken() - Method in class org.apache.lucene.analysis.icu.ICUTransformFilter

incrementToken() - Method in class org.apache.lucene.analysis.icu.segmentation.ICUTokenizer

incrementToken() - Method in class org.apache.lucene.analysis.id.IndonesianStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.in.IndicNormalizationFilter

incrementToken() - Method in class org.apache.lucene.analysis.ISOLatin1AccentFilter
Deprecated.
incrementToken() - Method in class org.apache.lucene.analysis.it.ItalianLightStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.ja.JapaneseBaseFormFilter

incrementToken() - Method in class org.apache.lucene.analysis.ja.JapaneseKatakanaStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.ja.JapaneseReadingFormFilter

incrementToken() - Method in class org.apache.lucene.analysis.ja.JapaneseTokenizer

incrementToken() - Method in class org.apache.lucene.analysis.KeywordMarkerFilter

incrementToken() - Method in class org.apache.lucene.analysis.KeywordTokenizer

incrementToken() - Method in class org.apache.lucene.analysis.LimitTokenCountFilter

incrementToken() - Method in class org.apache.lucene.analysis.LowerCaseFilter

incrementToken() - Method in class org.apache.lucene.analysis.lv.LatvianStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.miscellaneous.EmptyTokenStream

incrementToken() - Method in class org.apache.lucene.analysis.miscellaneous.PrefixAndSuffixAwareTokenFilter

incrementToken() - Method in class org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter

incrementToken() - Method in class org.apache.lucene.analysis.miscellaneous.SingleTokenTokenStream

incrementToken() - Method in class org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter

incrementToken() - Method in class org.apache.lucene.analysis.MockFixedLengthPayloadFilter

incrementToken() - Method in class org.apache.lucene.analysis.MockGraphTokenFilter

incrementToken() - Method in class org.apache.lucene.analysis.MockHoleInjectingTokenFilter

incrementToken() - Method in class org.apache.lucene.analysis.MockRandomLookaheadTokenFilter

incrementToken() - Method in class org.apache.lucene.analysis.MockTokenizer

incrementToken() - Method in class org.apache.lucene.analysis.MockVariableLengthPayloadFilter

incrementToken() - Method in class org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter

incrementToken() - Method in class org.apache.lucene.analysis.ngram.EdgeNGramTokenizer
Returns the next token in the stream, or null at EOS.
incrementToken() - Method in class org.apache.lucene.analysis.ngram.NGramTokenFilter
Returns the next token in the stream, or null at EOS.
incrementToken() - Method in class org.apache.lucene.analysis.ngram.NGramTokenizer
Returns the next token in the stream, or null at EOS.
incrementToken() - Method in class org.apache.lucene.analysis.nl.DutchStemFilter
Deprecated. Returns the next token in the stream, or null at EOS
incrementToken() - Method in class org.apache.lucene.analysis.no.NorwegianLightStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.no.NorwegianMinimalStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.NumericTokenStream

incrementToken() - Method in class org.apache.lucene.analysis.path.PathHierarchyTokenizer

incrementToken() - Method in class org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

incrementToken() - Method in class org.apache.lucene.analysis.payloads.DelimitedPayloadTokenFilter

incrementToken() - Method in class org.apache.lucene.analysis.payloads.NumericPayloadTokenFilter

incrementToken() - Method in class org.apache.lucene.analysis.payloads.TokenOffsetPayloadTokenFilter

incrementToken() - Method in class org.apache.lucene.analysis.payloads.TypeAsPayloadTokenFilter

incrementToken() - Method in class org.apache.lucene.analysis.phonetic.BeiderMorseFilter

incrementToken() - Method in class org.apache.lucene.analysis.phonetic.DoubleMetaphoneFilter

incrementToken() - Method in class org.apache.lucene.analysis.phonetic.PhoneticFilter

incrementToken() - Method in class org.apache.lucene.analysis.PorterStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.position.PositionFilter

incrementToken() - Method in class org.apache.lucene.analysis.pt.PortugueseLightStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.pt.PortugueseMinimalStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.pt.PortugueseStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.reverse.ReverseStringFilter

incrementToken() - Method in class org.apache.lucene.analysis.ru.RussianLightStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.ru.RussianLowerCaseFilter
Deprecated.
incrementToken() - Method in class org.apache.lucene.analysis.ru.RussianStemFilter
Deprecated. Returns the next token in the stream, or null at EOS
incrementToken() - Method in class org.apache.lucene.analysis.shingle.ShingleFilter

incrementToken() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated.
incrementToken() - Method in class org.apache.lucene.analysis.snowball.SnowballFilter
Returns the next input Token, after being stemmed
incrementToken() - Method in class org.apache.lucene.analysis.standard.ClassicFilter
Returns the next token in the stream, or null at EOS.
incrementToken() - Method in class org.apache.lucene.analysis.standard.ClassicTokenizer

incrementToken() - Method in class org.apache.lucene.analysis.standard.StandardFilter

incrementToken() - Method in class org.apache.lucene.analysis.standard.StandardTokenizer

incrementToken() - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

incrementToken() - Method in class org.apache.lucene.analysis.stempel.StempelFilter
Returns the next input Token, after being stemmed
incrementToken() - Method in class org.apache.lucene.analysis.sv.SwedishLightStemFilter

incrementToken() - Method in class org.apache.lucene.analysis.synonym.SynonymFilter

incrementToken() - Method in class org.apache.lucene.analysis.TeeSinkTokenFilter

incrementToken() - Method in class org.apache.lucene.analysis.TeeSinkTokenFilter.SinkTokenStream

incrementToken() - Method in class org.apache.lucene.analysis.th.ThaiWordFilter

incrementToken() - Method in class org.apache.lucene.analysis.TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
incrementToken() - Method in class org.apache.lucene.analysis.tr.TurkishLowerCaseFilter

incrementToken() - Method in class org.apache.lucene.analysis.ValidatingTokenFilter

incrementToken() - Method in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

incrementToken() - Method in class org.apache.lucene.collation.CollationKeyFilter

incrementToken() - Method in class org.apache.lucene.collation.ICUCollationKeyFilter

incrementToken() - Method in class org.apache.lucene.facet.enhancements.association.AssociationListTokenizer

incrementToken() - Method in class org.apache.lucene.facet.index.streaming.CategoryAttributesStream

incrementToken() - Method in class org.apache.lucene.facet.index.streaming.CategoryListTokenizer

incrementToken() - Method in class org.apache.lucene.facet.index.streaming.CategoryParentsStream

incrementToken() - Method in class org.apache.lucene.facet.index.streaming.CategoryTokenizer

incrementToken() - Method in class org.apache.lucene.facet.index.streaming.CategoryTokenizerBase

incrementToken() - Method in class org.apache.lucene.facet.index.streaming.CountingListTokenizer

incrementToken() - Method in class org.apache.lucene.queryParser.QueryParserTestBase.QPTestFilter

incrementToken() - Method in class org.apache.lucene.search.highlight.OffsetLimitTokenFilter

incrementToken() - Method in class org.apache.lucene.search.highlight.TokenStreamFromTermPositionVector

incrementTokenClassic() - Method in class org.apache.lucene.analysis.standard.StandardFilter

incTotalNumberOfTerms(int) - Method in class org.apache.lucene.search.MultiTermQuery
Deprecated. Don't use this method, as its not thread safe and useless.
index - Variable in class org.apache.lucene.analysis.cn.smart.hhmm.SegToken
during segmentation, this is used to store the index of the token in the token list table
INDEX_CREATE_TIME - Static variable in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Property name of user commit data that contains the creation time of a taxonomy index.
INDEX_EXTENSIONS - Static variable in class org.apache.lucene.index.IndexFileNames
This array contains all filename extensions used by Lucene's index files, with two exceptions, namely the extension made up from .f + a number and from .s + a number.
INDEX_EXTENSIONS_IN_COMPOUND_FILE - Static variable in class org.apache.lucene.index.IndexFileNames
File extensions that are added to a compound file (same as above, minus "del", "gen", "cfs").
IndexableBinaryStringTools - Class in org.apache.lucene.util
Provides support for converting byte sequences to Strings and back again.
IndexCommit - Class in org.apache.lucene.index
Expert: represents a single commit into an index as seen by the IndexDeletionPolicy or IndexReader.
IndexCommit() - Constructor for class org.apache.lucene.index.IndexCommit

IndexDeletionPolicy - Interface in org.apache.lucene.index
Expert: policy for deletion of stale index commits.
indexDictionary(Dictionary, IndexWriterConfig, boolean) - Method in class org.apache.lucene.search.spell.SpellChecker
Indexes the data from the given Dictionary.
indexesOf(String[], int, int) - Method in interface org.apache.lucene.index.TermFreqVector
Just like indexOf(int) but searches for a number of terms at the same time.
indexesOf(String[], int, int) - Method in class org.apache.lucene.search.QueryTermVector

indexesOf(String[], int, int) - Method in class org.apache.lucene.store.instantiated.InstantiatedTermFreqVector

indexExists(Directory) - Static method in class org.apache.lucene.index.IndexReader
Returns true if an index exists at the specified directory.
IndexFileNameFilter - Class in org.apache.lucene.index
Filename filter that accept filenames and extensions only created by Lucene.
IndexFileNames - Class in org.apache.lucene.index
This class contains useful constants representing filenames and extensions used by lucene, as well as convenience methods for querying whether a file name matches an extension (matchesExtension), as well as generating file names from a segment name, generation and extension ( fileNameFromGeneration, segmentFileName).
IndexFileNames() - Constructor for class org.apache.lucene.index.IndexFileNames

IndexFiles - Class in org.apache.lucene.demo
Index all text files under a directory.
IndexFormatTooNewException - Exception in org.apache.lucene.index
This exception is thrown when Lucene detects an index that is newer than this Lucene version.
IndexFormatTooNewException(String, int, int, int) - Constructor for exception org.apache.lucene.index.IndexFormatTooNewException

IndexFormatTooNewException(DataInput, int, int, int) - Constructor for exception org.apache.lucene.index.IndexFormatTooNewException

IndexFormatTooOldException - Exception in org.apache.lucene.index
This exception is thrown when Lucene detects an index that is too old for this Lucene version
IndexFormatTooOldException(String, String) - Constructor for exception org.apache.lucene.index.IndexFormatTooOldException

IndexFormatTooOldException(DataInput, String) - Constructor for exception org.apache.lucene.index.IndexFormatTooOldException

IndexFormatTooOldException(String, int, int, int) - Constructor for exception org.apache.lucene.index.IndexFormatTooOldException

IndexFormatTooOldException(DataInput, int, int, int) - Constructor for exception org.apache.lucene.index.IndexFormatTooOldException

indexingParams - Variable in class org.apache.lucene.facet.index.CategoryDocumentBuilder
Parameters to be used when indexing categories.
indexingParams - Variable in class org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
Indexing params for creating term text
indexingParams - Variable in class org.apache.lucene.facet.search.params.FacetSearchParams

IndexInput - Class in org.apache.lucene.store
Abstract base class for input from a file in a Directory.
IndexInput() - Constructor for class org.apache.lucene.store.IndexInput
Deprecated. please pass resourceDescription
IndexInput(String) - Constructor for class org.apache.lucene.store.IndexInput
resourceDescription should be a non-null, opaque string describing this resource; it's returned from IndexInput.toString().
IndexMergeTool - Class in org.apache.lucene.misc
Merges indices specified on the command line into the index specified as the first command line argument.
IndexMergeTool() - Constructor for class org.apache.lucene.misc.IndexMergeTool

IndexNotFoundException - Exception in org.apache.lucene.index
Signals that no index was found in the Directory.
IndexNotFoundException(String) - Constructor for exception org.apache.lucene.index.IndexNotFoundException

indexOf(SegmentInfo) - Method in class org.apache.lucene.index.SegmentInfos

indexOf(String) - Method in interface org.apache.lucene.index.TermFreqVector
Return an index in the term numbers array returned from getTerms at which the term with the specified term appears.
indexOf(Object) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

indexOf(String) - Method in class org.apache.lucene.search.QueryTermVector

indexOf(String) - Method in class org.apache.lucene.store.instantiated.InstantiatedTermFreqVector

indexOptions - Variable in class org.apache.lucene.document.AbstractField

indexOptions - Variable in class org.apache.lucene.index.FieldInfo

INDEXORDER - Static variable in class org.apache.lucene.search.Sort
Represents sorting by index order.
IndexOutput - Class in org.apache.lucene.store
Abstract base class for output to a file in a Directory.
IndexOutput() - Constructor for class org.apache.lucene.store.IndexOutput

indexProperties - Variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

indexReader - Variable in class org.apache.lucene.facet.search.FacetsAccumulator

IndexReader - Class in org.apache.lucene.index
IndexReader is an abstract class, providing an interface for accessing an index.
IndexReader() - Constructor for class org.apache.lucene.index.IndexReader

IndexReader.ReaderClosedListener - Interface in org.apache.lucene.index
A custom listener that's invoked when the IndexReader is closed.
indexReaderFactory() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndex
Deprecated.
IndexSearcher - Class in org.apache.lucene.search
Implements search over a single IndexReader.
IndexSearcher(Directory) - Constructor for class org.apache.lucene.search.IndexSearcher
Deprecated. use IndexSearcher.IndexSearcher(IndexReader) instead.
IndexSearcher(Directory, boolean) - Constructor for class org.apache.lucene.search.IndexSearcher
Deprecated. Use IndexSearcher.IndexSearcher(IndexReader) instead.
IndexSearcher(IndexReader) - Constructor for class org.apache.lucene.search.IndexSearcher
Creates a searcher searching the provided index.
IndexSearcher(IndexReader, ExecutorService) - Constructor for class org.apache.lucene.search.IndexSearcher
Runs searches for each segment separately, using the provided ExecutorService.
IndexSearcher(IndexReader, IndexReader[], int[]) - Constructor for class org.apache.lucene.search.IndexSearcher
Expert: directly specify the reader, subReaders and their docID starts.
IndexSearcher(IndexReader, IndexReader[], int[], ExecutorService) - Constructor for class org.apache.lucene.search.IndexSearcher
Expert: directly specify the reader, subReaders and their docID starts, and an ExecutorService.
IndexSorter - Class in org.apache.lucene.index
Sort an index by document importance factor.
IndexSorter() - Constructor for class org.apache.lucene.index.IndexSorter

IndexSplitter - Class in org.apache.lucene.index
Command-line tool that enables listing segments in an index, copying specific segments to another index, and deleting segments from an index.
IndexSplitter(File) - Constructor for class org.apache.lucene.index.IndexSplitter

IndexUpgrader - Class in org.apache.lucene.index
This is an easy-to-use tool that upgrades all segments of an index from previous Lucene versions to the current segment file format.
IndexUpgrader(Directory, Version) - Constructor for class org.apache.lucene.index.IndexUpgrader
Creates index upgrader on the given directory, using an IndexWriter using the given matchVersion.
IndexUpgrader(Directory, Version, PrintStream, boolean) - Constructor for class org.apache.lucene.index.IndexUpgrader
Creates index upgrader on the given directory, using an IndexWriter using the given matchVersion.
IndexUpgrader(Directory, IndexWriterConfig, PrintStream, boolean) - Constructor for class org.apache.lucene.index.IndexUpgrader
Creates index upgrader on the given directory, using an IndexWriter using the given config.
indexVal - Variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

IndexWriter - Class in org.apache.lucene.index
An IndexWriter creates and maintains an index.
IndexWriter(Directory, Analyzer, boolean, IndexWriter.MaxFieldLength) - Constructor for class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory, Analyzer, IndexWriter.MaxFieldLength) - Constructor for class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory, Analyzer, IndexDeletionPolicy, IndexWriter.MaxFieldLength) - Constructor for class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory, Analyzer, boolean, IndexDeletionPolicy, IndexWriter.MaxFieldLength) - Constructor for class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory, Analyzer, IndexDeletionPolicy, IndexWriter.MaxFieldLength, IndexCommit) - Constructor for class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory, IndexWriterConfig) - Constructor for class org.apache.lucene.index.IndexWriter
Constructs a new IndexWriter per the settings given in conf.
IndexWriter.IndexReaderWarmer - Class in org.apache.lucene.index
If IndexWriter.getReader() has been called (ie, this writer is in near real-time mode), then after a merge completes, this class can be invoked to warm the reader on the newly merged segment, before the merge commits.
IndexWriter.IndexReaderWarmer() - Constructor for class org.apache.lucene.index.IndexWriter.IndexReaderWarmer

IndexWriter.MaxFieldLength - Class in org.apache.lucene.index
Deprecated. use LimitTokenCountAnalyzer instead.
IndexWriter.MaxFieldLength(int) - Constructor for class org.apache.lucene.index.IndexWriter.MaxFieldLength
Deprecated. Public constructor to allow users to specify the maximum field size limit.
IndexWriterConfig - Class in org.apache.lucene.index
Holds all the configuration of IndexWriter.
IndexWriterConfig(Version, Analyzer) - Constructor for class org.apache.lucene.index.IndexWriterConfig
Creates a new config that with defaults that match the specified Version as well as the default Analyzer.
IndexWriterConfig.OpenMode - Enum in org.apache.lucene.index
Specifies the open mode for IndexWriter: IndexWriterConfig.OpenMode.CREATE - creates a new index or overwrites an existing one.
indexWriterFactory(Analyzer, boolean) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndex
Deprecated.
indicator - Variable in class org.apache.lucene.util.encoding.ChunksIntEncoder
Represents bits flag byte.
IndicNormalizationFilter - Class in org.apache.lucene.analysis.in
A TokenFilter that applies IndicNormalizer to normalize text in Indian Languages.
IndicNormalizationFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.in.IndicNormalizationFilter

IndicNormalizer - Class in org.apache.lucene.analysis.in
Normalizes the Unicode representation of text in Indian languages.
IndicNormalizer() - Constructor for class org.apache.lucene.analysis.in.IndicNormalizer

IndicTokenizer - Class in org.apache.lucene.analysis.in
Deprecated. (3.6) Use StandardTokenizer instead.
IndicTokenizer(Version, AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.in.IndicTokenizer
Deprecated.
IndicTokenizer(Version, AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.in.IndicTokenizer
Deprecated.
IndicTokenizer(Version, Reader) - Constructor for class org.apache.lucene.analysis.in.IndicTokenizer
Deprecated.
IndonesianAnalyzer - Class in org.apache.lucene.analysis.id
Analyzer for Indonesian (Bahasa)
IndonesianAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.id.IndonesianAnalyzer
Builds an analyzer with the default stop words: IndonesianAnalyzer.DEFAULT_STOPWORD_FILE.
IndonesianAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.id.IndonesianAnalyzer
Builds an analyzer with the given stop words
IndonesianAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.id.IndonesianAnalyzer
Builds an analyzer with the given stop word.
IndonesianStemFilter - Class in org.apache.lucene.analysis.id
A TokenFilter that applies IndonesianStemmer to stem Indonesian words.
IndonesianStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.id.IndonesianStemFilter
Calls IndonesianStemFilter(input, true)
IndonesianStemFilter(TokenStream, boolean) - Constructor for class org.apache.lucene.analysis.id.IndonesianStemFilter
Create a new IndonesianStemFilter.
IndonesianStemmer - Class in org.apache.lucene.analysis.id
Stemmer for Indonesian.
IndonesianStemmer() - Constructor for class org.apache.lucene.analysis.id.IndonesianStemmer

infixToString(StringBuilder) - Method in class org.apache.lucene.queryParser.surround.query.ComposedQuery

InflectionAttribute - Interface in org.apache.lucene.analysis.ja.tokenattributes
Attribute for Kuromoji inflection data.
InflectionAttributeImpl - Class in org.apache.lucene.analysis.ja.tokenattributes
Attribute for Kuromoji inflection data.
InflectionAttributeImpl() - Constructor for class org.apache.lucene.analysis.ja.tokenattributes.InflectionAttributeImpl

info(int) - Method in class org.apache.lucene.index.SegmentInfos

INFORMATION_SEPARATOR_MARKER - Static variable in class org.apache.lucene.analysis.reverse.ReverseStringFilter
Example marker character: U+001F (INFORMATION SEPARATOR ONE)
infos - Variable in class org.apache.lucene.index.IndexSplitter

infoStream - Variable in class org.apache.lucene.index.SegmentWriteState

init() - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

init(TaxonomyWriter) - Method in class org.apache.lucene.facet.index.categorypolicy.DefaultOrdinalPolicy
Implemented as NO-OP as the default is not taxonomy dependent
init(TaxonomyWriter) - Method in class org.apache.lucene.facet.index.categorypolicy.NonTopLevelOrdinalPolicy

init(TaxonomyWriter) - Method in interface org.apache.lucene.facet.index.categorypolicy.OrdinalPolicy
Initialize the policy with a TaxonomyWriter.
init() - Method in interface org.apache.lucene.facet.search.CategoryListIterator
Initializes the iterator.
init() - Method in class org.apache.lucene.facet.search.PayloadIntDecodingIterator

init() - Method in class org.apache.lucene.facet.search.PayloadIterator
(re)initialize the iterator.
init() - Method in class org.apache.lucene.facet.util.MultiCategoryListIterator
Fails if all given iterators fail to init
init(TokenStream) - Method in class org.apache.lucene.search.highlight.QueryScorer

init(TokenStream) - Method in class org.apache.lucene.search.highlight.QueryTermScorer

init(TokenStream) - Method in interface org.apache.lucene.search.highlight.Scorer
Called to init the Scorer with a TokenStream.
init() - Method in class org.apache.lucene.util.BytesRefHash.BytesStartArray
Initializes the BytesStartArray.
init() - Method in class org.apache.lucene.util.BytesRefHash.DirectBytesStartArray

init() - Method in class org.apache.lucene.util.BytesRefHash.TrackingDirectBytesStartArray

initFacetsAccumulator(FacetSearchParams, IndexReader, TaxonomyReader) - Method in class org.apache.lucene.facet.search.FacetsCollector
Create the FacetsAccumulator to be used.
initialize(int) - Method in class org.apache.lucene.util.PriorityQueue
Subclass constructors must call this.
initializeMessages(String, Class<? extends NLS>) - Static method in class org.apache.lucene.messages.NLS
Deprecated. Initialize a given class with the message bundle Keys Should be called from a class that extends NLS in a static block at class load time.
initialValue() - Method in class org.apache.lucene.util.CloseableThreadLocal

initPositionsTerm(TermPositions, Term) - Method in class org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy

initPositionsTerm(TermPositions, Term) - Method in class org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy

initPositionsTerm(TermPositions, Term) - Method in class org.apache.lucene.index.pruning.RIDFTermPruningPolicy

initPositionsTerm(TermPositions, Term) - Method in class org.apache.lucene.index.pruning.TermPruningPolicy
Called when moving TermPositions to a new Term.
initPositionsTerm(TermPositions, Term) - Method in class org.apache.lucene.index.pruning.TFTermPruningPolicy

initReader(Reader) - Method in class org.apache.lucene.analysis.fa.PersianAnalyzer
Wraps the Reader with PersianCharFilter
initReader(Reader) - Method in class org.apache.lucene.analysis.ReusableAnalyzerBase
Override this if you want to add a CharFilter chain.
initScoredDocCollector(FacetSearchParams, IndexReader, TaxonomyReader) - Method in class org.apache.lucene.facet.search.FacetsCollector
Create a ScoredDocIdCollector to be used as the first phase of the facet collection.
initSize - Variable in class org.apache.lucene.util.BytesRefHash.DirectBytesStartArray

initSize - Variable in class org.apache.lucene.util.BytesRefHash.TrackingDirectBytesStartArray

inject - Variable in class org.apache.lucene.analysis.phonetic.PhoneticFilter

InMemorySorter - Class in org.apache.lucene.search.suggest.fst
An BytesRefSorter that keeps all the entries in memory.
InMemorySorter(Comparator<BytesRef>) - Constructor for class org.apache.lucene.search.suggest.fst.InMemorySorter

inOrder - Variable in class org.apache.lucene.search.spans.SpanNearQuery

inPlaceAnd(DocIdSetIterator) - Method in class org.apache.lucene.util.OpenBitSetDISI
Perform an inplace AND with the doc ids from a given DocIdSetIterator, leaving only the bits set for which the doc ids are in common.
inPlaceNot(DocIdSetIterator) - Method in class org.apache.lucene.util.OpenBitSetDISI
Perform an inplace NOT with the doc ids from a given DocIdSetIterator, clearing all the bits for each such doc id.
inPlaceOr(DocIdSetIterator) - Method in class org.apache.lucene.util.OpenBitSetDISI
Perform an inplace OR with the doc ids from a given DocIdSetIterator, setting the bit for each such doc id.
inPlaceXor(DocIdSetIterator) - Method in class org.apache.lucene.util.OpenBitSetDISI
Perform an inplace XOR with the doc ids from a given DocIdSetIterator, flipping all the bits for each such doc id.
input - Variable in class org.apache.lucene.analysis.CharFilter

input - Variable in class org.apache.lucene.analysis.TokenFilter
The source of tokens for this filter.
input - Variable in class org.apache.lucene.analysis.Tokenizer
The text source for this Tokenizer.
input - Variable in class org.apache.lucene.util.fst.BytesRefFSTEnum.InputOutput

input - Variable in class org.apache.lucene.util.fst.IntsRefFSTEnum.InputOutput

input - Variable in class org.apache.lucene.util.fst.Util.MinResult

input_stream - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager

input_stream - Variable in class org.apache.lucene.queryParser.QueryParserTokenManager

input_stream - Variable in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager

input_stream - Variable in class org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager

inputCount - Variable in class org.apache.lucene.util.fst.Builder.UnCompiledNode

inputPos - Variable in class org.apache.lucene.analysis.LookaheadTokenFilter

inputStream - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

inputStream(File) - Static method in class org.apache.lucene.benchmark.byTask.utils.StreamUtils
Returns an InputStream over the requested file.
inputStream - Variable in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

InputStreamDataInput - Class in org.apache.lucene.store
A DataInput wrapping a plain InputStream.
InputStreamDataInput(InputStream) - Constructor for class org.apache.lucene.store.InputStreamDataInput

inputTokens - Variable in class org.apache.lucene.analysis.LookaheadTokenFilter.Position

inputType - Variable in class org.apache.lucene.util.fst.FST

insert(String, char) - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree
Branches are initially compressed, needing one node per key plus the size of the string key.
insert(char[], int, char) - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

insert(TernaryTreeNode, CharSequence, Object, int) - Method in class org.apache.lucene.search.suggest.tst.TSTAutocomplete
Inserts a key in TST creating a series of Binary Search Trees at each node.
insert(Scorer) - Method in class org.apache.lucene.util.ScorerDocQueue
Adds a Scorer to the ScorerDocQueue in log(size) time if either the ScorerDocQueue is not full, or not lessThan(scorer, top()).
insert(int, int, CharSequence) - Method in class org.tartarus.snowball.SnowballProgram

insert(int, int, String) - Method in class org.tartarus.snowball.SnowballProgram
Deprecated. for binary back compat. Will be removed in Lucene 4.0
insert(int, int, StringBuilder) - Method in class org.tartarus.snowball.SnowballProgram
Deprecated. for binary back compat. Will be removed in Lucene 4.0
insertBalanced(String[], char[], int, int) - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree
Recursively insert the median first and then the median of the lower and upper halves, and so on in order to get a balanced tree.
insertChild(Element, String, String) - Static method in class org.apache.lucene.xmlparser.DOMUtils

insertionSort(T[], int, int, Comparator<? super T>) - Static method in class org.apache.lucene.util.ArrayUtil
Sorts the given array slice using the Comparator.
insertionSort(T[], Comparator<? super T>) - Static method in class org.apache.lucene.util.ArrayUtil
Sorts the given array using the Comparator.
insertionSort(T[], int, int) - Static method in class org.apache.lucene.util.ArrayUtil
Sorts the given array slice in natural order.
insertionSort(T[]) - Static method in class org.apache.lucene.util.ArrayUtil
Sorts the given array in natural order.
insertionSort(List<T>, Comparator<? super T>) - Static method in class org.apache.lucene.util.CollectionUtil
Sorts the given random access List using the Comparator.
insertionSort(List<T>) - Static method in class org.apache.lucene.util.CollectionUtil
Sorts the given random access List in natural order.
insertionSort(int, int) - Method in class org.apache.lucene.util.SorterTemplate
Sorts via stable in-place InsertionSort algorithm (ideal for small collections which are mostly presorted).
insertSubResult(FacetResultNode) - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode
Insert sub result (as first).
insertToken() - Method in class org.apache.lucene.analysis.LookaheadTokenFilter
Call this only from within afterPosition, to insert a new token.
insertWithOverflow(T) - Method in interface org.apache.lucene.facet.search.Heap
Insert a new value, returning the overflowen object
NOTE: This method should not be called after invoking Heap.pop()
insertWithOverflow(T) - Method in class org.apache.lucene.util.PriorityQueue
Adds an Object to a PriorityQueue in log(size) time.
INSTANCE - Static variable in class org.apache.lucene.index.NoDeletionPolicy
The single instance of this class.
INSTANCE - Static variable in class org.apache.lucene.index.NoMergeScheduler
The single instance of NoMergeScheduler
INSTANCE - Static variable in class org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy.ByDocComparator

INSTANCE - Static variable in class org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy.ByDocComparator

INSTANCE - Static variable in class org.apache.lucene.util.DummyConcurrentLock
a default instance, can be always used, as this Lock is stateless.
InstantiatedDocument - Class in org.apache.lucene.store.instantiated
A document in the instantiated index object graph, optionally coupled to the vector space view.
InstantiatedDocument() - Constructor for class org.apache.lucene.store.instantiated.InstantiatedDocument

InstantiatedDocument(Document) - Constructor for class org.apache.lucene.store.instantiated.InstantiatedDocument

InstantiatedIndex - Class in org.apache.lucene.store.instantiated
Deprecated. contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM
InstantiatedIndex() - Constructor for class org.apache.lucene.store.instantiated.InstantiatedIndex
Deprecated. Creates an empty instantiated index for you to fill with data using an InstantiatedIndexWriter.
InstantiatedIndex(IndexReader) - Constructor for class org.apache.lucene.store.instantiated.InstantiatedIndex
Deprecated. Creates a new instantiated index that looks just like the index in a specific state as represented by a reader.
InstantiatedIndex(IndexReader, Set<String>) - Constructor for class org.apache.lucene.store.instantiated.InstantiatedIndex
Deprecated. Creates a new instantiated index that looks just like the index in a specific state as represented by a reader.
InstantiatedIndexReader - Class in org.apache.lucene.store.instantiated
Deprecated. contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM
InstantiatedIndexReader(InstantiatedIndex) - Constructor for class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
InstantiatedIndexWriter - Class in org.apache.lucene.store.instantiated
Deprecated. contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM
InstantiatedIndexWriter(InstantiatedIndex) - Constructor for class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
InstantiatedIndexWriter(InstantiatedIndex, Analyzer) - Constructor for class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
InstantiatedIndexWriter(InstantiatedIndex, Analyzer, boolean) - Constructor for class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
InstantiatedTerm - Class in org.apache.lucene.store.instantiated
A term in the inverted index, coupled to the documents it occurs in.
InstantiatedTermDocs - Class in org.apache.lucene.store.instantiated
A TermDocs navigating an InstantiatedIndexReader.
InstantiatedTermDocs(InstantiatedIndexReader) - Constructor for class org.apache.lucene.store.instantiated.InstantiatedTermDocs

InstantiatedTermDocumentInformation - Class in org.apache.lucene.store.instantiated
There is one instance of this class per indexed term in a document and it contains the meta data about each occurrence of a term in a document.
InstantiatedTermDocumentInformation(InstantiatedTerm, InstantiatedDocument, int[], byte[][]) - Constructor for class org.apache.lucene.store.instantiated.InstantiatedTermDocumentInformation

InstantiatedTermEnum - Class in org.apache.lucene.store.instantiated
A TermEnum navigating an InstantiatedIndexReader.
InstantiatedTermEnum(InstantiatedIndexReader) - Constructor for class org.apache.lucene.store.instantiated.InstantiatedTermEnum

InstantiatedTermEnum(InstantiatedIndexReader, int) - Constructor for class org.apache.lucene.store.instantiated.InstantiatedTermEnum

InstantiatedTermFreqVector - Class in org.apache.lucene.store.instantiated
Vector space view of a document in an InstantiatedIndexReader.
InstantiatedTermFreqVector(InstantiatedDocument, String) - Constructor for class org.apache.lucene.store.instantiated.InstantiatedTermFreqVector

InstantiatedTermPositions - Class in org.apache.lucene.store.instantiated
A TermPositions navigating an InstantiatedIndexReader.
InstantiatedTermPositions(InstantiatedIndexReader) - Constructor for class org.apache.lucene.store.instantiated.InstantiatedTermPositions

InstantiatedTermPositionVector - Class in org.apache.lucene.store.instantiated
Extended vector space view of a document in an InstantiatedIndexReader.
InstantiatedTermPositionVector(InstantiatedDocument, String) - Constructor for class org.apache.lucene.store.instantiated.InstantiatedTermPositionVector

INT - Static variable in class org.apache.lucene.search.function.FieldScoreQuery.Type
field values are interpreted as numeric int values.
INT - Static variable in class org.apache.lucene.search.SortField
Sort using term values as encoded Integers.
IntArray - Class in org.apache.lucene.util.collections
A Class wrapper for a grow-able int[] which can be sorted and intersect with other IntArrays.
IntArray() - Constructor for class org.apache.lucene.util.collections.IntArray
Construct a default IntArray, size 0 and surly a sort should not occur.
IntArrayAllocator - Class in org.apache.lucene.facet.search
An IntArrayAllocator is an object which manages counter array objects of a certain length.
IntArrayAllocator(int, int) - Constructor for class org.apache.lucene.facet.search.IntArrayAllocator
Construct an allocator for counter arrays of length length, keeping around a pool of up to maxArrays old arrays.
intArrayAllocator - Variable in class org.apache.lucene.facet.search.StandardFacetsAccumulator

IntDecoder - Class in org.apache.lucene.util.encoding
Decodes integers from a set InputStream.
IntDecoder() - Constructor for class org.apache.lucene.util.encoding.IntDecoder

IntegerEncoder - Class in org.apache.lucene.analysis.payloads
Encode a character array Integer as a Payload.
IntegerEncoder() - Constructor for class org.apache.lucene.analysis.payloads.IntegerEncoder

IntEncoder - Class in org.apache.lucene.util.encoding
Encodes integers to a set OutputStream.
IntEncoder() - Constructor for class org.apache.lucene.util.encoding.IntEncoder
Default constructor, provided here for robustness: if in the future a constructor with parameters will be added, this might break custom implementations of this class which call this implicit constructor.
IntEncoderFilter - Class in org.apache.lucene.util.encoding
An abstract implementation of IntEncoder which is served as a filter on the values to encode.
IntEncoderFilter(IntEncoder) - Constructor for class org.apache.lucene.util.encoding.IntEncoderFilter

IntermediateFacetResult - Interface in org.apache.lucene.facet.search.results
Intermediate FacetResult of faceted search.
intern(String) - Method in class org.apache.lucene.util.SimpleStringInterner

intern(String) - Static method in class org.apache.lucene.util.StringHelper
Return the same string object for all equal strings
intern(String) - Method in class org.apache.lucene.util.StringInterner
Returns a single object instance for each equal string.
intern(char[], int, int) - Method in class org.apache.lucene.util.StringInterner
Returns a single object instance for each equal string.
INTERNAL_LINK - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

INTERNAL_LINK_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

INTERNAL_SEPARATOR - Static variable in interface org.apache.lucene.analysis.ja.dict.Dictionary

interner - Static variable in class org.apache.lucene.util.StringHelper
Expert: The StringInterner implementation used by Lucene.
intersect(LineSegment, Point2D, Point2D) - Method in class org.apache.lucene.spatial.geometry.shape.Ellipse
Deprecated. Determines if a line segment intersects the ellipse and if so finds the point(s) of intersection.
intersect(Rectangle) - Method in class org.apache.lucene.spatial.geometry.shape.Ellipse
Deprecated.
intersect(Rectangle) - Method in interface org.apache.lucene.spatial.geometry.shape.Geometry2D
Deprecated. Returns information about how this shape intersects the given rectangle
intersect(Rectangle) - Method in class org.apache.lucene.spatial.geometry.shape.Rectangle
Deprecated.
intersect(IntHashSet) - Method in class org.apache.lucene.util.collections.IntArray
Intersects the data with a given IntHashSet.
intersect(IntArray) - Method in class org.apache.lucene.util.collections.IntArray
Intersects the data with a given IntArray
intersect(OpenBitSet) - Method in class org.apache.lucene.util.OpenBitSet
this = this AND other
IntersectCase - Enum in org.apache.lucene.spatial.geometry.shape
Deprecated.
intersectionCount(OpenBitSet, OpenBitSet) - Static method in class org.apache.lucene.util.OpenBitSet
Returns the popcount or cardinality of the intersection of the two sets.
intersects(OpenBitSet) - Method in class org.apache.lucene.util.OpenBitSet
returns true if the sets have any elements in common
IntFieldSource - Class in org.apache.lucene.search.function
Expert: obtains int field values from the FieldCache using getInts() and makes those values available as other numeric types, casting as needed.
IntFieldSource(String) - Constructor for class org.apache.lucene.search.function.IntFieldSource
Create a cached int field source with default string-to-int parser.
IntFieldSource(String, FieldCache.IntParser) - Constructor for class org.apache.lucene.search.function.IntFieldSource
Create a cached int field source with a specific string-to-int parser.
IntHashSet - Class in org.apache.lucene.util.collections
A Set or primitive int.
IntHashSet() - Constructor for class org.apache.lucene.util.collections.IntHashSet
Constructs a map with default capacity.
IntHashSet(int) - Constructor for class org.apache.lucene.util.collections.IntHashSet
Constructs a map with given capacity.
IntIterator - Interface in org.apache.lucene.util.collections
Iterator interface for primitive int iteration.
ints - Variable in class org.apache.lucene.util.IntsRef

intsEquals(IntsRef) - Method in class org.apache.lucene.util.IntsRef

IntSequenceOutputs - Class in org.apache.lucene.util.fst
An FST Outputs implementation where each output is a sequence of ints.
IntsRef - Class in org.apache.lucene.util
Represents int[], as a slice (offset + length) into an existing int[].
IntsRef() - Constructor for class org.apache.lucene.util.IntsRef

IntsRef(int) - Constructor for class org.apache.lucene.util.IntsRef

IntsRef(int[], int, int) - Constructor for class org.apache.lucene.util.IntsRef

IntsRefFSTEnum<T> - Class in org.apache.lucene.util.fst
Enumerates all input (IntsRef) + output pairs in an FST.
IntsRefFSTEnum(FST<T>) - Constructor for class org.apache.lucene.util.fst.IntsRefFSTEnum
doFloor controls the behavior of advance: if it's true doFloor is true, advance positions to the biggest term before target.
IntsRefFSTEnum.InputOutput<T> - Class in org.apache.lucene.util.fst
Holds a single input (IntsRef) + output pair.
IntsRefFSTEnum.InputOutput() - Constructor for class org.apache.lucene.util.fst.IntsRefFSTEnum.InputOutput

IntToDoubleMap - Class in org.apache.lucene.util.collections
An Array-based hashtable which maps primitive int to a primitive double.
The hashtable is constracted with a given capacity, or 16 as a default.
IntToDoubleMap() - Constructor for class org.apache.lucene.util.collections.IntToDoubleMap
Constructs a map with default capacity.
IntToDoubleMap(int) - Constructor for class org.apache.lucene.util.collections.IntToDoubleMap
Constructs a map with given capacity.
intToEnglish(int) - Static method in class org.apache.lucene.util.English

intToEnglish(int, StringBuilder) - Static method in class org.apache.lucene.util.English

IntToIntMap - Class in org.apache.lucene.util.collections
An Array-based hashtable which maps primitive int to primitive int.
The hashtable is constracted with a given capacity, or 16 as a default.
IntToIntMap() - Constructor for class org.apache.lucene.util.collections.IntToIntMap
Constructs a map with default capacity.
IntToIntMap(int) - Constructor for class org.apache.lucene.util.collections.IntToIntMap
Constructs a map with given capacity.
IntToObjectMap<T> - Class in org.apache.lucene.util.collections
An Array-based hashtable which maps primitive int to Objects of generic type T.
The hashtable is constracted with a given capacity, or 16 as a default.
IntToObjectMap() - Constructor for class org.apache.lucene.util.collections.IntToObjectMap
Constructs a map with default capacity.
IntToObjectMap(int) - Constructor for class org.apache.lucene.util.collections.IntToObjectMap
Constructs a map with given capacity.
intToPrefixCoded(int, int, char[]) - Static method in class org.apache.lucene.util.NumericUtils
Expert: Returns prefix coded bits after reducing the precision by shift bits.
intToPrefixCoded(int, int) - Static method in class org.apache.lucene.util.NumericUtils

intToPrefixCoded(int) - Static method in class org.apache.lucene.util.NumericUtils

intVal(int) - Method in class org.apache.lucene.search.function.DocValues
Return doc value as an int.
INVALID_ORDINAL - Static variable in interface org.apache.lucene.facet.taxonomy.TaxonomyReader
Ordinals are always non-negative, so a negative ordinal can be used to signify an error.
INVALID_SYNTAX - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

INVALID_SYNTAX_CANNOT_PARSE - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

INVALID_SYNTAX_ESCAPE_CHARACTER - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

INVALID_SYNTAX_ESCAPE_NONE_HEX_UNICODE - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

INVALID_SYNTAX_FUZZY_LIMITS - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

InvalidGeoException - Exception in org.apache.lucene.spatial.tier
Deprecated.
InvalidGeoException(String) - Constructor for exception org.apache.lucene.spatial.tier.InvalidGeoException
Deprecated.
InvalidOrdinal - Static variable in class org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal

InvalidTokenOffsetsException - Exception in org.apache.lucene.search.highlight
Exception thrown if TokenStream Tokens are incompatible with provided text
InvalidTokenOffsetsException(String) - Constructor for exception org.apache.lucene.search.highlight.InvalidTokenOffsetsException

IOUtils - Class in org.apache.lucene.util
This class emulates the new Java 7 "Try-With-Resources" statement.
IProjector - Interface in org.apache.lucene.spatial.tier.projections
Deprecated.
IrishAnalyzer - Class in org.apache.lucene.analysis.ga
Analyzer for Irish.
IrishAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.ga.IrishAnalyzer
Builds an analyzer with the default stop words: IrishAnalyzer.DEFAULT_STOPWORD_FILE.
IrishAnalyzer(Version, CharArraySet) - Constructor for class org.apache.lucene.analysis.ga.IrishAnalyzer
Builds an analyzer with the given stop words.
IrishAnalyzer(Version, CharArraySet, CharArraySet) - Constructor for class org.apache.lucene.analysis.ga.IrishAnalyzer
Builds an analyzer with the given stop words.
IrishLowerCaseFilter - Class in org.apache.lucene.analysis.ga
Normalises token text to lower case, handling t-prothesis and n-eclipsis (i.e., that 'nAthair' should become 'n-athair')
IrishLowerCaseFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.ga.IrishLowerCaseFilter
Create an IrishLowerCaseFilter that normalises Irish token text.
IrishStemmer - Class in org.tartarus.snowball.ext
This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.
IrishStemmer() - Constructor for class org.tartarus.snowball.ext.IrishStemmer

isAllowLabeling() - Method in class org.apache.lucene.facet.search.FacetsAccumulator
Check if labeling is allowed for this accumulator.
isAllowLabeling() - Method in class org.apache.lucene.facet.search.SamplingWrapper

isAllowLeadingWildcard() - Method in interface org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttribute
Deprecated.
isAllowLeadingWildcard() - Method in class org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl
Deprecated.
isAnalyzed() - Method in enum org.apache.lucene.document.Field.Index

isAssociationProperty(Class<? extends CategoryProperty>) - Static method in class org.apache.lucene.facet.enhancements.association.AssociationEnhancement
For a given class which extends a CategoryProperty, answers whether it is an instance of AssociationProperty (AP) or not.
isBinary - Variable in class org.apache.lucene.document.AbstractField

isBinary() - Method in class org.apache.lucene.document.AbstractField
True iff the value of the filed is stored as binary
isBinary() - Method in interface org.apache.lucene.document.Fieldable
True if the value of the field is stored as binary
isBoost() - Method in class org.apache.lucene.search.similar.MoreLikeThis
Returns whether to boost terms in query based on "score" or not.
isCacheable() - Method in class org.apache.lucene.search.DocIdSet
This method is a hint for CachingWrapperFilter, if this DocIdSet should be cached without copying it into a BitSet.
isCacheable() - Method in class org.apache.lucene.search.FieldCacheDocIdSet
this DocIdSet is cacheable, if it works solely with FieldCache and no TermDocs
isCacheable() - Method in class org.apache.lucene.search.FilteredDocIdSet
This DocIdSet implementation is cacheable if the inner set is cacheable.
isCacheable() - Method in class org.apache.lucene.util.DocIdBitSet
This DocIdSet implementation is cacheable.
isCacheable() - Method in class org.apache.lucene.util.FixedBitSet
This DocIdSet implementation is cacheable.
isCacheable() - Method in class org.apache.lucene.util.OpenBitSet
This DocIdSet implementation is cacheable.
isCacheable() - Method in class org.apache.lucene.util.SortedVIntList
This DocIdSet implementation is cacheable.
isCached() - Method in class org.apache.lucene.search.CachingCollector

isCachedTokenStream() - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor

isCFSFile(String) - Method in class org.apache.lucene.index.IndexFileNameFilter
Returns true if this is a file that would be contained in a CFS file.
isCollapsable() - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence
Return true if can be collapsed in case it is outermost sequence
isCompiled() - Method in class org.apache.lucene.util.fst.Builder.UnCompiledNode

isCoordDisabled() - Method in class org.apache.lucene.search.BooleanQuery
Returns true iff Similarity.coord(int,int) is disabled in scoring for this query instance.
isCrossProduct() - Method in class org.apache.lucene.analysis.hunspell.HunspellAffix
Returns whether the affix is defined as cross product
isCurrent() - Method in class org.apache.lucene.index.FilterIndexReader

isCurrent() - Method in class org.apache.lucene.index.IndexReader
Check whether any new changes have occurred to the index since this reader was opened.
isCurrent() - Method in class org.apache.lucene.index.MultiReader
Checks recursively if all subreaders are up to date.
isCurrent() - Method in class org.apache.lucene.index.ParallelReader
Checks recursively if all subreaders are up to date.
isCurrent() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated. An InstantiatedIndexReader is always current! Check whether this IndexReader is still using the current (i.e., most recently committed) version of the index.
isDefaultField(CharSequence) - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
This method is use toQueryString to detect if fld is the default field
isDeleted(int) - Method in class org.apache.lucene.index.AbstractAllTermDocs

isDeleted(int) - Method in class org.apache.lucene.index.FilterIndexReader

isDeleted() - Method in class org.apache.lucene.index.IndexCommit

isDeleted(int) - Method in class org.apache.lucene.index.IndexReader
Returns true if document n has been deleted
isDeleted(int) - Method in class org.apache.lucene.index.MultiReader

isDeleted(int) - Method in class org.apache.lucene.index.ParallelReader

isDeleted(int) - Method in class org.apache.lucene.index.SegmentReader

isDeleted() - Method in class org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint

isDeleted(int) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
isDescendantOf(CategoryPath) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Test whether this object is a descendant of another CategoryPath.
isDisableCoord() - Method in class org.apache.lucene.queryParser.standard.nodes.StandardBooleanQueryNode

isDisableCounting() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask
Return true if counting is disabled for this task.
isDocStoreFile(String) - Static method in class org.apache.lucene.index.IndexFileNames
Returns true if the provided filename is one of the doc store files (ends with an extension in IndexFileNames.STORE_INDEX_EXTENSIONS).
isEmpty() - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

isEmpty() - Method in class org.apache.lucene.search.vectorhighlight.FieldTermStack
to know whether the stack is empty
isEmpty() - Method in class org.apache.lucene.util.collections.ArrayHashMap
Returns true iff the map is empty.
isEmpty() - Method in class org.apache.lucene.util.collections.FloatToObjectMap

isEmpty() - Method in class org.apache.lucene.util.collections.IntHashSet

isEmpty() - Method in class org.apache.lucene.util.collections.IntToDoubleMap

isEmpty() - Method in class org.apache.lucene.util.collections.IntToIntMap

isEmpty() - Method in class org.apache.lucene.util.collections.IntToObjectMap

isEmpty() - Method in class org.apache.lucene.util.collections.ObjectToFloatMap

isEmpty() - Method in class org.apache.lucene.util.collections.ObjectToIntMap

isEmpty() - Method in class org.apache.lucene.util.OpenBitSet
Returns true if there are no set bits
isEmpty() - Method in class org.apache.lucene.util.WeakIdentityMap

isExpandMultiTermQuery() - Method in class org.apache.lucene.search.highlight.QueryScorer

isFieldMatch() - Method in class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
return whether fieldMatch or not.
isFieldsSubQueryAcceptable() - Method in class org.apache.lucene.queryParser.surround.query.ComposedQuery

isFieldsSubQueryAcceptable() - Method in class org.apache.lucene.queryParser.surround.query.FieldsQuery

isFieldsSubQueryAcceptable() - Method in class org.apache.lucene.queryParser.surround.query.SrndQuery

isFinal - Variable in class org.apache.lucene.util.fst.Builder.Arc

isFinal - Variable in class org.apache.lucene.util.fst.Builder.UnCompiledNode

isFinal() - Method in class org.apache.lucene.util.fst.FST.Arc

isFirst() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column
Deprecated.
isFixedPoint() - Method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
isFixedPoint() - Method in class org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.
isFixedPoint() - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated.
isGreedy() - Method in class org.apache.lucene.search.TimeLimitingCollector
Checks if this time limited collector is greedy in collecting the last hit.
isGroup(char) - Method in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

isIgnoreCase() - Method in class org.apache.lucene.analysis.hunspell.HunspellDictionary

isIgnoreTF() - Method in class org.apache.lucene.search.FuzzyLikeThisQuery

isIgnoringOffsets() - Method in class org.apache.lucene.index.TermVectorMapper

isIgnoringPositions() - Method in class org.apache.lucene.index.PositionBasedTermVectorMapper
Never ignores positions.
isIgnoringPositions() - Method in class org.apache.lucene.index.TermVectorMapper
Indicate to Lucene that even if there are positions stored, this mapper is not interested in them and they can be skipped over.
isIgnoringSinglePrefixOrSuffixShingle() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated.
isIndexed - Variable in class org.apache.lucene.document.AbstractField

isIndexed() - Method in class org.apache.lucene.document.AbstractField
True iff the value of the field is to be indexed, so that it may be searched on.
isIndexed() - Method in enum org.apache.lucene.document.Field.Index

isIndexed() - Method in interface org.apache.lucene.document.Fieldable
True if the value of the field is to be indexed, so that it may be searched on.
isIndexed - Variable in class org.apache.lucene.index.FieldInfo

isInOrder() - Method in class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode

isInOrder() - Method in class org.apache.lucene.search.spans.SpanNearQuery
Return true if matches are required to be in-order.
isInside(double) - Method in class org.apache.lucene.spatial.tier.Shape
Deprecated.
isInvoke(char) - Method in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

isKanji(char) - Method in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

isKeyword() - Method in interface org.apache.lucene.analysis.tokenattributes.KeywordAttribute
Returns true iff the current token is a keyword, otherwise false/
isKeyword() - Method in class org.apache.lucene.analysis.tokenattributes.KeywordAttributeImpl
Returns true iff the current token is a keyword, otherwise false/
isKnown() - Method in class org.apache.lucene.analysis.ja.Token
Returns true if this token is known word
isLast() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column
Deprecated.
isLast() - Method in class org.apache.lucene.util.fst.FST.Arc

isLazy() - Method in class org.apache.lucene.document.AbstractField

isLazy() - Method in interface org.apache.lucene.document.Fieldable
Indicates whether a Field is Lazy or not.
isLeaf() - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode
verify if a node is a Leaf node
isLeaf() - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

isLocked(Directory) - Static method in class org.apache.lucene.index.IndexWriter
Returns true iff the index in the named directory is currently locked.
isLocked() - Method in class org.apache.lucene.store.Lock
Returns true if the resource is currently locked.
isLowercaseExpandedTerms() - Method in interface org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttribute
Deprecated.
isLowercaseExpandedTerms() - Method in class org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl
Deprecated.
isLowerInclusive() - Method in class org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode

isLowerInclusive() - Method in interface org.apache.lucene.queryParser.core.nodes.RangeQueryNode

isLowerInclusive() - Method in class org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode
Returns whether the lower bound is inclusive or exclusive.
isMatch() - Method in class org.apache.lucene.search.ComplexExplanation
Indicates whether or not this Explanation models a good match.
isMatch() - Method in class org.apache.lucene.search.Explanation
Indicates whether or not this Explanation models a good match.
isMerged(SegmentInfos, int, Map<SegmentInfo, Boolean>) - Method in class org.apache.lucene.index.LogMergePolicy

isMerged(SegmentInfo) - Method in class org.apache.lucene.index.LogMergePolicy
Returns true if this single info is already fully merged (has no pending norms or deletes, is in the same dir as the writer, and matches the current compound file setting
isMyEvilException(Throwable) - Static method in class org.apache.lucene.analysis.MockReaderWrapper

isNewFragment() - Method in interface org.apache.lucene.search.highlight.Fragmenter
Test to see if this token from the stream should be held in a new TextFragment.
isNewFragment() - Method in class org.apache.lucene.search.highlight.NullFragmenter

isNewFragment() - Method in class org.apache.lucene.search.highlight.SimpleFragmenter

isNewFragment() - Method in class org.apache.lucene.search.highlight.SimpleSpanFragmenter

isNormalized() - Method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
isNormalized() - Method in class org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.
isNormalized() - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated.
isOffsetOverlap(FieldPhraseList.WeightedPhraseInfo) - Method in class org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo

ISOLatin1AccentFilter - Class in org.apache.lucene.analysis
Deprecated. If you build a new index, use ASCIIFoldingFilter which covers a superset of Latin 1. This class is included for use with existing indexes and will be removed in a future release (possibly Lucene 4.0).
ISOLatin1AccentFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.ISOLatin1AccentFilter
Deprecated.
isOpen - Variable in class org.apache.lucene.store.Directory

isOpen() - Method in class org.apache.lucene.store.MockDirectoryWrapper

isOpen - Variable in class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput.Descriptor

isOperatorInfix() - Method in class org.apache.lucene.queryParser.surround.query.ComposedQuery

isOptimized() - Method in class org.apache.lucene.index.FilterIndexReader
Deprecated.
isOptimized() - Method in class org.apache.lucene.index.IndexReader
Deprecated. Check segment count using IndexReader.getSequentialSubReaders() instead.
isOptimized() - Method in class org.apache.lucene.index.MultiReader
Deprecated.
isOptimized() - Method in class org.apache.lucene.index.ParallelReader
Deprecated.
isOptimized() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
isOutputUnigrams() - Method in class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper

isOutputUnigramsIfNoShingles() - Method in class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper

isOverriddenAsOf(Class<? extends C>) - Method in class org.apache.lucene.util.VirtualMethod
Returns, if this method is overridden/implemented in the inheritance path between baseClass and the given subclass subclazz.
isParallel() - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

isPayloadAvailable() - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermPositions

isPayloadAvailable() - Method in class org.apache.lucene.index.MultipleTermPositions

isPayloadAvailable() - Method in interface org.apache.lucene.index.TermPositions
Checks if a payload can be loaded at this position.
isPayloadAvailable() - Method in class org.apache.lucene.search.spans.NearSpansOrdered

isPayloadAvailable() - Method in class org.apache.lucene.search.spans.NearSpansUnordered

isPayloadAvailable() - Method in class org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan

isPayloadAvailable() - Method in class org.apache.lucene.search.spans.Spans
Checks if a payload can be loaded at this position.
isPayloadAvailable() - Method in class org.apache.lucene.search.spans.TermSpans

isPayloadAvailable() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermPositions

isPhraseHighlight() - Method in class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
return whether phraseHighlight or not.
isPositionIncrementsEnabled() - Method in interface org.apache.lucene.queryParser.standard.config.PositionIncrementsAttribute
Deprecated.
isPositionIncrementsEnabled() - Method in class org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl
Deprecated.
isPositionSensitive() - Method in class org.apache.lucene.search.highlight.WeightedSpanTerm

isPowerOfTwo(int) - Static method in class org.apache.lucene.util.BitUtil
returns true if v is a power of two or zero
isPowerOfTwo(long) - Static method in class org.apache.lucene.util.BitUtil
returns true if v is a power of two or zero
isProhibited() - Method in class org.apache.lucene.search.BooleanClause

isRelevant(String, QualityQuery) - Method in interface org.apache.lucene.benchmark.quality.Judge
Judge if document docName is relevant for the given quality query.
isRelevant(String, QualityQuery) - Method in class org.apache.lucene.benchmark.quality.trec.TrecJudge

isReplaceInvalidAcronym() - Method in class org.apache.lucene.analysis.standard.ClassicTokenizer
Deprecated. Remove in 3.X and make true the only valid value
isReplaceInvalidAcronym() - Method in class org.apache.lucene.analysis.standard.StandardTokenizer
Deprecated. Remove in 3.X and make true the only valid value
isRequired() - Method in class org.apache.lucene.search.BooleanClause

isRoot() - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

isSearcherCurrent() - Method in class org.apache.lucene.search.NRTManager
Returns true if no changes have occured since this searcher ie.
isSearcherCurrent() - Method in class org.apache.lucene.search.SearcherManager
Returns true if no changes have occured since this searcher ie.
isSelected(File, String, File) - Method in class org.apache.lucene.util.LuceneJUnitDividingSelector

isSelfPartition(int, FacetArrays, int) - Method in class org.apache.lucene.facet.search.FacetResultsHandler
Check if an array contains the partition which contains ordinal
isSeparateNormsFile(String) - Static method in class org.apache.lucene.index.IndexFileNames
Returns true if the given filename ends with the separate norms file pattern: SEPARATE_NORMS_EXTENSION + "[0-9]+".
isSimpleFSIndexInput(IndexInput) - Static method in class org.apache.lucene.store._TestHelper
Returns true if the instance of the provided input stream is actually an SimpleFSIndexInput.
isSimpleFSIndexInputClone(IndexInput) - Static method in class org.apache.lucene.store._TestHelper
Returns true if the provided input stream is an SimpleFSIndexInput and is a clone, that is it does not own its underlying file descriptor.
isSimpleFSIndexInputOpen(IndexInput) - Static method in class org.apache.lucene.store._TestHelper
Given an instance of SimpleFSDirectory.SimpleFSIndexInput, this method returns true if the underlying file descriptor is valid, and false otherwise.
isSnapshotted(String) - Method in class org.apache.lucene.index.SnapshotDeletionPolicy
Returns true if the given ID is already used by a snapshot.
isStored - Variable in class org.apache.lucene.document.AbstractField

isStored() - Method in class org.apache.lucene.document.AbstractField
True iff the value of the field is to be stored in the index for return with search hits.
isStored() - Method in enum org.apache.lucene.document.Field.Store

isStored() - Method in enum org.apache.lucene.document.Field.TermVector

isStored() - Method in interface org.apache.lucene.document.Fieldable
True if the value of the field is to be stored in the index for return with search hits.
isStoreOffsetWithTermVector() - Method in class org.apache.lucene.document.AbstractField
True iff terms are stored as term vector together with their offsets (start and end position in source text).
isStoreOffsetWithTermVector() - Method in interface org.apache.lucene.document.Fieldable
True if terms are stored as term vector together with their offsets (start and end positon in source text).
isStorePositionWithTermVector() - Method in class org.apache.lucene.document.AbstractField
True iff terms are stored as term vector together with their token positions.
isStorePositionWithTermVector() - Method in interface org.apache.lucene.document.Fieldable
True if terms are stored as term vector together with their token positions.
isStrict() - Method in class org.apache.lucene.search.function.CustomScoreQuery
Checks if this is strict custom scoring.
isSupportedJVM() - Static method in class org.apache.lucene.util.RamUsageEstimator
Returns true, if the current JVM is fully supported by RamUsageEstimator.
isTerminal() - Method in class org.apache.lucene.search.vectorhighlight.FieldQuery.QueryPhraseMap

isTermVectorStored() - Method in class org.apache.lucene.document.AbstractField
True iff the term or terms used to index this field are stored as a term vector, available from IndexReader.getTermFreqVector(int,String).
isTermVectorStored() - Method in interface org.apache.lucene.document.Fieldable
True if the term or terms used to index this field are stored as a term vector, available from IndexReader.getTermFreqVector(int,String).
isTestThread() - Method in class org.apache.lucene.util.LuceneTestCase
Returns true if and only if the calling thread is the primary thread executing the test case.
isTokenChar(int) - Method in class org.apache.lucene.analysis.ar.ArabicLetterTokenizer
Deprecated. Allows for Letter category or NonspacingMark category
isTokenChar(char) - Method in class org.apache.lucene.analysis.CharTokenizer
Deprecated. use CharTokenizer.isTokenChar(int) instead. This method will be removed in Lucene 4.0.
isTokenChar(int) - Method in class org.apache.lucene.analysis.CharTokenizer
Returns true iff a codepoint should be included in a token.
isTokenChar(int) - Method in class org.apache.lucene.analysis.in.IndicTokenizer
Deprecated.
isTokenChar(int) - Method in class org.apache.lucene.analysis.LetterTokenizer
Collects only characters which satisfy Character.isLetter(int).
isTokenChar(int) - Method in class org.apache.lucene.analysis.MockTokenizer

isTokenChar(int) - Method in class org.apache.lucene.analysis.ru.RussianLetterTokenizer
Deprecated. Collects only characters which satisfy Character.isLetter(int).
isTokenChar(int) - Method in class org.apache.lucene.analysis.WhitespaceTokenizer
Collects only characters which do not satisfy Character.isWhitespace(int).
isTokenized - Variable in class org.apache.lucene.document.AbstractField

isTokenized() - Method in class org.apache.lucene.document.AbstractField
True iff the value of the field should be tokenized as text prior to indexing.
isTokenized() - Method in interface org.apache.lucene.document.Fieldable
True if the value of the field should be tokenized as text prior to indexing.
isUnknown() - Method in class org.apache.lucene.analysis.ja.Token
Returns true if this token is unknown word
isUpperInclusive() - Method in class org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode

isUpperInclusive() - Method in interface org.apache.lucene.queryParser.core.nodes.RangeQueryNode

isUpperInclusive() - Method in class org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode
Returns whether the upper bound is inclusive or exclusive.
isUseCompoundFile() - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams

isUser() - Method in class org.apache.lucene.analysis.ja.Token
Returns true if this token is defined in user dictionary
isUsingComplements - Variable in class org.apache.lucene.facet.search.StandardFacetsAccumulator

isValidTermOrPhrase(List<FieldTermStack.TermInfo>) - Method in class org.apache.lucene.search.vectorhighlight.FieldQuery.QueryPhraseMap

isWeighted() - Method in class org.apache.lucene.queryParser.surround.query.SrndQuery

ItalianAnalyzer - Class in org.apache.lucene.analysis.it
Analyzer for Italian.
ItalianAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.it.ItalianAnalyzer
Builds an analyzer with the default stop words: ItalianAnalyzer.DEFAULT_STOPWORD_FILE.
ItalianAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.it.ItalianAnalyzer
Builds an analyzer with the given stop words.
ItalianAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.it.ItalianAnalyzer
Builds an analyzer with the given stop words.
ItalianLightStemFilter - Class in org.apache.lucene.analysis.it
A TokenFilter that applies ItalianLightStemmer to stem Italian words.
ItalianLightStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.it.ItalianLightStemFilter

ItalianLightStemmer - Class in org.apache.lucene.analysis.it
Light Stemmer for Italian.
ItalianLightStemmer() - Constructor for class org.apache.lucene.analysis.it.ItalianLightStemmer

ItalianStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
ItalianStemmer() - Constructor for class org.tartarus.snowball.ext.ItalianStemmer

ITALICS - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

ITALICS_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

iterator() - Method in class org.apache.lucene.analysis.CharArrayMap.EntrySet

iterator() - Method in class org.apache.lucene.analysis.CharArraySet
Returns an CharArraySet.CharArraySetIterator depending on the version used: if matchVersion ≥ 3.1, it returns char[] instances in this set. if matchVersion is 3.0 or older, it returns new allocated Strings, so this method violates the Set interface.
iterator() - Method in class org.apache.lucene.facet.index.attributes.CategoryAttributesIterable

iterator() - Method in class org.apache.lucene.facet.index.CategoryContainer

iterator(int) - Method in class org.apache.lucene.facet.search.cache.CategoryListData
Iterate on the category list data for the specified partition.
iterator() - Method in interface org.apache.lucene.facet.search.ScoredDocIDs
Returns an iterator over the document IDs and their scores.
iterator() - Method in class org.apache.lucene.index.FieldInfos

iterator() - Method in class org.apache.lucene.index.SegmentInfos
Returns an unmodifiable Iterator of contained segments in order.
iterator() - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

iterator() - Method in class org.apache.lucene.search.BooleanFilter
Returns an iterator on the clauses in this query.
iterator() - Method in class org.apache.lucene.search.BooleanQuery
Returns an iterator on the clauses in this query.
iterator() - Method in class org.apache.lucene.search.DisjunctionMaxQuery
An Iterator over the disjuncts
iterator() - Method in class org.apache.lucene.search.DocIdSet
Provides a DocIdSetIterator to access the set.
iterator() - Method in class org.apache.lucene.search.FieldCacheDocIdSet

iterator() - Method in class org.apache.lucene.search.FilteredDocIdSet
Implementation of the contract to build a DocIdSetIterator.
iterator() - Method in class org.apache.lucene.search.suggest.BytesRefList
sugar for BytesRefList.iterator(Comparator) with a null comparator
iterator(Comparator<BytesRef>) - Method in class org.apache.lucene.search.suggest.BytesRefList
Returns a BytesRefIterator with point in time semantics.
iterator() - Method in interface org.apache.lucene.search.suggest.fst.BytesRefSorter
Sorts the entries added in BytesRefSorter.add(BytesRef) and returns an iterator over all sorted entries.
iterator() - Method in class org.apache.lucene.search.suggest.fst.ExternalRefSorter

iterator() - Method in class org.apache.lucene.search.suggest.fst.InMemorySorter

iterator() - Method in class org.apache.lucene.util.collections.ArrayHashMap
Returns an iterator on the mapped objects.
iterator() - Method in class org.apache.lucene.util.collections.FloatToObjectMap
Returns a new iterator for the mapped objects.
iterator() - Method in class org.apache.lucene.util.collections.IntHashSet
Returns a new iterator for the mapped objects.
iterator() - Method in class org.apache.lucene.util.collections.IntToDoubleMap
Returns a new iterator for the mapped double values.
iterator() - Method in class org.apache.lucene.util.collections.IntToIntMap
Returns a new iterator for the mapped objects.
iterator() - Method in class org.apache.lucene.util.collections.IntToObjectMap
Returns a new iterator for the mapped objects.
iterator() - Method in class org.apache.lucene.util.collections.ObjectToFloatMap
Returns a new iterator for the mapped floats.
iterator() - Method in class org.apache.lucene.util.collections.ObjectToIntMap
Returns a new iterator for the mapped objects.
iterator() - Method in class org.apache.lucene.util.DocIdBitSet

iterator() - Method in class org.apache.lucene.util.FixedBitSet

iterator() - Method in class org.apache.lucene.util.MapBackedSet

iterator() - Method in class org.apache.lucene.util.OpenBitSet

iterator() - Method in class org.apache.lucene.util.SortedVIntList

J

JakartaRegexpCapabilities - Class in org.apache.lucene.search.regex
Implementation tying Jakarta Regexp to RegexQuery.
JakartaRegexpCapabilities() - Constructor for class org.apache.lucene.search.regex.JakartaRegexpCapabilities
Constructs a RegexCapabilities with the default MATCH_NORMAL match style.
JakartaRegexpCapabilities(int) - Constructor for class org.apache.lucene.search.regex.JakartaRegexpCapabilities
Constructs a RegexCapabilities with the provided match flags.
JapaneseAnalyzer - Class in org.apache.lucene.analysis.ja
Analyzer for Japanese that uses morphological analysis.
JapaneseAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.ja.JapaneseAnalyzer

JapaneseAnalyzer(Version, UserDictionary, JapaneseTokenizer.Mode, CharArraySet, Set<String>) - Constructor for class org.apache.lucene.analysis.ja.JapaneseAnalyzer

JapaneseBaseFormFilter - Class in org.apache.lucene.analysis.ja
Replaces term text with the BaseFormAttribute.
JapaneseBaseFormFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.ja.JapaneseBaseFormFilter

JapaneseKatakanaStemFilter - Class in org.apache.lucene.analysis.ja
A TokenFilter that normalizes common katakana spelling variations ending in a long sound character by removing this character (U+30FC).
JapaneseKatakanaStemFilter(TokenStream, int) - Constructor for class org.apache.lucene.analysis.ja.JapaneseKatakanaStemFilter

JapaneseKatakanaStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.ja.JapaneseKatakanaStemFilter

JapanesePartOfSpeechStopFilter - Class in org.apache.lucene.analysis.ja
Removes tokens that match a set of part-of-speech tags.
JapanesePartOfSpeechStopFilter(boolean, TokenStream, Set<String>) - Constructor for class org.apache.lucene.analysis.ja.JapanesePartOfSpeechStopFilter

JapaneseReadingFormFilter - Class in org.apache.lucene.analysis.ja
A TokenFilter that replaces the term attribute with the reading of a token in either katakana or romaji form.
JapaneseReadingFormFilter(TokenStream, boolean) - Constructor for class org.apache.lucene.analysis.ja.JapaneseReadingFormFilter

JapaneseReadingFormFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.ja.JapaneseReadingFormFilter

JapaneseTokenizer - Class in org.apache.lucene.analysis.ja
Tokenizer for Japanese that uses morphological analysis.
JapaneseTokenizer(Reader, UserDictionary, boolean, JapaneseTokenizer.Mode) - Constructor for class org.apache.lucene.analysis.ja.JapaneseTokenizer
Create a new JapaneseTokenizer.
JapaneseTokenizer.Mode - Enum in org.apache.lucene.analysis.ja
Tokenization mode: this determines how the tokenizer handles compound and unknown words.
JaroWinklerDistance - Class in org.apache.lucene.search.spell
Similarity measure for short strings such as person names.
JaroWinklerDistance() - Constructor for class org.apache.lucene.search.spell.JaroWinklerDistance

JaspellLookup - Class in org.apache.lucene.search.suggest.jaspell

JaspellLookup() - Constructor for class org.apache.lucene.search.suggest.jaspell.JaspellLookup

JaspellTernarySearchTrie - Class in org.apache.lucene.search.suggest.jaspell
Implementation of a Ternary Search Trie, a data structure for storing String objects that combines the compact size of a binary search tree with the speed of a digital search trie, and is therefore ideal for practical use in sorting and searching data.
JaspellTernarySearchTrie() - Constructor for class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Constructs an empty Ternary Search Trie.
JaspellTernarySearchTrie(File) - Constructor for class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Constructs a Ternary Search Trie and loads data from a File into the Trie.
JaspellTernarySearchTrie(File, boolean) - Constructor for class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Constructs a Ternary Search Trie and loads data from a File into the Trie.
JaspellTernarySearchTrie.TSTNode - Class in org.apache.lucene.search.suggest.jaspell
An inner class of Ternary Search Trie that represents a node in the trie.
JaspellTernarySearchTrie.TSTNode(char, JaspellTernarySearchTrie.TSTNode) - Constructor for class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode
Constructor method.
JAVA_1_1 - Static variable in class org.apache.lucene.util.Constants
Deprecated. This constant is useless since Lucene is on Java 5
JAVA_1_2 - Static variable in class org.apache.lucene.util.Constants
Deprecated. This constant is useless since Lucene is on Java 5
JAVA_1_3 - Static variable in class org.apache.lucene.util.Constants
Deprecated. This constant is useless since Lucene is on Java 5
JAVA_VENDOR - Static variable in class org.apache.lucene.util.Constants

JAVA_VERSION - Static variable in class org.apache.lucene.util.Constants
The value of System.getProperty("java.version").
JavaCharStream - Class in org.apache.lucene.queryParser.standard.parser
An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (with java-like unicode escape processing).
JavaCharStream(Reader, int, int, int) - Constructor for class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Constructor.
JavaCharStream(Reader, int, int) - Constructor for class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Constructor.
JavaCharStream(Reader) - Constructor for class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Constructor.
JavaCharStream(InputStream, String, int, int, int) - Constructor for class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Constructor.
JavaCharStream(InputStream, int, int, int) - Constructor for class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Constructor.
JavaCharStream(InputStream, String, int, int) - Constructor for class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Constructor.
JavaCharStream(InputStream, int, int) - Constructor for class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Constructor.
JavaCharStream(InputStream, String) - Constructor for class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Constructor.
JavaCharStream(InputStream) - Constructor for class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Constructor.
JavaUtilRegexCapabilities - Class in org.apache.lucene.search.regex
An implementation tying Java's built-in java.util.regex to RegexQuery.
JavaUtilRegexCapabilities() - Constructor for class org.apache.lucene.search.regex.JavaUtilRegexCapabilities
Default constructor that uses java.util.regex.Pattern with its default flags.
JavaUtilRegexCapabilities(int) - Constructor for class org.apache.lucene.search.regex.JavaUtilRegexCapabilities
Constructor that allows for the modification of the flags that the java.util.regex.Pattern will use to compile the regular expression.
jj_nt - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Next token.
jj_nt - Variable in class org.apache.lucene.queryParser.QueryParser
Next token.
jj_nt - Variable in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Next token.
jj_nt - Variable in class org.apache.lucene.queryParser.surround.parser.QueryParser
Next token.
jjFillToken() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager

jjFillToken() - Method in class org.apache.lucene.queryParser.QueryParserTokenManager

jjFillToken() - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager

jjFillToken() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager

jjnewLexState - Static variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager
Lex State array.
jjnewLexState - Static variable in class org.apache.lucene.queryParser.QueryParserTokenManager
Lex State array.
jjnewLexState - Static variable in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager
Lex State array.
jjnewLexState - Static variable in class org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager
Lex State array.
jjstrLiteralImages - Static variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager
Token literal values.
jjstrLiteralImages - Static variable in class org.apache.lucene.queryParser.QueryParserTokenManager
Token literal values.
jjstrLiteralImages - Static variable in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager
Token literal values.
jjstrLiteralImages - Static variable in class org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager
Token literal values.
join(String[], CharsRef) - Static method in class org.apache.lucene.analysis.synonym.SynonymMap.Builder
Sugar: just joins the provided terms with SynonymMap.WORD_SEPARATOR.
JoinUtil - Class in org.apache.lucene.search.join
Utility for query time joining using TermsQuery and TermsCollector.
JRE_IS_64BIT - Static variable in class org.apache.lucene.util.Constants
True iff running on a 64bit JVM
JRE_IS_MINIMUM_JAVA6 - Static variable in class org.apache.lucene.util.Constants

JRE_IS_MINIMUM_JAVA7 - Static variable in class org.apache.lucene.util.Constants

jreBugWorkaround(char) - Method in class org.apache.lucene.analysis.util.CharArrayIterator

Judge - Interface in org.apache.lucene.benchmark.quality
Judge if a document is relevant for a quality query.
JVM_INFO_STRING - Static variable in class org.apache.lucene.util.RamUsageEstimator
JVM info string for debugging and reports.
JVM_NAME - Static variable in class org.apache.lucene.util.Constants

JVM_VENDOR - Static variable in class org.apache.lucene.util.Constants
JVM vendor info.
JVM_VERSION - Static variable in class org.apache.lucene.util.Constants

K

KAF - Static variable in class org.apache.lucene.analysis.ar.ArabicStemmer

KAF - Static variable in class org.apache.lucene.analysis.fa.PersianNormalizer

KANJI - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

KANJINUMERIC - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

KASRA - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

KASRATAN - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

KATAKANA - Static variable in class org.apache.lucene.analysis.cjk.CJKBigramFilter
bigram flag for Katakana
KATAKANA - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

KATAKANA - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizer

KATAKANA - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

KATAKANA_TYPE - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizerImpl

KATAKANA_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated.
KATAKANA_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated.
KATAKANA_TYPE - Static variable in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated.
KATAKANA_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Deprecated. use UAX29URLEmailTokenizer.TOKEN_TYPES instead
KATAKANA_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl

keepFullyDeletedSegments(IndexWriter) - Static method in class org.apache.lucene.util._TestUtil

KeepOnlyLastCommitDeletionPolicy - Class in org.apache.lucene.index
This IndexDeletionPolicy implementation that keeps only the most recent commit and immediately removes all prior commits after a new commit is done.
KeepOnlyLastCommitDeletionPolicy() - Constructor for class org.apache.lucene.index.KeepOnlyLastCommitDeletionPolicy

KEHEH - Static variable in class org.apache.lucene.analysis.fa.PersianNormalizer

ket - Variable in class org.tartarus.snowball.SnowballProgram

key - Variable in class org.apache.lucene.search.suggest.Lookup.LookupResult

keyIterator() - Method in class org.apache.lucene.util.collections.ArrayHashMap
Returns an iterator on the map keys.
keyIterator() - Method in class org.apache.lucene.util.collections.FloatToObjectMap
Returns an iterator on the map keys.
keyIterator() - Method in class org.apache.lucene.util.collections.IntToDoubleMap
Returns an iterator on the map keys.
keyIterator() - Method in class org.apache.lucene.util.collections.IntToIntMap
Returns an iterator on the map keys.
keyIterator() - Method in class org.apache.lucene.util.collections.IntToObjectMap
Returns an iterator on the map keys.
keyIterator() - Method in class org.apache.lucene.util.collections.ObjectToFloatMap
Returns an iterator on the map keys.
keyIterator() - Method in class org.apache.lucene.util.collections.ObjectToIntMap

keyIterator() - Method in class org.apache.lucene.util.WeakIdentityMap
Returns an iterator over all weak keys of this map.
keys() - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

keys - Variable in class org.apache.lucene.search.grouping.SentinelIntSet

keySet() - Method in class org.apache.lucene.analysis.CharArrayMap
Returns an CharArraySet view on the map's keys.
KEYWORD - Static variable in class org.apache.lucene.analysis.MockTokenizer
Acts Similar to KeywordTokenizer.
KeywordAnalyzer - Class in org.apache.lucene.analysis
"Tokenizes" the entire stream as a single token.
KeywordAnalyzer() - Constructor for class org.apache.lucene.analysis.KeywordAnalyzer

KeywordAttribute - Interface in org.apache.lucene.analysis.tokenattributes
This attribute can be used to mark a token as a keyword.
KeywordAttributeImpl - Class in org.apache.lucene.analysis.tokenattributes
This attribute can be used to mark a token as a keyword.
KeywordAttributeImpl() - Constructor for class org.apache.lucene.analysis.tokenattributes.KeywordAttributeImpl

KeywordMarkerFilter - Class in org.apache.lucene.analysis
Marks terms as keywords via the KeywordAttribute.
KeywordMarkerFilter(TokenStream, CharArraySet) - Constructor for class org.apache.lucene.analysis.KeywordMarkerFilter
Create a new KeywordMarkerFilter, that marks the current token as a keyword if the tokens term buffer is contained in the given set via the KeywordAttribute.
KeywordMarkerFilter(TokenStream, Set<?>) - Constructor for class org.apache.lucene.analysis.KeywordMarkerFilter
Create a new KeywordMarkerFilter, that marks the current token as a keyword if the tokens term buffer is contained in the given set via the KeywordAttribute.
KeywordTokenizer - Class in org.apache.lucene.analysis
Emits the entire input as a single token.
KeywordTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.KeywordTokenizer

KeywordTokenizer(Reader, int) - Constructor for class org.apache.lucene.analysis.KeywordTokenizer

KeywordTokenizer(AttributeSource, Reader, int) - Constructor for class org.apache.lucene.analysis.KeywordTokenizer

KeywordTokenizer(AttributeSource.AttributeFactory, Reader, int) - Constructor for class org.apache.lucene.analysis.KeywordTokenizer

keywordTokenStream(Collection<T>) - Method in class org.apache.lucene.index.memory.MemoryIndex
Convenience method; Creates and returns a token stream that generates a token for each keyword in the given collection, "as is", without any transforming text analysis.
KILOMETERS_PER_MILE - Static variable in class org.apache.lucene.spatial.geometry.shape.DistanceApproximation
Deprecated.
kind - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token
An integer that describes the kind of this token.
kind - Variable in class org.apache.lucene.queryParser.standard.parser.Token
An integer that describes the kind of this token.
kind - Variable in class org.apache.lucene.queryParser.surround.parser.Token
An integer that describes the kind of this token.
kind - Variable in class org.apache.lucene.queryParser.Token
An integer that describes the kind of this token.
KM_TO_MILES - Static variable in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
KM_USE_FIRST_OCCURRENCE - Static variable in class org.apache.lucene.search.DuplicateFilter

KM_USE_LAST_OCCURRENCE - Static variable in class org.apache.lucene.search.DuplicateFilter

knows(String) - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

KpStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
KpStemmer() - Constructor for class org.tartarus.snowball.ext.KpStemmer

KStemFilter - Class in org.apache.lucene.analysis.en
A high-performance kstem filter for english.
KStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.en.KStemFilter

KStemmer - Class in org.apache.lucene.analysis.en
This class implements the Kstem algorithm
kv - Variable in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree
This vector holds the trailing of the keys when the branch is compressed.

L

label - Variable in class org.apache.lucene.util.fst.Builder.Arc

label - Variable in class org.apache.lucene.util.fst.FST.Arc

labelResult(FacetResult) - Method in class org.apache.lucene.facet.search.FacetResultsHandler
Label results according to settings in FacetRequest, such as FacetRequest.getNumLabel().
labelResult(FacetResult) - Method in class org.apache.lucene.facet.search.TopKFacetResultsHandler

labelResult(FacetResult) - Method in class org.apache.lucene.facet.search.TopKInEachNodeHandler

LabelToOrdinal - Class in org.apache.lucene.facet.taxonomy.writercache.cl2o
Abstract class for storing Label->Ordinal mappings in a taxonomy.
LabelToOrdinal() - Constructor for class org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal

LAM - Static variable in class org.apache.lucene.analysis.ar.ArabicStemmer

LaoBreakIterator - Class in org.apache.lucene.analysis.icu.segmentation
Syllable iterator for Lao text.
LaoBreakIterator(RuleBasedBreakIterator) - Constructor for class org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator

last() - Method in class org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator

last() - Method in class org.apache.lucene.analysis.util.CharArrayIterator

lastCommit - Variable in class org.apache.lucene.index.SnapshotDeletionPolicy

lastComponent() - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Return the last component of the path, in a new String object.
lastDocBase - Variable in class org.apache.lucene.search.CachingCollector

lastIndexOf(Object) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

lastModified(Directory) - Static method in class org.apache.lucene.index.IndexReader
Deprecated. If you need to track commit time of an index, you can store it in the commit data (see IndexWriter.commit(Map)
LatLng - Class in org.apache.lucene.spatial.geometry
Deprecated.
LatLng() - Constructor for class org.apache.lucene.spatial.geometry.LatLng
Deprecated.
latLonCorner(double, double, double, double[], boolean, double) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated. Uses Haversine to calculate the corner of a box (upper right or lower left) that is the distance away, given a sphere of the specified radius.
latLonCornerDegs(double, double, double, double[], boolean, double) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
LatLongDistanceFilter - Class in org.apache.lucene.spatial.tier
Deprecated.
LatLongDistanceFilter(Filter, double, double, double, String, String) - Constructor for class org.apache.lucene.spatial.tier.LatLongDistanceFilter
Deprecated. Provide a distance filter based from a center point with a radius in miles.
LatvianAnalyzer - Class in org.apache.lucene.analysis.lv
Analyzer for Latvian.
LatvianAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.lv.LatvianAnalyzer
Builds an analyzer with the default stop words: LatvianAnalyzer.DEFAULT_STOPWORD_FILE.
LatvianAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.lv.LatvianAnalyzer
Builds an analyzer with the given stop words.
LatvianAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.lv.LatvianAnalyzer
Builds an analyzer with the given stop words.
LatvianStemFilter - Class in org.apache.lucene.analysis.lv
A TokenFilter that applies LatvianStemmer to stem Latvian words.
LatvianStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.lv.LatvianStemFilter

LatvianStemmer - Class in org.apache.lucene.analysis.lv
Light stemmer for Latvian.
LatvianStemmer() - Constructor for class org.apache.lucene.analysis.lv.LatvianStemmer

lazy - Variable in class org.apache.lucene.document.AbstractField

LEADING_WILDCARD_NOT_ALLOWED - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

LEFT_ID - Static variable in class org.apache.lucene.analysis.ja.dict.UserDictionary

legalCategory() - Method in class org.apache.lucene.facet.index.streaming.CountingListTokenizer
A method which allows extending classes to filter the categories going into the counting list.
len - Variable in class org.apache.lucene.analysis.util.OpenStringBuilder

length() - Method in class org.apache.lucene.analysis.compound.hyphenation.ByteVector
return number of items in array
length() - Method in class org.apache.lucene.analysis.compound.hyphenation.CharVector
return number of items in array
length() - Method in class org.apache.lucene.analysis.compound.hyphenation.Hyphenation

length - Variable in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

length() - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

length() - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

length() - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Return the number of components in the facet path.
length() - Method in class org.apache.lucene.index.MockIndexInput

length - Variable in class org.apache.lucene.index.Payload
the length of the payload data
length() - Method in class org.apache.lucene.index.Payload
Returns the length of the payload data.
length() - Method in class org.apache.lucene.queryParser.core.util.UnescapedCharSequence

length() - Method in class org.apache.lucene.store.BufferedIndexOutput
The number of bytes in the file.
length() - Method in class org.apache.lucene.store.ChecksumIndexInput

length() - Method in class org.apache.lucene.store.ChecksumIndexOutput

length() - Method in class org.apache.lucene.store.FSDirectory.FSIndexOutput

length() - Method in class org.apache.lucene.store.IndexInput
The number of bytes in the file.
length() - Method in class org.apache.lucene.store.IndexOutput
The number of bytes in the file.
length() - Method in class org.apache.lucene.store.MockIndexInputWrapper

length() - Method in class org.apache.lucene.store.MockIndexOutputWrapper

length() - Method in class org.apache.lucene.store.RAMInputStream

length() - Method in class org.apache.lucene.store.RAMOutputStream

length() - Method in class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput

length() - Method in class org.apache.lucene.store.WindowsDirectory.WindowsIndexInput

length() - Method in interface org.apache.lucene.util.Bits

length() - Method in class org.apache.lucene.util.Bits.MatchAllBits

length() - Method in class org.apache.lucene.util.Bits.MatchNoBits

length() - Method in class org.apache.lucene.util.BitVector
Returns the number of bits in this vector.
length - Variable in class org.apache.lucene.util.BytesRef
Length of used bytes.
length - Variable in class org.apache.lucene.util.CharsRef

length() - Method in class org.apache.lucene.util.CharsRef

length() - Method in class org.apache.lucene.util.FixedBitSet

length - Variable in class org.apache.lucene.util.IntsRef

length() - Method in class org.apache.lucene.util.OpenBitSet

length() - Method in class org.apache.lucene.util.ThrottledIndexOutput

length - Variable in class org.apache.lucene.util.UnicodeUtil.UTF16Result

length - Variable in class org.apache.lucene.util.UnicodeUtil.UTF8Result

length() - Method in class org.apache.lucene.util.UnsafeByteArrayOutputStream
Returns the number of relevant bytes.
LengthFilter - Class in org.apache.lucene.analysis
Removes words that are too long or too short from the stream.
LengthFilter(boolean, TokenStream, int, int) - Constructor for class org.apache.lucene.analysis.LengthFilter
Build a filter that removes words that are too long or too short from the text.
LengthFilter(TokenStream, int, int) - Constructor for class org.apache.lucene.analysis.LengthFilter
Deprecated. Use LengthFilter.LengthFilter(boolean, TokenStream, int, int) instead.
lengthNorm(String, int) - Method in class org.apache.lucene.search.Similarity
Deprecated. Please override computeNorm instead
Less(String, String) - Static method in class org.apache.lucene.search.TermRangeFilter
Constructs a filter for field fieldName matching less than or equal to upperTerm.
lessThan(FieldValueHitQueue.Entry, FieldValueHitQueue.Entry) - Method in class org.apache.lucene.search.FieldValueHitQueue

lessThan(SuggestWord, SuggestWord) - Method in class org.apache.lucene.search.spell.SuggestWordQueue

lessThan(Lookup.LookupResult, Lookup.LookupResult) - Method in class org.apache.lucene.search.suggest.Lookup.LookupPriorityQueue

lessThan(T, T) - Method in class org.apache.lucene.util.PriorityQueue
Determines the ordering of objects in this priority queue.
LET - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
LETTER - Static variable in class org.apache.lucene.analysis.cn.smart.CharType
Letters
LetterTokenizer - Class in org.apache.lucene.analysis
A LetterTokenizer is a tokenizer that divides text at non-letters.
LetterTokenizer(Version, Reader) - Constructor for class org.apache.lucene.analysis.LetterTokenizer
Construct a new LetterTokenizer.
LetterTokenizer(Version, AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.LetterTokenizer
Construct a new LetterTokenizer using a given AttributeSource.
LetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.LetterTokenizer
Construct a new LetterTokenizer using a given AttributeSource.AttributeFactory.
LetterTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.LetterTokenizer
Deprecated. use LetterTokenizer.LetterTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
LetterTokenizer(AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.LetterTokenizer
Deprecated. use LetterTokenizer.LetterTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
LetterTokenizer(AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.LetterTokenizer
Deprecated. use LetterTokenizer.LetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
LEVEL_LOG_SPAN - Static variable in class org.apache.lucene.index.LogMergePolicy
Defines the allowed range of log(size) for each level.
levelSizeArray - Static variable in class org.apache.lucene.util.ByteBlockPool

LevensteinDistance - Class in org.apache.lucene.search.spell
Levenstein edit distance class.
LevensteinDistance() - Constructor for class org.apache.lucene.search.spell.LevensteinDistance
Optimized to run a bit faster than the static getDistance().
LexicalError(boolean, int, int, int, String, char) - Static method in error org.apache.lucene.benchmark.byTask.feeds.demohtml.TokenMgrError
Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error.
LexicalError(boolean, int, int, int, String, char) - Static method in error org.apache.lucene.queryParser.standard.parser.TokenMgrError
Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error.
LexicalError(boolean, int, int, int, String, char) - Static method in error org.apache.lucene.queryParser.surround.parser.TokenMgrError
Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error.
LexicalError(boolean, int, int, int, String, char) - Static method in error org.apache.lucene.queryParser.TokenMgrError
Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error.
lexStateNames - Static variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager
Lexer state names.
lexStateNames - Static variable in class org.apache.lucene.queryParser.QueryParserTokenManager
Lexer state names.
lexStateNames - Static variable in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager
Lexer state names.
lexStateNames - Static variable in class org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager
Lexer state names.
Lift - Class in org.egothor.stemmer
The Lift class is a data structure that is a variation of a Patricia trie.
Lift(boolean) - Constructor for class org.egothor.stemmer.Lift
Constructor for the Lift object.
liftUp(Row, List<Row>) - Method in class org.egothor.stemmer.Lift
Reduce the trie using Lift-Up reduction.
like(int) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Return a query that will return docs like the passed lucene document ID.
like(File) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Deprecated. use MoreLikeThis.like(Reader, String) instead
like(URL) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Deprecated. use MoreLikeThis.like(Reader, String) instead
like(InputStream) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Deprecated. use MoreLikeThis.like(Reader, String) instead
like(Reader) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Deprecated. use MoreLikeThis.like(Reader, String) instead
like(Reader, String) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Return a query that will return docs like the passed Reader.
LikeThisQueryBuilder - Class in org.apache.lucene.xmlparser.builders

LikeThisQueryBuilder(Analyzer, String[]) - Constructor for class org.apache.lucene.xmlparser.builders.LikeThisQueryBuilder

limit - Variable in class org.tartarus.snowball.SnowballProgram

limit_backward - Variable in class org.tartarus.snowball.SnowballProgram

LIMITED - Static variable in class org.apache.lucene.index.IndexWriter.MaxFieldLength
Deprecated. Sets the maximum field length to IndexWriter.DEFAULT_MAX_FIELD_LENGTH
LimitTokenCountAnalyzer - Class in org.apache.lucene.analysis
This Analyzer limits the number of tokens while indexing.
LimitTokenCountAnalyzer(Analyzer, int) - Constructor for class org.apache.lucene.analysis.LimitTokenCountAnalyzer
Build an analyzer that limits the maximum number of tokens per field.
LimitTokenCountFilter - Class in org.apache.lucene.analysis
This TokenFilter limits the number of tokens while indexing.
LimitTokenCountFilter(TokenStream, int) - Constructor for class org.apache.lucene.analysis.LimitTokenCountFilter
Build a filter that only accepts tokens up to a maximum number.
line - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

line - Variable in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

LineDocSource - Class in org.apache.lucene.benchmark.byTask.feeds
A ContentSource reading one line at a time as a Document from a single file.
LineDocSource() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.LineDocSource

LineDocSource.HeaderLineParser - Class in org.apache.lucene.benchmark.byTask.feeds
LineDocSource.LineParser which sets field names and order by the header - any header - of the lines file.
LineDocSource.HeaderLineParser(String[]) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.LineDocSource.HeaderLineParser

LineDocSource.LineParser - Class in org.apache.lucene.benchmark.byTask.feeds
Reader of a single input line into DocData.
LineDocSource.LineParser(String[]) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.LineDocSource.LineParser
Construct with the header
LineDocSource.SimpleLineParser - Class in org.apache.lucene.benchmark.byTask.feeds
LineDocSource.LineParser which ignores the header passed to its constructor and assumes simply that field names and their order are the same as in WriteLineDocTask.DEFAULT_FIELDS
LineDocSource.SimpleLineParser(String[]) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.LineDocSource.SimpleLineParser

LineFileDocs - Class in org.apache.lucene.util
Minimal port of contrib/benchmark's LneDocSource + DocMaker, so tests can enum docs from a line file created by contrib/benchmark's WriteLineDoc task
LineFileDocs(Random, String) - Constructor for class org.apache.lucene.util.LineFileDocs
If forever is true, we rewind the file at EOF (repeat the docs over and over)
LineFileDocs(Random) - Constructor for class org.apache.lucene.util.LineFileDocs

lines - Variable in class org.apache.lucene.search.suggest.fst.Sort.SortInfo

LineSegment - Class in org.apache.lucene.spatial.geometry.shape
Deprecated.
LineSegment() - Constructor for class org.apache.lucene.spatial.geometry.shape.LineSegment
Deprecated.
LineSegment(Point2D, Point2D) - Constructor for class org.apache.lucene.spatial.geometry.shape.LineSegment
Deprecated.
LINUX - Static variable in class org.apache.lucene.util.Constants
True iff running on Linux.
listAll() - Method in class org.apache.lucene.store.Directory
Returns an array of strings, one for each file in the directory.
listAll() - Method in class org.apache.lucene.store.FileSwitchDirectory

listAll(File) - Static method in class org.apache.lucene.store.FSDirectory
Lists all files (not subdirectories) in the directory.
listAll() - Method in class org.apache.lucene.store.FSDirectory
Lists all files (not subdirectories) in the directory.
listAll() - Method in class org.apache.lucene.store.MockDirectoryWrapper

listAll() - Method in class org.apache.lucene.store.NRTCachingDirectory

listAll() - Method in class org.apache.lucene.store.RAMDirectory

listCachedFiles() - Method in class org.apache.lucene.store.NRTCachingDirectory

listCommits(Directory) - Static method in class org.apache.lucene.index.IndexReader
Returns all commit points that exist in the Directory.
listIterator() - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

listIterator(int) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

listSegments() - Method in class org.apache.lucene.index.IndexSplitter

LLRect - Class in org.apache.lucene.spatial.geometry.shape
Deprecated.
LLRect(LatLng, LatLng) - Constructor for class org.apache.lucene.spatial.geometry.shape.LLRect
Deprecated.
LLRect(LLRect) - Constructor for class org.apache.lucene.spatial.geometry.shape.LLRect
Deprecated.
lo - Variable in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree
Pointer to low branch and to rest of the key when it is stored directly in this node, we don't have unions in java!
load(InputStream) - Static method in class org.apache.lucene.analysis.stempel.StempelStemmer
Load a stemmer table from an inputstream.
load(File, IndexReader, TaxonomyReader, FacetIndexingParams) - Method in class org.apache.lucene.facet.search.TotalFacetCountsCache
Load TotalFacetCounts matching input parameters from the provided outputFile and add them into the cache for the provided indexReader, taxonomy, and facetIndexingParams.
load(InputStream) - Method in class org.apache.lucene.search.suggest.fst.FSTCompletionLookup

load(InputStream) - Method in class org.apache.lucene.search.suggest.fst.FSTLookup
Deprecated.
load(InputStream) - Method in class org.apache.lucene.search.suggest.fst.WFSTCompletionLookup

load(InputStream) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellLookup

load(InputStream) - Method in class org.apache.lucene.search.suggest.Lookup
Discard current lookup data and load it from a previously saved copy.
load(InputStream) - Method in class org.apache.lucene.search.suggest.tst.TSTLookup

loadAndRegister(CategoryListParams, IndexReader, TaxonomyReader, FacetIndexingParams) - Method in class org.apache.lucene.facet.search.cache.CategoryListCache
Load and register CategoryListData.
loadDirectoryClass(String) - Static method in class org.apache.lucene.util.CommandLineUtil
Loads a specific Directory implementation
LoadFirstFieldSelector - Class in org.apache.lucene.document
Load the First field and break.
LoadFirstFieldSelector() - Constructor for class org.apache.lucene.document.LoadFirstFieldSelector

loadFSDirectoryClass(String) - Static method in class org.apache.lucene.util.CommandLineUtil
Loads a specific FSDirectory implementation
loadPatterns(File) - Method in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree
Read hyphenation patterns from an XML file.
loadPatterns(InputSource) - Method in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree
Read hyphenation patterns from an XML file.
loadStopWords(InputStream, String) - Method in class org.apache.lucene.analysis.cz.CzechAnalyzer
Deprecated. use WordlistLoader.getWordSet(Reader, String, Version) and CzechAnalyzer.CzechAnalyzer(Version, Set) instead
loadStopwordSet(boolean, Class<? extends ReusableAnalyzerBase>, String, String) - Static method in class org.apache.lucene.analysis.StopwordAnalyzerBase
Creates a CharArraySet from a file resource associated with a class.
loadStopwordSet(File, Version) - Static method in class org.apache.lucene.analysis.StopwordAnalyzerBase
Creates a CharArraySet from a file.
loadStopwordSet(Reader, Version) - Static method in class org.apache.lucene.analysis.StopwordAnalyzerBase
Creates a CharArraySet from a file.
loadXML(Reader) - Static method in class org.apache.lucene.xmlparser.DOMUtils
Helper method to parse an XML file into a DOM tree, given a reader.
LOCALE - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set the Locale used when parsing the query
LocaleAttribute - Interface in org.apache.lucene.queryParser.standard.config
Deprecated.
LocaleAttributeImpl - Class in org.apache.lucene.queryParser.standard.config
Deprecated.
LocaleAttributeImpl() - Constructor for class org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl
Deprecated.
localeForName(String) - Static method in class org.apache.lucene.util.LuceneTestCase
return a Locale object equivalent to its programmatic name
Lock - Class in org.apache.lucene.store
An interprocess mutex lock.
Lock() - Constructor for class org.apache.lucene.store.Lock

lock() - Method in class org.apache.lucene.util.DummyConcurrentLock

Lock.With - Class in org.apache.lucene.store
Utility class for executing code with exclusive access.
Lock.With(Lock, long) - Constructor for class org.apache.lucene.store.Lock.With
Constructs an executor that will grab the named lock.
LOCK_OBTAIN_WAIT_FOREVER - Static variable in class org.apache.lucene.store.Lock
Pass this value to Lock.obtain(long) to try forever to obtain the lock.
LOCK_POLL_INTERVAL - Static variable in class org.apache.lucene.store.Lock
How long Lock.obtain(long) waits, in milliseconds, in between attempts to acquire the lock.
lockDir - Variable in class org.apache.lucene.store.FSLockFactory
Directory for the lock files.
lockFactory - Variable in class org.apache.lucene.store.Directory
Holds the LockFactory instance (implements locking for this Directory instance).
LockFactory - Class in org.apache.lucene.store
Base class for Locking implementation.
LockFactory() - Constructor for class org.apache.lucene.store.LockFactory

lockInterruptibly() - Method in class org.apache.lucene.util.DummyConcurrentLock

LockObtainFailedException - Exception in org.apache.lucene.store
This exception is thrown when the write.lock could not be acquired.
LockObtainFailedException(String) - Constructor for exception org.apache.lucene.store.LockObtainFailedException

lockPrefix - Variable in class org.apache.lucene.store.LockFactory

LockReleaseFailedException - Exception in org.apache.lucene.store
This exception is thrown when the write.lock could not be released.
LockReleaseFailedException(String) - Constructor for exception org.apache.lucene.store.LockReleaseFailedException

LockStressTest - Class in org.apache.lucene.store
Simple standalone tool that forever acquires & releases a lock using a specific LockFactory.
LockStressTest() - Constructor for class org.apache.lucene.store.LockStressTest

LockVerifyServer - Class in org.apache.lucene.store
Simple standalone server that must be running when you use VerifyingLockFactory.
LockVerifyServer() - Constructor for class org.apache.lucene.store.LockVerifyServer

log() - Method in class org.apache.lucene.analysis.br.BrazilianStemmer
For log and debug purpose
log(String, int, PrintWriter, String) - Method in class org.apache.lucene.benchmark.quality.QualityStats
Log information on this QualityStats object.
log2(double) - Method in class org.apache.lucene.spatial.tier.projections.CartesianTierPlotter
Deprecated. a log to the base 2 formula Math.log(value) / Math.log(2)
LogByteSizeMergePolicy - Class in org.apache.lucene.index
This is a LogMergePolicy that measures size of a segment as the total byte size of the segment's files.
LogByteSizeMergePolicy() - Constructor for class org.apache.lucene.index.LogByteSizeMergePolicy

LogDocMergePolicy - Class in org.apache.lucene.index
This is a LogMergePolicy that measures size of a segment as the number of documents (not taking deletions into account).
LogDocMergePolicy() - Constructor for class org.apache.lucene.index.LogDocMergePolicy

logicalAnd(QueryNode, QueryNode) - Static method in class org.apache.lucene.queryParser.core.util.QueryNodeOperation
perform a logical and of 2 QueryNode trees.
LogMergePolicy - Class in org.apache.lucene.index
This class implements a MergePolicy that tries to merge segments into levels of exponentially increasing size, where each level has fewer segments than the value of the merge factor.
LogMergePolicy() - Constructor for class org.apache.lucene.index.LogMergePolicy

logStep - Variable in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource

logStep - Variable in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

LOKID - Static variable in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode
Index values for accessing relatives array.
LONG - Static variable in class org.apache.lucene.search.SortField
Sort using term values as encoded Longs.
longestOp(Iterable<TaskStats>) - Method in class org.apache.lucene.benchmark.byTask.tasks.ReportTask
find the longest op name out of completed tasks.
longHashCode() - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Calculate a 64-bit hash function for this path.
longHashCode(int) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Like CategoryPath.longHashCode(), but find the hash function of a prefix with the given number of components, rather than of the entire path.
longToEnglish(long) - Static method in class org.apache.lucene.util.English

longToEnglish(long, StringBuilder) - Static method in class org.apache.lucene.util.English

LongToEnglishContentSource - Class in org.apache.lucene.benchmark.byTask.feeds
Creates documents whose content is a long number starting from Long.MIN_VALUE + 10.
LongToEnglishContentSource() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.LongToEnglishContentSource

LongToEnglishQueryMaker - Class in org.apache.lucene.benchmark.byTask.feeds
Creates queries whose content is a spelled-out long number starting from Long.MIN_VALUE + 10.
LongToEnglishQueryMaker() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.LongToEnglishQueryMaker

longToPrefixCoded(long, int, char[]) - Static method in class org.apache.lucene.util.NumericUtils
Expert: Returns prefix coded bits after reducing the precision by shift bits.
longToPrefixCoded(long, int) - Static method in class org.apache.lucene.util.NumericUtils

longToPrefixCoded(long) - Static method in class org.apache.lucene.util.NumericUtils

longToString(long) - Static method in class org.apache.lucene.document.NumberTools
Deprecated. Converts a long to a String suitable for indexing.
longVal(int) - Method in class org.apache.lucene.search.function.DocValues
Return doc value as a long.
LookaheadTokenFilter<T extends LookaheadTokenFilter.Position> - Class in org.apache.lucene.analysis
An abstract TokenFilter to make it easier to build graph token filters requiring some lookahead.
LookaheadTokenFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.LookaheadTokenFilter

LookaheadTokenFilter.Position - Class in org.apache.lucene.analysis
Holds all state for a single position; subclass this to record other state at each position.
LookaheadTokenFilter.Position() - Constructor for class org.apache.lucene.analysis.LookaheadTokenFilter.Position

lookup(char[], int, int) - Method in class org.apache.lucene.analysis.ja.dict.UnknownDictionary

lookup(char[], int, int) - Method in class org.apache.lucene.analysis.ja.dict.UserDictionary
Lookup words in text
lookup - Variable in class org.apache.lucene.search.FieldCache.StringIndex
All the term values, in natural order.
lookup(CharSequence, int) - Method in class org.apache.lucene.search.suggest.fst.FSTCompletion
Lookup suggestions to key.
lookup(CharSequence, boolean, int) - Method in class org.apache.lucene.search.suggest.fst.FSTCompletionLookup

lookup(CharSequence, boolean, int) - Method in class org.apache.lucene.search.suggest.fst.FSTLookup
Deprecated. Lookup autocomplete suggestions to key.
lookup(CharSequence, boolean, int) - Method in class org.apache.lucene.search.suggest.fst.WFSTCompletionLookup

lookup(CharSequence, boolean, int) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellLookup

Lookup - Class in org.apache.lucene.search.suggest
Simple Lookup interface for CharSequence suggestions.
Lookup() - Constructor for class org.apache.lucene.search.suggest.Lookup

lookup(CharSequence, boolean, int) - Method in class org.apache.lucene.search.suggest.Lookup
Look up a key and return possible completion for this key.
lookup(CharSequence, boolean, int) - Method in class org.apache.lucene.search.suggest.tst.TSTLookup

Lookup.LookupPriorityQueue - Class in org.apache.lucene.search.suggest
A PriorityQueue collecting a fixed size of high priority Lookup.LookupResult
Lookup.LookupPriorityQueue(int) - Constructor for class org.apache.lucene.search.suggest.Lookup.LookupPriorityQueue

Lookup.LookupResult - Class in org.apache.lucene.search.suggest
Result of a lookup.
Lookup.LookupResult(CharSequence, long) - Constructor for class org.apache.lucene.search.suggest.Lookup.LookupResult

lookupCharacterClass(String) - Static method in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

lookupPrefix(char[], int, int) - Method in class org.apache.lucene.analysis.hunspell.HunspellDictionary
Looks up HunspellAffix prefixes that have an append that matches the String created from the given char array, offset and length
lookupSegmentation(int) - Method in class org.apache.lucene.analysis.ja.dict.UserDictionary

lookupSuffix(char[], int, int) - Method in class org.apache.lucene.analysis.hunspell.HunspellDictionary
Looks up HunspellAffix suffixes that have an append that matches the String created from the given char array, offset and length
lookupWord(char[], int, int) - Method in class org.apache.lucene.analysis.hunspell.HunspellDictionary
Looks up HunspellWords that match the String created from the given char array, offset and length
lookupWordIds(int, IntsRef) - Method in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

LovinsStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
LovinsStemmer() - Constructor for class org.tartarus.snowball.ext.LovinsStemmer

LOWERCASE_EXPANDED_TERMS - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set whether expanded terms should be expanded
LowercaseExpandedTermsAttribute - Interface in org.apache.lucene.queryParser.standard.config
Deprecated.
LowercaseExpandedTermsAttributeImpl - Class in org.apache.lucene.queryParser.standard.config
Deprecated.
LowercaseExpandedTermsAttributeImpl() - Constructor for class org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl
Deprecated.
LowercaseExpandedTermsQueryNodeProcessor - Class in org.apache.lucene.queryParser.standard.processors
This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.LOWERCASE_EXPANDED_TERMS is defined in the QueryConfigHandler.
LowercaseExpandedTermsQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.LowercaseExpandedTermsQueryNodeProcessor

LowerCaseFilter - Class in org.apache.lucene.analysis
Normalizes token text to lower case.
LowerCaseFilter(Version, TokenStream) - Constructor for class org.apache.lucene.analysis.LowerCaseFilter
Create a new LowerCaseFilter, that normalizes token text to lower case.
LowerCaseFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.LowerCaseFilter
Deprecated. Use LowerCaseFilter.LowerCaseFilter(Version, TokenStream) instead.
LowerCaseTokenizer - Class in org.apache.lucene.analysis
LowerCaseTokenizer performs the function of LetterTokenizer and LowerCaseFilter together.
LowerCaseTokenizer(Version, Reader) - Constructor for class org.apache.lucene.analysis.LowerCaseTokenizer
Construct a new LowerCaseTokenizer.
LowerCaseTokenizer(Version, AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.LowerCaseTokenizer
Construct a new LowerCaseTokenizer using a given AttributeSource.
LowerCaseTokenizer(Version, AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.LowerCaseTokenizer
Construct a new LowerCaseTokenizer using a given AttributeSource.AttributeFactory.
LowerCaseTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.LowerCaseTokenizer
Deprecated. use LowerCaseTokenizer.LowerCaseTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
LowerCaseTokenizer(AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.LowerCaseTokenizer
Deprecated. use LowerCaseTokenizer.LowerCaseTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
LowerCaseTokenizer(AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.LowerCaseTokenizer
Deprecated. use LowerCaseTokenizer.LowerCaseTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
LPAREN - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
LPAREN - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
LPAREN - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
LRUHashMap<K,V> - Class in org.apache.lucene.util.collections
LRUHashMap is an extension of Java's HashMap, which has a bounded size(); When it reaches that size, each time a new element is added, the least recently used (LRU) entry is removed.
LRUHashMap(int) - Constructor for class org.apache.lucene.util.collections.LRUHashMap
Create a new hash map with a bounded size and with least recently used entries removed.
LruTaxonomyWriterCache - Class in org.apache.lucene.facet.taxonomy.writercache.lru
LRU TaxonomyWriterCache - good choice for huge taxonomies.
LruTaxonomyWriterCache(int) - Constructor for class org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache

LruTaxonomyWriterCache(int, LruTaxonomyWriterCache.LRUType) - Constructor for class org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache

LruTaxonomyWriterCache.LRUType - Enum in org.apache.lucene.facet.taxonomy.writercache.lru

LUCENE_MAIN_VERSION - Static variable in class org.apache.lucene.util.Constants

LUCENE_QUERY_CONVERSION_ERROR - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

LUCENE_VERSION - Static variable in class org.apache.lucene.util.Constants

LuceneDictionary - Class in org.apache.lucene.search.spell
Lucene Dictionary: terms taken from the given field of a Lucene index.
LuceneDictionary(IndexReader, String) - Constructor for class org.apache.lucene.search.spell.LuceneDictionary

LuceneJUnitDividingSelector - Class in org.apache.lucene.util
Divides filesets into equal groups
LuceneJUnitDividingSelector() - Constructor for class org.apache.lucene.util.LuceneJUnitDividingSelector

LuceneJUnitResultFormatter - Class in org.apache.lucene.util
Just like BriefJUnitResultFormatter "brief" bundled with ant, except all formatted text is buffered until the test suite is finished.
LuceneJUnitResultFormatter() - Constructor for class org.apache.lucene.util.LuceneJUnitResultFormatter
Constructor for LuceneJUnitResultFormatter.
LucenePackage - Class in org.apache.lucene
Lucene's package information, including version.
LuceneTestCase - Class in org.apache.lucene.util
Base class for all Lucene unit tests, Junit3 or Junit4 variant.
LuceneTestCase() - Constructor for class org.apache.lucene.util.LuceneTestCase

LuceneTestCase.Nightly - Annotation Type in org.apache.lucene.util
Annotation for tests that should only be run during nightly builds.
LuceneTestCaseRunner - Class in org.apache.lucene.util
optionally filters the tests to be run by TEST_METHOD
LuceneTestCaseRunner(Class<?>) - Constructor for class org.apache.lucene.util.LuceneTestCaseRunner

M

MAC_OS_X - Static variable in class org.apache.lucene.util.Constants
True iff running on Mac OS X
madvise(ByteBuffer, int) - Static method in class org.apache.lucene.store.NativePosixUtil

main(String[]) - Static method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser

main(String[]) - Static method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

main(String[]) - Static method in class org.apache.lucene.analysis.hunspell.HunspellStemmer
HunspellStemmer entry point.
main(String[]) - Static method in class org.apache.lucene.benchmark.byTask.Benchmark
Run the benchmark algorithm.
main(String[]) - Static method in class org.apache.lucene.benchmark.byTask.programmatic.Sample

main(String[]) - Static method in class org.apache.lucene.benchmark.quality.trec.QueryDriver

main(String[]) - Static method in class org.apache.lucene.benchmark.quality.utils.QualityQueriesFinder

main(String[]) - Static method in class org.apache.lucene.benchmark.utils.ExtractReuters

main(String[]) - Static method in class org.apache.lucene.benchmark.utils.ExtractWikipedia

main(String[]) - Static method in class org.apache.lucene.demo.IndexFiles
Index all text files under a directory.
main(String[]) - Static method in class org.apache.lucene.demo.SearchFiles
Simple command-line based search demo.
main(String[]) - Static method in class org.apache.lucene.index.CheckIndex
Command-line interface to check and fix an index.
main(String[]) - Static method in class org.apache.lucene.index.CompoundFileExtractor

main(String[]) - Static method in class org.apache.lucene.index.FieldNormModifier
Deprecated. Command Line Execution method.
main(String[]) - Static method in class org.apache.lucene.index.IndexSorter

main(String[]) - Static method in class org.apache.lucene.index.IndexSplitter

main(String[]) - Static method in class org.apache.lucene.index.IndexUpgrader

main(String[]) - Static method in class org.apache.lucene.index.MultiPassIndexSplitter

main(String[]) - Static method in class org.apache.lucene.index.pruning.PruningTool

main(String[]) - Static method in class org.apache.lucene.misc.GetTermInfo

main(String[]) - Static method in class org.apache.lucene.misc.HighFreqTerms

main(String[]) - Static method in class org.apache.lucene.misc.IndexMergeTool

main(String[]) - Static method in class org.apache.lucene.queryParser.QueryParser
Command line tool to test QueryParser, using SimpleAnalyzer.
main(String[]) - Static method in class org.apache.lucene.search.RemoteSearchable
Deprecated. Exports a searcher for the index in args[0] named "//localhost/Searchable".
main(String[]) - Static method in class org.apache.lucene.search.vectorhighlight.FieldTermStack

main(String[]) - Static method in class org.apache.lucene.store.LockStressTest

main(String[]) - Static method in class org.apache.lucene.store.LockVerifyServer

main(String[]) - Static method in class org.egothor.stemmer.Compile
Entry point to the Compile application.
main(String[]) - Static method in class org.egothor.stemmer.DiffIt
Entry point to the DiffIt application.
main(String[]) - Static method in class org.tartarus.snowball.TestApp

makeDictionary(Version, String[]) - Static method in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
Deprecated. Only available for backwards compatibility.
makeDocument() - Method in class org.apache.lucene.benchmark.byTask.feeds.DocMaker
Creates a Document object ready for indexing.
makeDocument(int) - Method in class org.apache.lucene.benchmark.byTask.feeds.DocMaker
Same as DocMaker.makeDocument(), only this method creates a document of the given size input by size.
makeFragment(StringBuilder, int[], String[], FieldFragList.WeightedFragInfo) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder
Deprecated.
makeFragment(StringBuilder, int[], Field[], FieldFragList.WeightedFragInfo, String[], String[], Encoder) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

makeLock(String) - Method in class org.apache.lucene.store.Directory
Construct a Lock.
makeLock(String) - Method in class org.apache.lucene.store.LockFactory
Return a new Lock instance identified by lockName.
makeLock(String) - Method in class org.apache.lucene.store.MockDirectoryWrapper

makeLock(String) - Method in class org.apache.lucene.store.MockLockFactoryWrapper

makeLock(String) - Method in class org.apache.lucene.store.NativeFSLockFactory

makeLock(String) - Method in class org.apache.lucene.store.NoLockFactory

makeLock(String) - Method in class org.apache.lucene.store.NRTCachingDirectory

makeLock(String) - Method in class org.apache.lucene.store.SimpleFSLockFactory

makeLock(String) - Method in class org.apache.lucene.store.SingleInstanceLockFactory

makeLock(String) - Method in class org.apache.lucene.store.VerifyingLockFactory

makeLuceneQueryField(String, BasicQueryFactory) - Method in class org.apache.lucene.queryParser.surround.query.SrndQuery

makeLuceneQueryFieldNoBoost(String, BasicQueryFactory) - Method in class org.apache.lucene.queryParser.surround.query.AndQuery

makeLuceneQueryFieldNoBoost(String, BasicQueryFactory) - Method in class org.apache.lucene.queryParser.surround.query.DistanceQuery

makeLuceneQueryFieldNoBoost(String, BasicQueryFactory) - Method in class org.apache.lucene.queryParser.surround.query.FieldsQuery

makeLuceneQueryFieldNoBoost(String, BasicQueryFactory) - Method in class org.apache.lucene.queryParser.surround.query.NotQuery

makeLuceneQueryFieldNoBoost(String, BasicQueryFactory) - Method in class org.apache.lucene.queryParser.surround.query.OrQuery

makeLuceneQueryFieldNoBoost(String, BasicQueryFactory) - Method in class org.apache.lucene.queryParser.surround.query.SimpleTerm

makeLuceneQueryFieldNoBoost(String, BasicQueryFactory) - Method in class org.apache.lucene.queryParser.surround.query.SrndQuery

makeLuceneQueryNoBoost(BasicQueryFactory) - Method in class org.apache.lucene.queryParser.surround.query.FieldsQuery

makeLuceneSubQueriesField(String, BasicQueryFactory) - Method in class org.apache.lucene.queryParser.surround.query.ComposedQuery

makeQuery() - Method in class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker

makeQuery(int) - Method in class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker

makeQuery(int) - Method in class org.apache.lucene.benchmark.byTask.feeds.LongToEnglishQueryMaker

makeQuery() - Method in class org.apache.lucene.benchmark.byTask.feeds.LongToEnglishQueryMaker

makeQuery(int) - Method in interface org.apache.lucene.benchmark.byTask.feeds.QueryMaker
Create the next query, of the given size.
makeQuery() - Method in interface org.apache.lucene.benchmark.byTask.feeds.QueryMaker
Create the next query
makeSpanNearClause() - Method in class org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory

makeStopSet(String...) - Static method in class org.apache.lucene.analysis.StopFilter
Deprecated. use StopFilter.makeStopSet(Version, String...) instead
makeStopSet(Version, String...) - Static method in class org.apache.lucene.analysis.StopFilter
Builds a Set from an array of stop words, appropriate for passing into the StopFilter constructor.
makeStopSet(List<?>) - Static method in class org.apache.lucene.analysis.StopFilter
Deprecated. use StopFilter.makeStopSet(Version, List) instead
makeStopSet(Version, List<?>) - Static method in class org.apache.lucene.analysis.StopFilter
Builds a Set from an array of stop words, appropriate for passing into the StopFilter constructor.
makeStopSet(String[], boolean) - Static method in class org.apache.lucene.analysis.StopFilter
Deprecated. use StopFilter.makeStopSet(Version, String[], boolean) instead;
makeStopSet(Version, String[], boolean) - Static method in class org.apache.lucene.analysis.StopFilter
Creates a stopword set from the given stopword array.
makeStopSet(List<?>, boolean) - Static method in class org.apache.lucene.analysis.StopFilter
Deprecated. use StopFilter.makeStopSet(Version, List, boolean) instead
makeStopSet(Version, List<?>, boolean) - Static method in class org.apache.lucene.analysis.StopFilter
Creates a stopword set from the given stopword list.
manager - Static variable in class org.apache.lucene.search.FilterManager
Deprecated.
map - Variable in class org.apache.lucene.facet.index.CategoryContainer

map(String, int, TermVectorOffsetInfo[], int[]) - Method in class org.apache.lucene.index.FieldSortedTermVectorMapper

map(String, int, TermVectorOffsetInfo[], int[]) - Method in class org.apache.lucene.index.PositionBasedTermVectorMapper
Callback for the TermVectorReader.
map(String, int, TermVectorOffsetInfo[], int[]) - Method in class org.apache.lucene.index.SortedTermVectorMapper

map(String, int, TermVectorOffsetInfo[], int[]) - Method in class org.apache.lucene.index.TermVectorMapper
Map the Term Vector information into your own structure
MapBackedSet<E> - Class in org.apache.lucene.util
A Set implementation that wraps an actual Map based implementation.
MapBackedSet(Map<E, Boolean>) - Constructor for class org.apache.lucene.util.MapBackedSet
Creates a new instance which wraps the specified map.
MapFieldSelector - Class in org.apache.lucene.document
A FieldSelector based on a Map of field names to FieldSelectorResults
MapFieldSelector(Map<String, FieldSelectorResult>) - Constructor for class org.apache.lucene.document.MapFieldSelector
Create a a MapFieldSelector
MapFieldSelector(List<String>) - Constructor for class org.apache.lucene.document.MapFieldSelector
Create a a MapFieldSelector
MapFieldSelector(String...) - Constructor for class org.apache.lucene.document.MapFieldSelector
Create a a MapFieldSelector
MapOfSets<K,V> - Class in org.apache.lucene.util
Helper class for keeping Lists of Objects associated with keys.
MapOfSets(Map<K, Set<V>>) - Constructor for class org.apache.lucene.util.MapOfSets

MappingCharFilter - Class in org.apache.lucene.analysis
Simplistic CharFilter that applies the mappings contained in a NormalizeCharMap to the character stream, and correcting the resulting changes to the offsets.
MappingCharFilter(NormalizeCharMap, CharStream) - Constructor for class org.apache.lucene.analysis.MappingCharFilter
Default constructor that takes a CharStream.
MappingCharFilter(NormalizeCharMap, Reader) - Constructor for class org.apache.lucene.analysis.MappingCharFilter
Easy-use constructor that takes a Reader.
mapToAACOs - Variable in class org.apache.lucene.facet.search.TopKInEachNodeHandler.IntermediateFacetResultWithHash

MARGIN_DEFAULT - Static variable in class org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder

mark(int) - Method in class org.apache.lucene.analysis.CharFilter

mark(int) - Method in class org.apache.lucene.analysis.CharReader

mark(int) - Method in class org.apache.lucene.benchmark.byTask.utils.StringBuilderReader
Mark the present position in the stream.
mark(int) - Method in class org.apache.lucene.util.UnsafeByteArrayInputStream

markSupported() - Method in class org.apache.lucene.analysis.CharFilter

markSupported() - Method in class org.apache.lucene.analysis.CharReader

markSupported() - Method in class org.apache.lucene.analysis.MockReaderWrapper

markSupported() - Method in class org.apache.lucene.benchmark.byTask.utils.StringBuilderReader

markSupported() - Method in class org.apache.lucene.util.UnsafeByteArrayInputStream

markTaskEnd(TaskStats, int) - Method in class org.apache.lucene.benchmark.byTask.stats.Points
mark the end of a task
markTaskStart(PerfTask, int) - Method in class org.apache.lucene.benchmark.byTask.stats.Points
Mark that a task is starting.
match(int) - Method in class org.apache.lucene.search.FilteredDocIdSet
Validation method to determine whether a docid should be in the result set.
match(int) - Method in class org.apache.lucene.search.FilteredDocIdSetIterator
Validation method to determine whether a docid should be in the result set.
match(String) - Method in class org.apache.lucene.search.regex.JakartaRegexpCapabilities

match(String) - Method in class org.apache.lucene.search.regex.JavaUtilRegexCapabilities

match(String) - Method in interface org.apache.lucene.search.regex.RegexCapabilities

match - Variable in class org.apache.lucene.search.spans.SpanPositionCheckQuery

MatchAllDocsQuery - Class in org.apache.lucene.search
A query that matches all documents.
MatchAllDocsQuery() - Constructor for class org.apache.lucene.search.MatchAllDocsQuery

MatchAllDocsQuery(String) - Constructor for class org.apache.lucene.search.MatchAllDocsQuery

MatchAllDocsQueryBuilder - Class in org.apache.lucene.xmlparser.builders

MatchAllDocsQueryBuilder() - Constructor for class org.apache.lucene.xmlparser.builders.MatchAllDocsQueryBuilder

MatchAllDocsQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A MatchAllDocsQueryNode indicates that a query node tree or subtree will match all documents if executed in the index.
MatchAllDocsQueryNode() - Constructor for class org.apache.lucene.queryParser.core.nodes.MatchAllDocsQueryNode

MatchAllDocsQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
Builds a MatchAllDocsQuery object from a MatchAllDocsQueryNode object.
MatchAllDocsQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.MatchAllDocsQueryNodeBuilder

MatchAllDocsQueryNodeProcessor - Class in org.apache.lucene.queryParser.standard.processors
This processor converts every WildcardQueryNode that is "*:*" to MatchAllDocsQueryNode.
MatchAllDocsQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.MatchAllDocsQueryNodeProcessor

matchAlmost(String) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Returns a List of keys that almost match the argument key.
matchAlmost(CharSequence, int) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Returns a List of keys that almost match the argument key.
matchDoc(int) - Method in class org.apache.lucene.search.FieldCacheDocIdSet
this method checks, if a doc is a hit
matches(char[], int) - Method in class org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule

matches(char[], int) - Method in class org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSetExceptions

matches(char[], int) - Method in class org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSuffixExceptions

matchesExtension(String, String) - Static method in class org.apache.lucene.index.IndexFileNames
Returns true if the given filename ends with the given extension.
matchingChar(char) - Method in class org.apache.lucene.queryParser.surround.query.SrndTruncQuery

MatchNoDocsQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A MatchNoDocsQueryNode indicates that a query node tree or subtree will not match any documents if executed in the index.
MatchNoDocsQueryNode() - Constructor for class org.apache.lucene.queryParser.core.nodes.MatchNoDocsQueryNode

MatchNoDocsQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
Builds an empty BooleanQuery object from a MatchNoDocsQueryNode object.
MatchNoDocsQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.MatchNoDocsQueryNodeBuilder

matchPrefix(String) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Returns an alphabetical List of all keys in the trie that begin with a given prefix.
matchPrefix(CharSequence, int) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Returns an alphabetical List of all keys in the trie that begin with a given prefix.
matchVersion - Variable in class org.apache.lucene.analysis.StopwordAnalyzerBase

MAX_DATE_STRING() - Static method in class org.apache.lucene.document.DateField
Deprecated.
MAX_FREQUENCE - Static variable in class org.apache.lucene.analysis.cn.smart.Utility
Maximum bigram frequency (used in the smoothing function).
MAX_POINTS - Static variable in class org.apache.lucene.benchmark.quality.QualityStats
Number of points for which precision is computed.
MAX_STRING_VALUE - Static variable in class org.apache.lucene.document.NumberTools
Deprecated. Equivalent to longToString(Long.MAX_VALUE)
MAX_TEMPFILES - Static variable in class org.apache.lucene.search.suggest.fst.Sort
Maximum number of temporary files before doing an intermediate merge.
MAX_TERM_LENGTH - Static variable in class org.apache.lucene.index.IndexWriter
Absolute hard maximum length for a term.
maxBufferedBlocks() - Method in class org.apache.lucene.util.RecyclingByteBlockAllocator

maxCoord - Variable in class org.apache.lucene.search.BooleanQuery.BooleanWeight

maxDoc - Variable in class org.apache.lucene.index.AbstractAllTermDocs

maxDoc() - Method in class org.apache.lucene.index.FilterIndexReader

maxDoc() - Method in class org.apache.lucene.index.IndexReader
Returns one greater than the largest possible document number.
maxDoc() - Method in class org.apache.lucene.index.IndexWriter
Returns total number of docs in this index, including docs not yet flushed (still in the RAM buffer), not counting deletions.
maxDoc() - Method in class org.apache.lucene.index.MultiReader

maxDoc() - Method in class org.apache.lucene.index.ParallelReader

maxDoc() - Method in class org.apache.lucene.index.RandomIndexWriter

maxDoc() - Method in class org.apache.lucene.index.SegmentReader

maxDoc() - Method in class org.apache.lucene.search.IndexSearcher
Expert: Returns one greater than the largest possible document number.
maxDoc() - Method in class org.apache.lucene.search.MultiSearcher
Deprecated.
maxDoc() - Method in class org.apache.lucene.search.RemoteSearchable
Deprecated.
maxDoc() - Method in interface org.apache.lucene.search.Searchable
Deprecated. Expert: Returns one greater than the largest possible document number.
maxDoc() - Method in class org.apache.lucene.search.Searcher
Deprecated.
maxDoc() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
maxDocCharsToAnalyze - Variable in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

maxDocsToCache - Variable in class org.apache.lucene.search.CachingCollector

maxFrags - Variable in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

maxFrags - Variable in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask

maxHorizontalContext - Variable in class org.apache.lucene.analysis.synonym.SynonymMap
maxHorizontalContext: maximum context we need on the tokenstream
MAXIMUM_BYTES_NEEDED - Static variable in class org.apache.lucene.util.Vint8
The maximum number of bytes needed to encode a number using Vint8.
maxMergeDocs - Variable in class org.apache.lucene.index.LogMergePolicy

maxMergeSize - Variable in class org.apache.lucene.index.LogMergePolicy

maxMergeSizeForForcedMerge - Variable in class org.apache.lucene.index.LogMergePolicy

maxNextCharInd - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

maxNextCharInd - Variable in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

maxNumCachedFilters - Static variable in class org.apache.lucene.xmlparser.CoreParser

maxPartitions - Variable in class org.apache.lucene.facet.search.StandardFacetsAccumulator

MaxPayloadFunction - Class in org.apache.lucene.search.payloads
Returns the maximum payload score seen, else 1 if there are no payloads on the doc.
MaxPayloadFunction() - Constructor for class org.apache.lucene.search.payloads.MaxPayloadFunction

maxRecall(QualityQuery) - Method in interface org.apache.lucene.benchmark.quality.Judge
Return the maximal recall for the input quality query.
maxRecall(QualityQuery) - Method in class org.apache.lucene.benchmark.quality.trec.TrecJudge

maxScan - Variable in class org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner

maxScore - Variable in class org.apache.lucene.search.grouping.GroupDocs
Max score in this group
maxSegmentName - Variable in class org.apache.lucene.index.CheckIndex.Status
The greatest segment name.
maxSkipLevels - Variable in class org.apache.lucene.index.SegmentWriteState
Expert: The maximum number of skip levels.
maxSubwordSize - Variable in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

maxValue(int) - Static method in class org.apache.lucene.util.packed.PackedInts
Calculates the maximum unsigned long that can be expressed with the given number of bits.
maybeMerge() - Method in class org.apache.lucene.index.IndexWriter
Expert: asks the mergePolicy whether any merges are necessary now and if so, runs the requested merges and then iterate (test again if merges are needed) until no more merges are returned by the mergePolicy.
maybeRefresh() - Method in class org.apache.lucene.search.ReferenceManager
You must call this, periodically, if you want that ReferenceManager.acquire() will return refreshed instances.
maybeReopen() - Method in class org.apache.lucene.search.SearcherManager
Deprecated. see ReferenceManager.maybeRefresh().
mayComplement() - Method in class org.apache.lucene.facet.search.FacetsAccumulator
check if all requests are complementable
MB - Static variable in class org.apache.lucene.search.suggest.fst.Sort

mBitsToBytes(int) - Static method in class org.apache.lucene.util.ThrottledIndexOutput

megabytes(long) - Static method in class org.apache.lucene.search.suggest.fst.Sort.BufferSize
Creates a Sort.BufferSize in MB.
MemoryIndex - Class in org.apache.lucene.index.memory
High-performance single-document main memory Apache Lucene fulltext search index.
MemoryIndex() - Constructor for class org.apache.lucene.index.memory.MemoryIndex
Constructs an empty instance.
merge(CategoryProperty) - Method in class org.apache.lucene.facet.enhancements.association.AssociationFloatProperty

merge(CategoryProperty) - Method in class org.apache.lucene.facet.enhancements.association.AssociationIntProperty

merge(CategoryProperty) - Method in interface org.apache.lucene.facet.index.attributes.CategoryProperty
When adding categories with properties to a certain document, it is possible that the same category will be added more than once with different instances of the same property.
merge(CategoryProperty) - Method in class org.apache.lucene.facet.index.attributes.OrdinalProperty

merge(CategoryContainer) - Method in class org.apache.lucene.facet.index.CategoryContainer
Add the categories from another CategoryContainer to this one.
merge(IndexWriter) - Method in class org.apache.lucene.index.ConcurrentMergeScheduler

merge(MergePolicy.OneMerge) - Method in class org.apache.lucene.index.IndexWriter
Merges the indicated segments, replacing them in the stack with a single segment.
merge(IndexWriter) - Method in class org.apache.lucene.index.MergeScheduler
Run the merges provided by IndexWriter.getNextMerge().
merge(IndexWriter) - Method in class org.apache.lucene.index.NoMergeScheduler

merge(IndexWriter) - Method in class org.apache.lucene.index.SerialMergeScheduler
Just do the merges in sequence.
merge(List<Collection<SearchGroup<T>>>, int, int, Sort) - Static method in class org.apache.lucene.search.grouping.SearchGroup
Merges multiple collections of top groups, for example obtained from separate index shards.
merge(TopGroups<T>[], Sort, Sort, int, int) - Static method in class org.apache.lucene.search.grouping.TopGroups
Merges an array of TopGroups, for example obtained from the second-pass collector across multiple shards.
merge(TextFragment) - Method in class org.apache.lucene.search.highlight.TextFragment

merge(Sort, int, TopDocs[]) - Static method in class org.apache.lucene.search.TopDocs
Returns a new TopDocs, containing topN results across the provided TopDocs, sorting by the specified Sort.
merge(T, T) - Method in class org.apache.lucene.util.fst.Outputs

merge(Object, Object) - Method in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs

merge(Row, Row) - Method in class org.egothor.stemmer.Optimizer
Merge the given rows and return the resulting Row.
merge(Cell, Cell) - Method in class org.egothor.stemmer.Optimizer
Merge the given Cells and return the resulting Cell.
merge(Cell, Cell) - Method in class org.egothor.stemmer.Optimizer2
Merge the given Cells and return the resulting Cell.
mergeBooleanQueries(BooleanQuery...) - Static method in class org.apache.lucene.search.Query
Expert: merges the clauses of a set of BooleanQuery's into a single BooleanQuery.
mergeContiguous - Variable in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

mergeFactor - Variable in class org.apache.lucene.index.LogMergePolicy

MergePolicy - Class in org.apache.lucene.index
Expert: a MergePolicy determines the sequence of primitive merge operations.
MergePolicy() - Constructor for class org.apache.lucene.index.MergePolicy
Creates a new merge policy instance.
MergePolicy.MergeAbortedException - Exception in org.apache.lucene.index

MergePolicy.MergeAbortedException() - Constructor for exception org.apache.lucene.index.MergePolicy.MergeAbortedException

MergePolicy.MergeAbortedException(String) - Constructor for exception org.apache.lucene.index.MergePolicy.MergeAbortedException

MergePolicy.MergeException - Exception in org.apache.lucene.index
Exception thrown if there are any problems while executing a merge.
MergePolicy.MergeException(String, Directory) - Constructor for exception org.apache.lucene.index.MergePolicy.MergeException

MergePolicy.MergeException(Throwable, Directory) - Constructor for exception org.apache.lucene.index.MergePolicy.MergeException

MergePolicy.MergeSpecification - Class in org.apache.lucene.index
A MergeSpecification instance provides the information necessary to perform multiple merges.
MergePolicy.MergeSpecification() - Constructor for class org.apache.lucene.index.MergePolicy.MergeSpecification

MergePolicy.OneMerge - Class in org.apache.lucene.index
OneMerge provides the information necessary to perform an individual primitive merge operation, resulting in a single new segment.
MergePolicy.OneMerge(List<SegmentInfo>) - Constructor for class org.apache.lucene.index.MergePolicy.OneMerge

mergeResults(IntermediateFacetResult...) - Method in class org.apache.lucene.facet.search.FacetResultsHandler
Merge results of several facet partitions.
mergeResults(IntermediateFacetResult...) - Method in class org.apache.lucene.facet.search.TopKFacetResultsHandler

mergeResults(IntermediateFacetResult...) - Method in class org.apache.lucene.facet.search.TopKInEachNodeHandler
Merge several partitions' IntermediateFacetResult-s into one of the same format
mergeRounds - Variable in class org.apache.lucene.search.suggest.fst.Sort.SortInfo

merges - Variable in class org.apache.lucene.index.MergePolicy.MergeSpecification
The subset of segments to be included in the primitive merge.
MergeScheduler - Class in org.apache.lucene.index
Expert: IndexWriter uses an instance implementing this interface to execute the merges selected by a MergePolicy.
MergeScheduler() - Constructor for class org.apache.lucene.index.MergeScheduler

mergeSort(T[], int, int, Comparator<? super T>) - Static method in class org.apache.lucene.util.ArrayUtil
Sorts the given array slice using the Comparator.
mergeSort(T[], Comparator<? super T>) - Static method in class org.apache.lucene.util.ArrayUtil
Sorts the given array using the Comparator.
mergeSort(T[], int, int) - Static method in class org.apache.lucene.util.ArrayUtil
Sorts the given array slice in natural order.
mergeSort(T[]) - Static method in class org.apache.lucene.util.ArrayUtil
Sorts the given array in natural order.
mergeSort(List<T>, Comparator<? super T>) - Static method in class org.apache.lucene.util.CollectionUtil
Sorts the given random access List using the Comparator.
mergeSort(List<T>) - Static method in class org.apache.lucene.util.CollectionUtil
Sorts the given random access List in natural order.
mergeSort(int, int) - Method in class org.apache.lucene.util.SorterTemplate
Sorts via stable in-place MergeSort algorithm For small collections falls back to SorterTemplate.insertionSort(int,int).
mergeThreadCount - Variable in class org.apache.lucene.index.ConcurrentMergeScheduler

mergeThreadCount() - Method in class org.apache.lucene.index.ConcurrentMergeScheduler
Returns the number of merge threads that are alive.
mergeThreads - Variable in class org.apache.lucene.index.ConcurrentMergeScheduler

mergeTime - Variable in class org.apache.lucene.search.suggest.fst.Sort.SortInfo

message(String) - Method in class org.apache.lucene.index.ConcurrentMergeScheduler
Outputs the given message - this method assumes ConcurrentMergeScheduler.verbose() was called and returned true.
message(String) - Method in class org.apache.lucene.index.IndexWriter
Prints a message to the infoStream (if non-null), prefixed with the identifying information for this writer and the thread that's calling it.
message(String) - Method in class org.apache.lucene.index.LogMergePolicy

Message - Interface in org.apache.lucene.messages
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).
message - Variable in exception org.apache.lucene.queryParser.core.QueryNodeException

MessageImpl - Class in org.apache.lucene.messages
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).
MessageImpl(String) - Constructor for class org.apache.lucene.messages.MessageImpl
Deprecated.
MessageImpl(String, Object...) - Constructor for class org.apache.lucene.messages.MessageImpl
Deprecated.
method - Variable in class org.tartarus.snowball.Among

methodobject - Variable in class org.tartarus.snowball.Among

MILES_FLOOR - Static variable in class org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder
Deprecated.
MILES_PER_LATITUDE - Static variable in class org.apache.lucene.spatial.geometry.shape.DistanceApproximation
Deprecated.
MILES_TO_KM - Static variable in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
min - Variable in class org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule

min - Variable in class org.apache.lucene.analysis.pt.RSLPStemmerBase.Step

MIN_BUFFER_SIZE_MB - Static variable in class org.apache.lucene.search.suggest.fst.Sort
Minimum recommended buffer size for sorting.
MIN_DATE_STRING() - Static method in class org.apache.lucene.document.DateField
Deprecated.
MIN_FRAG_CHAR_SIZE_FACTOR - Static variable in class org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder

MIN_STRING_VALUE - Static variable in class org.apache.lucene.document.NumberTools
Deprecated. Equivalent to longToString(Long.MIN_VALUE)
minMergeSize - Variable in class org.apache.lucene.index.LogMergePolicy

minNrShouldMatch - Variable in class org.apache.lucene.search.BooleanQuery

MinPayloadFunction - Class in org.apache.lucene.search.payloads
Calculates the minimum payload seen
MinPayloadFunction() - Constructor for class org.apache.lucene.search.payloads.MinPayloadFunction

minSubwordSize - Variable in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

MINUS - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
MINUS - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
minWordSize - Variable in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

missingSegments - Variable in class org.apache.lucene.index.CheckIndex.Status
True if we were unable to locate and load the segments_N file.
missingSegmentVersion - Variable in class org.apache.lucene.index.CheckIndex.Status
True if we were unable to read the version number from segments_N file.
missingValue - Variable in class org.apache.lucene.search.FieldComparator.NumericComparator

MMapDirectory - Class in org.apache.lucene.store
File-based Directory implementation that uses mmap for reading, and FSDirectory.FSIndexOutput for writing.
MMapDirectory(File, LockFactory) - Constructor for class org.apache.lucene.store.MMapDirectory
Create a new MMapDirectory for the named location.
MMapDirectory(File) - Constructor for class org.apache.lucene.store.MMapDirectory
Create a new MMapDirectory for the named location and NativeFSLockFactory.
MockAnalyzer - Class in org.apache.lucene.analysis
Analyzer for testing
MockAnalyzer(Random, int, boolean, CharArraySet, boolean) - Constructor for class org.apache.lucene.analysis.MockAnalyzer
Creates a new MockAnalyzer.
MockAnalyzer(Random, int, boolean) - Constructor for class org.apache.lucene.analysis.MockAnalyzer
Calls MockAnalyzer(random, pattern, lowerCase, CharArraySet.EMPTY_STOPSET, true).
MockAnalyzer(Random) - Constructor for class org.apache.lucene.analysis.MockAnalyzer
Create a Whitespace-lowercasing analyzer with no stopwords removal.
MockCharFilter - Class in org.apache.lucene.analysis
the purpose of this charfilter is to send offsets out of bounds if the analyzer doesn't use correctOffset or does incorrect offset math.
MockCharFilter(Reader, int) - Constructor for class org.apache.lucene.analysis.MockCharFilter

MockCharFilter(Reader) - Constructor for class org.apache.lucene.analysis.MockCharFilter

MockDirectoryWrapper - Class in org.apache.lucene.store
This is a Directory Wrapper that adds methods intended to be used only by unit tests.
MockDirectoryWrapper(Random, Directory) - Constructor for class org.apache.lucene.store.MockDirectoryWrapper

MockDirectoryWrapper.Failure - Class in org.apache.lucene.store
Objects that represent fail-able conditions.
MockDirectoryWrapper.Failure() - Constructor for class org.apache.lucene.store.MockDirectoryWrapper.Failure

MockDirectoryWrapper.Throttling - Enum in org.apache.lucene.store

MockFixedLengthPayloadFilter - Class in org.apache.lucene.analysis
TokenFilter that adds random fixed-length payloads.
MockFixedLengthPayloadFilter(Random, TokenStream, int) - Constructor for class org.apache.lucene.analysis.MockFixedLengthPayloadFilter

MockGraphTokenFilter - Class in org.apache.lucene.analysis
Randomly inserts overlapped (posInc=0) tokens with posLength sometimes > 1.
MockGraphTokenFilter(Random, TokenStream) - Constructor for class org.apache.lucene.analysis.MockGraphTokenFilter

MockHoleInjectingTokenFilter - Class in org.apache.lucene.analysis

MockHoleInjectingTokenFilter(Random, TokenStream) - Constructor for class org.apache.lucene.analysis.MockHoleInjectingTokenFilter

MockIndexInput - Class in org.apache.lucene.index
IndexInput backed by a byte[] for testing.
MockIndexInput(byte[]) - Constructor for class org.apache.lucene.index.MockIndexInput

MockIndexInputWrapper - Class in org.apache.lucene.store
Used by MockDirectoryWrapper to create an input stream that keeps track of when it's been closed.
MockIndexInputWrapper(MockDirectoryWrapper, String, IndexInput) - Constructor for class org.apache.lucene.store.MockIndexInputWrapper
Construct an empty output buffer.
MockIndexOutputWrapper - Class in org.apache.lucene.store
Used by MockRAMDirectory to create an output stream that will throw an IOException on fake disk full, track max disk space actually used, and maybe throw random IOExceptions.
MockIndexOutputWrapper(MockDirectoryWrapper, IndexOutput, String) - Constructor for class org.apache.lucene.store.MockIndexOutputWrapper
Construct an empty output buffer.
MockLockFactoryWrapper - Class in org.apache.lucene.store
Used by MockDirectoryWrapper to wrap another factory and track open locks.
MockLockFactoryWrapper(MockDirectoryWrapper, LockFactory) - Constructor for class org.apache.lucene.store.MockLockFactoryWrapper

MockRandomLookaheadTokenFilter - Class in org.apache.lucene.analysis
Uses LookaheadTokenFilter to randomly peek at future tokens.
MockRandomLookaheadTokenFilter(Random, TokenStream) - Constructor for class org.apache.lucene.analysis.MockRandomLookaheadTokenFilter

MockRandomMergePolicy - Class in org.apache.lucene.index
MergePolicy that makes random decisions for testing.
MockRandomMergePolicy(Random) - Constructor for class org.apache.lucene.index.MockRandomMergePolicy

MockReaderWrapper - Class in org.apache.lucene.analysis
Wraps a Reader, and can throw random or fixed exceptions, and spoon feed read chars.
MockReaderWrapper(Random, Reader) - Constructor for class org.apache.lucene.analysis.MockReaderWrapper

MockTokenizer - Class in org.apache.lucene.analysis
Tokenizer for testing.
MockTokenizer(AttributeSource.AttributeFactory, Reader, int, boolean, int) - Constructor for class org.apache.lucene.analysis.MockTokenizer

MockTokenizer(Reader, int, boolean, int) - Constructor for class org.apache.lucene.analysis.MockTokenizer

MockTokenizer(Reader, int, boolean) - Constructor for class org.apache.lucene.analysis.MockTokenizer

MockTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.MockTokenizer
Calls MockTokenizer(Reader, WHITESPACE, true)
MockVariableLengthPayloadFilter - Class in org.apache.lucene.analysis
TokenFilter that adds random variable-length payloads.
MockVariableLengthPayloadFilter(Random, TokenStream) - Constructor for class org.apache.lucene.analysis.MockVariableLengthPayloadFilter

ModClause(CharSequence) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser

ModifierQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A ModifierQueryNode indicates the modifier value (+,-,?,NONE) for each term on the query string.
ModifierQueryNode(QueryNode, ModifierQueryNode.Modifier) - Constructor for class org.apache.lucene.queryParser.core.nodes.ModifierQueryNode
Used to store the modifier value on the original query string
ModifierQueryNode.Modifier - Enum in org.apache.lucene.queryParser.core.nodes

ModifierQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
Builds no object, it only returns the Query object set on the ModifierQueryNode object using a QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID tag.
ModifierQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.ModifierQueryNodeBuilder

Modifiers() - Method in class org.apache.lucene.queryParser.QueryParser

Modifiers() - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser

more - Variable in class org.apache.lucene.search.spans.SpanScorer

More(String, String) - Static method in class org.apache.lucene.search.TermRangeFilter
Constructs a filter for field fieldName matching greater than or equal to lowerTerm.
MoreLikeThis - Class in org.apache.lucene.search.similar
Generate "more like this" similarity queries.
MoreLikeThis(IndexReader) - Constructor for class org.apache.lucene.search.similar.MoreLikeThis
Constructor requiring an IndexReader.
MoreLikeThis(IndexReader, Similarity) - Constructor for class org.apache.lucene.search.similar.MoreLikeThis

MoreLikeThisQuery - Class in org.apache.lucene.search.similar
A simple wrapper for MoreLikeThis for use in scenarios where a Query object is required eg in custom QueryParser extensions.
MoreLikeThisQuery(String, String[], Analyzer) - Constructor for class org.apache.lucene.search.similar.MoreLikeThisQuery
Deprecated. use MoreLikeThisQuery.MoreLikeThisQuery(String, String[], Analyzer, String) instead.
MoreLikeThisQuery(String, String[], Analyzer, String) - Constructor for class org.apache.lucene.search.similar.MoreLikeThisQuery

mult(double) - Method in class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated.
MULTI_FIELDS - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set the fields a query should be expanded to when the field is null
MULTI_TERM_REWRITE_METHOD - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set the MultiTermQuery.RewriteMethod used when creating queries
MultiCategoryListIterator - Class in org.apache.lucene.facet.util
Iterates over multiple CategoryListIterators, consuming the provided iterators in order.
MultiCategoryListIterator(CategoryListIterator...) - Constructor for class org.apache.lucene.facet.util.MultiCategoryListIterator
Receives the iterators to iterate on
MultiCollector - Class in org.apache.lucene.search
A Collector which allows running a search with several Collectors.
MultiFieldAttribute - Interface in org.apache.lucene.queryParser.standard.config
Deprecated.
MultiFieldAttributeImpl - Class in org.apache.lucene.queryParser.standard.config
Deprecated.
MultiFieldAttributeImpl() - Constructor for class org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl
Deprecated.
MultiFieldQueryNodeProcessor - Class in org.apache.lucene.queryParser.standard.processors
This processor is used to expand terms so the query looks for the same term in different fields.
MultiFieldQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.MultiFieldQueryNodeProcessor

MultiFieldQueryParser - Class in org.apache.lucene.queryParser
A QueryParser which constructs queries to search multiple fields.
MultiFieldQueryParser(Version, String[], Analyzer, Map<String, Float>) - Constructor for class org.apache.lucene.queryParser.MultiFieldQueryParser
Creates a MultiFieldQueryParser.
MultiFieldQueryParser(Version, String[], Analyzer) - Constructor for class org.apache.lucene.queryParser.MultiFieldQueryParser
Creates a MultiFieldQueryParser.
MultiFieldQueryParserWrapper - Class in org.apache.lucene.queryParser.standard
Deprecated. this class will be removed soon, it's a temporary class to be used along the transition from the old query parser to the new one
MultiFieldQueryParserWrapper(String[], Analyzer, Map<String, Float>) - Constructor for class org.apache.lucene.queryParser.standard.MultiFieldQueryParserWrapper
Deprecated. Creates a MultiFieldQueryParser.
MultiFieldQueryParserWrapper(String[], Analyzer) - Constructor for class org.apache.lucene.queryParser.standard.MultiFieldQueryParserWrapper
Deprecated. Creates a MultiFieldQueryParser.
MultiPassIndexSplitter - Class in org.apache.lucene.index
This tool splits input index into multiple equal parts.
MultiPassIndexSplitter() - Constructor for class org.apache.lucene.index.MultiPassIndexSplitter

MultiPhraseQuery - Class in org.apache.lucene.search
MultiPhraseQuery is a generalized version of PhraseQuery, with an added method MultiPhraseQuery.add(Term[]).
MultiPhraseQuery() - Constructor for class org.apache.lucene.search.MultiPhraseQuery

MultiPhraseQueryNode - Class in org.apache.lucene.queryParser.standard.nodes
A MultiPhraseQueryNode indicates that its children should be used to build a MultiPhraseQuery instead of PhraseQuery.
MultiPhraseQueryNode() - Constructor for class org.apache.lucene.queryParser.standard.nodes.MultiPhraseQueryNode

MultiPhraseQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
Builds a MultiPhraseQuery object from a MultiPhraseQueryNode object.
MultiPhraseQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.MultiPhraseQueryNodeBuilder

MultipleTermPositions - Class in org.apache.lucene.index
Allows you to iterate over the TermPositions for multiple Terms as a single TermPositions.
MultipleTermPositions(IndexReader, Term[]) - Constructor for class org.apache.lucene.index.MultipleTermPositions
Creates a new MultipleTermPositions instance.
MultiReader - Class in org.apache.lucene.index
An IndexReader which reads multiple indexes, appending their content.
MultiReader(IndexReader...) - Constructor for class org.apache.lucene.index.MultiReader
Construct a MultiReader aggregating the named set of (sub)readers.
MultiReader(IndexReader[], boolean) - Constructor for class org.apache.lucene.index.MultiReader
Construct a MultiReader aggregating the named set of (sub)readers.
MultiSearcher - Class in org.apache.lucene.search
Deprecated. If you are using MultiSearcher over IndexSearchers, please use MultiReader instead; this class does not properly handle certain kinds of queries (see LUCENE-2756).
MultiSearcher(Searchable...) - Constructor for class org.apache.lucene.search.MultiSearcher
Deprecated. Creates a searcher which searches searchers.
MultiTermQuery - Class in org.apache.lucene.search
An abstract Query that matches documents containing a subset of terms provided by a FilteredTermEnum enumeration.
MultiTermQuery() - Constructor for class org.apache.lucene.search.MultiTermQuery
Constructs a query matching terms that cannot be represented with a single Term.
MultiTermQuery.ConstantScoreAutoRewrite - Class in org.apache.lucene.search
A rewrite method that tries to pick the best constant-score rewrite method based on term and document counts from the query.
MultiTermQuery.ConstantScoreAutoRewrite() - Constructor for class org.apache.lucene.search.MultiTermQuery.ConstantScoreAutoRewrite

MultiTermQuery.RewriteMethod - Class in org.apache.lucene.search
Abstract class that defines how the query is rewritten.
MultiTermQuery.RewriteMethod() - Constructor for class org.apache.lucene.search.MultiTermQuery.RewriteMethod

MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite - Class in org.apache.lucene.search
A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, but the scores are only computed as the boost.
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite(int) - Constructor for class org.apache.lucene.search.MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite
Create a TopTermsBoostOnlyBooleanQueryRewrite for at most size terms.
MultiTermQuery.TopTermsScoringBooleanQueryRewrite - Class in org.apache.lucene.search
A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.
MultiTermQuery.TopTermsScoringBooleanQueryRewrite(int) - Constructor for class org.apache.lucene.search.MultiTermQuery.TopTermsScoringBooleanQueryRewrite
Create a TopTermsScoringBooleanQueryRewrite for at most size terms.
MultiTermQueryWrapperFilter<Q extends MultiTermQuery> - Class in org.apache.lucene.search
A wrapper for MultiTermQuery, that exposes its functionality as a Filter.
MultiTermQueryWrapperFilter(Q) - Constructor for class org.apache.lucene.search.MultiTermQueryWrapperFilter
Wrap a MultiTermQuery as a Filter.
MultiTermRewriteMethodAttribute - Interface in org.apache.lucene.queryParser.standard.config
Deprecated.
MultiTermRewriteMethodAttributeImpl - Class in org.apache.lucene.queryParser.standard.config
Deprecated.
MultiTermRewriteMethodAttributeImpl() - Constructor for class org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl
Deprecated.
MultiTermRewriteMethodProcessor - Class in org.apache.lucene.queryParser.standard.processors
This processor instates the default MultiTermQuery.RewriteMethod, MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT, for multi-term query nodes.
MultiTermRewriteMethodProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.MultiTermRewriteMethodProcessor

MultiTrie - Class in org.egothor.stemmer
The MultiTrie is a Trie of Tries.
MultiTrie(DataInput) - Constructor for class org.egothor.stemmer.MultiTrie
Constructor for the MultiTrie object.
MultiTrie(boolean) - Constructor for class org.egothor.stemmer.MultiTrie
Constructor for the MultiTrie object
MultiTrie2 - Class in org.egothor.stemmer
The MultiTrie is a Trie of Tries.
MultiTrie2(DataInput) - Constructor for class org.egothor.stemmer.MultiTrie2
Constructor for the MultiTrie object.
MultiTrie2(boolean) - Constructor for class org.egothor.stemmer.MultiTrie2
Constructor for the MultiTrie2 object
mustRewriteQuery(SpanQuery) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor

MutableFacetResultNode - Class in org.apache.lucene.facet.search.results
Mutable implementation for Result of faceted search for a certain taxonomy node.
MutableFacetResultNode(int, double) - Constructor for class org.apache.lucene.facet.search.results.MutableFacetResultNode
Create a Facet Result Node.
MutableFacetResultNode(int, double, double, CategoryPath, List<FacetResultNode>) - Constructor for class org.apache.lucene.facet.search.results.MutableFacetResultNode
Create a Facet Result Node.
MutableFacetResultNode(FacetResultNode, boolean) - Constructor for class org.apache.lucene.facet.search.results.MutableFacetResultNode
Create a mutable facet result node from another result node

N

N - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
name - Variable in class org.apache.lucene.analysis.pt.RSLPStemmerBase.Step

name - Variable in class org.apache.lucene.document.AbstractField

name() - Method in class org.apache.lucene.document.AbstractField
Returns the name of the field as an interned string.
name() - Method in interface org.apache.lucene.document.Fieldable
Returns the name of the field as an interned string.
name - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
Name of the segment.
name - Variable in class org.apache.lucene.index.FieldInfo

name - Variable in class org.apache.lucene.index.SegmentInfo

name() - Method in class org.apache.lucene.search.function.CustomScoreQuery
A short name of this query, used in CustomScoreQuery.toString(String).
NAME_FIELD - Static variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

NamedThreadFactory - Class in org.apache.lucene.util
A default ThreadFactory implementation that accepts the name prefix of the created threads as a constructor argument.
NamedThreadFactory(String) - Constructor for class org.apache.lucene.util.NamedThreadFactory
Creates a new NamedThreadFactory instance
NameHashIntCacheLRU - Class in org.apache.lucene.facet.taxonomy.writercache.lru
An an LRU cache of mapping from name to int.
NativeFSLockFactory - Class in org.apache.lucene.store
Implements LockFactory using native OS file locks.
NativeFSLockFactory() - Constructor for class org.apache.lucene.store.NativeFSLockFactory
Create a NativeFSLockFactory instance, with null (unset) lock directory.
NativeFSLockFactory(String) - Constructor for class org.apache.lucene.store.NativeFSLockFactory
Create a NativeFSLockFactory instance, storing lock files into the specified lockDirName:
NativeFSLockFactory(File) - Constructor for class org.apache.lucene.store.NativeFSLockFactory
Create a NativeFSLockFactory instance, storing lock files into the specified lockDir:
NativePosixUtil - Class in org.apache.lucene.store

NativePosixUtil() - Constructor for class org.apache.lucene.store.NativePosixUtil

ncomponents - Variable in class org.apache.lucene.facet.taxonomy.CategoryPath

NearRealtimeReaderTask - Class in org.apache.lucene.benchmark.byTask.tasks
Spawns a BG thread that periodically (defaults to 3.0 seconds, but accepts param in seconds) wakes up and asks IndexWriter for a near real-time reader.
NearRealtimeReaderTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask

NearSpansOrdered - Class in org.apache.lucene.search.spans
A Spans that is formed from the ordered subspans of a SpanNearQuery where the subspans do not overlap and have a maximum slop between them.
NearSpansOrdered(SpanNearQuery, IndexReader) - Constructor for class org.apache.lucene.search.spans.NearSpansOrdered

NearSpansOrdered(SpanNearQuery, IndexReader, boolean) - Constructor for class org.apache.lucene.search.spans.NearSpansOrdered

NearSpansUnordered - Class in org.apache.lucene.search.spans
Similar to NearSpansOrdered, but for the unordered case.
NearSpansUnordered(SpanNearQuery, IndexReader) - Constructor for class org.apache.lucene.search.spans.NearSpansUnordered

negate() - Method in class org.apache.lucene.search.FieldValueFilter
Returns true iff this filter is negated, otherwise false
NEW_LINE - Static variable in class org.apache.lucene.benchmark.byTask.feeds.TrecContentSource
separator between lines in the byffer
NEW_LINE - Static variable in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

NewAnalyzerTask - Class in org.apache.lucene.benchmark.byTask.tasks
Create a new Analyzer and set it it in the getRunData() for use by all future tasks.
NewAnalyzerTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask

newBooleanClause(Query, BooleanClause.Occur) - Method in class org.apache.lucene.queryParser.QueryParser
Builds a new BooleanClause instance
newBooleanQuery(boolean) - Method in class org.apache.lucene.queryParser.QueryParser
Builds a new BooleanQuery instance
newBuffer(byte[]) - Method in class org.apache.lucene.store.BufferedIndexInput

newBuffer(byte[]) - Method in class org.apache.lucene.store.NIOFSDirectory.NIOFSIndexInput

newBuffer(int) - Method in class org.apache.lucene.store.RAMFile
Expert: allocate a new buffer.
newByteRange(String, Byte, Byte, boolean, boolean) - Static method in class org.apache.lucene.search.FieldCacheRangeFilter
Creates a numeric range filter using FieldCache.getBytes(IndexReader,String).
newByteRange(String, FieldCache.ByteParser, Byte, Byte, boolean, boolean) - Static method in class org.apache.lucene.search.FieldCacheRangeFilter
Creates a numeric range filter using FieldCache.getBytes(IndexReader,String,FieldCache.ByteParser).
newCharacterBuffer(int) - Static method in class org.apache.lucene.util.CharacterUtils
Creates a new CharacterUtils.CharacterBuffer and allocates a char[] of the given bufferSize.
NewCollationAnalyzerTask - Class in org.apache.lucene.benchmark.byTask.tasks
Task to support benchmarking collation.
NewCollationAnalyzerTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask

NewCollationAnalyzerTask.Implementation - Enum in org.apache.lucene.benchmark.byTask.tasks

newColumn - Static variable in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenPositioner
Deprecated.
newComparator(String, int, int, boolean) - Method in class org.apache.lucene.search.FieldComparatorSource
Creates a comparator for the field in the given index.
newComparator(String, int, int, boolean) - Method in class org.apache.lucene.spatial.tier.DistanceFieldComparatorSource
Deprecated.
newConcurrentHashMap() - Static method in class org.apache.lucene.util.WeakIdentityMap
Creates a new WeakIdentityMap based on a ConcurrentHashMap.
newCondition() - Method in class org.apache.lucene.util.DummyConcurrentLock

newCounter() - Static method in class org.apache.lucene.util.Counter
Returns a new counter.
newCounter(boolean) - Static method in class org.apache.lucene.util.Counter
Returns a new counter.
newDirectory() - Static method in class org.apache.lucene.util.LuceneTestCase
Returns a new Directory instance.
newDirectory(Random) - Static method in class org.apache.lucene.util.LuceneTestCase
Returns a new Directory instance, using the specified random.
newDirectory(Directory) - Static method in class org.apache.lucene.util.LuceneTestCase
Returns a new Directory instance, with contents copied from the provided directory.
newDirectory(Random, Directory) - Static method in class org.apache.lucene.util.LuceneTestCase
Returns a new Directory instance, using the specified random with contents copied from the provided directory.
newDoubleRange(String, Double, Double, boolean, boolean) - Static method in class org.apache.lucene.search.FieldCacheRangeFilter
Creates a numeric range filter using FieldCache.getDoubles(IndexReader,String).
newDoubleRange(String, FieldCache.DoubleParser, Double, Double, boolean, boolean) - Static method in class org.apache.lucene.search.FieldCacheRangeFilter
Creates a numeric range filter using FieldCache.getDoubles(IndexReader,String,FieldCache.DoubleParser).
newDoubleRange(String, int, Double, Double, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeFilter
Factory that creates a NumericRangeFilter, that filters a double range using the given precisionStep.
newDoubleRange(String, Double, Double, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeFilter
Factory that creates a NumericRangeFilter, that queries a double range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
newDoubleRange(String, int, Double, Double, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeQuery
Factory that creates a NumericRangeQuery, that queries a double range using the given precisionStep.
newDoubleRange(String, Double, Double, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeQuery
Factory that creates a NumericRangeQuery, that queries a double range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
newField(String, String, Field.Index) - Static method in class org.apache.lucene.util.LuceneTestCase
Returns a new field instance.
newField(String, String, Field.Store, Field.Index) - Static method in class org.apache.lucene.util.LuceneTestCase
Returns a new field instance.
newField(String, String, Field.Store, Field.Index, Field.TermVector) - Static method in class org.apache.lucene.util.LuceneTestCase
Returns a new Field instance.
newField(Random, String, String, Field.Index) - Static method in class org.apache.lucene.util.LuceneTestCase
Returns a new field instance, using the specified random.
newField(Random, String, String, Field.Store, Field.Index) - Static method in class org.apache.lucene.util.LuceneTestCase
Returns a new field instance, using the specified random.
newField(Random, String, String, Field.Store, Field.Index, Field.TermVector) - Static method in class org.apache.lucene.util.LuceneTestCase
Returns a new field instance, using the specified random.
newFloatRange(String, Float, Float, boolean, boolean) - Static method in class org.apache.lucene.search.FieldCacheRangeFilter
Creates a numeric range filter using FieldCache.getFloats(IndexReader,String).
newFloatRange(String, FieldCache.FloatParser, Float, Float, boolean, boolean) - Static method in class org.apache.lucene.search.FieldCacheRangeFilter
Creates a numeric range filter using FieldCache.getFloats(IndexReader,String,FieldCache.FloatParser).
newFloatRange(String, int, Float, Float, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeFilter
Factory that creates a NumericRangeFilter, that filters a float range using the given precisionStep.
newFloatRange(String, Float, Float, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeFilter
Factory that creates a NumericRangeFilter, that queries a float range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
newFloatRange(String, int, Float, Float, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeQuery
Factory that creates a NumericRangeQuery, that queries a float range using the given precisionStep.
newFloatRange(String, Float, Float, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeQuery
Factory that creates a NumericRangeQuery, that queries a float range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
newFromDelegate(IndexOutput) - Method in class org.apache.lucene.util.ThrottledIndexOutput

newFSDirectory(String, File) - Static method in class org.apache.lucene.util.CommandLineUtil
Creates a specific FSDirectory instance starting from its class name
newFSDirectory(Class<? extends FSDirectory>, File) - Static method in class org.apache.lucene.util.CommandLineUtil
Creates a new specific FSDirectory instance
newFSDirectory(File) - Static method in class org.apache.lucene.util.LuceneTestCase
Returns a new FSDirectory instance over the given file, which must be a folder.
newFSDirectory(File, LockFactory) - Static method in class org.apache.lucene.util.LuceneTestCase
Returns a new FSDirectory instance over the given file, which must be a folder.
newFuzzyQuery(Term, float, int) - Method in class org.apache.lucene.queryParser.QueryParser
Builds a new FuzzyQuery instance
newHashMap() - Static method in class org.apache.lucene.util.WeakIdentityMap
Creates a new WeakIdentityMap based on a non-synchronized HashMap.
newIndexWriterConfig(Version, Analyzer) - Static method in class org.apache.lucene.util.LuceneTestCase
create a new index writer config with random defaults
newIndexWriterConfig(Random, Version, Analyzer) - Static method in class org.apache.lucene.util.LuceneTestCase
create a new index writer config with random defaults using the specified random
newInstance() - Static method in class org.apache.lucene.queryParser.core.config.ConfigurationKey
Creates a new instance.
newInstance() - Method in class org.apache.lucene.util.RollingBuffer

newIntRange(String, Integer, Integer, boolean, boolean) - Static method in class org.apache.lucene.search.FieldCacheRangeFilter
Creates a numeric range filter using FieldCache.getInts(IndexReader,String).
newIntRange(String, FieldCache.IntParser, Integer, Integer, boolean, boolean) - Static method in class org.apache.lucene.search.FieldCacheRangeFilter
Creates a numeric range filter using FieldCache.getInts(IndexReader,String,FieldCache.IntParser).
newIntRange(String, int, Integer, Integer, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeFilter
Factory that creates a NumericRangeFilter, that filters a int range using the given precisionStep.
newIntRange(String, Integer, Integer, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeFilter
Factory that creates a NumericRangeFilter, that queries a int range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
newIntRange(String, int, Integer, Integer, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeQuery
Factory that creates a NumericRangeQuery, that queries a int range using the given precisionStep.
newIntRange(String, Integer, Integer, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeQuery
Factory that creates a NumericRangeQuery, that queries a int range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
newline - Static variable in class org.apache.lucene.benchmark.byTask.tasks.ReportTask

NewLocaleTask - Class in org.apache.lucene.benchmark.byTask.tasks
Set a Locale for use in benchmarking.
NewLocaleTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.NewLocaleTask
Create a new Locale and set it it in the getRunData() for use by all future tasks.
newLogMergePolicy() - Static method in class org.apache.lucene.util.LuceneTestCase

newLogMergePolicy(Random) - Static method in class org.apache.lucene.util.LuceneTestCase

newLogMergePolicy(boolean) - Static method in class org.apache.lucene.util.LuceneTestCase

newLogMergePolicy(boolean, int) - Static method in class org.apache.lucene.util.LuceneTestCase

newLogMergePolicy(int) - Static method in class org.apache.lucene.util.LuceneTestCase

newLongRange(String, Long, Long, boolean, boolean) - Static method in class org.apache.lucene.search.FieldCacheRangeFilter
Creates a numeric range filter using FieldCache.getLongs(IndexReader,String).
newLongRange(String, FieldCache.LongParser, Long, Long, boolean, boolean) - Static method in class org.apache.lucene.search.FieldCacheRangeFilter
Creates a numeric range filter using FieldCache.getLongs(IndexReader,String,FieldCache.LongParser).
newLongRange(String, int, Long, Long, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeFilter
Factory that creates a NumericRangeFilter, that filters a long range using the given precisionStep.
newLongRange(String, Long, Long, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeFilter
Factory that creates a NumericRangeFilter, that queries a long range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
newLongRange(String, int, Long, Long, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeQuery
Factory that creates a NumericRangeQuery, that queries a long range using the given precisionStep.
newLongRange(String, Long, Long, boolean, boolean) - Static method in class org.apache.lucene.search.NumericRangeQuery
Factory that creates a NumericRangeQuery, that queries a long range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
newMatchAllDocsQuery() - Method in class org.apache.lucene.queryParser.QueryParser
Builds a new MatchAllDocsQuery instance
newMultiPhraseQuery() - Method in class org.apache.lucene.queryParser.QueryParser
Builds a new MultiPhraseQuery instance
newPair(A, B) - Method in class org.apache.lucene.util.fst.PairOutputs
Create a new Pair
newPhraseQuery() - Method in class org.apache.lucene.queryParser.QueryParser
Builds a new PhraseQuery instance
newPosition() - Method in class org.apache.lucene.analysis.LookaheadTokenFilter

newPosition() - Method in class org.apache.lucene.analysis.MockGraphTokenFilter

newPosition() - Method in class org.apache.lucene.analysis.MockRandomLookaheadTokenFilter

newPrefixQuery(Term) - Method in class org.apache.lucene.queryParser.QueryParser
Builds a new PrefixQuery instance
newRAMFile() - Method in class org.apache.lucene.store.RAMDirectory
Returns a new RAMFile for storing data.
newRangeQuery(String, String, String, boolean) - Method in class org.apache.lucene.queryParser.complexPhrase.ComplexPhraseQueryParser

newRangeQuery(String, String, String, boolean) - Method in class org.apache.lucene.queryParser.QueryParser
Builds a new TermRangeQuery instance
newRound() - Method in class org.apache.lucene.benchmark.byTask.utils.Config
Increment the round number, for config values that are extracted by round number.
NewRoundTask - Class in org.apache.lucene.benchmark.byTask.tasks
Increment the counter for properties maintained by Round Number.
NewRoundTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.NewRoundTask

newRow - Static variable in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenPositioner
Deprecated.
newSearcher(IndexReader) - Method in class org.apache.lucene.search.SearcherFactory
Returns a new IndexSearcher over the given reader.
newSearcher(IndexReader) - Static method in class org.apache.lucene.util.LuceneTestCase
create a new searcher over the reader.
newSearcher(IndexReader, boolean) - Static method in class org.apache.lucene.util.LuceneTestCase
create a new searcher over the reader.
newSentenceInstance() - Static method in class org.apache.lucene.analysis.util.CharArrayIterator
Create a new CharArrayIterator that works around JRE bugs in a manner suitable for BreakIterator.getSentenceInstance()
NewShingleAnalyzerTask - Class in org.apache.lucene.benchmark.byTask.tasks
Task to support benchmarking ShingleFilter / ShingleAnalyzerWrapper
NewShingleAnalyzerTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.NewShingleAnalyzerTask

newShortRange(String, Short, Short, boolean, boolean) - Static method in class org.apache.lucene.search.FieldCacheRangeFilter
Creates a numeric range filter using FieldCache.getShorts(IndexReader,String).
newShortRange(String, FieldCache.ShortParser, Short, Short, boolean, boolean) - Static method in class org.apache.lucene.search.FieldCacheRangeFilter
Creates a numeric range filter using FieldCache.getShorts(IndexReader,String,FieldCache.ShortParser).
newSinkTokenStream() - Method in class org.apache.lucene.analysis.TeeSinkTokenFilter
Returns a new TeeSinkTokenFilter.SinkTokenStream that receives all tokens consumed by this stream.
newSinkTokenStream(TeeSinkTokenFilter.SinkFilter) - Method in class org.apache.lucene.analysis.TeeSinkTokenFilter
Returns a new TeeSinkTokenFilter.SinkTokenStream that receives all tokens consumed by this stream that pass the supplied filter.
newSlice(int) - Method in class org.apache.lucene.util.ByteBlockPool

newSpanTermQuery(Term) - Method in class org.apache.lucene.queryParser.surround.query.BasicQueryFactory

newString(int[], int, int) - Static method in class org.apache.lucene.util.UnicodeUtil
Cover JDK 1.5 API.
newStringRange(String, String, String, boolean, boolean) - Static method in class org.apache.lucene.search.FieldCacheRangeFilter
Creates a string range filter using FieldCache.getStringIndex(org.apache.lucene.index.IndexReader, java.lang.String).
newTermExtractor(String) - Method in class org.apache.lucene.search.highlight.QueryScorer

newTermQuery(Term) - Method in class org.apache.lucene.queryParser.complexPhrase.ComplexPhraseQueryParser

newTermQuery(Term) - Method in class org.apache.lucene.queryParser.QueryParser
Builds a new TermQuery instance
newTermQuery(Term) - Method in class org.apache.lucene.queryParser.surround.query.BasicQueryFactory

newThread(Runnable) - Method in class org.apache.lucene.util.NamedThreadFactory
Creates a new Thread
newTieredMergePolicy() - Static method in class org.apache.lucene.util.LuceneTestCase

newTieredMergePolicy(Random) - Static method in class org.apache.lucene.util.LuceneTestCase

newToken(int, String) - Static method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token
Returns a new Token object, by default.
newToken(int) - Static method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token

newToken(int, String) - Static method in class org.apache.lucene.queryParser.standard.parser.Token
Returns a new Token object, by default.
newToken(int) - Static method in class org.apache.lucene.queryParser.standard.parser.Token

newToken(int, String) - Static method in class org.apache.lucene.queryParser.surround.parser.Token
Returns a new Token object, by default.
newToken(int) - Static method in class org.apache.lucene.queryParser.surround.parser.Token

newToken(int, String) - Static method in class org.apache.lucene.queryParser.Token
Returns a new Token object, by default.
newToken(int) - Static method in class org.apache.lucene.queryParser.Token

newTopDocs(ScoreDoc[], int) - Method in class org.apache.lucene.search.TopDocsCollector
Returns a TopDocs instance containing the given results.
newTopDocs(ScoreDoc[], int) - Method in class org.apache.lucene.search.TopFieldCollector

newTopDocs(ScoreDoc[], int) - Method in class org.apache.lucene.search.TopScoreDocCollector

newWildcardQuery(Term) - Method in class org.apache.lucene.queryParser.QueryParser
Builds a new WildcardQuery instance
newWordInstance() - Static method in class org.apache.lucene.analysis.util.CharArrayIterator
Create a new CharArrayIterator that works around JRE bugs in a manner suitable for BreakIterator.getWordInstance()
next() - Method in class org.apache.lucene.analysis.CharArrayMap.EntryIterator
use nextCharArray() + currentValue() for better efficiency.
next() - Method in class org.apache.lucene.analysis.CharArraySet.CharArraySetIterator
Deprecated. Returns the next String, as a Set would...
next() - Method in class org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator

next(int) - Method in class org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator

next() - Method in class org.apache.lucene.analysis.util.CharArrayIterator

next - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token
A reference to the next regular (non-special) token from the input stream.
next() - Method in class org.apache.lucene.benchmark.byTask.feeds.DirContentSource.Iterator

next() - Method in interface org.apache.lucene.facet.search.ScoredDocIDsIterator
Iterate to the next document/score pair.
next() - Method in class org.apache.lucene.index.AbstractAllTermDocs

next() - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermDocs

next() - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermEnum

next() - Method in class org.apache.lucene.index.MultipleTermPositions

next() - Method in interface org.apache.lucene.index.TermDocs
Moves to the next pair in the enumeration.
next() - Method in class org.apache.lucene.index.TermEnum
Increments the enumeration to the next element.
next - Variable in class org.apache.lucene.queryParser.standard.parser.Token
A reference to the next regular (non-special) token from the input stream.
next - Variable in class org.apache.lucene.queryParser.surround.parser.Token
A reference to the next regular (non-special) token from the input stream.
next - Variable in class org.apache.lucene.queryParser.Token
A reference to the next regular (non-special) token from the input stream.
next() - Method in class org.apache.lucene.search.FilteredTermEnum
Increments the enumeration to the next element.
next() - Method in class org.apache.lucene.search.spans.NearSpansOrdered

next() - Method in class org.apache.lucene.search.spans.NearSpansUnordered

next() - Method in class org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan

next() - Method in class org.apache.lucene.search.spans.Spans
Move to the next match, returning true iff any such exists.
next() - Method in class org.apache.lucene.search.spans.TermSpans

next() - Method in class org.apache.lucene.search.spell.TermFreqIterator.TermFreqIteratorWrapper

next() - Method in class org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper

next() - Method in class org.apache.lucene.search.suggest.SortedTermFreqIteratorWrapper

next() - Method in class org.apache.lucene.search.suggest.UnsortedTermFreqIteratorWrapper

next() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermDocs

next() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermEnum
Increments the enumeration to the next element.
next() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermPositions
Moves to the next pair in the enumeration.
next() - Method in interface org.apache.lucene.util.BytesRefIterator
Increments the iteration to the next BytesRef in the iterator.
next() - Method in interface org.apache.lucene.util.collections.DoubleIterator

next() - Method in interface org.apache.lucene.util.collections.FloatIterator

next() - Method in interface org.apache.lucene.util.collections.IntIterator

next() - Method in class org.apache.lucene.util.fst.BytesRefFSTEnum

next() - Method in class org.apache.lucene.util.fst.IntsRefFSTEnum

next(int) - Method in class org.apache.lucene.util.SmartRandom

nextBuffer() - Method in class org.apache.lucene.util.ByteBlockPool

nextCategory() - Method in interface org.apache.lucene.facet.search.CategoryListIterator
Returns the next category for the current document that is set through CategoryListIterator.skipTo(int), or a number higher than Integer.MAX_VALUE.
nextCategory() - Method in class org.apache.lucene.facet.search.PayloadIntDecodingIterator

nextCategory() - Method in class org.apache.lucene.facet.util.MultiCategoryListIterator
Return a value larger than Integer.MAX_VALUE only if all iterators are exhausted
nextCharArray() - Method in class org.apache.lucene.analysis.CharArraySet.CharArraySetIterator
Deprecated. do not modify the returned char[]
nextCharBuf - Variable in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

nextCharInd - Variable in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

nextDoc() - Method in class org.apache.lucene.search.ConstantScoreQuery.ConstantScorer

nextDoc() - Method in class org.apache.lucene.search.DocIdSetIterator
Advances to the next document in the set and returns the doc it is currently on, or DocIdSetIterator.NO_MORE_DOCS if there are no more docs in the set.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.
nextDoc() - Method in class org.apache.lucene.search.FilteredDocIdSetIterator

nextDoc() - Method in class org.apache.lucene.search.ScoreCachingWrappingScorer

nextDoc() - Method in class org.apache.lucene.search.spans.SpanScorer

nextDoc() - Method in class org.apache.lucene.util.LineFileDocs
Note: Document instance is re-used per-thread
nextDoc() - Method in class org.apache.lucene.util.OpenBitSetIterator
alternate shift implementations // 32 bit shifts, but a long shift needed at the end private void shift2() { int y = (int)word; if (y==0) {wordShift +=32; y = (int)(word >>>32); } if ((y & 0x0000FFFF) == 0) { wordShift +=16; y>>>=16; } if ((y & 0x000000FF) == 0) { wordShift +=8; y>>>=8; } indexArray = bitlist[y & 0xff]; word >>>= (wordShift +1); } private void shift3() { int lower = (int)word; int lowByte = lower & 0xff; if (lowByte != 0) { indexArray=bitlist[lowByte]; return; } shift(); }
nextDocBase - Variable in class org.apache.lucene.spatial.tier.DistanceFilter
Deprecated.
nextElement() - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree.Iterator

nextFinalOutput - Variable in class org.apache.lucene.util.fst.Builder.Arc

nextFinalOutput - Variable in class org.apache.lucene.util.fst.FST.Arc

nextHighestPowerOfTwo(int) - Static method in class org.apache.lucene.util.BitUtil
returns the next highest power of two, or the current value if it's already a power of two or zero
nextHighestPowerOfTwo(long) - Static method in class org.apache.lucene.util.BitUtil
returns the next highest power of two, or the current value if it's already a power of two or zero
nextInt(Random, int, int) - Static method in class org.apache.lucene.util._TestUtil
start and end are BOTH inclusive
nextKey() - Method in class org.apache.lucene.analysis.CharArrayMap.EntryIterator
gets the next key...
nextKeyString() - Method in class org.apache.lucene.analysis.CharArrayMap.EntryIterator
gets the next key as a newly created String object
nextLevelArray - Static variable in class org.apache.lucene.util.ByteBlockPool

nextPosition() - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermPositions

nextPosition() - Method in class org.apache.lucene.index.MultipleTermPositions

nextPosition() - Method in interface org.apache.lucene.index.TermPositions
Returns next position in the current document.
nextPosition() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermPositions
Returns next position in the current document.
nextQnum() - Method in class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker

nextRead - Variable in class org.apache.lucene.analysis.LookaheadTokenFilter.Position

nextSetBit(int) - Method in class org.apache.lucene.util.FixedBitSet
Returns the index of the first set bit starting at the index specified.
nextSetBit(int) - Method in class org.apache.lucene.util.OpenBitSet
Returns the index of the first set bit starting at the index specified.
nextSetBit(long) - Method in class org.apache.lucene.util.OpenBitSet
Returns the index of the first set bit starting at the index specified.
nextState() - Method in class org.apache.lucene.analysis.LookaheadTokenFilter.Position

nextToken() - Method in class org.apache.lucene.analysis.LookaheadTokenFilter
Call this when you are done looking ahead; it will set the next token to return.
NGRAM - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

NGramDistance - Class in org.apache.lucene.search.spell
N-Gram version of edit distance based on paper by Grzegorz Kondrak, "N-gram similarity and distance".
NGramDistance(int) - Constructor for class org.apache.lucene.search.spell.NGramDistance
Creates an N-Gram distance measure using n-grams of the specified size.
NGramDistance() - Constructor for class org.apache.lucene.search.spell.NGramDistance
Creates an N-Gram distance measure using n-grams of size 2.
NGramPhraseQuery - Class in org.apache.lucene.search
This is a PhraseQuery which is optimized for n-gram phrase query.
NGramPhraseQuery(int) - Constructor for class org.apache.lucene.search.NGramPhraseQuery
Constructor that takes gram size.
NGramTokenFilter - Class in org.apache.lucene.analysis.ngram
Tokenizes the input into n-grams of the given size(s).
NGramTokenFilter(TokenStream, int, int) - Constructor for class org.apache.lucene.analysis.ngram.NGramTokenFilter
Creates NGramTokenFilter with given min and max n-grams.
NGramTokenFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.ngram.NGramTokenFilter
Creates NGramTokenFilter with default min and max n-grams.
NGramTokenizer - Class in org.apache.lucene.analysis.ngram
Tokenizes the input into n-grams of the given size(s).
NGramTokenizer(Reader, int, int) - Constructor for class org.apache.lucene.analysis.ngram.NGramTokenizer
Creates NGramTokenizer with given min and max n-grams.
NGramTokenizer(AttributeSource, Reader, int, int) - Constructor for class org.apache.lucene.analysis.ngram.NGramTokenizer
Creates NGramTokenizer with given min and max n-grams.
NGramTokenizer(AttributeSource.AttributeFactory, Reader, int, int) - Constructor for class org.apache.lucene.analysis.ngram.NGramTokenizer
Creates NGramTokenizer with given min and max n-grams.
NGramTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.ngram.NGramTokenizer
Creates NGramTokenizer with default min and max n-grams.
NIOFSDirectory - Class in org.apache.lucene.store
An FSDirectory implementation that uses java.nio's FileChannel's positional read, which allows multiple threads to read from the same file without synchronizing.
NIOFSDirectory(File, LockFactory) - Constructor for class org.apache.lucene.store.NIOFSDirectory
Create a new NIOFSDirectory for the named location.
NIOFSDirectory(File) - Constructor for class org.apache.lucene.store.NIOFSDirectory
Create a new NIOFSDirectory for the named location and NativeFSLockFactory.
NIOFSDirectory.NIOFSIndexInput - Class in org.apache.lucene.store

NIOFSDirectory.NIOFSIndexInput(File, int, int) - Constructor for class org.apache.lucene.store.NIOFSDirectory.NIOFSIndexInput

NLS - Class in org.apache.lucene.messages
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).
NLS() - Constructor for class org.apache.lucene.messages.NLS
Deprecated.
NLSException - Interface in org.apache.lucene.messages
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).
nlz(long) - Static method in class org.apache.lucene.util.BitUtil
Returns the number of leading zero bits.
nlzTable - Static variable in class org.apache.lucene.util.BitUtil
table of number of leading zeros in a byte
NO_ASSOCIATION - Static variable in class org.apache.lucene.facet.enhancements.association.AssociationsPayloadIterator
The long-special-value returned for ordinals which have no associated int value.
NO_COMPOUND_FILES - Static variable in class org.apache.lucene.index.NoMergePolicy
A singleton NoMergePolicy which indicates the index does not use compound files.
NO_DOC_ID_PROVIDED - Static variable in class org.apache.lucene.search.Similarity

NO_MORE_DOCS - Static variable in class org.apache.lucene.search.DocIdSetIterator
When returned by DocIdSetIterator.nextDoc(), DocIdSetIterator.advance(int) and DocIdSetIterator.docID() it means there are no more docs in the iterator.
NO_OUTPUT - Variable in class org.apache.lucene.analysis.ja.dict.TokenInfoFST

noBreak - Variable in class org.apache.lucene.analysis.compound.hyphenation.Hyphen

noCFSRatio - Variable in class org.apache.lucene.index.LogMergePolicy

NoChildOptimizationQueryNodeProcessor - Class in org.apache.lucene.queryParser.core.processors
A NoChildOptimizationQueryNodeProcessor removes every BooleanQueryNode, BoostQueryNode, TokenizedPhraseQueryNode or ModifierQueryNode that do not have a valid children.
NoChildOptimizationQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.core.processors.NoChildOptimizationQueryNodeProcessor

NODE_ACTION_NOT_SUPPORTED - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

nodeCount - Variable in class org.apache.lucene.util.fst.FST

NoDeletionPolicy - Class in org.apache.lucene.index
An IndexDeletionPolicy which keeps all index commits around, never deleting them.
NoLockFactory - Class in org.apache.lucene.store
Use this LockFactory to disable locking entirely.
NoLockFactory() - Constructor for class org.apache.lucene.store.NoLockFactory
Deprecated. This constructor was not intended to be public and should not be used. It will be made private in Lucene 4.0
NoMergePolicy - Class in org.apache.lucene.index
A MergePolicy which never returns merges to execute (hence it's name).
NoMergeScheduler - Class in org.apache.lucene.index
A MergeScheduler which never executes any merges.
NoMoreDataException - Exception in org.apache.lucene.benchmark.byTask.feeds
Exception indicating there is no more data.
NoMoreDataException() - Constructor for exception org.apache.lucene.benchmark.byTask.feeds.NoMoreDataException

NON_STORE_INDEX_EXTENSIONS - Static variable in class org.apache.lucene.index.IndexFileNames

NON_WORD_PATTERN - Static variable in class org.apache.lucene.analysis.miscellaneous.PatternAnalyzer
"\\W+"; Divides text at non-letters (NOT Character.isLetter(c))
NOnesIntDecoder - Class in org.apache.lucene.util.encoding
Decodes data which was encoded by NOnesIntEncoder.
NOnesIntDecoder(int) - Constructor for class org.apache.lucene.util.encoding.NOnesIntDecoder
Constructs a decoder with a given N (Number of consecutive '1's which are translated into a single target value '2'.
NOnesIntEncoder - Class in org.apache.lucene.util.encoding
A variation of FourFlagsIntEncoder which translates the data as follows: Values ≥ 2 are trnalsated to value+1 (2 ⇒ 3, 3 ⇒ 4 and so forth).
NOnesIntEncoder(int) - Constructor for class org.apache.lucene.util.encoding.NOnesIntEncoder
Constructs an encoder with a given value of N (N: Number of consecutive '1's to be translated into single target value '2').
NonTopLevelOrdinalPolicy - Class in org.apache.lucene.facet.index.categorypolicy
Filter out any "top level" category ordinals.
NonTopLevelOrdinalPolicy() - Constructor for class org.apache.lucene.facet.index.categorypolicy.NonTopLevelOrdinalPolicy
Constructs a new non-top-level-ordinal-filter.
NonTopLevelPathPolicy - Class in org.apache.lucene.facet.index.categorypolicy
This class filters our the ROOT category, and it's direct descendants.
NonTopLevelPathPolicy() - Constructor for class org.apache.lucene.facet.index.categorypolicy.NonTopLevelPathPolicy

NOON - Static variable in class org.apache.lucene.analysis.ar.ArabicStemmer

NoOutputs - Class in org.apache.lucene.util.fst
A null FST Outputs implementation; use this if you just want to build an FSA.
NOREUSE - Static variable in class org.apache.lucene.store.NativePosixUtil

norm() - Method in class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated.
NORMAL - Static variable in class org.apache.lucene.store.NativePosixUtil

normalize(char[], int) - Method in class org.apache.lucene.analysis.ar.ArabicNormalizer
Normalize an input buffer of Arabic text
normalize(char) - Method in class org.apache.lucene.analysis.CharTokenizer
Deprecated. use CharTokenizer.normalize(int) instead. This method will be removed in Lucene 4.0.
normalize(int) - Method in class org.apache.lucene.analysis.CharTokenizer
Called on each token character to normalize it before it is added to the token.
normalize(char[], int) - Method in class org.apache.lucene.analysis.fa.PersianNormalizer
Normalize an input buffer of Persian text
normalize(char[], int) - Method in class org.apache.lucene.analysis.hi.HindiNormalizer
Normalize an input buffer of Hindi text
normalize(char[], int) - Method in class org.apache.lucene.analysis.in.IndicNormalizer
Normalizes input text, and returns the new length.
normalize(int) - Method in class org.apache.lucene.analysis.LowerCaseTokenizer
Converts char to lower case Character.toLowerCase(int).
normalize(int) - Method in class org.apache.lucene.analysis.MockTokenizer

normalize(float) - Method in class org.apache.lucene.search.BooleanQuery.BooleanWeight

normalize(float) - Method in class org.apache.lucene.search.ConstantScoreQuery.ConstantWeight

normalize(float) - Method in class org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight
Apply the computed normalization factor to our subqueries
normalize(float) - Method in class org.apache.lucene.search.spans.SpanWeight

normalize(float) - Method in class org.apache.lucene.search.Weight
Assigns the query normalization factor to this.
normalize() - Method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
normalize() - Method in class org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.
normalize() - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated.
NormalizeCharMap - Class in org.apache.lucene.analysis
Holds a map of String input to String output, to be used with MappingCharFilter.
NormalizeCharMap() - Constructor for class org.apache.lucene.analysis.NormalizeCharMap

normalizeException(ArrayList<?>) - Method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser

normLat(double[]) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
normLng(double[]) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated. Returns a normalized Lng rectangle shape for the bounding box
norms(String) - Method in class org.apache.lucene.index.FilterIndexReader

norms(String, byte[], int) - Method in class org.apache.lucene.index.FilterIndexReader

norms(String) - Method in class org.apache.lucene.index.IndexReader
Returns the byte-encoded normalization factor for the named field of every document.
norms(String, byte[], int) - Method in class org.apache.lucene.index.IndexReader
Reads the byte-encoded normalization factor for the named field of every document.
norms(String) - Method in class org.apache.lucene.index.MultiReader

norms(String, byte[], int) - Method in class org.apache.lucene.index.MultiReader

norms(String) - Method in class org.apache.lucene.index.ParallelReader

norms(String, byte[], int) - Method in class org.apache.lucene.index.ParallelReader

norms(String) - Method in class org.apache.lucene.index.SegmentReader

norms(String, byte[], int) - Method in class org.apache.lucene.index.SegmentReader
Read norms into a pre-allocated array.
norms - Variable in class org.apache.lucene.search.spans.SpanScorer

norms(String) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated. never ever touch these values.
norms(String, byte[], int) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
NORMS_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of norms file
normSqr() - Method in class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated. Vector length (magnitude) squared
NorwegianAnalyzer - Class in org.apache.lucene.analysis.no
Analyzer for Norwegian.
NorwegianAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.no.NorwegianAnalyzer
Builds an analyzer with the default stop words: NorwegianAnalyzer.DEFAULT_STOPWORD_FILE.
NorwegianAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.no.NorwegianAnalyzer
Builds an analyzer with the given stop words.
NorwegianAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.no.NorwegianAnalyzer
Builds an analyzer with the given stop words.
NorwegianLightStemFilter - Class in org.apache.lucene.analysis.no
A TokenFilter that applies NorwegianLightStemmer to stem Norwegian words.
NorwegianLightStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.no.NorwegianLightStemFilter

NorwegianLightStemmer - Class in org.apache.lucene.analysis.no
Light Stemmer for Norwegian.
NorwegianLightStemmer() - Constructor for class org.apache.lucene.analysis.no.NorwegianLightStemmer

NorwegianMinimalStemFilter - Class in org.apache.lucene.analysis.no
A TokenFilter that applies NorwegianMinimalStemmer to stem Norwegian words.
NorwegianMinimalStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.no.NorwegianMinimalStemFilter

NorwegianMinimalStemmer - Class in org.apache.lucene.analysis.no
Minimal Stemmer for Norwegian bokm?l (no-nb)
NorwegianMinimalStemmer() - Constructor for class org.apache.lucene.analysis.no.NorwegianMinimalStemmer

NorwegianStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
NorwegianStemmer() - Constructor for class org.tartarus.snowball.ext.NorwegianStemmer

NoSuchDirectoryException - Exception in org.apache.lucene.store
This exception is thrown when you try to list a non-existent directory.
NoSuchDirectoryException(String) - Constructor for exception org.apache.lucene.store.NoSuchDirectoryException

NOT - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
NOT - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
NOT - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
NoTokenFoundQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A NoTokenFoundQueryNode is used if a term is convert into no tokens by the tokenizer/lemmatizer/analyzer (null).
NoTokenFoundQueryNode() - Constructor for class org.apache.lucene.queryParser.core.nodes.NoTokenFoundQueryNode

NotQuery() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

NotQuery - Class in org.apache.lucene.queryParser.surround.query

NotQuery(List<SrndQuery>, String) - Constructor for class org.apache.lucene.queryParser.surround.query.NotQuery

NQuery() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

NRTCachingDirectory - Class in org.apache.lucene.store
Wraps a RAMDirectory around any provided delegate directory, to be used during NRT search.
NRTCachingDirectory(Directory, double, double) - Constructor for class org.apache.lucene.store.NRTCachingDirectory
We will cache a newly created output if 1) it's a flush or a merge and the estimated size of the merged segment is <= maxMergeSizeMB, and 2) the total cached bytes is <= maxCachedMB
NRTManager - Class in org.apache.lucene.search
Utility class to manage sharing near-real-time searchers across multiple searching thread.
NRTManager(NRTManager.TrackingIndexWriter, SearcherFactory) - Constructor for class org.apache.lucene.search.NRTManager
Create new NRTManager.
NRTManager(NRTManager.TrackingIndexWriter, SearcherFactory, boolean) - Constructor for class org.apache.lucene.search.NRTManager
Expert: just like NRTManager.NRTManager(TrackingIndexWriter,SearcherFactory), but you can also specify whether each reopened searcher must apply deletes.
NRTManager.TrackingIndexWriter - Class in org.apache.lucene.search
Class that tracks changes to a delegated IndexWriter.
NRTManager.TrackingIndexWriter(IndexWriter) - Constructor for class org.apache.lucene.search.NRTManager.TrackingIndexWriter

NRTManager.WaitingListener - Interface in org.apache.lucene.search
NRTManager invokes this interface to notify it when a caller is waiting for a specific generation searcher to be visible.
NRTManagerReopenThread - Class in org.apache.lucene.search
Utility class that runs a reopen thread to periodically reopen the NRT searchers in the provided NRTManager.
NRTManagerReopenThread(NRTManager, double, double) - Constructor for class org.apache.lucene.search.NRTManagerReopenThread
Create NRTManagerReopenThread, to periodically reopen the NRT searcher.
ntz(long) - Static method in class org.apache.lucene.util.BitUtil
Returns number of trailing zeros in a 64 bit long value.
ntz(int) - Static method in class org.apache.lucene.util.BitUtil
Returns number of trailing zeros in a 32 bit int value.
ntz2(long) - Static method in class org.apache.lucene.util.BitUtil
returns 0 based index of first set bit (only works for x!=0)
This is an alternate implementation of ntz()
ntz3(long) - Static method in class org.apache.lucene.util.BitUtil
returns 0 based index of first set bit
This is an alternate implementation of ntz()
ntzTable - Static variable in class org.apache.lucene.util.BitUtil
table of number of trailing zeros in a byte
NullFragmenter - Class in org.apache.lucene.search.highlight
Fragmenter implementation which does not fragment the text.
NullFragmenter() - Constructor for class org.apache.lucene.search.highlight.NullFragmenter

NUM - Static variable in class org.apache.lucene.analysis.standard.ClassicTokenizer

NUM - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizer

NUM - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

NUM - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
NUM_BYTES_ARRAY_HEADER - Static variable in class org.apache.lucene.util.RamUsageEstimator
Number of bytes to represent an array header (no content, but with alignments).
NUM_BYTES_BOOLEAN - Static variable in class org.apache.lucene.util.RamUsageEstimator

NUM_BYTES_BYTE - Static variable in class org.apache.lucene.util.RamUsageEstimator

NUM_BYTES_CHAR - Static variable in class org.apache.lucene.util.RamUsageEstimator

NUM_BYTES_DOUBLE - Static variable in class org.apache.lucene.util.RamUsageEstimator

NUM_BYTES_FLOAT - Static variable in class org.apache.lucene.util.RamUsageEstimator

NUM_BYTES_INT - Static variable in class org.apache.lucene.util.RamUsageEstimator

NUM_BYTES_LONG - Static variable in class org.apache.lucene.util.RamUsageEstimator

NUM_BYTES_OBJECT_ALIGNMENT - Static variable in class org.apache.lucene.util.RamUsageEstimator
A constant specifying the object alignment boundary inside the JVM.
NUM_BYTES_OBJECT_HEADER - Static variable in class org.apache.lucene.util.RamUsageEstimator
Number of bytes to represent an object header (no fields, no alignments).
NUM_BYTES_OBJECT_REF - Static variable in class org.apache.lucene.util.RamUsageEstimator
Number of bytes this jvm uses to represent an object reference.
NUM_BYTES_SHORT - Static variable in class org.apache.lucene.util.RamUsageEstimator

NUM_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

numArcs - Variable in class org.apache.lucene.util.fst.Builder.UnCompiledNode

numBadSegments - Variable in class org.apache.lucene.index.CheckIndex.Status
How many bad segments were found.
NUMBER - Static variable in class org.apache.lucene.analysis.cn.smart.WordType
ASCII Alphanumeric
number - Variable in class org.apache.lucene.index.FieldInfo

NUMBER - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
NUMBER - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
NUMBER - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
NUMBER_CHAR_ARRAY - Static variable in class org.apache.lucene.analysis.cn.smart.Utility

NUMBER_CLASS_NOT_SUPPORTED_BY_NUMERIC_RANGE_QUERY - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

NumberDateFormat - Class in org.apache.lucene.queryParser.standard.config
This Format parses Long into date strings and vice-versa.
NumberDateFormat(DateFormat) - Constructor for class org.apache.lucene.queryParser.standard.config.NumberDateFormat
Constructs a NumberDateFormat object using the given DateFormat.
NumberTools - Class in org.apache.lucene.document
Deprecated. For new indexes use NumericUtils instead, which provides a sortable binary representation (prefix encoded) of numeric values. To index and efficiently query numeric values use NumericField and NumericRangeQuery. This class is included for use with existing indices and will be removed in a future release (possibly Lucene 4.0).
NumberTools() - Constructor for class org.apache.lucene.document.NumberTools
Deprecated.
numBufferedBlocks() - Method in class org.apache.lucene.util.RecyclingByteBlockAllocator

numBuffers() - Method in class org.apache.lucene.store.RAMFile

numDataNodes() - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Returns the number of nodes in the trie that have non-null data.
numDataNodes(JaspellTernarySearchTrie.TSTNode) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Returns the number of nodes in the subtrie below and including the starting node.
numDeleted - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
Number of deleted documents.
numDeletedDocs() - Method in class org.apache.lucene.index.IndexReader
Returns the number of deleted documents.
numDeletedDocs(SegmentInfo) - Method in class org.apache.lucene.index.IndexWriter
Obtain the number of deleted docs for a pooled reader.
numDocIds - Variable in class org.apache.lucene.facet.search.ScoredDocIdCollector

numDocs() - Method in class org.apache.lucene.index.FilterIndexReader

numDocs() - Method in class org.apache.lucene.index.IndexReader
Returns the number of documents in this index.
numDocs() - Method in class org.apache.lucene.index.IndexWriter
Returns total number of docs in this index, including docs not yet flushed (still in the RAM buffer), and including deletions.
numDocs() - Method in class org.apache.lucene.index.MultiReader

numDocs() - Method in class org.apache.lucene.index.ParallelReader

numDocs() - Method in class org.apache.lucene.index.RandomIndexWriter

numDocs() - Method in class org.apache.lucene.index.SegmentReader

numDocs - Variable in class org.apache.lucene.index.SegmentWriteState

numDocs() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
NUMERIC - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

NUMERIC_CONFIG - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set a field to its NumericConfig.
NUMERIC_CONFIG_MAP - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set the NumericConfig in FieldConfig for numeric fields.
NUMERIC_TYPE - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizerImpl
Numbers
NUMERIC_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. Numbers
NUMERIC_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. Numbers
NUMERIC_TYPE - Static variable in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. Numbers
NUMERIC_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Deprecated. use UAX29URLEmailTokenizer.TOKEN_TYPES instead
NUMERIC_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
Numbers
NUMERIC_UTILS_DOUBLE_PARSER - Static variable in interface org.apache.lucene.search.FieldCache
A parser instance for double values encoded with NumericUtils, e.g.
NUMERIC_UTILS_FLOAT_PARSER - Static variable in interface org.apache.lucene.search.FieldCache
A parser instance for float values encoded with NumericUtils, e.g.
NUMERIC_UTILS_INT_PARSER - Static variable in interface org.apache.lucene.search.FieldCache
A parser instance for int values encoded by NumericUtils.intToPrefixCoded(int), e.g.
NUMERIC_UTILS_LONG_PARSER - Static variable in interface org.apache.lucene.search.FieldCache
A parser instance for long values encoded by NumericUtils.longToPrefixCoded(long), e.g.
NumericConfig - Class in org.apache.lucene.queryParser.standard.config
This class holds the configuration used to parse numeric queries and create NumericRangeQuerys.
NumericConfig(int, NumberFormat, NumericField.DataType) - Constructor for class org.apache.lucene.queryParser.standard.config.NumericConfig
Constructs a NumericConfig object.
numericConfig - Variable in class org.apache.lucene.queryParser.standard.nodes.NumericRangeQueryNode

NumericField - Class in org.apache.lucene.document
This class provides a Field that enables indexing of numeric values for efficient range filtering and sorting.
NumericField(String) - Constructor for class org.apache.lucene.document.NumericField
Creates a field for numeric values using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
NumericField(String, Field.Store, boolean) - Constructor for class org.apache.lucene.document.NumericField
Creates a field for numeric values using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
NumericField(String, int) - Constructor for class org.apache.lucene.document.NumericField
Creates a field for numeric values with the specified precisionStep.
NumericField(String, int, Field.Store, boolean) - Constructor for class org.apache.lucene.document.NumericField
Creates a field for numeric values with the specified precisionStep.
NumericField.DataType - Enum in org.apache.lucene.document
Data type of the value in NumericField.
NumericFieldConfigListener - Class in org.apache.lucene.queryParser.standard.config
This listener is used to listen to FieldConfig requests in QueryConfigHandler and add StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG based on the StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG_MAP set in the QueryConfigHandler.
NumericFieldConfigListener(QueryConfigHandler) - Constructor for class org.apache.lucene.queryParser.standard.config.NumericFieldConfigListener
Construcs a NumericFieldConfigListener object using the given QueryConfigHandler.
NumericPayloadTokenFilter - Class in org.apache.lucene.analysis.payloads
Assigns a payload to a token based on the Token.type()
NumericPayloadTokenFilter(TokenStream, float, String) - Constructor for class org.apache.lucene.analysis.payloads.NumericPayloadTokenFilter

NumericQueryNode - Class in org.apache.lucene.queryParser.standard.nodes
This query node represents a field query that holds a numeric value.
NumericQueryNode(CharSequence, Number, NumberFormat) - Constructor for class org.apache.lucene.queryParser.standard.nodes.NumericQueryNode
Creates a NumericQueryNode object using the given field, Number value and NumberFormat used to convert the value to String.
NumericQueryNodeProcessor - Class in org.apache.lucene.queryParser.standard.processors
This processor is used to convert FieldQueryNodes to NumericRangeQueryNodes.
NumericQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.NumericQueryNodeProcessor
Constructs a NumericQueryNodeProcessor object.
NumericRangeFilter<T extends Number> - Class in org.apache.lucene.search
A Filter that only accepts numeric values within a specified range.
NumericRangeFilterBuilder - Class in org.apache.lucene.xmlparser.builders
Creates a NumericRangeFilter.
NumericRangeFilterBuilder() - Constructor for class org.apache.lucene.xmlparser.builders.NumericRangeFilterBuilder

NumericRangeQuery<T extends Number> - Class in org.apache.lucene.search
A Query that matches numeric values within a specified range.
NumericRangeQueryBuilder - Class in org.apache.lucene.xmlparser.builders
Creates a NumericRangeQuery.
NumericRangeQueryBuilder() - Constructor for class org.apache.lucene.xmlparser.builders.NumericRangeQueryBuilder

NumericRangeQueryNode - Class in org.apache.lucene.queryParser.standard.nodes
This query node represents a range query composed by NumericQueryNode bounds, which means the bound values are Numbers.
NumericRangeQueryNode(NumericQueryNode, NumericQueryNode, boolean, boolean, NumericConfig) - Constructor for class org.apache.lucene.queryParser.standard.nodes.NumericRangeQueryNode
Constructs a NumericRangeQueryNode object using the given NumericQueryNode as its bounds and NumericConfig.
NumericRangeQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
Builds NumericRangeQuerys out of NumericRangeQueryNodes.
NumericRangeQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.NumericRangeQueryNodeBuilder
Constructs a NumericRangeQueryNodeBuilder object.
NumericRangeQueryNodeProcessor - Class in org.apache.lucene.queryParser.standard.processors
This processor is used to convert ParametricRangeQueryNodes to NumericRangeQueryNodes.
NumericRangeQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.NumericRangeQueryNodeProcessor
Constructs an empty NumericRangeQueryNode object.
NumericTokenStream - Class in org.apache.lucene.analysis
Expert: This class provides a TokenStream for indexing numeric values that can be used by NumericRangeQuery or NumericRangeFilter.
NumericTokenStream() - Constructor for class org.apache.lucene.analysis.NumericTokenStream
Creates a token stream for numeric values using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
NumericTokenStream(int) - Constructor for class org.apache.lucene.analysis.NumericTokenStream
Creates a token stream for numeric values with the specified precisionStep.
NumericTokenStream(AttributeSource, int) - Constructor for class org.apache.lucene.analysis.NumericTokenStream
Expert: Creates a token stream for numeric values with the specified precisionStep using the given AttributeSource.
NumericTokenStream(AttributeSource.AttributeFactory, int) - Constructor for class org.apache.lucene.analysis.NumericTokenStream
Expert: Creates a token stream for numeric values with the specified precisionStep using the given AttributeSource.AttributeFactory.
NumericUtils - Class in org.apache.lucene.util
This is a helper class to generate prefix-encoded representations for numerical values and supplies converters to represent float/double values as sortable integers/longs.
NumericUtils.IntRangeBuilder - Class in org.apache.lucene.util
Expert: Callback for NumericUtils.splitIntRange(org.apache.lucene.util.NumericUtils.IntRangeBuilder, int, int, int).
NumericUtils.IntRangeBuilder() - Constructor for class org.apache.lucene.util.NumericUtils.IntRangeBuilder

NumericUtils.LongRangeBuilder - Class in org.apache.lucene.util
Expert: Callback for NumericUtils.splitLongRange(org.apache.lucene.util.NumericUtils.LongRangeBuilder, int, long, long).
NumericUtils.LongRangeBuilder() - Constructor for class org.apache.lucene.util.NumericUtils.LongRangeBuilder

numFiles - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
Number of files referenced by this segment.
numHits() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask
Specify the number of hits to retrieve.
numNodes() - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Returns the total number of nodes in the trie.
numNodes(JaspellTernarySearchTrie.TSTNode) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Returns the total number of nodes in the subtrie below and including the starting Node.
numRamDocs() - Method in class org.apache.lucene.index.IndexWriter
Expert: Return the number of documents currently buffered in RAM.
numSegments - Variable in class org.apache.lucene.index.CheckIndex.Status
Number of segments in the index.
numTerms - Static variable in class org.apache.lucene.misc.HighFreqTerms

numToHighlight() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask
Set to the number of documents to highlight.
numToHighlight - Variable in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

numToHighlight() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

numToHighlight - Variable in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask

numToHighlight() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask

O

ObjectToFloatMap<K> - Class in org.apache.lucene.util.collections
An Array-based hashtable which maps Objects of generic type T to primitive float values.
The hashtable is constructed with a given capacity, or 16 as a default.
ObjectToFloatMap() - Constructor for class org.apache.lucene.util.collections.ObjectToFloatMap
Constructs a map with default capacity.
ObjectToFloatMap(int) - Constructor for class org.apache.lucene.util.collections.ObjectToFloatMap
Constructs a map with given capacity.
ObjectToIntMap<K> - Class in org.apache.lucene.util.collections
An Array-based hashtable which maps Objects of generic type T to primitive int values.
The hashtable is constructed with a given capacity, or 16 as a default.
ObjectToIntMap() - Constructor for class org.apache.lucene.util.collections.ObjectToIntMap
Constructs a map with default capacity.
ObjectToIntMap(int) - Constructor for class org.apache.lucene.util.collections.ObjectToIntMap
Constructs a map with given capacity.
obtain() - Method in class org.apache.lucene.store.Lock
Attempts to obtain exclusive access and immediately return upon success or failure.
obtain(long) - Method in class org.apache.lucene.store.Lock
Attempts to obtain an exclusive lock within amount of time given.
offset - Variable in class org.apache.lucene.index.Payload
the offset within the byte array
offset - Variable in class org.apache.lucene.util.BytesRef
Offset of first valid byte.
offset - Variable in class org.apache.lucene.util.CharsRef

offset - Variable in class org.apache.lucene.util.IntsRef

offsetAtt - Variable in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

offsetAtt - Variable in class org.apache.lucene.analysis.LookaheadTokenFilter

OffsetAttribute - Interface in org.apache.lucene.analysis.tokenattributes
The start and end character offset of a Token.
OffsetAttributeImpl - Class in org.apache.lucene.analysis.tokenattributes
The start and end character offset of a Token.
OffsetAttributeImpl() - Constructor for class org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl

OffsetLimitTokenFilter - Class in org.apache.lucene.search.highlight
This TokenFilter limits the number of tokens while indexing by adding up the current offset.
OffsetLimitTokenFilter(TokenStream, int) - Constructor for class org.apache.lucene.search.highlight.OffsetLimitTokenFilter

offsets - Variable in class org.apache.lucene.util.UnicodeUtil.UTF16Result

omitNorms - Variable in class org.apache.lucene.document.AbstractField

omitNorms() - Method in enum org.apache.lucene.document.Field.Index

omitNorms - Variable in class org.apache.lucene.index.FieldInfo

onClose(IndexReader) - Method in interface org.apache.lucene.index.IndexReader.ReaderClosedListener

onClose(SegmentReader) - Method in interface org.apache.lucene.index.SegmentReader.CoreClosedListener

onCommit(List<? extends IndexCommit>) - Method in interface org.apache.lucene.index.IndexDeletionPolicy
This is called each time the writer completed a commit.
onCommit(List<? extends IndexCommit>) - Method in class org.apache.lucene.index.KeepOnlyLastCommitDeletionPolicy
Deletes all commits except the most recent one.
onCommit(List<? extends IndexCommit>) - Method in class org.apache.lucene.index.NoDeletionPolicy

onCommit(List<? extends IndexCommit>) - Method in class org.apache.lucene.index.SnapshotDeletionPolicy

ONE_GB - Static variable in class org.apache.lucene.util.RamUsageEstimator
One gigabyte bytes.
ONE_KB - Static variable in class org.apache.lucene.util.RamUsageEstimator
One kilobyte bytes.
ONE_MB - Static variable in class org.apache.lucene.util.RamUsageEstimator
One megabyte bytes.
onIndexOutputClosed(FSDirectory.FSIndexOutput) - Method in class org.apache.lucene.store.FSDirectory

onInit(List<? extends IndexCommit>) - Method in interface org.apache.lucene.index.IndexDeletionPolicy
This is called once when a writer is first instantiated to give the policy a chance to remove old commit points.
onInit(List<? extends IndexCommit>) - Method in class org.apache.lucene.index.KeepOnlyLastCommitDeletionPolicy
Deletes all commits except the most recent one.
onInit(List<? extends IndexCommit>) - Method in class org.apache.lucene.index.NoDeletionPolicy

onInit(List<? extends IndexCommit>) - Method in class org.apache.lucene.index.PersistentSnapshotDeletionPolicy

onInit(List<? extends IndexCommit>) - Method in class org.apache.lucene.index.SnapshotDeletionPolicy

onlyLongestMatch - Variable in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

onOrAfter(Version) - Method in enum org.apache.lucene.util.Version

OP - Static variable in class org.apache.lucene.benchmark.byTask.tasks.ReportTask
Get a textual summary of the benchmark results, average from all test runs.
OpaqueQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A OpaqueQueryNode is used for specify values that are not supposed to be parsed by the parser.
OpaqueQueryNode(CharSequence, CharSequence) - Constructor for class org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode

open(Directory) - Static method in class org.apache.lucene.index.IndexReader
Returns a IndexReader reading the index in the given Directory, with readOnly=true.
open(Directory, boolean) - Static method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(Directory) instead
open(IndexWriter, boolean) - Static method in class org.apache.lucene.index.IndexReader
Open a near real time IndexReader from the IndexWriter.
open(IndexCommit) - Static method in class org.apache.lucene.index.IndexReader
Expert: returns an IndexReader reading the index in the given IndexCommit.
open(IndexCommit, boolean) - Static method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(IndexCommit) instead
open(Directory, IndexDeletionPolicy, boolean) - Static method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(Directory) instead
open(Directory, IndexDeletionPolicy, boolean, int) - Static method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(Directory,int) instead
open(IndexCommit, IndexDeletionPolicy, boolean) - Static method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(IndexCommit) instead
open(IndexCommit, IndexDeletionPolicy, boolean, int) - Static method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(IndexCommit,int) instead
open(Directory, int) - Static method in class org.apache.lucene.index.IndexReader
Expert: Returns a IndexReader reading the index in the given Director and given termInfosIndexDivisor
open(IndexCommit, int) - Static method in class org.apache.lucene.index.IndexReader
Expert: returns an IndexReader reading the index in the given IndexCommit and termInfosIndexDivisor.
open(File) - Static method in class org.apache.lucene.store.FSDirectory
Creates an FSDirectory instance, trying to pick the best implementation given the current environment.
open(File, LockFactory) - Static method in class org.apache.lucene.store.FSDirectory
Just like FSDirectory.open(File), but allows you to also specify a custom LockFactory.
open_direct(String, boolean) - Static method in class org.apache.lucene.store.NativePosixUtil

OpenBitSet - Class in org.apache.lucene.util
An "open" BitSet implementation that allows direct access to the array of words storing the bits.
OpenBitSet(long) - Constructor for class org.apache.lucene.util.OpenBitSet
Constructs an OpenBitSet large enough to hold numBits.
OpenBitSet() - Constructor for class org.apache.lucene.util.OpenBitSet

OpenBitSet(long[], int) - Constructor for class org.apache.lucene.util.OpenBitSet
Constructs an OpenBitSet from an existing long[].
OpenBitSetDISI - Class in org.apache.lucene.util
OpenBitSet with added methods to bulk-update the bits from a DocIdSetIterator.
OpenBitSetDISI(DocIdSetIterator, int) - Constructor for class org.apache.lucene.util.OpenBitSetDISI
Construct an OpenBitSetDISI with its bits set from the doc ids of the given DocIdSetIterator.
OpenBitSetDISI(int) - Constructor for class org.apache.lucene.util.OpenBitSetDISI
Construct an OpenBitSetDISI with no bits set, and a given maximum size one larger than the largest doc id for which a bit may ever be set on this OpenBitSetDISI.
OpenBitSetIterator - Class in org.apache.lucene.util
An iterator to iterate over set bits in an OpenBitSet.
OpenBitSetIterator(OpenBitSet) - Constructor for class org.apache.lucene.util.OpenBitSetIterator

OpenBitSetIterator(long[], int) - Constructor for class org.apache.lucene.util.OpenBitSetIterator

openIfChanged(IndexReader) - Static method in class org.apache.lucene.index.IndexReader
If the index has changed since the provided reader was opened, open and return a new reader; else, return null.
openIfChanged(IndexReader, boolean) - Static method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.openIfChanged(IndexReader) instead
openIfChanged(IndexReader, IndexCommit) - Static method in class org.apache.lucene.index.IndexReader
If the IndexCommit differs from what the provided reader is searching, or the provided reader is not already read-only, open and return a new readOnly=true reader; else, return null.
openIfChanged(IndexReader, IndexWriter, boolean) - Static method in class org.apache.lucene.index.IndexReader
Expert: If there changes (committed or not) in the IndexWriter versus what the provided reader is searching, then open and return a new read-only IndexReader searching both committed and uncommitted changes from the writer; else, return null (though, the current implementation never returns null).
openIndexReader(Directory) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader

OpenIndexTask - Class in org.apache.lucene.benchmark.byTask.tasks
Open an index writer.
OpenIndexTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask

openIndexWriter(Directory, IndexWriterConfig) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Open internal index writer, which contains the taxonomy data.
openInput(String, int) - Method in class org.apache.lucene.store.DirectIOLinuxDirectory

openInput(String) - Method in class org.apache.lucene.store.Directory
Returns a stream reading an existing file.
openInput(String, int) - Method in class org.apache.lucene.store.Directory
Returns a stream reading an existing file, with the specified read buffer size.
openInput(String) - Method in class org.apache.lucene.store.FileSwitchDirectory

openInput(String) - Method in class org.apache.lucene.store.FSDirectory

openInput(String, int) - Method in class org.apache.lucene.store.MMapDirectory
Creates an IndexInput for the file with the given name.
openInput(String) - Method in class org.apache.lucene.store.MockDirectoryWrapper

openInput(String, int) - Method in class org.apache.lucene.store.NIOFSDirectory
Creates an IndexInput for the file with the given name.
openInput(String) - Method in class org.apache.lucene.store.NRTCachingDirectory

openInput(String, int) - Method in class org.apache.lucene.store.NRTCachingDirectory

openInput(String) - Method in class org.apache.lucene.store.RAMDirectory
Returns a stream reading an existing file.
openInput(String, int) - Method in class org.apache.lucene.store.SimpleFSDirectory
Creates an IndexInput for the file with the given name.
openInput(String, int) - Method in class org.apache.lucene.store.WindowsDirectory

openReader() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Open an IndexReader from the internal IndexWriter, by calling IndexReader.open(IndexWriter, boolean).
openReaderPassed - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
True if we were able to open a SegmentReader on this segment.
OpenReaderTask - Class in org.apache.lucene.benchmark.byTask.tasks
Open an index reader.
OpenReaderTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.OpenReaderTask

OpenStringBuilder - Class in org.apache.lucene.analysis.util
A StringBuilder that allows one to access the array.
OpenStringBuilder() - Constructor for class org.apache.lucene.analysis.util.OpenStringBuilder

OpenStringBuilder(int) - Constructor for class org.apache.lucene.analysis.util.OpenStringBuilder

OpenStringBuilder(char[], int) - Constructor for class org.apache.lucene.analysis.util.OpenStringBuilder

OpenTaxonomyIndexTask - Class in org.apache.lucene.benchmark.byTask.tasks
Open a taxonomy index.
OpenTaxonomyIndexTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyIndexTask

OpenTaxonomyReaderTask - Class in org.apache.lucene.benchmark.byTask.tasks
Open a taxonomy index reader.
OpenTaxonomyReaderTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyReaderTask

optimize() - Method in class org.apache.lucene.index.IndexWriter
Deprecated.
optimize(int) - Method in class org.apache.lucene.index.IndexWriter
Deprecated.
optimize(boolean) - Method in class org.apache.lucene.index.IndexWriter
Deprecated.
optimize(Trie) - Method in class org.egothor.stemmer.Gener
Return a Trie with infrequent values occurring in the given Trie removed.
optimize(Trie) - Method in class org.egothor.stemmer.Lift
Optimize (eliminate rows with no content) the given Trie and return the reduced Trie.
optimize(Trie) - Method in class org.egothor.stemmer.Optimizer
Optimize (remove empty rows) from the given Trie and return the resulting Trie.
optimize(Trie) - Method in class org.egothor.stemmer.Reduce
Optimize (remove holes in the rows) the given Trie and return the restructured Trie.
Optimizer - Class in org.egothor.stemmer
The Optimizer class is a Trie that will be reduced (have empty rows removed).
Optimizer() - Constructor for class org.egothor.stemmer.Optimizer
Constructor for the Optimizer object.
Optimizer2 - Class in org.egothor.stemmer
The Optimizer class is a Trie that will be reduced (have empty rows removed).
Optimizer2() - Constructor for class org.egothor.stemmer.Optimizer2
Constructor for the Optimizer2 object.
OptionalFields() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

OptionalWeights(SrndQuery) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

OR - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
OR - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
OR - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
OR - Static variable in class org.apache.lucene.search.ChainedFilter

or(DocIdSetIterator) - Method in class org.apache.lucene.util.FixedBitSet
Does in-place OR of the bits provided by the iterator.
or(FixedBitSet) - Method in class org.apache.lucene.util.FixedBitSet
this = this OR other
or(OpenBitSet) - Method in class org.apache.lucene.util.OpenBitSet

OR_OPERATOR - Static variable in class org.apache.lucene.queryParser.QueryParser
Alternative form of QueryParser.Operator.OR
OR_OPERATOR - Static variable in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated. Alternative form of QueryParser.Operator.OR
order - Variable in class org.apache.lucene.search.FieldCache.StringIndex
For each document, an index into the lookup array.
OrdFieldSource - Class in org.apache.lucene.search.function
Expert: obtains the ordinal of the field value from the default Lucene Fieldcache using getStringIndex().
OrdFieldSource(String) - Constructor for class org.apache.lucene.search.function.OrdFieldSource
Constructor for a certain field.
ordinal - Variable in class org.apache.lucene.facet.index.attributes.OrdinalProperty

ordinal - Variable in class org.apache.lucene.util.encoding.ChunksIntEncoder
Counts the current ordinal of the encoded value.
OrdinalPolicy - Interface in org.apache.lucene.facet.index.categorypolicy
Filtering category ordinals in CategoryParentsStream, where a given category ordinal is added to the stream, and than its parents are being added one after the other using TaxonomyWriter.getParent(int).
OrdinalProperty - Class in org.apache.lucene.facet.index.attributes
A CategoryProperty holding the ordinal from the taxonomy of the current category in CategoryAttribute.
OrdinalProperty() - Constructor for class org.apache.lucene.facet.index.attributes.OrdinalProperty

ordinalProperty - Variable in class org.apache.lucene.facet.index.streaming.CategoryParentsStream
A category property containing the category ordinal
org.apache.lucene - package org.apache.lucene
Top-level package.
org.apache.lucene.analysis - package org.apache.lucene.analysis
API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ar - package org.apache.lucene.analysis.ar
Analyzer for Arabic.
org.apache.lucene.analysis.bg - package org.apache.lucene.analysis.bg
Analyzer for Bulgarian.
org.apache.lucene.analysis.br - package org.apache.lucene.analysis.br
Analyzer for Brazilian Portuguese.
org.apache.lucene.analysis.ca - package org.apache.lucene.analysis.ca
Analyzer for Catalan.
org.apache.lucene.analysis.charfilter - package org.apache.lucene.analysis.charfilter
CharFilters: process text before the Tokenizer
org.apache.lucene.analysis.cjk - package org.apache.lucene.analysis.cjk
Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).
org.apache.lucene.analysis.cn - package org.apache.lucene.analysis.cn
Analyzer for Chinese, which indexes unigrams (individual chinese characters).
org.apache.lucene.analysis.cn.smart - package org.apache.lucene.analysis.cn.smart

Analyzer for Simplified Chinese, which indexes words.
org.apache.lucene.analysis.cn.smart.hhmm - package org.apache.lucene.analysis.cn.smart.hhmm

SmartChineseAnalyzer Hidden Markov Model package.
org.apache.lucene.analysis.compound - package org.apache.lucene.analysis.compound
A filter that decomposes compound words you find in many Germanic languages into the word parts.
org.apache.lucene.analysis.compound.hyphenation - package org.apache.lucene.analysis.compound.hyphenation
The code for the compound word hyphenation is taken from the Apache FOP project.
org.apache.lucene.analysis.cz - package org.apache.lucene.analysis.cz
Analyzer for Czech.
org.apache.lucene.analysis.da - package org.apache.lucene.analysis.da
Analyzer for Danish.
org.apache.lucene.analysis.de - package org.apache.lucene.analysis.de
Analyzer for German.
org.apache.lucene.analysis.el - package org.apache.lucene.analysis.el
Analyzer for Greek.
org.apache.lucene.analysis.en - package org.apache.lucene.analysis.en
Analyzer for English.
org.apache.lucene.analysis.es - package org.apache.lucene.analysis.es
Analyzer for Spanish.
org.apache.lucene.analysis.eu - package org.apache.lucene.analysis.eu
Analyzer for Basque.
org.apache.lucene.analysis.fa - package org.apache.lucene.analysis.fa
Analyzer for Persian.
org.apache.lucene.analysis.fi - package org.apache.lucene.analysis.fi
Analyzer for Finnish.
org.apache.lucene.analysis.fr - package org.apache.lucene.analysis.fr
Analyzer for French.
org.apache.lucene.analysis.ga - package org.apache.lucene.analysis.ga
Analysis for Irish.
org.apache.lucene.analysis.gl - package org.apache.lucene.analysis.gl
Analyzer for Galician.
org.apache.lucene.analysis.hi - package org.apache.lucene.analysis.hi
Analyzer for Hindi.
org.apache.lucene.analysis.hu - package org.apache.lucene.analysis.hu
Analyzer for Hungarian.
org.apache.lucene.analysis.hunspell - package org.apache.lucene.analysis.hunspell
Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.
org.apache.lucene.analysis.hy - package org.apache.lucene.analysis.hy
Analyzer for Armenian.
org.apache.lucene.analysis.icu - package org.apache.lucene.analysis.icu
Analysis components based on ICU
org.apache.lucene.analysis.icu.segmentation - package org.apache.lucene.analysis.icu.segmentation
Tokenizer that breaks text into words with the Unicode Text Segmentation algorithm.
org.apache.lucene.analysis.icu.tokenattributes - package org.apache.lucene.analysis.icu.tokenattributes
Additional ICU-specific Attributes for text analysis.
org.apache.lucene.analysis.id - package org.apache.lucene.analysis.id
Analyzer for Indonesian.
org.apache.lucene.analysis.in - package org.apache.lucene.analysis.in
Analysis components for Indian languages.
org.apache.lucene.analysis.it - package org.apache.lucene.analysis.it
Analyzer for Italian.
org.apache.lucene.analysis.ja - package org.apache.lucene.analysis.ja
Analyzer for Japanese.
org.apache.lucene.analysis.ja.dict - package org.apache.lucene.analysis.ja.dict
Kuromoji dictionary implementation.
org.apache.lucene.analysis.ja.tokenattributes - package org.apache.lucene.analysis.ja.tokenattributes
Additional Kuromoji-specific Attributes for text analysis.
org.apache.lucene.analysis.ja.util - package org.apache.lucene.analysis.ja.util
Kuromoji utility classes.
org.apache.lucene.analysis.lv - package org.apache.lucene.analysis.lv
Analyzer for Latvian.
org.apache.lucene.analysis.miscellaneous - package org.apache.lucene.analysis.miscellaneous
Miscellaneous TokenStreams
org.apache.lucene.analysis.ngram - package org.apache.lucene.analysis.ngram
Character n-gram tokenizers and filters.
org.apache.lucene.analysis.nl - package org.apache.lucene.analysis.nl
Analyzer for Dutch.
org.apache.lucene.analysis.no - package org.apache.lucene.analysis.no
Analyzer for Norwegian.
org.apache.lucene.analysis.path - package org.apache.lucene.analysis.path
Analysis components for path-like strings such as filenames.
org.apache.lucene.analysis.payloads - package org.apache.lucene.analysis.payloads

Provides various convenience classes for creating payloads on Tokens.
org.apache.lucene.analysis.phonetic - package org.apache.lucene.analysis.phonetic
Analysis components for phonetic search.
org.apache.lucene.analysis.pl - package org.apache.lucene.analysis.pl
Analyzer for Polish.
org.apache.lucene.analysis.position - package org.apache.lucene.analysis.position
Filter for assigning position increments.
org.apache.lucene.analysis.pt - package org.apache.lucene.analysis.pt
Analyzer for Portuguese.
org.apache.lucene.analysis.query - package org.apache.lucene.analysis.query
Automatically filter high-frequency stopwords.
org.apache.lucene.analysis.reverse - package org.apache.lucene.analysis.reverse
Filter to reverse token text.
org.apache.lucene.analysis.ro - package org.apache.lucene.analysis.ro
Analyzer for Romanian.
org.apache.lucene.analysis.ru - package org.apache.lucene.analysis.ru
Analyzer for Russian.
org.apache.lucene.analysis.shingle - package org.apache.lucene.analysis.shingle
Word n-gram filters
org.apache.lucene.analysis.sinks - package org.apache.lucene.analysis.sinks

Implementations of the SinkTokenizer that might be useful.
org.apache.lucene.analysis.snowball - package org.apache.lucene.analysis.snowball
TokenFilter and Analyzer implementations that use Snowball stemmers.
org.apache.lucene.analysis.standard - package org.apache.lucene.analysis.standard
Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.standard.std31 - package org.apache.lucene.analysis.standard.std31
Backwards-compatible implementation to match Version.LUCENE_31
org.apache.lucene.analysis.standard.std34 - package org.apache.lucene.analysis.standard.std34
Backwards-compatible implementation to match Version.LUCENE_34
org.apache.lucene.analysis.stempel - package org.apache.lucene.analysis.stempel
Stempel: Algorithmic Stemmer
org.apache.lucene.analysis.sv - package org.apache.lucene.analysis.sv
Analyzer for Swedish.
org.apache.lucene.analysis.synonym - package org.apache.lucene.analysis.synonym
Analysis components for Synonyms.
org.apache.lucene.analysis.th - package org.apache.lucene.analysis.th
Analyzer for Thai.
org.apache.lucene.analysis.tokenattributes - package org.apache.lucene.analysis.tokenattributes
Useful Attributes for text analysis.
org.apache.lucene.analysis.tr - package org.apache.lucene.analysis.tr
Analyzer for Turkish.
org.apache.lucene.analysis.util - package org.apache.lucene.analysis.util
Utility functions for text analysis.
org.apache.lucene.analysis.wikipedia - package org.apache.lucene.analysis.wikipedia
Tokenizer that is aware of Wikipedia syntax.
org.apache.lucene.benchmark - package org.apache.lucene.benchmark

The benchmark contribution contains tools for benchmarking Lucene using standard, freely available corpora.
org.apache.lucene.benchmark.byTask - package org.apache.lucene.benchmark.byTask

Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.feeds - package org.apache.lucene.benchmark.byTask.feeds
Sources for benchmark inputs: documents and queries.
org.apache.lucene.benchmark.byTask.feeds.demohtml - package org.apache.lucene.benchmark.byTask.feeds.demohtml
Example html parser based on JavaCC
org.apache.lucene.benchmark.byTask.programmatic - package org.apache.lucene.benchmark.byTask.programmatic
Sample performance test written programmatically - no algorithm file is needed here.
org.apache.lucene.benchmark.byTask.stats - package org.apache.lucene.benchmark.byTask.stats
Statistics maintained when running benchmark tasks.
org.apache.lucene.benchmark.byTask.tasks - package org.apache.lucene.benchmark.byTask.tasks
Extendable benchmark tasks.
org.apache.lucene.benchmark.byTask.utils - package org.apache.lucene.benchmark.byTask.utils
Utilities used for the benchmark, and for the reports.
org.apache.lucene.benchmark.quality - package org.apache.lucene.benchmark.quality
Search Quality Benchmarking.
org.apache.lucene.benchmark.quality.trec - package org.apache.lucene.benchmark.quality.trec
Utilities for Trec related quality benchmarking, feeding from Trec Topics and QRels inputs.
org.apache.lucene.benchmark.quality.utils - package org.apache.lucene.benchmark.quality.utils
Miscellaneous utilities for search quality benchmarking: query parsing, submission reports.
org.apache.lucene.benchmark.utils - package org.apache.lucene.benchmark.utils
Benchmark Utility functions.
org.apache.lucene.collation - package org.apache.lucene.collation
CollationKeyFilter converts each token into its binary CollationKey using the provided Collator, and then encode the CollationKey as a String using IndexableBinaryStringTools, to allow it to be stored as an index term.
org.apache.lucene.demo - package org.apache.lucene.demo
Demo applications for indexing and searching.
org.apache.lucene.document - package org.apache.lucene.document
The logical representation of a Document for indexing and searching.
org.apache.lucene.facet - package org.apache.lucene.facet
Provides faceted indexing and search capabilities.
org.apache.lucene.facet.enhancements - package org.apache.lucene.facet.enhancements
Enhanced category features
org.apache.lucene.facet.enhancements.association - package org.apache.lucene.facet.enhancements.association
Association category enhancements
org.apache.lucene.facet.enhancements.params - package org.apache.lucene.facet.enhancements.params
Enhanced category features
org.apache.lucene.facet.index - package org.apache.lucene.facet.index
Indexing of document categories
org.apache.lucene.facet.index.attributes - package org.apache.lucene.facet.index.attributes
Category attributes and their properties for indexing
org.apache.lucene.facet.index.categorypolicy - package org.apache.lucene.facet.index.categorypolicy
Policies for indexing categories
org.apache.lucene.facet.index.params - package org.apache.lucene.facet.index.params
Indexing-time specifications for handling facets
org.apache.lucene.facet.index.streaming - package org.apache.lucene.facet.index.streaming
Expert: attributes streaming definition for indexing facets
org.apache.lucene.facet.search - package org.apache.lucene.facet.search
Faceted Search API
org.apache.lucene.facet.search.aggregator - package org.apache.lucene.facet.search.aggregator
Aggregating Facets during Faceted Search
org.apache.lucene.facet.search.aggregator.association - package org.apache.lucene.facet.search.aggregator.association
Association-based aggregators.
org.apache.lucene.facet.search.cache - package org.apache.lucene.facet.search.cache
Caching to speed up facets accumulation.
org.apache.lucene.facet.search.params - package org.apache.lucene.facet.search.params
Parameters for Faceted Search
org.apache.lucene.facet.search.params.association - package org.apache.lucene.facet.search.params.association
Association-based Parameters for Faceted Search.
org.apache.lucene.facet.search.results - package org.apache.lucene.facet.search.results
Results of Faceted Search
org.apache.lucene.facet.search.sampling - package org.apache.lucene.facet.search.sampling
Sampling for facets accumulation
org.apache.lucene.facet.taxonomy - package org.apache.lucene.facet.taxonomy
Taxonomy of Categories
org.apache.lucene.facet.taxonomy.directory - package org.apache.lucene.facet.taxonomy.directory
Taxonomy implemented using a Lucene-Index
org.apache.lucene.facet.taxonomy.writercache - package org.apache.lucene.facet.taxonomy.writercache
Improves indexing time by caching a map of CategoryPath to their Ordinal
org.apache.lucene.facet.taxonomy.writercache.cl2o - package org.apache.lucene.facet.taxonomy.writercache.cl2o
Category->Ordinal caching implementation using an optimized data-structures
org.apache.lucene.facet.taxonomy.writercache.lru - package org.apache.lucene.facet.taxonomy.writercache.lru
An LRU cache implementation for the CategoryPath to Ordinal map
org.apache.lucene.facet.util - package org.apache.lucene.facet.util
Various utilities for faceted search
org.apache.lucene.index - package org.apache.lucene.index
Code to maintain and access indices.
org.apache.lucene.index.memory - package org.apache.lucene.index.memory
High-performance single-document main memory Apache Lucene fulltext search index.
org.apache.lucene.index.pruning - package org.apache.lucene.index.pruning

Static Index Pruning Tools
org.apache.lucene.messages - package org.apache.lucene.messages
For Native Language Support (NLS), system of software internationalization.
org.apache.lucene.misc - package org.apache.lucene.misc
Miscellaneous index tools.
org.apache.lucene.queryParser - package org.apache.lucene.queryParser
A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.analyzing - package org.apache.lucene.queryParser.analyzing
QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.
org.apache.lucene.queryParser.complexPhrase - package org.apache.lucene.queryParser.complexPhrase
QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
org.apache.lucene.queryParser.core - package org.apache.lucene.queryParser.core
Contains the core classes of the flexible query parser framework
org.apache.lucene.queryParser.core.builders - package org.apache.lucene.queryParser.core.builders
Contains the necessary classes to implement query builders
org.apache.lucene.queryParser.core.config - package org.apache.lucene.queryParser.core.config
Contains the base classes used to configure the query processing
org.apache.lucene.queryParser.core.messages - package org.apache.lucene.queryParser.core.messages
Contains messages usually used by query parser implementations
org.apache.lucene.queryParser.core.nodes - package org.apache.lucene.queryParser.core.nodes
Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.core.parser - package org.apache.lucene.queryParser.core.parser
Contains the necessary interfaces to implement text parsers
org.apache.lucene.queryParser.core.processors - package org.apache.lucene.queryParser.core.processors
Interfaces and implementations used by query node processors
org.apache.lucene.queryParser.core.util - package org.apache.lucene.queryParser.core.util
Utility classes to used with the Query Parser
org.apache.lucene.queryParser.ext - package org.apache.lucene.queryParser.ext
Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.
org.apache.lucene.queryParser.precedence - package org.apache.lucene.queryParser.precedence
This package contains the Precedence Query Parser Implementation
org.apache.lucene.queryParser.precedence.processors - package org.apache.lucene.queryParser.precedence.processors
This package contains the processors used by Precedence Query Parser
org.apache.lucene.queryParser.standard - package org.apache.lucene.queryParser.standard
Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.builders - package org.apache.lucene.queryParser.standard.builders
Standard Lucene Query Node Builders
org.apache.lucene.queryParser.standard.config - package org.apache.lucene.queryParser.standard.config
Standard Lucene Query Configuration
org.apache.lucene.queryParser.standard.nodes - package org.apache.lucene.queryParser.standard.nodes
Standard Lucene Query Nodes
org.apache.lucene.queryParser.standard.parser - package org.apache.lucene.queryParser.standard.parser
Lucene Query Parser
org.apache.lucene.queryParser.standard.processors - package org.apache.lucene.queryParser.standard.processors
Lucene Query Node Processors
org.apache.lucene.queryParser.surround.parser - package org.apache.lucene.queryParser.surround.parser
This package contains the QueryParser.jj source file for the Surround parser.
org.apache.lucene.queryParser.surround.query - package org.apache.lucene.queryParser.surround.query
This package contains SrndQuery and its subclasses.
org.apache.lucene.search - package org.apache.lucene.search
Code to search indices.
org.apache.lucene.search.function - package org.apache.lucene.search.function

Programmatic control over documents scores.
org.apache.lucene.search.grouping - package org.apache.lucene.search.grouping
This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.
org.apache.lucene.search.highlight - package org.apache.lucene.search.highlight
The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.search.join - package org.apache.lucene.search.join
This modules support index-time and query-time joins.
org.apache.lucene.search.payloads - package org.apache.lucene.search.payloads

The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.regex - package org.apache.lucene.search.regex
Regular expression Query.
org.apache.lucene.search.similar - package org.apache.lucene.search.similar
Document similarity query generators.
org.apache.lucene.search.spans - package org.apache.lucene.search.spans
The calculus of spans.
org.apache.lucene.search.spell - package org.apache.lucene.search.spell
Suggest alternate spellings for words.
org.apache.lucene.search.suggest - package org.apache.lucene.search.suggest
Support for Autocomplete/Autosuggest
org.apache.lucene.search.suggest.fst - package org.apache.lucene.search.suggest.fst
Finite-state based autosuggest.
org.apache.lucene.search.suggest.jaspell - package org.apache.lucene.search.suggest.jaspell
JaSpell-based autosuggest.
org.apache.lucene.search.suggest.tst - package org.apache.lucene.search.suggest.tst
Ternary Search Tree based autosuggest.
org.apache.lucene.search.vectorhighlight - package org.apache.lucene.search.vectorhighlight
This is an another highlighter implementation.
org.apache.lucene.spatial - package org.apache.lucene.spatial
Support for geospatial search.
org.apache.lucene.spatial.geohash - package org.apache.lucene.spatial.geohash
Support for Geohash encoding, decoding, and filtering.
org.apache.lucene.spatial.geometry - package org.apache.lucene.spatial.geometry
Coordinate and distance representations.
org.apache.lucene.spatial.geometry.shape - package org.apache.lucene.spatial.geometry.shape
Shape representations.
org.apache.lucene.spatial.tier - package org.apache.lucene.spatial.tier
Support for filtering based upon geographic location.
org.apache.lucene.spatial.tier.projections - package org.apache.lucene.spatial.tier.projections
Spatial projections.
org.apache.lucene.store - package org.apache.lucene.store
Binary i/o API, used for all index data.
org.apache.lucene.store.instantiated - package org.apache.lucene.store.instantiated
InstantiatedIndex, alternative RAM store for small corpora.
org.apache.lucene.util - package org.apache.lucene.util
Some utility classes.
org.apache.lucene.util.collections - package org.apache.lucene.util.collections
Various optimized Collections implementations.
org.apache.lucene.util.encoding - package org.apache.lucene.util.encoding
Offers various encoders and decoders for integers, as well as the mechanisms to create new ones.
org.apache.lucene.util.fst - package org.apache.lucene.util.fst
Finite state transducers
org.apache.lucene.util.packed - package org.apache.lucene.util.packed
The packed package provides random access capable arrays of positive longs.
org.apache.lucene.xmlparser - package org.apache.lucene.xmlparser
Parser that produces Lucene Query objects from XML streams.
org.apache.lucene.xmlparser.builders - package org.apache.lucene.xmlparser.builders
Builders to support various Lucene queries.
org.egothor.stemmer - package org.egothor.stemmer
Egothor stemmer API.
org.tartarus.snowball - package org.tartarus.snowball
Snowball stemmer API.
org.tartarus.snowball.ext - package org.tartarus.snowball.ext
Autogenerated snowball stemmer implementations.
OrQuery() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

OrQuery - Class in org.apache.lucene.queryParser.surround.query

OrQuery(List<SrndQuery>, boolean, String) - Constructor for class org.apache.lucene.queryParser.surround.query.OrQuery

OrQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A OrQueryNode represents an OR boolean operation performed on a list of nodes.
OrQueryNode(List<QueryNode>) - Constructor for class org.apache.lucene.queryParser.core.nodes.OrQueryNode

OS_ARCH - Static variable in class org.apache.lucene.util.Constants

OS_NAME - Static variable in class org.apache.lucene.util.Constants
The value of System.getProperty("os.name").
OS_VERSION - Static variable in class org.apache.lucene.util.Constants

OTHER - Static variable in class org.apache.lucene.analysis.cn.smart.CharType
Other (not fitting any of the other categories)
other - Variable in class org.apache.lucene.search.CachingCollector

out - Variable in class org.apache.lucene.analysis.TokenStreamToDot

out - Variable in class org.apache.lucene.util.encoding.IntEncoder

out - Variable in class org.apache.lucene.util.packed.PackedInts.Writer

out_grouping(char[], int, int) - Method in class org.tartarus.snowball.SnowballProgram

out_grouping_b(char[], int, int) - Method in class org.tartarus.snowball.SnowballProgram

out_range(int, int) - Method in class org.tartarus.snowball.SnowballProgram

out_range_b(int, int) - Method in class org.tartarus.snowball.SnowballProgram

output - Variable in class org.apache.lucene.util.fst.Builder.Arc

output - Variable in class org.apache.lucene.util.fst.Builder.UnCompiledNode

output - Variable in class org.apache.lucene.util.fst.BytesRefFSTEnum.InputOutput

output - Variable in class org.apache.lucene.util.fst.FST.Arc

output - Variable in class org.apache.lucene.util.fst.IntsRefFSTEnum.InputOutput

output - Variable in class org.apache.lucene.util.fst.Util.MinResult

output1 - Variable in class org.apache.lucene.util.fst.PairOutputs.Pair

output2 - Variable in class org.apache.lucene.util.fst.PairOutputs.Pair

outputPos - Variable in class org.apache.lucene.analysis.LookaheadTokenFilter

outputs - Variable in class org.apache.lucene.util.fst.FST

Outputs<T> - Class in org.apache.lucene.util.fst
Represents the outputs for an FST, providing the basic algebra required for building and traversing the FST.
Outputs() - Constructor for class org.apache.lucene.util.fst.Outputs

outputStream(File) - Static method in class org.apache.lucene.benchmark.byTask.utils.StreamUtils
Returns an OutputStream over the requested file, identifying the appropriate OutputStream instance similar to StreamUtils.inputStream(File).
OutputStreamDataOutput - Class in org.apache.lucene.store
A DataOutput wrapping a plain OutputStream.
OutputStreamDataOutput(OutputStream) - Constructor for class org.apache.lucene.store.OutputStreamDataOutput

outputToString(BytesRef) - Method in class org.apache.lucene.util.fst.ByteSequenceOutputs

outputToString(IntsRef) - Method in class org.apache.lucene.util.fst.IntSequenceOutputs

outputToString(Object) - Method in class org.apache.lucene.util.fst.NoOutputs

outputToString(T) - Method in class org.apache.lucene.util.fst.Outputs

outputToString(PairOutputs.Pair<A, B>) - Method in class org.apache.lucene.util.fst.PairOutputs

outputToString(Long) - Method in class org.apache.lucene.util.fst.PositiveIntOutputs

outputToString(Object) - Method in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs

overSampledSearchParams(FacetSearchParams) - Method in class org.apache.lucene.facet.search.sampling.Sampler
Over-sampled search params, wrapping each request with an over-sampled one.
oversize(int, int) - Static method in class org.apache.lucene.util.ArrayUtil
Returns an array size >= minTargetSize, generally over-allocating exponentially to achieve amortized linear-time cost as the array grows.

P

pack(int, int) - Method in class org.apache.lucene.util.fst.FST
Expert: creates an FST by packing this one.
packCount - Variable in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

PackedInts - Class in org.apache.lucene.util.packed
Simplistic compression for array of unsigned long values.
PackedInts() - Constructor for class org.apache.lucene.util.packed.PackedInts

PackedInts.Mutable - Interface in org.apache.lucene.util.packed
A packed integer array that can be modified.
PackedInts.Reader - Interface in org.apache.lucene.util.packed
A read-only random access array of positive integers.
PackedInts.ReaderImpl - Class in org.apache.lucene.util.packed
A simple base for Readers that keeps track of valueCount and bitsPerValue.
PackedInts.ReaderImpl(int, int) - Constructor for class org.apache.lucene.util.packed.PackedInts.ReaderImpl

PackedInts.Writer - Class in org.apache.lucene.util.packed
A write-once Writer.
PackedInts.Writer(DataOutput, int, int) - Constructor for class org.apache.lucene.util.packed.PackedInts.Writer

packValues(String) - Method in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree
Packs the values by storing them in 4 bits, two values into a byte Values range is from 0 to 9.
PagedBytes - Class in org.apache.lucene.util
Represents a logical byte[] as a series of pages.
PagedBytes(int) - Constructor for class org.apache.lucene.util.PagedBytes
1<PagedBytes.PagedBytesDataInput - Class in org.apache.lucene.util

PagedBytes.PagedBytesDataOutput - Class in org.apache.lucene.util

PagedBytes.PagedBytesDataOutput() - Constructor for class org.apache.lucene.util.PagedBytes.PagedBytesDataOutput

PagedBytes.Reader - Class in org.apache.lucene.util
Provides methods to read BytesRefs from a frozen PagedBytes.
PagedBytes.Reader(PagedBytes) - Constructor for class org.apache.lucene.util.PagedBytes.Reader

PairOutputs<A,B> - Class in org.apache.lucene.util.fst
An FST Outputs implementation, holding two other outputs.
PairOutputs(Outputs<A>, Outputs<B>) - Constructor for class org.apache.lucene.util.fst.PairOutputs

PairOutputs.Pair<A,B> - Class in org.apache.lucene.util.fst
Holds a single pair of two outputs.
ParallelMultiSearcher - Class in org.apache.lucene.search
Deprecated. Please pass an ExecutorService to IndexSearcher, instead.
ParallelMultiSearcher(Searchable...) - Constructor for class org.apache.lucene.search.ParallelMultiSearcher
Deprecated. Creates a Searchable which searches searchables with the default executor service (a cached thread pool).
ParallelMultiSearcher(ExecutorService, Searchable...) - Constructor for class org.apache.lucene.search.ParallelMultiSearcher
Deprecated. Creates a Searchable which searches searchables with the specified ExecutorService.
ParallelReader - Class in org.apache.lucene.index
An IndexReader which reads multiple, parallel indexes.
ParallelReader() - Constructor for class org.apache.lucene.index.ParallelReader
Construct a ParallelReader.
ParallelReader(boolean) - Constructor for class org.apache.lucene.index.ParallelReader
Construct a ParallelReader.
Parameter - Class in org.apache.lucene.util
Deprecated. Use Java 5 enum, will be removed in a later Lucene 3.x release.
Parameter(String) - Constructor for class org.apache.lucene.util.Parameter
Deprecated.
PARAMETER_VALUE_NOT_SUPPORTED - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

ParametricQueryNode - Class in org.apache.lucene.queryParser.core.nodes
Deprecated. this class will be removed in future. FieldQueryNode should be used instead.
ParametricQueryNode(CharSequence, ParametricQueryNode.CompareOperator, CharSequence, int, int) - Constructor for class org.apache.lucene.queryParser.core.nodes.ParametricQueryNode
Deprecated.
ParametricQueryNode.CompareOperator - Enum in org.apache.lucene.queryParser.core.nodes
Deprecated.
ParametricRangeQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A ParametricRangeQueryNode represents LE, LT, GE, GT, EQ, NE query.
ParametricRangeQueryNode(ParametricQueryNode, ParametricQueryNode) - Constructor for class org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode

ParametricRangeQueryNodeProcessor - Class in org.apache.lucene.queryParser.standard.processors
This processor converts ParametricRangeQueryNode objects to RangeQueryNode objects.
ParametricRangeQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.ParametricRangeQueryNodeProcessor

paramFields - Variable in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

paramFields - Variable in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask

params - Variable in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

PARENT - Static variable in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode
Index values for accessing relatives array.
parse(String) - Method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser
Parses a hyphenation pattern file.
parse(File) - Method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser
Parses a hyphenation pattern file.
parse(InputSource) - Method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser
Parses a hyphenation pattern file.
parse(String) - Static method in class org.apache.lucene.analysis.ja.util.CSVUtil
Parse CSV line
parse(Class<? extends RSLPStemmerBase>, String) - Static method in class org.apache.lucene.analysis.pt.RSLPStemmerBase
Parse a resource file into an RSLP stemmer description.
parse(DocData, String, Date, String, Reader, DateFormat) - Method in class org.apache.lucene.benchmark.byTask.feeds.DemoHTMLParser

parse(DocData, String, Date, String, Reader, DateFormat) - Method in interface org.apache.lucene.benchmark.byTask.feeds.HTMLParser
Parse the input Reader and return DocData.
parse(DocData, String, TrecContentSource, StringBuilder, TrecDocParser.ParsePathType) - Method in class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
parse the text prepared in docBuf into a result DocData, no synchronization is required.
parse(DocData, String, TrecContentSource, StringBuilder, TrecDocParser.ParsePathType) - Method in class org.apache.lucene.benchmark.byTask.feeds.TrecFBISParser

parse(DocData, String, TrecContentSource, StringBuilder, TrecDocParser.ParsePathType) - Method in class org.apache.lucene.benchmark.byTask.feeds.TrecFR94Parser

parse(DocData, String, TrecContentSource, StringBuilder, TrecDocParser.ParsePathType) - Method in class org.apache.lucene.benchmark.byTask.feeds.TrecFTParser

parse(DocData, String, TrecContentSource, StringBuilder, TrecDocParser.ParsePathType) - Method in class org.apache.lucene.benchmark.byTask.feeds.TrecGov2Parser

parse(DocData, String, TrecContentSource, StringBuilder, TrecDocParser.ParsePathType) - Method in class org.apache.lucene.benchmark.byTask.feeds.TrecLATimesParser

parse(DocData, String, TrecContentSource, StringBuilder, TrecDocParser.ParsePathType) - Method in class org.apache.lucene.benchmark.byTask.feeds.TrecParserByPath

parse(QualityQuery) - Method in interface org.apache.lucene.benchmark.quality.QualityQueryParser
Parse a given QualityQuery into a Lucene query.
parse(QualityQuery) - Method in class org.apache.lucene.benchmark.quality.utils.SimpleQQParser

parse(String) - Method in class org.apache.lucene.queryParser.complexPhrase.ComplexPhraseQueryParser

parse(CharSequence, CharSequence) - Method in interface org.apache.lucene.queryParser.core.parser.SyntaxParser

parse(String, String) - Method in class org.apache.lucene.queryParser.core.QueryParserHelper
Parses a query string to an object, usually some query object.
parse(ExtensionQuery) - Method in class org.apache.lucene.queryParser.ext.ParserExtension
Processes the given ExtensionQuery and returns a corresponding Query instance.
parse(Version, String[], String[], Analyzer) - Static method in class org.apache.lucene.queryParser.MultiFieldQueryParser
Parses a query which searches on the fields specified.
parse(Version, String, String[], BooleanClause.Occur[], Analyzer) - Static method in class org.apache.lucene.queryParser.MultiFieldQueryParser
Parses a query, searching on the fields specified.
parse(Version, String[], String[], BooleanClause.Occur[], Analyzer) - Static method in class org.apache.lucene.queryParser.MultiFieldQueryParser
Parses a query, searching on the fields specified.
parse(String) - Method in class org.apache.lucene.queryParser.QueryParser
Parses a query string, returning a Query.
parse(String, ParsePosition) - Method in class org.apache.lucene.queryParser.standard.config.NumberDateFormat

parse(String[], String[], Analyzer) - Static method in class org.apache.lucene.queryParser.standard.MultiFieldQueryParserWrapper
Deprecated. Parses a query which searches on the fields specified.
parse(String, String[], BooleanClause.Occur[], Analyzer) - Static method in class org.apache.lucene.queryParser.standard.MultiFieldQueryParserWrapper
Deprecated. Parses a query, searching on the fields specified.
parse(String[], String[], BooleanClause.Occur[], Analyzer) - Static method in class org.apache.lucene.queryParser.standard.MultiFieldQueryParserWrapper
Deprecated. Parses a query, searching on the fields specified.
parse(CharSequence, CharSequence) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Parses a query string, returning a QueryNode.
parse(String[], String[], Analyzer) - Static method in class org.apache.lucene.queryParser.standard.QueryParserUtil
Parses a query which searches on the fields specified.
parse(String, String[], BooleanClause.Occur[], Analyzer) - Static method in class org.apache.lucene.queryParser.standard.QueryParserUtil
Parses a query, searching on the fields specified.
parse(String[], String[], BooleanClause.Occur[], Analyzer) - Static method in class org.apache.lucene.queryParser.standard.QueryParserUtil
Parses a query, searching on the fields specified.
parse(String) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
parse(String, String) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Overrides QueryParserHelper.parse(String, String) so it casts the return object to Query.
parse(String) - Static method in class org.apache.lucene.queryParser.surround.parser.QueryParser

parse(InputStream) - Method in class org.apache.lucene.xmlparser.CoreParser

parse2(String) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

parseByte(String) - Method in interface org.apache.lucene.search.FieldCache.ByteParser
Return a single Byte representation of this field's value.
parseDate(String) - Method in class org.apache.lucene.benchmark.byTask.feeds.TrecContentSource

parseDouble(String) - Method in interface org.apache.lucene.search.FieldCache.DoubleParser
Return an long representation of this field's value.
ParseException - Exception in org.apache.lucene.benchmark.byTask.feeds.demohtml
This exception is thrown when parse errors are encountered.
ParseException(Token, int[][], String[]) - Constructor for exception org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException
This constructor is used by the method "generateParseException" in the generated parser.
ParseException() - Constructor for exception org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException
The following constructors are for use by you for whatever purpose you can think of.
ParseException(String) - Constructor for exception org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException
Constructor with message.
ParseException - Exception in org.apache.lucene.queryParser
This exception is thrown when parse errors are encountered.
ParseException(Token, int[][], String[]) - Constructor for exception org.apache.lucene.queryParser.ParseException
This constructor is used by the method "generateParseException" in the generated parser.
ParseException() - Constructor for exception org.apache.lucene.queryParser.ParseException
The following constructors are for use by you for whatever purpose you can think of.
ParseException(String) - Constructor for exception org.apache.lucene.queryParser.ParseException
Constructor with message.
ParseException - Exception in org.apache.lucene.queryParser.standard.parser
This exception is thrown when parse errors are encountered.
ParseException(Token, int[][], String[]) - Constructor for exception org.apache.lucene.queryParser.standard.parser.ParseException
This constructor is used by the method "generateParseException" in the generated parser.
ParseException() - Constructor for exception org.apache.lucene.queryParser.standard.parser.ParseException
The following constructors are for use by you for whatever purpose you can think of.
ParseException(Message) - Constructor for exception org.apache.lucene.queryParser.standard.parser.ParseException
Constructor with message.
ParseException - Exception in org.apache.lucene.queryParser.surround.parser
This exception is thrown when parse errors are encountered.
ParseException(Token, int[][], String[]) - Constructor for exception org.apache.lucene.queryParser.surround.parser.ParseException
This constructor is used by the method "generateParseException" in the generated parser.
ParseException() - Constructor for exception org.apache.lucene.queryParser.surround.parser.ParseException
The following constructors are for use by you for whatever purpose you can think of.
ParseException(String) - Constructor for exception org.apache.lucene.queryParser.surround.parser.ParseException
Constructor with message.
parseFloat(String) - Method in interface org.apache.lucene.search.FieldCache.FloatParser
Return an float representation of this field's value.
parseInt(String) - Method in interface org.apache.lucene.search.FieldCache.IntParser
Return an integer representation of this field's value.
parseInt(char[]) - Static method in class org.apache.lucene.util.ArrayUtil
Parses the string argument as if it was an int value and returns the result.
parseInt(char[], int, int) - Static method in class org.apache.lucene.util.ArrayUtil
Parses a char array into an int.
parseInt(char[], int, int, int) - Static method in class org.apache.lucene.util.ArrayUtil
Parses the string argument as if it was an int value and returns the result.
parseLatitudeLongitude(String) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
parseLatitudeLongitude(double[], String) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated. extract (by calling DistanceUtils.parsePoint(String[], String, int) and validate the latitude and longitude contained in the String by making sure the latitude is between 90 & -90 and longitude is between -180 and 180.
parseLine(DocData, String) - Method in class org.apache.lucene.benchmark.byTask.feeds.LineDocSource.HeaderLineParser

parseLine(DocData, String) - Method in class org.apache.lucene.benchmark.byTask.feeds.LineDocSource.LineParser
parse an input line and fill doc data appropriately
parseLine(DocData, String) - Method in class org.apache.lucene.benchmark.byTask.feeds.LineDocSource.SimpleLineParser

parseLong(String) - Method in interface org.apache.lucene.search.FieldCache.LongParser
Return an long representation of this field's value.
parsePoint(String[], String, int) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated. Given a string containing dimension values encoded in it, separated by commas, return a String array of length dimension containing the values.
parsePointDouble(double[], String, int) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated. Given a string containing dimension values encoded in it, separated by commas, return a double array of length dimension containing the values.
parser - Variable in class org.apache.lucene.benchmark.byTask.feeds.LongToEnglishQueryMaker

parser - Variable in class org.apache.lucene.xmlparser.CoreParser

ParserException - Exception in org.apache.lucene.xmlparser

ParserException() - Constructor for exception org.apache.lucene.xmlparser.ParserException

ParserException(String) - Constructor for exception org.apache.lucene.xmlparser.ParserException

ParserException(String, Throwable) - Constructor for exception org.apache.lucene.xmlparser.ParserException

ParserException(Throwable) - Constructor for exception org.apache.lucene.xmlparser.ParserException

ParserExtension - Class in org.apache.lucene.queryParser.ext
This class represents an extension base class to the Lucene standard QueryParser.
ParserExtension() - Constructor for class org.apache.lucene.queryParser.ext.ParserExtension

parseShort(String) - Method in interface org.apache.lucene.search.FieldCache.ShortParser
Return a short representation of this field's value.
partial - Variable in class org.apache.lucene.index.CheckIndex.Status
True if we checked only specific segments (CheckIndex.checkIndex(List)) was called with non-null argument).
partitionName(CategoryListParams, int) - Static method in class org.apache.lucene.facet.util.PartitionsUtils
Partition name by its number
partitionNameByOrdinal(FacetIndexingParams, CategoryListParams, int) - Static method in class org.apache.lucene.facet.util.PartitionsUtils
Partition name by category ordinal
partitionNumber(FacetIndexingParams, int) - Static method in class org.apache.lucene.facet.util.PartitionsUtils
Partition number of an ordinal.
partitionNumber(FacetSearchParams, int) - Static method in class org.apache.lucene.facet.util.PartitionsUtils

partitionOffset(FacetIndexingParams, int, TaxonomyReader) - Static method in class org.apache.lucene.facet.util.PartitionsUtils
Get the offset for a given partition.
partitionOffset(FacetSearchParams, int, TaxonomyReader) - Static method in class org.apache.lucene.facet.util.PartitionsUtils

partitionSize - Variable in class org.apache.lucene.facet.search.StandardFacetsAccumulator

partitionSize(FacetIndexingParams, TaxonomyReader) - Static method in class org.apache.lucene.facet.util.PartitionsUtils
Get the partition size in this parameter, or return the size of the taxonomy, which is smaller.
partitionSize(FacetSearchParams, TaxonomyReader) - Static method in class org.apache.lucene.facet.util.PartitionsUtils

PartitionsUtils - Class in org.apache.lucene.facet.util
Utilities for partitions - sizes and such
PartitionsUtils() - Constructor for class org.apache.lucene.facet.util.PartitionsUtils

PartOfSpeechAttribute - Interface in org.apache.lucene.analysis.ja.tokenattributes
Attribute for Token.getPartOfSpeech().
PartOfSpeechAttributeImpl - Class in org.apache.lucene.analysis.ja.tokenattributes
Attribute for Token.getPartOfSpeech().
PartOfSpeechAttributeImpl() - Constructor for class org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttributeImpl

PathHierarchyTokenizer - Class in org.apache.lucene.analysis.path
Tokenizer for path-like hierarchies.
PathHierarchyTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.path.PathHierarchyTokenizer

PathHierarchyTokenizer(Reader, int) - Constructor for class org.apache.lucene.analysis.path.PathHierarchyTokenizer

PathHierarchyTokenizer(Reader, int, char) - Constructor for class org.apache.lucene.analysis.path.PathHierarchyTokenizer

PathHierarchyTokenizer(Reader, char, char) - Constructor for class org.apache.lucene.analysis.path.PathHierarchyTokenizer

PathHierarchyTokenizer(Reader, char, char, int) - Constructor for class org.apache.lucene.analysis.path.PathHierarchyTokenizer

PathHierarchyTokenizer(Reader, int, char, char, int) - Constructor for class org.apache.lucene.analysis.path.PathHierarchyTokenizer

PathPolicy - Interface in org.apache.lucene.facet.index.categorypolicy
Filtering category paths in CategoryParentsStream, where a given category is added to the stream, and than all its parents are being added one after the other by successively removing the last component.
PathQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A PathQueryNode is used to store queries like /company/USA/California /product/shoes/brown.
PathQueryNode(List<PathQueryNode.QueryText>) - Constructor for class org.apache.lucene.queryParser.core.nodes.PathQueryNode

PathQueryNode.QueryText - Class in org.apache.lucene.queryParser.core.nodes

PathQueryNode.QueryText(CharSequence, int, int) - Constructor for class org.apache.lucene.queryParser.core.nodes.PathQueryNode.QueryText

pathType(File) - Static method in class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
Compute the path type of a file by inspecting name of file and its parents
PatternAnalyzer - Class in org.apache.lucene.analysis.miscellaneous
Efficient Lucene analyzer/tokenizer that preferably operates on a String rather than a Reader, that can flexibly separate text into terms via a regular expression Pattern (with behaviour identical to String.split(String)), and that combines the functionality of LetterTokenizer, LowerCaseTokenizer, WhitespaceTokenizer, StopFilter into a single efficient multi-purpose class.
PatternAnalyzer(Version, Pattern, boolean, Set<?>) - Constructor for class org.apache.lucene.analysis.miscellaneous.PatternAnalyzer
Constructs a new instance with the given parameters.
PatternConsumer - Interface in org.apache.lucene.analysis.compound.hyphenation
This interface is used to connect the XML pattern file parser to the hyphenation tree.
PatternParser - Class in org.apache.lucene.analysis.compound.hyphenation
A SAX document handler to read and parse hyphenation patterns from a XML file.
PatternParser() - Constructor for class org.apache.lucene.analysis.compound.hyphenation.PatternParser

PatternParser(PatternConsumer) - Constructor for class org.apache.lucene.analysis.compound.hyphenation.PatternParser

payload - Variable in class org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
The object used for constructing payloads.
Payload - Class in org.apache.lucene.index
A Payload is metadata that can be stored together with each occurrence of a term.
Payload() - Constructor for class org.apache.lucene.index.Payload
Creates an empty payload and does not allocate a byte array.
Payload(byte[]) - Constructor for class org.apache.lucene.index.Payload
Creates a new payload with the the given array as data.
Payload(byte[], int, int) - Constructor for class org.apache.lucene.index.Payload
Creates a new payload with the the given array as data.
payload - Variable in class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

PayloadAttribute - Interface in org.apache.lucene.analysis.tokenattributes
The payload of a Token.
payloadAttribute - Variable in class org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
The stream's payload attribute.
PayloadAttributeImpl - Class in org.apache.lucene.analysis.tokenattributes
The payload of a Token.
PayloadAttributeImpl() - Constructor for class org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl
Initialize this attribute with no payload.
PayloadAttributeImpl(Payload) - Constructor for class org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl
Initialize this attribute with the given payload.
payloadBytes - Variable in class org.apache.lucene.facet.enhancements.EnhancementsCategoryTokenizer
The data buffer used for payload instance.
PayloadEncoder - Interface in org.apache.lucene.analysis.payloads
Mainly for use with the DelimitedPayloadTokenFilter, converts char buffers to Payload.
PayloadFunction - Class in org.apache.lucene.search.payloads
An abstract class that defines a way for Payload*Query instances to transform the cumulative effects of payload scores for a document.
PayloadFunction() - Constructor for class org.apache.lucene.search.payloads.PayloadFunction

PayloadHelper - Class in org.apache.lucene.analysis.payloads
Utility methods for encoding payloads.
PayloadHelper() - Constructor for class org.apache.lucene.analysis.payloads.PayloadHelper

PayloadIntDecodingIterator - Class in org.apache.lucene.facet.search
A payload deserializer comes with its own working space (buffer).
PayloadIntDecodingIterator(IndexReader, Term, IntDecoder) - Constructor for class org.apache.lucene.facet.search.PayloadIntDecodingIterator

PayloadIntDecodingIterator(IndexReader, Term, IntDecoder, byte[]) - Constructor for class org.apache.lucene.facet.search.PayloadIntDecodingIterator

PayloadIterator - Class in org.apache.lucene.facet.search
A utility class for iterating through a posting list of a given term and retrieving the payload of the first occurrence in every document.
PayloadIterator(IndexReader, Term) - Constructor for class org.apache.lucene.facet.search.PayloadIterator

PayloadIterator(IndexReader, Term, byte[]) - Constructor for class org.apache.lucene.facet.search.PayloadIterator

payloadLength() - Method in class org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsPayloadProcessor

payloadLength - Variable in class org.apache.lucene.facet.search.PayloadIterator

payloadLength() - Method in class org.apache.lucene.index.PayloadProcessorProvider.PayloadProcessor
Returns the length of the payload that was returned by PayloadProcessorProvider.PayloadProcessor.processPayload(byte[], int, int).
PayloadNearQuery - Class in org.apache.lucene.search.payloads
This class is very similar to SpanNearQuery except that it factors in the value of the payloads located at each of the positions where the TermSpans occurs.
PayloadNearQuery(SpanQuery[], int, boolean) - Constructor for class org.apache.lucene.search.payloads.PayloadNearQuery

PayloadNearQuery(SpanQuery[], int, boolean, PayloadFunction) - Constructor for class org.apache.lucene.search.payloads.PayloadNearQuery

PayloadNearQuery.PayloadNearSpanScorer - Class in org.apache.lucene.search.payloads

PayloadNearQuery.PayloadNearSpanScorer(Spans, Weight, Similarity, byte[]) - Constructor for class org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanScorer

PayloadNearQuery.PayloadNearSpanWeight - Class in org.apache.lucene.search.payloads

PayloadNearQuery.PayloadNearSpanWeight(SpanQuery, Searcher) - Constructor for class org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanWeight

PayloadProcessorProvider - Class in org.apache.lucene.index
Provides a PayloadProcessorProvider.ReaderPayloadProcessor to be used for a Directory.
PayloadProcessorProvider() - Constructor for class org.apache.lucene.index.PayloadProcessorProvider

PayloadProcessorProvider.DirPayloadProcessor - Class in org.apache.lucene.index
Deprecated. Use PayloadProcessorProvider.ReaderPayloadProcessor instead.
PayloadProcessorProvider.DirPayloadProcessor() - Constructor for class org.apache.lucene.index.PayloadProcessorProvider.DirPayloadProcessor
Deprecated.
PayloadProcessorProvider.PayloadProcessor - Class in org.apache.lucene.index
Processes the given payload.
PayloadProcessorProvider.PayloadProcessor() - Constructor for class org.apache.lucene.index.PayloadProcessorProvider.PayloadProcessor

PayloadProcessorProvider.ReaderPayloadProcessor - Class in org.apache.lucene.index
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for a given Term which allows processing the payloads of different terms differently.
PayloadProcessorProvider.ReaderPayloadProcessor() - Constructor for class org.apache.lucene.index.PayloadProcessorProvider.ReaderPayloadProcessor

payloadScore - Variable in class org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanScorer

payloadScore - Variable in class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

PayloadSpanUtil - Class in org.apache.lucene.search.payloads
Experimental class to get set of payloads for most standard Lucene queries.
PayloadSpanUtil(IndexReader) - Constructor for class org.apache.lucene.search.payloads.PayloadSpanUtil

payloadsSeen - Variable in class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

payloadStream - Variable in class org.apache.lucene.facet.enhancements.association.AssociationListTokenizer

payloadStreamIterator - Variable in class org.apache.lucene.facet.index.streaming.CountingListTokenizer
An iterator over the payload streams
payloadStreamsByName - Variable in class org.apache.lucene.facet.index.streaming.CountingListTokenizer
A table for retrieving payload streams by category-list name.
PayloadTermQuery - Class in org.apache.lucene.search.payloads
This class is very similar to SpanTermQuery except that it factors in the value of the payload located at each of the positions where the Term occurs.
PayloadTermQuery(Term, PayloadFunction) - Constructor for class org.apache.lucene.search.payloads.PayloadTermQuery

PayloadTermQuery(Term, PayloadFunction, boolean) - Constructor for class org.apache.lucene.search.payloads.PayloadTermQuery

PayloadTermQuery.PayloadTermWeight - Class in org.apache.lucene.search.payloads

PayloadTermQuery.PayloadTermWeight(PayloadTermQuery, Searcher) - Constructor for class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight

PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer - Class in org.apache.lucene.search.payloads

PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer(TermSpans, Weight, Similarity, byte[]) - Constructor for class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

payloadToMatch - Variable in class org.apache.lucene.search.spans.SpanNearPayloadCheckQuery

payloadToMatch - Variable in class org.apache.lucene.search.spans.SpanPayloadCheckQuery

peekToken() - Method in class org.apache.lucene.analysis.LookaheadTokenFilter
Returns true if there is a new token.
PerDimensionIndexingParams - Class in org.apache.lucene.facet.index.params
A FacetIndexingParams that utilizes different category lists, defined by the dimension specified CategoryPaths (see PerDimensionIndexingParams.addCategoryListParams(CategoryPath, CategoryListParams)
PerDimensionIndexingParams() - Constructor for class org.apache.lucene.facet.index.params.PerDimensionIndexingParams
Construct with the default CategoryListParams as the default CategoryListParams for unspecified CategoryPaths.
PerDimensionIndexingParams(CategoryListParams) - Constructor for class org.apache.lucene.facet.index.params.PerDimensionIndexingParams
Construct with the included categoryListParams as the default CategoryListParams for unspecified CategoryPaths.
PerFieldAnalyzerWrapper - Class in org.apache.lucene.analysis
This analyzer is used to facilitate scenarios where different fields require different analysis techniques.
PerFieldAnalyzerWrapper(Analyzer) - Constructor for class org.apache.lucene.analysis.PerFieldAnalyzerWrapper
Constructs with default analyzer.
PerFieldAnalyzerWrapper(Analyzer, Map<String, Analyzer>) - Constructor for class org.apache.lucene.analysis.PerFieldAnalyzerWrapper
Constructs with default analyzer and a map of analyzers to use for specific fields.
PerfRunData - Class in org.apache.lucene.benchmark.byTask
Data maintained by a performance test run.
PerfRunData(Config) - Constructor for class org.apache.lucene.benchmark.byTask.PerfRunData

PerfTask - Class in org.apache.lucene.benchmark.byTask.tasks
An abstract task to be tested for performance.
PerfTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.PerfTask

permutationIterator() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix
Deprecated.
PersianAnalyzer - Class in org.apache.lucene.analysis.fa
Analyzer for Persian.
PersianAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.fa.PersianAnalyzer
Builds an analyzer with the default stop words: PersianAnalyzer.DEFAULT_STOPWORD_FILE.
PersianAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.fa.PersianAnalyzer
Builds an analyzer with the given stop words
PersianAnalyzer(Version, String...) - Constructor for class org.apache.lucene.analysis.fa.PersianAnalyzer
Deprecated. use PersianAnalyzer.PersianAnalyzer(Version, Set) instead
PersianAnalyzer(Version, Hashtable<?, ?>) - Constructor for class org.apache.lucene.analysis.fa.PersianAnalyzer
Deprecated. use PersianAnalyzer.PersianAnalyzer(Version, Set) instead
PersianAnalyzer(Version, File) - Constructor for class org.apache.lucene.analysis.fa.PersianAnalyzer
Deprecated. use PersianAnalyzer.PersianAnalyzer(Version, Set) instead
PersianCharFilter - Class in org.apache.lucene.analysis.fa
CharFilter that replaces instances of Zero-width non-joiner with an ordinary space.
PersianCharFilter(CharStream) - Constructor for class org.apache.lucene.analysis.fa.PersianCharFilter

PersianNormalizationFilter - Class in org.apache.lucene.analysis.fa
A TokenFilter that applies PersianNormalizer to normalize the orthography.
PersianNormalizationFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.fa.PersianNormalizationFilter

PersianNormalizer - Class in org.apache.lucene.analysis.fa
Normalizer for Persian.
PersianNormalizer() - Constructor for class org.apache.lucene.analysis.fa.PersianNormalizer

PersistentSnapshotDeletionPolicy - Class in org.apache.lucene.index
A SnapshotDeletionPolicy which adds a persistence layer so that snapshots can be maintained across the life of an application.
PersistentSnapshotDeletionPolicy(IndexDeletionPolicy, Directory, IndexWriterConfig.OpenMode, Version) - Constructor for class org.apache.lucene.index.PersistentSnapshotDeletionPolicy
PersistentSnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting.
PhoneticFilter - Class in org.apache.lucene.analysis.phonetic
Create tokens for phonetic matches.
PhoneticFilter(TokenStream, Encoder, boolean) - Constructor for class org.apache.lucene.analysis.phonetic.PhoneticFilter

PHRASE_SLOP - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set the default phrase slop
PhraseQuery - Class in org.apache.lucene.search
A Query that matches documents containing a particular sequence of terms.
PhraseQuery() - Constructor for class org.apache.lucene.search.PhraseQuery
Constructs an empty phrase query.
PhraseQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
Builds a PhraseQuery object from a TokenizedPhraseQueryNode object.
PhraseQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.PhraseQueryNodeBuilder

PhraseSlopQueryNode - Class in org.apache.lucene.queryParser.core.nodes

PhraseSlopQueryNode(QueryNode, int) - Constructor for class org.apache.lucene.queryParser.core.nodes.PhraseSlopQueryNode

PhraseSlopQueryNodeProcessor - Class in org.apache.lucene.queryParser.standard.processors
This processor removes invalid SlopQueryNode objects in the query node tree.
PhraseSlopQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.PhraseSlopQueryNodeProcessor

PKIndexSplitter - Class in org.apache.lucene.index
Split an index based on a Filter.
PKIndexSplitter(Directory, Directory, Directory, Filter) - Constructor for class org.apache.lucene.index.PKIndexSplitter
Deprecated. use PKIndexSplitter.PKIndexSplitter(Version, Directory, Directory, Directory, Filter) instead. This constructor will be removed in Lucene 4.0.
PKIndexSplitter(Directory, Directory, Directory, Term) - Constructor for class org.apache.lucene.index.PKIndexSplitter
Deprecated. use PKIndexSplitter.PKIndexSplitter(Version, Directory, Directory, Directory, Term) instead. This constructor will be removed in Lucene 4.0.
PKIndexSplitter(Version, Directory, Directory, Directory, Filter) - Constructor for class org.apache.lucene.index.PKIndexSplitter
Split an index based on a Filter.
PKIndexSplitter(Directory, Directory, Directory, Filter, IndexWriterConfig, IndexWriterConfig) - Constructor for class org.apache.lucene.index.PKIndexSplitter

PKIndexSplitter(Version, Directory, Directory, Directory, Term) - Constructor for class org.apache.lucene.index.PKIndexSplitter
Split an index based on a given primary key term and a 'middle' term.
PKIndexSplitter(Directory, Directory, Directory, Term, IndexWriterConfig, IndexWriterConfig) - Constructor for class org.apache.lucene.index.PKIndexSplitter

PLAIN_NORMS_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of plain norms
PLAINTEXT_FIELD_NAME - Static variable in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

PlainTextDictionary - Class in org.apache.lucene.search.spell
Dictionary represented by a text file.
PlainTextDictionary(File) - Constructor for class org.apache.lucene.search.spell.PlainTextDictionary

PlainTextDictionary(InputStream) - Constructor for class org.apache.lucene.search.spell.PlainTextDictionary

PlainTextDictionary(Reader) - Constructor for class org.apache.lucene.search.spell.PlainTextDictionary
Creates a dictionary based on a reader.
PLUS - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
PLUS - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
PM_FAST_INVALIDATION - Static variable in class org.apache.lucene.search.DuplicateFilter

PM_FULL_VALIDATION - Static variable in class org.apache.lucene.search.DuplicateFilter

Point2D - Class in org.apache.lucene.spatial.geometry.shape
Deprecated.
Point2D(double, double) - Constructor for class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
Point2D() - Constructor for class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
Point2D(Point2D) - Constructor for class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
pointOnBearing(double, double, double, double, double[], double) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated. Given a start point (startLat, startLon) and a bearing on a sphere of radius sphereRadius, return the destination point.
Points - Class in org.apache.lucene.benchmark.byTask.stats
Test run data points collected as the test proceeds.
Points(Config) - Constructor for class org.apache.lucene.benchmark.byTask.stats.Points
Create a Points statistics object.
PolishAnalyzer - Class in org.apache.lucene.analysis.pl
Analyzer for Polish.
PolishAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.pl.PolishAnalyzer
Builds an analyzer with the default stop words: PolishAnalyzer.DEFAULT_STOPWORD_FILE.
PolishAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.pl.PolishAnalyzer
Builds an analyzer with the given stop words.
PolishAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.pl.PolishAnalyzer
Builds an analyzer with the given stop words.
pop() - Method in interface org.apache.lucene.facet.search.Heap
Get and remove the top of the Heap
NOTE: Once Heap.pop() is called no other Heap.add(Object) or Heap.insertWithOverflow(Object) should be called.
pop() - Method in class org.apache.lucene.search.vectorhighlight.FieldTermStack

pop(long) - Static method in class org.apache.lucene.util.BitUtil
Returns the number of bits set in the long
pop() - Method in class org.apache.lucene.util.PriorityQueue
Removes and returns the least element of the PriorityQueue in log(size) time.
pop() - Method in class org.apache.lucene.util.ScorerDocQueue
Removes and returns the least scorer of the ScorerDocQueue in log(size) time.
pop_andnot(long[], long[], int, int) - Static method in class org.apache.lucene.util.BitUtil
Returns the popcount or cardinality of A & ~B Neither array is modified.
pop_array(long[], int, int) - Static method in class org.apache.lucene.util.BitUtil
Returns the number of set bits in an array of longs.
pop_intersect(long[], long[], int, int) - Static method in class org.apache.lucene.util.BitUtil
Returns the popcount or cardinality of the two sets after an intersection.
pop_union(long[], long[], int, int) - Static method in class org.apache.lucene.util.BitUtil
Returns the popcount or cardinality of the union of two sets.
pop_xor(long[], long[], int, int) - Static method in class org.apache.lucene.util.BitUtil

populateResults(ScoreDoc[], int) - Method in class org.apache.lucene.search.TopDocsCollector
Populates the results array with the ScoreDoc instances.
populateResults(ScoreDoc[], int) - Method in class org.apache.lucene.search.TopFieldCollector

PorterStemFilter - Class in org.apache.lucene.analysis
Transforms the token stream as per the Porter stemming algorithm.
PorterStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.PorterStemFilter

PorterStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
PorterStemmer() - Constructor for class org.tartarus.snowball.ext.PorterStemmer

PortugueseAnalyzer - Class in org.apache.lucene.analysis.pt
Analyzer for Portuguese.
PortugueseAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.pt.PortugueseAnalyzer
Builds an analyzer with the default stop words: PortugueseAnalyzer.DEFAULT_STOPWORD_FILE.
PortugueseAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.pt.PortugueseAnalyzer
Builds an analyzer with the given stop words.
PortugueseAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.pt.PortugueseAnalyzer
Builds an analyzer with the given stop words.
PortugueseLightStemFilter - Class in org.apache.lucene.analysis.pt
A TokenFilter that applies PortugueseLightStemmer to stem Portuguese words.
PortugueseLightStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.pt.PortugueseLightStemFilter

PortugueseLightStemmer - Class in org.apache.lucene.analysis.pt
Light Stemmer for Portuguese
PortugueseLightStemmer() - Constructor for class org.apache.lucene.analysis.pt.PortugueseLightStemmer

PortugueseMinimalStemFilter - Class in org.apache.lucene.analysis.pt
A TokenFilter that applies PortugueseMinimalStemmer to stem Portuguese words.
PortugueseMinimalStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.pt.PortugueseMinimalStemFilter

PortugueseMinimalStemmer - Class in org.apache.lucene.analysis.pt
Minimal Stemmer for Portuguese
PortugueseMinimalStemmer() - Constructor for class org.apache.lucene.analysis.pt.PortugueseMinimalStemmer

PortugueseStemFilter - Class in org.apache.lucene.analysis.pt
A TokenFilter that applies PortugueseStemmer to stem Portuguese words.
PortugueseStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.pt.PortugueseStemFilter

PortugueseStemmer - Class in org.apache.lucene.analysis.pt
Portuguese stemmer implementing the RSLP (Removedor de Sufixos da Lingua Portuguesa) algorithm.
PortugueseStemmer() - Constructor for class org.apache.lucene.analysis.pt.PortugueseStemmer

PortugueseStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
PortugueseStemmer() - Constructor for class org.tartarus.snowball.ext.PortugueseStemmer

pos - Variable in class org.apache.lucene.util.fst.FST.BytesReader

pos - Variable in class org.apache.lucene.util.Vint8.Position
The value passed by reference.
POSDICT_FILENAME_SUFFIX - Static variable in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

POSDICT_HEADER - Static variable in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

posIncAtt - Variable in class org.apache.lucene.analysis.LookaheadTokenFilter

position - Variable in class org.apache.lucene.search.spans.TermSpans

PositionBasedTermVectorMapper - Class in org.apache.lucene.index
For each Field, store position by position information.
PositionBasedTermVectorMapper() - Constructor for class org.apache.lucene.index.PositionBasedTermVectorMapper

PositionBasedTermVectorMapper(boolean) - Constructor for class org.apache.lucene.index.PositionBasedTermVectorMapper

PositionBasedTermVectorMapper.TVPositionInfo - Class in org.apache.lucene.index
Container for a term at a position
PositionBasedTermVectorMapper.TVPositionInfo(int, boolean) - Constructor for class org.apache.lucene.index.PositionBasedTermVectorMapper.TVPositionInfo

PositionFilter - Class in org.apache.lucene.analysis.position
Set the positionIncrement of all tokens to the "positionIncrement", except the first return token which retains its original positionIncrement value.
PositionFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.position.PositionFilter
Constructs a PositionFilter that assigns a position increment of zero to all but the first token from the given input stream.
PositionFilter(TokenStream, int) - Constructor for class org.apache.lucene.analysis.position.PositionFilter
Constructs a PositionFilter that assigns the given position increment to all but the first token from the given input stream.
positionIncrement - Variable in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
The term's position increment.
PositionIncrementAttribute - Interface in org.apache.lucene.analysis.tokenattributes
The positionIncrement determines the position of this token relative to the previous Token in a TokenStream, used in phrase searching.
PositionIncrementAttributeImpl - Class in org.apache.lucene.analysis.tokenattributes
The positionIncrement determines the position of this token relative to the previous Token in a TokenStream, used in phrase searching.
PositionIncrementAttributeImpl() - Constructor for class org.apache.lucene.analysis.tokenattributes.PositionIncrementAttributeImpl

PositionIncrementsAttribute - Interface in org.apache.lucene.queryParser.standard.config
Deprecated.
PositionIncrementsAttributeImpl - Class in org.apache.lucene.queryParser.standard.config
Deprecated.
PositionIncrementsAttributeImpl() - Constructor for class org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl
Deprecated.
PositionLengthAttribute - Interface in org.apache.lucene.analysis.tokenattributes
The positionLength determines how many positions this token spans.
PositionLengthAttributeImpl - Class in org.apache.lucene.analysis.tokenattributes
See PositionLengthAttribute.
PositionLengthAttributeImpl() - Constructor for class org.apache.lucene.analysis.tokenattributes.PositionLengthAttributeImpl

positions - Variable in class org.apache.lucene.analysis.LookaheadTokenFilter

positions - Variable in class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

positions - Variable in class org.apache.lucene.search.spans.TermSpans

PositionSpan - Class in org.apache.lucene.search.highlight
Utility class to record Positions Spans
PositionSpan(int, int) - Constructor for class org.apache.lucene.search.highlight.PositionSpan

PositiveIntOutputs - Class in org.apache.lucene.util.fst
An FST Outputs implementation where each output is a non-negative long value.
PositiveScoresOnlyCollector - Class in org.apache.lucene.search
A Collector implementation which wraps another Collector and makes sure only documents with scores > 0 are collected.
PositiveScoresOnlyCollector(Collector) - Constructor for class org.apache.lucene.search.PositiveScoresOnlyCollector

posix_madvise(ByteBuffer, int) - Static method in class org.apache.lucene.store.NativePosixUtil

posLenAtt - Variable in class org.apache.lucene.analysis.LookaheadTokenFilter

postBreak - Variable in class org.apache.lucene.analysis.compound.hyphenation.Hyphen

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.core.processors.NoChildOptimizationQueryNodeProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.
postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.core.processors.RemoveDeletedQueryNodesProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.precedence.processors.BooleanModifiersQueryNodeProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.AllowLeadingWildcardProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.AnalyzerQueryNodeProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.BooleanSingleChildOptimizationQueryNodeProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.BoostQueryNodeProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.DefaultPhraseSlopQueryNodeProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.FuzzyQueryNodeProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.LowercaseExpandedTermsQueryNodeProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.MatchAllDocsQueryNodeProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.MultiFieldQueryNodeProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.MultiTermRewriteMethodProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.NumericQueryNodeProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.NumericRangeQueryNodeProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.ParametricRangeQueryNodeProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.PhraseSlopQueryNodeProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.RemoveEmptyNonLeafQueryNodeProcessor

postProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.WildcardQueryNodeProcessor

postTags - Variable in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

pq - Variable in class org.apache.lucene.search.TopDocsCollector
The priority queue which holds the top documents.
pread(FileDescriptor, long, ByteBuffer) - Static method in class org.apache.lucene.store.NativePosixUtil

preBreak - Variable in class org.apache.lucene.analysis.compound.hyphenation.Hyphen

PrecedenceQueryNodeProcessorPipeline - Class in org.apache.lucene.queryParser.precedence.processors
This processor pipeline extends StandardQueryNodeProcessorPipeline and enables boolean precedence on it.
PrecedenceQueryNodeProcessorPipeline(QueryConfigHandler) - Constructor for class org.apache.lucene.queryParser.precedence.processors.PrecedenceQueryNodeProcessorPipeline

PrecedenceQueryParser - Class in org.apache.lucene.queryParser.precedence
This query parser works exactly as the standard query parser ( StandardQueryParser ), except that it respect the boolean precedence, so <a AND b OR c AND d> is parsed to <(+a +b) (+c +d)> instead of <+a +b +c +d>.
PrecedenceQueryParser() - Constructor for class org.apache.lucene.queryParser.precedence.PrecedenceQueryParser

PrecedenceQueryParser(Analyzer) - Constructor for class org.apache.lucene.queryParser.precedence.PrecedenceQueryParser

precise - Variable in class org.apache.lucene.spatial.tier.DistanceFilter
Deprecated.
PRECISION_STEP_DEFAULT - Static variable in class org.apache.lucene.util.NumericUtils
The default precision step used by NumericField, NumericTokenStream, NumericRangeQuery, and NumericRangeFilter as default
prefix - Variable in class org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask

prefix() - Method in class org.apache.lucene.search.regex.JakartaRegexpCapabilities

prefix() - Method in class org.apache.lucene.search.regex.JavaUtilRegexCapabilities

prefix() - Method in interface org.apache.lucene.search.regex.RegexCapabilities
A wise prefix implementation can reduce the term enumeration (and thus increase performance) of RegexQuery dramatically!
PrefixAndSuffixAwareTokenFilter - Class in org.apache.lucene.analysis.miscellaneous
Links two PrefixAwareTokenFilter.
PrefixAndSuffixAwareTokenFilter(TokenStream, TokenStream, TokenStream) - Constructor for class org.apache.lucene.analysis.miscellaneous.PrefixAndSuffixAwareTokenFilter

PrefixAwareTokenFilter - Class in org.apache.lucene.analysis.miscellaneous
Joins two token streams and leaves the last token of the first stream available to be used when updating the token values in the second stream based on that token.
PrefixAwareTokenFilter(TokenStream, TokenStream) - Constructor for class org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter

prefixCodedToDouble(String) - Static method in class org.apache.lucene.util.NumericUtils

prefixCodedToFloat(String) - Static method in class org.apache.lucene.util.NumericUtils

prefixCodedToInt(String) - Static method in class org.apache.lucene.util.NumericUtils

prefixCodedToLong(String) - Static method in class org.apache.lucene.util.NumericUtils

prefixCompletion(TernaryTreeNode, CharSequence, int) - Method in class org.apache.lucene.search.suggest.tst.TSTAutocomplete
Auto-completes a given prefix query using Depth-First Search with the end of prefix as source node each time finding a new leaf to get a complete key to be added in the suggest list.
prefixes - Static variable in class org.apache.lucene.analysis.ar.ArabicStemmer

PrefixFilter - Class in org.apache.lucene.search
A Filter that restricts search results to values that have a matching prefix in a given field.
PrefixFilter(Term) - Constructor for class org.apache.lucene.search.PrefixFilter

PrefixOperatorQuery() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

PrefixQuery - Class in org.apache.lucene.search
A Query that matches documents containing terms with a specified prefix.
PrefixQuery(Term) - Constructor for class org.apache.lucene.search.PrefixQuery
Constructs a query for terms starting with prefix.
PREFIXTERM - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
PrefixTermEnum - Class in org.apache.lucene.search
Subclass of FilteredTermEnum for enumerating all terms that match the specified prefix filter term.
PrefixTermEnum(IndexReader, Term) - Constructor for class org.apache.lucene.search.PrefixTermEnum

prefixToString(StringBuilder) - Method in class org.apache.lucene.queryParser.surround.query.ComposedQuery

PrefixWildcardQueryNode - Class in org.apache.lucene.queryParser.standard.nodes
A PrefixWildcardQueryNode represents wildcardquery that matches abc* or *.
PrefixWildcardQueryNode(CharSequence, CharSequence, int, int) - Constructor for class org.apache.lucene.queryParser.standard.nodes.PrefixWildcardQueryNode

PrefixWildcardQueryNode(FieldQueryNode) - Constructor for class org.apache.lucene.queryParser.standard.nodes.PrefixWildcardQueryNode

PrefixWildcardQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
Builds a PrefixQuery object from a PrefixWildcardQueryNode object.
PrefixWildcardQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.PrefixWildcardQueryNodeBuilder

prepareCommit() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
prepare most of the work needed for a two-phase commit.
prepareCommit(Map<String, String>) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Like above, and also prepares to store user data with the index.
prepareCommit() - Method in class org.apache.lucene.index.IndexWriter
Expert: prepare for commit.
prepareCommit(Map<String, String>) - Method in class org.apache.lucene.index.IndexWriter
Expert: prepare for commit, specifying commitUserData Map (String -> String).
prepareCommit() - Method in class org.apache.lucene.store.ChecksumIndexOutput
Starts but does not complete the commit of this file (= writing of the final checksum at the end).
prepareCommit() - Method in interface org.apache.lucene.util.TwoPhaseCommit
The first stage of a 2-phase commit.
prepareCommit(Map<String, String>) - Method in interface org.apache.lucene.util.TwoPhaseCommit
Like TwoPhaseCommit.commit(), but takes an additional commit data to be included w/ the commit.
prepareCommit() - Method in class org.apache.lucene.util.TwoPhaseCommitTool.TwoPhaseCommitWrapper

prepareCommit(Map<String, String>) - Method in class org.apache.lucene.util.TwoPhaseCommitTool.TwoPhaseCommitWrapper

prepareQueries() - Method in class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker

prepareQueries() - Method in class org.apache.lucene.benchmark.byTask.feeds.EnwikiQueryMaker

prepareQueries() - Method in class org.apache.lucene.benchmark.byTask.feeds.FileBasedQueryMaker

prepareQueries() - Method in class org.apache.lucene.benchmark.byTask.feeds.ReutersQueryMaker

prepareQueries() - Method in class org.apache.lucene.benchmark.byTask.feeds.SimpleQueryMaker
Prepare the queries for this test.
prepareQueries() - Method in class org.apache.lucene.benchmark.byTask.feeds.SimpleSloppyPhraseQueryMaker

prependOutput(T) - Method in class org.apache.lucene.util.fst.Builder.UnCompiledNode

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.core.processors.NoChildOptimizationQueryNodeProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.
preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.core.processors.RemoveDeletedQueryNodesProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.precedence.processors.BooleanModifiersQueryNodeProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.AllowLeadingWildcardProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.AnalyzerQueryNodeProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.BooleanSingleChildOptimizationQueryNodeProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.BoostQueryNodeProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.DefaultPhraseSlopQueryNodeProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.FuzzyQueryNodeProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.LowercaseExpandedTermsQueryNodeProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.MatchAllDocsQueryNodeProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.MultiFieldQueryNodeProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.MultiTermRewriteMethodProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.NumericQueryNodeProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.NumericRangeQueryNodeProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.ParametricRangeQueryNodeProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.PhraseSlopQueryNodeProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.RemoveEmptyNonLeafQueryNodeProcessor

preProcessNode(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.WildcardQueryNodeProcessor

preTags - Variable in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

prevCharIsCR - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

prevCharIsCR - Variable in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

prevCharIsLF - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

prevCharIsLF - Variable in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

previous() - Method in class org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator

previous() - Method in class org.apache.lucene.analysis.util.CharArrayIterator

prevSetBit(int) - Method in class org.apache.lucene.util.FixedBitSet
Returns the index of the last set bit before or on the index specified.
prevSetBit(int) - Method in class org.apache.lucene.util.OpenBitSet
Returns the index of the first set bit starting downwards at the index specified.
prevSetBit(long) - Method in class org.apache.lucene.util.OpenBitSet
Returns the index of the first set bit starting downwards at the index specified.
PrimaryQuery() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

print() - Method in class org.egothor.stemmer.Row
Write the contents of this Row to stdout.
printBaseHash() - Method in class org.apache.lucene.util.collections.IntHashSet
Prints the baseHash array, used for debug purposes.
printInfo(CharSequence) - Method in class org.egothor.stemmer.MultiTrie
Print the given prefix and the position(s) in the Trie where it appears.
printInfo(CharSequence) - Method in class org.egothor.stemmer.Trie

printQueries() - Method in class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker

printQueries() - Method in class org.apache.lucene.benchmark.byTask.feeds.LongToEnglishQueryMaker

printQueries() - Method in interface org.apache.lucene.benchmark.byTask.feeds.QueryMaker
Print the queries
PrintReaderTask - Class in org.apache.lucene.benchmark.byTask.tasks
Opens a reader and prints basic statistics.
PrintReaderTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.PrintReaderTask

printStatistics(String) - Method in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource

printStats() - Method in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree

printStats() - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

PriorityQueue<T> - Class in org.apache.lucene.util
A PriorityQueue maintains a partial ordering of its elements such that the least element can always be found in constant time.
PriorityQueue() - Constructor for class org.apache.lucene.util.PriorityQueue

process(String) - Method in class org.apache.lucene.analysis.cn.smart.hhmm.HHMMSegmenter
Return a list of SegToken representing the best segmentation of a sentence
process(QueryNode) - Method in interface org.apache.lucene.queryParser.core.processors.QueryNodeProcessor
Processes a query node tree.
process(QueryNode) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl

process(QueryNode) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline
For reference about this method check: QueryNodeProcessor.process(QueryNode).
process(QueryNode) - Method in class org.apache.lucene.queryParser.core.processors.RemoveDeletedQueryNodesProcessor

process(QueryNode) - Method in class org.apache.lucene.queryParser.precedence.processors.BooleanModifiersQueryNodeProcessor

process(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.AllowLeadingWildcardProcessor

process(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.AnalyzerQueryNodeProcessor

process(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.DefaultPhraseSlopQueryNodeProcessor

process(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.GroupQueryNodeProcessor

process(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.LowercaseExpandedTermsQueryNodeProcessor

process(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.RemoveEmptyNonLeafQueryNodeProcessor

processChildren(QueryNode) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
This method is called every time a child is processed.
processChildren(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.DefaultPhraseSlopQueryNodeProcessor

processChildren(QueryNode) - Method in class org.apache.lucene.queryParser.standard.processors.MultiFieldQueryNodeProcessor

processPayload(byte[], int, int) - Method in class org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsPayloadProcessor

processPayload(byte[], int, int) - Method in class org.apache.lucene.index.PayloadProcessorProvider.PayloadProcessor
Process the incoming payload and returns the resulting byte[].
processPayload(Similarity) - Method in class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

processPayloads(Collection<byte[]>, int, int) - Method in class org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanScorer
By default, uses the PayloadFunction to score the payloads, but can be overridden to do other things.
properties - Variable in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl
A map of properties associated to the current category path.
PROX_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of prox postings file
ProximityQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A ProximityQueryNode represents a query where the terms should meet specific distance conditions.
ProximityQueryNode(List<QueryNode>, CharSequence, ProximityQueryNode.Type, int, boolean) - Constructor for class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode

ProximityQueryNode(List<QueryNode>, CharSequence, ProximityQueryNode.Type, boolean) - Constructor for class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode

ProximityQueryNode.ProximityType - Class in org.apache.lucene.queryParser.core.nodes

ProximityQueryNode.ProximityType(ProximityQueryNode.Type) - Constructor for class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode.ProximityType

ProximityQueryNode.ProximityType(ProximityQueryNode.Type, int) - Constructor for class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode.ProximityType

ProximityQueryNode.Type - Enum in org.apache.lucene.queryParser.core.nodes

prune(SearcherLifetimeManager.Pruner) - Method in class org.apache.lucene.search.SearcherLifetimeManager
Calls provided SearcherLifetimeManager.Pruner to prune entries.
pruneAllFieldPostings(String) - Method in class org.apache.lucene.index.pruning.TermPruningPolicy
Pruning of all postings for a field
pruneAllPositions(TermPositions, Term) - Method in class org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy

pruneAllPositions(TermPositions, Term) - Method in class org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy

pruneAllPositions(TermPositions, Term) - Method in class org.apache.lucene.index.pruning.RIDFTermPruningPolicy

pruneAllPositions(TermPositions, Term) - Method in class org.apache.lucene.index.pruning.TermPruningPolicy
Prune all postings per term (invoked once per term per doc)
pruneAllPositions(TermPositions, Term) - Method in class org.apache.lucene.index.pruning.TFTermPruningPolicy

pruneDeletedSegments() - Method in class org.apache.lucene.index.SegmentInfos
Prunes any segment whose docs are all deleted.
pruneDocument(int, FieldSelector) - Method in class org.apache.lucene.index.pruning.StorePruningPolicy
Prune stored fields of a document.
prunedVecCount - Variable in class org.apache.lucene.index.PruningReader

prunePayload(TermPositions, Term) - Method in class org.apache.lucene.index.pruning.TermPruningPolicy
Called when checking for the presence of payload for the current term at a current position
pruneSomePositions(int, int[], Term) - Method in class org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy

pruneSomePositions(int, int[], Term) - Method in class org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy

pruneSomePositions(int, int[], Term) - Method in class org.apache.lucene.index.pruning.RIDFTermPruningPolicy

pruneSomePositions(int, int[], Term) - Method in class org.apache.lucene.index.pruning.TermPruningPolicy
Prune some postings per term (invoked once per term per doc).
pruneSomePositions(int, int[], Term) - Method in class org.apache.lucene.index.pruning.TFTermPruningPolicy

pruneTermEnum(TermEnum) - Method in class org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy

pruneTermEnum(TermEnum) - Method in class org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy

pruneTermEnum(TermEnum) - Method in class org.apache.lucene.index.pruning.RIDFTermPruningPolicy

pruneTermEnum(TermEnum) - Method in class org.apache.lucene.index.pruning.TermPruningPolicy
Pruning of all postings for a term (invoked once per term).
pruneTermEnum(TermEnum) - Method in class org.apache.lucene.index.pruning.TFTermPruningPolicy

pruneTermVectorTerms(int, String, String[], int[], TermFreqVector) - Method in class org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy

pruneTermVectorTerms(int, String, String[], int[], TermFreqVector) - Method in class org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy

pruneTermVectorTerms(int, String, String[], int[], TermFreqVector) - Method in class org.apache.lucene.index.pruning.RIDFTermPruningPolicy

pruneTermVectorTerms(int, String, String[], int[], TermFreqVector) - Method in class org.apache.lucene.index.pruning.TermPruningPolicy
Pruning of individual terms in term vectors.
pruneTermVectorTerms(int, String, String[], int[], TermFreqVector) - Method in class org.apache.lucene.index.pruning.TFTermPruningPolicy

pruneWholeTermVector(int, String) - Method in class org.apache.lucene.index.pruning.TermPruningPolicy
Term vector pruning.
PruningPolicy - Class in org.apache.lucene.index.pruning
General Definitions for Index Pruning, such as operations to be performed on field data.
PruningPolicy() - Constructor for class org.apache.lucene.index.pruning.PruningPolicy

PruningReader - Class in org.apache.lucene.index
This class produces a subset of the input index, by removing some postings data according to rules implemented in a TermPruningPolicy, and optionally it can also remove stored fields of documents according to rules implemented in a StorePruningPolicy.
PruningReader(IndexReader, StorePruningPolicy, TermPruningPolicy) - Constructor for class org.apache.lucene.index.PruningReader
Constructor.
PruningTool - Class in org.apache.lucene.index.pruning
A command-line tool to configure and run a PruningReader on an input index and produce a pruned output index using IndexWriter.addIndexes(IndexReader...).
PruningTool() - Constructor for class org.apache.lucene.index.pruning.PruningTool

PUA_EC00_MARKER - Static variable in class org.apache.lucene.analysis.reverse.ReverseStringFilter
Example marker character: U+EC00 (PRIVATE USE AREA: EC00)
Punct - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
purge(IndexReader) - Method in interface org.apache.lucene.search.FieldCache
Expert: drops all cache entries associated with this reader.
purgeAllCaches() - Method in interface org.apache.lucene.search.FieldCache
EXPERT: Instructs the FieldCache to forcibly expunge all entries from the underlying caches.
purgeFieldCache(FieldCache) - Method in class org.apache.lucene.util.LuceneTestCase
Forcible purges all cache entries from the FieldCache.
push(FieldTermStack.TermInfo) - Method in class org.apache.lucene.search.vectorhighlight.FieldTermStack

put(CharSequence, V) - Method in class org.apache.lucene.analysis.CharArrayMap
Add the given mapping.
put(Object, V) - Method in class org.apache.lucene.analysis.CharArrayMap

put(String, V) - Method in class org.apache.lucene.analysis.CharArrayMap
Add the given mapping.
put(char[], V) - Method in class org.apache.lucene.analysis.CharArrayMap
Add the given mapping.
put(int, byte) - Method in class org.apache.lucene.analysis.compound.hyphenation.ByteVector

put(int, char) - Method in class org.apache.lucene.analysis.compound.hyphenation.CharVector

put(CategoryPath, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.Cl2oTaxonomyWriterCache

put(CategoryPath, int, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.Cl2oTaxonomyWriterCache

put(CategoryPath, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache

put(CategoryPath, int, int) - Method in class org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache

put(CategoryPath, int) - Method in interface org.apache.lucene.facet.taxonomy.writercache.TaxonomyWriterCache
Add a category to the cache, with the given ordinal as the value.
put(CategoryPath, int, int) - Method in interface org.apache.lucene.facet.taxonomy.writercache.TaxonomyWriterCache
Like TaxonomyWriterCache.put(CategoryPath, int), but for a given prefix of the category path.
put(int) - Method in class org.apache.lucene.search.grouping.SentinelIntSet

put(K, WeightedSpanTerm) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor.PositionCheckingMap

put(CharSequence, Object) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Stores a value in the trie.
put(K, V) - Method in class org.apache.lucene.util.collections.ArrayHashMap
Inserts the <key,value> pair into the map.
put(float, T) - Method in class org.apache.lucene.util.collections.FloatToObjectMap
Inserts the <key,value> pair into the map.
put(int, double) - Method in class org.apache.lucene.util.collections.IntToDoubleMap
Inserts the <key,value> pair into the map.
put(int, int) - Method in class org.apache.lucene.util.collections.IntToIntMap
Inserts the <key,value> pair into the map.
put(int, T) - Method in class org.apache.lucene.util.collections.IntToObjectMap
Inserts the <key,value> pair into the map.
put(K, float) - Method in class org.apache.lucene.util.collections.ObjectToFloatMap
Inserts the <key,value> pair into the map.
put(K, int) - Method in class org.apache.lucene.util.collections.ObjectToIntMap
Inserts the <key,value> pair into the map.
put(K, V) - Method in class org.apache.lucene.util.DoubleBarrelLRUCache

put(K, V) - Method in class org.apache.lucene.util.MapOfSets
Adds val to the Set associated with key in the Map.
put(Scorer) - Method in class org.apache.lucene.util.ScorerDocQueue
Adds a Scorer to a ScorerDocQueue in log(size) time.
put(K, V) - Method in class org.apache.lucene.util.WeakIdentityMap

putAll(Map<? extends K, ? extends WeightedSpanTerm>) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor.PositionCheckingMap

putAll(K, Collection<? extends V>) - Method in class org.apache.lucene.util.MapOfSets
Adds multiple vals to the Set associated with key in the Map.

Q

qnum - Variable in class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker

qpAnalyzer - Static variable in class org.apache.lucene.queryParser.QueryParserTestBase

qqParser - Variable in class org.apache.lucene.benchmark.quality.QualityBenchmark
Parser for turning QualityQueries into Lucene Queries.
QualityBenchmark - Class in org.apache.lucene.benchmark.quality
Main entry point for running a quality benchmark.
QualityBenchmark(QualityQuery[], QualityQueryParser, IndexSearcher, String) - Constructor for class org.apache.lucene.benchmark.quality.QualityBenchmark
Create a QualityBenchmark.
qualityQueries - Variable in class org.apache.lucene.benchmark.quality.QualityBenchmark
Quality Queries that this quality benchmark would execute.
QualityQueriesFinder - Class in org.apache.lucene.benchmark.quality.utils
Suggest Quality queries based on an index contents.
QualityQuery - Class in org.apache.lucene.benchmark.quality
A QualityQuery has an ID and some name-value pairs.
QualityQuery(String, Map<String, String>) - Constructor for class org.apache.lucene.benchmark.quality.QualityQuery
Create a QualityQuery with given ID and name-value pairs.
QualityQueryParser - Interface in org.apache.lucene.benchmark.quality
Parse a QualityQuery into a Lucene query.
QualityStats - Class in org.apache.lucene.benchmark.quality
Results of quality benchmark run for a single query or for a set of queries.
QualityStats(double, long) - Constructor for class org.apache.lucene.benchmark.quality.QualityStats
Construct a QualityStats object with anticipated maximal number of relevant hits.
QualityStats.RecallPoint - Class in org.apache.lucene.benchmark.quality
A certain rank in which a relevant doc was found.
queries - Variable in class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker

query(FacetIndexingParams, CategoryPath...) - Static method in class org.apache.lucene.facet.search.DrillDown
Return a query for drilling down into all given categories (AND).
query(FacetSearchParams, CategoryPath...) - Static method in class org.apache.lucene.facet.search.DrillDown
Return a query for drilling down into all given categories (AND).
query(FacetIndexingParams, Query, CategoryPath...) - Static method in class org.apache.lucene.facet.search.DrillDown
Turn a base query into a drilling-down query for all given category paths (AND).
query(FacetSearchParams, Query, CategoryPath...) - Static method in class org.apache.lucene.facet.search.DrillDown
Turn a base query into a drilling-down query for all given category paths (AND).
query(Query, CategoryPath...) - Static method in class org.apache.lucene.facet.search.DrillDown
Turn a base query into a drilling-down query using the default FacetSearchParams
Query(String) - Method in class org.apache.lucene.queryParser.QueryParser

Query(CharSequence) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser

query - Variable in class org.apache.lucene.search.ConstantScoreQuery

query - Variable in class org.apache.lucene.search.MultiTermQueryWrapperFilter

Query - Class in org.apache.lucene.search
The abstract base class for queries.
Query() - Constructor for class org.apache.lucene.search.Query

query - Variable in class org.apache.lucene.search.SpanQueryFilter

query - Variable in class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper

query - Variable in class org.apache.lucene.search.spans.SpanWeight

QUERY_TREE_BUILDER_TAGID - Static variable in class org.apache.lucene.queryParser.core.builders.QueryTreeBuilder
This tag is used to tag the nodes in a query tree with the built objects produced from their own associated builder.
QueryAutoStopWordAnalyzer - Class in org.apache.lucene.analysis.query
An Analyzer used primarily at query time to wrap another analyzer and provide a layer of protection which prevents very common words from being passed into queries.
QueryAutoStopWordAnalyzer(Version, Analyzer) - Constructor for class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
Deprecated. Stopwords should be calculated at instantiation using one of the other constructors
QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader) - Constructor for class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency percentage greater than QueryAutoStopWordAnalyzer.defaultMaxDocFreqPercent
QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, int) - Constructor for class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency greater than the given maxDocFreq
QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, float) - Constructor for class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency percentage greater than the given maxPercentDocs
QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, Collection<String>, float) - Constructor for class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for the given selection of fields from terms with a document frequency percentage greater than the given maxPercentDocs
QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, Collection<String>, int) - Constructor for class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for the given selection of fields from terms with a document frequency greater than the given maxDocFreq
QueryBuilder - Interface in org.apache.lucene.queryParser.core.builders
This interface is used by implementors classes that builds some kind of object from a query tree.
QueryBuilder - Interface in org.apache.lucene.xmlparser
Implemented by objects that produce Lucene Query objects from XML streams.
QueryBuilderFactory - Class in org.apache.lucene.xmlparser

QueryBuilderFactory() - Constructor for class org.apache.lucene.xmlparser.QueryBuilderFactory

QueryConfigHandler - Class in org.apache.lucene.queryParser.core.config
This class can be used to hold any query configuration and no field configuration.
QueryConfigHandler() - Constructor for class org.apache.lucene.queryParser.core.config.QueryConfigHandler

QueryDriver - Class in org.apache.lucene.benchmark.quality.trec
Command-line tool for doing a TREC evaluation run.
QueryDriver() - Constructor for class org.apache.lucene.benchmark.quality.trec.QueryDriver

queryFactory - Variable in class org.apache.lucene.xmlparser.CoreParser

QueryMaker - Interface in org.apache.lucene.benchmark.byTask.feeds
Create queries for the test.
QueryNode - Interface in org.apache.lucene.queryParser.core.nodes
A QueryNode is a interface implemented by all nodes on a QueryNode tree.
QueryNodeError - Error in org.apache.lucene.queryParser.core
Error class with NLS support
QueryNodeError(Message) - Constructor for error org.apache.lucene.queryParser.core.QueryNodeError

QueryNodeError(Throwable) - Constructor for error org.apache.lucene.queryParser.core.QueryNodeError

QueryNodeError(Message, Throwable) - Constructor for error org.apache.lucene.queryParser.core.QueryNodeError

QueryNodeException - Exception in org.apache.lucene.queryParser.core
This exception should be thrown if something wrong happens when dealing with QueryNodes.
QueryNodeException(Message) - Constructor for exception org.apache.lucene.queryParser.core.QueryNodeException

QueryNodeException(Throwable) - Constructor for exception org.apache.lucene.queryParser.core.QueryNodeException

QueryNodeException(Message, Throwable) - Constructor for exception org.apache.lucene.queryParser.core.QueryNodeException

QueryNodeImpl - Class in org.apache.lucene.queryParser.core.nodes
A QueryNodeImpl is the default implementation of the interface QueryNode
QueryNodeImpl() - Constructor for class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

QueryNodeOperation - Class in org.apache.lucene.queryParser.core.util
Allow joining 2 QueryNode Trees, into one.
QueryNodeParseException - Exception in org.apache.lucene.queryParser.core
This should be thrown when an exception happens during the query parsing from string to the query node tree.
QueryNodeParseException(Message) - Constructor for exception org.apache.lucene.queryParser.core.QueryNodeParseException

QueryNodeParseException(Throwable) - Constructor for exception org.apache.lucene.queryParser.core.QueryNodeParseException

QueryNodeParseException(Message, Throwable) - Constructor for exception org.apache.lucene.queryParser.core.QueryNodeParseException

QueryNodeProcessor - Interface in org.apache.lucene.queryParser.core.processors
A QueryNodeProcessor is an interface for classes that process a QueryNode tree.
QueryNodeProcessorImpl - Class in org.apache.lucene.queryParser.core.processors
This is a default implementation for the QueryNodeProcessor interface, it's an abstract class, so it should be extended by classes that want to process a QueryNode tree.
QueryNodeProcessorImpl() - Constructor for class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl

QueryNodeProcessorImpl(QueryConfigHandler) - Constructor for class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl

QueryNodeProcessorPipeline - Class in org.apache.lucene.queryParser.core.processors
A QueryNodeProcessorPipeline class should be used to build a query node processor pipeline.
QueryNodeProcessorPipeline() - Constructor for class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline
Constructs an empty query node processor pipeline.
QueryNodeProcessorPipeline(QueryConfigHandler) - Constructor for class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline
Constructs with a QueryConfigHandler object.
queryNorm(float) - Method in class org.apache.lucene.search.DefaultSimilarity
Implemented as 1/sqrt(sumOfSquaredWeights).
queryNorm(float) - Method in class org.apache.lucene.search.Similarity
Computes the normalization value for a query given the sum of the squared weights of each of the query terms.
queryNorm(float) - Method in class org.apache.lucene.search.SimilarityDelegator
Deprecated.
queryNorm - Variable in class org.apache.lucene.search.spans.SpanWeight

QueryParser - Class in org.apache.lucene.queryParser
This class is generated by JavaCC.
QueryParser(Version, String, Analyzer) - Constructor for class org.apache.lucene.queryParser.QueryParser
Constructs a query parser.
QueryParser(CharStream) - Constructor for class org.apache.lucene.queryParser.QueryParser
Constructor with user supplied CharStream.
QueryParser(QueryParserTokenManager) - Constructor for class org.apache.lucene.queryParser.QueryParser
Constructor with generated Token Manager.
QueryParser - Class in org.apache.lucene.queryParser.surround.parser
This class is generated by JavaCC.
QueryParser() - Constructor for class org.apache.lucene.queryParser.surround.parser.QueryParser

QueryParser(CharStream) - Constructor for class org.apache.lucene.queryParser.surround.parser.QueryParser
Constructor with user supplied CharStream.
QueryParser(QueryParserTokenManager) - Constructor for class org.apache.lucene.queryParser.surround.parser.QueryParser
Constructor with generated Token Manager.
QueryParser.Operator - Enum in org.apache.lucene.queryParser
The default operator for parsing queries.
QueryParserConstants - Interface in org.apache.lucene.queryParser
Token literal values and constants.
QueryParserConstants - Interface in org.apache.lucene.queryParser.surround.parser
Token literal values and constants.
QueryParserHelper - Class in org.apache.lucene.queryParser.core
This class is a helper for the query parser framework, it does all the three query parser phrases at once: text parsing, query processing and query building.
QueryParserHelper(QueryConfigHandler, SyntaxParser, QueryNodeProcessor, QueryBuilder) - Constructor for class org.apache.lucene.queryParser.core.QueryParserHelper
Creates a query parser helper object using the specified configuration, text parser, processor and builder.
QueryParserMessages - Class in org.apache.lucene.queryParser.core.messages
Flexible Query Parser message bundle class
QueryParserTestBase - Class in org.apache.lucene.queryParser
Base Test class for QueryParser subclasses
QueryParserTestBase() - Constructor for class org.apache.lucene.queryParser.QueryParserTestBase

QueryParserTestBase.QPTestAnalyzer - Class in org.apache.lucene.queryParser
Filters LowerCaseTokenizer with QPTestFilter.
QueryParserTestBase.QPTestAnalyzer() - Constructor for class org.apache.lucene.queryParser.QueryParserTestBase.QPTestAnalyzer

QueryParserTestBase.QPTestFilter - Class in org.apache.lucene.queryParser
Filter which discards the token 'stop' and which expands the token 'phrase' into 'phrase1 phrase2'
QueryParserTestBase.QPTestFilter(TokenStream) - Constructor for class org.apache.lucene.queryParser.QueryParserTestBase.QPTestFilter

QueryParserTestBase.QPTestParser - Class in org.apache.lucene.queryParser
Test QueryParser that does not allow fuzzy or wildcard queries.
QueryParserTestBase.QPTestParser(String, Analyzer) - Constructor for class org.apache.lucene.queryParser.QueryParserTestBase.QPTestParser

QueryParserTokenManager - Class in org.apache.lucene.queryParser
Token Manager.
QueryParserTokenManager(CharStream) - Constructor for class org.apache.lucene.queryParser.QueryParserTokenManager
Constructor.
QueryParserTokenManager(CharStream, int) - Constructor for class org.apache.lucene.queryParser.QueryParserTokenManager
Constructor.
QueryParserTokenManager - Class in org.apache.lucene.queryParser.surround.parser
Token Manager.
QueryParserTokenManager(CharStream) - Constructor for class org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager
Constructor.
QueryParserTokenManager(CharStream, int) - Constructor for class org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager
Constructor.
QueryParserUtil - Class in org.apache.lucene.queryParser.standard
This class defines utility methods to (help) parse query strings into Query objects.
QueryParserUtil() - Constructor for class org.apache.lucene.queryParser.standard.QueryParserUtil

QueryParserWrapper - Class in org.apache.lucene.queryParser.standard
Deprecated. this class will be removed soon, it's a temporary class to be used along the transition from the old query parser to the new one
QueryParserWrapper(String, Analyzer) - Constructor for class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
QueryParserWrapper.Operator - Enum in org.apache.lucene.queryParser.standard
Deprecated. The default operator for parsing queries.
QueryScorer - Class in org.apache.lucene.search.highlight
Scorer implementation which scores text fragments by the number of unique query terms found.
QueryScorer(Query) - Constructor for class org.apache.lucene.search.highlight.QueryScorer

QueryScorer(Query, String) - Constructor for class org.apache.lucene.search.highlight.QueryScorer

QueryScorer(Query, IndexReader, String) - Constructor for class org.apache.lucene.search.highlight.QueryScorer

QueryScorer(Query, IndexReader, String, String) - Constructor for class org.apache.lucene.search.highlight.QueryScorer

QueryScorer(Query, String, String) - Constructor for class org.apache.lucene.search.highlight.QueryScorer

QueryScorer(WeightedSpanTerm[]) - Constructor for class org.apache.lucene.search.highlight.QueryScorer

QueryTemplateManager - Class in org.apache.lucene.xmlparser
Provides utilities for turning query form input (such as from a web page or Swing gui) into Lucene XML queries by using XSL templates.
QueryTemplateManager() - Constructor for class org.apache.lucene.xmlparser.QueryTemplateManager

QueryTemplateManager(InputStream) - Constructor for class org.apache.lucene.xmlparser.QueryTemplateManager

QueryTermExtractor - Class in org.apache.lucene.search.highlight
Utility class used to extract the terms used in a query, plus any weights.
QueryTermExtractor() - Constructor for class org.apache.lucene.search.highlight.QueryTermExtractor

QueryTermScorer - Class in org.apache.lucene.search.highlight
Scorer implementation which scores text fragments by the number of unique query terms found.
QueryTermScorer(Query) - Constructor for class org.apache.lucene.search.highlight.QueryTermScorer

QueryTermScorer(Query, String) - Constructor for class org.apache.lucene.search.highlight.QueryTermScorer

QueryTermScorer(Query, IndexReader, String) - Constructor for class org.apache.lucene.search.highlight.QueryTermScorer

QueryTermScorer(WeightedTerm[]) - Constructor for class org.apache.lucene.search.highlight.QueryTermScorer

QueryTermVector - Class in org.apache.lucene.search

QueryTermVector(String[]) - Constructor for class org.apache.lucene.search.QueryTermVector

QueryTermVector(String, Analyzer) - Constructor for class org.apache.lucene.search.QueryTermVector

QueryTreeBuilder - Class in org.apache.lucene.queryParser.core.builders
This class should be used when there is a builder for each type of node.
QueryTreeBuilder() - Constructor for class org.apache.lucene.queryParser.core.builders.QueryTreeBuilder
QueryTreeBuilder constructor.
QueryUtils - Class in org.apache.lucene.search
Utility class for sanity-checking queries.
QueryUtils() - Constructor for class org.apache.lucene.search.QueryUtils

queryWeight - Variable in class org.apache.lucene.search.spans.SpanWeight

QueryWrapperFilter - Class in org.apache.lucene.search
Constrains search results to only match those which also match a provided query.
QueryWrapperFilter(Query) - Constructor for class org.apache.lucene.search.QueryWrapperFilter
Constructs a filter which only matches documents matching query.
quickSort(T[], int, int, Comparator<? super T>) - Static method in class org.apache.lucene.util.ArrayUtil
Sorts the given array slice using the Comparator.
quickSort(T[], Comparator<? super T>) - Static method in class org.apache.lucene.util.ArrayUtil
Sorts the given array using the Comparator.
quickSort(T[], int, int) - Static method in class org.apache.lucene.util.ArrayUtil
Sorts the given array slice in natural order.
quickSort(T[]) - Static method in class org.apache.lucene.util.ArrayUtil
Sorts the given array in natural order.
quickSort(List<T>, Comparator<? super T>) - Static method in class org.apache.lucene.util.CollectionUtil
Sorts the given random access List using the Comparator.
quickSort(List<T>) - Static method in class org.apache.lucene.util.CollectionUtil
Sorts the given random access List in natural order.
quickSort(int, int) - Method in class org.apache.lucene.util.SorterTemplate
Sorts via in-place, but unstable, QuickSort algorithm.
Quote1Text - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
Quote2Text - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
QUOTED - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
QUOTED - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
QUOTED - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
QuotedFieldQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A QuotedFieldQueryNode represents phrase query.
QuotedFieldQueryNode(CharSequence, CharSequence, int, int) - Constructor for class org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode

quoteEscape(String) - Static method in class org.apache.lucene.analysis.ja.util.CSVUtil
Quote and escape input value for CSV

R

RADIANS_TO_DEGREES - Static variable in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
RAMDirectory - Class in org.apache.lucene.store
A memory-resident Directory implementation.
RAMDirectory() - Constructor for class org.apache.lucene.store.RAMDirectory
Constructs an empty Directory.
RAMDirectory(Directory) - Constructor for class org.apache.lucene.store.RAMDirectory
Creates a new RAMDirectory instance from a different Directory implementation.
RAMFile - Class in org.apache.lucene.store

RAMFile() - Constructor for class org.apache.lucene.store.RAMFile

RAMInputStream - Class in org.apache.lucene.store
A memory-resident IndexInput implementation.
RAMInputStream(RAMFile) - Constructor for class org.apache.lucene.store.RAMInputStream
Deprecated.
RAMInputStream(String, RAMFile) - Constructor for class org.apache.lucene.store.RAMInputStream

RAMOutputStream - Class in org.apache.lucene.store
A memory-resident IndexOutput implementation.
RAMOutputStream() - Constructor for class org.apache.lucene.store.RAMOutputStream
Construct an empty output buffer.
RAMOutputStream(RAMFile) - Constructor for class org.apache.lucene.store.RAMOutputStream

ramSizeInBytes() - Method in class org.apache.lucene.index.IndexWriter
Expert: Return the total size of all index files currently cached in memory.
RamUsageEstimator - Class in org.apache.lucene.util
Estimates the size (memory representation) of Java objects.
RamUsageEstimator() - Constructor for class org.apache.lucene.util.RamUsageEstimator
Deprecated. Don't create instances of this class, instead use the static RamUsageEstimator.sizeOf(Object) method that has no intern checking, too.
RamUsageEstimator(boolean) - Constructor for class org.apache.lucene.util.RamUsageEstimator
Deprecated. Don't create instances of this class, instead use the static RamUsageEstimator.sizeOf(Object) method.
RamUsageEstimator.JvmFeature - Enum in org.apache.lucene.util
JVM diagnostic features.
RANDOM - Static variable in class org.apache.lucene.store.NativePosixUtil

random - Static variable in class org.apache.lucene.util.LuceneTestCase

RANDOM_MULTIPLIER - Static variable in class org.apache.lucene.util.LuceneTestCase
A random multiplier which you should use when writing random tests: multiply it by the number of iterations
randomDirectory(Random) - Static method in class org.apache.lucene.util.LuceneTestCase

RandomFacetSource - Class in org.apache.lucene.benchmark.byTask.feeds
Simple implementation of a random facet source
RandomFacetSource() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.RandomFacetSource

randomFilter() - Method in class org.apache.lucene.search.SearchEquivalenceTestBase
Returns a random filter over the document set
randomFixedByteLengthUnicodeString(Random, int) - Static method in class org.apache.lucene.util._TestUtil
Returns random string, with a given UTF-8 byte length
randomFixedLengthUnicodeString(Random, char[], int, int) - Static method in class org.apache.lucene.util._TestUtil
Fills provided char[] with valid random unicode code unit sequence.
randomHtmlishString(Random, int) - Static method in class org.apache.lucene.util._TestUtil

RandomIndexWriter - Class in org.apache.lucene.index
Silly class that randomizes the indexing experience.
RandomIndexWriter(Random, Directory) - Constructor for class org.apache.lucene.index.RandomIndexWriter
create a RandomIndexWriter with a random config: Uses TEST_VERSION_CURRENT and Whitespace+LowercasingAnalyzer
RandomIndexWriter(Random, Directory, Analyzer) - Constructor for class org.apache.lucene.index.RandomIndexWriter
create a RandomIndexWriter with a random config: Uses TEST_VERSION_CURRENT
RandomIndexWriter(Random, Directory, Version, Analyzer) - Constructor for class org.apache.lucene.index.RandomIndexWriter
create a RandomIndexWriter with a random config
RandomIndexWriter(Random, Directory, IndexWriterConfig) - Constructor for class org.apache.lucene.index.RandomIndexWriter
create a RandomIndexWriter with the provided config
randomLocale(Random) - Static method in class org.apache.lucene.util.LuceneTestCase
return a random Locale from the available locales on the system
randomlyRecaseCodePoints(Random, String) - Static method in class org.apache.lucene.util._TestUtil
Randomly upcases, downcases, or leaves intact each code point in the given string
randomRealisticUnicodeString(Random) - Static method in class org.apache.lucene.util._TestUtil
Returns random string of length between 0-20 codepoints, all codepoints within the same unicode block.
randomRealisticUnicodeString(Random, int) - Static method in class org.apache.lucene.util._TestUtil
Returns random string of length up to maxLength codepoints , all codepoints within the same unicode block.
randomRealisticUnicodeString(Random, int, int) - Static method in class org.apache.lucene.util._TestUtil
Returns random string of length between min and max codepoints, all codepoints within the same unicode block.
randomRegexpishString(Random) - Static method in class org.apache.lucene.util._TestUtil
Returns a String thats "regexpish" (contains lots of operators typically found in regular expressions) If you call this enough times, you might get a valid regex!
randomRegexpishString(Random, int) - Static method in class org.apache.lucene.util._TestUtil
Returns a String thats "regexpish" (contains lots of operators typically found in regular expressions) If you call this enough times, you might get a valid regex!
RandomSampler - Class in org.apache.lucene.facet.search.sampling
Simple random sampler
RandomSampler() - Constructor for class org.apache.lucene.facet.search.sampling.RandomSampler

RandomSampler(SamplingParams, Random) - Constructor for class org.apache.lucene.facet.search.sampling.RandomSampler

randomSimpleString(Random, int) - Static method in class org.apache.lucene.util._TestUtil

randomSimpleString(Random) - Static method in class org.apache.lucene.util._TestUtil

randomTerm() - Method in class org.apache.lucene.search.SearchEquivalenceTestBase
returns a term suitable for searching.
randomTimeZone(Random) - Static method in class org.apache.lucene.util.LuceneTestCase
return a random TimeZone from the available timezones on the system
randomUnicodeString(Random) - Static method in class org.apache.lucene.util._TestUtil
Returns random string, including full unicode range.
randomUnicodeString(Random, int) - Static method in class org.apache.lucene.util._TestUtil
Returns a random string up to a certain length.
range(int, int) - Method in class org.apache.lucene.index.SegmentInfos
Deprecated. use asList().subList(first, last) instead.
RANGE_COLLATOR - Static variable in class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Key used to set the Collator used when creating TermRangeQuerys.
RangeCollatorAttribute - Interface in org.apache.lucene.queryParser.standard.config
Deprecated.
RangeCollatorAttributeImpl - Class in org.apache.lucene.queryParser.standard.config
Deprecated.
RangeCollatorAttributeImpl() - Constructor for class org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl
Deprecated.
RangeEx - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
Lexical state.
RangeEx - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
Lexical state.
RANGEEX_END - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
RANGEEX_END - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
RANGEEX_GOOP - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
RANGEEX_GOOP - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
RANGEEX_QUOTED - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
RANGEEX_QUOTED - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
RANGEEX_START - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
RANGEEX_START - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
RANGEEX_TO - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
RANGEEX_TO - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
RangeFilterBuilder - Class in org.apache.lucene.xmlparser.builders

RangeFilterBuilder() - Constructor for class org.apache.lucene.xmlparser.builders.RangeFilterBuilder

RangeIn - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
Lexical state.
RangeIn - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
Lexical state.
RANGEIN_END - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
RANGEIN_END - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
RANGEIN_GOOP - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
RANGEIN_GOOP - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
RANGEIN_QUOTED - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
RANGEIN_QUOTED - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
RANGEIN_START - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
RANGEIN_START - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
RANGEIN_TO - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
RANGEIN_TO - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
RangeQueryNode<T extends FieldValuePairQueryNode<?>> - Interface in org.apache.lucene.queryParser.core.nodes
This interface should be implemented by a QueryNode that represents some kind of range query.
RangeQueryNode - Class in org.apache.lucene.queryParser.standard.nodes
Deprecated. this class will be removed in future, TermRangeQueryNode should be used instead
RangeQueryNode(ParametricQueryNode, ParametricQueryNode, Collator) - Constructor for class org.apache.lucene.queryParser.standard.nodes.RangeQueryNode
Deprecated.
RangeQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
Deprecated. this builder will be removed in future together with RangeQueryNode
RangeQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.RangeQueryNodeBuilder
Deprecated.
rarely(Random) - Static method in class org.apache.lucene.util.LuceneTestCase
Returns true if something should happen rarely,
rarely() - Static method in class org.apache.lucene.util.LuceneTestCase

rawTermDocs(Term) - Method in class org.apache.lucene.index.SegmentReader
Expert: returns an enumeration of the documents that contain term, including deleted documents (which are normally filtered out).
RawTermFilter - Class in org.apache.lucene.search.join
Expert: creates a filter accepting all documents containing the provided term, disregarding deleted documents.
RawTermFilter(Term) - Constructor for class org.apache.lucene.search.join.RawTermFilter

read() - Method in class org.apache.lucene.analysis.charfilter.HTMLStripCharFilter

read(char[], int, int) - Method in class org.apache.lucene.analysis.charfilter.HTMLStripCharFilter

read(char[], int, int) - Method in class org.apache.lucene.analysis.CharFilter

read(char[], int, int) - Method in class org.apache.lucene.analysis.CharReader

read(char[], int, int) - Method in class org.apache.lucene.analysis.fa.PersianCharFilter

read() - Method in class org.apache.lucene.analysis.MappingCharFilter

read(char[], int, int) - Method in class org.apache.lucene.analysis.MappingCharFilter

read() - Method in class org.apache.lucene.analysis.MockCharFilter

read(char[], int, int) - Method in class org.apache.lucene.analysis.MockCharFilter

read(char[], int, int) - Method in class org.apache.lucene.analysis.MockReaderWrapper

read() - Method in class org.apache.lucene.benchmark.byTask.utils.StringBuilderReader

read(char[], int, int) - Method in class org.apache.lucene.benchmark.byTask.utils.StringBuilderReader

read(int[], int[]) - Method in class org.apache.lucene.index.AbstractAllTermDocs

read(int[], int[]) - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermDocs

read(int[], int[]) - Method in class org.apache.lucene.index.MultipleTermPositions
Not implemented.
read(Directory, String) - Method in class org.apache.lucene.index.SegmentInfos
Read a particular segmentFileName.
read(Directory) - Method in class org.apache.lucene.index.SegmentInfos
This version of read uses the retry logic (for lock-less commits) to find the right segments file to load.
read(int[], int[]) - Method in interface org.apache.lucene.index.TermDocs
Attempts to read multiple entries from the enumeration, up to length of docs.
read(BytesRef) - Method in class org.apache.lucene.search.suggest.fst.Sort.ByteSequencesReader
Reads the next entry into the provided BytesRef.
read() - Method in class org.apache.lucene.search.suggest.fst.Sort.ByteSequencesReader
Reads the next entry and returns it if successful.
read(int[], int[]) - Method in class org.apache.lucene.store.instantiated.InstantiatedTermDocs

read(DataInput) - Method in class org.apache.lucene.util.fst.ByteSequenceOutputs

read(File, Outputs<T>) - Static method in class org.apache.lucene.util.fst.FST
Reads an automaton from a file.
read(DataInput) - Method in class org.apache.lucene.util.fst.IntSequenceOutputs

read(DataInput) - Method in class org.apache.lucene.util.fst.NoOutputs

read(DataInput) - Method in class org.apache.lucene.util.fst.Outputs

read(DataInput) - Method in class org.apache.lucene.util.fst.PairOutputs

read(DataInput) - Method in class org.apache.lucene.util.fst.PositiveIntOutputs

read(DataInput) - Method in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs

read() - Method in class org.apache.lucene.util.UnsafeByteArrayInputStream
Read a byte.
ReadByte() - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

readByte() - Method in class org.apache.lucene.store.BufferedIndexInput

readByte() - Method in class org.apache.lucene.store.ByteArrayDataInput

readByte() - Method in class org.apache.lucene.store.ChecksumIndexInput

readByte() - Method in class org.apache.lucene.store.DataInput
Reads and returns a single byte.
readByte() - Method in class org.apache.lucene.store.InputStreamDataInput

readByte() - Method in class org.apache.lucene.store.MockIndexInputWrapper

readByte() - Method in class org.apache.lucene.store.RAMInputStream

readByte() - Method in class org.apache.lucene.util.PagedBytes.PagedBytesDataInput

readBytes(byte[], int, int) - Method in class org.apache.lucene.store.BufferedIndexInput

readBytes(byte[], int, int, boolean) - Method in class org.apache.lucene.store.BufferedIndexInput

readBytes(byte[], int, int) - Method in class org.apache.lucene.store.ByteArrayDataInput

readBytes(byte[], int, int) - Method in class org.apache.lucene.store.ChecksumIndexInput

readBytes(byte[], int, int) - Method in class org.apache.lucene.store.DataInput
Reads a specified number of bytes into an array at the specified offset.
readBytes(byte[], int, int, boolean) - Method in class org.apache.lucene.store.DataInput
Reads a specified number of bytes into an array at the specified offset with control over whether the read should be buffered (callers who have their own buffer should pass in "false" for useBuffer).
readBytes(byte[], int, int) - Method in class org.apache.lucene.store.InputStreamDataInput

readBytes(byte[], int, int) - Method in class org.apache.lucene.store.MockIndexInputWrapper

readBytes(byte[], int, int, boolean) - Method in class org.apache.lucene.store.MockIndexInputWrapper

readBytes(byte[], int, int) - Method in class org.apache.lucene.store.RAMInputStream

readBytes(byte[], int, int) - Method in class org.apache.lucene.util.PagedBytes.PagedBytesDataInput

readChar() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Read a character.
readChar() - Method in interface org.apache.lucene.queryParser.CharStream
Returns the next character from the selected input.
readChar() - Method in class org.apache.lucene.queryParser.FastCharStream

readChar() - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Read a character.
readChar() - Method in interface org.apache.lucene.queryParser.surround.parser.CharStream
Returns the next character from the selected input.
readChar() - Method in class org.apache.lucene.queryParser.surround.parser.FastCharStream

readChars(char[], int, int) - Method in class org.apache.lucene.store.DataInput
Deprecated. -- please use readString or readBytes instead, and construct the string from those utf8 bytes
readChars(char[], int, int) - Method in class org.apache.lucene.store.MockIndexInputWrapper

readCodePoint() - Method in class org.apache.lucene.analysis.MockTokenizer

readCurrentVersion(Directory) - Static method in class org.apache.lucene.index.SegmentInfos
Deprecated. Load the SegmentInfos and then call SegmentInfos.getVersion().
reader - Variable in class org.apache.lucene.search.FieldCacheDocIdSet

reader - Variable in class org.apache.lucene.search.function.CustomScoreProvider

reader - Static variable in class org.apache.lucene.search.SearchEquivalenceTestBase

readerIndex(int) - Method in class org.apache.lucene.index.MultiReader

ReaderUtil - Class in org.apache.lucene.util
Common util methods for dealing with IndexReaders.
ReaderUtil.Gather - Class in org.apache.lucene.util
Recursively visits all sub-readers of a reader.
ReaderUtil.Gather(IndexReader) - Constructor for class org.apache.lucene.util.ReaderUtil.Gather

readerValue() - Method in class org.apache.lucene.document.Field
The value of the field as a Reader, or null.
readerValue() - Method in interface org.apache.lucene.document.Fieldable
The value of the field as a Reader, which can be used at index time to generate indexed tokens.
readerValue() - Method in class org.apache.lucene.document.NumericField
Returns always null for numeric fields
readFirstRealTargetArc(int, FST.Arc<T>, FST.BytesReader) - Method in class org.apache.lucene.util.fst.FST

readFirstTargetArc(FST.Arc<T>, FST.Arc<T>) - Method in class org.apache.lucene.util.fst.FST
Follow the follow arc and read the first arc of its target; this changes the provided arc (2nd arg) in-place and returns it.
ReadingAttribute - Interface in org.apache.lucene.analysis.ja.tokenattributes
Attribute for Kuromoji reading data
ReadingAttributeImpl - Class in org.apache.lucene.analysis.ja.tokenattributes
Attribute for Kuromoji reading data
ReadingAttributeImpl() - Constructor for class org.apache.lucene.analysis.ja.tokenattributes.ReadingAttributeImpl

readInt() - Method in class org.apache.lucene.store.BufferedIndexInput

readInt() - Method in class org.apache.lucene.store.ByteArrayDataInput

readInt() - Method in class org.apache.lucene.store.DataInput
Reads four bytes and returns an int.
readInt() - Method in class org.apache.lucene.store.MockIndexInputWrapper

readInternal(byte[], int, int) - Method in class org.apache.lucene.index.MockIndexInput

readInternal(byte[], int, int) - Method in class org.apache.lucene.store.BufferedIndexInput
Expert: implements buffer refill.
readInternal(byte[], int, int) - Method in class org.apache.lucene.store.NIOFSDirectory.NIOFSIndexInput

readInternal(byte[], int, int) - Method in class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput
IndexInput methods
readInternal(byte[], int, int) - Method in class org.apache.lucene.store.WindowsDirectory.WindowsIndexInput

readLastTargetArc(FST.Arc<T>, FST.Arc<T>) - Method in class org.apache.lucene.util.fst.FST
Follows the follow arc and reads the last arc of its target; this changes the provided arc (2nd arg) in-place and returns it.
readLong() - Method in class org.apache.lucene.store.BufferedIndexInput

readLong() - Method in class org.apache.lucene.store.ByteArrayDataInput

readLong() - Method in class org.apache.lucene.store.DataInput
Reads eight bytes and returns a long.
readLong() - Method in class org.apache.lucene.store.MockIndexInputWrapper

readNextArc(FST.Arc<T>) - Method in class org.apache.lucene.util.fst.FST
In-place read; returns the arc.
readNextArcLabel(FST.Arc<T>) - Method in class org.apache.lucene.util.fst.FST
Peeks at next arc's label; does not alter arc.
readNextRealArc(FST.Arc<T>, FST.BytesReader) - Method in class org.apache.lucene.util.fst.FST
Never returns null, but you should never call this if arc.isLast() is true.
readOnly - Variable in class org.apache.lucene.index.SegmentReader
Deprecated.
readQueries(BufferedReader) - Method in class org.apache.lucene.benchmark.quality.trec.Trec1MQReader
Read quality queries from trec 1MQ format topics file.
readQueries(BufferedReader) - Method in class org.apache.lucene.benchmark.quality.trec.TrecTopicsReader
Read quality queries from trec format topics file.
readResolve() - Method in class org.apache.lucene.util.Parameter
Deprecated. Resolves the deserialized instance to the local reference for accurate equals() and == comparisons.
readShort() - Method in class org.apache.lucene.store.BufferedIndexInput

readShort() - Method in class org.apache.lucene.store.ByteArrayDataInput

readShort() - Method in class org.apache.lucene.store.DataInput
Reads two bytes and returns a short.
readSnapshotsInfo(Directory) - Static method in class org.apache.lucene.index.PersistentSnapshotDeletionPolicy
Reads the snapshots information from the given Directory.
readString() - Method in class org.apache.lucene.store.DataInput
Reads a string.
readString() - Method in class org.apache.lucene.store.MockIndexInputWrapper

readStringStringMap() - Method in class org.apache.lucene.store.DataInput

readStringStringMap() - Method in class org.apache.lucene.store.MockIndexInputWrapper

ReadTask - Class in org.apache.lucene.benchmark.byTask.tasks
Read index (abstract) task.
ReadTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.ReadTask

readTime - Variable in class org.apache.lucene.search.suggest.fst.Sort.SortInfo

readToken(StringBuffer) - Method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser

ReadTokensTask - Class in org.apache.lucene.benchmark.byTask.tasks
Simple task to test performance of tokenizers.
ReadTokensTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.ReadTokensTask

readVInt() - Method in class org.apache.lucene.store.BufferedIndexInput

readVInt() - Method in class org.apache.lucene.store.ByteArrayDataInput

readVInt() - Method in class org.apache.lucene.store.DataInput
Reads an int stored in variable-length format.
readVInt() - Method in class org.apache.lucene.store.MockIndexInputWrapper

readVLong() - Method in class org.apache.lucene.store.BufferedIndexInput

readVLong() - Method in class org.apache.lucene.store.ByteArrayDataInput

readVLong() - Method in class org.apache.lucene.store.DataInput
Reads a long stored in variable-length format.
readVLong() - Method in class org.apache.lucene.store.MockIndexInputWrapper

ready() - Method in class org.apache.lucene.analysis.MockReaderWrapper

ready() - Method in class org.apache.lucene.benchmark.byTask.utils.StringBuilderReader

rearrangeFacetResult(FacetResult) - Method in class org.apache.lucene.facet.search.FacetResultsHandler
Perform any rearrangement as required on a facet result that has changed after it was rendered.
rearrangeFacetResult(FacetResult) - Method in class org.apache.lucene.facet.search.TopKFacetResultsHandler

rearrangeFacetResult(FacetResult) - Method in class org.apache.lucene.facet.search.TopKInEachNodeHandler

RECCNT - Static variable in class org.apache.lucene.benchmark.byTask.tasks.ReportTask

recompose(List) - Method in class org.apache.lucene.queryParser.surround.query.ComposedQuery

record(IndexSearcher) - Method in class org.apache.lucene.search.SearcherLifetimeManager
Records that you are now using this IndexSearcher.
RECSEC - Static variable in class org.apache.lucene.benchmark.byTask.tasks.ReportTask

Rectangle - Class in org.apache.lucene.spatial.geometry.shape
Deprecated.
Rectangle() - Constructor for class org.apache.lucene.spatial.geometry.shape.Rectangle
Deprecated.
Rectangle(Point2D, Point2D) - Constructor for class org.apache.lucene.spatial.geometry.shape.Rectangle
Deprecated.
Rectangle(double, double, double, double) - Constructor for class org.apache.lucene.spatial.geometry.shape.Rectangle
Deprecated.
recycleByteBlocks(byte[][], int, int) - Method in class org.apache.lucene.util.ByteBlockPool.Allocator

recycleByteBlocks(List<byte[]>) - Method in class org.apache.lucene.util.ByteBlockPool.Allocator

recycleByteBlocks(byte[][], int, int) - Method in class org.apache.lucene.util.ByteBlockPool.DirectAllocator

recycleByteBlocks(byte[][], int, int) - Method in class org.apache.lucene.util.ByteBlockPool.DirectTrackingAllocator

recycleByteBlocks(byte[][], int, int) - Method in class org.apache.lucene.util.RecyclingByteBlockAllocator

RecyclingByteBlockAllocator - Class in org.apache.lucene.util
A ByteBlockPool.Allocator implementation that recycles unused byte blocks in a buffer and reuses them in subsequent calls to RecyclingByteBlockAllocator.getByteBlock().
RecyclingByteBlockAllocator(int, int, AtomicLong) - Constructor for class org.apache.lucene.util.RecyclingByteBlockAllocator
Creates a new RecyclingByteBlockAllocator
RecyclingByteBlockAllocator(int, int) - Constructor for class org.apache.lucene.util.RecyclingByteBlockAllocator
Creates a new RecyclingByteBlockAllocator with a DummyConcurrentLock instance.
RecyclingByteBlockAllocator() - Constructor for class org.apache.lucene.util.RecyclingByteBlockAllocator
Creates a new RecyclingByteBlockAllocator with a block size of ByteBlockPool.BYTE_BLOCK_SIZE, upper buffered docs limit of RecyclingByteBlockAllocator.DEFAULT_BUFFERED_BLOCKS (64) and a DummyConcurrentLock instance.
reduce(Reduce) - Method in class org.egothor.stemmer.MultiTrie
Remove empty rows from the given Trie and return the newly reduced Trie.
reduce(Reduce) - Method in class org.egothor.stemmer.MultiTrie2
Remove empty rows from the given Trie and return the newly reduced Trie.
Reduce - Class in org.egothor.stemmer
The Reduce object is used to remove gaps in a Trie which stores a dictionary.
Reduce() - Constructor for class org.egothor.stemmer.Reduce
Constructor for the Reduce object.
reduce(Reduce) - Method in class org.egothor.stemmer.Trie
Remove empty rows from the given Trie and return the newly reduced Trie.
reduceOpenFiles(IndexWriter) - Static method in class org.apache.lucene.util._TestUtil
just tries to configure things to keep the open file count lowish
ReferenceManager<G> - Class in org.apache.lucene.search
Utility class to safely share instances of a certain type across multiple threads, while periodically refreshing them.
ReferenceManager() - Constructor for class org.apache.lucene.search.ReferenceManager

reflect(Class<? extends Attribute>, String, Object) - Method in interface org.apache.lucene.util.AttributeReflector
This method gets called for every property in an AttributeImpl/AttributeSource passing the class name of the Attribute, a key and the actual value.
reflectAsString(boolean) - Method in class org.apache.lucene.util.AttributeImpl
This method returns the current attribute values as a string in the following format by calling the AttributeImpl.reflectWith(AttributeReflector) method: iff prependAttClass=true: "AttributeClass#key=value,AttributeClass#key=value" iff prependAttClass=false: "key=value,key=value"
reflectAsString(boolean) - Method in class org.apache.lucene.util.AttributeSource
This method returns the current attribute values as a string in the following format by calling the AttributeSource.reflectWith(AttributeReflector) method: iff prependAttClass=true: "AttributeClass#key=value,AttributeClass#key=value" iff prependAttClass=false: "key=value,key=value"
reflectWith(AttributeReflector) - Method in class org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl

reflectWith(AttributeReflector) - Method in class org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttributeImpl

reflectWith(AttributeReflector) - Method in class org.apache.lucene.analysis.ja.tokenattributes.InflectionAttributeImpl

reflectWith(AttributeReflector) - Method in class org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttributeImpl

reflectWith(AttributeReflector) - Method in class org.apache.lucene.analysis.ja.tokenattributes.ReadingAttributeImpl

reflectWith(AttributeReflector) - Method in class org.apache.lucene.analysis.Token

reflectWith(AttributeReflector) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

reflectWith(AttributeReflector) - Method in class org.apache.lucene.util.AttributeImpl
This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.
reflectWith(AttributeReflector) - Method in class org.apache.lucene.util.AttributeSource
This method is for introspection of attributes, it should simply add the key/values this AttributeSource holds to the given AttributeReflector.
refresh() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader

refresh() - Method in interface org.apache.lucene.facet.taxonomy.TaxonomyReader
refresh() re-reads the taxonomy information if there were any changes to the taxonomy since this instance was opened or last refreshed.
refreshIfNeeded(IndexSearcher) - Method in class org.apache.lucene.search.NRTManager

refreshIfNeeded(G) - Method in class org.apache.lucene.search.ReferenceManager
Refresh the given reference if needed.
refreshIfNeeded(IndexSearcher) - Method in class org.apache.lucene.search.SearcherManager

RegexCapabilities - Interface in org.apache.lucene.search.regex
Defines basic operations needed by RegexQuery for a regular expression implementation.
RegexQuery - Class in org.apache.lucene.search.regex
Implements the regular expression term search query.
RegexQuery(Term) - Constructor for class org.apache.lucene.search.regex.RegexQuery
Constructs a query for terms matching term.
RegexQueryCapable - Interface in org.apache.lucene.search.regex
Defines methods for regular expression supporting Querys to use.
RegexTermEnum - Class in org.apache.lucene.search.regex
Subclass of FilteredTermEnum for enumerating all terms that match the specified regular expression term using the specified regular expression implementation.
RegexTermEnum(IndexReader, Term, RegexCapabilities) - Constructor for class org.apache.lucene.search.regex.RegexTermEnum

register(CategoryListParams, CategoryListData) - Method in class org.apache.lucene.facet.search.cache.CategoryListCache
Register a pre-computed CategoryListData.
registerSnapshotInfo(String, String, IndexCommit) - Method in class org.apache.lucene.index.SnapshotDeletionPolicy
Registers the given snapshot information.
rehash() - Method in class org.apache.lucene.search.grouping.SentinelIntSet

rehashCount - Variable in class org.apache.lucene.search.grouping.SentinelIntSet

reinit(char[], int, int, int, int, String) - Method in class org.apache.lucene.analysis.Token
Shorthand for calling Token.clear(), CharTermAttributeImpl.copyBuffer(char[], int, int), Token.setStartOffset(int), Token.setEndOffset(int), Token.setType(java.lang.String)
reinit(char[], int, int, int, int) - Method in class org.apache.lucene.analysis.Token
Shorthand for calling Token.clear(), CharTermAttributeImpl.copyBuffer(char[], int, int), Token.setStartOffset(int), Token.setEndOffset(int) Token.setType(java.lang.String) on Token.DEFAULT_TYPE
reinit(String, int, int, String) - Method in class org.apache.lucene.analysis.Token
Shorthand for calling Token.clear(), CharTermAttributeImpl.append(CharSequence), Token.setStartOffset(int), Token.setEndOffset(int) Token.setType(java.lang.String)
reinit(String, int, int, int, int, String) - Method in class org.apache.lucene.analysis.Token
Shorthand for calling Token.clear(), CharTermAttributeImpl.append(CharSequence, int, int), Token.setStartOffset(int), Token.setEndOffset(int) Token.setType(java.lang.String)
reinit(String, int, int) - Method in class org.apache.lucene.analysis.Token
Shorthand for calling Token.clear(), CharTermAttributeImpl.append(CharSequence), Token.setStartOffset(int), Token.setEndOffset(int) Token.setType(java.lang.String) on Token.DEFAULT_TYPE
reinit(String, int, int, int, int) - Method in class org.apache.lucene.analysis.Token
Shorthand for calling Token.clear(), CharTermAttributeImpl.append(CharSequence, int, int), Token.setStartOffset(int), Token.setEndOffset(int) Token.setType(java.lang.String) on Token.DEFAULT_TYPE
reinit(Token) - Method in class org.apache.lucene.analysis.Token
Copy the prototype token's fields into this one.
reinit(Token, String) - Method in class org.apache.lucene.analysis.Token
Copy the prototype token's fields into this one, with a different term.
reinit(Token, char[], int, int) - Method in class org.apache.lucene.analysis.Token
Copy the prototype token's fields into this one, with a different term.
ReInit(InputStream) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Reinitialise.
ReInit(InputStream, String) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Reinitialise.
ReInit(Reader) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Reinitialise.
ReInit(HTMLParserTokenManager) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Reinitialise.
ReInit(SimpleCharStream) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager
Reinitialise parser.
ReInit(SimpleCharStream, int) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager
Reinitialise parser.
ReInit(Reader, int, int, int) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Reinitialise.
ReInit(Reader, int, int) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Reinitialise.
ReInit(Reader) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Reinitialise.
ReInit(InputStream, String, int, int, int) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Reinitialise.
ReInit(InputStream, int, int, int) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Reinitialise.
ReInit(InputStream, String) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Reinitialise.
ReInit(InputStream) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Reinitialise.
ReInit(InputStream, String, int, int) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Reinitialise.
ReInit(InputStream, int, int) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Reinitialise.
reinit(boolean) - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

ReInit(CharStream) - Method in class org.apache.lucene.queryParser.QueryParser
Reinitialise.
ReInit(QueryParserTokenManager) - Method in class org.apache.lucene.queryParser.QueryParser
Reinitialise.
ReInit(CharStream) - Method in class org.apache.lucene.queryParser.QueryParserTokenManager
Reinitialise parser.
ReInit(CharStream, int) - Method in class org.apache.lucene.queryParser.QueryParserTokenManager
Reinitialise parser.
ReInit(Reader, int, int, int) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Reinitialise.
ReInit(Reader, int, int) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Reinitialise.
ReInit(Reader) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Reinitialise.
ReInit(InputStream, String, int, int, int) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Reinitialise.
ReInit(InputStream, int, int, int) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Reinitialise.
ReInit(InputStream, String, int, int) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Reinitialise.
ReInit(InputStream, int, int) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Reinitialise.
ReInit(InputStream, String) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Reinitialise.
ReInit(InputStream) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Reinitialise.
ReInit(InputStream) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Reinitialise.
ReInit(InputStream, String) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Reinitialise.
ReInit(Reader) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Reinitialise.
ReInit(StandardSyntaxParserTokenManager) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Reinitialise.
ReInit(JavaCharStream) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager
Reinitialise parser.
ReInit(JavaCharStream, int) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager
Reinitialise parser.
ReInit(CharStream) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser
Reinitialise.
ReInit(QueryParserTokenManager) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser
Reinitialise.
ReInit(CharStream) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager
Reinitialise parser.
ReInit(CharStream, int) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager
Reinitialise parser.
reinit() - Method in class org.apache.lucene.util.BytesRefHash
reinitializes the BytesRefHash after a previous BytesRefHash.clear() call.
reInit(OutputStream) - Method in class org.apache.lucene.util.encoding.ChunksIntEncoder

reInit(InputStream) - Method in class org.apache.lucene.util.encoding.DGapIntDecoder

reInit(OutputStream) - Method in class org.apache.lucene.util.encoding.DGapIntEncoder

reInit(InputStream) - Method in class org.apache.lucene.util.encoding.EightFlagsIntDecoder

reInit(InputStream) - Method in class org.apache.lucene.util.encoding.FourFlagsIntDecoder

reInit(InputStream) - Method in class org.apache.lucene.util.encoding.IntDecoder
Sets the input stream from which the encoded data is read.
reInit(OutputStream) - Method in class org.apache.lucene.util.encoding.IntEncoder
Reinitializes the encoder with the give OutputStream.
reInit(OutputStream) - Method in class org.apache.lucene.util.encoding.IntEncoderFilter

reInit(InputStream) - Method in class org.apache.lucene.util.encoding.NOnesIntDecoder

reInit(OutputStream) - Method in class org.apache.lucene.util.encoding.NOnesIntEncoder

reInit(OutputStream) - Method in class org.apache.lucene.util.encoding.SortingIntEncoder

reInit(OutputStream) - Method in class org.apache.lucene.util.encoding.UniqueValuesIntEncoder

reInit(byte[]) - Method in class org.apache.lucene.util.UnsafeByteArrayInputStream
Initialize the stream with a given buffer, using the default limits of [0, buffer.length)
reInit(byte[], int, int) - Method in class org.apache.lucene.util.UnsafeByteArrayInputStream
Initialize the stream with a given byte array as the source of the stream, at the specific range: [startPos, endPos)
reInit(byte[], int) - Method in class org.apache.lucene.util.UnsafeByteArrayOutputStream
For reuse-ability, this stream object can be re-initialized with another given buffer and starting position.
reInit(byte[]) - Method in class org.apache.lucene.util.UnsafeByteArrayOutputStream
For reuse-ability, this stream object can be re-initialized with another given buffer, using 0 as default starting position.
relatives - Variable in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode
The relative nodes.
release(String) - Method in class org.apache.lucene.index.PersistentSnapshotDeletionPolicy
Deletes a snapshotted commit by ID.
release(String) - Method in class org.apache.lucene.index.SnapshotDeletionPolicy
Release a snapshotted commit by ID.
release(G) - Method in class org.apache.lucene.search.ReferenceManager
Release the refernce previously obtained via ReferenceManager.acquire().
release(IndexSearcher) - Method in class org.apache.lucene.search.SearcherLifetimeManager
Release a searcher previously obtained from SearcherLifetimeManager.acquire(long).
release() - Method in class org.apache.lucene.store.Lock
Releases exclusive access.
releaseSearcher(IndexSearcher) - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

RELEVANCE - Static variable in class org.apache.lucene.search.Sort
Represents sorting by computed relevance.
RemoteCachingWrapperFilter - Class in org.apache.lucene.search
Deprecated. This package (all of contrib/remote) will be removed in 4.0.
RemoteCachingWrapperFilter(Filter) - Constructor for class org.apache.lucene.search.RemoteCachingWrapperFilter
Deprecated.
RemoteSearchable - Class in org.apache.lucene.search
Deprecated. This package (all of contrib/remote) will be removed in 4.0.
RemoteSearchable(Searchable) - Constructor for class org.apache.lucene.search.RemoteSearchable
Deprecated. Constructs and exports a remote searcher.
remove() - Method in class org.apache.lucene.analysis.CharArrayMap.EntryIterator

remove(Object) - Method in class org.apache.lucene.analysis.CharArrayMap.EntrySet

remove(Object) - Method in class org.apache.lucene.analysis.CharArrayMap

remove() - Method in class org.apache.lucene.analysis.CharArraySet.CharArraySetIterator
Deprecated.
remove() - Method in class org.apache.lucene.benchmark.byTask.feeds.DirContentSource.Iterator

remove(Class<? extends CategoryProperty>) - Method in interface org.apache.lucene.facet.index.attributes.CategoryAttribute
Remove an property of a certain property class.
remove(Class<? extends CategoryProperty>) - Method in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

remove(String[]) - Method in class org.apache.lucene.index.IndexSplitter

remove(SegmentInfo) - Method in class org.apache.lucene.index.SegmentInfos

remove(int) - Method in class org.apache.lucene.index.SegmentInfos

remove(Object) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

remove(int) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

remove(String) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Removes the value indexed by key.
remove(K) - Method in class org.apache.lucene.util.collections.ArrayHashMap
Removes a <key,value> pair from the map and returns the mapped value, or null if the none existed.
remove() - Method in interface org.apache.lucene.util.collections.DoubleIterator

remove() - Method in interface org.apache.lucene.util.collections.FloatIterator

remove(float) - Method in class org.apache.lucene.util.collections.FloatToObjectMap
Removes a <key,value> pair from the map and returns the mapped value, or null if the none existed.
remove(int) - Method in class org.apache.lucene.util.collections.IntHashSet
Remove a pair from the map, specified by it's key.
remove() - Method in interface org.apache.lucene.util.collections.IntIterator

remove(int) - Method in class org.apache.lucene.util.collections.IntToDoubleMap
Removes a <key,value> pair from the map and returns the mapped value, or Double.NaN if the none existed.
remove(int) - Method in class org.apache.lucene.util.collections.IntToIntMap
Removes a <key,value> pair from the map and returns the mapped value, or 0 if the none existed.
remove(int) - Method in class org.apache.lucene.util.collections.IntToObjectMap
Removes a <key,value> pair from the map and returns the mapped value, or null if the none existed.
remove(K) - Method in class org.apache.lucene.util.collections.ObjectToFloatMap
Removes a <key,value> pair from the map and returns the mapped value, or Float.NaN if the none existed.
remove(K) - Method in class org.apache.lucene.util.collections.ObjectToIntMap
Removes a <key,value> pair from the map and returns the mapped value, or 0 if the none existed.
remove(Object) - Method in class org.apache.lucene.util.MapBackedSet

remove(OpenBitSet) - Method in class org.apache.lucene.util.OpenBitSet
Remove all elements set in other.
remove(Object) - Method in class org.apache.lucene.util.WeakIdentityMap

removeAccents(char[], int) - Method in class org.apache.lucene.analysis.ISOLatin1AccentFilter
Deprecated. To replace accented characters in a String by unaccented equivalents.
removeAll(Collection<?>) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

removeCoreClosedListener(SegmentReader.CoreClosedListener) - Method in class org.apache.lucene.index.SegmentReader
Expert: removes a CoreClosedListener from this reader's shared core
RemoveDeletedQueryNodesProcessor - Class in org.apache.lucene.queryParser.core.processors
A QueryNodeProcessorPipeline class removes every instance of DeletedQueryNode from a query node tree.
RemoveDeletedQueryNodesProcessor() - Constructor for class org.apache.lucene.queryParser.core.processors.RemoveDeletedQueryNodesProcessor

removeEldestEntry(Map.Entry<K, V>) - Method in class org.apache.lucene.util.collections.LRUHashMap

RemoveEmptyNonLeafQueryNodeProcessor - Class in org.apache.lucene.queryParser.standard.processors
This processor removes every QueryNode that is not a leaf and has not children.
RemoveEmptyNonLeafQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.RemoveEmptyNonLeafQueryNodeProcessor

removeField(String) - Method in class org.apache.lucene.document.Document
Removes field with the specified name from the document.
removeFields(String) - Method in class org.apache.lucene.document.Document
Removes all fields with the given name from the document.
removeIndexInput(IndexInput, String) - Method in class org.apache.lucene.store.MockDirectoryWrapper

removeIndexOutput(IndexOutput, String) - Method in class org.apache.lucene.store.MockDirectoryWrapper

removeReaderClosedListener(IndexReader.ReaderClosedListener) - Method in class org.apache.lucene.index.IndexReader
Expert: remove a previously added IndexReader.ReaderClosedListener.
removeWaitingListener(NRTManager.WaitingListener) - Method in class org.apache.lucene.search.NRTManager
Remove a listener added with NRTManager.addWaitingListener(org.apache.lucene.search.NRTManager.WaitingListener).
renderFacetResult(IntermediateFacetResult) - Method in class org.apache.lucene.facet.search.FacetResultsHandler
Create a facet result from the temporary result.
renderFacetResult(IntermediateFacetResult) - Method in class org.apache.lucene.facet.search.TopKFacetResultsHandler

renderFacetResult(IntermediateFacetResult) - Method in class org.apache.lucene.facet.search.TopKInEachNodeHandler

reopen() - Method in class org.apache.lucene.index.IndexReader
Deprecated. Use IndexReader.openIfChanged(IndexReader) instead
reopen(boolean) - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.openIfChanged(IndexReader) instead
reopen(IndexCommit) - Method in class org.apache.lucene.index.IndexReader
Deprecated. Use IndexReader.openIfChanged(IndexReader,IndexCommit) instead
reopen(IndexWriter, boolean) - Method in class org.apache.lucene.index.IndexReader
Deprecated. Use IndexReader.openIfChanged(IndexReader,IndexWriter,boolean) instead
ReopenReaderTask - Class in org.apache.lucene.benchmark.byTask.tasks
Reopens IndexReader and closes old IndexReader.
ReopenReaderTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.ReopenReaderTask

RepAllTask - Class in org.apache.lucene.benchmark.byTask.tasks
Report all statistics with no aggregations.
RepAllTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.RepAllTask

REPEAT_EXHAUST - Static variable in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

RepeatableSampler - Class in org.apache.lucene.facet.search.sampling
Take random samples of large collections.
RepeatableSampler(SamplingParams) - Constructor for class org.apache.lucene.facet.search.sampling.RepeatableSampler

replace(char[], int) - Method in class org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule

replace_s(int, int, CharSequence) - Method in class org.tartarus.snowball.SnowballProgram

replace_s(int, int, String) - Method in class org.tartarus.snowball.SnowballProgram
Deprecated. for binary back compat. Will be removed in Lucene 4.0
replaceLast(int, Builder.Node, T, boolean) - Method in class org.apache.lucene.util.fst.Builder.UnCompiledNode

replacement - Variable in class org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule

replay(Collector) - Method in class org.apache.lucene.search.CachingCollector
Replays the cached doc IDs (and scores) to the given Collector.
Report - Class in org.apache.lucene.benchmark.byTask.stats
Textual report of current statistics.
Report(String, int, int, int) - Constructor for class org.apache.lucene.benchmark.byTask.stats.Report

report(QualityQuery, TopDocs, String, IndexSearcher) - Method in class org.apache.lucene.benchmark.quality.utils.SubmissionReport
Report a search result for a certain quality query.
reportAdditionalFailureInfo() - Method in class org.apache.lucene.util.LuceneTestCase

reportAll(List<TaskStats>) - Method in class org.apache.lucene.benchmark.byTask.tasks.RepAllTask
Report detailed statistics as a string
reportPartialFailureInfo() - Static method in class org.apache.lucene.util.LuceneTestCase

reportSelectByPrefix(List<TaskStats>) - Method in class org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask

reportSumByName(List<TaskStats>) - Method in class org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask
Report statistics as a string, aggregate for tasks named the same.
reportSumByNameRound(List<TaskStats>) - Method in class org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask
Report statistics as a string, aggregate for tasks named the same, and from the same round.
reportSumByPrefix(List<TaskStats>) - Method in class org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask

reportSumByPrefixRound(List<TaskStats>) - Method in class org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask

ReportTask - Class in org.apache.lucene.benchmark.byTask.tasks
Report (abstract) task - all report tasks extend this task.
ReportTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.ReportTask

RepSelectByPrefTask - Class in org.apache.lucene.benchmark.byTask.tasks
Report by-name-prefix statistics with no aggregations.
RepSelectByPrefTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask

RepSumByNameRoundTask - Class in org.apache.lucene.benchmark.byTask.tasks
Report all statistics grouped/aggregated by name and round.
RepSumByNameRoundTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask

RepSumByNameTask - Class in org.apache.lucene.benchmark.byTask.tasks
Report all statistics aggregated by name.
RepSumByNameTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask

RepSumByPrefRoundTask - Class in org.apache.lucene.benchmark.byTask.tasks
Report all prefix matching statistics grouped/aggregated by name and round.
RepSumByPrefRoundTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask

RepSumByPrefTask - Class in org.apache.lucene.benchmark.byTask.tasks
Report by-name-prefix statistics aggregated by name.
RepSumByPrefTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask

requireDocumentScore() - Method in class org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest

requireDocumentScore() - Method in class org.apache.lucene.facet.search.params.association.AssociationIntSumFacetRequest

requireDocumentScore() - Method in class org.apache.lucene.facet.search.params.CountFacetRequest

requireDocumentScore() - Method in class org.apache.lucene.facet.search.params.FacetRequest
Indicates whether the results of this request depends on each result document's score
requireDocumentScore() - Method in class org.apache.lucene.facet.search.params.ScoreFacetRequest

reserve(int) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

reset() - Method in class org.apache.lucene.analysis.CachingTokenFilter

reset() - Method in class org.apache.lucene.analysis.CharFilter

reset() - Method in class org.apache.lucene.analysis.CharReader

reset(Reader) - Method in class org.apache.lucene.analysis.CharTokenizer

reset() - Method in class org.apache.lucene.analysis.cjk.CJKBigramFilter

reset() - Method in class org.apache.lucene.analysis.cjk.CJKTokenizer
Deprecated.
reset(Reader) - Method in class org.apache.lucene.analysis.cjk.CJKTokenizer
Deprecated.
reset() - Method in class org.apache.lucene.analysis.cn.ChineseTokenizer
Deprecated.
reset(Reader) - Method in class org.apache.lucene.analysis.cn.ChineseTokenizer
Deprecated.
reset() - Method in class org.apache.lucene.analysis.cn.smart.SentenceTokenizer

reset(Reader) - Method in class org.apache.lucene.analysis.cn.smart.SentenceTokenizer

reset() - Method in class org.apache.lucene.analysis.cn.smart.WordTokenFilter

reset() - Method in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

reset() - Method in class org.apache.lucene.analysis.FilteringTokenFilter

reset() - Method in class org.apache.lucene.analysis.hunspell.HunspellStemFilter
Reset the filter as well as the input TokenStream.
reset() - Method in class org.apache.lucene.analysis.icu.segmentation.ICUTokenizer

reset(Reader) - Method in class org.apache.lucene.analysis.icu.segmentation.ICUTokenizer

reset(Reader) - Method in class org.apache.lucene.analysis.ja.JapaneseTokenizer

reset() - Method in class org.apache.lucene.analysis.ja.JapaneseTokenizer

reset(Reader) - Method in class org.apache.lucene.analysis.KeywordTokenizer

reset() - Method in class org.apache.lucene.analysis.LimitTokenCountFilter

reset() - Method in class org.apache.lucene.analysis.LookaheadTokenFilter.Position

reset() - Method in class org.apache.lucene.analysis.LookaheadTokenFilter

reset() - Method in class org.apache.lucene.analysis.miscellaneous.PrefixAndSuffixAwareTokenFilter

reset() - Method in class org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter

reset() - Method in class org.apache.lucene.analysis.miscellaneous.SingleTokenTokenStream

reset() - Method in class org.apache.lucene.analysis.MockGraphTokenFilter

reset() - Method in class org.apache.lucene.analysis.MockHoleInjectingTokenFilter

reset() - Method in class org.apache.lucene.analysis.MockRandomLookaheadTokenFilter

reset() - Method in class org.apache.lucene.analysis.MockTokenizer

reset(Reader) - Method in class org.apache.lucene.analysis.MockTokenizer

reset() - Method in class org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter

reset() - Method in class org.apache.lucene.analysis.ngram.EdgeNGramTokenizer

reset() - Method in class org.apache.lucene.analysis.ngram.NGramTokenFilter

reset() - Method in class org.apache.lucene.analysis.ngram.NGramTokenizer

reset() - Method in class org.apache.lucene.analysis.NumericTokenStream

reset() - Method in class org.apache.lucene.analysis.path.PathHierarchyTokenizer

reset() - Method in class org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

reset() - Method in class org.apache.lucene.analysis.phonetic.BeiderMorseFilter

reset() - Method in class org.apache.lucene.analysis.phonetic.DoubleMetaphoneFilter

reset() - Method in class org.apache.lucene.analysis.phonetic.PhoneticFilter

reset() - Method in class org.apache.lucene.analysis.position.PositionFilter

reset(Reader) - Method in class org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents
Resets the encapsulated components with the given reader.
reset() - Method in class org.apache.lucene.analysis.shingle.ShingleFilter

reset() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated.
reset() - Method in class org.apache.lucene.analysis.sinks.TokenRangeSinkFilter

reset(Reader) - Method in class org.apache.lucene.analysis.standard.ClassicTokenizer

reset(Reader) - Method in class org.apache.lucene.analysis.standard.StandardTokenizer

reset(Reader) - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

reset() - Method in class org.apache.lucene.analysis.synonym.SynonymFilter

reset() - Method in class org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter
Called by TeeSinkTokenFilter.SinkTokenStream.reset().
reset() - Method in class org.apache.lucene.analysis.TeeSinkTokenFilter.SinkTokenStream

reset() - Method in class org.apache.lucene.analysis.th.ThaiWordFilter

reset() - Method in class org.apache.lucene.analysis.TokenFilter
Reset the filter as well as the input TokenStream.
reset(Reader) - Method in class org.apache.lucene.analysis.Tokenizer
Expert: Reset the tokenizer to a new reader.
reset() - Method in class org.apache.lucene.analysis.TokenStream
Resets this stream to the beginning.
reset() - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

reset() - Method in class org.apache.lucene.analysis.ValidatingTokenFilter

reset() - Method in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

reset(Reader) - Method in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

reset() - Method in class org.apache.lucene.benchmark.byTask.utils.StringBuilderReader

reset() - Method in class org.apache.lucene.facet.index.CategoryListPayloadStream
Resets this stream to begin building a new payload.
reset() - Method in class org.apache.lucene.facet.index.streaming.CategoryAttributesStream

reset() - Method in class org.apache.lucene.facet.index.streaming.CategoryListTokenizer

reset(int, double) - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode
Reset a facet Result Node.
reset() - Method in class org.apache.lucene.search.highlight.OffsetLimitTokenFilter

reset() - Method in class org.apache.lucene.search.highlight.TokenStreamFromTermPositionVector

reset() - Method in class org.apache.lucene.spatial.tier.DistanceFilter
Deprecated. You must call this before re-using this DistanceFilter across searches
reset(byte[]) - Method in class org.apache.lucene.store.ByteArrayDataInput

reset(byte[], int, int) - Method in class org.apache.lucene.store.ByteArrayDataInput

reset(byte[]) - Method in class org.apache.lucene.store.ByteArrayDataOutput

reset(byte[], int, int) - Method in class org.apache.lucene.store.ByteArrayDataOutput

reset() - Method in class org.apache.lucene.store.MockDirectoryWrapper.Failure
reset should set the state of the failure to its default (freshly constructed) state.
reset() - Method in class org.apache.lucene.store.RAMOutputStream
Resets this to an empty file.
reset() - Method in class org.apache.lucene.util.ByteBlockPool

reset() - Method in class org.apache.lucene.util.CharacterUtils.CharacterBuffer
Resets the CharacterBuffer.
reset(Random) - Method in class org.apache.lucene.util.LineFileDocs

reset() - Method in class org.apache.lucene.util.RollingBuffer

reset() - Method in interface org.apache.lucene.util.RollingBuffer.Resettable

reset(Reader) - Method in class org.apache.lucene.util.RollingCharBuffer
Clear array and switch to new reader.
reset() - Method in class org.apache.lucene.util.UnsafeByteArrayInputStream
Resets the stream back to its original state.
resetInputs() - Method in class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker

resetInputs() - Method in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
Resets the input for this content source, so that the test would behave as if it was just started, input-wise.
resetInputs() - Method in class org.apache.lucene.benchmark.byTask.feeds.DirContentSource

resetInputs() - Method in class org.apache.lucene.benchmark.byTask.feeds.DocMaker
Reset inputs so that the test run would behave, input wise, as if it just started.
resetInputs() - Method in class org.apache.lucene.benchmark.byTask.feeds.EnwikiContentSource

resetInputs() - Method in class org.apache.lucene.benchmark.byTask.feeds.FacetSource

resetInputs() - Method in class org.apache.lucene.benchmark.byTask.feeds.LineDocSource

resetInputs() - Method in class org.apache.lucene.benchmark.byTask.feeds.LongToEnglishContentSource

resetInputs() - Method in class org.apache.lucene.benchmark.byTask.feeds.LongToEnglishQueryMaker

resetInputs() - Method in interface org.apache.lucene.benchmark.byTask.feeds.QueryMaker
Reset inputs so that the test run would behave, input wise, as if it just started.
resetInputs() - Method in class org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource

resetInputs() - Method in class org.apache.lucene.benchmark.byTask.feeds.SingleDocSource

resetInputs() - Method in class org.apache.lucene.benchmark.byTask.feeds.TrecContentSource

resetInputs() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

ResetInputsTask - Class in org.apache.lucene.benchmark.byTask.tasks
Reset inputs so that the test run would behave, input wise, as if it just started.
ResetInputsTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.ResetInputsTask

resetMaxUsedSizeInBytes() - Method in class org.apache.lucene.store.MockDirectoryWrapper

reSetNorms(String) - Method in class org.apache.lucene.index.FieldNormModifier
Deprecated. Resets the norms for the specified field.
ResetSystemEraseTask - Class in org.apache.lucene.benchmark.byTask.tasks
Reset all index and input data and call gc, erase index and dir, does NOT clear statistics.
ResetSystemEraseTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.ResetSystemEraseTask

ResetSystemSoftTask - Class in org.apache.lucene.benchmark.byTask.tasks
Reset all index and input data and call gc, does NOT erase index/dir, does NOT clear statistics.
ResetSystemSoftTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.ResetSystemSoftTask

resize(int) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

resize(int) - Method in class org.apache.lucene.util.packed.GrowableWriter

resizeBuffer(int) - Method in interface org.apache.lucene.analysis.tokenattributes.CharTermAttribute
Grows the termBuffer to at least size newSize, preserving the existing content.
resizeBuffer(int) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

resizeTermBuffer(int) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
Deprecated.
resizeTermBuffer(int) - Method in interface org.apache.lucene.analysis.tokenattributes.TermAttribute
Deprecated. Grows the termBuffer to at least size newSize, preserving the existing content.
resolveEntity(String, String) - Method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser

restoreState(AttributeSource.State) - Method in class org.apache.lucene.util.AttributeSource
Restores this state by copying the values of all attribute implementations that this state contains into the attributes implementations of the targetStream.
result - Variable in class org.apache.lucene.util.UnicodeUtil.UTF16Result

result - Variable in class org.apache.lucene.util.UnicodeUtil.UTF8Result

result - Variable in class org.tartarus.snowball.Among

ResultSortUtils - Class in org.apache.lucene.facet.util
Utilities for generating facet results sorted as required
ResultSortUtils() - Constructor for class org.apache.lucene.facet.util.ResultSortUtils

retainAll(Collection<?>) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

Rethrow - Class in org.apache.lucene.util
Sneaky: rethrowing checked exceptions as unchecked ones.
Rethrow() - Constructor for class org.apache.lucene.util.Rethrow

rethrow(Throwable) - Static method in class org.apache.lucene.util.Rethrow
Rethrows t (identical object).
retrieveDoc(IndexReader, int) - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask

retrieveDoc(IndexReader, int) - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetLoadFieldSelectorTask

retrieveGroup(int) - Method in class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector
Returns the group the specified doc belongs to or null if no group could be retrieved.
retrieveGroup(int) - Method in class org.apache.lucene.search.grouping.TermSecondPassGroupingCollector

retrieveGroupHeadAndAddIfNotExist(int) - Method in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector
Returns the group head and puts it into AbstractAllGroupHeadsCollector.temporalResult.
retrieveGroupHeads(int) - Method in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector

retrieveGroupHeads() - Method in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector

retrieveInterestingTerms(int) - Method in class org.apache.lucene.search.similar.MoreLikeThis

retrieveInterestingTerms(Reader, String) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Convenience routine to make it easy to return the most interesting words in a document.
retrieveInterestingTerms(Reader) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Deprecated. use MoreLikeThis.retrieveInterestingTerms(Reader, String) instead.
retrieveTerms(int) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Find words for a more-like-this query former.
retrieveTerms(Reader, String) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Find words for a more-like-this query former.
retrieveTerms(Reader) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Deprecated. use MoreLikeThis.retrieveTerms(Reader, String) instead
ReusableAnalyzerBase - Class in org.apache.lucene.analysis
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase() - Constructor for class org.apache.lucene.analysis.ReusableAnalyzerBase

ReusableAnalyzerBase.TokenStreamComponents - Class in org.apache.lucene.analysis
This class encapsulates the outer components of a token stream.
ReusableAnalyzerBase.TokenStreamComponents(Tokenizer, TokenStream) - Constructor for class org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance.
ReusableAnalyzerBase.TokenStreamComponents(Tokenizer) - Constructor for class org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance.
reusableTokenStream(String, Reader) - Method in class org.apache.lucene.analysis.Analyzer
Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method.
reusableTokenStream(String, Reader) - Method in class org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer

reusableTokenStream(String, Reader) - Method in class org.apache.lucene.analysis.LimitTokenCountAnalyzer

reusableTokenStream(String, Reader) - Method in class org.apache.lucene.analysis.MockAnalyzer

reusableTokenStream(String, Reader) - Method in class org.apache.lucene.analysis.PerFieldAnalyzerWrapper

reusableTokenStream(String, Reader) - Method in class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer

reusableTokenStream(String, Reader) - Method in class org.apache.lucene.analysis.ReusableAnalyzerBase
This method uses ReusableAnalyzerBase.createComponents(String, Reader) to obtain an instance of ReusableAnalyzerBase.TokenStreamComponents.
reusableTokenStream(String, Reader) - Method in class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper

reusableTokenStream(String, Reader) - Method in class org.apache.lucene.analysis.snowball.SnowballAnalyzer
Deprecated. Returns a (possibly reused) StandardTokenizer filtered by a StandardFilter, a LowerCaseFilter, a StopFilter, and a SnowballFilter
reusableTokenStream(String, Reader) - Method in class org.apache.lucene.collation.CollationKeyAnalyzer

reusableTokenStream(String, Reader) - Method in class org.apache.lucene.collation.ICUCollationKeyAnalyzer

reuseFields - Variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

ReutersContentSource - Class in org.apache.lucene.benchmark.byTask.feeds
A ContentSource reading from the Reuters collection.
ReutersContentSource() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource

ReutersQueryMaker - Class in org.apache.lucene.benchmark.byTask.feeds
A QueryMaker that makes queries devised manually (by Grant Ingersoll) for searching in the Reuters collection.
ReutersQueryMaker() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.ReutersQueryMaker

reverse(String) - Static method in class org.apache.lucene.analysis.reverse.ReverseStringFilter
Deprecated. use ReverseStringFilter.reverse(Version, String) instead. This method will be removed in Lucene 4.0
reverse(Version, String) - Static method in class org.apache.lucene.analysis.reverse.ReverseStringFilter
Reverses the given input string
reverse(char[]) - Static method in class org.apache.lucene.analysis.reverse.ReverseStringFilter
Deprecated. use ReverseStringFilter.reverse(Version, char[]) instead. This method will be removed in Lucene 4.0
reverse(Version, char[]) - Static method in class org.apache.lucene.analysis.reverse.ReverseStringFilter
Reverses the given input buffer in-place
reverse(char[], int) - Static method in class org.apache.lucene.analysis.reverse.ReverseStringFilter
Deprecated. use ReverseStringFilter.reverse(Version, char[], int) instead. This method will be removed in Lucene 4.0
reverse(Version, char[], int) - Static method in class org.apache.lucene.analysis.reverse.ReverseStringFilter
Partially reverses the given input buffer in-place from offset 0 up to the given length.
reverse(char[], int, int) - Static method in class org.apache.lucene.analysis.reverse.ReverseStringFilter
Deprecated. use ReverseStringFilter.reverse(Version, char[], int, int) instead. This method will be removed in Lucene 4.0
reverse(Version, char[], int, int) - Static method in class org.apache.lucene.analysis.reverse.ReverseStringFilter
Partially reverses the given input buffer in-place from the given offset up to the given length.
reversed - Variable in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector

reverseMul - Variable in class org.apache.lucene.search.FieldValueHitQueue

ReverseOrdFieldSource - Class in org.apache.lucene.search.function
Expert: obtains the ordinal of the field value from the default Lucene FieldCache using getStringIndex() and reverses the order.
ReverseOrdFieldSource(String) - Constructor for class org.apache.lucene.search.function.ReverseOrdFieldSource
Contructor for a certain field.
ReversePathHierarchyTokenizer - Class in org.apache.lucene.analysis.path
Tokenizer for domain-like hierarchies.
ReversePathHierarchyTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

ReversePathHierarchyTokenizer(Reader, int) - Constructor for class org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

ReversePathHierarchyTokenizer(Reader, int, char) - Constructor for class org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

ReversePathHierarchyTokenizer(Reader, char, char) - Constructor for class org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

ReversePathHierarchyTokenizer(Reader, int, char, char) - Constructor for class org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

ReversePathHierarchyTokenizer(Reader, char, int) - Constructor for class org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

ReversePathHierarchyTokenizer(Reader, char, char, int) - Constructor for class org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

ReversePathHierarchyTokenizer(Reader, int, char, char, int) - Constructor for class org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

ReverseStringFilter - Class in org.apache.lucene.analysis.reverse
Reverse token string, for example "country" => "yrtnuoc".
ReverseStringFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.reverse.ReverseStringFilter
Deprecated. use ReverseStringFilter.ReverseStringFilter(Version, TokenStream) instead. This constructor will be removed in Lucene 4.0
ReverseStringFilter(TokenStream, char) - Constructor for class org.apache.lucene.analysis.reverse.ReverseStringFilter
Deprecated. use ReverseStringFilter.ReverseStringFilter(Version, TokenStream, char) instead. This constructor will be removed in Lucene 4.0
ReverseStringFilter(Version, TokenStream) - Constructor for class org.apache.lucene.analysis.reverse.ReverseStringFilter
Create a new ReverseStringFilter that reverses all tokens in the supplied TokenStream.
ReverseStringFilter(Version, TokenStream, char) - Constructor for class org.apache.lucene.analysis.reverse.ReverseStringFilter
Create a new ReverseStringFilter that reverses and marks all tokens in the supplied TokenStream.
rewind() - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree.Iterator

rewrite(IndexReader) - Method in class org.apache.lucene.search.BooleanQuery

rewrite(IndexReader) - Method in class org.apache.lucene.search.BoostingQuery

rewrite(IndexReader) - Method in class org.apache.lucene.search.ConstantScoreQuery

rewrite(IndexReader) - Method in class org.apache.lucene.search.DisjunctionMaxQuery
Optimize our representation and our subqueries representations
rewrite(IndexReader) - Method in class org.apache.lucene.search.FilteredQuery
Rewrites the wrapped query.
rewrite(IndexReader) - Method in class org.apache.lucene.search.function.CustomScoreQuery

rewrite(IndexReader) - Method in class org.apache.lucene.search.function.ValueSourceQuery

rewrite(IndexReader) - Method in class org.apache.lucene.search.FuzzyLikeThisQuery

rewrite(Query) - Method in class org.apache.lucene.search.IndexSearcher
Expert: called to re-write queries into primitive queries.
rewrite(IndexReader) - Method in class org.apache.lucene.search.join.ToChildBlockJoinQuery

rewrite(IndexReader) - Method in class org.apache.lucene.search.join.ToParentBlockJoinQuery

rewrite(IndexReader) - Method in class org.apache.lucene.search.MultiPhraseQuery

rewrite(Query) - Method in class org.apache.lucene.search.MultiSearcher
Deprecated.
rewrite(IndexReader) - Method in class org.apache.lucene.search.MultiTermQuery
To rewrite to a simpler form, instead return a simpler enum from MultiTermQuery.getEnum(IndexReader).
rewrite(IndexReader, MultiTermQuery) - Method in class org.apache.lucene.search.MultiTermQuery.RewriteMethod

rewrite(IndexReader) - Method in class org.apache.lucene.search.NGramPhraseQuery

rewrite(IndexReader) - Method in class org.apache.lucene.search.PhraseQuery

rewrite(IndexReader) - Method in class org.apache.lucene.search.Query
Expert: called to re-write queries into primitive queries.
rewrite(Query) - Method in class org.apache.lucene.search.RemoteSearchable
Deprecated.
rewrite(IndexReader, MultiTermQuery) - Method in class org.apache.lucene.search.ScoringRewrite

rewrite(Query) - Method in interface org.apache.lucene.search.Searchable
Deprecated. Expert: called to re-write queries into primitive queries.
rewrite(Query) - Method in class org.apache.lucene.search.Searcher
Deprecated.
rewrite(IndexReader) - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

rewrite(IndexReader) - Method in class org.apache.lucene.search.spans.FieldMaskingSpanQuery

rewrite(IndexReader) - Method in class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper

rewrite(IndexReader, MultiTermQuery) - Method in class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod

rewrite(IndexReader, MultiTermQuery) - Method in class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite

rewrite(IndexReader) - Method in class org.apache.lucene.search.spans.SpanNearQuery

rewrite(IndexReader) - Method in class org.apache.lucene.search.spans.SpanNotQuery

rewrite(IndexReader) - Method in class org.apache.lucene.search.spans.SpanOrQuery

rewrite(IndexReader) - Method in class org.apache.lucene.search.spans.SpanPositionCheckQuery

rewrite(IndexReader, MultiTermQuery) - Method in class org.apache.lucene.search.TopTermsRewrite

rewriteMethod - Variable in class org.apache.lucene.search.MultiTermQuery

RIDFTermPruningPolicy - Class in org.apache.lucene.index.pruning
Implementation of TermPruningPolicy that uses "residual IDF" metric to determine the postings of terms to keep/remove, as defined in http://www.dc.fi.udc.es/~barreiro/publications/blanco_barreiro_ecir2007.pdf.
RIDFTermPruningPolicy(IndexReader, Map<String, Integer>, Map<String, Double>, double) - Constructor for class org.apache.lucene.index.pruning.RIDFTermPruningPolicy

RIGHT_ID - Static variable in class org.apache.lucene.analysis.ja.dict.UserDictionary

rmDir(File) - Static method in class org.apache.lucene.util._TestUtil
Deletes a directory and everything underneath it.
RMIRemoteSearchable - Interface in org.apache.lucene.search
Deprecated. This package (all of contrib/remote) will be removed in 4.0.
rollback() - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Rollback changes to the taxonomy writer and closes the instance.
rollback() - Method in class org.apache.lucene.index.IndexWriter
Close the IndexWriter without committing any changes that have occurred since the last commit (or since it was opened, if commit hasn't been called).
rollback() - Method in interface org.apache.lucene.util.TwoPhaseCommit
Discards any changes that have occurred since the last commit.
rollback() - Method in class org.apache.lucene.util.TwoPhaseCommitTool.TwoPhaseCommitWrapper

RollbackIndexTask - Class in org.apache.lucene.benchmark.byTask.tasks
Rollback the index writer.
RollbackIndexTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.RollbackIndexTask

RollingBuffer<T extends RollingBuffer.Resettable> - Class in org.apache.lucene.util
Acts like forever growing T[], but internally uses a circular buffer to reuse instances of T.
RollingBuffer() - Constructor for class org.apache.lucene.util.RollingBuffer

RollingBuffer.Resettable - Interface in org.apache.lucene.util

RollingCharBuffer - Class in org.apache.lucene.util
Acts like a forever growing char[] as you read characters into it from the provided reader, but internally it uses a circular buffer to only hold the characters that haven't been freed yet.
RollingCharBuffer() - Constructor for class org.apache.lucene.util.RollingCharBuffer

RomanianAnalyzer - Class in org.apache.lucene.analysis.ro
Analyzer for Romanian.
RomanianAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.ro.RomanianAnalyzer
Builds an analyzer with the default stop words: RomanianAnalyzer.DEFAULT_STOPWORD_FILE.
RomanianAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.ro.RomanianAnalyzer
Builds an analyzer with the given stop words.
RomanianAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.ro.RomanianAnalyzer
Builds an analyzer with the given stop words.
RomanianStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
RomanianStemmer() - Constructor for class org.tartarus.snowball.ext.RomanianStemmer

root - Variable in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

ROOT_ORDINAL - Static variable in interface org.apache.lucene.facet.taxonomy.TaxonomyReader
The root category (the category with the empty path) always has the ordinal 0, to which we give a name ROOT_ORDINAL.
ROUND - Static variable in class org.apache.lucene.benchmark.byTask.tasks.ReportTask

round(Date, DateTools.Resolution) - Static method in class org.apache.lucene.document.DateTools
Limit a date's resolution.
round(long, DateTools.Resolution) - Static method in class org.apache.lucene.document.DateTools
Limit a date's resolution.
Row - Class in org.egothor.stemmer
The Row class represents a row in a matrix representation of a trie.
Row(DataInput) - Constructor for class org.egothor.stemmer.Row
Construct a Row object from input carried in via the given input stream.
Row() - Constructor for class org.egothor.stemmer.Row
The default constructor for the Row object.
Row(Row) - Constructor for class org.egothor.stemmer.Row
Construct a Row using the cells of the given Row.
RPAREN - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
RPAREN - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
RPAREN - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
RSLPStemmerBase - Class in org.apache.lucene.analysis.pt
Base class for stemmers that use a set of RSLP-like stemming steps.
RSLPStemmerBase() - Constructor for class org.apache.lucene.analysis.pt.RSLPStemmerBase

RSLPStemmerBase.Rule - Class in org.apache.lucene.analysis.pt
A basic rule, with no exceptions.
RSLPStemmerBase.Rule(String, int, String) - Constructor for class org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule
Create a rule.
RSLPStemmerBase.RuleWithSetExceptions - Class in org.apache.lucene.analysis.pt
A rule with a set of whole-word exceptions.
RSLPStemmerBase.RuleWithSetExceptions(String, int, String, String[]) - Constructor for class org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSetExceptions

RSLPStemmerBase.RuleWithSuffixExceptions - Class in org.apache.lucene.analysis.pt
A rule with a set of exceptional suffixes.
RSLPStemmerBase.RuleWithSuffixExceptions(String, int, String, String[]) - Constructor for class org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSuffixExceptions

RSLPStemmerBase.Step - Class in org.apache.lucene.analysis.pt
A step containing a list of rules.
RSLPStemmerBase.Step(String, RSLPStemmerBase.Rule[], int, String[]) - Constructor for class org.apache.lucene.analysis.pt.RSLPStemmerBase.Step
Create a new step
RTL_DIRECTION_MARKER - Static variable in class org.apache.lucene.analysis.reverse.ReverseStringFilter
Example marker character: U+200F (RIGHT-TO-LEFT MARK)
ruleChain - Variable in class org.apache.lucene.util.LuceneTestCase
This controls how individual test rules are nested.
rules - Variable in class org.apache.lucene.analysis.pt.RSLPStemmerBase.Step

run() - Method in class org.apache.lucene.index.ConcurrentMergeScheduler.MergeThread

run(String[]) - Static method in class org.apache.lucene.index.pruning.PruningTool

run() - Method in class org.apache.lucene.index.SegmentInfos.FindSegmentsFile

run(IndexCommit) - Method in class org.apache.lucene.index.SegmentInfos.FindSegmentsFile

run() - Method in class org.apache.lucene.search.FilterManager.FilterCleaner
Deprecated.
run() - Method in class org.apache.lucene.search.NRTManagerReopenThread

run() - Method in class org.apache.lucene.search.TimeLimitingCollector.TimerThread

run() - Method in class org.apache.lucene.store.Lock.With
Calls Lock.With.doBody() while lock is obtained.
run() - Method in class org.apache.lucene.util.ReaderUtil.Gather

run(int) - Method in class org.apache.lucene.util.ReaderUtil.Gather

runAndMaybeStats(boolean) - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask
Run the task, record statistics.
runChild(FrameworkMethod, RunNotifier) - Method in class org.apache.lucene.util.LuceneTestCaseRunner

RUNCNT - Static variable in class org.apache.lucene.benchmark.byTask.tasks.ReportTask

runSearchThreads(long) - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

runTest(String) - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

RussianAnalyzer - Class in org.apache.lucene.analysis.ru
Analyzer for Russian language.
RussianAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.ru.RussianAnalyzer

RussianAnalyzer(Version, String...) - Constructor for class org.apache.lucene.analysis.ru.RussianAnalyzer
Deprecated. use RussianAnalyzer.RussianAnalyzer(Version, Set) instead
RussianAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.ru.RussianAnalyzer
Builds an analyzer with the given stop words
RussianAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.ru.RussianAnalyzer
Builds an analyzer with the given stop words
RussianAnalyzer(Version, Map<?, ?>) - Constructor for class org.apache.lucene.analysis.ru.RussianAnalyzer
Deprecated. use RussianAnalyzer.RussianAnalyzer(Version, Set) instead
RussianLetterTokenizer - Class in org.apache.lucene.analysis.ru
Deprecated. Use StandardTokenizer instead, which has the same functionality. This filter will be removed in Lucene 5.0
RussianLetterTokenizer(Version, Reader) - Constructor for class org.apache.lucene.analysis.ru.RussianLetterTokenizer
Deprecated. Construct a new RussianLetterTokenizer.
RussianLetterTokenizer(Version, AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.ru.RussianLetterTokenizer
Deprecated. Construct a new RussianLetterTokenizer using a given AttributeSource.
RussianLetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.ru.RussianLetterTokenizer
Deprecated. Construct a new RussianLetterTokenizer using a given AttributeSource.AttributeFactory.
RussianLetterTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.ru.RussianLetterTokenizer
Deprecated. use RussianLetterTokenizer.RussianLetterTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
RussianLetterTokenizer(AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.ru.RussianLetterTokenizer
Deprecated. use RussianLetterTokenizer.RussianLetterTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
RussianLetterTokenizer(AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.ru.RussianLetterTokenizer
Deprecated. use RussianLetterTokenizer.RussianLetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
RussianLightStemFilter - Class in org.apache.lucene.analysis.ru
A TokenFilter that applies RussianLightStemmer to stem Russian words.
RussianLightStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.ru.RussianLightStemFilter

RussianLightStemmer - Class in org.apache.lucene.analysis.ru
Light Stemmer for Russian.
RussianLightStemmer() - Constructor for class org.apache.lucene.analysis.ru.RussianLightStemmer

RussianLowerCaseFilter - Class in org.apache.lucene.analysis.ru
Deprecated. Use LowerCaseFilter instead, which has the same functionality. This filter will be removed in Lucene 4.0
RussianLowerCaseFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.ru.RussianLowerCaseFilter
Deprecated.
RussianStemFilter - Class in org.apache.lucene.analysis.ru
Deprecated. Use SnowballFilter with RussianStemmer instead, which has the same functionality. This filter will be removed in Lucene 4.0
RussianStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.ru.RussianStemFilter
Deprecated.
RussianStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
RussianStemmer() - Constructor for class org.tartarus.snowball.ext.RussianStemmer

S

s - Variable in class org.tartarus.snowball.Among

s1 - Static variable in class org.apache.lucene.search.SearchEquivalenceTestBase

s2 - Static variable in class org.apache.lucene.search.SearchEquivalenceTestBase

s_size - Variable in class org.tartarus.snowball.Among

sameRow - Static variable in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenPositioner
Deprecated.
Sample - Class in org.apache.lucene.benchmark.byTask.programmatic
Sample performance test written programmatically - no algorithm file is needed here.
Sample() - Constructor for class org.apache.lucene.benchmark.byTask.programmatic.Sample

SampleFixer - Interface in org.apache.lucene.facet.search.sampling
Fixer of sample facet accumulation results
Sampler - Class in org.apache.lucene.facet.search.sampling
Sampling definition for facets accumulation
Sampler() - Constructor for class org.apache.lucene.facet.search.sampling.Sampler
Construct with SamplingParams
Sampler(SamplingParams) - Constructor for class org.apache.lucene.facet.search.sampling.Sampler
Construct with certain SamplingParams
Sampler.SampleResult - Class in org.apache.lucene.facet.search.sampling
Result of sample computation
Sampler.SampleResult(ScoredDocIDs, double) - Constructor for class org.apache.lucene.facet.search.sampling.Sampler.SampleResult

SamplingAccumulator - Class in org.apache.lucene.facet.search.sampling
Facets accumulation with sampling.

SamplingAccumulator(Sampler, FacetSearchParams, IndexReader, TaxonomyReader, IntArrayAllocator, FloatArrayAllocator) - Constructor for class org.apache.lucene.facet.search.sampling.SamplingAccumulator
Constructor...
SamplingAccumulator(Sampler, FacetSearchParams, IndexReader, TaxonomyReader) - Constructor for class org.apache.lucene.facet.search.sampling.SamplingAccumulator
Constructor...
samplingParams - Variable in class org.apache.lucene.facet.search.sampling.Sampler

SamplingParams - Class in org.apache.lucene.facet.search.sampling
Parameters for sampling, dictating whether sampling is to take place and how.
SamplingParams() - Constructor for class org.apache.lucene.facet.search.sampling.SamplingParams

SamplingWrapper - Class in org.apache.lucene.facet.search
Wrap any Facets Accumulator with sampling.
SamplingWrapper(FacetsAccumulator, Sampler) - Constructor for class org.apache.lucene.facet.search.SamplingWrapper

save - Variable in class org.apache.lucene.analysis.phonetic.PhoneticFilter

save(DataOutput) - Method in class org.apache.lucene.util.fst.FST

save(File) - Method in class org.apache.lucene.util.fst.FST
Writes an automaton to a file.
sc - Variable in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree
The character stored in this node: splitchar.
SCALE_FACTOR - Static variable in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
SCALE_FACTOR_INT - Static variable in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
score(List<SegmentInfo>, boolean, long) - Method in class org.apache.lucene.index.TieredMergePolicy
Expert: scores one merge; subclasses can override.
score() - Method in class org.apache.lucene.search.ConstantScoreQuery.ConstantScorer

score(Collector) - Method in class org.apache.lucene.search.ConstantScoreQuery.ConstantScorer

score(Collector, int, int) - Method in class org.apache.lucene.search.ConstantScoreQuery.ConstantScorer

score() - Method in class org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanScorer

score() - Method in class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

score(Collector, int, int) - Method in class org.apache.lucene.search.ScoreCachingWrappingScorer

score() - Method in class org.apache.lucene.search.ScoreCachingWrappingScorer

score(Collector) - Method in class org.apache.lucene.search.ScoreCachingWrappingScorer

score - Variable in class org.apache.lucene.search.ScoreDoc
The score of this document for the query.
score(Collector) - Method in class org.apache.lucene.search.Scorer
Scores and collects all matching documents.
score(Collector, int, int) - Method in class org.apache.lucene.search.Scorer
Expert: Collects matching documents in a range.
score() - Method in class org.apache.lucene.search.Scorer
Returns the score of the current document matching the query.
SCORE - Static variable in class org.apache.lucene.search.SortField
Sort by document score (relevance).
score() - Method in class org.apache.lucene.search.spans.SpanScorer

score - Variable in class org.apache.lucene.search.spell.SuggestWord
the score of the word
SCORE_TOLERANCE_DELTA - Static variable in class org.apache.lucene.search.CheckHits.ExplanationAsserter
Deprecated.
ScoreCachingWrappingScorer - Class in org.apache.lucene.search
A Scorer which wraps another scorer and caches the score of the current document.
ScoreCachingWrappingScorer(Scorer) - Constructor for class org.apache.lucene.search.ScoreCachingWrappingScorer
Creates a new instance by wrapping the given scorer.
ScoredDocIdCollector - Class in org.apache.lucene.facet.search
A Collector which stores all docIDs and their scores in a ScoredDocIDs instance.
ScoredDocIDs - Interface in org.apache.lucene.facet.search
Document IDs with scores for each, driving facets accumulation.
scoredDocIdsIterator() - Method in class org.apache.lucene.facet.search.ScoredDocIdCollector

ScoredDocIDsIterator - Interface in org.apache.lucene.facet.search
Iterator over document IDs and their scores.
ScoredDocIdsUtils - Class in org.apache.lucene.facet.util
Utility methods for Scored Doc IDs.
ScoredDocIdsUtils() - Constructor for class org.apache.lucene.facet.util.ScoredDocIdsUtils

ScoreDoc - Class in org.apache.lucene.search
Holds one hit in TopDocs.
ScoreDoc(int, float) - Constructor for class org.apache.lucene.search.ScoreDoc
Constructs a ScoreDoc.
ScoreDoc(int, float, int) - Constructor for class org.apache.lucene.search.ScoreDoc
Constructs a ScoreDoc.
scoreDocs - Variable in class org.apache.lucene.search.grouping.GroupDocs
Hits; this may be FieldDoc instances if the withinGroupSort sorted by fields.
scoreDocs - Variable in class org.apache.lucene.search.TopDocs
The top hits for the query.
ScoreFacetRequest - Class in org.apache.lucene.facet.search.params
Facet request for weighting facets according to document scores.
ScoreFacetRequest(CategoryPath, int) - Constructor for class org.apache.lucene.facet.search.params.ScoreFacetRequest
Create a score facet request for a given node in the taxonomy.
ScoreOrderFragmentsBuilder - Class in org.apache.lucene.search.vectorhighlight
An implementation of FragmentsBuilder that outputs score-order fragments.
ScoreOrderFragmentsBuilder() - Constructor for class org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder
a constructor.
ScoreOrderFragmentsBuilder(String[], String[]) - Constructor for class org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder
a constructor.
ScoreOrderFragmentsBuilder(BoundaryScanner) - Constructor for class org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder

ScoreOrderFragmentsBuilder(String[], String[], BoundaryScanner) - Constructor for class org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder

ScoreOrderFragmentsBuilder.ScoreComparator - Class in org.apache.lucene.search.vectorhighlight

ScoreOrderFragmentsBuilder.ScoreComparator() - Constructor for class org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder.ScoreComparator

scorePayload(int, String, int, int, byte[], int, int) - Method in class org.apache.lucene.search.Similarity
Calculate a scoring factor based on the data in the payload.
scorePayload(int, String, int, int, byte[], int, int) - Method in class org.apache.lucene.search.SimilarityDelegator
Deprecated.
scorer(IndexReader, boolean, boolean) - Method in class org.apache.lucene.search.BooleanQuery.BooleanWeight

scorer(IndexReader, boolean, boolean) - Method in class org.apache.lucene.search.ConstantScoreQuery.ConstantWeight

scorer(IndexReader, boolean, boolean) - Method in class org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight
Create the scorer used to score our associated DisjunctionMaxQuery
Scorer - Interface in org.apache.lucene.search.highlight
A Scorer is responsible for scoring a stream of tokens.
scorer(IndexReader, boolean, boolean) - Method in class org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanWeight

scorer(IndexReader, boolean, boolean) - Method in class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight

Scorer - Class in org.apache.lucene.search
Expert: Common scoring functionality for different types of queries.
Scorer(Weight) - Constructor for class org.apache.lucene.search.Scorer
Constructs a Scorer
Scorer(Similarity) - Constructor for class org.apache.lucene.search.Scorer
Deprecated. Use Scorer.Scorer(Weight) instead.
Scorer(Similarity, Weight) - Constructor for class org.apache.lucene.search.Scorer
Deprecated. Use Scorer.Scorer(Weight) instead.
scorer(IndexReader, boolean, boolean) - Method in class org.apache.lucene.search.spans.SpanWeight

scorer(IndexReader, boolean, boolean) - Method in class org.apache.lucene.search.Weight
Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.
Scorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer> - Class in org.apache.lucene.search
A callback to gather information from a scorer and its sub-scorers.
Scorer.ScorerVisitor() - Constructor for class org.apache.lucene.search.Scorer.ScorerVisitor

ScorerDocQueue - Class in org.apache.lucene.util
A ScorerDocQueue maintains a partial ordering of its Scorers such that the least Scorer can always be found in constant time.
ScorerDocQueue(int) - Constructor for class org.apache.lucene.util.ScorerDocQueue
Create a ScorerDocQueue with a maximum size.
scoresDocsOutOfOrder() - Method in class org.apache.lucene.search.BooleanQuery.BooleanWeight

scoresDocsOutOfOrder() - Method in class org.apache.lucene.search.ConstantScoreQuery.ConstantWeight

scoresDocsOutOfOrder() - Method in class org.apache.lucene.search.Weight
Returns true iff this implementation scores docs only out of order.
SCORING_BOOLEAN_QUERY_REWRITE - Static variable in class org.apache.lucene.search.MultiTermQuery
A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.
SCORING_BOOLEAN_QUERY_REWRITE - Static variable in class org.apache.lucene.search.ScoringRewrite
A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.
SCORING_SPAN_QUERY_REWRITE - Static variable in class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper
A rewrite method that first translates each term into a SpanTermQuery in a BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.
ScoringAggregator - Class in org.apache.lucene.facet.search.aggregator
An Aggregator which updates the weight of a category according to the scores of the documents it was found in.
ScoringAggregator(float[]) - Constructor for class org.apache.lucene.facet.search.aggregator.ScoringAggregator

ScoringRewrite<Q extends Query> - Class in org.apache.lucene.search

ScoringRewrite() - Constructor for class org.apache.lucene.search.ScoringRewrite

ScriptAttribute - Interface in org.apache.lucene.analysis.icu.tokenattributes
This attribute stores the UTR #24 script value for a token of text.
ScriptAttributeImpl - Class in org.apache.lucene.analysis.icu.tokenattributes
Implementation of ScriptAttribute that stores the script as an integer.
ScriptAttributeImpl() - Constructor for class org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl

ScriptEnd - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
ScriptStart - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
ScriptTag() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser

ScriptText - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
search(Query) - Method in class org.apache.lucene.index.memory.MemoryIndex
Convenience method that efficiently returns the relevance score by matching this index against the given Lucene query expression.
search(Query, Filter, int, Sort) - Method in class org.apache.lucene.search.CheckHits.ExplanationAssertingSearcher

search(Query, Collector) - Method in class org.apache.lucene.search.CheckHits.ExplanationAssertingSearcher

search(Query, Filter, Collector) - Method in class org.apache.lucene.search.CheckHits.ExplanationAssertingSearcher

search(Query, Filter, int) - Method in class org.apache.lucene.search.CheckHits.ExplanationAssertingSearcher

search(Query, int) - Method in class org.apache.lucene.search.IndexSearcher
Finds the top n hits for query.
search(Query, Filter, int) - Method in class org.apache.lucene.search.IndexSearcher
Finds the top n hits for query, applying filter if non-null.
search(Query, Filter, Collector) - Method in class org.apache.lucene.search.IndexSearcher
Lower-level search API.
search(Query, Collector) - Method in class org.apache.lucene.search.IndexSearcher
Lower-level search API.
search(Query, Filter, int, Sort) - Method in class org.apache.lucene.search.IndexSearcher
Search implementation with arbitrary sorting.
search(Query, int, Sort) - Method in class org.apache.lucene.search.IndexSearcher
Search implementation with arbitrary sorting and no filter.
search(Weight, Filter, int) - Method in class org.apache.lucene.search.IndexSearcher
Expert: Low-level search implementation.
search(Weight, Filter, ScoreDoc, int) - Method in class org.apache.lucene.search.IndexSearcher
Expert: Low-level search implementation.
search(Weight, Filter, int, Sort) - Method in class org.apache.lucene.search.IndexSearcher
Expert: Low-level search implementation with arbitrary sorting.
search(Weight, Filter, int, Sort, boolean) - Method in class org.apache.lucene.search.IndexSearcher
Just like IndexSearcher.search(Weight, Filter, int, Sort), but you choose whether or not the fields in the returned FieldDoc instances should be set by specifying fillFields.
search(Weight, Filter, Collector) - Method in class org.apache.lucene.search.IndexSearcher
Lower-level search API.
search(Weight, Filter, int) - Method in class org.apache.lucene.search.MultiSearcher
Deprecated.
search(Weight, Filter, int, Sort) - Method in class org.apache.lucene.search.MultiSearcher
Deprecated.
search(Weight, Filter, Collector) - Method in class org.apache.lucene.search.MultiSearcher
Deprecated.
search(Weight, Filter, int) - Method in class org.apache.lucene.search.ParallelMultiSearcher
Deprecated. A search implementation which executes each Searchable in its own thread and waits for each search to complete and merge the results back together.
search(Weight, Filter, int, Sort) - Method in class org.apache.lucene.search.ParallelMultiSearcher
Deprecated. A search implementation allowing sorting which spans a new thread for each Searchable, waits for each search to complete and merges the results back together.
search(Weight, Filter, Collector) - Method in class org.apache.lucene.search.ParallelMultiSearcher
Deprecated. Lower-level search API.
search(Weight, Filter, Collector) - Method in class org.apache.lucene.search.RemoteSearchable
Deprecated.
search(Weight, Filter, int) - Method in class org.apache.lucene.search.RemoteSearchable
Deprecated.
search(Weight, Filter, int, Sort) - Method in class org.apache.lucene.search.RemoteSearchable
Deprecated.
search(Weight, Filter, Collector) - Method in interface org.apache.lucene.search.Searchable
Deprecated. Lower-level search API.
search(Weight, Filter, int) - Method in interface org.apache.lucene.search.Searchable
Deprecated. Expert: Low-level search implementation.
search(Weight, Filter, int, Sort) - Method in interface org.apache.lucene.search.Searchable
Deprecated. Expert: Low-level search implementation with arbitrary sorting.
search(Query, Filter, int, Sort) - Method in class org.apache.lucene.search.Searcher
Deprecated. Search implementation with arbitrary sorting.
search(Query, int, Sort) - Method in class org.apache.lucene.search.Searcher
Deprecated. Search implementation with arbitrary sorting and no filter.
search(Query, Collector) - Method in class org.apache.lucene.search.Searcher
Deprecated. Lower-level search API.
search(Query, Filter, Collector) - Method in class org.apache.lucene.search.Searcher
Deprecated. Lower-level search API.
search(Query, Filter, int) - Method in class org.apache.lucene.search.Searcher
Deprecated. Finds the top n hits for query, applying filter if non-null.
search(Query, int) - Method in class org.apache.lucene.search.Searcher
Deprecated. Finds the top n hits for query.
search(Weight, Filter, Collector) - Method in class org.apache.lucene.search.Searcher
Deprecated.
search(Weight, Filter, int) - Method in class org.apache.lucene.search.Searcher
Deprecated.
search(Weight, Filter, int, Sort) - Method in class org.apache.lucene.search.Searcher
Deprecated.
Searchable - Interface in org.apache.lucene.search
Deprecated. In 4.0 this interface is removed/absorbed into IndexSearcher
searchAfter(ScoreDoc, Query, int) - Method in class org.apache.lucene.search.IndexSearcher
Finds the top n hits for query where all results are after a previous result (after).
searchAfter(ScoreDoc, Query, Filter, int) - Method in class org.apache.lucene.search.IndexSearcher
Finds the top n hits for query, applying filter if non-null, where all results are after a previous result (after).
SearchEquivalenceTestBase - Class in org.apache.lucene.search
Simple base class for checking search equivalence.
SearchEquivalenceTestBase() - Constructor for class org.apache.lucene.search.SearchEquivalenceTestBase

searcher - Variable in class org.apache.lucene.benchmark.quality.QualityBenchmark
Index to be searched.
Searcher - Class in org.apache.lucene.search
Deprecated. In 4.0 this abstract class is removed/absorbed into IndexSearcher
Searcher() - Constructor for class org.apache.lucene.search.Searcher
Deprecated.
SearcherFactory - Class in org.apache.lucene.search
Factory class used by SearcherManager and NRTManager to create new IndexSearchers.
SearcherFactory() - Constructor for class org.apache.lucene.search.SearcherFactory

SearcherLifetimeManager - Class in org.apache.lucene.search
Keeps track of current plus old IndexSearchers, closing the old ones once they have timed out.
SearcherLifetimeManager() - Constructor for class org.apache.lucene.search.SearcherLifetimeManager

SearcherLifetimeManager.PruneByAge - Class in org.apache.lucene.search
Simple pruner that drops any searcher older by more than the specified seconds, than the newest searcher.
SearcherLifetimeManager.PruneByAge(double) - Constructor for class org.apache.lucene.search.SearcherLifetimeManager.PruneByAge

SearcherLifetimeManager.Pruner - Interface in org.apache.lucene.search
See SearcherLifetimeManager.prune(org.apache.lucene.search.SearcherLifetimeManager.Pruner).
SearcherManager - Class in org.apache.lucene.search
Utility class to safely share IndexSearcher instances across multiple threads, while periodically reopening.
SearcherManager(IndexWriter, boolean, SearcherFactory) - Constructor for class org.apache.lucene.search.SearcherManager
Creates and returns a new SearcherManager from the given IndexWriter.
SearcherManager(Directory, SearcherFactory) - Constructor for class org.apache.lucene.search.SearcherManager
Creates and returns a new SearcherManager from the given Directory.
SearchFiles - Class in org.apache.lucene.demo
Simple command-line based search demo.
SearchGroup<GROUP_VALUE_TYPE> - Class in org.apache.lucene.search.grouping
Represents a group that is found during the first pass search.
SearchGroup() - Constructor for class org.apache.lucene.search.grouping.SearchGroup

searchParams - Variable in class org.apache.lucene.facet.search.FacetsAccumulator

searchPatterns(char[], int, byte[]) - Method in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree
Search for all possible partial matches of word starting at index an update interletter values.
searchPhrase(List<FieldTermStack.TermInfo>) - Method in class org.apache.lucene.search.vectorhighlight.FieldQuery.QueryPhraseMap

searchPhrase(String, List<FieldTermStack.TermInfo>) - Method in class org.apache.lucene.search.vectorhighlight.FieldQuery

SearchTask - Class in org.apache.lucene.benchmark.byTask.tasks
Search task.
SearchTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.SearchTask

SearchTravRetHighlightTask - Class in org.apache.lucene.benchmark.byTask.tasks
Search and Traverse and Retrieve docs task.
SearchTravRetHighlightTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

SearchTravRetLoadFieldSelectorTask - Class in org.apache.lucene.benchmark.byTask.tasks
Search and Traverse and Retrieve docs task using a SetBasedFieldSelector.
SearchTravRetLoadFieldSelectorTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetLoadFieldSelectorTask

SearchTravRetTask - Class in org.apache.lucene.benchmark.byTask.tasks
Search and Traverse and Retrieve docs task.
SearchTravRetTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetTask

SearchTravRetVectorHighlightTask - Class in org.apache.lucene.benchmark.byTask.tasks
Search and Traverse and Retrieve docs task.
SearchTravRetVectorHighlightTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask

SearchTravTask - Class in org.apache.lucene.benchmark.byTask.tasks
Search and Traverse task.
SearchTravTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask

SearchWithCollectorTask - Class in org.apache.lucene.benchmark.byTask.tasks
Does search w/ a custom collector
SearchWithCollectorTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask

SearchWithSortTask - Class in org.apache.lucene.benchmark.byTask.tasks
Does sort search on specified field.
SearchWithSortTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask

second - Variable in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs.TwoLongs

secondRangeBeginningOriginal - Variable in class org.apache.lucene.analysis.CollationTestBase

secondRangeEndOriginal - Variable in class org.apache.lucene.analysis.CollationTestBase

seek(Term) - Method in class org.apache.lucene.index.AbstractAllTermDocs

seek(TermEnum) - Method in class org.apache.lucene.index.AbstractAllTermDocs

seek(Term) - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermDocs

seek(TermEnum) - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermDocs

seek(Term) - Method in class org.apache.lucene.index.MultipleTermPositions
Not implemented.
seek(TermEnum) - Method in class org.apache.lucene.index.MultipleTermPositions
Not implemented.
seek(Term) - Method in interface org.apache.lucene.index.TermDocs
Sets this to the data for a term.
seek(TermEnum) - Method in interface org.apache.lucene.index.TermDocs
Sets this to the data for the current term in a TermEnum.
seek(long) - Method in class org.apache.lucene.store.BufferedIndexInput

seek(long) - Method in class org.apache.lucene.store.BufferedIndexOutput
Sets current position in this file, where the next write will occur.
seek(long) - Method in class org.apache.lucene.store.ChecksumIndexInput

seek(long) - Method in class org.apache.lucene.store.ChecksumIndexOutput

seek(long) - Method in class org.apache.lucene.store.FSDirectory.FSIndexOutput
Random-access methods
seek(long) - Method in class org.apache.lucene.store.IndexInput
Sets current position in this file, where the next read will occur.
seek(long) - Method in class org.apache.lucene.store.IndexOutput
Sets current position in this file, where the next write will occur.
seek(Term) - Method in class org.apache.lucene.store.instantiated.InstantiatedTermDocs

seek(TermEnum) - Method in class org.apache.lucene.store.instantiated.InstantiatedTermDocs

seek(long) - Method in class org.apache.lucene.store.MockIndexInputWrapper

seek(long) - Method in class org.apache.lucene.store.MockIndexOutputWrapper

seek(long) - Method in class org.apache.lucene.store.RAMInputStream

seek(long) - Method in class org.apache.lucene.store.RAMOutputStream

seek(long) - Method in class org.apache.lucene.util.ThrottledIndexOutput

seekCeil(BytesRef) - Method in class org.apache.lucene.util.fst.BytesRefFSTEnum
Seeks to smallest term that's >= target.
seekCeil(IntsRef) - Method in class org.apache.lucene.util.fst.IntsRefFSTEnum
Seeks to smallest term that's >= target.
seekCeilingDocumentInformationIndex(int) - Method in class org.apache.lucene.store.instantiated.InstantiatedTerm
Finds index to the first beyond the current whose document number is greater than or equal to target, -1 if there is no such element.
seekCeilingDocumentInformationIndex(int, int) - Method in class org.apache.lucene.store.instantiated.InstantiatedTerm
Finds index to the first beyond the current whose document number is greater than or equal to target, -1 if there is no such element.
seekCeilingDocumentInformationIndex(int, int, int) - Method in class org.apache.lucene.store.instantiated.InstantiatedTerm
Finds index to the first beyond the current whose document number is greater than or equal to target, -1 if there is no such element.
seekExact(BytesRef) - Method in class org.apache.lucene.util.fst.BytesRefFSTEnum
Seeks to exactly this term, returning null if the term doesn't exist.
seekExact(IntsRef) - Method in class org.apache.lucene.util.fst.IntsRefFSTEnum
Seeks to exactly this term, returning null if the term doesn't exist.
seekFloor(BytesRef) - Method in class org.apache.lucene.util.fst.BytesRefFSTEnum
Seeks to biggest term that's <= target.
seekFloor(IntsRef) - Method in class org.apache.lucene.util.fst.IntsRefFSTEnum
Seeks to biggest term that's <= target.
seekInternal(long) - Method in class org.apache.lucene.index.MockIndexInput

seekInternal(long) - Method in class org.apache.lucene.store.BufferedIndexInput
Expert: implements seek.
seekInternal(long) - Method in class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput

seekInternal(long) - Method in class org.apache.lucene.store.WindowsDirectory.WindowsIndexInput

segDeletes - Variable in class org.apache.lucene.index.SegmentWriteState

segmentFileName(String, String) - Static method in class org.apache.lucene.index.IndexFileNames
Returns the file name that matches the given segment name and extension.
segmentFormat - Variable in class org.apache.lucene.index.CheckIndex.Status
String description of the version of the index.
SegmentInfo - Class in org.apache.lucene.index
Information about a segment such as it's name, directory, and files related to the segment.
SegmentInfo(String, int, Directory, boolean, boolean, boolean, boolean) - Constructor for class org.apache.lucene.index.SegmentInfo

segmentInfos - Variable in class org.apache.lucene.index.CheckIndex.Status
List of CheckIndex.Status.SegmentInfoStatus instances, detailing status of each segment.
SegmentInfos - Class in org.apache.lucene.index
A collection of segmentInfo objects with methods for operating on those segments in relation to the file system.
SegmentInfos() - Constructor for class org.apache.lucene.index.SegmentInfos

SegmentInfos.FindSegmentsFile - Class in org.apache.lucene.index
Utility class for executing code that needs to do something with the current segments file.
SegmentInfos.FindSegmentsFile(Directory) - Constructor for class org.apache.lucene.index.SegmentInfos.FindSegmentsFile

segmentName - Variable in class org.apache.lucene.index.SegmentWriteState

SegmentReader - Class in org.apache.lucene.index
IndexReader implementation over a single segment.
SegmentReader() - Constructor for class org.apache.lucene.index.SegmentReader

SegmentReader.CoreClosedListener - Interface in org.apache.lucene.index
Called when the shared core for this SegmentReader is closed.
SEGMENTS - Static variable in class org.apache.lucene.index.IndexFileNames
Name of the index segment file
segments - Variable in class org.apache.lucene.index.MergePolicy.OneMerge

SEGMENTS_GEN - Static variable in class org.apache.lucene.index.IndexFileNames
Name of the generation reference file name
segmentsChecked - Variable in class org.apache.lucene.index.CheckIndex.Status
Empty unless you passed specific segments list to check as optional 3rd argument.
segmentsFileName - Variable in class org.apache.lucene.index.CheckIndex.Status
Name of latest segments_N file in the index.
SegmentWriteState - Class in org.apache.lucene.index
Holder class for common parameters used during write.
SegmentWriteState(PrintStream, Directory, String, FieldInfos, int, int, BufferedDeletes) - Constructor for class org.apache.lucene.index.SegmentWriteState

segString() - Method in class org.apache.lucene.index.IndexWriter

segString(Iterable<SegmentInfo>) - Method in class org.apache.lucene.index.IndexWriter

segString(SegmentInfo) - Method in class org.apache.lucene.index.IndexWriter

segString(Directory) - Method in class org.apache.lucene.index.MergePolicy.MergeSpecification

segString(Directory) - Method in class org.apache.lucene.index.MergePolicy.OneMerge

SegToken - Class in org.apache.lucene.analysis.cn.smart.hhmm
SmartChineseAnalyzer internal token
SegToken(char[], int, int, int, int) - Constructor for class org.apache.lucene.analysis.cn.smart.hhmm.SegToken
Create a new SegToken from a character array.
SegTokenFilter - Class in org.apache.lucene.analysis.cn.smart.hhmm
Filters a SegToken by converting full-width latin to half-width, then lowercasing latin.
SegTokenFilter() - Constructor for class org.apache.lucene.analysis.cn.smart.hhmm.SegTokenFilter

SENTENCE_BEGIN - Static variable in class org.apache.lucene.analysis.cn.smart.WordType
Start of a Sentence
SENTENCE_END - Static variable in class org.apache.lucene.analysis.cn.smart.WordType
End of a Sentence
SentenceTokenizer - Class in org.apache.lucene.analysis.cn.smart
Tokenizes input text into sentences.
SentenceTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.cn.smart.SentenceTokenizer

SentenceTokenizer(AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.cn.smart.SentenceTokenizer

SentenceTokenizer(AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.cn.smart.SentenceTokenizer

SentinelIntSet - Class in org.apache.lucene.search.grouping
A native int set where one value is reserved to mean "EMPTY"
SentinelIntSet(int, int) - Constructor for class org.apache.lucene.search.grouping.SentinelIntSet

SEP - Static variable in class org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask

SEPARATE_NORMS_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of separate norms
SEQUENTIAL - Static variable in class org.apache.lucene.store.NativePosixUtil

serializeAppendTo(Appendable) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Write out a serialized (as a character sequence) representation of the path to a given Appendable (e.g., a StringBuilder, CharBuffer, Writer, or something similar.
serializeAppendTo(int, Appendable) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Just like CategoryPath.serializeAppendTo(Appendable), but writes only a prefix of the CategoryPath.
serializeCategoryAttribute(ObjectOutputStream, CategoryAttribute) - Method in class org.apache.lucene.facet.index.CategoryContainer
Serialize each of the CategoryAttributes to the given ObjectOutputStream.
NOTE: CategoryPropertys are Serializable, but do not assume that Lucene's Attributes are as well
serializeToStreamWriter(OutputStreamWriter) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Serializes the content of this CategoryPath to a byte stream, using UTF-8 encoding to convert characters to bytes, and treating the ends as 16-bit characters.
SerialMergeScheduler - Class in org.apache.lucene.index
A MergeScheduler that simply does each merge sequentially, using the current thread.
SerialMergeScheduler() - Constructor for class org.apache.lucene.index.SerialMergeScheduler

set(char[], int) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

set(String, String) - Method in class org.apache.lucene.benchmark.byTask.utils.Config
Set a property.
set(StringBuilder) - Method in class org.apache.lucene.benchmark.byTask.utils.StringBuilderReader

set(CategoryAttribute) - Method in interface org.apache.lucene.facet.index.attributes.CategoryAttribute
Set the content of this CategoryAttribute from another CategoryAttribute object.
set(CategoryAttribute) - Method in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

set(ConfigurationKey<T>, T) - Method in class org.apache.lucene.queryParser.core.config.AbstractQueryConfig
Sets a key and its value.
set(List<QueryNode>) - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode

set(List<QueryNode>) - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

set(int, QueryNodeProcessor) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

set(double, double) - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
set(Point2D) - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
set(Vector2D) - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
set(double, double) - Method in class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated.
set(int) - Method in class org.apache.lucene.util.BitVector
Sets the value of bit to one.
set(T) - Method in class org.apache.lucene.util.CloseableThreadLocal

set(int, int) - Method in class org.apache.lucene.util.collections.IntArray

set(int) - Method in class org.apache.lucene.util.FixedBitSet

set(int, int) - Method in class org.apache.lucene.util.FixedBitSet
Sets a range of bits
set(long) - Method in class org.apache.lucene.util.OpenBitSet
sets a bit, expanding the set size if necessary
set(long, long) - Method in class org.apache.lucene.util.OpenBitSet
Sets a range of bits, expanding the set size if necessary
set(int, long) - Method in class org.apache.lucene.util.packed.GrowableWriter

set(int, long) - Method in interface org.apache.lucene.util.packed.PackedInts.Mutable
Set the value at the given index in the array.
set(T) - Method in class org.apache.lucene.util.SetOnce
Sets the given object.
setAccuracy(float) - Method in class org.apache.lucene.search.spell.SpellChecker
Sets the accuracy 0 < minScore < 1; default SpellChecker.DEFAULT_ACCURACY
setAllowArrayArcs(boolean) - Method in class org.apache.lucene.util.fst.Builder
Pass false to disable the array arc optimization while building the FST; this will make the resulting FST smaller but slower to traverse.
setAllowArrayArcs(boolean) - Method in class org.apache.lucene.util.fst.FST

setAllowLabeling(boolean) - Method in class org.apache.lucene.facet.search.FacetsAccumulator
Set whether labeling is allowed for this accumulator.
setAllowLabeling(boolean) - Method in class org.apache.lucene.facet.search.SamplingWrapper

setAllowLeadingWildcard(boolean) - Method in class org.apache.lucene.queryParser.QueryParser
Set to true to allow leading wildcard characters.
setAllowLeadingWildcard(boolean) - Method in interface org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttribute
Deprecated.
setAllowLeadingWildcard(boolean) - Method in class org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl
Deprecated.
setAllowLeadingWildcard(boolean) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
setAllowLeadingWildcard(boolean) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Set to true to allow leading wildcard characters.
setAnalyzer(Analyzer) - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

setAnalyzer(Analyzer) - Method in interface org.apache.lucene.queryParser.standard.config.AnalyzerAttribute
Deprecated.
setAnalyzer(Analyzer) - Method in class org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl
Deprecated.
setAnalyzer(Analyzer) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser

setAnalyzer(Analyzer) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Sets the analyzer to use.
setAnalyzer(Analyzer) - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

setAppend(String) - Method in class org.apache.lucene.analysis.hunspell.HunspellAffix
Sets the append defined for the affix
setAppendFlags(char[]) - Method in class org.apache.lucene.analysis.hunspell.HunspellAffix
Sets the flags defined for the affix append
setArticles(Version, Set<?>) - Method in class org.apache.lucene.analysis.fr.ElisionFilter
Deprecated. use ElisionFilter.ElisionFilter(Version, TokenStream, Set) instead
setArticles(Set<?>) - Method in class org.apache.lucene.analysis.fr.ElisionFilter
Deprecated. use ElisionFilter.setArticles(Version, Set) instead
setAssertNoUnrefencedFilesOnClose(boolean) - Method in class org.apache.lucene.store.MockDirectoryWrapper

setAutoGeneratePhraseQueries(boolean) - Method in class org.apache.lucene.queryParser.QueryParser
Set to true if phrase queries will be automatically generated when the analyzer returns more than one term from whitespace delimited text.
SetBasedFieldSelector - Class in org.apache.lucene.document
Declare what fields to load normally and what fields to load lazily
SetBasedFieldSelector(Set<String>, Set<String>) - Constructor for class org.apache.lucene.document.SetBasedFieldSelector
Pass in the Set of Field names to load and the Set of Field names to load lazily.
setBaseline(long) - Method in class org.apache.lucene.search.TimeLimitingCollector
Sets the baseline for this collector.
setBaseline() - Method in class org.apache.lucene.search.TimeLimitingCollector
Syntactic sugar for TimeLimitingCollector.setBaseline(long) using Counter.get() on the clock passed to the construcutor.
setBaselineTfFactors(float, float) - Method in class org.apache.lucene.misc.SweetSpotSimilarity
Sets the baseline and minimum function variables for baselineTf
setBegin(int) - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

setBeginColumn(int) - Method in exception org.apache.lucene.queryParser.core.QueryNodeParseException

setBeginLine(int) - Method in exception org.apache.lucene.queryParser.core.QueryNodeParseException

setBits(long[]) - Method in class org.apache.lucene.util.OpenBitSet
Expert: sets a new long[] to use as the bit storage
setBody(String) - Method in class org.apache.lucene.benchmark.byTask.feeds.DocData

setBoost(float) - Method in class org.apache.lucene.document.AbstractField
Sets the boost factor hits on this field.
setBoost(float) - Method in class org.apache.lucene.document.Document
Sets a boost factor for hits on any field of this document.
setBoost(float) - Method in interface org.apache.lucene.document.Fieldable
Sets the boost factor hits on this field.
setBoost(float) - Method in class org.apache.lucene.index.FieldInvertState

setBoost(float) - Method in interface org.apache.lucene.queryParser.standard.config.BoostAttribute
Deprecated.
setBoost(float) - Method in class org.apache.lucene.queryParser.standard.config.BoostAttributeImpl
Deprecated.
setBoost(float) - Method in class org.apache.lucene.search.Query
Sets the boost for this query clause to b.
setBoost(boolean) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Sets whether to boost terms in query based on "score" or not.
setBoostFactor(float) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Sets the boost factor to use when boosting terms
setBottom(int) - Method in class org.apache.lucene.search.FieldComparator.ByteComparator

setBottom(int) - Method in class org.apache.lucene.search.FieldComparator.DocComparator

setBottom(int) - Method in class org.apache.lucene.search.FieldComparator.DoubleComparator

setBottom(int) - Method in class org.apache.lucene.search.FieldComparator.FloatComparator

setBottom(int) - Method in class org.apache.lucene.search.FieldComparator.IntComparator

setBottom(int) - Method in class org.apache.lucene.search.FieldComparator.LongComparator

setBottom(int) - Method in class org.apache.lucene.search.FieldComparator.RelevanceComparator

setBottom(int) - Method in class org.apache.lucene.search.FieldComparator
Set the bottom slot, ie the "weakest" (sorted last) entry in the queue.
setBottom(int) - Method in class org.apache.lucene.search.FieldComparator.ShortComparator

setBottom(int) - Method in class org.apache.lucene.search.FieldComparator.StringComparatorLocale

setBottom(int) - Method in class org.apache.lucene.search.FieldComparator.StringOrdValComparator

setBottom(int) - Method in class org.apache.lucene.search.FieldComparator.StringValComparator

setBounds(T, T, boolean, boolean) - Method in class org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode
Sets the lower and upper bounds.
setBounds(NumericQueryNode, NumericQueryNode, boolean, boolean, NumericConfig) - Method in class org.apache.lucene.queryParser.standard.nodes.NumericRangeQueryNode
Sets the upper and lower bounds of this range query node and the NumericConfig associated with these bounds.
setBounds(FieldQueryNode, FieldQueryNode, boolean, boolean) - Method in class org.apache.lucene.queryParser.standard.nodes.RangeQueryNode
Deprecated. Sets lower and upper bounds.
setBufferSize(int) - Method in class org.apache.lucene.store.BufferedIndexInput
Change the buffer size used by this IndexInput
setBuilder(String, QueryBuilder) - Method in class org.apache.lucene.queryParser.core.builders.QueryTreeBuilder
Associates a field name with a builder.
setBuilder(CharSequence, QueryBuilder) - Method in class org.apache.lucene.queryParser.core.builders.QueryTreeBuilder
Deprecated. use QueryTreeBuilder.setBuilder(String, QueryBuilder) instead
setBuilder(Class<? extends QueryNode>, QueryBuilder) - Method in class org.apache.lucene.queryParser.core.builders.QueryTreeBuilder
Associates a class with a builder
setBytesRef(BytesRef, int) - Method in class org.apache.lucene.util.ByteBlockPool

setCacheMissesUntilFill(int) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Set the number of cache misses before an attempt is made to read the entire taxonomy into the in-memory cache.
setCacheSize(int) - Method in class org.apache.lucene.facet.search.TotalFacetCountsCache
Set the number of TotalFacetCounts arrays that will remain in memory cache.
setCacheSize(int) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader
setCacheSize controls the maximum allowed size of each of the caches used by DirectoryTaxonomyReader.getPath(int) and DirectoryTaxonomyReader.getOrdinal(CategoryPath).
setCacheSize(int) - Method in class org.apache.lucene.search.FilterManager
Deprecated. Sets the max size that cache should reach before it is cleaned up
setCalibrateSizeByDeletes(boolean) - Method in class org.apache.lucene.index.LogMergePolicy
Sets whether the segment size should be calibrated by the number of deletes when choosing segments for merge.
setCategories(Iterable<CategoryAttribute>) - Method in class org.apache.lucene.facet.index.CategoryDocumentBuilder
Set the categories of the document builder from an Iterable of CategoryAttribute objects.
setCategoryPath(CategoryPath) - Method in interface org.apache.lucene.facet.index.attributes.CategoryAttribute
Sets the category path value of this attribute.
setCategoryPath(CategoryPath) - Method in class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

setCategoryPaths(Iterable<CategoryPath>) - Method in class org.apache.lucene.facet.index.CategoryDocumentBuilder
Set the categories of the document builder from an Iterable of CategoryPath objects.
setCharAt(int, char) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

setCheckIndexOnClose(boolean) - Method in class org.apache.lucene.store.MockDirectoryWrapper
Set whether or not checkindex should be run on close
setChild(QueryNode) - Method in class org.apache.lucene.queryParser.core.nodes.GroupQueryNode

setChild(QueryNode) - Method in class org.apache.lucene.queryParser.core.nodes.ModifierQueryNode

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.core.processors.NoChildOptimizationQueryNodeProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
This method is invoked for every node that has at least on child.
setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.core.processors.RemoveDeletedQueryNodesProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.precedence.processors.BooleanModifiersQueryNodeProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.AllowLeadingWildcardProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.AnalyzerQueryNodeProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.BooleanSingleChildOptimizationQueryNodeProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.BoostQueryNodeProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.DefaultPhraseSlopQueryNodeProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.FuzzyQueryNodeProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.LowercaseExpandedTermsQueryNodeProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.MatchAllDocsQueryNodeProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.MultiFieldQueryNodeProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.MultiTermRewriteMethodProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.NumericQueryNodeProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.NumericRangeQueryNodeProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.ParametricRangeQueryNodeProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.PhraseSlopQueryNodeProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.RemoveEmptyNonLeafQueryNodeProcessor

setChildrenOrder(List<QueryNode>) - Method in class org.apache.lucene.queryParser.standard.processors.WildcardQueryNodeProcessor

setClCache(CategoryListCache) - Method in class org.apache.lucene.facet.search.params.FacetSearchParams
Set Cached Category Lists data to be used in Faceted search.
setCleanThreadSleepTime(long) - Method in class org.apache.lucene.search.FilterManager
Deprecated. Sets the cache cleaning frequency in milliseconds.
setCmd(Character, int) - Method in class org.egothor.stemmer.Row
Set the command in the Cell of the given Character to the given integer.
setCode(int) - Method in interface org.apache.lucene.analysis.icu.tokenattributes.ScriptAttribute
Set the numeric code for this script value.
setCode(int) - Method in class org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl

setCollector(Collector) - Method in class org.apache.lucene.search.TimeLimitingCollector
This is so the same timer can be used with a multi-phase search process such as grouping.
setComparator(Comparator<SuggestWord>) - Method in class org.apache.lucene.search.spell.SpellChecker
Sets the Comparator for the SuggestWordQueue.
setComplementThreshold(double) - Method in class org.apache.lucene.facet.search.FacetsAccumulator
Set the complement threshold.
setComplementThreshold(double) - Method in class org.apache.lucene.facet.search.SamplingWrapper

setCondition(String, String) - Method in class org.apache.lucene.analysis.hunspell.HunspellAffix
Sets the condition that must be met before the affix can be applied
setConfig(Config) - Method in class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker

setConfig(Config) - Method in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
Sets the Config for this content source.
setConfig(Config) - Method in class org.apache.lucene.benchmark.byTask.feeds.DirContentSource

setConfig(Config) - Method in class org.apache.lucene.benchmark.byTask.feeds.DocMaker
Set the configuration parameters of this doc maker.
setConfig(Config) - Method in class org.apache.lucene.benchmark.byTask.feeds.EnwikiContentSource

setConfig(Config) - Method in class org.apache.lucene.benchmark.byTask.feeds.LineDocSource

setConfig(Config) - Method in class org.apache.lucene.benchmark.byTask.feeds.LongToEnglishQueryMaker

setConfig(Config) - Method in interface org.apache.lucene.benchmark.byTask.feeds.QueryMaker
Set the properties
setConfig(Config) - Method in class org.apache.lucene.benchmark.byTask.feeds.RandomFacetSource

setConfig(Config) - Method in class org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource

setConfig(Config) - Method in class org.apache.lucene.benchmark.byTask.feeds.SortableSingleDocSource

setConfig(Config) - Method in class org.apache.lucene.benchmark.byTask.feeds.TrecContentSource

setConsumer(PatternConsumer) - Method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser

setCountsByTime(int[], long) - Method in class org.apache.lucene.benchmark.byTask.stats.TaskStats

setCrossProduct(boolean) - Method in class org.apache.lucene.analysis.hunspell.HunspellAffix
Sets whether the affix is defined as cross product
setCurrent(String) - Method in class org.tartarus.snowball.SnowballProgram
Set the current string.
setCurrent(char[], int) - Method in class org.tartarus.snowball.SnowballProgram
Set the current string.
setCurrentLabel(int) - Method in class org.apache.lucene.util.fst.BytesRefFSTEnum

setCurrentLabel(int) - Method in class org.apache.lucene.util.fst.IntsRefFSTEnum

setData(byte[]) - Method in class org.apache.lucene.index.Payload
Sets this payloads data.
setData(byte[], int, int) - Method in class org.apache.lucene.index.Payload
Sets this payloads data.
setDate(Date) - Method in class org.apache.lucene.benchmark.byTask.feeds.DocData

setDate(String) - Method in class org.apache.lucene.benchmark.byTask.feeds.DocData

setDateResolution(DateTools.Resolution) - Method in class org.apache.lucene.queryParser.QueryParser
Sets the default date resolution used by RangeQueries for fields for which no specific date resolutions has been set.
setDateResolution(String, DateTools.Resolution) - Method in class org.apache.lucene.queryParser.QueryParser
Sets the date resolution used by RangeQueries for a specific field.
setDateResolution(DateTools.Resolution) - Method in interface org.apache.lucene.queryParser.standard.config.DateResolutionAttribute
Deprecated. Sets the default date resolution used by RangeQueryNodes for fields for which no specific date resolutions has been set.
setDateResolution(DateTools.Resolution) - Method in class org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl
Deprecated.
setDateResolution(Collator) - Method in interface org.apache.lucene.queryParser.standard.config.RangeCollatorAttribute
Deprecated.
setDateResolution(Collator) - Method in class org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl
Deprecated.
setDateResolution(DateTools.Resolution) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
setDateResolution(String, DateTools.Resolution) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
setDateResolution(DateTools.Resolution) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Sets the default DateTools.Resolution used for certain field when no DateTools.Resolution is defined for this field.
setDateResolution(Map<CharSequence, DateTools.Resolution>) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Deprecated. this method was renamed to StandardQueryParser.setDateResolutionMap(Map)
setDateResolutionMap(Map<CharSequence, DateTools.Resolution>) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Sets the DateTools.Resolution used for each field
setDebugStream(PrintStream) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager
Set debug output.
setDebugStream(PrintStream) - Method in class org.apache.lucene.queryParser.QueryParserTokenManager
Set debug output.
setDebugStream(PrintStream) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager
Set debug output.
setDebugStream(PrintStream) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager
Set debug output.
setDefault(Similarity) - Static method in class org.apache.lucene.search.Similarity
Set the default Similarity implementation used by indexing and search code.
setDefaultFieldSortScoring(boolean, boolean) - Method in class org.apache.lucene.search.IndexSearcher
By default, no scores are computed when sorting by field (using IndexSearcher.search(Query,Filter,int,Sort)).
setDefaultGenLookaheadCount(int) - Static method in class org.apache.lucene.index.SegmentInfos
Advanced: set how many times to try incrementing the gen when loading the segments file.
setDefaultInfoStream(PrintStream) - Static method in class org.apache.lucene.index.IndexWriter
If non-null, this will be the default infoStream used by a newly instantiated IndexWriter.
setDefaultOperator(QueryParser.Operator) - Method in class org.apache.lucene.queryParser.QueryParser
Sets the boolean operator of the QueryParser.
setDefaultOperator(QueryParserWrapper.Operator) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
setDefaultOperator(DefaultOperatorAttribute.Operator) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Deprecated.
setDefaultOperator(StandardQueryConfigHandler.Operator) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Sets the boolean operator of the QueryParser.
setDefaultPhraseSlop(int) - Method in interface org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttribute
Deprecated.
setDefaultPhraseSlop(int) - Method in class org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl
Deprecated.
setDefaultPhraseSlop(int) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Deprecated. renamed to StandardQueryParser.setPhraseSlop(int)
setDefaultScore(float) - Method in class org.apache.lucene.facet.search.ScoredDocIdCollector
Set the default score.
setDefaultWriteLockTimeout(long) - Static method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.setDefaultWriteLockTimeout(long) instead
setDefaultWriteLockTimeout(long) - Static method in class org.apache.lucene.index.IndexWriterConfig
Sets the default (for any instance) maximum time to wait for a write lock (in milliseconds).
setDelimiter(char) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader
setDelimiter changes the character that the taxonomy uses in its internal storage as a delimiter between category components.
setDelimiter(char) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
setDelimiter changes the character that the taxonomy uses in its internal storage as a delimiter between category components.
setDepth(int) - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

setDepth(int) - Method in class org.apache.lucene.facet.search.params.FacetRequest

setDescription(String) - Method in class org.apache.lucene.search.Explanation
Sets the description of this explanation node.
setDirectory(Directory) - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

setDisableCounting(boolean) - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask
See PerfTask.isDisableCounting()
setDiscountOverlaps(boolean) - Method in class org.apache.lucene.search.DefaultSimilarity
Determines whether overlap tokens (Tokens with 0 position increment) are ignored when computing norm.
setDistances(Map<Integer, Double>) - Method in class org.apache.lucene.spatial.tier.DistanceFilter
Deprecated.
setdoc(int) - Method in class org.apache.lucene.facet.enhancements.EnhancementsPayloadIterator

setdoc(int) - Method in class org.apache.lucene.facet.search.PayloadIterator
Skip forward to document docId.
setDocStoreSegment(String) - Method in class org.apache.lucene.index.SegmentInfo

setDocumentNumber(int) - Method in class org.apache.lucene.index.TermVectorMapper
Passes down the index of the document whose term vector is currently being mapped, once for each top level call to a term vector reader.
setDoFail() - Method in class org.apache.lucene.store.MockDirectoryWrapper.Failure

setDoRandomForceMerge(boolean) - Method in class org.apache.lucene.index.RandomIndexWriter

setDoRandomForceMergeAssert(boolean) - Method in class org.apache.lucene.index.RandomIndexWriter

setDoubleValue(double) - Method in class org.apache.lucene.analysis.NumericTokenStream
Initializes the token stream with the supplied double value.
setDoubleValue(double) - Method in class org.apache.lucene.document.NumericField
Initializes the field with the supplied double value.
setEmpty() - Method in interface org.apache.lucene.analysis.tokenattributes.CharTermAttribute
Sets the length of the termBuffer to zero.
setEmpty() - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

setEnableChecks(boolean) - Method in class org.apache.lucene.analysis.MockAnalyzer
Toggle consumer workflow checking: if your test consumes tokenstreams normally you should leave this enabled.
setEnableChecks(boolean) - Method in class org.apache.lucene.analysis.MockTokenizer
Toggle consumer workflow checking: if your test consumes tokenstreams normally you should leave this enabled.
setEnablePositionIncrements(boolean) - Method in class org.apache.lucene.analysis.FilteringTokenFilter
If true, this TokenFilter will preserve positions of the incoming tokens (ie, accumulate and set position increments of the removed tokens).
setEnablePositionIncrements(boolean) - Method in class org.apache.lucene.queryParser.QueryParser
Set to true to enable position increments in result query.
setEnablePositionIncrements(boolean) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
setEnablePositionIncrements(boolean) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Set to true to enable position increments in result query.
setEncoder(Encoder) - Method in class org.apache.lucene.search.highlight.Highlighter

setEnd(int) - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

setEndOffset(int) - Method in class org.apache.lucene.analysis.Token
Set the ending offset.
setEndOffset(int) - Method in class org.apache.lucene.index.TermVectorOffsetInfo

setEndOffset(int) - Method in class org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo.Toffs

setEnum(TermEnum) - Method in class org.apache.lucene.search.FilteredTermEnum
use this method to set the actual TermEnum (e.g.
setErrorToken(String) - Method in exception org.apache.lucene.queryParser.core.QueryNodeParseException

setEstimatedSize(String) - Method in class org.apache.lucene.search.FieldCache.CacheEntry

setExclusionSet(Set<?>) - Method in class org.apache.lucene.analysis.de.GermanStemFilter
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
setExclusionTable(Map<?, ?>) - Method in class org.apache.lucene.analysis.fr.FrenchStemFilter
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
setExclusionTable(HashSet<?>) - Method in class org.apache.lucene.analysis.nl.DutchStemFilter
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
setExpandMultiTermQuery(boolean) - Method in class org.apache.lucene.search.highlight.QueryScorer
Controls whether or not multi-term queries are expanded against a MemoryIndex IndexReader.
setExpandMultiTermQuery(boolean) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor

setExpectations(String, int, boolean, boolean) - Method in class org.apache.lucene.index.FieldSortedTermVectorMapper

setExpectations(String, int, boolean, boolean) - Method in class org.apache.lucene.index.PositionBasedTermVectorMapper
Callback mechanism used by the TermVectorReader
setExpectations(String, int, boolean, boolean) - Method in class org.apache.lucene.index.SortedTermVectorMapper

setExpectations(String, int, boolean, boolean) - Method in class org.apache.lucene.index.TermVectorMapper
Tell the mapper what to expect in regards to field, number of terms, offset and position storage.
setFailOnCreateOutput(boolean) - Method in class org.apache.lucene.store.MockDirectoryWrapper

setFailOnOpenInput(boolean) - Method in class org.apache.lucene.store.MockDirectoryWrapper

setField(CharSequence) - Method in class org.apache.lucene.queryParser.core.nodes.AnyQueryNode

setField(CharSequence) - Method in interface org.apache.lucene.queryParser.core.nodes.FieldableNode
Associates the node to a field.
setField(CharSequence) - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

setField(CharSequence) - Method in class org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode

setField(CharSequence) - Method in class org.apache.lucene.queryParser.core.nodes.PhraseSlopQueryNode

setField(CharSequence) - Method in class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode

setField(CharSequence) - Method in class org.apache.lucene.queryParser.core.nodes.SlopQueryNode

setField(CharSequence) - Method in class org.apache.lucene.queryParser.core.nodes.TokenizedPhraseQueryNode

setField(CharSequence) - Method in class org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode
Sets the field associated with this node.
setField(CharSequence) - Method in class org.apache.lucene.queryParser.standard.nodes.MultiPhraseQueryNode

setField(CharSequence) - Method in class org.apache.lucene.queryParser.standard.nodes.NumericQueryNode
Sets the field associated with this node.
setFieldBoostMap(Map<String, Float>) - Method in interface org.apache.lucene.queryParser.standard.config.FieldBoostMapAttribute
Deprecated.
setFieldBoostMap(Map<String, Float>) - Method in class org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl
Deprecated.
setFieldDateResolutionMap(Map<CharSequence, DateTools.Resolution>) - Method in interface org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttribute
Deprecated.
setFieldDateResolutionMap(Map<CharSequence, DateTools.Resolution>) - Method in class org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl
Deprecated.
setFieldName(String) - Method in class org.apache.lucene.search.DuplicateFilter

setFieldNames(String[]) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Sets the field names that will be used when generating the 'More Like This' query.
setFields(CharSequence[]) - Method in interface org.apache.lucene.queryParser.standard.config.MultiFieldAttribute
Deprecated.
setFields(CharSequence[]) - Method in class org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl
Deprecated.
setFieldsBoost(Map<String, Float>) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Sets the boost used for each field.
setFirst(boolean) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column
Deprecated.
setFlag(char) - Method in class org.apache.lucene.analysis.hunspell.HunspellAffix
Sets the affix flag
setFlags(int) - Method in class org.apache.lucene.analysis.Token

setFlags(int) - Method in interface org.apache.lucene.analysis.tokenattributes.FlagsAttribute

setFlags(int) - Method in class org.apache.lucene.analysis.tokenattributes.FlagsAttributeImpl

setFloatValue(float) - Method in class org.apache.lucene.analysis.NumericTokenStream
Initializes the token stream with the supplied float value.
setFloatValue(float) - Method in class org.apache.lucene.document.NumericField
Initializes the field with the supplied float value.
setFloorSegmentMB(double) - Method in class org.apache.lucene.index.TieredMergePolicy
Segments smaller than this are "rounded up" to this size, ie treated as equal (floor) size for merge selection.
setForceMergeDeletesPctAllowed(double) - Method in class org.apache.lucene.index.TieredMergePolicy
When forceMergeDeletes is called, we only merge away a segment if its delete percentage is over this threshold.
setFormat(int) - Method in class org.apache.lucene.index.SegmentInfos

setFragmentScorer(Scorer) - Method in class org.apache.lucene.search.highlight.Highlighter

setFragmentSize(int) - Method in class org.apache.lucene.search.highlight.SimpleFragmenter

setFreqCurrentDoc() - Method in class org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanScorer

setFreqCurrentDoc() - Method in class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

setFreqCurrentDoc() - Method in class org.apache.lucene.search.spans.SpanScorer

setFromSerialized(CharSequence, int) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Set a CategoryPath from a character-sequence representation written by CategoryPath.serializeAppendTo(Appendable).
setFuzzyMinSim(float) - Method in class org.apache.lucene.queryParser.QueryParser
Set the minimum similarity for fuzzy queries.
setFuzzyMinSim(float) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
setFuzzyMinSim(float) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Set the minimum similarity for fuzzy queries.
setFuzzyMinSimilarity(float) - Method in interface org.apache.lucene.queryParser.standard.config.FuzzyAttribute
Deprecated.
setFuzzyMinSimilarity(float) - Method in class org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl
Deprecated.
setFuzzyPrefixLength(int) - Method in class org.apache.lucene.queryParser.QueryParser
Set the prefix length for fuzzy queries.
setFuzzyPrefixLength(int) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
setFuzzyPrefixLength(int) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Set the prefix length for fuzzy queries.
setGraphvizFormatter(GraphvizFormatter) - Method in class org.apache.lucene.analysis.ja.JapaneseTokenizer
Expert: set this to produce graphviz (dot) output of the Viterbi lattice
setGreedy(boolean) - Method in class org.apache.lucene.search.TimeLimitingCollector
Sets whether this time limited collector is greedy.
setHasVectors(boolean) - Method in class org.apache.lucene.index.SegmentInfo

setHyperbolicTfFactors(float, float, double, float) - Method in class org.apache.lucene.misc.SweetSpotSimilarity
Sets the function variables for the hyperbolicTf functions
setID(int) - Method in class org.apache.lucene.benchmark.byTask.feeds.DocData

setIgnoreTF(boolean) - Method in class org.apache.lucene.search.FuzzyLikeThisQuery

setIgnoringSinglePrefixOrSuffixShingle(boolean) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated.
setIndex(int) - Method in class org.apache.lucene.analysis.util.CharArrayIterator

setIndexCommit(IndexCommit) - Method in class org.apache.lucene.index.IndexWriterConfig
Expert: allows to open a certain commit point.
setIndexDeletionPolicy(IndexDeletionPolicy) - Method in class org.apache.lucene.index.IndexWriterConfig
Expert: allows an optional IndexDeletionPolicy implementation to be specified.
setIndexOptions(FieldInfo.IndexOptions) - Method in class org.apache.lucene.document.AbstractField
Expert: If set, omit term freq, and optionally also positions and payloads from postings for this field.
setIndexOptions(FieldInfo.IndexOptions) - Method in interface org.apache.lucene.document.Fieldable
Expert: If set, omit term freq, and optionally positions and payloads from postings for this field.
setIndexReader(IndexReader) - Method in class org.apache.lucene.benchmark.byTask.PerfRunData
Set the index reader.
setIndexWriter(IndexWriter) - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

setIndexWriter(IndexWriter) - Method in class org.apache.lucene.index.MergePolicy
Sets the IndexWriter to use by this merge policy.
setIndexWriter(IndexWriter) - Method in class org.apache.lucene.index.NoMergePolicy

setIndexWriter(IndexWriter) - Method in class org.apache.lucene.index.UpgradeIndexMergePolicy

setInfoStream(PrintStream) - Method in class org.apache.lucene.index.CheckIndex
Set infoStream where messages should go.
setInfoStream(PrintStream) - Method in class org.apache.lucene.index.IndexWriter
If non-null, information about merges, deletes and a message when maxFieldLength is reached will be printed to this.
setInfoStream(PrintStream) - Static method in class org.apache.lucene.index.SegmentInfos
If non-null, information about retries when loading the segments file will be printed to this.
setInfoStream(PrintStream) - Method in interface org.apache.lucene.search.FieldCache
If non-null, FieldCacheImpl will warn whenever entries are created that are not sane according to FieldCacheSanityChecker.
setInfoStream(PrintStream) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated. If non-null, information about merges and a message when maxFieldLength is reached could be printed to this -- currently not yet implemented.
setIntValue(int) - Method in class org.apache.lucene.analysis.NumericTokenStream
Initializes the token stream with the supplied int value.
setIntValue(int) - Method in class org.apache.lucene.document.NumericField
Initializes the field with the supplied int value.
setKeepMode(int) - Method in class org.apache.lucene.search.DuplicateFilter

setKeyword(boolean) - Method in interface org.apache.lucene.analysis.tokenattributes.KeywordAttribute
Marks the current token as keyword iff set to true.
setKeyword(boolean) - Method in class org.apache.lucene.analysis.tokenattributes.KeywordAttributeImpl
Marks the current token as keyword iff set to true.
setLabel(CategoryPath) - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode
Set the label of the category of this result.
setLast(boolean) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column
Deprecated.
setLastModified(long) - Method in class org.apache.lucene.store.RAMFile

setLastOutput(int, T) - Method in class org.apache.lucene.util.fst.Builder.UnCompiledNode

setLat(int) - Method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
setLeaf(boolean) - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

setLength(int) - Method in interface org.apache.lucene.analysis.tokenattributes.CharTermAttribute
Set number of valid characters (length of the term) in the termBuffer array.
setLength(int) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

setLength(int) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

setLength(int) - Method in class org.apache.lucene.index.FieldInvertState

setLength(long) - Method in class org.apache.lucene.store.FSDirectory.FSIndexOutput

setLength(long) - Method in class org.apache.lucene.store.IndexOutput
Set the file length.
setLength(long) - Method in class org.apache.lucene.store.MockIndexOutputWrapper

setLength(long) - Method in class org.apache.lucene.store.RAMFile

setLength(long) - Method in class org.apache.lucene.util.ThrottledIndexOutput

setLength(int) - Method in class org.apache.lucene.util.UnicodeUtil.UTF16Result

setLength(int) - Method in class org.apache.lucene.util.UnicodeUtil.UTF8Result

setLengthNormFactors(int, int, float) - Method in class org.apache.lucene.misc.SweetSpotSimilarity
Sets the default function variables used by lengthNorm when no field specific variables have been set.
setLengthNormFactors(String, int, int, float, boolean) - Method in class org.apache.lucene.misc.SweetSpotSimilarity
Sets the function variables used by lengthNorm for a specific named field.
setLikeText(String) - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

setLng(int) - Method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
setLocale(Locale) - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

setLocale(Locale) - Method in class org.apache.lucene.queryParser.QueryParser
Set locale used by date range parsing.
setLocale(Locale) - Method in interface org.apache.lucene.queryParser.standard.config.LocaleAttribute
Deprecated.
setLocale(Locale) - Method in class org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl
Deprecated.
setLocale(Locale) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
setLocale(Locale) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Set locale used by date range parsing.
setLockDir(File) - Method in class org.apache.lucene.store.FSLockFactory
Set the lock directory.
setLockFactory(LockFactory) - Method in class org.apache.lucene.store.Directory
Set the LockFactory that this Directory instance should use for its locking implementation.
setLockFactory(LockFactory) - Method in class org.apache.lucene.store.FSDirectory

setLockFactory(LockFactory) - Method in class org.apache.lucene.store.MockDirectoryWrapper

setLockFactory(LockFactory) - Method in class org.apache.lucene.store.NRTCachingDirectory

setLockPrefix(String) - Method in class org.apache.lucene.store.LockFactory
Set the prefix in use for all locks created in this LockFactory.
setLockPrefix(String) - Method in class org.apache.lucene.store.MockLockFactoryWrapper

setLongValue(long) - Method in class org.apache.lucene.analysis.NumericTokenStream
Initializes the token stream with the supplied long value.
setLongValue(long) - Method in class org.apache.lucene.document.NumericField
Initializes the field with the supplied long value.
setLowercaseExpandedTerms(boolean) - Method in class org.apache.lucene.queryParser.QueryParser
Whether terms of wildcard, prefix, fuzzy and range queries are to be automatically lower-cased or not.
setLowercaseExpandedTerms(boolean) - Method in interface org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttribute
Deprecated.
setLowercaseExpandedTerms(boolean) - Method in class org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl
Deprecated.
setLowercaseExpandedTerms(boolean) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
setLowercaseExpandedTerms(boolean) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Set to true to allow leading wildcard characters.
setMatch(Boolean) - Method in class org.apache.lucene.search.ComplexExplanation
Sets the match status assigned to this explanation node.
setMatchAlmostDiff(int) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Sets the number of characters by which words can differ from target word when calling the matchAlmost method.
setMatrix(ShingleMatrixFilter.Matrix) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated.
setMaxBufferedDeleteTerms(int) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.setMaxBufferedDeleteTerms(int) instead.
setMaxBufferedDeleteTerms(int) - Method in class org.apache.lucene.index.IndexWriterConfig
Determines the minimal number of delete terms required before the buffered in-memory delete terms are applied and flushed.
setMaxBufferedDocs(int) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.setMaxBufferedDocs(int) instead.
setMaxBufferedDocs(int) - Method in class org.apache.lucene.index.IndexWriterConfig
Determines the minimal number of documents required before the buffered in-memory documents are flushed as a new Segment.
setMaxChunkSize(int) - Method in class org.apache.lucene.store.MMapDirectory
Sets the maximum chunk size (default is 1 GiBytes for 64 bit JVMs and 256 MiBytes for 32 bit JVMs) used for memory mapping.
setMaxClauseCount(int) - Static method in class org.apache.lucene.search.BooleanQuery
Set the maximum number of clauses permitted per BooleanQuery.
setMaxDocCharsToAnalyze(int) - Method in class org.apache.lucene.search.highlight.Highlighter

setMaxDocCharsToAnalyze(int) - Method in class org.apache.lucene.search.highlight.QueryScorer

setMaxDocCharsToAnalyze(int) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor

setMaxDocFreq(int) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Set the maximum frequency in which words may still appear.
setMaxDocFreqPct(int) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Set the maximum percentage in which words may still appear.
setMaxFieldLength(int) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use LimitTokenCountAnalyzer instead. Note that the behvaior slightly changed - the analyzer limits the number of tokens per token stream created, while this setting limits the total number of tokens to index. This only matters if you index many multi-valued fields though.
setMaxFieldLength(int) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
setMaximumShingleSize(int) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated.
setMaxMergeAtOnce(int) - Method in class org.apache.lucene.index.TieredMergePolicy
Maximum number of segments to be merged at a time during "normal" merging.
setMaxMergeAtOnceExplicit(int) - Method in class org.apache.lucene.index.TieredMergePolicy
Maximum number of segments to be merged at a time, during forceMerge or forceMergeDeletes.
setMaxMergeCount(int) - Method in class org.apache.lucene.index.ConcurrentMergeScheduler
Sets the max # simultaneous merges that are allowed.
setMaxMergeDocs(int) - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams

setMaxMergeDocs(int) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use LogMergePolicy.setMaxMergeDocs(int) directly.
setMaxMergeDocs(int) - Method in class org.apache.lucene.index.LogMergePolicy
Determines the largest segment (measured by document count) that may be merged with other segments.
setMaxMergedSegmentMB(double) - Method in class org.apache.lucene.index.TieredMergePolicy
Maximum sized segment to produce during normal merging.
setMaxMergeMB(double) - Method in class org.apache.lucene.index.LogByteSizeMergePolicy
Determines the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments.
setMaxMergeMBForForcedMerge(double) - Method in class org.apache.lucene.index.LogByteSizeMergePolicy
Determines the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments during forceMerge.
setMaxMergeMBForOptimize(double) - Method in class org.apache.lucene.index.LogByteSizeMergePolicy
Deprecated. Renamed to LogByteSizeMergePolicy.setMaxMergeMBForForcedMerge(double)
setMaxNumTokensParsed(int) - Method in class org.apache.lucene.search.similar.MoreLikeThis

setMaxQueries(int) - Method in class org.apache.lucene.benchmark.quality.QualityBenchmark
Set the maximum number of quality queries to run.
setMaxQueryTerms(int) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Sets the maximum number of query terms that will be included in any generated query.
setMaxQueryTerms(int) - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

setMaxResults(int) - Method in class org.apache.lucene.benchmark.quality.QualityBenchmark
set the maximum number of results to collect for each quality query.
setMaxSampleSize(int) - Method in class org.apache.lucene.facet.search.sampling.SamplingParams

setMaxScore(float) - Method in class org.apache.lucene.search.TopDocs
Sets the maximum score value encountered.
setMaxShingleSize(int) - Method in class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper
Deprecated. Setting maxShingleSize after Analyzer instantiation prevents reuse. Confgure maxShingleSize during construction.
setMaxShingleSize(int) - Method in class org.apache.lucene.analysis.shingle.ShingleFilter
Set the max shingle size (default: 2)
setMaxSize(int) - Method in class org.apache.lucene.util.collections.LRUHashMap
setMaxSize() allows changing the map's maximal number of elements which was defined at construction time.
setMaxSizeInBytes(long) - Method in class org.apache.lucene.store.MockDirectoryWrapper

setMaxSmallSegments(int) - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams

setMaxSmallSegments(int) - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy

setMaxThreadCount(int) - Method in class org.apache.lucene.index.ConcurrentMergeScheduler
Sets the max # simultaneous merge threads that should be running at once.
setMaxThreadStates(int) - Method in class org.apache.lucene.index.IndexWriterConfig
Sets the max number of simultaneous threads that may be indexing documents at once in IndexWriter.
setMaxTokenLength(int) - Method in class org.apache.lucene.analysis.MockAnalyzer
Toggle maxTokenLength for MockTokenizer
setMaxTokenLength(int) - Method in class org.apache.lucene.analysis.standard.ClassicAnalyzer
Set maximum allowed token length.
setMaxTokenLength(int) - Method in class org.apache.lucene.analysis.standard.ClassicTokenizer
Set the max allowed token length.
setMaxTokenLength(int) - Method in class org.apache.lucene.analysis.standard.StandardAnalyzer
Set maximum allowed token length.
setMaxTokenLength(int) - Method in class org.apache.lucene.analysis.standard.StandardTokenizer
Set the max allowed token length.
setMaxTokenLength(int) - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailAnalyzer
Set maximum allowed token length.
setMaxTokenLength(int) - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Set the max allowed token length.
setMaxWordLen(int) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Sets the maximum word length above which words will be ignored.
setMergedSegmentWarmer(IndexWriter.IndexReaderWarmer) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.setMergedSegmentWarmer(org.apache.lucene.index.IndexWriter.IndexReaderWarmer) instead.
setMergedSegmentWarmer(IndexWriter.IndexReaderWarmer) - Method in class org.apache.lucene.index.IndexWriterConfig
Set the merged segment warmer.
setMergeFactor(int) - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams

setMergeFactor(int) - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy

setMergeFactor(int) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use LogMergePolicy.setMergeFactor(int) directly.
setMergeFactor(int) - Method in class org.apache.lucene.index.LogMergePolicy
Determines how often segment indices are merged by addDocument().
setMergeFactor(int) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated. The sweetspot for this implementation is somewhere around 2500 at 2K text large documents.
setMergeFactor(MergePolicy, int) - Static method in class org.apache.lucene.util.LuceneTestCase

setMergePolicy(MergePolicy) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.setMergePolicy(MergePolicy) instead.
setMergePolicy(MergePolicy) - Method in class org.apache.lucene.index.IndexWriterConfig
Expert: MergePolicy is invoked whenever there are changes to the segments in the index.
setMergePolicyParams(BalancedSegmentMergePolicy.MergePolicyParams) - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy

setMergeScheduler(MergeScheduler) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.setMergeScheduler(MergeScheduler) instead
setMergeScheduler(MergeScheduler) - Method in class org.apache.lucene.index.IndexWriterConfig
Expert: sets the merge scheduler used by this writer.
setMergeThreadPriority(int) - Method in class org.apache.lucene.index.ConcurrentMergeScheduler
Set the base priority that merge threads run at.
setMinDocFreq(int) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Sets the frequency at which words will be ignored which do not occur in at least this many docs.
setMinDocFreq(int) - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

setMinimumNumberShouldMatch(int) - Method in class org.apache.lucene.search.BooleanQuery
Specifies a minimum number of the optional BooleanClauses which must be satisfied.
setMinimumShingleSize(int) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated.
setMinMergeDocs(int) - Method in class org.apache.lucene.index.LogDocMergePolicy
Sets the minimum size for the lowest level segments.
setMinMergeMB(double) - Method in class org.apache.lucene.index.LogByteSizeMergePolicy
Sets the minimum size for the lowest level segments.
setMinSampleSize(int) - Method in class org.apache.lucene.facet.search.sampling.SamplingParams

setMinShingleSize(int) - Method in class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper
Deprecated. Setting minShingleSize after Analyzer instantiation prevents reuse. Confgure minShingleSize during construction.
setMinShingleSize(int) - Method in class org.apache.lucene.analysis.shingle.ShingleFilter
Set the min shingle size (default: 2).
setMinSimilarity(float) - Method in class org.apache.lucene.queryParser.standard.config.FuzzyConfig

setMinTermFreq(int) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Sets the frequency below which terms will be ignored in the source doc.
setMinTermFrequency(int) - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

setMinWordLen(int) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Sets the minimum word length below which words will be ignored.
setMissingValue(Object) - Method in class org.apache.lucene.search.SortField
Set a default sorting value for documents which lacks one
setModifiedUTF8StringsMode() - Method in class org.apache.lucene.store.DataInput
Call this if readString should read characters stored in the old modified UTF8 format (length in java chars and java's modified UTF8 encoding).
setModifiedUTF8StringsMode() - Method in class org.apache.lucene.store.MockIndexInputWrapper

setMoreLikeFields(String[]) - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

setMultiFields(CharSequence[]) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Set the fields a query should be expanded to when the field is null
setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod) - Method in class org.apache.lucene.queryParser.QueryParser
By default QueryParser uses MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT when creating a PrefixQuery, WildcardQuery or RangeQuery.
setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod) - Method in interface org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute
Deprecated.
setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod) - Method in class org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl
Deprecated.
setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
By default, it uses MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT when creating a prefix, wildcard and range queries.
setMultiValuedSeparator(char) - Method in class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

setName(String) - Method in class org.apache.lucene.benchmark.byTask.feeds.DocData

setName(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

setNextDoc(int) - Method in class org.apache.lucene.facet.enhancements.association.AssociationsPayloadIterator
Skipping to the next document, fetching its associations & populating the map.
setNextDoc(int, float) - Method in interface org.apache.lucene.facet.search.aggregator.Aggregator
Specify the document (and its score in the search) that the following Aggregator.aggregate(int) calls will pertain to.
setNextDoc(int, float) - Method in class org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator

setNextDoc(int, float) - Method in class org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator

setNextDoc(int, float) - Method in class org.apache.lucene.facet.search.aggregator.CountingAggregator

setNextDoc(int, float) - Method in class org.apache.lucene.facet.search.aggregator.ScoringAggregator

setNextReader(IndexReader, int) - Method in class org.apache.lucene.facet.search.FacetsCollector

setNextReader(IndexReader, int) - Method in class org.apache.lucene.facet.search.ScoredDocIdCollector

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.CachingCollector

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.CheckHits.ExplanationAsserter

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.CheckHits.SetCollector

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.Collector
Called before collecting from each IndexReader.
setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.FieldComparator.ByteComparator

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.FieldComparator.DocComparator

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.FieldComparator.DoubleComparator

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.FieldComparator.FloatComparator

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.FieldComparator.IntComparator

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.FieldComparator.LongComparator

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.FieldComparator.NumericComparator

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.FieldComparator.RelevanceComparator

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.FieldComparator
Set a new Reader.
setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.FieldComparator.ShortComparator

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.FieldComparator.StringComparatorLocale

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.FieldComparator.StringOrdValComparator

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.FieldComparator.StringValComparator

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.grouping.BlockGroupingCollector

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.grouping.TermAllGroupsCollector

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.grouping.TermFirstPassGroupingCollector

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.grouping.TermSecondPassGroupingCollector

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.join.ToParentBlockJoinCollector

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.MultiCollector

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.PositiveScoresOnlyCollector

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.TimeLimitingCollector

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.TopScoreDocCollector

setNextReader(IndexReader, int) - Method in class org.apache.lucene.search.TotalHitCountCollector

setNoCFSRatio(double) - Method in class org.apache.lucene.index.LogMergePolicy
If a merged segment will be more than this percentage of the total size of the index, leave the segment as non-compound file even if compound file is enabled.
setNoCFSRatio(double) - Method in class org.apache.lucene.index.TieredMergePolicy
If a merged segment will be more than this percentage of the total size of the index, leave the segment as non-compound file even if compound file is enabled.
setNoChildReport() - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence
Execute child tasks in a way that they do not report their time separately.
setNoDeleteOpenFile(boolean) - Method in class org.apache.lucene.store.MockDirectoryWrapper
Emulate windows whereby deleting an open file is not allowed (raise IOException).
setNonLocalizedMessage(Message) - Method in exception org.apache.lucene.queryParser.core.QueryNodeParseException

setNorm(int, String, byte) - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
setNorm(int, String, float) - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
setNumberFormat(NumberFormat) - Method in class org.apache.lucene.queryParser.standard.config.NumericConfig
Sets the NumberFormat used to parse a String to Number
setNumberFormat(NumberFormat) - Method in class org.apache.lucene.queryParser.standard.nodes.NumericQueryNode
Sets the NumberFormat used to convert the value to String.
setNumericConfigMap(Map<String, NumericConfig>) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser

setNumLabel(int) - Method in class org.apache.lucene.facet.search.params.FacetRequest

setNumLargeSegments(int) - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams

setNumLargeSegments(int) - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy

setNumOverlap(int) - Method in class org.apache.lucene.index.FieldInvertState

setNumReturnValues(int) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Sets the default maximum number of values returned from the matchPrefix and matchAlmost methods.
setNumWords(int) - Method in class org.apache.lucene.util.OpenBitSet
Expert: sets the number of longs in the array that are in use
setOccur(BooleanClause.Occur) - Method in class org.apache.lucene.search.BooleanClause

setOffset(int, int) - Method in class org.apache.lucene.analysis.Token
Set the starting and ending offset.
setOffset(int, int) - Method in interface org.apache.lucene.analysis.tokenattributes.OffsetAttribute
Set the starting and ending offset.
setOffset(int, int) - Method in class org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl
Set the starting and ending offset.
setOmitNorms(boolean) - Method in class org.apache.lucene.document.AbstractField
Expert: If set, omit normalization factors associated with this indexed field.
setOmitNorms(boolean) - Method in interface org.apache.lucene.document.Fieldable
Expert: If set, omit normalization factors associated with this indexed field.
setOmitTermFreqAndPositions(boolean) - Method in class org.apache.lucene.document.AbstractField
Deprecated. use AbstractField.setIndexOptions(FieldInfo.IndexOptions) instead.
SetOnce<T> - Class in org.apache.lucene.util
A convenient class which offers a semi-immutable object wrapper implementation which allows one to set the value of an object exactly once, and retrieve it many times.
SetOnce() - Constructor for class org.apache.lucene.util.SetOnce
A default constructor which does not set the internal object, and allows setting it by calling SetOnce.set(Object).
SetOnce(T) - Constructor for class org.apache.lucene.util.SetOnce
Creates a new instance with the internal object set to the given object.
SetOnce.AlreadySetException - Exception in org.apache.lucene.util
Thrown when SetOnce.set(Object) is called more than once.
SetOnce.AlreadySetException() - Constructor for exception org.apache.lucene.util.SetOnce.AlreadySetException

setOpenMode(IndexWriterConfig.OpenMode) - Method in class org.apache.lucene.index.IndexWriterConfig
Specifies IndexWriterConfig.OpenMode of the index.
setOperator(DefaultOperatorAttribute.Operator) - Method in interface org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute
Deprecated.
setOperator(DefaultOperatorAttribute.Operator) - Method in class org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl
Deprecated.
setOrdinal(int) - Method in class org.apache.lucene.facet.index.attributes.OrdinalProperty

setOutput(OutputStream) - Method in class org.apache.lucene.util.LuceneJUnitResultFormatter
Sets the stream the formatter is supposed to write its results to.
setOutputUnigrams(boolean) - Method in class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper
Deprecated. Setting outputUnigrams after Analyzer instantiation prevents reuse. Confgure outputUnigrams during construction.
setOutputUnigrams(boolean) - Method in class org.apache.lucene.analysis.shingle.ShingleFilter
Shall the output stream contain the input tokens (unigrams) as well as shingles? (default: true.)
setOutputUnigramsIfNoShingles(boolean) - Method in class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper
Deprecated. Setting outputUnigramsIfNoShingles after Analyzer instantiation prevents reuse. Confgure outputUnigramsIfNoShingles during construction.
setOutputUnigramsIfNoShingles(boolean) - Method in class org.apache.lucene.analysis.shingle.ShingleFilter
Shall we override the behavior of outputUnigrams==false for those times when no shingles are available (because there are fewer than minShingleSize tokens in the input stream)? (default: false.)
setOversampleFactor(double) - Method in class org.apache.lucene.facet.search.sampling.SamplingParams

setParameters(Parameter[]) - Method in class org.apache.lucene.util.LuceneJUnitDividingSelector

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.AddDocTask
Set the params (docSize only)
setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.CloseIndexTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.CommitIndexTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.DeleteByPercentTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.DeleteDocTask
Set the params (docid only)
setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.FlushReaderTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.ForceMergeTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask
Set the params (analyzerClassName only), Comma-separate list of Analyzer class names.
setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.NewLocaleTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.NewShingleAnalyzerTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.OpenReaderTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask
Set the params of this task.
setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.PrintReaderTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetLoadFieldSelectorTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask
SortFields: field:type,field:type[,noscore][,nomaxscore] If noscore is present, then we turn off score tracking in TopFieldCollector.
setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.SetPropTask
Set the params (property name and value).
setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.UpdateDocTask
Set the params (docSize only)
setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.WaitTask

setParams(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask
Set the params (docSize only)
setPartialExpunge(boolean) - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams

setPartialExpunge(boolean) - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy

setPathElements(List<PathQueryNode.QueryText>) - Method in class org.apache.lucene.queryParser.core.nodes.PathQueryNode
Returns the a List with all QueryText elements
setPause(boolean) - Method in class org.apache.lucene.index.MergePolicy.OneMerge

setPayload(Payload) - Method in class org.apache.lucene.analysis.Token
Sets this Token's payload.
setPayload(Payload) - Method in interface org.apache.lucene.analysis.tokenattributes.PayloadAttribute
Sets this Token's payload.
setPayload(Payload) - Method in class org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl
Sets this Token's payload.
setPayload() - Method in class org.apache.lucene.facet.enhancements.EnhancementsCategoryTokenizer

setPayload() - Method in class org.apache.lucene.facet.index.streaming.CategoryTokenizer
Set the payload of the current category token.
setPayloadProcessorProvider(PayloadProcessorProvider) - Method in class org.apache.lucene.index.IndexWriter
Sets the PayloadProcessorProvider to use when merging payloads.
setPercentTermsToMatch(float) - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

setPerfObject(String, Object) - Method in class org.apache.lucene.benchmark.byTask.PerfRunData
Sets an object that is required by PerfTasks, keyed by the given key.
setPhraseLimit(int) - Method in class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
set the maximum number of phrases to analyze when searching for the highest-scoring phrase.
setPhraseSlop(int) - Method in class org.apache.lucene.queryParser.QueryParser
Sets the default slop for phrases.
setPhraseSlop(int) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
setPhraseSlop(int) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Sets the default slop for phrases.
setPivot(int) - Method in class org.apache.lucene.util.SorterTemplate
Implement this method, that stores the value of slot i as pivot value
setPosition(long) - Method in class org.apache.lucene.util.PagedBytes.PagedBytesDataInput
Seek to a position previously obtained from PagedBytes.PagedBytesDataInput.getPosition().
setPositionIncrement(int) - Method in class org.apache.lucene.analysis.Token
Set the position increment.
setPositionIncrement(int) - Method in interface org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute
Set the position increment.
setPositionIncrement(int) - Method in class org.apache.lucene.analysis.tokenattributes.PositionIncrementAttributeImpl
Set the position increment.
setPositionIncrement(int) - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

setPositionIncrementGap(int) - Method in class org.apache.lucene.analysis.MockAnalyzer

setPositionIncrementsEnabled(boolean) - Method in interface org.apache.lucene.queryParser.standard.config.PositionIncrementsAttribute
Deprecated.
setPositionIncrementsEnabled(boolean) - Method in class org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl
Deprecated.
setPositionLength(int) - Method in class org.apache.lucene.analysis.ja.Token
Set the position length (in tokens) of this token.
setPositionLength(int) - Method in class org.apache.lucene.analysis.Token
Set the position length.
setPositionLength(int) - Method in interface org.apache.lucene.analysis.tokenattributes.PositionLengthAttribute

setPositionLength(int) - Method in class org.apache.lucene.analysis.tokenattributes.PositionLengthAttributeImpl

setPositionSensitive(boolean) - Method in class org.apache.lucene.search.highlight.WeightedSpanTerm

setPrecisionStep(int) - Method in class org.apache.lucene.queryParser.standard.config.NumericConfig
Sets the precision used to index the numeric values
setPrefix(TokenStream) - Method in class org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter

setPrefix(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask

setPrefixLength(int) - Method in class org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode

setPrefixLength(int) - Method in interface org.apache.lucene.queryParser.standard.config.FuzzyAttribute
Deprecated.
setPrefixLength(int) - Method in class org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl
Deprecated.
setPrefixLength(int) - Method in class org.apache.lucene.queryParser.standard.config.FuzzyConfig

setPreventDoubleWrite(boolean) - Method in class org.apache.lucene.store.MockDirectoryWrapper
If set to true, we throw an IOException if the same file is opened by createOutput, ever.
setPreviousTokenStream(Object) - Method in class org.apache.lucene.analysis.Analyzer
Used by Analyzers that implement reusableTokenStream to save a TokenStream for later re-use by the same thread.
setProcessingMode(int) - Method in class org.apache.lucene.search.DuplicateFilter

setProps(Properties) - Method in class org.apache.lucene.benchmark.byTask.feeds.DocData

SetPropTask - Class in org.apache.lucene.benchmark.byTask.tasks
Set a performance test configuration property.
SetPropTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.SetPropTask

setQuery(CharSequence) - Method in exception org.apache.lucene.queryParser.core.QueryNodeParseException

setQuery(Query) - Method in class org.apache.lucene.search.BooleanClause

setQueryBuilder(QueryBuilder) - Method in class org.apache.lucene.queryParser.core.QueryParserHelper
The query builder that will be used to build an object from the query node tree.
setQueryBuilder(StandardQueryBuilder) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated. Sets the StandardQueryBuilder used to generate a Query object from the parsed and processed query node tree.
setQueryConfig(StandardQueryConfigHandler) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated. Sets the QueryConfigHandler used by the QueryNodeProcessor set to this object.
setQueryConfigHandler(AbstractQueryConfig) - Method in interface org.apache.lucene.queryParser.core.config.ConfigAttribute
Deprecated.
setQueryConfigHandler(QueryConfigHandler) - Method in interface org.apache.lucene.queryParser.core.processors.QueryNodeProcessor
Sets the QueryConfigHandler associated to the query tree.
setQueryConfigHandler(QueryConfigHandler) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
For reference about this method check: QueryNodeProcessor.setQueryConfigHandler(QueryConfigHandler).
setQueryConfigHandler(QueryConfigHandler) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline
For reference about this method check: QueryNodeProcessor.setQueryConfigHandler(QueryConfigHandler).
setQueryConfigHandler(QueryConfigHandler) - Method in class org.apache.lucene.queryParser.core.QueryParserHelper
Sets the query configuration handler that will be used during query processing.
setQueryConfigHandler(AbstractQueryConfig) - Method in class org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl
Deprecated.
setQueryConfigHandler(AbstractQueryConfig) - Method in class org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl
Deprecated.
setQueryConfigHandler(AbstractQueryConfig) - Method in class org.apache.lucene.queryParser.standard.config.BoostAttributeImpl
Deprecated.
setQueryConfigHandler(AbstractQueryConfig) - Method in class org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl
Deprecated.
setQueryConfigHandler(AbstractQueryConfig) - Method in class org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl
Deprecated.
setQueryConfigHandler(AbstractQueryConfig) - Method in class org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl
Deprecated.
setQueryConfigHandler(AbstractQueryConfig) - Method in class org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl
Deprecated.
setQueryConfigHandler(AbstractQueryConfig) - Method in class org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl
Deprecated.
setQueryConfigHandler(AbstractQueryConfig) - Method in class org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl
Deprecated.
setQueryConfigHandler(AbstractQueryConfig) - Method in class org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl
Deprecated.
setQueryConfigHandler(AbstractQueryConfig) - Method in class org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl
Deprecated.
setQueryConfigHandler(AbstractQueryConfig) - Method in class org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl
Deprecated.
setQueryConfigHandler(AbstractQueryConfig) - Method in class org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl
Deprecated.
setQueryConfigHandler(AbstractQueryConfig) - Method in class org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl
Deprecated.
setQueryConfigHandler(AbstractQueryConfig) - Method in class org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl
Deprecated.
setQueryConfigHandler(QueryConfigHandler) - Method in class org.apache.lucene.queryParser.standard.processors.GroupQueryNodeProcessor

setQueryNodeProcessor(QueryNodeProcessor) - Method in class org.apache.lucene.queryParser.core.QueryParserHelper
Sets the processor that will be used to process the query node tree.
setQueryProcessor(QueryNodeProcessor) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated. Sets the QueryNodeProcessor used to process the query node tree generated by the StandardSyntaxParser.
setRAMBufferSizeMB(double) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.setRAMBufferSizeMB(double) instead.
setRAMBufferSizeMB(double) - Method in class org.apache.lucene.index.IndexWriterConfig
Determines the amount of RAM that may be used for buffering added documents and deletions before they are flushed to the Directory.
setRamUsageEstimator(boolean) - Method in class org.apache.lucene.util.FieldCacheSanityChecker
If set, estimate size for all CacheEntry objects will be calculateed.
setRandomIOExceptionRate(double) - Method in class org.apache.lucene.store.MockDirectoryWrapper
If 0.0, no exceptions will be thrown.
setRangeCollator(Collator) - Method in class org.apache.lucene.queryParser.QueryParser
Sets the collator used to determine index term inclusion in ranges for RangeQuerys.
setRangeCollator(Collator) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
setRangeCollator(Collator) - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser
Sets the collator used to determine index term inclusion in ranges for RangeQuerys.
setRate(int, boolean) - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

setReadChunkSize(int) - Method in class org.apache.lucene.store.FSDirectory
Sets the maximum number of bytes read at once from the underlying file during DataInput.readBytes(byte[], int, int).
setReaderPooling(boolean) - Method in class org.apache.lucene.index.IndexWriterConfig
By default, IndexWriter does not pool the SegmentReaders it must open for deletions and merging, unless a near-real-time reader has been obtained by calling IndexWriter.getReader().
setReaderTermsIndexDivisor(int) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.setReaderTermsIndexDivisor(int) instead.
setReaderTermsIndexDivisor(int) - Method in class org.apache.lucene.index.IndexWriterConfig
Sets the termsIndexDivisor passed to any readers that IndexWriter opens, for example when applying deletes or creating a near-real-time reader in IndexWriter.getReader().
setReclaimDeletesWeight(double) - Method in class org.apache.lucene.index.TieredMergePolicy
Controls how aggressively merges that reclaim more deletions are favored.
setRef(Character, int) - Method in class org.egothor.stemmer.Row
Set the reference to the next row in the Cell of the given Character to the given integer.
setRegexImplementation(RegexCapabilities) - Method in class org.apache.lucene.search.regex.RegexQuery
Defines which RegexCapabilities implementation is used by this instance.
setRegexImplementation(RegexCapabilities) - Method in interface org.apache.lucene.search.regex.RegexQueryCapable

setRegexImplementation(RegexCapabilities) - Method in class org.apache.lucene.search.regex.SpanRegexQuery
Deprecated.
setRepetitions(int) - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

setReplaceInvalidAcronym(boolean) - Method in class org.apache.lucene.analysis.standard.ClassicTokenizer
Deprecated. Remove in 3.X and make true the only valid value See https://issues.apache.org/jira/browse/LUCENE-1068
setReplaceInvalidAcronym(boolean) - Method in class org.apache.lucene.analysis.standard.StandardTokenizer
Deprecated. Remove in 3.X and make true the only valid value See https://issues.apache.org/jira/browse/LUCENE-1068
setResidue(double) - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode
Set the residue.
setResolution(long) - Method in class org.apache.lucene.search.TimeLimitingCollector.TimerThread
Set the timer resolution.
setResultMode(FacetRequest.ResultMode) - Method in class org.apache.lucene.facet.search.params.FacetRequest

setRewriteMethod(MultiTermQuery.RewriteMethod) - Method in class org.apache.lucene.search.MultiTermQuery
Sets the rewrite method to be used when executing the query.
setRewriteMethod(SpanMultiTermQueryWrapper.SpanRewriteMethod) - Method in class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper
Expert: sets the rewrite method.
setRunInBackground(int) - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

setRunningMerge(MergePolicy.OneMerge) - Method in class org.apache.lucene.index.ConcurrentMergeScheduler.MergeThread

setRunTime(double) - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

setSampingThreshold(int) - Method in class org.apache.lucene.facet.search.sampling.SamplingParams
Set a sampling-threshold
setSampler(Sampler) - Method in class org.apache.lucene.facet.search.AdaptiveFacetsAccumulator
Set the sampler.
setSampleRatio(double) - Method in class org.apache.lucene.facet.search.sampling.SamplingParams

setScorer(Scorer) - Method in class org.apache.lucene.facet.search.FacetsCollector

setScorer(Scorer) - Method in class org.apache.lucene.search.CheckHits.ExplanationAsserter

setScorer(Scorer) - Method in class org.apache.lucene.search.CheckHits.SetCollector

setScorer(Scorer) - Method in class org.apache.lucene.search.Collector
Called before successive calls to Collector.collect(int).
setScorer(Scorer) - Method in class org.apache.lucene.search.FieldComparator.RelevanceComparator

setScorer(Scorer) - Method in class org.apache.lucene.search.FieldComparator
Sets the Scorer to use in case a document's score is needed.
setScorer(Scorer) - Method in class org.apache.lucene.search.grouping.AbstractAllGroupsCollector

setScorer(Scorer) - Method in class org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector

setScorer(Scorer) - Method in class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector

setScorer(Scorer) - Method in class org.apache.lucene.search.grouping.BlockGroupingCollector

setScorer(Scorer) - Method in class org.apache.lucene.search.join.ToParentBlockJoinCollector

setScorer(Scorer) - Method in class org.apache.lucene.search.MultiCollector

setScorer(Scorer) - Method in class org.apache.lucene.search.PositiveScoresOnlyCollector

setScorer(Scorer) - Method in class org.apache.lucene.search.TimeLimitingCollector

setScorer(Scorer) - Method in class org.apache.lucene.search.TopScoreDocCollector

setScorer(Scorer) - Method in class org.apache.lucene.search.TotalHitCountCollector

setSegmentsPerTier(double) - Method in class org.apache.lucene.index.TieredMergePolicy
Sets the allowed number of segments per tier.
setShouldHaveCache(boolean) - Method in class org.apache.lucene.search.CachingWrapperFilterHelper

setSimilarity(Similarity) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.setSimilarity(Similarity) instead
setSimilarity(Similarity) - Method in class org.apache.lucene.index.IndexWriterConfig
Expert: set the Similarity implementation used by this IndexWriter.
setSimilarity(float) - Method in class org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode

setSimilarity(Similarity) - Method in class org.apache.lucene.search.IndexSearcher
Expert: Set the Similarity implementation used by this Searcher.
setSimilarity(Similarity) - Method in class org.apache.lucene.search.Searcher
Deprecated. Expert: Set the Similarity implementation used by this Searcher.
setSimilarity(Similarity) - Method in class org.apache.lucene.search.similar.MoreLikeThis

setSimilarity(Similarity) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
setSize(int) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.DiskOrdinalMap

setSize(int) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.MemoryOrdinalMap

setSize(int) - Method in interface org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.OrdinalMap
Set the size of the map.
setSlop(int) - Method in class org.apache.lucene.search.MultiPhraseQuery
Sets the phrase slop for this query.
setSlop(int) - Method in class org.apache.lucene.search.PhraseQuery
Sets the number of other words permitted between words in query phrase.
setSort(SortField) - Method in class org.apache.lucene.search.Sort
Sets the sort to the given criteria.
setSort(SortField...) - Method in class org.apache.lucene.search.Sort
Sets the sort to the given criteria in succession.
setSortBy(FacetRequest.SortBy) - Method in class org.apache.lucene.facet.search.params.FacetRequest

setSortOrder(FacetRequest.SortOrder) - Method in class org.apache.lucene.facet.search.params.FacetRequest

setSpacerCharacter(Character) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated.
setSpellIndex(Directory) - Method in class org.apache.lucene.search.spell.SpellChecker
Use a different index as the spell checker index or re-open the existing index if spellIndex is the same value as given in the constructor.
setStartOffset(int) - Method in class org.apache.lucene.analysis.Token
Set the starting offset.
setStartOffset(int) - Method in class org.apache.lucene.index.TermVectorOffsetInfo

setStartTimeMillis() - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

setStemDictionary(File) - Method in class org.apache.lucene.analysis.nl.DutchAnalyzer
Deprecated. This prevents reuse of TokenStreams. If you wish to use a custom stem dictionary, create your own Analyzer with StemmerOverrideFilter
setStemDictionary(HashMap<?, ?>) - Method in class org.apache.lucene.analysis.nl.DutchStemFilter
Deprecated. Set dictionary for stemming, this dictionary overrules the algorithm, so you can correct for a particular unwanted word-stem pair.
setStemExclusionTable(String...) - Method in class org.apache.lucene.analysis.br.BrazilianAnalyzer
Deprecated. use BrazilianAnalyzer.BrazilianAnalyzer(Version, Set, Set) instead
setStemExclusionTable(Map<?, ?>) - Method in class org.apache.lucene.analysis.br.BrazilianAnalyzer
Deprecated. use BrazilianAnalyzer.BrazilianAnalyzer(Version, Set, Set) instead
setStemExclusionTable(File) - Method in class org.apache.lucene.analysis.br.BrazilianAnalyzer
Deprecated. use BrazilianAnalyzer.BrazilianAnalyzer(Version, Set, Set) instead
setStemExclusionTable(String[]) - Method in class org.apache.lucene.analysis.de.GermanAnalyzer
Deprecated. use GermanAnalyzer.GermanAnalyzer(Version, Set, Set) instead
setStemExclusionTable(Map<?, ?>) - Method in class org.apache.lucene.analysis.de.GermanAnalyzer
Deprecated. use GermanAnalyzer.GermanAnalyzer(Version, Set, Set) instead
setStemExclusionTable(File) - Method in class org.apache.lucene.analysis.de.GermanAnalyzer
Deprecated. use GermanAnalyzer.GermanAnalyzer(Version, Set, Set) instead
setStemExclusionTable(String...) - Method in class org.apache.lucene.analysis.fr.FrenchAnalyzer
Deprecated. use FrenchAnalyzer.FrenchAnalyzer(Version, Set, Set) instead
setStemExclusionTable(Map<?, ?>) - Method in class org.apache.lucene.analysis.fr.FrenchAnalyzer
Deprecated. use FrenchAnalyzer.FrenchAnalyzer(Version, Set, Set) instead
setStemExclusionTable(File) - Method in class org.apache.lucene.analysis.fr.FrenchAnalyzer
Deprecated. use FrenchAnalyzer.FrenchAnalyzer(Version, Set, Set) instead
setStemExclusionTable(String...) - Method in class org.apache.lucene.analysis.nl.DutchAnalyzer
Deprecated. use DutchAnalyzer.DutchAnalyzer(Version, Set, Set) instead
setStemExclusionTable(HashSet<?>) - Method in class org.apache.lucene.analysis.nl.DutchAnalyzer
Deprecated. use DutchAnalyzer.DutchAnalyzer(Version, Set, Set) instead
setStemExclusionTable(File) - Method in class org.apache.lucene.analysis.nl.DutchAnalyzer
Deprecated. use DutchAnalyzer.DutchAnalyzer(Version, Set, Set) instead
setStemmer(GermanStemmer) - Method in class org.apache.lucene.analysis.de.GermanStemFilter
Set a alternative/custom GermanStemmer for this filter.
setStemmer(FrenchStemmer) - Method in class org.apache.lucene.analysis.fr.FrenchStemFilter
Deprecated. Set a alternative/custom FrenchStemmer for this filter.
setStemmer(DutchStemmer) - Method in class org.apache.lucene.analysis.nl.DutchStemFilter
Deprecated. Set a alternative/custom DutchStemmer for this filter.
setStemmer(RussianStemmer) - Method in class org.apache.lucene.analysis.ru.RussianStemFilter
Deprecated. Set a alternative/custom RussianStemmer for this filter.
setStopWords(Set<?>) - Method in class org.apache.lucene.search.similar.MoreLikeThis
Set the set of stopwords.
setStopWords(Set<?>) - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

setStoreTermVector(Field.TermVector) - Method in class org.apache.lucene.document.AbstractField

setStrict(boolean) - Method in class org.apache.lucene.search.function.CustomScoreQuery
Set the strict mode of this query.
setStrictMode(boolean) - Method in class org.apache.lucene.xmlparser.builders.NumericRangeFilterBuilder
Specifies how this NumericRangeFilterBuilder will handle errors.
setStringDistance(StringDistance) - Method in class org.apache.lucene.search.spell.SpellChecker
Sets the StringDistance implementation for this SpellChecker instance.
setStrip(String) - Method in class org.apache.lucene.analysis.hunspell.HunspellAffix
Sets the stripping characters defined for the affix
setSubResults(List<FacetResultNode>) - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode
Set the sub results.
setSuffix(TokenStream) - Method in class org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter

setSyntaxParser(SyntaxParser) - Method in class org.apache.lucene.queryParser.core.QueryParserHelper
Sets the text parser that will be used to parse the query string, it cannot be null.
setSystemError(String) - Method in class org.apache.lucene.util.LuceneJUnitResultFormatter
.
setSystemOutput(String) - Method in class org.apache.lucene.util.LuceneJUnitResultFormatter
.
setTabSize(int) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

setTabSize(int) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

setTag(String, Object) - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode
Associate the specified value with the specified tagName.
setTag(CharSequence, Object) - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode
Deprecated. use QueryNode.setTag(String, Object) instead
setTag(CharSequence, Object) - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
Deprecated. use QueryNodeImpl.setTag(String, Object) instead
setTag(String, Object) - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

setTaxonomyReader(TaxonomyReader) - Method in class org.apache.lucene.benchmark.byTask.PerfRunData
Set the taxonomy reader.
setTaxonomyWriter(TaxonomyWriter) - Method in class org.apache.lucene.benchmark.byTask.PerfRunData

setTerm(String) - Method in class org.apache.lucene.search.highlight.WeightedTerm

setTermBuffer(char[], int, int) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
Deprecated.
setTermBuffer(String) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
Deprecated.
setTermBuffer(String, int, int) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
Deprecated.
setTermBuffer(char[], int, int) - Method in interface org.apache.lucene.analysis.tokenattributes.TermAttribute
Deprecated. Copies the contents of buffer, starting at offset for length characters, into the termBuffer array.
setTermBuffer(String) - Method in interface org.apache.lucene.analysis.tokenattributes.TermAttribute
Deprecated. Copies the contents of buffer into the termBuffer array.
setTermBuffer(String, int, int) - Method in interface org.apache.lucene.analysis.tokenattributes.TermAttribute
Deprecated. Copies the contents of buffer, starting at offset and continuing for length characters, into the termBuffer array.
setTermIndex(int) - Method in class org.apache.lucene.store.instantiated.InstantiatedTerm

setTermIndexInterval(int) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.setTermIndexInterval(int)
setTermIndexInterval(int) - Method in class org.apache.lucene.index.IndexWriterConfig
Expert: set the interval between indexed terms.
setTermLength(int) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
Deprecated.
setTermLength(int) - Method in interface org.apache.lucene.analysis.tokenattributes.TermAttribute
Deprecated. Set number of valid characters (length of the term) in the termBuffer array.
setTestMode() - Static method in class org.apache.lucene.index.ConcurrentMergeScheduler
Deprecated. this test mode code will be removed in a future release
setTestPoint(double, double) - Method in class org.apache.lucene.spatial.geometry.shape.DistanceApproximation
Deprecated.
setText(CharacterIterator) - Method in class org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator

setText(String) - Method in class org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator

setText(char[], int, int) - Method in class org.apache.lucene.analysis.util.CharArrayIterator
Set a new region of text to be examined by this iterator
setText(CharSequence) - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

setText(CharSequence) - Method in interface org.apache.lucene.queryParser.core.nodes.TextableQueryNode

setTextFragmenter(Fragmenter) - Method in class org.apache.lucene.search.highlight.Highlighter

setThreadPriority(int) - Method in class org.apache.lucene.index.ConcurrentMergeScheduler.MergeThread

setThreshold(float) - Method in class org.apache.lucene.search.spell.JaroWinklerDistance
Sets the threshold used to determine when Winkler bonus should be used.
setThrottling(MockDirectoryWrapper.Throttling) - Method in class org.apache.lucene.store.MockDirectoryWrapper

setTitle(String) - Method in class org.apache.lucene.benchmark.byTask.feeds.DocData

setToken(Token) - Method in interface org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttribute

setToken(Token) - Method in class org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttributeImpl

setToken(Token) - Method in interface org.apache.lucene.analysis.ja.tokenattributes.InflectionAttribute

setToken(Token) - Method in class org.apache.lucene.analysis.ja.tokenattributes.InflectionAttributeImpl

setToken(Token) - Method in interface org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttribute

setToken(Token) - Method in class org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttributeImpl

setToken(Token) - Method in interface org.apache.lucene.analysis.ja.tokenattributes.ReadingAttribute

setToken(Token) - Method in class org.apache.lucene.analysis.ja.tokenattributes.ReadingAttributeImpl

setToken(Token) - Method in class org.apache.lucene.analysis.miscellaneous.SingleTokenTokenStream

setTokenPositioner(Token, ShingleMatrixFilter.TokenPositioner) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec
Deprecated.
setTokenPositioner(Token, ShingleMatrixFilter.TokenPositioner) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec
Deprecated. Sets the TokenPositioner as token flags int value.
setTokenPositioner(Token, ShingleMatrixFilter.TokenPositioner) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec
Deprecated. Sets information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
setTokenPositioner(Token, ShingleMatrixFilter.TokenPositioner) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec
Deprecated.
setTokens(List<Token>) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column.Row
Deprecated.
setTokenSeparator(String) - Method in class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper
Deprecated. Setting tokenSeparator after Analyzer instantiation prevents reuse. Confgure tokenSeparator during construction.
setTokenSeparator(String) - Method in class org.apache.lucene.analysis.shingle.ShingleFilter
Sets the string to use when joining adjacent tokens to form a shingle
setTokenStream(TokenStream) - Method in class org.apache.lucene.document.Field
Expert: sets the token stream to be used for indexing and causes isIndexed() and isTokenized() to return true.
setTokenType(String) - Method in class org.apache.lucene.analysis.shingle.ShingleFilter
Set the type of the shingle tokens produced by this filter.
setTrackDiskUsage(boolean) - Method in class org.apache.lucene.store.MockDirectoryWrapper

setType(String) - Method in class org.apache.lucene.analysis.Token
Set the lexical type.
setType(String) - Method in interface org.apache.lucene.analysis.tokenattributes.TypeAttribute
Set the lexical type.
setType(String) - Method in class org.apache.lucene.analysis.tokenattributes.TypeAttributeImpl
Set the lexical type.
setType(NumericField.DataType) - Method in class org.apache.lucene.queryParser.standard.config.NumericConfig
Sets the numeric type used to index the numeric values
setup() - Method in class org.apache.lucene.benchmark.byTask.tasks.AddDocTask

setup() - Method in class org.apache.lucene.benchmark.byTask.tasks.AddFacetedDocTask

setup() - Method in class org.apache.lucene.benchmark.byTask.tasks.DeleteByPercentTask

setup() - Method in class org.apache.lucene.benchmark.byTask.tasks.DeleteDocTask

setup() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask
Task setup work that should not be measured for that specific task.
setup() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask

setup() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTokensTask

setup() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

setup() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask

setup() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask

setup() - Method in class org.apache.lucene.benchmark.byTask.tasks.UpdateDocTask

setUp() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

setUp() - Method in class org.apache.lucene.util.LuceneTestCase
For subclassing only.
setUseCompoundFile(boolean) - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams

setUseCompoundFile(boolean) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use LogMergePolicy.setUseCompoundFile(boolean).
setUseCompoundFile(boolean) - Method in class org.apache.lucene.index.LogMergePolicy
Sets whether compound file format should be used for newly flushed and newly merged segments.
setUseCompoundFile(boolean) - Method in class org.apache.lucene.index.TieredMergePolicy
Sets whether compound file format should be used for newly flushed and newly merged segments.
setUseCompoundFile(MergePolicy, boolean) - Static method in class org.apache.lucene.util._TestUtil

setUseCompoundFile(MergePolicy, boolean) - Static method in class org.apache.lucene.util.LuceneTestCase

setUseOldRangeQuery(boolean) - Method in class org.apache.lucene.queryParser.standard.QueryParserWrapper
Deprecated.
setUseUnmap(boolean) - Method in class org.apache.lucene.store.MMapDirectory
This method enables the workaround for unmapping the buffers from address space after closing IndexInput, that is mentioned in the bug report.
setValue(V) - Method in class org.apache.lucene.analysis.CharArrayMap.EntryIterator
sets the value associated with the last key returned
setValue(String) - Method in class org.apache.lucene.document.Field
Expert: change the value of this field.
setValue(Reader) - Method in class org.apache.lucene.document.Field
Expert: change the value of this field.
setValue(byte[]) - Method in class org.apache.lucene.document.Field
Expert: change the value of this field.
setValue(byte[], int, int) - Method in class org.apache.lucene.document.Field
Expert: change the value of this field.
setValue(double) - Method in interface org.apache.lucene.facet.search.results.FacetResultNode
Expert: Set a new value for this result node.
setValue(double) - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode
Set the value of this result.
setValue(CharSequence) - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

setValue(T) - Method in interface org.apache.lucene.queryParser.core.nodes.ValueQueryNode

setValue(Number) - Method in class org.apache.lucene.queryParser.standard.nodes.NumericQueryNode
Sets the numeric value.
setValue(float) - Method in class org.apache.lucene.search.Explanation
Sets the value assigned to this explanation node.
setVectorSpace(Map<String, List<InstantiatedTermDocumentInformation>>) - Method in class org.apache.lucene.store.instantiated.InstantiatedDocument

setWeight(Token, float) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec
Deprecated.
setWeight(Token, float) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec
Deprecated. Stores a 32 bit float in the payload, or set it to null if 1f;
setWeight(Token, float) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec
Deprecated. Have this method do nothing in order to 'disable' weights.
setWeight(Token, float) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec
Deprecated.
setWeight(float) - Method in class org.apache.lucene.queryParser.surround.query.SrndQuery

setWeight(float) - Method in class org.apache.lucene.search.highlight.WeightedTerm

setWrapIfNotCachingTokenFilter(boolean) - Method in class org.apache.lucene.search.highlight.QueryScorer
By default, TokenStreams that are not of the type CachingTokenFilter are wrapped in a CachingTokenFilter to ensure an efficient reset - if you are already using a different caching TokenStream impl and you don't want it to be wrapped, set this to false.
setWrapIfNotCachingTokenFilter(boolean) - Method in class org.apache.lucene.search.highlight.WeightedSpanTermExtractor
By default, TokenStreams that are not of the type CachingTokenFilter are wrapped in a CachingTokenFilter to ensure an efficient reset - if you are already using a different caching TokenStream impl and you don't want it to be wrapped, set this to false.
setWriteLockTimeout(long) - Method in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.setWriteLockTimeout(long) instead
setWriteLockTimeout(long) - Method in class org.apache.lucene.index.IndexWriterConfig
Sets the maximum time to wait for a write lock (in milliseconds) for this instance.
setX(double) - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
setX(double) - Method in class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated.
setY(double) - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
setY(double) - Method in class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated.
SHADDA - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

shallowSizeOf(Object) - Static method in class org.apache.lucene.util.RamUsageEstimator
Estimates a "shallow" memory usage of the given object.
shallowSizeOfInstance(Class<?>) - Static method in class org.apache.lucene.util.RamUsageEstimator
Returns the shallow instance size in bytes an instance of the given class would occupy.
Shape - Class in org.apache.lucene.spatial.tier
Deprecated.
Shape(String) - Constructor for class org.apache.lucene.spatial.tier.Shape
Deprecated.
shardIndex - Variable in class org.apache.lucene.search.ScoreDoc
Only set by TopDocs.merge(org.apache.lucene.search.Sort, int, org.apache.lucene.search.TopDocs[])
SHIFT_START_INT - Static variable in class org.apache.lucene.util.NumericUtils
Expert: Integers are stored at lower precision by shifting off lower bits.
SHIFT_START_LONG - Static variable in class org.apache.lucene.util.NumericUtils
Expert: Longs are stored at lower precision by shifting off lower bits.
ShingleAnalyzerWrapper - Class in org.apache.lucene.analysis.shingle
A ShingleAnalyzerWrapper wraps a ShingleFilter around another Analyzer.
ShingleAnalyzerWrapper(Analyzer) - Constructor for class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper

ShingleAnalyzerWrapper(Analyzer, int) - Constructor for class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper

ShingleAnalyzerWrapper(Analyzer, int, int) - Constructor for class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper

ShingleAnalyzerWrapper(Analyzer, int, int, String, boolean, boolean) - Constructor for class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper
Creates a new ShingleAnalyzerWrapper
ShingleAnalyzerWrapper(Version) - Constructor for class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper
Wraps StandardAnalyzer.
ShingleAnalyzerWrapper(Version, int, int) - Constructor for class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper
Wraps StandardAnalyzer.
ShingleFilter - Class in org.apache.lucene.analysis.shingle
A ShingleFilter constructs shingles (token n-grams) from a token stream.
ShingleFilter(TokenStream, int, int) - Constructor for class org.apache.lucene.analysis.shingle.ShingleFilter
Constructs a ShingleFilter with the specified shingle size from the TokenStream input
ShingleFilter(TokenStream, int) - Constructor for class org.apache.lucene.analysis.shingle.ShingleFilter
Constructs a ShingleFilter with the specified shingle size from the TokenStream input
ShingleFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.shingle.ShingleFilter
Construct a ShingleFilter with default shingle size: 2.
ShingleFilter(TokenStream, String) - Constructor for class org.apache.lucene.analysis.shingle.ShingleFilter
Construct a ShingleFilter with the specified token type for shingle tokens and the default shingle size: 2
ShingleMatrixFilter - Class in org.apache.lucene.analysis.shingle
Deprecated. Will be removed in Lucene 4.0. This filter is unmaintained and might not behave correctly if used with custom Attributes, i.e. Attributes other than the ones located in org.apache.lucene.analysis.tokenattributes. It also uses hardcoded payload encoders which makes it not easily adaptable to other use-cases.
ShingleMatrixFilter(ShingleMatrixFilter.Matrix, int, int, Character, boolean, ShingleMatrixFilter.TokenSettingsCodec) - Constructor for class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated. Creates a shingle filter based on a user defined matrix.
ShingleMatrixFilter(TokenStream, int, int) - Constructor for class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated. Creates a shingle filter using default settings.
ShingleMatrixFilter(TokenStream, int, int, Character) - Constructor for class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated. Creates a shingle filter using default settings.
ShingleMatrixFilter(TokenStream, int, int, Character, boolean) - Constructor for class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated. Creates a shingle filter using the default ShingleMatrixFilter.TokenSettingsCodec.
ShingleMatrixFilter(TokenStream, int, int, Character, boolean, ShingleMatrixFilter.TokenSettingsCodec) - Constructor for class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated. Creates a shingle filter with ad hoc parameter settings.
ShingleMatrixFilter.Matrix - Class in org.apache.lucene.analysis.shingle
Deprecated. A column focused matrix in three dimensions:
ShingleMatrixFilter.Matrix() - Constructor for class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix
Deprecated.
ShingleMatrixFilter.Matrix.Column - Class in org.apache.lucene.analysis.shingle
Deprecated.
ShingleMatrixFilter.Matrix.Column(Token) - Constructor for class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column
Deprecated.
ShingleMatrixFilter.Matrix.Column() - Constructor for class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column
Deprecated.
ShingleMatrixFilter.Matrix.Column.Row - Class in org.apache.lucene.analysis.shingle
Deprecated.
ShingleMatrixFilter.Matrix.Column.Row() - Constructor for class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column.Row
Deprecated.
ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec - Class in org.apache.lucene.analysis.shingle
Deprecated. Using this codec makes a ShingleMatrixFilter act like ShingleFilter.
ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec() - Constructor for class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec
Deprecated.
ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec - Class in org.apache.lucene.analysis.shingle
Deprecated. A full featured codec not to be used for something serious.
ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec() - Constructor for class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec
Deprecated.
ShingleMatrixFilter.TokenPositioner - Class in org.apache.lucene.analysis.shingle
Deprecated. Used to describe how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
ShingleMatrixFilter.TokenSettingsCodec - Class in org.apache.lucene.analysis.shingle
Deprecated. Strategy used to code and decode meta data of the tokens from the input stream regarding how to position the tokens in the matrix, set and retreive weight, et c.
ShingleMatrixFilter.TokenSettingsCodec() - Constructor for class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec
Deprecated.
ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec - Class in org.apache.lucene.analysis.shingle
Deprecated. A codec that creates a two dimensional matrix by treating tokens from the input stream with 0 position increment as new rows to the current column.
ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec() - Constructor for class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec
Deprecated.
SHORT - Static variable in class org.apache.lucene.search.function.FieldScoreQuery.Type
field values are interpreted as numeric short values.
SHORT - Static variable in class org.apache.lucene.search.SortField
Sort using term values as encoded Shorts.
shortestPaths(FST<T>, FST.Arc<T>, Comparator<T>, int) - Static method in class org.apache.lucene.util.fst.Util
Starting from node, find the top N min cost completions to a final node.
ShortFieldSource - Class in org.apache.lucene.search.function
Expert: obtains short field values from the FieldCache using getShorts() and makes those values available as other numeric types, casting as needed.
ShortFieldSource(String) - Constructor for class org.apache.lucene.search.function.ShortFieldSource
Create a cached short field source with default string-to-short parser.
ShortFieldSource(String, FieldCache.ShortParser) - Constructor for class org.apache.lucene.search.function.ShortFieldSource
Create a cached short field source with a specific string-to-short parser.
shouldAdd(int) - Method in class org.apache.lucene.facet.index.categorypolicy.DefaultOrdinalPolicy
Filters out (returns false) ordinals equal or less than TaxonomyReader.ROOT_ORDINAL.
shouldAdd(CategoryPath) - Method in class org.apache.lucene.facet.index.categorypolicy.DefaultPathPolicy
Filters out (returns false) CategoryPaths equal or less than TaxonomyReader.ROOT_ORDINAL.
shouldAdd(int) - Method in class org.apache.lucene.facet.index.categorypolicy.NonTopLevelOrdinalPolicy
Filters out ordinal which are ROOT or who's parent is ROOT.
shouldAdd(CategoryPath) - Method in class org.apache.lucene.facet.index.categorypolicy.NonTopLevelPathPolicy
Filters out (returns false) CategoryPaths equal or less than TaxonomyReader.ROOT_ORDINAL.
shouldAdd(int) - Method in interface org.apache.lucene.facet.index.categorypolicy.OrdinalPolicy
Check whether a given category ordinal should be added to the stream.
shouldAdd(CategoryPath) - Method in interface org.apache.lucene.facet.index.categorypolicy.PathPolicy
Check whether a given category path should be added to the stream.
shouldComplement(ScoredDocIDs) - Method in class org.apache.lucene.facet.search.StandardFacetsAccumulator
Check if it is worth to use complements
shouldDelete(String) - Method in class org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint
Returns true if this segment can be deleted.
shouldLog() - Method in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
Returns true whether it's time to log a message (depending on verbose and the number of items generated).
shouldNeverLogAtStart() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask
Tasks that should never log at start can override this.
shouldNeverLogAtStart() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReportTask

shouldNotRecordStats() - Method in class org.apache.lucene.benchmark.byTask.tasks.ClearStatsTask

shouldNotRecordStats() - Method in class org.apache.lucene.benchmark.byTask.tasks.NewRoundTask

shouldNotRecordStats() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask
Tasks that should not record statistics can override this.
shouldNotRecordStats() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReportTask

shouldNotRecordStats() - Method in class org.apache.lucene.benchmark.byTask.tasks.ResetInputsTask

shouldSample(ScoredDocIDs) - Method in class org.apache.lucene.facet.search.sampling.Sampler
Check if this sampler would complement for the input docIds
shouldUpgradeSegment(SegmentInfo) - Method in class org.apache.lucene.index.UpgradeIndexMergePolicy
Returns if the given segment should be upgraded.
shrink(short[], int) - Static method in class org.apache.lucene.util.ArrayUtil

shrink(int[], int) - Static method in class org.apache.lucene.util.ArrayUtil

shrink(long[], int) - Static method in class org.apache.lucene.util.ArrayUtil

shrink(byte[], int) - Static method in class org.apache.lucene.util.ArrayUtil

shrink(boolean[], int) - Static method in class org.apache.lucene.util.ArrayUtil

shrink(char[], int) - Static method in class org.apache.lucene.util.ArrayUtil

shrink(int[][], int) - Static method in class org.apache.lucene.util.ArrayUtil

shrink(float[][], int) - Static method in class org.apache.lucene.util.ArrayUtil

similarity - Variable in class org.apache.lucene.search.BooleanQuery.BooleanWeight
The Similarity implementation.
similarity - Variable in class org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight
The Similarity implementation.
Similarity - Class in org.apache.lucene.search
Expert: Scoring API.
Similarity() - Constructor for class org.apache.lucene.search.Similarity

similarity - Variable in class org.apache.lucene.search.spans.SpanWeight

SimilarityDelegator - Class in org.apache.lucene.search
Deprecated. this class will be removed in 4.0. Please subclass Similarity or DefaultSimilarity instead.
SimilarityDelegator(Similarity) - Constructor for class org.apache.lucene.search.SimilarityDelegator
Deprecated. Construct a Similarity that delegates all methods to another.
SimilarityQueries - Class in org.apache.lucene.search.similar
Simple similarity measures.
SIMPLE - Static variable in class org.apache.lucene.analysis.MockTokenizer
Acts like LetterTokenizer.
SimpleAnalyzer - Class in org.apache.lucene.analysis
An Analyzer that filters LetterTokenizer with LowerCaseFilter
SimpleAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.SimpleAnalyzer
Creates a new SimpleAnalyzer
SimpleAnalyzer() - Constructor for class org.apache.lucene.analysis.SimpleAnalyzer
Deprecated. use SimpleAnalyzer.SimpleAnalyzer(Version) instead
SimpleBoundaryScanner - Class in org.apache.lucene.search.vectorhighlight

SimpleBoundaryScanner() - Constructor for class org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner

SimpleBoundaryScanner(int) - Constructor for class org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner

SimpleBoundaryScanner(Character[]) - Constructor for class org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner

SimpleBoundaryScanner(int, Character[]) - Constructor for class org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner

SimpleBoundaryScanner(int, Set<Character>) - Constructor for class org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner

SimpleCharStream - Class in org.apache.lucene.benchmark.byTask.feeds.demohtml
An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without unicode processing).
SimpleCharStream(Reader, int, int, int) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Constructor.
SimpleCharStream(Reader, int, int) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Constructor.
SimpleCharStream(Reader) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Constructor.
SimpleCharStream(InputStream, String, int, int, int) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Constructor.
SimpleCharStream(InputStream, int, int, int) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Constructor.
SimpleCharStream(InputStream, String, int, int) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Constructor.
SimpleCharStream(InputStream, int, int) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Constructor.
SimpleCharStream(InputStream, String) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Constructor.
SimpleCharStream(InputStream) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Constructor.
SimpleFragListBuilder - Class in org.apache.lucene.search.vectorhighlight
A simple implementation of FragListBuilder.
SimpleFragListBuilder(int) - Constructor for class org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder

SimpleFragListBuilder() - Constructor for class org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder

SimpleFragmenter - Class in org.apache.lucene.search.highlight
Fragmenter implementation which breaks text up into same-size fragments with no concerns over spotting sentence boundaries.
SimpleFragmenter() - Constructor for class org.apache.lucene.search.highlight.SimpleFragmenter

SimpleFragmenter(int) - Constructor for class org.apache.lucene.search.highlight.SimpleFragmenter

SimpleFragmentsBuilder - Class in org.apache.lucene.search.vectorhighlight
A simple implementation of FragmentsBuilder.
SimpleFragmentsBuilder() - Constructor for class org.apache.lucene.search.vectorhighlight.SimpleFragmentsBuilder
a constructor.
SimpleFragmentsBuilder(String[], String[]) - Constructor for class org.apache.lucene.search.vectorhighlight.SimpleFragmentsBuilder
a constructor.
SimpleFragmentsBuilder(BoundaryScanner) - Constructor for class org.apache.lucene.search.vectorhighlight.SimpleFragmentsBuilder

SimpleFragmentsBuilder(String[], String[], BoundaryScanner) - Constructor for class org.apache.lucene.search.vectorhighlight.SimpleFragmentsBuilder

SimpleFSDirectory - Class in org.apache.lucene.store
A straightforward implementation of FSDirectory using java.io.RandomAccessFile.
SimpleFSDirectory(File, LockFactory) - Constructor for class org.apache.lucene.store.SimpleFSDirectory
Create a new SimpleFSDirectory for the named location.
SimpleFSDirectory(File) - Constructor for class org.apache.lucene.store.SimpleFSDirectory
Create a new SimpleFSDirectory for the named location and NativeFSLockFactory.
SimpleFSDirectory.SimpleFSIndexInput - Class in org.apache.lucene.store

SimpleFSDirectory.SimpleFSIndexInput(File, int, int) - Constructor for class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput
Deprecated. please pass resourceDesc
SimpleFSDirectory.SimpleFSIndexInput(String, File, int, int) - Constructor for class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput

SimpleFSDirectory.SimpleFSIndexInput.Descriptor - Class in org.apache.lucene.store

SimpleFSDirectory.SimpleFSIndexInput.Descriptor(File, String) - Constructor for class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput.Descriptor

SimpleFSLockFactory - Class in org.apache.lucene.store
Implements LockFactory using File.createNewFile().
SimpleFSLockFactory() - Constructor for class org.apache.lucene.store.SimpleFSLockFactory
Create a SimpleFSLockFactory instance, with null (unset) lock directory.
SimpleFSLockFactory(File) - Constructor for class org.apache.lucene.store.SimpleFSLockFactory
Instantiate using the provided directory (as a File instance).
SimpleFSLockFactory(String) - Constructor for class org.apache.lucene.store.SimpleFSLockFactory
Instantiate using the provided directory name (String).
SimpleHTMLEncoder - Class in org.apache.lucene.search.highlight
Simple Encoder implementation to escape text for HTML output
SimpleHTMLEncoder() - Constructor for class org.apache.lucene.search.highlight.SimpleHTMLEncoder

SimpleHTMLFormatter - Class in org.apache.lucene.search.highlight
Simple Formatter implementation to highlight terms with a pre and post tag.
SimpleHTMLFormatter(String, String) - Constructor for class org.apache.lucene.search.highlight.SimpleHTMLFormatter

SimpleHTMLFormatter() - Constructor for class org.apache.lucene.search.highlight.SimpleHTMLFormatter
Default constructor uses HTML: <B> tags to markup terms.
SimpleIntDecoder - Class in org.apache.lucene.util.encoding
A simple stream decoder which can decode values encoded with SimpleIntEncoder.
SimpleIntDecoder() - Constructor for class org.apache.lucene.util.encoding.SimpleIntDecoder

SimpleIntEncoder - Class in org.apache.lucene.util.encoding
A simple IntEncoder, writing an integer as 4 raw bytes.
SimpleIntEncoder() - Constructor for class org.apache.lucene.util.encoding.SimpleIntEncoder

SimpleQQParser - Class in org.apache.lucene.benchmark.quality.utils
Simplistic quality query parser.
SimpleQQParser(String[], String) - Constructor for class org.apache.lucene.benchmark.quality.utils.SimpleQQParser
Constructor of a simple qq parser.
SimpleQQParser(String, String) - Constructor for class org.apache.lucene.benchmark.quality.utils.SimpleQQParser
Constructor of a simple qq parser.
SimpleQueryMaker - Class in org.apache.lucene.benchmark.byTask.feeds
A QueryMaker that makes queries for a collection created using SingleDocSource.
SimpleQueryMaker() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.SimpleQueryMaker

SimpleSloppyPhraseQueryMaker - Class in org.apache.lucene.benchmark.byTask.feeds
Create sloppy phrase queries for performance test, in an index created using simple doc maker.
SimpleSloppyPhraseQueryMaker() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.SimpleSloppyPhraseQueryMaker

SimpleSpanFragmenter - Class in org.apache.lucene.search.highlight
Fragmenter implementation which breaks text up into same-size fragments but does not split up Spans.
SimpleSpanFragmenter(QueryScorer) - Constructor for class org.apache.lucene.search.highlight.SimpleSpanFragmenter

SimpleSpanFragmenter(QueryScorer, int) - Constructor for class org.apache.lucene.search.highlight.SimpleSpanFragmenter

SimpleStringInterner - Class in org.apache.lucene.util
Simple lockless and memory barrier free String intern cache that is guaranteed to return the same String instance as String.intern() does.
SimpleStringInterner(int, int) - Constructor for class org.apache.lucene.util.SimpleStringInterner

SimpleTerm() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

SimpleTerm - Class in org.apache.lucene.queryParser.surround.query

SimpleTerm(boolean) - Constructor for class org.apache.lucene.queryParser.surround.query.SimpleTerm

SimpleTerm.MatchingTermVisitor - Interface in org.apache.lucene.queryParser.surround.query

SIN_45_AS_RADS - Static variable in class org.apache.lucene.spatial.DistanceUtils
Deprecated.
SINGLE_TYPE - Static variable in class org.apache.lucene.analysis.cjk.CJKBigramFilter
when we emit a unigram, its then marked as this type
SingleDocSource - Class in org.apache.lucene.benchmark.byTask.feeds
Creates the same document each time SingleDocSource.getNextDocData(DocData) is called.
SingleDocSource() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.SingleDocSource

SingleFragListBuilder - Class in org.apache.lucene.search.vectorhighlight
An implementation class of FragListBuilder that generates one FieldFragList.WeightedFragInfo object.
SingleFragListBuilder() - Constructor for class org.apache.lucene.search.vectorhighlight.SingleFragListBuilder

SingleInstanceLockFactory - Class in org.apache.lucene.store
Implements LockFactory for a single in-process instance, meaning all locking will take place through this one instance.
SingleInstanceLockFactory() - Constructor for class org.apache.lucene.store.SingleInstanceLockFactory

SingleTermEnum - Class in org.apache.lucene.search
Subclass of FilteredTermEnum for enumerating a single term.
SingleTermEnum(IndexReader, Term) - Constructor for class org.apache.lucene.search.SingleTermEnum
Creates a new SingleTermEnum.
SingleTokenTokenStream - Class in org.apache.lucene.analysis.miscellaneous
A TokenStream containing a single token.
SingleTokenTokenStream(Token) - Constructor for class org.apache.lucene.analysis.miscellaneous.SingleTokenTokenStream

sink - Variable in class org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents

SinusoidalProjector - Class in org.apache.lucene.spatial.tier.projections
Deprecated. Until we can put in place proper tests and a proper fix.
SinusoidalProjector() - Constructor for class org.apache.lucene.spatial.tier.projections.SinusoidalProjector
Deprecated.
size() - Method in class org.apache.lucene.analysis.CharArrayMap.EntrySet

size() - Method in class org.apache.lucene.analysis.CharArrayMap

size() - Method in class org.apache.lucene.analysis.CharArraySet

size() - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

size() - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

size() - Method in class org.apache.lucene.facet.index.CategoryContainer
Get the number of categories in the container.
size() - Method in interface org.apache.lucene.facet.search.Heap
Return the amount of objects currently in the heap
size() - Method in interface org.apache.lucene.facet.search.ScoredDocIDs
Returns the number of scored documents.
size() - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap

size(SegmentInfo) - Method in class org.apache.lucene.index.BalancedSegmentMergePolicy

size() - Method in class org.apache.lucene.index.FieldInfos

size(SegmentInfo) - Method in class org.apache.lucene.index.LogByteSizeMergePolicy

size(SegmentInfo) - Method in class org.apache.lucene.index.LogDocMergePolicy

size(SegmentInfo) - Method in class org.apache.lucene.index.LogMergePolicy

size() - Method in class org.apache.lucene.index.SegmentInfos

size() - Method in interface org.apache.lucene.index.TermFreqVector

size() - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

size() - Method in class org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory

size() - Method in class org.apache.lucene.search.grouping.SentinelIntSet

size() - Method in class org.apache.lucene.search.QueryTermVector

size() - Method in class org.apache.lucene.search.suggest.BytesRefList
Returns the current size of this BytesRefList
size() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermFreqVector

size() - Method in class org.apache.lucene.util.BitVector
Returns the number of bits in this vector.
size() - Method in class org.apache.lucene.util.BytesRefHash
Returns the number of BytesRef values in this BytesRefHash.
size() - Method in class org.apache.lucene.util.collections.ArrayHashMap
Returns number of pairs currently in the map.
size() - Method in class org.apache.lucene.util.collections.FloatToObjectMap

size() - Method in class org.apache.lucene.util.collections.IntArray
Return the size of the Array.
size() - Method in class org.apache.lucene.util.collections.IntHashSet

size() - Method in class org.apache.lucene.util.collections.IntToDoubleMap

size() - Method in class org.apache.lucene.util.collections.IntToIntMap

size() - Method in class org.apache.lucene.util.collections.IntToObjectMap

size() - Method in class org.apache.lucene.util.collections.ObjectToFloatMap

size() - Method in class org.apache.lucene.util.collections.ObjectToIntMap

size() - Method in class org.apache.lucene.util.MapBackedSet

size() - Method in class org.apache.lucene.util.OpenBitSet
Returns the current capacity of this set.
size() - Method in class org.apache.lucene.util.packed.GrowableWriter

size() - Method in interface org.apache.lucene.util.packed.PackedInts.Reader

size() - Method in class org.apache.lucene.util.packed.PackedInts.ReaderImpl

size() - Method in class org.apache.lucene.util.PriorityQueue
Returns the number of elements currently stored in the PriorityQueue.
size() - Method in class org.apache.lucene.util.ScorerDocQueue
Returns the number of scorers currently stored in the ScorerDocQueue.
size() - Method in class org.apache.lucene.util.SortedVIntList

size() - Method in class org.apache.lucene.util.WeakIdentityMap

sizeBytes(SegmentInfo) - Method in class org.apache.lucene.index.LogMergePolicy

sizeDocs(SegmentInfo) - Method in class org.apache.lucene.index.LogMergePolicy

sizeInBytes(boolean) - Method in class org.apache.lucene.index.SegmentInfo
Returns total size in bytes of all of files used by this segment (if includeDocStores is true), or the size of all files except the store files otherwise.
sizeInBytes() - Method in class org.apache.lucene.store.MockDirectoryWrapper

sizeInBytes() - Method in class org.apache.lucene.store.NRTCachingDirectory
Returns how many bytes are being used by the RAMDirectory cache
sizeInBytes - Variable in class org.apache.lucene.store.RAMDirectory

sizeInBytes() - Method in class org.apache.lucene.store.RAMDirectory
Return total size in bytes of all files in this directory.
sizeInBytes - Variable in class org.apache.lucene.store.RAMFile

sizeInBytes() - Method in class org.apache.lucene.store.RAMOutputStream
Returns byte usage of all buffers.
sizeInBytes() - Method in class org.apache.lucene.util.fst.FST
Returns bytes used to represent the FST
sizeMB - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
Net size (MB) of the files referenced by this segment.
sizeOf(byte[]) - Static method in class org.apache.lucene.util.RamUsageEstimator
Returns the size in bytes of the byte[] object.
sizeOf(boolean[]) - Static method in class org.apache.lucene.util.RamUsageEstimator
Returns the size in bytes of the boolean[] object.
sizeOf(char[]) - Static method in class org.apache.lucene.util.RamUsageEstimator
Returns the size in bytes of the char[] object.
sizeOf(short[]) - Static method in class org.apache.lucene.util.RamUsageEstimator
Returns the size in bytes of the short[] object.
sizeOf(int[]) - Static method in class org.apache.lucene.util.RamUsageEstimator
Returns the size in bytes of the int[] object.
sizeOf(float[]) - Static method in class org.apache.lucene.util.RamUsageEstimator
Returns the size in bytes of the float[] object.
sizeOf(long[]) - Static method in class org.apache.lucene.util.RamUsageEstimator
Returns the size in bytes of the long[] object.
sizeOf(double[]) - Static method in class org.apache.lucene.util.RamUsageEstimator
Returns the size in bytes of the double[] object.
sizeOf(Object) - Static method in class org.apache.lucene.util.RamUsageEstimator
Estimates the RAM usage by the given object.
sizeOfMap() - Method in class org.apache.lucene.facet.taxonomy.writercache.cl2o.CompactLabelToOrdinal

skip(long) - Method in class org.apache.lucene.benchmark.byTask.utils.StringBuilderReader

skipBytes(int) - Method in class org.apache.lucene.store.ByteArrayDataInput

skipChars(int) - Method in class org.apache.lucene.store.IndexInput
Deprecated. this method operates on old "modified utf8" encoded strings
skipChars(int) - Method in class org.apache.lucene.store.MockIndexInputWrapper

skipInterval - Variable in class org.apache.lucene.index.SegmentWriteState
Expert: The fraction of TermDocs entries stored in skip tables, used to accelerate TermDocs.skipTo(int).
skipTo(int) - Method in interface org.apache.lucene.facet.search.CategoryListIterator
Skips forward to document docId.
skipTo(int) - Method in class org.apache.lucene.facet.search.PayloadIntDecodingIterator

skipTo(int) - Method in class org.apache.lucene.facet.util.MultiCategoryListIterator
Fails only if skipTo on all the provided iterators returned false
skipTo(int) - Method in class org.apache.lucene.index.AbstractAllTermDocs

skipTo(int) - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermDocs

skipTo(int) - Method in class org.apache.lucene.index.MultipleTermPositions

skipTo(int) - Method in interface org.apache.lucene.index.TermDocs
Skips entries to the first beyond the current whose document number is greater than or equal to target.
skipTo(int) - Method in class org.apache.lucene.search.spans.NearSpansOrdered

skipTo(int) - Method in class org.apache.lucene.search.spans.NearSpansUnordered

skipTo(int) - Method in class org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan

skipTo(int) - Method in class org.apache.lucene.search.spans.Spans
Skips to the first match beyond the current, whose document number is greater than or equal to target.
skipTo(int) - Method in class org.apache.lucene.search.spans.TermSpans

skipTo(int) - Method in class org.apache.lucene.store.instantiated.InstantiatedTermDocs
Skips entries to the first beyond the current whose document number is greater than or equal to target.
skipTo(int) - Method in class org.apache.lucene.store.instantiated.InstantiatedTermPositions
Skips entries to the first beyond the current whose document number is greater than or equal to target.
slice_check() - Method in class org.tartarus.snowball.SnowballProgram

slice_del() - Method in class org.tartarus.snowball.SnowballProgram

slice_from(CharSequence) - Method in class org.tartarus.snowball.SnowballProgram

slice_from(String) - Method in class org.tartarus.snowball.SnowballProgram
Deprecated. for binary back compat. Will be removed in Lucene 4.0
slice_from(StringBuilder) - Method in class org.tartarus.snowball.SnowballProgram
Deprecated. for binary back compat. Will be removed in Lucene 4.0
slice_to(StringBuilder) - Method in class org.tartarus.snowball.SnowballProgram

slop - Variable in class org.apache.lucene.search.spans.SpanNearQuery

sloppyFreq(int) - Method in class org.apache.lucene.search.DefaultSimilarity
Implemented as 1 / (distance + 1).
sloppyFreq(int) - Method in class org.apache.lucene.search.Similarity
Computes the amount of a sloppy phrase match, based on an edit distance.
sloppyFreq(int) - Method in class org.apache.lucene.search.SimilarityDelegator
Deprecated.
SlopQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A SlopQueryNode represents phrase query with a slop.
SlopQueryNode(QueryNode, int) - Constructor for class org.apache.lucene.queryParser.core.nodes.SlopQueryNode

SlopQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
This builder basically reads the Query object set on the SlopQueryNode child using QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID and applies the slop value defined in the SlopQueryNode.
SlopQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.SlopQueryNodeBuilder

slot - Variable in class org.apache.lucene.search.FieldValueHitQueue.Entry

SlowMultiReaderWrapper - Class in org.apache.lucene.index
Acts like Lucene 4.x's SlowMultiReaderWrapper for testing of top-level MultiTermEnum, MultiTermDocs, ...
SlowMultiReaderWrapper(IndexReader) - Constructor for class org.apache.lucene.index.SlowMultiReaderWrapper

SmallFloat - Class in org.apache.lucene.util
Floating point numbers smaller than 32 bits.
SmallFloat() - Constructor for class org.apache.lucene.util.SmallFloat

SmartChineseAnalyzer - Class in org.apache.lucene.analysis.cn.smart
SmartChineseAnalyzer is an analyzer for Chinese or mixed Chinese-English text.
SmartChineseAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer
Create a new SmartChineseAnalyzer, using the default stopword list.
SmartChineseAnalyzer(Version, boolean) - Constructor for class org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer
Create a new SmartChineseAnalyzer, optionally using the default stopword list.
SmartChineseAnalyzer(Version, Set) - Constructor for class org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer
Create a new SmartChineseAnalyzer, using the provided Set of stopwords.
SmartRandom - Class in org.apache.lucene.util
A random that tracks if its been initialized properly, and throws an exception if it hasn't.
smokeTestSearcher(IndexSearcher) - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

snapshot(String) - Method in class org.apache.lucene.index.PersistentSnapshotDeletionPolicy
Snapshots the last commit using the given ID.
snapshot(String) - Method in class org.apache.lucene.index.SnapshotDeletionPolicy
Snapshots the last commit.
SnapshotDeletionPolicy - Class in org.apache.lucene.index
An IndexDeletionPolicy that wraps around any other IndexDeletionPolicy and adds the ability to hold and later release snapshots of an index.
SnapshotDeletionPolicy(IndexDeletionPolicy) - Constructor for class org.apache.lucene.index.SnapshotDeletionPolicy

SnapshotDeletionPolicy(IndexDeletionPolicy, Map<String, String>) - Constructor for class org.apache.lucene.index.SnapshotDeletionPolicy
SnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting.
SnapshotDeletionPolicy.SnapshotCommitPoint - Class in org.apache.lucene.index

SnapshotDeletionPolicy.SnapshotCommitPoint(IndexCommit) - Constructor for class org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint

SnowballAnalyzer - Class in org.apache.lucene.analysis.snowball
Deprecated. Use the language-specific analyzer in contrib/analyzers instead. This analyzer will be removed in Lucene 5.0
SnowballAnalyzer(Version, String) - Constructor for class org.apache.lucene.analysis.snowball.SnowballAnalyzer
Deprecated. Builds the named analyzer with no stop words.
SnowballAnalyzer(Version, String, String[]) - Constructor for class org.apache.lucene.analysis.snowball.SnowballAnalyzer
Deprecated. Use SnowballAnalyzer.SnowballAnalyzer(Version, String, Set) instead.
SnowballAnalyzer(Version, String, Set<?>) - Constructor for class org.apache.lucene.analysis.snowball.SnowballAnalyzer
Deprecated. Builds the named analyzer with the given stop words.
SnowballFilter - Class in org.apache.lucene.analysis.snowball
A filter that stems words using a Snowball-generated stemmer.
SnowballFilter(TokenStream, SnowballProgram) - Constructor for class org.apache.lucene.analysis.snowball.SnowballFilter

SnowballFilter(TokenStream, String) - Constructor for class org.apache.lucene.analysis.snowball.SnowballFilter
Construct the named stemming filter.
SnowballProgram - Class in org.tartarus.snowball
This is the rev 502 of the Snowball SVN trunk, but modified: made abstract and introduced abstract method stem to avoid expensive reflection in filter class.
SnowballProgram() - Constructor for class org.tartarus.snowball.SnowballProgram

SolrSynonymParser - Class in org.apache.lucene.analysis.synonym
Parser for the Solr synonyms format.
SolrSynonymParser(boolean, boolean, Analyzer) - Constructor for class org.apache.lucene.analysis.synonym.SolrSynonymParser

sort(Directory, Directory, String) - Method in class org.apache.lucene.index.IndexSorter

Sort - Class in org.apache.lucene.search
Encapsulates sort criteria for returned hits.
Sort() - Constructor for class org.apache.lucene.search.Sort
Sorts by computed relevance.
Sort(SortField) - Constructor for class org.apache.lucene.search.Sort
Sorts by the criteria in the given SortField.
Sort(SortField...) - Constructor for class org.apache.lucene.search.Sort
Sorts in succession by the criteria in each SortField.
Sort - Class in org.apache.lucene.search.suggest.fst
On-disk sorting of byte arrays.
Sort() - Constructor for class org.apache.lucene.search.suggest.fst.Sort
Defaults constructor.
Sort(Comparator<BytesRef>) - Constructor for class org.apache.lucene.search.suggest.fst.Sort

Sort(Comparator<BytesRef>, Sort.BufferSize, File, int) - Constructor for class org.apache.lucene.search.suggest.fst.Sort
All-details constructor.
sort(File, File) - Method in class org.apache.lucene.search.suggest.fst.Sort
Sort input to output, explicit hint for the buffer size.
sort(Comparator<BytesRef>) - Method in class org.apache.lucene.util.BytesRefHash
Returns the values array sorted by the referenced byte values.
sort() - Method in class org.apache.lucene.util.collections.IntArray
Sorts the data.
Sort.BufferSize - Class in org.apache.lucene.search.suggest.fst
A bit more descriptive unit for constructors.
Sort.ByteSequencesReader - Class in org.apache.lucene.search.suggest.fst
Utility class to read length-prefixed byte[] entries from an input.
Sort.ByteSequencesReader(File) - Constructor for class org.apache.lucene.search.suggest.fst.Sort.ByteSequencesReader

Sort.ByteSequencesReader(DataInput) - Constructor for class org.apache.lucene.search.suggest.fst.Sort.ByteSequencesReader

Sort.ByteSequencesWriter - Class in org.apache.lucene.search.suggest.fst
Utility class to emit length-prefixed byte[] entries to an output stream for sorting.
Sort.ByteSequencesWriter(File) - Constructor for class org.apache.lucene.search.suggest.fst.Sort.ByteSequencesWriter

Sort.ByteSequencesWriter(DataOutput) - Constructor for class org.apache.lucene.search.suggest.fst.Sort.ByteSequencesWriter

Sort.SortInfo - Class in org.apache.lucene.search.suggest.fst
Sort info (debugging mostly).
Sort.SortInfo() - Constructor for class org.apache.lucene.search.suggest.fst.Sort.SortInfo

sortableIntToFloat(int) - Static method in class org.apache.lucene.util.NumericUtils
Converts a sortable int back to a float.
sortableLongToDouble(long) - Static method in class org.apache.lucene.util.NumericUtils
Converts a sortable long back to a double.
SortableSingleDocSource - Class in org.apache.lucene.benchmark.byTask.feeds
Adds fields appropriate for sorting: country, random_string and sort_field (int).
SortableSingleDocSource() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.SortableSingleDocSource

sortByTotalTermFreq(IndexReader, TermStats[]) - Static method in class org.apache.lucene.misc.HighFreqTerms
Takes array of TermStats.
SortedTermFreqIteratorWrapper - Class in org.apache.lucene.search.suggest
This wrapper buffers incoming elements and makes sure they are sorted based on given comparator.
SortedTermFreqIteratorWrapper(TermFreqIterator, Comparator<BytesRef>) - Constructor for class org.apache.lucene.search.suggest.SortedTermFreqIteratorWrapper

SortedTermFreqIteratorWrapper(TermFreqIterator, Comparator<BytesRef>, boolean) - Constructor for class org.apache.lucene.search.suggest.SortedTermFreqIteratorWrapper

SortedTermVectorMapper - Class in org.apache.lucene.index
Store a sorted collection of TermVectorEntrys.
SortedTermVectorMapper(Comparator<TermVectorEntry>) - Constructor for class org.apache.lucene.index.SortedTermVectorMapper

SortedTermVectorMapper(boolean, boolean, Comparator<TermVectorEntry>) - Constructor for class org.apache.lucene.index.SortedTermVectorMapper

SortedVIntList - Class in org.apache.lucene.util
Stores and iterate on sorted integers in compressed form in RAM.
SortedVIntList(int...) - Constructor for class org.apache.lucene.util.SortedVIntList
Create a SortedVIntList from all elements of an array of integers.
SortedVIntList(int[], int) - Constructor for class org.apache.lucene.util.SortedVIntList
Create a SortedVIntList from an array of integers.
SortedVIntList(BitSet) - Constructor for class org.apache.lucene.util.SortedVIntList
Create a SortedVIntList from a BitSet.
SortedVIntList(DocIdSetIterator) - Constructor for class org.apache.lucene.util.SortedVIntList
Create a SortedVIntList.
SorterTemplate - Class in org.apache.lucene.util
This class was inspired by CGLIB, but provides a better QuickSort algorithm without additional InsertionSort at the end.
SorterTemplate() - Constructor for class org.apache.lucene.util.SorterTemplate

SortField - Class in org.apache.lucene.search
Stores information about how to sort documents by terms in an individual field.
SortField(String, int) - Constructor for class org.apache.lucene.search.SortField
Creates a sort by terms in the given field with the type of term values explicitly given.
SortField(String, int, boolean) - Constructor for class org.apache.lucene.search.SortField
Creates a sort, possibly in reverse, by terms in the given field with the type of term values explicitly given.
SortField(String, FieldCache.Parser) - Constructor for class org.apache.lucene.search.SortField
Creates a sort by terms in the given field, parsed to numeric values using a custom FieldCache.Parser.
SortField(String, FieldCache.Parser, boolean) - Constructor for class org.apache.lucene.search.SortField
Creates a sort, possibly in reverse, by terms in the given field, parsed to numeric values using a custom FieldCache.Parser.
SortField(String, Locale) - Constructor for class org.apache.lucene.search.SortField
Creates a sort by terms in the given field sorted according to the given locale.
SortField(String, Locale, boolean) - Constructor for class org.apache.lucene.search.SortField
Creates a sort, possibly in reverse, by terms in the given field sorted according to the given locale.
SortField(String, FieldComparatorSource) - Constructor for class org.apache.lucene.search.SortField
Creates a sort with a custom comparison function.
SortField(String, FieldComparatorSource, boolean) - Constructor for class org.apache.lucene.search.SortField
Creates a sort, possibly in reverse, with a custom comparison function.
SortingIntEncoder - Class in org.apache.lucene.util.encoding
An IntEncoderFilter which sorts the values to encode in ascending order before encoding them.
SortingIntEncoder(IntEncoder) - Constructor for class org.apache.lucene.util.encoding.SortingIntEncoder
Initializes with the given encoder.
sortKeys(JaspellTernarySearchTrie.TSTNode, int) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
Returns keys sorted in alphabetical order.
sortPartition(int) - Method in class org.apache.lucene.search.suggest.fst.Sort
Sort a single partition in-memory.
sortTime - Variable in class org.apache.lucene.search.suggest.fst.Sort.SortInfo

sortValues - Variable in class org.apache.lucene.search.grouping.SearchGroup
The sort values used during sorting.
source - Variable in class org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents

source - Variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

SOUTH_EAST_ASIAN_TYPE - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizerImpl
Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.).
SOUTH_EAST_ASIAN_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.).
SOUTH_EAST_ASIAN_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.).
SOUTH_EAST_ASIAN_TYPE - Static variable in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.).
SOUTH_EAST_ASIAN_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Deprecated. use UAX29URLEmailTokenizer.TOKEN_TYPES instead
SOUTH_EAST_ASIAN_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.).
SOUTHEAST_ASIAN - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizer

SOUTHEAST_ASIAN - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

SP - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
SPACE - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

Space - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
SPACE_LIKE - Static variable in class org.apache.lucene.analysis.cn.smart.CharType
Characters that act as a space
SPACES - Static variable in class org.apache.lucene.analysis.cn.smart.Utility
Space-like characters that need to be skipped: such as space, tab, newline, carriage return.
SpanBuilderBase - Class in org.apache.lucene.xmlparser.builders

SpanBuilderBase() - Constructor for class org.apache.lucene.xmlparser.builders.SpanBuilderBase

SpanFilter - Class in org.apache.lucene.search
Abstract base class providing a mechanism to restrict searches to a subset of an index and also maintains and returns position information.
SpanFilter() - Constructor for class org.apache.lucene.search.SpanFilter

SpanFilterResult - Class in org.apache.lucene.search
The results of a SpanQueryFilter.
SpanFilterResult(DocIdSet, List<SpanFilterResult.PositionInfo>) - Constructor for class org.apache.lucene.search.SpanFilterResult

SpanFilterResult.PositionInfo - Class in org.apache.lucene.search

SpanFilterResult.PositionInfo(int) - Constructor for class org.apache.lucene.search.SpanFilterResult.PositionInfo

SpanFilterResult.StartEnd - Class in org.apache.lucene.search

SpanFilterResult.StartEnd(int, int) - Constructor for class org.apache.lucene.search.SpanFilterResult.StartEnd

SpanFirstBuilder - Class in org.apache.lucene.xmlparser.builders

SpanFirstBuilder(SpanQueryBuilder) - Constructor for class org.apache.lucene.xmlparser.builders.SpanFirstBuilder

SpanFirstQuery - Class in org.apache.lucene.search.spans
Matches spans near the beginning of a field.
SpanFirstQuery(SpanQuery, int) - Constructor for class org.apache.lucene.search.spans.SpanFirstQuery
Construct a SpanFirstQuery matching spans in match whose end position is less than or equal to end.
SpanGradientFormatter - Class in org.apache.lucene.search.highlight
Formats text with different color intensity depending on the score of the term using the span tag.
SpanGradientFormatter(float, String, String, String, String) - Constructor for class org.apache.lucene.search.highlight.SpanGradientFormatter

SpanishAnalyzer - Class in org.apache.lucene.analysis.es
Analyzer for Spanish.
SpanishAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.es.SpanishAnalyzer
Builds an analyzer with the default stop words: SpanishAnalyzer.DEFAULT_STOPWORD_FILE.
SpanishAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.es.SpanishAnalyzer
Builds an analyzer with the given stop words.
SpanishAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.es.SpanishAnalyzer
Builds an analyzer with the given stop words.
SpanishLightStemFilter - Class in org.apache.lucene.analysis.es
A TokenFilter that applies SpanishLightStemmer to stem Spanish words.
SpanishLightStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.es.SpanishLightStemFilter

SpanishLightStemmer - Class in org.apache.lucene.analysis.es
Light Stemmer for Spanish
SpanishLightStemmer() - Constructor for class org.apache.lucene.analysis.es.SpanishLightStemmer

SpanishStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
SpanishStemmer() - Constructor for class org.tartarus.snowball.ext.SpanishStemmer

SpanMultiTermQueryWrapper<Q extends MultiTermQuery> - Class in org.apache.lucene.search.spans
Wraps any MultiTermQuery as a SpanQuery, so it can be nested within other SpanQuery classes.
SpanMultiTermQueryWrapper(Q) - Constructor for class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper
Create a new SpanMultiTermQueryWrapper.
SpanMultiTermQueryWrapper.SpanRewriteMethod - Class in org.apache.lucene.search.spans
Abstract class that defines how the query is rewritten.
SpanMultiTermQueryWrapper.SpanRewriteMethod() - Constructor for class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod

SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite - Class in org.apache.lucene.search.spans
A rewrite method that first translates each term into a SpanTermQuery in a BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.
SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite(int) - Constructor for class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite
Create a TopTermsSpanBooleanQueryRewrite for at most size terms.
SpanNearBuilder - Class in org.apache.lucene.xmlparser.builders

SpanNearBuilder(SpanQueryBuilder) - Constructor for class org.apache.lucene.xmlparser.builders.SpanNearBuilder

SpanNearClauseFactory - Class in org.apache.lucene.queryParser.surround.query

SpanNearClauseFactory(IndexReader, String, BasicQueryFactory) - Constructor for class org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory

SpanNearPayloadCheckQuery - Class in org.apache.lucene.search.spans
Only return those matches that have a specific payload at the given position.
SpanNearPayloadCheckQuery(SpanNearQuery, Collection<byte[]>) - Constructor for class org.apache.lucene.search.spans.SpanNearPayloadCheckQuery

SpanNearQuery - Class in org.apache.lucene.search.spans
Matches spans which are near one another.
SpanNearQuery(SpanQuery[], int, boolean) - Constructor for class org.apache.lucene.search.spans.SpanNearQuery
Construct a SpanNearQuery.
SpanNearQuery(SpanQuery[], int, boolean, boolean) - Constructor for class org.apache.lucene.search.spans.SpanNearQuery

SpanNotBuilder - Class in org.apache.lucene.xmlparser.builders

SpanNotBuilder(SpanQueryBuilder) - Constructor for class org.apache.lucene.xmlparser.builders.SpanNotBuilder

SpanNotQuery - Class in org.apache.lucene.search.spans
Removes matches which overlap with another SpanQuery.
SpanNotQuery(SpanQuery, SpanQuery) - Constructor for class org.apache.lucene.search.spans.SpanNotQuery
Construct a SpanNotQuery matching spans from include which have no overlap with spans from exclude.
SpanOrBuilder - Class in org.apache.lucene.xmlparser.builders

SpanOrBuilder(SpanQueryBuilder) - Constructor for class org.apache.lucene.xmlparser.builders.SpanOrBuilder

SpanOrQuery - Class in org.apache.lucene.search.spans
Matches the union of its clauses.
SpanOrQuery(SpanQuery...) - Constructor for class org.apache.lucene.search.spans.SpanOrQuery
Construct a SpanOrQuery merging the provided clauses.
SpanOrTermsBuilder - Class in org.apache.lucene.xmlparser.builders

SpanOrTermsBuilder(Analyzer) - Constructor for class org.apache.lucene.xmlparser.builders.SpanOrTermsBuilder

SpanPayloadCheckQuery - Class in org.apache.lucene.search.spans
Only return those matches that have a specific payload at the given position.
SpanPayloadCheckQuery(SpanQuery, Collection<byte[]>) - Constructor for class org.apache.lucene.search.spans.SpanPayloadCheckQuery

SpanPositionCheckQuery - Class in org.apache.lucene.search.spans
Base class for filtering a SpanQuery based on the position of a match.
SpanPositionCheckQuery(SpanQuery) - Constructor for class org.apache.lucene.search.spans.SpanPositionCheckQuery

SpanPositionCheckQuery.AcceptStatus - Enum in org.apache.lucene.search.spans
Return value if the match should be accepted YES, rejected NO, or rejected and enumeration should advance to the next document NO_AND_ADVANCE.
SpanPositionCheckQuery.PositionCheckSpan - Class in org.apache.lucene.search.spans

SpanPositionCheckQuery.PositionCheckSpan(IndexReader) - Constructor for class org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan

SpanPositionRangeQuery - Class in org.apache.lucene.search.spans
Checks to see if the SpanPositionCheckQuery.getMatch() lies between a start and end position
SpanPositionRangeQuery(SpanQuery, int, int) - Constructor for class org.apache.lucene.search.spans.SpanPositionRangeQuery

SpanQuery - Class in org.apache.lucene.search.spans
Base class for span-based queries.
SpanQuery() - Constructor for class org.apache.lucene.search.spans.SpanQuery

SpanQueryBuilder - Interface in org.apache.lucene.xmlparser.builders

SpanQueryBuilderFactory - Class in org.apache.lucene.xmlparser.builders

SpanQueryBuilderFactory() - Constructor for class org.apache.lucene.xmlparser.builders.SpanQueryBuilderFactory

SpanQueryFilter - Class in org.apache.lucene.search
Constrains search results to only match those which also match a provided query.
SpanQueryFilter() - Constructor for class org.apache.lucene.search.SpanQueryFilter

SpanQueryFilter(SpanQuery) - Constructor for class org.apache.lucene.search.SpanQueryFilter
Constructs a filter which only matches documents matching query.
SpanRegexQuery - Class in org.apache.lucene.search.regex
Deprecated. Use new SpanMultiTermQueryWrapper<RegexQuery>(new RegexQuery()) instead. This query will be removed in Lucene 4.0
SpanRegexQuery(Term) - Constructor for class org.apache.lucene.search.regex.SpanRegexQuery
Deprecated.
Spans - Class in org.apache.lucene.search.spans
Expert: an enumeration of span matches.
Spans() - Constructor for class org.apache.lucene.search.spans.Spans

spans - Variable in class org.apache.lucene.search.spans.SpanScorer

SpanScorer - Class in org.apache.lucene.search.spans
Public for extension only.
SpanScorer(Spans, Weight, Similarity, byte[]) - Constructor for class org.apache.lucene.search.spans.SpanScorer

SpanTermBuilder - Class in org.apache.lucene.xmlparser.builders

SpanTermBuilder() - Constructor for class org.apache.lucene.xmlparser.builders.SpanTermBuilder

SpanTermQuery - Class in org.apache.lucene.search.spans
Matches spans containing a term.
SpanTermQuery(Term) - Constructor for class org.apache.lucene.search.spans.SpanTermQuery
Construct a SpanTermQuery matching the named term's spans.
SpanWeight - Class in org.apache.lucene.search.spans
Expert-only.
SpanWeight(SpanQuery, Searcher) - Constructor for class org.apache.lucene.search.spans.SpanWeight

specialConstructor - Variable in exception org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException
This variable determines which constructor was used to create this object and thereby affects the semantics of the "getMessage" method (see below).
specialConstructor - Variable in exception org.apache.lucene.queryParser.standard.parser.ParseException
This variable determines which constructor was used to create this object and thereby affects the semantics of the "getMessage" method (see below).
specialConstructor - Variable in exception org.apache.lucene.queryParser.surround.parser.ParseException
This variable determines which constructor was used to create this object and thereby affects the semantics of the "getMessage" method (see below).
specialToken - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token
This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token.
specialToken - Variable in class org.apache.lucene.queryParser.standard.parser.Token
This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token.
specialToken - Variable in class org.apache.lucene.queryParser.surround.parser.Token
This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token.
specialToken - Variable in class org.apache.lucene.queryParser.Token
This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token.
SpellChecker - Class in org.apache.lucene.search.spell
Spell Checker class (Main class)
(initially inspired by the David Spencer code).
SpellChecker(Directory, StringDistance) - Constructor for class org.apache.lucene.search.spell.SpellChecker
Use the given directory as a spell checker index.
SpellChecker(Directory) - Constructor for class org.apache.lucene.search.spell.SpellChecker
Use the given directory as a spell checker index with a LevensteinDistance as the default StringDistance.
SpellChecker(Directory, StringDistance, Comparator<SuggestWord>) - Constructor for class org.apache.lucene.search.spell.SpellChecker
Use the given directory as a spell checker index with the given StringDistance measure and the given Comparator for sorting the results.
split(File, String[]) - Method in class org.apache.lucene.index.IndexSplitter

split(IndexReader, Directory[], boolean) - Method in class org.apache.lucene.index.MultiPassIndexSplitter
Deprecated. use MultiPassIndexSplitter.split(Version, IndexReader, Directory[], boolean) instead. This method will be removed in Lucene 4.0.
split(Version, IndexReader, Directory[], boolean) - Method in class org.apache.lucene.index.MultiPassIndexSplitter
Split source index into multiple parts.
split() - Method in class org.apache.lucene.index.PKIndexSplitter

splitchar - Variable in class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode
The char used in the split.
splitExtensionField(String, String) - Method in class org.apache.lucene.queryParser.ext.Extensions
Splits a extension field and returns the field / extension part as a Extensions.Pair.
splitIntRange(NumericUtils.IntRangeBuilder, int, int, int) - Static method in class org.apache.lucene.util.NumericUtils
Expert: Splits an int range recursively.
splitLongRange(NumericUtils.LongRangeBuilder, int, long, long) - Static method in class org.apache.lucene.util.NumericUtils
Expert: Splits a long range recursively.
squaredEuclideanDistance(double[], double[]) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated. The square of the Euclidean Distance.
SrndPrefixQuery - Class in org.apache.lucene.queryParser.surround.query

SrndPrefixQuery(String, boolean, char) - Constructor for class org.apache.lucene.queryParser.surround.query.SrndPrefixQuery

SrndQuery - Class in org.apache.lucene.queryParser.surround.query

SrndQuery() - Constructor for class org.apache.lucene.queryParser.surround.query.SrndQuery

SrndTermQuery - Class in org.apache.lucene.queryParser.surround.query

SrndTermQuery(String, boolean) - Constructor for class org.apache.lucene.queryParser.surround.query.SrndTermQuery

SrndTruncQuery - Class in org.apache.lucene.queryParser.surround.query

SrndTruncQuery(String, char, char) - Constructor for class org.apache.lucene.queryParser.surround.query.SrndTruncQuery

staleFiles - Variable in class org.apache.lucene.store.FSDirectory

StaleReaderException - Exception in org.apache.lucene.index
This exception is thrown when an IndexReader tries to make changes to the index (via IndexReader.deleteDocument(int), IndexReader.undeleteAll() or IndexReader.setNorm(int, java.lang.String, byte)) but changes have already been committed to the index since this reader was instantiated.
StaleReaderException(String) - Constructor for exception org.apache.lucene.index.StaleReaderException

StandardAnalyzer - Class in org.apache.lucene.analysis.standard
Filters StandardTokenizer with StandardFilter, LowerCaseFilter and StopFilter, using a list of English stop words.
StandardAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.standard.StandardAnalyzer
Builds an analyzer with the given stop words.
StandardAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.standard.StandardAnalyzer
Builds an analyzer with the default stop words (StandardAnalyzer.STOP_WORDS_SET).
StandardAnalyzer(Version, File) - Constructor for class org.apache.lucene.analysis.standard.StandardAnalyzer
Deprecated. Use StandardAnalyzer.StandardAnalyzer(Version, Reader) instead.
StandardAnalyzer(Version, Reader) - Constructor for class org.apache.lucene.analysis.standard.StandardAnalyzer
Builds an analyzer with the stop words from the given reader.
StandardBooleanQueryNode - Class in org.apache.lucene.queryParser.standard.nodes
A StandardBooleanQueryNode has the same behavior as BooleanQueryNode.
StandardBooleanQueryNode(List<QueryNode>, boolean) - Constructor for class org.apache.lucene.queryParser.standard.nodes.StandardBooleanQueryNode

StandardBooleanQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
This builder does the same as the BooleanQueryNodeBuilder, but this considers if the built BooleanQuery should have its coord disabled or not.
StandardBooleanQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.StandardBooleanQueryNodeBuilder

StandardFacetsAccumulator - Class in org.apache.lucene.facet.search
Standard implementation for FacetsAccumulator, utilizing partitions to save on memory.
StandardFacetsAccumulator(FacetSearchParams, IndexReader, TaxonomyReader, IntArrayAllocator, FloatArrayAllocator) - Constructor for class org.apache.lucene.facet.search.StandardFacetsAccumulator

StandardFacetsAccumulator(FacetSearchParams, IndexReader, TaxonomyReader) - Constructor for class org.apache.lucene.facet.search.StandardFacetsAccumulator

StandardFilter - Class in org.apache.lucene.analysis.standard
Normalizes tokens extracted with StandardTokenizer.
StandardFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.standard.StandardFilter
Deprecated. Use StandardFilter.StandardFilter(Version, TokenStream) instead.
StandardFilter(Version, TokenStream) - Constructor for class org.apache.lucene.analysis.standard.StandardFilter

StandardQueryBuilder - Interface in org.apache.lucene.queryParser.standard.builders
This interface should be implemented by every class that wants to build Query objects from QueryNode objects.
StandardQueryConfigHandler - Class in org.apache.lucene.queryParser.standard.config
This query configuration handler is used for almost every processor defined in the StandardQueryNodeProcessorPipeline processor pipeline.
StandardQueryConfigHandler() - Constructor for class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler

StandardQueryConfigHandler.ConfigurationKeys - Class in org.apache.lucene.queryParser.standard.config

StandardQueryConfigHandler.ConfigurationKeys() - Constructor for class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys

StandardQueryConfigHandler.Operator - Enum in org.apache.lucene.queryParser.standard.config

StandardQueryNodeProcessorPipeline - Class in org.apache.lucene.queryParser.standard.processors
This pipeline has all the processors needed to process a query node tree, generated by StandardSyntaxParser, already assembled.
StandardQueryNodeProcessorPipeline(QueryConfigHandler) - Constructor for class org.apache.lucene.queryParser.standard.processors.StandardQueryNodeProcessorPipeline

StandardQueryParser - Class in org.apache.lucene.queryParser.standard
This class is a helper that enables users to easily use the Lucene query parser.
StandardQueryParser() - Constructor for class org.apache.lucene.queryParser.standard.StandardQueryParser
Constructs a StandardQueryParser object.
StandardQueryParser(Analyzer) - Constructor for class org.apache.lucene.queryParser.standard.StandardQueryParser
Constructs a StandardQueryParser object and sets an Analyzer to it.
StandardQueryTreeBuilder - Class in org.apache.lucene.queryParser.standard.builders
This query tree builder only defines the necessary map to build a Query tree object.
StandardQueryTreeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.StandardQueryTreeBuilder

StandardSyntaxParser - Class in org.apache.lucene.queryParser.standard.parser

StandardSyntaxParser() - Constructor for class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser

StandardSyntaxParser(InputStream) - Constructor for class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Constructor with InputStream.
StandardSyntaxParser(InputStream, String) - Constructor for class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Constructor with InputStream and supplied encoding
StandardSyntaxParser(Reader) - Constructor for class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Constructor.
StandardSyntaxParser(StandardSyntaxParserTokenManager) - Constructor for class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Constructor with generated Token Manager.
StandardSyntaxParserConstants - Interface in org.apache.lucene.queryParser.standard.parser
Token literal values and constants.
StandardSyntaxParserTokenManager - Class in org.apache.lucene.queryParser.standard.parser
Token Manager.
StandardSyntaxParserTokenManager(JavaCharStream) - Constructor for class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager
Constructor.
StandardSyntaxParserTokenManager(JavaCharStream, int) - Constructor for class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager
Constructor.
StandardTokenizer - Class in org.apache.lucene.analysis.standard
A grammar-based tokenizer constructed with JFlex.
StandardTokenizer(Version, Reader) - Constructor for class org.apache.lucene.analysis.standard.StandardTokenizer
Creates a new instance of the StandardTokenizer.
StandardTokenizer(Version, AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.standard.StandardTokenizer
Creates a new StandardTokenizer with a given AttributeSource.
StandardTokenizer(Version, AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.standard.StandardTokenizer
Creates a new StandardTokenizer with a given AttributeSource.AttributeFactory
StandardTokenizerImpl - Class in org.apache.lucene.analysis.standard
This class implements Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29
Tokens produced are of the following types: <ALPHANUM>: A sequence of alphabetic and numeric characters <NUM>: A number <SOUTHEAST_ASIAN>: A sequence of characters from South and Southeast Asian languages, including Thai, Lao, Myanmar, and Khmer <IDEOGRAPHIC>: A single CJKV ideographic character <HIRAGANA>: A single hiragana character
StandardTokenizerImpl(Reader) - Constructor for class org.apache.lucene.analysis.standard.StandardTokenizerImpl
Creates a new scanner There is also a java.io.InputStream version of this constructor.
StandardTokenizerImpl(InputStream) - Constructor for class org.apache.lucene.analysis.standard.StandardTokenizerImpl
Creates a new scanner.
StandardTokenizerImpl31 - Class in org.apache.lucene.analysis.standard.std31
Deprecated. This class is only for exact backwards compatibility
StandardTokenizerImpl31(Reader) - Constructor for class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. Creates a new scanner There is also a java.io.InputStream version of this constructor.
StandardTokenizerImpl31(InputStream) - Constructor for class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. Creates a new scanner.
StandardTokenizerInterface - Interface in org.apache.lucene.analysis.standard
Internal interface for supporting versioned grammars.
STAR - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
start(String, TokenStream) - Method in interface org.apache.lucene.search.highlight.Fragmenter
Initializes the Fragmenter.
start(String, TokenStream) - Method in class org.apache.lucene.search.highlight.NullFragmenter

start(String, TokenStream) - Method in class org.apache.lucene.search.highlight.SimpleFragmenter

start(String, TokenStream) - Method in class org.apache.lucene.search.highlight.SimpleSpanFragmenter

start() - Method in class org.apache.lucene.search.spans.NearSpansOrdered

start() - Method in class org.apache.lucene.search.spans.NearSpansUnordered

start() - Method in class org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan

start - Variable in class org.apache.lucene.search.spans.SpanPositionRangeQuery

start() - Method in class org.apache.lucene.search.spans.Spans
Returns the start position of the current match.
start() - Method in class org.apache.lucene.search.spans.TermSpans

START_CHAR_ARRAY - Static variable in class org.apache.lucene.analysis.cn.smart.Utility

START_OF_HEADING_MARKER - Static variable in class org.apache.lucene.analysis.reverse.ReverseStringFilter
Example marker character: U+0001 (START OF HEADING)
startElement(String, String, String, Attributes) - Method in class org.apache.lucene.analysis.compound.hyphenation.PatternParser

startFragment(TextFragment) - Method in class org.apache.lucene.search.highlight.QueryScorer

startFragment(TextFragment) - Method in class org.apache.lucene.search.highlight.QueryTermScorer

startFragment(TextFragment) - Method in interface org.apache.lucene.search.highlight.Scorer
Called when a new fragment is started for consideration.
startingFilter - Variable in class org.apache.lucene.spatial.tier.DistanceFilter
Deprecated.
startOffset - Variable in class org.apache.lucene.analysis.cn.smart.hhmm.SegToken
start offset into original sentence
startOffset - Variable in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase.CompoundToken

startOffset - Variable in class org.apache.lucene.analysis.LookaheadTokenFilter.Position

startOffset() - Method in class org.apache.lucene.analysis.Token
Returns this Token's starting offset, the position of the first character corresponding to this token in the source text.
startOffset() - Method in interface org.apache.lucene.analysis.tokenattributes.OffsetAttribute
Returns this Token's starting offset, the position of the first character corresponding to this token in the source text.
startOffset() - Method in class org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl
Returns this Token's starting offset, the position of the first character corresponding to this token in the source text.
starts - Variable in class org.apache.lucene.index.MultiReader

startsWith(char[], int, String) - Static method in class org.apache.lucene.analysis.util.StemmerUtil
Returns true if the character array starts with the suffix.
startsWith(BytesRef) - Method in class org.apache.lucene.util.BytesRef

startTest(Test) - Method in class org.apache.lucene.util.LuceneJUnitResultFormatter
A test started.
startTestSuite(JUnitTest) - Method in class org.apache.lucene.util.LuceneJUnitResultFormatter
The whole testsuite started.
staticFlag - Static variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
Whether parser is static.
staticFlag - Static variable in class org.apache.lucene.queryParser.standard.parser.JavaCharStream
Whether parser is static.
stem(char[], int) - Method in class org.apache.lucene.analysis.ar.ArabicStemmer
Stem an input buffer of Arabic text.
stem(char[], int) - Method in class org.apache.lucene.analysis.bg.BulgarianStemmer
Stem an input buffer of Bulgarian text.
stem(String) - Method in class org.apache.lucene.analysis.br.BrazilianStemmer
Stems the given term to an unique discriminator.
stem(char[], int) - Method in class org.apache.lucene.analysis.cz.CzechStemmer
Stem an input buffer of Czech text.
stem(char[], int) - Method in class org.apache.lucene.analysis.de.GermanLightStemmer

stem(char[], int) - Method in class org.apache.lucene.analysis.de.GermanMinimalStemmer

stem(String) - Method in class org.apache.lucene.analysis.de.GermanStemmer
Stemms the given term to an unique discriminator.
stem(char[], int) - Method in class org.apache.lucene.analysis.el.GreekStemmer

stem(char[], int) - Method in class org.apache.lucene.analysis.en.EnglishMinimalStemmer

stem(char[], int) - Method in class org.apache.lucene.analysis.es.SpanishLightStemmer

stem(char[], int) - Method in class org.apache.lucene.analysis.fi.FinnishLightStemmer

stem(char[], int) - Method in class org.apache.lucene.analysis.fr.FrenchLightStemmer

stem(char[], int) - Method in class org.apache.lucene.analysis.fr.FrenchMinimalStemmer

stem(String) - Method in class org.apache.lucene.analysis.fr.FrenchStemmer
Deprecated. Stems the given term to a unique discriminator.
stem(char[], int) - Method in class org.apache.lucene.analysis.gl.GalicianMinimalStemmer

stem(char[], int) - Method in class org.apache.lucene.analysis.gl.GalicianStemmer

stem(char[], int) - Method in class org.apache.lucene.analysis.hi.HindiStemmer

stem(char[], int) - Method in class org.apache.lucene.analysis.hu.HungarianLightStemmer

stem(String) - Method in class org.apache.lucene.analysis.hunspell.HunspellStemmer
Find the stem(s) of the provided word
stem(char[], int) - Method in class org.apache.lucene.analysis.hunspell.HunspellStemmer
Find the stem(s) of the provided word
stem(char[], int, boolean) - Method in class org.apache.lucene.analysis.id.IndonesianStemmer
Stem a term (returning its new length).
stem(char[], int) - Method in class org.apache.lucene.analysis.it.ItalianLightStemmer

stem(char[], int) - Method in class org.apache.lucene.analysis.lv.LatvianStemmer
Stem a latvian word.
stem(String) - Method in class org.apache.lucene.analysis.nl.DutchStemmer
Deprecated.
stem(char[], int) - Method in class org.apache.lucene.analysis.no.NorwegianLightStemmer

stem(char[], int) - Method in class org.apache.lucene.analysis.no.NorwegianMinimalStemmer

stem(char[], int) - Method in class org.apache.lucene.analysis.pt.PortugueseLightStemmer

stem(char[], int) - Method in class org.apache.lucene.analysis.pt.PortugueseMinimalStemmer

stem(char[], int) - Method in class org.apache.lucene.analysis.pt.PortugueseStemmer

stem(char[], int) - Method in class org.apache.lucene.analysis.ru.RussianLightStemmer

stem(CharSequence) - Method in class org.apache.lucene.analysis.stempel.StempelStemmer
Stem a word.
stem(char[], int) - Method in class org.apache.lucene.analysis.sv.SwedishLightStemmer

stem() - Method in class org.tartarus.snowball.ext.ArmenianStemmer

stem() - Method in class org.tartarus.snowball.ext.BasqueStemmer

stem() - Method in class org.tartarus.snowball.ext.CatalanStemmer

stem() - Method in class org.tartarus.snowball.ext.DanishStemmer

stem() - Method in class org.tartarus.snowball.ext.DutchStemmer

stem() - Method in class org.tartarus.snowball.ext.EnglishStemmer

stem() - Method in class org.tartarus.snowball.ext.FinnishStemmer

stem() - Method in class org.tartarus.snowball.ext.FrenchStemmer

stem() - Method in class org.tartarus.snowball.ext.German2Stemmer

stem() - Method in class org.tartarus.snowball.ext.GermanStemmer

stem() - Method in class org.tartarus.snowball.ext.HungarianStemmer

stem() - Method in class org.tartarus.snowball.ext.IrishStemmer

stem() - Method in class org.tartarus.snowball.ext.ItalianStemmer

stem() - Method in class org.tartarus.snowball.ext.KpStemmer

stem() - Method in class org.tartarus.snowball.ext.LovinsStemmer

stem() - Method in class org.tartarus.snowball.ext.NorwegianStemmer

stem() - Method in class org.tartarus.snowball.ext.PorterStemmer

stem() - Method in class org.tartarus.snowball.ext.PortugueseStemmer

stem() - Method in class org.tartarus.snowball.ext.RomanianStemmer

stem() - Method in class org.tartarus.snowball.ext.RussianStemmer

stem() - Method in class org.tartarus.snowball.ext.SpanishStemmer

stem() - Method in class org.tartarus.snowball.ext.SwedishStemmer

stem() - Method in class org.tartarus.snowball.ext.TurkishStemmer

stem() - Method in class org.tartarus.snowball.SnowballProgram

StemmerOverrideFilter - Class in org.apache.lucene.analysis.miscellaneous
Provides the ability to override any KeywordAttribute aware stemmer with custom dictionary-based stemming.
StemmerOverrideFilter(Version, TokenStream, Map<?, String>) - Constructor for class org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter
Create a new StemmerOverrideFilter, performing dictionary-based stemming with the provided dictionary.
StemmerUtil - Class in org.apache.lucene.analysis.util
Some commonly-used stemming functions
StemmerUtil() - Constructor for class org.apache.lucene.analysis.util.StemmerUtil

StempelFilter - Class in org.apache.lucene.analysis.stempel
Transforms the token stream as per the stemming algorithm.
StempelFilter(TokenStream, StempelStemmer) - Constructor for class org.apache.lucene.analysis.stempel.StempelFilter
Create filter using the supplied stemming table.
StempelFilter(TokenStream, StempelStemmer, int) - Constructor for class org.apache.lucene.analysis.stempel.StempelFilter
Create filter using the supplied stemming table.
StempelStemmer - Class in org.apache.lucene.analysis.stempel
Stemmer class is a convenient facade for other stemmer-related classes.
StempelStemmer(InputStream) - Constructor for class org.apache.lucene.analysis.stempel.StempelStemmer
Create a Stemmer using selected stemmer table
StempelStemmer(Trie) - Constructor for class org.apache.lucene.analysis.stempel.StempelStemmer
Create a Stemmer using pre-loaded stemmer table
stemPrefix(char[], int) - Method in class org.apache.lucene.analysis.ar.ArabicStemmer
Stem a prefix off an Arabic word.
stemSuffix(char[], int) - Method in class org.apache.lucene.analysis.ar.ArabicStemmer
Stem suffix(es) off an Arabic word.
stop - Variable in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.TemporalResult

STOP_WORDS - Static variable in class org.apache.lucene.analysis.cjk.CJKAnalyzer
Deprecated. use CJKAnalyzer.getDefaultStopSet() instead
STOP_WORDS - Static variable in class org.apache.lucene.analysis.cn.ChineseFilter
Deprecated.
STOP_WORDS_SET - Static variable in class org.apache.lucene.analysis.standard.ClassicAnalyzer
An unmodifiable set containing some common English words that are usually not useful for searching.
STOP_WORDS_SET - Static variable in class org.apache.lucene.analysis.standard.StandardAnalyzer
An unmodifiable set containing some common English words that are usually not useful for searching.
STOP_WORDS_SET - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailAnalyzer
An unmodifiable set containing some common English words that are usually not useful for searching.
StopAnalyzer - Class in org.apache.lucene.analysis
Filters LetterTokenizer with LowerCaseFilter and StopFilter.
StopAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.StopAnalyzer
Builds an analyzer which removes words in StopAnalyzer.ENGLISH_STOP_WORDS_SET.
StopAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.StopAnalyzer
Builds an analyzer with the stop words from the given set.
StopAnalyzer(Version, File) - Constructor for class org.apache.lucene.analysis.StopAnalyzer
Builds an analyzer with the stop words from the given file.
StopAnalyzer(Version, Reader) - Constructor for class org.apache.lucene.analysis.StopAnalyzer
Builds an analyzer with the stop words from the given reader.
StopFilter - Class in org.apache.lucene.analysis
Removes stop words from a token stream.
StopFilter(boolean, TokenStream, Set<?>, boolean) - Constructor for class org.apache.lucene.analysis.StopFilter
Deprecated. Use StopFilter.StopFilter(Version, TokenStream, Set) instead
StopFilter(Version, TokenStream, Set<?>, boolean) - Constructor for class org.apache.lucene.analysis.StopFilter
Deprecated. Use StopFilter.StopFilter(Version, TokenStream, Set) instead
StopFilter(boolean, TokenStream, Set<?>) - Constructor for class org.apache.lucene.analysis.StopFilter
Deprecated. use StopFilter.StopFilter(Version, TokenStream, Set) instead
StopFilter(Version, TokenStream, Set<?>) - Constructor for class org.apache.lucene.analysis.StopFilter
Constructs a filter which removes words from the input TokenStream that are named in the Set.
stoplist - Variable in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree
This map stores hyphenation exceptions
stopNow - Variable in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

stopNow() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

stopNow() - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

stopTimer() - Method in class org.apache.lucene.search.TimeLimitingCollector.TimerThread
Stops the timer thread
stopword - Static variable in class org.apache.lucene.search.SearchEquivalenceTestBase

StopwordAnalyzerBase - Class in org.apache.lucene.analysis
Base class for Analyzers that need to make use of stopword sets.
StopwordAnalyzerBase(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.StopwordAnalyzerBase
Creates a new instance initialized with the given stopword set
StopwordAnalyzerBase(Version) - Constructor for class org.apache.lucene.analysis.StopwordAnalyzerBase
Creates a new Analyzer with an empty stopword set
stopwords - Variable in class org.apache.lucene.analysis.StopwordAnalyzerBase
An immutable stopword set
STOPWORDS_COMMENT - Static variable in class org.apache.lucene.analysis.ar.ArabicAnalyzer
Deprecated. use WordlistLoader.getWordSet(Reader, String, Version) directly
STOPWORDS_COMMENT - Static variable in class org.apache.lucene.analysis.bg.BulgarianAnalyzer
Deprecated. use WordlistLoader.getWordSet(Reader, String, Version) directly
STOPWORDS_COMMENT - Static variable in class org.apache.lucene.analysis.fa.PersianAnalyzer
The comment character in the stopwords file.
store(File, IndexReader, TaxonomyReader, FacetIndexingParams, CategoryListCache) - Method in class org.apache.lucene.facet.search.TotalFacetCountsCache
Store the TotalFacetCounts matching input parameters into the provided outputFile, making them available for a later call to TotalFacetCountsCache.load(File, IndexReader, TaxonomyReader, FacetIndexingParams).
store(OutputStream) - Method in class org.apache.lucene.search.suggest.fst.FSTCompletionLookup

store(OutputStream) - Method in class org.apache.lucene.search.suggest.fst.FSTLookup
Deprecated.
store(OutputStream) - Method in class org.apache.lucene.search.suggest.fst.WFSTCompletionLookup

store(OutputStream) - Method in class org.apache.lucene.search.suggest.jaspell.JaspellLookup

store(OutputStream) - Method in class org.apache.lucene.search.suggest.Lookup
Persist the constructed lookup data to a directory.
store(OutputStream) - Method in class org.apache.lucene.search.suggest.tst.TSTLookup

store(DataOutput) - Method in class org.egothor.stemmer.MultiTrie
Write this data structure to the given output stream.
store(DataOutput) - Method in class org.egothor.stemmer.MultiTrie2
Write this data structure to the given output stream.
store(DataOutput) - Method in class org.egothor.stemmer.Row
Write the contents of this Row to the given output stream.
store(DataOutput) - Method in class org.egothor.stemmer.Trie
Write this Trie to the given output stream.
STORE_INDEX_EXTENSIONS - Static variable in class org.apache.lucene.index.IndexFileNames

StoreClassNameRule - Class in org.apache.lucene.util

StoreClassNameRule() - Constructor for class org.apache.lucene.util.StoreClassNameRule

storedFieldStatus - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
Status for testing of stored fields (null if stored fields could not be tested).
storeOffsetWithTermVector - Variable in class org.apache.lucene.document.AbstractField

storePayloads - Variable in class org.apache.lucene.index.FieldInfo

storePolicy - Variable in class org.apache.lucene.index.PruningReader

storePositionWithTermVector - Variable in class org.apache.lucene.document.AbstractField

StorePruningPolicy - Class in org.apache.lucene.index.pruning
Pruning policy for removing stored fields from documents.
StorePruningPolicy(IndexReader, Map<String, Integer>) - Constructor for class org.apache.lucene.index.pruning.StorePruningPolicy
Constructs a policy.
stores - Static variable in class org.apache.lucene.util.LuceneTestCase

storeTermVector - Variable in class org.apache.lucene.document.AbstractField

storeTermVector - Variable in class org.apache.lucene.index.FieldInfo

storeVal - Variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

STR_SIZE - Static variable in class org.apache.lucene.document.NumberTools
Deprecated. The length of (all) strings returned by NumberTools.longToString(long)
strcmp(char[], int, char[], int) - Static method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree
Compares 2 null terminated char arrays
strcmp(String, char[], int) - Static method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree
Compares a string with null terminated char array
strcpy(char[], int, char[], int) - Static method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

StreamUtils - Class in org.apache.lucene.benchmark.byTask.utils
Stream utilities.
StreamUtils() - Constructor for class org.apache.lucene.benchmark.byTask.utils.StreamUtils

StreamUtils.Type - Enum in org.apache.lucene.benchmark.byTask.utils
File format type
STRING - Static variable in class org.apache.lucene.analysis.cn.smart.WordType
ASCII String
STRING - Static variable in class org.apache.lucene.search.SortField
Sort using term values as Strings.
string - Variable in class org.apache.lucene.search.spell.SuggestWord
the suggested word
STRING_CHAR_ARRAY - Static variable in class org.apache.lucene.analysis.cn.smart.Utility

STRING_INDEX - Static variable in interface org.apache.lucene.search.FieldCache
Indicator for StringIndex values in the cache.
STRING_VAL - Static variable in class org.apache.lucene.search.SortField
Sort using term values as Strings, but comparing by value (using String.compareTo) for all comparisons.
StringBuilderReader - Class in org.apache.lucene.benchmark.byTask.utils
Implements a Reader over a StringBuilder instance.
StringBuilderReader(StringBuilder) - Constructor for class org.apache.lucene.benchmark.byTask.utils.StringBuilderReader

StringDistance - Interface in org.apache.lucene.search.spell
Interface for string distances.
StringHelper - Class in org.apache.lucene.util
Methods for manipulating strings.
StringInterner - Class in org.apache.lucene.util
Subclasses of StringInterner are required to return the same single String object for all equal strings.
StringInterner() - Constructor for class org.apache.lucene.util.StringInterner

stringIterator() - Method in class org.apache.lucene.analysis.CharArraySet
Deprecated. Use CharArraySet.iterator(), which returns char[] instances.
stringToCharSequence(String, Random) - Static method in class org.apache.lucene.util._TestUtil

stringToDate(String) - Static method in class org.apache.lucene.document.DateField
Deprecated. Converts a string-encoded date into a Date object.
stringToDate(String) - Static method in class org.apache.lucene.document.DateTools
Converts a string produced by timeToString or dateToString back to a time, represented as a Date object.
stringToLong(String) - Static method in class org.apache.lucene.document.NumberTools
Deprecated. Converts a String that was returned by NumberTools.longToString(long) back to a long.
stringToTime(String) - Static method in class org.apache.lucene.document.DateField
Deprecated. Converts a string-encoded date into a millisecond time.
stringToTime(String) - Static method in class org.apache.lucene.document.DateTools
Converts a string produced by timeToString or dateToString back to a time, represented as the number of milliseconds since January 1, 1970, 00:00:00 GMT.
StringUtils - Class in org.apache.lucene.queryParser.core.util
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
StringUtils() - Constructor for class org.apache.lucene.queryParser.core.util.StringUtils

stringValue() - Method in class org.apache.lucene.document.Field
The value of the field as a String, or null.
stringValue() - Method in interface org.apache.lucene.document.Fieldable
The value of the field as a String, or null.
stringValue() - Method in class org.apache.lucene.document.NumericField
Returns the numeric value as a string.
stripSegmentName(String) - Static method in class org.apache.lucene.index.IndexFileNames
Strips the segment file name out of the given one.
stripTags(StringBuilder, int) - Static method in class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
strip tags from buf: each tag is replaced by a single blank.
stripTags(String, int) - Static method in class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
strip tags from input.
strlen(char[], int) - Static method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

strlen(char[]) - Static method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

strVal(int) - Method in class org.apache.lucene.search.function.DocValues
Return doc value as a string.
SUB_HEADING - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

SUB_HEADING_ID - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

subDoc(int) - Method in class org.apache.lucene.search.MultiSearcher
Deprecated. Returns the document number of document n within its sub-index.
subIndex(int, int[]) - Static method in class org.apache.lucene.util.ReaderUtil
Returns index of the searcher/reader for document n in the array used to construct this searcher/reader.
subList(int, int) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

SubmissionReport - Class in org.apache.lucene.benchmark.quality.utils
Create a log ready for submission.
SubmissionReport(PrintWriter, String) - Constructor for class org.apache.lucene.benchmark.quality.utils.SubmissionReport
Constructor for SubmissionReport.
subQueriesOrdered() - Method in class org.apache.lucene.queryParser.surround.query.DistanceQuery

SUBREADER - Static variable in class org.apache.lucene.util.FieldCacheSanityChecker.InsanityType
Indicates an overlap in cache usage on a given field in sub/super readers.
subReaders - Variable in class org.apache.lucene.index.MultiReader

subReaders - Variable in class org.apache.lucene.search.IndexSearcher

subSearcher(int) - Method in class org.apache.lucene.search.MultiSearcher
Deprecated. Returns index of the searcher for document n in the array used to construct this searcher.
subSearchers - Variable in class org.apache.lucene.search.IndexSearcher

subSequence(int, int) - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

subSequence(int, int) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

subSequence(int, int) - Method in class org.apache.lucene.queryParser.core.util.UnescapedCharSequence

subSequence(int, int) - Method in class org.apache.lucene.util.CharsRef

substring_i - Variable in class org.tartarus.snowball.Among

subtract(BytesRef, BytesRef) - Method in class org.apache.lucene.util.fst.ByteSequenceOutputs

subtract(IntsRef, IntsRef) - Method in class org.apache.lucene.util.fst.IntSequenceOutputs

subtract(Object, Object) - Method in class org.apache.lucene.util.fst.NoOutputs

subtract(T, T) - Method in class org.apache.lucene.util.fst.Outputs
Eg subtract("foobar", "foo") -> "bar"
subtract(PairOutputs.Pair<A, B>, PairOutputs.Pair<A, B>) - Method in class org.apache.lucene.util.fst.PairOutputs

subtract(Long, Long) - Method in class org.apache.lucene.util.fst.PositiveIntOutputs

subtract(Object, Object) - Method in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs

suffix - Variable in class org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule

suffixes - Static variable in class org.apache.lucene.analysis.ar.ArabicStemmer

suffixes - Variable in class org.apache.lucene.analysis.pt.RSLPStemmerBase.Step

SUFFIXTERM - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
suffixToString(StringBuilder) - Method in class org.apache.lucene.queryParser.surround.query.SimpleTerm

suffixToString(StringBuilder) - Method in class org.apache.lucene.queryParser.surround.query.SrndPrefixQuery

SuggestMode - Enum in org.apache.lucene.search.spell
Set of strategies for suggesting related terms
suggestSimilar(String, int) - Method in class org.apache.lucene.search.spell.SpellChecker
Suggest similar words.
suggestSimilar(String, int, float) - Method in class org.apache.lucene.search.spell.SpellChecker
Suggest similar words.
suggestSimilar(String, int, IndexReader, String, boolean) - Method in class org.apache.lucene.search.spell.SpellChecker
Deprecated. use suggestSimilar(String, int, IndexReader, String, SuggestMode)

SuggestMode.SUGGEST_WHEN_NOT_IN_INDEX instead of morePopular=false

SuggestMode.SuGGEST_MORE_POPULAR instead of morePopular=true

suggestSimilar(String, int, IndexReader, String, boolean, float) - Method in class org.apache.lucene.search.spell.SpellChecker
Deprecated. use suggestSimilar(String, int, IndexReader, String, SuggestMode, float)

SuggestMode.SUGGEST_WHEN_NOT_IN_INDEX instead of morePopular=false

SuggestMode.SuGGEST_MORE_POPULAR instead of morePopular=true

suggestSimilar(String, int, IndexReader, String, SuggestMode) - Method in class org.apache.lucene.search.spell.SpellChecker
Calls suggestSimilar(word, numSug, ir, suggestMode, field, this.accuracy)
suggestSimilar(String, int, IndexReader, String, SuggestMode, float) - Method in class org.apache.lucene.search.spell.SpellChecker
Suggest similar words (optionally restricted to a field of an index).
SuggestWord - Class in org.apache.lucene.search.spell
SuggestWord, used in suggestSimilar method in SpellChecker class.
SuggestWord() - Constructor for class org.apache.lucene.search.spell.SuggestWord

SuggestWordFrequencyComparator - Class in org.apache.lucene.search.spell
Frequency first, then score.
SuggestWordFrequencyComparator() - Constructor for class org.apache.lucene.search.spell.SuggestWordFrequencyComparator

SuggestWordQueue - Class in org.apache.lucene.search.spell
Sorts SuggestWord instances
SuggestWordQueue(int) - Constructor for class org.apache.lucene.search.spell.SuggestWordQueue
Use the SuggestWordQueue.DEFAULT_COMPARATOR
SuggestWordQueue(int, Comparator<SuggestWord>) - Constructor for class org.apache.lucene.search.spell.SuggestWordQueue
Specify the size of the queue and the comparator to use for sorting.
SuggestWordScoreComparator - Class in org.apache.lucene.search.spell
Score first, then frequency
SuggestWordScoreComparator() - Constructor for class org.apache.lucene.search.spell.SuggestWordScoreComparator

SUKUN - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

sumArray - Variable in class org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator

sumArray - Variable in class org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator

SUMMARY_LENGTH - Static variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser

sumOfSquaredWeights() - Method in class org.apache.lucene.search.BooleanQuery.BooleanWeight

sumOfSquaredWeights() - Method in class org.apache.lucene.search.ConstantScoreQuery.ConstantWeight

sumOfSquaredWeights() - Method in class org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight
Compute the sub of squared weights of us applied to our subqueries.
sumOfSquaredWeights() - Method in class org.apache.lucene.search.spans.SpanWeight

sumOfSquaredWeights() - Method in class org.apache.lucene.search.Weight
The sum of squared weights of contained query clauses.
SUN_OS - Static variable in class org.apache.lucene.util.Constants
True iff running on SunOS.
supportsComplements() - Method in class org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest

supportsComplements() - Method in class org.apache.lucene.facet.search.params.association.AssociationIntSumFacetRequest

supportsComplements() - Method in class org.apache.lucene.facet.search.params.CountFacetRequest

supportsComplements() - Method in class org.apache.lucene.facet.search.params.FacetRequest
Indicates whether this facet request is eligible for applying the complements optimization.
supportsComplements() - Method in class org.apache.lucene.facet.search.params.ScoreFacetRequest

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.AddDocTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.CloseIndexTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.CommitIndexTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.DeleteByPercentTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.DeleteDocTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.FlushReaderTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.ForceMergeTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.NewLocaleTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.NewShingleAnalyzerTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.OpenReaderTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask
Sub classes that support parameters must override this method to return true.
supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.PrintReaderTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetLoadFieldSelectorTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.SetPropTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.UpdateDocTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.WaitTask

supportsParams() - Method in class org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask

swap(int, int) - Method in class org.apache.lucene.util.SorterTemplate
Implement this method, that swaps slots i and j in your data
SwedishAnalyzer - Class in org.apache.lucene.analysis.sv
Analyzer for Swedish.
SwedishAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.sv.SwedishAnalyzer
Builds an analyzer with the default stop words: SwedishAnalyzer.DEFAULT_STOPWORD_FILE.
SwedishAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.sv.SwedishAnalyzer
Builds an analyzer with the given stop words.
SwedishAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.sv.SwedishAnalyzer
Builds an analyzer with the given stop words.
SwedishLightStemFilter - Class in org.apache.lucene.analysis.sv
A TokenFilter that applies SwedishLightStemmer to stem Swedish words.
SwedishLightStemFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.sv.SwedishLightStemFilter

SwedishLightStemmer - Class in org.apache.lucene.analysis.sv
Light Stemmer for Swedish.
SwedishLightStemmer() - Constructor for class org.apache.lucene.analysis.sv.SwedishLightStemmer

SwedishStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
SwedishStemmer() - Constructor for class org.tartarus.snowball.ext.SwedishStemmer

SweetSpotSimilarity - Class in org.apache.lucene.misc
A similarity with a lengthNorm that provides for a "plateau" of equally good lengths, and tf helper functions.
SweetSpotSimilarity() - Constructor for class org.apache.lucene.misc.SweetSpotSimilarity

SwitchTo(int) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager
Switch to specified lex state.
SwitchTo(int) - Method in class org.apache.lucene.queryParser.QueryParserTokenManager
Switch to specified lex state.
SwitchTo(int) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager
Switch to specified lex state.
SwitchTo(int) - Method in class org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager
Switch to specified lex state.
SYMBOL - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

sync() - Method in class org.apache.lucene.index.ConcurrentMergeScheduler
Wait for any running merge threads to finish
sync(String) - Method in class org.apache.lucene.store.Directory
Deprecated. use Directory.sync(Collection) instead. For easy migration you can change your code to call sync(Collections.singleton(name))
sync(Collection<String>) - Method in class org.apache.lucene.store.Directory
Ensure that any writes to these files are moved to stable storage.
sync(String) - Method in class org.apache.lucene.store.FileSwitchDirectory
Deprecated.
sync(Collection<String>) - Method in class org.apache.lucene.store.FileSwitchDirectory

sync(String) - Method in class org.apache.lucene.store.FSDirectory
Deprecated.
sync(Collection<String>) - Method in class org.apache.lucene.store.FSDirectory

sync(String) - Method in class org.apache.lucene.store.MockDirectoryWrapper
Deprecated.
sync(Collection<String>) - Method in class org.apache.lucene.store.MockDirectoryWrapper

sync(Collection<String>) - Method in class org.apache.lucene.store.NRTCachingDirectory

syncConcurrentMerges(IndexWriter) - Static method in class org.apache.lucene.util._TestUtil

syncConcurrentMerges(MergeScheduler) - Static method in class org.apache.lucene.util._TestUtil

SynonymFilter - Class in org.apache.lucene.analysis.synonym
Matches single or multi word synonyms in a token stream.
SynonymFilter(TokenStream, SynonymMap, boolean) - Constructor for class org.apache.lucene.analysis.synonym.SynonymFilter

SynonymMap - Class in org.apache.lucene.analysis.synonym
A map of synonyms, keys and values are phrases.
SynonymMap(FST<BytesRef>, BytesRefHash, int) - Constructor for class org.apache.lucene.analysis.synonym.SynonymMap

SynonymMap.Builder - Class in org.apache.lucene.analysis.synonym
Builds an FSTSynonymMap.
SynonymMap.Builder(boolean) - Constructor for class org.apache.lucene.analysis.synonym.SynonymMap.Builder
If dedup is true then identical rules (same input, same output) will be added only once.
SyntaxParser - Interface in org.apache.lucene.queryParser.core.parser
A parser needs to implement SyntaxParser interface
SystemPropertiesInvariantRule - Class in org.apache.lucene.util

SystemPropertiesInvariantRule() - Constructor for class org.apache.lucene.util.SystemPropertiesInvariantRule
Cares about all properties.
SystemPropertiesInvariantRule(String...) - Constructor for class org.apache.lucene.util.SystemPropertiesInvariantRule
Don't care about the given set of properties.
SystemPropertiesInvariantRule(Set<String>) - Constructor for class org.apache.lucene.util.SystemPropertiesInvariantRule
Don't care about the given set of properties.
SystemPropertiesRestoreRule - Class in org.apache.lucene.util
Restore system properties from before the nested Statement.
SystemPropertiesRestoreRule() - Constructor for class org.apache.lucene.util.SystemPropertiesRestoreRule
Restores all properties.
SystemPropertiesRestoreRule(Set<String>) - Constructor for class org.apache.lucene.util.SystemPropertiesRestoreRule

SystemPropertiesRestoreRule(String...) - Constructor for class org.apache.lucene.util.SystemPropertiesRestoreRule

T

tableTitle(String) - Method in class org.apache.lucene.benchmark.byTask.tasks.ReportTask
Compute a title line for a report table
tabSize - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

tabSize - Variable in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

Tag() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser

TAG_ID - Static variable in interface org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute
Deprecated.
TAG_ID - Static variable in class org.apache.lucene.queryParser.standard.processors.MultiTermRewriteMethodProcessor

TagEnd - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
TagName - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
Tags - Class in org.apache.lucene.benchmark.byTask.feeds.demohtml

Tags() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.Tags

target - Variable in class org.apache.lucene.util.fst.Builder.Arc

target - Variable in class org.apache.lucene.util.fst.FST.Arc

targetHasArcs(FST.Arc<T>) - Static method in class org.apache.lucene.util.fst.FST

TARGETMAP_FILENAME_SUFFIX - Static variable in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

TARGETMAP_HEADER - Static variable in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

taskReportLine(String, TaskStats) - Method in class org.apache.lucene.benchmark.byTask.tasks.ReportTask
Compute a report line for the given task stat.
TaskSequence - Class in org.apache.lucene.benchmark.byTask.tasks
Sequence of parallel or sequential tasks.
TaskSequence(PerfRunData, String, TaskSequence, boolean) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

taskStats() - Method in class org.apache.lucene.benchmark.byTask.stats.Points
Return the current task stats.
TaskStats - Class in org.apache.lucene.benchmark.byTask.stats
Statistics for a task run.
TATWEEL - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

taxonomyReader - Variable in class org.apache.lucene.facet.search.FacetResultsHandler
Taxonomy for which facets are handled
taxonomyReader - Variable in class org.apache.lucene.facet.search.FacetsAccumulator

TaxonomyReader - Interface in org.apache.lucene.facet.taxonomy
TaxonomyReader is the read-only interface with which the faceted-search library uses the taxonomy during search time.
TaxonomyReader.ChildrenArrays - Interface in org.apache.lucene.facet.taxonomy
Equivalent representations of the taxonomy's parent info, used internally for efficient computation of facet results: "youngest child" and "oldest sibling"
taxonomyWriter - Variable in class org.apache.lucene.facet.index.CategoryDocumentBuilder
A TaxonomyWriter for adding categories and retrieving their ordinals.
taxonomyWriter - Variable in class org.apache.lucene.facet.index.streaming.CategoryParentsStream
A TaxonomyWriter for adding categories and retrieving their ordinals.
TaxonomyWriter - Interface in org.apache.lucene.facet.taxonomy
TaxonomyWriter is the interface which the faceted-search library uses to dynamically build the taxonomy at indexing time.
TaxonomyWriterCache - Interface in org.apache.lucene.facet.taxonomy.writercache
TaxonomyWriterCache is a relatively simple interface for a cache of category->ordinal mappings, used in TaxonomyWriter implementations (such as DirectoryTaxonomyWriter).
tearDown() - Method in class org.apache.lucene.benchmark.byTask.tasks.AddDocTask

tearDown() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask
Task tearDown work that should not be measured for that specific task.
tearDown() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTokensTask

tearDown() - Method in class org.apache.lucene.benchmark.byTask.tasks.UpdateDocTask

tearDown() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

tearDown() - Method in class org.apache.lucene.util.LuceneTestCase
For subclassing only.
TeeSinkTokenFilter - Class in org.apache.lucene.analysis
This TokenFilter provides the ability to set aside attribute states that have already been analyzed.
TeeSinkTokenFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.TeeSinkTokenFilter
Instantiates a new TeeSinkTokenFilter.
TeeSinkTokenFilter.SinkFilter - Class in org.apache.lucene.analysis
A filter that decides which AttributeSource states to store in the sink.
TeeSinkTokenFilter.SinkFilter() - Constructor for class org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter

TeeSinkTokenFilter.SinkTokenStream - Class in org.apache.lucene.analysis
TokenStream output from a tee with optional filtering.
TEH - Static variable in class org.apache.lucene.analysis.ar.ArabicStemmer

TEH_MARBUTA - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

TEH_MARBUTA - Static variable in class org.apache.lucene.analysis.ar.ArabicStemmer

TEMP_DIR - Static variable in class org.apache.lucene.util.LuceneTestCase
Create indexes in this directory, optimally use a subdir, named after the test
tempMergeFiles - Variable in class org.apache.lucene.search.suggest.fst.Sort.SortInfo

temporalResult - Variable in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector

TemporaryObjectAllocator<T> - Class in org.apache.lucene.facet.search
An TemporaryObjectAllocator is an object which manages large, reusable, temporary objects needed during multiple concurrent computations.
TemporaryObjectAllocator(int) - Constructor for class org.apache.lucene.facet.search.TemporaryObjectAllocator
Construct an allocator for objects of a certain type, keeping around a pool of up to maxObjects old objects.
term() - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
Deprecated.
term() - Method in interface org.apache.lucene.analysis.tokenattributes.TermAttribute
Deprecated. Returns the Token's term text.
term(FacetSearchParams, CategoryPath) - Static method in class org.apache.lucene.facet.search.DrillDown

term(FacetIndexingParams, CategoryPath) - Static method in class org.apache.lucene.facet.search.DrillDown
Return a term for drilling down into a category.
term() - Method in class org.apache.lucene.index.FilterIndexReader.FilterTermEnum

Term - Class in org.apache.lucene.index
A Term represents a word from text.
Term(String, String) - Constructor for class org.apache.lucene.index.Term
Constructs a Term with the given field and text.
Term(String) - Constructor for class org.apache.lucene.index.Term
Constructs a Term with the given field and empty text.
term() - Method in class org.apache.lucene.index.TermEnum
Returns the current Term in the enumeration.
Term(String) - Method in class org.apache.lucene.queryParser.QueryParser

TERM - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
Term(CharSequence) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser

TERM - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
TERM - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
term() - Method in class org.apache.lucene.search.FilteredTermEnum
Returns the current Term in the enumeration.
term - Variable in class org.apache.lucene.search.FuzzyQuery

term - Variable in class org.apache.lucene.search.spans.SpanTermQuery

term - Variable in class org.apache.lucene.search.spans.TermSpans

term - Variable in class org.apache.lucene.search.WildcardQuery

term() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermEnum
Returns the current Term in the enumeration.
TermAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead> - Class in org.apache.lucene.search.grouping
A base implementation of AbstractAllGroupHeadsCollector for retrieving the most relevant groups when grouping on a string based group field.
TermAllGroupHeadsCollector(String, int) - Constructor for class org.apache.lucene.search.grouping.TermAllGroupHeadsCollector

TermAllGroupsCollector - Class in org.apache.lucene.search.grouping
A collector that collects all groups that match the query.
TermAllGroupsCollector(String, int) - Constructor for class org.apache.lucene.search.grouping.TermAllGroupsCollector
Expert: Constructs a AbstractAllGroupsCollector
TermAllGroupsCollector(String) - Constructor for class org.apache.lucene.search.grouping.TermAllGroupsCollector
Constructs a AbstractAllGroupsCollector.
termAtt - Variable in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

termAtt - Variable in class org.apache.lucene.analysis.sinks.DateRecognizerSinkFilter

TermAttribute - Interface in org.apache.lucene.analysis.tokenattributes
Deprecated. Use CharTermAttribute instead.
termAttribute - Variable in class org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
The stream's term attribute.
TermAttributeImpl - Class in org.apache.lucene.analysis.tokenattributes
Deprecated. This class is not used anymore. The backwards layer in AttributeFactory uses the replacement implementation.
TermAttributeImpl() - Constructor for class org.apache.lucene.analysis.tokenattributes.TermAttributeImpl
Deprecated.
termBuffer() - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
Deprecated.
termBuffer() - Method in interface org.apache.lucene.analysis.tokenattributes.TermAttribute
Deprecated. Returns the internal termBuffer character array which you can then directly alter.
termComparator - Static variable in class org.apache.lucene.store.instantiated.InstantiatedTerm

termComparator - Static variable in class org.apache.lucene.store.instantiated.InstantiatedTermDocumentInformation

termCompare(Term) - Method in class org.apache.lucene.search.FilteredTermEnum
Equality compare on the term
termCompare(Term) - Method in class org.apache.lucene.search.FuzzyTermEnum
The termCompare method in FuzzyTermEnum uses Levenshtein distance to calculate the distance between the given term and the comparing term.
termCompare(Term) - Method in class org.apache.lucene.search.PrefixTermEnum

termCompare(Term) - Method in class org.apache.lucene.search.regex.RegexTermEnum

termCompare(Term) - Method in class org.apache.lucene.search.SingleTermEnum

termCompare(Term) - Method in class org.apache.lucene.search.TermRangeTermEnum

termCompare(Term) - Method in class org.apache.lucene.search.WildcardTermEnum

termCount - Variable in class org.apache.lucene.index.CheckIndex.Status.TermIndexStatus
Total term count
termCount - Variable in class org.apache.lucene.index.PruningReader

termDocs() - Method in class org.apache.lucene.index.FilterIndexReader

termDocs(Term) - Method in class org.apache.lucene.index.FilterIndexReader

termDocs(Term) - Method in class org.apache.lucene.index.IndexReader
Returns an enumeration of all the documents which contain term.
termDocs() - Method in class org.apache.lucene.index.IndexReader
Returns an unpositioned TermDocs enumerator.
termDocs() - Method in class org.apache.lucene.index.MultiReader

termDocs(Term) - Method in class org.apache.lucene.index.MultiReader

termDocs(Term) - Method in class org.apache.lucene.index.ParallelReader

termDocs() - Method in class org.apache.lucene.index.ParallelReader

termDocs(Term) - Method in class org.apache.lucene.index.SegmentReader

termDocs() - Method in class org.apache.lucene.index.SegmentReader

TermDocs - Interface in org.apache.lucene.index
TermDocs provides an interface for enumerating <document, frequency> pairs for a term.
termDocs() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
termDocs(Term) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
TermEnum - Class in org.apache.lucene.index
Abstract class for enumerating terms.
TermEnum() - Constructor for class org.apache.lucene.index.TermEnum

TermFirstPassGroupingCollector - Class in org.apache.lucene.search.grouping
Concrete implementation of AbstractFirstPassGroupingCollector that groups based on field values and more specifically uses FieldCache.StringIndex to collect groups.
TermFirstPassGroupingCollector(String, Sort, int) - Constructor for class org.apache.lucene.search.grouping.TermFirstPassGroupingCollector
Create the first pass collector.
TermFreqIterator - Interface in org.apache.lucene.search.spell
Interface for enumerating term,weight pairs.
TermFreqIterator.TermFreqIteratorWrapper - Class in org.apache.lucene.search.spell
Wraps a BytesRefIterator as a TermFreqIterator, with all weights set to 1
TermFreqIterator.TermFreqIteratorWrapper(BytesRefIterator) - Constructor for class org.apache.lucene.search.spell.TermFreqIterator.TermFreqIteratorWrapper

TermFreqVector - Interface in org.apache.lucene.index
Provides access to stored term vector of a document field.
TERMINATING_DOC - Static variable in class org.apache.lucene.benchmark.byTask.feeds.TrecContentSource

TERMINATING_DOCNO - Static variable in class org.apache.lucene.benchmark.byTask.feeds.TrecContentSource

termIndexInterval - Variable in class org.apache.lucene.index.SegmentWriteState
Expert: The fraction of terms in the "dictionary" which should be stored in RAM.
termIndexStatus - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
Status for testing of indexed terms (null if indexed terms could not be tested).
termLength() - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
Deprecated.
termLength() - Method in interface org.apache.lucene.analysis.tokenattributes.TermAttribute
Deprecated. Return number of valid characters (length of the term) in the termBuffer array.
termPolicy - Variable in class org.apache.lucene.index.PruningReader

termPositions() - Method in class org.apache.lucene.index.FilterIndexReader

termPositions(Term) - Method in class org.apache.lucene.index.IndexReader
Returns an enumeration of all the documents which contain term.
termPositions() - Method in class org.apache.lucene.index.IndexReader
Returns an unpositioned TermPositions enumerator.
termPositions() - Method in class org.apache.lucene.index.MultiReader

termPositions() - Method in class org.apache.lucene.index.ParallelReader

termPositions() - Method in class org.apache.lucene.index.PruningReader
Applies TermPruningPolicy to term positions.
termPositions() - Method in class org.apache.lucene.index.SegmentReader

TermPositions - Interface in org.apache.lucene.index
TermPositions provides an interface for enumerating the <document, frequency, <position>* > tuples for a term.
termPositions() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
TermPositionVector - Interface in org.apache.lucene.index
Extends TermFreqVector to provide additional information about positions in which each of the terms is found.
TermPruningPolicy - Class in org.apache.lucene.index.pruning
Policy for producing smaller index out of an input index, by examining its terms and removing from the index some or all of their data as follows: all terms of a certain field - see TermPruningPolicy.pruneAllFieldPostings(String) all data of a certain term - see TermPruningPolicy.pruneTermEnum(TermEnum) all positions of a certain term in a certain document - see #pruneAllPositions(TermPositions, Term) some positions of a certain term in a certain document - see #pruneSomePositions(int, int[], Term)
TermPruningPolicy(IndexReader, Map<String, Integer>) - Constructor for class org.apache.lucene.index.pruning.TermPruningPolicy
Construct a policy.
TermQuery - Class in org.apache.lucene.search
A Query that matches documents containing a term.
TermQuery(Term) - Constructor for class org.apache.lucene.search.TermQuery
Constructs a query for the term t.
TermQueryBuilder - Class in org.apache.lucene.xmlparser.builders

TermQueryBuilder() - Constructor for class org.apache.lucene.xmlparser.builders.TermQueryBuilder

TermRangeFilter - Class in org.apache.lucene.search
A Filter that restricts search results to a range of term values in a given field.
TermRangeFilter(String, String, String, boolean, boolean) - Constructor for class org.apache.lucene.search.TermRangeFilter

TermRangeFilter(String, String, String, boolean, boolean, Collator) - Constructor for class org.apache.lucene.search.TermRangeFilter
WARNING: Using this constructor and supplying a non-null value in the collator parameter will cause every single index Term in the Field referenced by lowerTerm and/or upperTerm to be examined.
TermRangeQuery - Class in org.apache.lucene.search
A Query that matches documents within an range of terms.
TermRangeQuery(String, String, String, boolean, boolean) - Constructor for class org.apache.lucene.search.TermRangeQuery
Constructs a query selecting all terms greater/equal than lowerTerm but less/equal than upperTerm.
TermRangeQuery(String, String, String, boolean, boolean, Collator) - Constructor for class org.apache.lucene.search.TermRangeQuery
Constructs a query selecting all terms greater/equal than lowerTerm but less/equal than upperTerm.
TermRangeQueryNode - Class in org.apache.lucene.queryParser.standard.nodes
This query node represents a range query composed by FieldQueryNode bounds, which means the bound values are strings.
TermRangeQueryNode(FieldQueryNode, FieldQueryNode, boolean, boolean) - Constructor for class org.apache.lucene.queryParser.standard.nodes.TermRangeQueryNode
Constructs a TermRangeQueryNode object using the given FieldQueryNode as its bounds.
TermRangeQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
Builds a TermRangeQuery object from a TermRangeQueryNode object.
TermRangeQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.TermRangeQueryNodeBuilder

TermRangeTermEnum - Class in org.apache.lucene.search
Subclass of FilteredTermEnum for enumerating all terms that match the specified range parameters.
TermRangeTermEnum(IndexReader, String, String, String, boolean, boolean, Collator) - Constructor for class org.apache.lucene.search.TermRangeTermEnum
Enumerates all terms greater/equal than lowerTerm but less/equal than upperTerm.
terms() - Method in class org.apache.lucene.index.FilterIndexReader

terms(Term) - Method in class org.apache.lucene.index.FilterIndexReader

terms() - Method in class org.apache.lucene.index.IndexReader
Returns an enumeration of all the terms in the index.
terms(Term) - Method in class org.apache.lucene.index.IndexReader
Returns an enumeration of all terms starting at a given term.
terms() - Method in class org.apache.lucene.index.MultiReader

terms(Term) - Method in class org.apache.lucene.index.MultiReader

terms() - Method in class org.apache.lucene.index.ParallelReader

terms(Term) - Method in class org.apache.lucene.index.ParallelReader

terms() - Method in class org.apache.lucene.index.PruningReader
Applies TermPruningPolicy to term enum.
terms() - Method in class org.apache.lucene.index.SegmentReader

terms(Term) - Method in class org.apache.lucene.index.SegmentReader

terms - Variable in class org.apache.lucene.search.spans.SpanWeight

terms() - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
terms(Term) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexReader
Deprecated.
TERMS_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of terms file
TERMS_INDEX_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of terms index file
TermSecondPassGroupingCollector - Class in org.apache.lucene.search.grouping
Concrete implementation of AbstractSecondPassGroupingCollector that groups based on field values and more specifically uses FieldCache.StringIndex to collect grouped docs.
TermSecondPassGroupingCollector(String, Collection<SearchGroup<String>>, Sort, Sort, int, boolean, boolean, boolean) - Constructor for class org.apache.lucene.search.grouping.TermSecondPassGroupingCollector

TermsFilter - Class in org.apache.lucene.search
Constructs a filter for docs matching any of the terms added to this class.
TermsFilter() - Constructor for class org.apache.lucene.search.TermsFilter

TermsFilterBuilder - Class in org.apache.lucene.xmlparser.builders

TermsFilterBuilder(Analyzer) - Constructor for class org.apache.lucene.xmlparser.builders.TermsFilterBuilder

TermSpans - Class in org.apache.lucene.search.spans
Expert: Public for extension only
TermSpans(TermPositions, Term) - Constructor for class org.apache.lucene.search.spans.TermSpans

TermsQueryBuilder - Class in org.apache.lucene.xmlparser.builders
Builds a BooleanQuery from all of the terms found in the XML element using the choice of analyzer
TermsQueryBuilder(Analyzer) - Constructor for class org.apache.lucene.xmlparser.builders.TermsQueryBuilder

TermVectorAccessor - Class in org.apache.lucene.index
Transparent access to the vector space model, either via TermFreqVector or by resolving it from the inverted index.
TermVectorAccessor() - Constructor for class org.apache.lucene.index.TermVectorAccessor

TermVectorEntry - Class in org.apache.lucene.index
Convenience class for holding TermVector information.
TermVectorEntry() - Constructor for class org.apache.lucene.index.TermVectorEntry

TermVectorEntry(String, String, int, TermVectorOffsetInfo[], int[]) - Constructor for class org.apache.lucene.index.TermVectorEntry

TermVectorEntryFreqSortedComparator - Class in org.apache.lucene.index
Compares TermVectorEntrys first by frequency and then by the term (case-sensitive)
TermVectorEntryFreqSortedComparator() - Constructor for class org.apache.lucene.index.TermVectorEntryFreqSortedComparator

TermVectorMapper - Class in org.apache.lucene.index
The TermVectorMapper can be used to map Term Vectors into your own structure instead of the parallel array structure used by IndexReader.getTermFreqVector(int,String).
TermVectorMapper() - Constructor for class org.apache.lucene.index.TermVectorMapper

TermVectorMapper(boolean, boolean) - Constructor for class org.apache.lucene.index.TermVectorMapper

TermVectorOffsetInfo - Class in org.apache.lucene.index
The TermVectorOffsetInfo class holds information pertaining to a Term in a TermPositionVector's offset information.
TermVectorOffsetInfo() - Constructor for class org.apache.lucene.index.TermVectorOffsetInfo

TermVectorOffsetInfo(int, int) - Constructor for class org.apache.lucene.index.TermVectorOffsetInfo

termVectorStatus - Variable in class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
Status for testing of term vectors (null if term vectors could not be tested).
termVecVal - Variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

TernaryTree - Class in org.apache.lucene.analysis.compound.hyphenation
Ternary Search Tree.
TernaryTree.Iterator - Class in org.apache.lucene.analysis.compound.hyphenation

TernaryTree.Iterator() - Constructor for class org.apache.lucene.analysis.compound.hyphenation.TernaryTree.Iterator

TernaryTreeNode - Class in org.apache.lucene.search.suggest.tst
The class creates a TST node.
TernaryTreeNode() - Constructor for class org.apache.lucene.search.suggest.tst.TernaryTreeNode

TEST_CLEAN_THREADS - Static variable in class org.apache.lucene.util.LuceneTestCase
whether or not to clean threads between test invocations: "false", "perMethod", "perClass"
TEST_DIRECTORY - Static variable in class org.apache.lucene.util.LuceneTestCase
Gets the directory to run tests with
TEST_ITER - Static variable in class org.apache.lucene.util.LuceneTestCase
Get the number of times to run tests
TEST_ITER_MIN - Static variable in class org.apache.lucene.util.LuceneTestCase
Get the minimum number of times to run tests until a failure happens
TEST_LINE_DOCS_FILE - Static variable in class org.apache.lucene.util.LuceneTestCase
the line file used by LineFileDocs
TEST_LOCALE - Static variable in class org.apache.lucene.util.LuceneTestCase
Gets the locale to run tests with
TEST_NIGHTLY - Static variable in class org.apache.lucene.util.LuceneTestCase
whether or not nightly tests should run
TEST_SEED - Static variable in class org.apache.lucene.util.LuceneTestCase
Get the random seed for tests
TEST_TIMEZONE - Static variable in class org.apache.lucene.util.LuceneTestCase
Gets the timezone to run tests with
TEST_VERSION_CURRENT - Static variable in class org.apache.lucene.util.LuceneTestCase
Use this constant when creating Analyzers and any other version-dependent stuff.
TestApp - Class in org.tartarus.snowball

TestApp() - Constructor for class org.tartarus.snowball.TestApp

testAutoGeneratePhraseQueriesOn() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testBooleanQuery() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testBoost() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testCJK() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testCJKBoostedPhrase() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testCJKBoostedTerm() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testCJKPhrase() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testCJKSloppyPhrase() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testCJKTerm() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testCollationKeySort(Analyzer, Analyzer, Analyzer, Analyzer, String, String, String, String) - Method in class org.apache.lucene.analysis.CollationTestBase

testCustomQueryParserFuzzy() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testCustomQueryParserWildcard() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testDateRange() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testEscaped() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testException() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testFarsiRangeCollating() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testFarsiRangeFilterCollating(Analyzer, String, String, String, String) - Method in class org.apache.lucene.analysis.CollationTestBase

testFarsiRangeQueryCollating(Analyzer, String, String, String, String) - Method in class org.apache.lucene.analysis.CollationTestBase

testFarsiTermRangeQuery(Analyzer, String, String, String, String) - Method in class org.apache.lucene.analysis.CollationTestBase

testLeadingWildcardType() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testLegacyDateRange() - Method in class org.apache.lucene.queryParser.QueryParserTestBase
for testing legacy DateField support
testLocalDateFormat() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testMatchAllDocs() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testNumber() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testPositionIncrement() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testPositionIncrements() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testPrecedence() - Method in class org.apache.lucene.queryParser.QueryParserTestBase
This test differs from TestPrecedenceQueryParser
testProtectedCtors() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testPunct() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testQPA() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testQueryStringEscaping() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testRange() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testsFailed - Static variable in class org.apache.lucene.util.LuceneTestCase

testSimple() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testSimpleDAO() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testSlop() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testStarParsing() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testStopwords() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testTabNewlineCarriageReturn() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

testWildcard() - Method in class org.apache.lucene.queryParser.QueryParserTestBase

text() - Method in class org.apache.lucene.index.Term
Returns the text of this term.
text - Variable in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
The term's text.
text() - Method in class org.apache.lucene.store.instantiated.InstantiatedTerm

TextableQueryNode - Interface in org.apache.lucene.queryParser.core.nodes

TextFragment - Class in org.apache.lucene.search.highlight
Low-level class used to record information about a section of a document with a score.
TextFragment(CharSequence, int, int) - Constructor for class org.apache.lucene.search.highlight.TextFragment

TextFragment(StringBuffer, int, int) - Constructor for class org.apache.lucene.search.highlight.TextFragment
Deprecated. Use TextFragment.TextFragment(CharSequence, int, int) instead. This constructor will be removed in Lucene 4.0
tf(int) - Method in class org.apache.lucene.misc.SweetSpotSimilarity
Delegates to baselineTf
tf(float) - Method in class org.apache.lucene.search.DefaultSimilarity
Implemented as sqrt(freq).
tf(int) - Method in class org.apache.lucene.search.Similarity
Computes a score factor based on a term or phrase's frequency in a document.
tf(float) - Method in class org.apache.lucene.search.Similarity
Computes a score factor based on a term or phrase's frequency in a document.
tf(float) - Method in class org.apache.lucene.search.SimilarityDelegator
Deprecated.
TFTermPruningPolicy - Class in org.apache.lucene.index.pruning
Policy for producing smaller index out of an input index, by removing postings data for those terms where their in-document frequency is below a specified threshold.
TFTermPruningPolicy(IndexReader, Map<String, Integer>, Map<String, Integer>, int) - Constructor for class org.apache.lucene.index.pruning.TFTermPruningPolicy

ThaiAnalyzer - Class in org.apache.lucene.analysis.th
Analyzer for Thai language.
ThaiAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.th.ThaiAnalyzer
Builds an analyzer with the default stop words.
ThaiAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.th.ThaiAnalyzer
Builds an analyzer with the given stop words.
ThaiWordFilter - Class in org.apache.lucene.analysis.th
TokenFilter that use BreakIterator to break each Token that is Thai into separate Token(s) for each Thai word.
ThaiWordFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.th.ThaiWordFilter
Deprecated. Use the ctor with matchVersion instead!
ThaiWordFilter(Version, TokenStream) - Constructor for class org.apache.lucene.analysis.th.ThaiWordFilter
Creates a new ThaiWordFilter with the specified match version.
theEmptyLcnQuery - Static variable in class org.apache.lucene.queryParser.surround.query.SrndQuery

thread - Variable in class org.apache.lucene.util.UncaughtExceptionsRule.UncaughtExceptionEntry

THREAD_NAME - Static variable in class org.apache.lucene.search.TimeLimitingCollector.TimerThread

ThreadedIndexingAndSearchingTestCase - Class in org.apache.lucene.index
Utility class that spawns multiple indexing and searching threads.
ThreadedIndexingAndSearchingTestCase() - Constructor for class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

ThreadInterruptedException - Exception in org.apache.lucene.util
Thrown by lucene on detecting that Thread.interrupt() had been called.
ThreadInterruptedException(InterruptedException) - Constructor for exception org.apache.lucene.util.ThreadInterruptedException

thresholds - Variable in class org.apache.lucene.index.pruning.TFTermPruningPolicy

ThrottledIndexOutput - Class in org.apache.lucene.util
Intentionally slow IndexOutput for testing.
ThrottledIndexOutput(int, long, IndexOutput) - Constructor for class org.apache.lucene.util.ThrottledIndexOutput

ThrottledIndexOutput(int, long, int, IndexOutput) - Constructor for class org.apache.lucene.util.ThrottledIndexOutput

ThrottledIndexOutput(int, long, long, long, long, IndexOutput) - Constructor for class org.apache.lucene.util.ThrottledIndexOutput

throwExcAfterChar(int) - Method in class org.apache.lucene.analysis.MockReaderWrapper
Throw an exception after reading this many chars.
throwExcNext() - Method in class org.apache.lucene.analysis.MockReaderWrapper

TieredMergePolicy - Class in org.apache.lucene.index
Merges segments of approximately equal size, subject to an allowed number of segments per tier.
TieredMergePolicy() - Constructor for class org.apache.lucene.index.TieredMergePolicy

TieredMergePolicy.MergeScore - Class in org.apache.lucene.index
Holds score and explanation for a single candidate merge.
TieredMergePolicy.MergeScore() - Constructor for class org.apache.lucene.index.TieredMergePolicy.MergeScore

TIME_SEC_FIELD - Static variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

TimeLimitingCollector - Class in org.apache.lucene.search
The TimeLimitingCollector is used to timeout search requests that take longer than the maximum allowed search time limit.
TimeLimitingCollector(Collector, Counter, long) - Constructor for class org.apache.lucene.search.TimeLimitingCollector
Create a TimeLimitedCollector wrapper over another Collector with a specified timeout.
TimeLimitingCollector.TimeExceededException - Exception in org.apache.lucene.search
Thrown when elapsed search time exceeds allowed search time.
TimeLimitingCollector.TimerThread - Class in org.apache.lucene.search

TimeLimitingCollector.TimerThread(long, Counter) - Constructor for class org.apache.lucene.search.TimeLimitingCollector.TimerThread

TimeLimitingCollector.TimerThread(Counter) - Constructor for class org.apache.lucene.search.TimeLimitingCollector.TimerThread

timestamp - Variable in class org.apache.lucene.search.FilterManager.FilterItem
Deprecated.
timeToString(long) - Static method in class org.apache.lucene.document.DateField
Deprecated. Converts a millisecond time to a string suitable for indexing.
timeToString(long, DateTools.Resolution) - Static method in class org.apache.lucene.document.DateTools
Converts a millisecond time to a string suitable for indexing.
TITLE_FIELD - Static variable in class org.apache.lucene.benchmark.byTask.feeds.DocMaker

toArray(T[]) - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

toArray() - Method in class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

toArray() - Method in class org.apache.lucene.util.collections.ArrayHashMap
Translates the mapped pairs' values into an array of Objects
toArray(V[]) - Method in class org.apache.lucene.util.collections.ArrayHashMap
Translates the mapped pairs' values into an array of V
toArray() - Method in class org.apache.lucene.util.collections.FloatToObjectMap
Translates the mapped pairs' values into an array of Objects
toArray(T[]) - Method in class org.apache.lucene.util.collections.FloatToObjectMap
Translates the mapped pairs' values into an array of T
toArray() - Method in class org.apache.lucene.util.collections.IntHashSet
Translates the mapped pairs' values into an array of Objects
toArray(int[]) - Method in class org.apache.lucene.util.collections.IntHashSet
Translates the mapped pairs' values into an array of ints
toArray() - Method in class org.apache.lucene.util.collections.IntToDoubleMap
Translates the mapped pairs' values into an array of Objects
toArray(double[]) - Method in class org.apache.lucene.util.collections.IntToDoubleMap
Translates the mapped pairs' values into an array of T
toArray() - Method in class org.apache.lucene.util.collections.IntToIntMap
Translates the mapped pairs' values into an array of Objects
toArray(int[]) - Method in class org.apache.lucene.util.collections.IntToIntMap
Translates the mapped pairs' values into an array of ints
toArray() - Method in class org.apache.lucene.util.collections.IntToObjectMap
Translates the mapped pairs' values into an array of Objects
toArray(T[]) - Method in class org.apache.lucene.util.collections.IntToObjectMap
Translates the mapped pairs' values into an array of T
toArray() - Method in class org.apache.lucene.util.collections.ObjectToFloatMap
Translates the mapped pairs' values into an array of Objects
toArray(float[]) - Method in class org.apache.lucene.util.collections.ObjectToFloatMap
Translates the mapped pairs' values into an array of T
toArray() - Method in class org.apache.lucene.util.collections.ObjectToIntMap
Translates the mapped pairs' values into an array of Objects
toArray(int[]) - Method in class org.apache.lucene.util.collections.ObjectToIntMap
Translates the mapped pairs' values into an array of T
toByteArray() - Method in class org.apache.lucene.index.Payload
Allocates a new byte array, copies the payload data into it and returns it.
toByteArray() - Method in class org.apache.lucene.util.UnsafeByteArrayOutputStream
Returns the byte array saved within the buffer AS IS.
toBytesRef(IntsRef, BytesRef) - Static method in class org.apache.lucene.util.fst.Util
Just converts IntsRef to BytesRef; you must ensure the int values fit into a byte.
toCartesian() - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated. Convert the lat/lng into the cartesian coordinate plane such that all world coordinates are represented in the first quadrant.
toCharArray() - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

ToChildBlockJoinQuery - Class in org.apache.lucene.search.join
Just like ToParentBlockJoinQuery, except this query joins in reverse: you provide a Query matching parent documents and it joins down to child documents.
ToChildBlockJoinQuery(Query, Filter, boolean) - Constructor for class org.apache.lucene.search.join.ToChildBlockJoinQuery

toDigitString() - Method in enum org.apache.lucene.queryParser.core.nodes.ModifierQueryNode.Modifier

toDot(Analyzer, String) - Method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

toDot() - Method in class org.apache.lucene.analysis.TokenStreamToDot

toDot(FST<T>, Writer, boolean, boolean) - Static method in class org.apache.lucene.util.fst.Util
Dumps an FST to a GraphViz's dot language description for visualization.
toDotFile(Analyzer, String, String) - Method in class org.apache.lucene.analysis.BaseTokenStreamTestCase

toFixed() - Method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
toFixed() - Method in class org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.
toFixed() - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated.
toFloat() - Method in class org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.
toFloat() - Method in class org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.
toFloat() - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated.
toHashString() - Method in class org.apache.lucene.util.collections.IntHashSet

toHtml() - Method in class org.apache.lucene.search.Explanation
Render an explanation as HTML.
toImpl(FacetResultNode) - Static method in class org.apache.lucene.facet.search.results.MutableFacetResultNode
Internal utility: turn a result node into an implementation class with richer API that allows modifying it.
toIndex(boolean, boolean) - Static method in enum org.apache.lucene.document.Field.Index
Get the best representation of the index given the flags.
toIndex(boolean, boolean, boolean) - Static method in enum org.apache.lucene.document.Field.Index
Expert: Get the best representation of the index given the flags.
toIntArray(Collection<Integer>) - Static method in class org.apache.lucene.util.ArrayUtil

toIntsRef(BytesRef, IntsRef) - Static method in class org.apache.lucene.util.fst.Util
Just takes unsigned byte values from the BytesRef and converts into an IntsRef.
Token - Class in org.apache.lucene.analysis.ja
Analyzed token with morphological data from its dictionary.
Token(int, char[], int, int, JapaneseTokenizer.Type, int, Dictionary) - Constructor for class org.apache.lucene.analysis.ja.Token

Token - Class in org.apache.lucene.analysis
A Token is an occurrence of a term from the text of a field.
Token() - Constructor for class org.apache.lucene.analysis.Token
Constructs a Token will null text.
Token(int, int) - Constructor for class org.apache.lucene.analysis.Token
Constructs a Token with null text and start & end offsets.
Token(int, int, String) - Constructor for class org.apache.lucene.analysis.Token
Constructs a Token with null text and start & end offsets plus the Token type.
Token(int, int, int) - Constructor for class org.apache.lucene.analysis.Token
Constructs a Token with null text and start & end offsets plus flags.
Token(String, int, int) - Constructor for class org.apache.lucene.analysis.Token
Constructs a Token with the given term text, and start & end offsets.
Token(String, int, int, String) - Constructor for class org.apache.lucene.analysis.Token
Constructs a Token with the given text, start and end offsets, & type.
Token(String, int, int, int) - Constructor for class org.apache.lucene.analysis.Token
Constructs a Token with the given text, start and end offsets, & type.
Token(char[], int, int, int, int) - Constructor for class org.apache.lucene.analysis.Token
Constructs a Token with the given term buffer (offset & length), start and end offsets
token - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Current token.
Token - Class in org.apache.lucene.benchmark.byTask.feeds.demohtml
Describes the input token stream.
Token() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token
No-argument constructor
Token(int) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token
Constructs a new token for the specified Image.
Token(int, String) - Constructor for class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token
Constructs a new token for the specified Image and Kind.
token - Variable in class org.apache.lucene.queryParser.QueryParser
Current token.
token - Variable in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Current token.
Token - Class in org.apache.lucene.queryParser.standard.parser
Describes the input token stream.
Token() - Constructor for class org.apache.lucene.queryParser.standard.parser.Token
No-argument constructor
Token(int) - Constructor for class org.apache.lucene.queryParser.standard.parser.Token
Constructs a new token for the specified Image.
Token(int, String) - Constructor for class org.apache.lucene.queryParser.standard.parser.Token
Constructs a new token for the specified Image and Kind.
token - Variable in class org.apache.lucene.queryParser.surround.parser.QueryParser
Current token.
Token - Class in org.apache.lucene.queryParser.surround.parser
Describes the input token stream.
Token() - Constructor for class org.apache.lucene.queryParser.surround.parser.Token
No-argument constructor
Token(int) - Constructor for class org.apache.lucene.queryParser.surround.parser.Token
Constructs a new token for the specified Image.
Token(int, String) - Constructor for class org.apache.lucene.queryParser.surround.parser.Token
Constructs a new token for the specified Image and Kind.
Token - Class in org.apache.lucene.queryParser
Describes the input token stream.
Token() - Constructor for class org.apache.lucene.queryParser.Token
No-argument constructor
Token(int) - Constructor for class org.apache.lucene.queryParser.Token
Constructs a new token for the specified Image.
Token(int, String) - Constructor for class org.apache.lucene.queryParser.Token
Constructs a new token for the specified Image and Kind.
Token.TokenAttributeFactory - Class in org.apache.lucene.analysis
Expert: Creates a TokenAttributeFactory returning Token as instance for the basic attributes and for all other attributes calls the given delegate factory.
Token.TokenAttributeFactory(AttributeSource.AttributeFactory) - Constructor for class org.apache.lucene.analysis.Token.TokenAttributeFactory
Expert: Creates an AttributeFactory returning Token as instance for the basic attributes and for all other attributes calls the given delegate factory.
TOKEN_ATTRIBUTE_FACTORY - Static variable in class org.apache.lucene.analysis.Token
Convenience factory that returns Token as implementation for the basic attributes and return the default impl (with "Impl" appended) for all other attributes.
TOKEN_SEPARATOR - Static variable in class org.apache.lucene.analysis.shingle.ShingleFilter
The default string to use when joining adjacent tokens to form a shingle
token_source - Variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
Generated Token Manager.
token_source - Variable in class org.apache.lucene.queryParser.QueryParser
Generated Token Manager.
token_source - Variable in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
Generated Token Manager.
token_source - Variable in class org.apache.lucene.queryParser.surround.parser.QueryParser
Generated Token Manager.
TOKEN_TYPE_FULL_PREC - Static variable in class org.apache.lucene.analysis.NumericTokenStream
The full precision token gets this token type assigned.
TOKEN_TYPE_LOWER_PREC - Static variable in class org.apache.lucene.analysis.NumericTokenStream
The lower precision tokens gets this token type assigned.
TOKEN_TYPES - Static variable in class org.apache.lucene.analysis.standard.ClassicTokenizer
String token types that correspond to token type int constants
TOKEN_TYPES - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizer
String token types that correspond to token type int constants
TOKEN_TYPES - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
String token types that correspond to token type int constants
TOKEN_TYPES - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer
String token types that correspond to token type int constants
TokenFilter - Class in org.apache.lucene.analysis
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.TokenFilter
Construct a token stream filtering the given input.
TokenGroup - Class in org.apache.lucene.search.highlight
One, or several overlapping tokens, along with the score(s) and the scope of the original text
TokenGroup(TokenStream) - Constructor for class org.apache.lucene.search.highlight.TokenGroup

tokenImage - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
Literal token values.
tokenImage - Variable in exception org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException
This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred.
tokenImage - Variable in exception org.apache.lucene.queryParser.ParseException
This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred.
tokenImage - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
Literal token values.
tokenImage - Variable in exception org.apache.lucene.queryParser.standard.parser.ParseException
This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred.
tokenImage - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
Literal token values.
tokenImage - Variable in exception org.apache.lucene.queryParser.surround.parser.ParseException
This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred.
tokenImage - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
Literal token values.
TokenInfoDictionary - Class in org.apache.lucene.analysis.ja.dict
Binary dictionary implementation for a known-word dictionary model: Words are encoded into an FST mapping to a list of wordIDs.
TokenInfoFST - Class in org.apache.lucene.analysis.ja.dict
Thin wrapper around an FST with root-arc caching for Japanese.
TokenInfoFST(FST<Long>, boolean) - Constructor for class org.apache.lucene.analysis.ja.dict.TokenInfoFST

TokenizedPhraseQueryNode - Class in org.apache.lucene.queryParser.core.nodes
A TokenizedPhraseQueryNode represents a node created by a code that tokenizes/lemmatizes/analyzes.
TokenizedPhraseQueryNode() - Constructor for class org.apache.lucene.queryParser.core.nodes.TokenizedPhraseQueryNode

Tokenizer - Class in org.apache.lucene.analysis
A Tokenizer is a TokenStream whose input is a Reader.
Tokenizer() - Constructor for class org.apache.lucene.analysis.Tokenizer
Deprecated. use Tokenizer.Tokenizer(Reader) instead.
Tokenizer(Reader) - Constructor for class org.apache.lucene.analysis.Tokenizer
Construct a token stream processing the given input.
Tokenizer(AttributeSource.AttributeFactory) - Constructor for class org.apache.lucene.analysis.Tokenizer
Deprecated. use Tokenizer.Tokenizer(AttributeSource.AttributeFactory, Reader) instead.
Tokenizer(AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.Tokenizer
Construct a token stream processing the given input using the given AttributeFactory.
Tokenizer(AttributeSource) - Constructor for class org.apache.lucene.analysis.Tokenizer
Deprecated. use Tokenizer.Tokenizer(AttributeSource, Reader) instead.
Tokenizer(AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.Tokenizer
Construct a token stream processing the given input using the given AttributeSource.
TokenMgrError - Error in org.apache.lucene.benchmark.byTask.feeds.demohtml
Token Manager Error.
TokenMgrError() - Constructor for error org.apache.lucene.benchmark.byTask.feeds.demohtml.TokenMgrError
No arg constructor.
TokenMgrError(String, int) - Constructor for error org.apache.lucene.benchmark.byTask.feeds.demohtml.TokenMgrError
Constructor with message and reason.
TokenMgrError(boolean, int, int, int, String, char, int) - Constructor for error org.apache.lucene.benchmark.byTask.feeds.demohtml.TokenMgrError
Full Constructor.
TokenMgrError - Error in org.apache.lucene.queryParser.standard.parser
Token Manager Error.
TokenMgrError() - Constructor for error org.apache.lucene.queryParser.standard.parser.TokenMgrError
No arg constructor.
TokenMgrError(String, int) - Constructor for error org.apache.lucene.queryParser.standard.parser.TokenMgrError
Constructor with message and reason.
TokenMgrError(boolean, int, int, int, String, char, int) - Constructor for error org.apache.lucene.queryParser.standard.parser.TokenMgrError
Full Constructor.
TokenMgrError - Error in org.apache.lucene.queryParser.surround.parser
Token Manager Error.
TokenMgrError() - Constructor for error org.apache.lucene.queryParser.surround.parser.TokenMgrError
No arg constructor.
TokenMgrError(String, int) - Constructor for error org.apache.lucene.queryParser.surround.parser.TokenMgrError
Constructor with message and reason.
TokenMgrError(boolean, int, int, int, String, char, int) - Constructor for error org.apache.lucene.queryParser.surround.parser.TokenMgrError
Full Constructor.
TokenMgrError - Error in org.apache.lucene.queryParser
Token Manager Error.
TokenMgrError() - Constructor for error org.apache.lucene.queryParser.TokenMgrError
No arg constructor.
TokenMgrError(String, int) - Constructor for error org.apache.lucene.queryParser.TokenMgrError
Constructor with message and reason.
TokenMgrError(boolean, int, int, int, String, char, int) - Constructor for error org.apache.lucene.queryParser.TokenMgrError
Full Constructor.
TokenOffsetPayloadTokenFilter - Class in org.apache.lucene.analysis.payloads
Adds the Token.setStartOffset(int) and Token.setEndOffset(int) First 4 bytes are the start
TokenOffsetPayloadTokenFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.payloads.TokenOffsetPayloadTokenFilter

TokenRangeSinkFilter - Class in org.apache.lucene.analysis.sinks
Counts the tokens as they go by and saves to the internal list those between the range of lower and upper, exclusive of upper
TokenRangeSinkFilter(int, int) - Constructor for class org.apache.lucene.analysis.sinks.TokenRangeSinkFilter

tokens - Variable in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

TOKENS_ONLY - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer
Only output tokens
TokenSources - Class in org.apache.lucene.search.highlight
Hides implementation issues associated with obtaining a TokenStream for use with the higlighter - can obtain from TermFreqVectors with offsets and (optionally) positions or from Analyzer class reparsing the stored content.
TokenSources() - Constructor for class org.apache.lucene.search.highlight.TokenSources

tokenStream(String, Reader) - Method in class org.apache.lucene.analysis.Analyzer
Creates a TokenStream which tokenizes all the text in the provided Reader.
tokenStream(String, Reader) - Method in class org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer

tokenStream(String, Reader) - Method in class org.apache.lucene.analysis.LimitTokenCountAnalyzer

tokenStream(String, Reader) - Method in class org.apache.lucene.analysis.MockAnalyzer

tokenStream(String, Reader) - Method in class org.apache.lucene.analysis.PerFieldAnalyzerWrapper

tokenStream(String, Reader) - Method in class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer

tokenStream(String, Reader) - Method in class org.apache.lucene.analysis.ReusableAnalyzerBase
This method uses ReusableAnalyzerBase.createComponents(String, Reader) to obtain an instance of ReusableAnalyzerBase.TokenStreamComponents and returns the sink of the components.
tokenStream(String, Reader) - Method in class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper

tokenStream(String, Reader) - Method in class org.apache.lucene.analysis.snowball.SnowballAnalyzer
Deprecated. Constructs a StandardTokenizer filtered by a StandardFilter, a LowerCaseFilter, a StopFilter, and a SnowballFilter
TokenStream - Class in org.apache.lucene.analysis
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.
TokenStream() - Constructor for class org.apache.lucene.analysis.TokenStream
A TokenStream using the default attribute factory.
TokenStream(AttributeSource) - Constructor for class org.apache.lucene.analysis.TokenStream
A TokenStream that uses the same attributes as the supplied one.
TokenStream(AttributeSource.AttributeFactory) - Constructor for class org.apache.lucene.analysis.TokenStream
A TokenStream using the supplied AttributeFactory for creating new Attribute instances.
tokenStream(String, Reader) - Method in class org.apache.lucene.collation.CollationKeyAnalyzer

tokenStream(String, Reader) - Method in class org.apache.lucene.collation.ICUCollationKeyAnalyzer

tokenStream - Variable in class org.apache.lucene.document.AbstractField

tokenStream(String, Reader) - Method in class org.apache.lucene.queryParser.QueryParserTestBase.QPTestAnalyzer

TokenStreamFromTermPositionVector - Class in org.apache.lucene.search.highlight

TokenStreamFromTermPositionVector(TermPositionVector) - Constructor for class org.apache.lucene.search.highlight.TokenStreamFromTermPositionVector
Constructor.
TokenStreamToDot - Class in org.apache.lucene.analysis
Consumes a TokenStream and outputs the dot (graphviz) string (graph).
TokenStreamToDot(String, TokenStream, PrintWriter) - Constructor for class org.apache.lucene.analysis.TokenStreamToDot
If inputText is non-null, and the TokenStream has offsets, we include the surface form in each arc's label.
tokenStreamValue() - Method in class org.apache.lucene.document.Field
The TokesStream for this field to be used when indexing, or null.
tokenStreamValue() - Method in interface org.apache.lucene.document.Fieldable
The TokenStream for this field to be used when indexing, or null.
tokenStreamValue() - Method in class org.apache.lucene.document.NumericField
Returns a NumericTokenStream for indexing the numeric value.
TokenTypeSinkFilter - Class in org.apache.lucene.analysis.sinks
Adds a token to the sink if it has a specific type.
TokenTypeSinkFilter(String) - Constructor for class org.apache.lucene.analysis.sinks.TokenTypeSinkFilter

toLargeString() - Method in enum org.apache.lucene.queryParser.core.nodes.ModifierQueryNode.Modifier

toLowerCase(CharSequence) - Static method in class org.apache.lucene.queryParser.core.util.UnescapedCharSequence

TOO_MANY_BOOLEAN_CLAUSES - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

toolOutOfDate - Variable in class org.apache.lucene.index.CheckIndex.Status
True if the index was created with a newer version of Lucene than the CheckIndex tool.
TooManyBasicQueries - Exception in org.apache.lucene.queryParser.surround.query

TooManyBasicQueries(int) - Constructor for exception org.apache.lucene.queryParser.surround.query.TooManyBasicQueries

top() - Method in interface org.apache.lucene.facet.search.Heap
Get (But not remove) the top of the Heap
top() - Method in class org.apache.lucene.util.PriorityQueue
Returns the least element of the PriorityQueue in constant time.
top() - Method in class org.apache.lucene.util.ScorerDocQueue
Returns the least Scorer of the ScorerDocQueue in constant time.
ToParentBlockJoinCollector - Class in org.apache.lucene.search.join
Collects parent document hits for a Query containing one more more BlockJoinQuery clauses, sorted by the specified parent Sort.
ToParentBlockJoinCollector(Sort, int, boolean, boolean) - Constructor for class org.apache.lucene.search.join.ToParentBlockJoinCollector

ToParentBlockJoinQuery - Class in org.apache.lucene.search.join
This query requires that you index children and parent docs as a single block, using the IndexWriter.addDocuments(java.util.Collection) or IndexWriter.updateDocuments(org.apache.lucene.index.Term, java.util.Collection) API.
ToParentBlockJoinQuery(Query, Filter, ToParentBlockJoinQuery.ScoreMode) - Constructor for class org.apache.lucene.search.join.ToParentBlockJoinQuery
Create a ToParentBlockJoinQuery.
ToParentBlockJoinQuery.ScoreMode - Enum in org.apache.lucene.search.join
How to aggregate multiple child hit scores into a single parent score.
topDoc() - Method in class org.apache.lucene.util.ScorerDocQueue
Returns document number of the least Scorer of the ScorerDocQueue in constant time.
TopDocs - Class in org.apache.lucene.search
Represents hits returned by Searcher.search(Query,Filter,int) and Searcher.search(Query,int).
TopDocs(int, ScoreDoc[], float) - Constructor for class org.apache.lucene.search.TopDocs

topDocs() - Method in class org.apache.lucene.search.TopDocsCollector
Returns the top docs that were collected by this collector.
topDocs(int) - Method in class org.apache.lucene.search.TopDocsCollector
Returns the documents in the rage [start ..
topDocs(int, int) - Method in class org.apache.lucene.search.TopDocsCollector
Returns the documents in the rage [start ..
TopDocsCollector<T extends ScoreDoc> - Class in org.apache.lucene.search
A base class for all collectors that return a TopDocs output.
TopDocsCollector(PriorityQueue<T>) - Constructor for class org.apache.lucene.search.TopDocsCollector

topDocsSize() - Method in class org.apache.lucene.search.TopDocsCollector
The number of valid PQ entries
topdocsString(TopDocs, int, int) - Static method in class org.apache.lucene.search.CheckHits

TopFieldCollector - Class in org.apache.lucene.search
A Collector that sorts by SortField using FieldComparators.
TopFieldDocs - Class in org.apache.lucene.search
Represents hits returned by Searcher.search(Query,Filter,int,Sort).
TopFieldDocs(int, ScoreDoc[], SortField[], float) - Constructor for class org.apache.lucene.search.TopFieldDocs
Creates one of these objects.
TopGroups<GROUP_VALUE_TYPE> - Class in org.apache.lucene.search.grouping
Represents result returned by a grouping search.
TopGroups(SortField[], SortField[], int, int, GroupDocs<GROUP_VALUE_TYPE>[]) - Constructor for class org.apache.lucene.search.grouping.TopGroups

TopGroups(TopGroups<GROUP_VALUE_TYPE>, Integer) - Constructor for class org.apache.lucene.search.grouping.TopGroups

TopKFacetResultsHandler - Class in org.apache.lucene.facet.search
Generate Top-K results for a particular FacetRequest.
TopKFacetResultsHandler(TaxonomyReader, FacetRequest) - Constructor for class org.apache.lucene.facet.search.TopKFacetResultsHandler
Construct top-K results handler.
TopKInEachNodeHandler - Class in org.apache.lucene.facet.search
Generates FacetResult from the count arrays aggregated for a particular FacetRequest.
TopKInEachNodeHandler(TaxonomyReader, FacetRequest) - Constructor for class org.apache.lucene.facet.search.TopKInEachNodeHandler

TopKInEachNodeHandler.IntermediateFacetResultWithHash - Class in org.apache.lucene.facet.search
Intermediate result to hold counts from one or more partitions processed thus far.
TopKInEachNodeHandler.IntermediateFacetResultWithHash(FacetRequest, IntToObjectMap<TopKInEachNodeHandler.AACO>) - Constructor for class org.apache.lucene.facet.search.TopKInEachNodeHandler.IntermediateFacetResultWithHash

TopLevelQuery(String) - Method in class org.apache.lucene.queryParser.QueryParser

TopLevelQuery(CharSequence) - Method in class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser

topNextAndAdjustElsePop() - Method in class org.apache.lucene.util.ScorerDocQueue

topScore() - Method in class org.apache.lucene.util.ScorerDocQueue

TopScoreDocCollector - Class in org.apache.lucene.search
A Collector implementation that collects the top-scoring hits, returning them as a TopDocs.
topSkipToAndAdjustElsePop(int) - Method in class org.apache.lucene.util.ScorerDocQueue

TopSrndQuery() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

TopTermsRewrite<Q extends Query> - Class in org.apache.lucene.search
Base rewrite method for collecting only the top terms via a priority queue.
TopTermsRewrite(int) - Constructor for class org.apache.lucene.search.TopTermsRewrite
Create a TopTermsBooleanQueryRewrite for at most size terms.
toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.AndQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.AnyQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.BooleanQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.BoostQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.DeletedQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.GroupQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.MatchAllDocsQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.ModifierQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.NoTokenFoundQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.OrQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.ParametricQueryNode
Deprecated.
toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.PathQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.PhraseSlopQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode

toQueryString(EscapeQuerySyntax) - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode
convert to a query string understood by the query parser
toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.SlopQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.core.nodes.TokenizedPhraseQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.standard.nodes.MultiPhraseQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.standard.nodes.NumericQueryNode

toQueryString(EscapeQuerySyntax) - Method in class org.apache.lucene.queryParser.standard.nodes.WildcardQueryNode

toQueryStringIgnoreFields - Variable in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
If set to true the the method toQueryString will not write field names
toRectangle() - Method in class org.apache.lucene.spatial.geometry.shape.LLRect
Deprecated. Returns a rectangle shape for the bounding box
toString() - Method in class org.apache.lucene.analysis.CharArrayMap

toString() - Method in class org.apache.lucene.analysis.CharArraySet

toString() - Method in class org.apache.lucene.analysis.compound.hyphenation.Hyphen

toString() - Method in class org.apache.lucene.analysis.ja.Token

toString() - Method in class org.apache.lucene.analysis.LimitTokenCountAnalyzer

toString() - Method in class org.apache.lucene.analysis.NumericTokenStream

toString() - Method in class org.apache.lucene.analysis.PerFieldAnalyzerWrapper

toString() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column.Row
Deprecated.
toString() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column
Deprecated.
toString() - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix
Deprecated.
toString() - Method in class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
Returns solely the term text as specified by the CharSequence interface.
toString() - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

toString() - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token
Returns the image.
toString() - Method in class org.apache.lucene.benchmark.byTask.stats.TaskStats

toString() - Method in class org.apache.lucene.benchmark.byTask.tasks.PerfTask

toString() - Method in class org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask

toString() - Method in class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

toString() - Method in class org.apache.lucene.benchmark.byTask.utils.Algorithm

toString() - Method in class org.apache.lucene.document.AbstractField
Prints a Field for human consumption.
toString() - Method in enum org.apache.lucene.document.DateTools.Resolution
this method returns the name of the resolution in lowercase (for backwards compatibility)
toString() - Method in class org.apache.lucene.document.Document
Prints the fields of a document for human consumption.
toString() - Method in class org.apache.lucene.facet.enhancements.association.AssociationFloatProperty

toString() - Method in class org.apache.lucene.facet.enhancements.association.AssociationProperty

toString() - Method in class org.apache.lucene.facet.index.CategoryContainer

toString() - Method in class org.apache.lucene.facet.search.params.FacetRequest

toString() - Method in class org.apache.lucene.facet.search.params.FacetSearchParams

toString(String) - Method in class org.apache.lucene.facet.search.results.FacetResult
String representation of this facet result.
toString() - Method in class org.apache.lucene.facet.search.results.FacetResult

toString(String) - Method in interface org.apache.lucene.facet.search.results.FacetResultNode
String representation of this facet result node.
toString() - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode

toString(String) - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode

toString(char) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Build a string representation of the path, with its components separated by the given delimiter character.
toString() - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
This method, an implementation of the Object.toString() interface, is to allow simple printing of a CategoryPath, for debugging purposes.
toString(char, int) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
like CategoryPath.toString(char), but takes only a prefix with a given number of components, rather than the whole path.
toString(char, int, int) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
like CategoryPath.toString(char), but takes only a part of the path, rather than the whole path.
toString(int) - Method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader

toString() - Method in class org.apache.lucene.index.FilterIndexReader

toString() - Method in class org.apache.lucene.index.IndexReader

toString() - Method in class org.apache.lucene.index.IndexWriter.MaxFieldLength
Deprecated.
toString() - Method in class org.apache.lucene.index.IndexWriterConfig

toString() - Method in class org.apache.lucene.index.LogMergePolicy

toString() - Method in class org.apache.lucene.index.memory.MemoryIndex
Returns a String representation of the index data for debugging purposes.
toString() - Method in class org.apache.lucene.index.NoMergePolicy

toString() - Method in class org.apache.lucene.index.ParallelReader

toString() - Method in class org.apache.lucene.index.SegmentInfo

toString(Directory, int) - Method in class org.apache.lucene.index.SegmentInfo
Used for debugging.
toString(Directory) - Method in class org.apache.lucene.index.SegmentInfos

toString() - Method in class org.apache.lucene.index.SegmentReader

toString() - Method in class org.apache.lucene.index.SlowMultiReaderWrapper

toString() - Method in class org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint

toString() - Method in class org.apache.lucene.index.Term

toString() - Method in class org.apache.lucene.index.TermVectorEntry

toString() - Method in class org.apache.lucene.index.TieredMergePolicy

toString() - Method in class org.apache.lucene.index.UpgradeIndexMergePolicy

toString() - Method in class org.apache.lucene.messages.MessageImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.core.config.FieldConfig

toString() - Method in class org.apache.lucene.queryParser.core.nodes.AndQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.AnyQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.BooleanQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.BoostQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.DeletedQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.GroupQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.MatchAllDocsQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.MatchNoDocsQueryNode

toString() - Method in enum org.apache.lucene.queryParser.core.nodes.ModifierQueryNode.Modifier

toString() - Method in class org.apache.lucene.queryParser.core.nodes.ModifierQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.NoTokenFoundQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.OrQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.ParametricQueryNode
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.PathQueryNode.QueryText

toString() - Method in class org.apache.lucene.queryParser.core.nodes.PathQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.PhraseSlopQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode

toString() - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode
for printing
toString() - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
toString() - Method in class org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.SlopQueryNode

toString() - Method in class org.apache.lucene.queryParser.core.nodes.TokenizedPhraseQueryNode

toString() - Method in exception org.apache.lucene.queryParser.core.QueryNodeException

toString(Object) - Static method in class org.apache.lucene.queryParser.core.util.StringUtils

toString() - Method in class org.apache.lucene.queryParser.core.util.UnescapedCharSequence

toString() - Method in class org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.config.BoostAttributeImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.nodes.MultiPhraseQueryNode

toString() - Method in class org.apache.lucene.queryParser.standard.nodes.NumericQueryNode

toString() - Method in class org.apache.lucene.queryParser.standard.nodes.NumericRangeQueryNode

toString() - Method in class org.apache.lucene.queryParser.standard.nodes.PrefixWildcardQueryNode

toString() - Method in class org.apache.lucene.queryParser.standard.nodes.RangeQueryNode
Deprecated.
toString() - Method in class org.apache.lucene.queryParser.standard.nodes.WildcardQueryNode

toString() - Method in class org.apache.lucene.queryParser.standard.parser.Token
Returns the image.
toString() - Method in class org.apache.lucene.queryParser.standard.StandardQueryParser

toString() - Method in class org.apache.lucene.queryParser.surround.parser.Token
Returns the image.
toString() - Method in class org.apache.lucene.queryParser.surround.query.ComposedQuery

toString() - Method in class org.apache.lucene.queryParser.surround.query.FieldsQuery

toString() - Method in class org.apache.lucene.queryParser.surround.query.SimpleTerm

toString() - Method in class org.apache.lucene.queryParser.surround.query.SrndQuery

toString() - Method in class org.apache.lucene.queryParser.Token
Returns the image.
toString() - Method in class org.apache.lucene.search.BooleanClause

toString() - Method in class org.apache.lucene.search.BooleanFilter
Prints a user-readable version of this Filter.
toString(String) - Method in class org.apache.lucene.search.BooleanQuery
Prints a user-readable version of this query.
toString(String) - Method in class org.apache.lucene.search.BoostingQuery

toString() - Method in class org.apache.lucene.search.CachingSpanFilter

toString() - Method in class org.apache.lucene.search.CachingWrapperFilter

toString() - Method in class org.apache.lucene.search.CachingWrapperFilterHelper

toString() - Method in class org.apache.lucene.search.ChainedFilter

toString(String) - Method in class org.apache.lucene.search.ConstantScoreQuery

toString(String) - Method in class org.apache.lucene.search.DisjunctionMaxQuery
Prettyprint us.
toString() - Method in class org.apache.lucene.search.Explanation
Render an explanation as text.
toString(int) - Method in class org.apache.lucene.search.Explanation

toString() - Method in class org.apache.lucene.search.FieldCache.CacheEntry

toString() - Method in class org.apache.lucene.search.FieldCacheRangeFilter

toString() - Method in class org.apache.lucene.search.FieldDoc

toString() - Method in class org.apache.lucene.search.FieldValueFilter

toString() - Method in class org.apache.lucene.search.FieldValueHitQueue.Entry

toString() - Method in class org.apache.lucene.search.FilterClause

toString(String) - Method in class org.apache.lucene.search.FilteredQuery
Prints a user-readable version of this query.
toString(String) - Method in class org.apache.lucene.search.function.CustomScoreQuery

toString(int) - Method in class org.apache.lucene.search.function.DocValues
Return a string representation of a doc value, as required for Explanations.
toString() - Method in class org.apache.lucene.search.function.FieldScoreQuery.Type

toString() - Method in class org.apache.lucene.search.function.ValueSource

toString(String) - Method in class org.apache.lucene.search.function.ValueSourceQuery

toString(String) - Method in class org.apache.lucene.search.FuzzyLikeThisQuery

toString(String) - Method in class org.apache.lucene.search.FuzzyQuery

toString() - Method in class org.apache.lucene.search.grouping.SearchGroup

toString() - Method in class org.apache.lucene.search.highlight.TextFragment

toString() - Method in class org.apache.lucene.search.IndexSearcher

toString(String) - Method in class org.apache.lucene.search.join.ToChildBlockJoinQuery

toString(String) - Method in class org.apache.lucene.search.join.ToParentBlockJoinQuery

toString(String) - Method in class org.apache.lucene.search.MatchAllDocsQuery

toString(String) - Method in class org.apache.lucene.search.MultiPhraseQuery
Prints a user-readable version of this query.
toString() - Method in class org.apache.lucene.search.MultiTermQueryWrapperFilter

toString(String) - Method in class org.apache.lucene.search.NumericRangeQuery

toString(String) - Method in class org.apache.lucene.search.payloads.PayloadNearQuery

toString(String) - Method in class org.apache.lucene.search.PhraseQuery
Prints a user-readable version of this query.
toString() - Method in class org.apache.lucene.search.PrefixFilter
Prints a user-readable version of this query.
toString(String) - Method in class org.apache.lucene.search.PrefixQuery
Prints a user-readable version of this query.
toString(String) - Method in class org.apache.lucene.search.Query
Prints a query to a string, with field assumed to be the default field and omitted.
toString() - Method in class org.apache.lucene.search.Query
Prints a query to a string.
toString() - Method in class org.apache.lucene.search.QueryTermVector

toString() - Method in class org.apache.lucene.search.QueryWrapperFilter

toString(String) - Method in class org.apache.lucene.search.regex.RegexQuery

toString() - Method in class org.apache.lucene.search.ScoreDoc

toString(String) - Method in class org.apache.lucene.search.similar.MoreLikeThisQuery

toString() - Method in class org.apache.lucene.search.Sort

toString() - Method in class org.apache.lucene.search.SortField

toString() - Method in class org.apache.lucene.search.SpanQueryFilter

toString(String) - Method in class org.apache.lucene.search.spans.FieldMaskingSpanQuery

toString() - Method in class org.apache.lucene.search.spans.NearSpansOrdered

toString() - Method in class org.apache.lucene.search.spans.NearSpansUnordered

toString(String) - Method in class org.apache.lucene.search.spans.SpanFirstQuery

toString(String) - Method in class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper

toString(String) - Method in class org.apache.lucene.search.spans.SpanNearPayloadCheckQuery

toString(String) - Method in class org.apache.lucene.search.spans.SpanNearQuery

toString(String) - Method in class org.apache.lucene.search.spans.SpanNotQuery

toString(String) - Method in class org.apache.lucene.search.spans.SpanOrQuery

toString(String) - Method in class org.apache.lucene.search.spans.SpanPayloadCheckQuery

toString() - Method in class org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan

toString(String) - Method in class org.apache.lucene.search.spans.SpanPositionRangeQuery

toString(String) - Method in class org.apache.lucene.search.spans.SpanTermQuery

toString() - Method in class org.apache.lucene.search.spans.TermSpans

toString() - Method in class org.apache.lucene.search.suggest.fst.FSTCompletion.Completion

toString() - Method in class org.apache.lucene.search.suggest.fst.Sort.SortInfo

toString() - Method in class org.apache.lucene.search.suggest.Lookup.LookupResult

toString(String) - Method in class org.apache.lucene.search.TermQuery
Prints a user-readable version of this query.
toString(String) - Method in class org.apache.lucene.search.TermRangeQuery
Prints a user-readable version of this query.
toString() - Method in class org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo.SubInfo

toString() - Method in class org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo

toString() - Method in class org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo.Toffs

toString() - Method in class org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo

toString() - Method in class org.apache.lucene.search.vectorhighlight.FieldTermStack.TermInfo

toString(String) - Method in class org.apache.lucene.search.WildcardQuery
Prints a user-readable version of this query.
toString() - Method in class org.apache.lucene.spatial.geometry.CartesianPoint
Deprecated.
toString() - Method in class org.apache.lucene.spatial.geometry.LatLng
Deprecated.
toString() - Method in class org.apache.lucene.spatial.geometry.shape.LLRect
Deprecated.
toString() - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
toString() - Method in class org.apache.lucene.spatial.geometry.shape.Rectangle
Deprecated.
toString() - Method in class org.apache.lucene.spatial.tier.DistanceQueryBuilder
Deprecated.
toString() - Method in class org.apache.lucene.store.Directory

toString() - Method in class org.apache.lucene.store.FSDirectory
For debug output.
toString() - Method in class org.apache.lucene.store.IndexInput

toString() - Method in class org.apache.lucene.store.instantiated.InstantiatedDocument

toString() - Method in class org.apache.lucene.store.instantiated.InstantiatedTerm

toString() - Method in class org.apache.lucene.store.instantiated.InstantiatedTermFreqVector

toString() - Method in class org.apache.lucene.store.MockDirectoryWrapper

toString() - Method in class org.apache.lucene.store.MockLockFactoryWrapper

toString() - Method in class org.apache.lucene.store.NRTCachingDirectory

toString() - Method in class org.apache.lucene.util.AttributeImpl
Returns a string representation of the object.
toString() - Method in class org.apache.lucene.util.AttributeSource
Returns a string representation of the object.
toString() - Method in class org.apache.lucene.util.BytesRef
Returns hex encoded bytes, eg [0x6c 0x75 0x63 0x65 0x6e 0x65]
toString() - Method in class org.apache.lucene.util.CharsRef

toString() - Method in class org.apache.lucene.util.collections.ArrayHashMap

toString() - Method in class org.apache.lucene.util.collections.FloatToObjectMap

toString() - Method in class org.apache.lucene.util.collections.IntArray
toString or not toString.
toString() - Method in class org.apache.lucene.util.collections.IntHashSet
I have no idea why would anyone call it - but for debug purposes.
Prints the entire map, including the index, key, object, next and prev.
toString() - Method in class org.apache.lucene.util.collections.IntToDoubleMap

toString() - Method in class org.apache.lucene.util.collections.IntToIntMap

toString() - Method in class org.apache.lucene.util.collections.IntToObjectMap

toString() - Method in class org.apache.lucene.util.collections.ObjectToFloatMap

toString() - Method in class org.apache.lucene.util.collections.ObjectToIntMap

toString() - Method in class org.apache.lucene.util.encoding.DGapIntDecoder

toString() - Method in class org.apache.lucene.util.encoding.DGapIntEncoder

toString() - Method in class org.apache.lucene.util.encoding.EightFlagsIntDecoder

toString() - Method in class org.apache.lucene.util.encoding.EightFlagsIntEncoder

toString() - Method in class org.apache.lucene.util.encoding.FourFlagsIntDecoder

toString() - Method in class org.apache.lucene.util.encoding.FourFlagsIntEncoder

toString() - Method in class org.apache.lucene.util.encoding.NOnesIntDecoder

toString() - Method in class org.apache.lucene.util.encoding.NOnesIntEncoder

toString() - Method in class org.apache.lucene.util.encoding.SimpleIntDecoder

toString() - Method in class org.apache.lucene.util.encoding.SimpleIntEncoder

toString() - Method in class org.apache.lucene.util.encoding.SortingIntEncoder

toString() - Method in class org.apache.lucene.util.encoding.UniqueValuesIntEncoder

toString() - Method in class org.apache.lucene.util.encoding.VInt8IntDecoder

toString() - Method in class org.apache.lucene.util.encoding.VInt8IntEncoder

toString() - Method in class org.apache.lucene.util.FieldCacheSanityChecker.Insanity
Multi-Line representation of this Insanity object, starting with the Type and Msg, followed by each CacheEntry.toString() on it's own line prefaced by a tab character
toString() - Method in class org.apache.lucene.util.FieldCacheSanityChecker.InsanityType

toString() - Method in class org.apache.lucene.util.fst.FST.Arc

toString() - Method in class org.apache.lucene.util.fst.PairOutputs

toString() - Method in class org.apache.lucene.util.fst.PositiveIntOutputs

toString() - Method in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs.TwoLongs

toString() - Method in class org.apache.lucene.util.IntsRef

toString() - Method in class org.apache.lucene.util.Parameter
Deprecated.
toString() - Method in enum org.apache.lucene.util.RamUsageEstimator.JvmFeature

toStringEscaped() - Method in class org.apache.lucene.queryParser.core.util.UnescapedCharSequence
Return a escaped String
toStringEscaped(char[]) - Method in class org.apache.lucene.queryParser.core.util.UnescapedCharSequence
Return a escaped String
toStringUnquoted() - Method in class org.apache.lucene.queryParser.surround.query.SimpleTerm

toStringUnquoted() - Method in class org.apache.lucene.queryParser.surround.query.SrndPrefixQuery

toStringUnquoted() - Method in class org.apache.lucene.queryParser.surround.query.SrndTermQuery

toStringUnquoted() - Method in class org.apache.lucene.queryParser.surround.query.SrndTruncQuery

ToStringUtil - Class in org.apache.lucene.analysis.ja.util
Utility class for english translations of morphological data, used only for debugging.
ToStringUtil() - Constructor for class org.apache.lucene.analysis.ja.util.ToStringUtil

ToStringUtils - Class in org.apache.lucene.util
Helper methods to ease implementing Object.toString().
totalBytesSize() - Method in class org.apache.lucene.index.MergePolicy.OneMerge
Returns the total size in bytes of this merge.
totalDocCount - Variable in class org.apache.lucene.index.MergePolicy.OneMerge

totalDocCount() - Method in class org.apache.lucene.index.SegmentInfos
Returns sum of all segment's docCounts.
TotalFacetCounts - Class in org.apache.lucene.facet.search
Maintain Total Facet Counts per partition, for given parameters: Index reader of an index Taxonomy index reader Facet indexing params (and particularly the category list params) The total facet counts are maintained as an array of arrays of integers, where a separate array is kept for each partition.
TotalFacetCountsCache - Class in org.apache.lucene.facet.search
Manage an LRU cache for TotalFacetCounts per index, taxonomy, and facet indexing params.
totalGroupCount - Variable in class org.apache.lucene.search.grouping.TopGroups
The total number of unique groups.
totalGroupedHitCount - Variable in class org.apache.lucene.search.grouping.TopGroups
Number of documents grouped into the topN groups
totalHitCount - Variable in class org.apache.lucene.search.grouping.TopGroups
Number of documents matching the search
TotalHitCountCollector - Class in org.apache.lucene.search
Just counts the total number of hits.
TotalHitCountCollector() - Constructor for class org.apache.lucene.search.TotalHitCountCollector

totalHits - Variable in class org.apache.lucene.search.grouping.GroupDocs
Total hits within this group
totalHits - Variable in class org.apache.lucene.search.TopDocs
The total number of hits for the query.
totalHits - Variable in class org.apache.lucene.search.TopDocsCollector
The total number of documents that the collector encountered.
totalNumDocs() - Method in class org.apache.lucene.index.MergePolicy.OneMerge
Returns the total number of documents that are included with this merge.
totalTime - Variable in class org.apache.lucene.search.suggest.fst.Sort.SortInfo

toTermVector(boolean, boolean, boolean) - Static method in enum org.apache.lucene.document.Field.TermVector
Get the best representation of a TermVector given the flags.
totFields - Variable in class org.apache.lucene.index.CheckIndex.Status.FieldNormStatus
Number of fields successfully tested
totFields - Variable in class org.apache.lucene.index.CheckIndex.Status.StoredFieldStatus
Total number of stored fields tested.
totFreq - Variable in class org.apache.lucene.index.CheckIndex.Status.TermIndexStatus
Total frequency across all terms.
totLoseDocCount - Variable in class org.apache.lucene.index.CheckIndex.Status
How many documents will be lost to bad segments.
TOTMEM - Static variable in class org.apache.lucene.benchmark.byTask.tasks.ReportTask

totPos - Variable in class org.apache.lucene.index.CheckIndex.Status.TermIndexStatus
Total number of positions.
totVectors - Variable in class org.apache.lucene.index.CheckIndex.Status.TermVectorStatus
Total number of term vectors tested.
touchFile(String) - Method in class org.apache.lucene.store.Directory
Deprecated. Lucene never uses this API; it will be removed in 4.0.
touchFile(String) - Method in class org.apache.lucene.store.FileSwitchDirectory
Deprecated.
touchFile(String) - Method in class org.apache.lucene.store.FSDirectory
Deprecated. Lucene never uses this API; it will be removed in 4.0.
touchFile(String) - Method in class org.apache.lucene.store.MockDirectoryWrapper
Deprecated.
touchFile(String) - Method in class org.apache.lucene.store.NRTCachingDirectory
Deprecated.
touchFile(String) - Method in class org.apache.lucene.store.RAMDirectory
Deprecated. Lucene never uses this API; it will be removed in 4.0.
toUTF32(CharSequence, IntsRef) - Static method in class org.apache.lucene.util.fst.Util
Decodes the Unicode codepoints from the provided CharSequence and places them in the provided scratch IntsRef, which must not be null, returning it.
toUTF32(char[], int, int, IntsRef) - Static method in class org.apache.lucene.util.fst.Util
Decodes the Unicode codepoints from the provided char[] and places them in the provided scratch IntsRef, which must not be null, returning it.
transformCriteria(Properties, InputStream, Result) - Static method in class org.apache.lucene.xmlparser.QueryTemplateManager
Slower transformation using an uncompiled stylesheet (suitable for development environment)
transformCriteria(Properties, Templates, Result) - Static method in class org.apache.lucene.xmlparser.QueryTemplateManager
Fast transformation using a pre-compiled stylesheet (suitable for production environments)
transformCriteria(Properties, Transformer, Result) - Static method in class org.apache.lucene.xmlparser.QueryTemplateManager

translate(int, int) - Method in class org.apache.lucene.spatial.geometry.CartesianPoint
Deprecated. Return a new point translated in the x and y dimensions
translate(Vector2D) - Method in class org.apache.lucene.spatial.geometry.shape.Ellipse
Deprecated.
translate(Vector2D) - Method in interface org.apache.lucene.spatial.geometry.shape.Geometry2D
Deprecated. Translate according to the vector
translate(Vector2D) - Method in class org.apache.lucene.spatial.geometry.shape.Rectangle
Deprecated.
traversalSize() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask
Specify the number of hits to traverse.
traversalSize - Variable in class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask

traversalSize() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask

Trec1MQReader - Class in org.apache.lucene.benchmark.quality.trec
Read topics of TREC 1MQ track.
Trec1MQReader(String) - Constructor for class org.apache.lucene.benchmark.quality.trec.Trec1MQReader
Constructor for Trec's 1MQ TopicsReader
TrecContentSource - Class in org.apache.lucene.benchmark.byTask.feeds
Implements a ContentSource over the TREC collection.
TrecContentSource() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.TrecContentSource

TrecDocParser - Class in org.apache.lucene.benchmark.byTask.feeds
Parser for trec doc content, invoked on doc text excluding and which are handled in TrecContentSource.
TrecDocParser() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser

TrecDocParser.ParsePathType - Enum in org.apache.lucene.benchmark.byTask.feeds
Types of trec parse paths,
TrecFBISParser - Class in org.apache.lucene.benchmark.byTask.feeds
Parser for the FBIS docs in trec disks 4+5 collection format
TrecFBISParser() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.TrecFBISParser

TrecFR94Parser - Class in org.apache.lucene.benchmark.byTask.feeds
Parser for the FR94 docs in trec disks 4+5 collection format
TrecFR94Parser() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.TrecFR94Parser

TrecFTParser - Class in org.apache.lucene.benchmark.byTask.feeds
Parser for the FT docs in trec disks 4+5 collection format
TrecFTParser() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.TrecFTParser

TrecGov2Parser - Class in org.apache.lucene.benchmark.byTask.feeds
Parser for the GOV2 collection format
TrecGov2Parser() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.TrecGov2Parser

TrecJudge - Class in org.apache.lucene.benchmark.quality.trec
Judge if given document is relevant to given quality query, based on Trec format for judgements.
TrecJudge(BufferedReader) - Constructor for class org.apache.lucene.benchmark.quality.trec.TrecJudge
Constructor from a reader.
TrecLATimesParser - Class in org.apache.lucene.benchmark.byTask.feeds
Parser for the FT docs in trec disks 4+5 collection format
TrecLATimesParser() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.TrecLATimesParser

TrecParserByPath - Class in org.apache.lucene.benchmark.byTask.feeds
Parser for trec docs which selects the parser to apply according to the source files path, defaulting to TrecGov2Parser.
TrecParserByPath() - Constructor for class org.apache.lucene.benchmark.byTask.feeds.TrecParserByPath

TrecTopicsReader - Class in org.apache.lucene.benchmark.quality.trec
Read TREC topics.
TrecTopicsReader() - Constructor for class org.apache.lucene.benchmark.quality.trec.TrecTopicsReader
Constructor for Trec's TopicsReader
Trie - Class in org.egothor.stemmer
A Trie is used to store a dictionary of words and their stems.
Trie(DataInput) - Constructor for class org.egothor.stemmer.Trie
Constructor for the Trie object.
Trie(boolean) - Constructor for class org.egothor.stemmer.Trie
Constructor for the Trie object.
Trie(boolean, int, List<CharSequence>, List<Row>) - Constructor for class org.egothor.stemmer.Trie
Constructor for the Trie object.
trim(int) - Method in class org.apache.lucene.facet.taxonomy.CategoryPath
Trim the last components from the path.
trimResult(FacetResult) - Method in class org.apache.lucene.facet.search.sampling.Sampler
Trim the input facet result.
Note: It is only valid to call this method with result obtained for a facet request created through Sampler.overSampledSearchParams(FacetSearchParams).
trimSubResults(int) - Method in class org.apache.lucene.facet.search.results.MutableFacetResultNode
Trim sub results to a given size.
trimToSize() - Method in class org.apache.lucene.analysis.compound.hyphenation.ByteVector

trimToSize() - Method in class org.apache.lucene.analysis.compound.hyphenation.CharVector

trimToSize() - Method in class org.apache.lucene.analysis.compound.hyphenation.TernaryTree
Each node stores a character (splitchar) which is part of some key(s).
trimTrailingZeros() - Method in class org.apache.lucene.util.OpenBitSet
Lowers numWords, the number of words in use, by checking for trailing zero words.
truncatedToPrefixAndPattern() - Method in class org.apache.lucene.queryParser.surround.query.SrndTruncQuery

TRUNCQUOTED - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
TRUNCTERM - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
tryIncRef() - Method in class org.apache.lucene.index.IndexReader
Expert: increments the refCount of this IndexReader instance only if the IndexReader has not been closed yet and returns true iff the refCount was successfully incremented, otherwise false.
tryIncRef(IndexSearcher) - Method in class org.apache.lucene.search.NRTManager

tryIncRef(G) - Method in class org.apache.lucene.search.ReferenceManager
Try to increment reference counting on the given reference.
tryIncRef(IndexSearcher) - Method in class org.apache.lucene.search.SearcherManager

tryLock() - Method in class org.apache.lucene.util.DummyConcurrentLock

tryLock(long, TimeUnit) - Method in class org.apache.lucene.util.DummyConcurrentLock

TSTAutocomplete - Class in org.apache.lucene.search.suggest.tst

TSTAutocomplete() - Constructor for class org.apache.lucene.search.suggest.tst.TSTAutocomplete

TSTLookup - Class in org.apache.lucene.search.suggest.tst

TSTLookup() - Constructor for class org.apache.lucene.search.suggest.tst.TSTLookup

TurkishAnalyzer - Class in org.apache.lucene.analysis.tr
Analyzer for Turkish.
TurkishAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.tr.TurkishAnalyzer
Builds an analyzer with the default stop words: TurkishAnalyzer.DEFAULT_STOPWORD_FILE.
TurkishAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.tr.TurkishAnalyzer
Builds an analyzer with the given stop words.
TurkishAnalyzer(Version, Set<?>, Set<?>) - Constructor for class org.apache.lucene.analysis.tr.TurkishAnalyzer
Builds an analyzer with the given stop words.
TurkishLowerCaseFilter - Class in org.apache.lucene.analysis.tr
Normalizes Turkish token text to lower case.
TurkishLowerCaseFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.tr.TurkishLowerCaseFilter
Create a new TurkishLowerCaseFilter, that normalizes Turkish token text to lower case.
TurkishStemmer - Class in org.tartarus.snowball.ext
Generated class implementing code defined by a snowball script.
TurkishStemmer() - Constructor for class org.tartarus.snowball.ext.TurkishStemmer

TwoPhaseCommit - Interface in org.apache.lucene.util
An interface for implementations that support 2-phase commit.
TwoPhaseCommitTool - Class in org.apache.lucene.util
A utility for executing 2-phase commit on several objects.
TwoPhaseCommitTool() - Constructor for class org.apache.lucene.util.TwoPhaseCommitTool

TwoPhaseCommitTool.CommitFailException - Exception in org.apache.lucene.util
Thrown by TwoPhaseCommitTool.execute(TwoPhaseCommit...) when an object fails to commit().
TwoPhaseCommitTool.CommitFailException(Throwable, TwoPhaseCommit) - Constructor for exception org.apache.lucene.util.TwoPhaseCommitTool.CommitFailException

TwoPhaseCommitTool.PrepareCommitFailException - Exception in org.apache.lucene.util
Thrown by TwoPhaseCommitTool.execute(TwoPhaseCommit...) when an object fails to prepareCommit().
TwoPhaseCommitTool.PrepareCommitFailException(Throwable, TwoPhaseCommit) - Constructor for exception org.apache.lucene.util.TwoPhaseCommitTool.PrepareCommitFailException

TwoPhaseCommitTool.TwoPhaseCommitWrapper - Class in org.apache.lucene.util
A wrapper of a TwoPhaseCommit, which delegates all calls to the wrapped object, passing the specified commitData.
TwoPhaseCommitTool.TwoPhaseCommitWrapper(TwoPhaseCommit, Map<String, String>) - Constructor for class org.apache.lucene.util.TwoPhaseCommitTool.TwoPhaseCommitWrapper

txt - Variable in class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase.CompoundToken

type() - Method in class org.apache.lucene.analysis.Token
Returns this Token's lexical type.
type() - Method in interface org.apache.lucene.analysis.tokenattributes.TypeAttribute
Returns this Token's lexical type.
type() - Method in class org.apache.lucene.analysis.tokenattributes.TypeAttributeImpl
Returns this Token's lexical type.
TYPE_SYNONYM - Static variable in class org.apache.lucene.analysis.synonym.SynonymFilter

TypeAsPayloadTokenFilter - Class in org.apache.lucene.analysis.payloads
Makes the Token.type() a payload.
TypeAsPayloadTokenFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.payloads.TypeAsPayloadTokenFilter

TypeAttribute - Interface in org.apache.lucene.analysis.tokenattributes
A Token's lexical type.
TypeAttributeImpl - Class in org.apache.lucene.analysis.tokenattributes
A Token's lexical type.
TypeAttributeImpl() - Constructor for class org.apache.lucene.analysis.tokenattributes.TypeAttributeImpl

TypeAttributeImpl(String) - Constructor for class org.apache.lucene.analysis.tokenattributes.TypeAttributeImpl

TypeTokenFilter - Class in org.apache.lucene.analysis
Removes tokens whose types appear in a set of blocked types from a token stream.
TypeTokenFilter(boolean, TokenStream, Set<String>, boolean) - Constructor for class org.apache.lucene.analysis.TypeTokenFilter

TypeTokenFilter(boolean, TokenStream, Set<String>) - Constructor for class org.apache.lucene.analysis.TypeTokenFilter

U

UAX29URLEmailAnalyzer - Class in org.apache.lucene.analysis.standard
Filters UAX29URLEmailTokenizer with StandardFilter, LowerCaseFilter and StopFilter, using a list of English stop words.
UAX29URLEmailAnalyzer(Version, Set<?>) - Constructor for class org.apache.lucene.analysis.standard.UAX29URLEmailAnalyzer
Builds an analyzer with the given stop words.
UAX29URLEmailAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.standard.UAX29URLEmailAnalyzer
Builds an analyzer with the default stop words (UAX29URLEmailAnalyzer.STOP_WORDS_SET).
UAX29URLEmailAnalyzer(Version, Reader) - Constructor for class org.apache.lucene.analysis.standard.UAX29URLEmailAnalyzer
Builds an analyzer with the stop words from the given reader.
UAX29URLEmailTokenizer - Class in org.apache.lucene.analysis.standard
This class implements Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29 URLs and email addresses are also tokenized according to the relevant RFCs.
UAX29URLEmailTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Deprecated. use UAX29URLEmailTokenizer.UAX29URLEmailTokenizer(Version, Reader) instead.
UAX29URLEmailTokenizer(InputStream) - Constructor for class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Deprecated. use UAX29URLEmailTokenizer.UAX29URLEmailTokenizer(Version, Reader) instead.
UAX29URLEmailTokenizer(AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Deprecated. use UAX29URLEmailTokenizer.UAX29URLEmailTokenizer(Version, AttributeSource, Reader) instead.
UAX29URLEmailTokenizer(AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Deprecated. use UAX29URLEmailTokenizer.UAX29URLEmailTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead.
UAX29URLEmailTokenizer(Version, Reader) - Constructor for class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Creates a new instance of the UAX29URLEmailTokenizer.
UAX29URLEmailTokenizer(Version, AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Creates a new UAX29URLEmailTokenizer with a given AttributeSource.
UAX29URLEmailTokenizer(Version, AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Creates a new UAX29URLEmailTokenizer with a given AttributeSource.AttributeFactory
UAX29URLEmailTokenizerImpl - Class in org.apache.lucene.analysis.standard
This class implements Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29 URLs and email addresses are also tokenized according to the relevant RFCs.
UAX29URLEmailTokenizerImpl(Reader) - Constructor for class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
Creates a new scanner There is also a java.io.InputStream version of this constructor.
UAX29URLEmailTokenizerImpl(InputStream) - Constructor for class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
Creates a new scanner.
UAX29URLEmailTokenizerImpl31 - Class in org.apache.lucene.analysis.standard.std31
Deprecated. This class is only for exact backwards compatibility
UAX29URLEmailTokenizerImpl31(Reader) - Constructor for class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. Creates a new scanner There is also a java.io.InputStream version of this constructor.
UAX29URLEmailTokenizerImpl31(InputStream) - Constructor for class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. Creates a new scanner.
UAX29URLEmailTokenizerImpl34 - Class in org.apache.lucene.analysis.standard.std34
Deprecated. This class is only for exact backwards compatibility
UAX29URLEmailTokenizerImpl34(Reader) - Constructor for class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. Creates a new scanner There is also a java.io.InputStream version of this constructor.
UAX29URLEmailTokenizerImpl34(InputStream) - Constructor for class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. Creates a new scanner.
UncaughtExceptionsRule - Class in org.apache.lucene.util
Subscribes to Thread.setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler) and causes test/ suite failures if uncaught exceptions are detected.
UncaughtExceptionsRule(LuceneTestCase) - Constructor for class org.apache.lucene.util.UncaughtExceptionsRule

UncaughtExceptionsRule.UncaughtExceptionEntry - Class in org.apache.lucene.util

UncaughtExceptionsRule.UncaughtExceptionEntry(Thread, Throwable) - Constructor for class org.apache.lucene.util.UncaughtExceptionsRule.UncaughtExceptionEntry

undeleteAll() - Method in class org.apache.lucene.index.IndexReader
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
UnescapedCharSequence - Class in org.apache.lucene.queryParser.core.util
CharsSequence with escaped chars information.
UnescapedCharSequence(char[], boolean[], int, int) - Constructor for class org.apache.lucene.queryParser.core.util.UnescapedCharSequence
Create a escaped CharSequence
UnescapedCharSequence(CharSequence) - Constructor for class org.apache.lucene.queryParser.core.util.UnescapedCharSequence
Create a non-escaped CharSequence
UNI_REPLACEMENT_CHAR - Static variable in class org.apache.lucene.util.UnicodeUtil

UNI_SUR_HIGH_END - Static variable in class org.apache.lucene.util.UnicodeUtil

UNI_SUR_HIGH_START - Static variable in class org.apache.lucene.util.UnicodeUtil

UNI_SUR_LOW_END - Static variable in class org.apache.lucene.util.UnicodeUtil

UNI_SUR_LOW_START - Static variable in class org.apache.lucene.util.UnicodeUtil

UnicodeUtil - Class in org.apache.lucene.util
Class to encode java's UTF16 char[] into UTF8 byte[] without always allocating a new byte[] as String.getBytes("UTF-8") does.
UnicodeUtil.UTF16Result - Class in org.apache.lucene.util
Holds decoded UTF16 code units.
UnicodeUtil.UTF16Result() - Constructor for class org.apache.lucene.util.UnicodeUtil.UTF16Result

UnicodeUtil.UTF8Result - Class in org.apache.lucene.util
Holds decoded UTF8 code units.
UnicodeUtil.UTF8Result() - Constructor for class org.apache.lucene.util.UnicodeUtil.UTF8Result

uniformCmd(boolean) - Method in class org.egothor.stemmer.Row
Return the number of identical Cells (containing patch commands) in this Row.
union(OpenBitSet) - Method in class org.apache.lucene.util.OpenBitSet
this = this OR other
unionCount(OpenBitSet, OpenBitSet) - Static method in class org.apache.lucene.util.OpenBitSet
Returns the popcount or cardinality of the union of the two sets.
uniqueStems(char[], int) - Method in class org.apache.lucene.analysis.hunspell.HunspellStemmer
Find the unique stem(s) of the provided word
UniqueValuesIntEncoder - Class in org.apache.lucene.util.encoding
An IntEncoderFilter which ensures only unique values are encoded.
UniqueValuesIntEncoder(IntEncoder) - Constructor for class org.apache.lucene.util.encoding.UniqueValuesIntEncoder
Constructs a new instance with the given encoder.
UnknownDictionary - Class in org.apache.lucene.analysis.ja.dict
Dictionary for unknown-word handling.
UNLIMITED - Static variable in class org.apache.lucene.index.IndexWriter.MaxFieldLength
Deprecated. Sets the maximum field length to Integer.MAX_VALUE.
unlock(Directory) - Static method in class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
Forcibly unlocks the taxonomy in the named directory.
unlock(Directory) - Static method in class org.apache.lucene.index.IndexWriter
Forcibly unlocks the index in the named directory.
unlock() - Method in class org.apache.lucene.util.DummyConcurrentLock

UNMAP_SUPPORTED - Static variable in class org.apache.lucene.store.MMapDirectory
true, if this platform supports unmapping mmapped files.
unmodifiableMap(CharArrayMap<V>) - Static method in class org.apache.lucene.analysis.CharArrayMap
Returns an unmodifiable CharArrayMap.
unmodifiableSet(CharArraySet) - Static method in class org.apache.lucene.analysis.CharArraySet
Returns an unmodifiable CharArraySet.
unpackValues(int) - Method in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree

UnsafeByteArrayInputStream - Class in org.apache.lucene.util
This class, much like ByteArrayInputStream uses a given buffer as a source of an InputStream.
UnsafeByteArrayInputStream() - Constructor for class org.apache.lucene.util.UnsafeByteArrayInputStream
Creates a new instance by not using any byte[] up front.
UnsafeByteArrayInputStream(byte[]) - Constructor for class org.apache.lucene.util.UnsafeByteArrayInputStream
Creates an UnsafeByteArrayInputStream which uses a given byte array as the source of the stream.
UnsafeByteArrayInputStream(byte[], int, int) - Constructor for class org.apache.lucene.util.UnsafeByteArrayInputStream
Creates an UnsafeByteArrayInputStream which uses a given byte array as the source of the stream, at the specific range: [startPos, endPos)
UnsafeByteArrayOutputStream - Class in org.apache.lucene.util
This class is used as a wrapper to a byte array, extending OutputStream.
UnsafeByteArrayOutputStream() - Constructor for class org.apache.lucene.util.UnsafeByteArrayOutputStream
Constructs a new output stream, with a default allocated buffer which can later be obtained via UnsafeByteArrayOutputStream.toByteArray().
UnsafeByteArrayOutputStream(byte[]) - Constructor for class org.apache.lucene.util.UnsafeByteArrayOutputStream
Constructs a new output stream, with a given buffer.
UnsafeByteArrayOutputStream(byte[], int) - Constructor for class org.apache.lucene.util.UnsafeByteArrayOutputStream
Constructs a new output stream, with a given buffer.
unsafeWrite(char) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

unsafeWrite(int) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

unsafeWrite(char[], int, int) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

unset(ConfigurationKey<T>) - Method in class org.apache.lucene.queryParser.core.config.AbstractQueryConfig
Unsets the given key and its value.
unsetTag(String) - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode
Unset a tag.
unsetTag(CharSequence) - Method in interface org.apache.lucene.queryParser.core.nodes.QueryNode
Deprecated. use QueryNode.unsetTag(String) instead
unsetTag(String) - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

unsetTag(CharSequence) - Method in class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
Deprecated. use QueryNodeImpl.unsetTag(String)
UnsortedTermFreqIteratorWrapper - Class in org.apache.lucene.search.suggest
This wrapper buffers the incoming elements and makes sure they are in random order.
UnsortedTermFreqIteratorWrapper(TermFreqIterator) - Constructor for class org.apache.lucene.search.suggest.UnsortedTermFreqIteratorWrapper

UNSUPPORTED_NUMERIC_DATA_TYPE - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

UNTOKENIZED_ONLY - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer
Only output untokenized tokens, which are tokens that would normally be split into several tokens
UNTOKENIZED_TOKEN_FLAG - Static variable in class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer
This flag is used to indicate that the produced "Token" would, if WikipediaTokenizer.TOKENS_ONLY was used, produce multiple tokens.
unzip(File, File) - Static method in class org.apache.lucene.util._TestUtil
Convenience method: Unzip zipName + ".zip" under destDir, removing destDir first
updateDocHead(int) - Method in class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.GroupHead
Updates the current most relevant document with the specified document.
UpdateDocTask - Class in org.apache.lucene.benchmark.byTask.tasks
Update a document, using IndexWriter.updateDocument, optionally with of a certain size.
UpdateDocTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.UpdateDocTask

updateDocument(Term, Document) - Method in class org.apache.lucene.index.IndexWriter
Updates a document by first deleting the document(s) containing term and then adding the new document.
updateDocument(Term, Document, Analyzer) - Method in class org.apache.lucene.index.IndexWriter
Updates a document by first deleting the document(s) containing term and then adding the new document.
updateDocument(Term, Document) - Method in class org.apache.lucene.index.RandomIndexWriter
Updates a document.
updateDocument(Term, Document) - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

updateDocument(Term, Document, Analyzer) - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

updateDocument(Term, Document) - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

updateDocument(Term, Document) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
updateDocument(Term, Document, Analyzer) - Method in class org.apache.lucene.store.instantiated.InstantiatedIndexWriter
Deprecated.
updateDocuments(Term, Collection<Document>) - Method in class org.apache.lucene.index.IndexWriter
Atomically deletes documents matching the provided delTerm and adds a block of documents with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
updateDocuments(Term, Collection<Document>, Analyzer) - Method in class org.apache.lucene.index.IndexWriter
Atomically deletes documents matching the provided delTerm and adds a block of documents, analyzed using the provided analyzer, with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
updateDocuments(Term, Collection<Document>) - Method in class org.apache.lucene.index.RandomIndexWriter

updateDocuments(Term, Collection<Document>) - Method in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

updateDocuments(Term, Collection<Document>, Analyzer) - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

updateDocuments(Term, Collection<Document>) - Method in class org.apache.lucene.search.NRTManager.TrackingIndexWriter

updateInputToken(Token, Token) - Method in class org.apache.lucene.analysis.miscellaneous.PrefixAndSuffixAwareTokenFilter

UpdateLineColumn(char) - Method in class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

UpdateLineColumn(char) - Method in class org.apache.lucene.queryParser.standard.parser.JavaCharStream

updateMergeThreads() - Method in class org.apache.lucene.index.ConcurrentMergeScheduler
Called whenever the running merges have changed, to pause & unpause threads.
updateSuffixToken(Token, Token) - Method in class org.apache.lucene.analysis.miscellaneous.PrefixAndSuffixAwareTokenFilter

updateSuffixToken(Token, Token) - Method in class org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter
The default implementation adds last prefix token end offset to the suffix token start and end offsets.
updateToken(Token, List<Token>, int, List<ShingleMatrixFilter.Matrix.Column.Row>, List<Token>) - Method in class org.apache.lucene.analysis.shingle.ShingleMatrixFilter
Deprecated. Final touch of a shingle token before it is passed on to the consumer from method ShingleMatrixFilter.incrementToken().
updateTop() - Method in class org.apache.lucene.util.PriorityQueue
Should be called when the Object at top changes values.
upgrade() - Method in class org.apache.lucene.index.IndexUpgrader

UpgradeIndexMergePolicy - Class in org.apache.lucene.index
This MergePolicy is used for upgrading all existing segments of an index when calling IndexWriter.forceMerge(int).
UpgradeIndexMergePolicy(MergePolicy) - Constructor for class org.apache.lucene.index.UpgradeIndexMergePolicy
Wrap the given MergePolicy and intercept forceMerge requests to only upgrade segments written with previous Lucene versions.
upto - Variable in class org.apache.lucene.search.CachingCollector

UpToTwoPositiveIntOutputs - Class in org.apache.lucene.util.fst
An FST Outputs implementation where each output is one or two non-negative long values.
UpToTwoPositiveIntOutputs.TwoLongs - Class in org.apache.lucene.util.fst
Holds two long outputs.
UpToTwoPositiveIntOutputs.TwoLongs(long, long) - Constructor for class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs.TwoLongs

URL - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

URL_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated.
URL_TYPE - Static variable in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated.
URL_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Deprecated. use UAX29URLEmailTokenizer.TOKEN_TYPES instead
URL_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl

useCompoundFile - Variable in class org.apache.lucene.index.LogMergePolicy

useCompoundFile(SegmentInfos, SegmentInfo) - Method in class org.apache.lucene.index.LogMergePolicy

useCompoundFile(SegmentInfos, SegmentInfo) - Method in class org.apache.lucene.index.MergePolicy
Returns true if a new segment (regardless of its origin) should use the compound file format.
useCompoundFile(SegmentInfos, SegmentInfo) - Method in class org.apache.lucene.index.MockRandomMergePolicy

useCompoundFile(SegmentInfos, SegmentInfo) - Method in class org.apache.lucene.index.NoMergePolicy

useCompoundFile(SegmentInfos, SegmentInfo) - Method in class org.apache.lucene.index.TieredMergePolicy

useCompoundFile(SegmentInfos, SegmentInfo) - Method in class org.apache.lucene.index.UpgradeIndexMergePolicy

USEDMEM - Static variable in class org.apache.lucene.benchmark.byTask.tasks.ReportTask

USER_DATA - Static variable in class org.apache.lucene.benchmark.byTask.tasks.OpenReaderTask

userData - Variable in class org.apache.lucene.index.CheckIndex.Status
Holds the userData of the last commit in the index
UserDictionary - Class in org.apache.lucene.analysis.ja.dict
Class for building a User Dictionary.
UserDictionary(Reader) - Constructor for class org.apache.lucene.analysis.ja.dict.UserDictionary

UserInputQueryBuilder - Class in org.apache.lucene.xmlparser.builders
UserInputQueryBuilder uses 1 of 2 strategies for thread-safe parsing: 1) Synchronizing access to "parse" calls on a previously supplied QueryParser or..
UserInputQueryBuilder(QueryParser) - Constructor for class org.apache.lucene.xmlparser.builders.UserInputQueryBuilder
This constructor has the disadvantage of not being able to change choice of default field name
UserInputQueryBuilder(String, Analyzer) - Constructor for class org.apache.lucene.xmlparser.builders.UserInputQueryBuilder

usually(Random) - Static method in class org.apache.lucene.util.LuceneTestCase

usually() - Static method in class org.apache.lucene.util.LuceneTestCase

UTF16toUTF8(char[], int, UnicodeUtil.UTF8Result) - Static method in class org.apache.lucene.util.UnicodeUtil
Encode characters from a char[] source, starting at offset and stopping when the character 0xffff is seen.
UTF16toUTF8(char[], int, int, UnicodeUtil.UTF8Result) - Static method in class org.apache.lucene.util.UnicodeUtil
Encode characters from a char[] source, starting at offset for length chars.
UTF16toUTF8(String, int, int, UnicodeUtil.UTF8Result) - Static method in class org.apache.lucene.util.UnicodeUtil
Encode characters from this String, starting at offset for length characters.
UTF16toUTF8(CharSequence, int, int, BytesRef) - Static method in class org.apache.lucene.util.UnicodeUtil
Encode characters from this String, starting at offset for length characters.
UTF16toUTF8(char[], int, int, BytesRef) - Static method in class org.apache.lucene.util.UnicodeUtil
Encode characters from a char[] source, starting at offset for length chars.
UTF16toUTF8WithHash(char[], int, int, BytesRef) - Static method in class org.apache.lucene.util.UnicodeUtil
Encode characters from a char[] source, starting at offset for length chars.
utf8 - Variable in class org.apache.lucene.search.suggest.fst.FSTCompletion.Completion

utf8ToString() - Method in class org.apache.lucene.util.BytesRef
Interprets stored bytes as UTF8 bytes, returning the resulting string
UTF8toUTF16(byte[], int, int, UnicodeUtil.UTF16Result) - Static method in class org.apache.lucene.util.UnicodeUtil
Convert UTF8 bytes into UTF16 characters.
UTF8toUTF16(byte[], int, int, CharsRef) - Static method in class org.apache.lucene.util.UnicodeUtil
Interprets the given byte array as UTF-8 and converts to UTF-16.
UTF8toUTF16(BytesRef, CharsRef) - Static method in class org.apache.lucene.util.UnicodeUtil
Utility method for UnicodeUtil.UTF8toUTF16(byte[], int, int, CharsRef)
UTF_8 - Static variable in class org.apache.lucene.util.IOUtils
UTF-8 charset string
Util - Class in org.apache.lucene.util.fst
Static helper methods.
Util.MinResult<T> - Class in org.apache.lucene.util.fst
Holds a single input (IntsRef) + output, returned by Util.shortestPaths(org.apache.lucene.util.fst.FST, org.apache.lucene.util.fst.FST.Arc, java.util.Comparator, int).
Util.MinResult(IntsRef, T, Comparator<T>) - Constructor for class org.apache.lucene.util.fst.Util.MinResult

Utility - Class in org.apache.lucene.analysis.cn.smart
SmartChineseAnalyzer utility constants and methods
Utility() - Constructor for class org.apache.lucene.analysis.cn.smart.Utility

V

validate() - Method in class org.apache.lucene.facet.search.sampling.SamplingParams
Check validity of sampling settings, making sure that minSampleSize <= maxSampleSize <= samplingThreshold 0 < samplingRatio <= 1
validateData(QualityQuery[], PrintWriter) - Method in interface org.apache.lucene.benchmark.quality.Judge
Validate that queries and this Judge match each other.
validateData(QualityQuery[], PrintWriter) - Method in class org.apache.lucene.benchmark.quality.trec.TrecJudge

ValidatingTokenFilter - Class in org.apache.lucene.analysis
A TokenFilter that checks consistency of the tokens (eg offsets are consistent with one another).
ValidatingTokenFilter(TokenStream, String, boolean) - Constructor for class org.apache.lucene.analysis.ValidatingTokenFilter
The name arg is used to identify this stage when throwing exceptions (useful if you have more than one instance in your chain).
validCounter - Variable in class org.apache.lucene.index.CheckIndex.Status
Whether the SegmentInfos.counter is greater than any of the segments' names.
validUTF16String(CharSequence) - Static method in class org.apache.lucene.util.UnicodeUtil

value(int) - Method in class org.apache.lucene.search.FieldComparator.ByteComparator

value(int) - Method in class org.apache.lucene.search.FieldComparator.DocComparator

value(int) - Method in class org.apache.lucene.search.FieldComparator.DoubleComparator

value(int) - Method in class org.apache.lucene.search.FieldComparator.FloatComparator

value(int) - Method in class org.apache.lucene.search.FieldComparator.IntComparator

value(int) - Method in class org.apache.lucene.search.FieldComparator.LongComparator

value(int) - Method in class org.apache.lucene.search.FieldComparator.RelevanceComparator

value(int) - Method in class org.apache.lucene.search.FieldComparator.ShortComparator

value(int) - Method in class org.apache.lucene.search.FieldComparator.StringComparatorLocale

value(int) - Method in class org.apache.lucene.search.FieldComparator.StringOrdValComparator

value(int) - Method in class org.apache.lucene.search.FieldComparator.StringValComparator

value(int) - Method in class org.apache.lucene.search.FieldComparator
Return the actual value in the slot.
value - Variable in class org.apache.lucene.search.spans.SpanScorer

value - Variable in class org.apache.lucene.search.spans.SpanWeight

value - Variable in class org.apache.lucene.search.suggest.Lookup.LookupResult

valueCount - Variable in class org.apache.lucene.util.packed.PackedInts.ReaderImpl

valueCount - Variable in class org.apache.lucene.util.packed.PackedInts.Writer

valueIterator() - Method in class org.apache.lucene.util.WeakIdentityMap
Returns an iterator over all values of this map.
VALUEMISMATCH - Static variable in class org.apache.lucene.util.FieldCacheSanityChecker.InsanityType
Indicates entries have the same reader+fieldname but different cached values.
valueOf(String) - Static method in enum org.apache.lucene.analysis.ja.JapaneseTokenizer.Mode
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter.Side
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.analysis.ngram.EdgeNGramTokenizer.Side
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.benchmark.byTask.feeds.TrecDocParser.ParsePathType
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask.Implementation
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.benchmark.byTask.utils.StreamUtils.Type
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.document.DateTools.Resolution
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.document.Field.Index
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.document.Field.Store
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.document.Field.TermVector
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.document.FieldSelectorResult
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.document.NumericField.DataType
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.facet.search.params.FacetRequest.ResultMode
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.facet.search.params.FacetRequest.SortBy
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.facet.search.params.FacetRequest.SortOrder
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache.LRUType
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.index.FieldInfo.IndexOptions
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.index.IndexWriterConfig.OpenMode
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.queryParser.core.nodes.ModifierQueryNode.Modifier
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.queryParser.core.nodes.ParametricQueryNode.CompareOperator
Deprecated. Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.queryParser.core.nodes.ProximityQueryNode.Type
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax.Type
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.queryParser.QueryParser.Operator
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute.Operator
Deprecated. Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.Operator
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.queryParser.standard.QueryParserWrapper.Operator
Deprecated. Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.search.BooleanClause.Occur
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.search.CachingWrapperFilter.DeletesMode
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.search.join.ToParentBlockJoinQuery.ScoreMode
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.search.spans.SpanPositionCheckQuery.AcceptStatus
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.search.spell.SuggestMode
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.spatial.geometry.DistanceUnits
Deprecated. Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.spatial.geometry.shape.IntersectCase
Deprecated. Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.spatial.tier.DistanceHandler.Precision
Deprecated. Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.store.MockDirectoryWrapper.Throttling
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.util.fst.FST.INPUT_TYPE
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.util.RamUsageEstimator.JvmFeature
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.apache.lucene.util.Version
Returns the enum constant of this type with the specified name.
ValueQueryNode<T> - Interface in org.apache.lucene.queryParser.core.nodes
This interface should be implemented by a QueryNode that holds an arbitrary value.
values() - Static method in enum org.apache.lucene.analysis.ja.JapaneseTokenizer.Mode
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter.Side
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.analysis.ngram.EdgeNGramTokenizer.Side
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.benchmark.byTask.feeds.TrecDocParser.ParsePathType
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask.Implementation
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.benchmark.byTask.utils.StreamUtils.Type
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.document.DateTools.Resolution
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.document.Field.Index
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.document.Field.Store
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.document.Field.TermVector
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.document.FieldSelectorResult
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.document.NumericField.DataType
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.facet.search.params.FacetRequest.ResultMode
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.facet.search.params.FacetRequest.SortBy
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.facet.search.params.FacetRequest.SortOrder
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache.LRUType
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.index.FieldInfo.IndexOptions
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.index.IndexWriterConfig.OpenMode
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.queryParser.core.nodes.ModifierQueryNode.Modifier
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.queryParser.core.nodes.ParametricQueryNode.CompareOperator
Deprecated. Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.queryParser.core.nodes.ProximityQueryNode.Type
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax.Type
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.queryParser.QueryParser.Operator
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute.Operator
Deprecated. Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.Operator
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.queryParser.standard.QueryParserWrapper.Operator
Deprecated. Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.search.BooleanClause.Occur
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.search.CachingWrapperFilter.DeletesMode
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.search.join.ToParentBlockJoinQuery.ScoreMode
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.search.spans.SpanPositionCheckQuery.AcceptStatus
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.search.spell.SuggestMode
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.spatial.geometry.DistanceUnits
Deprecated. Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.spatial.geometry.shape.IntersectCase
Deprecated. Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.spatial.tier.DistanceHandler.Precision
Deprecated. Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.store.MockDirectoryWrapper.Throttling
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.util.fst.FST.INPUT_TYPE
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.util.RamUsageEstimator.JvmFeature
Returns an array containing the constants of this enum type, in the order they're declared.
values() - Static method in enum org.apache.lucene.util.Version
Returns an array containing the constants of this enum type, in the order they're declared.
ValueSource - Class in org.apache.lucene.search.function
Expert: source of values for basic function queries.
ValueSource() - Constructor for class org.apache.lucene.search.function.ValueSource

ValueSourceQuery - Class in org.apache.lucene.search.function
Expert: A Query that sets the scores of document to the values obtained from a ValueSource.
ValueSourceQuery(ValueSource) - Constructor for class org.apache.lucene.search.function.ValueSourceQuery
Create a value source query
vecCount - Variable in class org.apache.lucene.index.PruningReader

Vector2D - Class in org.apache.lucene.spatial.geometry.shape
Deprecated.
Vector2D(double, double) - Constructor for class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated. Create a vector from the origin of the coordinate system to the given point
Vector2D(Point2D) - Constructor for class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated. Create a vector from the origin of the coordinate system to the given point
Vector2D(Point2D, Point2D) - Constructor for class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated. Create a vector from one point to another
Vector2D() - Constructor for class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated.
Vector2D(Vector2D) - Constructor for class org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated.
VECTOR_EXTENSIONS - Static variable in class org.apache.lucene.index.IndexFileNames
File extensions for term vector support
vectorBoxCorner(double[], double[], double, boolean) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated. Return the coordinates of a vector that is the corner of a box (upper right or lower left), assuming a Rectangular coordinate system.
vectorDistance(double[], double[], double) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated. Calculate the p-norm (i.e.
vectorDistance(double[], double[], double, double) - Static method in class org.apache.lucene.spatial.DistanceUtils
Deprecated. Calculate the p-norm (i.e.
VECTORS_DOCUMENTS_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of vectors documents file
VECTORS_FIELDS_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of vectors fields file
VECTORS_INDEX_EXTENSION - Static variable in class org.apache.lucene.index.IndexFileNames
Extension of vectors index file
verbose - Variable in class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource

verbose() - Method in class org.apache.lucene.index.ConcurrentMergeScheduler
Returns true if verbosing is enabled.
verbose() - Method in class org.apache.lucene.index.IndexWriter
Returns true if verbosing is enabled (i.e., infoStream != null).
verbose() - Method in class org.apache.lucene.index.LogMergePolicy

VERBOSE - Static variable in class org.apache.lucene.util.LuceneTestCase
true iff tests are run in verbose mode.
verifyExplanation(String, int, float, boolean, Explanation) - Static method in class org.apache.lucene.search.CheckHits
Assert that an explanation has the expected score, and optionally that its sub-details max/sum/factor match to that score.
VerifyingLockFactory - Class in org.apache.lucene.store
A LockFactory that wraps another LockFactory and verifies that each lock obtain/release is "correct" (never results in two processes holding the lock at the same time).
VerifyingLockFactory(byte, LockFactory, String, int) - Constructor for class org.apache.lucene.store.VerifyingLockFactory

verifySettings() - Method in class org.apache.lucene.util.LuceneJUnitDividingSelector

VERSION - Static variable in class org.apache.lucene.analysis.ja.dict.BinaryDictionary

VERSION - Static variable in class org.apache.lucene.analysis.ja.dict.CharacterDefinition

VERSION - Static variable in class org.apache.lucene.analysis.ja.dict.ConnectionCosts

Version - Enum in org.apache.lucene.util
Use by certain classes to match version compatibility across releases of Lucene.
Vint8 - Class in org.apache.lucene.util
Variable-length encoding of 32-bit integers, into 8-bit bytes.
Vint8.Position - Class in org.apache.lucene.util
Because Java lacks call-by-reference, this class boxes the decoding position, which is initially set by the caller, and returned after decoding, incremented by the number of bytes processed.
Vint8.Position() - Constructor for class org.apache.lucene.util.Vint8.Position
Creates a position value set to zero.
Vint8.Position(int) - Constructor for class org.apache.lucene.util.Vint8.Position
Creates a position set to initialPosition.
VInt8IntDecoder - Class in org.apache.lucene.util.encoding
An IntDecoder which can decode values encoded by VInt8IntEncoder.
VInt8IntDecoder() - Constructor for class org.apache.lucene.util.encoding.VInt8IntDecoder

VInt8IntEncoder - Class in org.apache.lucene.util.encoding
An IntEncoder which implements variable length encoding.
VInt8IntEncoder() - Constructor for class org.apache.lucene.util.encoding.VInt8IntEncoder

VirtualMethod<C> - Class in org.apache.lucene.util
A utility for keeping backwards compatibility on previously abstract methods (or similar replacements).
VirtualMethod(Class<C>, String, Class<?>...) - Constructor for class org.apache.lucene.util.VirtualMethod
Creates a new instance for the given baseClass and method declaration.
visitMatchingTerm(Term) - Method in interface org.apache.lucene.queryParser.surround.query.SimpleTerm.MatchingTermVisitor

visitMatchingTerms(IndexReader, String, SimpleTerm.MatchingTermVisitor) - Method in class org.apache.lucene.queryParser.surround.query.SimpleTerm

visitMatchingTerms(IndexReader, String, SimpleTerm.MatchingTermVisitor) - Method in class org.apache.lucene.queryParser.surround.query.SrndPrefixQuery

visitMatchingTerms(IndexReader, String, SimpleTerm.MatchingTermVisitor) - Method in class org.apache.lucene.queryParser.surround.query.SrndTermQuery

visitMatchingTerms(IndexReader, String, SimpleTerm.MatchingTermVisitor) - Method in class org.apache.lucene.queryParser.surround.query.SrndTruncQuery

visitOptional(P, C, S) - Method in class org.apache.lucene.search.Scorer.ScorerVisitor
Invoked for all optional scorer
visitProhibited(P, C, S) - Method in class org.apache.lucene.search.Scorer.ScorerVisitor
Invoked for all prohibited scorer
visitRequired(P, C, S) - Method in class org.apache.lucene.search.Scorer.ScorerVisitor
Invoked for all required scorer
visitScorers(Scorer.ScorerVisitor<Query, Query, Scorer>) - Method in class org.apache.lucene.search.Scorer
Expert: call this to gather details for all sub-scorers for this query.
visitSubScorers(Query, BooleanClause.Occur, Scorer.ScorerVisitor<Query, Query, Scorer>) - Method in class org.apache.lucene.search.Scorer
Scorer subclasses should implement this method if the subclass itself contains multiple scorers to support gathering details for sub-scorers via Scorer.ScorerVisitor
VocabularyAssert - Class in org.apache.lucene.analysis
Utility class for doing vocabulary-based stemming tests
VocabularyAssert() - Constructor for class org.apache.lucene.analysis.VocabularyAssert

vspace - Variable in class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree
value space: stores the interletter values

W

w - Variable in class org.apache.lucene.index.RandomIndexWriter

W - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
waitForGeneration(long) - Method in class org.apache.lucene.search.NRTManager
Waits for the target generation to become visible in the searcher.
waitForGeneration(long, long, TimeUnit) - Method in class org.apache.lucene.search.NRTManager
Waits for the target generation to become visible in the searcher.
waitForMerges() - Method in class org.apache.lucene.index.IndexWriter
Wait for any currently outstanding merges to finish.
WaitForMergesTask - Class in org.apache.lucene.benchmark.byTask.tasks
Waits for merges to finish.
WaitForMergesTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.WaitForMergesTask

waiting(long) - Method in interface org.apache.lucene.search.NRTManager.WaitingListener

waiting(long) - Method in class org.apache.lucene.search.NRTManagerReopenThread

WaitTask - Class in org.apache.lucene.benchmark.byTask.tasks
Simply waits for the specified (via the parameter) amount of time.
WaitTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.WaitTask

warm(IndexReader) - Method in class org.apache.lucene.index.IndexWriter.IndexReaderWarmer

WarmTask - Class in org.apache.lucene.benchmark.byTask.tasks
Warm reader task: retrieve all reader documents.
WarmTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.WarmTask

wasEscaped(int) - Method in class org.apache.lucene.queryParser.core.util.UnescapedCharSequence

wasEscaped(CharSequence, int) - Static method in class org.apache.lucene.queryParser.core.util.UnescapedCharSequence

WAW - Static variable in class org.apache.lucene.analysis.ar.ArabicStemmer

WeakIdentityMap<K,V> - Class in org.apache.lucene.util
Implements a combination of WeakHashMap and IdentityHashMap.
weight - Variable in class org.apache.lucene.analysis.cn.smart.hhmm.SegToken
word frequency
weight(Searcher) - Method in class org.apache.lucene.search.Query
Deprecated. never ever use this method in Weight implementations. Subclasses of Query should use Query.createWeight(org.apache.lucene.search.Searcher), instead.
weight - Variable in class org.apache.lucene.search.Scorer

weight() - Method in class org.apache.lucene.search.spell.TermFreqIterator.TermFreqIteratorWrapper

weight() - Method in interface org.apache.lucene.search.spell.TermFreqIterator

weight() - Method in class org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper

weight() - Method in class org.apache.lucene.search.suggest.SortedTermFreqIteratorWrapper

weight() - Method in class org.apache.lucene.search.suggest.UnsortedTermFreqIteratorWrapper

Weight - Class in org.apache.lucene.search
Expert: Calculate query weights and build query scorers.
Weight() - Constructor for class org.apache.lucene.search.Weight

WeightedSpanTerm - Class in org.apache.lucene.search.highlight
Lightweight class to hold term, weight, and positions used for scoring this term.
WeightedSpanTerm(float, String) - Constructor for class org.apache.lucene.search.highlight.WeightedSpanTerm

WeightedSpanTerm(float, String, boolean) - Constructor for class org.apache.lucene.search.highlight.WeightedSpanTerm

WeightedSpanTermExtractor - Class in org.apache.lucene.search.highlight
Class used to extract WeightedSpanTerms from a Query based on whether Terms from the Query are contained in a supplied TokenStream.
WeightedSpanTermExtractor() - Constructor for class org.apache.lucene.search.highlight.WeightedSpanTermExtractor

WeightedSpanTermExtractor(String) - Constructor for class org.apache.lucene.search.highlight.WeightedSpanTermExtractor

WeightedSpanTermExtractor.PositionCheckingMap<K> - Class in org.apache.lucene.search.highlight
This class makes sure that if both position sensitive and insensitive versions of the same term are added, the position insensitive one wins.
WeightedSpanTermExtractor.PositionCheckingMap() - Constructor for class org.apache.lucene.search.highlight.WeightedSpanTermExtractor.PositionCheckingMap

WeightedTerm - Class in org.apache.lucene.search.highlight
Lightweight class to hold term and a weight value used for scoring this term
WeightedTerm(float, String) - Constructor for class org.apache.lucene.search.highlight.WeightedTerm

weights - Variable in class org.apache.lucene.search.BooleanQuery.BooleanWeight

weights - Variable in class org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight
The Weights for our subqueries, in 1-1 correspondence with disjuncts
weightToString(StringBuilder) - Method in class org.apache.lucene.queryParser.surround.query.SrndQuery

WFSTCompletionLookup - Class in org.apache.lucene.search.suggest.fst
Suggester based on a weighted FST: it first traverses the prefix, then walks the n shortest paths to retrieve top-ranked suggestions.
WFSTCompletionLookup() - Constructor for class org.apache.lucene.search.suggest.fst.WFSTCompletionLookup
Calls WFSTCompletionLookup(true)
WFSTCompletionLookup(boolean) - Constructor for class org.apache.lucene.search.suggest.fst.WFSTCompletionLookup
Creates a new suggester.
WHITESPACE - Static variable in class org.apache.lucene.analysis.MockTokenizer
Acts Similar to WhitespaceTokenizer
WHITESPACE_PATTERN - Static variable in class org.apache.lucene.analysis.miscellaneous.PatternAnalyzer
"\\s+"; Divides text at whitespaces (Character.isWhitespace(c))
WhitespaceAnalyzer - Class in org.apache.lucene.analysis
An Analyzer that uses WhitespaceTokenizer.
WhitespaceAnalyzer(Version) - Constructor for class org.apache.lucene.analysis.WhitespaceAnalyzer
Creates a new WhitespaceAnalyzer
WhitespaceAnalyzer() - Constructor for class org.apache.lucene.analysis.WhitespaceAnalyzer
Deprecated. use WhitespaceAnalyzer.WhitespaceAnalyzer(Version) instead
WhitespaceTokenizer - Class in org.apache.lucene.analysis
A WhitespaceTokenizer is a tokenizer that divides text at whitespace.
WhitespaceTokenizer(Version, Reader) - Constructor for class org.apache.lucene.analysis.WhitespaceTokenizer
Construct a new WhitespaceTokenizer.
WhitespaceTokenizer(Version, AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.WhitespaceTokenizer
Construct a new WhitespaceTokenizer using a given AttributeSource.
WhitespaceTokenizer(Version, AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.WhitespaceTokenizer
Construct a new WhitespaceTokenizer using a given AttributeSource.AttributeFactory.
WhitespaceTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.WhitespaceTokenizer
Deprecated. use WhitespaceTokenizer.WhitespaceTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
WhitespaceTokenizer(AttributeSource, Reader) - Constructor for class org.apache.lucene.analysis.WhitespaceTokenizer
Deprecated. use WhitespaceTokenizer.WhitespaceTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
WhitespaceTokenizer(AttributeSource.AttributeFactory, Reader) - Constructor for class org.apache.lucene.analysis.WhitespaceTokenizer
Deprecated. use WhitespaceTokenizer.WhitespaceTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
WikipediaTokenizer - Class in org.apache.lucene.analysis.wikipedia
Extension of StandardTokenizer that is aware of Wikipedia syntax.
WikipediaTokenizer(Reader) - Constructor for class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer
Creates a new instance of the WikipediaTokenizer.
WikipediaTokenizer(Reader, int, Set<String>) - Constructor for class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer
Creates a new instance of the WikipediaTokenizer.
WikipediaTokenizer(AttributeSource.AttributeFactory, Reader, int, Set<String>) - Constructor for class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer
Creates a new instance of the WikipediaTokenizer.
WikipediaTokenizer(AttributeSource, Reader, int, Set<String>) - Constructor for class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer
Creates a new instance of the WikipediaTokenizer.
WILDCARD_CHAR - Static variable in class org.apache.lucene.search.WildcardTermEnum

WILDCARD_NOT_SUPPORTED - Static variable in class org.apache.lucene.queryParser.core.messages.QueryParserMessages

WILDCARD_STRING - Static variable in class org.apache.lucene.search.WildcardTermEnum
String equality with support for wildcards
wildcardEquals(String, int, String, int) - Static method in class org.apache.lucene.search.WildcardTermEnum
Determines if a word matches a wildcard pattern.
WildcardQuery - Class in org.apache.lucene.search
Implements the wildcard search query.
WildcardQuery(Term) - Constructor for class org.apache.lucene.search.WildcardQuery

WildcardQueryNode - Class in org.apache.lucene.queryParser.standard.nodes
A WildcardQueryNode represents wildcard query This does not apply to phrases.
WildcardQueryNode(CharSequence, CharSequence, int, int) - Constructor for class org.apache.lucene.queryParser.standard.nodes.WildcardQueryNode

WildcardQueryNode(FieldQueryNode) - Constructor for class org.apache.lucene.queryParser.standard.nodes.WildcardQueryNode

WildcardQueryNodeBuilder - Class in org.apache.lucene.queryParser.standard.builders
Builds a WildcardQuery object from a WildcardQueryNode object.
WildcardQueryNodeBuilder() - Constructor for class org.apache.lucene.queryParser.standard.builders.WildcardQueryNodeBuilder

WildcardQueryNodeProcessor - Class in org.apache.lucene.queryParser.standard.processors
The StandardSyntaxParser creates PrefixWildcardQueryNode nodes which have values containing the prefixed wildcard.
WildcardQueryNodeProcessor() - Constructor for class org.apache.lucene.queryParser.standard.processors.WildcardQueryNodeProcessor

WildcardTermEnum - Class in org.apache.lucene.search
Subclass of FilteredTermEnum for enumerating all terms that match the specified wildcard filter term.
WildcardTermEnum(IndexReader, Term) - Constructor for class org.apache.lucene.search.WildcardTermEnum
Creates a new WildcardTermEnum.
WILDTERM - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
WILLNEED - Static variable in class org.apache.lucene.store.NativePosixUtil

WINDOWS - Static variable in class org.apache.lucene.util.Constants
True iff running on Windows.
WindowsDirectory - Class in org.apache.lucene.store
Native Directory implementation for Microsoft Windows.
WindowsDirectory(File, LockFactory) - Constructor for class org.apache.lucene.store.WindowsDirectory
Create a new WindowsDirectory for the named location.
WindowsDirectory(File) - Constructor for class org.apache.lucene.store.WindowsDirectory
Create a new WindowsDirectory for the named location and NativeFSLockFactory.
WindowsDirectory.WindowsIndexInput - Class in org.apache.lucene.store

WindowsDirectory.WindowsIndexInput(File, int) - Constructor for class org.apache.lucene.store.WindowsDirectory.WindowsIndexInput

withCollector() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask

withCollector() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask

WithinComment1 - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
Lexical state.
WithinComment2 - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
Lexical state.
withinGroupSort - Variable in class org.apache.lucene.search.grouping.TopGroups
How docs are sorted within each group
WithinQuote1 - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
Lexical state.
WithinQuote2 - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
Lexical state.
WithinScript - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
Lexical state.
WithinTag - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
Lexical state.
withMaxScore() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask
Whether maxScores should be computed (only useful with field sort)
withMaxScore() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask

withOffsets() - Method in enum org.apache.lucene.document.Field.TermVector

withPositions() - Method in enum org.apache.lucene.document.Field.TermVector

withRetrieve() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask
Return true if, with search & results traversing, docs should be retrieved.
withRetrieve() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTask

withRetrieve() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

withRetrieve() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetLoadFieldSelectorTask

withRetrieve() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetTask

withRetrieve() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask

withRetrieve() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask

withRetrieve() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask

withRetrieve() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask

withRetrieve() - Method in class org.apache.lucene.benchmark.byTask.tasks.WarmTask

withScore() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask
Whether scores should be computed (only useful with field sort)
withScore() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask

withSearch() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask
Return true if search should be performed.
withSearch() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTask

withSearch() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask

withSearch() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask

withSearch() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask

withSearch() - Method in class org.apache.lucene.benchmark.byTask.tasks.WarmTask

withTraverse() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask
Return true if, with search, results should be traversed.
withTraverse() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTask

withTraverse() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask

withTraverse() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask

withTraverse() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask

withTraverse() - Method in class org.apache.lucene.benchmark.byTask.tasks.WarmTask

withWarm() - Method in class org.apache.lucene.benchmark.byTask.tasks.ReadTask
Return true if warming should be performed.
withWarm() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTask

withWarm() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask

withWarm() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask

withWarm() - Method in class org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask

withWarm() - Method in class org.apache.lucene.benchmark.byTask.tasks.WarmTask

wlen - Variable in class org.apache.lucene.util.OpenBitSet

Word - Static variable in interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
RegularExpression Id.
WORD_COST - Static variable in class org.apache.lucene.analysis.ja.dict.UserDictionary

WORD_HANGUL - Static variable in class org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig
Token type for words containing Korean hangul
WORD_HIRAGANA - Static variable in class org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig
Token type for words containing Japanese hiragana
WORD_IDEO - Static variable in class org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig
Token type for words containing ideographic characters
WORD_KATAKANA - Static variable in class org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig
Token type for words containing Japanese katakana
WORD_LETTER - Static variable in class org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig
Token type for words that contain letters
WORD_NUMBER - Static variable in class org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig
Token type for words that appear to be numbers
WORD_SEPARATOR - Static variable in class org.apache.lucene.analysis.synonym.SynonymMap
for multiword support, you must separate words with this separator
WORD_TYPE - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizerImpl
Alphanumeric sequences
WORD_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. Alphanumeric sequences
WORD_TYPE - Static variable in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. Alphanumeric sequences
WORD_TYPE - Static variable in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. Alphanumeric sequences
WORD_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
Deprecated. use UAX29URLEmailTokenizer.TOKEN_TYPES instead
WORD_TYPE - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
Alphanumeric sequences
WordlistLoader - Class in org.apache.lucene.analysis
Loader for text files that represent a list of stopwords.
WordlistLoader() - Constructor for class org.apache.lucene.analysis.WordlistLoader

WordnetSynonymParser - Class in org.apache.lucene.analysis.synonym
Parser for wordnet prolog format
WordnetSynonymParser(boolean, boolean, Analyzer) - Constructor for class org.apache.lucene.analysis.synonym.WordnetSynonymParser

words - Variable in class org.apache.lucene.analysis.synonym.SynonymMap
map
WordTokenFilter - Class in org.apache.lucene.analysis.cn.smart
A TokenFilter that breaks sentences into words.
WordTokenFilter(TokenStream) - Constructor for class org.apache.lucene.analysis.cn.smart.WordTokenFilter
Construct a new WordTokenizer.
wordType - Variable in class org.apache.lucene.analysis.cn.smart.hhmm.SegToken
WordType of the text
WordType - Class in org.apache.lucene.analysis.cn.smart
Internal SmartChineseAnalyzer token type constants
WordType() - Constructor for class org.apache.lucene.analysis.cn.smart.WordType

WQuery() - Method in class org.apache.lucene.queryParser.surround.parser.QueryParser

wrap(Collector...) - Static method in class org.apache.lucene.search.MultiCollector
Wraps a list of Collectors with a MultiCollector.
wrapCommits(List<? extends IndexCommit>) - Method in class org.apache.lucene.index.SnapshotDeletionPolicy

wrapSearcher(Random, Searcher, int) - Static method in class org.apache.lucene.search.QueryUtils
Given a Searcher, returns a new MultiSearcher wrapping the the original Searcher, as well as several "empty" IndexSearchers -- some of which will have deleted documents in them.
wrapUnderlyingReader(Random, IndexSearcher, int) - Static method in class org.apache.lucene.search.QueryUtils
Given an IndexSearcher, returns a new IndexSearcher whose IndexReader is a MultiReader containing the Reader of the original IndexSearcher, as well as several "empty" IndexReaders -- some of which will have deleted documents in them.
write(char) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

write(int) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

write(char[]) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

write(char[], int, int) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

write(OpenStringBuilder) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

write(String) - Method in class org.apache.lucene.analysis.util.OpenStringBuilder

write(Directory, String) - Method in class org.apache.lucene.index.FieldInfos

write(IndexOutput) - Method in class org.apache.lucene.index.FieldInfos

write(BytesRef) - Method in class org.apache.lucene.search.suggest.fst.Sort.ByteSequencesWriter

write(byte[]) - Method in class org.apache.lucene.search.suggest.fst.Sort.ByteSequencesWriter

write(byte[], int, int) - Method in class org.apache.lucene.search.suggest.fst.Sort.ByteSequencesWriter

write(Directory, String) - Method in class org.apache.lucene.util.BitVector
Writes this vector to the file name in Directory d, in a format that can be read by the constructor BitVector.BitVector(Directory, String).
write(BytesRef, DataOutput) - Method in class org.apache.lucene.util.fst.ByteSequenceOutputs

write(IntsRef, DataOutput) - Method in class org.apache.lucene.util.fst.IntSequenceOutputs

write(Object, DataOutput) - Method in class org.apache.lucene.util.fst.NoOutputs

write(T, DataOutput) - Method in class org.apache.lucene.util.fst.Outputs

write(PairOutputs.Pair<A, B>, DataOutput) - Method in class org.apache.lucene.util.fst.PairOutputs

write(Long, DataOutput) - Method in class org.apache.lucene.util.fst.PositiveIntOutputs

write(Object, DataOutput) - Method in class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs

write(int) - Method in class org.apache.lucene.util.UnsafeByteArrayOutputStream
writes a given byte(at the form of an int) to the buffer.
write(byte[], int, int) - Method in class org.apache.lucene.util.UnsafeByteArrayOutputStream
writes a given byte[], with offset and length to the buffer.
WRITE_LOCK_NAME - Static variable in class org.apache.lucene.index.IndexWriter
Name of the write lock in the index.
WRITE_LOCK_TIMEOUT - Static variable in class org.apache.lucene.index.IndexWriter
Deprecated. use IndexWriterConfig.WRITE_LOCK_TIMEOUT instead
WRITE_LOCK_TIMEOUT - Static variable in class org.apache.lucene.index.IndexWriterConfig
Default value for the write lock timeout (1,000 ms).
writeArc(int, int, String, String) - Method in class org.apache.lucene.analysis.TokenStreamToDot

writeByte(byte) - Method in class org.apache.lucene.store.BufferedIndexOutput
Writes a single byte.
writeByte(byte) - Method in class org.apache.lucene.store.ByteArrayDataOutput

writeByte(byte) - Method in class org.apache.lucene.store.ChecksumIndexOutput

writeByte(byte) - Method in class org.apache.lucene.store.DataOutput
Writes a single byte.
writeByte(byte) - Method in class org.apache.lucene.store.MockIndexOutputWrapper

writeByte(byte) - Method in class org.apache.lucene.store.OutputStreamDataOutput

writeByte(byte) - Method in class org.apache.lucene.store.RAMOutputStream

writeByte(byte) - Method in class org.apache.lucene.util.PagedBytes.PagedBytesDataOutput

writeByte(byte) - Method in class org.apache.lucene.util.ThrottledIndexOutput

writeBytes(byte[], int, int) - Method in class org.apache.lucene.store.BufferedIndexOutput
Writes an array of bytes.
writeBytes(byte[], int, int) - Method in class org.apache.lucene.store.ByteArrayDataOutput

writeBytes(byte[], int, int) - Method in class org.apache.lucene.store.ChecksumIndexOutput

writeBytes(byte[], int) - Method in class org.apache.lucene.store.DataOutput
Writes an array of bytes.
writeBytes(byte[], int, int) - Method in class org.apache.lucene.store.DataOutput
Writes an array of bytes.
writeBytes(byte[], int, int) - Method in class org.apache.lucene.store.MockIndexOutputWrapper

writeBytes(byte[], int, int) - Method in class org.apache.lucene.store.OutputStreamDataOutput

writeBytes(byte[], int, int) - Method in class org.apache.lucene.store.RAMOutputStream

writeBytes(byte[], int, int) - Method in class org.apache.lucene.util.PagedBytes.PagedBytesDataOutput

writeBytes(byte[], int, int) - Method in class org.apache.lucene.util.ThrottledIndexOutput

writeChars(String, int, int) - Method in class org.apache.lucene.store.DataOutput
Deprecated. -- please pre-convert to utf8 bytes instead or use DataOutput.writeString(java.lang.String)
writeChars(char[], int, int) - Method in class org.apache.lucene.store.DataOutput
Deprecated. -- please pre-convert to utf8 bytes instead or use DataOutput.writeString(java.lang.String)
writeHeader() - Method in class org.apache.lucene.analysis.TokenStreamToDot
Override to customize.
writeHeader(DataOutput, String, int) - Static method in class org.apache.lucene.util.CodecUtil

writeInt(int) - Method in class org.apache.lucene.store.DataOutput
Writes an int as four bytes.
WriteLineDocTask - Class in org.apache.lucene.benchmark.byTask.tasks
A task which writes documents, one line per document.
WriteLineDocTask(PerfRunData) - Constructor for class org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask

writeLong(long) - Method in class org.apache.lucene.store.DataOutput
Writes a long as eight bytes.
writeNode(int, String) - Method in class org.apache.lucene.analysis.TokenStreamToDot

writePool(DataOutput) - Method in class org.apache.lucene.util.ByteBlockPool
Writes the pools content to the given DataOutput
writer - Variable in class org.apache.lucene.index.ConcurrentMergeScheduler

writer - Variable in class org.apache.lucene.index.MergePolicy

writer - Variable in class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

writeShort(short) - Method in class org.apache.lucene.store.DataOutput
Writes a short as two bytes.
writeString(String) - Method in class org.apache.lucene.store.DataOutput
Writes a string.
writeStringStringMap(Map<String, String>) - Method in class org.apache.lucene.store.DataOutput

writeTo(IndexOutput) - Method in class org.apache.lucene.store.RAMOutputStream
Copy the current contents of this buffer to the named output.
writeTrailer() - Method in class org.apache.lucene.analysis.TokenStreamToDot
Override to customize.
writeVInt(int) - Method in class org.apache.lucene.store.DataOutput
Writes an int in a variable-length format.
writeVLong(long) - Method in class org.apache.lucene.store.DataOutput
Writes an long in a variable-length format.
WS_ELEMS - Static variable in class org.apache.lucene.benchmark.byTask.feeds.demohtml.Tags
contains all tags for which whitespaces have to be inserted for proper tokenization

X

x() - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
x(double) - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
XOR - Static variable in class org.apache.lucene.search.ChainedFilter

xor(OpenBitSet) - Method in class org.apache.lucene.util.OpenBitSet
this = this XOR other
xorCount(OpenBitSet, OpenBitSet) - Static method in class org.apache.lucene.util.OpenBitSet
Returns the popcount or cardinality of the exclusive-or of the two sets.

Y

y() - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
y(double) - Method in class org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.
YEH - Static variable in class org.apache.lucene.analysis.ar.ArabicNormalizer

YEH - Static variable in class org.apache.lucene.analysis.ar.ArabicStemmer

YEH - Static variable in class org.apache.lucene.analysis.fa.PersianNormalizer

YEH_BARREE - Static variable in class org.apache.lucene.analysis.fa.PersianNormalizer

yybegin(int) - Method in class org.apache.lucene.analysis.standard.StandardTokenizerImpl
Enters a new lexical state
yybegin(int) - Method in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. Enters a new lexical state
yybegin(int) - Method in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. Enters a new lexical state
yybegin(int) - Method in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. Enters a new lexical state
yybegin(int) - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
Enters a new lexical state
yychar() - Method in class org.apache.lucene.analysis.standard.StandardTokenizerImpl

yychar() - Method in interface org.apache.lucene.analysis.standard.StandardTokenizerInterface
Returns the current position.
yychar() - Method in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated.
yychar() - Method in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated.
yychar() - Method in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated.
yychar() - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl

yycharat(int) - Method in class org.apache.lucene.analysis.standard.StandardTokenizerImpl
Returns the character at position pos from the matched text.
yycharat(int) - Method in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. Returns the character at position pos from the matched text.
yycharat(int) - Method in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. Returns the character at position pos from the matched text.
yycharat(int) - Method in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. Returns the character at position pos from the matched text.
yycharat(int) - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
Returns the character at position pos from the matched text.
yyclose() - Method in class org.apache.lucene.analysis.standard.StandardTokenizerImpl
Closes the input stream.
yyclose() - Method in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. Closes the input stream.
yyclose() - Method in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. Closes the input stream.
yyclose() - Method in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. Closes the input stream.
yyclose() - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
Closes the input stream.
YYEOF - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizerImpl
This character denotes the end of file
YYEOF - Static variable in interface org.apache.lucene.analysis.standard.StandardTokenizerInterface
This character denotes the end of file
YYEOF - Static variable in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. This character denotes the end of file
YYEOF - Static variable in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. This character denotes the end of file
YYEOF - Static variable in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. This character denotes the end of file
YYEOF - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
This character denotes the end of file
YYINITIAL - Static variable in class org.apache.lucene.analysis.standard.StandardTokenizerImpl
lexical states
YYINITIAL - Static variable in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. lexical states
YYINITIAL - Static variable in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. lexical states
YYINITIAL - Static variable in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. lexical states
YYINITIAL - Static variable in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
lexical states
yylength() - Method in class org.apache.lucene.analysis.standard.StandardTokenizerImpl
Returns the length of the matched text region.
yylength() - Method in interface org.apache.lucene.analysis.standard.StandardTokenizerInterface
Returns the length of the matched text region.
yylength() - Method in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. Returns the length of the matched text region.
yylength() - Method in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. Returns the length of the matched text region.
yylength() - Method in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. Returns the length of the matched text region.
yylength() - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
Returns the length of the matched text region.
yypushback(int) - Method in class org.apache.lucene.analysis.standard.StandardTokenizerImpl
Pushes the specified amount of characters back into the input stream.
yypushback(int) - Method in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. Pushes the specified amount of characters back into the input stream.
yypushback(int) - Method in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. Pushes the specified amount of characters back into the input stream.
yypushback(int) - Method in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. Pushes the specified amount of characters back into the input stream.
yypushback(int) - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
Pushes the specified amount of characters back into the input stream.
yyreset(Reader) - Method in class org.apache.lucene.analysis.standard.StandardTokenizerImpl
Resets the scanner to read from a new input stream.
yyreset(Reader) - Method in interface org.apache.lucene.analysis.standard.StandardTokenizerInterface
Resets the scanner to read from a new input stream.
yyreset(Reader) - Method in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. Resets the scanner to read from a new input stream.
yyreset(Reader) - Method in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. Resets the scanner to read from a new input stream.
yyreset(Reader) - Method in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. Resets the scanner to read from a new input stream.
yyreset(Reader) - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
Resets the scanner to read from a new input stream.
yystate() - Method in class org.apache.lucene.analysis.standard.StandardTokenizerImpl
Returns the current lexical state.
yystate() - Method in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. Returns the current lexical state.
yystate() - Method in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. Returns the current lexical state.
yystate() - Method in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. Returns the current lexical state.
yystate() - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
Returns the current lexical state.
yytext() - Method in class org.apache.lucene.analysis.standard.StandardTokenizerImpl
Returns the text matched by the current regular expression.
yytext() - Method in class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
Deprecated. Returns the text matched by the current regular expression.
yytext() - Method in class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
Deprecated. Returns the text matched by the current regular expression.
yytext() - Method in class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
Deprecated. Returns the text matched by the current regular expression.
yytext() - Method in class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
Returns the text matched by the current regular expression.

_

_DISTOP_NUM - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
_ESCAPED_CHAR - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
_ESCAPED_CHAR - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
_innerIter - Variable in class org.apache.lucene.search.FilteredDocIdSetIterator

_NUM_CHAR - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
_NUM_CHAR - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
_NUM_CHAR - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
_ONE_CHAR - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
_QUOTED_CHAR - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
_QUOTED_CHAR - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
_STAR - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
_TERM_CHAR - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
_TERM_CHAR - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
_TERM_CHAR - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
_TERM_START_CHAR - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
_TERM_START_CHAR - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
_TestHelper - Class in org.apache.lucene.store
This class provides access to package-level features defined in the store package.
_TestHelper() - Constructor for class org.apache.lucene.store._TestHelper

_TestUtil - Class in org.apache.lucene.util
General utility methods for Lucene unit tests.
_TestUtil() - Constructor for class org.apache.lucene.util._TestUtil

_WHITESPACE - Static variable in interface org.apache.lucene.queryParser.QueryParserConstants
RegularExpression Id.
_WHITESPACE - Static variable in interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
RegularExpression Id.
_WHITESPACE - Static variable in interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
RegularExpression Id.
A B C D E F G H I J K L M N O P Q R S T U V W X Y _

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

PREV   NEXT

FRAMES    NO FRAMES


Overview

All Classes

Packages
org.apache.lucene
org.apache.lucene.analysis
org.apache.lucene.analysis.ar
org.apache.lucene.analysis.bg
org.apache.lucene.analysis.br
org.apache.lucene.analysis.ca
org.apache.lucene.analysis.charfilter
org.apache.lucene.analysis.cjk
org.apache.lucene.analysis.cn
org.apache.lucene.analysis.cn.smart
org.apache.lucene.analysis.cn.smart.hhmm
org.apache.lucene.analysis.compound
org.apache.lucene.analysis.compound.hyphenation
org.apache.lucene.analysis.cz
org.apache.lucene.analysis.da
org.apache.lucene.analysis.de
org.apache.lucene.analysis.el
org.apache.lucene.analysis.en
org.apache.lucene.analysis.es
org.apache.lucene.analysis.eu
org.apache.lucene.analysis.fa
org.apache.lucene.analysis.fi
org.apache.lucene.analysis.fr
org.apache.lucene.analysis.ga
org.apache.lucene.analysis.gl
org.apache.lucene.analysis.hi
org.apache.lucene.analysis.hu
org.apache.lucene.analysis.hunspell
org.apache.lucene.analysis.hy
org.apache.lucene.analysis.icu
org.apache.lucene.analysis.icu.segmentation
org.apache.lucene.analysis.icu.tokenattributes
org.apache.lucene.analysis.id
org.apache.lucene.analysis.in
org.apache.lucene.analysis.it
org.apache.lucene.analysis.ja
org.apache.lucene.analysis.ja.dict
org.apache.lucene.analysis.ja.tokenattributes
org.apache.lucene.analysis.ja.util
org.apache.lucene.analysis.lv
org.apache.lucene.analysis.miscellaneous
org.apache.lucene.analysis.ngram
org.apache.lucene.analysis.nl
org.apache.lucene.analysis.no
org.apache.lucene.analysis.path
org.apache.lucene.analysis.payloads
org.apache.lucene.analysis.phonetic
org.apache.lucene.analysis.pl
org.apache.lucene.analysis.position
org.apache.lucene.analysis.pt
org.apache.lucene.analysis.query
org.apache.lucene.analysis.reverse
org.apache.lucene.analysis.ro
org.apache.lucene.analysis.ru
org.apache.lucene.analysis.shingle
org.apache.lucene.analysis.sinks
org.apache.lucene.analysis.snowball
org.apache.lucene.analysis.standard
org.apache.lucene.analysis.standard.std31
org.apache.lucene.analysis.standard.std34
org.apache.lucene.analysis.stempel
org.apache.lucene.analysis.sv
org.apache.lucene.analysis.synonym
org.apache.lucene.analysis.th
org.apache.lucene.analysis.tokenattributes
org.apache.lucene.analysis.tr
org.apache.lucene.analysis.util
org.apache.lucene.analysis.wikipedia
org.apache.lucene.benchmark
org.apache.lucene.benchmark.byTask
org.apache.lucene.benchmark.byTask.feeds
org.apache.lucene.benchmark.byTask.feeds.demohtml
org.apache.lucene.benchmark.byTask.programmatic
org.apache.lucene.benchmark.byTask.stats
org.apache.lucene.benchmark.byTask.tasks
org.apache.lucene.benchmark.byTask.utils
org.apache.lucene.benchmark.quality
org.apache.lucene.benchmark.quality.trec
org.apache.lucene.benchmark.quality.utils
org.apache.lucene.benchmark.utils
org.apache.lucene.collation
org.apache.lucene.demo
org.apache.lucene.document
org.apache.lucene.facet
org.apache.lucene.facet.enhancements
org.apache.lucene.facet.enhancements.association
org.apache.lucene.facet.enhancements.params
org.apache.lucene.facet.index
org.apache.lucene.facet.index.attributes
org.apache.lucene.facet.index.categorypolicy
org.apache.lucene.facet.index.params
org.apache.lucene.facet.index.streaming
org.apache.lucene.facet.search
org.apache.lucene.facet.search.aggregator
org.apache.lucene.facet.search.aggregator.association
org.apache.lucene.facet.search.cache
org.apache.lucene.facet.search.params
org.apache.lucene.facet.search.params.association
org.apache.lucene.facet.search.results
org.apache.lucene.facet.search.sampling
org.apache.lucene.facet.taxonomy
org.apache.lucene.facet.taxonomy.directory
org.apache.lucene.facet.taxonomy.writercache
org.apache.lucene.facet.taxonomy.writercache.cl2o
org.apache.lucene.facet.taxonomy.writercache.lru
org.apache.lucene.facet.util
org.apache.lucene.index
org.apache.lucene.index.memory
org.apache.lucene.index.pruning
org.apache.lucene.messages
org.apache.lucene.misc
org.apache.lucene.queryParser
org.apache.lucene.queryParser.analyzing
org.apache.lucene.queryParser.complexPhrase
org.apache.lucene.queryParser.core
org.apache.lucene.queryParser.core.builders
org.apache.lucene.queryParser.core.config
org.apache.lucene.queryParser.core.messages
org.apache.lucene.queryParser.core.nodes
org.apache.lucene.queryParser.core.parser
org.apache.lucene.queryParser.core.processors
org.apache.lucene.queryParser.core.util
org.apache.lucene.queryParser.ext
org.apache.lucene.queryParser.precedence
org.apache.lucene.queryParser.precedence.processors
org.apache.lucene.queryParser.standard
org.apache.lucene.queryParser.standard.builders
org.apache.lucene.queryParser.standard.config
org.apache.lucene.queryParser.standard.nodes
org.apache.lucene.queryParser.standard.parser
org.apache.lucene.queryParser.standard.processors
org.apache.lucene.queryParser.surround.parser
org.apache.lucene.queryParser.surround.query
org.apache.lucene.search
org.apache.lucene.search.function
org.apache.lucene.search.grouping
org.apache.lucene.search.highlight
org.apache.lucene.search.join
org.apache.lucene.search.payloads
org.apache.lucene.search.regex
org.apache.lucene.search.similar
org.apache.lucene.search.spans
org.apache.lucene.search.spell
org.apache.lucene.search.suggest
org.apache.lucene.search.suggest.fst
org.apache.lucene.search.suggest.jaspell
org.apache.lucene.search.suggest.tst
org.apache.lucene.search.vectorhighlight
org.apache.lucene.spatial
org.apache.lucene.spatial.geohash
org.apache.lucene.spatial.geometry
org.apache.lucene.spatial.geometry.shape
org.apache.lucene.spatial.tier
org.apache.lucene.spatial.tier.projections
org.apache.lucene.store
org.apache.lucene.store.instantiated
org.apache.lucene.util
org.apache.lucene.util.collections
org.apache.lucene.util.encoding
org.apache.lucene.util.fst
org.apache.lucene.util.packed
org.apache.lucene.xmlparser
org.apache.lucene.xmlparser.builders
org.egothor.stemmer
org.tartarus.snowball
org.tartarus.snowball.ext


Overview

PREV NEXT FRAMES NO FRAMES

Lucene 3.6.1 API

Apache Lucene is a high-performance, full-featured text search engine library.

See:
Description

Core
org.apache.lucene | Top-level package.
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.standard.std31 | Backwards-compatible implementation to match Version.LUCENE_31
org.apache.lucene.analysis.standard.std34 | Backwards-compatible implementation to match Version.LUCENE_34
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.
org.apache.lucene.document | The logical representation of a Document for indexing and searching.
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.messages | For Native Language Support (NLS), system of software internationalization.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.function | Programmatic control over documents scores.
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.spans | The calculus of spans.
org.apache.lucene.store | Binary i/o API, used for all index data.
org.apache.lucene.util | Some utility classes.
org.apache.lucene.util.collections | Various optimized Collections implementations.
org.apache.lucene.util.encoding | Offers various encoders and decoders for integers, as well as the mechanisms to create new ones.
org.apache.lucene.util.fst | Finite state transducers
org.apache.lucene.util.packed | The packed package provides random access capable arrays of positive longs.

contrib: Analysis
org.apache.lucene.analysis.ar | Analyzer for Arabic.
org.apache.lucene.analysis.bg | Analyzer for Bulgarian.
org.apache.lucene.analysis.br | Analyzer for Brazilian Portuguese.
org.apache.lucene.analysis.ca | Analyzer for Catalan.
org.apache.lucene.analysis.charfilter | CharFilters: process text before the Tokenizer
org.apache.lucene.analysis.cjk | Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).
org.apache.lucene.analysis.cn | Analyzer for Chinese, which indexes unigrams (individual chinese characters).
org.apache.lucene.analysis.cn.smart | Analyzer for Simplified Chinese, which indexes words.
org.apache.lucene.analysis.cn.smart.hhmm | SmartChineseAnalyzer Hidden Markov Model package.
org.apache.lucene.analysis.compound | A filter that decomposes compound words you find in many Germanic languages into the word parts.
org.apache.lucene.analysis.compound.hyphenation | The code for the compound word hyphenation is taken from the Apache FOP project.
org.apache.lucene.analysis.cz | Analyzer for Czech.
org.apache.lucene.analysis.da | Analyzer for Danish.
org.apache.lucene.analysis.de | Analyzer for German.
org.apache.lucene.analysis.el | Analyzer for Greek.
org.apache.lucene.analysis.en | Analyzer for English.
org.apache.lucene.analysis.es | Analyzer for Spanish.
org.apache.lucene.analysis.eu | Analyzer for Basque.
org.apache.lucene.analysis.fa | Analyzer for Persian.
org.apache.lucene.analysis.fi | Analyzer for Finnish.
org.apache.lucene.analysis.fr | Analyzer for French.
org.apache.lucene.analysis.ga | Analysis for Irish.
org.apache.lucene.analysis.gl | Analyzer for Galician.
org.apache.lucene.analysis.hi | Analyzer for Hindi.
org.apache.lucene.analysis.hu | Analyzer for Hungarian.
org.apache.lucene.analysis.hunspell | Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.
org.apache.lucene.analysis.hy | Analyzer for Armenian.
org.apache.lucene.analysis.icu | Analysis components based on ICU
org.apache.lucene.analysis.icu.segmentation | Tokenizer that breaks text into words with the Unicode Text Segmentation algorithm.
org.apache.lucene.analysis.icu.tokenattributes | Additional ICU-specific Attributes for text analysis.
org.apache.lucene.analysis.id | Analyzer for Indonesian.
org.apache.lucene.analysis.in | Analysis components for Indian languages.
org.apache.lucene.analysis.it | Analyzer for Italian.
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.ja.dict | Kuromoji dictionary implementation.
org.apache.lucene.analysis.ja.tokenattributes | Additional Kuromoji-specific Attributes for text analysis.
org.apache.lucene.analysis.ja.util | Kuromoji utility classes.
org.apache.lucene.analysis.lv | Analyzer for Latvian.
org.apache.lucene.analysis.miscellaneous | Miscellaneous TokenStreams
org.apache.lucene.analysis.ngram | Character n-gram tokenizers and filters.
org.apache.lucene.analysis.nl | Analyzer for Dutch.
org.apache.lucene.analysis.no | Analyzer for Norwegian.
org.apache.lucene.analysis.path | Analysis components for path-like strings such as filenames.
org.apache.lucene.analysis.payloads | Provides various convenience classes for creating payloads on Tokens.
org.apache.lucene.analysis.phonetic | Analysis components for phonetic search.
org.apache.lucene.analysis.pl | Analyzer for Polish.
org.apache.lucene.analysis.position | Filter for assigning position increments.
org.apache.lucene.analysis.pt | Analyzer for Portuguese.
org.apache.lucene.analysis.query | Automatically filter high-frequency stopwords.
org.apache.lucene.analysis.reverse | Filter to reverse token text.
org.apache.lucene.analysis.ro | Analyzer for Romanian.
org.apache.lucene.analysis.ru | Analyzer for Russian.
org.apache.lucene.analysis.shingle | Word n-gram filters
org.apache.lucene.analysis.sinks | Implementations of the SinkTokenizer that might be useful.
org.apache.lucene.analysis.snowball | TokenFilter and Analyzer implementations that use Snowball stemmers.
org.apache.lucene.analysis.stempel | Stempel: Algorithmic Stemmer
org.apache.lucene.analysis.sv | Analyzer for Swedish.
org.apache.lucene.analysis.synonym | Analysis components for Synonyms.
org.apache.lucene.analysis.th | Analyzer for Thai.
org.apache.lucene.analysis.tr | Analyzer for Turkish.
org.apache.lucene.analysis.util | Utility functions for text analysis.
org.apache.lucene.analysis.wikipedia | Tokenizer that is aware of Wikipedia syntax.
org.egothor.stemmer | Egothor stemmer API.
org.tartarus.snowball | Snowball stemmer API.
org.tartarus.snowball.ext | Autogenerated snowball stemmer implementations.

contrib: Benchmark
org.apache.lucene.benchmark | The benchmark contribution contains tools for benchmarking Lucene using standard, freely available corpora.
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.benchmark.byTask.feeds.demohtml | Example html parser based on JavaCC
org.apache.lucene.benchmark.byTask.programmatic | Sample performance test written programmatically - no algorithm file is needed here.
org.apache.lucene.benchmark.byTask.stats | Statistics maintained when running benchmark tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.benchmark.byTask.utils | Utilities used for the benchmark, and for the reports.
org.apache.lucene.benchmark.quality | Search Quality Benchmarking.
org.apache.lucene.benchmark.quality.trec | Utilities for Trec related quality benchmarking, feeding from Trec Topics and QRels inputs.
org.apache.lucene.benchmark.quality.utils | Miscellaneous utilities for search quality benchmarking: query parsing, submission reports.
org.apache.lucene.benchmark.utils | Benchmark Utility functions.

contrib: ICU
org.apache.lucene.collation CollationKeyFilter converts each token into its binary CollationKey using the provided Collator, and then encode the CollationKey as a String using IndexableBinaryStringTools, to allow it to be stored as an index term.

contrib: Demo
org.apache.lucene.demo Demo applications for indexing and searching.

contrib: Facet
org.apache.lucene.facet | Provides faceted indexing and search capabilities.
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.enhancements.params | Enhanced category features
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.attributes | Category attributes and their properties for indexing
org.apache.lucene.facet.index.categorypolicy | Policies for indexing categories
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.aggregator | Aggregating Facets during Faceted Search
org.apache.lucene.facet.search.aggregator.association | Association-based aggregators.
org.apache.lucene.facet.search.cache | Caching to speed up facets accumulation.
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.search.params.association | Association-based Parameters for Faceted Search.
org.apache.lucene.facet.search.results | Results of Faceted Search
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation
org.apache.lucene.facet.taxonomy | Taxonomy of Categories
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.facet.taxonomy.writercache | Improves indexing time by caching a map of CategoryPath to their Ordinal
org.apache.lucene.facet.taxonomy.writercache.cl2o | Category->Ordinal caching implementation using an optimized data-structures
org.apache.lucene.facet.taxonomy.writercache.lru | An LRU cache implementation for the CategoryPath to Ordinal map
org.apache.lucene.facet.util | Various utilities for faceted search

contrib: Grouping
org.apache.lucene.search.grouping This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.

contrib: Highlighter
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.search.vectorhighlight | This is an another highlighter implementation.

contrib: Instantiated
org.apache.lucene.store.instantiated InstantiatedIndex, alternative RAM store for small corpora.

contrib: Join
org.apache.lucene.search.join This modules support index-time and query-time joins.

contrib: Memory
org.apache.lucene.index.memory High-performance single-document main memory Apache Lucene fulltext search index.

contrib: Misc
org.apache.lucene.misc Miscellaneous index tools.

contrib: Pruning
org.apache.lucene.index.pruning
Static Index Pruning Tools

contrib: Queries
org.apache.lucene.search.regex | Regular expression Query.
org.apache.lucene.search.similar | Document similarity query generators.

contrib: Query Parser
org.apache.lucene.queryParser.analyzing | QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.
org.apache.lucene.queryParser.complexPhrase | QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
org.apache.lucene.queryParser.core | Contains the core classes of the flexible query parser framework
org.apache.lucene.queryParser.core.builders | Contains the necessary classes to implement query builders
org.apache.lucene.queryParser.core.config | Contains the base classes used to configure the query processing
org.apache.lucene.queryParser.core.messages | Contains messages usually used by query parser implementations
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.core.parser | Contains the necessary interfaces to implement text parsers
org.apache.lucene.queryParser.core.processors | Interfaces and implementations used by query node processors
org.apache.lucene.queryParser.core.util | Utility classes to used with the Query Parser
org.apache.lucene.queryParser.ext | Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.
org.apache.lucene.queryParser.precedence | This package contains the Precedence Query Parser Implementation
org.apache.lucene.queryParser.precedence.processors | This package contains the processors used by Precedence Query Parser
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes
org.apache.lucene.queryParser.standard.parser | Lucene Query Parser
org.apache.lucene.queryParser.standard.processors | Lucene Query Node Processors
org.apache.lucene.queryParser.surround.parser | This package contains the QueryParser.jj source file for the Surround parser.
org.apache.lucene.queryParser.surround.query | This package contains SrndQuery and its subclasses.

contrib: Spatial
org.apache.lucene.spatial | Support for geospatial search.
org.apache.lucene.spatial.geohash | Support for Geohash encoding, decoding, and filtering.
org.apache.lucene.spatial.geometry | Coordinate and distance representations.
org.apache.lucene.spatial.geometry.shape | Shape representations.
org.apache.lucene.spatial.tier | Support for filtering based upon geographic location.
org.apache.lucene.spatial.tier.projections | Spatial projections.

contrib: SpellChecker
org.apache.lucene.search.spell | Suggest alternate spellings for words.
org.apache.lucene.search.suggest | Support for Autocomplete/Autosuggest
org.apache.lucene.search.suggest.fst | Finite-state based autosuggest.
org.apache.lucene.search.suggest.jaspell | JaSpell-based autosuggest.
org.apache.lucene.search.suggest.tst | Ternary Search Tree based autosuggest.

contrib: XML Query Parser
org.apache.lucene.xmlparser | Parser that produces Lucene Query objects from XML streams.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Apache Lucene is a high-performance, full-featured text search engine library. Here's a simple example how to use Lucene for indexing and searching (using JUnit to check if the results are what we expect):

    Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_CURRENT);

    // Store the index in memory:
    Directory directory = new RAMDirectory();
    // To store an index on disk, use this instead:
    //Directory directory = FSDirectory.open("/tmp/testindex");
    IndexWriter iwriter = new IndexWriter(directory, analyzer, true,
                                          new IndexWriter.MaxFieldLength(25000));
    Document doc = new Document();
    String text = "This is the text to be indexed.";
    doc.add(new Field("fieldname", text, Field.Store.YES,
        Field.Index.ANALYZED));
    iwriter.addDocument(doc);
    iwriter.close();

    // Now search the index:
    IndexReader ireader = IndexReader.open(directory); // read-only=true
    IndexSearcher isearcher = new IndexSearcher(ireader);
    // Parse a simple query that searches for "text":
    QueryParser parser = new QueryParser("fieldname", analyzer);
    Query query = parser.parse("text");
    ScoreDoc[] hits = isearcher.search(query, null, 1000).scoreDocs;
    assertEquals(1, hits.length);
    // Iterate through the results:
    for (int i = 0; i < hits.length; i++) {
      Document hitDoc = isearcher.doc(hits[i].doc);
      assertEquals("This is the text to be indexed.", hitDoc.get("fieldname"));
    }
    isearcher.close();
    ireader.close();
    directory.close();

The Lucene API is divided into several packages:

  • org.apache.lucene.analysis defines an abstract Analyzer API for converting text from a java.io.Reader into a TokenStream, an enumeration of token Attributes. A TokenStream can be composed by applying TokenFilters to the output of a Tokenizer. Tokenizers and TokenFilters are strung together and applied with an Analyzer. A handful of Analyzer implementations are provided, including StopAnalyzer and the grammar-based StandardAnalyzer.
  • org.apache.lucene.document provides a simple Document class. A Document is simply a set of named Fields, whose values may be strings or instances of java.io.Reader.
  • org.apache.lucene.index provides two primary classes: IndexWriter, which creates and adds documents to indices; and IndexReader, which accesses the data in the index.
  • org.apache.lucene.search provides data structures to represent queries (ie TermQuery for individual words, PhraseQuery for phrases, and BooleanQuery for boolean combinations of queries) and the abstract Searcher which turns queries into TopDocs. IndexSearcher implements search over a single IndexReader.
  • org.apache.lucene.queryParser uses JavaCC to implement a QueryParser.
  • org.apache.lucene.store defines an abstract class for storing persistent data, the Directory, which is a collection of named files written by an IndexOutput and read by an IndexInput. Multiple implementations are provided, including FSDirectory, which uses a file system directory to store files, and RAMDirectory which implements files as memory-resident data structures.
  • org.apache.lucene.util contains a few handy data structures and util classes, ie BitVector and PriorityQueue.
To use Lucene, an application should:
  1. Create Documents by adding Fields;
  2. Create an IndexWriter and add documents to it with addDocument();
  3. Call QueryParser.parse() to build a query from a string; and
  4. Create an IndexSearcher and pass the query to its search() method.
Some simple examples of code which does this are:
  • IndexFiles.java creates an index for all the files contained in a directory.
  • SearchFiles.java prompts for queries and searches an index.
To demonstrate these, try something like:
> java -cp lucene.jar:lucene-demo.jar:lucene-analyzers-common.jar org.apache.lucene.demo.IndexFiles rec.food.recipes/soups
adding rec.food.recipes/soups/abalone-chowder
  [ ... ]

> java -cp lucene.jar:lucene-demo.jar:lucene-analyzers-common.jar org.apache.lucene.demo.SearchFiles
Query: chowder
Searching for: chowder
34 total matching documents
1. rec.food.recipes/soups/spam-chowder
  [ ... thirty-four documents contain the word "chowder" ... ]

Query: "clam chowder" AND Manhattan
Searching for: +"clam chowder" +manhattan
2 total matching documents
1. rec.food.recipes/soups/clam-chowder
  [ ... two documents contain the phrase "clam chowder" and the word "manhattan" ... ]
[ Note: "+" and "-" are canonical, but "AND", "OR" and "NOT" may be used. ]

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PREV NEXT FRAMES NO FRAMES

Hierarchy For All Packages

Package Hierarchies:
org.apache.lucene, org.apache.lucene.analysis, org.apache.lucene.analysis.ar, org.apache.lucene.analysis.bg, org.apache.lucene.analysis.br, org.apache.lucene.analysis.ca, org.apache.lucene.analysis.charfilter, org.apache.lucene.analysis.cjk, org.apache.lucene.analysis.cn, org.apache.lucene.analysis.cn.smart, org.apache.lucene.analysis.cn.smart.hhmm, org.apache.lucene.analysis.compound, org.apache.lucene.analysis.compound.hyphenation, org.apache.lucene.analysis.cz, org.apache.lucene.analysis.da, org.apache.lucene.analysis.de, org.apache.lucene.analysis.el, org.apache.lucene.analysis.en, org.apache.lucene.analysis.es, org.apache.lucene.analysis.eu, org.apache.lucene.analysis.fa, org.apache.lucene.analysis.fi, org.apache.lucene.analysis.fr, org.apache.lucene.analysis.ga, org.apache.lucene.analysis.gl, org.apache.lucene.analysis.hi, org.apache.lucene.analysis.hu, org.apache.lucene.analysis.hunspell, org.apache.lucene.analysis.hy, org.apache.lucene.analysis.icu, org.apache.lucene.analysis.icu.segmentation, org.apache.lucene.analysis.icu.tokenattributes, org.apache.lucene.analysis.id, org.apache.lucene.analysis.in, org.apache.lucene.analysis.it, org.apache.lucene.analysis.ja, org.apache.lucene.analysis.ja.dict, org.apache.lucene.analysis.ja.tokenattributes, org.apache.lucene.analysis.ja.util, org.apache.lucene.analysis.lv, org.apache.lucene.analysis.miscellaneous, org.apache.lucene.analysis.ngram, org.apache.lucene.analysis.nl, org.apache.lucene.analysis.no, org.apache.lucene.analysis.path, org.apache.lucene.analysis.payloads, org.apache.lucene.analysis.phonetic, org.apache.lucene.analysis.pl, org.apache.lucene.analysis.position, org.apache.lucene.analysis.pt, org.apache.lucene.analysis.query, org.apache.lucene.analysis.reverse, org.apache.lucene.analysis.ro, org.apache.lucene.analysis.ru, org.apache.lucene.analysis.shingle, org.apache.lucene.analysis.sinks, org.apache.lucene.analysis.snowball, org.apache.lucene.analysis.standard, org.apache.lucene.analysis.standard.std31, org.apache.lucene.analysis.standard.std34, org.apache.lucene.analysis.stempel, org.apache.lucene.analysis.sv, org.apache.lucene.analysis.synonym, org.apache.lucene.analysis.th, org.apache.lucene.analysis.tokenattributes, org.apache.lucene.analysis.tr, org.apache.lucene.analysis.util, org.apache.lucene.analysis.wikipedia, org.apache.lucene.benchmark, org.apache.lucene.benchmark.byTask, org.apache.lucene.benchmark.byTask.feeds, org.apache.lucene.benchmark.byTask.feeds.demohtml, org.apache.lucene.benchmark.byTask.programmatic, org.apache.lucene.benchmark.byTask.stats, org.apache.lucene.benchmark.byTask.tasks, org.apache.lucene.benchmark.byTask.utils, org.apache.lucene.benchmark.quality, org.apache.lucene.benchmark.quality.trec, org.apache.lucene.benchmark.quality.utils, org.apache.lucene.benchmark.utils, org.apache.lucene.collation, org.apache.lucene.demo, org.apache.lucene.document, org.apache.lucene.facet, org.apache.lucene.facet.enhancements, org.apache.lucene.facet.enhancements.association, org.apache.lucene.facet.enhancements.params, org.apache.lucene.facet.index, org.apache.lucene.facet.index.attributes, org.apache.lucene.facet.index.categorypolicy, org.apache.lucene.facet.index.params, org.apache.lucene.facet.index.streaming, org.apache.lucene.facet.search, org.apache.lucene.facet.search.aggregator, org.apache.lucene.facet.search.aggregator.association, org.apache.lucene.facet.search.cache, org.apache.lucene.facet.search.params, org.apache.lucene.facet.search.params.association, org.apache.lucene.facet.search.results, org.apache.lucene.facet.search.sampling, org.apache.lucene.facet.taxonomy, org.apache.lucene.facet.taxonomy.directory, org.apache.lucene.facet.taxonomy.writercache, org.apache.lucene.facet.taxonomy.writercache.cl2o, org.apache.lucene.facet.taxonomy.writercache.lru, org.apache.lucene.facet.util, org.apache.lucene.index, org.apache.lucene.index.memory, org.apache.lucene.index.pruning, org.apache.lucene.messages, org.apache.lucene.misc, org.apache.lucene.queryParser, org.apache.lucene.queryParser.analyzing, org.apache.lucene.queryParser.complexPhrase, org.apache.lucene.queryParser.core, org.apache.lucene.queryParser.core.builders, org.apache.lucene.queryParser.core.config, org.apache.lucene.queryParser.core.messages, org.apache.lucene.queryParser.core.nodes, org.apache.lucene.queryParser.core.parser, org.apache.lucene.queryParser.core.processors, org.apache.lucene.queryParser.core.util, org.apache.lucene.queryParser.ext, org.apache.lucene.queryParser.precedence, org.apache.lucene.queryParser.precedence.processors, org.apache.lucene.queryParser.standard, org.apache.lucene.queryParser.standard.builders, org.apache.lucene.queryParser.standard.config, org.apache.lucene.queryParser.standard.nodes, org.apache.lucene.queryParser.standard.parser, org.apache.lucene.queryParser.standard.processors, org.apache.lucene.queryParser.surround.parser, org.apache.lucene.queryParser.surround.query, org.apache.lucene.search, org.apache.lucene.search.function, org.apache.lucene.search.grouping, org.apache.lucene.search.highlight, org.apache.lucene.search.join, org.apache.lucene.search.payloads, org.apache.lucene.search.regex, org.apache.lucene.search.similar, org.apache.lucene.search.spans, org.apache.lucene.search.spell, org.apache.lucene.search.suggest, org.apache.lucene.search.suggest.fst, org.apache.lucene.search.suggest.jaspell, org.apache.lucene.search.suggest.tst, org.apache.lucene.search.vectorhighlight, org.apache.lucene.spatial, org.apache.lucene.spatial.geohash, org.apache.lucene.spatial.geometry, org.apache.lucene.spatial.geometry.shape, org.apache.lucene.spatial.tier, org.apache.lucene.spatial.tier.projections, org.apache.lucene.store, org.apache.lucene.store.instantiated, org.apache.lucene.util, org.apache.lucene.util.collections, org.apache.lucene.util.encoding, org.apache.lucene.util.fst, org.apache.lucene.util.packed, org.apache.lucene.xmlparser, org.apache.lucene.xmlparser.builders, org.egothor.stemmer, org.tartarus.snowball, org.tartarus.snowball.ext

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.store._TestHelper
    • org.apache.lucene.util._TestUtil
    • org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.GroupHead<GROUP_VALUE_TYPE>
    • org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.TemporalResult
    • org.apache.lucene.index.AbstractAllTermDocs (implements org.apache.lucene.index.TermDocs)
    • java.util.AbstractCollection<E> (implements java.util.Collection<E>)
      • java.util.AbstractSet<E> (implements java.util.Set<E>)
        • org.apache.lucene.analysis.CharArrayMap.EntrySet
        • org.apache.lucene.analysis.CharArraySet
        • org.apache.lucene.util.MapBackedSet<E> (implements java.io.Serializable)
    • org.apache.lucene.analysis.payloads.AbstractEncoder (implements org.apache.lucene.analysis.payloads.PayloadEncoder)
      • org.apache.lucene.analysis.payloads.FloatEncoder (implements org.apache.lucene.analysis.payloads.PayloadEncoder)
      • org.apache.lucene.analysis.payloads.IdentityEncoder (implements org.apache.lucene.analysis.payloads.PayloadEncoder)
      • org.apache.lucene.analysis.payloads.IntegerEncoder (implements org.apache.lucene.analysis.payloads.PayloadEncoder)
    • org.apache.lucene.document.AbstractField (implements org.apache.lucene.document.Fieldable)
      • org.apache.lucene.document.Field (implements org.apache.lucene.document.Fieldable, java.io.Serializable)
      • org.apache.lucene.document.NumericField
    • java.util.AbstractMap<K,V> (implements java.util.Map<K,V>)
      • org.apache.lucene.analysis.CharArrayMap<V>
      • java.util.HashMap<K,V> (implements java.lang.Cloneable, java.util.Map<K,V>, java.io.Serializable)
        • java.util.LinkedHashMap<K,V> (implements java.util.Map<K,V>)
          • org.apache.lucene.util.collections.LRUHashMap<K,V>
        • org.apache.lucene.search.highlight.WeightedSpanTermExtractor.PositionCheckingMap<K>
    • org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker (implements org.apache.lucene.benchmark.byTask.feeds.QueryMaker)
      • org.apache.lucene.benchmark.byTask.feeds.EnwikiQueryMaker
      • org.apache.lucene.benchmark.byTask.feeds.FileBasedQueryMaker
      • org.apache.lucene.benchmark.byTask.feeds.ReutersQueryMaker (implements org.apache.lucene.benchmark.byTask.feeds.QueryMaker)
      • org.apache.lucene.benchmark.byTask.feeds.SimpleQueryMaker
        • org.apache.lucene.benchmark.byTask.feeds.SimpleSloppyPhraseQueryMaker
    • org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>
    • org.apache.lucene.benchmark.byTask.utils.Algorithm
    • org.tartarus.snowball.Among
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.collation.CollationKeyAnalyzer
      • org.apache.lucene.collation.ICUCollationKeyAnalyzer
      • org.apache.lucene.analysis.LimitTokenCountAnalyzer
      • org.apache.lucene.analysis.MockAnalyzer
      • org.apache.lucene.analysis.PerFieldAnalyzerWrapper
      • org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
      • org.apache.lucene.queryParser.QueryParserTestBase.QPTestAnalyzer
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.cn.ChineseAnalyzer
        • org.apache.lucene.analysis.cz.CzechAnalyzer
        • org.apache.lucene.analysis.nl.DutchAnalyzer
        • org.apache.lucene.analysis.KeywordAnalyzer
        • org.apache.lucene.analysis.miscellaneous.PatternAnalyzer
        • org.apache.lucene.analysis.SimpleAnalyzer
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.ar.ArabicAnalyzer
          • org.apache.lucene.analysis.hy.ArmenianAnalyzer
          • org.apache.lucene.analysis.eu.BasqueAnalyzer
          • org.apache.lucene.analysis.br.BrazilianAnalyzer
          • org.apache.lucene.analysis.bg.BulgarianAnalyzer
          • org.apache.lucene.analysis.ca.CatalanAnalyzer
          • org.apache.lucene.analysis.cjk.CJKAnalyzer
          • org.apache.lucene.analysis.standard.ClassicAnalyzer
          • org.apache.lucene.analysis.da.DanishAnalyzer
          • org.apache.lucene.analysis.en.EnglishAnalyzer
          • org.apache.lucene.analysis.fi.FinnishAnalyzer
          • org.apache.lucene.analysis.fr.FrenchAnalyzer
          • org.apache.lucene.analysis.gl.GalicianAnalyzer
          • org.apache.lucene.analysis.de.GermanAnalyzer
          • org.apache.lucene.analysis.el.GreekAnalyzer
          • org.apache.lucene.analysis.hi.HindiAnalyzer
          • org.apache.lucene.analysis.hu.HungarianAnalyzer
          • org.apache.lucene.analysis.id.IndonesianAnalyzer
          • org.apache.lucene.analysis.ga.IrishAnalyzer
          • org.apache.lucene.analysis.it.ItalianAnalyzer
          • org.apache.lucene.analysis.ja.JapaneseAnalyzer
          • org.apache.lucene.analysis.lv.LatvianAnalyzer
          • org.apache.lucene.analysis.no.NorwegianAnalyzer
          • org.apache.lucene.analysis.fa.PersianAnalyzer
          • org.apache.lucene.analysis.pl.PolishAnalyzer
          • org.apache.lucene.analysis.pt.PortugueseAnalyzer
          • org.apache.lucene.analysis.ro.RomanianAnalyzer
          • org.apache.lucene.analysis.ru.RussianAnalyzer
          • org.apache.lucene.analysis.es.SpanishAnalyzer
          • org.apache.lucene.analysis.standard.StandardAnalyzer
          • org.apache.lucene.analysis.StopAnalyzer
          • org.apache.lucene.analysis.sv.SwedishAnalyzer
          • org.apache.lucene.analysis.th.ThaiAnalyzer
          • org.apache.lucene.analysis.tr.TurkishAnalyzer
          • org.apache.lucene.analysis.standard.UAX29URLEmailAnalyzer
        • org.apache.lucene.analysis.WhitespaceAnalyzer
      • org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper
      • org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer
      • org.apache.lucene.analysis.snowball.SnowballAnalyzer
    • org.apache.lucene.analysis.cn.smart.AnalyzerProfile
    • org.apache.lucene.queryParser.standard.builders.AnyQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.analysis.ar.ArabicNormalizer
    • org.apache.lucene.analysis.ar.ArabicStemmer
    • org.apache.lucene.util.collections.ArrayHashMap<K,V> (implements java.lang.Iterable<T>)
    • org.apache.lucene.util.ArrayUtil
    • org.junit.Assert
      • org.apache.lucene.util.LuceneTestCase
        • org.apache.lucene.analysis.BaseTokenStreamTestCase
        • org.apache.lucene.analysis.CollationTestBase
        • org.apache.lucene.queryParser.QueryParserTestBase
        • org.apache.lucene.search.SearchEquivalenceTestBase
        • org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase
    • org.apache.lucene.facet.enhancements.association.AssociationEnhancement (implements org.apache.lucene.facet.enhancements.CategoryEnhancement)
    • org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator (implements org.apache.lucene.facet.search.aggregator.Aggregator)
    • org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator (implements org.apache.lucene.facet.search.aggregator.Aggregator)
    • org.apache.lucene.facet.enhancements.association.AssociationProperty (implements org.apache.lucene.facet.index.attributes.CategoryProperty)
      • org.apache.lucene.facet.enhancements.association.AssociationFloatProperty
      • org.apache.lucene.facet.enhancements.association.AssociationIntProperty
    • org.apache.lucene.facet.enhancements.association.AssociationsPayloadIterator
    • org.apache.lucene.util.AttributeImpl (implements org.apache.lucene.util.Attribute, java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl (implements org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttribute, org.apache.lucene.queryParser.core.config.ConfigAttribute)
      • org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl (implements org.apache.lucene.queryParser.standard.config.AnalyzerAttribute, org.apache.lucene.queryParser.core.config.ConfigAttribute)
      • org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttributeImpl (implements org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttribute, java.lang.Cloneable)
      • org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl (implements org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttribute)
      • org.apache.lucene.queryParser.standard.config.BoostAttributeImpl (implements org.apache.lucene.queryParser.standard.config.BoostAttribute, org.apache.lucene.queryParser.core.config.ConfigAttribute)
      • org.apache.lucene.facet.index.attributes.CategoryAttributeImpl (implements org.apache.lucene.facet.index.attributes.CategoryAttribute)
      • org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl (implements org.apache.lucene.analysis.tokenattributes.CharTermAttribute, java.lang.Cloneable, java.io.Serializable, org.apache.lucene.analysis.tokenattributes.TermAttribute)
        • org.apache.lucene.analysis.tokenattributes.TermAttributeImpl
          • org.apache.lucene.analysis.Token (implements org.apache.lucene.analysis.tokenattributes.FlagsAttribute, org.apache.lucene.analysis.tokenattributes.OffsetAttribute, org.apache.lucene.analysis.tokenattributes.PayloadAttribute, org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute, org.apache.lucene.analysis.tokenattributes.PositionLengthAttribute, org.apache.lucene.analysis.tokenattributes.TypeAttribute)
      • org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.DateResolutionAttribute)
      • org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute)
      • org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttribute)
      • org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.FieldBoostMapAttribute)
      • org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttribute)
      • org.apache.lucene.analysis.tokenattributes.FlagsAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.tokenattributes.FlagsAttribute, java.io.Serializable)
      • org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.FuzzyAttribute)
      • org.apache.lucene.analysis.ja.tokenattributes.InflectionAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.ja.tokenattributes.InflectionAttribute)
      • org.apache.lucene.analysis.tokenattributes.KeywordAttributeImpl (implements org.apache.lucene.analysis.tokenattributes.KeywordAttribute)
      • org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.LocaleAttribute)
      • org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttribute)
      • org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.MultiFieldAttribute)
      • org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute)
      • org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.tokenattributes.OffsetAttribute, java.io.Serializable)
      • org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttribute)
      • org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.tokenattributes.PayloadAttribute, java.io.Serializable)
      • org.apache.lucene.analysis.tokenattributes.PositionIncrementAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute, java.io.Serializable)
      • org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.PositionIncrementsAttribute)
      • org.apache.lucene.analysis.tokenattributes.PositionLengthAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.tokenattributes.PositionLengthAttribute)
      • org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.RangeCollatorAttribute)
      • org.apache.lucene.analysis.ja.tokenattributes.ReadingAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.ja.tokenattributes.ReadingAttribute)
      • org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.icu.tokenattributes.ScriptAttribute, java.io.Serializable)
      • org.apache.lucene.analysis.tokenattributes.TypeAttributeImpl (implements java.lang.Cloneable, java.io.Serializable, org.apache.lucene.analysis.tokenattributes.TypeAttribute)
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.queryParser.core.config.AbstractQueryConfig
        • org.apache.lucene.queryParser.core.config.FieldConfig
        • org.apache.lucene.queryParser.core.config.QueryConfigHandler
          • org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.CannedTokenStream
        • org.apache.lucene.facet.index.streaming.CategoryAttributesStream
        • org.apache.lucene.analysis.miscellaneous.EmptyTokenStream
        • org.apache.lucene.analysis.NumericTokenStream
        • org.apache.lucene.analysis.miscellaneous.PrefixAndSuffixAwareTokenFilter
        • org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter
        • org.apache.lucene.analysis.shingle.ShingleMatrixFilter
        • org.apache.lucene.analysis.miscellaneous.SingleTokenTokenStream
        • org.apache.lucene.analysis.TeeSinkTokenFilter.SinkTokenStream
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.ar.ArabicNormalizationFilter
          • org.apache.lucene.analysis.ar.ArabicStemFilter
          • org.apache.lucene.analysis.ASCIIFoldingFilter
          • org.apache.lucene.analysis.phonetic.BeiderMorseFilter
          • org.apache.lucene.analysis.br.BrazilianStemFilter
          • org.apache.lucene.analysis.bg.BulgarianStemFilter
          • org.apache.lucene.analysis.CachingTokenFilter
          • org.apache.lucene.facet.index.streaming.CategoryParentsStream
          • org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
            • org.apache.lucene.facet.index.streaming.CategoryListTokenizer
              • org.apache.lucene.facet.enhancements.association.AssociationListTokenizer
              • org.apache.lucene.facet.index.streaming.CountingListTokenizer
            • org.apache.lucene.facet.index.streaming.CategoryTokenizer
              • org.apache.lucene.facet.enhancements.EnhancementsCategoryTokenizer
          • org.apache.lucene.analysis.cn.ChineseFilter
          • org.apache.lucene.analysis.cjk.CJKBigramFilter
          • org.apache.lucene.analysis.cjk.CJKWidthFilter
          • org.apache.lucene.analysis.standard.ClassicFilter
          • org.apache.lucene.collation.CollationKeyFilter
          • org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
            • org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter
            • org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
          • org.apache.lucene.analysis.cz.CzechStemFilter
          • org.apache.lucene.analysis.payloads.DelimitedPayloadTokenFilter
          • org.apache.lucene.analysis.phonetic.DoubleMetaphoneFilter
          • org.apache.lucene.analysis.nl.DutchStemFilter
          • org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter
          • org.apache.lucene.analysis.fr.ElisionFilter
          • org.apache.lucene.analysis.en.EnglishMinimalStemFilter
          • org.apache.lucene.analysis.en.EnglishPossessiveFilter
          • org.apache.lucene.analysis.FilteringTokenFilter
            • org.apache.lucene.analysis.ja.JapanesePartOfSpeechStopFilter
            • org.apache.lucene.analysis.LengthFilter
            • org.apache.lucene.analysis.StopFilter
            • org.apache.lucene.analysis.TypeTokenFilter
          • org.apache.lucene.analysis.fi.FinnishLightStemFilter
          • org.apache.lucene.analysis.fr.FrenchLightStemFilter
          • org.apache.lucene.analysis.fr.FrenchMinimalStemFilter
          • org.apache.lucene.analysis.fr.FrenchStemFilter
          • org.apache.lucene.analysis.gl.GalicianMinimalStemFilter
          • org.apache.lucene.analysis.gl.GalicianStemFilter
          • org.apache.lucene.analysis.de.GermanLightStemFilter
          • org.apache.lucene.analysis.de.GermanMinimalStemFilter
          • org.apache.lucene.analysis.de.GermanNormalizationFilter
          • org.apache.lucene.analysis.de.GermanStemFilter
          • org.apache.lucene.analysis.el.GreekLowerCaseFilter
          • org.apache.lucene.analysis.el.GreekStemFilter
          • org.apache.lucene.analysis.hi.HindiNormalizationFilter
          • org.apache.lucene.analysis.hi.HindiStemFilter
          • org.apache.lucene.analysis.hu.HungarianLightStemFilter
          • org.apache.lucene.analysis.hunspell.HunspellStemFilter
          • org.apache.lucene.collation.ICUCollationKeyFilter
          • org.apache.lucene.analysis.icu.ICUNormalizer2Filter
            • org.apache.lucene.analysis.icu.ICUFoldingFilter
          • org.apache.lucene.analysis.icu.ICUTransformFilter
          • org.apache.lucene.analysis.in.IndicNormalizationFilter
          • org.apache.lucene.analysis.id.IndonesianStemFilter
          • org.apache.lucene.analysis.ga.IrishLowerCaseFilter
          • org.apache.lucene.analysis.ISOLatin1AccentFilter
          • org.apache.lucene.analysis.it.ItalianLightStemFilter
          • org.apache.lucene.analysis.ja.JapaneseBaseFormFilter
          • org.apache.lucene.analysis.ja.JapaneseKatakanaStemFilter
          • org.apache.lucene.analysis.ja.JapaneseReadingFormFilter
          • org.apache.lucene.analysis.KeywordMarkerFilter
          • org.apache.lucene.analysis.en.KStemFilter
          • org.apache.lucene.analysis.lv.LatvianStemFilter
          • org.apache.lucene.analysis.LimitTokenCountFilter
          • org.apache.lucene.analysis.LookaheadTokenFilter<T>
            • org.apache.lucene.analysis.MockGraphTokenFilter
            • org.apache.lucene.analysis.MockRandomLookaheadTokenFilter
          • org.apache.lucene.analysis.LowerCaseFilter
          • org.apache.lucene.analysis.MockFixedLengthPayloadFilter
          • org.apache.lucene.analysis.MockHoleInjectingTokenFilter
          • org.apache.lucene.analysis.MockVariableLengthPayloadFilter
          • org.apache.lucene.analysis.ngram.NGramTokenFilter
          • org.apache.lucene.analysis.no.NorwegianLightStemFilter
          • org.apache.lucene.analysis.no.NorwegianMinimalStemFilter
          • org.apache.lucene.analysis.payloads.NumericPayloadTokenFilter
          • org.apache.lucene.search.highlight.OffsetLimitTokenFilter
          • org.apache.lucene.analysis.fa.PersianNormalizationFilter
          • org.apache.lucene.analysis.phonetic.PhoneticFilter
          • org.apache.lucene.analysis.PorterStemFilter
          • org.apache.lucene.analysis.pt.PortugueseLightStemFilter
          • org.apache.lucene.analysis.pt.PortugueseMinimalStemFilter
          • org.apache.lucene.analysis.pt.PortugueseStemFilter
          • org.apache.lucene.analysis.position.PositionFilter
          • org.apache.lucene.queryParser.QueryParserTestBase.QPTestFilter
          • org.apache.lucene.analysis.reverse.ReverseStringFilter
          • org.apache.lucene.analysis.ru.RussianLightStemFilter
          • org.apache.lucene.analysis.ru.RussianLowerCaseFilter
          • org.apache.lucene.analysis.ru.RussianStemFilter
          • org.apache.lucene.analysis.shingle.ShingleFilter
          • org.apache.lucene.analysis.snowball.SnowballFilter
          • org.apache.lucene.analysis.es.SpanishLightStemFilter
          • org.apache.lucene.analysis.standard.StandardFilter
          • org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter
          • org.apache.lucene.analysis.stempel.StempelFilter
          • org.apache.lucene.analysis.sv.SwedishLightStemFilter
          • org.apache.lucene.analysis.synonym.SynonymFilter
          • org.apache.lucene.analysis.TeeSinkTokenFilter
          • org.apache.lucene.analysis.th.ThaiWordFilter
          • org.apache.lucene.analysis.payloads.TokenOffsetPayloadTokenFilter
          • org.apache.lucene.analysis.tr.TurkishLowerCaseFilter
          • org.apache.lucene.analysis.payloads.TypeAsPayloadTokenFilter
          • org.apache.lucene.analysis.ValidatingTokenFilter
          • org.apache.lucene.analysis.cn.smart.WordTokenFilter
        • org.apache.lucene.analysis.Tokenizer
          • org.apache.lucene.analysis.CharTokenizer
            • org.apache.lucene.analysis.in.IndicTokenizer
            • org.apache.lucene.analysis.LetterTokenizer
              • org.apache.lucene.analysis.ar.ArabicLetterTokenizer
              • org.apache.lucene.analysis.LowerCaseTokenizer
            • org.apache.lucene.analysis.ru.RussianLetterTokenizer
            • org.apache.lucene.analysis.WhitespaceTokenizer
          • org.apache.lucene.analysis.cn.ChineseTokenizer
          • org.apache.lucene.analysis.cjk.CJKTokenizer
          • org.apache.lucene.analysis.standard.ClassicTokenizer
          • org.apache.lucene.analysis.ngram.EdgeNGramTokenizer
          • org.apache.lucene.analysis.EmptyTokenizer
          • org.apache.lucene.analysis.icu.segmentation.ICUTokenizer
          • org.apache.lucene.analysis.ja.JapaneseTokenizer
          • org.apache.lucene.analysis.KeywordTokenizer
          • org.apache.lucene.analysis.MockTokenizer
          • org.apache.lucene.analysis.ngram.NGramTokenizer
          • org.apache.lucene.analysis.path.PathHierarchyTokenizer
          • org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer
          • org.apache.lucene.analysis.cn.smart.SentenceTokenizer
          • org.apache.lucene.analysis.standard.StandardTokenizer
          • org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
          • org.apache.lucene.analysis.wikipedia.WikipediaTokenizer
        • org.apache.lucene.search.highlight.TokenStreamFromTermPositionVector
    • org.apache.lucene.util.AttributeSource.AttributeFactory
      • org.apache.lucene.analysis.Token.TokenAttributeFactory
    • org.apache.lucene.util.AttributeSource.State (implements java.lang.Cloneable)
    • org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams
    • org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder (implements org.apache.lucene.search.vectorhighlight.FragmentsBuilder)
      • org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder
      • org.apache.lucene.search.vectorhighlight.SimpleFragmentsBuilder
    • org.apache.lucene.queryParser.surround.query.BasicQueryFactory
    • org.apache.lucene.benchmark.byTask.Benchmark
    • org.apache.lucene.benchmark.byTask.tasks.BenchmarkHighlighter
    • org.apache.lucene.analysis.ja.dict.BinaryDictionary (implements org.apache.lucene.analysis.ja.dict.Dictionary)
      • org.apache.lucene.analysis.ja.dict.TokenInfoDictionary
      • org.apache.lucene.analysis.ja.dict.UnknownDictionary
    • org.apache.lucene.util.Bits.MatchAllBits (implements org.apache.lucene.util.Bits)
    • org.apache.lucene.util.Bits.MatchNoBits (implements org.apache.lucene.util.Bits)
    • org.apache.lucene.util.BitUtil
    • org.apache.lucene.util.BitVector (implements org.apache.lucene.util.Bits, java.lang.Cloneable)
    • org.apache.lucene.search.BooleanClause (implements java.io.Serializable)
    • org.apache.lucene.xmlparser.builders.BooleanFilterBuilder (implements org.apache.lucene.xmlparser.FilterBuilder)
    • org.apache.lucene.xmlparser.builders.BooleanQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.BooleanQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.xmlparser.builders.BoostingQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.BoostQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.analysis.br.BrazilianStemmer
    • com.ibm.icu.text.BreakIterator (implements java.lang.Cloneable)
      • org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator
    • org.apache.lucene.search.vectorhighlight.BreakIteratorBoundaryScanner (implements org.apache.lucene.search.vectorhighlight.BoundaryScanner)
    • org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper (implements org.apache.lucene.search.spell.TermFreqIterator)
      • org.apache.lucene.search.suggest.UnsortedTermFreqIteratorWrapper
    • org.apache.lucene.util.fst.Builder<T>
    • org.apache.lucene.util.fst.Builder.Arc<T>
    • org.apache.lucene.util.fst.Builder.FreezeTail<T>
    • org.apache.lucene.util.fst.Builder.UnCompiledNode<T>
    • org.apache.lucene.analysis.bg.BulgarianStemmer
    • org.apache.lucene.util.ByteBlockPool
    • org.apache.lucene.util.ByteBlockPool.Allocator
      • org.apache.lucene.util.ByteBlockPool.DirectAllocator
      • org.apache.lucene.util.ByteBlockPool.DirectTrackingAllocator
      • org.apache.lucene.util.RecyclingByteBlockAllocator
    • org.apache.lucene.util.BytesRef (implements java.lang.Cloneable, java.lang.Comparable<T>)
    • org.apache.lucene.util.fst.BytesRefFSTEnum<T>
    • org.apache.lucene.util.fst.BytesRefFSTEnum.InputOutput<T>
    • org.apache.lucene.util.BytesRefHash
    • org.apache.lucene.util.BytesRefHash.BytesStartArray
      • org.apache.lucene.util.BytesRefHash.DirectBytesStartArray
      • org.apache.lucene.util.BytesRefHash.TrackingDirectBytesStartArray
    • org.apache.lucene.search.suggest.BytesRefList
    • org.apache.lucene.analysis.compound.hyphenation.ByteVector (implements java.io.Serializable)
    • org.apache.lucene.xmlparser.builders.CachedFilterBuilder (implements org.apache.lucene.xmlparser.FilterBuilder)
    • org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy.ByDocComparator (implements java.util.Comparator<T>)
    • org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy.ByDocComparator (implements java.util.Comparator<T>)
    • org.apache.lucene.spatial.geometry.CartesianPoint
    • org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder
    • org.apache.lucene.spatial.tier.projections.CartesianTierPlotter
    • org.apache.lucene.facet.index.attributes.CategoryAttributesIterable (implements java.lang.Iterable<T>)
    • org.apache.lucene.facet.index.CategoryContainer (implements java.lang.Iterable<T>, java.io.Serializable)
    • org.apache.lucene.facet.index.CategoryDocumentBuilder
      • org.apache.lucene.facet.enhancements.EnhancementsDocumentBuilder
    • org.apache.lucene.facet.search.cache.CategoryListCache
    • org.apache.lucene.facet.search.cache.CategoryListData
    • org.apache.lucene.facet.index.params.CategoryListParams (implements java.io.Serializable)
    • org.apache.lucene.facet.index.CategoryListPayloadStream
    • org.apache.lucene.facet.taxonomy.CategoryPath (implements java.lang.Cloneable, java.lang.Comparable<T>, java.io.Serializable)
    • org.apache.lucene.analysis.ja.dict.CharacterDefinition
    • org.apache.lucene.util.CharacterUtils
    • org.apache.lucene.util.CharacterUtils.CharacterBuffer
    • org.apache.lucene.analysis.util.CharArrayIterator (implements java.text.CharacterIterator)
    • org.apache.lucene.analysis.CharArrayMap.EntryIterator (implements java.util.Iterator<E>)
    • org.apache.lucene.analysis.CharArraySet.CharArraySetIterator (implements java.util.Iterator<E>)
    • org.apache.lucene.util.CharsRef (implements java.lang.CharSequence, java.lang.Cloneable, java.lang.Comparable<T>)
    • org.apache.lucene.analysis.cn.smart.CharType
    • org.apache.lucene.analysis.compound.hyphenation.CharVector (implements java.lang.Cloneable, java.io.Serializable)
    • org.apache.lucene.search.CheckHits
    • org.apache.lucene.index.CheckIndex
    • org.apache.lucene.index.CheckIndex.Status
    • org.apache.lucene.index.CheckIndex.Status.FieldNormStatus
    • org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
    • org.apache.lucene.index.CheckIndex.Status.StoredFieldStatus
    • org.apache.lucene.index.CheckIndex.Status.TermIndexStatus
    • org.apache.lucene.index.CheckIndex.Status.TermVectorStatus
    • org.apache.lucene.facet.taxonomy.writercache.cl2o.Cl2oTaxonomyWriterCache (implements org.apache.lucene.facet.taxonomy.writercache.TaxonomyWriterCache)
    • org.apache.lucene.util.CloseableThreadLocal<T> (implements java.io.Closeable)
    • org.apache.lucene.util.CodecUtil
    • org.apache.lucene.util.CollectionUtil
    • org.apache.lucene.search.Collector
      • org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector<GH>
        • org.apache.lucene.search.grouping.TermAllGroupHeadsCollector<GH>
      • org.apache.lucene.search.grouping.AbstractAllGroupsCollector<GROUP_VALUE_TYPE>
        • org.apache.lucene.search.grouping.TermAllGroupsCollector
      • org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector<GROUP_VALUE_TYPE>
        • org.apache.lucene.search.grouping.TermFirstPassGroupingCollector
      • org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector<GROUP_VALUE_TYPE>
        • org.apache.lucene.search.grouping.TermSecondPassGroupingCollector
      • org.apache.lucene.search.grouping.BlockGroupingCollector
      • org.apache.lucene.search.CachingCollector
      • org.apache.lucene.search.CheckHits.ExplanationAsserter
      • org.apache.lucene.search.CheckHits.SetCollector
      • org.apache.lucene.facet.search.FacetsCollector
      • org.apache.lucene.search.MultiCollector
      • org.apache.lucene.search.PositiveScoresOnlyCollector
      • org.apache.lucene.facet.search.ScoredDocIdCollector
      • org.apache.lucene.search.TimeLimitingCollector
      • org.apache.lucene.search.join.ToParentBlockJoinCollector
      • org.apache.lucene.search.TopDocsCollector<T>
        • org.apache.lucene.search.TopFieldCollector
        • org.apache.lucene.search.TopScoreDocCollector
      • org.apache.lucene.search.TotalHitCountCollector
    • org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap
    • org.apache.lucene.util.CommandLineUtil
    • org.egothor.stemmer.Compile
    • org.apache.lucene.index.CompoundFileExtractor
    • org.apache.lucene.index.CompoundFileWriter
    • org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase.CompoundToken
    • org.apache.lucene.document.CompressionTools
    • org.apache.lucene.benchmark.byTask.utils.Config
    • org.apache.lucene.queryParser.core.config.ConfigurationKey<T>
    • org.apache.lucene.analysis.ja.dict.ConnectionCosts
    • org.apache.lucene.util.Constants
    • org.apache.lucene.benchmark.Constants
    • org.apache.lucene.xmlparser.builders.ConstantScoreQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource (implements java.io.Closeable)
      • org.apache.lucene.benchmark.byTask.feeds.ContentSource
        • org.apache.lucene.benchmark.byTask.feeds.DirContentSource
        • org.apache.lucene.benchmark.byTask.feeds.EnwikiContentSource
        • org.apache.lucene.benchmark.byTask.feeds.LineDocSource
        • org.apache.lucene.benchmark.byTask.feeds.LongToEnglishContentSource
        • org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource
        • org.apache.lucene.benchmark.byTask.feeds.SingleDocSource
          • org.apache.lucene.benchmark.byTask.feeds.SortableSingleDocSource
        • org.apache.lucene.benchmark.byTask.feeds.TrecContentSource
      • org.apache.lucene.benchmark.byTask.feeds.FacetSource
        • org.apache.lucene.benchmark.byTask.feeds.RandomFacetSource
    • org.apache.lucene.xmlparser.CoreParser (implements org.apache.lucene.xmlparser.QueryBuilder)
      • org.apache.lucene.xmlparser.CorePlusExtensionsParser
    • org.apache.lucene.util.Counter
    • org.apache.lucene.facet.search.aggregator.CountingAggregator (implements org.apache.lucene.facet.search.aggregator.Aggregator)
      • org.apache.lucene.facet.search.aggregator.ComplementCountingAggregator
    • org.apache.lucene.analysis.ja.util.CSVUtil
    • org.apache.lucene.search.function.CustomScoreProvider
    • org.apache.lucene.analysis.cz.CzechStemmer
    • org.apache.lucene.store.DataInput (implements java.lang.Cloneable)
      • org.apache.lucene.store.ByteArrayDataInput
      • org.apache.lucene.util.fst.FST.BytesReader
      • org.apache.lucene.store.IndexInput (implements java.lang.Cloneable, java.io.Closeable)
        • org.apache.lucene.store.BufferedIndexInput
          • org.apache.lucene.index.MockIndexInput
          • org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput
            • org.apache.lucene.store.NIOFSDirectory.NIOFSIndexInput
          • org.apache.lucene.store.WindowsDirectory.WindowsIndexInput
        • org.apache.lucene.store.ChecksumIndexInput
        • org.apache.lucene.store.MockIndexInputWrapper
        • org.apache.lucene.store.RAMInputStream (implements java.lang.Cloneable)
      • org.apache.lucene.store.InputStreamDataInput (implements java.io.Closeable)
      • org.apache.lucene.util.PagedBytes.PagedBytesDataInput
    • org.apache.lucene.store.DataOutput
      • org.apache.lucene.store.ByteArrayDataOutput
      • org.apache.lucene.store.IndexOutput (implements java.io.Closeable)
        • org.apache.lucene.store.BufferedIndexOutput
          • org.apache.lucene.store.FSDirectory.FSIndexOutput
        • org.apache.lucene.store.ChecksumIndexOutput
        • org.apache.lucene.store.MockIndexOutputWrapper
        • org.apache.lucene.store.RAMOutputStream
        • org.apache.lucene.util.ThrottledIndexOutput
      • org.apache.lucene.store.OutputStreamDataOutput (implements java.io.Closeable)
      • org.apache.lucene.util.PagedBytes.PagedBytesDataOutput
    • org.apache.lucene.document.DateField
    • org.apache.lucene.document.DateTools
    • org.apache.lucene.search.highlight.DefaultEncoder (implements org.apache.lucene.search.highlight.Encoder)
    • org.apache.lucene.facet.index.params.DefaultFacetIndexingParams (implements org.apache.lucene.facet.index.params.FacetIndexingParams)
      • org.apache.lucene.facet.index.params.PerDimensionIndexingParams
        • org.apache.lucene.facet.enhancements.params.DefaultEnhancementsIndexingParams (implements org.apache.lucene.facet.enhancements.params.EnhancementsIndexingParams)
    • org.xml.sax.helpers.DefaultHandler (implements org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler)
      • org.apache.lucene.analysis.compound.hyphenation.PatternParser (implements org.apache.lucene.analysis.compound.hyphenation.PatternConsumer)
    • org.apache.lucene.facet.index.categorypolicy.DefaultOrdinalPolicy (implements org.apache.lucene.facet.index.categorypolicy.OrdinalPolicy)
    • org.apache.lucene.facet.index.categorypolicy.DefaultPathPolicy (implements org.apache.lucene.facet.index.categorypolicy.PathPolicy)
    • org.apache.lucene.benchmark.byTask.feeds.DemoHTMLParser (implements org.apache.lucene.benchmark.byTask.feeds.HTMLParser)
    • org.egothor.stemmer.Diff
    • org.egothor.stemmer.DiffIt
    • org.apache.lucene.benchmark.byTask.feeds.DirContentSource.Iterator (implements java.util.Iterator<E>)
    • org.apache.lucene.store.Directory (implements java.io.Closeable)
      • org.apache.lucene.store.FileSwitchDirectory
      • org.apache.lucene.store.FSDirectory
        • org.apache.lucene.store.DirectIOLinuxDirectory
        • org.apache.lucene.store.MMapDirectory
        • org.apache.lucene.store.NIOFSDirectory
        • org.apache.lucene.store.SimpleFSDirectory
        • org.apache.lucene.store.WindowsDirectory
      • org.apache.lucene.store.MockDirectoryWrapper
      • org.apache.lucene.store.NRTCachingDirectory
      • org.apache.lucene.store.RAMDirectory (implements java.io.Serializable)
    • org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader (implements org.apache.lucene.facet.taxonomy.TaxonomyReader)
    • org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter (implements org.apache.lucene.facet.taxonomy.TaxonomyWriter)
    • org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.DiskOrdinalMap (implements org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.OrdinalMap)
    • org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.MemoryOrdinalMap (implements org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.OrdinalMap)
    • org.apache.lucene.spatial.geometry.shape.DistanceApproximation
    • org.apache.lucene.spatial.tier.DistanceHandler
    • org.apache.lucene.spatial.tier.DistanceQueryBuilder
    • org.apache.lucene.spatial.DistanceUtils
    • org.apache.lucene.benchmark.byTask.feeds.DocData
    • org.apache.lucene.search.DocIdSet
      • org.apache.lucene.util.DocIdBitSet
      • org.apache.lucene.search.FieldCacheDocIdSet
      • org.apache.lucene.search.FilteredDocIdSet
      • org.apache.lucene.util.FixedBitSet (implements org.apache.lucene.util.Bits)
      • org.apache.lucene.util.OpenBitSet (implements org.apache.lucene.util.Bits, java.lang.Cloneable, java.io.Serializable)
        • org.apache.lucene.util.OpenBitSetDISI
      • org.apache.lucene.util.SortedVIntList
    • org.apache.lucene.search.DocIdSetIterator
      • org.apache.lucene.search.FilteredDocIdSetIterator
      • org.apache.lucene.util.OpenBitSetIterator
      • org.apache.lucene.search.Scorer
        • org.apache.lucene.search.ConstantScoreQuery.ConstantScorer
        • org.apache.lucene.search.ScoreCachingWrappingScorer
        • org.apache.lucene.search.spans.SpanScorer
          • org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanScorer
          • org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer
    • org.apache.lucene.benchmark.byTask.feeds.DocMaker (implements java.io.Closeable)
    • org.apache.lucene.benchmark.quality.utils.DocNameExtractor
    • org.apache.lucene.document.Document (implements java.io.Serializable)
    • org.apache.lucene.search.function.DocValues
    • org.apache.lucene.xmlparser.DOMUtils
    • org.apache.lucene.util.DoubleBarrelLRUCache<K,V>
    • org.apache.lucene.util.DoubleBarrelLRUCache.CloneableKey
    • org.apache.lucene.facet.search.DrillDown
    • org.apache.lucene.util.DummyConcurrentLock (implements java.util.concurrent.locks.Lock)
    • org.apache.lucene.queryParser.standard.builders.DummyQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.xmlparser.builders.DuplicateFilterBuilder (implements org.apache.lucene.xmlparser.FilterBuilder)
    • org.apache.lucene.analysis.nl.DutchStemmer
    • org.apache.lucene.spatial.geometry.shape.Ellipse (implements org.apache.lucene.spatial.geometry.shape.Geometry2D)
    • org.apache.lucene.util.English
    • org.apache.lucene.analysis.en.EnglishMinimalStemmer
    • org.apache.lucene.benchmark.byTask.feeds.demohtml.Entities
    • org.apache.lucene.queryParser.standard.parser.EscapeQuerySyntaxImpl (implements org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax)
    • org.apache.lucene.search.Explanation (implements java.io.Serializable)
      • org.apache.lucene.search.ComplexExplanation
    • org.apache.lucene.search.Explanation.IDFExplanation (implements java.io.Serializable)
    • org.apache.lucene.queryParser.ext.ExtensionQuery
    • org.apache.lucene.queryParser.ext.Extensions
    • org.apache.lucene.queryParser.ext.Extensions.Pair<Cur,Cud>
    • org.apache.lucene.search.suggest.fst.ExternalRefSorter (implements org.apache.lucene.search.suggest.fst.BytesRefSorter, java.io.Closeable)
    • org.apache.lucene.benchmark.utils.ExtractReuters
    • org.apache.lucene.benchmark.utils.ExtractWikipedia
    • org.apache.lucene.facet.search.FacetArrays
    • org.apache.lucene.facet.search.params.FacetRequest (implements java.lang.Cloneable)
      • org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest
      • org.apache.lucene.facet.search.params.association.AssociationIntSumFacetRequest
      • org.apache.lucene.facet.search.params.CountFacetRequest
      • org.apache.lucene.facet.search.params.ScoreFacetRequest
    • org.apache.lucene.facet.search.results.FacetResult
    • org.apache.lucene.facet.search.FacetResultsHandler
      • org.apache.lucene.facet.search.TopKFacetResultsHandler
      • org.apache.lucene.facet.search.TopKInEachNodeHandler
    • org.apache.lucene.facet.search.FacetsAccumulator
      • org.apache.lucene.facet.search.SamplingWrapper
      • org.apache.lucene.facet.search.StandardFacetsAccumulator
        • org.apache.lucene.facet.search.AdaptiveFacetsAccumulator
        • org.apache.lucene.facet.search.sampling.SamplingAccumulator
    • org.apache.lucene.facet.search.params.FacetSearchParams
    • org.apache.lucene.queryParser.FastCharStream (implements org.apache.lucene.queryParser.CharStream)
    • org.apache.lucene.queryParser.surround.parser.FastCharStream (implements org.apache.lucene.queryParser.surround.parser.CharStream)
    • org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
    • org.apache.lucene.queryParser.standard.config.FieldBoostMapFCListener (implements org.apache.lucene.queryParser.core.config.FieldConfigListener)
    • org.apache.lucene.search.FieldCache.CacheEntry
    • org.apache.lucene.search.FieldCache.CreationPlaceholder
    • org.apache.lucene.search.FieldCache.StringIndex
    • org.apache.lucene.util.FieldCacheSanityChecker
    • org.apache.lucene.util.FieldCacheSanityChecker.Insanity
    • org.apache.lucene.util.FieldCacheSanityChecker.InsanityType
    • org.apache.lucene.search.FieldComparator<T>
      • org.apache.lucene.search.FieldComparator.DocComparator
      • org.apache.lucene.search.FieldComparator.NumericComparator<T>
        • org.apache.lucene.search.FieldComparator.ByteComparator
        • org.apache.lucene.search.FieldComparator.DoubleComparator
        • org.apache.lucene.search.FieldComparator.FloatComparator
        • org.apache.lucene.search.FieldComparator.IntComparator
        • org.apache.lucene.search.FieldComparator.LongComparator
        • org.apache.lucene.search.FieldComparator.ShortComparator
      • org.apache.lucene.search.FieldComparator.RelevanceComparator
      • org.apache.lucene.search.FieldComparator.StringComparatorLocale
      • org.apache.lucene.search.FieldComparator.StringOrdValComparator
      • org.apache.lucene.search.FieldComparator.StringValComparator
    • org.apache.lucene.search.FieldComparatorSource (implements java.io.Serializable)
      • org.apache.lucene.spatial.tier.DistanceFieldComparatorSource
    • org.apache.lucene.queryParser.standard.config.FieldDateResolutionFCListener (implements org.apache.lucene.queryParser.core.config.FieldConfigListener)
    • org.apache.lucene.search.vectorhighlight.FieldFragList
    • org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo
    • org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo.SubInfo
    • org.apache.lucene.index.FieldInfo
    • org.apache.lucene.index.FieldInfos (implements java.lang.Iterable<T>)
    • org.apache.lucene.index.FieldInvertState
    • org.apache.lucene.index.FieldNormModifier
    • org.apache.lucene.search.vectorhighlight.FieldPhraseList
    • org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo
    • org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo.Toffs
    • org.apache.lucene.search.vectorhighlight.FieldQuery
    • org.apache.lucene.search.vectorhighlight.FieldQuery.QueryPhraseMap
    • org.apache.lucene.queryParser.standard.builders.FieldQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.search.function.FieldScoreQuery.Type
    • org.apache.lucene.search.vectorhighlight.FieldTermStack
    • org.apache.lucene.search.vectorhighlight.FieldTermStack.TermInfo (implements java.lang.Comparable<T>)
    • org.apache.lucene.search.suggest.FileDictionary (implements org.apache.lucene.search.spell.Dictionary)
    • org.apache.lucene.benchmark.byTask.utils.FileUtils
    • org.apache.lucene.search.Filter (implements java.io.Serializable)
      • org.apache.lucene.search.BooleanFilter (implements java.lang.Iterable<T>)
      • org.apache.lucene.search.CachingWrapperFilter
        • org.apache.lucene.search.CachingWrapperFilterHelper
      • org.apache.lucene.spatial.tier.CartesianShapeFilter
      • org.apache.lucene.search.ChainedFilter
      • org.apache.lucene.spatial.tier.DistanceFilter
        • org.apache.lucene.spatial.geohash.GeoHashDistanceFilter
        • org.apache.lucene.spatial.tier.LatLongDistanceFilter
      • org.apache.lucene.search.DuplicateFilter
      • org.apache.lucene.search.FieldCacheRangeFilter<T>
      • org.apache.lucene.search.FieldCacheTermsFilter
      • org.apache.lucene.search.FieldValueFilter
      • org.apache.lucene.search.MultiTermQueryWrapperFilter<Q>
        • org.apache.lucene.search.NumericRangeFilter<T>
        • org.apache.lucene.search.PrefixFilter
        • org.apache.lucene.search.TermRangeFilter
      • org.apache.lucene.search.QueryWrapperFilter
      • org.apache.lucene.search.join.RawTermFilter
      • org.apache.lucene.search.RemoteCachingWrapperFilter
      • org.apache.lucene.search.SpanFilter
        • org.apache.lucene.search.CachingSpanFilter
        • org.apache.lucene.search.SpanQueryFilter
      • org.apache.lucene.search.TermsFilter
    • org.apache.lucene.xmlparser.FilterBuilderFactory (implements org.apache.lucene.xmlparser.FilterBuilder)
    • org.apache.lucene.search.FilterClause
    • org.apache.lucene.xmlparser.builders.FilteredQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.index.FilterIndexReader.FilterTermDocs (implements org.apache.lucene.index.TermDocs)
      • org.apache.lucene.index.FilterIndexReader.FilterTermPositions (implements org.apache.lucene.index.TermPositions)
    • org.apache.lucene.search.FilterManager
    • org.apache.lucene.search.FilterManager.FilterCleaner (implements java.lang.Runnable)
    • org.apache.lucene.search.FilterManager.FilterItem
    • org.apache.lucene.analysis.fi.FinnishLightStemmer
    • org.apache.lucene.util.collections.FloatToObjectMap<T> (implements java.lang.Iterable<T>)
    • org.apache.lucene.benchmark.byTask.utils.Format
    • java.text.Format (implements java.lang.Cloneable, java.io.Serializable)
      • java.text.NumberFormat
        • org.apache.lucene.queryParser.standard.config.NumberDateFormat
    • org.apache.lucene.analysis.fr.FrenchLightStemmer
    • org.apache.lucene.analysis.fr.FrenchMinimalStemmer
    • org.apache.lucene.analysis.fr.FrenchStemmer
    • org.apache.lucene.util.fst.FST<T>
    • org.apache.lucene.util.fst.FST.Arc<T>
    • org.apache.lucene.search.suggest.fst.FSTCompletion
    • org.apache.lucene.search.suggest.fst.FSTCompletion.Completion (implements java.lang.Comparable<T>)
    • org.apache.lucene.search.suggest.fst.FSTCompletionBuilder
    • org.apache.lucene.queryParser.standard.config.FuzzyConfig
    • org.apache.lucene.xmlparser.builders.FuzzyLikeThisQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.FuzzyQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.spatial.geohash.GeoHashUtils
    • org.apache.lucene.analysis.de.GermanLightStemmer
    • org.apache.lucene.analysis.de.GermanMinimalStemmer
    • org.apache.lucene.analysis.de.GermanStemmer
    • org.apache.lucene.misc.GetTermInfo
    • org.apache.lucene.search.highlight.GradientFormatter (implements org.apache.lucene.search.highlight.Formatter)
      • org.apache.lucene.search.highlight.SpanGradientFormatter
    • org.apache.lucene.analysis.ja.GraphvizFormatter
    • org.apache.lucene.analysis.el.GreekStemmer
    • org.apache.lucene.search.grouping.GroupDocs<GROUP_VALUE_TYPE>
    • org.apache.lucene.queryParser.standard.builders.GroupQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.processors.GroupQueryNodeProcessor (implements org.apache.lucene.queryParser.core.processors.QueryNodeProcessor)
    • org.apache.lucene.util.packed.GrowableWriter (implements org.apache.lucene.util.packed.PackedInts.Mutable)
    • org.apache.lucene.analysis.cn.smart.hhmm.HHMMSegmenter
    • org.apache.lucene.misc.HighFreqTerms
    • org.apache.lucene.search.spell.HighFrequencyDictionary (implements org.apache.lucene.search.spell.Dictionary)
    • org.apache.lucene.search.highlight.Highlighter
    • org.apache.lucene.analysis.hi.HindiNormalizer
    • org.apache.lucene.analysis.hi.HindiStemmer
    • org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser (implements org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants)
    • org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager (implements org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants)
    • org.apache.lucene.analysis.hu.HungarianLightStemmer
    • org.apache.lucene.analysis.hunspell.HunspellAffix
    • org.apache.lucene.analysis.hunspell.HunspellDictionary
    • org.apache.lucene.analysis.hunspell.HunspellStemmer
    • org.apache.lucene.analysis.hunspell.HunspellStemmer.Stem
    • org.apache.lucene.analysis.hunspell.HunspellWord
    • org.apache.lucene.analysis.compound.hyphenation.Hyphen (implements java.io.Serializable)
    • org.apache.lucene.analysis.compound.hyphenation.Hyphenation
    • org.apache.lucene.analysis.icu.segmentation.ICUTokenizerConfig
      • org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig
    • org.apache.lucene.util.IndexableBinaryStringTools
    • org.apache.lucene.index.IndexCommit (implements java.lang.Comparable<T>)
      • org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint
    • org.apache.lucene.index.IndexFileNameFilter (implements java.io.FilenameFilter)
    • org.apache.lucene.index.IndexFileNames
    • org.apache.lucene.demo.IndexFiles
    • org.apache.lucene.misc.IndexMergeTool
    • org.apache.lucene.index.IndexReader (implements java.lang.Cloneable, java.io.Closeable)
      • org.apache.lucene.index.FilterIndexReader
        • org.apache.lucene.index.PruningReader
      • org.apache.lucene.store.instantiated.InstantiatedIndexReader
      • org.apache.lucene.index.MultiReader (implements java.lang.Cloneable)
        • org.apache.lucene.index.SlowMultiReaderWrapper
      • org.apache.lucene.index.ParallelReader
      • org.apache.lucene.index.SegmentReader (implements java.lang.Cloneable)
    • org.apache.lucene.index.IndexSorter
    • org.apache.lucene.index.IndexSplitter
    • org.apache.lucene.index.IndexUpgrader
    • org.apache.lucene.index.IndexWriter (implements java.io.Closeable, org.apache.lucene.util.TwoPhaseCommit)
    • org.apache.lucene.index.IndexWriter.IndexReaderWarmer
    • org.apache.lucene.index.IndexWriter.MaxFieldLength
    • org.apache.lucene.index.IndexWriterConfig (implements java.lang.Cloneable)
    • org.apache.lucene.analysis.in.IndicNormalizer
    • org.apache.lucene.analysis.id.IndonesianStemmer
    • org.apache.lucene.search.suggest.fst.InMemorySorter (implements org.apache.lucene.search.suggest.fst.BytesRefSorter)
    • java.io.InputStream (implements java.io.Closeable)
      • org.apache.lucene.util.UnsafeByteArrayInputStream
    • org.apache.lucene.store.instantiated.InstantiatedDocument (implements java.io.Serializable)
    • org.apache.lucene.store.instantiated.InstantiatedIndex (implements java.io.Closeable, java.io.Serializable)
    • org.apache.lucene.store.instantiated.InstantiatedIndexWriter (implements java.io.Closeable)
    • org.apache.lucene.store.instantiated.InstantiatedTerm (implements java.io.Serializable)
    • org.apache.lucene.store.instantiated.InstantiatedTermDocs (implements org.apache.lucene.index.TermDocs)
      • org.apache.lucene.store.instantiated.InstantiatedTermPositions (implements org.apache.lucene.index.TermPositions)
    • org.apache.lucene.store.instantiated.InstantiatedTermDocumentInformation (implements java.io.Serializable)
    • org.apache.lucene.store.instantiated.InstantiatedTermFreqVector (implements java.io.Serializable, org.apache.lucene.index.TermFreqVector)
      • org.apache.lucene.store.instantiated.InstantiatedTermPositionVector (implements java.io.Serializable, org.apache.lucene.index.TermPositionVector)
    • org.apache.lucene.util.collections.IntArray
    • org.apache.lucene.util.encoding.IntDecoder
      • org.apache.lucene.util.encoding.DGapIntDecoder
      • org.apache.lucene.util.encoding.EightFlagsIntDecoder
      • org.apache.lucene.util.encoding.FourFlagsIntDecoder
        • org.apache.lucene.util.encoding.NOnesIntDecoder
      • org.apache.lucene.util.encoding.SimpleIntDecoder
      • org.apache.lucene.util.encoding.VInt8IntDecoder
    • org.apache.lucene.util.encoding.IntEncoder
      • org.apache.lucene.util.encoding.ChunksIntEncoder
        • org.apache.lucene.util.encoding.EightFlagsIntEncoder
        • org.apache.lucene.util.encoding.FourFlagsIntEncoder
          • org.apache.lucene.util.encoding.NOnesIntEncoder
      • org.apache.lucene.util.encoding.IntEncoderFilter
        • org.apache.lucene.util.encoding.DGapIntEncoder
        • org.apache.lucene.util.encoding.SortingIntEncoder
        • org.apache.lucene.util.encoding.UniqueValuesIntEncoder
      • org.apache.lucene.util.encoding.SimpleIntEncoder
      • org.apache.lucene.util.encoding.VInt8IntEncoder
    • org.apache.lucene.util.collections.IntHashSet
    • org.apache.lucene.util.IntsRef (implements java.lang.Cloneable, java.lang.Comparable<T>)
    • org.apache.lucene.util.fst.IntsRefFSTEnum<T>
    • org.apache.lucene.util.fst.IntsRefFSTEnum.InputOutput<T>
    • org.apache.lucene.util.collections.IntToDoubleMap
    • org.apache.lucene.util.collections.IntToIntMap
    • org.apache.lucene.util.collections.IntToObjectMap<T> (implements java.lang.Iterable<T>)
    • org.apache.lucene.util.IOUtils
    • org.apache.lucene.analysis.it.ItalianLightStemmer
    • org.apache.lucene.search.regex.JakartaRegexpCapabilities (implements org.apache.lucene.search.regex.RegexCapabilities)
    • org.apache.lucene.search.spell.JaroWinklerDistance (implements org.apache.lucene.search.spell.StringDistance)
    • org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
    • org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode
    • org.apache.lucene.queryParser.standard.parser.JavaCharStream
    • org.apache.lucene.search.regex.JavaUtilRegexCapabilities (implements org.apache.lucene.search.regex.RegexCapabilities)
    • org.apache.lucene.search.join.JoinUtil
    • org.apache.lucene.index.KeepOnlyLastCommitDeletionPolicy (implements org.apache.lucene.index.IndexDeletionPolicy)
    • org.apache.lucene.analysis.en.KStemmer
    • org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal
      • org.apache.lucene.facet.taxonomy.writercache.cl2o.CompactLabelToOrdinal
    • org.apache.lucene.spatial.geometry.LatLng
      • org.apache.lucene.spatial.geometry.FixedLatLng
      • org.apache.lucene.spatial.geometry.FloatLatLng
    • org.apache.lucene.analysis.lv.LatvianStemmer
    • org.apache.lucene.search.spell.LevensteinDistance (implements org.apache.lucene.search.spell.StringDistance)
    • org.apache.lucene.xmlparser.builders.LikeThisQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.benchmark.byTask.feeds.LineDocSource.LineParser
      • org.apache.lucene.benchmark.byTask.feeds.LineDocSource.HeaderLineParser
      • org.apache.lucene.benchmark.byTask.feeds.LineDocSource.SimpleLineParser
    • org.apache.lucene.util.LineFileDocs (implements java.io.Closeable)
    • org.apache.lucene.spatial.geometry.shape.LineSegment
    • org.apache.lucene.spatial.geometry.shape.LLRect
    • org.apache.lucene.document.LoadFirstFieldSelector (implements org.apache.lucene.document.FieldSelector)
    • org.apache.lucene.store.Lock
    • org.apache.lucene.store.Lock.With
    • org.apache.lucene.store.LockFactory
      • org.apache.lucene.store.FSLockFactory
        • org.apache.lucene.store.NativeFSLockFactory
        • org.apache.lucene.store.SimpleFSLockFactory
      • org.apache.lucene.store.MockLockFactoryWrapper
      • org.apache.lucene.store.NoLockFactory
      • org.apache.lucene.store.SingleInstanceLockFactory
      • org.apache.lucene.store.VerifyingLockFactory
    • org.apache.lucene.store.LockStressTest
    • org.apache.lucene.store.LockVerifyServer
    • org.apache.lucene.benchmark.byTask.feeds.LongToEnglishQueryMaker (implements org.apache.lucene.benchmark.byTask.feeds.QueryMaker)
    • org.apache.lucene.analysis.LookaheadTokenFilter.Position (implements org.apache.lucene.util.RollingBuffer.Resettable)
    • org.apache.lucene.search.suggest.Lookup
      • org.apache.lucene.search.suggest.fst.FSTCompletionLookup
      • org.apache.lucene.search.suggest.fst.FSTLookup
      • org.apache.lucene.search.suggest.jaspell.JaspellLookup
      • org.apache.lucene.search.suggest.tst.TSTLookup
      • org.apache.lucene.search.suggest.fst.WFSTCompletionLookup
    • org.apache.lucene.search.suggest.Lookup.LookupResult (implements java.lang.Comparable<T>)
    • org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache (implements org.apache.lucene.facet.taxonomy.writercache.TaxonomyWriterCache)
    • org.apache.lucene.search.spell.LuceneDictionary (implements org.apache.lucene.search.spell.Dictionary)
    • org.apache.lucene.util.LuceneJUnitResultFormatter (implements org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter)
    • org.apache.lucene.LucenePackage
    • org.apache.lucene.document.MapFieldSelector (implements org.apache.lucene.document.FieldSelector)
    • org.apache.lucene.util.MapOfSets<K,V>
    • org.apache.lucene.xmlparser.builders.MatchAllDocsQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.MatchAllDocsQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.MatchNoDocsQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.index.memory.MemoryIndex (implements java.io.Serializable)
    • org.apache.lucene.index.MergePolicy (implements java.io.Closeable)
      • org.apache.lucene.index.LogMergePolicy
        • org.apache.lucene.index.LogByteSizeMergePolicy
          • org.apache.lucene.index.BalancedSegmentMergePolicy
        • org.apache.lucene.index.LogDocMergePolicy
      • org.apache.lucene.index.MockRandomMergePolicy
      • org.apache.lucene.index.NoMergePolicy
      • org.apache.lucene.index.TieredMergePolicy
      • org.apache.lucene.index.UpgradeIndexMergePolicy
    • org.apache.lucene.index.MergePolicy.MergeSpecification
    • org.apache.lucene.index.MergePolicy.OneMerge
    • org.apache.lucene.index.MergeScheduler
      • org.apache.lucene.index.ConcurrentMergeScheduler
      • org.apache.lucene.index.NoMergeScheduler
      • org.apache.lucene.index.SerialMergeScheduler
    • org.apache.lucene.messages.MessageImpl (implements org.apache.lucene.messages.Message)
    • org.apache.lucene.store.MockDirectoryWrapper.Failure
    • org.apache.lucene.queryParser.standard.builders.ModifierQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.search.similar.MoreLikeThis
    • org.apache.lucene.facet.util.MultiCategoryListIterator (implements org.apache.lucene.facet.search.CategoryListIterator)
    • org.apache.lucene.index.MultiPassIndexSplitter
    • org.apache.lucene.queryParser.standard.builders.MultiPhraseQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.index.MultipleTermPositions (implements org.apache.lucene.index.TermPositions)
    • org.apache.lucene.search.MultiTermQuery.RewriteMethod (implements java.io.Serializable)
      • org.apache.lucene.search.MultiTermQuery.ConstantScoreAutoRewrite
      • org.apache.lucene.search.ScoringRewrite<Q>
      • org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod
        • org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite
      • org.apache.lucene.search.TopTermsRewrite<Q>
        • org.apache.lucene.search.MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite
        • org.apache.lucene.search.MultiTermQuery.TopTermsScoringBooleanQueryRewrite
    • org.apache.lucene.facet.search.results.MutableFacetResultNode (implements org.apache.lucene.facet.search.results.FacetResultNode)
    • org.apache.lucene.util.NamedThreadFactory (implements java.util.concurrent.ThreadFactory)
    • org.apache.lucene.facet.taxonomy.writercache.lru.NameHashIntCacheLRU
    • org.apache.lucene.store.NativePosixUtil
    • org.apache.lucene.search.spell.NGramDistance (implements org.apache.lucene.search.spell.StringDistance)
    • org.apache.lucene.messages.NLS
      • org.apache.lucene.queryParser.core.messages.QueryParserMessages
    • org.apache.lucene.index.NoDeletionPolicy (implements org.apache.lucene.index.IndexDeletionPolicy)
    • org.apache.lucene.facet.index.categorypolicy.NonTopLevelOrdinalPolicy (implements org.apache.lucene.facet.index.categorypolicy.OrdinalPolicy)
    • org.apache.lucene.facet.index.categorypolicy.NonTopLevelPathPolicy (implements org.apache.lucene.facet.index.categorypolicy.PathPolicy)
    • org.apache.lucene.analysis.NormalizeCharMap
    • org.apache.lucene.analysis.no.NorwegianLightStemmer
    • org.apache.lucene.analysis.no.NorwegianMinimalStemmer
    • org.apache.lucene.search.NRTManager.TrackingIndexWriter
    • org.apache.lucene.search.highlight.NullFragmenter (implements org.apache.lucene.search.highlight.Fragmenter)
    • org.apache.lucene.document.NumberTools
    • org.apache.lucene.queryParser.standard.config.NumericConfig
    • org.apache.lucene.queryParser.standard.config.NumericFieldConfigListener (implements org.apache.lucene.queryParser.core.config.FieldConfigListener)
    • org.apache.lucene.xmlparser.builders.NumericRangeFilterBuilder (implements org.apache.lucene.xmlparser.FilterBuilder)
    • org.apache.lucene.xmlparser.builders.NumericRangeQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.NumericRangeQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.util.NumericUtils
    • org.apache.lucene.util.NumericUtils.IntRangeBuilder
    • org.apache.lucene.util.NumericUtils.LongRangeBuilder
    • org.apache.lucene.util.collections.ObjectToFloatMap<K>
    • org.apache.lucene.util.collections.ObjectToIntMap<K>
    • org.apache.lucene.analysis.util.OpenStringBuilder (implements java.lang.Appendable, java.lang.CharSequence)
    • org.apache.lucene.facet.index.attributes.OrdinalProperty (implements org.apache.lucene.facet.index.attributes.CategoryProperty)
    • org.apache.lucene.util.fst.Outputs<T>
      • org.apache.lucene.util.fst.ByteSequenceOutputs
      • org.apache.lucene.util.fst.IntSequenceOutputs
      • org.apache.lucene.util.fst.NoOutputs
      • org.apache.lucene.util.fst.PairOutputs<A,B>
      • org.apache.lucene.util.fst.PositiveIntOutputs
      • org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs
    • java.io.OutputStream (implements java.io.Closeable, java.io.Flushable)
      • org.apache.lucene.util.UnsafeByteArrayOutputStream
    • org.apache.lucene.util.packed.PackedInts
    • org.apache.lucene.util.packed.PackedInts.ReaderImpl (implements org.apache.lucene.util.packed.PackedInts.Reader)
    • org.apache.lucene.util.packed.PackedInts.Writer
    • org.apache.lucene.util.PagedBytes
    • org.apache.lucene.util.PagedBytes.Reader
    • org.apache.lucene.util.fst.PairOutputs.Pair<A,B>
    • org.apache.lucene.util.Parameter (implements java.io.Serializable)
    • org.apache.lucene.queryParser.ext.ParserExtension
    • org.apache.lucene.facet.util.PartitionsUtils
    • org.apache.lucene.queryParser.core.nodes.PathQueryNode.QueryText (implements java.lang.Cloneable)
    • org.apache.lucene.index.Payload (implements java.lang.Cloneable, java.io.Serializable)
    • org.apache.lucene.search.payloads.PayloadFunction (implements java.io.Serializable)
      • org.apache.lucene.search.payloads.AveragePayloadFunction
      • org.apache.lucene.search.payloads.MaxPayloadFunction
      • org.apache.lucene.search.payloads.MinPayloadFunction
    • org.apache.lucene.analysis.payloads.PayloadHelper
    • org.apache.lucene.facet.search.PayloadIntDecodingIterator (implements org.apache.lucene.facet.search.CategoryListIterator)
    • org.apache.lucene.facet.search.PayloadIterator
      • org.apache.lucene.facet.enhancements.EnhancementsPayloadIterator
    • org.apache.lucene.index.PayloadProcessorProvider
      • org.apache.lucene.facet.index.FacetsPayloadProcessorProvider
    • org.apache.lucene.index.PayloadProcessorProvider.PayloadProcessor
      • org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsPayloadProcessor
    • org.apache.lucene.index.PayloadProcessorProvider.ReaderPayloadProcessor
      • org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor
      • org.apache.lucene.index.PayloadProcessorProvider.DirPayloadProcessor
    • org.apache.lucene.search.payloads.PayloadSpanUtil
    • org.apache.lucene.benchmark.byTask.PerfRunData (implements java.io.Closeable)
    • org.apache.lucene.benchmark.byTask.tasks.PerfTask (implements java.lang.Cloneable)
      • org.apache.lucene.benchmark.byTask.tasks.AddDocTask
        • org.apache.lucene.benchmark.byTask.tasks.AddFacetedDocTask
      • org.apache.lucene.benchmark.byTask.tasks.ClearStatsTask
      • org.apache.lucene.benchmark.byTask.tasks.CloseIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.CloseReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.CommitIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.CommitTaxonomyIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.ConsumeContentSourceTask
      • org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.CreateTaxonomyIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.DeleteByPercentTask
      • org.apache.lucene.benchmark.byTask.tasks.DeleteDocTask
      • org.apache.lucene.benchmark.byTask.tasks.FlushReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.ForceMergeTask
      • org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask
      • org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask
      • org.apache.lucene.benchmark.byTask.tasks.NewLocaleTask
      • org.apache.lucene.benchmark.byTask.tasks.NewRoundTask
      • org.apache.lucene.benchmark.byTask.tasks.NewShingleAnalyzerTask
      • org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.OpenReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.PrintReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.ReadTask
        • org.apache.lucene.benchmark.byTask.tasks.SearchTask
          • org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask
        • org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
          • org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask
          • org.apache.lucene.benchmark.byTask.tasks.SearchTravRetLoadFieldSelectorTask
          • org.apache.lucene.benchmark.byTask.tasks.SearchTravRetTask
          • org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask
        • org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask
        • org.apache.lucene.benchmark.byTask.tasks.WarmTask
      • org.apache.lucene.benchmark.byTask.tasks.ReadTokensTask
      • org.apache.lucene.benchmark.byTask.tasks.ReopenReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.ReportTask
        • org.apache.lucene.benchmark.byTask.tasks.RepAllTask
        • org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask
        • org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask
        • org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask
          • org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask
          • org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask
      • org.apache.lucene.benchmark.byTask.tasks.ResetInputsTask
        • org.apache.lucene.benchmark.byTask.tasks.ResetSystemSoftTask
          • org.apache.lucene.benchmark.byTask.tasks.ResetSystemEraseTask
      • org.apache.lucene.benchmark.byTask.tasks.RollbackIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.SetPropTask
      • org.apache.lucene.benchmark.byTask.tasks.TaskSequence
      • org.apache.lucene.benchmark.byTask.tasks.UpdateDocTask
      • org.apache.lucene.benchmark.byTask.tasks.WaitForMergesTask
      • org.apache.lucene.benchmark.byTask.tasks.WaitTask
      • org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask
    • org.apache.lucene.analysis.fa.PersianNormalizer
    • org.apache.lucene.queryParser.standard.builders.PhraseQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.index.PKIndexSplitter
    • org.apache.lucene.search.spell.PlainTextDictionary (implements org.apache.lucene.search.spell.Dictionary)
    • org.apache.lucene.spatial.geometry.shape.Point2D
    • org.apache.lucene.benchmark.byTask.stats.Points
    • org.apache.lucene.analysis.pt.PortugueseLightStemmer
    • org.apache.lucene.index.PositionBasedTermVectorMapper.TVPositionInfo
    • org.apache.lucene.search.highlight.PositionSpan
    • org.apache.lucene.queryParser.standard.builders.PrefixWildcardQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.util.PriorityQueue<T>
      • org.apache.lucene.search.FieldValueHitQueue<T>
      • org.apache.lucene.search.suggest.Lookup.LookupPriorityQueue
      • org.apache.lucene.search.spell.SuggestWordQueue
    • org.apache.tools.ant.ProjectComponent (implements java.lang.Cloneable)
      • org.apache.tools.ant.types.DataType (implements java.lang.Cloneable)
        • org.apache.tools.ant.types.selectors.BaseSelector (implements org.apache.tools.ant.types.selectors.FileSelector)
          • org.apache.tools.ant.types.selectors.BaseExtendSelector (implements org.apache.tools.ant.types.selectors.ExtendFileSelector)
            • org.apache.lucene.util.LuceneJUnitDividingSelector
    • org.apache.lucene.queryParser.core.nodes.ProximityQueryNode.ProximityType
    • org.apache.lucene.index.pruning.PruningPolicy
      • org.apache.lucene.index.pruning.StorePruningPolicy
      • org.apache.lucene.index.pruning.TermPruningPolicy
        • org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy
        • org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy
        • org.apache.lucene.index.pruning.RIDFTermPruningPolicy
        • org.apache.lucene.index.pruning.TFTermPruningPolicy
    • org.apache.lucene.index.pruning.PruningTool
    • org.apache.lucene.benchmark.quality.QualityBenchmark
    • org.apache.lucene.benchmark.quality.utils.QualityQueriesFinder
    • org.apache.lucene.benchmark.quality.QualityQuery (implements java.lang.Comparable<T>)
    • org.apache.lucene.benchmark.quality.QualityStats
    • org.apache.lucene.benchmark.quality.QualityStats.RecallPoint
    • org.apache.lucene.search.Query (implements java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.search.BooleanQuery (implements java.lang.Iterable<T>)
      • org.apache.lucene.search.BoostingQuery
      • org.apache.lucene.search.ConstantScoreQuery
      • org.apache.lucene.search.function.CustomScoreQuery
      • org.apache.lucene.search.DisjunctionMaxQuery (implements java.lang.Iterable<T>)
      • org.apache.lucene.search.FilteredQuery
      • org.apache.lucene.search.FuzzyLikeThisQuery
      • org.apache.lucene.search.MatchAllDocsQuery
      • org.apache.lucene.search.similar.MoreLikeThisQuery
      • org.apache.lucene.search.MultiPhraseQuery
      • org.apache.lucene.search.MultiTermQuery
        • org.apache.lucene.search.FuzzyQuery
        • org.apache.lucene.search.NumericRangeQuery<T>
        • org.apache.lucene.search.PrefixQuery
        • org.apache.lucene.search.regex.RegexQuery (implements org.apache.lucene.search.regex.RegexQueryCapable)
        • org.apache.lucene.search.TermRangeQuery
        • org.apache.lucene.search.WildcardQuery
      • org.apache.lucene.search.PhraseQuery
        • org.apache.lucene.search.NGramPhraseQuery
      • org.apache.lucene.search.spans.SpanQuery
        • org.apache.lucene.search.spans.FieldMaskingSpanQuery
        • org.apache.lucene.search.spans.SpanMultiTermQueryWrapper<Q>
          • org.apache.lucene.search.regex.SpanRegexQuery (implements org.apache.lucene.search.regex.RegexQueryCapable)
        • org.apache.lucene.search.spans.SpanNearQuery (implements java.lang.Cloneable)
          • org.apache.lucene.search.payloads.PayloadNearQuery
        • org.apache.lucene.search.spans.SpanNotQuery (implements java.lang.Cloneable)
        • org.apache.lucene.search.spans.SpanOrQuery (implements java.lang.Cloneable)
        • org.apache.lucene.search.spans.SpanPositionCheckQuery (implements java.lang.Cloneable)
          • org.apache.lucene.search.spans.SpanNearPayloadCheckQuery
          • org.apache.lucene.search.spans.SpanPayloadCheckQuery
          • org.apache.lucene.search.spans.SpanPositionRangeQuery
            • org.apache.lucene.search.spans.SpanFirstQuery
        • org.apache.lucene.search.spans.SpanTermQuery
          • org.apache.lucene.search.payloads.PayloadTermQuery
      • org.apache.lucene.search.TermQuery
      • org.apache.lucene.search.join.ToChildBlockJoinQuery
      • org.apache.lucene.search.join.ToParentBlockJoinQuery
      • org.apache.lucene.search.function.ValueSourceQuery
        • org.apache.lucene.search.function.FieldScoreQuery
    • org.apache.lucene.xmlparser.QueryBuilderFactory (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.benchmark.quality.trec.QueryDriver
    • org.apache.lucene.queryParser.core.nodes.QueryNodeImpl (implements java.lang.Cloneable, org.apache.lucene.queryParser.core.nodes.QueryNode)
      • org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode<T> (implements org.apache.lucene.queryParser.core.nodes.RangeQueryNode<T>)
        • org.apache.lucene.queryParser.standard.nodes.NumericRangeQueryNode
        • org.apache.lucene.queryParser.standard.nodes.TermRangeQueryNode
          • org.apache.lucene.queryParser.standard.nodes.RangeQueryNode
      • org.apache.lucene.queryParser.core.nodes.BooleanQueryNode
        • org.apache.lucene.queryParser.core.nodes.AndQueryNode
          • org.apache.lucene.queryParser.core.nodes.AnyQueryNode
        • org.apache.lucene.queryParser.core.nodes.OrQueryNode
        • org.apache.lucene.queryParser.core.nodes.ProximityQueryNode
        • org.apache.lucene.queryParser.standard.nodes.StandardBooleanQueryNode
      • org.apache.lucene.queryParser.core.nodes.BoostQueryNode
      • org.apache.lucene.queryParser.core.nodes.DeletedQueryNode
        • org.apache.lucene.queryParser.core.nodes.MatchNoDocsQueryNode
        • org.apache.lucene.queryParser.core.nodes.NoTokenFoundQueryNode
      • org.apache.lucene.queryParser.core.nodes.FieldQueryNode (implements org.apache.lucene.queryParser.core.nodes.FieldValuePairQueryNode<T>, org.apache.lucene.queryParser.core.nodes.TextableQueryNode)
        • org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode
        • org.apache.lucene.queryParser.core.nodes.ParametricQueryNode
        • org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode
        • org.apache.lucene.queryParser.standard.nodes.WildcardQueryNode
          • org.apache.lucene.queryParser.standard.nodes.PrefixWildcardQueryNode
      • org.apache.lucene.queryParser.core.nodes.GroupQueryNode
      • org.apache.lucene.queryParser.core.nodes.MatchAllDocsQueryNode
      • org.apache.lucene.queryParser.core.nodes.ModifierQueryNode
        • org.apache.lucene.queryParser.standard.nodes.BooleanModifierNode
      • org.apache.lucene.queryParser.standard.nodes.MultiPhraseQueryNode (implements org.apache.lucene.queryParser.core.nodes.FieldableNode)
      • org.apache.lucene.queryParser.standard.nodes.NumericQueryNode (implements org.apache.lucene.queryParser.core.nodes.FieldValuePairQueryNode<T>)
      • org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode
      • org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode (implements org.apache.lucene.queryParser.core.nodes.RangeQueryNode<T>)
      • org.apache.lucene.queryParser.core.nodes.PathQueryNode
      • org.apache.lucene.queryParser.core.nodes.PhraseSlopQueryNode (implements org.apache.lucene.queryParser.core.nodes.FieldableNode)
      • org.apache.lucene.queryParser.core.nodes.SlopQueryNode (implements org.apache.lucene.queryParser.core.nodes.FieldableNode)
      • org.apache.lucene.queryParser.core.nodes.TokenizedPhraseQueryNode (implements org.apache.lucene.queryParser.core.nodes.FieldableNode)
    • org.apache.lucene.queryParser.core.util.QueryNodeOperation
    • org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl (implements org.apache.lucene.queryParser.core.processors.QueryNodeProcessor)
      • org.apache.lucene.queryParser.standard.processors.AllowLeadingWildcardProcessor
      • org.apache.lucene.queryParser.standard.processors.AnalyzerQueryNodeProcessor
      • org.apache.lucene.queryParser.precedence.processors.BooleanModifiersQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.BooleanSingleChildOptimizationQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.BoostQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.DefaultPhraseSlopQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.FuzzyQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.LowercaseExpandedTermsQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.MatchAllDocsQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.MultiFieldQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.MultiTermRewriteMethodProcessor
      • org.apache.lucene.queryParser.core.processors.NoChildOptimizationQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.NumericQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.NumericRangeQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.ParametricRangeQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.PhraseSlopQueryNodeProcessor
      • org.apache.lucene.queryParser.core.processors.RemoveDeletedQueryNodesProcessor
      • org.apache.lucene.queryParser.standard.processors.RemoveEmptyNonLeafQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.WildcardQueryNodeProcessor
    • org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline (implements java.util.List<E>, org.apache.lucene.queryParser.core.processors.QueryNodeProcessor)
      • org.apache.lucene.queryParser.standard.processors.StandardQueryNodeProcessorPipeline
        • org.apache.lucene.queryParser.precedence.processors.PrecedenceQueryNodeProcessorPipeline
    • org.apache.lucene.queryParser.QueryParser (implements org.apache.lucene.queryParser.QueryParserConstants)
      • org.apache.lucene.queryParser.analyzing.AnalyzingQueryParser
      • org.apache.lucene.queryParser.complexPhrase.ComplexPhraseQueryParser
      • org.apache.lucene.queryParser.ext.ExtendableQueryParser
      • org.apache.lucene.queryParser.MultiFieldQueryParser
      • org.apache.lucene.queryParser.QueryParserTestBase.QPTestParser
    • org.apache.lucene.queryParser.surround.parser.QueryParser (implements org.apache.lucene.queryParser.surround.parser.QueryParserConstants)
    • org.apache.lucene.queryParser.core.QueryParserHelper
      • org.apache.lucene.queryParser.standard.StandardQueryParser
        • org.apache.lucene.queryParser.precedence.PrecedenceQueryParser
    • org.apache.lucene.queryParser.QueryParserTokenManager (implements org.apache.lucene.queryParser.QueryParserConstants)
    • org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager (implements org.apache.lucene.queryParser.surround.parser.QueryParserConstants)
    • org.apache.lucene.queryParser.standard.QueryParserUtil
    • org.apache.lucene.queryParser.standard.QueryParserWrapper
      • org.apache.lucene.queryParser.standard.MultiFieldQueryParserWrapper
    • org.apache.lucene.search.highlight.QueryScorer (implements org.apache.lucene.search.highlight.Scorer)
    • org.apache.lucene.xmlparser.QueryTemplateManager
    • org.apache.lucene.search.highlight.QueryTermExtractor
    • org.apache.lucene.search.highlight.QueryTermScorer (implements org.apache.lucene.search.highlight.Scorer)
    • org.apache.lucene.search.QueryTermVector (implements org.apache.lucene.index.TermFreqVector)
    • org.apache.lucene.queryParser.core.builders.QueryTreeBuilder (implements org.apache.lucene.queryParser.core.builders.QueryBuilder)
      • org.apache.lucene.queryParser.standard.builders.StandardQueryTreeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.search.QueryUtils
    • org.apache.lucene.store.RAMFile (implements java.io.Serializable)
    • org.apache.lucene.util.RamUsageEstimator
    • java.util.Random (implements java.io.Serializable)
      • org.apache.lucene.util.SmartRandom
    • java.io.RandomAccessFile (implements java.io.Closeable, java.io.DataInput, java.io.DataOutput)
      • org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput.Descriptor
    • org.apache.lucene.index.RandomIndexWriter (implements java.io.Closeable)
    • org.apache.lucene.xmlparser.builders.RangeFilterBuilder (implements org.apache.lucene.xmlparser.FilterBuilder)
    • org.apache.lucene.queryParser.standard.builders.RangeQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • java.io.Reader (implements java.io.Closeable, java.lang.Readable)
      • org.apache.lucene.analysis.CharStream
        • org.apache.lucene.analysis.CharFilter
          • org.apache.lucene.analysis.BaseCharFilter
            • org.apache.lucene.analysis.charfilter.HTMLStripCharFilter
            • org.apache.lucene.analysis.MappingCharFilter
          • org.apache.lucene.analysis.fa.PersianCharFilter
        • org.apache.lucene.analysis.CharReader
        • org.apache.lucene.analysis.MockCharFilter
      • org.apache.lucene.analysis.MockReaderWrapper
      • org.apache.lucene.benchmark.byTask.utils.StringBuilderReader
    • org.apache.lucene.util.ReaderUtil
    • org.apache.lucene.util.ReaderUtil.Gather
    • org.apache.lucene.spatial.geometry.shape.Rectangle (implements org.apache.lucene.spatial.geometry.shape.Geometry2D)
    • org.egothor.stemmer.Reduce
      • org.egothor.stemmer.Gener
      • org.egothor.stemmer.Lift
      • org.egothor.stemmer.Optimizer
        • org.egothor.stemmer.Optimizer2
    • org.apache.lucene.search.ReferenceManager<G> (implements java.io.Closeable)
      • org.apache.lucene.search.NRTManager
      • org.apache.lucene.search.SearcherManager
    • java.rmi.server.RemoteObject (implements java.rmi.Remote, java.io.Serializable)
      • java.rmi.server.RemoteServer
        • java.rmi.server.UnicastRemoteObject
          • org.apache.lucene.search.RemoteSearchable (implements org.apache.lucene.search.RMIRemoteSearchable)
    • org.apache.lucene.benchmark.byTask.stats.Report
    • org.apache.lucene.facet.util.ResultSortUtils
    • org.apache.lucene.util.Rethrow
    • org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents
    • org.apache.lucene.util.RollingBuffer<T>
    • org.apache.lucene.util.RollingCharBuffer
    • org.egothor.stemmer.Row
    • org.apache.lucene.analysis.pt.RSLPStemmerBase
      • org.apache.lucene.analysis.gl.GalicianMinimalStemmer
      • org.apache.lucene.analysis.gl.GalicianStemmer
      • org.apache.lucene.analysis.pt.PortugueseMinimalStemmer
      • org.apache.lucene.analysis.pt.PortugueseStemmer
    • org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule
      • org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSetExceptions
      • org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSuffixExceptions
    • org.apache.lucene.analysis.pt.RSLPStemmerBase.Step
    • org.junit.runner.Runner (implements org.junit.runner.Describable)
      • org.junit.runners.ParentRunner<T> (implements org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable)
        • org.junit.runners.BlockJUnit4ClassRunner
          • org.apache.lucene.util.LuceneTestCaseRunner
    • org.apache.lucene.analysis.ru.RussianLightStemmer
    • org.apache.lucene.benchmark.byTask.programmatic.Sample
    • org.apache.lucene.facet.search.sampling.Sampler
      • org.apache.lucene.facet.search.sampling.RandomSampler
      • org.apache.lucene.facet.search.sampling.RepeatableSampler
    • org.apache.lucene.facet.search.sampling.Sampler.SampleResult
    • org.apache.lucene.facet.search.sampling.SamplingParams
    • org.apache.lucene.facet.util.ScoredDocIdsUtils
    • org.apache.lucene.search.ScoreDoc (implements java.io.Serializable)
      • org.apache.lucene.search.FieldDoc
      • org.apache.lucene.search.FieldValueHitQueue.Entry
    • org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder.ScoreComparator (implements java.util.Comparator<T>)
    • org.apache.lucene.search.Scorer.ScorerVisitor<P,C,S>
    • org.apache.lucene.util.ScorerDocQueue
    • org.apache.lucene.facet.search.aggregator.ScoringAggregator (implements org.apache.lucene.facet.search.aggregator.Aggregator)
    • org.apache.lucene.search.Searcher (implements org.apache.lucene.search.Searchable)
      • org.apache.lucene.search.IndexSearcher
        • org.apache.lucene.search.AssertingIndexSearcher
        • org.apache.lucene.search.CheckHits.ExplanationAssertingSearcher
      • org.apache.lucene.search.MultiSearcher
        • org.apache.lucene.search.ParallelMultiSearcher
    • org.apache.lucene.search.SearcherFactory
    • org.apache.lucene.search.SearcherLifetimeManager (implements java.io.Closeable)
    • org.apache.lucene.search.SearcherLifetimeManager.PruneByAge (implements org.apache.lucene.search.SearcherLifetimeManager.Pruner)
    • org.apache.lucene.demo.SearchFiles
    • org.apache.lucene.search.grouping.SearchGroup<GROUP_VALUE_TYPE>
    • org.apache.lucene.index.SegmentInfo (implements java.lang.Cloneable)
    • org.apache.lucene.index.SegmentInfos (implements java.lang.Cloneable, java.lang.Iterable<T>)
    • org.apache.lucene.index.SegmentInfos.FindSegmentsFile
    • org.apache.lucene.index.SegmentWriteState
    • org.apache.lucene.analysis.cn.smart.hhmm.SegToken
    • org.apache.lucene.analysis.cn.smart.hhmm.SegTokenFilter
    • org.apache.lucene.search.grouping.SentinelIntSet
    • org.apache.lucene.document.SetBasedFieldSelector (implements org.apache.lucene.document.FieldSelector)
    • org.apache.lucene.util.SetOnce<T>
    • org.apache.lucene.spatial.tier.Shape (implements java.io.Serializable)
    • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix
    • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column
    • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column.Row
    • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenPositioner
    • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec
      • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec
      • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec
      • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec
    • org.apache.lucene.search.Similarity (implements java.io.Serializable)
      • org.apache.lucene.search.DefaultSimilarity
        • org.apache.lucene.misc.SweetSpotSimilarity
      • org.apache.lucene.search.SimilarityDelegator
    • org.apache.lucene.search.similar.SimilarityQueries
    • org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner (implements org.apache.lucene.search.vectorhighlight.BoundaryScanner)
    • org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
    • org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder (implements org.apache.lucene.search.vectorhighlight.FragListBuilder)
    • org.apache.lucene.search.highlight.SimpleFragmenter (implements org.apache.lucene.search.highlight.Fragmenter)
    • org.apache.lucene.search.highlight.SimpleHTMLEncoder (implements org.apache.lucene.search.highlight.Encoder)
    • org.apache.lucene.search.highlight.SimpleHTMLFormatter (implements org.apache.lucene.search.highlight.Formatter)
    • org.apache.lucene.benchmark.quality.utils.SimpleQQParser (implements org.apache.lucene.benchmark.quality.QualityQueryParser)
    • org.apache.lucene.search.highlight.SimpleSpanFragmenter (implements org.apache.lucene.search.highlight.Fragmenter)
    • org.apache.lucene.search.vectorhighlight.SingleFragListBuilder (implements org.apache.lucene.search.vectorhighlight.FragListBuilder)
    • org.apache.lucene.spatial.tier.projections.SinusoidalProjector (implements org.apache.lucene.spatial.tier.projections.IProjector)
    • org.apache.lucene.queryParser.standard.builders.SlopQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.util.SmallFloat
    • org.apache.lucene.index.SnapshotDeletionPolicy (implements org.apache.lucene.index.IndexDeletionPolicy)
      • org.apache.lucene.index.PersistentSnapshotDeletionPolicy
    • org.tartarus.snowball.SnowballProgram
      • org.tartarus.snowball.ext.ArmenianStemmer
      • org.tartarus.snowball.ext.BasqueStemmer
      • org.tartarus.snowball.ext.CatalanStemmer
      • org.tartarus.snowball.ext.DanishStemmer
      • org.tartarus.snowball.ext.DutchStemmer
      • org.tartarus.snowball.ext.EnglishStemmer
      • org.tartarus.snowball.ext.FinnishStemmer
      • org.tartarus.snowball.ext.FrenchStemmer
      • org.tartarus.snowball.ext.German2Stemmer
      • org.tartarus.snowball.ext.GermanStemmer
      • org.tartarus.snowball.ext.HungarianStemmer
      • org.tartarus.snowball.ext.IrishStemmer
      • org.tartarus.snowball.ext.ItalianStemmer
      • org.tartarus.snowball.ext.KpStemmer
      • org.tartarus.snowball.ext.LovinsStemmer
      • org.tartarus.snowball.ext.NorwegianStemmer
      • org.tartarus.snowball.ext.PorterStemmer
      • org.tartarus.snowball.ext.PortugueseStemmer
      • org.tartarus.snowball.ext.RomanianStemmer
      • org.tartarus.snowball.ext.RussianStemmer
      • org.tartarus.snowball.ext.SpanishStemmer
      • org.tartarus.snowball.ext.SwedishStemmer
      • org.tartarus.snowball.ext.TurkishStemmer
    • org.apache.lucene.search.Sort (implements java.io.Serializable)
    • org.apache.lucene.search.suggest.fst.Sort
    • org.apache.lucene.search.suggest.fst.Sort.BufferSize
    • org.apache.lucene.search.suggest.fst.Sort.ByteSequencesReader (implements java.io.Closeable)
    • org.apache.lucene.search.suggest.fst.Sort.ByteSequencesWriter (implements java.io.Closeable)
    • org.apache.lucene.search.suggest.fst.Sort.SortInfo
    • org.apache.lucene.search.suggest.SortedTermFreqIteratorWrapper (implements org.apache.lucene.search.spell.TermFreqIterator)
    • org.apache.lucene.util.SorterTemplate
    • org.apache.lucene.search.SortField (implements java.io.Serializable)
    • org.apache.lucene.xmlparser.builders.SpanBuilderBase (implements org.apache.lucene.xmlparser.builders.SpanQueryBuilder)
      • org.apache.lucene.xmlparser.builders.BoostingTermBuilder
      • org.apache.lucene.xmlparser.builders.SpanFirstBuilder
      • org.apache.lucene.xmlparser.builders.SpanNearBuilder
      • org.apache.lucene.xmlparser.builders.SpanNotBuilder
      • org.apache.lucene.xmlparser.builders.SpanOrBuilder
      • org.apache.lucene.xmlparser.builders.SpanOrTermsBuilder
      • org.apache.lucene.xmlparser.builders.SpanTermBuilder
    • org.apache.lucene.search.SpanFilterResult
    • org.apache.lucene.search.SpanFilterResult.PositionInfo
    • org.apache.lucene.search.SpanFilterResult.StartEnd
    • org.apache.lucene.analysis.es.SpanishLightStemmer
    • org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory
    • org.apache.lucene.xmlparser.builders.SpanQueryBuilderFactory (implements org.apache.lucene.xmlparser.builders.SpanQueryBuilder)
    • org.apache.lucene.search.spans.Spans
      • org.apache.lucene.search.spans.NearSpansOrdered
      • org.apache.lucene.search.spans.NearSpansUnordered
      • org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan
      • org.apache.lucene.search.spans.TermSpans
    • org.apache.lucene.search.spell.SpellChecker (implements java.io.Closeable)
    • org.apache.lucene.queryParser.surround.query.SrndQuery (implements java.lang.Cloneable)
      • org.apache.lucene.queryParser.surround.query.ComposedQuery
        • org.apache.lucene.queryParser.surround.query.AndQuery
        • org.apache.lucene.queryParser.surround.query.DistanceQuery (implements org.apache.lucene.queryParser.surround.query.DistanceSubQuery)
        • org.apache.lucene.queryParser.surround.query.NotQuery
        • org.apache.lucene.queryParser.surround.query.OrQuery (implements org.apache.lucene.queryParser.surround.query.DistanceSubQuery)
      • org.apache.lucene.queryParser.surround.query.FieldsQuery
      • org.apache.lucene.queryParser.surround.query.SimpleTerm (implements java.lang.Comparable<T>, org.apache.lucene.queryParser.surround.query.DistanceSubQuery)
        • org.apache.lucene.queryParser.surround.query.SrndPrefixQuery
        • org.apache.lucene.queryParser.surround.query.SrndTermQuery
        • org.apache.lucene.queryParser.surround.query.SrndTruncQuery
    • org.apache.lucene.queryParser.standard.builders.StandardBooleanQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
    • org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser (implements org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants, org.apache.lucene.queryParser.core.parser.SyntaxParser)
    • org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager (implements org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants)
    • org.apache.lucene.analysis.standard.StandardTokenizerImpl (implements org.apache.lucene.analysis.standard.StandardTokenizerInterface)
    • org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31 (implements org.apache.lucene.analysis.standard.StandardTokenizerInterface)
    • org.apache.lucene.analysis.util.StemmerUtil
    • org.apache.lucene.analysis.stempel.StempelStemmer
    • org.apache.lucene.util.StoreClassNameRule (implements org.junit.rules.TestRule)
    • org.apache.lucene.benchmark.byTask.utils.StreamUtils
    • org.apache.lucene.util.StringHelper
    • org.apache.lucene.util.StringInterner
      • org.apache.lucene.util.SimpleStringInterner
    • org.apache.lucene.queryParser.core.util.StringUtils
    • org.apache.lucene.benchmark.quality.utils.SubmissionReport
    • org.apache.lucene.search.spell.SuggestWord
    • org.apache.lucene.search.spell.SuggestWordFrequencyComparator (implements java.util.Comparator<T>)
    • org.apache.lucene.search.spell.SuggestWordScoreComparator (implements java.util.Comparator<T>)
    • org.apache.lucene.analysis.sv.SwedishLightStemmer
    • org.apache.lucene.analysis.synonym.SynonymMap
    • org.apache.lucene.analysis.synonym.SynonymMap.Builder
      • org.apache.lucene.analysis.synonym.SolrSynonymParser
      • org.apache.lucene.analysis.synonym.WordnetSynonymParser
    • org.apache.lucene.util.SystemPropertiesInvariantRule (implements org.junit.rules.TestRule)
    • org.apache.lucene.util.SystemPropertiesRestoreRule (implements org.junit.rules.TestRule)
    • org.apache.lucene.benchmark.byTask.feeds.demohtml.Tags
    • org.apache.lucene.benchmark.byTask.stats.TaskStats (implements java.lang.Cloneable)
    • org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter
      • org.apache.lucene.analysis.sinks.DateRecognizerSinkFilter
      • org.apache.lucene.analysis.sinks.TokenRangeSinkFilter
      • org.apache.lucene.analysis.sinks.TokenTypeSinkFilter
    • org.apache.lucene.facet.search.TemporaryObjectAllocator<T>
      • org.apache.lucene.facet.search.FloatArrayAllocator
      • org.apache.lucene.facet.search.IntArrayAllocator
    • org.apache.lucene.index.Term (implements java.lang.Comparable<T>, java.io.Serializable)
    • org.apache.lucene.index.TermEnum (implements java.io.Closeable)
      • org.apache.lucene.search.FilteredTermEnum
        • org.apache.lucene.search.FuzzyTermEnum
        • org.apache.lucene.search.PrefixTermEnum
        • org.apache.lucene.search.regex.RegexTermEnum
        • org.apache.lucene.search.SingleTermEnum
        • org.apache.lucene.search.TermRangeTermEnum
        • org.apache.lucene.search.WildcardTermEnum
      • org.apache.lucene.index.FilterIndexReader.FilterTermEnum
      • org.apache.lucene.store.instantiated.InstantiatedTermEnum
    • org.apache.lucene.search.spell.TermFreqIterator.TermFreqIteratorWrapper (implements org.apache.lucene.search.spell.TermFreqIterator)
    • org.apache.lucene.xmlparser.builders.TermQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.TermRangeQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.xmlparser.builders.TermsFilterBuilder (implements org.apache.lucene.xmlparser.FilterBuilder)
    • org.apache.lucene.xmlparser.builders.TermsQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.index.TermVectorAccessor
    • org.apache.lucene.index.TermVectorEntry
    • org.apache.lucene.index.TermVectorEntryFreqSortedComparator (implements java.util.Comparator<T>)
    • org.apache.lucene.index.TermVectorMapper
      • org.apache.lucene.index.FieldSortedTermVectorMapper
      • org.apache.lucene.index.PositionBasedTermVectorMapper
      • org.apache.lucene.index.SortedTermVectorMapper
    • org.apache.lucene.index.TermVectorOffsetInfo (implements java.io.Serializable)
    • org.apache.lucene.analysis.compound.hyphenation.TernaryTree (implements java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.analysis.compound.hyphenation.HyphenationTree (implements org.apache.lucene.analysis.compound.hyphenation.PatternConsumer, java.io.Serializable)
    • org.apache.lucene.analysis.compound.hyphenation.TernaryTree.Iterator (implements java.util.Enumeration<E>)
    • org.apache.lucene.search.suggest.tst.TernaryTreeNode
    • org.tartarus.snowball.TestApp
    • org.apache.lucene.search.highlight.TextFragment
    • java.lang.Thread (implements java.lang.Runnable)
      • org.apache.lucene.index.ConcurrentMergeScheduler.MergeThread
      • org.apache.lucene.search.NRTManagerReopenThread (implements java.io.Closeable, org.apache.lucene.search.NRTManager.WaitingListener)
      • org.apache.lucene.search.TimeLimitingCollector.TimerThread
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Error
        • org.apache.lucene.queryParser.core.QueryNodeError (implements org.apache.lucene.messages.NLSException)
        • org.apache.lucene.queryParser.TokenMgrError
        • org.apache.lucene.benchmark.byTask.feeds.demohtml.TokenMgrError
        • org.apache.lucene.queryParser.standard.parser.TokenMgrError
        • org.apache.lucene.queryParser.surround.parser.TokenMgrError
      • java.lang.Exception
        • org.apache.lucene.analysis.compound.hyphenation.HyphenationException
        • org.apache.lucene.facet.taxonomy.InconsistentTaxonomyException
        • org.apache.lucene.spatial.tier.InvalidGeoException
        • org.apache.lucene.search.highlight.InvalidTokenOffsetsException
        • java.io.IOException
          • org.apache.lucene.index.CorruptIndexException
            • org.apache.lucene.index.IndexFormatTooNewException
            • org.apache.lucene.index.IndexFormatTooOldException
          • org.apache.lucene.facet.FacetException
            • org.apache.lucene.facet.index.params.FacetParamsMissingPropertyException
          • java.io.FileNotFoundException
            • org.apache.lucene.index.IndexNotFoundException
            • org.apache.lucene.store.NoSuchDirectoryException
          • org.apache.lucene.store.LockObtainFailedException
          • org.apache.lucene.store.LockReleaseFailedException
          • org.apache.lucene.index.MergePolicy.MergeAbortedException
          • org.apache.lucene.index.StaleReaderException
          • org.apache.lucene.queryParser.surround.query.TooManyBasicQueries
          • org.apache.lucene.util.TwoPhaseCommitTool.CommitFailException
          • org.apache.lucene.util.TwoPhaseCommitTool.PrepareCommitFailException
        • org.apache.lucene.benchmark.byTask.feeds.NoMoreDataException
        • org.apache.lucene.queryParser.ParseException
        • org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException
        • org.apache.lucene.queryParser.surround.parser.ParseException
        • org.apache.lucene.xmlparser.ParserException
        • org.apache.lucene.queryParser.core.QueryNodeException (implements org.apache.lucene.messages.NLSException)
          • org.apache.lucene.queryParser.core.QueryNodeParseException
            • org.apache.lucene.queryParser.standard.parser.ParseException
        • java.lang.RuntimeException
          • org.apache.lucene.search.BooleanQuery.TooManyClauses
          • org.apache.lucene.util.BytesRefHash.MaxBytesLengthExceededException
          • org.apache.lucene.index.FieldReaderException
          • java.lang.IllegalStateException
            • org.apache.lucene.store.AlreadyClosedException
          • org.apache.lucene.index.MergePolicy.MergeException
          • org.apache.lucene.util.SetOnce.AlreadySetException
          • org.apache.lucene.util.ThreadInterruptedException
          • org.apache.lucene.search.TimeLimitingCollector.TimeExceededException
    • org.apache.lucene.index.TieredMergePolicy.MergeScore
    • org.apache.lucene.queryParser.Token (implements java.io.Serializable)
    • org.apache.lucene.analysis.ja.Token
    • org.apache.lucene.benchmark.byTask.feeds.demohtml.Token
    • org.apache.lucene.queryParser.standard.parser.Token
    • org.apache.lucene.queryParser.surround.parser.Token
    • org.apache.lucene.search.highlight.TokenGroup
    • org.apache.lucene.analysis.ja.dict.TokenInfoFST
    • org.apache.lucene.search.highlight.TokenSources
    • org.apache.lucene.analysis.TokenStreamToDot
    • org.apache.lucene.search.TopDocs (implements java.io.Serializable)
      • org.apache.lucene.search.TopFieldDocs
    • org.apache.lucene.search.grouping.TopGroups<GROUP_VALUE_TYPE>
    • org.apache.lucene.facet.search.TopKInEachNodeHandler.IntermediateFacetResultWithHash (implements org.apache.lucene.facet.search.results.IntermediateFacetResult)
    • org.apache.lucene.analysis.ja.util.ToStringUtil
    • org.apache.lucene.util.ToStringUtils
    • org.apache.lucene.facet.search.TotalFacetCounts
    • org.apache.lucene.facet.search.TotalFacetCountsCache
    • org.apache.lucene.benchmark.quality.trec.Trec1MQReader
    • org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
      • org.apache.lucene.benchmark.byTask.feeds.TrecFBISParser
      • org.apache.lucene.benchmark.byTask.feeds.TrecFR94Parser
      • org.apache.lucene.benchmark.byTask.feeds.TrecFTParser
      • org.apache.lucene.benchmark.byTask.feeds.TrecGov2Parser
      • org.apache.lucene.benchmark.byTask.feeds.TrecLATimesParser
      • org.apache.lucene.benchmark.byTask.feeds.TrecParserByPath
    • org.apache.lucene.benchmark.quality.trec.TrecJudge (implements org.apache.lucene.benchmark.quality.Judge)
    • org.apache.lucene.benchmark.quality.trec.TrecTopicsReader
    • org.egothor.stemmer.Trie
      • org.egothor.stemmer.MultiTrie
        • org.egothor.stemmer.MultiTrie2
    • org.apache.lucene.search.suggest.tst.TSTAutocomplete
    • org.apache.lucene.util.TwoPhaseCommitTool
    • org.apache.lucene.util.TwoPhaseCommitTool.TwoPhaseCommitWrapper (implements org.apache.lucene.util.TwoPhaseCommit)
    • org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl (implements org.apache.lucene.analysis.standard.StandardTokenizerInterface)
    • org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31 (implements org.apache.lucene.analysis.standard.StandardTokenizerInterface)
    • org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34 (implements org.apache.lucene.analysis.standard.StandardTokenizerInterface)
    • org.apache.lucene.util.UncaughtExceptionsRule (implements org.junit.rules.TestRule)
    • org.apache.lucene.util.UncaughtExceptionsRule.UncaughtExceptionEntry
    • org.apache.lucene.queryParser.core.util.UnescapedCharSequence (implements java.lang.CharSequence)
    • org.apache.lucene.util.UnicodeUtil
    • org.apache.lucene.util.UnicodeUtil.UTF16Result
    • org.apache.lucene.util.UnicodeUtil.UTF8Result
    • org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs.TwoLongs
    • org.apache.lucene.analysis.ja.dict.UserDictionary (implements org.apache.lucene.analysis.ja.dict.Dictionary)
    • org.apache.lucene.xmlparser.builders.UserInputQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.util.fst.Util
    • org.apache.lucene.util.fst.Util.MinResult<T> (implements java.lang.Comparable<T>)
    • org.apache.lucene.analysis.cn.smart.Utility
    • org.apache.lucene.search.function.ValueSource (implements java.io.Serializable)
      • org.apache.lucene.search.function.FieldCacheSource
        • org.apache.lucene.search.function.ByteFieldSource
        • org.apache.lucene.search.function.FloatFieldSource
        • org.apache.lucene.search.function.IntFieldSource
        • org.apache.lucene.search.function.ShortFieldSource
      • org.apache.lucene.search.function.OrdFieldSource
      • org.apache.lucene.search.function.ReverseOrdFieldSource
    • org.apache.lucene.spatial.geometry.shape.Vector2D
    • org.apache.lucene.util.Vint8
    • org.apache.lucene.util.Vint8.Position
    • org.apache.lucene.util.VirtualMethod<C>
    • org.apache.lucene.analysis.VocabularyAssert
    • org.apache.lucene.util.WeakIdentityMap<K,V>
    • org.apache.lucene.search.Weight (implements java.io.Serializable)
      • org.apache.lucene.search.BooleanQuery.BooleanWeight
      • org.apache.lucene.search.ConstantScoreQuery.ConstantWeight
      • org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight
      • org.apache.lucene.search.spans.SpanWeight
        • org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanWeight
        • org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight
    • org.apache.lucene.search.highlight.WeightedSpanTermExtractor
    • org.apache.lucene.search.highlight.WeightedTerm
      • org.apache.lucene.search.highlight.WeightedSpanTerm
    • org.apache.lucene.queryParser.standard.builders.WildcardQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.analysis.WordlistLoader
    • org.apache.lucene.analysis.cn.smart.WordType

Interface Hierarchy

  • org.apache.lucene.facet.search.aggregator.Aggregator
  • java.lang.Appendable
    • org.apache.lucene.analysis.tokenattributes.CharTermAttribute (also extends org.apache.lucene.util.Attribute, java.lang.CharSequence)
  • org.apache.lucene.util.Attribute
    • org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttribute
    • org.apache.lucene.queryParser.standard.config.AnalyzerAttribute
    • org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttribute
    • org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttribute
    • org.apache.lucene.queryParser.standard.config.BoostAttribute
    • org.apache.lucene.facet.index.attributes.CategoryAttribute
    • org.apache.lucene.analysis.tokenattributes.CharTermAttribute (also extends java.lang.Appendable, java.lang.CharSequence)
    • org.apache.lucene.queryParser.standard.config.DateResolutionAttribute
    • org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute
    • org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttribute
    • org.apache.lucene.queryParser.standard.config.FieldBoostMapAttribute
    • org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttribute
    • org.apache.lucene.analysis.tokenattributes.FlagsAttribute
    • org.apache.lucene.queryParser.standard.config.FuzzyAttribute
    • org.apache.lucene.analysis.ja.tokenattributes.InflectionAttribute
    • org.apache.lucene.analysis.tokenattributes.KeywordAttribute
    • org.apache.lucene.queryParser.standard.config.LocaleAttribute
    • org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttribute
    • org.apache.lucene.queryParser.standard.config.MultiFieldAttribute
    • org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute
    • org.apache.lucene.analysis.tokenattributes.OffsetAttribute
    • org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttribute
    • org.apache.lucene.analysis.tokenattributes.PayloadAttribute
    • org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute
    • org.apache.lucene.queryParser.standard.config.PositionIncrementsAttribute
    • org.apache.lucene.analysis.tokenattributes.PositionLengthAttribute
    • org.apache.lucene.queryParser.standard.config.RangeCollatorAttribute
    • org.apache.lucene.analysis.ja.tokenattributes.ReadingAttribute
    • org.apache.lucene.analysis.icu.tokenattributes.ScriptAttribute
    • org.apache.lucene.analysis.tokenattributes.TermAttribute
    • org.apache.lucene.analysis.tokenattributes.TypeAttribute
  • org.apache.lucene.util.AttributeReflector
  • org.apache.lucene.util.Bits
  • org.apache.lucene.search.vectorhighlight.BoundaryScanner
  • org.apache.lucene.util.BytesRefIterator
    • org.apache.lucene.search.spell.TermFreqIterator
  • org.apache.lucene.search.suggest.fst.BytesRefSorter
  • org.apache.lucene.facet.enhancements.CategoryEnhancement
  • org.apache.lucene.facet.search.CategoryListIterator
  • java.lang.CharSequence
    • org.apache.lucene.analysis.tokenattributes.CharTermAttribute (also extends java.lang.Appendable, org.apache.lucene.util.Attribute)
  • org.apache.lucene.queryParser.CharStream
  • org.apache.lucene.queryParser.surround.parser.CharStream
  • java.io.Closeable
    • org.apache.lucene.search.RMIRemoteSearchable (also extends java.rmi.Remote, org.apache.lucene.search.Searchable)
    • org.apache.lucene.search.Searchable
      • org.apache.lucene.search.RMIRemoteSearchable (also extends java.rmi.Remote)
    • org.apache.lucene.facet.taxonomy.TaxonomyReader
    • org.apache.lucene.facet.taxonomy.TaxonomyWriter (also extends org.apache.lucene.util.TwoPhaseCommit)
    • org.apache.lucene.index.TermDocs
      • org.apache.lucene.index.TermPositions
    • org.apache.lucene.index.TermPositions
  • org.apache.lucene.queryParser.core.config.ConfigAttribute
  • org.apache.lucene.analysis.ja.dict.Dictionary
  • org.apache.lucene.search.spell.Dictionary
  • org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.OrdinalMap
  • org.apache.lucene.queryParser.surround.query.DistanceSubQuery
  • org.apache.lucene.util.collections.DoubleIterator
  • org.apache.lucene.search.highlight.Encoder
  • org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax
  • org.apache.lucene.facet.search.results.FacetResultNode
  • org.apache.lucene.search.FieldCache
  • org.apache.lucene.queryParser.core.config.FieldConfigListener
  • org.apache.lucene.xmlparser.FilterBuilder
  • org.apache.lucene.util.collections.FloatIterator
  • org.apache.lucene.search.highlight.Formatter
  • org.apache.lucene.search.vectorhighlight.FragListBuilder
  • org.apache.lucene.search.highlight.Fragmenter
  • org.apache.lucene.search.vectorhighlight.FragmentsBuilder
  • org.apache.lucene.spatial.geometry.shape.Geometry2D
  • org.apache.lucene.facet.search.Heap<T>
  • org.apache.lucene.benchmark.byTask.feeds.HTMLParser
  • org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
  • org.apache.lucene.index.IndexDeletionPolicy
  • org.apache.lucene.index.IndexReader.ReaderClosedListener
  • org.apache.lucene.facet.search.results.IntermediateFacetResult
  • org.apache.lucene.util.collections.IntIterator
  • org.apache.lucene.spatial.tier.projections.IProjector
  • org.apache.lucene.benchmark.quality.Judge
  • org.apache.lucene.messages.NLSException
  • org.apache.lucene.search.NRTManager.WaitingListener
  • org.apache.lucene.util.packed.PackedInts.Reader
    • org.apache.lucene.util.packed.PackedInts.Mutable
  • org.apache.lucene.analysis.compound.hyphenation.PatternConsumer
  • org.apache.lucene.analysis.payloads.PayloadEncoder
  • org.apache.lucene.benchmark.quality.QualityQueryParser
  • org.apache.lucene.xmlparser.QueryBuilder
    • org.apache.lucene.xmlparser.builders.SpanQueryBuilder
  • org.apache.lucene.queryParser.core.builders.QueryBuilder
    • org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder
  • org.apache.lucene.benchmark.byTask.feeds.QueryMaker
  • org.apache.lucene.queryParser.core.processors.QueryNodeProcessor
  • org.apache.lucene.queryParser.QueryParserConstants
  • org.apache.lucene.queryParser.surround.parser.QueryParserConstants
  • org.apache.lucene.search.regex.RegexCapabilities
  • org.apache.lucene.search.regex.RegexQueryCapable
  • java.rmi.Remote
    • org.apache.lucene.search.RMIRemoteSearchable (also extends org.apache.lucene.search.Searchable)
  • org.apache.lucene.util.RollingBuffer.Resettable
  • org.apache.lucene.facet.search.sampling.SampleFixer
  • org.apache.lucene.facet.search.ScoredDocIDs
  • org.apache.lucene.facet.search.ScoredDocIDsIterator
  • org.apache.lucene.search.highlight.Scorer
  • org.apache.lucene.search.SearcherLifetimeManager.Pruner
  • org.apache.lucene.index.SegmentReader.CoreClosedListener
  • java.io.Serializable
    • org.apache.lucene.facet.index.attributes.CategoryProperty
    • org.apache.lucene.facet.enhancements.params.EnhancementsIndexingParams
    • org.apache.lucene.facet.index.params.FacetIndexingParams
      • org.apache.lucene.facet.enhancements.params.EnhancementsIndexingParams
    • org.apache.lucene.document.Fieldable
    • org.apache.lucene.queryParser.core.nodes.FieldableNode
      • org.apache.lucene.queryParser.core.nodes.FieldValuePairQueryNode<T> (also extends org.apache.lucene.queryParser.core.nodes.ValueQueryNode<T>)
      • org.apache.lucene.queryParser.core.nodes.RangeQueryNode<T>
    • org.apache.lucene.search.FieldCache.ByteParser
    • org.apache.lucene.search.FieldCache.DoubleParser
    • org.apache.lucene.search.FieldCache.FloatParser
    • org.apache.lucene.search.FieldCache.IntParser
    • org.apache.lucene.search.FieldCache.LongParser
    • org.apache.lucene.search.FieldCache.Parser
      • org.apache.lucene.search.FieldCache.ByteParser
      • org.apache.lucene.search.FieldCache.DoubleParser
      • org.apache.lucene.search.FieldCache.FloatParser
      • org.apache.lucene.search.FieldCache.IntParser
      • org.apache.lucene.search.FieldCache.LongParser
      • org.apache.lucene.search.FieldCache.ShortParser
    • org.apache.lucene.search.FieldCache.ShortParser
    • org.apache.lucene.document.FieldSelector
    • org.apache.lucene.queryParser.core.nodes.FieldValuePairQueryNode<T> (also extends org.apache.lucene.queryParser.core.nodes.FieldableNode, org.apache.lucene.queryParser.core.nodes.ValueQueryNode<T>)
    • org.apache.lucene.messages.Message
    • org.apache.lucene.facet.index.categorypolicy.OrdinalPolicy
    • org.apache.lucene.facet.index.categorypolicy.PathPolicy
    • org.apache.lucene.queryParser.core.nodes.QueryNode
      • org.apache.lucene.queryParser.core.nodes.FieldableNode
        • org.apache.lucene.queryParser.core.nodes.FieldValuePairQueryNode<T> (also extends org.apache.lucene.queryParser.core.nodes.ValueQueryNode<T>)
        • org.apache.lucene.queryParser.core.nodes.RangeQueryNode<T>
      • org.apache.lucene.queryParser.core.nodes.FieldValuePairQueryNode<T> (also extends org.apache.lucene.queryParser.core.nodes.FieldableNode, org.apache.lucene.queryParser.core.nodes.ValueQueryNode<T>)
      • org.apache.lucene.queryParser.core.nodes.RangeQueryNode<T>
      • org.apache.lucene.queryParser.core.nodes.ValueQueryNode<T>
        • org.apache.lucene.queryParser.core.nodes.FieldValuePairQueryNode<T> (also extends org.apache.lucene.queryParser.core.nodes.FieldableNode)
    • org.apache.lucene.queryParser.core.nodes.RangeQueryNode<T>
    • org.apache.lucene.queryParser.core.nodes.ValueQueryNode<T>
      • org.apache.lucene.queryParser.core.nodes.FieldValuePairQueryNode<T> (also extends org.apache.lucene.queryParser.core.nodes.FieldableNode)
  • org.apache.lucene.queryParser.surround.query.SimpleTerm.MatchingTermVisitor
  • org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
  • org.apache.lucene.analysis.standard.StandardTokenizerInterface
  • org.apache.lucene.search.spell.StringDistance
  • org.apache.lucene.queryParser.core.parser.SyntaxParser
  • org.apache.lucene.facet.taxonomy.TaxonomyReader.ChildrenArrays
  • org.apache.lucene.facet.taxonomy.writercache.TaxonomyWriterCache
  • org.apache.lucene.index.TermFreqVector
    • org.apache.lucene.index.TermPositionVector
  • org.apache.lucene.queryParser.core.nodes.TextableQueryNode
  • org.apache.lucene.util.TwoPhaseCommit
    • org.apache.lucene.facet.taxonomy.TaxonomyWriter (also extends java.io.Closeable)

Annotation Type Hierarchy

  • org.apache.lucene.util.LuceneTestCase.Nightly (implements java.lang.annotation.Annotation)

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.document.Field.Store
      • org.apache.lucene.document.Field.Index
      • org.apache.lucene.document.Field.TermVector
      • org.apache.lucene.document.FieldSelectorResult
      • org.apache.lucene.document.NumericField.DataType
      • org.apache.lucene.document.DateTools.Resolution
      • org.apache.lucene.index.FieldInfo.IndexOptions
      • org.apache.lucene.index.IndexWriterConfig.OpenMode
      • org.apache.lucene.queryParser.QueryParser.Operator
      • org.apache.lucene.search.CachingWrapperFilter.DeletesMode
      • org.apache.lucene.search.BooleanClause.Occur
      • org.apache.lucene.search.spans.SpanPositionCheckQuery.AcceptStatus
      • org.apache.lucene.store.MockDirectoryWrapper.Throttling
      • org.apache.lucene.util.Version
      • org.apache.lucene.util.RamUsageEstimator.JvmFeature
      • org.apache.lucene.util.fst.FST.INPUT_TYPE
      • org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter.Side
      • org.apache.lucene.analysis.ngram.EdgeNGramTokenizer.Side
      • org.apache.lucene.analysis.ja.JapaneseTokenizer.Mode
      • org.apache.lucene.benchmark.byTask.feeds.TrecDocParser.ParsePathType
      • org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask.Implementation
      • org.apache.lucene.benchmark.byTask.utils.StreamUtils.Type
      • org.apache.lucene.facet.search.params.FacetRequest.SortBy
      • org.apache.lucene.facet.search.params.FacetRequest.SortOrder
      • org.apache.lucene.facet.search.params.FacetRequest.ResultMode
      • org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache.LRUType
      • org.apache.lucene.search.join.ToParentBlockJoinQuery.ScoreMode
      • org.apache.lucene.spatial.geometry.DistanceUnits
      • org.apache.lucene.spatial.geometry.shape.IntersectCase
      • org.apache.lucene.spatial.tier.DistanceHandler.Precision
      • org.apache.lucene.search.spell.SuggestMode
      • org.apache.lucene.queryParser.core.nodes.ParametricQueryNode.CompareOperator
      • org.apache.lucene.queryParser.core.nodes.ProximityQueryNode.Type
      • org.apache.lucene.queryParser.core.nodes.ModifierQueryNode.Modifier
      • org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax.Type
      • org.apache.lucene.queryParser.standard.QueryParserWrapper.Operator
      • org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute.Operator
      • org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.Operator
Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Serialized Form

Package org.apache.lucene.analysis

Class org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl extends AttributeImpl implements Serializable

Serialized Fields

clearCalled

boolean clearCalled

Class org.apache.lucene.analysis.Token extends TermAttributeImpl implements Serializable

Serialized Fields

startOffset

int startOffset

endOffset

int endOffset

type

String type

flags

int flags

payload

Payload payload

positionIncrement

int positionIncrement

positionLength

int positionLength
Package org.apache.lucene.analysis.compound.hyphenation

Class org.apache.lucene.analysis.compound.hyphenation.ByteVector extends Object implements Serializable

Serialized Fields

blockSize

int blockSize

array

byte[] array
The encapsulated array

n

int n
Points to next free item

Class org.apache.lucene.analysis.compound.hyphenation.CharVector extends Object implements Serializable

Serialized Fields

blockSize

int blockSize

array

char[] array
The encapsulated array

n

int n
Points to next free item

Class org.apache.lucene.analysis.compound.hyphenation.Hyphen extends Object implements Serializable

Serialized Fields

preBreak

String preBreak

noBreak

String noBreak

postBreak

String postBreak

Class org.apache.lucene.analysis.compound.hyphenation.HyphenationException extends Exception implements Serializable

Class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree extends TernaryTree implements Serializable

serialVersionUID: -7842107987915665573L

Serialized Fields

vspace

ByteVector vspace
value space: stores the interletter values

stoplist

HashMap<K,V> stoplist
This map stores hyphenation exceptions

classmap

TernaryTree classmap
This map stores the character classes

Class org.apache.lucene.analysis.compound.hyphenation.TernaryTree extends Object implements Serializable

Serialized Fields

lo

char[] lo
Pointer to low branch and to rest of the key when it is stored directly in this node, we don't have unions in java!

hi

char[] hi
Pointer to high branch.

eq

char[] eq
Pointer to equal branch and to data when this node is a string terminator.

sc

char[] sc

The character stored in this node: splitchar. Two special values are reserved:

  • 0x0000 as string terminator
  • 0xFFFF to indicate that the branch starting at this node is compressed

This shouldn't be a problem if we give the usual semantics to strings since 0xFFFF is guaranteed not to be an Unicode character.

kv

CharVector kv
This vector holds the trailing of the keys when the branch is compressed.

root

char root

freenode

char freenode

length

int length
Package org.apache.lucene.analysis.icu.tokenattributes

Class org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl extends AttributeImpl implements Serializable

Serialized Fields

code

int code
Package org.apache.lucene.analysis.ja.tokenattributes

Class org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttributeImpl extends AttributeImpl implements Serializable

Serialized Fields

token

Token token

Class org.apache.lucene.analysis.ja.tokenattributes.InflectionAttributeImpl extends AttributeImpl implements Serializable

Serialized Fields

token

Token token

Class org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttributeImpl extends AttributeImpl implements Serializable

Serialized Fields

token

Token token

Class org.apache.lucene.analysis.ja.tokenattributes.ReadingAttributeImpl extends AttributeImpl implements Serializable

Serialized Fields

token

Token token
Package org.apache.lucene.analysis.tokenattributes

Class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl extends AttributeImpl implements Serializable

Serialized Fields

termBuffer

char[] termBuffer

termLength

int termLength

Class org.apache.lucene.analysis.tokenattributes.FlagsAttributeImpl extends AttributeImpl implements Serializable

Serialized Fields

flags

int flags

Class org.apache.lucene.analysis.tokenattributes.KeywordAttributeImpl extends AttributeImpl implements Serializable

Serialized Fields

keyword

boolean keyword

Class org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl extends AttributeImpl implements Serializable

Serialized Fields

startOffset

int startOffset

endOffset

int endOffset

Class org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl extends AttributeImpl implements Serializable

Serialized Fields

payload

Payload payload

Class org.apache.lucene.analysis.tokenattributes.PositionIncrementAttributeImpl extends AttributeImpl implements Serializable

Serialized Fields

positionIncrement

int positionIncrement

Class org.apache.lucene.analysis.tokenattributes.PositionLengthAttributeImpl extends AttributeImpl implements Serializable

Serialized Fields

positionLength

int positionLength

Class org.apache.lucene.analysis.tokenattributes.TermAttributeImpl extends CharTermAttributeImpl implements Serializable

Class org.apache.lucene.analysis.tokenattributes.TypeAttributeImpl extends AttributeImpl implements Serializable

Serialized Fields

type

String type
Package org.apache.lucene.benchmark.byTask.feeds

Class org.apache.lucene.benchmark.byTask.feeds.NoMoreDataException extends Exception implements Serializable

Package org.apache.lucene.benchmark.byTask.feeds.demohtml

Class org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException extends Exception implements Serializable

Serialized Fields

specialConstructor

boolean specialConstructor
This variable determines which constructor was used to create this object and thereby affects the semantics of the "getMessage" method (see below).

currentToken

Token currentToken
This is the last token that has been consumed successfully. If this object has been created due to a parse error, the token followng this token will (therefore) be the first error token.

expectedTokenSequences

int[][] expectedTokenSequences
Each entry in this array is an array of integers. Each array of integers represents a sequence of tokens (by their ordinal values) that is expected at this point of the parse.

tokenImage

String[] tokenImage
This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred. This array is defined in the generated ...Constants interface.

eol

String eol
The end of line string for this machine.

Class org.apache.lucene.benchmark.byTask.feeds.demohtml.TokenMgrError extends Error implements Serializable

Serialized Fields

errorCode

int errorCode
Indicates the reason why the exception is thrown. It will have one of the above 4 values.

Package org.apache.lucene.document

Class org.apache.lucene.document.AbstractField extends Object implements Serializable

Serialized Fields

name

String name

storeTermVector

boolean storeTermVector

storeOffsetWithTermVector

boolean storeOffsetWithTermVector

storePositionWithTermVector

boolean storePositionWithTermVector

omitNorms

boolean omitNorms

isStored

boolean isStored

isIndexed

boolean isIndexed

isTokenized

boolean isTokenized

isBinary

boolean isBinary

lazy

boolean lazy

indexOptions

FieldInfo.IndexOptions indexOptions

boost

float boost

fieldsData

Object fieldsData

tokenStream

TokenStream tokenStream

binaryLength

int binaryLength

binaryOffset

int binaryOffset

Class org.apache.lucene.document.Document extends Object implements Serializable

Serialized Fields

fields

List<E> fields

boost

float boost

Class org.apache.lucene.document.Field extends AbstractField implements Serializable

Class org.apache.lucene.document.LoadFirstFieldSelector extends Object implements Serializable

Class org.apache.lucene.document.MapFieldSelector extends Object implements Serializable

Serialized Fields

fieldSelections

Map<K,V> fieldSelections

Class org.apache.lucene.document.NumericField extends AbstractField implements Serializable

Serialized Fields

type

NumericField.DataType type

precisionStep

int precisionStep

Class org.apache.lucene.document.SetBasedFieldSelector extends Object implements Serializable

Serialized Fields

fieldsToLoad

Set<E> fieldsToLoad

lazyFieldsToLoad

Set<E> lazyFieldsToLoad
Package org.apache.lucene.facet

Class org.apache.lucene.facet.FacetException extends IOException implements Serializable

Package org.apache.lucene.facet.enhancements.association

Class org.apache.lucene.facet.enhancements.association.AssociationFloatProperty extends AssociationProperty implements Serializable

Class org.apache.lucene.facet.enhancements.association.AssociationIntProperty extends AssociationProperty implements Serializable

Class org.apache.lucene.facet.enhancements.association.AssociationProperty extends Object implements Serializable

Serialized Fields

association

long association
Package org.apache.lucene.facet.enhancements.params

Class org.apache.lucene.facet.enhancements.params.DefaultEnhancementsIndexingParams extends PerDimensionIndexingParams implements Serializable

Serialized Fields

enhancedCategories

List<E> enhancedCategories
Package org.apache.lucene.facet.index

Class org.apache.lucene.facet.index.CategoryContainer extends Object implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
Deserialize object from given ObjectInputStream

Throws:
IOException
ClassNotFoundException

writeObject

private void writeObject(ObjectOutputStream out)
                  throws IOException
Serialize object content to given ObjectOutputStream

Throws:
IOException
Package org.apache.lucene.facet.index.attributes

Class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl extends AttributeImpl implements Serializable

Serialized Fields

categoryPath

CategoryPath categoryPath
The category path instance.

properties

HashMap<K,V> properties
A map of properties associated to the current category path.

Class org.apache.lucene.facet.index.attributes.OrdinalProperty extends Object implements Serializable

Serialized Fields

ordinal

int ordinal
Package org.apache.lucene.facet.index.categorypolicy

Class org.apache.lucene.facet.index.categorypolicy.DefaultOrdinalPolicy extends Object implements Serializable

Class org.apache.lucene.facet.index.categorypolicy.DefaultPathPolicy extends Object implements Serializable

Class org.apache.lucene.facet.index.categorypolicy.NonTopLevelOrdinalPolicy extends Object implements Serializable

Serialized Fields

taxonomyWriter

TaxonomyWriter taxonomyWriter
The taxonomyWriter with which the given ordinals' parent is determined.

Class org.apache.lucene.facet.index.categorypolicy.NonTopLevelPathPolicy extends Object implements Serializable

Serialized Fields

DEFAULT_MINIMAL_SUBPATH_LENGTH

int DEFAULT_MINIMAL_SUBPATH_LENGTH
The shortest path length delivered is two components (root + one child).

Package org.apache.lucene.facet.index.params

Class org.apache.lucene.facet.index.params.CategoryListParams extends Object implements Serializable

Serialized Fields

term

Term term

hashCode

int hashCode

Class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams extends Object implements Serializable

Serialized Fields

clpParams

CategoryListParams clpParams

ordinalPolicy

OrdinalPolicy ordinalPolicy

pathPolicy

PathPolicy pathPolicy

partitionSize

int partitionSize

Class org.apache.lucene.facet.index.params.FacetParamsMissingPropertyException extends FacetException implements Serializable

Class org.apache.lucene.facet.index.params.PerDimensionIndexingParams extends DefaultFacetIndexingParams implements Serializable

Serialized Fields

clParamsMap

Map<K,V> clParamsMap
Package org.apache.lucene.facet.taxonomy

Class org.apache.lucene.facet.taxonomy.CategoryPath extends Object implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException

writeObject

private void writeObject(ObjectOutputStream out)
                  throws IOException
Throws:
IOException
Serialized Fields

chars

char[] chars

ends

short[] ends

ncomponents

short ncomponents

Class org.apache.lucene.facet.taxonomy.InconsistentTaxonomyException extends Exception implements Serializable

Package org.apache.lucene.index

Class org.apache.lucene.index.CorruptIndexException extends IOException implements Serializable

Class org.apache.lucene.index.FieldReaderException extends RuntimeException implements Serializable

Class org.apache.lucene.index.IndexFormatTooNewException extends CorruptIndexException implements Serializable

Class org.apache.lucene.index.IndexFormatTooOldException extends CorruptIndexException implements Serializable

Class org.apache.lucene.index.IndexNotFoundException extends FileNotFoundException implements Serializable

Class org.apache.lucene.index.MergePolicy.MergeAbortedException extends IOException implements Serializable

Class org.apache.lucene.index.MergePolicy.MergeException extends RuntimeException implements Serializable

Serialized Fields

dir

Directory dir

Class org.apache.lucene.index.Payload extends Object implements Serializable

Serialized Fields

data

byte[] data
the byte array containing the payload data

offset

int offset
the offset within the byte array

length

int length
the length of the payload data

Class org.apache.lucene.index.StaleReaderException extends IOException implements Serializable

Class org.apache.lucene.index.Term extends Object implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException
Serialized Fields

field

String field

text

String text

Class org.apache.lucene.index.TermVectorOffsetInfo extends Object implements Serializable

Serialized Fields

startOffset

int startOffset

endOffset

int endOffset
Package org.apache.lucene.index.memory

Class org.apache.lucene.index.memory.MemoryIndex extends Object implements Serializable

serialVersionUID: 2782195016849084649L

Serialized Fields

fields

HashMap<K,V> fields
info for each field: Map

stride

int stride
pos: positions[3*i], startOffset: positions[3*i +1], endOffset: positions[3*i +2]

fieldInfos

FieldInfos fieldInfos
Package org.apache.lucene.messages

Class org.apache.lucene.messages.MessageImpl extends Object implements Serializable

serialVersionUID: -3077643314630884523L

Serialized Fields

key

String key
Deprecated.

arguments

Object[] arguments
Deprecated.
Package org.apache.lucene.misc

Class org.apache.lucene.misc.SweetSpotSimilarity extends DefaultSimilarity implements Serializable

Serialized Fields

ln_min

int ln_min

ln_max

int ln_max

ln_steep

float ln_steep

ln_maxs

Map<K,V> ln_maxs

ln_mins

Map<K,V> ln_mins

ln_steeps

Map<K,V> ln_steeps

ln_overlaps

Map<K,V> ln_overlaps

tf_base

float tf_base

tf_min

float tf_min

tf_hyper_min

float tf_hyper_min

tf_hyper_max

float tf_hyper_max

tf_hyper_base

double tf_hyper_base

tf_hyper_xoffset

float tf_hyper_xoffset
Package org.apache.lucene.queryParser

Class org.apache.lucene.queryParser.ParseException extends Exception implements Serializable

serialVersionUID: 1L

Serialized Fields

currentToken

Token currentToken
This is the last token that has been consumed successfully. If this object has been created due to a parse error, the token followng this token will (therefore) be the first error token.

expectedTokenSequences

int[][] expectedTokenSequences
Each entry in this array is an array of integers. Each array of integers represents a sequence of tokens (by their ordinal values) that is expected at this point of the parse.

tokenImage

String[] tokenImage
This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred. This array is defined in the generated ...Constants interface.

eol

String eol
The end of line string for this machine.

Class org.apache.lucene.queryParser.Token extends Object implements Serializable

serialVersionUID: 1L

Serialized Fields

kind

int kind
An integer that describes the kind of this token. This numbering system is determined by JavaCCParser, and a table of these numbers is stored in the file ...Constants.java.

beginLine

int beginLine
The line number of the first character of this Token.

beginColumn

int beginColumn
The column number of the first character of this Token.

endLine

int endLine
The line number of the last character of this Token.

endColumn

int endColumn
The column number of the last character of this Token.

image

String image
The string image of the token.

next

Token next
A reference to the next regular (non-special) token from the input stream. If this is the last token from the input stream, or if the token manager has not read tokens beyond this one, this field is set to null. This is true only if this token is also a regular token. Otherwise, see below for a description of the contents of this field.

specialToken

Token specialToken
This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token. If there are no such special tokens, this field is set to null. When there are more than one such special token, this field refers to the last of these special tokens, which in turn refers to the next previous special token through its specialToken field, and so on until the first special token (whose specialToken field is null). The next fields of special tokens refer to other special tokens that immediately follow it (without an intervening regular token). If there is no such token, this field is null.

Class org.apache.lucene.queryParser.TokenMgrError extends Error implements Serializable

serialVersionUID: 1L

Serialized Fields

errorCode

int errorCode
Indicates the reason why the exception is thrown. It will have one of the above 4 values.

Package org.apache.lucene.queryParser.core

Class org.apache.lucene.queryParser.core.QueryNodeError extends Error implements Serializable

serialVersionUID: 1804855832182710327L

Serialized Fields

message

Message message

Class org.apache.lucene.queryParser.core.QueryNodeException extends Exception implements Serializable

serialVersionUID: -5962648855261624214L

Serialized Fields

message

Message message

Class org.apache.lucene.queryParser.core.QueryNodeParseException extends QueryNodeException implements Serializable

serialVersionUID: 8197535103538766773L

Serialized Fields

query

CharSequence query

beginColumn

int beginColumn

beginLine

int beginLine

errorToken

String errorToken
Package org.apache.lucene.queryParser.core.nodes

Class org.apache.lucene.queryParser.core.nodes.AndQueryNode extends BooleanQueryNode implements Serializable

serialVersionUID: 118496077529151825L

Class org.apache.lucene.queryParser.core.nodes.AnyQueryNode extends AndQueryNode implements Serializable

serialVersionUID: 1000791433562954187L

Serialized Fields

field

CharSequence field

minimumMatchingmElements

int minimumMatchingmElements

Class org.apache.lucene.queryParser.core.nodes.BooleanQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: -2206623652088638072L

Class org.apache.lucene.queryParser.core.nodes.BoostQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: -3929082630855807593L

Serialized Fields

value

float value

Class org.apache.lucene.queryParser.core.nodes.DeletedQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: -9151675506000425293L

Class org.apache.lucene.queryParser.core.nodes.FieldQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: 3634521145130758265L

Serialized Fields

field

CharSequence field
The term's field

text

CharSequence text
The term's text.

begin

int begin
The term's begin position.

end

int end
The term's end position.

positionIncrement

int positionIncrement
The term's position increment.

Class org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode extends FieldQueryNode implements Serializable

serialVersionUID: -1794537213032589441L

Serialized Fields

similarity

float similarity

prefixLength

int prefixLength

Class org.apache.lucene.queryParser.core.nodes.GroupQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: -9204673493869114999L

Class org.apache.lucene.queryParser.core.nodes.MatchAllDocsQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: -7050381275423477809L

Class org.apache.lucene.queryParser.core.nodes.MatchNoDocsQueryNode extends DeletedQueryNode implements Serializable

serialVersionUID: 8081805751679581497L

Class org.apache.lucene.queryParser.core.nodes.ModifierQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: -391209837953928169L

Serialized Fields

modifier

ModifierQueryNode.Modifier modifier

Class org.apache.lucene.queryParser.core.nodes.NoTokenFoundQueryNode extends DeletedQueryNode implements Serializable

serialVersionUID: 7332975497586993833L

Class org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: 0L

Serialized Fields

schema

CharSequence schema

value

CharSequence value

Class org.apache.lucene.queryParser.core.nodes.OrQueryNode extends BooleanQueryNode implements Serializable

serialVersionUID: -3692323307688017852L

Class org.apache.lucene.queryParser.core.nodes.ParametricQueryNode extends FieldQueryNode implements Serializable

serialVersionUID: -5770038129741218116L

Serialized Fields

operator

ParametricQueryNode.CompareOperator operator
Deprecated.

Class org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: 7120958816535573935L

Class org.apache.lucene.queryParser.core.nodes.PathQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: -8325921322405804789L

Serialized Fields

values

List<E> values

Class org.apache.lucene.queryParser.core.nodes.PhraseSlopQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: 0L

Serialized Fields

value

int value

Class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode extends BooleanQueryNode implements Serializable

serialVersionUID: 9018220596680832916L

Serialized Fields

proximityType

ProximityQueryNode.Type proximityType

distance

int distance

inorder

boolean inorder

field

CharSequence field

Class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl extends Object implements Serializable

serialVersionUID: 5569870883474845989L

Serialized Fields

isLeaf

boolean isLeaf

tags

Hashtable<K,V> tags

clauses

List<E> clauses

parent

QueryNode parent

toQueryStringIgnoreFields

boolean toQueryStringIgnoreFields
If set to true the the method toQueryString will not write field names

Class org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode extends FieldQueryNode implements Serializable

serialVersionUID: -6675157780051428987L

Class org.apache.lucene.queryParser.core.nodes.SlopQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: 0L

Serialized Fields

value

int value

Class org.apache.lucene.queryParser.core.nodes.TokenizedPhraseQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: -7185108320787917541L

Package org.apache.lucene.queryParser.standard.config

Class org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl extends AttributeImpl implements Serializable

serialVersionUID: -2804763012723049527L

Serialized Fields

config

AbstractQueryConfig config
Deprecated.

Class org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl extends AttributeImpl implements Serializable

serialVersionUID: -6804760312723049526L

Serialized Fields

config

AbstractQueryConfig config
Deprecated.

Class org.apache.lucene.queryParser.standard.config.BoostAttributeImpl extends AttributeImpl implements Serializable

serialVersionUID: -2104763012523049527L

Serialized Fields

config

AbstractQueryConfig config
Deprecated.

Class org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl extends AttributeImpl implements Serializable

serialVersionUID: -6804360312723049526L

Serialized Fields

config

AbstractQueryConfig config
Deprecated.

Class org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl extends AttributeImpl implements Serializable

serialVersionUID: -6804760312723049526L

Serialized Fields

config

AbstractQueryConfig config
Deprecated.

Class org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl extends AttributeImpl implements Serializable

serialVersionUID: -2104763012527049527L

Serialized Fields

config

AbstractQueryConfig config
Deprecated.

Class org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl extends AttributeImpl implements Serializable

serialVersionUID: -2104763012523049527L

Serialized Fields

config

AbstractQueryConfig config
Deprecated.

Class org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl extends AttributeImpl implements Serializable

serialVersionUID: -2104763012523049527L

Serialized Fields

config

AbstractQueryConfig config
Deprecated.

Class org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl extends AttributeImpl implements Serializable

serialVersionUID: -2104763012527049527L

Serialized Fields

config

AbstractQueryConfig config
Deprecated.

Class org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl extends AttributeImpl implements Serializable

serialVersionUID: -6804760312720049526L

Serialized Fields

config

AbstractQueryConfig config
Deprecated.

locale

Locale locale
Deprecated.

Class org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl extends AttributeImpl implements Serializable

serialVersionUID: -2804760312723049527L

Serialized Fields

config

AbstractQueryConfig config
Deprecated.

Class org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl extends AttributeImpl implements Serializable

serialVersionUID: -6809760312720049526L

Serialized Fields

config

AbstractQueryConfig config
Deprecated.

Class org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl extends AttributeImpl implements Serializable

serialVersionUID: -2104763012723049527L

Serialized Fields

config

AbstractQueryConfig config
Deprecated.

Class org.apache.lucene.queryParser.standard.config.NumberDateFormat extends NumberFormat implements Serializable

serialVersionUID: 964823936071308283L

Serialized Fields

dateFormat

DateFormat dateFormat

Class org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl extends AttributeImpl implements Serializable

serialVersionUID: -2804763012793049527L

Serialized Fields

config

AbstractQueryConfig config
Deprecated.

Class org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl extends AttributeImpl implements Serializable

serialVersionUID: -6804360312723049526L

Serialized Fields

config

AbstractQueryConfig config
Deprecated.
Package org.apache.lucene.queryParser.standard.nodes

Class org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: 4475492120315147792L

Serialized Fields

lowerInclusive

boolean lowerInclusive

upperInclusive

boolean upperInclusive

Class org.apache.lucene.queryParser.standard.nodes.BooleanModifierNode extends ModifierQueryNode implements Serializable

serialVersionUID: -557816496416587068L

Class org.apache.lucene.queryParser.standard.nodes.MultiPhraseQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: -2138501723963320158L

Class org.apache.lucene.queryParser.standard.nodes.NumericQueryNode extends QueryNodeImpl implements Serializable

serialVersionUID: -1969102979874574778L

Serialized Fields

numberFormat

NumberFormat numberFormat

field

CharSequence field

value

Number value

Class org.apache.lucene.queryParser.standard.nodes.NumericRangeQueryNode extends AbstractRangeQueryNode<NumericQueryNode> implements Serializable

Serialized Fields

numericConfig

NumericConfig numericConfig

Class org.apache.lucene.queryParser.standard.nodes.PrefixWildcardQueryNode extends WildcardQueryNode implements Serializable

serialVersionUID: 6851557641826407515L

Class org.apache.lucene.queryParser.standard.nodes.RangeQueryNode extends TermRangeQueryNode implements Serializable

serialVersionUID: 7400866652044314657L

Serialized Fields

collator

Collator collator
Deprecated.

Class org.apache.lucene.queryParser.standard.nodes.StandardBooleanQueryNode extends BooleanQueryNode implements Serializable

serialVersionUID: 1938287817191138787L

Serialized Fields

disableCoord

boolean disableCoord

Class org.apache.lucene.queryParser.standard.nodes.TermRangeQueryNode extends AbstractRangeQueryNode<FieldQueryNode> implements Serializable

serialVersionUID: 5470829448078569869L

Class org.apache.lucene.queryParser.standard.nodes.WildcardQueryNode extends FieldQueryNode implements Serializable

serialVersionUID: 0L

Package org.apache.lucene.queryParser.standard.parser

Class org.apache.lucene.queryParser.standard.parser.ParseException extends QueryNodeParseException implements Serializable

Serialized Fields

specialConstructor

boolean specialConstructor
This variable determines which constructor was used to create this object and thereby affects the semantics of the "getMessage" method (see below).

currentToken

Token currentToken
This is the last token that has been consumed successfully. If this object has been created due to a parse error, the token followng this token will (therefore) be the first error token.

expectedTokenSequences

int[][] expectedTokenSequences
Each entry in this array is an array of integers. Each array of integers represents a sequence of tokens (by their ordinal values) that is expected at this point of the parse.

tokenImage

String[] tokenImage
This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred. This array is defined in the generated ...Constants interface.

eol

String eol
The end of line string for this machine.

Class org.apache.lucene.queryParser.standard.parser.TokenMgrError extends Error implements Serializable

Serialized Fields

errorCode

int errorCode
Indicates the reason why the exception is thrown. It will have one of the above 4 values.

Package org.apache.lucene.queryParser.surround.parser

Class org.apache.lucene.queryParser.surround.parser.ParseException extends Exception implements Serializable

Serialized Fields

specialConstructor

boolean specialConstructor
This variable determines which constructor was used to create this object and thereby affects the semantics of the "getMessage" method (see below).

currentToken

Token currentToken
This is the last token that has been consumed successfully. If this object has been created due to a parse error, the token followng this token will (therefore) be the first error token.

expectedTokenSequences

int[][] expectedTokenSequences
Each entry in this array is an array of integers. Each array of integers represents a sequence of tokens (by their ordinal values) that is expected at this point of the parse.

tokenImage

String[] tokenImage
This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred. This array is defined in the generated ...Constants interface.

eol

String eol
The end of line string for this machine.

Class org.apache.lucene.queryParser.surround.parser.TokenMgrError extends Error implements Serializable

Serialized Fields

errorCode

int errorCode
Indicates the reason why the exception is thrown. It will have one of the above 4 values.

Package org.apache.lucene.queryParser.surround.query

Class org.apache.lucene.queryParser.surround.query.TooManyBasicQueries extends IOException implements Serializable

Package org.apache.lucene.search

Class org.apache.lucene.search.BooleanClause extends Object implements Serializable

Serialized Fields

query

Query query
The query whose matching documents are combined by the boolean query.

occur

BooleanClause.Occur occur

Class org.apache.lucene.search.BooleanFilter extends Filter implements Serializable

Serialized Fields

clauses

List<E> clauses

Class org.apache.lucene.search.BooleanQuery extends Query implements Serializable

Serialized Fields

clauses

ArrayList<E> clauses

disableCoord

boolean disableCoord

minNrShouldMatch

int minNrShouldMatch

Class org.apache.lucene.search.BooleanQuery.BooleanWeight extends Weight implements Serializable

Serialized Fields

similarity

Similarity similarity
The Similarity implementation.

weights

ArrayList<E> weights

maxCoord

int maxCoord

disableCoord

boolean disableCoord

Class org.apache.lucene.search.BooleanQuery.TooManyClauses extends RuntimeException implements Serializable

Class org.apache.lucene.search.BoostingQuery extends Query implements Serializable

Serialized Fields

boost

float boost

match

Query match

context

Query context

Class org.apache.lucene.search.CachingSpanFilter extends SpanFilter implements Serializable

Serialized Fields

filter

SpanFilter filter

cache

org.apache.lucene.search.CachingWrapperFilter.FilterCache<T> cache
A transient Filter cache (package private because of test)

hitCount

int hitCount

missCount

int missCount

Class org.apache.lucene.search.CachingWrapperFilter extends Filter implements Serializable

Serialized Fields

filter

Filter filter

cache

org.apache.lucene.search.CachingWrapperFilter.FilterCache<T> cache

hitCount

int hitCount

missCount

int missCount

Class org.apache.lucene.search.CachingWrapperFilterHelper extends CachingWrapperFilter implements Serializable

Serialized Fields

shouldHaveCache

boolean shouldHaveCache

Class org.apache.lucene.search.ChainedFilter extends Filter implements Serializable

Serialized Fields

chain

Filter[] chain
The filter chain

logicArray

int[] logicArray

logic

int logic

Class org.apache.lucene.search.ComplexExplanation extends Explanation implements Serializable

Serialized Fields

match

Boolean match

Class org.apache.lucene.search.ConstantScoreQuery extends Query implements Serializable

Serialized Fields

filter

Filter filter

query

Query query

Class org.apache.lucene.search.ConstantScoreQuery.ConstantWeight extends Weight implements Serializable

Serialized Fields

innerWeight

Weight innerWeight

similarity

Similarity similarity

queryNorm

float queryNorm

queryWeight

float queryWeight

Class org.apache.lucene.search.DefaultSimilarity extends Similarity implements Serializable

Serialized Fields

discountOverlaps

boolean discountOverlaps

Class org.apache.lucene.search.DisjunctionMaxQuery extends Query implements Serializable

Serialized Fields

disjuncts

ArrayList<E> disjuncts

tieBreakerMultiplier

float tieBreakerMultiplier

Class org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight extends Weight implements Serializable

Serialized Fields

similarity

Similarity similarity
The Similarity implementation.

weights

ArrayList<E> weights
The Weights for our subqueries, in 1-1 correspondence with disjuncts

Class org.apache.lucene.search.DuplicateFilter extends Filter implements Serializable

Serialized Fields

fieldName

String fieldName

keepMode

int keepMode
KeepMode determines which document id to consider as the master, all others being identified as duplicates. Selecting the "first occurrence" can potentially save on IO.

processingMode

int processingMode
"Full" processing mode starts by setting all bits to false and only setting bits for documents that contain the given field and are identified as none-duplicates. "Fast" processing sets all bits to true then unsets all duplicate docs found for the given field. This approach avoids the need to read TermDocs for terms that are seen to have a document frequency of exactly "1" (i.e. no duplicates). While a potentially faster approach , the downside is that bitsets produced will include bits set for documents that do not actually contain the field given.

Class org.apache.lucene.search.Explanation extends Object implements Serializable

Serialized Fields

value

float value

description

String description

details

ArrayList<E> details

Class org.apache.lucene.search.Explanation.IDFExplanation extends Object implements Serializable

Class org.apache.lucene.search.FieldCacheRangeFilter extends Filter implements Serializable

Serialized Fields

field

String field

parser

FieldCache.Parser parser

lowerVal

Object lowerVal

upperVal

Object upperVal

includeLower

boolean includeLower

includeUpper

boolean includeUpper

Class org.apache.lucene.search.FieldCacheTermsFilter extends Filter implements Serializable

Serialized Fields

field

String field

terms

String[] terms

Class org.apache.lucene.search.FieldComparatorSource extends Object implements Serializable

Class org.apache.lucene.search.FieldDoc extends ScoreDoc implements Serializable

Serialized Fields

fields

Object[] fields
Expert: The values which are used to sort the referenced document. The order of these will match the original sort criteria given by a Sort object. Each Object will have been returned from the value method corresponding FieldComparator used to sort this field.

See Also:
Sort, Searcher.search(Query,Filter,int,Sort)

Class org.apache.lucene.search.FieldValueFilter extends Filter implements Serializable

Serialized Fields

field

String field

negate

boolean negate

Class org.apache.lucene.search.FieldValueHitQueue.Entry extends ScoreDoc implements Serializable

Serialized Fields

slot

int slot

Class org.apache.lucene.search.Filter extends Object implements Serializable

Class org.apache.lucene.search.FilteredQuery extends Query implements Serializable

Serialized Fields

query

Query query

filter

Filter filter

Class org.apache.lucene.search.FuzzyLikeThisQuery extends Query implements Serializable

Serialized Fields

rewrittenQuery

Query rewrittenQuery

fieldVals

ArrayList<E> fieldVals

analyzer

Analyzer analyzer

q

org.apache.lucene.search.FuzzyLikeThisQuery.ScoreTermQueue q

MAX_VARIANTS_PER_TERM

int MAX_VARIANTS_PER_TERM

ignoreTF

boolean ignoreTF

maxNumTerms

int maxNumTerms

Class org.apache.lucene.search.FuzzyQuery extends MultiTermQuery implements Serializable

Serialized Fields

minimumSimilarity

float minimumSimilarity

prefixLength

int prefixLength

termLongEnough

boolean termLongEnough

term

Term term

Class org.apache.lucene.search.MatchAllDocsQuery extends Query implements Serializable

Serialized Fields

normsField

String normsField

Class org.apache.lucene.search.MultiPhraseQuery extends Query implements Serializable

Serialized Fields

field

String field

termArrays

ArrayList<E> termArrays

positions

ArrayList<E> positions

slop

int slop

Class org.apache.lucene.search.MultiTermQuery extends Query implements Serializable

Serialized Fields

rewriteMethod

MultiTermQuery.RewriteMethod rewriteMethod

Class org.apache.lucene.search.MultiTermQuery.ConstantScoreAutoRewrite extends org.apache.lucene.search.ConstantScoreAutoRewrite implements Serializable

Class org.apache.lucene.search.MultiTermQuery.RewriteMethod extends Object implements Serializable

Class org.apache.lucene.search.MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite extends TopTermsRewrite<BooleanQuery> implements Serializable

Class org.apache.lucene.search.MultiTermQuery.TopTermsScoringBooleanQueryRewrite extends TopTermsRewrite<BooleanQuery> implements Serializable

Class org.apache.lucene.search.MultiTermQueryWrapperFilter extends Filter implements Serializable

Serialized Fields

query

MultiTermQuery query

Class org.apache.lucene.search.NGramPhraseQuery extends PhraseQuery implements Serializable

Serialized Fields

n

int n

Class org.apache.lucene.search.NumericRangeFilter extends MultiTermQueryWrapperFilter<NumericRangeQuery<T extends Number>> implements Serializable

Class org.apache.lucene.search.NumericRangeQuery extends MultiTermQuery implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException
Serialized Fields

field

String field

precisionStep

int precisionStep

dataType

NumericField.DataType dataType

min

Number min

max

Number max

minInclusive

boolean minInclusive

maxInclusive

boolean maxInclusive

Class org.apache.lucene.search.PhraseQuery extends Query implements Serializable

Serialized Fields

field

String field

terms

ArrayList<E> terms

positions

ArrayList<E> positions

maxPosition

int maxPosition

slop

int slop

Class org.apache.lucene.search.PrefixFilter extends MultiTermQueryWrapperFilter<PrefixQuery> implements Serializable

Class org.apache.lucene.search.PrefixQuery extends MultiTermQuery implements Serializable

Serialized Fields

prefix

Term prefix

Class org.apache.lucene.search.Query extends Object implements Serializable

Serialized Fields

boost

float boost

Class org.apache.lucene.search.QueryWrapperFilter extends Filter implements Serializable

Serialized Fields

query

Query query

Class org.apache.lucene.search.RemoteCachingWrapperFilter extends Filter implements Serializable

Serialized Fields

filter

Filter filter
Deprecated.

Class org.apache.lucene.search.RemoteSearchable extends UnicastRemoteObject implements Serializable

Serialized Fields

local

Searchable local
Deprecated.

Class org.apache.lucene.search.ScoreDoc extends Object implements Serializable

Serialized Fields

score

float score
The score of this document for the query.

doc

int doc
Expert: A hit document's number.

See Also:
Searcher.doc(int)

shardIndex

int shardIndex
Only set by TopDocs.merge(org.apache.lucene.search.Sort, int, org.apache.lucene.search.TopDocs[])

Class org.apache.lucene.search.ScoringRewrite extends org.apache.lucene.search.TermCollectingRewrite<Q extends Query> implements Serializable

Class org.apache.lucene.search.Similarity extends Object implements Serializable

Serialized Fields

hasIDFExplainWithDocFreqAPI

boolean hasIDFExplainWithDocFreqAPI

Class org.apache.lucene.search.SimilarityDelegator extends Similarity implements Serializable

Serialized Fields

delegee

Similarity delegee
Deprecated.

Class org.apache.lucene.search.Sort extends Object implements Serializable

Serialized Fields

fields

SortField[] fields

Class org.apache.lucene.search.SortField extends Object implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException
Serialized Fields

field

String field

type

int type

locale

Locale locale

reverse

boolean reverse

parser

FieldCache.Parser parser

comparatorSource

FieldComparatorSource comparatorSource

missingValue

Object missingValue

Class org.apache.lucene.search.SpanFilter extends Filter implements Serializable

Class org.apache.lucene.search.SpanQueryFilter extends SpanFilter implements Serializable

Serialized Fields

query

SpanQuery query

Class org.apache.lucene.search.TermQuery extends Query implements Serializable

Serialized Fields

term

Term term

Class org.apache.lucene.search.TermRangeFilter extends MultiTermQueryWrapperFilter<TermRangeQuery> implements Serializable

Class org.apache.lucene.search.TermRangeQuery extends MultiTermQuery implements Serializable

Serialized Fields

lowerTerm

String lowerTerm

upperTerm

String upperTerm

collator

Collator collator

field

String field

includeLower

boolean includeLower

includeUpper

boolean includeUpper

Class org.apache.lucene.search.TermsFilter extends Filter implements Serializable

Serialized Fields

terms

Set<E> terms

Class org.apache.lucene.search.TimeLimitingCollector.TimeExceededException extends RuntimeException implements Serializable

Serialized Fields

timeAllowed

long timeAllowed

timeElapsed

long timeElapsed

lastDocCollected

int lastDocCollected

Class org.apache.lucene.search.TopDocs extends Object implements Serializable

Serialized Fields

totalHits

int totalHits
The total number of hits for the query.

scoreDocs

ScoreDoc[] scoreDocs
The top hits for the query.

maxScore

float maxScore
Stores the maximum score value encountered, needed for normalizing.

Class org.apache.lucene.search.TopFieldDocs extends TopDocs implements Serializable

Serialized Fields

fields

SortField[] fields
The fields which were used to sort results by.

Class org.apache.lucene.search.TopTermsRewrite extends org.apache.lucene.search.TermCollectingRewrite<Q extends Query> implements Serializable

Serialized Fields

size

int size

Class org.apache.lucene.search.Weight extends Object implements Serializable

Class org.apache.lucene.search.WildcardQuery extends MultiTermQuery implements Serializable

Serialized Fields

termContainsWildcard

boolean termContainsWildcard

termIsPrefix

boolean termIsPrefix

term

Term term
Package org.apache.lucene.search.function

Class org.apache.lucene.search.function.ByteFieldSource extends FieldCacheSource implements Serializable

Serialized Fields

parser

FieldCache.ByteParser parser

Class org.apache.lucene.search.function.CustomScoreQuery extends Query implements Serializable

Serialized Fields

subQuery

Query subQuery

valSrcQueries

ValueSourceQuery[] valSrcQueries

strict

boolean strict

Class org.apache.lucene.search.function.FieldCacheSource extends ValueSource implements Serializable

Serialized Fields

field

String field

Class org.apache.lucene.search.function.FieldScoreQuery extends ValueSourceQuery implements Serializable

Class org.apache.lucene.search.function.FloatFieldSource extends FieldCacheSource implements Serializable

Serialized Fields

parser

FieldCache.FloatParser parser

Class org.apache.lucene.search.function.IntFieldSource extends FieldCacheSource implements Serializable

Serialized Fields

parser

FieldCache.IntParser parser

Class org.apache.lucene.search.function.OrdFieldSource extends ValueSource implements Serializable

Serialized Fields

field

String field

Class org.apache.lucene.search.function.ReverseOrdFieldSource extends ValueSource implements Serializable

Serialized Fields

field

String field

Class org.apache.lucene.search.function.ShortFieldSource extends FieldCacheSource implements Serializable

Serialized Fields

parser

FieldCache.ShortParser parser

Class org.apache.lucene.search.function.ValueSource extends Object implements Serializable

Class org.apache.lucene.search.function.ValueSourceQuery extends Query implements Serializable

Serialized Fields

valSrc

ValueSource valSrc
Package org.apache.lucene.search.highlight

Class org.apache.lucene.search.highlight.InvalidTokenOffsetsException extends Exception implements Serializable

Class org.apache.lucene.search.highlight.WeightedSpanTermExtractor.PositionCheckingMap extends HashMap<K,WeightedSpanTerm> implements Serializable

Package org.apache.lucene.search.join

Class org.apache.lucene.search.join.RawTermFilter extends Filter implements Serializable

Serialized Fields

term

Term term

Class org.apache.lucene.search.join.ToChildBlockJoinQuery extends Query implements Serializable

Serialized Fields

parentsFilter

Filter parentsFilter

parentQuery

Query parentQuery

origParentQuery

Query origParentQuery

doScores

boolean doScores

Class org.apache.lucene.search.join.ToParentBlockJoinQuery extends Query implements Serializable

Serialized Fields

parentsFilter

Filter parentsFilter

childQuery

Query childQuery

origChildQuery

Query origChildQuery

scoreMode

ToParentBlockJoinQuery.ScoreMode scoreMode
Package org.apache.lucene.search.payloads

Class org.apache.lucene.search.payloads.AveragePayloadFunction extends PayloadFunction implements Serializable

Class org.apache.lucene.search.payloads.MaxPayloadFunction extends PayloadFunction implements Serializable

Class org.apache.lucene.search.payloads.MinPayloadFunction extends PayloadFunction implements Serializable

Class org.apache.lucene.search.payloads.PayloadFunction extends Object implements Serializable

Class org.apache.lucene.search.payloads.PayloadNearQuery extends SpanNearQuery implements Serializable

Serialized Fields

fieldName

String fieldName

function

PayloadFunction function

Class org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanWeight extends SpanWeight implements Serializable

Class org.apache.lucene.search.payloads.PayloadTermQuery extends SpanTermQuery implements Serializable

Serialized Fields

function

PayloadFunction function

includeSpanScore

boolean includeSpanScore

Class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight extends SpanWeight implements Serializable

Package org.apache.lucene.search.regex

Class org.apache.lucene.search.regex.RegexQuery extends MultiTermQuery implements Serializable

Serialized Fields

regexImpl

RegexCapabilities regexImpl

term

Term term

Class org.apache.lucene.search.regex.SpanRegexQuery extends SpanMultiTermQueryWrapper<RegexQuery> implements Serializable

Serialized Fields

regexImpl

RegexCapabilities regexImpl
Deprecated.
Package org.apache.lucene.search.similar

Class org.apache.lucene.search.similar.MoreLikeThisQuery extends Query implements Serializable

Serialized Fields

likeText

String likeText

moreLikeFields

String[] moreLikeFields

analyzer

Analyzer analyzer

fieldName

String fieldName

percentTermsToMatch

float percentTermsToMatch

minTermFrequency

int minTermFrequency

maxQueryTerms

int maxQueryTerms

stopWords

Set<E> stopWords

minDocFreq

int minDocFreq
Package org.apache.lucene.search.spans

Class org.apache.lucene.search.spans.FieldMaskingSpanQuery extends SpanQuery implements Serializable

Serialized Fields

maskedQuery

SpanQuery maskedQuery

field

String field

Class org.apache.lucene.search.spans.SpanFirstQuery extends SpanPositionRangeQuery implements Serializable

Class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper extends SpanQuery implements Serializable

Serialized Fields

query

MultiTermQuery query

getFieldMethod

Method getFieldMethod

getTermMethod

Method getTermMethod

Class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod extends MultiTermQuery.RewriteMethod implements Serializable

Class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite extends SpanMultiTermQueryWrapper.SpanRewriteMethod implements Serializable

Serialized Fields

delegate

TopTermsRewrite<Q extends Query> delegate

Class org.apache.lucene.search.spans.SpanNearPayloadCheckQuery extends SpanPositionCheckQuery implements Serializable

Serialized Fields

payloadToMatch

Collection<E> payloadToMatch

Class org.apache.lucene.search.spans.SpanNearQuery extends SpanQuery implements Serializable

Serialized Fields

clauses

List<E> clauses

slop

int slop

inOrder

boolean inOrder

field

String field

collectPayloads

boolean collectPayloads

Class org.apache.lucene.search.spans.SpanNotQuery extends SpanQuery implements Serializable

Serialized Fields

include

SpanQuery include

exclude

SpanQuery exclude

Class org.apache.lucene.search.spans.SpanOrQuery extends SpanQuery implements Serializable

Serialized Fields

clauses

List<E> clauses

field

String field

Class org.apache.lucene.search.spans.SpanPayloadCheckQuery extends SpanPositionCheckQuery implements Serializable

Serialized Fields

payloadToMatch

Collection<E> payloadToMatch

Class org.apache.lucene.search.spans.SpanPositionCheckQuery extends SpanQuery implements Serializable

Serialized Fields

match

SpanQuery match

Class org.apache.lucene.search.spans.SpanPositionRangeQuery extends SpanPositionCheckQuery implements Serializable

Serialized Fields

start

int start

end

int end

Class org.apache.lucene.search.spans.SpanQuery extends Query implements Serializable

Class org.apache.lucene.search.spans.SpanTermQuery extends SpanQuery implements Serializable

Serialized Fields

term

Term term

Class org.apache.lucene.search.spans.SpanWeight extends Weight implements Serializable

Serialized Fields

similarity

Similarity similarity

value

float value

idf

float idf

queryNorm

float queryNorm

queryWeight

float queryWeight

terms

Set<E> terms

query

SpanQuery query

idfExp

Explanation.IDFExplanation idfExp
Package org.apache.lucene.spatial.geohash

Class org.apache.lucene.spatial.geohash.GeoHashDistanceFilter extends DistanceFilter implements Serializable

serialVersionUID: 1L

Serialized Fields

lat

double lat
Deprecated.

lng

double lng
Deprecated.

geoHashField

String geoHashField
Deprecated.
Package org.apache.lucene.spatial.tier

Class org.apache.lucene.spatial.tier.CartesianShapeFilter extends Filter implements Serializable

Serialized Fields

shape

Shape shape
Deprecated.

fieldName

String fieldName
Deprecated.

Class org.apache.lucene.spatial.tier.DistanceFieldComparatorSource extends FieldComparatorSource implements Serializable

serialVersionUID: 1L

Serialized Fields

distanceFilter

DistanceFilter distanceFilter
Deprecated.

dsdlc

org.apache.lucene.spatial.tier.DistanceFieldComparatorSource.DistanceScoreDocLookupComparator dsdlc
Deprecated.

Class org.apache.lucene.spatial.tier.DistanceFilter extends Filter implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream stream)
                 throws IOException,
                        ClassNotFoundException
Deprecated.
needed for deserialization, because the cache is transient

Throws:
IOException
ClassNotFoundException
Serialized Fields

startingFilter

Filter startingFilter
Deprecated.

precise

DistanceHandler.Precision precise
Deprecated.

distances

Map<K,V> distances
Deprecated.

distance

double distance
Deprecated.

nextDocBase

int nextDocBase
Deprecated.

Class org.apache.lucene.spatial.tier.InvalidGeoException extends Exception implements Serializable

serialVersionUID: 1L

Class org.apache.lucene.spatial.tier.LatLongDistanceFilter extends DistanceFilter implements Serializable

serialVersionUID: 1L

Serialized Fields

lat

double lat
Deprecated.

lng

double lng
Deprecated.

latField

String latField
Deprecated.

lngField

String lngField
Deprecated.

nextOffset

int nextOffset
Deprecated.

Class org.apache.lucene.spatial.tier.Shape extends Object implements Serializable

Serialized Fields

area

List<E> area
Deprecated.

tierId

String tierId
Deprecated.
Package org.apache.lucene.store

Class org.apache.lucene.store.AlreadyClosedException extends IllegalStateException implements Serializable

Class org.apache.lucene.store.LockObtainFailedException extends IOException implements Serializable

Class org.apache.lucene.store.LockReleaseFailedException extends IOException implements Serializable

Class org.apache.lucene.store.NoSuchDirectoryException extends FileNotFoundException implements Serializable

Class org.apache.lucene.store.RAMDirectory extends Directory implements Serializable

serialVersionUID: 1L

Serialized Fields

fileMap

Map<K,V> fileMap

sizeInBytes

AtomicLong sizeInBytes

Class org.apache.lucene.store.RAMFile extends Object implements Serializable

serialVersionUID: 1L

Serialized Fields

buffers

ArrayList<E> buffers

length

long length

directory

RAMDirectory directory

sizeInBytes

long sizeInBytes

lastModified

long lastModified
Package org.apache.lucene.store.instantiated

Class org.apache.lucene.store.instantiated.InstantiatedDocument extends Object implements Serializable

serialVersionUID: 1L

Serialized Fields

document

Document document

documentNumber

Integer documentNumber
this is the unsafe index order document number.

vectorSpace

Map<K,V> vectorSpace
this is the term vector space view

Class org.apache.lucene.store.instantiated.InstantiatedIndex extends Object implements Serializable

serialVersionUID: 1L

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
Deprecated.
Throws:
IOException
ClassNotFoundException
Serialized Fields

version

long version
Deprecated.

documentsByNumber

InstantiatedDocument[] documentsByNumber
Deprecated.

deletedDocuments

BitVector deletedDocuments
Deprecated.

termsByFieldAndText

Map<K,V> termsByFieldAndText
Deprecated.

orderedTerms

InstantiatedTerm[] orderedTerms
Deprecated.

normsByFieldNameAndDocumentNumber

Map<K,V> normsByFieldNameAndDocumentNumber
Deprecated.

fieldSettings

org.apache.lucene.store.instantiated.FieldSettings fieldSettings
Deprecated.

Class org.apache.lucene.store.instantiated.InstantiatedTerm extends Object implements Serializable

serialVersionUID: 1L

Serialized Fields

term

Term term

termIndex

int termIndex
index of term in InstantiatedIndex

See Also:
InstantiatedIndex.getOrderedTerms()

associatedDocuments

InstantiatedTermDocumentInformation[] associatedDocuments
Ordered by document number

Class org.apache.lucene.store.instantiated.InstantiatedTermDocumentInformation extends Object implements Serializable

serialVersionUID: 1L

Serialized Fields

payloads

byte[][] payloads

termPositions

int[] termPositions

term

InstantiatedTerm term

document

InstantiatedDocument document

termOffsets

TermVectorOffsetInfo[] termOffsets

Class org.apache.lucene.store.instantiated.InstantiatedTermFreqVector extends Object implements Serializable

serialVersionUID: 1L

Serialized Fields

termDocumentInformations

List<E> termDocumentInformations

field

String field

terms

String[] terms

termFrequencies

int[] termFrequencies

Class org.apache.lucene.store.instantiated.InstantiatedTermPositionVector extends InstantiatedTermFreqVector implements Serializable

serialVersionUID: 1L

Package org.apache.lucene.util

Class org.apache.lucene.util.ArrayUtil$1 extends Object implements Serializable

Class org.apache.lucene.util.ArrayUtil$2 extends Object implements Serializable

Class org.apache.lucene.util.AttributeImpl extends Object implements Serializable

Serialized Fields

enableBackwards

boolean enableBackwards
Deprecated. this will be removed in Lucene 4.0.
When true (default), if a subclass overrides AttributeImpl.toString(), its output is parsed by AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) and used for attribute reflection. This is added to enable attribute implementations from Lucene 2.9 or 3.0 to work correctly with reflection.

Class org.apache.lucene.util.BytesRefHash.MaxBytesLengthExceededException extends RuntimeException implements Serializable

Class org.apache.lucene.util.CollectionUtil$1 extends Object implements Serializable

Class org.apache.lucene.util.CollectionUtil$2 extends Object implements Serializable

Class org.apache.lucene.util.MapBackedSet extends AbstractSet<E> implements Serializable

serialVersionUID: -6761513279741915432L

Serialized Fields

map

Map<K,V> map

Class org.apache.lucene.util.OpenBitSet extends DocIdSet implements Serializable

Serialized Fields

bits

long[] bits

wlen

int wlen

numBits

long numBits

Class org.apache.lucene.util.OpenBitSetDISI extends OpenBitSet implements Serializable

Class org.apache.lucene.util.Parameter extends Object implements Serializable

Serialization Methods

readResolve

protected Object readResolve()
                      throws ObjectStreamException
Deprecated.
Resolves the deserialized instance to the local reference for accurate equals() and == comparisons.

Throws:
ObjectStreamException
Serialized Fields

name

String name
Deprecated.

Class org.apache.lucene.util.RamUsageEstimator$IdentityHashSet$1 extends Object implements Serializable

Class org.apache.lucene.util.SetOnce.AlreadySetException extends RuntimeException implements Serializable

Class org.apache.lucene.util.SmartRandom extends Random implements Serializable

Serialized Fields

initialized

boolean initialized

Class org.apache.lucene.util.ThreadInterruptedException extends RuntimeException implements Serializable

Class org.apache.lucene.util.TwoPhaseCommitTool.CommitFailException extends IOException implements Serializable

Class org.apache.lucene.util.TwoPhaseCommitTool.PrepareCommitFailException extends IOException implements Serializable

Class org.apache.lucene.util.WeakIdentityMap$1 extends Object implements Serializable

Package org.apache.lucene.util.collections

Class org.apache.lucene.util.collections.LRUHashMap extends LinkedHashMap<K,V> implements Serializable

Serialized Fields

maxSize

int maxSize
Package org.apache.lucene.xmlparser

Class org.apache.lucene.xmlparser.ParserException extends Exception implements Serializable

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


LucenePackage

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene
Class LucenePackage

java.lang.Object
    extended by  org.apache.lucene.LucenePackage

public final class LucenePackage
extends Object

Lucene's package information, including version.

Method Summary
static Package get()
Return Lucene's package, including version information.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

get

public static Package get()
Return Lucene's package, including version information.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene
Classes
LucenePackage


org.apache.lucene

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene

Top-level package.

See:
Description

Class Summary
LucenePackage Lucene's package information, including version.

Package org.apache.lucene Description

Top-level package.

Overview Package Class Use Tree Deprecated Index Help
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


org.apache.lucene Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.LucenePackage
Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Package org.apache.lucene

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene

No usage of org.apache.lucene

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Analyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class Analyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
CollationKeyAnalyzer, ICUCollationKeyAnalyzer, LimitTokenCountAnalyzer, MockAnalyzer, PerFieldAnalyzerWrapper, QueryAutoStopWordAnalyzer, QueryParserTestBase.QPTestAnalyzer, ReusableAnalyzerBase, ShingleAnalyzerWrapper, SmartChineseAnalyzer, SnowballAnalyzer
public abstract class Analyzer
extends Object
implements Closeable

An Analyzer builds TokenStreams, which analyze text. It thus represents a policy for extracting index terms from text.

Typical implementations first build a Tokenizer, which breaks the stream of characters from the Reader into raw Tokens. One or more TokenFilters may then be applied to the output of the Tokenizer.

The Analyzer-API in Lucene is based on the decorator pattern. Therefore all non-abstract subclasses must be final or their tokenStream(java.lang.String, java.io.Reader) and reusableTokenStream(java.lang.String, java.io.Reader) implementations must be final! This is checked when Java assertions are enabled.

Constructor Summary
protected Analyzer()
Method Summary
void | close() Frees persistent resources used by this Analyzer
int | getOffsetGap(Fieldable field) Just like getPositionIncrementGap(java.lang.String), except for Token offsets instead.
int | getPositionIncrementGap(String fieldName) Invoked before indexing a Fieldable instance if terms have already been added to that field.
protected Object | getPreviousTokenStream() Used by Analyzers that implement reusableTokenStream to retrieve previously saved TokenStreams for re-use by the same thread.
TokenStream | reusableTokenStream(String fieldName, Reader reader) Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method.
protected void | setPreviousTokenStream(Object obj) Used by Analyzers that implement reusableTokenStream to save a TokenStream for later re-use by the same thread.
abstract TokenStream | tokenStream(String fieldName, Reader reader) Creates a TokenStream which tokenizes all the text in the provided Reader.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Analyzer

protected Analyzer()
Method Detail

tokenStream

public abstract TokenStream tokenStream(String fieldName,
                                        Reader reader)
Creates a TokenStream which tokenizes all the text in the provided Reader. Must be able to handle null field name for backward compatibility.

reusableTokenStream

public TokenStream reusableTokenStream(String fieldName,
                                       Reader reader)
                                throws IOException
Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method. Callers that do not need to use more than one TokenStream at the same time from this analyzer should use this method for better performance.

Throws:
IOException

getPreviousTokenStream

protected Object getPreviousTokenStream()
Used by Analyzers that implement reusableTokenStream to retrieve previously saved TokenStreams for re-use by the same thread.

setPreviousTokenStream

protected void setPreviousTokenStream(Object obj)
Used by Analyzers that implement reusableTokenStream to save a TokenStream for later re-use by the same thread.

getPositionIncrementGap

public int getPositionIncrementGap(String fieldName)
Invoked before indexing a Fieldable instance if terms have already been added to that field. This allows custom analyzers to place an automatic position increment gap between Fieldable instances using the same field name. The default value position increment gap is 0. With a 0 position increment gap and the typical default token position increment of 1, all terms in a field, including across Fieldable instances, are in successive positions, allowing exact PhraseQuery matches, for instance, across Fieldable instance boundaries.

Parameters:
fieldName - Fieldable name being indexed.
Returns:
position increment gap, added to the next token emitted from tokenStream(String,Reader)

getOffsetGap

public int getOffsetGap(Fieldable field)
Just like getPositionIncrementGap(java.lang.String), except for Token offsets instead. By default this returns 1 for tokenized fields and, as if the fields were joined with an extra space character, and 0 for un-tokenized fields. This method is only called if the field produced at least one token for indexing.

Parameters:
field - the field just indexed
Returns:
offset gap, added to the next token emitted from tokenStream(String,Reader)

close

public void close()
Frees persistent resources used by this Analyzer

Specified by:
close in interface Closeable
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ASCIIFoldingFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class ASCIIFoldingFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.ASCIIFoldingFilter
All Implemented Interfaces:
Closeable
public final class ASCIIFoldingFilter
extends TokenFilter

This class converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if one exists. Characters from the following Unicode blocks are converted; however, only those characters with reasonable ASCII alternatives are converted:

  • C1 Controls and Latin-1 Supplement: http://www.unicode.org/charts/PDF/U0080.pdf
  • Latin Extended-A: http://www.unicode.org/charts/PDF/U0100.pdf
  • Latin Extended-B: http://www.unicode.org/charts/PDF/U0180.pdf
  • Latin Extended Additional: http://www.unicode.org/charts/PDF/U1E00.pdf
  • Latin Extended-C: http://www.unicode.org/charts/PDF/U2C60.pdf
  • Latin Extended-D: http://www.unicode.org/charts/PDF/UA720.pdf
  • IPA Extensions: http://www.unicode.org/charts/PDF/U0250.pdf
  • Phonetic Extensions: http://www.unicode.org/charts/PDF/U1D00.pdf
  • Phonetic Extensions Supplement: http://www.unicode.org/charts/PDF/U1D80.pdf
  • General Punctuation: http://www.unicode.org/charts/PDF/U2000.pdf
  • Superscripts and Subscripts: http://www.unicode.org/charts/PDF/U2070.pdf
  • Enclosed Alphanumerics: http://www.unicode.org/charts/PDF/U2460.pdf
  • Dingbats: http://www.unicode.org/charts/PDF/U2700.pdf
  • Supplemental Punctuation: http://www.unicode.org/charts/PDF/U2E00.pdf
  • Alphabetic Presentation Forms: http://www.unicode.org/charts/PDF/UFB00.pdf
  • Halfwidth and Fullwidth Forms: http://www.unicode.org/charts/PDF/UFF00.pdf
See: http://en.wikipedia.org/wiki/Latin_characters_in_Unicode The set of character conversions supported by this class is a superset of those supported by Lucene's ISOLatin1AccentFilter which strips accents from Latin1 characters. For example, 'à' will be replaced by 'a'.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ASCIIFoldingFilter(TokenStream input)
Method Summary
void | foldToASCII(char[] input, int length) Converts characters above ASCII to their ASCII equivalents.
static int | foldToASCII(char[] input, int inputPos, char[] output, int outputPos, int length) Converts characters above ASCII to their ASCII equivalents.
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ASCIIFoldingFilter

public ASCIIFoldingFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

foldToASCII

public void foldToASCII(char[] input,
                        int length)
Converts characters above ASCII to their ASCII equivalents. For example, accents are removed from accented characters.

Parameters:
input - The string to fold
length - The number of characters in the input string

foldToASCII

public static final int foldToASCII(char[] input,
                                    int inputPos,
                                    char[] output,
                                    int outputPos,
                                    int length)
Converts characters above ASCII to their ASCII equivalents. For example, accents are removed from accented characters.

Parameters:
input - The characters to fold
inputPos - Index of the first character to fold
output - The result of the folding. Should be of size >= length * 4.
outputPos - Index of output where to put the result of the folding
length - The number of characters to fold
Returns:
length of output
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BaseCharFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class BaseCharFilter

java.lang.Object
    extended by  java.io.Reader
        extended by  org.apache.lucene.analysis.CharStream
            extended by  org.apache.lucene.analysis.CharFilter
                extended by  org.apache.lucene.analysis.BaseCharFilter
All Implemented Interfaces:
Closeable, Readable
Direct Known Subclasses:
HTMLStripCharFilter, MappingCharFilter
public abstract class BaseCharFilter
extends CharFilter

Base utility class for implementing a CharFilter. You subclass this, and then record mappings by calling addOffCorrectMap(int, int), and then invoke the correct method to correct an offset.

+

+ CharFilters modify an input stream via a series of substring + replacements (including deletions and insertions) to produce an output + stream. There are three possible replacement cases: the replacement + string has the same length as the original substring; the replacement + is shorter; and the replacement is longer. In the latter two cases + (when the replacement has a different length than the original), + one or more offset correction mappings are required. +

+

+ When the replacement is shorter than the original (e.g. when the + replacement is the empty string), a single offset correction mapping + should be added at the replacement's end offset in the output stream. + The cumulativeDiff parameter to the + addOffCorrectMapping() method will be the sum of all + previous replacement offset adjustments, with the addition of the + difference between the lengths of the original substring and the + replacement string (a positive value). +

+

+ When the replacement is longer than the original (e.g. when the + original is the empty string), you should add as many offset + correction mappings as the difference between the lengths of the + replacement string and the original substring, starting at the + end offset the original substring would have had in the output stream. + The cumulativeDiff parameter to the + addOffCorrectMapping() method will be the sum of all + previous replacement offset adjustments, with the addition of the + difference between the lengths of the original substring and the + replacement string so far (a negative value). +

Field Summary
Fields inherited from class org.apache.lucene.analysis.CharFilter
input
Fields inherited from class java.io.Reader
lock
Constructor Summary
BaseCharFilter(CharStream in)
Method Summary
protected void | addOffCorrectMap(int off, int cumulativeDiff) Adds an offset correction mapping at the given output stream offset.
protected int | correct(int currentOff) Retrieve the corrected offset.
protected int | getLastCumulativeDiff()
Methods inherited from class org.apache.lucene.analysis.CharFilter
close, correctOffset, mark, markSupported, read, reset
Methods inherited from class java.io.Reader
read, read, read, ready, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BaseCharFilter

public BaseCharFilter(CharStream in)
Method Detail

correct

protected int correct(int currentOff)
Retrieve the corrected offset.

Overrides:
correct in class CharFilter
Parameters:
currentOff - current offset
Returns:
corrected offset

getLastCumulativeDiff

protected int getLastCumulativeDiff()

addOffCorrectMap

protected void addOffCorrectMap(int off,
                                int cumulativeDiff)

Adds an offset correction mapping at the given output stream offset.

Assumption: the offset given with each successive call to this method will not be smaller than the offset given at the previous invocation.

Parameters:
off - The output stream offset at which to apply the correction
cumulativeDiff - The input offset is given by adding this to the output offset
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BaseTokenStreamTestCase.CheckClearAttributesAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Interface BaseTokenStreamTestCase.CheckClearAttributesAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl
Enclosing class:
BaseTokenStreamTestCase
public static interface BaseTokenStreamTestCase.CheckClearAttributesAttribute
extends Attribute

Attribute that records if it was cleared or not. This is used for testing that clearAttributes() was called correctly.

Method Summary
 boolean getAndResetClearCalled()

Method Detail

getAndResetClearCalled

boolean getAndResetClearCalled()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, BaseTokenStreamTestCase.CheckClearAttributesAttribute, Attribute
Enclosing class:
BaseTokenStreamTestCase
public static final class BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl
extends AttributeImpl
implements BaseTokenStreamTestCase.CheckClearAttributesAttribute

Attribute that records if it was cleared or not. This is used for testing that clearAttributes() was called correctly.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl()
Method Summary
void | clear() Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other)
boolean | getAndResetClearCalled()
int | hashCode()
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl

public BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl()
Method Detail

getAndResetClearCalled

public boolean getAndResetClearCalled()
Specified by:
getAndResetClearCalled in interface BaseTokenStreamTestCase.CheckClearAttributesAttribute

clear

public void clear()
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BaseTokenStreamTestCase

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class BaseTokenStreamTestCase

java.lang.Object
    extended by  org.junit.Assert
        extended by  org.apache.lucene.util.LuceneTestCase
            extended by  org.apache.lucene.analysis.BaseTokenStreamTestCase

public abstract class BaseTokenStreamTestCase
extends LuceneTestCase

Base class for all Lucene unit tests that use TokenStreams.

When writing unit tests for analysis components, its highly recommended to use the helper methods here (especially in conjunction with MockAnalyzer or MockTokenizer), as they contain many assertions and checks to catch bugs.

See Also:
MockAnalyzer, MockTokenizer

Nested Class Summary
static interface | BaseTokenStreamTestCase.CheckClearAttributesAttribute Attribute that records if it was cleared or not.
static class | BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl Attribute that records if it was cleared or not.
Nested classes/interfaces inherited from class org.apache.lucene.util.LuceneTestCase
LuceneTestCase.Nightly
Field Summary
Fields inherited from class org.apache.lucene.util.LuceneTestCase
classRules, random, RANDOM_MULTIPLIER, ruleChain, stores, TEMP_DIR, TEST_CLEAN_THREADS, TEST_DIRECTORY, TEST_ITER, TEST_ITER_MIN, TEST_LINE_DOCS_FILE, TEST_LOCALE, TEST_NIGHTLY, TEST_SEED, TEST_TIMEZONE, TEST_VERSION_CURRENT, testsFailed, VERBOSE
Constructor Summary
BaseTokenStreamTestCase()
Method Summary
static void | assertAnalyzesTo(Analyzer a, String input, String[] output)
static void | assertAnalyzesTo(Analyzer a, String input, String[] output, int[] posIncrements)
static void | assertAnalyzesTo(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets)
static void | assertAnalyzesTo(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, int[] posIncrements)
static void | assertAnalyzesTo(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements)
static void | assertAnalyzesTo(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements, int[] posLengths)
static void | assertAnalyzesTo(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements, int[] posLengths, boolean offsetsAreCorrect)
static void | assertAnalyzesTo(Analyzer a, String input, String[] output, String[] types)
static void | assertAnalyzesToPositions(Analyzer a, String input, String[] output, int[] posIncrements, int[] posLengths)
static void | assertAnalyzesToReuse(Analyzer a, String input, String[] output)
static void | assertAnalyzesToReuse(Analyzer a, String input, String[] output, int[] posIncrements)
static void | assertAnalyzesToReuse(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets)
static void | assertAnalyzesToReuse(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, int[] posIncrements)
static void | assertAnalyzesToReuse(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements)
static void | assertAnalyzesToReuse(Analyzer a, String input, String[] output, String[] types)
static void | assertTokenStreamContents(TokenStream ts, String[] output)
static void | assertTokenStreamContents(TokenStream ts, String[] output, int[] posIncrements)
static void | assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets)
static void | assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, int[] posIncrements)
static void | assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, int[] posIncrements, int[] posLengths, Integer finalOffset)
static void | assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, int[] posIncrements, Integer finalOffset)
static void | assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, Integer finalOffset)
static void | assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements)
static void | assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements, int[] posLengths, Integer finalOffset)
static void | assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements, int[] posLengths, Integer finalOffset, boolean offsetsAreCorrect)
static void | assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements, Integer finalOffset)
static void | assertTokenStreamContents(TokenStream ts, String[] output, String[] types)
static void | checkAnalysisConsistency(Random random, Analyzer a, boolean useCharFilter, String text)
static void | checkAnalysisConsistency(Random random, Analyzer a, boolean useCharFilter, String text, boolean offsetsAreCorrect)
static void | checkOneTerm(Analyzer a, String input, String expected)
static void | checkOneTermReuse(Analyzer a, String input, String expected)
static void | checkRandomData(Random random, Analyzer a, int iterations) utility method for blasting tokenstreams with data to make sure they don't do anything crazy
static void | checkRandomData(Random random, Analyzer a, int iterations, boolean simple) utility method for blasting tokenstreams with data to make sure they don't do anything crazy
static void | checkRandomData(Random random, Analyzer a, int iterations, int maxWordLength) utility method for blasting tokenstreams with data to make sure they don't do anything crazy
static void | checkRandomData(Random random, Analyzer a, int iterations, int maxWordLength, boolean simple)
static void | checkRandomData(Random random, Analyzer a, int iterations, int maxWordLength, boolean simple, boolean offsetsAreCorrect)
static String | escape(String s)
protected String | toDot(Analyzer a, String inputText)
protected void | toDotFile(Analyzer a, String inputText, String localFileName)
Methods inherited from class org.apache.lucene.util.LuceneTestCase
afterClassLuceneTestCaseJ4, alwaysIgnoredTestMethod, assertEquals, assertEquals, assertEquals, assertEquals, assertSaneFieldCaches, asSet, assumeFalse, assumeNoException, assumeTrue, atLeast, atLeast, beforeClassLuceneTestCaseJ4, dumpArray, dumpIterator, getDataFile, getName, getTestClass, getTestLabel, isTestThread, localeForName, newDirectory, newDirectory, newDirectory, newDirectory, newField, newField, newField, newField, newField, newField, newFSDirectory, newFSDirectory, newIndexWriterConfig, newIndexWriterConfig, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newSearcher, newSearcher, newTieredMergePolicy, newTieredMergePolicy, purgeFieldCache, randomDirectory, randomLocale, randomTimeZone, rarely, rarely, reportAdditionalFailureInfo, reportPartialFailureInfo, setMergeFactor, setUp, setUseCompoundFile, tearDown, usually, usually
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BaseTokenStreamTestCase

public BaseTokenStreamTestCase()
Method Detail

assertTokenStreamContents

public static void assertTokenStreamContents(TokenStream ts,
                                             String[] output,
                                             int[] startOffsets,
                                             int[] endOffsets,
                                             String[] types,
                                             int[] posIncrements,
                                             int[] posLengths,
                                             Integer finalOffset,
                                             boolean offsetsAreCorrect)
                                      throws IOException
Throws:
IOException

assertTokenStreamContents

public static void assertTokenStreamContents(TokenStream ts,
                                             String[] output,
                                             int[] startOffsets,
                                             int[] endOffsets,
                                             String[] types,
                                             int[] posIncrements,
                                             int[] posLengths,
                                             Integer finalOffset)
                                      throws IOException
Throws:
IOException

assertTokenStreamContents

public static void assertTokenStreamContents(TokenStream ts,
                                             String[] output,
                                             int[] startOffsets,
                                             int[] endOffsets,
                                             String[] types,
                                             int[] posIncrements,
                                             Integer finalOffset)
                                      throws IOException
Throws:
IOException

assertTokenStreamContents

public static void assertTokenStreamContents(TokenStream ts,
                                             String[] output,
                                             int[] startOffsets,
                                             int[] endOffsets,
                                             String[] types,
                                             int[] posIncrements)
                                      throws IOException
Throws:
IOException

assertTokenStreamContents

public static void assertTokenStreamContents(TokenStream ts,
                                             String[] output)
                                      throws IOException
Throws:
IOException

assertTokenStreamContents

public static void assertTokenStreamContents(TokenStream ts,
                                             String[] output,
                                             String[] types)
                                      throws IOException
Throws:
IOException

assertTokenStreamContents

public static void assertTokenStreamContents(TokenStream ts,
                                             String[] output,
                                             int[] posIncrements)
                                      throws IOException
Throws:
IOException

assertTokenStreamContents

public static void assertTokenStreamContents(TokenStream ts,
                                             String[] output,
                                             int[] startOffsets,
                                             int[] endOffsets)
                                      throws IOException
Throws:
IOException

assertTokenStreamContents

public static void assertTokenStreamContents(TokenStream ts,
                                             String[] output,
                                             int[] startOffsets,
                                             int[] endOffsets,
                                             Integer finalOffset)
                                      throws IOException
Throws:
IOException

assertTokenStreamContents

public static void assertTokenStreamContents(TokenStream ts,
                                             String[] output,
                                             int[] startOffsets,
                                             int[] endOffsets,
                                             int[] posIncrements)
                                      throws IOException
Throws:
IOException

assertTokenStreamContents

public static void assertTokenStreamContents(TokenStream ts,
                                             String[] output,
                                             int[] startOffsets,
                                             int[] endOffsets,
                                             int[] posIncrements,
                                             Integer finalOffset)
                                      throws IOException
Throws:
IOException

assertTokenStreamContents

public static void assertTokenStreamContents(TokenStream ts,
                                             String[] output,
                                             int[] startOffsets,
                                             int[] endOffsets,
                                             int[] posIncrements,
                                             int[] posLengths,
                                             Integer finalOffset)
                                      throws IOException
Throws:
IOException

assertAnalyzesTo

public static void assertAnalyzesTo(Analyzer a,
                                    String input,
                                    String[] output,
                                    int[] startOffsets,
                                    int[] endOffsets,
                                    String[] types,
                                    int[] posIncrements)
                             throws IOException
Throws:
IOException

assertAnalyzesTo

public static void assertAnalyzesTo(Analyzer a,
                                    String input,
                                    String[] output,
                                    int[] startOffsets,
                                    int[] endOffsets,
                                    String[] types,
                                    int[] posIncrements,
                                    int[] posLengths)
                             throws IOException
Throws:
IOException

assertAnalyzesTo

public static void assertAnalyzesTo(Analyzer a,
                                    String input,
                                    String[] output,
                                    int[] startOffsets,
                                    int[] endOffsets,
                                    String[] types,
                                    int[] posIncrements,
                                    int[] posLengths,
                                    boolean offsetsAreCorrect)
                             throws IOException
Throws:
IOException

assertAnalyzesTo

public static void assertAnalyzesTo(Analyzer a,
                                    String input,
                                    String[] output)
                             throws IOException
Throws:
IOException

assertAnalyzesTo

public static void assertAnalyzesTo(Analyzer a,
                                    String input,
                                    String[] output,
                                    String[] types)
                             throws IOException
Throws:
IOException

assertAnalyzesTo

public static void assertAnalyzesTo(Analyzer a,
                                    String input,
                                    String[] output,
                                    int[] posIncrements)
                             throws IOException
Throws:
IOException

assertAnalyzesToPositions

public static void assertAnalyzesToPositions(Analyzer a,
                                             String input,
                                             String[] output,
                                             int[] posIncrements,
                                             int[] posLengths)
                                      throws IOException
Throws:
IOException

assertAnalyzesTo

public static void assertAnalyzesTo(Analyzer a,
                                    String input,
                                    String[] output,
                                    int[] startOffsets,
                                    int[] endOffsets)
                             throws IOException
Throws:
IOException

assertAnalyzesTo

public static void assertAnalyzesTo(Analyzer a,
                                    String input,
                                    String[] output,
                                    int[] startOffsets,
                                    int[] endOffsets,
                                    int[] posIncrements)
                             throws IOException
Throws:
IOException

assertAnalyzesToReuse

public static void assertAnalyzesToReuse(Analyzer a,
                                         String input,
                                         String[] output,
                                         int[] startOffsets,
                                         int[] endOffsets,
                                         String[] types,
                                         int[] posIncrements)
                                  throws IOException
Throws:
IOException

assertAnalyzesToReuse

public static void assertAnalyzesToReuse(Analyzer a,
                                         String input,
                                         String[] output)
                                  throws IOException
Throws:
IOException

assertAnalyzesToReuse

public static void assertAnalyzesToReuse(Analyzer a,
                                         String input,
                                         String[] output,
                                         String[] types)
                                  throws IOException
Throws:
IOException

assertAnalyzesToReuse

public static void assertAnalyzesToReuse(Analyzer a,
                                         String input,
                                         String[] output,
                                         int[] posIncrements)
                                  throws IOException
Throws:
IOException

assertAnalyzesToReuse

public static void assertAnalyzesToReuse(Analyzer a,
                                         String input,
                                         String[] output,
                                         int[] startOffsets,
                                         int[] endOffsets)
                                  throws IOException
Throws:
IOException

assertAnalyzesToReuse

public static void assertAnalyzesToReuse(Analyzer a,
                                         String input,
                                         String[] output,
                                         int[] startOffsets,
                                         int[] endOffsets,
                                         int[] posIncrements)
                                  throws IOException
Throws:
IOException

checkOneTerm

public static void checkOneTerm(Analyzer a,
                                String input,
                                String expected)
                         throws IOException
Throws:
IOException

checkOneTermReuse

public static void checkOneTermReuse(Analyzer a,
                                     String input,
                                     String expected)
                              throws IOException
Throws:
IOException

checkRandomData

public static void checkRandomData(Random random,
                                   Analyzer a,
                                   int iterations)
                            throws IOException
utility method for blasting tokenstreams with data to make sure they don't do anything crazy

Throws:
IOException

checkRandomData

public static void checkRandomData(Random random,
                                   Analyzer a,
                                   int iterations,
                                   int maxWordLength)
                            throws IOException
utility method for blasting tokenstreams with data to make sure they don't do anything crazy

Throws:
IOException

checkRandomData

public static void checkRandomData(Random random,
                                   Analyzer a,
                                   int iterations,
                                   boolean simple)
                            throws IOException
utility method for blasting tokenstreams with data to make sure they don't do anything crazy

Parameters:
simple - true if only ascii strings will be used (try to avoid)
Throws:
IOException

checkRandomData

public static void checkRandomData(Random random,
                                   Analyzer a,
                                   int iterations,
                                   int maxWordLength,
                                   boolean simple)
                            throws IOException
Throws:
IOException

checkRandomData

public static void checkRandomData(Random random,
                                   Analyzer a,
                                   int iterations,
                                   int maxWordLength,
                                   boolean simple,
                                   boolean offsetsAreCorrect)
                            throws IOException
Throws:
IOException

escape

public static String escape(String s)

checkAnalysisConsistency

public static void checkAnalysisConsistency(Random random,
                                            Analyzer a,
                                            boolean useCharFilter,
                                            String text)
                                     throws IOException
Throws:
IOException

checkAnalysisConsistency

public static void checkAnalysisConsistency(Random random,
                                            Analyzer a,
                                            boolean useCharFilter,
                                            String text,
                                            boolean offsetsAreCorrect)
                                     throws IOException
Throws:
IOException

toDot

protected String toDot(Analyzer a,
                       String inputText)
                throws IOException
Throws:
IOException

toDotFile

protected void toDotFile(Analyzer a,
                         String inputText,
                         String localFileName)
                  throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CachingTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class CachingTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.CachingTokenFilter
All Implemented Interfaces:
Closeable
public final class CachingTokenFilter
extends TokenFilter

This class can be used if the token attributes of a TokenStream are intended to be consumed more than once. It caches all token attribute states locally in a List.

CachingTokenFilter implements the optional method TokenStream.reset(), which repositions the stream to the first Token.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
CachingTokenFilter(TokenStream input)
Method Summary
 void end()
Performs end-of-stream operations, if any, and calls then end() on the input TokenStream.

NOTE: Be sure to call super.end() first when overriding this method.

 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset()
Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CachingTokenFilter

public CachingTokenFilter(TokenStream input)
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

end

public final void end()
               throws IOException
Description copied from class: TokenFilter
Performs end-of-stream operations, if any, and calls then end() on the input TokenStream.

NOTE: Be sure to call super.end() first when overriding this method.

Overrides:
end in class TokenFilter
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CannedTokenStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class CannedTokenStream

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.CannedTokenStream
All Implemented Interfaces:
Closeable
public final class CannedTokenStream
extends TokenStream

TokenStream from a canned list of Tokens.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Constructor Summary
CannedTokenStream(Token... tokens)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenStream
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CannedTokenStream

public CannedTokenStream(Token... tokens)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharArrayMap.EntryIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class CharArrayMap.EntryIterator

java.lang.Object
    extended by  org.apache.lucene.analysis.CharArrayMap.EntryIterator
All Implemented Interfaces:
Iterator<Map.Entry<Object,V>>
Enclosing class:
CharArrayMap<V>
public class CharArrayMap.EntryIterator
extends Object
implements Iterator<Map.Entry<Object,V>>

public iterator class so efficient methods are exposed to users

Method Summary
 V currentValue()
returns the value associated with the last key returned
 boolean hasNext()
 Map.Entry<Object,V> next()
use nextCharArray() + currentValue() for better efficiency.
 char[] nextKey()
gets the next key...
 String nextKeyString()
gets the next key as a newly created String object
 void remove()
 V setValue(V value)
sets the value associated with the last key returned
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Map.Entry<Object,V>>

nextKey

public char[] nextKey()
gets the next key... do not modify the returned char[]

nextKeyString

public String nextKeyString()
gets the next key as a newly created String object

currentValue

public V currentValue()
returns the value associated with the last key returned

setValue

public V setValue(V value)
sets the value associated with the last key returned

next

public Map.Entry<Object,V> next()
use nextCharArray() + currentValue() for better efficiency.

Specified by:
next in interface Iterator<Map.Entry<Object,V>>

remove

public void remove()
Specified by:
remove in interface Iterator<Map.Entry<Object,V>>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharArrayMap.EntrySet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class CharArrayMap.EntrySet

java.lang.Object
    extended by  java.util.AbstractCollection<E>
        extended by  java.util.AbstractSet<Map.Entry<Object,V>>
            extended by  org.apache.lucene.analysis.CharArrayMap.EntrySet
All Implemented Interfaces:
Iterable<Map.Entry<Object,V>>, Collection<Map.Entry<Object,V>>, Set<Map.Entry<Object,V>>
Enclosing class:
CharArrayMap<V>
public final class CharArrayMap.EntrySet
extends AbstractSet<Map.Entry<Object,V>>

public EntrySet class so efficient methods are exposed to users

Method Summary
void | clear()
boolean | contains(Object o)
CharArrayMap.EntryIterator | iterator()
boolean | remove(Object o)
int | size()
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
Methods inherited from class java.util.AbstractCollection
add, addAll, containsAll, isEmpty, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Set
add, addAll, containsAll, isEmpty, retainAll, toArray, toArray

Method Detail

iterator

public CharArrayMap.EntryIterator iterator()
Specified by:
iterator in interface Iterable<Map.Entry<Object,V>>
Specified by:
iterator in interface Collection<Map.Entry<Object,V>>
Specified by:
iterator in interface Set<Map.Entry<Object,V>>
Specified by:
iterator in class AbstractCollection<Map.Entry<Object,V>>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<Map.Entry<Object,V>>
Specified by:
contains in interface Set<Map.Entry<Object,V>>
Overrides:
contains in class AbstractCollection<Map.Entry<Object,V>>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<Map.Entry<Object,V>>
Specified by:
remove in interface Set<Map.Entry<Object,V>>
Overrides:
remove in class AbstractCollection<Map.Entry<Object,V>>

size

public int size()
Specified by:
size in interface Collection<Map.Entry<Object,V>>
Specified by:
size in interface Set<Map.Entry<Object,V>>
Specified by:
size in class AbstractCollection<Map.Entry<Object,V>>

clear

public void clear()
Specified by:
clear in interface Collection<Map.Entry<Object,V>>
Specified by:
clear in interface Set<Map.Entry<Object,V>>
Overrides:
clear in class AbstractCollection<Map.Entry<Object,V>>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharArrayMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class CharArrayMap<V>

java.lang.Object
    extended by  java.util.AbstractMap<Object,V>
        extended by  org.apache.lucene.analysis.CharArrayMap<V>
All Implemented Interfaces:
Map<Object,V>
public class CharArrayMap<V>
extends AbstractMap<Object,V>

A simple class that stores key Strings as char[]'s in a hash table. Note that this is not a general purpose class. For example, it cannot remove items from the map, nor does it resize its hash table to be smaller, etc. It is designed to be quick to retrieve items by char[] keys without the necessity of converting to a String first.

You must specify the required Version compatibility when creating CharArrayMap:

  • As of 3.1, supplementary characters are properly lowercased.
Before 3.1 supplementary characters could not be lowercased correctly due to the lack of Unicode 4 support in JDK 1.4. To use instances of CharArrayMap with the behavior before Lucene 3.1 pass a Version < 3.1 to the constructors.

Nested Class Summary
class | CharArrayMap.EntryIterator public iterator class so efficient methods are exposed to users
class | CharArrayMap.EntrySet public EntrySet class so efficient methods are exposed to users
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
Constructor Summary
CharArrayMap(Version matchVersion, int startSize, boolean ignoreCase)
Create map with enough capacity to hold startSize terms
CharArrayMap(Version matchVersion, Map<?,? extends V> c, boolean ignoreCase)
Creates a map from the mappings in another map.
Method Summary
 void clear()
Clears all entries in this map.
 boolean containsKey(char[] text, int off, int len)
true if the len chars of text starting at off are in the keySet
 boolean containsKey(CharSequence cs)
true if the CharSequence is in the keySet
 boolean containsKey(Object o)
static
<V> CharArrayMap<V>
copy(Version matchVersion, Map<?,? extends V> map)
Returns a copy of the given map as a CharArrayMap.
static
<V> CharArrayMap<V>
emptyMap()
Returns an empty, unmodifiable map.
 CharArrayMap.EntrySet entrySet()
 V get(char[] text, int off, int len)
returns the value of the mapping of len chars of text starting at off
 V get(CharSequence cs)
returns the value of the mapping of the chars inside this CharSequence
 V get(Object o)
 CharArraySet keySet()
Returns an CharArraySet view on the map's keys.
 V put(char[] text, V value)
Add the given mapping.
 V put(CharSequence text, V value)
Add the given mapping.
 V put(Object o, V value)
 V put(String text, V value)
Add the given mapping.
 V remove(Object key)
 int size()
 String toString()
static
<V> CharArrayMap<V>
unmodifiableMap(CharArrayMap<V> map)
Returns an unmodifiable CharArrayMap.
Methods inherited from class java.util.AbstractMap
clone, containsValue, equals, hashCode, isEmpty, putAll, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CharArrayMap

public CharArrayMap(Version matchVersion,
                    int startSize,
                    boolean ignoreCase)
Create map with enough capacity to hold startSize terms

Parameters:
matchVersion - compatibility match version see Version note above for details.
startSize - the initial capacity
ignoreCase - false if and only if the set should be case sensitive otherwise true.

CharArrayMap

public CharArrayMap(Version matchVersion,
                    Map<?,? extends V> c,
                    boolean ignoreCase)
Creates a map from the mappings in another map.

Parameters:
matchVersion - compatibility match version see Version note above for details.
c - a map whose mappings to be copied
ignoreCase - false if and only if the set should be case sensitive otherwise true.
Method Detail

clear

public void clear()
Clears all entries in this map. This method is supported for reusing, but not Map.remove(java.lang.Object).

Specified by:
clear in interface Map<Object,V>
Overrides:
clear in class AbstractMap<Object,V>

containsKey

public boolean containsKey(char[] text,
                           int off,
                           int len)
true if the len chars of text starting at off are in the keySet

containsKey

public boolean containsKey(CharSequence cs)
true if the CharSequence is in the keySet

containsKey

public boolean containsKey(Object o)
Specified by:
containsKey in interface Map<Object,V>
Overrides:
containsKey in class AbstractMap<Object,V>

get

public V get(char[] text,
             int off,
             int len)
returns the value of the mapping of len chars of text starting at off

get

public V get(CharSequence cs)
returns the value of the mapping of the chars inside this CharSequence

get

public V get(Object o)
Specified by:
get in interface Map<Object,V>
Overrides:
get in class AbstractMap<Object,V>

put

public V put(CharSequence text,
             V value)
Add the given mapping.

put

public V put(Object o,
             V value)
Specified by:
put in interface Map<Object,V>
Overrides:
put in class AbstractMap<Object,V>

put

public V put(String text,
             V value)
Add the given mapping.

put

public V put(char[] text,
             V value)
Add the given mapping. If ignoreCase is true for this Set, the text array will be directly modified. The user should never modify this text array after calling this method.

remove

public V remove(Object key)
Specified by:
remove in interface Map<Object,V>
Overrides:
remove in class AbstractMap<Object,V>

size

public int size()
Specified by:
size in interface Map<Object,V>
Overrides:
size in class AbstractMap<Object,V>

toString

public String toString()
Overrides:
toString in class AbstractMap<Object,V>

entrySet

public final CharArrayMap.EntrySet entrySet()
Specified by:
entrySet in interface Map<Object,V>
Specified by:
entrySet in class AbstractMap<Object,V>

keySet

public final CharArraySet keySet()
Returns an CharArraySet view on the map's keys. The set will use the same matchVersion as this map.

Specified by:
keySet in interface Map<Object,V>
Overrides:
keySet in class AbstractMap<Object,V>

unmodifiableMap

public static <V> CharArrayMap<V> unmodifiableMap(CharArrayMap<V> map)
Returns an unmodifiable CharArrayMap. This allows to provide unmodifiable views of internal map for "read-only" use.

Parameters:
map - a map for which the unmodifiable map is returned.
Returns:
an new unmodifiable CharArrayMap.
Throws:
NullPointerException - if the given map is null.

copy

public static <V> CharArrayMap<V> copy(Version matchVersion,
                                       Map<?,? extends V> map)
Returns a copy of the given map as a CharArrayMap. If the given map is a CharArrayMap the ignoreCase property will be preserved.

Note: If you intend to create a copy of another CharArrayMap where the Version of the source map differs from its copy CharArrayMap(Version, Map, boolean) should be used instead. The copy(Version, Map) will preserve the Version of the source map it is an instance of CharArrayMap.

Parameters:
matchVersion - compatibility match version see Version note above for details. This argument will be ignored if the given map is a CharArrayMap.
map - a map to copy
Returns:
a copy of the given map as a CharArrayMap. If the given map is a CharArrayMap the ignoreCase property as well as the matchVersion will be of the given map will be preserved.

emptyMap

public static <V> CharArrayMap<V> emptyMap()
Returns an empty, unmodifiable map.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharArraySet.CharArraySetIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class CharArraySet.CharArraySetIterator

java.lang.Object
    extended by  org.apache.lucene.analysis.CharArraySet.CharArraySetIterator
All Implemented Interfaces:
Iterator<String>
Enclosing class:
CharArraySet
Deprecated. Use the standard iterator, which returns char[] instances.

@Deprecated
public class CharArraySet.CharArraySetIterator
extends Object
implements Iterator<String>

The Iterator for this set. Strings are constructed on the fly, so use nextCharArray for more efficient access.

Method Summary
boolean | hasNext() Deprecated.
String | next() Deprecated. Returns the next String, as a Set would...
char[] | nextCharArray() Deprecated. do not modify the returned char[]
void | remove() Deprecated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

hasNext

public boolean hasNext()
Deprecated.
Specified by:
hasNext in interface Iterator<String>

nextCharArray

public char[] nextCharArray()
Deprecated.
do not modify the returned char[]

next

public String next()
Deprecated.
Returns the next String, as a Set would... use nextCharArray() for better efficiency.

Specified by:
next in interface Iterator<String>

remove

public void remove()
Deprecated.
Specified by:
remove in interface Iterator<String>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharArraySet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class CharArraySet

java.lang.Object
    extended by  java.util.AbstractCollection<E>
        extended by  java.util.AbstractSet<Object>
            extended by  org.apache.lucene.analysis.CharArraySet
All Implemented Interfaces:
Iterable<Object>, Collection<Object>, Set<Object>
public class CharArraySet
extends AbstractSet<Object>

A simple class that stores Strings as char[]'s in a hash table. Note that this is not a general purpose class. For example, it cannot remove items from the set, nor does it resize its hash table to be smaller, etc. It is designed to be quick to test if a char[] is in the set without the necessity of converting it to a String first.

You must specify the required Version compatibility when creating CharArraySet:

  • As of 3.1, supplementary characters are properly lowercased.
Before 3.1 supplementary characters could not be lowercased correctly due to the lack of Unicode 4 support in JDK 1.4. To use instances of CharArraySet with the behavior before Lucene 3.1 pass a Version < 3.1 to the constructors.

Please note: This class implements Set but does not behave like it should in all cases. The generic type is Set<Object>, because you can add any object to it, that has a string representation. The add methods will use Object.toString() and store the result using a char[] buffer. The same behavior have the contains() methods. The iterator() returns an Iterator<String>. For type safety also stringIterator() is provided.

Nested Class Summary
 class CharArraySet.CharArraySetIterator
Deprecated. Use the standard iterator, which returns char[] instances.
Field Summary
static CharArraySet EMPTY_SET
Constructor Summary
CharArraySet(Collection<?> c, boolean ignoreCase)
Deprecated. use CharArraySet(Version, Collection, boolean) instead
CharArraySet(int startSize, boolean ignoreCase)
Deprecated. use CharArraySet(Version, int, boolean) instead
CharArraySet(Version matchVersion, Collection<?> c, boolean ignoreCase)
Creates a set from a Collection of objects.
CharArraySet(Version matchVersion, int startSize, boolean ignoreCase)
Create set with enough capacity to hold startSize terms
Method Summary
 boolean add(char[] text)
Add this char[] directly to the set.
 boolean add(CharSequence text)
Add this CharSequence into the set
 boolean add(Object o)
 boolean add(String text)
Add this String into the set
 void clear()
Clears all entries in this set.
 boolean contains(char[] text, int off, int len)
true if the len chars of text starting at off are in the set
 boolean contains(CharSequence cs)
true if the CharSequence is in the set
 boolean contains(Object o)
static CharArraySet copy(Set<?> set)
Deprecated. use copy(Version, Set) instead.
static CharArraySet copy(Version matchVersion, Set<?> set)
Returns a copy of the given set as a CharArraySet.
 Iterator<Object> iterator()
Returns an CharArraySet.CharArraySetIterator depending on the version used: if matchVersion ≥ 3.1, it returns char[] instances in this set. if matchVersion is 3.0 or older, it returns new allocated Strings, so this method violates the Set interface.
 int size()
 Iterator<String> stringIterator()
Deprecated. Use iterator(), which returns char[] instances.
 String toString()
static CharArraySet unmodifiableSet(CharArraySet set)
Returns an unmodifiable CharArraySet.
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, retainAll, toArray, toArray
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Set
addAll, containsAll, isEmpty, remove, retainAll, toArray, toArray

Field Detail

EMPTY_SET

public static final CharArraySet EMPTY_SET
Constructor Detail

CharArraySet

public CharArraySet(Version matchVersion,
                    int startSize,
                    boolean ignoreCase)
Create set with enough capacity to hold startSize terms

Parameters:
matchVersion - compatibility match version see Version note above for details.
startSize - the initial capacity
ignoreCase - false if and only if the set should be case sensitive otherwise true.

CharArraySet

public CharArraySet(Version matchVersion,
                    Collection<?> c,
                    boolean ignoreCase)
Creates a set from a Collection of objects.

Parameters:
matchVersion - compatibility match version see Version note above for details.
c - a collection whose elements to be placed into the set
ignoreCase - false if and only if the set should be case sensitive otherwise true.

CharArraySet

@Deprecated
public CharArraySet(int startSize,
                               boolean ignoreCase)
Deprecated. use CharArraySet(Version, int, boolean) instead

Creates a set with enough capacity to hold startSize terms

Parameters:
startSize - the initial capacity
ignoreCase - false if and only if the set should be case sensitive otherwise true.

CharArraySet

@Deprecated
public CharArraySet(Collection<?> c,
                               boolean ignoreCase)
Deprecated. use CharArraySet(Version, Collection, boolean) instead

Creates a set from a Collection of objects.

Parameters:
c - a collection whose elements to be placed into the set
ignoreCase - false if and only if the set should be case sensitive otherwise true.
Method Detail

clear

public void clear()
Clears all entries in this set. This method is supported for reusing, but not Set.remove(java.lang.Object).

Specified by:
clear in interface Collection<Object>
Specified by:
clear in interface Set<Object>
Overrides:
clear in class AbstractCollection<Object>

contains

public boolean contains(char[] text,
                        int off,
                        int len)
true if the len chars of text starting at off are in the set

contains

public boolean contains(CharSequence cs)
true if the CharSequence is in the set

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<Object>
Specified by:
contains in interface Set<Object>
Overrides:
contains in class AbstractCollection<Object>

add

public boolean add(Object o)
Specified by:
add in interface Collection<Object>
Specified by:
add in interface Set<Object>
Overrides:
add in class AbstractCollection<Object>

add

public boolean add(CharSequence text)
Add this CharSequence into the set

add

public boolean add(String text)
Add this String into the set

add

public boolean add(char[] text)
Add this char[] directly to the set. If ignoreCase is true for this Set, the text array will be directly modified. The user should never modify this text array after calling this method.

size

public int size()
Specified by:
size in interface Collection<Object>
Specified by:
size in interface Set<Object>
Specified by:
size in class AbstractCollection<Object>

unmodifiableSet

public static CharArraySet unmodifiableSet(CharArraySet set)
Returns an unmodifiable CharArraySet. This allows to provide unmodifiable views of internal sets for "read-only" use.

Parameters:
set - a set for which the unmodifiable set is returned.
Returns:
an new unmodifiable CharArraySet.
Throws:
NullPointerException - if the given set is null.

copy

@Deprecated
public static CharArraySet copy(Set<?> set)
Deprecated. use copy(Version, Set) instead.

Returns a copy of the given set as a CharArraySet. If the given set is a CharArraySet the ignoreCase property will be preserved.

Parameters:
set - a set to copy
Returns:
a copy of the given set as a CharArraySet. If the given set is a CharArraySet the ignoreCase and matchVersion property will be preserved.

copy

public static CharArraySet copy(Version matchVersion,
                                Set<?> set)
Returns a copy of the given set as a CharArraySet. If the given set is a CharArraySet the ignoreCase property will be preserved.

Note: If you intend to create a copy of another CharArraySet where the Version of the source set differs from its copy CharArraySet(Version, Collection, boolean) should be used instead. The copy(Version, Set) will preserve the Version of the source set it is an instance of CharArraySet.

Parameters:
matchVersion - compatibility match version see Version note above for details. This argument will be ignored if the given set is a CharArraySet.
set - a set to copy
Returns:
a copy of the given set as a CharArraySet. If the given set is a CharArraySet the ignoreCase property as well as the matchVersion will be of the given set will be preserved.

stringIterator

@Deprecated
public Iterator<String> stringIterator()
Deprecated. Use iterator(), which returns char[] instances.

returns an iterator of new allocated Strings (an instance of CharArraySet.CharArraySetIterator).

iterator

public Iterator<Object> iterator()
Returns an CharArraySet.CharArraySetIterator depending on the version used:
  • if matchVersion ≥ 3.1, it returns char[] instances in this set.
  • if matchVersion is 3.0 or older, it returns new allocated Strings, so this method violates the Set interface. It is kept this way for backwards compatibility, normally it should return char[] on next()

Specified by:
iterator in interface Iterable<Object>
Specified by:
iterator in interface Collection<Object>
Specified by:
iterator in interface Set<Object>
Specified by:
iterator in class AbstractCollection<Object>

toString

public String toString()
Overrides:
toString in class AbstractCollection<Object>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class CharFilter

java.lang.Object
    extended by  java.io.Reader
        extended by  org.apache.lucene.analysis.CharStream
            extended by  org.apache.lucene.analysis.CharFilter
All Implemented Interfaces:
Closeable, Readable
Direct Known Subclasses:
BaseCharFilter, PersianCharFilter
public abstract class CharFilter
extends CharStream

Subclasses of CharFilter can be chained to filter CharStream. They can be used as Reader with additional offset correction. Tokenizers will automatically use correctOffset(int) if a CharFilter/CharStream subclass is used.

Field Summary
protected  CharStream input
Fields inherited from class java.io.Reader
lock
Constructor Summary
protected CharFilter(CharStream in)
Method Summary
void | close()
protected int | correct(int currentOff) Subclass may want to override to correct the current offset.
int | correctOffset(int currentOff) Chains the corrected offset through the input CharFilter.
void | mark(int readAheadLimit)
boolean | markSupported()
int | read(char[] cbuf, int off, int len)
void | reset()
Methods inherited from class java.io.Reader
read, read, read, ready, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

input

protected CharStream input
Constructor Detail

CharFilter

protected CharFilter(CharStream in)
Method Detail

correct

protected int correct(int currentOff)
Subclass may want to override to correct the current offset.

Parameters:
currentOff - current offset
Returns:
corrected offset

correctOffset

public final int correctOffset(int currentOff)
Chains the corrected offset through the input CharFilter.

Specified by:
correctOffset in class CharStream
Parameters:
currentOff - offset as seen in the output
Returns:
corrected offset based on the input

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class Reader
Throws:
IOException

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Specified by:
read in class Reader
Throws:
IOException

markSupported

public boolean markSupported()
Overrides:
markSupported in class Reader

mark

public void mark(int readAheadLimit)
          throws IOException
Overrides:
mark in class Reader
Throws:
IOException

reset

public void reset()
           throws IOException
Overrides:
reset in class Reader
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class CharReader

java.lang.Object
    extended by  java.io.Reader
        extended by  org.apache.lucene.analysis.CharStream
            extended by  org.apache.lucene.analysis.CharReader
All Implemented Interfaces:
Closeable, Readable
public final class CharReader
extends CharStream

CharReader is a Reader wrapper. It reads chars from Reader and outputs CharStream, defining an identify function correctOffset(int) method that simply returns the provided offset.

Field Summary
Fields inherited from class java.io.Reader
lock
Method Summary
void | close()
int | correctOffset(int currentOff) Called by CharFilter(s) and Tokenizer to correct token offset.
static CharStream | get(Reader input)
void | mark(int readAheadLimit)
boolean | markSupported()
int | read(char[] cbuf, int off, int len)
void | reset()
Methods inherited from class java.io.Reader
read, read, read, ready, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

get

public static CharStream get(Reader input)

correctOffset

public int correctOffset(int currentOff)
Description copied from class: CharStream
Called by CharFilter(s) and Tokenizer to correct token offset.

Specified by:
correctOffset in class CharStream
Parameters:
currentOff - offset as seen in the output
Returns:
corrected offset based on the input

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class Reader
Throws:
IOException

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Specified by:
read in class Reader
Throws:
IOException

markSupported

public boolean markSupported()
Overrides:
markSupported in class Reader

mark

public void mark(int readAheadLimit)
          throws IOException
Overrides:
mark in class Reader
Throws:
IOException

reset

public void reset()
           throws IOException
Overrides:
reset in class Reader
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class CharStream

java.lang.Object
    extended by  java.io.Reader
        extended by  org.apache.lucene.analysis.CharStream
All Implemented Interfaces:
Closeable, Readable
Direct Known Subclasses:
CharFilter, CharReader, MockCharFilter
public abstract class CharStream
extends Reader

CharStream adds correctOffset(int) functionality over Reader. All Tokenizers accept a CharStream instead of Reader as input, which enables arbitrary character based filtering before tokenization. The correctOffset(int) method fixed offsets to account for removal or insertion of characters, so that the offsets reported in the tokens match the character offsets of the original Reader.

Field Summary
Fields inherited from class java.io.Reader
lock
Constructor Summary
CharStream()
Method Summary
abstract  int correctOffset(int currentOff)
Called by CharFilter(s) and Tokenizer to correct token offset.
Methods inherited from class java.io.Reader
close, mark, markSupported, read, read, read, read, ready, reset, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CharStream

public CharStream()
Method Detail

correctOffset

public abstract int correctOffset(int currentOff)
Called by CharFilter(s) and Tokenizer to correct token offset.

Parameters:
currentOff - offset as seen in the output
Returns:
corrected offset based on the input
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class CharTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.CharTokenizer
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
IndicTokenizer, LetterTokenizer, RussianLetterTokenizer, WhitespaceTokenizer
public abstract class CharTokenizer
extends Tokenizer

An abstract base class for simple, character-oriented tokenizers.

You must specify the required Version compatibility when creating CharTokenizer:

  • As of 3.1, CharTokenizer uses an int based API to normalize and detect token codepoints. See isTokenChar(int) and normalize(int) for details.

A new CharTokenizer API has been introduced with Lucene 3.1. This API moved from UTF-16 code units to UTF-32 codepoints to eventually add support for supplementary characters. The old char based API has been deprecated and should be replaced with the int based methods isTokenChar(int) and normalize(int).

As of Lucene 3.1 each CharTokenizer - constructor expects a Version argument. Based on the given Version either the new API or a backwards compatibility layer is used at runtime. For Version < 3.1 the backwards compatibility layer ensures correct behavior even for indexes build with previous versions of Lucene. If a Version >= 3.1 is used CharTokenizer requires the new API to be implemented by the instantiated class. Yet, the old char based API is not required anymore even if backwards compatibility must be preserved. CharTokenizer subclasses implementing the new API are fully backwards compatible if instantiated with Version < 3.1.

Note: If you use a subclass of CharTokenizer with Version >= 3.1 on an index build with a version < 3.1, created tokens might not be compatible with the terms in your index.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
CharTokenizer(AttributeSource.AttributeFactory factory, Reader input)
Deprecated. use CharTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
CharTokenizer(AttributeSource source, Reader input)
Deprecated. use CharTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
CharTokenizer(Reader input)
Deprecated. use CharTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
CharTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader input)
Creates a new CharTokenizer instance
CharTokenizer(Version matchVersion, AttributeSource source, Reader input)
Creates a new CharTokenizer instance
CharTokenizer(Version matchVersion, Reader input)
Creates a new CharTokenizer instance
Method Summary
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
protected  boolean isTokenChar(char c)
Deprecated. use isTokenChar(int) instead. This method will be removed in Lucene 4.0.
protected  boolean isTokenChar(int c)
Returns true iff a codepoint should be included in a token.
protected  char normalize(char c)
Deprecated. use normalize(int) instead. This method will be removed in Lucene 4.0.
protected  int normalize(int c)
Called on each token character to normalize it before it is added to the token.
 void reset(Reader input)
Expert: Reset the tokenizer to a new reader.
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.analysis.TokenStream
reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CharTokenizer

public CharTokenizer(Version matchVersion,
                     Reader input)
Creates a new CharTokenizer instance

Parameters:
matchVersion - Lucene version to match See above
input - the input to split up into tokens

CharTokenizer

public CharTokenizer(Version matchVersion,
                     AttributeSource source,
                     Reader input)
Creates a new CharTokenizer instance

Parameters:
matchVersion - Lucene version to match See above
source - the attribute source to use for this Tokenizer
input - the input to split up into tokens

CharTokenizer

public CharTokenizer(Version matchVersion,
                     AttributeSource.AttributeFactory factory,
                     Reader input)
Creates a new CharTokenizer instance

Parameters:
matchVersion - Lucene version to match See above
factory - the attribute factory to use for this Tokenizer
input - the input to split up into tokens

CharTokenizer

@Deprecated
public CharTokenizer(Reader input)
Deprecated. use CharTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.

Creates a new CharTokenizer instance

Parameters:
input - the input to split up into tokens

CharTokenizer

@Deprecated
public CharTokenizer(AttributeSource source,
                                Reader input)
Deprecated. use CharTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.

Creates a new CharTokenizer instance

Parameters:
input - the input to split up into tokens
source - the attribute source to use for this Tokenizer

CharTokenizer

@Deprecated
public CharTokenizer(AttributeSource.AttributeFactory factory,
                                Reader input)
Deprecated. use CharTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.

Creates a new CharTokenizer instance

Parameters:
input - the input to split up into tokens
factory - the attribute factory to use for this Tokenizer
Method Detail

isTokenChar

@Deprecated
protected boolean isTokenChar(char c)
Deprecated. use isTokenChar(int) instead. This method will be removed in Lucene 4.0.

Returns true iff a UTF-16 code unit should be included in a token. This tokenizer generates as tokens adjacent sequences of characters which satisfy this predicate. Characters for which this is false are used to define token boundaries and are not included in tokens.

Note: This method cannot handle supplementary characters. To support all Unicode characters, including supplementary characters, use the isTokenChar(int) method.

normalize

@Deprecated
protected char normalize(char c)
Deprecated. use normalize(int) instead. This method will be removed in Lucene 4.0.

Called on each token UTF-16 code unit to normalize it before it is added to the token. The default implementation does nothing. Subclasses may use this to, e.g., lowercase tokens.

Note: This method cannot handle supplementary characters. To support all Unicode characters, including supplementary characters, use the normalize(int) method.

isTokenChar

protected boolean isTokenChar(int c)
Returns true iff a codepoint should be included in a token. This tokenizer generates as tokens adjacent sequences of codepoints which satisfy this predicate. Codepoints for which this is false are used to define token boundaries and are not included in tokens.

As of Lucene 3.1 the char based API (isTokenChar(char) and normalize(char)) has been depreciated in favor of a Unicode 4.0 compatible int based API to support codepoints instead of UTF-16 code units. Subclasses of CharTokenizer must not override the char based methods if a Version >= 3.1 is passed to the constructor.

NOTE: This method will be marked abstract in Lucene 4.0.

normalize

protected int normalize(int c)
Called on each token character to normalize it before it is added to the token. The default implementation does nothing. Subclasses may use this to, e.g., lowercase tokens.

As of Lucene 3.1 the char based API (isTokenChar(char) and normalize(char)) has been depreciated in favor of a Unicode 4.0 compatible int based API to support codepoints instead of UTF-16 code units. Subclasses of CharTokenizer must not override the char based methods if a Version >= 3.1 is passed to the constructor.

NOTE: This method will be marked abstract in Lucene 4.0.

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

end

public final void end()
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream

reset

public void reset(Reader input)
           throws IOException
Description copied from class: Tokenizer
Expert: Reset the tokenizer to a new reader. Typically, an analyzer (in its reusableTokenStream method) will use this to re-use a previously created tokenizer.

Overrides:
reset in class Tokenizer
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CollationTestBase

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class CollationTestBase

java.lang.Object
    extended by  org.junit.Assert
        extended by  org.apache.lucene.util.LuceneTestCase
            extended by  org.apache.lucene.analysis.CollationTestBase

public abstract class CollationTestBase
extends LuceneTestCase

Base test class for testing Unicode collation.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.LuceneTestCase
LuceneTestCase.Nightly
Field Summary
protected String | firstRangeBeginningOriginal
protected String | firstRangeEndOriginal
protected String | secondRangeBeginningOriginal
protected String | secondRangeEndOriginal
Fields inherited from class org.apache.lucene.util.LuceneTestCase
classRules, random, RANDOM_MULTIPLIER, ruleChain, stores, TEMP_DIR, TEST_CLEAN_THREADS, TEST_DIRECTORY, TEST_ITER, TEST_ITER_MIN, TEST_LINE_DOCS_FILE, TEST_LOCALE, TEST_NIGHTLY, TEST_SEED, TEST_TIMEZONE, TEST_VERSION_CURRENT, testsFailed, VERBOSE
Constructor Summary
CollationTestBase()
Method Summary
void | assertThreadSafe(Analyzer analyzer)
protected String | encodeCollationKey(byte[] keyBits) Convenience method to perform the same function as CollationKeyFilter.
void | testCollationKeySort(Analyzer usAnalyzer, Analyzer franceAnalyzer, Analyzer swedenAnalyzer, Analyzer denmarkAnalyzer, String usResult, String frResult, String svResult, String dkResult)
void | testFarsiRangeFilterCollating(Analyzer analyzer, String firstBeg, String firstEnd, String secondBeg, String secondEnd)
void | testFarsiRangeQueryCollating(Analyzer analyzer, String firstBeg, String firstEnd, String secondBeg, String secondEnd)
void | testFarsiTermRangeQuery(Analyzer analyzer, String firstBeg, String firstEnd, String secondBeg, String secondEnd)
Methods inherited from class org.apache.lucene.util.LuceneTestCase
afterClassLuceneTestCaseJ4, alwaysIgnoredTestMethod, assertEquals, assertEquals, assertEquals, assertEquals, assertSaneFieldCaches, asSet, assumeFalse, assumeNoException, assumeTrue, atLeast, atLeast, beforeClassLuceneTestCaseJ4, dumpArray, dumpIterator, getDataFile, getName, getTestClass, getTestLabel, isTestThread, localeForName, newDirectory, newDirectory, newDirectory, newDirectory, newField, newField, newField, newField, newField, newField, newFSDirectory, newFSDirectory, newIndexWriterConfig, newIndexWriterConfig, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newSearcher, newSearcher, newTieredMergePolicy, newTieredMergePolicy, purgeFieldCache, randomDirectory, randomLocale, randomTimeZone, rarely, rarely, reportAdditionalFailureInfo, reportPartialFailureInfo, setMergeFactor, setUp, setUseCompoundFile, tearDown, usually, usually
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

firstRangeBeginningOriginal

protected String firstRangeBeginningOriginal

firstRangeEndOriginal

protected String firstRangeEndOriginal

secondRangeBeginningOriginal

protected String secondRangeBeginningOriginal

secondRangeEndOriginal

protected String secondRangeEndOriginal
Constructor Detail

CollationTestBase

public CollationTestBase()
Method Detail

encodeCollationKey

protected String encodeCollationKey(byte[] keyBits)
Convenience method to perform the same function as CollationKeyFilter.

Parameters:
keyBits - the result from collator.getCollationKey(original).toByteArray()
Returns:
The encoded collation key for the original String

testFarsiRangeFilterCollating

public void testFarsiRangeFilterCollating(Analyzer analyzer,
                                          String firstBeg,
                                          String firstEnd,
                                          String secondBeg,
                                          String secondEnd)
                                   throws Exception
Throws:
Exception

testFarsiRangeQueryCollating

public void testFarsiRangeQueryCollating(Analyzer analyzer,
                                         String firstBeg,
                                         String firstEnd,
                                         String secondBeg,
                                         String secondEnd)
                                  throws Exception
Throws:
Exception

testFarsiTermRangeQuery

public void testFarsiTermRangeQuery(Analyzer analyzer,
                                    String firstBeg,
                                    String firstEnd,
                                    String secondBeg,
                                    String secondEnd)
                             throws Exception
Throws:
Exception

testCollationKeySort

public void testCollationKeySort(Analyzer usAnalyzer,
                                 Analyzer franceAnalyzer,
                                 Analyzer swedenAnalyzer,
                                 Analyzer denmarkAnalyzer,
                                 String usResult,
                                 String frResult,
                                 String svResult,
                                 String dkResult)
                          throws Exception
Throws:
Exception

assertThreadSafe

public void assertThreadSafe(Analyzer analyzer)
                      throws Exception
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EmptyTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class EmptyTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.EmptyTokenizer
All Implemented Interfaces:
Closeable
public final class EmptyTokenizer
extends Tokenizer

Emits no tokens

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
EmptyTokenizer(Reader input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset, reset
Methods inherited from class org.apache.lucene.analysis.TokenStream
end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

EmptyTokenizer

public EmptyTokenizer(Reader input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilteringTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class FilteringTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.FilteringTokenFilter
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
JapanesePartOfSpeechStopFilter, LengthFilter, StopFilter, TypeTokenFilter
public abstract class FilteringTokenFilter
extends TokenFilter

Abstract base class for TokenFilters that may remove tokens. You have to implement accept() and return a boolean if the current token should be preserved. incrementToken() uses this method to decide if a token should be passed to the caller.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
FilteringTokenFilter(boolean enablePositionIncrements, TokenStream input)
Method Summary
protected abstract  boolean accept()
Override this method and return if the current input token should be returned by incrementToken().
 boolean getEnablePositionIncrements()
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset()
Reset the filter as well as the input TokenStream.
 void setEnablePositionIncrements(boolean enable)
If true, this TokenFilter will preserve positions of the incoming tokens (ie, accumulate and set position increments of the removed tokens).
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FilteringTokenFilter

public FilteringTokenFilter(boolean enablePositionIncrements,
                            TokenStream input)
Method Detail

accept

protected abstract boolean accept()
                           throws IOException
Override this method and return if the current input token should be returned by incrementToken().

Throws:
IOException

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException

getEnablePositionIncrements

public boolean getEnablePositionIncrements()
See Also:
setEnablePositionIncrements(boolean)

setEnablePositionIncrements

public void setEnablePositionIncrements(boolean enable)
If true, this TokenFilter will preserve positions of the incoming tokens (ie, accumulate and set position increments of the removed tokens). Generally, true is best as it does not lose information (positions of the original tokens) during indexing.

When set, when a token is stopped (omitted), the position increment of the following token is incremented.

NOTE: be sure to also set QueryParser.setEnablePositionIncrements(boolean) if you use QueryParser to create queries.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ISOLatin1AccentFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class ISOLatin1AccentFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.ISOLatin1AccentFilter
All Implemented Interfaces:
Closeable
Deprecated. If you build a new index, use ASCIIFoldingFilter which covers a superset of Latin 1. This class is included for use with existing indexes and will be removed in a future release (possibly Lucene 4.0).

@Deprecated
public final class ISOLatin1AccentFilter
extends TokenFilter

A filter that replaces accented characters in the ISO Latin 1 character set (ISO-8859-1) by their unaccented equivalent. The case will not be altered.

For instance, 'à' will be replaced by 'a'.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ISOLatin1AccentFilter(TokenStream input)
Deprecated.
Method Summary
boolean | incrementToken() Deprecated. Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | removeAccents(char[] input, int length) Deprecated. To replace accented characters in a String by unaccented equivalents.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ISOLatin1AccentFilter

public ISOLatin1AccentFilter(TokenStream input)
Deprecated.
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Deprecated.
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

removeAccents

public final void removeAccents(char[] input,
                                int length)
Deprecated.
To replace accented characters in a String by unaccented equivalents.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeywordAnalyzer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class KeywordAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.KeywordAnalyzer
All Implemented Interfaces:
Closeable
public final class KeywordAnalyzer
extends ReusableAnalyzerBase

"Tokenizes" the entire stream as a single token. This is useful for data like zip codes, ids, and some product names.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Constructor Summary
KeywordAnalyzer()
Method Summary
protected  ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

KeywordAnalyzer

public KeywordAnalyzer()
Method Detail

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Description copied from class: ReusableAnalyzerBase
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
the ReusableAnalyzerBase.TokenStreamComponents for this analyzer.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeywordMarkerFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class KeywordMarkerFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.KeywordMarkerFilter
All Implemented Interfaces:
Closeable
public final class KeywordMarkerFilter
extends TokenFilter

Marks terms as keywords via the KeywordAttribute. Each token contained in the provided is marked as a keyword by setting KeywordAttribute.setKeyword(boolean) to true.

See Also:
KeywordAttribute

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
KeywordMarkerFilter(TokenStream in, CharArraySet keywordSet)
Create a new KeywordMarkerFilter, that marks the current token as a keyword if the tokens term buffer is contained in the given set via the KeywordAttribute.
KeywordMarkerFilter(TokenStream in, Set<?> keywordSet)
Create a new KeywordMarkerFilter, that marks the current token as a keyword if the tokens term buffer is contained in the given set via the KeywordAttribute.
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

KeywordMarkerFilter

public KeywordMarkerFilter(TokenStream in,
                           CharArraySet keywordSet)
Create a new KeywordMarkerFilter, that marks the current token as a keyword if the tokens term buffer is contained in the given set via the KeywordAttribute.

Parameters:
in - TokenStream to filter
keywordSet - the keywords set to lookup the current termbuffer

KeywordMarkerFilter

public KeywordMarkerFilter(TokenStream in,
                           Set<?> keywordSet)
Create a new KeywordMarkerFilter, that marks the current token as a keyword if the tokens term buffer is contained in the given set via the KeywordAttribute.

Parameters:
in - TokenStream to filter
keywordSet - the keywords set to lookup the current termbuffer
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeywordTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class KeywordTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.KeywordTokenizer
All Implemented Interfaces:
Closeable
public final class KeywordTokenizer
extends Tokenizer

Emits the entire input as a single token.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
KeywordTokenizer(AttributeSource.AttributeFactory factory, Reader input, int bufferSize)
KeywordTokenizer(AttributeSource source, Reader input, int bufferSize)
KeywordTokenizer(Reader input)
KeywordTokenizer(Reader input, int bufferSize)
Method Summary
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset(Reader input)
Expert: Reset the tokenizer to a new reader.
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.analysis.TokenStream
reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

KeywordTokenizer

public KeywordTokenizer(Reader input)

KeywordTokenizer

public KeywordTokenizer(Reader input,
                        int bufferSize)

KeywordTokenizer

public KeywordTokenizer(AttributeSource source,
                        Reader input,
                        int bufferSize)

KeywordTokenizer

public KeywordTokenizer(AttributeSource.AttributeFactory factory,
                        Reader input,
                        int bufferSize)
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

end

public final void end()
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream

reset

public void reset(Reader input)
           throws IOException
Description copied from class: Tokenizer
Expert: Reset the tokenizer to a new reader. Typically, an analyzer (in its reusableTokenStream method) will use this to re-use a previously created tokenizer.

Overrides:
reset in class Tokenizer
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LengthFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class LengthFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.FilteringTokenFilter
                    extended by  org.apache.lucene.analysis.LengthFilter
All Implemented Interfaces:
Closeable
public final class LengthFilter
extends FilteringTokenFilter

Removes words that are too long or too short from the stream.

Note: Length is calculated as the number of UTF-16 code units.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
LengthFilter(boolean enablePositionIncrements, TokenStream in, int min, int max)
Build a filter that removes words that are too long or too short from the text.
LengthFilter(TokenStream in, int min, int max)
Deprecated. Use LengthFilter(boolean, TokenStream, int, int) instead.
Method Summary
 boolean accept()
Override this method and return if the current input token should be returned by FilteringTokenFilter.incrementToken().
Methods inherited from class org.apache.lucene.analysis.FilteringTokenFilter
getEnablePositionIncrements, incrementToken, reset, setEnablePositionIncrements
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

LengthFilter

public LengthFilter(boolean enablePositionIncrements,
                    TokenStream in,
                    int min,
                    int max)
Build a filter that removes words that are too long or too short from the text.

LengthFilter

@Deprecated
public LengthFilter(TokenStream in,
                               int min,
                               int max)
Deprecated. Use LengthFilter(boolean, TokenStream, int, int) instead.

Build a filter that removes words that are too long or too short from the text.

Method Detail

accept

public boolean accept()
               throws IOException
Description copied from class: FilteringTokenFilter
Override this method and return if the current input token should be returned by FilteringTokenFilter.incrementToken().

Specified by:
accept in class FilteringTokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LetterTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class LetterTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.CharTokenizer
                    extended by  org.apache.lucene.analysis.LetterTokenizer
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
ArabicLetterTokenizer, LowerCaseTokenizer
public class LetterTokenizer
extends CharTokenizer

A LetterTokenizer is a tokenizer that divides text at non-letters. That's to say, it defines tokens as maximal strings of adjacent letters, as defined by java.lang.Character.isLetter() predicate.

Note: this does a decent job for most European languages, but does a terrible job for some Asian languages, where words are not separated by spaces.

You must specify the required Version compatibility when creating LetterTokenizer:

  • As of 3.1, CharTokenizer uses an int based API to normalize and detect token characters. See CharTokenizer.isTokenChar(int) and CharTokenizer.normalize(int) for details.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
LetterTokenizer(AttributeSource.AttributeFactory factory, Reader in)
Deprecated. use LetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
LetterTokenizer(AttributeSource source, Reader in)
Deprecated. use LetterTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
LetterTokenizer(Reader in)
Deprecated. use LetterTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
LetterTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader in)
Construct a new LetterTokenizer using a given AttributeSource.AttributeFactory.
LetterTokenizer(Version matchVersion, AttributeSource source, Reader in)
Construct a new LetterTokenizer using a given AttributeSource.
LetterTokenizer(Version matchVersion, Reader in)
Construct a new LetterTokenizer.
Method Summary
protected  boolean isTokenChar(int c)
Collects only characters which satisfy Character.isLetter(int).
Methods inherited from class org.apache.lucene.analysis.CharTokenizer
end, incrementToken, isTokenChar, normalize, normalize, reset
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.analysis.TokenStream
reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

LetterTokenizer

public LetterTokenizer(Version matchVersion,
                       Reader in)
Construct a new LetterTokenizer.

Parameters:
matchVersion - Lucene version to match See above
in - the input to split up into tokens

LetterTokenizer

public LetterTokenizer(Version matchVersion,
                       AttributeSource source,
                       Reader in)
Construct a new LetterTokenizer using a given AttributeSource.

Parameters:
matchVersion - Lucene version to match See above
source - the attribute source to use for this Tokenizer
in - the input to split up into tokens

LetterTokenizer

public LetterTokenizer(Version matchVersion,
                       AttributeSource.AttributeFactory factory,
                       Reader in)
Construct a new LetterTokenizer using a given AttributeSource.AttributeFactory.

Parameters:
matchVersion - Lucene version to match See above
factory - the attribute factory to use for this Tokenizer
in - the input to split up into tokens

LetterTokenizer

@Deprecated
public LetterTokenizer(Reader in)
Deprecated. use LetterTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.

Construct a new LetterTokenizer.

LetterTokenizer

@Deprecated
public LetterTokenizer(AttributeSource source,
                                  Reader in)
Deprecated. use LetterTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.

Construct a new LetterTokenizer using a given AttributeSource.

LetterTokenizer

@Deprecated
public LetterTokenizer(AttributeSource.AttributeFactory factory,
                                  Reader in)
Deprecated. use LetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.

Construct a new LetterTokenizer using a given AttributeSource.AttributeFactory.

Method Detail

isTokenChar

protected boolean isTokenChar(int c)
Collects only characters which satisfy Character.isLetter(int).

Overrides:
isTokenChar in class CharTokenizer
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LimitTokenCountAnalyzer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class LimitTokenCountAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.LimitTokenCountAnalyzer
All Implemented Interfaces:
Closeable
public final class LimitTokenCountAnalyzer
extends Analyzer

This Analyzer limits the number of tokens while indexing. It is a replacement for the maximum field length setting inside IndexWriter.

Constructor Summary
LimitTokenCountAnalyzer(Analyzer delegate, int maxTokenCount)
Build an analyzer that limits the maximum number of tokens per field.
Method Summary
int | getOffsetGap(Fieldable field) Just like Analyzer.getPositionIncrementGap(java.lang.String), except for Token offsets instead.
int | getPositionIncrementGap(String fieldName) Invoked before indexing a Fieldable instance if terms have already been added to that field.
TokenStream | reusableTokenStream(String fieldName, Reader reader) Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method.
TokenStream | tokenStream(String fieldName, Reader reader) Creates a TokenStream which tokenizes all the text in the provided Reader.
String | toString()
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

LimitTokenCountAnalyzer

public LimitTokenCountAnalyzer(Analyzer delegate,
                               int maxTokenCount)
Build an analyzer that limits the maximum number of tokens per field.

Method Detail

tokenStream

public TokenStream tokenStream(String fieldName,
                               Reader reader)
Description copied from class: Analyzer
Creates a TokenStream which tokenizes all the text in the provided Reader. Must be able to handle null field name for backward compatibility.

Specified by:
tokenStream in class Analyzer

reusableTokenStream

public TokenStream reusableTokenStream(String fieldName,
                                       Reader reader)
                                throws IOException
Description copied from class: Analyzer
Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method. Callers that do not need to use more than one TokenStream at the same time from this analyzer should use this method for better performance.

Overrides:
reusableTokenStream in class Analyzer
Throws:
IOException

getPositionIncrementGap

public int getPositionIncrementGap(String fieldName)
Description copied from class: Analyzer
Invoked before indexing a Fieldable instance if terms have already been added to that field. This allows custom analyzers to place an automatic position increment gap between Fieldable instances using the same field name. The default value position increment gap is 0. With a 0 position increment gap and the typical default token position increment of 1, all terms in a field, including across Fieldable instances, are in successive positions, allowing exact PhraseQuery matches, for instance, across Fieldable instance boundaries.

Overrides:
getPositionIncrementGap in class Analyzer
Parameters:
fieldName - Fieldable name being indexed.
Returns:
position increment gap, added to the next token emitted from Analyzer.tokenStream(String,Reader)

getOffsetGap

public int getOffsetGap(Fieldable field)
Description copied from class: Analyzer
Just like Analyzer.getPositionIncrementGap(java.lang.String), except for Token offsets instead. By default this returns 1 for tokenized fields and, as if the fields were joined with an extra space character, and 0 for un-tokenized fields. This method is only called if the field produced at least one token for indexing.

Overrides:
getOffsetGap in class Analyzer
Parameters:
field - the field just indexed
Returns:
offset gap, added to the next token emitted from Analyzer.tokenStream(String,Reader)

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LimitTokenCountFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class LimitTokenCountFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.LimitTokenCountFilter
All Implemented Interfaces:
Closeable
public final class LimitTokenCountFilter
extends TokenFilter

This TokenFilter limits the number of tokens while indexing. It is a replacement for the maximum field length setting inside IndexWriter.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
LimitTokenCountFilter(TokenStream in, int maxTokenCount)
Build a filter that only accepts tokens up to a maximum number.
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

LimitTokenCountFilter

public LimitTokenCountFilter(TokenStream in,
                             int maxTokenCount)
Build a filter that only accepts tokens up to a maximum number.

Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LookaheadTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class LookaheadTokenFilter<T extends LookaheadTokenFilter.Position>

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.LookaheadTokenFilter<T>
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
MockGraphTokenFilter, MockRandomLookaheadTokenFilter
public abstract class LookaheadTokenFilter<T extends LookaheadTokenFilter.Position>
extends TokenFilter

An abstract TokenFilter to make it easier to build graph token filters requiring some lookahead. This class handles the details of buffering up tokens, recording them by position, restoring them, providing access to them, etc.

Nested Class Summary
protected static class LookaheadTokenFilter.Position
Holds all state for a single position; subclass this to record other state at each position.
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
protected boolean | end
protected int | inputPos
protected OffsetAttribute | offsetAtt
protected int | outputPos
protected PositionIncrementAttribute | posIncAtt
protected RollingBuffer<T> | positions
protected PositionLengthAttribute | posLenAtt
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
protected LookaheadTokenFilter(TokenStream input)
Method Summary
protected void | afterPosition() This is called when all input tokens leaving a given position have been returned.
protected void | insertToken() Call this only from within afterPosition, to insert a new token.
protected abstract T | newPosition()
protected boolean | nextToken() Call this when you are done looking ahead; it will set the next token to return.
protected boolean | peekToken() Returns true if there is a new token.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.analysis.TokenStream
incrementToken
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

posIncAtt

protected final PositionIncrementAttribute posIncAtt

posLenAtt

protected final PositionLengthAttribute posLenAtt

offsetAtt

protected final OffsetAttribute offsetAtt

inputPos

protected int inputPos

outputPos

protected int outputPos

end

protected boolean end

positions

protected final RollingBuffer<T extends LookaheadTokenFilter.Position> positions
Constructor Detail

LookaheadTokenFilter

protected LookaheadTokenFilter(TokenStream input)
Method Detail

insertToken

protected void insertToken()
                    throws IOException
Call this only from within afterPosition, to insert a new token. After calling this you should set any necessary token you need.

Throws:
IOException

afterPosition

protected void afterPosition()
                      throws IOException
This is called when all input tokens leaving a given position have been returned. Override this and call createToken and then set whichever token's attributes you want, if you want to inject a token starting from this position.

Throws:
IOException

newPosition

protected abstract T newPosition()

peekToken

protected boolean peekToken()
                     throws IOException
Returns true if there is a new token.

Throws:
IOException

nextToken

protected boolean nextToken()
                     throws IOException
Call this when you are done looking ahead; it will set the next token to return. Return the boolean back to the caller.

Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LookaheadTokenFilter.Position

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class LookaheadTokenFilter.Position

java.lang.Object
    extended by  org.apache.lucene.analysis.LookaheadTokenFilter.Position
All Implemented Interfaces:
RollingBuffer.Resettable
Enclosing class:
LookaheadTokenFilter<T extends LookaheadTokenFilter.Position>
protected static class LookaheadTokenFilter.Position
extends Object
implements RollingBuffer.Resettable

Holds all state for a single position; subclass this to record other state at each position.

Field Summary
int | endOffset
List<AttributeSource.State> | inputTokens
int | nextRead
int | startOffset
Constructor Summary
protected LookaheadTokenFilter.Position()
Method Summary
void | add(AttributeSource.State state)
AttributeSource.State | nextState()
void | reset()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

inputTokens

public final List<AttributeSource.State> inputTokens

nextRead

public int nextRead

startOffset

public int startOffset

endOffset

public int endOffset
Constructor Detail

LookaheadTokenFilter.Position

protected LookaheadTokenFilter.Position()
Method Detail

reset

public void reset()
Specified by:
reset in interface RollingBuffer.Resettable

add

public void add(AttributeSource.State state)

nextState

public AttributeSource.State nextState()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LowerCaseFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class LowerCaseFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.LowerCaseFilter
All Implemented Interfaces:
Closeable
public final class LowerCaseFilter
extends TokenFilter

Normalizes token text to lower case.

You must specify the required Version compatibility when creating LowerCaseFilter:

  • As of 3.1, supplementary characters are properly lowercased.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
LowerCaseFilter(TokenStream in)
Deprecated. Use LowerCaseFilter(Version, TokenStream) instead.
LowerCaseFilter(Version matchVersion, TokenStream in)
Create a new LowerCaseFilter, that normalizes token text to lower case.
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

LowerCaseFilter

public LowerCaseFilter(Version matchVersion,
                       TokenStream in)
Create a new LowerCaseFilter, that normalizes token text to lower case.

Parameters:
matchVersion - See above
in - TokenStream to filter

LowerCaseFilter

@Deprecated
public LowerCaseFilter(TokenStream in)
Deprecated. Use LowerCaseFilter(Version, TokenStream) instead.

Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LowerCaseTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class LowerCaseTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.CharTokenizer
                    extended by  org.apache.lucene.analysis.LetterTokenizer
                        extended by  org.apache.lucene.analysis.LowerCaseTokenizer
All Implemented Interfaces:
Closeable
public final class LowerCaseTokenizer
extends LetterTokenizer

LowerCaseTokenizer performs the function of LetterTokenizer and LowerCaseFilter together. It divides text at non-letters and converts them to lower case. While it is functionally equivalent to the combination of LetterTokenizer and LowerCaseFilter, there is a performance advantage to doing the two tasks at once, hence this (redundant) implementation.

Note: this does a decent job for most European languages, but does a terrible job for some Asian languages, where words are not separated by spaces.

You must specify the required Version compatibility when creating LowerCaseTokenizer:

  • As of 3.1, CharTokenizer uses an int based API to normalize and detect token characters. See CharTokenizer.isTokenChar(int) and CharTokenizer.normalize(int) for details.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
LowerCaseTokenizer(AttributeSource.AttributeFactory factory, Reader in)
Deprecated. use LowerCaseTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
LowerCaseTokenizer(AttributeSource source, Reader in)
Deprecated. use LowerCaseTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
LowerCaseTokenizer(Reader in)
Deprecated. use LowerCaseTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
LowerCaseTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader in)
Construct a new LowerCaseTokenizer using a given AttributeSource.AttributeFactory.
LowerCaseTokenizer(Version matchVersion, AttributeSource source, Reader in)
Construct a new LowerCaseTokenizer using a given AttributeSource.
LowerCaseTokenizer(Version matchVersion, Reader in)
Construct a new LowerCaseTokenizer.
Method Summary
protected  int normalize(int c)
Converts char to lower case Character.toLowerCase(int).
Methods inherited from class org.apache.lucene.analysis.LetterTokenizer
isTokenChar
Methods inherited from class org.apache.lucene.analysis.CharTokenizer
end, incrementToken, isTokenChar, normalize, reset
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.analysis.TokenStream
reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

LowerCaseTokenizer

public LowerCaseTokenizer(Version matchVersion,
                          Reader in)
Construct a new LowerCaseTokenizer.

Parameters:
matchVersion - Lucene version to match See above
in - the input to split up into tokens

LowerCaseTokenizer

public LowerCaseTokenizer(Version matchVersion,
                          AttributeSource source,
                          Reader in)
Construct a new LowerCaseTokenizer using a given AttributeSource.

Parameters:
matchVersion - Lucene version to match See above
source - the attribute source to use for this Tokenizer
in - the input to split up into tokens

LowerCaseTokenizer

public LowerCaseTokenizer(Version matchVersion,
                          AttributeSource.AttributeFactory factory,
                          Reader in)
Construct a new LowerCaseTokenizer using a given AttributeSource.AttributeFactory.

Parameters:
matchVersion - Lucene version to match See above
factory - the attribute factory to use for this Tokenizer
in - the input to split up into tokens

LowerCaseTokenizer

@Deprecated
public LowerCaseTokenizer(Reader in)
Deprecated. use LowerCaseTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.

Construct a new LowerCaseTokenizer.

LowerCaseTokenizer

@Deprecated
public LowerCaseTokenizer(AttributeSource source,
                                     Reader in)
Deprecated. use LowerCaseTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.

Construct a new LowerCaseTokenizer using a given AttributeSource.

LowerCaseTokenizer

@Deprecated
public LowerCaseTokenizer(AttributeSource.AttributeFactory factory,
                                     Reader in)
Deprecated. use LowerCaseTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.

Construct a new LowerCaseTokenizer using a given AttributeSource.AttributeFactory.

Method Detail

normalize

protected int normalize(int c)
Converts char to lower case Character.toLowerCase(int).

Overrides:
normalize in class CharTokenizer
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MappingCharFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class MappingCharFilter

java.lang.Object
    extended by  java.io.Reader
        extended by  org.apache.lucene.analysis.CharStream
            extended by  org.apache.lucene.analysis.CharFilter
                extended by  org.apache.lucene.analysis.BaseCharFilter
                    extended by  org.apache.lucene.analysis.MappingCharFilter
All Implemented Interfaces:
Closeable, Readable
public class MappingCharFilter
extends BaseCharFilter

Simplistic CharFilter that applies the mappings contained in a NormalizeCharMap to the character stream, and correcting the resulting changes to the offsets.

Field Summary
Fields inherited from class org.apache.lucene.analysis.CharFilter
input
Fields inherited from class java.io.Reader
lock
Constructor Summary
MappingCharFilter(NormalizeCharMap normMap, CharStream in)
Default constructor that takes a CharStream.
MappingCharFilter(NormalizeCharMap normMap, Reader in)
Easy-use constructor that takes a Reader.
Method Summary
int | read()
int | read(char[] cbuf, int off, int len)
Methods inherited from class org.apache.lucene.analysis.BaseCharFilter
addOffCorrectMap, correct, getLastCumulativeDiff
Methods inherited from class org.apache.lucene.analysis.CharFilter
close, correctOffset, mark, markSupported, reset
Methods inherited from class java.io.Reader
read, read, ready, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MappingCharFilter

public MappingCharFilter(NormalizeCharMap normMap,
                         CharStream in)
Default constructor that takes a CharStream.

MappingCharFilter

public MappingCharFilter(NormalizeCharMap normMap,
                         Reader in)
Easy-use constructor that takes a Reader.

Method Detail

read

public int read()
         throws IOException
Overrides:
read in class Reader
Throws:
IOException

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Overrides:
read in class CharFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockAnalyzer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class MockAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.MockAnalyzer
All Implemented Interfaces:
Closeable
public final class MockAnalyzer
extends Analyzer

Analyzer for testing

This analyzer is a replacement for Whitespace/Simple/KeywordAnalyzers for unit tests. If you are testing a custom component such as a queryparser or analyzer-wrapper that consumes analysis streams, its a great idea to test it with this analyzer instead. MockAnalyzer has the following behavior:

  • By default, the assertions in MockTokenizer are turned on for extra checks that the consumer is consuming properly. These checks can be disabled with setEnableChecks(boolean).
  • Payload data is randomly injected into the stream for more thorough testing of payloads.

See Also:
MockTokenizer

Constructor Summary
MockAnalyzer(Random random)
Create a Whitespace-lowercasing analyzer with no stopwords removal.
MockAnalyzer(Random random, int pattern, boolean lowerCase)
Calls MockAnalyzer(random, pattern, lowerCase, CharArraySet.EMPTY_STOPSET, true).
MockAnalyzer(Random random, int pattern, boolean lowerCase, CharArraySet filter, boolean enablePositionIncrements)
Creates a new MockAnalyzer.
Method Summary
int | getPositionIncrementGap(String fieldName) Invoked before indexing a Fieldable instance if terms have already been added to that field.
TokenStream | reusableTokenStream(String fieldName, Reader reader) Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method.
void | setEnableChecks(boolean enableChecks) Toggle consumer workflow checking: if your test consumes tokenstreams normally you should leave this enabled.
void | setMaxTokenLength(int length) Toggle maxTokenLength for MockTokenizer
void | setPositionIncrementGap(int positionIncrementGap)
TokenStream | tokenStream(String fieldName, Reader reader) Creates a TokenStream which tokenizes all the text in the provided Reader.
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MockAnalyzer

public MockAnalyzer(Random random,
                    int pattern,
                    boolean lowerCase,
                    CharArraySet filter,
                    boolean enablePositionIncrements)
Creates a new MockAnalyzer.

Parameters:
random - Random for payloads behavior
pattern - pattern constant describing how tokenization should happen
lowerCase - true if the tokenizer should lowercase terms
filter - CharArraySet describing how terms should be filtered (set of stopwords, etc)
enablePositionIncrements - true if position increments should reflect filtered terms.

MockAnalyzer

public MockAnalyzer(Random random,
                    int pattern,
                    boolean lowerCase)
Calls MockAnalyzer(random, pattern, lowerCase, CharArraySet.EMPTY_STOPSET, true).

MockAnalyzer

public MockAnalyzer(Random random)
Create a Whitespace-lowercasing analyzer with no stopwords removal.

Calls MockAnalyzer(random, MockTokenizer.WHITESPACE, true).

Method Detail

tokenStream

public TokenStream tokenStream(String fieldName,
                               Reader reader)
Description copied from class: Analyzer
Creates a TokenStream which tokenizes all the text in the provided Reader. Must be able to handle null field name for backward compatibility.

Specified by:
tokenStream in class Analyzer

reusableTokenStream

public TokenStream reusableTokenStream(String fieldName,
                                       Reader reader)
                                throws IOException
Description copied from class: Analyzer
Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method. Callers that do not need to use more than one TokenStream at the same time from this analyzer should use this method for better performance.

Overrides:
reusableTokenStream in class Analyzer
Throws:
IOException

setPositionIncrementGap

public void setPositionIncrementGap(int positionIncrementGap)

getPositionIncrementGap

public int getPositionIncrementGap(String fieldName)
Description copied from class: Analyzer
Invoked before indexing a Fieldable instance if terms have already been added to that field. This allows custom analyzers to place an automatic position increment gap between Fieldable instances using the same field name. The default value position increment gap is 0. With a 0 position increment gap and the typical default token position increment of 1, all terms in a field, including across Fieldable instances, are in successive positions, allowing exact PhraseQuery matches, for instance, across Fieldable instance boundaries.

Overrides:
getPositionIncrementGap in class Analyzer
Parameters:
fieldName - Fieldable name being indexed.
Returns:
position increment gap, added to the next token emitted from Analyzer.tokenStream(String,Reader)

setEnableChecks

public void setEnableChecks(boolean enableChecks)
Toggle consumer workflow checking: if your test consumes tokenstreams normally you should leave this enabled.

setMaxTokenLength

public void setMaxTokenLength(int length)
Toggle maxTokenLength for MockTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockCharFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class MockCharFilter

java.lang.Object
    extended by  java.io.Reader
        extended by  org.apache.lucene.analysis.CharStream
            extended by  org.apache.lucene.analysis.MockCharFilter
All Implemented Interfaces:
Closeable, Readable
public class MockCharFilter
extends CharStream

the purpose of this charfilter is to send offsets out of bounds if the analyzer doesn't use correctOffset or does incorrect offset math.

Field Summary
Fields inherited from class java.io.Reader
lock
Constructor Summary
MockCharFilter(Reader in)
MockCharFilter(Reader in, int remainder)
Method Summary
protected void | addOffCorrectMap(int off, int cumulativeDiff)
void | close()
int | correctOffset(int currentOff) Called by CharFilter(s) and Tokenizer to correct token offset.
int | read()
int | read(char[] cbuf, int off, int len)
Methods inherited from class java.io.Reader
mark, markSupported, read, read, ready, reset, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MockCharFilter

public MockCharFilter(Reader in,
                      int remainder)

MockCharFilter

public MockCharFilter(Reader in)
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class Reader
Throws:
IOException

read

public int read()
         throws IOException
Overrides:
read in class Reader
Throws:
IOException

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Specified by:
read in class Reader
Throws:
IOException

correctOffset

public int correctOffset(int currentOff)
Description copied from class: CharStream
Called by CharFilter(s) and Tokenizer to correct token offset.

Specified by:
correctOffset in class CharStream
Parameters:
currentOff - offset as seen in the output
Returns:
corrected offset based on the input

addOffCorrectMap

protected void addOffCorrectMap(int off,
                                int cumulativeDiff)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockFixedLengthPayloadFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class MockFixedLengthPayloadFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.MockFixedLengthPayloadFilter
All Implemented Interfaces:
Closeable
public final class MockFixedLengthPayloadFilter
extends TokenFilter

TokenFilter that adds random fixed-length payloads.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
MockFixedLengthPayloadFilter(Random random, TokenStream in, int length)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

MockFixedLengthPayloadFilter

public MockFixedLengthPayloadFilter(Random random,
                                    TokenStream in,
                                    int length)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockGraphTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class MockGraphTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.LookaheadTokenFilter<LookaheadTokenFilter.Position>
                    extended by  org.apache.lucene.analysis.MockGraphTokenFilter
All Implemented Interfaces:
Closeable
public final class MockGraphTokenFilter
extends LookaheadTokenFilter<LookaheadTokenFilter.Position>

Randomly inserts overlapped (posInc=0) tokens with posLength sometimes > 1. The chain must have an OffsetAttribute.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.LookaheadTokenFilter
LookaheadTokenFilter.Position
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.LookaheadTokenFilter
end, inputPos, offsetAtt, outputPos, posIncAtt, positions, posLenAtt
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
MockGraphTokenFilter(Random random, TokenStream input)
Method Summary
protected void | afterPosition() This is called when all input tokens leaving a given position have been returned.
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
protected LookaheadTokenFilter.Position | newPosition()
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.LookaheadTokenFilter
insertToken, nextToken, peekToken
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

MockGraphTokenFilter

public MockGraphTokenFilter(Random random,
                            TokenStream input)
Method Detail

newPosition

protected LookaheadTokenFilter.Position newPosition()
Specified by:
newPosition in class LookaheadTokenFilter<LookaheadTokenFilter.Position>

afterPosition

protected void afterPosition()
                      throws IOException
Description copied from class: LookaheadTokenFilter
This is called when all input tokens leaving a given position have been returned. Override this and call createToken and then set whichever token's attributes you want, if you want to inject a token starting from this position.

Overrides:
afterPosition in class LookaheadTokenFilter<LookaheadTokenFilter.Position>
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class LookaheadTokenFilter<LookaheadTokenFilter.Position>
Throws:
IOException

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockHoleInjectingTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class MockHoleInjectingTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.MockHoleInjectingTokenFilter
All Implemented Interfaces:
Closeable
public final class MockHoleInjectingTokenFilter
extends TokenFilter

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
MockHoleInjectingTokenFilter(Random random, TokenStream in)
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

MockHoleInjectingTokenFilter

public MockHoleInjectingTokenFilter(Random random,
                                    TokenStream in)
Method Detail

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockRandomLookaheadTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class MockRandomLookaheadTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.LookaheadTokenFilter<LookaheadTokenFilter.Position>
                    extended by  org.apache.lucene.analysis.MockRandomLookaheadTokenFilter
All Implemented Interfaces:
Closeable
public final class MockRandomLookaheadTokenFilter
extends LookaheadTokenFilter<LookaheadTokenFilter.Position>

Uses LookaheadTokenFilter to randomly peek at future tokens.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.LookaheadTokenFilter
LookaheadTokenFilter.Position
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.LookaheadTokenFilter
end, inputPos, offsetAtt, outputPos, posIncAtt, positions, posLenAtt
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
MockRandomLookaheadTokenFilter(Random random, TokenStream in)
Method Summary
protected void | afterPosition() This is called when all input tokens leaving a given position have been returned.
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
LookaheadTokenFilter.Position | newPosition()
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.LookaheadTokenFilter
insertToken, nextToken, peekToken
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

MockRandomLookaheadTokenFilter

public MockRandomLookaheadTokenFilter(Random random,
                                      TokenStream in)
Method Detail

newPosition

public LookaheadTokenFilter.Position newPosition()
Specified by:
newPosition in class LookaheadTokenFilter<LookaheadTokenFilter.Position>

afterPosition

protected void afterPosition()
                      throws IOException
Description copied from class: LookaheadTokenFilter
This is called when all input tokens leaving a given position have been returned. Override this and call createToken and then set whichever token's attributes you want, if you want to inject a token starting from this position.

Overrides:
afterPosition in class LookaheadTokenFilter<LookaheadTokenFilter.Position>
Throws:
IOException

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class LookaheadTokenFilter<LookaheadTokenFilter.Position>
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockReaderWrapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class MockReaderWrapper

java.lang.Object
    extended by  java.io.Reader
        extended by  org.apache.lucene.analysis.MockReaderWrapper
All Implemented Interfaces:
Closeable, Readable
public class MockReaderWrapper
extends Reader

Wraps a Reader, and can throw random or fixed exceptions, and spoon feed read chars.

Field Summary
Fields inherited from class java.io.Reader
lock
Constructor Summary
MockReaderWrapper(Random random, Reader in)
Method Summary
void | close()
static boolean | isMyEvilException(Throwable t)
boolean | markSupported()
int | read(char[] cbuf, int off, int len)
boolean | ready()
void | throwExcAfterChar(int charUpto) Throw an exception after reading this many chars.
void | throwExcNext()
Methods inherited from class java.io.Reader
mark, read, read, read, reset, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MockReaderWrapper

public MockReaderWrapper(Random random,
                         Reader in)
Method Detail

throwExcAfterChar

public void throwExcAfterChar(int charUpto)
Throw an exception after reading this many chars.

throwExcNext

public void throwExcNext()

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class Reader
Throws:
IOException

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Specified by:
read in class Reader
Throws:
IOException

markSupported

public boolean markSupported()
Overrides:
markSupported in class Reader

ready

public boolean ready()
Overrides:
ready in class Reader

isMyEvilException

public static boolean isMyEvilException(Throwable t)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class MockTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.MockTokenizer
All Implemented Interfaces:
Closeable
public class MockTokenizer
extends Tokenizer

Tokenizer for testing.

This tokenizer is a replacement for WHITESPACE, SIMPLE, and KEYWORD tokenizers. If you are writing a component such as a TokenFilter, its a great idea to test it wrapping this tokenizer instead for extra checks. This tokenizer has the following behavior:

  • An internal state-machine is used for checking consumer consistency. These checks can be disabled with setEnableChecks(boolean).
  • For convenience, optionally lowercases terms that it outputs.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory
Field Summary
static int | DEFAULT_MAX_TOKEN_LENGTH
static int | KEYWORD Acts Similar to KeywordTokenizer.
static int | SIMPLE Acts like LetterTokenizer.
static int | WHITESPACE Acts Similar to WhitespaceTokenizer
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
MockTokenizer(AttributeSource.AttributeFactory factory, Reader input, int pattern, boolean lowerCase, int maxTokenLength)
MockTokenizer(Reader input)
Calls MockTokenizer(Reader, WHITESPACE, true)
MockTokenizer(Reader input, int pattern, boolean lowerCase)
MockTokenizer(Reader input, int pattern, boolean lowerCase, int maxTokenLength)
Method Summary
 void close()
By default, closes the input Reader.
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
protected  boolean isTokenChar(int c)
protected  int normalize(int c)
protected  int readCodePoint()
 void reset()
Resets this stream to the beginning.
 void reset(Reader input)
Expert: Reset the tokenizer to a new reader.
 void setEnableChecks(boolean enableChecks)
Toggle consumer workflow checking: if your test consumes tokenstreams normally you should leave this enabled.
Methods inherited from class org.apache.lucene.analysis.Tokenizer
correctOffset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

WHITESPACE

public static final int WHITESPACE
Acts Similar to WhitespaceTokenizer

See Also:
Constant Field Values

KEYWORD

public static final int KEYWORD
Acts Similar to KeywordTokenizer. TODO: Keyword returns an "empty" token for an empty reader...

See Also:
Constant Field Values

SIMPLE

public static final int SIMPLE
Acts like LetterTokenizer.

See Also:
Constant Field Values

DEFAULT_MAX_TOKEN_LENGTH

public static final int DEFAULT_MAX_TOKEN_LENGTH
See Also:
Constant Field Values
Constructor Detail

MockTokenizer

public MockTokenizer(AttributeSource.AttributeFactory factory,
                     Reader input,
                     int pattern,
                     boolean lowerCase,
                     int maxTokenLength)

MockTokenizer

public MockTokenizer(Reader input,
                     int pattern,
                     boolean lowerCase,
                     int maxTokenLength)

MockTokenizer

public MockTokenizer(Reader input,
                     int pattern,
                     boolean lowerCase)

MockTokenizer

public MockTokenizer(Reader input)
Calls MockTokenizer(Reader, WHITESPACE, true)

Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

readCodePoint

protected int readCodePoint()
                     throws IOException
Throws:
IOException

isTokenChar

protected boolean isTokenChar(int c)

normalize

protected int normalize(int c)

reset

public void reset()
           throws IOException
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException

close

public void close()
           throws IOException
Description copied from class: Tokenizer
By default, closes the input Reader.

Specified by:
close in interface Closeable
Overrides:
close in class Tokenizer
Throws:
IOException

reset

public void reset(Reader input)
           throws IOException
Description copied from class: Tokenizer
Expert: Reset the tokenizer to a new reader. Typically, an analyzer (in its reusableTokenStream method) will use this to re-use a previously created tokenizer.

Overrides:
reset in class Tokenizer
Throws:
IOException

end

public void end()
         throws IOException
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream
Throws:
IOException

setEnableChecks

public void setEnableChecks(boolean enableChecks)
Toggle consumer workflow checking: if your test consumes tokenstreams normally you should leave this enabled.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockVariableLengthPayloadFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class MockVariableLengthPayloadFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.MockVariableLengthPayloadFilter
All Implemented Interfaces:
Closeable
public final class MockVariableLengthPayloadFilter
extends TokenFilter

TokenFilter that adds random variable-length payloads.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
MockVariableLengthPayloadFilter(Random random, TokenStream in)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

MockVariableLengthPayloadFilter

public MockVariableLengthPayloadFilter(Random random,
                                       TokenStream in)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NormalizeCharMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class NormalizeCharMap

java.lang.Object
    extended by  org.apache.lucene.analysis.NormalizeCharMap

public class NormalizeCharMap
extends Object

Holds a map of String input to String output, to be used with MappingCharFilter.

Constructor Summary
NormalizeCharMap()
Method Summary
 void add(String singleMatch, String replacement)
Records a replacement to be applied to the inputs stream.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NormalizeCharMap

public NormalizeCharMap()
Method Detail

add

public void add(String singleMatch,
                String replacement)
Records a replacement to be applied to the inputs stream. Whenever singleMatch occurs in the input, it will be replaced with replacement.

Parameters:
singleMatch - input String to be replaced
replacement - output String
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericTokenStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class NumericTokenStream

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.NumericTokenStream
All Implemented Interfaces:
Closeable
public final class NumericTokenStream
extends TokenStream

Expert: This class provides a TokenStream for indexing numeric values that can be used by NumericRangeQuery or NumericRangeFilter.

Note that for simple usage, NumericField is recommended. NumericField disables norms and term freqs, as they are not usually needed during searching. If you need to change these settings, you should use this class.

See NumericField for capabilities of fields indexed numerically.

Here's an example usage, for an int field:

  Field field = new Field(name, new NumericTokenStream(precisionStep).setIntValue(value));
  field.setOmitNorms(true);
  field.setIndexOptions(IndexOptions.DOCS_ONLY);
  document.add(field);

For optimal performance, re-use the TokenStream and Field instance for more than one document:

  NumericTokenStream stream = new NumericTokenStream(precisionStep);
  Field field = new Field(name, stream);
  field.setOmitNorms(true);
  field.setIndexOptions(IndexOptions.DOCS_ONLY);
  Document document = new Document();
  document.add(field);

  for(all documents) {
    stream.setIntValue(value)
    writer.addDocument(document);
  }

This stream is not intended to be used in analyzers; it's more for iterating the different precisions during indexing a specific numeric value.

NOTE: as token streams are only consumed once the document is added to the index, if you index more than one numeric field, use a separate NumericTokenStream instance for each.

See NumericRangeQuery for more details on the precisionStep parameter as well as how numeric fields work under the hood.

Since:
2.9

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static String | TOKEN_TYPE_FULL_PREC The full precision token gets this token type assigned.
static String | TOKEN_TYPE_LOWER_PREC The lower precision tokens gets this token type assigned.
Constructor Summary
NumericTokenStream()
Creates a token stream for numeric values using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
NumericTokenStream(AttributeSource.AttributeFactory factory, int precisionStep)
Expert: Creates a token stream for numeric values with the specified precisionStep using the given AttributeSource.AttributeFactory.
NumericTokenStream(AttributeSource source, int precisionStep)
Expert: Creates a token stream for numeric values with the specified precisionStep using the given AttributeSource.
NumericTokenStream(int precisionStep)
Creates a token stream for numeric values with the specified precisionStep.
Method Summary
int | getPrecisionStep() Returns the precision step.
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Resets this stream to the beginning.
NumericTokenStream | setDoubleValue(double value) Initializes the token stream with the supplied double value.
NumericTokenStream | setFloatValue(float value) Initializes the token stream with the supplied float value.
NumericTokenStream | setIntValue(int value) Initializes the token stream with the supplied int value.
NumericTokenStream | setLongValue(long value) Initializes the token stream with the supplied long value.
String | toString() Returns a string representation of the object.
Methods inherited from class org.apache.lucene.analysis.TokenStream
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

TOKEN_TYPE_FULL_PREC

public static final String TOKEN_TYPE_FULL_PREC
The full precision token gets this token type assigned.

See Also:
Constant Field Values

TOKEN_TYPE_LOWER_PREC

public static final String TOKEN_TYPE_LOWER_PREC
The lower precision tokens gets this token type assigned.

See Also:
Constant Field Values
Constructor Detail

NumericTokenStream

public NumericTokenStream()
Creates a token stream for numeric values using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4). The stream is not yet initialized, before using set a value using the various set???Value() methods.

NumericTokenStream

public NumericTokenStream(int precisionStep)
Creates a token stream for numeric values with the specified precisionStep. The stream is not yet initialized, before using set a value using the various set???Value() methods.

NumericTokenStream

public NumericTokenStream(AttributeSource source,
                          int precisionStep)
Expert: Creates a token stream for numeric values with the specified precisionStep using the given AttributeSource. The stream is not yet initialized, before using set a value using the various set???Value() methods.

NumericTokenStream

public NumericTokenStream(AttributeSource.AttributeFactory factory,
                          int precisionStep)
Expert: Creates a token stream for numeric values with the specified precisionStep using the given AttributeSource.AttributeFactory. The stream is not yet initialized, before using set a value using the various set???Value() methods.

Method Detail

setLongValue

public NumericTokenStream setLongValue(long value)
Initializes the token stream with the supplied long value.

Parameters:
value - the value, for which this TokenStream should enumerate tokens.
Returns:
this instance, because of this you can use it the following way: new Field(name, new NumericTokenStream(precisionStep).setLongValue(value))

setIntValue

public NumericTokenStream setIntValue(int value)
Initializes the token stream with the supplied int value.

Parameters:
value - the value, for which this TokenStream should enumerate tokens.
Returns:
this instance, because of this you can use it the following way: new Field(name, new NumericTokenStream(precisionStep).setIntValue(value))

setDoubleValue

public NumericTokenStream setDoubleValue(double value)
Initializes the token stream with the supplied double value.

Parameters:
value - the value, for which this TokenStream should enumerate tokens.
Returns:
this instance, because of this you can use it the following way: new Field(name, new NumericTokenStream(precisionStep).setDoubleValue(value))

setFloatValue

public NumericTokenStream setFloatValue(float value)
Initializes the token stream with the supplied float value.

Parameters:
value - the value, for which this TokenStream should enumerate tokens.
Returns:
this instance, because of this you can use it the following way: new Field(name, new NumericTokenStream(precisionStep).setFloatValue(value))

reset

public void reset()
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream

incrementToken

public boolean incrementToken()
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise

toString

public String toString()
Description copied from class: AttributeSource
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as in Lucene 2.9/3.0. In Lucene 4.0 this default implementation will be removed.

It is recommeneded to use AttributeSource.reflectAsString(boolean) or AttributeSource.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeSource's internals.

Overrides:
toString in class AttributeSource

getPrecisionStep

public int getPrecisionStep()
Returns the precision step.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis
Interfaces
BaseTokenStreamTestCase.CheckClearAttributesAttribute
Classes
Analyzer
ASCIIFoldingFilter
BaseCharFilter
BaseTokenStreamTestCase
BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl
CachingTokenFilter
CannedTokenStream
CharArrayMap
CharArraySet
CharFilter
CharReader
CharStream
CharTokenizer
CollationTestBase
EmptyTokenizer
FilteringTokenFilter
ISOLatin1AccentFilter
KeywordAnalyzer
KeywordMarkerFilter
KeywordTokenizer
LengthFilter
LetterTokenizer
LimitTokenCountAnalyzer
LimitTokenCountFilter
LookaheadTokenFilter
LookaheadTokenFilter.Position
LowerCaseFilter
LowerCaseTokenizer
MappingCharFilter
MockAnalyzer
MockCharFilter
MockFixedLengthPayloadFilter
MockGraphTokenFilter
MockHoleInjectingTokenFilter
MockRandomLookaheadTokenFilter
MockReaderWrapper
MockTokenizer
MockVariableLengthPayloadFilter
NormalizeCharMap
NumericTokenStream
PerFieldAnalyzerWrapper
PorterStemFilter
ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
SimpleAnalyzer
StopAnalyzer
StopFilter
StopwordAnalyzerBase
TeeSinkTokenFilter
TeeSinkTokenFilter.SinkFilter
TeeSinkTokenFilter.SinkTokenStream
Token
Token.TokenAttributeFactory
TokenFilter
Tokenizer
TokenStream
TokenStreamToDot
TypeTokenFilter
ValidatingTokenFilter
VocabularyAssert
WhitespaceAnalyzer
WhitespaceTokenizer
WordlistLoader


org.apache.lucene.analysis

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis

API and code to convert text into indexable/searchable tokens.

See:
Description

Interface Summary
BaseTokenStreamTestCase.CheckClearAttributesAttribute Attribute that records if it was cleared or not.

Class Summary
Analyzer | An Analyzer builds TokenStreams, which analyze text.
ASCIIFoldingFilter | This class converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if one exists.
BaseCharFilter | Base utility class for implementing a CharFilter.
BaseTokenStreamTestCase | Base class for all Lucene unit tests that use TokenStreams.
BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl | Attribute that records if it was cleared or not.
CachingTokenFilter | This class can be used if the token attributes of a TokenStream are intended to be consumed more than once.
CannedTokenStream | TokenStream from a canned list of Tokens.
CharArrayMap<V> | A simple class that stores key Strings as char[]'s in a hash table.
CharArraySet | A simple class that stores Strings as char[]'s in a hash table.
CharFilter | Subclasses of CharFilter can be chained to filter CharStream.
CharReader | CharReader is a Reader wrapper.
CharStream | CharStream adds CharStream.correctOffset(int) functionality over Reader.
CharTokenizer | An abstract base class for simple, character-oriented tokenizers.
CollationTestBase | Base test class for testing Unicode collation.
EmptyTokenizer | Emits no tokens
FilteringTokenFilter | Abstract base class for TokenFilters that may remove tokens.
ISOLatin1AccentFilter | Deprecated. If you build a new index, use ASCIIFoldingFilter which covers a superset of Latin 1.
KeywordAnalyzer | "Tokenizes" the entire stream as a single token.
KeywordMarkerFilter | Marks terms as keywords via the KeywordAttribute.
KeywordTokenizer | Emits the entire input as a single token.
LengthFilter | Removes words that are too long or too short from the stream.
LetterTokenizer | A LetterTokenizer is a tokenizer that divides text at non-letters.
LimitTokenCountAnalyzer | This Analyzer limits the number of tokens while indexing.
LimitTokenCountFilter | This TokenFilter limits the number of tokens while indexing.
LookaheadTokenFilter<T extends LookaheadTokenFilter.Position> | An abstract TokenFilter to make it easier to build graph token filters requiring some lookahead.
LookaheadTokenFilter.Position | Holds all state for a single position; subclass this to record other state at each position.
LowerCaseFilter | Normalizes token text to lower case.
LowerCaseTokenizer | LowerCaseTokenizer performs the function of LetterTokenizer and LowerCaseFilter together.
MappingCharFilter | Simplistic CharFilter that applies the mappings contained in a NormalizeCharMap to the character stream, and correcting the resulting changes to the offsets.
MockAnalyzer | Analyzer for testing
MockCharFilter | the purpose of this charfilter is to send offsets out of bounds if the analyzer doesn't use correctOffset or does incorrect offset math.
MockFixedLengthPayloadFilter | TokenFilter that adds random fixed-length payloads.
MockGraphTokenFilter | Randomly inserts overlapped (posInc=0) tokens with posLength sometimes > 1.
MockHoleInjectingTokenFilter |
MockRandomLookaheadTokenFilter | Uses LookaheadTokenFilter to randomly peek at future tokens.
MockReaderWrapper | Wraps a Reader, and can throw random or fixed exceptions, and spoon feed read chars.
MockTokenizer | Tokenizer for testing.
MockVariableLengthPayloadFilter | TokenFilter that adds random variable-length payloads.
NormalizeCharMap | Holds a map of String input to String output, to be used with MappingCharFilter.
NumericTokenStream | Expert: This class provides a TokenStream for indexing numeric values that can be used by NumericRangeQuery or NumericRangeFilter.
PerFieldAnalyzerWrapper | This analyzer is used to facilitate scenarios where different fields require different analysis techniques.
PorterStemFilter | Transforms the token stream as per the Porter stemming algorithm.
ReusableAnalyzerBase | An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents | This class encapsulates the outer components of a token stream.
SimpleAnalyzer | An Analyzer that filters LetterTokenizer with LowerCaseFilter
StopAnalyzer | Filters LetterTokenizer with LowerCaseFilter and StopFilter.
StopFilter | Removes stop words from a token stream.
StopwordAnalyzerBase | Base class for Analyzers that need to make use of stopword sets.
TeeSinkTokenFilter | This TokenFilter provides the ability to set aside attribute states that have already been analyzed.
TeeSinkTokenFilter.SinkFilter | A filter that decides which AttributeSource states to store in the sink.
TeeSinkTokenFilter.SinkTokenStream | TokenStream output from a tee with optional filtering.
Token | A Token is an occurrence of a term from the text of a field.
Token.TokenAttributeFactory | Expert: Creates a TokenAttributeFactory returning Token as instance for the basic attributes and for all other attributes calls the given delegate factory.
TokenFilter | A TokenFilter is a TokenStream whose input is another TokenStream.
Tokenizer | A Tokenizer is a TokenStream whose input is a Reader.
TokenStream | A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.
TokenStreamToDot | Consumes a TokenStream and outputs the dot (graphviz) string (graph).
TypeTokenFilter | Removes tokens whose types appear in a set of blocked types from a token stream.
ValidatingTokenFilter | A TokenFilter that checks consistency of the tokens (eg offsets are consistent with one another).
VocabularyAssert | Utility class for doing vocabulary-based stemming tests
WhitespaceAnalyzer | An Analyzer that uses WhitespaceTokenizer.
WhitespaceTokenizer | A WhitespaceTokenizer is a tokenizer that divides text at whitespace.
WordlistLoader | Loader for text files that represent a list of stopwords.

Package org.apache.lucene.analysis Description

API and code to convert text into indexable/searchable tokens. Covers Analyzer and related classes.

Parsing? Tokenization? Analysis!

Lucene, an indexing and search library, accepts only plain text input.

Parsing

Applications that build their search capabilities upon Lucene may support documents in various formats – HTML, XML, PDF, Word – just to name a few. Lucene does not care about the Parsing of these and other document formats, and it is the responsibility of the application using Lucene to use an appropriate Parser to convert the original format into plain text before passing that plain text to Lucene.

Tokenization

Plain text passed to Lucene for indexing goes through a process generally called tokenization. Tokenization is the process of breaking input text into small indexing elements – tokens. The way input text is broken into tokens heavily influences how people will then be able to search for that text. For instance, sentences beginnings and endings can be identified to provide for more accurate phrase and proximity searches (though sentence identification is not provided by Lucene).

In some cases simply breaking the input text into tokens is not enough – a deeper Analysis may be needed. Lucene includes both pre- and post-tokenization analysis facilities.

Pre-tokenization analysis can include (but is not limited to) stripping HTML markup, and transforming or removing text matching arbitrary patterns or sets of fixed strings.

There are many post-tokenization steps that can be done, including (but not limited to):

  • Stemming – Replacing words with their stems. For instance with English stemming "bikes" is replaced with "bike"; now query "bike" can find both documents containing "bike" and those containing "bikes".
  • Stop Words Filtering – Common words like "the", "and" and "a" rarely add any value to a search. Removing them shrinks the index size and increases performance. It may also reduce some "noise" and actually improve search quality.
  • Text Normalization – Stripping accents and other character markings can make for better searching.
  • Synonym Expansion – Adding in synonyms at the same token position as the current word can mean better matching when users search with words in the synonym set.

Core Analysis

The analysis package provides the mechanism to convert Strings and Readers into tokens that can be indexed by Lucene. There are four main classes in the package from which all analysis processes are derived. These are:

  • Analyzer – An Analyzer is responsible for building a TokenStream which can be consumed by the indexing and searching processes. See below for more information on implementing your own Analyzer.
  • CharFilter – CharFilter extends Reader to perform pre-tokenization substitutions, deletions, and/or insertions on an input Reader's text, while providing corrected character offsets to account for these modifications. This capability allows highlighting to function over the original text when indexed tokens are created from CharFilter-modified text with offsets that are not the same as those in the original text. Tokenizers' constructors and reset() methods accept a CharFilter. CharFilters may be chained to perform multiple pre-tokenization modifications.
  • Tokenizer – A Tokenizer is a TokenStream and is responsible for breaking up incoming text into tokens. In most cases, an Analyzer will use a Tokenizer as the first step in the analysis process. However, to modify text prior to tokenization, use a CharStream subclass (see above).
  • TokenFilter – A TokenFilter is also a TokenStream and is responsible for modifying tokens that have been created by the Tokenizer. Common modifications performed by a TokenFilter are: deletion, stemming, synonym injection, and down casing. Not all Analyzers require TokenFilters.

Hints, Tips and Traps

The synergy between Analyzer and Tokenizer is sometimes confusing. To ease this confusion, some clarifications:

  • The Analyzer is responsible for the entire task of creating tokens out of the input text, while the Tokenizer is only responsible for breaking the input text into tokens. Very likely, tokens created by the Tokenizer would be modified or even omitted by the Analyzer (via one or more TokenFilters) before being returned.
  • Tokenizer is a TokenStream, but Analyzer is not.
  • Analyzer is "field aware", but Tokenizer is not.

Lucene Java provides a number of analysis capabilities, the most commonly used one being the StandardAnalyzer. Many applications will have a long and industrious life with nothing more than the StandardAnalyzer. However, there are a few other classes/packages that are worth mentioning:

  1. PerFieldAnalyzerWrapper – Most Analyzers perform the same operation on all Fields. The PerFieldAnalyzerWrapper can be used to associate a different Analyzer with different Fields.
  2. The contrib/analyzers library located at the root of the Lucene distribution has a number of different Analyzer implementations to solve a variety of different problems related to searching. Many of the Analyzers are designed to analyze non-English languages.
  3. There are a variety of Tokenizer and TokenFilter implementations in this package. Take a look around, chances are someone has implemented what you need.

Analysis is one of the main causes of performance degradation during indexing. Simply put, the more you analyze the slower the indexing (in most cases). Perhaps your application would be just fine using the simple WhitespaceTokenizer combined with a StopFilter. The contrib/benchmark library can be useful for testing out the speed of the analysis process.

Invoking the Analyzer

Applications usually do not invoke analysis – Lucene does it for them:

  • At indexing, as a consequence of addDocument(doc), the Analyzer in effect for indexing is invoked for each indexed field of the added document.
  • At search, a QueryParser may invoke the Analyzer during parsing. Note that for some queries, analysis does not take place, e.g. wildcard queries.

However an application might invoke Analysis of any text for testing or for any other purpose, something like:

    Version matchVersion = Version.LUCENE_XY; // Substitute desired Lucene version for XY
    Analyzer analyzer = new StandardAnalyzer(matchVersion); // or any other analyzer
    TokenStream ts = analyzer.tokenStream("myfield", new StringReader("some text goes here"));
    OffsetAttribute offsetAtt = addAttribute(OffsetAttribute.class);

    try {
      ts.reset(); // Resets this stream to the beginning. (Required)
      while (ts.incrementToken()) {
        // Use AttributeSource.reflectAsString(boolean)
        // for token stream debugging.
        System.out.println("token: " + ts.reflectAsString(true));

        System.out.println("token start offset: " + offsetAtt.startOffset());
        System.out.println("  token end offset: " + offsetAtt.endOffset());
      }
      ts.end();   // Perform end-of-stream operations, e.g. set the final offset.
    } finally {
      ts.close(); // Release resources associated with this stream.
    }

Indexing Analysis vs. Search Analysis

Selecting the "correct" analyzer is crucial for search quality, and can also affect indexing and search performance. The "correct" analyzer differs between applications. Lucene java's wiki page AnalysisParalysis provides some data on "analyzing your analyzer". Here are some rules of thumb:

  1. Test test test... (did we say test?)
  2. Beware of over analysis – might hurt indexing performance.
  3. Start with same analyzer for indexing and search, otherwise searches would not find what they are supposed to...
  4. In some cases a different analyzer is required for indexing and search, for instance:
    • Certain searches require more stop words to be filtered. (I.e. more than those that were filtered at indexing.)
    • Query expansion by synonyms, acronyms, auto spell correction, etc.
    This might sometimes require a modified analyzer – see the next section on how to do that.

Implementing your own Analyzer

Creating your own Analyzer is straightforward. Your Analyzer can wrap existing analysis components — CharFilter(s) (optional), a Tokenizer, and TokenFilter(s) (optional) — or components you create, or a combination of existing and newly created components. Before pursuing this approach, you may find it worthwhile to explore the contrib/analyzers library and/or ask on the java-user@lucene.apache.org mailing list first to see if what you need already exists. If you are still committed to creating your own Analyzer, have a look at the source code of any one of the many samples located in this package.

The following sections discuss some aspects of implementing your own analyzer.

Field Section Boundaries

When document.add(field) is called multiple times for the same field name, we could say that each such call creates a new section for that field in that document. In fact, a separate call to tokenStream(field,reader) would take place for each of these so called "sections". However, the default Analyzer behavior is to treat all these sections as one large section. This allows phrase search and proximity search to seamlessly cross boundaries between these "sections". In other words, if a certain field "f" is added like this:

    document.add(new Field("f","first ends",...);
    document.add(new Field("f","starts two",...);
    indexWriter.addDocument(document);

Then, a phrase search for "ends starts" would find that document. Where desired, this behavior can be modified by introducing a "position gap" between consecutive field "sections", simply by overriding Analyzer.getPositionIncrementGap(fieldName):

  Version matchVersion = Version.LUCENE_XY; // Substitute desired Lucene version for XY
  Analyzer myAnalyzer = new StandardAnalyzer(matchVersion) {
    public int getPositionIncrementGap(String fieldName) {
      return 10;
    }
  };

Token Position Increments

By default, all tokens created by Analyzers and Tokenizers have a position increment of one. This means that the position stored for that token in the index would be one more than that of the previous token. Recall that phrase and proximity searches rely on position info.

If the selected analyzer filters the stop words "is" and "the", then for a document containing the string "blue is the sky", only the tokens "blue", "sky" are indexed, with position("sky") = 1 + position("blue"). Now, a phrase query "blue is the sky" would find that document, because the same analyzer filters the same stop words from that query. But also the phrase query "blue sky" would find that document.

If this behavior does not fit the application needs, a modified analyzer can be used, that would increment further the positions of tokens following a removed stop word, using PositionIncrementAttribute.setPositionIncrement(int). This can be done with something like the following (note, however, that StopFilter natively includes this capability by subclassing FilteringTokenFilter):

  public TokenStream tokenStream(final String fieldName, Reader reader) {
    final TokenStream ts = someAnalyzer.tokenStream(fieldName, reader);
    TokenStream res = new TokenStream() {
      CharTermAttribute termAtt = addAttribute(CharTermAttribute.class);
      PositionIncrementAttribute posIncrAtt = addAttribute(PositionIncrementAttribute.class);

      public boolean incrementToken() throws IOException {
        int extraIncrement = 0;
        while (true) {
          boolean hasNext = ts.incrementToken();
          if (hasNext) {
            if (stopWords.contains(termAtt.toString())) {
              extraIncrement++; // filter this word
              continue;
            }
            if (extraIncrement>0) {
              posIncrAtt.setPositionIncrement(posIncrAtt.getPositionIncrement()+extraIncrement);
            }
          }
          return hasNext;
        }
      }
    };
    return res;
  }

Now, with this modified analyzer, the phrase query "blue sky" would find that document. But note that this is yet not a perfect solution, because any phrase query "blue w1 w2 sky" where both w1 and w2 are stop words would match that document.

A few more use cases for modifying position increments are:

  1. Inhibiting phrase and proximity matches in sentence boundaries – for this, a tokenizer that identifies a new sentence can add 1 to the position increment of the first token of the new sentence.
  2. Injecting synonyms – here, synonyms of a token should be added after that token, and their position increment should be set to 0. As result, all synonyms of a token would be considered to appear in exactly the same position as that token, and so would they be seen by phrase and proximity searches.

TokenStream API

"Flexible Indexing" summarizes the effort of making the Lucene indexer pluggable and extensible for custom index formats. A fully customizable indexer means that users will be able to store custom data structures on disk. Therefore an API is necessary that can transport custom types of data from the documents to the indexer.

Attribute and AttributeSource

Classes Attribute and AttributeSource serve as the basis upon which the analysis elements of "Flexible Indexing" are implemented. An Attribute holds a particular piece of information about a text token. For example, CharTermAttribute contains the term text of a token, and OffsetAttribute contains the start and end character offsets of a token. An AttributeSource is a collection of Attributes with a restriction: there may be only one instance of each attribute type. TokenStream now extends AttributeSource, which means that one can add Attributes to a TokenStream. Since TokenFilter extends TokenStream, all filters are also AttributeSources.

Lucene provides seven Attributes out of the box:

CharTermAttribute | The term text of a token. Implements CharSequence (providing methods length() and charAt(), and allowing e.g. for direct use with regular expression Matchers) and Appendable (allowing the term text to be appended to.)
OffsetAttribute | The start and end offset of a token in characters.
PositionIncrementAttribute | See above for detailed information about position increment.
PayloadAttribute | The payload that a Token can optionally have.
TypeAttribute | The type of the token. Default is 'word'.
FlagsAttribute | Optional flags a token can have.
KeywordAttribute | Keyword-aware TokenStreams/-Filters skip modification of tokens that return true from this attribute's isKeyword() method.

Using the TokenStream API

There are a few important things to know in order to use the new API efficiently which are summarized here. You may want to walk through the example below first and come back to this section afterwards.
  1. Please keep in mind that an AttributeSource can only have one instance of a particular Attribute. Furthermore, if a chain of a TokenStream and multiple TokenFilters is used, then all TokenFilters in that chain share the Attributes with the TokenStream.

  2. Attribute instances are reused for all tokens of a document. Thus, a TokenStream/-Filter needs to update the appropriate Attribute(s) in incrementToken(). The consumer, commonly the Lucene indexer, consumes the data in the Attributes and then calls incrementToken() again until it returns false, which indicates that the end of the stream was reached. This means that in each call of incrementToken() a TokenStream/-Filter can safely overwrite the data in the Attribute instances.

  3. For performance reasons a TokenStream/-Filter should add/get Attributes during instantiation; i.e., create an attribute in the constructor and store references to it in an instance variable. Using an instance variable instead of calling addAttribute()/getAttribute() in incrementToken() will avoid attribute lookups for every token in the document.

  4. All methods in AttributeSource are idempotent, which means calling them multiple times always yields the same result. This is especially important to know for addAttribute(). The method takes the type (Class) of an Attribute as an argument and returns an instance. If an Attribute of the same type was previously added, then the already existing instance is returned, otherwise a new instance is created and returned. Therefore TokenStreams/-Filters can safely call addAttribute() with the same Attribute type multiple times. Even consumers of TokenStreams should normally call addAttribute() instead of getAttribute(), because it would not fail if the TokenStream does not have this Attribute (getAttribute() would throw an IllegalArgumentException, if the Attribute is missing). More advanced code could simply check with hasAttribute(), if a TokenStream has it, and may conditionally leave out processing for extra performance.

Example

In this example we will create a WhiteSpaceTokenizer and use a LengthFilter to suppress all words that have only two or fewer characters. The LengthFilter is part of the Lucene core and its implementation will be explained here to illustrate the usage of the TokenStream API.

Then we will develop a custom Attribute, a PartOfSpeechAttribute, and add another filter to the chain which utilizes the new custom attribute, and call it PartOfSpeechTaggingFilter.

Whitespace tokenization

public class MyAnalyzer extends ReusableAnalyzerBase {

  private Version matchVersion;

  public MyAnalyzer(Version matchVersion) {
    this.matchVersion = matchVersion;
  }

  @Override
  protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
    return new TokenStreamComponents(new WhitespaceTokenizer(matchVersion, reader));
  }

  public static void main(String[] args) throws IOException {
    // text to tokenize
    final String text = "This is a demo of the TokenStream API";

    Version matchVersion = Version.LUCENE_XY; // Substitute desired Lucene version for XY
    MyAnalyzer analyzer = new MyAnalyzer(matchVersion);
    TokenStream stream = analyzer.tokenStream("field", new StringReader(text));

    // get the CharTermAttribute from the TokenStream
    CharTermAttribute termAtt = stream.addAttribute(CharTermAttribute.class);

    try {
      stream.reset();

      // print all tokens until stream is exhausted
      while (stream.incrementToken()) {
        System.out.println(termAtt.toString());
      }

      stream.end()
    } finally {
      stream.close();
    }
  }
}
In this easy example a simple white space tokenization is performed. In main() a loop consumes the stream and prints the term text of the tokens by accessing the CharTermAttribute that the WhitespaceTokenizer provides. Here is the output:
This
is
a
demo
of
the
new
TokenStream
API

Adding a LengthFilter

We want to suppress all tokens that have 2 or less characters. We can do that easily by adding a LengthFilter to the chain. Only the createComponents() method in our analyzer needs to be changed:
  @Override
  protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
    final Tokenizer source = new WhitespaceTokenizer(matchVersion, reader);
    TokenStream result = new LengthFilter(source, 3, Integer.MAX_VALUE);
    return new TokenStreamComponents(source, result);
  }
Note how now only words with 3 or more characters are contained in the output:
This
demo
the
new
TokenStream
API
Now let's take a look how the LengthFilter is implemented (it is part of Lucene's core):
public final class LengthFilter extends FilteringTokenFilter {

  private final int min;
  private final int max;

  private final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class);

  /**
   * Build a filter that removes words that are too long or too
   * short from the text.
   */
  public LengthFilter(boolean enablePositionIncrements, TokenStream in, int min, int max) {
    super(enablePositionIncrements, in);
    this.min = min;
    this.max = max;
  }

  /**
   * Build a filter that removes words that are too long or too
   * short from the text.
   * @deprecated Use {@link #LengthFilter(boolean, TokenStream, int, int)} instead.
   */
  @Deprecated
  public LengthFilter(TokenStream in, int min, int max) {
    this(false, in, min, max);
  }

  @Override
  public boolean accept() throws IOException {
    final int len = termAtt.length();
    return (len >= min && len <= max);
  }
}

In LengthFilter, the CharTermAttribute is added and stored in the instance variable termAtt. Remember that there can only be a single instance of CharTermAttribute in the chain, so in our example the addAttribute() call in LengthFilter returns the CharTermAttribute that the WhitespaceTokenizer already added.

The tokens are retrieved from the input stream in FilteringTokenFilter's incrementToken() method (see below), which calls LengthFilter's accept() method. By looking at the term text in the CharTermAttribute, the length of the term can be determined and tokens that are either too short or too long are skipped. Note how accept() can efficiently access the instance variable; no attribute lookup is neccessary. The same is true for the consumer, which can simply use local references to the Attributes.

LengthFilter extends FilteringTokenFilter:

public abstract class FilteringTokenFilter extends TokenFilter {

  private final PositionIncrementAttribute posIncrAtt = addAttribute(PositionIncrementAttribute.class);
  private boolean enablePositionIncrements; // no init needed, as ctor enforces setting value!

  public FilteringTokenFilter(boolean enablePositionIncrements, TokenStream input){
    super(input);
    this.enablePositionIncrements = enablePositionIncrements;
  }

  /** Override this method and return if the current input token should be returned by {@link #incrementToken}. */
  protected abstract boolean accept() throws IOException;

  @Override
  public final boolean incrementToken() throws IOException {
    if (enablePositionIncrements) {
      int skippedPositions = 0;
      while (input.incrementToken()) {
        if (accept()) {
          if (skippedPositions != 0) {
            posIncrAtt.setPositionIncrement(posIncrAtt.getPositionIncrement() + skippedPositions);
          }
          return true;
        }
        skippedPositions += posIncrAtt.getPositionIncrement();
      }
    } else {
      while (input.incrementToken()) {
        if (accept()) {
          return true;
        }
      }
    }
    // reached EOS -- return false
    return false;
  }

  /**
   * @see #setEnablePositionIncrements(boolean)
   */
  public boolean getEnablePositionIncrements() {
    return enablePositionIncrements;
  }

  /**
   * If true, this TokenFilter will preserve
   * positions of the incoming tokens (ie, accumulate and
   * set position increments of the removed tokens).
   * Generally, true is best as it does not
   * lose information (positions of the original tokens)
   * during indexing.
   *
   *
 When set, when a token is stopped
   * (omitted), the position increment of the following
   * token is incremented.
   *
   *
 NOTE: be sure to also
   * set {@link QueryParser#setEnablePositionIncrements} if
   * you use QueryParser to create queries.
   */
  public void setEnablePositionIncrements(boolean enable) {
    this.enablePositionIncrements = enable;
  }
}

Adding a custom Attribute

Now we're going to implement our own custom Attribute for part-of-speech tagging and call it consequently PartOfSpeechAttribute. First we need to define the interface of the new Attribute:
  public interface PartOfSpeechAttribute extends Attribute {
    public static enum PartOfSpeech {
      Noun, Verb, Adjective, Adverb, Pronoun, Preposition, Conjunction, Article, Unknown
    }

    public void setPartOfSpeech(PartOfSpeech pos);

    public PartOfSpeech getPartOfSpeech();
  }

Now we also need to write the implementing class. The name of that class is important here: By default, Lucene checks if there is a class with the name of the Attribute with the suffix 'Impl'. In this example, we would consequently call the implementing class PartOfSpeechAttributeImpl.

This should be the usual behavior. However, there is also an expert-API that allows changing these naming conventions: AttributeSource.AttributeFactory. The factory accepts an Attribute interface as argument and returns an actual instance. You can implement your own factory if you need to change the default behavior.

Now here is the actual class that implements our new Attribute. Notice that the class has to extend AttributeImpl:

public final class PartOfSpeechAttributeImpl extends AttributeImpl
                                  implements PartOfSpeechAttribute {

  private PartOfSpeech pos = PartOfSpeech.Unknown;

  public void setPartOfSpeech(PartOfSpeech pos) {
    this.pos = pos;
  }

  public PartOfSpeech getPartOfSpeech() {
    return pos;
  }

  @Override
  public void clear() {
    pos = PartOfSpeech.Unknown;
  }

  @Override
  public void copyTo(AttributeImpl target) {
    ((PartOfSpeechAttribute) target).setPartOfSpeech(pos);
  }
}

This is a simple Attribute implementation has only a single variable that stores the part-of-speech of a token. It extends the AttributeImpl class and therefore implements its abstract methods clear() and copyTo(). Now we need a TokenFilter that can set this new PartOfSpeechAttribute for each token. In this example we show a very naive filter that tags every word with a leading upper-case letter as a 'Noun' and all other words as 'Unknown'.

  public static class PartOfSpeechTaggingFilter extends TokenFilter {
    PartOfSpeechAttribute posAtt = addAttribute(PartOfSpeechAttribute.class);
    CharTermAttribute termAtt = addAttribute(CharTermAttribute.class);

    protected PartOfSpeechTaggingFilter(TokenStream input) {
      super(input);
    }

    public boolean incrementToken() throws IOException {
      if (!input.incrementToken()) {return false;}
      posAtt.setPartOfSpeech(determinePOS(termAtt.buffer(), 0, termAtt.length()));
      return true;
    }

    // determine the part of speech for the given term
    protected PartOfSpeech determinePOS(char[] term, int offset, int length) {
      // naive implementation that tags every uppercased word as noun
      if (length > 0 && Character.isUpperCase(term[0])) {
        return PartOfSpeech.Noun;
      }
      return PartOfSpeech.Unknown;
    }
  }

Just like the LengthFilter, this new filter stores references to the attributes it needs in instance variables. Notice how you only need to pass in the interface of the new Attribute and instantiating the correct class is automatically taken care of.

Now we need to add the filter to the chain in MyAnalyzer:

  @Override
  protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
    final Tokenizer source = new WhitespaceTokenizer(matchVersion, reader);
    TokenStream result = new LengthFilter(source, 3, Integer.MAX_VALUE);
    result = new PartOfSpeechTaggingFilter(result);
    return new TokenStreamComponents(source, result);
  }
Now let's look at the output:
This
demo
the
new
TokenStream
API
Apparently it hasn't changed, which shows that adding a custom attribute to a TokenStream/Filter chain does not affect any existing consumers, simply because they don't know the new Attribute. Now let's change the consumer to make use of the new PartOfSpeechAttribute and print it out:
  public static void main(String[] args) throws IOException {
    // text to tokenize
    final String text = "This is a demo of the TokenStream API";

    MyAnalyzer analyzer = new MyAnalyzer();
    TokenStream stream = analyzer.tokenStream("field", new StringReader(text));

    // get the CharTermAttribute from the TokenStream
    CharTermAttribute termAtt = stream.addAttribute(CharTermAttribute.class);

    // get the PartOfSpeechAttribute from the TokenStream
    PartOfSpeechAttribute posAtt = stream.addAttribute(PartOfSpeechAttribute.class);

    try {
      stream.reset();

      // print all tokens until stream is exhausted
      while (stream.incrementToken()) {
        System.out.println(termAtt.toString() + ": " + posAtt.getPartOfSpeech());
      }

      stream.end();
    } finally {
      stream.close();
    }
  }
The change that was made is to get the PartOfSpeechAttribute from the TokenStream and print out its contents in the while loop that consumes the stream. Here is the new output:
This: Noun
demo: Unknown
the: Unknown
new: Unknown
TokenStream: Noun
API: Noun
Each word is now followed by its assigned PartOfSpeech tag. Of course this is a naive part-of-speech tagging. The word 'This' should not even be tagged as noun; it is only spelled capitalized because it is the first word of a sentence. Actually this is a good opportunity for an excerise. To practice the usage of the new API the reader could now write an Attribute and TokenFilter that can specify for each word if it was the first token of a sentence or not. Then the PartOfSpeechTaggingFilter can make use of this knowledge and only tag capitalized words as nouns if not the first word of a sentence (we know, this is still not a correct behavior, but hey, it's a good exercise). As a small hint, this is how the new Attribute class could begin:
  public class FirstTokenOfSentenceAttributeImpl extends AttributeImpl
                              implements FirstTokenOfSentenceAttribute {

    private boolean firstToken;

    public void setFirstToken(boolean firstToken) {
      this.firstToken = firstToken;
    }

    public boolean getFirstToken() {
      return firstToken;
    }

    @Override
    public void clear() {
      firstToken = false;
    }

  ...

Overview Package Class Use Tree Deprecated Index Help


org.apache.lucene.analysis Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • java.util.AbstractCollection<E> (implements java.util.Collection<E>)
      • java.util.AbstractSet<E> (implements java.util.Set<E>)
        • org.apache.lucene.analysis.CharArrayMap.EntrySet
        • org.apache.lucene.analysis.CharArraySet
    • java.util.AbstractMap<K,V> (implements java.util.Map<K,V>)
      • org.apache.lucene.analysis.CharArrayMap<V>
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.LimitTokenCountAnalyzer
      • org.apache.lucene.analysis.MockAnalyzer
      • org.apache.lucene.analysis.PerFieldAnalyzerWrapper
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.KeywordAnalyzer
        • org.apache.lucene.analysis.SimpleAnalyzer
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.StopAnalyzer
        • org.apache.lucene.analysis.WhitespaceAnalyzer
    • org.junit.Assert
      • org.apache.lucene.util.LuceneTestCase
        • org.apache.lucene.analysis.BaseTokenStreamTestCase
        • org.apache.lucene.analysis.CollationTestBase
    • org.apache.lucene.util.AttributeImpl (implements org.apache.lucene.util.Attribute, java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl (implements org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttribute)
      • org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl (implements org.apache.lucene.analysis.tokenattributes.CharTermAttribute, java.lang.Cloneable, java.io.Serializable, org.apache.lucene.analysis.tokenattributes.TermAttribute)
        • org.apache.lucene.analysis.tokenattributes.TermAttributeImpl
          • org.apache.lucene.analysis.Token (implements org.apache.lucene.analysis.tokenattributes.FlagsAttribute, org.apache.lucene.analysis.tokenattributes.OffsetAttribute, org.apache.lucene.analysis.tokenattributes.PayloadAttribute, org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute, org.apache.lucene.analysis.tokenattributes.PositionLengthAttribute, org.apache.lucene.analysis.tokenattributes.TypeAttribute)
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.CannedTokenStream
        • org.apache.lucene.analysis.NumericTokenStream
        • org.apache.lucene.analysis.TeeSinkTokenFilter.SinkTokenStream
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.ASCIIFoldingFilter
          • org.apache.lucene.analysis.CachingTokenFilter
          • org.apache.lucene.analysis.FilteringTokenFilter
            • org.apache.lucene.analysis.LengthFilter
            • org.apache.lucene.analysis.StopFilter
            • org.apache.lucene.analysis.TypeTokenFilter
          • org.apache.lucene.analysis.ISOLatin1AccentFilter
          • org.apache.lucene.analysis.KeywordMarkerFilter
          • org.apache.lucene.analysis.LimitTokenCountFilter
          • org.apache.lucene.analysis.LookaheadTokenFilter<T>
            • org.apache.lucene.analysis.MockGraphTokenFilter
            • org.apache.lucene.analysis.MockRandomLookaheadTokenFilter
          • org.apache.lucene.analysis.LowerCaseFilter
          • org.apache.lucene.analysis.MockFixedLengthPayloadFilter
          • org.apache.lucene.analysis.MockHoleInjectingTokenFilter
          • org.apache.lucene.analysis.MockVariableLengthPayloadFilter
          • org.apache.lucene.analysis.PorterStemFilter
          • org.apache.lucene.analysis.TeeSinkTokenFilter
          • org.apache.lucene.analysis.ValidatingTokenFilter
        • org.apache.lucene.analysis.Tokenizer
          • org.apache.lucene.analysis.CharTokenizer
            • org.apache.lucene.analysis.LetterTokenizer
              • org.apache.lucene.analysis.LowerCaseTokenizer
            • org.apache.lucene.analysis.WhitespaceTokenizer
          • org.apache.lucene.analysis.EmptyTokenizer
          • org.apache.lucene.analysis.KeywordTokenizer
          • org.apache.lucene.analysis.MockTokenizer
    • org.apache.lucene.util.AttributeSource.AttributeFactory
      • org.apache.lucene.analysis.Token.TokenAttributeFactory
    • org.apache.lucene.analysis.CharArrayMap.EntryIterator (implements java.util.Iterator<E>)
    • org.apache.lucene.analysis.CharArraySet.CharArraySetIterator (implements java.util.Iterator<E>)
    • org.apache.lucene.analysis.LookaheadTokenFilter.Position (implements org.apache.lucene.util.RollingBuffer.Resettable)
    • org.apache.lucene.analysis.NormalizeCharMap
    • java.io.Reader (implements java.io.Closeable, java.lang.Readable)
      • org.apache.lucene.analysis.CharStream
        • org.apache.lucene.analysis.CharFilter
          • org.apache.lucene.analysis.BaseCharFilter
            • org.apache.lucene.analysis.MappingCharFilter
        • org.apache.lucene.analysis.CharReader
        • org.apache.lucene.analysis.MockCharFilter
      • org.apache.lucene.analysis.MockReaderWrapper
    • org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents
    • org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter
    • org.apache.lucene.analysis.TokenStreamToDot
    • org.apache.lucene.analysis.VocabularyAssert
    • org.apache.lucene.analysis.WordlistLoader

Interface Hierarchy

  • org.apache.lucene.util.Attribute
    • org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttribute


Uses of Package org.apache.lucene.analysis

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis

Packages that use org.apache.lucene.analysis
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ar | Analyzer for Arabic.
org.apache.lucene.analysis.bg | Analyzer for Bulgarian.
org.apache.lucene.analysis.br | Analyzer for Brazilian Portuguese.
org.apache.lucene.analysis.ca | Analyzer for Catalan.
org.apache.lucene.analysis.charfilter | CharFilters: process text before the Tokenizer
org.apache.lucene.analysis.cjk | Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).
org.apache.lucene.analysis.cn | Analyzer for Chinese, which indexes unigrams (individual chinese characters).
org.apache.lucene.analysis.cn.smart | Analyzer for Simplified Chinese, which indexes words.
org.apache.lucene.analysis.compound | A filter that decomposes compound words you find in many Germanic languages into the word parts.
org.apache.lucene.analysis.cz | Analyzer for Czech.
org.apache.lucene.analysis.da | Analyzer for Danish.
org.apache.lucene.analysis.de | Analyzer for German.
org.apache.lucene.analysis.el | Analyzer for Greek.
org.apache.lucene.analysis.en | Analyzer for English.
org.apache.lucene.analysis.es | Analyzer for Spanish.
org.apache.lucene.analysis.eu | Analyzer for Basque.
org.apache.lucene.analysis.fa | Analyzer for Persian.
org.apache.lucene.analysis.fi | Analyzer for Finnish.
org.apache.lucene.analysis.fr | Analyzer for French.
org.apache.lucene.analysis.ga | Analysis for Irish.
org.apache.lucene.analysis.gl | Analyzer for Galician.
org.apache.lucene.analysis.hi | Analyzer for Hindi.
org.apache.lucene.analysis.hu | Analyzer for Hungarian.
org.apache.lucene.analysis.hunspell | Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.
org.apache.lucene.analysis.hy | Analyzer for Armenian.
org.apache.lucene.analysis.icu | Analysis components based on ICU
org.apache.lucene.analysis.icu.segmentation | Tokenizer that breaks text into words with the Unicode Text Segmentation algorithm.
org.apache.lucene.analysis.id | Analyzer for Indonesian.
org.apache.lucene.analysis.in | Analysis components for Indian languages.
org.apache.lucene.analysis.it | Analyzer for Italian.
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.lv | Analyzer for Latvian.
org.apache.lucene.analysis.miscellaneous | Miscellaneous TokenStreams
org.apache.lucene.analysis.ngram | Character n-gram tokenizers and filters.
org.apache.lucene.analysis.nl | Analyzer for Dutch.
org.apache.lucene.analysis.no | Analyzer for Norwegian.
org.apache.lucene.analysis.path | Analysis components for path-like strings such as filenames.
org.apache.lucene.analysis.payloads | Provides various convenience classes for creating payloads on Tokens.
org.apache.lucene.analysis.phonetic | Analysis components for phonetic search.
org.apache.lucene.analysis.pl | Analyzer for Polish.
org.apache.lucene.analysis.position | Filter for assigning position increments.
org.apache.lucene.analysis.pt | Analyzer for Portuguese.
org.apache.lucene.analysis.query | Automatically filter high-frequency stopwords.
org.apache.lucene.analysis.reverse | Filter to reverse token text.
org.apache.lucene.analysis.ro | Analyzer for Romanian.
org.apache.lucene.analysis.ru | Analyzer for Russian.
org.apache.lucene.analysis.shingle | Word n-gram filters
org.apache.lucene.analysis.sinks | Implementations of the SinkTokenizer that might be useful.
org.apache.lucene.analysis.snowball | TokenFilter and Analyzer implementations that use Snowball stemmers.
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.stempel | Stempel: Algorithmic Stemmer
org.apache.lucene.analysis.sv | Analyzer for Swedish.
org.apache.lucene.analysis.synonym | Analysis components for Synonyms.
org.apache.lucene.analysis.th | Analyzer for Thai.
org.apache.lucene.analysis.tr | Analyzer for Turkish.
org.apache.lucene.analysis.wikipedia | Tokenizer that is aware of Wikipedia syntax.
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.collation | CollationKeyFilter converts each token into its binary CollationKey using the provided Collator, and then encode the CollationKey as a String using IndexableBinaryStringTools, to allow it to be stored as an index term.
org.apache.lucene.document | The logical representation of a Document for indexing and searching.
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.memory | High-performance single-document main memory Apache Lucene fulltext search index.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.analyzing | QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.
org.apache.lucene.queryParser.complexPhrase | QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
org.apache.lucene.queryParser.ext | Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.
org.apache.lucene.queryParser.precedence | This package contains the Precedence Query Parser Implementation
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.search.similar | Document similarity query generators.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.
org.apache.lucene.util | Some utility classes.
org.apache.lucene.xmlparser | Parser that produces Lucene Query objects from XML streams.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis
Analyzer
An Analyzer builds TokenStreams, which analyze text.
BaseCharFilter
Base utility class for implementing a CharFilter.
BaseTokenStreamTestCase.CheckClearAttributesAttribute
Attribute that records if it was cleared or not.
CharArrayMap
A simple class that stores key Strings as char[]'s in a hash table.
CharArrayMap.EntryIterator
public iterator class so efficient methods are exposed to users
CharArrayMap.EntrySet
public EntrySet class so efficient methods are exposed to users
CharArraySet
A simple class that stores Strings as char[]'s in a hash table.
CharFilter
Subclasses of CharFilter can be chained to filter CharStream.
CharStream
CharStream adds CharStream.correctOffset(int) functionality over Reader.
CharTokenizer
An abstract base class for simple, character-oriented tokenizers.
FilteringTokenFilter
Abstract base class for TokenFilters that may remove tokens.
LetterTokenizer
A LetterTokenizer is a tokenizer that divides text at non-letters.
LookaheadTokenFilter
An abstract TokenFilter to make it easier to build graph token filters requiring some lookahead.
LookaheadTokenFilter.Position
Holds all state for a single position; subclass this to record other state at each position.
NormalizeCharMap
Holds a map of String input to String output, to be used with MappingCharFilter.
NumericTokenStream
Expert: This class provides a TokenStream for indexing numeric values that can be used by NumericRangeQuery or NumericRangeFilter.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TeeSinkTokenFilter.SinkFilter
A filter that decides which AttributeSource states to store in the sink.
TeeSinkTokenFilter.SinkTokenStream
TokenStream output from a tee with optional filtering.
Token
A Token is an occurrence of a term from the text of a field.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
Tokenizer
A Tokenizer is a TokenStream whose input is a Reader.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.ar
Analyzer
An Analyzer builds TokenStreams, which analyze text.
CharTokenizer
An abstract base class for simple, character-oriented tokenizers.
LetterTokenizer
A LetterTokenizer is a tokenizer that divides text at non-letters.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
Tokenizer
A Tokenizer is a TokenStream whose input is a Reader.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.bg
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.br
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.ca
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.charfilter
BaseCharFilter
Base utility class for implementing a CharFilter.
CharFilter
Subclasses of CharFilter can be chained to filter CharStream.
CharStream
CharStream adds CharStream.correctOffset(int) functionality over Reader.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.cjk
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
Tokenizer
A Tokenizer is a TokenStream whose input is a Reader.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.cn
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
Tokenizer
A Tokenizer is a TokenStream whose input is a Reader.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.cn.smart
Analyzer
An Analyzer builds TokenStreams, which analyze text.
CharArraySet
A simple class that stores Strings as char[]'s in a hash table.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
Tokenizer
A Tokenizer is a TokenStream whose input is a Reader.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.compound
CharArraySet
A simple class that stores Strings as char[]'s in a hash table.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.cz
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.da
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.de
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.el
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.en
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.es
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.eu
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.fa
Analyzer
An Analyzer builds TokenStreams, which analyze text.
CharFilter
Subclasses of CharFilter can be chained to filter CharStream.
CharStream
CharStream adds CharStream.correctOffset(int) functionality over Reader.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.fi
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.fr
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.ga
Analyzer
An Analyzer builds TokenStreams, which analyze text.
CharArraySet
A simple class that stores Strings as char[]'s in a hash table.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.gl
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.hi
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.hu
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.hunspell
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.hy
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.icu
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.icu.segmentation
Tokenizer
A Tokenizer is a TokenStream whose input is a Reader.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.id
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.in
CharTokenizer
An abstract base class for simple, character-oriented tokenizers.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
Tokenizer
A Tokenizer is a TokenStream whose input is a Reader.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.it
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.ja
Analyzer
An Analyzer builds TokenStreams, which analyze text.
CharArraySet
A simple class that stores Strings as char[]'s in a hash table.
FilteringTokenFilter
Abstract base class for TokenFilters that may remove tokens.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
Tokenizer
A Tokenizer is a TokenStream whose input is a Reader.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.lv
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.miscellaneous
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
Token
A Token is an occurrence of a term from the text of a field.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.ngram
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
Tokenizer
A Tokenizer is a TokenStream whose input is a Reader.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.nl
Analyzer
An Analyzer builds TokenStreams, which analyze text.
CharArrayMap
A simple class that stores key Strings as char[]'s in a hash table.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.no
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.path
Tokenizer
A Tokenizer is a TokenStream whose input is a Reader.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.payloads
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.phonetic
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.pl
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.position
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.pt
Analyzer
An Analyzer builds TokenStreams, which analyze text.
CharArraySet
A simple class that stores Strings as char[]'s in a hash table.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.query
Analyzer
An Analyzer builds TokenStreams, which analyze text.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.reverse
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.ro
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.ru
Analyzer
An Analyzer builds TokenStreams, which analyze text.
CharTokenizer
An abstract base class for simple, character-oriented tokenizers.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
Tokenizer
A Tokenizer is a TokenStream whose input is a Reader.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.shingle
Analyzer
An Analyzer builds TokenStreams, which analyze text.
Token
A Token is an occurrence of a term from the text of a field.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.sinks
TeeSinkTokenFilter.SinkFilter
A filter that decides which AttributeSource states to store in the sink.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.snowball
Analyzer
An Analyzer builds TokenStreams, which analyze text.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.standard
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
Tokenizer
A Tokenizer is a TokenStream whose input is a Reader.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.stempel
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.sv
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.synonym
Analyzer
An Analyzer builds TokenStreams, which analyze text.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.th
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.tr
Analyzer
An Analyzer builds TokenStreams, which analyze text.
ReusableAnalyzerBase
An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
StopwordAnalyzerBase
Base class for Analyzers that need to make use of stopword sets.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.analysis.wikipedia
Tokenizer
A Tokenizer is a TokenStream whose input is a Reader.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.benchmark.byTask
Analyzer
An Analyzer builds TokenStreams, which analyze text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.benchmark.byTask.tasks
Analyzer
An Analyzer builds TokenStreams, which analyze text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.collation
Analyzer
An Analyzer builds TokenStreams, which analyze text.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.document
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.facet.enhancements
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.facet.enhancements.association
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.facet.index
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.facet.index.streaming
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.index
Analyzer
An Analyzer builds TokenStreams, which analyze text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.index.memory
Analyzer
An Analyzer builds TokenStreams, which analyze text.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.queryParser
Analyzer
An Analyzer builds TokenStreams, which analyze text.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.queryParser.analyzing
Analyzer
An Analyzer builds TokenStreams, which analyze text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.queryParser.complexPhrase
Analyzer
An Analyzer builds TokenStreams, which analyze text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.queryParser.ext
Analyzer
An Analyzer builds TokenStreams, which analyze text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.queryParser.precedence
Analyzer
An Analyzer builds TokenStreams, which analyze text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.queryParser.standard
Analyzer
An Analyzer builds TokenStreams, which analyze text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.queryParser.standard.config
Analyzer
An Analyzer builds TokenStreams, which analyze text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.search
Analyzer
An Analyzer builds TokenStreams, which analyze text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.search.highlight
Analyzer
An Analyzer builds TokenStreams, which analyze text.
Token
A Token is an occurrence of a term from the text of a field.
TokenFilter
A TokenFilter is a TokenStream whose input is another TokenStream.
TokenStream
A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.search.similar
Analyzer
An Analyzer builds TokenStreams, which analyze text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.store.instantiated
Analyzer
An Analyzer builds TokenStreams, which analyze text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.util
Analyzer
An Analyzer builds TokenStreams, which analyze text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.xmlparser
Analyzer
An Analyzer builds TokenStreams, which analyze text.

Classes in org.apache.lucene.analysis used by org.apache.lucene.xmlparser.builders
Analyzer
An Analyzer builds TokenStreams, which analyze text.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PerFieldAnalyzerWrapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class PerFieldAnalyzerWrapper

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.PerFieldAnalyzerWrapper
All Implemented Interfaces:
Closeable
public final class PerFieldAnalyzerWrapper
extends Analyzer

This analyzer is used to facilitate scenarios where different fields require different analysis techniques. Use the Map argument in PerFieldAnalyzerWrapper(Analyzer, java.util.Map) to add non-default analyzers for fields.

Example usage:

   Map analyzerPerField = new HashMap();
   analyzerPerField.put("firstname", new KeywordAnalyzer());
   analyzerPerField.put("lastname", new KeywordAnalyzer());

   PerFieldAnalyzerWrapper aWrapper =
      new PerFieldAnalyzerWrapper(new StandardAnalyzer(), analyzerPerField);

In this example, StandardAnalyzer will be used for all fields except "firstname" and "lastname", for which KeywordAnalyzer will be used.

A PerFieldAnalyzerWrapper can be used like any other analyzer, for both indexing and query parsing.

Constructor Summary
PerFieldAnalyzerWrapper(Analyzer defaultAnalyzer)
Constructs with default analyzer.
PerFieldAnalyzerWrapper(Analyzer defaultAnalyzer, Map<String,Analyzer> fieldAnalyzers)
Constructs with default analyzer and a map of analyzers to use for specific fields.
Method Summary
void | addAnalyzer(String fieldName, Analyzer analyzer) Deprecated. Changing the Analyzer for a field after instantiation prevents reusability. Analyzers for fields should be set during construction.
int | getOffsetGap(Fieldable field) Return the offsetGap from the analyzer assigned to field
int | getPositionIncrementGap(String fieldName) Return the positionIncrementGap from the analyzer assigned to fieldName
TokenStream | reusableTokenStream(String fieldName, Reader reader) Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method.
TokenStream | tokenStream(String fieldName, Reader reader) Creates a TokenStream which tokenizes all the text in the provided Reader.
String | toString()
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PerFieldAnalyzerWrapper

public PerFieldAnalyzerWrapper(Analyzer defaultAnalyzer)
Constructs with default analyzer.

Parameters:
defaultAnalyzer - Any fields not specifically defined to use a different analyzer will use the one provided here.

PerFieldAnalyzerWrapper

public PerFieldAnalyzerWrapper(Analyzer defaultAnalyzer,
                               Map<String,Analyzer> fieldAnalyzers)
Constructs with default analyzer and a map of analyzers to use for specific fields.

Parameters:
defaultAnalyzer - Any fields not specifically defined to use a different analyzer will use the one provided here.
fieldAnalyzers - a Map (String field name to the Analyzer) to be used for those fields
Method Detail

addAnalyzer

@Deprecated
public void addAnalyzer(String fieldName,
                                   Analyzer analyzer)
Deprecated. Changing the Analyzer for a field after instantiation prevents reusability. Analyzers for fields should be set during construction.

Defines an analyzer to use for the specified field.

Parameters:
fieldName - field name requiring a non-default analyzer
analyzer - non-default analyzer to use for field

tokenStream

public TokenStream tokenStream(String fieldName,
                               Reader reader)
Description copied from class: Analyzer
Creates a TokenStream which tokenizes all the text in the provided Reader. Must be able to handle null field name for backward compatibility.

Specified by:
tokenStream in class Analyzer

reusableTokenStream

public TokenStream reusableTokenStream(String fieldName,
                                       Reader reader)
                                throws IOException
Description copied from class: Analyzer
Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method. Callers that do not need to use more than one TokenStream at the same time from this analyzer should use this method for better performance.

Overrides:
reusableTokenStream in class Analyzer
Throws:
IOException

getPositionIncrementGap

public int getPositionIncrementGap(String fieldName)
Return the positionIncrementGap from the analyzer assigned to fieldName

Overrides:
getPositionIncrementGap in class Analyzer
Parameters:
fieldName - Fieldable name being indexed.
Returns:
position increment gap, added to the next token emitted from Analyzer.tokenStream(String,Reader)

getOffsetGap

public int getOffsetGap(Fieldable field)
Return the offsetGap from the analyzer assigned to field

Overrides:
getOffsetGap in class Analyzer
Parameters:
field - the field just indexed
Returns:
offset gap, added to the next token emitted from Analyzer.tokenStream(String,Reader)

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PorterStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class PorterStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.PorterStemFilter
All Implemented Interfaces:
Closeable
public final class PorterStemFilter
extends TokenFilter

Transforms the token stream as per the Porter stemming algorithm. Note: the input to the stemming filter must already be in lower case, so you will need to use LowerCaseFilter or LowerCaseTokenizer farther down the Tokenizer chain in order for this to work properly!

To use this filter with other analyzers, you'll want to write an Analyzer class that sets up the TokenStream chain as you want it. To use this with LowerCaseTokenizer, for example, you'd write an analyzer like this:

    class MyAnalyzer extends Analyzer {
      public final TokenStream tokenStream(String fieldName, Reader reader) {
        return new PorterStemFilter(new LowerCaseTokenizer(reader));
      }
    }

Note: This filter is aware of the KeywordAttribute. To prevent certain terms from being passed to the stemmer KeywordAttribute.isKeyword() should be set to true in a previous TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
PorterStemFilter(TokenStream in)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PorterStemFilter

public PorterStemFilter(TokenStream in)
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReusableAnalyzerBase

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class ReusableAnalyzerBase

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
ChineseAnalyzer, CzechAnalyzer, DutchAnalyzer, KeywordAnalyzer, PatternAnalyzer, SimpleAnalyzer, StopwordAnalyzerBase, WhitespaceAnalyzer
public abstract class ReusableAnalyzerBase
extends Analyzer

An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.

ReusableAnalyzerBase is a simplification of Analyzer that supports easy reuse for the most common use-cases. Analyzers such as PerFieldAnalyzerWrapper that behave differently depending upon the field name need to subclass Analyzer directly instead.

To prevent consistency problems, this class does not allow subclasses to
extend reusableTokenStream(String, Reader) or
tokenStream(String, Reader) directly. Instead, subclasses must
implement createComponents(String, Reader).

Nested Class Summary
static class ReusableAnalyzerBase.TokenStreamComponents
This class encapsulates the outer components of a token stream.
Constructor Summary
ReusableAnalyzerBase()
Method Summary
protected abstract  ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.
protected  Reader initReader(Reader reader)
Override this if you want to add a CharFilter chain.
 TokenStream reusableTokenStream(String fieldName, Reader reader)
This method uses createComponents(String, Reader) to obtain an instance of ReusableAnalyzerBase.TokenStreamComponents.
 TokenStream tokenStream(String fieldName, Reader reader)
This method uses createComponents(String, Reader) to obtain an instance of ReusableAnalyzerBase.TokenStreamComponents and returns the sink of the components.
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ReusableAnalyzerBase

public ReusableAnalyzerBase()
Method Detail

createComponents

protected abstract ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                               Reader reader)
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.

Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
the ReusableAnalyzerBase.TokenStreamComponents for this analyzer.

reusableTokenStream

public final TokenStream reusableTokenStream(String fieldName,
                                             Reader reader)
                                      throws IOException
This method uses createComponents(String, Reader) to obtain an instance of ReusableAnalyzerBase.TokenStreamComponents. It returns the sink of the components and stores the components internally. Subsequent calls to this method will reuse the previously stored components if and only if the ReusableAnalyzerBase.TokenStreamComponents.reset(Reader) method returned true. Otherwise a new instance of ReusableAnalyzerBase.TokenStreamComponents is created.

Overrides:
reusableTokenStream in class Analyzer
Parameters:
fieldName - the name of the field the created TokenStream is used for
reader - the reader the streams source reads from
Throws:
IOException

tokenStream

public final TokenStream tokenStream(String fieldName,
                                     Reader reader)
This method uses createComponents(String, Reader) to obtain an instance of ReusableAnalyzerBase.TokenStreamComponents and returns the sink of the components. Each calls to this method will create a new instance of ReusableAnalyzerBase.TokenStreamComponents. Created TokenStream instances are never reused.

Specified by:
tokenStream in class Analyzer
Parameters:
fieldName - the name of the field the created TokenStream is used for
reader - the reader the streams source reads from

initReader

protected Reader initReader(Reader reader)
Override this if you want to add a CharFilter chain.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReusableAnalyzerBase.TokenStreamComponents

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class ReusableAnalyzerBase.TokenStreamComponents

java.lang.Object
    extended by  org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents
Enclosing class:
ReusableAnalyzerBase
public static class ReusableAnalyzerBase.TokenStreamComponents
extends Object

This class encapsulates the outer components of a token stream. It provides access to the source (Tokenizer) and the outer end (sink), an instance of TokenFilter which also serves as the TokenStream returned by Analyzer.tokenStream(String, Reader) and Analyzer.reusableTokenStream(String, Reader).

Field Summary
protected TokenStream | sink
protected Tokenizer | source
Constructor Summary
ReusableAnalyzerBase.TokenStreamComponents(Tokenizer source)
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance.
ReusableAnalyzerBase.TokenStreamComponents(Tokenizer source, TokenStream result)
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance.
Method Summary
protected TokenStream | getTokenStream() Returns the sink TokenStream
protected boolean | reset(Reader reader) Resets the encapsulated components with the given reader.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

source

protected final Tokenizer source

sink

protected final TokenStream sink
Constructor Detail

ReusableAnalyzerBase.TokenStreamComponents

public ReusableAnalyzerBase.TokenStreamComponents(Tokenizer source,
                                                  TokenStream result)
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance.

Parameters:
source - the analyzer's tokenizer
result - the analyzer's resulting token stream

ReusableAnalyzerBase.TokenStreamComponents

public ReusableAnalyzerBase.TokenStreamComponents(Tokenizer source)
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance.

Parameters:
source - the analyzer's tokenizer
Method Detail

reset

protected boolean reset(Reader reader)
                 throws IOException
Resets the encapsulated components with the given reader. This method by default returns true indicating that the components have been reset successfully. Subclasses of ReusableAnalyzerBase might use their own ReusableAnalyzerBase.TokenStreamComponents returning false if the components cannot be reset.

Parameters:
reader - a reader to reset the source component
Returns:
true if the components were reset, otherwise false
Throws:
IOException - if the component's reset method throws an IOException

getTokenStream

protected TokenStream getTokenStream()
Returns the sink TokenStream

Returns:
the sink TokenStream
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleAnalyzer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class SimpleAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.SimpleAnalyzer
All Implemented Interfaces:
Closeable
public final class SimpleAnalyzer
extends ReusableAnalyzerBase

An Analyzer that filters LetterTokenizer with LowerCaseFilter

You must specify the required Version compatibility when creating CharTokenizer:

  • As of 3.1, LowerCaseTokenizer uses an int based API to normalize and detect token codepoints. See CharTokenizer.isTokenChar(int) and CharTokenizer.normalize(int) for details.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Constructor Summary
SimpleAnalyzer()
Deprecated. use SimpleAnalyzer(Version) instead
SimpleAnalyzer(Version matchVersion)
Creates a new SimpleAnalyzer
Method Summary
protected  ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SimpleAnalyzer

public SimpleAnalyzer(Version matchVersion)
Creates a new SimpleAnalyzer

Parameters:
matchVersion - Lucene version to match See above

SimpleAnalyzer

@Deprecated
public SimpleAnalyzer()
Deprecated. use SimpleAnalyzer(Version) instead

Creates a new SimpleAnalyzer

Method Detail

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Description copied from class: ReusableAnalyzerBase
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
the ReusableAnalyzerBase.TokenStreamComponents for this analyzer.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StopAnalyzer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class StopAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.StopAnalyzer
All Implemented Interfaces:
Closeable
public final class StopAnalyzer
extends StopwordAnalyzerBase

Filters LetterTokenizer with LowerCaseFilter and StopFilter.

You must specify the required Version compatibility when creating StopAnalyzer:

  • As of 3.1, StopFilter correctly handles Unicode 4.0 supplementary characters in stopwords
  • As of 2.9, position increments are preserved

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static Set<?> ENGLISH_STOP_WORDS_SET
An unmodifiable set containing some common English words that are not usually useful for searching.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
StopAnalyzer(Version matchVersion)
Builds an analyzer which removes words in ENGLISH_STOP_WORDS_SET.
StopAnalyzer(Version matchVersion, File stopwordsFile)
Builds an analyzer with the stop words from the given file.
StopAnalyzer(Version matchVersion, Reader stopwords)
Builds an analyzer with the stop words from the given reader.
StopAnalyzer(Version matchVersion, Set<?> stopWords)
Builds an analyzer with the stop words from the given set.
Method Summary
protected  ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

ENGLISH_STOP_WORDS_SET

public static final Set<?> ENGLISH_STOP_WORDS_SET
An unmodifiable set containing some common English words that are not usually useful for searching.

Constructor Detail

StopAnalyzer

public StopAnalyzer(Version matchVersion)
Builds an analyzer which removes words in ENGLISH_STOP_WORDS_SET.

Parameters:
matchVersion - See above

StopAnalyzer

public StopAnalyzer(Version matchVersion,
                    Set<?> stopWords)
Builds an analyzer with the stop words from the given set.

Parameters:
matchVersion - See above
stopWords - Set of stop words

StopAnalyzer

public StopAnalyzer(Version matchVersion,
                    File stopwordsFile)
             throws IOException
Builds an analyzer with the stop words from the given file.

Parameters:
matchVersion - See above
stopwordsFile - File to load stop words from
Throws:
IOException
See Also:
WordlistLoader.getWordSet(Reader, Version)

StopAnalyzer

public StopAnalyzer(Version matchVersion,
                    Reader stopwords)
             throws IOException
Builds an analyzer with the stop words from the given reader.

Parameters:
matchVersion - See above
stopwords - Reader to load stop words from
Throws:
IOException
See Also:
WordlistLoader.getWordSet(Reader, Version)
Method Detail

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
ReusableAnalyzerBase.TokenStreamComponents built from a LowerCaseTokenizer filtered with StopFilter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StopFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class StopFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.FilteringTokenFilter
                    extended by  org.apache.lucene.analysis.StopFilter
All Implemented Interfaces:
Closeable
public final class StopFilter
extends FilteringTokenFilter

Removes stop words from a token stream.

You must specify the required Version compatibility when creating StopFilter:

  • As of 3.1, StopFilter correctly handles Unicode 4.0 supplementary characters in stopwords and position increments are preserved

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
StopFilter(boolean enablePositionIncrements, TokenStream in, Set<?> stopWords)
Deprecated. use StopFilter(Version, TokenStream, Set) instead
StopFilter(boolean enablePositionIncrements, TokenStream input, Set<?> stopWords, boolean ignoreCase)
Deprecated. Use StopFilter(Version, TokenStream, Set) instead
StopFilter(Version matchVersion, TokenStream in, Set<?> stopWords)
Constructs a filter which removes words from the input TokenStream that are named in the Set.
StopFilter(Version matchVersion, TokenStream input, Set<?> stopWords, boolean ignoreCase)
Deprecated. Use StopFilter(Version, TokenStream, Set) instead
Method Summary
protected  boolean accept()
Returns the next input Token whose term() is not a stop word.
static boolean getEnablePositionIncrementsVersionDefault(Version matchVersion)
Deprecated. use StopFilter(Version, TokenStream, Set) instead
static Set<Object> makeStopSet(List<?> stopWords)
Deprecated. use makeStopSet(Version, List) instead
static Set<Object> makeStopSet(List<?> stopWords, boolean ignoreCase)
Deprecated. use makeStopSet(Version, List, boolean) instead
static Set<Object> makeStopSet(String... stopWords)
Deprecated. use makeStopSet(Version, String...) instead
static Set<Object> makeStopSet(String[] stopWords, boolean ignoreCase)
Deprecated. use makeStopSet(Version, String[], boolean) instead;
static Set<Object> makeStopSet(Version matchVersion, List<?> stopWords)
Builds a Set from an array of stop words, appropriate for passing into the StopFilter constructor.
static Set<Object> makeStopSet(Version matchVersion, List<?> stopWords, boolean ignoreCase)
Creates a stopword set from the given stopword list.
static Set<Object> makeStopSet(Version matchVersion, String... stopWords)
Builds a Set from an array of stop words, appropriate for passing into the StopFilter constructor.
static Set<Object> makeStopSet(Version matchVersion, String[] stopWords, boolean ignoreCase)
Creates a stopword set from the given stopword array.
Methods inherited from class org.apache.lucene.analysis.FilteringTokenFilter
getEnablePositionIncrements, incrementToken, reset, setEnablePositionIncrements
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

StopFilter

@Deprecated
public StopFilter(boolean enablePositionIncrements,
                             TokenStream input,
                             Set<?> stopWords,
                             boolean ignoreCase)
Deprecated. Use StopFilter(Version, TokenStream, Set) instead

Construct a token stream filtering the given input. If stopWords is an instance of CharArraySet (true if makeStopSet() was used to construct the set) it will be directly used and ignoreCase will be ignored since CharArraySet directly controls case sensitivity.

If stopWords is not an instance of CharArraySet, a new CharArraySet will be constructed and ignoreCase will be used to specify the case sensitivity of that set.

Parameters:
enablePositionIncrements - true if token positions should record the removed stop words
input - Input TokenStream
stopWords - A Set of Strings or char[] or any other toString()-able set representing the stopwords
ignoreCase - if true, all words are lower cased first

StopFilter

@Deprecated
public StopFilter(Version matchVersion,
                             TokenStream input,
                             Set<?> stopWords,
                             boolean ignoreCase)
Deprecated. Use StopFilter(Version, TokenStream, Set) instead

Construct a token stream filtering the given input. If stopWords is an instance of CharArraySet (true if makeStopSet() was used to construct the set) it will be directly used and ignoreCase will be ignored since CharArraySet directly controls case sensitivity.

If stopWords is not an instance of CharArraySet, a new CharArraySet will be constructed and ignoreCase will be used to specify the case sensitivity of that set.

Parameters:
matchVersion - Lucene version to enable correct Unicode 4.0 behavior in the stop set if Version > 3.0. See above for details.
input - Input TokenStream
stopWords - A Set of Strings or char[] or any other toString()-able set representing the stopwords
ignoreCase - if true, all words are lower cased first

StopFilter

@Deprecated
public StopFilter(boolean enablePositionIncrements,
                             TokenStream in,
                             Set<?> stopWords)
Deprecated. use StopFilter(Version, TokenStream, Set) instead

Constructs a filter which removes words from the input TokenStream that are named in the Set.

Parameters:
enablePositionIncrements - true if token positions should record the removed stop words
in - Input stream
stopWords - A Set of Strings or char[] or any other toString()-able set representing the stopwords
See Also:
makeStopSet(Version, java.lang.String[])

StopFilter

public StopFilter(Version matchVersion,
                  TokenStream in,
                  Set<?> stopWords)
Constructs a filter which removes words from the input TokenStream that are named in the Set.

Parameters:
matchVersion - Lucene version to enable correct Unicode 4.0 behavior in the stop set if Version > 3.0. See above for details.
in - Input stream
stopWords - A Set of Strings or char[] or any other toString()-able set representing the stopwords
See Also:
makeStopSet(Version, java.lang.String[])
Method Detail

makeStopSet

@Deprecated
public static final Set<Object> makeStopSet(String... stopWords)
Deprecated. use makeStopSet(Version, String...) instead

Builds a Set from an array of stop words, appropriate for passing into the StopFilter constructor. This permits this stopWords construction to be cached once when an Analyzer is constructed.

See Also:
passing false to ignoreCase

makeStopSet

public static final Set<Object> makeStopSet(Version matchVersion,
                                            String... stopWords)
Builds a Set from an array of stop words, appropriate for passing into the StopFilter constructor. This permits this stopWords construction to be cached once when an Analyzer is constructed.

Parameters:
matchVersion - Lucene version to enable correct Unicode 4.0 behavior in the returned set if Version > 3.0
stopWords - An array of stopwords
See Also:
passing false to ignoreCase

makeStopSet

@Deprecated
public static final Set<Object> makeStopSet(List<?> stopWords)
Deprecated. use makeStopSet(Version, List) instead

Builds a Set from an array of stop words, appropriate for passing into the StopFilter constructor. This permits this stopWords construction to be cached once when an Analyzer is constructed.

Parameters:
stopWords - A List of Strings or char[] or any other toString()-able list representing the stopwords
Returns:
A Set (CharArraySet) containing the words
See Also:
passing false to ignoreCase

makeStopSet

public static final Set<Object> makeStopSet(Version matchVersion,
                                            List<?> stopWords)
Builds a Set from an array of stop words, appropriate for passing into the StopFilter constructor. This permits this stopWords construction to be cached once when an Analyzer is constructed.

Parameters:
matchVersion - Lucene version to enable correct Unicode 4.0 behavior in the returned set if Version > 3.0
stopWords - A List of Strings or char[] or any other toString()-able list representing the stopwords
Returns:
A Set (CharArraySet) containing the words
See Also:
passing false to ignoreCase

makeStopSet

@Deprecated
public static final Set<Object> makeStopSet(String[] stopWords,
                                                       boolean ignoreCase)
Deprecated. use makeStopSet(Version, String[], boolean) instead;

Creates a stopword set from the given stopword array.

Parameters:
stopWords - An array of stopwords
ignoreCase - If true, all words are lower cased first.
Returns:
a Set containing the words

makeStopSet

public static final Set<Object> makeStopSet(Version matchVersion,
                                            String[] stopWords,
                                            boolean ignoreCase)
Creates a stopword set from the given stopword array.

Parameters:
matchVersion - Lucene version to enable correct Unicode 4.0 behavior in the returned set if Version > 3.0
stopWords - An array of stopwords
ignoreCase - If true, all words are lower cased first.
Returns:
a Set containing the words

makeStopSet

@Deprecated
public static final Set<Object> makeStopSet(List<?> stopWords,
                                                       boolean ignoreCase)
Deprecated. use makeStopSet(Version, List, boolean) instead

Creates a stopword set from the given stopword list.

Parameters:
stopWords - A List of Strings or char[] or any other toString()-able list representing the stopwords
ignoreCase - if true, all words are lower cased first
Returns:
A Set (CharArraySet) containing the words

makeStopSet

public static final Set<Object> makeStopSet(Version matchVersion,
                                            List<?> stopWords,
                                            boolean ignoreCase)
Creates a stopword set from the given stopword list.

Parameters:
matchVersion - Lucene version to enable correct Unicode 4.0 behavior in the returned set if Version > 3.0
stopWords - A List of Strings or char[] or any other toString()-able list representing the stopwords
ignoreCase - if true, all words are lower cased first
Returns:
A Set (CharArraySet) containing the words

accept

protected boolean accept()
                  throws IOException
Returns the next input Token whose term() is not a stop word.

Specified by:
accept in class FilteringTokenFilter
Throws:
IOException

getEnablePositionIncrementsVersionDefault

@Deprecated
public static boolean getEnablePositionIncrementsVersionDefault(Version matchVersion)
Deprecated. use StopFilter(Version, TokenStream, Set) instead

Returns version-dependent default for enablePositionIncrements. Analyzers that embed StopFilter use this method when creating the StopFilter. Prior to 2.9, this returns false. On 2.9 or later, it returns true.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StopwordAnalyzerBase

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class StopwordAnalyzerBase

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
ArabicAnalyzer, ArmenianAnalyzer, BasqueAnalyzer, BrazilianAnalyzer, BulgarianAnalyzer, CatalanAnalyzer, CJKAnalyzer, ClassicAnalyzer, DanishAnalyzer, EnglishAnalyzer, FinnishAnalyzer, FrenchAnalyzer, GalicianAnalyzer, GermanAnalyzer, GreekAnalyzer, HindiAnalyzer, HungarianAnalyzer, IndonesianAnalyzer, IrishAnalyzer, ItalianAnalyzer, JapaneseAnalyzer, LatvianAnalyzer, NorwegianAnalyzer, PersianAnalyzer, PolishAnalyzer, PortugueseAnalyzer, RomanianAnalyzer, RussianAnalyzer, SpanishAnalyzer, StandardAnalyzer, StopAnalyzer, SwedishAnalyzer, ThaiAnalyzer, TurkishAnalyzer, UAX29URLEmailAnalyzer
public abstract class StopwordAnalyzerBase
extends ReusableAnalyzerBase

Base class for Analyzers that need to make use of stopword sets.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
protected Version | matchVersion
protected CharArraySet | stopwords An immutable stopword set
Constructor Summary
protected | StopwordAnalyzerBase(Version version) Creates a new Analyzer with an empty stopword set
protected | StopwordAnalyzerBase(Version version, Set<?> stopwords) Creates a new instance initialized with the given stopword set
Method Summary
Set<?> | getStopwordSet() Returns the analyzer's stopword set or an empty set if the analyzer has no stopwords
protected static CharArraySet | loadStopwordSet(boolean ignoreCase, Class<? extends ReusableAnalyzerBase> aClass, String resource, String comment) Creates a CharArraySet from a file resource associated with a class.
protected static CharArraySet | loadStopwordSet(File stopwords, Version matchVersion) Creates a CharArraySet from a file.
protected static CharArraySet | loadStopwordSet(Reader stopwords, Version matchVersion) Creates a CharArraySet from a file.
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
createComponents, initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

stopwords

protected final CharArraySet stopwords
An immutable stopword set

matchVersion

protected final Version matchVersion
Constructor Detail

StopwordAnalyzerBase

protected StopwordAnalyzerBase(Version version,
                               Set<?> stopwords)
Creates a new instance initialized with the given stopword set

Parameters:
version - the Lucene version for cross version compatibility
stopwords - the analyzer's stopword set

StopwordAnalyzerBase

protected StopwordAnalyzerBase(Version version)
Creates a new Analyzer with an empty stopword set

Parameters:
version - the Lucene version for cross version compatibility
Method Detail

getStopwordSet

public Set<?> getStopwordSet()
Returns the analyzer's stopword set or an empty set if the analyzer has no stopwords

Returns:
the analyzer's stopword set or an empty set if the analyzer has no stopwords

loadStopwordSet

protected static CharArraySet loadStopwordSet(boolean ignoreCase,
                                              Class<? extends ReusableAnalyzerBase> aClass,
                                              String resource,
                                              String comment)
                                       throws IOException
Creates a CharArraySet from a file resource associated with a class. (See Class.getResourceAsStream(String)).

Parameters:
ignoreCase - true if the set should ignore the case of the stopwords, otherwise false
aClass - a class that is associated with the given stopwordResource
resource - name of the resource file associated with the given class
comment - comment string to ignore in the stopword file
Returns:
a CharArraySet containing the distinct stopwords from the given file
Throws:
IOException - if loading the stopwords throws an IOException

loadStopwordSet

protected static CharArraySet loadStopwordSet(File stopwords,
                                              Version matchVersion)
                                       throws IOException
Creates a CharArraySet from a file.

Parameters:
stopwords - the stopwords file to load
matchVersion - the Lucene version for cross version compatibility
Returns:
a CharArraySet containing the distinct stopwords from the given file
Throws:
IOException - if loading the stopwords throws an IOException

loadStopwordSet

protected static CharArraySet loadStopwordSet(Reader stopwords,
                                              Version matchVersion)
                                       throws IOException
Creates a CharArraySet from a file.

Parameters:
stopwords - the stopwords reader to load
matchVersion - the Lucene version for cross version compatibility
Returns:
a CharArraySet containing the distinct stopwords from the given reader
Throws:
IOException - if loading the stopwords throws an IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TeeSinkTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class TeeSinkTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.TeeSinkTokenFilter
All Implemented Interfaces:
Closeable
public final class TeeSinkTokenFilter
extends TokenFilter

This TokenFilter provides the ability to set aside attribute states that have already been analyzed. This is useful in situations where multiple fields share many common analysis steps and then go their separate ways.

It is also useful for doing things like entity extraction or proper noun analysis as part of the analysis workflow and saving off those tokens for use in another field.

TeeSinkTokenFilter source1 = new TeeSinkTokenFilter(new WhitespaceTokenizer(reader1));
TeeSinkTokenFilter.SinkTokenStream sink1 = source1.newSinkTokenStream();
TeeSinkTokenFilter.SinkTokenStream sink2 = source1.newSinkTokenStream();

TeeSinkTokenFilter source2 = new TeeSinkTokenFilter(new WhitespaceTokenizer(reader2));
source2.addSinkTokenStream(sink1);
source2.addSinkTokenStream(sink2);

TokenStream final1 = new LowerCaseFilter(source1);
TokenStream final2 = source2;
TokenStream final3 = new EntityDetect(sink1);
TokenStream final4 = new URLDetect(sink2);

d.add(new Field("f1", final1));
d.add(new Field("f2", final2));
d.add(new Field("f3", final3));
d.add(new Field("f4", final4));
In this example, sink1 and sink2 will both get tokens from both reader1 and reader2 after whitespace tokenizer and now we can further wrap any of these in extra analysis, and more "sources" can be inserted if desired. It is important, that tees are consumed before sinks (in the above example, the field names must be less the sink's field names). If you are not sure, which stream is consumed first, you can simply add another sink and then pass all tokens to the sinks at once using consumeAllTokens(). This TokenFilter is exhausted after this. In the above example, change the example above to:
...
TokenStream final1 = new LowerCaseFilter(source1.newSinkTokenStream());
TokenStream final2 = source2.newSinkTokenStream();
sink1.consumeAllTokens();
sink2.consumeAllTokens();
...
In this case, the fields can be added in any order, because the sources are not used anymore and all sinks are ready.

Note, the EntityDetect and URLDetect TokenStreams are for the example and do not currently exist in Lucene.

Nested Class Summary
static class | TeeSinkTokenFilter.SinkFilter A filter that decides which AttributeSource states to store in the sink.
static class | TeeSinkTokenFilter.SinkTokenStream TokenStream output from a tee with optional filtering.
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
TeeSinkTokenFilter(TokenStream input)
Instantiates a new TeeSinkTokenFilter.
Method Summary
 void addSinkTokenStream(TeeSinkTokenFilter.SinkTokenStream sink)
Adds a TeeSinkTokenFilter.SinkTokenStream created by another TeeSinkTokenFilter to this one.
 void consumeAllTokens()
TeeSinkTokenFilter passes all tokens to the added sinks when itself is consumed.
 void end()
Performs end-of-stream operations, if any, and calls then end() on the input TokenStream.

NOTE: Be sure to call super.end() first when overriding this method.

 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 TeeSinkTokenFilter.SinkTokenStream newSinkTokenStream()
Returns a new TeeSinkTokenFilter.SinkTokenStream that receives all tokens consumed by this stream.
 TeeSinkTokenFilter.SinkTokenStream newSinkTokenStream(TeeSinkTokenFilter.SinkFilter filter)
Returns a new TeeSinkTokenFilter.SinkTokenStream that receives all tokens consumed by this stream that pass the supplied filter.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

TeeSinkTokenFilter

public TeeSinkTokenFilter(TokenStream input)
Instantiates a new TeeSinkTokenFilter.

Method Detail

newSinkTokenStream

public TeeSinkTokenFilter.SinkTokenStream newSinkTokenStream()
Returns a new TeeSinkTokenFilter.SinkTokenStream that receives all tokens consumed by this stream.

newSinkTokenStream

public TeeSinkTokenFilter.SinkTokenStream newSinkTokenStream(TeeSinkTokenFilter.SinkFilter filter)
Returns a new TeeSinkTokenFilter.SinkTokenStream that receives all tokens consumed by this stream that pass the supplied filter.

See Also:
TeeSinkTokenFilter.SinkFilter

addSinkTokenStream

public void addSinkTokenStream(TeeSinkTokenFilter.SinkTokenStream sink)
Adds a TeeSinkTokenFilter.SinkTokenStream created by another TeeSinkTokenFilter to this one. The supplied stream will also receive all consumed tokens. This method can be used to pass tokens from two different tees to one sink.

consumeAllTokens

public void consumeAllTokens()
                      throws IOException
TeeSinkTokenFilter passes all tokens to the added sinks when itself is consumed. To be sure, that all tokens from the input stream are passed to the sinks, you can call this methods. This instance is exhausted after this, but all sinks are instant available.

Throws:
IOException

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

end

public final void end()
               throws IOException
Description copied from class: TokenFilter
Performs end-of-stream operations, if any, and calls then end() on the input TokenStream.

NOTE: Be sure to call super.end() first when overriding this method.

Overrides:
end in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TeeSinkTokenFilter.SinkFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class TeeSinkTokenFilter.SinkFilter

java.lang.Object
    extended by  org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter
Direct Known Subclasses:
DateRecognizerSinkFilter, TokenRangeSinkFilter, TokenTypeSinkFilter
Enclosing class:
TeeSinkTokenFilter
public abstract static class TeeSinkTokenFilter.SinkFilter
extends Object

A filter that decides which AttributeSource states to store in the sink.

Constructor Summary
TeeSinkTokenFilter.SinkFilter()
Method Summary
abstract  boolean accept(AttributeSource source)
Returns true, iff the current state of the passed-in AttributeSource shall be stored in the sink.
 void reset()
Called by TeeSinkTokenFilter.SinkTokenStream.reset().
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TeeSinkTokenFilter.SinkFilter

public TeeSinkTokenFilter.SinkFilter()
Method Detail

accept

public abstract boolean accept(AttributeSource source)
Returns true, iff the current state of the passed-in AttributeSource shall be stored in the sink.

reset

public void reset()
           throws IOException
Called by TeeSinkTokenFilter.SinkTokenStream.reset(). This method does nothing by default and can optionally be overridden.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TeeSinkTokenFilter.SinkTokenStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class TeeSinkTokenFilter.SinkTokenStream

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TeeSinkTokenFilter.SinkTokenStream
All Implemented Interfaces:
Closeable
Enclosing class:
TeeSinkTokenFilter
public static final class TeeSinkTokenFilter.SinkTokenStream
extends TokenStream

TokenStream output from a tee with optional filtering.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Method Summary
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset()
Resets this stream to the beginning.
Methods inherited from class org.apache.lucene.analysis.TokenStream
close
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

end

public final void end()
               throws IOException
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream
Throws:
IOException

reset

public final void reset()
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Token

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class Token

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
            extended by  org.apache.lucene.analysis.tokenattributes.TermAttributeImpl
                extended by  org.apache.lucene.analysis.Token
All Implemented Interfaces:
Serializable, Appendable, CharSequence, Cloneable, CharTermAttribute, FlagsAttribute, OffsetAttribute, PayloadAttribute, PositionIncrementAttribute, PositionLengthAttribute, TermAttribute, TypeAttribute, Attribute
public class Token
extends TermAttributeImpl
implements TypeAttribute, PositionIncrementAttribute, FlagsAttribute, OffsetAttribute, PayloadAttribute, PositionLengthAttribute

A Token is an occurrence of a term from the text of a field. It consists of a term's text, the start and end offset of the term in the text of the field, and a type string.

The start and end offsets permit applications to re-associate a token with its source text, e.g., to display highlighted query terms in a document browser, or to show matching text fragments in a KWIC display, etc.

The type is a string, assigned by a lexical analyzer (a.k.a. tokenizer), naming the lexical or syntactic class that the token belongs to. For example an end of sentence marker token might be implemented with type "eos". The default token type is "word".

A Token can optionally have metadata (a.k.a. Payload) in the form of a variable length byte array. Use TermPositions.getPayloadLength() and TermPositions.getPayload(byte[], int) to retrieve the payloads from the index.

NOTE: As of 2.9, Token implements all Attribute interfaces that are part of core Lucene and can be found in the tokenattributes subpackage. Even though it is not necessary to use Token anymore, with the new TokenStream API it can be used as convenience class that implements all Attributes, which is especially useful to easily switch from the old to the new TokenStream API.

Tokenizers and TokenFilters should try to re-use a Token instance when possible for best performance, by implementing the TokenStream.incrementToken() API. Failing that, to create a new Token you should first use one of the constructors that starts with null text. To load the token from a char[] use CharTermAttributeImpl.copyBuffer(char[], int, int). To load from a String use CharTermAttributeImpl.setEmpty() followed by CharTermAttributeImpl.append(CharSequence) or CharTermAttributeImpl.append(CharSequence, int, int). Alternatively you can get the Token's termBuffer by calling either CharTermAttributeImpl.buffer(), if you know that your text is shorter than the capacity of the termBuffer or CharTermAttributeImpl.resizeBuffer(int), if there is any possibility that you may need to grow the buffer. Fill in the characters of your term into this buffer, with String.getChars(int, int, char[], int) if loading from a string, or with System.arraycopy(Object, int, Object, int, int), and finally call CharTermAttributeImpl.setLength(int) to set the length of the term text. See LUCENE-969 for details.

Typical Token reuse patterns:

  • Copying text from a string (type is reset to TypeAttribute.DEFAULT_TYPE if not specified):
        return reusableToken.reinit(string, startOffset, endOffset[, type]);
  • Copying some text from a string (type is reset to TypeAttribute.DEFAULT_TYPE if not specified):
        return reusableToken.reinit(string, 0, string.length(), startOffset, endOffset[, type]);
  • Copying text from char[] buffer (type is reset to TypeAttribute.DEFAULT_TYPE if not specified):
        return reusableToken.reinit(buffer, 0, buffer.length, startOffset, endOffset[, type]);
  • Copying some text from a char[] buffer (type is reset to TypeAttribute.DEFAULT_TYPE if not specified):
        return reusableToken.reinit(buffer, start, end - start, startOffset, endOffset[, type]);
  • Copying from one one Token to another (type is reset to TypeAttribute.DEFAULT_TYPE if not specified):
        return reusableToken.reinit(source.buffer(), 0, source.length(), source.startOffset(), source.endOffset()[, source.type()]);
A few things to note:
  • clear() initializes all of the fields to default values. This was changed in contrast to Lucene 2.4, but should affect no one.
  • Because TokenStreams can be chained, one cannot assume that the Token's current type is correct.
  • The startOffset and endOffset represent the start and offset in the source text, so be careful in adjusting them.
  • When caching a reusable token, clone it. When injecting a cached token into a stream that can be reset, clone it again.

Please note: With Lucene 3.1, the toString() method had to be changed to match the CharSequence interface introduced by the interface CharTermAttribute. This method now only prints the term text, no additional information anymore.

See Also:
Payload, Serialized Form

Nested Class Summary
static class Token.TokenAttributeFactory
Expert: Creates a TokenAttributeFactory returning Token as instance for the basic attributes and for all other attributes calls the given delegate factory.
Field Summary
static AttributeSource.AttributeFactory TOKEN_ATTRIBUTE_FACTORY
Convenience factory that returns Token as implementation for the basic attributes and return the default impl (with "Impl" appended) for all other attributes.
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Fields inherited from interface org.apache.lucene.analysis.tokenattributes.TypeAttribute
DEFAULT_TYPE
Constructor Summary
Token()
Constructs a Token will null text.
Token(char[] startTermBuffer, int termBufferOffset, int termBufferLength, int start, int end)
Constructs a Token with the given term buffer (offset & length), start and end offsets
Token(int start, int end)
Constructs a Token with null text and start & end offsets.
Token(int start, int end, int flags)
Constructs a Token with null text and start & end offsets plus flags.
Token(int start, int end, String typ)
Constructs a Token with null text and start & end offsets plus the Token type.
Token(String text, int start, int end)
Constructs a Token with the given term text, and start & end offsets.
Token(String text, int start, int end, int flags)
Constructs a Token with the given text, start and end offsets, & type.
Token(String text, int start, int end, String typ)
Constructs a Token with the given text, start and end offsets, & type.
Method Summary
 void clear()
Resets the term text, payload, flags, and positionIncrement, startOffset, endOffset and token type to default.
 Object clone()
Shallow clone.
 Token clone(char[] newTermBuffer, int newTermOffset, int newTermLength, int newStartOffset, int newEndOffset)
Makes a clone, but replaces the term buffer & start/end offset in the process.
 void copyTo(AttributeImpl target)
Copies the values from this Attribute into the passed-in target attribute.
 int endOffset()
Returns this Token's ending offset, one greater than the position of the last character corresponding to this token in the source text.
 boolean equals(Object obj)
 int getFlags()

Get the bitset for any bits that have been set.

 Payload getPayload()
Returns this Token's payload.
 int getPositionIncrement()
Returns the position increment of this Token.
 int getPositionLength()
Get the position length.
 int hashCode()
 void reflectWith(AttributeReflector reflector)
This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.
 Token reinit(char[] newTermBuffer, int newTermOffset, int newTermLength, int newStartOffset, int newEndOffset)
Shorthand for calling clear(), CharTermAttributeImpl.copyBuffer(char[], int, int), setStartOffset(int), setEndOffset(int) setType(java.lang.String) on Token.DEFAULT_TYPE
 Token reinit(char[] newTermBuffer, int newTermOffset, int newTermLength, int newStartOffset, int newEndOffset, String newType)
Shorthand for calling clear(), CharTermAttributeImpl.copyBuffer(char[], int, int), setStartOffset(int), setEndOffset(int), setType(java.lang.String)
 Token reinit(String newTerm, int newStartOffset, int newEndOffset)
Shorthand for calling clear(), CharTermAttributeImpl.append(CharSequence), setStartOffset(int), setEndOffset(int) setType(java.lang.String) on Token.DEFAULT_TYPE
 Token reinit(String newTerm, int newTermOffset, int newTermLength, int newStartOffset, int newEndOffset)
Shorthand for calling clear(), CharTermAttributeImpl.append(CharSequence, int, int), setStartOffset(int), setEndOffset(int) setType(java.lang.String) on Token.DEFAULT_TYPE
 Token reinit(String newTerm, int newTermOffset, int newTermLength, int newStartOffset, int newEndOffset, String newType)
Shorthand for calling clear(), CharTermAttributeImpl.append(CharSequence, int, int), setStartOffset(int), setEndOffset(int) setType(java.lang.String)
 Token reinit(String newTerm, int newStartOffset, int newEndOffset, String newType)
Shorthand for calling clear(), CharTermAttributeImpl.append(CharSequence), setStartOffset(int), setEndOffset(int) setType(java.lang.String)
 void reinit(Token prototype)
Copy the prototype token's fields into this one.
 void reinit(Token prototype, char[] newTermBuffer, int offset, int length)
Copy the prototype token's fields into this one, with a different term.
 void reinit(Token prototype, String newTerm)
Copy the prototype token's fields into this one, with a different term.
 void setEndOffset(int offset)
Set the ending offset.
 void setFlags(int flags)
 void setOffset(int startOffset, int endOffset)
Set the starting and ending offset.
 void setPayload(Payload payload)
Sets this Token's payload.
 void setPositionIncrement(int positionIncrement)
Set the position increment.
 void setPositionLength(int positionLength)
Set the position length.
 void setStartOffset(int offset)
Set the starting offset.
 void setType(String type)
Set the lexical type.
 int startOffset()
Returns this Token's starting offset, the position of the first character corresponding to this token in the source text.
 String type()
Returns this Token's lexical type.
Methods inherited from class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
append, append, append, append, append, append, buffer, charAt, copyBuffer, length, resizeBuffer, resizeTermBuffer, setEmpty, setLength, setTermBuffer, setTermBuffer, setTermBuffer, setTermLength, subSequence, term, termBuffer, termLength, toString
Methods inherited from class org.apache.lucene.util.AttributeImpl
reflectAsString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

TOKEN_ATTRIBUTE_FACTORY

public static final AttributeSource.AttributeFactory TOKEN_ATTRIBUTE_FACTORY
Convenience factory that returns Token as implementation for the basic attributes and return the default impl (with "Impl" appended) for all other attributes.

Since:
3.0
Constructor Detail

Token

public Token()
Constructs a Token will null text.

Token

public Token(int start,
             int end)
Constructs a Token with null text and start & end offsets.

Parameters:
start - start offset in the source text
end - end offset in the source text

Token

public Token(int start,
             int end,
             String typ)
Constructs a Token with null text and start & end offsets plus the Token type.

Parameters:
start - start offset in the source text
end - end offset in the source text
typ - the lexical type of this Token

Token

public Token(int start,
             int end,
             int flags)
Constructs a Token with null text and start & end offsets plus flags. NOTE: flags is EXPERIMENTAL.

Parameters:
start - start offset in the source text
end - end offset in the source text
flags - The bits to set for this token

Token

public Token(String text,
             int start,
             int end)
Constructs a Token with the given term text, and start & end offsets. The type defaults to "word." NOTE: for better indexing speed you should instead use the char[] termBuffer methods to set the term text.

Parameters:
text - term text
start - start offset
end - end offset

Token

public Token(String text,
             int start,
             int end,
             String typ)
Constructs a Token with the given text, start and end offsets, & type. NOTE: for better indexing speed you should instead use the char[] termBuffer methods to set the term text.

Parameters:
text - term text
start - start offset
end - end offset
typ - token type

Token

public Token(String text,
             int start,
             int end,
             int flags)
Constructs a Token with the given text, start and end offsets, & type. NOTE: for better indexing speed you should instead use the char[] termBuffer methods to set the term text.

Parameters:
text -
start -
end -
flags - token type bits

Token

public Token(char[] startTermBuffer,
             int termBufferOffset,
             int termBufferLength,
             int start,
             int end)
Constructs a Token with the given term buffer (offset & length), start and end offsets

Parameters:
startTermBuffer -
termBufferOffset -
termBufferLength -
start -
end -
Method Detail

setPositionIncrement

public void setPositionIncrement(int positionIncrement)
Set the position increment. This determines the position of this token relative to the previous Token in a TokenStream, used in phrase searching.

The default value is one.

Some common uses for this are:

  • 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.
  • 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.

Specified by:
setPositionIncrement in interface PositionIncrementAttribute
Parameters:
positionIncrement - the distance from the prior term
See Also:
TermPositions

getPositionIncrement

public int getPositionIncrement()
Returns the position increment of this Token.

Specified by:
getPositionIncrement in interface PositionIncrementAttribute
See Also:
setPositionIncrement(int)

setPositionLength

public void setPositionLength(int positionLength)
Set the position length.

Specified by:
setPositionLength in interface PositionLengthAttribute
Parameters:
positionLength - how many positions this token spans.
See Also:
PositionLengthAttribute

getPositionLength

public int getPositionLength()
Get the position length.

Specified by:
getPositionLength in interface PositionLengthAttribute
See Also:
PositionLengthAttribute

startOffset

public final int startOffset()
Returns this Token's starting offset, the position of the first character corresponding to this token in the source text. Note that the difference between endOffset() and startOffset() may not be equal to CharTermAttributeImpl.length(), as the term text may have been altered by a stemmer or some other filter.

Specified by:
startOffset in interface OffsetAttribute

setStartOffset

public void setStartOffset(int offset)
Set the starting offset.

See Also:
startOffset()

endOffset

public final int endOffset()
Returns this Token's ending offset, one greater than the position of the last character corresponding to this token in the source text. The length of the token in the source text is (endOffset - startOffset).

Specified by:
endOffset in interface OffsetAttribute

setEndOffset

public void setEndOffset(int offset)
Set the ending offset.

See Also:
endOffset()

setOffset

public void setOffset(int startOffset,
                      int endOffset)
Set the starting and ending offset.

Specified by:
setOffset in interface OffsetAttribute
See Also:
and #endOffset()

type

public final String type()
Returns this Token's lexical type. Defaults to "word".

Specified by:
type in interface TypeAttribute

setType

public final void setType(String type)
Set the lexical type.

Specified by:
setType in interface TypeAttribute
See Also:
type()

getFlags

public int getFlags()

Get the bitset for any bits that have been set. This is completely distinct from type(), although they do share similar purposes. The flags can be used to encode information about the token for use by other TokenFilters.

Specified by:
getFlags in interface FlagsAttribute
Returns:
The bits
WARNING: This API is experimental and might change in incompatible ways in the next release.
While we think this is here to stay, we may want to change it to be a long.

setFlags

public void setFlags(int flags)
Specified by:
setFlags in interface FlagsAttribute
See Also:
getFlags()

getPayload

public Payload getPayload()
Returns this Token's payload.

Specified by:
getPayload in interface PayloadAttribute

setPayload

public void setPayload(Payload payload)
Sets this Token's payload.

Specified by:
setPayload in interface PayloadAttribute

clear

public void clear()
Resets the term text, payload, flags, and positionIncrement, startOffset, endOffset and token type to default.

Overrides:
clear in class CharTermAttributeImpl

clone

public Object clone()
Description copied from class: AttributeImpl
Shallow clone. Subclasses must override this if they need to clone any members deeply,

Overrides:
clone in class CharTermAttributeImpl

clone

public Token clone(char[] newTermBuffer,
                   int newTermOffset,
                   int newTermLength,
                   int newStartOffset,
                   int newEndOffset)
Makes a clone, but replaces the term buffer & start/end offset in the process. This is more efficient than doing a full clone (and then calling CharTermAttributeImpl.copyBuffer(char[], int, int)) because it saves a wasted copy of the old termBuffer.

equals

public boolean equals(Object obj)
Overrides:
equals in class CharTermAttributeImpl

hashCode

public int hashCode()
Overrides:
hashCode in class CharTermAttributeImpl

reinit

public Token reinit(char[] newTermBuffer,
                    int newTermOffset,
                    int newTermLength,
                    int newStartOffset,
                    int newEndOffset,
                    String newType)
Shorthand for calling clear(), CharTermAttributeImpl.copyBuffer(char[], int, int), setStartOffset(int), setEndOffset(int), setType(java.lang.String)

Returns:
this Token instance

reinit

public Token reinit(char[] newTermBuffer,
                    int newTermOffset,
                    int newTermLength,
                    int newStartOffset,
                    int newEndOffset)
Shorthand for calling clear(), CharTermAttributeImpl.copyBuffer(char[], int, int), setStartOffset(int), setEndOffset(int) setType(java.lang.String) on Token.DEFAULT_TYPE

Returns:
this Token instance

reinit

public Token reinit(String newTerm,
                    int newStartOffset,
                    int newEndOffset,
                    String newType)
Shorthand for calling clear(), CharTermAttributeImpl.append(CharSequence), setStartOffset(int), setEndOffset(int) setType(java.lang.String)

Returns:
this Token instance

reinit

public Token reinit(String newTerm,
                    int newTermOffset,
                    int newTermLength,
                    int newStartOffset,
                    int newEndOffset,
                    String newType)
Shorthand for calling clear(), CharTermAttributeImpl.append(CharSequence, int, int), setStartOffset(int), setEndOffset(int) setType(java.lang.String)

Returns:
this Token instance

reinit

public Token reinit(String newTerm,
                    int newStartOffset,
                    int newEndOffset)
Shorthand for calling clear(), CharTermAttributeImpl.append(CharSequence), setStartOffset(int), setEndOffset(int) setType(java.lang.String) on Token.DEFAULT_TYPE

Returns:
this Token instance

reinit

public Token reinit(String newTerm,
                    int newTermOffset,
                    int newTermLength,
                    int newStartOffset,
                    int newEndOffset)
Shorthand for calling clear(), CharTermAttributeImpl.append(CharSequence, int, int), setStartOffset(int), setEndOffset(int) setType(java.lang.String) on Token.DEFAULT_TYPE

Returns:
this Token instance

reinit

public void reinit(Token prototype)
Copy the prototype token's fields into this one. Note: Payloads are shared.

Parameters:
prototype -

reinit

public void reinit(Token prototype,
                   String newTerm)
Copy the prototype token's fields into this one, with a different term. Note: Payloads are shared.

Parameters:
prototype -
newTerm -

reinit

public void reinit(Token prototype,
                   char[] newTermBuffer,
                   int offset,
                   int length)
Copy the prototype token's fields into this one, with a different term. Note: Payloads are shared.

Parameters:
prototype -
newTermBuffer -
offset -
length -

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Overrides:
copyTo in class CharTermAttributeImpl

reflectWith

public void reflectWith(AttributeReflector reflector)
Description copied from class: AttributeImpl
This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.

The default implementation calls AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) for all non-static fields from the implementing class, using the field name as key and the field value as value. The Attribute class is also determined by reflection. Please note that the default implementation can only handle single-Attribute implementations.

Custom implementations look like this (e.g. for a combined attribute implementation):

   public void reflectWith(AttributeReflector reflector) {
     reflector.reflect(CharTermAttribute.class, "term", term());
     reflector.reflect(PositionIncrementAttribute.class, "positionIncrement", getPositionIncrement());
   }

If you implement this method, make sure that for each invocation, the same set of Attribute interfaces and keys are passed to AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) in the same order, but possibly different values. So don't automatically exclude e.g. null properties!

Overrides:
reflectWith in class CharTermAttributeImpl
See Also:
AttributeImpl.reflectAsString(boolean)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Token.TokenAttributeFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class Token.TokenAttributeFactory

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource.AttributeFactory
        extended by  org.apache.lucene.analysis.Token.TokenAttributeFactory
Enclosing class:
Token
public static final class Token.TokenAttributeFactory
extends AttributeSource.AttributeFactory

Expert: Creates a TokenAttributeFactory returning Token as instance for the basic attributes and for all other attributes calls the given delegate factory.

Since:
3.0

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeSource.AttributeFactory
DEFAULT_ATTRIBUTE_FACTORY
Constructor Summary
Token.TokenAttributeFactory(AttributeSource.AttributeFactory delegate)
Expert: Creates an AttributeFactory returning Token as instance for the basic attributes and for all other attributes calls the given delegate factory.
Method Summary
AttributeImpl | createAttributeInstance(Class<? extends Attribute> attClass) returns an AttributeImpl for the supplied Attribute interface class.
boolean | equals(Object other)
int | hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Token.TokenAttributeFactory

public Token.TokenAttributeFactory(AttributeSource.AttributeFactory delegate)
Expert: Creates an AttributeFactory returning Token as instance for the basic attributes and for all other attributes calls the given delegate factory.

Method Detail

createAttributeInstance

public AttributeImpl createAttributeInstance(Class<? extends Attribute> attClass)
Description copied from class: AttributeSource.AttributeFactory
returns an AttributeImpl for the supplied Attribute interface class.

Specified by:
createAttributeInstance in class AttributeSource.AttributeFactory

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class TokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
ArabicNormalizationFilter, ArabicStemFilter, ASCIIFoldingFilter, BeiderMorseFilter, BrazilianStemFilter, BulgarianStemFilter, CachingTokenFilter, CategoryParentsStream, CategoryTokenizerBase, ChineseFilter, CJKBigramFilter, CJKWidthFilter, ClassicFilter, CollationKeyFilter, CompoundWordTokenFilterBase, CzechStemFilter, DelimitedPayloadTokenFilter, DoubleMetaphoneFilter, DutchStemFilter, EdgeNGramTokenFilter, ElisionFilter, EnglishMinimalStemFilter, EnglishPossessiveFilter, FilteringTokenFilter, FinnishLightStemFilter, FrenchLightStemFilter, FrenchMinimalStemFilter, FrenchStemFilter, GalicianMinimalStemFilter, GalicianStemFilter, GermanLightStemFilter, GermanMinimalStemFilter, GermanNormalizationFilter, GermanStemFilter, GreekLowerCaseFilter, GreekStemFilter, HindiNormalizationFilter, HindiStemFilter, HungarianLightStemFilter, HunspellStemFilter, ICUCollationKeyFilter, ICUNormalizer2Filter, ICUTransformFilter, IndicNormalizationFilter, IndonesianStemFilter, IrishLowerCaseFilter, ISOLatin1AccentFilter, ItalianLightStemFilter, JapaneseBaseFormFilter, JapaneseKatakanaStemFilter, JapaneseReadingFormFilter, KeywordMarkerFilter, KStemFilter, LatvianStemFilter, LimitTokenCountFilter, LookaheadTokenFilter, LowerCaseFilter, MockFixedLengthPayloadFilter, MockHoleInjectingTokenFilter, MockVariableLengthPayloadFilter, NGramTokenFilter, NorwegianLightStemFilter, NorwegianMinimalStemFilter, NumericPayloadTokenFilter, OffsetLimitTokenFilter, PersianNormalizationFilter, PhoneticFilter, PorterStemFilter, PortugueseLightStemFilter, PortugueseMinimalStemFilter, PortugueseStemFilter, PositionFilter, QueryParserTestBase.QPTestFilter, ReverseStringFilter, RussianLightStemFilter, RussianLowerCaseFilter, RussianStemFilter, ShingleFilter, SnowballFilter, SpanishLightStemFilter, StandardFilter, StemmerOverrideFilter, StempelFilter, SwedishLightStemFilter, SynonymFilter, TeeSinkTokenFilter, ThaiWordFilter, TokenOffsetPayloadTokenFilter, TurkishLowerCaseFilter, TypeAsPayloadTokenFilter, ValidatingTokenFilter, WordTokenFilter
public abstract class TokenFilter
extends TokenStream

A TokenFilter is a TokenStream whose input is another TokenStream.

This is an abstract class; subclasses must override TokenStream.incrementToken().

See Also:
TokenStream

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
protected  TokenStream input
The source of tokens for this filter.
Constructor Summary
protected TokenFilter(TokenStream input)
Construct a token stream filtering the given input.
Method Summary
 void close()
Close the input TokenStream.
 void end()
Performs end-of-stream operations, if any, and calls then end() on the input TokenStream.

NOTE: Be sure to call super.end() first when overriding this method.

 void reset()
Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenStream
incrementToken
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

input

protected final TokenStream input
The source of tokens for this filter.

Constructor Detail

TokenFilter

protected TokenFilter(TokenStream input)
Construct a token stream filtering the given input.

Method Detail

end

public void end()
         throws IOException
Performs end-of-stream operations, if any, and calls then end() on the input TokenStream.

NOTE: Be sure to call super.end() first when overriding this method.

Overrides:
end in class TokenStream
Throws:
IOException

close

public void close()
           throws IOException
Close the input TokenStream.

Specified by:
close in interface Closeable
Overrides:
close in class TokenStream
Throws:
IOException

reset

public void reset()
           throws IOException
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenStream
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Tokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class Tokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
CharTokenizer, ChineseTokenizer, CJKTokenizer, ClassicTokenizer, EdgeNGramTokenizer, EmptyTokenizer, ICUTokenizer, JapaneseTokenizer, KeywordTokenizer, MockTokenizer, NGramTokenizer, PathHierarchyTokenizer, ReversePathHierarchyTokenizer, SentenceTokenizer, StandardTokenizer, UAX29URLEmailTokenizer, WikipediaTokenizer
public abstract class Tokenizer
extends TokenStream

A Tokenizer is a TokenStream whose input is a Reader.

This is an abstract class; subclasses must override TokenStream.incrementToken()

NOTE: Subclasses overriding TokenStream.incrementToken() must call AttributeSource.clearAttributes() before setting attributes.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
protected  Reader input
The text source for this Tokenizer.
Constructor Summary
protected Tokenizer()
Deprecated. use Tokenizer(Reader) instead.
protected Tokenizer(AttributeSource.AttributeFactory factory)
Deprecated. use Tokenizer(AttributeSource.AttributeFactory, Reader) instead.
protected Tokenizer(AttributeSource.AttributeFactory factory, Reader input)
Construct a token stream processing the given input using the given AttributeFactory.
protected Tokenizer(AttributeSource source)
Deprecated. use Tokenizer(AttributeSource, Reader) instead.
protected Tokenizer(AttributeSource source, Reader input)
Construct a token stream processing the given input using the given AttributeSource.
protected Tokenizer(Reader input)
Construct a token stream processing the given input.
Method Summary
void | close() By default, closes the input Reader.
protected int | correctOffset(int currentOff) Return the corrected offset.
void | reset(Reader input) Expert: Reset the tokenizer to a new reader.
Methods inherited from class org.apache.lucene.analysis.TokenStream
end, incrementToken, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

input

protected Reader input
The text source for this Tokenizer.

Constructor Detail

Tokenizer

@Deprecated
protected Tokenizer()
Deprecated. use Tokenizer(Reader) instead.

Construct a tokenizer with null input.

Tokenizer

protected Tokenizer(Reader input)
Construct a token stream processing the given input.

Tokenizer

@Deprecated
protected Tokenizer(AttributeSource.AttributeFactory factory)
Deprecated. use Tokenizer(AttributeSource.AttributeFactory, Reader) instead.

Construct a tokenizer with null input using the given AttributeFactory.

Tokenizer

protected Tokenizer(AttributeSource.AttributeFactory factory,
                    Reader input)
Construct a token stream processing the given input using the given AttributeFactory.

Tokenizer

@Deprecated
protected Tokenizer(AttributeSource source)
Deprecated. use Tokenizer(AttributeSource, Reader) instead.

Construct a token stream processing the given input using the given AttributeSource.

Tokenizer

protected Tokenizer(AttributeSource source,
                    Reader input)
Construct a token stream processing the given input using the given AttributeSource.

Method Detail

close

public void close()
           throws IOException
By default, closes the input Reader.

Specified by:
close in interface Closeable
Overrides:
close in class TokenStream
Throws:
IOException

correctOffset

protected final int correctOffset(int currentOff)
Return the corrected offset. If input is a CharStream subclass this method calls CharStream.correctOffset(int), else returns currentOff.

Parameters:
currentOff - offset as seen in the output
Returns:
corrected offset based on the input
See Also:
CharStream.correctOffset(int)

reset

public void reset(Reader input)
           throws IOException
Expert: Reset the tokenizer to a new reader. Typically, an analyzer (in its reusableTokenStream method) will use this to re-use a previously created tokenizer.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TokenStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class TokenStream

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
CannedTokenStream, CategoryAttributesStream, EmptyTokenStream, NumericTokenStream, PrefixAndSuffixAwareTokenFilter, PrefixAwareTokenFilter, ShingleMatrixFilter, SingleTokenTokenStream, TeeSinkTokenFilter.SinkTokenStream, TokenFilter, Tokenizer, TokenStreamFromTermPositionVector
public abstract class TokenStream
extends AttributeSource
implements Closeable

A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.

This is an abstract class; concrete subclasses are:

  • Tokenizer, a TokenStream whose input is a Reader; and
  • TokenFilter, a TokenStream whose input is another TokenStream.
A new TokenStream API has been introduced with Lucene 2.9. This API has moved from being Token-based to Attribute-based. While Token still exists in 2.9 as a convenience class, the preferred way to store the information of a Token is to use AttributeImpls.

TokenStream now extends AttributeSource, which provides access to all of the token Attributes for the TokenStream. Note that only one instance per AttributeImpl is created and reused for every token. This approach reduces object creation and allows local caching of references to the AttributeImpls. See incrementToken() for further details.

The workflow of the new TokenStream API is as follows:

  1. Instantiation of TokenStream/TokenFilters which add/get attributes to/from the AttributeSource.
  2. The consumer calls reset().
  3. The consumer retrieves attributes from the stream and stores local references to all attributes it wants to access.
  4. The consumer calls incrementToken() until it returns false consuming the attributes after each call.
  5. The consumer calls end() so that any end-of-stream operations can be performed.
  6. The consumer calls close() to release any resource when finished using the TokenStream.
To make sure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in incrementToken().

You can find some example code for the new API in the analysis package level Javadoc.

Sometimes it is desirable to capture a current state of a TokenStream, e.g., for buffering purposes (see CachingTokenFilter, TeeSinkTokenFilter). For this usecase AttributeSource.captureState() and AttributeSource.restoreState(org.apache.lucene.util.AttributeSource.State) can be used.

The TokenStream-API in Lucene is based on the decorator pattern. Therefore all non-abstract subclasses must be final or have at least a final implementation of incrementToken()! This is checked when Java assertions are enabled.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Constructor Summary
protected | TokenStream() A TokenStream using the default attribute factory.
protected | TokenStream(AttributeSource.AttributeFactory factory) A TokenStream using the supplied AttributeFactory for creating new Attribute instances.
protected | TokenStream(AttributeSource input) A TokenStream that uses the same attributes as the supplied one.
Method Summary
 void close()
Releases resources associated with this stream.
 void end()
This method is called by the consumer after the last token has been consumed, after incrementToken() returned false (using the new TokenStream API).
abstract  boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset()
Resets this stream to the beginning.
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

TokenStream

protected TokenStream()
A TokenStream using the default attribute factory.

TokenStream

protected TokenStream(AttributeSource input)
A TokenStream that uses the same attributes as the supplied one.

TokenStream

protected TokenStream(AttributeSource.AttributeFactory factory)
A TokenStream using the supplied AttributeFactory for creating new Attribute instances.

Method Detail

incrementToken

public abstract boolean incrementToken()
                                throws IOException
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in incrementToken().

Returns:
false for end of stream; true otherwise
Throws:
IOException

end

public void end()
         throws IOException
This method is called by the consumer after the last token has been consumed, after incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Throws:
IOException

reset

public void reset()
           throws IOException
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after reset()).

Throws:
IOException

close

public void close()
           throws IOException
Releases resources associated with this stream.

Specified by:
close in interface Closeable
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TokenStreamToDot

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class TokenStreamToDot

java.lang.Object
    extended by  org.apache.lucene.analysis.TokenStreamToDot

public class TokenStreamToDot
extends Object

Consumes a TokenStream and outputs the dot (graphviz) string (graph).

Field Summary
protected  PrintWriter out
Constructor Summary
TokenStreamToDot(String inputText, TokenStream in, PrintWriter out)
If inputText is non-null, and the TokenStream has offsets, we include the surface form in each arc's label.
Method Summary
void | toDot()
protected void | writeArc(int fromNode, int toNode, String label, String style)
protected void | writeHeader() Override to customize.
protected void | writeNode(int name, String label)
protected void | writeTrailer() Override to customize.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

out

protected final PrintWriter out
Constructor Detail

TokenStreamToDot

public TokenStreamToDot(String inputText,
                        TokenStream in,
                        PrintWriter out)
If inputText is non-null, and the TokenStream has offsets, we include the surface form in each arc's label.

Method Detail

toDot

public void toDot()
           throws IOException
Throws:
IOException

writeArc

protected void writeArc(int fromNode,
                        int toNode,
                        String label,
                        String style)

writeNode

protected void writeNode(int name,
                         String label)

writeHeader

protected void writeHeader()
Override to customize.

writeTrailer

protected void writeTrailer()
Override to customize.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TypeTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class TypeTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.FilteringTokenFilter
                    extended by  org.apache.lucene.analysis.TypeTokenFilter
All Implemented Interfaces:
Closeable
public final class TypeTokenFilter
extends FilteringTokenFilter

Removes tokens whose types appear in a set of blocked types from a token stream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
TypeTokenFilter(boolean enablePositionIncrements, TokenStream input, Set<String> stopTypes)
TypeTokenFilter(boolean enablePositionIncrements, TokenStream input, Set<String> stopTypes, boolean useWhiteList)
Method Summary
protected  boolean accept()
By default accept the token if its type is not a stop type.
Methods inherited from class org.apache.lucene.analysis.FilteringTokenFilter
getEnablePositionIncrements, incrementToken, reset, setEnablePositionIncrements
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

TypeTokenFilter

public TypeTokenFilter(boolean enablePositionIncrements,
                       TokenStream input,
                       Set<String> stopTypes,
                       boolean useWhiteList)

TypeTokenFilter

public TypeTokenFilter(boolean enablePositionIncrements,
                       TokenStream input,
                       Set<String> stopTypes)
Method Detail

accept

protected boolean accept()
                  throws IOException
By default accept the token if its type is not a stop type. When the useWhiteList parameter is set to true then accept the token if its type is contained in the stopTypes

Specified by:
accept in class FilteringTokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ValidatingTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class ValidatingTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.ValidatingTokenFilter
All Implemented Interfaces:
Closeable
public final class ValidatingTokenFilter
extends TokenFilter

A TokenFilter that checks consistency of the tokens (eg offsets are consistent with one another).

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ValidatingTokenFilter(TokenStream in, String name, boolean offsetsAreCorrect)
The name arg is used to identify this stage when throwing exceptions (useful if you have more than one instance in your chain).
Method Summary
 void end()
Performs end-of-stream operations, if any, and calls then end() on the input TokenStream.

NOTE: Be sure to call super.end() first when overriding this method.

 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset()
Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ValidatingTokenFilter

public ValidatingTokenFilter(TokenStream in,
                             String name,
                             boolean offsetsAreCorrect)
The name arg is used to identify this stage when throwing exceptions (useful if you have more than one instance in your chain).

Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

end

public void end()
         throws IOException
Description copied from class: TokenFilter
Performs end-of-stream operations, if any, and calls then end() on the input TokenStream.

NOTE: Be sure to call super.end() first when overriding this method.

Overrides:
end in class TokenFilter
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VocabularyAssert

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class VocabularyAssert

java.lang.Object
    extended by  org.apache.lucene.analysis.VocabularyAssert

public class VocabularyAssert
extends Object

Utility class for doing vocabulary-based stemming tests

Constructor Summary
VocabularyAssert()
Method Summary
static void | assertVocabulary(Analyzer a, File zipFile, String vocOut) Run a vocabulary test against a tab-separated data file inside a zip file
static void | assertVocabulary(Analyzer a, File zipFile, String voc, String out) Run a vocabulary test against two data files inside a zip file
static void | assertVocabulary(Analyzer a, InputStream vocOut) Run a vocabulary test against one file: tab separated.
static void | assertVocabulary(Analyzer a, InputStream voc, InputStream out) Run a vocabulary test against two data files.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

VocabularyAssert

public VocabularyAssert()
Method Detail

assertVocabulary

public static void assertVocabulary(Analyzer a,
                                    InputStream voc,
                                    InputStream out)
                             throws IOException
Run a vocabulary test against two data files.

Throws:
IOException

assertVocabulary

public static void assertVocabulary(Analyzer a,
                                    InputStream vocOut)
                             throws IOException
Run a vocabulary test against one file: tab separated.

Throws:
IOException

assertVocabulary

public static void assertVocabulary(Analyzer a,
                                    File zipFile,
                                    String voc,
                                    String out)
                             throws IOException
Run a vocabulary test against two data files inside a zip file

Throws:
IOException

assertVocabulary

public static void assertVocabulary(Analyzer a,
                                    File zipFile,
                                    String vocOut)
                             throws IOException
Run a vocabulary test against a tab-separated data file inside a zip file

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WhitespaceAnalyzer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class WhitespaceAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.WhitespaceAnalyzer
All Implemented Interfaces:
Closeable
public final class WhitespaceAnalyzer
extends ReusableAnalyzerBase

An Analyzer that uses WhitespaceTokenizer.

You must specify the required Version compatibility when creating CharTokenizer:

  • As of 3.1, WhitespaceTokenizer uses an int based API to normalize and detect token codepoints. See CharTokenizer.isTokenChar(int) and CharTokenizer.normalize(int) for details.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Constructor Summary
WhitespaceAnalyzer()
Deprecated. use WhitespaceAnalyzer(Version) instead
WhitespaceAnalyzer(Version matchVersion)
Creates a new WhitespaceAnalyzer
Method Summary
protected  ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WhitespaceAnalyzer

public WhitespaceAnalyzer(Version matchVersion)
Creates a new WhitespaceAnalyzer

Parameters:
matchVersion - Lucene version to match See above

WhitespaceAnalyzer

@Deprecated
public WhitespaceAnalyzer()
Deprecated. use WhitespaceAnalyzer(Version) instead

Creates a new WhitespaceAnalyzer

Method Detail

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Description copied from class: ReusableAnalyzerBase
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
the ReusableAnalyzerBase.TokenStreamComponents for this analyzer.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WhitespaceTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class WhitespaceTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.CharTokenizer
                    extended by  org.apache.lucene.analysis.WhitespaceTokenizer
All Implemented Interfaces:
Closeable
public final class WhitespaceTokenizer
extends CharTokenizer

A WhitespaceTokenizer is a tokenizer that divides text at whitespace. Adjacent sequences of non-Whitespace characters form tokens.

You must specify the required Version compatibility when creating WhitespaceTokenizer:

  • As of 3.1, CharTokenizer uses an int based API to normalize and detect token characters. See CharTokenizer.isTokenChar(int) and CharTokenizer.normalize(int) for details.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
WhitespaceTokenizer(AttributeSource.AttributeFactory factory, Reader in)
Deprecated. use WhitespaceTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
WhitespaceTokenizer(AttributeSource source, Reader in)
Deprecated. use WhitespaceTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
WhitespaceTokenizer(Reader in)
Deprecated. use WhitespaceTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
WhitespaceTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader in)
Construct a new WhitespaceTokenizer using a given AttributeSource.AttributeFactory.
WhitespaceTokenizer(Version matchVersion, AttributeSource source, Reader in)
Construct a new WhitespaceTokenizer using a given AttributeSource.
WhitespaceTokenizer(Version matchVersion, Reader in)
Construct a new WhitespaceTokenizer.
Method Summary
protected  boolean isTokenChar(int c)
Collects only characters which do not satisfy Character.isWhitespace(int).
Methods inherited from class org.apache.lucene.analysis.CharTokenizer
end, incrementToken, isTokenChar, normalize, normalize, reset
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.analysis.TokenStream
reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

WhitespaceTokenizer

public WhitespaceTokenizer(Version matchVersion,
                           Reader in)
Construct a new WhitespaceTokenizer. * @param matchVersion Lucene version to match See above

Parameters:
in - the input to split up into tokens

WhitespaceTokenizer

public WhitespaceTokenizer(Version matchVersion,
                           AttributeSource source,
                           Reader in)
Construct a new WhitespaceTokenizer using a given AttributeSource.

Parameters:
matchVersion - Lucene version to match See above
source - the attribute source to use for this Tokenizer
in - the input to split up into tokens

WhitespaceTokenizer

public WhitespaceTokenizer(Version matchVersion,
                           AttributeSource.AttributeFactory factory,
                           Reader in)
Construct a new WhitespaceTokenizer using a given AttributeSource.AttributeFactory.

Parameters:
matchVersion - Lucene version to match See above
factory - the attribute factory to use for this Tokenizer
in - the input to split up into tokens

WhitespaceTokenizer

@Deprecated
public WhitespaceTokenizer(Reader in)
Deprecated. use WhitespaceTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.

Construct a new WhitespaceTokenizer.

WhitespaceTokenizer

@Deprecated
public WhitespaceTokenizer(AttributeSource source,
                                      Reader in)
Deprecated. use WhitespaceTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.

Construct a new WhitespaceTokenizer using a given AttributeSource.

WhitespaceTokenizer

@Deprecated
public WhitespaceTokenizer(AttributeSource.AttributeFactory factory,
                                      Reader in)
Deprecated. use WhitespaceTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.

Construct a new WhitespaceTokenizer using a given AttributeSource.AttributeFactory.

Method Detail

isTokenChar

protected boolean isTokenChar(int c)
Collects only characters which do not satisfy Character.isWhitespace(int).

Overrides:
isTokenChar in class CharTokenizer
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WordlistLoader

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis
Class WordlistLoader

java.lang.Object
    extended by  org.apache.lucene.analysis.WordlistLoader

public class WordlistLoader
extends Object

Loader for text files that represent a list of stopwords.

See Also:
to obtain {@link Reader} instances
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
WordlistLoader()
Method Summary
static CharArraySet | getSnowballWordSet(Reader reader, CharArraySet result) Reads stopwords from a stopword list in Snowball format.
static CharArraySet | getSnowballWordSet(Reader reader, Version matchVersion) Reads stopwords from a stopword list in Snowball format.
static CharArrayMap<String> | getStemDict(Reader reader, CharArrayMap<String> result) Reads a stem dictionary.
static CharArraySet | getWordSet(Reader reader, CharArraySet result) Reads lines from a Reader and adds every line as an entry to a CharArraySet (omitting leading and trailing whitespace).
static CharArraySet | getWordSet(Reader reader, String comment, CharArraySet result) Reads lines from a Reader and adds every non-comment line as an entry to a CharArraySet (omitting leading and trailing whitespace).
static CharArraySet | getWordSet(Reader reader, String comment, Version matchVersion) Reads lines from a Reader and adds every non-comment line as an entry to a CharArraySet (omitting leading and trailing whitespace).
static CharArraySet | getWordSet(Reader reader, Version matchVersion) Reads lines from a Reader and adds every line as an entry to a CharArraySet (omitting leading and trailing whitespace).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WordlistLoader

public WordlistLoader()
Method Detail

getWordSet

public static CharArraySet getWordSet(Reader reader,
                                      CharArraySet result)
                               throws IOException
Reads lines from a Reader and adds every line as an entry to a CharArraySet (omitting leading and trailing whitespace). Every line of the Reader should contain only one word. The words need to be in lowercase if you make use of an Analyzer which uses LowerCaseFilter (like StandardAnalyzer).

Parameters:
reader - Reader containing the wordlist
result - the CharArraySet to fill with the readers words
Returns:
the given CharArraySet with the reader's words
Throws:
IOException

getWordSet

public static CharArraySet getWordSet(Reader reader,
                                      Version matchVersion)
                               throws IOException
Reads lines from a Reader and adds every line as an entry to a CharArraySet (omitting leading and trailing whitespace). Every line of the Reader should contain only one word. The words need to be in lowercase if you make use of an Analyzer which uses LowerCaseFilter (like StandardAnalyzer).

Parameters:
reader - Reader containing the wordlist
matchVersion - the Lucene Version
Returns:
A CharArraySet with the reader's words
Throws:
IOException

getWordSet

public static CharArraySet getWordSet(Reader reader,
                                      String comment,
                                      Version matchVersion)
                               throws IOException
Reads lines from a Reader and adds every non-comment line as an entry to a CharArraySet (omitting leading and trailing whitespace). Every line of the Reader should contain only one word. The words need to be in lowercase if you make use of an Analyzer which uses LowerCaseFilter (like StandardAnalyzer).

Parameters:
reader - Reader containing the wordlist
comment - The string representing a comment.
matchVersion - the Lucene Version
Returns:
A CharArraySet with the reader's words
Throws:
IOException

getWordSet

public static CharArraySet getWordSet(Reader reader,
                                      String comment,
                                      CharArraySet result)
                               throws IOException
Reads lines from a Reader and adds every non-comment line as an entry to a CharArraySet (omitting leading and trailing whitespace). Every line of the Reader should contain only one word. The words need to be in lowercase if you make use of an Analyzer which uses LowerCaseFilter (like StandardAnalyzer).

Parameters:
reader - Reader containing the wordlist
comment - The string representing a comment.
result - the CharArraySet to fill with the readers words
Returns:
the given CharArraySet with the reader's words
Throws:
IOException

getSnowballWordSet

public static CharArraySet getSnowballWordSet(Reader reader,
                                              CharArraySet result)
                                       throws IOException
Reads stopwords from a stopword list in Snowball format.

The snowball format is the following:

  • Lines may contain multiple words separated by whitespace.
  • The comment character is the vertical line (|).
  • Lines may contain trailing comments.

Parameters:
reader - Reader containing a Snowball stopword list
result - the CharArraySet to fill with the readers words
Returns:
the given CharArraySet with the reader's words
Throws:
IOException

getSnowballWordSet

public static CharArraySet getSnowballWordSet(Reader reader,
                                              Version matchVersion)
                                       throws IOException
Reads stopwords from a stopword list in Snowball format.

The snowball format is the following:

  • Lines may contain multiple words separated by whitespace.
  • The comment character is the vertical line (|).
  • Lines may contain trailing comments.

Parameters:
reader - Reader containing a Snowball stopword list
matchVersion - the Lucene Version
Returns:
A CharArraySet with the reader's words
Throws:
IOException

getStemDict

public static CharArrayMap<String> getStemDict(Reader reader,
                                               CharArrayMap<String> result)
                                        throws IOException
Reads a stem dictionary. Each line contains:
word\tstem
(i.e. two tab separated words)

Returns:
stem dictionary that overrules the stemming algorithm
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ArabicAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ar
Class ArabicAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.ar.ArabicAnalyzer
All Implemented Interfaces:
Closeable
public final class ArabicAnalyzer
extends StopwordAnalyzerBase

Analyzer for Arabic.

This analyzer implements light-stemming as specified by: Light Stemming for Arabic Information Retrieval http://www.mtholyoke.edu/~lballest/Pubs/arab_stem05.pdf

The analysis package contains three primary components:

  • ArabicNormalizationFilter: Arabic orthographic normalization.
  • ArabicStemFilter: Arabic light stemming
  • Arabic stop words file: a set of default Arabic stop words.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String | DEFAULT_STOPWORD_FILE File containing default Arabic stopwords.
static String | STOPWORDS_COMMENT Deprecated. use WordlistLoader.getWordSet(Reader, String, Version) directly
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
ArabicAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
ArabicAnalyzer(Version matchVersion, File stopwords)
Deprecated. use ArabicAnalyzer(Version, Set) instead
ArabicAnalyzer(Version matchVersion, Hashtable<?,?> stopwords)
Deprecated. use ArabicAnalyzer(Version, Set) instead
ArabicAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
ArabicAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop word.
ArabicAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use ArabicAnalyzer(Version, Set) instead
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop-words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Arabic stopwords. Default stopword list is from http://members.unine.ch/jacques.savoy/clef/index.html The stopword list is BSD-Licensed.

See Also:
Constant Field Values

STOPWORDS_COMMENT

@Deprecated
public static final String STOPWORDS_COMMENT
Deprecated. use WordlistLoader.getWordSet(Reader, String, Version) directly
The comment character in the stopwords file. All lines prefixed with this will be ignored

See Also:
Constant Field Values
Constructor Detail

ArabicAnalyzer

public ArabicAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

ArabicAnalyzer

public ArabicAnalyzer(Version matchVersion,
                      Set<?> stopwords)
Builds an analyzer with the given stop words

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

ArabicAnalyzer

public ArabicAnalyzer(Version matchVersion,
                      Set<?> stopwords,
                      Set<?> stemExclusionSet)
Builds an analyzer with the given stop word. If a none-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before ArabicStemFilter.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed

ArabicAnalyzer

@Deprecated
public ArabicAnalyzer(Version matchVersion,
                                 String... stopwords)
Deprecated. use ArabicAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

ArabicAnalyzer

@Deprecated
public ArabicAnalyzer(Version matchVersion,
                                 Hashtable<?,?> stopwords)
Deprecated. use ArabicAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

ArabicAnalyzer

@Deprecated
public ArabicAnalyzer(Version matchVersion,
                                 File stopwords)
               throws IOException
Deprecated. use ArabicAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words. Lines can be commented out using STOPWORDS_COMMENT

Throws:
IOException
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.

Returns:
an unmodifiable instance of the default stop-words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with LowerCaseFilter, StopFilter, ArabicNormalizationFilter, KeywordMarkerFilter if a stem exclusion set is provided and ArabicStemFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ArabicLetterTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ar
Class ArabicLetterTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.CharTokenizer
                    extended by  org.apache.lucene.analysis.LetterTokenizer
                        extended by  org.apache.lucene.analysis.ar.ArabicLetterTokenizer
All Implemented Interfaces:
Closeable
Deprecated. (3.1) Use StandardTokenizer instead.

@Deprecated
public class ArabicLetterTokenizer
extends LetterTokenizer

Tokenizer that breaks text into runs of letters and diacritics.

The problem with the standard Letter tokenizer is that it fails on diacritics. Handling similar to this is necessary for Indic Scripts, Hebrew, Thaana, etc.

You must specify the required Version compatibility when creating ArabicLetterTokenizer:

  • As of 3.1, CharTokenizer uses an int based API to normalize and detect token characters. See isTokenChar(int) and CharTokenizer.normalize(int) for details.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
ArabicLetterTokenizer(AttributeSource.AttributeFactory factory, Reader in)
Deprecated. use ArabicLetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
ArabicLetterTokenizer(AttributeSource source, Reader in)
Deprecated. use ArabicLetterTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
ArabicLetterTokenizer(Reader in)
Deprecated. use ArabicLetterTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
ArabicLetterTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader in)
Deprecated. Construct a new ArabicLetterTokenizer using a given AttributeSource.AttributeFactory.
ArabicLetterTokenizer(Version matchVersion, AttributeSource source, Reader in)
Deprecated. Construct a new ArabicLetterTokenizer using a given AttributeSource.
ArabicLetterTokenizer(Version matchVersion, Reader in)
Deprecated. Construct a new ArabicLetterTokenizer.
Method Summary
protected  boolean isTokenChar(int c)
Deprecated. Allows for Letter category or NonspacingMark category
Methods inherited from class org.apache.lucene.analysis.CharTokenizer
end, incrementToken, isTokenChar, normalize, normalize, reset
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.analysis.TokenStream
reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ArabicLetterTokenizer

public ArabicLetterTokenizer(Version matchVersion,
                             Reader in)
Deprecated.
Construct a new ArabicLetterTokenizer.

Parameters:
matchVersion - Lucene version to match See above
in - the input to split up into tokens

ArabicLetterTokenizer

public ArabicLetterTokenizer(Version matchVersion,
                             AttributeSource source,
                             Reader in)
Deprecated.
Construct a new ArabicLetterTokenizer using a given AttributeSource.

Parameters:
matchVersion - Lucene version to match See above
source - the attribute source to use for this Tokenizer
in - the input to split up into tokens

ArabicLetterTokenizer

public ArabicLetterTokenizer(Version matchVersion,
                             AttributeSource.AttributeFactory factory,
                             Reader in)
Deprecated.
Construct a new ArabicLetterTokenizer using a given AttributeSource.AttributeFactory. * @param matchVersion Lucene version to match See above

Parameters:
factory - the attribute factory to use for this Tokenizer
in - the input to split up into tokens

ArabicLetterTokenizer

@Deprecated
public ArabicLetterTokenizer(Reader in)
Deprecated. use ArabicLetterTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.

Construct a new ArabicLetterTokenizer.

ArabicLetterTokenizer

@Deprecated
public ArabicLetterTokenizer(AttributeSource source,
                                        Reader in)
Deprecated. use ArabicLetterTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.

Construct a new ArabicLetterTokenizer using a given AttributeSource.

ArabicLetterTokenizer

@Deprecated
public ArabicLetterTokenizer(AttributeSource.AttributeFactory factory,
                                        Reader in)
Deprecated. use ArabicLetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.

Construct a new ArabicLetterTokenizer using a given AttributeSource.AttributeFactory.

Method Detail

isTokenChar

protected boolean isTokenChar(int c)
Deprecated.
Allows for Letter category or NonspacingMark category

Overrides:
isTokenChar in class LetterTokenizer
See Also:
LetterTokenizer.isTokenChar(int)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ArabicNormalizationFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ar
Class ArabicNormalizationFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.ar.ArabicNormalizationFilter
All Implemented Interfaces:
Closeable
public final class ArabicNormalizationFilter
extends TokenFilter

A TokenFilter that applies ArabicNormalizer to normalize the orthography.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ArabicNormalizationFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ArabicNormalizationFilter

public ArabicNormalizationFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ArabicNormalizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ar
Class ArabicNormalizer

java.lang.Object
    extended by  org.apache.lucene.analysis.ar.ArabicNormalizer

public class ArabicNormalizer
extends Object

Normalizer for Arabic.

Normalization is done in-place for efficiency, operating on a termbuffer.

Normalization is defined as:

  • Normalization of hamza with alef seat to a bare alef.
  • Normalization of teh marbuta to heh
  • Normalization of dotless yeh (alef maksura) to yeh.
  • Removal of Arabic diacritics (the harakat)
  • Removal of tatweel (stretching character).

Field Summary
static char | ALEF
static char | ALEF_HAMZA_ABOVE
static char | ALEF_HAMZA_BELOW
static char | ALEF_MADDA
static char | DAMMA
static char | DAMMATAN
static char | DOTLESS_YEH
static char | FATHA
static char | FATHATAN
static char | HEH
static char | KASRA
static char | KASRATAN
static char | SHADDA
static char | SUKUN
static char | TATWEEL
static char | TEH_MARBUTA
static char | YEH
Constructor Summary
ArabicNormalizer()
Method Summary
 int normalize(char[] s, int len)
Normalize an input buffer of Arabic text
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

ALEF

public static final char ALEF
See Also:
Constant Field Values

ALEF_MADDA

public static final char ALEF_MADDA
See Also:
Constant Field Values

ALEF_HAMZA_ABOVE

public static final char ALEF_HAMZA_ABOVE
See Also:
Constant Field Values

ALEF_HAMZA_BELOW

public static final char ALEF_HAMZA_BELOW
See Also:
Constant Field Values

YEH

public static final char YEH
See Also:
Constant Field Values

DOTLESS_YEH

public static final char DOTLESS_YEH
See Also:
Constant Field Values

TEH_MARBUTA

public static final char TEH_MARBUTA
See Also:
Constant Field Values

HEH

public static final char HEH
See Also:
Constant Field Values

TATWEEL

public static final char TATWEEL
See Also:
Constant Field Values

FATHATAN

public static final char FATHATAN
See Also:
Constant Field Values

DAMMATAN

public static final char DAMMATAN
See Also:
Constant Field Values

KASRATAN

public static final char KASRATAN
See Also:
Constant Field Values

FATHA

public static final char FATHA
See Also:
Constant Field Values

DAMMA

public static final char DAMMA
See Also:
Constant Field Values

KASRA

public static final char KASRA
See Also:
Constant Field Values

SHADDA

public static final char SHADDA
See Also:
Constant Field Values

SUKUN

public static final char SUKUN
See Also:
Constant Field Values
Constructor Detail

ArabicNormalizer

public ArabicNormalizer()
Method Detail

normalize

public int normalize(char[] s,
                     int len)
Normalize an input buffer of Arabic text

Parameters:
s - input buffer
len - length of input buffer
Returns:
length of input buffer after normalization
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ArabicStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ar
Class ArabicStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.ar.ArabicStemFilter
All Implemented Interfaces:
Closeable
public final class ArabicStemFilter
extends TokenFilter

A TokenFilter that applies ArabicStemmer to stem Arabic words..

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

See Also:
KeywordMarkerFilter

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ArabicStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ArabicStemFilter

public ArabicStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ArabicStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ar
Class ArabicStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.ar.ArabicStemmer

public class ArabicStemmer
extends Object

Stemmer for Arabic.

Stemming is done in-place for efficiency, operating on a termbuffer.

Stemming is defined as:

  • Removal of attached definite article, conjunction, and prepositions.
  • Stemming of common suffixes.

Field Summary
static char | ALEF
static char | BEH
static char | FEH
static char | HEH
static char | KAF
static char | LAM
static char | NOON
static char[][] | prefixes
static char[][] | suffixes
static char | TEH
static char | TEH_MARBUTA
static char | WAW
static char | YEH
Constructor Summary
ArabicStemmer()
Method Summary
int | stem(char[] s, int len) Stem an input buffer of Arabic text.
int | stemPrefix(char[] s, int len) Stem a prefix off an Arabic word.
int | stemSuffix(char[] s, int len) Stem suffix(es) off an Arabic word.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

ALEF

public static final char ALEF
See Also:
Constant Field Values

BEH

public static final char BEH
See Also:
Constant Field Values

TEH_MARBUTA

public static final char TEH_MARBUTA
See Also:
Constant Field Values

TEH

public static final char TEH
See Also:
Constant Field Values

FEH

public static final char FEH
See Also:
Constant Field Values

KAF

public static final char KAF
See Also:
Constant Field Values

LAM

public static final char LAM
See Also:
Constant Field Values

NOON

public static final char NOON
See Also:
Constant Field Values

HEH

public static final char HEH
See Also:
Constant Field Values

WAW

public static final char WAW
See Also:
Constant Field Values

YEH

public static final char YEH
See Also:
Constant Field Values

prefixes

public static final char[][] prefixes

suffixes

public static final char[][] suffixes
Constructor Detail

ArabicStemmer

public ArabicStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Stem an input buffer of Arabic text.

Parameters:
s - input buffer
len - length of input buffer
Returns:
length of input buffer after normalization

stemPrefix

public int stemPrefix(char[] s,
                      int len)
Stem a prefix off an Arabic word.

Parameters:
s - input buffer
len - length of input buffer
Returns:
new length of input buffer after stemming.

stemSuffix

public int stemSuffix(char[] s,
                      int len)
Stem suffix(es) off an Arabic word.

Parameters:
s - input buffer
len - length of input buffer
Returns:
new length of input buffer after stemming
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.ar
Classes
ArabicAnalyzer
ArabicLetterTokenizer
ArabicNormalizationFilter
ArabicNormalizer
ArabicStemFilter
ArabicStemmer


org.apache.lucene.analysis.ar

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.ar

Analyzer for Arabic.

See:
Description

Class Summary
ArabicAnalyzer | Analyzer for Arabic.
ArabicLetterTokenizer | Deprecated. (3.1) Use StandardTokenizer instead.
ArabicNormalizationFilter | A TokenFilter that applies ArabicNormalizer to normalize the orthography.
ArabicNormalizer | Normalizer for Arabic.
ArabicStemFilter | A TokenFilter that applies ArabicStemmer to stem Arabic words..
ArabicStemmer | Stemmer for Arabic.

Package org.apache.lucene.analysis.ar Description

Analyzer for Arabic.


org.apache.lucene.analysis.ar Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.ar

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.ar.ArabicAnalyzer
    • org.apache.lucene.analysis.ar.ArabicNormalizer
    • org.apache.lucene.analysis.ar.ArabicStemmer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.ar.ArabicNormalizationFilter
          • org.apache.lucene.analysis.ar.ArabicStemFilter
        • org.apache.lucene.analysis.Tokenizer
          • org.apache.lucene.analysis.CharTokenizer
            • org.apache.lucene.analysis.LetterTokenizer
              • org.apache.lucene.analysis.ar.ArabicLetterTokenizer


Uses of Package org.apache.lucene.analysis.ar

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.ar

No usage of org.apache.lucene.analysis.ar

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ar.ArabicAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ar.ArabicAnalyzer

No usage of org.apache.lucene.analysis.ar.ArabicAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ar.ArabicLetterTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ar.ArabicLetterTokenizer

No usage of org.apache.lucene.analysis.ar.ArabicLetterTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ar.ArabicNormalizationFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ar.ArabicNormalizationFilter

No usage of org.apache.lucene.analysis.ar.ArabicNormalizationFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ar.ArabicNormalizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ar.ArabicNormalizer

No usage of org.apache.lucene.analysis.ar.ArabicNormalizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ar.ArabicStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ar.ArabicStemFilter

No usage of org.apache.lucene.analysis.ar.ArabicStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ar.ArabicStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ar.ArabicStemmer

No usage of org.apache.lucene.analysis.ar.ArabicStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


BulgarianAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.bg
Class BulgarianAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.bg.BulgarianAnalyzer
All Implemented Interfaces:
Closeable
public final class BulgarianAnalyzer
extends StopwordAnalyzerBase

Analyzer for Bulgarian.

This analyzer implements light-stemming as specified by: Searching Strategies for the Bulgarian Language http://members.unine.ch/jacques.savoy/Papers/BUIR.pdf

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String | DEFAULT_STOPWORD_FILE File containing default Bulgarian stopwords.
static String | STOPWORDS_COMMENT Deprecated. use WordlistLoader.getWordSet(Reader, String, Version) directly
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
BulgarianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
BulgarianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
BulgarianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words and a stem exclusion set.
Method Summary
ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop-words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Bulgarian stopwords. Default stopword list is from http://members.unine.ch/jacques.savoy/clef/index.html The stopword list is BSD-Licensed.

See Also:
Constant Field Values

STOPWORDS_COMMENT

@Deprecated
public static final String STOPWORDS_COMMENT
Deprecated. use WordlistLoader.getWordSet(Reader, String, Version) directly
The comment character in the stopwords file. All lines prefixed with this will be ignored

See Also:
Constant Field Values
Constructor Detail

BulgarianAnalyzer

public BulgarianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

BulgarianAnalyzer

public BulgarianAnalyzer(Version matchVersion,
                         Set<?> stopwords)
Builds an analyzer with the given stop words.

BulgarianAnalyzer

public BulgarianAnalyzer(Version matchVersion,
                         Set<?> stopwords,
                         Set<?> stemExclusionSet)
Builds an analyzer with the given stop words and a stem exclusion set. If a stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before BulgarianStemFilter.

Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.

Returns:
an unmodifiable instance of the default stop-words set.

createComponents

public ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                   Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and BulgarianStemFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BulgarianStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.bg
Class BulgarianStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.bg.BulgarianStemFilter
All Implemented Interfaces:
Closeable
public final class BulgarianStemFilter
extends TokenFilter

A TokenFilter that applies BulgarianStemmer to stem Bulgarian words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
BulgarianStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

BulgarianStemFilter

public BulgarianStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BulgarianStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.bg
Class BulgarianStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.bg.BulgarianStemmer

public class BulgarianStemmer
extends Object

Light Stemmer for Bulgarian.

Implements the algorithm described in: Searching Strategies for the Bulgarian Language http://members.unine.ch/jacques.savoy/Papers/BUIR.pdf

Constructor Summary
BulgarianStemmer()
Method Summary
 int stem(char[] s, int len)
Stem an input buffer of Bulgarian text.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BulgarianStemmer

public BulgarianStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Stem an input buffer of Bulgarian text.

Parameters:
s - input buffer
len - length of input buffer
Returns:
length of input buffer after normalization
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.bg
Classes
BulgarianAnalyzer
BulgarianStemFilter
BulgarianStemmer


org.apache.lucene.analysis.bg

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.bg

Analyzer for Bulgarian.

See:
Description

Class Summary
BulgarianAnalyzer | Analyzer for Bulgarian.
BulgarianStemFilter | A TokenFilter that applies BulgarianStemmer to stem Bulgarian words.
BulgarianStemmer | Light Stemmer for Bulgarian.

Package org.apache.lucene.analysis.bg Description

Analyzer for Bulgarian.


org.apache.lucene.analysis.bg Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.bg

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.bg.BulgarianAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.bg.BulgarianStemFilter
    • org.apache.lucene.analysis.bg.BulgarianStemmer


Uses of Package org.apache.lucene.analysis.bg

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.bg

No usage of org.apache.lucene.analysis.bg

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.bg.BulgarianAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.bg.BulgarianAnalyzer

No usage of org.apache.lucene.analysis.bg.BulgarianAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.bg.BulgarianStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.bg.BulgarianStemFilter

No usage of org.apache.lucene.analysis.bg.BulgarianStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.bg.BulgarianStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.bg.BulgarianStemmer

No usage of org.apache.lucene.analysis.bg.BulgarianStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


BrazilianAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.br
Class BrazilianAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.br.BrazilianAnalyzer
All Implemented Interfaces:
Closeable
public final class BrazilianAnalyzer
extends StopwordAnalyzerBase

Analyzer for Brazilian Portuguese language.

Supports an external list of stopwords (words that will not be indexed at all) and an external list of exclusions (words that will not be stemmed, but indexed).

NOTE: This class uses the same Version dependent settings as StandardAnalyzer.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String[] | BRAZILIAN_STOP_WORDS Deprecated. use getDefaultStopSet() instead
static String | DEFAULT_STOPWORD_FILE File containing default Brazilian Portuguese stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
BrazilianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (getDefaultStopSet()).
BrazilianAnalyzer(Version matchVersion, File stopwords)
Deprecated. use BrazilianAnalyzer(Version, Set) instead
BrazilianAnalyzer(Version matchVersion, Map<?,?> stopwords)
Deprecated. use BrazilianAnalyzer(Version, Set) instead
BrazilianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
BrazilianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words and stemming exclusion words
BrazilianAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use BrazilianAnalyzer(Version, Set) instead
Method Summary
protected  ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.
 void setStemExclusionTable(File exclusionlist)
Deprecated. use BrazilianAnalyzer(Version, Set, Set) instead
 void setStemExclusionTable(Map<?,?> exclusionlist)
Deprecated. use BrazilianAnalyzer(Version, Set, Set) instead
 void setStemExclusionTable(String... exclusionlist)
Deprecated. use BrazilianAnalyzer(Version, Set, Set) instead
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

BRAZILIAN_STOP_WORDS

@Deprecated
public static final String[] BRAZILIAN_STOP_WORDS
Deprecated. use getDefaultStopSet() instead
List of typical Brazilian Portuguese stopwords.

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Brazilian Portuguese stopwords.

See Also:
Constant Field Values
Constructor Detail

BrazilianAnalyzer

public BrazilianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (getDefaultStopSet()).

BrazilianAnalyzer

public BrazilianAnalyzer(Version matchVersion,
                         Set<?> stopwords)
Builds an analyzer with the given stop words

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

BrazilianAnalyzer

public BrazilianAnalyzer(Version matchVersion,
                         Set<?> stopwords,
                         Set<?> stemExclusionSet)
Builds an analyzer with the given stop words and stemming exclusion words

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

BrazilianAnalyzer

@Deprecated
public BrazilianAnalyzer(Version matchVersion,
                                    String... stopwords)
Deprecated. use BrazilianAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

BrazilianAnalyzer

@Deprecated
public BrazilianAnalyzer(Version matchVersion,
                                    Map<?,?> stopwords)
Deprecated. use BrazilianAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

BrazilianAnalyzer

@Deprecated
public BrazilianAnalyzer(Version matchVersion,
                                    File stopwords)
                  throws IOException
Deprecated. use BrazilianAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

Throws:
IOException
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.

Returns:
an unmodifiable instance of the default stop-words set.

setStemExclusionTable

@Deprecated
public void setStemExclusionTable(String... exclusionlist)
Deprecated. use BrazilianAnalyzer(Version, Set, Set) instead

Builds an exclusionlist from an array of Strings.

setStemExclusionTable

@Deprecated
public void setStemExclusionTable(Map<?,?> exclusionlist)
Deprecated. use BrazilianAnalyzer(Version, Set, Set) instead

Builds an exclusionlist from a Map.

setStemExclusionTable

@Deprecated
public void setStemExclusionTable(File exclusionlist)
                           throws IOException
Deprecated. use BrazilianAnalyzer(Version, Set, Set) instead

Builds an exclusionlist from the words contained in the given file.

Throws:
IOException

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
ReusableAnalyzerBase.TokenStreamComponents built from a StandardTokenizer filtered with LowerCaseFilter, StandardFilter, StopFilter , and BrazilianStemFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BrazilianStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.br
Class BrazilianStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.br.BrazilianStemFilter
All Implemented Interfaces:
Closeable
public final class BrazilianStemFilter
extends TokenFilter

A TokenFilter that applies BrazilianStemmer.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

See Also:
KeywordMarkerFilter

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
BrazilianStemFilter(TokenStream in)
Creates a new BrazilianStemFilter
BrazilianStemFilter(TokenStream in, Set<?> exclusiontable)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

BrazilianStemFilter

public BrazilianStemFilter(TokenStream in)
Creates a new BrazilianStemFilter

Parameters:
in - the source TokenStream

BrazilianStemFilter

@Deprecated
public BrazilianStemFilter(TokenStream in,
                                      Set<?> exclusiontable)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.

Creates a new BrazilianStemFilter

Parameters:
in - the source TokenStream
exclusiontable - a set of terms that should be prevented from being stemmed.
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BrazilianStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.br
Class BrazilianStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.br.BrazilianStemmer

public class BrazilianStemmer
extends Object

A stemmer for Brazilian Portuguese words.

Constructor Summary
BrazilianStemmer()
Method Summary
String | log() For log and debug purpose
protected String | stem(String term) Stems the given term to an unique discriminator.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BrazilianStemmer

public BrazilianStemmer()
Method Detail

stem

protected String stem(String term)
Stems the given term to an unique discriminator.

Parameters:
term - The term that should be stemmed.
Returns:
Discriminator for term

log

public String log()
For log and debug purpose

Returns:
TERM, CT, RV, R1 and R2
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.br
Classes
BrazilianAnalyzer
BrazilianStemFilter
BrazilianStemmer


org.apache.lucene.analysis.br

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.br

Analyzer for Brazilian Portuguese.

See:
Description

Class Summary
BrazilianAnalyzer | Analyzer for Brazilian Portuguese language.
BrazilianStemFilter | A TokenFilter that applies BrazilianStemmer.
BrazilianStemmer | A stemmer for Brazilian Portuguese words.

Package org.apache.lucene.analysis.br Description

Analyzer for Brazilian Portuguese.


org.apache.lucene.analysis.br Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.br

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.br.BrazilianAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.br.BrazilianStemFilter
    • org.apache.lucene.analysis.br.BrazilianStemmer


Uses of Package org.apache.lucene.analysis.br

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.br

No usage of org.apache.lucene.analysis.br

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.br.BrazilianAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.br.BrazilianAnalyzer

No usage of org.apache.lucene.analysis.br.BrazilianAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.br.BrazilianStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.br.BrazilianStemFilter

No usage of org.apache.lucene.analysis.br.BrazilianStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.br.BrazilianStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.br.BrazilianStemmer

No usage of org.apache.lucene.analysis.br.BrazilianStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CatalanAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ca
Class CatalanAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.ca.CatalanAnalyzer
All Implemented Interfaces:
Closeable
public final class CatalanAnalyzer
extends StopwordAnalyzerBase

Analyzer for Catalan.

You must specify the required Version compatibility when creating CatalanAnalyzer:

  • As of 3.6, ElisionFilter with a set of Catalan contractions is used by default.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Catalan stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
CatalanAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
CatalanAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
CatalanAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Catalan stopwords.

See Also:
Constant Field Values
Constructor Detail

CatalanAnalyzer

public CatalanAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

CatalanAnalyzer

public CatalanAnalyzer(Version matchVersion,
                       Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

CatalanAnalyzer

public CatalanAnalyzer(Version matchVersion,
                       Set<?> stopwords,
                       Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and SnowballFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.ca
Classes
CatalanAnalyzer


org.apache.lucene.analysis.ca

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.ca

Analyzer for Catalan.

See:
Description

Class Summary
CatalanAnalyzer Analyzer for Catalan.

Package org.apache.lucene.analysis.ca Description

Analyzer for Catalan.


org.apache.lucene.analysis.ca Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.ca

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.ca.CatalanAnalyzer


Uses of Package org.apache.lucene.analysis.ca

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.ca

No usage of org.apache.lucene.analysis.ca

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ca.CatalanAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ca.CatalanAnalyzer

No usage of org.apache.lucene.analysis.ca.CatalanAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


HTMLStripCharFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.charfilter
Class HTMLStripCharFilter

java.lang.Object
    extended by  java.io.Reader
        extended by  org.apache.lucene.analysis.CharStream
            extended by  org.apache.lucene.analysis.CharFilter
                extended by  org.apache.lucene.analysis.BaseCharFilter
                    extended by  org.apache.lucene.analysis.charfilter.HTMLStripCharFilter
All Implemented Interfaces:
Closeable, Readable
public final class HTMLStripCharFilter
extends BaseCharFilter

A CharFilter that wraps another Reader and attempts to strip out HTML constructs.

Field Summary
Fields inherited from class org.apache.lucene.analysis.CharFilter
input
Fields inherited from class java.io.Reader
lock
Constructor Summary
HTMLStripCharFilter(CharStream source)
HTMLStripCharFilter(CharStream source, Set<String> escapedTags)
Method Summary
void | close()
int | read()
int | read(char[] cbuf, int off, int len)
Methods inherited from class org.apache.lucene.analysis.BaseCharFilter
addOffCorrectMap, correct, getLastCumulativeDiff
Methods inherited from class org.apache.lucene.analysis.CharFilter
correctOffset, mark, markSupported, reset
Methods inherited from class java.io.Reader
read, read, ready, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HTMLStripCharFilter

public HTMLStripCharFilter(CharStream source)
Parameters:
source -

HTMLStripCharFilter

public HTMLStripCharFilter(CharStream source,
                           Set<String> escapedTags)
Parameters:
source -
escapedTags - Tags in this set (both start and end tags) will not be filtered out.
Method Detail

read

public int read()
         throws IOException
Overrides:
read in class Reader
Throws:
IOException

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Overrides:
read in class CharFilter
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class CharFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.charfilter
Classes
HTMLStripCharFilter


org.apache.lucene.analysis.charfilter

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.charfilter

CharFilters: process text before the Tokenizer

See:
Description

Class Summary
HTMLStripCharFilter A CharFilter that wraps another Reader and attempts to strip out HTML constructs.

Package org.apache.lucene.analysis.charfilter Description

CharFilters: process text before the Tokenizer


org.apache.lucene.analysis.charfilter Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.charfilter

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • java.io.Reader (implements java.io.Closeable, java.lang.Readable)
      • org.apache.lucene.analysis.CharStream
        • org.apache.lucene.analysis.CharFilter
          • org.apache.lucene.analysis.BaseCharFilter
            • org.apache.lucene.analysis.charfilter.HTMLStripCharFilter


Uses of Package org.apache.lucene.analysis.charfilter

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.charfilter

No usage of org.apache.lucene.analysis.charfilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.charfilter.HTMLStripCharFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.charfilter.HTMLStripCharFilter

No usage of org.apache.lucene.analysis.charfilter.HTMLStripCharFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CJKAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cjk
Class CJKAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.cjk.CJKAnalyzer
All Implemented Interfaces:
Closeable
public final class CJKAnalyzer
extends StopwordAnalyzerBase

An Analyzer that tokenizes text with StandardTokenizer, normalizes content with CJKWidthFilter, folds case with LowerCaseFilter, forms bigrams of CJK with CJKBigramFilter, and filters stopwords with StopFilter

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String[] STOP_WORDS
Deprecated. use getDefaultStopSet() instead
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
CJKAnalyzer(Version matchVersion)
Builds an analyzer which removes words in getDefaultStopSet().
CJKAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
CJKAnalyzer(Version matchVersion, String... stopWords)
Deprecated. use CJKAnalyzer(Version, Set) instead
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop-words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

STOP_WORDS

@Deprecated
public static final String[] STOP_WORDS
Deprecated. use getDefaultStopSet() instead
An array containing some common English words that are not usually useful for searching and some double-byte interpunctions.

Constructor Detail

CJKAnalyzer

public CJKAnalyzer(Version matchVersion)
Builds an analyzer which removes words in getDefaultStopSet().

CJKAnalyzer

public CJKAnalyzer(Version matchVersion,
                   Set<?> stopwords)
Builds an analyzer with the given stop words

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

CJKAnalyzer

@Deprecated
public CJKAnalyzer(Version matchVersion,
                              String... stopWords)
Deprecated. use CJKAnalyzer(Version, Set) instead

Builds an analyzer which removes words in the provided array.

Parameters:
stopWords - stop word array
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.

Returns:
an unmodifiable instance of the default stop-words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Description copied from class: ReusableAnalyzerBase
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
the ReusableAnalyzerBase.TokenStreamComponents for this analyzer.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CJKBigramFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cjk
Class CJKBigramFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.cjk.CJKBigramFilter
All Implemented Interfaces:
Closeable
public final class CJKBigramFilter
extends TokenFilter

Forms bigrams of CJK terms that are generated from StandardTokenizer or ICUTokenizer.

CJK types are set by these tokenizers, but you can also use CJKBigramFilter(TokenStream, int) to explicitly control which of the CJK scripts are turned into bigrams.

In all cases, all non-CJK input is passed thru unmodified.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static String | DOUBLE_TYPE when we emit a bigram, its then marked as this type
static int | HAN bigram flag for Han Ideographs
static int | HANGUL bigram flag for Hangul
static int | HIRAGANA bigram flag for Hiragana
static int | KATAKANA bigram flag for Katakana
static String | SINGLE_TYPE when we emit a unigram, its then marked as this type
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
CJKBigramFilter(TokenStream in)
Calls CJKBigramFilter(HAN | HIRAGANA | KATAKANA | HANGUL)
CJKBigramFilter(TokenStream in, int flags)
Create a new CJKBigramFilter, specifying which writing systems should be bigrammed.
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

HAN

public static final int HAN
bigram flag for Han Ideographs

See Also:
Constant Field Values

HIRAGANA

public static final int HIRAGANA
bigram flag for Hiragana

See Also:
Constant Field Values

KATAKANA

public static final int KATAKANA
bigram flag for Katakana

See Also:
Constant Field Values

HANGUL

public static final int HANGUL
bigram flag for Hangul

See Also:
Constant Field Values

DOUBLE_TYPE

public static final String DOUBLE_TYPE
when we emit a bigram, its then marked as this type

See Also:
Constant Field Values

SINGLE_TYPE

public static final String SINGLE_TYPE
when we emit a unigram, its then marked as this type

See Also:
Constant Field Values
Constructor Detail

CJKBigramFilter

public CJKBigramFilter(TokenStream in)
Calls CJKBigramFilter(HAN | HIRAGANA | KATAKANA | HANGUL)

CJKBigramFilter

public CJKBigramFilter(TokenStream in,
                       int flags)
Create a new CJKBigramFilter, specifying which writing systems should be bigrammed.

Parameters:
flags - OR'ed set from HAN, HIRAGANA, KATAKANA, HANGUL
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CJKTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cjk
Class CJKTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.cjk.CJKTokenizer
All Implemented Interfaces:
Closeable
Deprecated. Use StandardTokenizer, CJKWidthFilter, CJKBigramFilter, and LowerCaseFilter instead.

@Deprecated
public final class CJKTokenizer
extends Tokenizer

CJKTokenizer is designed for Chinese, Japanese, and Korean languages.

The tokens returned are every two adjacent characters with overlap match.

Example: "java C1C2C3C4" will be segmented to: "java" "C1C2" "C2C3" "C3C4".

Additionally, the following is applied to Latin text (such as English):
  • Text is converted to lowercase.
  • Numeric digits, '+', '#', and '_' are tokenized as letters.
  • Full-width forms are converted to half-width forms.
For more info on Asian language (Chinese, Japanese, and Korean) text segmentation: please search google

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
CJKTokenizer(AttributeSource.AttributeFactory factory, Reader in)
Deprecated.
CJKTokenizer(AttributeSource source, Reader in)
Deprecated.
CJKTokenizer(Reader in)
Deprecated. Construct a token stream processing the given input.
Method Summary
 void end()
Deprecated. This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 boolean incrementToken()
Deprecated. Returns true for the next token in the stream, or false at EOS.
 void reset()
Deprecated. Resets this stream to the beginning.
 void reset(Reader reader)
Deprecated. Expert: Reset the tokenizer to a new reader.
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CJKTokenizer

public CJKTokenizer(Reader in)
Deprecated.
Construct a token stream processing the given input.

Parameters:
in - I/O reader

CJKTokenizer

public CJKTokenizer(AttributeSource source,
                    Reader in)
Deprecated.

CJKTokenizer

public CJKTokenizer(AttributeSource.AttributeFactory factory,
                    Reader in)
Deprecated.
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Deprecated.
Returns true for the next token in the stream, or false at EOS. See http://java.sun.com/j2se/1.3/docs/api/java/lang/Character.UnicodeBlock.html for detail.

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream, true otherwise
Throws:
IOException - - throw IOException when read error
happened in the InputStream

end

public final void end()
Deprecated.
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream

reset

public void reset()
           throws IOException
Deprecated.
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException

reset

public void reset(Reader reader)
           throws IOException
Deprecated.
Description copied from class: Tokenizer
Expert: Reset the tokenizer to a new reader. Typically, an analyzer (in its reusableTokenStream method) will use this to re-use a previously created tokenizer.

Overrides:
reset in class Tokenizer
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CJKWidthFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cjk
Class CJKWidthFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.cjk.CJKWidthFilter
All Implemented Interfaces:
Closeable
public final class CJKWidthFilter
extends TokenFilter

A TokenFilter that normalizes CJK width differences:

  • Folds fullwidth ASCII variants into the equivalent basic latin
  • Folds halfwidth Katakana variants into the equivalent kana

NOTE: this filter can be viewed as a (practical) subset of NFKC/NFKD Unicode normalization. See the normalization support in the ICU package for full normalization.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
CJKWidthFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CJKWidthFilter

public CJKWidthFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.cjk
Classes
CJKAnalyzer
CJKBigramFilter
CJKTokenizer
CJKWidthFilter


org.apache.lucene.analysis.cjk

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.cjk

Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).

See:
Description

Class Summary
CJKAnalyzer | An Analyzer that tokenizes text with StandardTokenizer, normalizes content with CJKWidthFilter, folds case with LowerCaseFilter, forms bigrams of CJK with CJKBigramFilter, and filters stopwords with StopFilter
CJKBigramFilter | Forms bigrams of CJK terms that are generated from StandardTokenizer or ICUTokenizer.
CJKTokenizer | Deprecated. Use StandardTokenizer, CJKWidthFilter, CJKBigramFilter, and LowerCaseFilter instead.
CJKWidthFilter | A TokenFilter that normalizes CJK width differences: Folds fullwidth ASCII variants into the equivalent basic latin Folds halfwidth Katakana variants into the equivalent kana

Package org.apache.lucene.analysis.cjk Description

Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).

Three analyzers are provided for Chinese, each of which treats Chinese text in a different way.

  • ChineseAnalyzer (in the analyzers/cn package): Index unigrams (individual Chinese characters) as a token.
  • CJKAnalyzer (in this package): Index bigrams (overlapping groups of two adjacent Chinese characters) as tokens.
  • SmartChineseAnalyzer (in the analyzers/smartcn package): Index words (attempt to segment Chinese text into words) as tokens.
Example phrase： "我是中国人"
  1. ChineseAnalyzer: 我－是－中－国－人
  2. CJKAnalyzer: 我是－是中－中国－国人
  3. SmartChineseAnalyzer: 我－是－中国－人


org.apache.lucene.analysis.cjk Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.cjk

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.cjk.CJKAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.cjk.CJKBigramFilter
          • org.apache.lucene.analysis.cjk.CJKWidthFilter
        • org.apache.lucene.analysis.Tokenizer
          • org.apache.lucene.analysis.cjk.CJKTokenizer


Uses of Package org.apache.lucene.analysis.cjk

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.cjk

No usage of org.apache.lucene.analysis.cjk

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cjk.CJKAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cjk.CJKAnalyzer

No usage of org.apache.lucene.analysis.cjk.CJKAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cjk.CJKBigramFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cjk.CJKBigramFilter

No usage of org.apache.lucene.analysis.cjk.CJKBigramFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cjk.CJKTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cjk.CJKTokenizer

No usage of org.apache.lucene.analysis.cjk.CJKTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cjk.CJKWidthFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cjk.CJKWidthFilter

No usage of org.apache.lucene.analysis.cjk.CJKWidthFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.Analyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.Analyzer

Packages that use Analyzer
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ar | Analyzer for Arabic.
org.apache.lucene.analysis.bg | Analyzer for Bulgarian.
org.apache.lucene.analysis.br | Analyzer for Brazilian Portuguese.
org.apache.lucene.analysis.ca | Analyzer for Catalan.
org.apache.lucene.analysis.cjk | Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).
org.apache.lucene.analysis.cn | Analyzer for Chinese, which indexes unigrams (individual chinese characters).
org.apache.lucene.analysis.cn.smart | Analyzer for Simplified Chinese, which indexes words.
org.apache.lucene.analysis.cz | Analyzer for Czech.
org.apache.lucene.analysis.da | Analyzer for Danish.
org.apache.lucene.analysis.de | Analyzer for German.
org.apache.lucene.analysis.el | Analyzer for Greek.
org.apache.lucene.analysis.en | Analyzer for English.
org.apache.lucene.analysis.es | Analyzer for Spanish.
org.apache.lucene.analysis.eu | Analyzer for Basque.
org.apache.lucene.analysis.fa | Analyzer for Persian.
org.apache.lucene.analysis.fi | Analyzer for Finnish.
org.apache.lucene.analysis.fr | Analyzer for French.
org.apache.lucene.analysis.ga | Analysis for Irish.
org.apache.lucene.analysis.gl | Analyzer for Galician.
org.apache.lucene.analysis.hi | Analyzer for Hindi.
org.apache.lucene.analysis.hu | Analyzer for Hungarian.
org.apache.lucene.analysis.hy | Analyzer for Armenian.
org.apache.lucene.analysis.id | Analyzer for Indonesian.
org.apache.lucene.analysis.it | Analyzer for Italian.
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.lv | Analyzer for Latvian.
org.apache.lucene.analysis.miscellaneous | Miscellaneous TokenStreams
org.apache.lucene.analysis.nl | Analyzer for Dutch.
org.apache.lucene.analysis.no | Analyzer for Norwegian.
org.apache.lucene.analysis.pl | Analyzer for Polish.
org.apache.lucene.analysis.pt | Analyzer for Portuguese.
org.apache.lucene.analysis.query | Automatically filter high-frequency stopwords.
org.apache.lucene.analysis.ro | Analyzer for Romanian.
org.apache.lucene.analysis.ru | Analyzer for Russian.
org.apache.lucene.analysis.shingle | Word n-gram filters
org.apache.lucene.analysis.snowball | TokenFilter and Analyzer implementations that use Snowball stemmers.
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.sv | Analyzer for Swedish.
org.apache.lucene.analysis.synonym | Analysis components for Synonyms.
org.apache.lucene.analysis.th | Analyzer for Thai.
org.apache.lucene.analysis.tr | Analyzer for Turkish.
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.collation | CollationKeyFilter converts each token into its binary CollationKey using the provided Collator, and then encode the CollationKey as a String using IndexableBinaryStringTools, to allow it to be stored as an index term.
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.memory | High-performance single-document main memory Apache Lucene fulltext search index.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.analyzing | QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.
org.apache.lucene.queryParser.complexPhrase | QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
org.apache.lucene.queryParser.ext | Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.
org.apache.lucene.queryParser.precedence | This package contains the Precedence Query Parser Implementation
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.search.similar | Document similarity query generators.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.
org.apache.lucene.util | Some utility classes.
org.apache.lucene.xmlparser | Parser that produces Lucene Query objects from XML streams.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Uses of Analyzer in org.apache.lucene.analysis

Subclasses of Analyzer in org.apache.lucene.analysis
class | KeywordAnalyzer "Tokenizes" the entire stream as a single token.
class | LimitTokenCountAnalyzer This Analyzer limits the number of tokens while indexing.
class | MockAnalyzer Analyzer for testing
class | PerFieldAnalyzerWrapper This analyzer is used to facilitate scenarios where different fields require different analysis techniques.
class | ReusableAnalyzerBase An convenience subclass of Analyzer that makes it easy to implement TokenStream reuse.
class | SimpleAnalyzer An Analyzer that filters LetterTokenizer with LowerCaseFilter
class | StopAnalyzer Filters LetterTokenizer with LowerCaseFilter and StopFilter.
class | StopwordAnalyzerBase Base class for Analyzers that need to make use of stopword sets.
class | WhitespaceAnalyzer An Analyzer that uses WhitespaceTokenizer.

Methods in org.apache.lucene.analysis with parameters of type Analyzer
void | PerFieldAnalyzerWrapper.addAnalyzer(String fieldName, Analyzer analyzer) Deprecated. Changing the Analyzer for a field after instantiation prevents reusability. Analyzers for fields should be set during construction.
static void | BaseTokenStreamTestCase.assertAnalyzesTo(Analyzer a, String input, String[] output)
static void | BaseTokenStreamTestCase.assertAnalyzesTo(Analyzer a, String input, String[] output, int[] posIncrements)
static void | BaseTokenStreamTestCase.assertAnalyzesTo(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets)
static void | BaseTokenStreamTestCase.assertAnalyzesTo(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, int[] posIncrements)
static void | BaseTokenStreamTestCase.assertAnalyzesTo(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements)
static void | BaseTokenStreamTestCase.assertAnalyzesTo(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements, int[] posLengths)
static void | BaseTokenStreamTestCase.assertAnalyzesTo(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements, int[] posLengths, boolean offsetsAreCorrect)
static void | BaseTokenStreamTestCase.assertAnalyzesTo(Analyzer a, String input, String[] output, String[] types)
static void | BaseTokenStreamTestCase.assertAnalyzesToPositions(Analyzer a, String input, String[] output, int[] posIncrements, int[] posLengths)
static void | BaseTokenStreamTestCase.assertAnalyzesToReuse(Analyzer a, String input, String[] output)
static void | BaseTokenStreamTestCase.assertAnalyzesToReuse(Analyzer a, String input, String[] output, int[] posIncrements)
static void | BaseTokenStreamTestCase.assertAnalyzesToReuse(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets)
static void | BaseTokenStreamTestCase.assertAnalyzesToReuse(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, int[] posIncrements)
static void | BaseTokenStreamTestCase.assertAnalyzesToReuse(Analyzer a, String input, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements)
static void | BaseTokenStreamTestCase.assertAnalyzesToReuse(Analyzer a, String input, String[] output, String[] types)
void | CollationTestBase.assertThreadSafe(Analyzer analyzer)
static void | VocabularyAssert.assertVocabulary(Analyzer a, File zipFile, String vocOut) Run a vocabulary test against a tab-separated data file inside a zip file
static void | VocabularyAssert.assertVocabulary(Analyzer a, File zipFile, String voc, String out) Run a vocabulary test against two data files inside a zip file
static void | VocabularyAssert.assertVocabulary(Analyzer a, InputStream vocOut) Run a vocabulary test against one file: tab separated.
static void | VocabularyAssert.assertVocabulary(Analyzer a, InputStream voc, InputStream out) Run a vocabulary test against two data files.
static void | BaseTokenStreamTestCase.checkAnalysisConsistency(Random random, Analyzer a, boolean useCharFilter, String text)
static void | BaseTokenStreamTestCase.checkAnalysisConsistency(Random random, Analyzer a, boolean useCharFilter, String text, boolean offsetsAreCorrect)
static void | BaseTokenStreamTestCase.checkOneTerm(Analyzer a, String input, String expected)
static void | BaseTokenStreamTestCase.checkOneTermReuse(Analyzer a, String input, String expected)
static void | BaseTokenStreamTestCase.checkRandomData(Random random, Analyzer a, int iterations) utility method for blasting tokenstreams with data to make sure they don't do anything crazy
static void | BaseTokenStreamTestCase.checkRandomData(Random random, Analyzer a, int iterations, boolean simple) utility method for blasting tokenstreams with data to make sure they don't do anything crazy
static void | BaseTokenStreamTestCase.checkRandomData(Random random, Analyzer a, int iterations, int maxWordLength) utility method for blasting tokenstreams with data to make sure they don't do anything crazy
static void | BaseTokenStreamTestCase.checkRandomData(Random random, Analyzer a, int iterations, int maxWordLength, boolean simple)
static void | BaseTokenStreamTestCase.checkRandomData(Random random, Analyzer a, int iterations, int maxWordLength, boolean simple, boolean offsetsAreCorrect)
void | CollationTestBase.testCollationKeySort(Analyzer usAnalyzer, Analyzer franceAnalyzer, Analyzer swedenAnalyzer, Analyzer denmarkAnalyzer, String usResult, String frResult, String svResult, String dkResult)
void | CollationTestBase.testFarsiRangeFilterCollating(Analyzer analyzer, String firstBeg, String firstEnd, String secondBeg, String secondEnd)
void | CollationTestBase.testFarsiRangeQueryCollating(Analyzer analyzer, String firstBeg, String firstEnd, String secondBeg, String secondEnd)
void | CollationTestBase.testFarsiTermRangeQuery(Analyzer analyzer, String firstBeg, String firstEnd, String secondBeg, String secondEnd)
protected String | BaseTokenStreamTestCase.toDot(Analyzer a, String inputText)
protected void | BaseTokenStreamTestCase.toDotFile(Analyzer a, String inputText, String localFileName)

Constructors in org.apache.lucene.analysis with parameters of type Analyzer
LimitTokenCountAnalyzer(Analyzer delegate, int maxTokenCount)
Build an analyzer that limits the maximum number of tokens per field.
PerFieldAnalyzerWrapper(Analyzer defaultAnalyzer)
Constructs with default analyzer.
PerFieldAnalyzerWrapper(Analyzer defaultAnalyzer, Map<String,Analyzer> fieldAnalyzers)
Constructs with default analyzer and a map of analyzers to use for specific fields.

Constructor parameters in org.apache.lucene.analysis with type arguments of type Analyzer
PerFieldAnalyzerWrapper(Analyzer defaultAnalyzer, Map<String,Analyzer> fieldAnalyzers)
Constructs with default analyzer and a map of analyzers to use for specific fields.

Uses of Analyzer in org.apache.lucene.analysis.ar

Subclasses of Analyzer in org.apache.lucene.analysis.ar
 class ArabicAnalyzer
Analyzer for Arabic.

Uses of Analyzer in org.apache.lucene.analysis.bg

Subclasses of Analyzer in org.apache.lucene.analysis.bg
 class BulgarianAnalyzer
Analyzer for Bulgarian.

Uses of Analyzer in org.apache.lucene.analysis.br

Subclasses of Analyzer in org.apache.lucene.analysis.br
 class BrazilianAnalyzer
Analyzer for Brazilian Portuguese language.

Uses of Analyzer in org.apache.lucene.analysis.ca

Subclasses of Analyzer in org.apache.lucene.analysis.ca
 class CatalanAnalyzer
Analyzer for Catalan.

Uses of Analyzer in org.apache.lucene.analysis.cjk

Subclasses of Analyzer in org.apache.lucene.analysis.cjk
 class CJKAnalyzer
An Analyzer that tokenizes text with StandardTokenizer, normalizes content with CJKWidthFilter, folds case with LowerCaseFilter, forms bigrams of CJK with CJKBigramFilter, and filters stopwords with StopFilter

Uses of Analyzer in org.apache.lucene.analysis.cn

Subclasses of Analyzer in org.apache.lucene.analysis.cn
 class ChineseAnalyzer
Deprecated. Use StandardAnalyzer instead, which has the same functionality. This analyzer will be removed in Lucene 5.0

Uses of Analyzer in org.apache.lucene.analysis.cn.smart

Subclasses of Analyzer in org.apache.lucene.analysis.cn.smart
 class SmartChineseAnalyzer
SmartChineseAnalyzer is an analyzer for Chinese or mixed Chinese-English text.

Uses of Analyzer in org.apache.lucene.analysis.cz

Subclasses of Analyzer in org.apache.lucene.analysis.cz
 class CzechAnalyzer
Analyzer for Czech language.

Uses of Analyzer in org.apache.lucene.analysis.da

Subclasses of Analyzer in org.apache.lucene.analysis.da
 class DanishAnalyzer
Analyzer for Danish.

Uses of Analyzer in org.apache.lucene.analysis.de

Subclasses of Analyzer in org.apache.lucene.analysis.de
 class GermanAnalyzer
Analyzer for German language.

Uses of Analyzer in org.apache.lucene.analysis.el

Subclasses of Analyzer in org.apache.lucene.analysis.el
 class GreekAnalyzer
Analyzer for the Greek language.

Uses of Analyzer in org.apache.lucene.analysis.en

Subclasses of Analyzer in org.apache.lucene.analysis.en
 class EnglishAnalyzer
Analyzer for English.

Uses of Analyzer in org.apache.lucene.analysis.es

Subclasses of Analyzer in org.apache.lucene.analysis.es
 class SpanishAnalyzer
Analyzer for Spanish.

Uses of Analyzer in org.apache.lucene.analysis.eu

Subclasses of Analyzer in org.apache.lucene.analysis.eu
 class BasqueAnalyzer
Analyzer for Basque.

Uses of Analyzer in org.apache.lucene.analysis.fa

Subclasses of Analyzer in org.apache.lucene.analysis.fa
 class PersianAnalyzer
Analyzer for Persian.

Uses of Analyzer in org.apache.lucene.analysis.fi

Subclasses of Analyzer in org.apache.lucene.analysis.fi
 class FinnishAnalyzer
Analyzer for Finnish.

Uses of Analyzer in org.apache.lucene.analysis.fr

Subclasses of Analyzer in org.apache.lucene.analysis.fr
 class FrenchAnalyzer
Analyzer for French language.

Uses of Analyzer in org.apache.lucene.analysis.ga

Subclasses of Analyzer in org.apache.lucene.analysis.ga
 class IrishAnalyzer
Analyzer for Irish.

Uses of Analyzer in org.apache.lucene.analysis.gl

Subclasses of Analyzer in org.apache.lucene.analysis.gl
 class GalicianAnalyzer
Analyzer for Galician.

Uses of Analyzer in org.apache.lucene.analysis.hi

Subclasses of Analyzer in org.apache.lucene.analysis.hi
 class HindiAnalyzer
Analyzer for Hindi.

Uses of Analyzer in org.apache.lucene.analysis.hu

Subclasses of Analyzer in org.apache.lucene.analysis.hu
 class HungarianAnalyzer
Analyzer for Hungarian.

Uses of Analyzer in org.apache.lucene.analysis.hy

Subclasses of Analyzer in org.apache.lucene.analysis.hy
 class ArmenianAnalyzer
Analyzer for Armenian.

Uses of Analyzer in org.apache.lucene.analysis.id

Subclasses of Analyzer in org.apache.lucene.analysis.id
 class IndonesianAnalyzer
Analyzer for Indonesian (Bahasa)

Uses of Analyzer in org.apache.lucene.analysis.it

Subclasses of Analyzer in org.apache.lucene.analysis.it
 class ItalianAnalyzer
Analyzer for Italian.

Uses of Analyzer in org.apache.lucene.analysis.ja

Subclasses of Analyzer in org.apache.lucene.analysis.ja
 class JapaneseAnalyzer
Analyzer for Japanese that uses morphological analysis.

Uses of Analyzer in org.apache.lucene.analysis.lv

Subclasses of Analyzer in org.apache.lucene.analysis.lv
 class LatvianAnalyzer
Analyzer for Latvian.

Uses of Analyzer in org.apache.lucene.analysis.miscellaneous

Subclasses of Analyzer in org.apache.lucene.analysis.miscellaneous
 class PatternAnalyzer
Efficient Lucene analyzer/tokenizer that preferably operates on a String rather than a Reader, that can flexibly separate text into terms via a regular expression Pattern (with behaviour identical to String.split(String)), and that combines the functionality of LetterTokenizer, LowerCaseTokenizer, WhitespaceTokenizer, StopFilter into a single efficient multi-purpose class.

Uses of Analyzer in org.apache.lucene.analysis.nl

Subclasses of Analyzer in org.apache.lucene.analysis.nl
 class DutchAnalyzer
Analyzer for Dutch language.

Uses of Analyzer in org.apache.lucene.analysis.no

Subclasses of Analyzer in org.apache.lucene.analysis.no
 class NorwegianAnalyzer
Analyzer for Norwegian.

Uses of Analyzer in org.apache.lucene.analysis.pl

Subclasses of Analyzer in org.apache.lucene.analysis.pl
 class PolishAnalyzer
Analyzer for Polish.

Uses of Analyzer in org.apache.lucene.analysis.pt

Subclasses of Analyzer in org.apache.lucene.analysis.pt
 class PortugueseAnalyzer
Analyzer for Portuguese.

Uses of Analyzer in org.apache.lucene.analysis.query

Subclasses of Analyzer in org.apache.lucene.analysis.query
 class QueryAutoStopWordAnalyzer
An Analyzer used primarily at query time to wrap another analyzer and provide a layer of protection which prevents very common words from being passed into queries.

Constructors in org.apache.lucene.analysis.query with parameters of type Analyzer
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate)
Deprecated. Stopwords should be calculated at instantiation using one of the other constructors
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency percentage greater than QueryAutoStopWordAnalyzer.defaultMaxDocFreqPercent
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, Collection<String> fields, float maxPercentDocs)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for the given selection of fields from terms with a document frequency percentage greater than the given maxPercentDocs
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, Collection<String> fields, int maxDocFreq)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for the given selection of fields from terms with a document frequency greater than the given maxDocFreq
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, float maxPercentDocs)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency percentage greater than the given maxPercentDocs
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, int maxDocFreq)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency greater than the given maxDocFreq

Uses of Analyzer in org.apache.lucene.analysis.ro

Subclasses of Analyzer in org.apache.lucene.analysis.ro
 class RomanianAnalyzer
Analyzer for Romanian.

Uses of Analyzer in org.apache.lucene.analysis.ru

Subclasses of Analyzer in org.apache.lucene.analysis.ru
 class RussianAnalyzer
Analyzer for Russian language.

Uses of Analyzer in org.apache.lucene.analysis.shingle

Subclasses of Analyzer in org.apache.lucene.analysis.shingle
 class ShingleAnalyzerWrapper
A ShingleAnalyzerWrapper wraps a ShingleFilter around another Analyzer.

Constructors in org.apache.lucene.analysis.shingle with parameters of type Analyzer
ShingleAnalyzerWrapper(Analyzer defaultAnalyzer)
ShingleAnalyzerWrapper(Analyzer defaultAnalyzer, int maxShingleSize)
ShingleAnalyzerWrapper(Analyzer defaultAnalyzer, int minShingleSize, int maxShingleSize)
ShingleAnalyzerWrapper(Analyzer defaultAnalyzer, int minShingleSize, int maxShingleSize, String tokenSeparator, boolean outputUnigrams, boolean outputUnigramsIfNoShingles)
Creates a new ShingleAnalyzerWrapper

Uses of Analyzer in org.apache.lucene.analysis.snowball

Subclasses of Analyzer in org.apache.lucene.analysis.snowball
 class SnowballAnalyzer
Deprecated. Use the language-specific analyzer in contrib/analyzers instead. This analyzer will be removed in Lucene 5.0

Uses of Analyzer in org.apache.lucene.analysis.standard

Subclasses of Analyzer in org.apache.lucene.analysis.standard
class | ClassicAnalyzer Filters ClassicTokenizer with ClassicFilter, LowerCaseFilter and StopFilter, using a list of English stop words.
class | StandardAnalyzer Filters StandardTokenizer with StandardFilter, LowerCaseFilter and StopFilter, using a list of English stop words.
class | UAX29URLEmailAnalyzer Filters UAX29URLEmailTokenizer with StandardFilter, LowerCaseFilter and StopFilter, using a list of English stop words.

Uses of Analyzer in org.apache.lucene.analysis.sv

Subclasses of Analyzer in org.apache.lucene.analysis.sv
 class SwedishAnalyzer
Analyzer for Swedish.

Uses of Analyzer in org.apache.lucene.analysis.synonym

Methods in org.apache.lucene.analysis.synonym with parameters of type Analyzer
static CharsRef SynonymMap.Builder.analyze(Analyzer analyzer, String text, CharsRef reuse)
Sugar: analyzes the text with the analyzer and separates by SynonymMap.WORD_SEPARATOR.

Constructors in org.apache.lucene.analysis.synonym with parameters of type Analyzer
SolrSynonymParser(boolean dedup, boolean expand, Analyzer analyzer)
WordnetSynonymParser(boolean dedup, boolean expand, Analyzer analyzer)

Uses of Analyzer in org.apache.lucene.analysis.th

Subclasses of Analyzer in org.apache.lucene.analysis.th
 class ThaiAnalyzer
Analyzer for Thai language.

Uses of Analyzer in org.apache.lucene.analysis.tr

Subclasses of Analyzer in org.apache.lucene.analysis.tr
 class TurkishAnalyzer
Analyzer for Turkish.

Uses of Analyzer in org.apache.lucene.benchmark.byTask

Methods in org.apache.lucene.benchmark.byTask that return Analyzer
 Analyzer PerfRunData.getAnalyzer()

Methods in org.apache.lucene.benchmark.byTask with parameters of type Analyzer
 void PerfRunData.setAnalyzer(Analyzer analyzer)

Uses of Analyzer in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks that return Analyzer
static Analyzer NewAnalyzerTask.createAnalyzer(String className)

Methods in org.apache.lucene.benchmark.byTask.tasks with parameters of type Analyzer
abstract  int BenchmarkHighlighter.doHighlight(IndexReader reader, int doc, String field, Document document, Analyzer analyzer, String text)

Uses of Analyzer in org.apache.lucene.collation

Subclasses of Analyzer in org.apache.lucene.collation
class | CollationKeyAnalyzer Filters KeywordTokenizer with CollationKeyFilter.
class | ICUCollationKeyAnalyzer Filters KeywordTokenizer with ICUCollationKeyFilter.

Uses of Analyzer in org.apache.lucene.index

Methods in org.apache.lucene.index that return Analyzer
Analyzer | IndexWriter.getAnalyzer() Returns the analyzer used by this index.
Analyzer | IndexWriterConfig.getAnalyzer() Returns the default analyzer to use for indexing documents.

Methods in org.apache.lucene.index with parameters of type Analyzer
 void IndexWriter.addDocument(Document doc, Analyzer analyzer)
Adds a document to this index, using the provided analyzer instead of the value of IndexWriter.getAnalyzer().
 void IndexWriter.addDocuments(Collection<Document> docs, Analyzer analyzer)
Atomically adds a block of documents, analyzed using the provided analyzer, with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
 void IndexWriter.updateDocument(Term term, Document doc, Analyzer analyzer)
Updates a document by first deleting the document(s) containing term and then adding the new document.
 void IndexWriter.updateDocuments(Term delTerm, Collection<Document> docs, Analyzer analyzer)
Atomically deletes documents matching the provided delTerm and adds a block of documents, analyzed using the provided analyzer, with sequentially assigned document IDs, such that an external reader will see all or none of the documents.

Constructors in org.apache.lucene.index with parameters of type Analyzer
IndexWriter(Directory d, Analyzer a, boolean create, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, boolean create, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl, IndexCommit commit)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriterConfig(Version matchVersion, Analyzer analyzer)
Creates a new config that with defaults that match the specified Version as well as the default Analyzer.
RandomIndexWriter(Random r, Directory dir, Analyzer a)
create a RandomIndexWriter with a random config: Uses TEST_VERSION_CURRENT
RandomIndexWriter(Random r, Directory dir, Version v, Analyzer a)
create a RandomIndexWriter with a random config

Uses of Analyzer in org.apache.lucene.index.memory

Methods in org.apache.lucene.index.memory with parameters of type Analyzer
 void MemoryIndex.addField(String fieldName, String text, Analyzer analyzer)
Convenience method; Tokenizes the given field text and adds the resulting terms to the index; Equivalent to adding an indexed non-keyword Lucene Field that is tokenized, not stored, termVectorStored with positions (or termVectorStored with positions and offsets),

Uses of Analyzer in org.apache.lucene.queryParser

Subclasses of Analyzer in org.apache.lucene.queryParser
static class QueryParserTestBase.QPTestAnalyzer
Filters LowerCaseTokenizer with QPTestFilter.

Fields in org.apache.lucene.queryParser declared as Analyzer
static Analyzer QueryParserTestBase.qpAnalyzer

Methods in org.apache.lucene.queryParser that return Analyzer
 Analyzer QueryParser.getAnalyzer()

Methods in org.apache.lucene.queryParser with parameters of type Analyzer
void | QueryParserTestBase.assertEscapedQueryEquals(String query, Analyzer a, String result)
void | QueryParserTestBase.assertQueryEquals(String query, Analyzer a, String result)
void | QueryParserTestBase.assertQueryEqualsDOA(String query, Analyzer a, String result)
abstract QueryParser | QueryParserTestBase.getParser(Analyzer a)
Query | QueryParserTestBase.getQuery(String query, Analyzer a)
Query | QueryParserTestBase.getQueryDOA(String query, Analyzer a)
static Query | MultiFieldQueryParser.parse(Version matchVersion, String[] queries, String[] fields, Analyzer analyzer) Parses a query which searches on the fields specified.
static Query | MultiFieldQueryParser.parse(Version matchVersion, String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.
static Query | MultiFieldQueryParser.parse(Version matchVersion, String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.

Constructors in org.apache.lucene.queryParser with parameters of type Analyzer
MultiFieldQueryParser(Version matchVersion, String[] fields, Analyzer analyzer)
Creates a MultiFieldQueryParser.
MultiFieldQueryParser(Version matchVersion, String[] fields, Analyzer analyzer, Map<String,Float> boosts)
Creates a MultiFieldQueryParser.
QueryParser(Version matchVersion, String f, Analyzer a)
Constructs a query parser.
QueryParserTestBase.QPTestParser(String f, Analyzer a)

Uses of Analyzer in org.apache.lucene.queryParser.analyzing

Constructors in org.apache.lucene.queryParser.analyzing with parameters of type Analyzer
AnalyzingQueryParser(Version matchVersion, String field, Analyzer analyzer)
Constructs a query parser.

Uses of Analyzer in org.apache.lucene.queryParser.complexPhrase

Constructors in org.apache.lucene.queryParser.complexPhrase with parameters of type Analyzer
ComplexPhraseQueryParser(Version matchVersion, String f, Analyzer a)

Uses of Analyzer in org.apache.lucene.queryParser.ext

Constructors in org.apache.lucene.queryParser.ext with parameters of type Analyzer
ExtendableQueryParser(Version matchVersion, String f, Analyzer a)
Creates a new ExtendableQueryParser instance
ExtendableQueryParser(Version matchVersion, String f, Analyzer a, Extensions ext)
Creates a new ExtendableQueryParser instance

Uses of Analyzer in org.apache.lucene.queryParser.precedence

Constructors in org.apache.lucene.queryParser.precedence with parameters of type Analyzer
PrecedenceQueryParser(Analyzer analyer)

Uses of Analyzer in org.apache.lucene.queryParser.standard

Methods in org.apache.lucene.queryParser.standard that return Analyzer
Analyzer | QueryParserWrapper.getAnalyzer() Deprecated.
Analyzer | StandardQueryParser.getAnalyzer()

Methods in org.apache.lucene.queryParser.standard with parameters of type Analyzer
static Query | MultiFieldQueryParserWrapper.parse(String[] queries, String[] fields, Analyzer analyzer) Deprecated. Parses a query which searches on the fields specified.
static Query | QueryParserUtil.parse(String[] queries, String[] fields, Analyzer analyzer) Parses a query which searches on the fields specified.
static Query | MultiFieldQueryParserWrapper.parse(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Deprecated. Parses a query, searching on the fields specified.
static Query | QueryParserUtil.parse(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.
static Query | MultiFieldQueryParserWrapper.parse(String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Deprecated. Parses a query, searching on the fields specified.
static Query | QueryParserUtil.parse(String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.
void | StandardQueryParser.setAnalyzer(Analyzer analyzer)

Constructors in org.apache.lucene.queryParser.standard with parameters of type Analyzer
MultiFieldQueryParserWrapper(String[] fields, Analyzer analyzer)
Deprecated. Creates a MultiFieldQueryParser.
MultiFieldQueryParserWrapper(String[] fields, Analyzer analyzer, Map<String,Float> boosts)
Deprecated. Creates a MultiFieldQueryParser.
QueryParserWrapper(String defaultField, Analyzer analyzer)
Deprecated.
StandardQueryParser(Analyzer analyzer)
Constructs a StandardQueryParser object and sets an Analyzer to it.

Uses of Analyzer in org.apache.lucene.queryParser.standard.config

Fields in org.apache.lucene.queryParser.standard.config with type parameters of type Analyzer
static ConfigurationKey<Analyzer> StandardQueryConfigHandler.ConfigurationKeys.ANALYZER
Key used to set the Analyzer used for terms found in the query

Methods in org.apache.lucene.queryParser.standard.config that return Analyzer
Analyzer | AnalyzerAttributeImpl.getAnalyzer() Deprecated.
Analyzer | AnalyzerAttribute.getAnalyzer() Deprecated.

Methods in org.apache.lucene.queryParser.standard.config with parameters of type Analyzer
void | AnalyzerAttributeImpl.setAnalyzer(Analyzer analyzer) Deprecated.
void | AnalyzerAttribute.setAnalyzer(Analyzer analyzer) Deprecated.

Uses of Analyzer in org.apache.lucene.search

Fields in org.apache.lucene.search declared as Analyzer
protected static Analyzer SearchEquivalenceTestBase.analyzer

Methods in org.apache.lucene.search with parameters of type Analyzer
long | NRTManager.TrackingIndexWriter.addDocument(Document d, Analyzer a)
long | NRTManager.TrackingIndexWriter.addDocuments(Collection<Document> docs, Analyzer a)
long | NRTManager.TrackingIndexWriter.updateDocument(Term t, Document d, Analyzer a)
long | NRTManager.TrackingIndexWriter.updateDocuments(Term t, Collection<Document> docs, Analyzer a)

Constructors in org.apache.lucene.search with parameters of type Analyzer
FuzzyLikeThisQuery(int maxNumTerms, Analyzer analyzer)
QueryTermVector(String queryString, Analyzer analyzer)

Uses of Analyzer in org.apache.lucene.search.highlight

Methods in org.apache.lucene.search.highlight with parameters of type Analyzer
static TokenStream | TokenSources.getAnyTokenStream(IndexReader reader, int docId, String field, Analyzer analyzer) A convenience method that tries a number of approaches to getting a token stream.
static TokenStream | TokenSources.getAnyTokenStream(IndexReader reader, int docId, String field, Document doc, Analyzer analyzer) A convenience method that tries to first get a TermPositionVector for the specified docId, then, falls back to using the passed in Document to retrieve the TokenStream.
String | Highlighter.getBestFragment(Analyzer analyzer, String fieldName, String text) Highlights chosen terms in a text, extracting the most relevant section.
String[] | Highlighter.getBestFragments(Analyzer analyzer, String fieldName, String text, int maxNumFragments) Highlights chosen terms in a text, extracting the most relevant sections.
static TokenStream | TokenSources.getTokenStream(Document doc, String field, Analyzer analyzer)
static TokenStream | TokenSources.getTokenStream(IndexReader reader, int docId, String field, Analyzer analyzer)
static TokenStream | TokenSources.getTokenStream(String field, String contents, Analyzer analyzer)

Uses of Analyzer in org.apache.lucene.search.similar

Fields in org.apache.lucene.search.similar declared as Analyzer
static Analyzer MoreLikeThis.DEFAULT_ANALYZER
Deprecated. This default will be removed in Lucene 4.0 (with the default being null). If you are not using term vectors, explicitly set your analyzer instead.

Methods in org.apache.lucene.search.similar that return Analyzer
Analyzer | MoreLikeThis.getAnalyzer() Returns an analyzer that will be used to parse source doc with.
Analyzer | MoreLikeThisQuery.getAnalyzer()

Methods in org.apache.lucene.search.similar with parameters of type Analyzer
static Query | SimilarityQueries.formSimilarQuery(String body, Analyzer a, String field, Set<?> stop) Simple similarity query generators.
void | MoreLikeThis.setAnalyzer(Analyzer analyzer) Sets the analyzer to use.
void | MoreLikeThisQuery.setAnalyzer(Analyzer analyzer)

Constructors in org.apache.lucene.search.similar with parameters of type Analyzer
MoreLikeThisQuery(String likeText, String[] moreLikeFields, Analyzer analyzer)
Deprecated. use MoreLikeThisQuery.MoreLikeThisQuery(String, String[], Analyzer, String) instead.
MoreLikeThisQuery(String likeText, String[] moreLikeFields, Analyzer analyzer, String fieldName)

Uses of Analyzer in org.apache.lucene.store.instantiated

Methods in org.apache.lucene.store.instantiated that return Analyzer
 Analyzer InstantiatedIndexWriter.getAnalyzer()
Deprecated.

Methods in org.apache.lucene.store.instantiated with parameters of type Analyzer
 void InstantiatedIndexWriter.addDocument(Document doc, Analyzer analyzer)
Deprecated. Adds a document to this index, using the provided analyzer instead of the value of InstantiatedIndexWriter.getAnalyzer().
protected  void InstantiatedIndexWriter.addDocument(InstantiatedDocument document, Analyzer analyzer)
Deprecated. Tokenizes a document and adds it to the buffer.
 InstantiatedIndexWriter InstantiatedIndex.indexWriterFactory(Analyzer analyzer, boolean create)
Deprecated.
 void InstantiatedIndexWriter.updateDocument(Term term, Document doc, Analyzer analyzer)
Deprecated.

Constructors in org.apache.lucene.store.instantiated with parameters of type Analyzer
InstantiatedIndexWriter(InstantiatedIndex index, Analyzer analyzer)
Deprecated.
InstantiatedIndexWriter(InstantiatedIndex index, Analyzer analyzer, boolean create)
Deprecated.

Uses of Analyzer in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type Analyzer
static IndexWriterConfig | LuceneTestCase.newIndexWriterConfig(Random r, Version v, Analyzer a) create a new index writer config with random defaults using the specified random
static IndexWriterConfig | LuceneTestCase.newIndexWriterConfig(Version v, Analyzer a) create a new index writer config with random defaults

Uses of Analyzer in org.apache.lucene.xmlparser

Fields in org.apache.lucene.xmlparser declared as Analyzer
protected  Analyzer CoreParser.analyzer

Constructors in org.apache.lucene.xmlparser with parameters of type Analyzer
CoreParser(Analyzer analyzer, QueryParser parser)
Construct an XML parser that uses a single instance QueryParser for handling UserQuery tags - all parse operations are synchronised on this parser
CoreParser(String defaultField, Analyzer analyzer)
Constructs an XML parser that creates a QueryParser for each UserQuery request.
CoreParser(String defaultField, Analyzer analyzer, QueryParser parser)
CorePlusExtensionsParser(Analyzer analyzer, QueryParser parser)
Construct an XML parser that uses a single instance QueryParser for handling UserQuery tags - all parse operations are synchronized on this parser
CorePlusExtensionsParser(String defaultField, Analyzer analyzer)
Constructs an XML parser that creates a QueryParser for each UserQuery request.

Uses of Analyzer in org.apache.lucene.xmlparser.builders

Methods in org.apache.lucene.xmlparser.builders with parameters of type Analyzer
protected  QueryParser UserInputQueryBuilder.createQueryParser(String fieldName, Analyzer analyzer)
Method to create a QueryParser - designed to be overridden

Constructors in org.apache.lucene.xmlparser.builders with parameters of type Analyzer
FuzzyLikeThisQueryBuilder(Analyzer analyzer)
LikeThisQueryBuilder(Analyzer analyzer, String[] defaultFieldNames)
SpanOrTermsBuilder(Analyzer analyzer)
TermsFilterBuilder(Analyzer analyzer)
TermsQueryBuilder(Analyzer analyzer)
UserInputQueryBuilder(String defaultField, Analyzer analyzer)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ASCIIFoldingFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ASCIIFoldingFilter

No usage of org.apache.lucene.analysis.ASCIIFoldingFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.BaseCharFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.BaseCharFilter

Packages that use BaseCharFilter
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.charfilter | CharFilters: process text before the Tokenizer

Uses of BaseCharFilter in org.apache.lucene.analysis

Subclasses of BaseCharFilter in org.apache.lucene.analysis
 class MappingCharFilter
Simplistic CharFilter that applies the mappings contained in a NormalizeCharMap to the character stream, and correcting the resulting changes to the offsets.

Uses of BaseCharFilter in org.apache.lucene.analysis.charfilter

Subclasses of BaseCharFilter in org.apache.lucene.analysis.charfilter
 class HTMLStripCharFilter
A CharFilter that wraps another Reader and attempts to strip out HTML constructs.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttribute

Packages that use BaseTokenStreamTestCase.CheckClearAttributesAttribute
org.apache.lucene.analysis API and code to convert text into indexable/searchable tokens.

Uses of BaseTokenStreamTestCase.CheckClearAttributesAttribute in org.apache.lucene.analysis

Classes in org.apache.lucene.analysis that implement BaseTokenStreamTestCase.CheckClearAttributesAttribute
static class BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl
Attribute that records if it was cleared or not.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl

No usage of org.apache.lucene.analysis.BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.BaseTokenStreamTestCase

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.BaseTokenStreamTestCase

No usage of org.apache.lucene.analysis.BaseTokenStreamTestCase

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.CachingTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.CachingTokenFilter

No usage of org.apache.lucene.analysis.CachingTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.CannedTokenStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.CannedTokenStream

No usage of org.apache.lucene.analysis.CannedTokenStream

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.CharArrayMap.EntryIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.CharArrayMap.EntryIterator

Packages that use CharArrayMap.EntryIterator
org.apache.lucene.analysis API and code to convert text into indexable/searchable tokens.

Uses of CharArrayMap.EntryIterator in org.apache.lucene.analysis

Methods in org.apache.lucene.analysis that return CharArrayMap.EntryIterator
 CharArrayMap.EntryIterator CharArrayMap.EntrySet.iterator()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.CharArrayMap.EntrySet

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.CharArrayMap.EntrySet

Packages that use CharArrayMap.EntrySet
org.apache.lucene.analysis API and code to convert text into indexable/searchable tokens.

Uses of CharArrayMap.EntrySet in org.apache.lucene.analysis

Methods in org.apache.lucene.analysis that return CharArrayMap.EntrySet
 CharArrayMap.EntrySet CharArrayMap.entrySet()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.CharArrayMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.CharArrayMap

Packages that use CharArrayMap
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.nl | Analyzer for Dutch.

Uses of CharArrayMap in org.apache.lucene.analysis

Methods in org.apache.lucene.analysis that return CharArrayMap
static
<V> CharArrayMap<V>
CharArrayMap.copy(Version matchVersion, Map<?,? extends V> map)
Returns a copy of the given map as a CharArrayMap.
static
<V> CharArrayMap<V>
CharArrayMap.emptyMap()
Returns an empty, unmodifiable map.
static CharArrayMap<String> WordlistLoader.getStemDict(Reader reader, CharArrayMap<String> result)
Reads a stem dictionary.
static
<V> CharArrayMap<V>
CharArrayMap.unmodifiableMap(CharArrayMap<V> map)
Returns an unmodifiable CharArrayMap.

Methods in org.apache.lucene.analysis with parameters of type CharArrayMap
static CharArrayMap<String> WordlistLoader.getStemDict(Reader reader, CharArrayMap<String> result)
Reads a stem dictionary.
static
<V> CharArrayMap<V>
CharArrayMap.unmodifiableMap(CharArrayMap<V> map)
Returns an unmodifiable CharArrayMap.

Uses of CharArrayMap in org.apache.lucene.analysis.nl

Constructors in org.apache.lucene.analysis.nl with parameters of type CharArrayMap
DutchAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionTable, CharArrayMap<String> stemOverrideDict)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.CharArraySet.CharArraySetIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.CharArraySet.CharArraySetIterator

No usage of org.apache.lucene.analysis.CharArraySet.CharArraySetIterator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.CharArraySet

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.CharArraySet

Packages that use CharArraySet
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.cn.smart | Analyzer for Simplified Chinese, which indexes words.
org.apache.lucene.analysis.compound | A filter that decomposes compound words you find in many Germanic languages into the word parts.
org.apache.lucene.analysis.ga | Analysis for Irish.
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.pt | Analyzer for Portuguese.

Uses of CharArraySet in org.apache.lucene.analysis

Fields in org.apache.lucene.analysis declared as CharArraySet
static CharArraySet | CharArraySet.EMPTY_SET
protected CharArraySet | StopwordAnalyzerBase.stopwords An immutable stopword set

Methods in org.apache.lucene.analysis that return CharArraySet
static CharArraySet CharArraySet.copy(Set<?> set)
Deprecated. use copy(Version, Set) instead.
static CharArraySet CharArraySet.copy(Version matchVersion, Set<?> set)
Returns a copy of the given set as a CharArraySet.
static CharArraySet WordlistLoader.getSnowballWordSet(Reader reader, CharArraySet result)
Reads stopwords from a stopword list in Snowball format.
static CharArraySet WordlistLoader.getSnowballWordSet(Reader reader, Version matchVersion)
Reads stopwords from a stopword list in Snowball format.
static CharArraySet WordlistLoader.getWordSet(Reader reader, CharArraySet result)
Reads lines from a Reader and adds every line as an entry to a CharArraySet (omitting leading and trailing whitespace).
static CharArraySet WordlistLoader.getWordSet(Reader reader, String comment, CharArraySet result)
Reads lines from a Reader and adds every non-comment line as an entry to a CharArraySet (omitting leading and trailing whitespace).
static CharArraySet WordlistLoader.getWordSet(Reader reader, String comment, Version matchVersion)
Reads lines from a Reader and adds every non-comment line as an entry to a CharArraySet (omitting leading and trailing whitespace).
static CharArraySet WordlistLoader.getWordSet(Reader reader, Version matchVersion)
Reads lines from a Reader and adds every line as an entry to a CharArraySet (omitting leading and trailing whitespace).
 CharArraySet CharArrayMap.keySet()
Returns an CharArraySet view on the map's keys.
protected static CharArraySet StopwordAnalyzerBase.loadStopwordSet(boolean ignoreCase, Class<? extends ReusableAnalyzerBase> aClass, String resource, String comment)
Creates a CharArraySet from a file resource associated with a class.
protected static CharArraySet StopwordAnalyzerBase.loadStopwordSet(File stopwords, Version matchVersion)
Creates a CharArraySet from a file.
protected static CharArraySet StopwordAnalyzerBase.loadStopwordSet(Reader stopwords, Version matchVersion)
Creates a CharArraySet from a file.
static CharArraySet CharArraySet.unmodifiableSet(CharArraySet set)
Returns an unmodifiable CharArraySet.

Methods in org.apache.lucene.analysis with parameters of type CharArraySet
static CharArraySet | WordlistLoader.getSnowballWordSet(Reader reader, CharArraySet result) Reads stopwords from a stopword list in Snowball format.
static CharArraySet | WordlistLoader.getWordSet(Reader reader, CharArraySet result) Reads lines from a Reader and adds every line as an entry to a CharArraySet (omitting leading and trailing whitespace).
static CharArraySet | WordlistLoader.getWordSet(Reader reader, String comment, CharArraySet result) Reads lines from a Reader and adds every non-comment line as an entry to a CharArraySet (omitting leading and trailing whitespace).
static CharArraySet | CharArraySet.unmodifiableSet(CharArraySet set) Returns an unmodifiable CharArraySet.

Constructors in org.apache.lucene.analysis with parameters of type CharArraySet
KeywordMarkerFilter(TokenStream in, CharArraySet keywordSet)
Create a new KeywordMarkerFilter, that marks the current token as a keyword if the tokens term buffer is contained in the given set via the KeywordAttribute.
MockAnalyzer(Random random, int pattern, boolean lowerCase, CharArraySet filter, boolean enablePositionIncrements)
Creates a new MockAnalyzer.

Uses of CharArraySet in org.apache.lucene.analysis.cn.smart

Methods in org.apache.lucene.analysis.cn.smart that return CharArraySet
static CharArraySet SmartChineseAnalyzer.getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.

Uses of CharArraySet in org.apache.lucene.analysis.compound

Fields in org.apache.lucene.analysis.compound declared as CharArraySet
protected  CharArraySet CompoundWordTokenFilterBase.dictionary

Methods in org.apache.lucene.analysis.compound that return CharArraySet
static CharArraySet CompoundWordTokenFilterBase.makeDictionary(Version matchVersion, String[] dictionary)
Deprecated. Only available for backwards compatibility.

Uses of CharArraySet in org.apache.lucene.analysis.ga

Methods in org.apache.lucene.analysis.ga that return CharArraySet
static CharArraySet IrishAnalyzer.getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Constructors in org.apache.lucene.analysis.ga with parameters of type CharArraySet
IrishAnalyzer(Version matchVersion, CharArraySet stopwords)
Builds an analyzer with the given stop words.
IrishAnalyzer(Version matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of CharArraySet in org.apache.lucene.analysis.ja

Methods in org.apache.lucene.analysis.ja that return CharArraySet
static CharArraySet JapaneseAnalyzer.getDefaultStopSet()

Constructors in org.apache.lucene.analysis.ja with parameters of type CharArraySet
JapaneseAnalyzer(Version matchVersion, UserDictionary userDict, JapaneseTokenizer.Mode mode, CharArraySet stopwords, Set<String> stoptags)

Uses of CharArraySet in org.apache.lucene.analysis.pt

Fields in org.apache.lucene.analysis.pt declared as CharArraySet
protected  CharArraySet RSLPStemmerBase.RuleWithSetExceptions.exceptions

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.CharFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.CharFilter

Packages that use CharFilter
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.charfilter | CharFilters: process text before the Tokenizer
org.apache.lucene.analysis.fa | Analyzer for Persian.

Uses of CharFilter in org.apache.lucene.analysis

Subclasses of CharFilter in org.apache.lucene.analysis
class | BaseCharFilter Base utility class for implementing a CharFilter.
class | MappingCharFilter Simplistic CharFilter that applies the mappings contained in a NormalizeCharMap to the character stream, and correcting the resulting changes to the offsets.

Uses of CharFilter in org.apache.lucene.analysis.charfilter

Subclasses of CharFilter in org.apache.lucene.analysis.charfilter
 class HTMLStripCharFilter
A CharFilter that wraps another Reader and attempts to strip out HTML constructs.

Uses of CharFilter in org.apache.lucene.analysis.fa

Subclasses of CharFilter in org.apache.lucene.analysis.fa
 class PersianCharFilter
CharFilter that replaces instances of Zero-width non-joiner with an ordinary space.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.CharReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.CharReader

No usage of org.apache.lucene.analysis.CharReader

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.CharStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.CharStream

Packages that use CharStream
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.charfilter | CharFilters: process text before the Tokenizer
org.apache.lucene.analysis.fa | Analyzer for Persian.

Uses of CharStream in org.apache.lucene.analysis

Subclasses of CharStream in org.apache.lucene.analysis
class | BaseCharFilter Base utility class for implementing a CharFilter.
class | CharFilter Subclasses of CharFilter can be chained to filter CharStream.
class | CharReader CharReader is a Reader wrapper.
class | MappingCharFilter Simplistic CharFilter that applies the mappings contained in a NormalizeCharMap to the character stream, and correcting the resulting changes to the offsets.
class | MockCharFilter the purpose of this charfilter is to send offsets out of bounds if the analyzer doesn't use correctOffset or does incorrect offset math.

Fields in org.apache.lucene.analysis declared as CharStream
protected  CharStream CharFilter.input

Methods in org.apache.lucene.analysis that return CharStream
static CharStream CharReader.get(Reader input)

Constructors in org.apache.lucene.analysis with parameters of type CharStream
BaseCharFilter(CharStream in)
CharFilter(CharStream in)
MappingCharFilter(NormalizeCharMap normMap, CharStream in)
Default constructor that takes a CharStream.

Uses of CharStream in org.apache.lucene.analysis.charfilter

Subclasses of CharStream in org.apache.lucene.analysis.charfilter
 class HTMLStripCharFilter
A CharFilter that wraps another Reader and attempts to strip out HTML constructs.

Constructors in org.apache.lucene.analysis.charfilter with parameters of type CharStream
HTMLStripCharFilter(CharStream source)
HTMLStripCharFilter(CharStream source, Set<String> escapedTags)

Uses of CharStream in org.apache.lucene.analysis.fa

Subclasses of CharStream in org.apache.lucene.analysis.fa
 class PersianCharFilter
CharFilter that replaces instances of Zero-width non-joiner with an ordinary space.

Constructors in org.apache.lucene.analysis.fa with parameters of type CharStream
PersianCharFilter(CharStream in)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.CharTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.CharTokenizer

Packages that use CharTokenizer
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ar | Analyzer for Arabic.
org.apache.lucene.analysis.in | Analysis components for Indian languages.
org.apache.lucene.analysis.ru | Analyzer for Russian.

Uses of CharTokenizer in org.apache.lucene.analysis

Subclasses of CharTokenizer in org.apache.lucene.analysis
class | LetterTokenizer A LetterTokenizer is a tokenizer that divides text at non-letters.
class | LowerCaseTokenizer LowerCaseTokenizer performs the function of LetterTokenizer and LowerCaseFilter together.
class | WhitespaceTokenizer A WhitespaceTokenizer is a tokenizer that divides text at whitespace.

Uses of CharTokenizer in org.apache.lucene.analysis.ar

Subclasses of CharTokenizer in org.apache.lucene.analysis.ar
 class ArabicLetterTokenizer
Deprecated. (3.1) Use StandardTokenizer instead.

Uses of CharTokenizer in org.apache.lucene.analysis.in

Subclasses of CharTokenizer in org.apache.lucene.analysis.in
 class IndicTokenizer
Deprecated. (3.6) Use StandardTokenizer instead.

Uses of CharTokenizer in org.apache.lucene.analysis.ru

Subclasses of CharTokenizer in org.apache.lucene.analysis.ru
 class RussianLetterTokenizer
Deprecated. Use StandardTokenizer instead, which has the same functionality. This filter will be removed in Lucene 5.0

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.CollationTestBase

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.CollationTestBase

No usage of org.apache.lucene.analysis.CollationTestBase

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.EmptyTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.EmptyTokenizer

No usage of org.apache.lucene.analysis.EmptyTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.FilteringTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.FilteringTokenFilter

Packages that use FilteringTokenFilter
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ja | Analyzer for Japanese.

Uses of FilteringTokenFilter in org.apache.lucene.analysis

Subclasses of FilteringTokenFilter in org.apache.lucene.analysis
class | LengthFilter Removes words that are too long or too short from the stream.
class | StopFilter Removes stop words from a token stream.
class | TypeTokenFilter Removes tokens whose types appear in a set of blocked types from a token stream.

Uses of FilteringTokenFilter in org.apache.lucene.analysis.ja

Subclasses of FilteringTokenFilter in org.apache.lucene.analysis.ja
 class JapanesePartOfSpeechStopFilter
Removes tokens that match a set of part-of-speech tags.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ISOLatin1AccentFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ISOLatin1AccentFilter

No usage of org.apache.lucene.analysis.ISOLatin1AccentFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.KeywordAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.KeywordAnalyzer

No usage of org.apache.lucene.analysis.KeywordAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.KeywordMarkerFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.KeywordMarkerFilter

No usage of org.apache.lucene.analysis.KeywordMarkerFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.KeywordTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.KeywordTokenizer

No usage of org.apache.lucene.analysis.KeywordTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.LengthFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.LengthFilter

No usage of org.apache.lucene.analysis.LengthFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.LetterTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.LetterTokenizer

Packages that use LetterTokenizer
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ar | Analyzer for Arabic.

Uses of LetterTokenizer in org.apache.lucene.analysis

Subclasses of LetterTokenizer in org.apache.lucene.analysis
 class LowerCaseTokenizer
LowerCaseTokenizer performs the function of LetterTokenizer and LowerCaseFilter together.

Uses of LetterTokenizer in org.apache.lucene.analysis.ar

Subclasses of LetterTokenizer in org.apache.lucene.analysis.ar
 class ArabicLetterTokenizer
Deprecated. (3.1) Use StandardTokenizer instead.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.LimitTokenCountAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.LimitTokenCountAnalyzer

No usage of org.apache.lucene.analysis.LimitTokenCountAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.LimitTokenCountFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.LimitTokenCountFilter

No usage of org.apache.lucene.analysis.LimitTokenCountFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.LookaheadTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.LookaheadTokenFilter

Packages that use LookaheadTokenFilter
org.apache.lucene.analysis API and code to convert text into indexable/searchable tokens.

Uses of LookaheadTokenFilter in org.apache.lucene.analysis

Subclasses of LookaheadTokenFilter in org.apache.lucene.analysis
class | MockGraphTokenFilter Randomly inserts overlapped (posInc=0) tokens with posLength sometimes > 1.
class | MockRandomLookaheadTokenFilter Uses LookaheadTokenFilter to randomly peek at future tokens.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.LookaheadTokenFilter.Position

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.LookaheadTokenFilter.Position

Packages that use LookaheadTokenFilter.Position
org.apache.lucene.analysis API and code to convert text into indexable/searchable tokens.

Uses of LookaheadTokenFilter.Position in org.apache.lucene.analysis

Classes in org.apache.lucene.analysis with type parameters of type LookaheadTokenFilter.Position
 class LookaheadTokenFilter<T extends LookaheadTokenFilter.Position>
An abstract TokenFilter to make it easier to build graph token filters requiring some lookahead.

Methods in org.apache.lucene.analysis that return LookaheadTokenFilter.Position
LookaheadTokenFilter.Position | MockRandomLookaheadTokenFilter.newPosition()
protected LookaheadTokenFilter.Position | MockGraphTokenFilter.newPosition()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.LowerCaseFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.LowerCaseFilter

No usage of org.apache.lucene.analysis.LowerCaseFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.LowerCaseTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.LowerCaseTokenizer

No usage of org.apache.lucene.analysis.LowerCaseTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.MappingCharFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.MappingCharFilter

No usage of org.apache.lucene.analysis.MappingCharFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.MockAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.MockAnalyzer

No usage of org.apache.lucene.analysis.MockAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.MockCharFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.MockCharFilter

No usage of org.apache.lucene.analysis.MockCharFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.MockFixedLengthPayloadFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.MockFixedLengthPayloadFilter

No usage of org.apache.lucene.analysis.MockFixedLengthPayloadFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.MockGraphTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.MockGraphTokenFilter

No usage of org.apache.lucene.analysis.MockGraphTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.MockHoleInjectingTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.MockHoleInjectingTokenFilter

No usage of org.apache.lucene.analysis.MockHoleInjectingTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.MockRandomLookaheadTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.MockRandomLookaheadTokenFilter

No usage of org.apache.lucene.analysis.MockRandomLookaheadTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.MockReaderWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.MockReaderWrapper

No usage of org.apache.lucene.analysis.MockReaderWrapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.MockTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.MockTokenizer

No usage of org.apache.lucene.analysis.MockTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.MockVariableLengthPayloadFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.MockVariableLengthPayloadFilter

No usage of org.apache.lucene.analysis.MockVariableLengthPayloadFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.NormalizeCharMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.NormalizeCharMap

Packages that use NormalizeCharMap
org.apache.lucene.analysis API and code to convert text into indexable/searchable tokens.

Uses of NormalizeCharMap in org.apache.lucene.analysis

Constructors in org.apache.lucene.analysis with parameters of type NormalizeCharMap
MappingCharFilter(NormalizeCharMap normMap, CharStream in)
Default constructor that takes a CharStream.
MappingCharFilter(NormalizeCharMap normMap, Reader in)
Easy-use constructor that takes a Reader.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.NumericTokenStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.NumericTokenStream

Packages that use NumericTokenStream
org.apache.lucene.analysis API and code to convert text into indexable/searchable tokens.

Uses of NumericTokenStream in org.apache.lucene.analysis

Methods in org.apache.lucene.analysis that return NumericTokenStream
NumericTokenStream | NumericTokenStream.setDoubleValue(double value) Initializes the token stream with the supplied double value.
NumericTokenStream | NumericTokenStream.setFloatValue(float value) Initializes the token stream with the supplied float value.
NumericTokenStream | NumericTokenStream.setIntValue(int value) Initializes the token stream with the supplied int value.
NumericTokenStream | NumericTokenStream.setLongValue(long value) Initializes the token stream with the supplied long value.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.PerFieldAnalyzerWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.PerFieldAnalyzerWrapper

No usage of org.apache.lucene.analysis.PerFieldAnalyzerWrapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.PorterStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.PorterStemFilter

No usage of org.apache.lucene.analysis.PorterStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ReusableAnalyzerBase

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ReusableAnalyzerBase

Packages that use ReusableAnalyzerBase
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ar | Analyzer for Arabic.
org.apache.lucene.analysis.bg | Analyzer for Bulgarian.
org.apache.lucene.analysis.br | Analyzer for Brazilian Portuguese.
org.apache.lucene.analysis.ca | Analyzer for Catalan.
org.apache.lucene.analysis.cjk | Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).
org.apache.lucene.analysis.cn | Analyzer for Chinese, which indexes unigrams (individual chinese characters).
org.apache.lucene.analysis.cz | Analyzer for Czech.
org.apache.lucene.analysis.da | Analyzer for Danish.
org.apache.lucene.analysis.de | Analyzer for German.
org.apache.lucene.analysis.el | Analyzer for Greek.
org.apache.lucene.analysis.en | Analyzer for English.
org.apache.lucene.analysis.es | Analyzer for Spanish.
org.apache.lucene.analysis.eu | Analyzer for Basque.
org.apache.lucene.analysis.fa | Analyzer for Persian.
org.apache.lucene.analysis.fi | Analyzer for Finnish.
org.apache.lucene.analysis.fr | Analyzer for French.
org.apache.lucene.analysis.ga | Analysis for Irish.
org.apache.lucene.analysis.gl | Analyzer for Galician.
org.apache.lucene.analysis.hi | Analyzer for Hindi.
org.apache.lucene.analysis.hu | Analyzer for Hungarian.
org.apache.lucene.analysis.hy | Analyzer for Armenian.
org.apache.lucene.analysis.id | Analyzer for Indonesian.
org.apache.lucene.analysis.it | Analyzer for Italian.
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.lv | Analyzer for Latvian.
org.apache.lucene.analysis.miscellaneous | Miscellaneous TokenStreams
org.apache.lucene.analysis.nl | Analyzer for Dutch.
org.apache.lucene.analysis.no | Analyzer for Norwegian.
org.apache.lucene.analysis.pl | Analyzer for Polish.
org.apache.lucene.analysis.pt | Analyzer for Portuguese.
org.apache.lucene.analysis.ro | Analyzer for Romanian.
org.apache.lucene.analysis.ru | Analyzer for Russian.
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.sv | Analyzer for Swedish.
org.apache.lucene.analysis.th | Analyzer for Thai.
org.apache.lucene.analysis.tr | Analyzer for Turkish.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis
class | KeywordAnalyzer "Tokenizes" the entire stream as a single token.
class | SimpleAnalyzer An Analyzer that filters LetterTokenizer with LowerCaseFilter
class | StopAnalyzer Filters LetterTokenizer with LowerCaseFilter and StopFilter.
class | StopwordAnalyzerBase Base class for Analyzers that need to make use of stopword sets.
class | WhitespaceAnalyzer An Analyzer that uses WhitespaceTokenizer.

Method parameters in org.apache.lucene.analysis with type arguments of type ReusableAnalyzerBase
protected static CharArraySet StopwordAnalyzerBase.loadStopwordSet(boolean ignoreCase, Class<? extends ReusableAnalyzerBase> aClass, String resource, String comment)
Creates a CharArraySet from a file resource associated with a class.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.ar

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.ar
 class ArabicAnalyzer
Analyzer for Arabic.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.bg

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.bg
 class BulgarianAnalyzer
Analyzer for Bulgarian.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.br

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.br
 class BrazilianAnalyzer
Analyzer for Brazilian Portuguese language.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.ca

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.ca
 class CatalanAnalyzer
Analyzer for Catalan.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.cjk

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.cjk
 class CJKAnalyzer
An Analyzer that tokenizes text with StandardTokenizer, normalizes content with CJKWidthFilter, folds case with LowerCaseFilter, forms bigrams of CJK with CJKBigramFilter, and filters stopwords with StopFilter

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.cn

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.cn
 class ChineseAnalyzer
Deprecated. Use StandardAnalyzer instead, which has the same functionality. This analyzer will be removed in Lucene 5.0

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.cz

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.cz
 class CzechAnalyzer
Analyzer for Czech language.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.da

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.da
 class DanishAnalyzer
Analyzer for Danish.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.de

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.de
 class GermanAnalyzer
Analyzer for German language.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.el

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.el
 class GreekAnalyzer
Analyzer for the Greek language.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.en

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.en
 class EnglishAnalyzer
Analyzer for English.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.es

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.es
 class SpanishAnalyzer
Analyzer for Spanish.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.eu

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.eu
 class BasqueAnalyzer
Analyzer for Basque.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.fa

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.fa
 class PersianAnalyzer
Analyzer for Persian.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.fi

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.fi
 class FinnishAnalyzer
Analyzer for Finnish.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.fr

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.fr
 class FrenchAnalyzer
Analyzer for French language.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.ga

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.ga
 class IrishAnalyzer
Analyzer for Irish.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.gl

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.gl
 class GalicianAnalyzer
Analyzer for Galician.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.hi

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.hi
 class HindiAnalyzer
Analyzer for Hindi.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.hu

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.hu
 class HungarianAnalyzer
Analyzer for Hungarian.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.hy

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.hy
 class ArmenianAnalyzer
Analyzer for Armenian.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.id

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.id
 class IndonesianAnalyzer
Analyzer for Indonesian (Bahasa)

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.it

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.it
 class ItalianAnalyzer
Analyzer for Italian.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.ja

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.ja
 class JapaneseAnalyzer
Analyzer for Japanese that uses morphological analysis.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.lv

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.lv
 class LatvianAnalyzer
Analyzer for Latvian.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.miscellaneous

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.miscellaneous
 class PatternAnalyzer
Efficient Lucene analyzer/tokenizer that preferably operates on a String rather than a Reader, that can flexibly separate text into terms via a regular expression Pattern (with behaviour identical to String.split(String)), and that combines the functionality of LetterTokenizer, LowerCaseTokenizer, WhitespaceTokenizer, StopFilter into a single efficient multi-purpose class.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.nl

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.nl
 class DutchAnalyzer
Analyzer for Dutch language.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.no

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.no
 class NorwegianAnalyzer
Analyzer for Norwegian.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.pl

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.pl
 class PolishAnalyzer
Analyzer for Polish.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.pt

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.pt
 class PortugueseAnalyzer
Analyzer for Portuguese.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.ro

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.ro
 class RomanianAnalyzer
Analyzer for Romanian.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.ru

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.ru
 class RussianAnalyzer
Analyzer for Russian language.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.standard

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.standard
class | ClassicAnalyzer Filters ClassicTokenizer with ClassicFilter, LowerCaseFilter and StopFilter, using a list of English stop words.
class | StandardAnalyzer Filters StandardTokenizer with StandardFilter, LowerCaseFilter and StopFilter, using a list of English stop words.
class | UAX29URLEmailAnalyzer Filters UAX29URLEmailTokenizer with StandardFilter, LowerCaseFilter and StopFilter, using a list of English stop words.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.sv

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.sv
 class SwedishAnalyzer
Analyzer for Swedish.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.th

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.th
 class ThaiAnalyzer
Analyzer for Thai language.

Uses of ReusableAnalyzerBase in org.apache.lucene.analysis.tr

Subclasses of ReusableAnalyzerBase in org.apache.lucene.analysis.tr
 class TurkishAnalyzer
Analyzer for Turkish.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents

Packages that use ReusableAnalyzerBase.TokenStreamComponents
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ar | Analyzer for Arabic.
org.apache.lucene.analysis.bg | Analyzer for Bulgarian.
org.apache.lucene.analysis.br | Analyzer for Brazilian Portuguese.
org.apache.lucene.analysis.ca | Analyzer for Catalan.
org.apache.lucene.analysis.cjk | Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).
org.apache.lucene.analysis.cn | Analyzer for Chinese, which indexes unigrams (individual chinese characters).
org.apache.lucene.analysis.cz | Analyzer for Czech.
org.apache.lucene.analysis.da | Analyzer for Danish.
org.apache.lucene.analysis.de | Analyzer for German.
org.apache.lucene.analysis.el | Analyzer for Greek.
org.apache.lucene.analysis.en | Analyzer for English.
org.apache.lucene.analysis.es | Analyzer for Spanish.
org.apache.lucene.analysis.eu | Analyzer for Basque.
org.apache.lucene.analysis.fa | Analyzer for Persian.
org.apache.lucene.analysis.fi | Analyzer for Finnish.
org.apache.lucene.analysis.fr | Analyzer for French.
org.apache.lucene.analysis.ga | Analysis for Irish.
org.apache.lucene.analysis.gl | Analyzer for Galician.
org.apache.lucene.analysis.hi | Analyzer for Hindi.
org.apache.lucene.analysis.hu | Analyzer for Hungarian.
org.apache.lucene.analysis.hy | Analyzer for Armenian.
org.apache.lucene.analysis.id | Analyzer for Indonesian.
org.apache.lucene.analysis.it | Analyzer for Italian.
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.lv | Analyzer for Latvian.
org.apache.lucene.analysis.miscellaneous | Miscellaneous TokenStreams
org.apache.lucene.analysis.nl | Analyzer for Dutch.
org.apache.lucene.analysis.no | Analyzer for Norwegian.
org.apache.lucene.analysis.pl | Analyzer for Polish.
org.apache.lucene.analysis.pt | Analyzer for Portuguese.
org.apache.lucene.analysis.ro | Analyzer for Romanian.
org.apache.lucene.analysis.ru | Analyzer for Russian.
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.sv | Analyzer for Swedish.
org.apache.lucene.analysis.th | Analyzer for Thai.
org.apache.lucene.analysis.tr | Analyzer for Turkish.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis

Methods in org.apache.lucene.analysis that return ReusableAnalyzerBase.TokenStreamComponents
protected ReusableAnalyzerBase.TokenStreamComponents | WhitespaceAnalyzer.createComponents(String fieldName, Reader reader)
protected abstract ReusableAnalyzerBase.TokenStreamComponents | ReusableAnalyzerBase.createComponents(String fieldName, Reader reader) Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.
protected ReusableAnalyzerBase.TokenStreamComponents | KeywordAnalyzer.createComponents(String fieldName, Reader reader)
protected ReusableAnalyzerBase.TokenStreamComponents | StopAnalyzer.createComponents(String fieldName, Reader reader) Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
protected ReusableAnalyzerBase.TokenStreamComponents | SimpleAnalyzer.createComponents(String fieldName, Reader reader)

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.ar

Methods in org.apache.lucene.analysis.ar that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents ArabicAnalyzer.createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.bg

Methods in org.apache.lucene.analysis.bg that return ReusableAnalyzerBase.TokenStreamComponents
 ReusableAnalyzerBase.TokenStreamComponents BulgarianAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.br

Methods in org.apache.lucene.analysis.br that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents BrazilianAnalyzer.createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.ca

Methods in org.apache.lucene.analysis.ca that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents CatalanAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.cjk

Methods in org.apache.lucene.analysis.cjk that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents CJKAnalyzer.createComponents(String fieldName, Reader reader)

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.cn

Methods in org.apache.lucene.analysis.cn that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents ChineseAnalyzer.createComponents(String fieldName, Reader reader)
Deprecated. Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.cz

Methods in org.apache.lucene.analysis.cz that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents CzechAnalyzer.createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.da

Methods in org.apache.lucene.analysis.da that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents DanishAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.de

Methods in org.apache.lucene.analysis.de that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents GermanAnalyzer.createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.el

Methods in org.apache.lucene.analysis.el that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents GreekAnalyzer.createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.en

Methods in org.apache.lucene.analysis.en that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents EnglishAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.es

Methods in org.apache.lucene.analysis.es that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents SpanishAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.eu

Methods in org.apache.lucene.analysis.eu that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents BasqueAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.fa

Methods in org.apache.lucene.analysis.fa that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents PersianAnalyzer.createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.fi

Methods in org.apache.lucene.analysis.fi that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents FinnishAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.fr

Methods in org.apache.lucene.analysis.fr that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents FrenchAnalyzer.createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.ga

Methods in org.apache.lucene.analysis.ga that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents IrishAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.gl

Methods in org.apache.lucene.analysis.gl that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents GalicianAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.hi

Methods in org.apache.lucene.analysis.hi that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents HindiAnalyzer.createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.hu

Methods in org.apache.lucene.analysis.hu that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents HungarianAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.hy

Methods in org.apache.lucene.analysis.hy that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents ArmenianAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.id

Methods in org.apache.lucene.analysis.id that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents IndonesianAnalyzer.createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.it

Methods in org.apache.lucene.analysis.it that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents ItalianAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.ja

Methods in org.apache.lucene.analysis.ja that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents JapaneseAnalyzer.createComponents(String fieldName, Reader reader)

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.lv

Methods in org.apache.lucene.analysis.lv that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents LatvianAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.miscellaneous

Methods in org.apache.lucene.analysis.miscellaneous that return ReusableAnalyzerBase.TokenStreamComponents
 ReusableAnalyzerBase.TokenStreamComponents PatternAnalyzer.createComponents(String fieldName, Reader reader)
Creates a token stream that tokenizes all the text in the given Reader; This implementation forwards to tokenStream(String, Reader, String) and is less efficient than tokenStream(String, Reader, String).
 ReusableAnalyzerBase.TokenStreamComponents PatternAnalyzer.createComponents(String fieldName, Reader reader, String text)
Creates a token stream that tokenizes the given string into token terms (aka words).

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.nl

Methods in org.apache.lucene.analysis.nl that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents DutchAnalyzer.createComponents(String fieldName, Reader aReader)
Returns a (possibly reused) TokenStream which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.no

Methods in org.apache.lucene.analysis.no that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents NorwegianAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.pl

Methods in org.apache.lucene.analysis.pl that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents PolishAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.pt

Methods in org.apache.lucene.analysis.pt that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents PortugueseAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.ro

Methods in org.apache.lucene.analysis.ro that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents RomanianAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.ru

Methods in org.apache.lucene.analysis.ru that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents RussianAnalyzer.createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.standard

Methods in org.apache.lucene.analysis.standard that return ReusableAnalyzerBase.TokenStreamComponents
protected ReusableAnalyzerBase.TokenStreamComponents | StandardAnalyzer.createComponents(String fieldName, Reader reader)
protected ReusableAnalyzerBase.TokenStreamComponents | UAX29URLEmailAnalyzer.createComponents(String fieldName, Reader reader)
protected ReusableAnalyzerBase.TokenStreamComponents | ClassicAnalyzer.createComponents(String fieldName, Reader reader)

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.sv

Methods in org.apache.lucene.analysis.sv that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents SwedishAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.th

Methods in org.apache.lucene.analysis.th that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents ThaiAnalyzer.createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Uses of ReusableAnalyzerBase.TokenStreamComponents in org.apache.lucene.analysis.tr

Methods in org.apache.lucene.analysis.tr that return ReusableAnalyzerBase.TokenStreamComponents
protected  ReusableAnalyzerBase.TokenStreamComponents TurkishAnalyzer.createComponents(String fieldName, Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.SimpleAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.SimpleAnalyzer

No usage of org.apache.lucene.analysis.SimpleAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.StopAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.StopAnalyzer

No usage of org.apache.lucene.analysis.StopAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.StopFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.StopFilter

No usage of org.apache.lucene.analysis.StopFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.StopwordAnalyzerBase

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.StopwordAnalyzerBase

Packages that use StopwordAnalyzerBase
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ar | Analyzer for Arabic.
org.apache.lucene.analysis.bg | Analyzer for Bulgarian.
org.apache.lucene.analysis.br | Analyzer for Brazilian Portuguese.
org.apache.lucene.analysis.ca | Analyzer for Catalan.
org.apache.lucene.analysis.cjk | Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).
org.apache.lucene.analysis.da | Analyzer for Danish.
org.apache.lucene.analysis.de | Analyzer for German.
org.apache.lucene.analysis.el | Analyzer for Greek.
org.apache.lucene.analysis.en | Analyzer for English.
org.apache.lucene.analysis.es | Analyzer for Spanish.
org.apache.lucene.analysis.eu | Analyzer for Basque.
org.apache.lucene.analysis.fa | Analyzer for Persian.
org.apache.lucene.analysis.fi | Analyzer for Finnish.
org.apache.lucene.analysis.fr | Analyzer for French.
org.apache.lucene.analysis.ga | Analysis for Irish.
org.apache.lucene.analysis.gl | Analyzer for Galician.
org.apache.lucene.analysis.hi | Analyzer for Hindi.
org.apache.lucene.analysis.hu | Analyzer for Hungarian.
org.apache.lucene.analysis.hy | Analyzer for Armenian.
org.apache.lucene.analysis.id | Analyzer for Indonesian.
org.apache.lucene.analysis.it | Analyzer for Italian.
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.lv | Analyzer for Latvian.
org.apache.lucene.analysis.no | Analyzer for Norwegian.
org.apache.lucene.analysis.pl | Analyzer for Polish.
org.apache.lucene.analysis.pt | Analyzer for Portuguese.
org.apache.lucene.analysis.ro | Analyzer for Romanian.
org.apache.lucene.analysis.ru | Analyzer for Russian.
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.sv | Analyzer for Swedish.
org.apache.lucene.analysis.th | Analyzer for Thai.
org.apache.lucene.analysis.tr | Analyzer for Turkish.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis
 class StopAnalyzer
Filters LetterTokenizer with LowerCaseFilter and StopFilter.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.ar

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.ar
 class ArabicAnalyzer
Analyzer for Arabic.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.bg

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.bg
 class BulgarianAnalyzer
Analyzer for Bulgarian.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.br

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.br
 class BrazilianAnalyzer
Analyzer for Brazilian Portuguese language.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.ca

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.ca
 class CatalanAnalyzer
Analyzer for Catalan.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.cjk

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.cjk
 class CJKAnalyzer
An Analyzer that tokenizes text with StandardTokenizer, normalizes content with CJKWidthFilter, folds case with LowerCaseFilter, forms bigrams of CJK with CJKBigramFilter, and filters stopwords with StopFilter

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.da

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.da
 class DanishAnalyzer
Analyzer for Danish.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.de

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.de
 class GermanAnalyzer
Analyzer for German language.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.el

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.el
 class GreekAnalyzer
Analyzer for the Greek language.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.en

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.en
 class EnglishAnalyzer
Analyzer for English.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.es

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.es
 class SpanishAnalyzer
Analyzer for Spanish.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.eu

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.eu
 class BasqueAnalyzer
Analyzer for Basque.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.fa

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.fa
 class PersianAnalyzer
Analyzer for Persian.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.fi

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.fi
 class FinnishAnalyzer
Analyzer for Finnish.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.fr

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.fr
 class FrenchAnalyzer
Analyzer for French language.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.ga

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.ga
 class IrishAnalyzer
Analyzer for Irish.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.gl

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.gl
 class GalicianAnalyzer
Analyzer for Galician.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.hi

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.hi
 class HindiAnalyzer
Analyzer for Hindi.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.hu

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.hu
 class HungarianAnalyzer
Analyzer for Hungarian.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.hy

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.hy
 class ArmenianAnalyzer
Analyzer for Armenian.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.id

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.id
 class IndonesianAnalyzer
Analyzer for Indonesian (Bahasa)

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.it

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.it
 class ItalianAnalyzer
Analyzer for Italian.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.ja

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.ja
 class JapaneseAnalyzer
Analyzer for Japanese that uses morphological analysis.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.lv

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.lv
 class LatvianAnalyzer
Analyzer for Latvian.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.no

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.no
 class NorwegianAnalyzer
Analyzer for Norwegian.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.pl

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.pl
 class PolishAnalyzer
Analyzer for Polish.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.pt

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.pt
 class PortugueseAnalyzer
Analyzer for Portuguese.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.ro

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.ro
 class RomanianAnalyzer
Analyzer for Romanian.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.ru

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.ru
 class RussianAnalyzer
Analyzer for Russian language.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.standard

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.standard
class | ClassicAnalyzer Filters ClassicTokenizer with ClassicFilter, LowerCaseFilter and StopFilter, using a list of English stop words.
class | StandardAnalyzer Filters StandardTokenizer with StandardFilter, LowerCaseFilter and StopFilter, using a list of English stop words.
class | UAX29URLEmailAnalyzer Filters UAX29URLEmailTokenizer with StandardFilter, LowerCaseFilter and StopFilter, using a list of English stop words.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.sv

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.sv
 class SwedishAnalyzer
Analyzer for Swedish.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.th

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.th
 class ThaiAnalyzer
Analyzer for Thai language.

Uses of StopwordAnalyzerBase in org.apache.lucene.analysis.tr

Subclasses of StopwordAnalyzerBase in org.apache.lucene.analysis.tr
 class TurkishAnalyzer
Analyzer for Turkish.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.TeeSinkTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.TeeSinkTokenFilter

No usage of org.apache.lucene.analysis.TeeSinkTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter

Packages that use TeeSinkTokenFilter.SinkFilter
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.sinks | Implementations of the SinkTokenizer that might be useful.

Uses of TeeSinkTokenFilter.SinkFilter in org.apache.lucene.analysis

Methods in org.apache.lucene.analysis with parameters of type TeeSinkTokenFilter.SinkFilter
 TeeSinkTokenFilter.SinkTokenStream TeeSinkTokenFilter.newSinkTokenStream(TeeSinkTokenFilter.SinkFilter filter)
Returns a new TeeSinkTokenFilter.SinkTokenStream that receives all tokens consumed by this stream that pass the supplied filter.

Uses of TeeSinkTokenFilter.SinkFilter in org.apache.lucene.analysis.sinks

Subclasses of TeeSinkTokenFilter.SinkFilter in org.apache.lucene.analysis.sinks
class | DateRecognizerSinkFilter Attempts to parse the CharTermAttributeImpl.termBuffer() as a Date using a DateFormat.
class | TokenRangeSinkFilter Counts the tokens as they go by and saves to the internal list those between the range of lower and upper, exclusive of upper
class | TokenTypeSinkFilter Adds a token to the sink if it has a specific type.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.TeeSinkTokenFilter.SinkTokenStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.TeeSinkTokenFilter.SinkTokenStream

Packages that use TeeSinkTokenFilter.SinkTokenStream
org.apache.lucene.analysis API and code to convert text into indexable/searchable tokens.

Uses of TeeSinkTokenFilter.SinkTokenStream in org.apache.lucene.analysis

Methods in org.apache.lucene.analysis that return TeeSinkTokenFilter.SinkTokenStream
TeeSinkTokenFilter.SinkTokenStream | TeeSinkTokenFilter.newSinkTokenStream() Returns a new TeeSinkTokenFilter.SinkTokenStream that receives all tokens consumed by this stream.
TeeSinkTokenFilter.SinkTokenStream | TeeSinkTokenFilter.newSinkTokenStream(TeeSinkTokenFilter.SinkFilter filter) Returns a new TeeSinkTokenFilter.SinkTokenStream that receives all tokens consumed by this stream that pass the supplied filter.

Methods in org.apache.lucene.analysis with parameters of type TeeSinkTokenFilter.SinkTokenStream
 void TeeSinkTokenFilter.addSinkTokenStream(TeeSinkTokenFilter.SinkTokenStream sink)
Adds a TeeSinkTokenFilter.SinkTokenStream created by another TeeSinkTokenFilter to this one.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.Token

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.Token

Packages that use Token
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.miscellaneous | Miscellaneous TokenStreams
org.apache.lucene.analysis.shingle | Word n-gram filters
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

Uses of Token in org.apache.lucene.analysis

Methods in org.apache.lucene.analysis that return Token
 Token Token.clone(char[] newTermBuffer, int newTermOffset, int newTermLength, int newStartOffset, int newEndOffset)
Makes a clone, but replaces the term buffer & start/end offset in the process.
 Token Token.reinit(char[] newTermBuffer, int newTermOffset, int newTermLength, int newStartOffset, int newEndOffset)
Shorthand for calling clear(), CharTermAttributeImpl.copyBuffer(char[], int, int), setStartOffset(int), setEndOffset(int) setType(java.lang.String) on Token.DEFAULT_TYPE
 Token Token.reinit(char[] newTermBuffer, int newTermOffset, int newTermLength, int newStartOffset, int newEndOffset, String newType)
Shorthand for calling clear(), CharTermAttributeImpl.copyBuffer(char[], int, int), setStartOffset(int), setEndOffset(int), setType(java.lang.String)
 Token Token.reinit(String newTerm, int newStartOffset, int newEndOffset)
Shorthand for calling clear(), CharTermAttributeImpl.append(CharSequence), setStartOffset(int), setEndOffset(int) setType(java.lang.String) on Token.DEFAULT_TYPE
 Token Token.reinit(String newTerm, int newTermOffset, int newTermLength, int newStartOffset, int newEndOffset)
Shorthand for calling clear(), CharTermAttributeImpl.append(CharSequence, int, int), setStartOffset(int), setEndOffset(int) setType(java.lang.String) on Token.DEFAULT_TYPE
 Token Token.reinit(String newTerm, int newTermOffset, int newTermLength, int newStartOffset, int newEndOffset, String newType)
Shorthand for calling clear(), CharTermAttributeImpl.append(CharSequence, int, int), setStartOffset(int), setEndOffset(int) setType(java.lang.String)
 Token Token.reinit(String newTerm, int newStartOffset, int newEndOffset, String newType)
Shorthand for calling clear(), CharTermAttributeImpl.append(CharSequence), setStartOffset(int), setEndOffset(int) setType(java.lang.String)

Methods in org.apache.lucene.analysis with parameters of type Token
void | Token.reinit(Token prototype) Copy the prototype token's fields into this one.
void | Token.reinit(Token prototype, char[] newTermBuffer, int offset, int length) Copy the prototype token's fields into this one, with a different term.
void | Token.reinit(Token prototype, String newTerm) Copy the prototype token's fields into this one, with a different term.

Constructors in org.apache.lucene.analysis with parameters of type Token
CannedTokenStream(Token... tokens)

Uses of Token in org.apache.lucene.analysis.miscellaneous

Methods in org.apache.lucene.analysis.miscellaneous that return Token
Token | SingleTokenTokenStream.getToken()
Token | PrefixAndSuffixAwareTokenFilter.updateInputToken(Token inputToken, Token lastPrefixToken)
Token | PrefixAndSuffixAwareTokenFilter.updateSuffixToken(Token suffixToken, Token lastInputToken)
Token | PrefixAwareTokenFilter.updateSuffixToken(Token suffixToken, Token lastPrefixToken) The default implementation adds last prefix token end offset to the suffix token start and end offsets.

Methods in org.apache.lucene.analysis.miscellaneous with parameters of type Token
void | SingleTokenTokenStream.setToken(Token token)
Token | PrefixAndSuffixAwareTokenFilter.updateInputToken(Token inputToken, Token lastPrefixToken)
Token | PrefixAndSuffixAwareTokenFilter.updateSuffixToken(Token suffixToken, Token lastInputToken)
Token | PrefixAwareTokenFilter.updateSuffixToken(Token suffixToken, Token lastPrefixToken) The default implementation adds last prefix token end offset to the suffix token start and end offsets.

Constructors in org.apache.lucene.analysis.miscellaneous with parameters of type Token
SingleTokenTokenStream(Token token)

Uses of Token in org.apache.lucene.analysis.shingle

Methods in org.apache.lucene.analysis.shingle that return types with arguments of type Token
 List<Token> ShingleMatrixFilter.Matrix.Column.Row.getTokens()

Methods in org.apache.lucene.analysis.shingle with parameters of type Token
 float ShingleMatrixFilter.calculateShingleWeight(Token shingleToken, List<Token> shingle, int currentPermutationStartOffset, List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows, List<Token> currentPermuationTokens)
Deprecated. Evaluates the new shingle token weight.
abstract  ShingleMatrixFilter.TokenPositioner ShingleMatrixFilter.TokenSettingsCodec.getTokenPositioner(Token token)
Retrieves information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
 ShingleMatrixFilter.TokenPositioner ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec.getTokenPositioner(Token token)
 ShingleMatrixFilter.TokenPositioner ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec.getTokenPositioner(Token token)
 ShingleMatrixFilter.TokenPositioner ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec.getTokenPositioner(Token token)
abstract  float ShingleMatrixFilter.TokenSettingsCodec.getWeight(Token token)
Have this method return 1f in order to 'disable' weights.
 float ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec.getWeight(Token token)
 float ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec.getWeight(Token token)
 float ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec.getWeight(Token token)
Returns a 32 bit float from the payload, or 1f it null.
abstract  void ShingleMatrixFilter.TokenSettingsCodec.setTokenPositioner(Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner)
Sets information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
 void ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec.setTokenPositioner(Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner)
 void ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec.setTokenPositioner(Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner)
 void ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec.setTokenPositioner(Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner)
Sets the TokenPositioner as token flags int value.
abstract  void ShingleMatrixFilter.TokenSettingsCodec.setWeight(Token token, float weight)
Have this method do nothing in order to 'disable' weights.
 void ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec.setWeight(Token token, float weight)
 void ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec.setWeight(Token token, float weight)
 void ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec.setWeight(Token token, float weight)
Stores a 32 bit float in the payload, or set it to null if 1f;
 void ShingleMatrixFilter.updateToken(Token token, List<Token> shingle, int currentPermutationStartOffset, List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows, List<Token> currentPermuationTokens)
Deprecated. Final touch of a shingle token before it is passed on to the consumer from method ShingleMatrixFilter.incrementToken().

Method parameters in org.apache.lucene.analysis.shingle with type arguments of type Token
 float ShingleMatrixFilter.calculateShingleWeight(Token shingleToken, List<Token> shingle, int currentPermutationStartOffset, List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows, List<Token> currentPermuationTokens)
Deprecated. Evaluates the new shingle token weight.
 float ShingleMatrixFilter.calculateShingleWeight(Token shingleToken, List<Token> shingle, int currentPermutationStartOffset, List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows, List<Token> currentPermuationTokens)
Deprecated. Evaluates the new shingle token weight.
 void ShingleMatrixFilter.Matrix.Column.Row.setTokens(List<Token> tokens)
 void ShingleMatrixFilter.updateToken(Token token, List<Token> shingle, int currentPermutationStartOffset, List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows, List<Token> currentPermuationTokens)
Deprecated. Final touch of a shingle token before it is passed on to the consumer from method ShingleMatrixFilter.incrementToken().
 void ShingleMatrixFilter.updateToken(Token token, List<Token> shingle, int currentPermutationStartOffset, List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows, List<Token> currentPermuationTokens)
Deprecated. Final touch of a shingle token before it is passed on to the consumer from method ShingleMatrixFilter.incrementToken().

Constructors in org.apache.lucene.analysis.shingle with parameters of type Token
ShingleMatrixFilter.Matrix.Column(Token token)

Uses of Token in org.apache.lucene.search.highlight

Methods in org.apache.lucene.search.highlight that return Token
 Token TokenGroup.getToken(int index)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.Token.TokenAttributeFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.Token.TokenAttributeFactory

No usage of org.apache.lucene.analysis.Token.TokenAttributeFactory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.TokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.TokenFilter

Packages that use TokenFilter
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ar | Analyzer for Arabic.
org.apache.lucene.analysis.bg | Analyzer for Bulgarian.
org.apache.lucene.analysis.br | Analyzer for Brazilian Portuguese.
org.apache.lucene.analysis.cjk | Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).
org.apache.lucene.analysis.cn | Analyzer for Chinese, which indexes unigrams (individual chinese characters).
org.apache.lucene.analysis.cn.smart | Analyzer for Simplified Chinese, which indexes words.
org.apache.lucene.analysis.compound | A filter that decomposes compound words you find in many Germanic languages into the word parts.
org.apache.lucene.analysis.cz | Analyzer for Czech.
org.apache.lucene.analysis.de | Analyzer for German.
org.apache.lucene.analysis.el | Analyzer for Greek.
org.apache.lucene.analysis.en | Analyzer for English.
org.apache.lucene.analysis.es | Analyzer for Spanish.
org.apache.lucene.analysis.fa | Analyzer for Persian.
org.apache.lucene.analysis.fi | Analyzer for Finnish.
org.apache.lucene.analysis.fr | Analyzer for French.
org.apache.lucene.analysis.ga | Analysis for Irish.
org.apache.lucene.analysis.gl | Analyzer for Galician.
org.apache.lucene.analysis.hi | Analyzer for Hindi.
org.apache.lucene.analysis.hu | Analyzer for Hungarian.
org.apache.lucene.analysis.hunspell | Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.
org.apache.lucene.analysis.icu | Analysis components based on ICU
org.apache.lucene.analysis.id | Analyzer for Indonesian.
org.apache.lucene.analysis.in | Analysis components for Indian languages.
org.apache.lucene.analysis.it | Analyzer for Italian.
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.lv | Analyzer for Latvian.
org.apache.lucene.analysis.miscellaneous | Miscellaneous TokenStreams
org.apache.lucene.analysis.ngram | Character n-gram tokenizers and filters.
org.apache.lucene.analysis.nl | Analyzer for Dutch.
org.apache.lucene.analysis.no | Analyzer for Norwegian.
org.apache.lucene.analysis.payloads | Provides various convenience classes for creating payloads on Tokens.
org.apache.lucene.analysis.phonetic | Analysis components for phonetic search.
org.apache.lucene.analysis.position | Filter for assigning position increments.
org.apache.lucene.analysis.pt | Analyzer for Portuguese.
org.apache.lucene.analysis.reverse | Filter to reverse token text.
org.apache.lucene.analysis.ru | Analyzer for Russian.
org.apache.lucene.analysis.shingle | Word n-gram filters
org.apache.lucene.analysis.snowball | TokenFilter and Analyzer implementations that use Snowball stemmers.
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.stempel | Stempel: Algorithmic Stemmer
org.apache.lucene.analysis.sv | Analyzer for Swedish.
org.apache.lucene.analysis.synonym | Analysis components for Synonyms.
org.apache.lucene.analysis.th | Analyzer for Thai.
org.apache.lucene.analysis.tr | Analyzer for Turkish.
org.apache.lucene.collation | CollationKeyFilter converts each token into its binary CollationKey using the provided Collator, and then encode the CollationKey as a String using IndexableBinaryStringTools, to allow it to be stored as an index term.
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

Uses of TokenFilter in org.apache.lucene.analysis

Subclasses of TokenFilter in org.apache.lucene.analysis
class | ASCIIFoldingFilter This class converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if one exists.
class | CachingTokenFilter This class can be used if the token attributes of a TokenStream are intended to be consumed more than once.
class | FilteringTokenFilter Abstract base class for TokenFilters that may remove tokens.
class | ISOLatin1AccentFilter Deprecated. If you build a new index, use ASCIIFoldingFilter which covers a superset of Latin 1. This class is included for use with existing indexes and will be removed in a future release (possibly Lucene 4.0).
class | KeywordMarkerFilter Marks terms as keywords via the KeywordAttribute.
class | LengthFilter Removes words that are too long or too short from the stream.
class | LimitTokenCountFilter This TokenFilter limits the number of tokens while indexing.
class | LookaheadTokenFilter<T extends LookaheadTokenFilter.Position> An abstract TokenFilter to make it easier to build graph token filters requiring some lookahead.
class | LowerCaseFilter Normalizes token text to lower case.
class | MockFixedLengthPayloadFilter TokenFilter that adds random fixed-length payloads.
class | MockGraphTokenFilter Randomly inserts overlapped (posInc=0) tokens with posLength sometimes > 1.
class | MockHoleInjectingTokenFilter
class | MockRandomLookaheadTokenFilter Uses LookaheadTokenFilter to randomly peek at future tokens.
class | MockVariableLengthPayloadFilter TokenFilter that adds random variable-length payloads.
class | PorterStemFilter Transforms the token stream as per the Porter stemming algorithm.
class | StopFilter Removes stop words from a token stream.
class | TeeSinkTokenFilter This TokenFilter provides the ability to set aside attribute states that have already been analyzed.
class | TypeTokenFilter Removes tokens whose types appear in a set of blocked types from a token stream.
class | ValidatingTokenFilter A TokenFilter that checks consistency of the tokens (eg offsets are consistent with one another).

Uses of TokenFilter in org.apache.lucene.analysis.ar

Subclasses of TokenFilter in org.apache.lucene.analysis.ar
class | ArabicNormalizationFilter A TokenFilter that applies ArabicNormalizer to normalize the orthography.
class | ArabicStemFilter A TokenFilter that applies ArabicStemmer to stem Arabic words..

Uses of TokenFilter in org.apache.lucene.analysis.bg

Subclasses of TokenFilter in org.apache.lucene.analysis.bg
 class BulgarianStemFilter
A TokenFilter that applies BulgarianStemmer to stem Bulgarian words.

Uses of TokenFilter in org.apache.lucene.analysis.br

Subclasses of TokenFilter in org.apache.lucene.analysis.br
 class BrazilianStemFilter
A TokenFilter that applies BrazilianStemmer.

Uses of TokenFilter in org.apache.lucene.analysis.cjk

Subclasses of TokenFilter in org.apache.lucene.analysis.cjk
class | CJKBigramFilter Forms bigrams of CJK terms that are generated from StandardTokenizer or ICUTokenizer.
class | CJKWidthFilter A TokenFilter that normalizes CJK width differences: Folds fullwidth ASCII variants into the equivalent basic latin Folds halfwidth Katakana variants into the equivalent kana

Uses of TokenFilter in org.apache.lucene.analysis.cn

Subclasses of TokenFilter in org.apache.lucene.analysis.cn
 class ChineseFilter
Deprecated. Use StopFilter instead, which has the same functionality. This filter will be removed in Lucene 5.0

Uses of TokenFilter in org.apache.lucene.analysis.cn.smart

Subclasses of TokenFilter in org.apache.lucene.analysis.cn.smart
 class WordTokenFilter
A TokenFilter that breaks sentences into words.

Uses of TokenFilter in org.apache.lucene.analysis.compound

Subclasses of TokenFilter in org.apache.lucene.analysis.compound
class | CompoundWordTokenFilterBase Base class for decomposition token filters.
class | DictionaryCompoundWordTokenFilter A TokenFilter that decomposes compound words found in many Germanic languages.
class | HyphenationCompoundWordTokenFilter A TokenFilter that decomposes compound words found in many Germanic languages.

Uses of TokenFilter in org.apache.lucene.analysis.cz

Subclasses of TokenFilter in org.apache.lucene.analysis.cz
 class CzechStemFilter
A TokenFilter that applies CzechStemmer to stem Czech words.

Uses of TokenFilter in org.apache.lucene.analysis.de

Subclasses of TokenFilter in org.apache.lucene.analysis.de
class | GermanLightStemFilter A TokenFilter that applies GermanLightStemmer to stem German words.
class | GermanMinimalStemFilter A TokenFilter that applies GermanMinimalStemmer to stem German words.
class | GermanNormalizationFilter Normalizes German characters according to the heuristics of the German2 snowball algorithm.
class | GermanStemFilter A TokenFilter that stems German words.

Uses of TokenFilter in org.apache.lucene.analysis.el

Subclasses of TokenFilter in org.apache.lucene.analysis.el
class | GreekLowerCaseFilter Normalizes token text to lower case, removes some Greek diacritics, and standardizes final sigma to sigma.
class | GreekStemFilter A TokenFilter that applies GreekStemmer to stem Greek words.

Uses of TokenFilter in org.apache.lucene.analysis.en

Subclasses of TokenFilter in org.apache.lucene.analysis.en
class | EnglishMinimalStemFilter A TokenFilter that applies EnglishMinimalStemmer to stem English words.
class | EnglishPossessiveFilter TokenFilter that removes possessives (trailing 's) from words.
class | KStemFilter A high-performance kstem filter for english.

Uses of TokenFilter in org.apache.lucene.analysis.es

Subclasses of TokenFilter in org.apache.lucene.analysis.es
 class SpanishLightStemFilter
A TokenFilter that applies SpanishLightStemmer to stem Spanish words.

Uses of TokenFilter in org.apache.lucene.analysis.fa

Subclasses of TokenFilter in org.apache.lucene.analysis.fa
 class PersianNormalizationFilter
A TokenFilter that applies PersianNormalizer to normalize the orthography.

Uses of TokenFilter in org.apache.lucene.analysis.fi

Subclasses of TokenFilter in org.apache.lucene.analysis.fi
 class FinnishLightStemFilter
A TokenFilter that applies FinnishLightStemmer to stem Finnish words.

Uses of TokenFilter in org.apache.lucene.analysis.fr

Subclasses of TokenFilter in org.apache.lucene.analysis.fr
class | ElisionFilter Removes elisions from a TokenStream.
class | FrenchLightStemFilter A TokenFilter that applies FrenchLightStemmer to stem French words.
class | FrenchMinimalStemFilter A TokenFilter that applies FrenchMinimalStemmer to stem French words.
class | FrenchStemFilter Deprecated. Use SnowballFilter with FrenchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0

Uses of TokenFilter in org.apache.lucene.analysis.ga

Subclasses of TokenFilter in org.apache.lucene.analysis.ga
 class IrishLowerCaseFilter
Normalises token text to lower case, handling t-prothesis and n-eclipsis (i.e., that 'nAthair' should become 'n-athair')

Uses of TokenFilter in org.apache.lucene.analysis.gl

Subclasses of TokenFilter in org.apache.lucene.analysis.gl
class | GalicianMinimalStemFilter A TokenFilter that applies GalicianMinimalStemmer to stem Galician words.
class | GalicianStemFilter A TokenFilter that applies GalicianStemmer to stem Galician words.

Uses of TokenFilter in org.apache.lucene.analysis.hi

Subclasses of TokenFilter in org.apache.lucene.analysis.hi
class | HindiNormalizationFilter A TokenFilter that applies HindiNormalizer to normalize the orthography.
class | HindiStemFilter A TokenFilter that applies HindiStemmer to stem Hindi words.

Uses of TokenFilter in org.apache.lucene.analysis.hu

Subclasses of TokenFilter in org.apache.lucene.analysis.hu
 class HungarianLightStemFilter
A TokenFilter that applies HungarianLightStemmer to stem Hungarian words.

Uses of TokenFilter in org.apache.lucene.analysis.hunspell

Subclasses of TokenFilter in org.apache.lucene.analysis.hunspell
 class HunspellStemFilter
TokenFilter that uses hunspell affix rules and words to stem tokens.

Uses of TokenFilter in org.apache.lucene.analysis.icu

Subclasses of TokenFilter in org.apache.lucene.analysis.icu
class | ICUFoldingFilter A TokenFilter that applies search term folding to Unicode text, applying foldings from UTR#30 Character Foldings.
class | ICUNormalizer2Filter Normalize token text with ICU's Normalizer2
class | ICUTransformFilter A TokenFilter that transforms text with ICU.

Uses of TokenFilter in org.apache.lucene.analysis.id

Subclasses of TokenFilter in org.apache.lucene.analysis.id
 class IndonesianStemFilter
A TokenFilter that applies IndonesianStemmer to stem Indonesian words.

Uses of TokenFilter in org.apache.lucene.analysis.in

Subclasses of TokenFilter in org.apache.lucene.analysis.in
 class IndicNormalizationFilter
A TokenFilter that applies IndicNormalizer to normalize text in Indian Languages.

Uses of TokenFilter in org.apache.lucene.analysis.it

Subclasses of TokenFilter in org.apache.lucene.analysis.it
 class ItalianLightStemFilter
A TokenFilter that applies ItalianLightStemmer to stem Italian words.

Uses of TokenFilter in org.apache.lucene.analysis.ja

Subclasses of TokenFilter in org.apache.lucene.analysis.ja
class | JapaneseBaseFormFilter Replaces term text with the BaseFormAttribute.
class | JapaneseKatakanaStemFilter A TokenFilter that normalizes common katakana spelling variations ending in a long sound character by removing this character (U+30FC).
class | JapanesePartOfSpeechStopFilter Removes tokens that match a set of part-of-speech tags.
class | JapaneseReadingFormFilter A TokenFilter that replaces the term attribute with the reading of a token in either katakana or romaji form.

Uses of TokenFilter in org.apache.lucene.analysis.lv

Subclasses of TokenFilter in org.apache.lucene.analysis.lv
 class LatvianStemFilter
A TokenFilter that applies LatvianStemmer to stem Latvian words.

Uses of TokenFilter in org.apache.lucene.analysis.miscellaneous

Subclasses of TokenFilter in org.apache.lucene.analysis.miscellaneous
 class StemmerOverrideFilter
Provides the ability to override any KeywordAttribute aware stemmer with custom dictionary-based stemming.

Uses of TokenFilter in org.apache.lucene.analysis.ngram

Subclasses of TokenFilter in org.apache.lucene.analysis.ngram
class | EdgeNGramTokenFilter Tokenizes the given token into n-grams of given size(s).
class | NGramTokenFilter Tokenizes the input into n-grams of the given size(s).

Uses of TokenFilter in org.apache.lucene.analysis.nl

Subclasses of TokenFilter in org.apache.lucene.analysis.nl
 class DutchStemFilter
Deprecated. Use SnowballFilter with DutchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0

Uses of TokenFilter in org.apache.lucene.analysis.no

Subclasses of TokenFilter in org.apache.lucene.analysis.no
class | NorwegianLightStemFilter A TokenFilter that applies NorwegianLightStemmer to stem Norwegian words.
class | NorwegianMinimalStemFilter A TokenFilter that applies NorwegianMinimalStemmer to stem Norwegian words.

Uses of TokenFilter in org.apache.lucene.analysis.payloads

Subclasses of TokenFilter in org.apache.lucene.analysis.payloads
class | DelimitedPayloadTokenFilter Characters before the delimiter are the "token", those after are the payload.
class | NumericPayloadTokenFilter Assigns a payload to a token based on the Token.type()
class | TokenOffsetPayloadTokenFilter Adds the Token.setStartOffset(int) and Token.setEndOffset(int) First 4 bytes are the start
class | TypeAsPayloadTokenFilter Makes the Token.type() a payload.

Uses of TokenFilter in org.apache.lucene.analysis.phonetic

Subclasses of TokenFilter in org.apache.lucene.analysis.phonetic
class | BeiderMorseFilter TokenFilter for Beider-Morse phonetic encoding.
class | DoubleMetaphoneFilter Filter for DoubleMetaphone (supporting secondary codes)
class | PhoneticFilter Create tokens for phonetic matches.

Uses of TokenFilter in org.apache.lucene.analysis.position

Subclasses of TokenFilter in org.apache.lucene.analysis.position
 class PositionFilter
Set the positionIncrement of all tokens to the "positionIncrement", except the first return token which retains its original positionIncrement value.

Uses of TokenFilter in org.apache.lucene.analysis.pt

Subclasses of TokenFilter in org.apache.lucene.analysis.pt
class | PortugueseLightStemFilter A TokenFilter that applies PortugueseLightStemmer to stem Portuguese words.
class | PortugueseMinimalStemFilter A TokenFilter that applies PortugueseMinimalStemmer to stem Portuguese words.
class | PortugueseStemFilter A TokenFilter that applies PortugueseStemmer to stem Portuguese words.

Uses of TokenFilter in org.apache.lucene.analysis.reverse

Subclasses of TokenFilter in org.apache.lucene.analysis.reverse
 class ReverseStringFilter
Reverse token string, for example "country" => "yrtnuoc".

Uses of TokenFilter in org.apache.lucene.analysis.ru

Subclasses of TokenFilter in org.apache.lucene.analysis.ru
class | RussianLightStemFilter A TokenFilter that applies RussianLightStemmer to stem Russian words.
class | RussianLowerCaseFilter Deprecated. Use LowerCaseFilter instead, which has the same functionality. This filter will be removed in Lucene 4.0
class | RussianStemFilter Deprecated. Use SnowballFilter with RussianStemmer instead, which has the same functionality. This filter will be removed in Lucene 4.0

Uses of TokenFilter in org.apache.lucene.analysis.shingle

Subclasses of TokenFilter in org.apache.lucene.analysis.shingle
 class ShingleFilter
A ShingleFilter constructs shingles (token n-grams) from a token stream.

Uses of TokenFilter in org.apache.lucene.analysis.snowball

Subclasses of TokenFilter in org.apache.lucene.analysis.snowball
 class SnowballFilter
A filter that stems words using a Snowball-generated stemmer.

Uses of TokenFilter in org.apache.lucene.analysis.standard

Subclasses of TokenFilter in org.apache.lucene.analysis.standard
class | ClassicFilter Normalizes tokens extracted with ClassicTokenizer.
class | StandardFilter Normalizes tokens extracted with StandardTokenizer.

Uses of TokenFilter in org.apache.lucene.analysis.stempel

Subclasses of TokenFilter in org.apache.lucene.analysis.stempel
 class StempelFilter
Transforms the token stream as per the stemming algorithm.

Uses of TokenFilter in org.apache.lucene.analysis.sv

Subclasses of TokenFilter in org.apache.lucene.analysis.sv
 class SwedishLightStemFilter
A TokenFilter that applies SwedishLightStemmer to stem Swedish words.

Uses of TokenFilter in org.apache.lucene.analysis.synonym

Subclasses of TokenFilter in org.apache.lucene.analysis.synonym
 class SynonymFilter
Matches single or multi word synonyms in a token stream.

Uses of TokenFilter in org.apache.lucene.analysis.th

Subclasses of TokenFilter in org.apache.lucene.analysis.th
 class ThaiWordFilter
TokenFilter that use BreakIterator to break each Token that is Thai into separate Token(s) for each Thai word.

Uses of TokenFilter in org.apache.lucene.analysis.tr

Subclasses of TokenFilter in org.apache.lucene.analysis.tr
 class TurkishLowerCaseFilter
Normalizes Turkish token text to lower case.

Uses of TokenFilter in org.apache.lucene.collation

Subclasses of TokenFilter in org.apache.lucene.collation
class | CollationKeyFilter Converts each token into its CollationKey, and then encodes the CollationKey with IndexableBinaryStringTools, to allow it to be stored as an index term.
class | ICUCollationKeyFilter Converts each token into its CollationKey, and then encodes the CollationKey with IndexableBinaryStringTools, to allow it to be stored as an index term.

Uses of TokenFilter in org.apache.lucene.facet.enhancements

Subclasses of TokenFilter in org.apache.lucene.facet.enhancements
 class EnhancementsCategoryTokenizer
A tokenizer which adds to each category token payload according to the CategoryEnhancements defined in the given EnhancementsIndexingParams.

Uses of TokenFilter in org.apache.lucene.facet.enhancements.association

Subclasses of TokenFilter in org.apache.lucene.facet.enhancements.association
 class AssociationListTokenizer
Tokenizer for associations of a category

Uses of TokenFilter in org.apache.lucene.facet.index.streaming

Subclasses of TokenFilter in org.apache.lucene.facet.index.streaming
class | CategoryListTokenizer A base class for category list tokenizers, which add category list tokens to category streams.
class | CategoryParentsStream This class adds parents to a CategoryAttributesStream.
class | CategoryTokenizer Basic class for setting the CharTermAttributes and PayloadAttributes of category tokens.
class | CategoryTokenizerBase A base class for all token filters which add term and payload attributes to tokens and are to be used in CategoryDocumentBuilder.
class | CountingListTokenizer CategoryListTokenizer for facet counting

Uses of TokenFilter in org.apache.lucene.queryParser

Subclasses of TokenFilter in org.apache.lucene.queryParser
static class QueryParserTestBase.QPTestFilter
Filter which discards the token 'stop' and which expands the token 'phrase' into 'phrase1 phrase2'

Uses of TokenFilter in org.apache.lucene.search.highlight

Subclasses of TokenFilter in org.apache.lucene.search.highlight
 class OffsetLimitTokenFilter
This TokenFilter limits the number of tokens while indexing by adding up the current offset.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.Tokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.Tokenizer

Packages that use Tokenizer
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ar | Analyzer for Arabic.
org.apache.lucene.analysis.cjk | Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).
org.apache.lucene.analysis.cn | Analyzer for Chinese, which indexes unigrams (individual chinese characters).
org.apache.lucene.analysis.cn.smart | Analyzer for Simplified Chinese, which indexes words.
org.apache.lucene.analysis.icu.segmentation | Tokenizer that breaks text into words with the Unicode Text Segmentation algorithm.
org.apache.lucene.analysis.in | Analysis components for Indian languages.
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.ngram | Character n-gram tokenizers and filters.
org.apache.lucene.analysis.path | Analysis components for path-like strings such as filenames.
org.apache.lucene.analysis.ru | Analyzer for Russian.
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.wikipedia | Tokenizer that is aware of Wikipedia syntax.

Uses of Tokenizer in org.apache.lucene.analysis

Subclasses of Tokenizer in org.apache.lucene.analysis
class | CharTokenizer An abstract base class for simple, character-oriented tokenizers.
class | EmptyTokenizer Emits no tokens
class | KeywordTokenizer Emits the entire input as a single token.
class | LetterTokenizer A LetterTokenizer is a tokenizer that divides text at non-letters.
class | LowerCaseTokenizer LowerCaseTokenizer performs the function of LetterTokenizer and LowerCaseFilter together.
class | MockTokenizer Tokenizer for testing.
class | WhitespaceTokenizer A WhitespaceTokenizer is a tokenizer that divides text at whitespace.

Fields in org.apache.lucene.analysis declared as Tokenizer
protected  Tokenizer ReusableAnalyzerBase.TokenStreamComponents.source

Constructors in org.apache.lucene.analysis with parameters of type Tokenizer
ReusableAnalyzerBase.TokenStreamComponents(Tokenizer source)
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance.
ReusableAnalyzerBase.TokenStreamComponents(Tokenizer source, TokenStream result)
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance.

Uses of Tokenizer in org.apache.lucene.analysis.ar

Subclasses of Tokenizer in org.apache.lucene.analysis.ar
 class ArabicLetterTokenizer
Deprecated. (3.1) Use StandardTokenizer instead.

Uses of Tokenizer in org.apache.lucene.analysis.cjk

Subclasses of Tokenizer in org.apache.lucene.analysis.cjk
 class CJKTokenizer
Deprecated. Use StandardTokenizer, CJKWidthFilter, CJKBigramFilter, and LowerCaseFilter instead.

Uses of Tokenizer in org.apache.lucene.analysis.cn

Subclasses of Tokenizer in org.apache.lucene.analysis.cn
 class ChineseTokenizer
Deprecated. Use StandardTokenizer instead, which has the same functionality. This filter will be removed in Lucene 5.0

Uses of Tokenizer in org.apache.lucene.analysis.cn.smart

Subclasses of Tokenizer in org.apache.lucene.analysis.cn.smart
 class SentenceTokenizer
Tokenizes input text into sentences.

Uses of Tokenizer in org.apache.lucene.analysis.icu.segmentation

Subclasses of Tokenizer in org.apache.lucene.analysis.icu.segmentation
 class ICUTokenizer
Breaks text into words according to UAX #29: Unicode Text Segmentation (http://www.unicode.org/reports/tr29/)

Uses of Tokenizer in org.apache.lucene.analysis.in

Subclasses of Tokenizer in org.apache.lucene.analysis.in
 class IndicTokenizer
Deprecated. (3.6) Use StandardTokenizer instead.

Uses of Tokenizer in org.apache.lucene.analysis.ja

Subclasses of Tokenizer in org.apache.lucene.analysis.ja
 class JapaneseTokenizer
Tokenizer for Japanese that uses morphological analysis.

Uses of Tokenizer in org.apache.lucene.analysis.ngram

Subclasses of Tokenizer in org.apache.lucene.analysis.ngram
class | EdgeNGramTokenizer Tokenizes the input from an edge into n-grams of given size(s).
class | NGramTokenizer Tokenizes the input into n-grams of the given size(s).

Uses of Tokenizer in org.apache.lucene.analysis.path

Subclasses of Tokenizer in org.apache.lucene.analysis.path
class | PathHierarchyTokenizer Tokenizer for path-like hierarchies.
class | ReversePathHierarchyTokenizer Tokenizer for domain-like hierarchies.

Uses of Tokenizer in org.apache.lucene.analysis.ru

Subclasses of Tokenizer in org.apache.lucene.analysis.ru
 class RussianLetterTokenizer
Deprecated. Use StandardTokenizer instead, which has the same functionality. This filter will be removed in Lucene 5.0

Uses of Tokenizer in org.apache.lucene.analysis.standard

Subclasses of Tokenizer in org.apache.lucene.analysis.standard
class | ClassicTokenizer A grammar-based tokenizer constructed with JFlex
class | StandardTokenizer A grammar-based tokenizer constructed with JFlex.
class | UAX29URLEmailTokenizer This class implements Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29 URLs and email addresses are also tokenized according to the relevant RFCs.

Uses of Tokenizer in org.apache.lucene.analysis.wikipedia

Subclasses of Tokenizer in org.apache.lucene.analysis.wikipedia
 class WikipediaTokenizer
Extension of StandardTokenizer that is aware of Wikipedia syntax.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.TokenStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.TokenStream

Packages that use TokenStream
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ar | Analyzer for Arabic.
org.apache.lucene.analysis.bg | Analyzer for Bulgarian.
org.apache.lucene.analysis.br | Analyzer for Brazilian Portuguese.
org.apache.lucene.analysis.cjk | Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).
org.apache.lucene.analysis.cn | Analyzer for Chinese, which indexes unigrams (individual chinese characters).
org.apache.lucene.analysis.cn.smart | Analyzer for Simplified Chinese, which indexes words.
org.apache.lucene.analysis.compound | A filter that decomposes compound words you find in many Germanic languages into the word parts.
org.apache.lucene.analysis.cz | Analyzer for Czech.
org.apache.lucene.analysis.de | Analyzer for German.
org.apache.lucene.analysis.el | Analyzer for Greek.
org.apache.lucene.analysis.en | Analyzer for English.
org.apache.lucene.analysis.es | Analyzer for Spanish.
org.apache.lucene.analysis.fa | Analyzer for Persian.
org.apache.lucene.analysis.fi | Analyzer for Finnish.
org.apache.lucene.analysis.fr | Analyzer for French.
org.apache.lucene.analysis.ga | Analysis for Irish.
org.apache.lucene.analysis.gl | Analyzer for Galician.
org.apache.lucene.analysis.hi | Analyzer for Hindi.
org.apache.lucene.analysis.hu | Analyzer for Hungarian.
org.apache.lucene.analysis.hunspell | Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.
org.apache.lucene.analysis.icu | Analysis components based on ICU
org.apache.lucene.analysis.icu.segmentation | Tokenizer that breaks text into words with the Unicode Text Segmentation algorithm.
org.apache.lucene.analysis.id | Analyzer for Indonesian.
org.apache.lucene.analysis.in | Analysis components for Indian languages.
org.apache.lucene.analysis.it | Analyzer for Italian.
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.lv | Analyzer for Latvian.
org.apache.lucene.analysis.miscellaneous | Miscellaneous TokenStreams
org.apache.lucene.analysis.ngram | Character n-gram tokenizers and filters.
org.apache.lucene.analysis.nl | Analyzer for Dutch.
org.apache.lucene.analysis.no | Analyzer for Norwegian.
org.apache.lucene.analysis.path | Analysis components for path-like strings such as filenames.
org.apache.lucene.analysis.payloads | Provides various convenience classes for creating payloads on Tokens.
org.apache.lucene.analysis.phonetic | Analysis components for phonetic search.
org.apache.lucene.analysis.position | Filter for assigning position increments.
org.apache.lucene.analysis.pt | Analyzer for Portuguese.
org.apache.lucene.analysis.query | Automatically filter high-frequency stopwords.
org.apache.lucene.analysis.reverse | Filter to reverse token text.
org.apache.lucene.analysis.ru | Analyzer for Russian.
org.apache.lucene.analysis.shingle | Word n-gram filters
org.apache.lucene.analysis.snowball | TokenFilter and Analyzer implementations that use Snowball stemmers.
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.stempel | Stempel: Algorithmic Stemmer
org.apache.lucene.analysis.sv | Analyzer for Swedish.
org.apache.lucene.analysis.synonym | Analysis components for Synonyms.
org.apache.lucene.analysis.th | Analyzer for Thai.
org.apache.lucene.analysis.tr | Analyzer for Turkish.
org.apache.lucene.analysis.wikipedia | Tokenizer that is aware of Wikipedia syntax.
org.apache.lucene.collation | CollationKeyFilter converts each token into its binary CollationKey using the provided Collator, and then encode the CollationKey as a String using IndexableBinaryStringTools, to allow it to be stored as an index term.
org.apache.lucene.document | The logical representation of a Document for indexing and searching.
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets
org.apache.lucene.index.memory | High-performance single-document main memory Apache Lucene fulltext search index.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

Uses of TokenStream in org.apache.lucene.analysis

Subclasses of TokenStream in org.apache.lucene.analysis
class | ASCIIFoldingFilter This class converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if one exists.
class | CachingTokenFilter This class can be used if the token attributes of a TokenStream are intended to be consumed more than once.
class | CannedTokenStream TokenStream from a canned list of Tokens.
class | CharTokenizer An abstract base class for simple, character-oriented tokenizers.
class | EmptyTokenizer Emits no tokens
class | FilteringTokenFilter Abstract base class for TokenFilters that may remove tokens.
class | ISOLatin1AccentFilter Deprecated. If you build a new index, use ASCIIFoldingFilter which covers a superset of Latin 1. This class is included for use with existing indexes and will be removed in a future release (possibly Lucene 4.0).
class | KeywordMarkerFilter Marks terms as keywords via the KeywordAttribute.
class | KeywordTokenizer Emits the entire input as a single token.
class | LengthFilter Removes words that are too long or too short from the stream.
class | LetterTokenizer A LetterTokenizer is a tokenizer that divides text at non-letters.
class | LimitTokenCountFilter This TokenFilter limits the number of tokens while indexing.
class | LookaheadTokenFilter<T extends LookaheadTokenFilter.Position> An abstract TokenFilter to make it easier to build graph token filters requiring some lookahead.
class | LowerCaseFilter Normalizes token text to lower case.
class | LowerCaseTokenizer LowerCaseTokenizer performs the function of LetterTokenizer and LowerCaseFilter together.
class | MockFixedLengthPayloadFilter TokenFilter that adds random fixed-length payloads.
class | MockGraphTokenFilter Randomly inserts overlapped (posInc=0) tokens with posLength sometimes > 1.
class | MockHoleInjectingTokenFilter
class | MockRandomLookaheadTokenFilter Uses LookaheadTokenFilter to randomly peek at future tokens.
class | MockTokenizer Tokenizer for testing.
class | MockVariableLengthPayloadFilter TokenFilter that adds random variable-length payloads.
class | NumericTokenStream Expert: This class provides a TokenStream for indexing numeric values that can be used by NumericRangeQuery or NumericRangeFilter.
class | PorterStemFilter Transforms the token stream as per the Porter stemming algorithm.
class | StopFilter Removes stop words from a token stream.
class | TeeSinkTokenFilter This TokenFilter provides the ability to set aside attribute states that have already been analyzed.
static class | TeeSinkTokenFilter.SinkTokenStream TokenStream output from a tee with optional filtering.
class | TokenFilter A TokenFilter is a TokenStream whose input is another TokenStream.
class | Tokenizer A Tokenizer is a TokenStream whose input is a Reader.
class | TypeTokenFilter Removes tokens whose types appear in a set of blocked types from a token stream.
class | ValidatingTokenFilter A TokenFilter that checks consistency of the tokens (eg offsets are consistent with one another).
class | WhitespaceTokenizer A WhitespaceTokenizer is a tokenizer that divides text at whitespace.

Fields in org.apache.lucene.analysis declared as TokenStream
protected TokenStream | TokenFilter.input The source of tokens for this filter.
protected TokenStream | ReusableAnalyzerBase.TokenStreamComponents.sink

Methods in org.apache.lucene.analysis that return TokenStream
protected  TokenStream ReusableAnalyzerBase.TokenStreamComponents.getTokenStream()
Returns the sink TokenStream
 TokenStream MockAnalyzer.reusableTokenStream(String fieldName, Reader reader)
 TokenStream LimitTokenCountAnalyzer.reusableTokenStream(String fieldName, Reader reader)
 TokenStream ReusableAnalyzerBase.reusableTokenStream(String fieldName, Reader reader)
This method uses ReusableAnalyzerBase.createComponents(String, Reader) to obtain an instance of ReusableAnalyzerBase.TokenStreamComponents.
 TokenStream PerFieldAnalyzerWrapper.reusableTokenStream(String fieldName, Reader reader)
 TokenStream Analyzer.reusableTokenStream(String fieldName, Reader reader)
Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method.
 TokenStream MockAnalyzer.tokenStream(String fieldName, Reader reader)
 TokenStream LimitTokenCountAnalyzer.tokenStream(String fieldName, Reader reader)
 TokenStream ReusableAnalyzerBase.tokenStream(String fieldName, Reader reader)
This method uses ReusableAnalyzerBase.createComponents(String, Reader) to obtain an instance of ReusableAnalyzerBase.TokenStreamComponents and returns the sink of the components.
 TokenStream PerFieldAnalyzerWrapper.tokenStream(String fieldName, Reader reader)
abstract  TokenStream Analyzer.tokenStream(String fieldName, Reader reader)
Creates a TokenStream which tokenizes all the text in the provided Reader.

Methods in org.apache.lucene.analysis with parameters of type TokenStream
static void | BaseTokenStreamTestCase.assertTokenStreamContents(TokenStream ts, String[] output)
static void | BaseTokenStreamTestCase.assertTokenStreamContents(TokenStream ts, String[] output, int[] posIncrements)
static void | BaseTokenStreamTestCase.assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets)
static void | BaseTokenStreamTestCase.assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, int[] posIncrements)
static void | BaseTokenStreamTestCase.assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, int[] posIncrements, int[] posLengths, Integer finalOffset)
static void | BaseTokenStreamTestCase.assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, int[] posIncrements, Integer finalOffset)
static void | BaseTokenStreamTestCase.assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, Integer finalOffset)
static void | BaseTokenStreamTestCase.assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements)
static void | BaseTokenStreamTestCase.assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements, int[] posLengths, Integer finalOffset)
static void | BaseTokenStreamTestCase.assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements, int[] posLengths, Integer finalOffset, boolean offsetsAreCorrect)
static void | BaseTokenStreamTestCase.assertTokenStreamContents(TokenStream ts, String[] output, int[] startOffsets, int[] endOffsets, String[] types, int[] posIncrements, Integer finalOffset)
static void | BaseTokenStreamTestCase.assertTokenStreamContents(TokenStream ts, String[] output, String[] types)

Constructors in org.apache.lucene.analysis with parameters of type TokenStream
ASCIIFoldingFilter(TokenStream input)
CachingTokenFilter(TokenStream input)
FilteringTokenFilter(boolean enablePositionIncrements, TokenStream input)
ISOLatin1AccentFilter(TokenStream input)
Deprecated.
KeywordMarkerFilter(TokenStream in, CharArraySet keywordSet)
Create a new KeywordMarkerFilter, that marks the current token as a keyword if the tokens term buffer is contained in the given set via the KeywordAttribute.
KeywordMarkerFilter(TokenStream in, Set<?> keywordSet)
Create a new KeywordMarkerFilter, that marks the current token as a keyword if the tokens term buffer is contained in the given set via the KeywordAttribute.
LengthFilter(boolean enablePositionIncrements, TokenStream in, int min, int max)
Build a filter that removes words that are too long or too short from the text.
LengthFilter(TokenStream in, int min, int max)
Deprecated. Use LengthFilter.LengthFilter(boolean, TokenStream, int, int) instead.
LimitTokenCountFilter(TokenStream in, int maxTokenCount)
Build a filter that only accepts tokens up to a maximum number.
LookaheadTokenFilter(TokenStream input)
LowerCaseFilter(TokenStream in)
Deprecated. Use LowerCaseFilter.LowerCaseFilter(Version, TokenStream) instead.
LowerCaseFilter(Version matchVersion, TokenStream in)
Create a new LowerCaseFilter, that normalizes token text to lower case.
MockFixedLengthPayloadFilter(Random random, TokenStream in, int length)
MockGraphTokenFilter(Random random, TokenStream input)
MockHoleInjectingTokenFilter(Random random, TokenStream in)
MockRandomLookaheadTokenFilter(Random random, TokenStream in)
MockVariableLengthPayloadFilter(Random random, TokenStream in)
PorterStemFilter(TokenStream in)
ReusableAnalyzerBase.TokenStreamComponents(Tokenizer source, TokenStream result)
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance.
StopFilter(boolean enablePositionIncrements, TokenStream in, Set<?> stopWords)
Deprecated. use StopFilter.StopFilter(Version, TokenStream, Set) instead
StopFilter(boolean enablePositionIncrements, TokenStream input, Set<?> stopWords, boolean ignoreCase)
Deprecated. Use StopFilter.StopFilter(Version, TokenStream, Set) instead
StopFilter(Version matchVersion, TokenStream in, Set<?> stopWords)
Constructs a filter which removes words from the input TokenStream that are named in the Set.
StopFilter(Version matchVersion, TokenStream input, Set<?> stopWords, boolean ignoreCase)
Deprecated. Use StopFilter.StopFilter(Version, TokenStream, Set) instead
TeeSinkTokenFilter(TokenStream input)
Instantiates a new TeeSinkTokenFilter.
TokenFilter(TokenStream input)
Construct a token stream filtering the given input.
TokenStreamToDot(String inputText, TokenStream in, PrintWriter out)
If inputText is non-null, and the TokenStream has offsets, we include the surface form in each arc's label.
TypeTokenFilter(boolean enablePositionIncrements, TokenStream input, Set<String> stopTypes)
TypeTokenFilter(boolean enablePositionIncrements, TokenStream input, Set<String> stopTypes, boolean useWhiteList)
ValidatingTokenFilter(TokenStream in, String name, boolean offsetsAreCorrect)
The name arg is used to identify this stage when throwing exceptions (useful if you have more than one instance in your chain).

Uses of TokenStream in org.apache.lucene.analysis.ar

Subclasses of TokenStream in org.apache.lucene.analysis.ar
class | ArabicLetterTokenizer Deprecated. (3.1) Use StandardTokenizer instead.
class | ArabicNormalizationFilter A TokenFilter that applies ArabicNormalizer to normalize the orthography.
class | ArabicStemFilter A TokenFilter that applies ArabicStemmer to stem Arabic words..

Constructors in org.apache.lucene.analysis.ar with parameters of type TokenStream
ArabicNormalizationFilter(TokenStream input)
ArabicStemFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.bg

Subclasses of TokenStream in org.apache.lucene.analysis.bg
 class BulgarianStemFilter
A TokenFilter that applies BulgarianStemmer to stem Bulgarian words.

Constructors in org.apache.lucene.analysis.bg with parameters of type TokenStream
BulgarianStemFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.br

Subclasses of TokenStream in org.apache.lucene.analysis.br
 class BrazilianStemFilter
A TokenFilter that applies BrazilianStemmer.

Constructors in org.apache.lucene.analysis.br with parameters of type TokenStream
BrazilianStemFilter(TokenStream in)
Creates a new BrazilianStemFilter
BrazilianStemFilter(TokenStream in, Set<?> exclusiontable)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.

Uses of TokenStream in org.apache.lucene.analysis.cjk

Subclasses of TokenStream in org.apache.lucene.analysis.cjk
class | CJKBigramFilter Forms bigrams of CJK terms that are generated from StandardTokenizer or ICUTokenizer.
class | CJKTokenizer Deprecated. Use StandardTokenizer, CJKWidthFilter, CJKBigramFilter, and LowerCaseFilter instead.
class | CJKWidthFilter A TokenFilter that normalizes CJK width differences: Folds fullwidth ASCII variants into the equivalent basic latin Folds halfwidth Katakana variants into the equivalent kana

Constructors in org.apache.lucene.analysis.cjk with parameters of type TokenStream
CJKBigramFilter(TokenStream in)
Calls CJKBigramFilter(HAN | HIRAGANA | KATAKANA | HANGUL)
CJKBigramFilter(TokenStream in, int flags)
Create a new CJKBigramFilter, specifying which writing systems should be bigrammed.
CJKWidthFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.cn

Subclasses of TokenStream in org.apache.lucene.analysis.cn
class | ChineseFilter Deprecated. Use StopFilter instead, which has the same functionality. This filter will be removed in Lucene 5.0
class | ChineseTokenizer Deprecated. Use StandardTokenizer instead, which has the same functionality. This filter will be removed in Lucene 5.0

Constructors in org.apache.lucene.analysis.cn with parameters of type TokenStream
ChineseFilter(TokenStream in)
Deprecated.

Uses of TokenStream in org.apache.lucene.analysis.cn.smart

Subclasses of TokenStream in org.apache.lucene.analysis.cn.smart
class | SentenceTokenizer Tokenizes input text into sentences.
class | WordTokenFilter A TokenFilter that breaks sentences into words.

Methods in org.apache.lucene.analysis.cn.smart that return TokenStream
TokenStream | SmartChineseAnalyzer.reusableTokenStream(String fieldName, Reader reader)
TokenStream | SmartChineseAnalyzer.tokenStream(String fieldName, Reader reader)

Constructors in org.apache.lucene.analysis.cn.smart with parameters of type TokenStream
WordTokenFilter(TokenStream in)
Construct a new WordTokenizer.

Uses of TokenStream in org.apache.lucene.analysis.compound

Subclasses of TokenStream in org.apache.lucene.analysis.compound
class | CompoundWordTokenFilterBase Base class for decomposition token filters.
class | DictionaryCompoundWordTokenFilter A TokenFilter that decomposes compound words found in many Germanic languages.
class | HyphenationCompoundWordTokenFilter A TokenFilter that decomposes compound words found in many Germanic languages.

Constructors in org.apache.lucene.analysis.compound with parameters of type TokenStream
CompoundWordTokenFilterBase(TokenStream input, Set<?> dictionary)
Deprecated. use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, Set) instead
CompoundWordTokenFilterBase(TokenStream input, Set<?> dictionary, boolean onlyLongestMatch)
Deprecated. use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, Set, boolean) instead
CompoundWordTokenFilterBase(TokenStream input, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, Set, int, int, int, boolean) instead
CompoundWordTokenFilterBase(TokenStream input, String[] dictionary)
Deprecated. use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, String[]) instead
CompoundWordTokenFilterBase(TokenStream input, String[] dictionary, boolean onlyLongestMatch)
Deprecated. use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, String[], boolean) instead
CompoundWordTokenFilterBase(TokenStream input, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. use CompoundWordTokenFilterBase.CompoundWordTokenFilterBase(Version, TokenStream, String[], int, int, int, boolean) instead
CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, Set<?> dictionary)
CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, Set<?> dictionary, boolean onlyLongestMatch)
CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, String[] dictionary)
CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, String[] dictionary, boolean onlyLongestMatch)
CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
DictionaryCompoundWordTokenFilter(TokenStream input, Set dictionary)
Deprecated. use DictionaryCompoundWordTokenFilter.DictionaryCompoundWordTokenFilter(Version, TokenStream, Set) instead
DictionaryCompoundWordTokenFilter(TokenStream input, Set dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. use DictionaryCompoundWordTokenFilter.DictionaryCompoundWordTokenFilter(Version, TokenStream, Set, int, int, int, boolean) instead
DictionaryCompoundWordTokenFilter(TokenStream input, String[] dictionary)
Deprecated. use DictionaryCompoundWordTokenFilter.DictionaryCompoundWordTokenFilter(Version, TokenStream, String[]) instead
DictionaryCompoundWordTokenFilter(TokenStream input, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. use DictionaryCompoundWordTokenFilter.DictionaryCompoundWordTokenFilter(Version, TokenStream, String[], int, int, int, boolean) instead
DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, Set<?> dictionary)
Creates a new DictionaryCompoundWordTokenFilter
DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Creates a new DictionaryCompoundWordTokenFilter
DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, String[] dictionary)
Deprecated. Use the constructors taking Set
DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. Use the constructors taking Set
HyphenationCompoundWordTokenFilter(TokenStream input, HyphenationTree hyphenator, Set<?> dictionary)
Deprecated. use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set) instead.
HyphenationCompoundWordTokenFilter(TokenStream input, HyphenationTree hyphenator, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set, int, int, int, boolean) instead.
HyphenationCompoundWordTokenFilter(TokenStream input, HyphenationTree hyphenator, String[] dictionary)
Deprecated. use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[]) instead.
HyphenationCompoundWordTokenFilter(TokenStream input, HyphenationTree hyphenator, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[], int, int, int, boolean) instead.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator)
Create a HyphenationCompoundWordTokenFilter with no dictionary.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, int minWordSize, int minSubwordSize, int maxSubwordSize)
Create a HyphenationCompoundWordTokenFilter with no dictionary.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, Set<?> dictionary)
Creates a new HyphenationCompoundWordTokenFilter instance.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Creates a new HyphenationCompoundWordTokenFilter instance.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, String[] dictionary)
Deprecated. Use the constructors taking Set
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. Use the constructors taking Set

Uses of TokenStream in org.apache.lucene.analysis.cz

Subclasses of TokenStream in org.apache.lucene.analysis.cz
 class CzechStemFilter
A TokenFilter that applies CzechStemmer to stem Czech words.

Constructors in org.apache.lucene.analysis.cz with parameters of type TokenStream
CzechStemFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.de

Subclasses of TokenStream in org.apache.lucene.analysis.de
class | GermanLightStemFilter A TokenFilter that applies GermanLightStemmer to stem German words.
class | GermanMinimalStemFilter A TokenFilter that applies GermanMinimalStemmer to stem German words.
class | GermanNormalizationFilter Normalizes German characters according to the heuristics of the German2 snowball algorithm.
class | GermanStemFilter A TokenFilter that stems German words.

Constructors in org.apache.lucene.analysis.de with parameters of type TokenStream
GermanLightStemFilter(TokenStream input)
GermanMinimalStemFilter(TokenStream input)
GermanNormalizationFilter(TokenStream input)
GermanStemFilter(TokenStream in)
Creates a GermanStemFilter instance
GermanStemFilter(TokenStream in, Set<?> exclusionSet)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.

Uses of TokenStream in org.apache.lucene.analysis.el

Subclasses of TokenStream in org.apache.lucene.analysis.el
class | GreekLowerCaseFilter Normalizes token text to lower case, removes some Greek diacritics, and standardizes final sigma to sigma.
class | GreekStemFilter A TokenFilter that applies GreekStemmer to stem Greek words.

Constructors in org.apache.lucene.analysis.el with parameters of type TokenStream
GreekLowerCaseFilter(TokenStream in)
Deprecated. Use GreekLowerCaseFilter.GreekLowerCaseFilter(Version, TokenStream) instead.
GreekLowerCaseFilter(Version matchVersion, TokenStream in)
Create a GreekLowerCaseFilter that normalizes Greek token text.
GreekStemFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.en

Subclasses of TokenStream in org.apache.lucene.analysis.en
class | EnglishMinimalStemFilter A TokenFilter that applies EnglishMinimalStemmer to stem English words.
class | EnglishPossessiveFilter TokenFilter that removes possessives (trailing 's) from words.
class | KStemFilter A high-performance kstem filter for english.

Constructors in org.apache.lucene.analysis.en with parameters of type TokenStream
EnglishMinimalStemFilter(TokenStream input)
EnglishPossessiveFilter(TokenStream input)
Deprecated. Use EnglishPossessiveFilter.EnglishPossessiveFilter(Version, TokenStream) instead.
EnglishPossessiveFilter(Version version, TokenStream input)
KStemFilter(TokenStream in)

Uses of TokenStream in org.apache.lucene.analysis.es

Subclasses of TokenStream in org.apache.lucene.analysis.es
 class SpanishLightStemFilter
A TokenFilter that applies SpanishLightStemmer to stem Spanish words.

Constructors in org.apache.lucene.analysis.es with parameters of type TokenStream
SpanishLightStemFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.fa

Subclasses of TokenStream in org.apache.lucene.analysis.fa
 class PersianNormalizationFilter
A TokenFilter that applies PersianNormalizer to normalize the orthography.

Constructors in org.apache.lucene.analysis.fa with parameters of type TokenStream
PersianNormalizationFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.fi

Subclasses of TokenStream in org.apache.lucene.analysis.fi
 class FinnishLightStemFilter
A TokenFilter that applies FinnishLightStemmer to stem Finnish words.

Constructors in org.apache.lucene.analysis.fi with parameters of type TokenStream
FinnishLightStemFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.fr

Subclasses of TokenStream in org.apache.lucene.analysis.fr
class | ElisionFilter Removes elisions from a TokenStream.
class | FrenchLightStemFilter A TokenFilter that applies FrenchLightStemmer to stem French words.
class | FrenchMinimalStemFilter A TokenFilter that applies FrenchMinimalStemmer to stem French words.
class | FrenchStemFilter Deprecated. Use SnowballFilter with FrenchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0

Constructors in org.apache.lucene.analysis.fr with parameters of type TokenStream
ElisionFilter(TokenStream input)
Deprecated. use ElisionFilter.ElisionFilter(Version, TokenStream) instead
ElisionFilter(TokenStream input, Set<?> articles)
Deprecated. use ElisionFilter.ElisionFilter(Version, TokenStream, Set) instead
ElisionFilter(TokenStream input, String[] articles)
Deprecated. use ElisionFilter.ElisionFilter(Version, TokenStream, Set) instead
ElisionFilter(Version matchVersion, TokenStream input)
Constructs an elision filter with standard stop words
ElisionFilter(Version matchVersion, TokenStream input, Set<?> articles)
Constructs an elision filter with a Set of stop words
FrenchLightStemFilter(TokenStream input)
FrenchMinimalStemFilter(TokenStream input)
FrenchStemFilter(TokenStream in)
Deprecated.
FrenchStemFilter(TokenStream in, Set<?> exclusiontable)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.

Uses of TokenStream in org.apache.lucene.analysis.ga

Subclasses of TokenStream in org.apache.lucene.analysis.ga
 class IrishLowerCaseFilter
Normalises token text to lower case, handling t-prothesis and n-eclipsis (i.e., that 'nAthair' should become 'n-athair')

Constructors in org.apache.lucene.analysis.ga with parameters of type TokenStream
IrishLowerCaseFilter(TokenStream in)
Create an IrishLowerCaseFilter that normalises Irish token text.

Uses of TokenStream in org.apache.lucene.analysis.gl

Subclasses of TokenStream in org.apache.lucene.analysis.gl
class | GalicianMinimalStemFilter A TokenFilter that applies GalicianMinimalStemmer to stem Galician words.
class | GalicianStemFilter A TokenFilter that applies GalicianStemmer to stem Galician words.

Constructors in org.apache.lucene.analysis.gl with parameters of type TokenStream
GalicianMinimalStemFilter(TokenStream input)
GalicianStemFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.hi

Subclasses of TokenStream in org.apache.lucene.analysis.hi
class | HindiNormalizationFilter A TokenFilter that applies HindiNormalizer to normalize the orthography.
class | HindiStemFilter A TokenFilter that applies HindiStemmer to stem Hindi words.

Constructors in org.apache.lucene.analysis.hi with parameters of type TokenStream
HindiNormalizationFilter(TokenStream input)
HindiStemFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.hu

Subclasses of TokenStream in org.apache.lucene.analysis.hu
 class HungarianLightStemFilter
A TokenFilter that applies HungarianLightStemmer to stem Hungarian words.

Constructors in org.apache.lucene.analysis.hu with parameters of type TokenStream
HungarianLightStemFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.hunspell

Subclasses of TokenStream in org.apache.lucene.analysis.hunspell
 class HunspellStemFilter
TokenFilter that uses hunspell affix rules and words to stem tokens.

Constructors in org.apache.lucene.analysis.hunspell with parameters of type TokenStream
HunspellStemFilter(TokenStream input, HunspellDictionary dictionary)
Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using affix rules in the provided HunspellDictionary
HunspellStemFilter(TokenStream input, HunspellDictionary dictionary, boolean dedup)
Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using affix rules in the provided HunspellDictionary

Uses of TokenStream in org.apache.lucene.analysis.icu

Subclasses of TokenStream in org.apache.lucene.analysis.icu
class | ICUFoldingFilter A TokenFilter that applies search term folding to Unicode text, applying foldings from UTR#30 Character Foldings.
class | ICUNormalizer2Filter Normalize token text with ICU's Normalizer2
class | ICUTransformFilter A TokenFilter that transforms text with ICU.

Constructors in org.apache.lucene.analysis.icu with parameters of type TokenStream
ICUFoldingFilter(TokenStream input)
Create a new ICUFoldingFilter on the specified input
ICUNormalizer2Filter(TokenStream input)
Create a new Normalizer2Filter that combines NFKC normalization, Case Folding, and removes Default Ignorables (NFKC_Casefold)
ICUNormalizer2Filter(TokenStream input, com.ibm.icu.text.Normalizer2 normalizer)
Create a new Normalizer2Filter with the specified Normalizer2
ICUTransformFilter(TokenStream input, com.ibm.icu.text.Transliterator transform)
Create a new ICUTransformFilter that transforms text on the given stream.

Uses of TokenStream in org.apache.lucene.analysis.icu.segmentation

Subclasses of TokenStream in org.apache.lucene.analysis.icu.segmentation
 class ICUTokenizer
Breaks text into words according to UAX #29: Unicode Text Segmentation (http://www.unicode.org/reports/tr29/)

Uses of TokenStream in org.apache.lucene.analysis.id

Subclasses of TokenStream in org.apache.lucene.analysis.id
 class IndonesianStemFilter
A TokenFilter that applies IndonesianStemmer to stem Indonesian words.

Constructors in org.apache.lucene.analysis.id with parameters of type TokenStream
IndonesianStemFilter(TokenStream input)
Calls IndonesianStemFilter(input, true)
IndonesianStemFilter(TokenStream input, boolean stemDerivational)
Create a new IndonesianStemFilter.

Uses of TokenStream in org.apache.lucene.analysis.in

Subclasses of TokenStream in org.apache.lucene.analysis.in
class | IndicNormalizationFilter A TokenFilter that applies IndicNormalizer to normalize text in Indian Languages.
class | IndicTokenizer Deprecated. (3.6) Use StandardTokenizer instead.

Constructors in org.apache.lucene.analysis.in with parameters of type TokenStream
IndicNormalizationFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.it

Subclasses of TokenStream in org.apache.lucene.analysis.it
 class ItalianLightStemFilter
A TokenFilter that applies ItalianLightStemmer to stem Italian words.

Constructors in org.apache.lucene.analysis.it with parameters of type TokenStream
ItalianLightStemFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.ja

Subclasses of TokenStream in org.apache.lucene.analysis.ja
class | JapaneseBaseFormFilter Replaces term text with the BaseFormAttribute.
class | JapaneseKatakanaStemFilter A TokenFilter that normalizes common katakana spelling variations ending in a long sound character by removing this character (U+30FC).
class | JapanesePartOfSpeechStopFilter Removes tokens that match a set of part-of-speech tags.
class | JapaneseReadingFormFilter A TokenFilter that replaces the term attribute with the reading of a token in either katakana or romaji form.
class | JapaneseTokenizer Tokenizer for Japanese that uses morphological analysis.

Constructors in org.apache.lucene.analysis.ja with parameters of type TokenStream
JapaneseBaseFormFilter(TokenStream input)
JapaneseKatakanaStemFilter(TokenStream input)
JapaneseKatakanaStemFilter(TokenStream input, int minimumLength)
JapanesePartOfSpeechStopFilter(boolean enablePositionIncrements, TokenStream input, Set<String> stopTags)
JapaneseReadingFormFilter(TokenStream input)
JapaneseReadingFormFilter(TokenStream input, boolean useRomaji)

Uses of TokenStream in org.apache.lucene.analysis.lv

Subclasses of TokenStream in org.apache.lucene.analysis.lv
 class LatvianStemFilter
A TokenFilter that applies LatvianStemmer to stem Latvian words.

Constructors in org.apache.lucene.analysis.lv with parameters of type TokenStream
LatvianStemFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.miscellaneous

Subclasses of TokenStream in org.apache.lucene.analysis.miscellaneous
class | EmptyTokenStream An always exhausted token stream.
class | PrefixAndSuffixAwareTokenFilter Links two PrefixAwareTokenFilter.
class | PrefixAwareTokenFilter Joins two token streams and leaves the last token of the first stream available to be used when updating the token values in the second stream based on that token.
class | SingleTokenTokenStream A TokenStream containing a single token.
class | StemmerOverrideFilter Provides the ability to override any KeywordAttribute aware stemmer with custom dictionary-based stemming.

Methods in org.apache.lucene.analysis.miscellaneous that return TokenStream
TokenStream | PrefixAwareTokenFilter.getPrefix()
TokenStream | PrefixAwareTokenFilter.getSuffix()

Methods in org.apache.lucene.analysis.miscellaneous with parameters of type TokenStream
void | PrefixAwareTokenFilter.setPrefix(TokenStream prefix)
void | PrefixAwareTokenFilter.setSuffix(TokenStream suffix)

Constructors in org.apache.lucene.analysis.miscellaneous with parameters of type TokenStream
PrefixAndSuffixAwareTokenFilter(TokenStream prefix, TokenStream input, TokenStream suffix)
PrefixAwareTokenFilter(TokenStream prefix, TokenStream suffix)
StemmerOverrideFilter(Version matchVersion, TokenStream input, Map<?,String> dictionary)
Create a new StemmerOverrideFilter, performing dictionary-based stemming with the provided dictionary.

Uses of TokenStream in org.apache.lucene.analysis.ngram

Subclasses of TokenStream in org.apache.lucene.analysis.ngram
class | EdgeNGramTokenFilter Tokenizes the given token into n-grams of given size(s).
class | EdgeNGramTokenizer Tokenizes the input from an edge into n-grams of given size(s).
class | NGramTokenFilter Tokenizes the input into n-grams of the given size(s).
class | NGramTokenizer Tokenizes the input into n-grams of the given size(s).

Constructors in org.apache.lucene.analysis.ngram with parameters of type TokenStream
EdgeNGramTokenFilter(TokenStream input, EdgeNGramTokenFilter.Side side, int minGram, int maxGram)
Creates EdgeNGramTokenFilter that can generate n-grams in the sizes of the given range
EdgeNGramTokenFilter(TokenStream input, String sideLabel, int minGram, int maxGram)
Creates EdgeNGramTokenFilter that can generate n-grams in the sizes of the given range
NGramTokenFilter(TokenStream input)
Creates NGramTokenFilter with default min and max n-grams.
NGramTokenFilter(TokenStream input, int minGram, int maxGram)
Creates NGramTokenFilter with given min and max n-grams.

Uses of TokenStream in org.apache.lucene.analysis.nl

Subclasses of TokenStream in org.apache.lucene.analysis.nl
 class DutchStemFilter
Deprecated. Use SnowballFilter with DutchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0

Constructors in org.apache.lucene.analysis.nl with parameters of type TokenStream
DutchStemFilter(TokenStream _in)
Deprecated.
DutchStemFilter(TokenStream _in, Map<?,?> stemdictionary)
Deprecated.
DutchStemFilter(TokenStream _in, Set<?> exclusiontable)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
DutchStemFilter(TokenStream _in, Set<?> exclusiontable, Map<?,?> stemdictionary)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.

Uses of TokenStream in org.apache.lucene.analysis.no

Subclasses of TokenStream in org.apache.lucene.analysis.no
class | NorwegianLightStemFilter A TokenFilter that applies NorwegianLightStemmer to stem Norwegian words.
class | NorwegianMinimalStemFilter A TokenFilter that applies NorwegianMinimalStemmer to stem Norwegian words.

Constructors in org.apache.lucene.analysis.no with parameters of type TokenStream
NorwegianLightStemFilter(TokenStream input)
NorwegianMinimalStemFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.path

Subclasses of TokenStream in org.apache.lucene.analysis.path
class | PathHierarchyTokenizer Tokenizer for path-like hierarchies.
class | ReversePathHierarchyTokenizer Tokenizer for domain-like hierarchies.

Uses of TokenStream in org.apache.lucene.analysis.payloads

Subclasses of TokenStream in org.apache.lucene.analysis.payloads
class | DelimitedPayloadTokenFilter Characters before the delimiter are the "token", those after are the payload.
class | NumericPayloadTokenFilter Assigns a payload to a token based on the Token.type()
class | TokenOffsetPayloadTokenFilter Adds the Token.setStartOffset(int) and Token.setEndOffset(int) First 4 bytes are the start
class | TypeAsPayloadTokenFilter Makes the Token.type() a payload.

Constructors in org.apache.lucene.analysis.payloads with parameters of type TokenStream
DelimitedPayloadTokenFilter(TokenStream input, char delimiter, PayloadEncoder encoder)
NumericPayloadTokenFilter(TokenStream input, float payload, String typeMatch)
TokenOffsetPayloadTokenFilter(TokenStream input)
TypeAsPayloadTokenFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.phonetic

Subclasses of TokenStream in org.apache.lucene.analysis.phonetic
class | BeiderMorseFilter TokenFilter for Beider-Morse phonetic encoding.
class | DoubleMetaphoneFilter Filter for DoubleMetaphone (supporting secondary codes)
class | PhoneticFilter Create tokens for phonetic matches.

Constructors in org.apache.lucene.analysis.phonetic with parameters of type TokenStream
BeiderMorseFilter(TokenStream input, org.apache.commons.codec.language.bm.PhoneticEngine engine)
Calls BeiderMorseFilter(input, engine, null)
BeiderMorseFilter(TokenStream input, org.apache.commons.codec.language.bm.PhoneticEngine engine, org.apache.commons.codec.language.bm.Languages.LanguageSet languages)
Create a new BeiderMorseFilter
DoubleMetaphoneFilter(TokenStream input, int maxCodeLength, boolean inject)
PhoneticFilter(TokenStream in, org.apache.commons.codec.Encoder encoder, boolean inject)

Uses of TokenStream in org.apache.lucene.analysis.position

Subclasses of TokenStream in org.apache.lucene.analysis.position
 class PositionFilter
Set the positionIncrement of all tokens to the "positionIncrement", except the first return token which retains its original positionIncrement value.

Constructors in org.apache.lucene.analysis.position with parameters of type TokenStream
PositionFilter(TokenStream input)
Constructs a PositionFilter that assigns a position increment of zero to all but the first token from the given input stream.
PositionFilter(TokenStream input, int positionIncrement)
Constructs a PositionFilter that assigns the given position increment to all but the first token from the given input stream.

Uses of TokenStream in org.apache.lucene.analysis.pt

Subclasses of TokenStream in org.apache.lucene.analysis.pt
class | PortugueseLightStemFilter A TokenFilter that applies PortugueseLightStemmer to stem Portuguese words.
class | PortugueseMinimalStemFilter A TokenFilter that applies PortugueseMinimalStemmer to stem Portuguese words.
class | PortugueseStemFilter A TokenFilter that applies PortugueseStemmer to stem Portuguese words.

Constructors in org.apache.lucene.analysis.pt with parameters of type TokenStream
PortugueseLightStemFilter(TokenStream input)
PortugueseMinimalStemFilter(TokenStream input)
PortugueseStemFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.query

Methods in org.apache.lucene.analysis.query that return TokenStream
TokenStream | QueryAutoStopWordAnalyzer.reusableTokenStream(String fieldName, Reader reader)
TokenStream | QueryAutoStopWordAnalyzer.tokenStream(String fieldName, Reader reader)

Uses of TokenStream in org.apache.lucene.analysis.reverse

Subclasses of TokenStream in org.apache.lucene.analysis.reverse
 class ReverseStringFilter
Reverse token string, for example "country" => "yrtnuoc".

Constructors in org.apache.lucene.analysis.reverse with parameters of type TokenStream
ReverseStringFilter(TokenStream in)
Deprecated. use ReverseStringFilter.ReverseStringFilter(Version, TokenStream) instead. This constructor will be removed in Lucene 4.0
ReverseStringFilter(TokenStream in, char marker)
Deprecated. use ReverseStringFilter.ReverseStringFilter(Version, TokenStream, char) instead. This constructor will be removed in Lucene 4.0
ReverseStringFilter(Version matchVersion, TokenStream in)
Create a new ReverseStringFilter that reverses all tokens in the supplied TokenStream.
ReverseStringFilter(Version matchVersion, TokenStream in, char marker)
Create a new ReverseStringFilter that reverses and marks all tokens in the supplied TokenStream.

Uses of TokenStream in org.apache.lucene.analysis.ru

Subclasses of TokenStream in org.apache.lucene.analysis.ru
class | RussianLetterTokenizer Deprecated. Use StandardTokenizer instead, which has the same functionality. This filter will be removed in Lucene 5.0
class | RussianLightStemFilter A TokenFilter that applies RussianLightStemmer to stem Russian words.
class | RussianLowerCaseFilter Deprecated. Use LowerCaseFilter instead, which has the same functionality. This filter will be removed in Lucene 4.0
class | RussianStemFilter Deprecated. Use SnowballFilter with RussianStemmer instead, which has the same functionality. This filter will be removed in Lucene 4.0

Constructors in org.apache.lucene.analysis.ru with parameters of type TokenStream
RussianLightStemFilter(TokenStream input)
RussianLowerCaseFilter(TokenStream in)
Deprecated.
RussianStemFilter(TokenStream in)
Deprecated.

Uses of TokenStream in org.apache.lucene.analysis.shingle

Subclasses of TokenStream in org.apache.lucene.analysis.shingle
class | ShingleFilter A ShingleFilter constructs shingles (token n-grams) from a token stream.
class | ShingleMatrixFilter Deprecated. Will be removed in Lucene 4.0. This filter is unmaintained and might not behave correctly if used with custom Attributes, i.e. Attributes other than the ones located in org.apache.lucene.analysis.tokenattributes. It also uses hardcoded payload encoders which makes it not easily adaptable to other use-cases.

Methods in org.apache.lucene.analysis.shingle that return TokenStream
TokenStream | ShingleAnalyzerWrapper.reusableTokenStream(String fieldName, Reader reader)
TokenStream | ShingleAnalyzerWrapper.tokenStream(String fieldName, Reader reader)

Constructors in org.apache.lucene.analysis.shingle with parameters of type TokenStream
ShingleFilter(TokenStream input)
Construct a ShingleFilter with default shingle size: 2.
ShingleFilter(TokenStream input, int maxShingleSize)
Constructs a ShingleFilter with the specified shingle size from the TokenStream input
ShingleFilter(TokenStream input, int minShingleSize, int maxShingleSize)
Constructs a ShingleFilter with the specified shingle size from the TokenStream input
ShingleFilter(TokenStream input, String tokenType)
Construct a ShingleFilter with the specified token type for shingle tokens and the default shingle size: 2
ShingleMatrixFilter(TokenStream input, int minimumShingleSize, int maximumShingleSize)
Deprecated. Creates a shingle filter using default settings.
ShingleMatrixFilter(TokenStream input, int minimumShingleSize, int maximumShingleSize, Character spacerCharacter)
Deprecated. Creates a shingle filter using default settings.
ShingleMatrixFilter(TokenStream input, int minimumShingleSize, int maximumShingleSize, Character spacerCharacter, boolean ignoringSinglePrefixOrSuffixShingle)
Deprecated. Creates a shingle filter using the default ShingleMatrixFilter.TokenSettingsCodec.
ShingleMatrixFilter(TokenStream input, int minimumShingleSize, int maximumShingleSize, Character spacerCharacter, boolean ignoringSinglePrefixOrSuffixShingle, ShingleMatrixFilter.TokenSettingsCodec settingsCodec)
Deprecated. Creates a shingle filter with ad hoc parameter settings.

Uses of TokenStream in org.apache.lucene.analysis.snowball

Subclasses of TokenStream in org.apache.lucene.analysis.snowball
 class SnowballFilter
A filter that stems words using a Snowball-generated stemmer.

Methods in org.apache.lucene.analysis.snowball that return TokenStream
TokenStream | SnowballAnalyzer.reusableTokenStream(String fieldName, Reader reader) Deprecated. Returns a (possibly reused) StandardTokenizer filtered by a StandardFilter, a LowerCaseFilter, a StopFilter, and a SnowballFilter
TokenStream | SnowballAnalyzer.tokenStream(String fieldName, Reader reader) Deprecated. Constructs a StandardTokenizer filtered by a StandardFilter, a LowerCaseFilter, a StopFilter, and a SnowballFilter

Constructors in org.apache.lucene.analysis.snowball with parameters of type TokenStream
SnowballFilter(TokenStream input, SnowballProgram stemmer)
SnowballFilter(TokenStream in, String name)
Construct the named stemming filter.

Uses of TokenStream in org.apache.lucene.analysis.standard

Subclasses of TokenStream in org.apache.lucene.analysis.standard
class | ClassicFilter Normalizes tokens extracted with ClassicTokenizer.
class | ClassicTokenizer A grammar-based tokenizer constructed with JFlex
class | StandardFilter Normalizes tokens extracted with StandardTokenizer.
class | StandardTokenizer A grammar-based tokenizer constructed with JFlex.
class | UAX29URLEmailTokenizer This class implements Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29 URLs and email addresses are also tokenized according to the relevant RFCs.

Constructors in org.apache.lucene.analysis.standard with parameters of type TokenStream
ClassicFilter(TokenStream in)
Construct filtering in.
StandardFilter(TokenStream in)
Deprecated. Use StandardFilter.StandardFilter(Version, TokenStream) instead.
StandardFilter(Version matchVersion, TokenStream in)

Uses of TokenStream in org.apache.lucene.analysis.stempel

Subclasses of TokenStream in org.apache.lucene.analysis.stempel
 class StempelFilter
Transforms the token stream as per the stemming algorithm.

Constructors in org.apache.lucene.analysis.stempel with parameters of type TokenStream
StempelFilter(TokenStream in, StempelStemmer stemmer)
Create filter using the supplied stemming table.
StempelFilter(TokenStream in, StempelStemmer stemmer, int minLength)
Create filter using the supplied stemming table.

Uses of TokenStream in org.apache.lucene.analysis.sv

Subclasses of TokenStream in org.apache.lucene.analysis.sv
 class SwedishLightStemFilter
A TokenFilter that applies SwedishLightStemmer to stem Swedish words.

Constructors in org.apache.lucene.analysis.sv with parameters of type TokenStream
SwedishLightStemFilter(TokenStream input)

Uses of TokenStream in org.apache.lucene.analysis.synonym

Subclasses of TokenStream in org.apache.lucene.analysis.synonym
 class SynonymFilter
Matches single or multi word synonyms in a token stream.

Constructors in org.apache.lucene.analysis.synonym with parameters of type TokenStream
SynonymFilter(TokenStream input, SynonymMap synonyms, boolean ignoreCase)

Uses of TokenStream in org.apache.lucene.analysis.th

Subclasses of TokenStream in org.apache.lucene.analysis.th
 class ThaiWordFilter
TokenFilter that use BreakIterator to break each Token that is Thai into separate Token(s) for each Thai word.

Constructors in org.apache.lucene.analysis.th with parameters of type TokenStream
ThaiWordFilter(TokenStream input)
Deprecated. Use the ctor with matchVersion instead!
ThaiWordFilter(Version matchVersion, TokenStream input)
Creates a new ThaiWordFilter with the specified match version.

Uses of TokenStream in org.apache.lucene.analysis.tr

Subclasses of TokenStream in org.apache.lucene.analysis.tr
 class TurkishLowerCaseFilter
Normalizes Turkish token text to lower case.

Constructors in org.apache.lucene.analysis.tr with parameters of type TokenStream
TurkishLowerCaseFilter(TokenStream in)
Create a new TurkishLowerCaseFilter, that normalizes Turkish token text to lower case.

Uses of TokenStream in org.apache.lucene.analysis.wikipedia

Subclasses of TokenStream in org.apache.lucene.analysis.wikipedia
 class WikipediaTokenizer
Extension of StandardTokenizer that is aware of Wikipedia syntax.

Uses of TokenStream in org.apache.lucene.collation

Subclasses of TokenStream in org.apache.lucene.collation
class | CollationKeyFilter Converts each token into its CollationKey, and then encodes the CollationKey with IndexableBinaryStringTools, to allow it to be stored as an index term.
class | ICUCollationKeyFilter Converts each token into its CollationKey, and then encodes the CollationKey with IndexableBinaryStringTools, to allow it to be stored as an index term.

Methods in org.apache.lucene.collation that return TokenStream
TokenStream | ICUCollationKeyAnalyzer.reusableTokenStream(String fieldName, Reader reader)
TokenStream | CollationKeyAnalyzer.reusableTokenStream(String fieldName, Reader reader)
TokenStream | ICUCollationKeyAnalyzer.tokenStream(String fieldName, Reader reader)
TokenStream | CollationKeyAnalyzer.tokenStream(String fieldName, Reader reader)

Constructors in org.apache.lucene.collation with parameters of type TokenStream
CollationKeyFilter(TokenStream input, Collator collator)
ICUCollationKeyFilter(TokenStream input, com.ibm.icu.text.Collator collator)

Uses of TokenStream in org.apache.lucene.document

Fields in org.apache.lucene.document declared as TokenStream
protected  TokenStream AbstractField.tokenStream

Methods in org.apache.lucene.document that return TokenStream
TokenStream | Field.tokenStreamValue() The TokesStream for this field to be used when indexing, or null.
TokenStream | NumericField.tokenStreamValue() Returns a NumericTokenStream for indexing the numeric value.
TokenStream | Fieldable.tokenStreamValue() The TokenStream for this field to be used when indexing, or null.

Methods in org.apache.lucene.document with parameters of type TokenStream
 void Field.setTokenStream(TokenStream tokenStream)
Expert: sets the token stream to be used for indexing and causes isIndexed() and isTokenized() to return true.

Constructors in org.apache.lucene.document with parameters of type TokenStream
Field(String name, TokenStream tokenStream)
Create a tokenized and indexed field that is not stored.
Field(String name, TokenStream tokenStream, Field.TermVector termVector)
Create a tokenized and indexed field that is not stored, optionally with storing term vectors.

Uses of TokenStream in org.apache.lucene.facet.enhancements

Subclasses of TokenStream in org.apache.lucene.facet.enhancements
 class EnhancementsCategoryTokenizer
A tokenizer which adds to each category token payload according to the CategoryEnhancements defined in the given EnhancementsIndexingParams.

Methods in org.apache.lucene.facet.enhancements that return TokenStream
protected  TokenStream EnhancementsDocumentBuilder.getParentsStream(CategoryAttributesStream categoryAttributesStream)

Methods in org.apache.lucene.facet.enhancements with parameters of type TokenStream
protected CategoryListTokenizer | EnhancementsDocumentBuilder.getCategoryListTokenizer(TokenStream categoryStream)
CategoryListTokenizer | CategoryEnhancement.getCategoryListTokenizer(TokenStream tokenizer, EnhancementsIndexingParams indexingParams, TaxonomyWriter taxonomyWriter) Get the CategoryListTokenizer which generates the category list for this enhancement.
protected CategoryTokenizer | EnhancementsDocumentBuilder.getCategoryTokenizer(TokenStream categoryStream)

Constructors in org.apache.lucene.facet.enhancements with parameters of type TokenStream
EnhancementsCategoryTokenizer(TokenStream input, EnhancementsIndexingParams indexingParams)
Constructor.

Uses of TokenStream in org.apache.lucene.facet.enhancements.association

Subclasses of TokenStream in org.apache.lucene.facet.enhancements.association
 class AssociationListTokenizer
Tokenizer for associations of a category

Methods in org.apache.lucene.facet.enhancements.association with parameters of type TokenStream
 CategoryListTokenizer AssociationEnhancement.getCategoryListTokenizer(TokenStream tokenizer, EnhancementsIndexingParams indexingParams, TaxonomyWriter taxonomyWriter)

Constructors in org.apache.lucene.facet.enhancements.association with parameters of type TokenStream
AssociationListTokenizer(TokenStream input, EnhancementsIndexingParams indexingParams, CategoryEnhancement enhancement)

Uses of TokenStream in org.apache.lucene.facet.index

Methods in org.apache.lucene.facet.index that return TokenStream
protected  TokenStream CategoryDocumentBuilder.getParentsStream(CategoryAttributesStream categoryAttributesStream)
Get a stream of categories which includes the parents, according to policies defined in indexing parameters.

Methods in org.apache.lucene.facet.index with parameters of type TokenStream
protected CategoryListTokenizer | CategoryDocumentBuilder.getCategoryListTokenizer(TokenStream categoryStream) Get a category list tokenizer (or a series of such tokenizers) to create the category list tokens.
protected CategoryTokenizer | CategoryDocumentBuilder.getCategoryTokenizer(TokenStream categoryStream) Get a CategoryTokenizer to create the category tokens.
protected CountingListTokenizer | CategoryDocumentBuilder.getCountingListTokenizer(TokenStream categoryStream) Get a CountingListTokenizer for creating counting list token.

Uses of TokenStream in org.apache.lucene.facet.index.streaming

Subclasses of TokenStream in org.apache.lucene.facet.index.streaming
class | CategoryAttributesStream An attribute stream built from an Iterable of CategoryAttribute.
class | CategoryListTokenizer A base class for category list tokenizers, which add category list tokens to category streams.
class | CategoryParentsStream This class adds parents to a CategoryAttributesStream.
class | CategoryTokenizer Basic class for setting the CharTermAttributes and PayloadAttributes of category tokens.
class | CategoryTokenizerBase A base class for all token filters which add term and payload attributes to tokens and are to be used in CategoryDocumentBuilder.
class | CountingListTokenizer CategoryListTokenizer for facet counting

Constructors in org.apache.lucene.facet.index.streaming with parameters of type TokenStream
CategoryListTokenizer(TokenStream input, FacetIndexingParams indexingParams)
CategoryTokenizer(TokenStream input, FacetIndexingParams indexingParams)
CategoryTokenizerBase(TokenStream input, FacetIndexingParams indexingParams)
Constructor.
CountingListTokenizer(TokenStream input, FacetIndexingParams indexingParams)

Uses of TokenStream in org.apache.lucene.index.memory

Methods in org.apache.lucene.index.memory that return TokenStream
<T> TokenStream
MemoryIndex.keywordTokenStream(Collection<T> keywords)
Convenience method; Creates and returns a token stream that generates a token for each keyword in the given collection, "as is", without any transforming text analysis.

Methods in org.apache.lucene.index.memory with parameters of type TokenStream
 void MemoryIndex.addField(String fieldName, TokenStream stream)
Equivalent to addField(fieldName, stream, 1.0f).
 void MemoryIndex.addField(String fieldName, TokenStream stream, float boost)
Iterates over the given token stream and adds the resulting terms to the index; Equivalent to adding a tokenized, indexed, termVectorStored, unstored, Lucene Field.

Uses of TokenStream in org.apache.lucene.queryParser

Subclasses of TokenStream in org.apache.lucene.queryParser
static class QueryParserTestBase.QPTestFilter
Filter which discards the token 'stop' and which expands the token 'phrase' into 'phrase1 phrase2'

Methods in org.apache.lucene.queryParser that return TokenStream
 TokenStream QueryParserTestBase.QPTestAnalyzer.tokenStream(String fieldName, Reader reader)

Constructors in org.apache.lucene.queryParser with parameters of type TokenStream
QueryParserTestBase.QPTestFilter(TokenStream in)

Uses of TokenStream in org.apache.lucene.search.highlight

Subclasses of TokenStream in org.apache.lucene.search.highlight
class | OffsetLimitTokenFilter This TokenFilter limits the number of tokens while indexing by adding up the current offset.
class | TokenStreamFromTermPositionVector

Methods in org.apache.lucene.search.highlight that return TokenStream
static TokenStream | TokenSources.getAnyTokenStream(IndexReader reader, int docId, String field, Analyzer analyzer) A convenience method that tries a number of approaches to getting a token stream.
static TokenStream | TokenSources.getAnyTokenStream(IndexReader reader, int docId, String field, Document doc, Analyzer analyzer) A convenience method that tries to first get a TermPositionVector for the specified docId, then, falls back to using the passed in Document to retrieve the TokenStream.
TokenStream | WeightedSpanTermExtractor.getTokenStream()
static TokenStream | TokenSources.getTokenStream(Document doc, String field, Analyzer analyzer)
static TokenStream | TokenSources.getTokenStream(IndexReader reader, int docId, String field)
static TokenStream | TokenSources.getTokenStream(IndexReader reader, int docId, String field, Analyzer analyzer)
static TokenStream | TokenSources.getTokenStream(String field, String contents, Analyzer analyzer)
static TokenStream | TokenSources.getTokenStream(TermPositionVector tpv)
static TokenStream | TokenSources.getTokenStream(TermPositionVector tpv, boolean tokenPositionsGuaranteedContiguous) Low level api.
TokenStream | QueryTermScorer.init(TokenStream tokenStream)
TokenStream | Scorer.init(TokenStream tokenStream) Called to init the Scorer with a TokenStream.
TokenStream | QueryScorer.init(TokenStream tokenStream)

Methods in org.apache.lucene.search.highlight with parameters of type TokenStream
String | Highlighter.getBestFragment(TokenStream tokenStream, String text) Highlights chosen terms in a text, extracting the most relevant section.
String[] | Highlighter.getBestFragments(TokenStream tokenStream, String text, int maxNumFragments) Highlights chosen terms in a text, extracting the most relevant sections.
String | Highlighter.getBestFragments(TokenStream tokenStream, String text, int maxNumFragments, String separator) Highlights terms in the text , extracting the most relevant sections and concatenating the chosen fragments with a separator (typically "...").
TextFragment[] | Highlighter.getBestTextFragments(TokenStream tokenStream, String text, boolean mergeContiguousFragments, int maxNumFragments) Low level api to get the most relevant (formatted) sections of the document.
Map<String,WeightedSpanTerm> | WeightedSpanTermExtractor.getWeightedSpanTerms(Query query, TokenStream tokenStream) Creates a Map of WeightedSpanTerms from the given Query and TokenStream.
Map<String,WeightedSpanTerm> | WeightedSpanTermExtractor.getWeightedSpanTerms(Query query, TokenStream tokenStream, String fieldName) Creates a Map of WeightedSpanTerms from the given Query and TokenStream.
Map<String,WeightedSpanTerm> | WeightedSpanTermExtractor.getWeightedSpanTermsWithScores(Query query, TokenStream tokenStream, String fieldName, IndexReader reader) Creates a Map of WeightedSpanTerms from the given Query and TokenStream.
TokenStream | QueryTermScorer.init(TokenStream tokenStream)
TokenStream | Scorer.init(TokenStream tokenStream) Called to init the Scorer with a TokenStream.
TokenStream | QueryScorer.init(TokenStream tokenStream)
void | NullFragmenter.start(String s, TokenStream tokenStream)
void | SimpleFragmenter.start(String originalText, TokenStream stream)
void | Fragmenter.start(String originalText, TokenStream tokenStream) Initializes the Fragmenter.
void | SimpleSpanFragmenter.start(String originalText, TokenStream tokenStream)

Constructors in org.apache.lucene.search.highlight with parameters of type TokenStream
OffsetLimitTokenFilter(TokenStream input, int offsetLimit)
TokenGroup(TokenStream tokenStream)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.TokenStreamToDot

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.TokenStreamToDot

No usage of org.apache.lucene.analysis.TokenStreamToDot

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.TypeTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.TypeTokenFilter

No usage of org.apache.lucene.analysis.TypeTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ValidatingTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ValidatingTokenFilter

No usage of org.apache.lucene.analysis.ValidatingTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.VocabularyAssert

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.VocabularyAssert

No usage of org.apache.lucene.analysis.VocabularyAssert

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.WhitespaceAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.WhitespaceAnalyzer

No usage of org.apache.lucene.analysis.WhitespaceAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.WhitespaceTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.WhitespaceTokenizer

No usage of org.apache.lucene.analysis.WhitespaceTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.WordlistLoader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.WordlistLoader

No usage of org.apache.lucene.analysis.WordlistLoader

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ChineseAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cn
Class ChineseAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.cn.ChineseAnalyzer
All Implemented Interfaces:
Closeable
Deprecated. Use StandardAnalyzer instead, which has the same functionality. This analyzer will be removed in Lucene 5.0

@Deprecated
public final class ChineseAnalyzer
extends ReusableAnalyzerBase

An Analyzer that tokenizes text with ChineseTokenizer and filters with ChineseFilter

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Constructor Summary
ChineseAnalyzer()
Deprecated.
Method Summary
protected  ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
Deprecated. Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ChineseAnalyzer

public ChineseAnalyzer()
Deprecated.
Method Detail

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Deprecated.
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
ReusableAnalyzerBase.TokenStreamComponents built from a ChineseTokenizer filtered with ChineseFilter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ChineseFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cn
Class ChineseFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.cn.ChineseFilter
All Implemented Interfaces:
Closeable
Deprecated. Use StopFilter instead, which has the same functionality. This filter will be removed in Lucene 5.0

@Deprecated
public final class ChineseFilter
extends TokenFilter

A TokenFilter with a stop word table.

  • Numeric tokens are removed.
  • English tokens must be larger than 1 character.
  • One Chinese character as one Chinese word.
TO DO:
  1. Add Chinese stop words, such as 
  2. Dictionary based Chinese word extraction
  3. Intelligent Chinese word extraction

Version:
1.0

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static String[] STOP_WORDS
Deprecated.
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ChineseFilter(TokenStream in)
Deprecated.
Method Summary
 boolean incrementToken()
Deprecated. Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

STOP_WORDS

public static final String[] STOP_WORDS
Deprecated.
Constructor Detail

ChineseFilter

public ChineseFilter(TokenStream in)
Deprecated.
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Deprecated.
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ChineseTokenizer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cn
Class ChineseTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.cn.ChineseTokenizer
All Implemented Interfaces:
Closeable
Deprecated. Use StandardTokenizer instead, which has the same functionality. This filter will be removed in Lucene 5.0

@Deprecated
public final class ChineseTokenizer
extends Tokenizer

Tokenize Chinese text as individual chinese characters.

The difference between ChineseTokenizer and CJKTokenizer is that they have different token parsing logic.

For example, if the Chinese text "C1C2C3C4" is to be indexed:

  • The tokens returned from ChineseTokenizer are C1, C2, C3, C4.
  • The tokens returned from the CJKTokenizer are C1C2, C2C3, C3C4.

Therefore the index created by CJKTokenizer is much larger.

The problem is that when searching for C1, C1C2, C1C3, C4C2, C1C2C3 ... the ChineseTokenizer works, but the CJKTokenizer will not work.

Version:
1.0

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
ChineseTokenizer(AttributeSource.AttributeFactory factory, Reader in)
Deprecated.
ChineseTokenizer(AttributeSource source, Reader in)
Deprecated.
ChineseTokenizer(Reader in)
Deprecated.
Method Summary
 void end()
Deprecated. This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 boolean incrementToken()
Deprecated. Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset()
Deprecated. Resets this stream to the beginning.
 void reset(Reader input)
Deprecated. Expert: Reset the tokenizer to a new reader.
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ChineseTokenizer

public ChineseTokenizer(Reader in)
Deprecated.

ChineseTokenizer

public ChineseTokenizer(AttributeSource source,
                        Reader in)
Deprecated.

ChineseTokenizer

public ChineseTokenizer(AttributeSource.AttributeFactory factory,
                        Reader in)
Deprecated.
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Deprecated.
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

end

public final void end()
Deprecated.
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream

reset

public void reset()
           throws IOException
Deprecated.
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException

reset

public void reset(Reader input)
           throws IOException
Deprecated.
Description copied from class: Tokenizer
Expert: Reset the tokenizer to a new reader. Typically, an analyzer (in its reusableTokenStream method) will use this to re-use a previously created tokenizer.

Overrides:
reset in class Tokenizer
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.cn
Classes
ChineseAnalyzer
ChineseFilter
ChineseTokenizer


org.apache.lucene.analysis.cn

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.cn

Analyzer for Chinese, which indexes unigrams (individual chinese characters).

See:
Description

Class Summary
ChineseAnalyzer | Deprecated. Use StandardAnalyzer instead, which has the same functionality.
ChineseFilter | Deprecated. Use StopFilter instead, which has the same functionality.
ChineseTokenizer | Deprecated. Use StandardTokenizer instead, which has the same functionality.

Package org.apache.lucene.analysis.cn Description

Analyzer for Chinese, which indexes unigrams (individual chinese characters).

Three analyzers are provided for Chinese, each of which treats Chinese text in a different way.

  • StandardAnalyzer: Index unigrams (individual Chinese characters) as a token.
  • CJKAnalyzer (in the analyzers/cjk package): Index bigrams (overlapping groups of two adjacent Chinese characters) as tokens.
  • SmartChineseAnalyzer (in the analyzers/smartcn package): Index words (attempt to segment Chinese text into words) as tokens.
Example phrase： "我是中国人"
  1. StandardAnalyzer: 我－是－中－国－人
  2. CJKAnalyzer: 我是－是中－中国－国人
  3. SmartChineseAnalyzer: 我－是－中国－人


org.apache.lucene.analysis.cn Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.cn

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.cn.ChineseAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.cn.ChineseFilter
        • org.apache.lucene.analysis.Tokenizer
          • org.apache.lucene.analysis.cn.ChineseTokenizer


Uses of Package org.apache.lucene.analysis.cn

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.cn

No usage of org.apache.lucene.analysis.cn

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cn.ChineseAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cn.ChineseAnalyzer

No usage of org.apache.lucene.analysis.cn.ChineseAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cn.ChineseFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cn.ChineseFilter

No usage of org.apache.lucene.analysis.cn.ChineseFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cn.ChineseTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cn.ChineseTokenizer

No usage of org.apache.lucene.analysis.cn.ChineseTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AnalyzerProfile

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cn.smart
Class AnalyzerProfile

java.lang.Object
    extended by  org.apache.lucene.analysis.cn.smart.AnalyzerProfile

public class AnalyzerProfile
extends Object

Manages analysis data configuration for SmartChineseAnalyzer

SmartChineseAnalyzer has a built-in dictionary and stopword list out-of-box.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static String ANALYSIS_DATA_DIR
Global indicating the configured analysis data directory
Constructor Summary
AnalyzerProfile()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

ANALYSIS_DATA_DIR

public static String ANALYSIS_DATA_DIR
Global indicating the configured analysis data directory

Constructor Detail

AnalyzerProfile

public AnalyzerProfile()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CharType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cn.smart
Class CharType

java.lang.Object
    extended by  org.apache.lucene.analysis.cn.smart.CharType

public class CharType
extends Object

Internal SmartChineseAnalyzer character type constants.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static int | DELIMITER Punctuation Characters
static int | DIGIT Numeric Digits
static int | FULLWIDTH_DIGIT Full-Width alphanumeric characters
static int | FULLWIDTH_LETTER Full-Width letters
static int | HANZI Han Ideographs
static int | LETTER Letters
static int | OTHER Other (not fitting any of the other categories)
static int | SPACE_LIKE Characters that act as a space
Constructor Summary
CharType()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DELIMITER

public static final int DELIMITER
Punctuation Characters

See Also:
Constant Field Values

LETTER

public static final int LETTER
Letters

See Also:
Constant Field Values

DIGIT

public static final int DIGIT
Numeric Digits

See Also:
Constant Field Values

HANZI

public static final int HANZI
Han Ideographs

See Also:
Constant Field Values

SPACE_LIKE

public static final int SPACE_LIKE
Characters that act as a space

See Also:
Constant Field Values

FULLWIDTH_LETTER

public static final int FULLWIDTH_LETTER
Full-Width letters

See Also:
Constant Field Values

FULLWIDTH_DIGIT

public static final int FULLWIDTH_DIGIT
Full-Width alphanumeric characters

See Also:
Constant Field Values

OTHER

public static final int OTHER
Other (not fitting any of the other categories)

See Also:
Constant Field Values
Constructor Detail

CharType

public CharType()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.cn.smart
Classes
AnalyzerProfile
CharType
SentenceTokenizer
SmartChineseAnalyzer
Utility
WordTokenFilter
WordType


org.apache.lucene.analysis.cn.smart

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.cn.smart

Analyzer for Simplified Chinese, which indexes words.

See:
Description

Class Summary
AnalyzerProfile | Manages analysis data configuration for SmartChineseAnalyzer
CharType | Internal SmartChineseAnalyzer character type constants.
SentenceTokenizer | Tokenizes input text into sentences.
SmartChineseAnalyzer | SmartChineseAnalyzer is an analyzer for Chinese or mixed Chinese-English text.
Utility | SmartChineseAnalyzer utility constants and methods
WordTokenFilter | A TokenFilter that breaks sentences into words.
WordType | Internal SmartChineseAnalyzer token type constants

Package org.apache.lucene.analysis.cn.smart Description

Analyzer for Simplified Chinese, which indexes words.

WARNING: This API is experimental and might change in incompatible ways in the next release.
Three analyzers are provided for Chinese, each of which treats Chinese text in a different way.
  • StandardAnalyzer: Index unigrams (individual Chinese characters) as a token.
  • CJKAnalyzer (in the analyzers/cjk package): Index bigrams (overlapping groups of two adjacent Chinese characters) as tokens.
  • SmartChineseAnalyzer (in this package): Index words (attempt to segment Chinese text into words) as tokens.
Example phrase： "我是中国人"
  1. StandardAnalyzer: 我－是－中－国－人
  2. CJKAnalyzer: 我是－是中－中国－国人
  3. SmartChineseAnalyzer: 我－是－中国－人


org.apache.lucene.analysis.cn.smart Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.cn.smart

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer
    • org.apache.lucene.analysis.cn.smart.AnalyzerProfile
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.cn.smart.WordTokenFilter
        • org.apache.lucene.analysis.Tokenizer
          • org.apache.lucene.analysis.cn.smart.SentenceTokenizer
    • org.apache.lucene.analysis.cn.smart.CharType
    • org.apache.lucene.analysis.cn.smart.Utility
    • org.apache.lucene.analysis.cn.smart.WordType


Uses of Package org.apache.lucene.analysis.cn.smart

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.cn.smart

No usage of org.apache.lucene.analysis.cn.smart

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SentenceTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cn.smart
Class SentenceTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.cn.smart.SentenceTokenizer
All Implemented Interfaces:
Closeable
public final class SentenceTokenizer
extends Tokenizer

Tokenizes input text into sentences.

The output tokens can then be broken into words with WordTokenFilter

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
SentenceTokenizer(AttributeSource.AttributeFactory factory, Reader reader)
SentenceTokenizer(AttributeSource source, Reader reader)
SentenceTokenizer(Reader reader)
Method Summary
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset()
Resets this stream to the beginning.
 void reset(Reader input)
Expert: Reset the tokenizer to a new reader.
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SentenceTokenizer

public SentenceTokenizer(Reader reader)

SentenceTokenizer

public SentenceTokenizer(AttributeSource source,
                         Reader reader)

SentenceTokenizer

public SentenceTokenizer(AttributeSource.AttributeFactory factory,
                         Reader reader)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException

reset

public void reset(Reader input)
           throws IOException
Description copied from class: Tokenizer
Expert: Reset the tokenizer to a new reader. Typically, an analyzer (in its reusableTokenStream method) will use this to re-use a previously created tokenizer.

Overrides:
reset in class Tokenizer
Throws:
IOException

end

public void end()
         throws IOException
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SmartChineseAnalyzer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cn.smart
Class SmartChineseAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer
All Implemented Interfaces:
Closeable
public final class SmartChineseAnalyzer
extends Analyzer

SmartChineseAnalyzer is an analyzer for Chinese or mixed Chinese-English text. The analyzer uses probabilistic knowledge to find the optimal word segmentation for Simplified Chinese text. The text is first broken into sentences, then each sentence is segmented into words.

Segmentation is based upon the Hidden Markov Model. A large training corpus was used to calculate Chinese word frequency probability.

This analyzer requires a dictionary to provide statistical data. SmartChineseAnalyzer has an included dictionary out-of-box.

The included dictionary data is from ICTCLAS1.0. Thanks to ICTCLAS for their hard work, and for contributing the data under the Apache 2 License!

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
SmartChineseAnalyzer(Version matchVersion)
Create a new SmartChineseAnalyzer, using the default stopword list.
SmartChineseAnalyzer(Version matchVersion, boolean useDefaultStopWords)
Create a new SmartChineseAnalyzer, optionally using the default stopword list.
SmartChineseAnalyzer(Version matchVersion, Set stopWords)
Create a new SmartChineseAnalyzer, using the provided Set of stopwords.
Method Summary
static CharArraySet | getDefaultStopSet() Returns an unmodifiable instance of the default stop-words set.
TokenStream | reusableTokenStream(String fieldName, Reader reader) Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method.
TokenStream | tokenStream(String fieldName, Reader reader) Creates a TokenStream which tokenizes all the text in the provided Reader.
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SmartChineseAnalyzer

public SmartChineseAnalyzer(Version matchVersion)
Create a new SmartChineseAnalyzer, using the default stopword list.

SmartChineseAnalyzer

public SmartChineseAnalyzer(Version matchVersion,
                            boolean useDefaultStopWords)

Create a new SmartChineseAnalyzer, optionally using the default stopword list.

The included default stopword list is simply a list of punctuation. If you do not use this list, punctuation will not be removed from the text!

Parameters:
useDefaultStopWords - true to use the default stopword list.

SmartChineseAnalyzer

public SmartChineseAnalyzer(Version matchVersion,
                            Set stopWords)

Create a new SmartChineseAnalyzer, using the provided Set of stopwords.

Note: the set should include punctuation, unless you want to index punctuation!

Parameters:
stopWords - Set of stopwords to use.
Method Detail

getDefaultStopSet

public static CharArraySet getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.

Returns:
an unmodifiable instance of the default stop-words set.

tokenStream

public TokenStream tokenStream(String fieldName,
                               Reader reader)
Description copied from class: Analyzer
Creates a TokenStream which tokenizes all the text in the provided Reader. Must be able to handle null field name for backward compatibility.

Specified by:
tokenStream in class Analyzer

reusableTokenStream

public TokenStream reusableTokenStream(String fieldName,
                                       Reader reader)
                                throws IOException
Description copied from class: Analyzer
Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method. Callers that do not need to use more than one TokenStream at the same time from this analyzer should use this method for better performance.

Overrides:
reusableTokenStream in class Analyzer
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Utility

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cn.smart
Class Utility

java.lang.Object
    extended by  org.apache.lucene.analysis.cn.smart.Utility

public class Utility
extends Object

SmartChineseAnalyzer utility constants and methods

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static char[] | COMMON_DELIMITER Delimiters will be filtered to this character by SegTokenFilter
static char[] | END_CHAR_ARRAY
static int | MAX_FREQUENCE Maximum bigram frequency (used in the smoothing function).
static char[] | NUMBER_CHAR_ARRAY
static String | SPACES Space-like characters that need to be skipped: such as space, tab, newline, carriage return.
static char[] | START_CHAR_ARRAY
static char[] | STRING_CHAR_ARRAY
Constructor Summary
Utility()
Method Summary
static int | compareArray(char[] larray, int lstartIndex, char[] rarray, int rstartIndex) compare two arrays starting at the specified offsets.
static int | compareArrayByPrefix(char[] shortArray, int shortIndex, char[] longArray, int longIndex) Compare two arrays, starting at the specified offsets, but treating shortArray as a prefix to longArray.
static int | getCharType(char ch) Return the internal CharType constant of a given character.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

STRING_CHAR_ARRAY

public static final char[] STRING_CHAR_ARRAY

NUMBER_CHAR_ARRAY

public static final char[] NUMBER_CHAR_ARRAY

START_CHAR_ARRAY

public static final char[] START_CHAR_ARRAY

END_CHAR_ARRAY

public static final char[] END_CHAR_ARRAY

COMMON_DELIMITER

public static final char[] COMMON_DELIMITER
Delimiters will be filtered to this character by SegTokenFilter

SPACES

public static final String SPACES
Space-like characters that need to be skipped: such as space, tab, newline, carriage return.

See Also:
Constant Field Values

MAX_FREQUENCE

public static final int MAX_FREQUENCE
Maximum bigram frequency (used in the smoothing function).

See Also:
Constant Field Values
Constructor Detail

Utility

public Utility()
Method Detail

compareArray

public static int compareArray(char[] larray,
                               int lstartIndex,
                               char[] rarray,
                               int rstartIndex)
compare two arrays starting at the specified offsets.

Parameters:
larray - left array
lstartIndex - start offset into larray
rarray - right array
rstartIndex - start offset into rarray
Returns:
0 if the arrays are equal，1 if larray > rarray, -1 if larray < rarray

compareArrayByPrefix

public static int compareArrayByPrefix(char[] shortArray,
                                       int shortIndex,
                                       char[] longArray,
                                       int longIndex)
Compare two arrays, starting at the specified offsets, but treating shortArray as a prefix to longArray. As long as shortArray is a prefix of longArray, return 0. Otherwise, behave as compareArray(char[], int, char[], int)

Parameters:
shortArray - prefix array
shortIndex - offset into shortArray
longArray - long array (word)
longIndex - offset into longArray
Returns:
0 if shortArray is a prefix of longArray, otherwise act as compareArray(char[], int, char[], int)

getCharType

public static int getCharType(char ch)
Return the internal CharType constant of a given character.

Parameters:
ch - input character
Returns:
constant from CharType describing the character type.
See Also:
CharType
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WordTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cn.smart
Class WordTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.cn.smart.WordTokenFilter
All Implemented Interfaces:
Closeable
public final class WordTokenFilter
extends TokenFilter

A TokenFilter that breaks sentences into words.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
WordTokenFilter(TokenStream in)
Construct a new WordTokenizer.
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

WordTokenFilter

public WordTokenFilter(TokenStream in)
Construct a new WordTokenizer.

Parameters:
in - TokenStream of sentences
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WordType

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cn.smart
Class WordType

java.lang.Object
    extended by  org.apache.lucene.analysis.cn.smart.WordType

public class WordType
extends Object

Internal SmartChineseAnalyzer token type constants

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static int | CHINESE_WORD Chinese Word
static int | DELIMITER Punctuation Symbol
static int | FULLWIDTH_NUMBER Full-Width Alphanumeric
static int | FULLWIDTH_STRING Full-Width String
static int | NUMBER ASCII Alphanumeric
static int | SENTENCE_BEGIN Start of a Sentence
static int | SENTENCE_END End of a Sentence
static int | STRING ASCII String
Constructor Summary
WordType()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

SENTENCE_BEGIN

public static final int SENTENCE_BEGIN
Start of a Sentence

See Also:
Constant Field Values

SENTENCE_END

public static final int SENTENCE_END
End of a Sentence

See Also:
Constant Field Values

CHINESE_WORD

public static final int CHINESE_WORD
Chinese Word

See Also:
Constant Field Values

STRING

public static final int STRING
ASCII String

See Also:
Constant Field Values

NUMBER

public static final int NUMBER
ASCII Alphanumeric

See Also:
Constant Field Values

DELIMITER

public static final int DELIMITER
Punctuation Symbol

See Also:
Constant Field Values

FULLWIDTH_STRING

public static final int FULLWIDTH_STRING
Full-Width String

See Also:
Constant Field Values

FULLWIDTH_NUMBER

public static final int FULLWIDTH_NUMBER
Full-Width Alphanumeric

See Also:
Constant Field Values
Constructor Detail

WordType

public WordType()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.cn.smart.AnalyzerProfile

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cn.smart.AnalyzerProfile

No usage of org.apache.lucene.analysis.cn.smart.AnalyzerProfile

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cn.smart.CharType

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cn.smart.CharType

No usage of org.apache.lucene.analysis.cn.smart.CharType

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cn.smart.SentenceTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cn.smart.SentenceTokenizer

No usage of org.apache.lucene.analysis.cn.smart.SentenceTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer

No usage of org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cn.smart.Utility

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cn.smart.Utility

No usage of org.apache.lucene.analysis.cn.smart.Utility

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cn.smart.WordTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cn.smart.WordTokenFilter

No usage of org.apache.lucene.analysis.cn.smart.WordTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cn.smart.WordType

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cn.smart.WordType

No usage of org.apache.lucene.analysis.cn.smart.WordType

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


HHMMSegmenter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cn.smart.hhmm
Class HHMMSegmenter

java.lang.Object
    extended by  org.apache.lucene.analysis.cn.smart.hhmm.HHMMSegmenter

public class HHMMSegmenter
extends Object

Finds the optimal segmentation of a sentence into Chinese words

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
HHMMSegmenter()
Method Summary
 List<SegToken> process(String sentence)
Return a list of SegToken representing the best segmentation of a sentence
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HHMMSegmenter

public HHMMSegmenter()
Method Detail

process

public List<SegToken> process(String sentence)
Return a list of SegToken representing the best segmentation of a sentence

Parameters:
sentence - input sentence
Returns:
best segmentation as a List
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.cn.smart.hhmm
Classes
HHMMSegmenter
SegToken
SegTokenFilter


org.apache.lucene.analysis.cn.smart.hhmm

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.cn.smart.hhmm

SmartChineseAnalyzer Hidden Markov Model package.

See:
Description

Class Summary
HHMMSegmenter | Finds the optimal segmentation of a sentence into Chinese words
SegToken | SmartChineseAnalyzer internal token
SegTokenFilter | Filters a SegToken by converting full-width latin to half-width, then lowercasing latin.

Package org.apache.lucene.analysis.cn.smart.hhmm Description

SmartChineseAnalyzer Hidden Markov Model package.

WARNING: This API is experimental and might change in incompatible ways in the next release.


org.apache.lucene.analysis.cn.smart.hhmm Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.cn.smart.hhmm

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.cn.smart.hhmm.HHMMSegmenter
    • org.apache.lucene.analysis.cn.smart.hhmm.SegToken
    • org.apache.lucene.analysis.cn.smart.hhmm.SegTokenFilter


Uses of Package org.apache.lucene.analysis.cn.smart.hhmm

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.cn.smart.hhmm

Packages that use org.apache.lucene.analysis.cn.smart.hhmm
org.apache.lucene.analysis.cn.smart.hhmm
SmartChineseAnalyzer Hidden Markov Model package.

Classes in org.apache.lucene.analysis.cn.smart.hhmm used by org.apache.lucene.analysis.cn.smart.hhmm
SegToken
SmartChineseAnalyzer internal token

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SegToken

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cn.smart.hhmm
Class SegToken

java.lang.Object
    extended by  org.apache.lucene.analysis.cn.smart.hhmm.SegToken

public class SegToken
extends Object

SmartChineseAnalyzer internal token

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
char[] | charArray Character array containing token text
int | endOffset end offset into original sentence
int | index during segmentation, this is used to store the index of the token in the token list table
int | startOffset start offset into original sentence
int | weight word frequency
int | wordType WordType of the text
Constructor Summary
SegToken(char[] idArray, int start, int end, int wordType, int weight)
Create a new SegToken from a character array.
Method Summary
boolean | equals(Object obj)
int | hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

charArray

public char[] charArray
Character array containing token text

startOffset

public int startOffset
start offset into original sentence

endOffset

public int endOffset
end offset into original sentence

wordType

public int wordType
WordType of the text

weight

public int weight
word frequency

index

public int index
during segmentation, this is used to store the index of the token in the token list table

Constructor Detail

SegToken

public SegToken(char[] idArray,
                int start,
                int end,
                int wordType,
                int weight)
Create a new SegToken from a character array.

Parameters:
idArray - character array containing text
start - start offset of SegToken in original sentence
end - end offset of SegToken in original sentence
wordType - WordType of the text
weight - word frequency
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SegTokenFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cn.smart.hhmm
Class SegTokenFilter

java.lang.Object
    extended by  org.apache.lucene.analysis.cn.smart.hhmm.SegTokenFilter

public class SegTokenFilter
extends Object

Filters a SegToken by converting full-width latin to half-width, then lowercasing latin. Additionally, all punctuation is converted into Utility.COMMON_DELIMITER

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
SegTokenFilter()
Method Summary
 SegToken filter(SegToken token)
Filter an input SegToken
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SegTokenFilter

public SegTokenFilter()
Method Detail

filter

public SegToken filter(SegToken token)
Filter an input SegToken

Full-width latin will be converted to half-width, then all latin will be lowercased. All punctuation is converted into Utility.COMMON_DELIMITER

Parameters:
token - input SegToken
Returns:
normalized SegToken
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.cn.smart.hhmm.HHMMSegmenter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cn.smart.hhmm.HHMMSegmenter

No usage of org.apache.lucene.analysis.cn.smart.hhmm.HHMMSegmenter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cn.smart.hhmm.SegToken

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cn.smart.hhmm.SegToken

Packages that use SegToken
org.apache.lucene.analysis.cn.smart.hhmm
SmartChineseAnalyzer Hidden Markov Model package.

Uses of SegToken in org.apache.lucene.analysis.cn.smart.hhmm

Methods in org.apache.lucene.analysis.cn.smart.hhmm that return SegToken
 SegToken SegTokenFilter.filter(SegToken token)
Filter an input SegToken

Methods in org.apache.lucene.analysis.cn.smart.hhmm that return types with arguments of type SegToken
 List<SegToken> HHMMSegmenter.process(String sentence)
Return a list of SegToken representing the best segmentation of a sentence

Methods in org.apache.lucene.analysis.cn.smart.hhmm with parameters of type SegToken
 SegToken SegTokenFilter.filter(SegToken token)
Filter an input SegToken

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cn.smart.hhmm.SegTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cn.smart.hhmm.SegTokenFilter

No usage of org.apache.lucene.analysis.cn.smart.hhmm.SegTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CompoundWordTokenFilterBase.CompoundToken

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.compound
Class CompoundWordTokenFilterBase.CompoundToken

java.lang.Object
    extended by  org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase.CompoundToken
Enclosing class:
CompoundWordTokenFilterBase
protected class CompoundWordTokenFilterBase.CompoundToken
extends Object

Helper class to hold decompounded token information

Field Summary
int | endOffset
int | startOffset
CharSequence | txt
Constructor Summary
CompoundWordTokenFilterBase.CompoundToken(int offset, int length)
Construct the compound token based on a slice of the current CompoundWordTokenFilterBase.termAtt.
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

txt

public final CharSequence txt

startOffset

public final int startOffset

endOffset

public final int endOffset
Constructor Detail

CompoundWordTokenFilterBase.CompoundToken

public CompoundWordTokenFilterBase.CompoundToken(int offset,
                                                 int length)
Construct the compound token based on a slice of the current CompoundWordTokenFilterBase.termAtt.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CompoundWordTokenFilterBase

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.compound
Class CompoundWordTokenFilterBase

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
DictionaryCompoundWordTokenFilter, HyphenationCompoundWordTokenFilter
public abstract class CompoundWordTokenFilterBase
extends TokenFilter

Base class for decomposition token filters.

You must specify the required Version compatibility when creating CompoundWordTokenFilterBase:

  • As of 3.1, CompoundWordTokenFilterBase correctly handles Unicode 4.0 supplementary characters in strings and char arrays provided as compound word dictionaries.

If you pass in a CharArraySet as dictionary, it should be case-insensitive unless it contains only lowercased entries and you have LowerCaseFilter before this filter in your analysis chain. For optional performance (as this filter does lots of lookups to the dictionary, you should use the latter analysis chain/CharArraySet). Be aware: If you supply arbitrary Sets to the ctors or String[] dictionaries, they will be automatically transformed to case-insensitive!

Nested Class Summary
protected  class CompoundWordTokenFilterBase.CompoundToken
Helper class to hold decompounded token information
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static int | DEFAULT_MAX_SUBWORD_SIZE The default for maximal length of subwords that get propagated to the output of this filter
static int | DEFAULT_MIN_SUBWORD_SIZE The default for minimal length of subwords that get propagated to the output of this filter
static int | DEFAULT_MIN_WORD_SIZE The default for minimal word length that gets decomposed
protected CharArraySet | dictionary
protected int | maxSubwordSize
protected int | minSubwordSize
protected int | minWordSize
protected OffsetAttribute | offsetAtt
protected boolean | onlyLongestMatch
protected CharTermAttribute | termAtt
protected LinkedList<CompoundWordTokenFilterBase.CompoundToken> | tokens
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
protected CompoundWordTokenFilterBase(TokenStream input, Set<?> dictionary)
Deprecated. use CompoundWordTokenFilterBase(Version, TokenStream, Set) instead
protected CompoundWordTokenFilterBase(TokenStream input, Set<?> dictionary, boolean onlyLongestMatch)
Deprecated. use CompoundWordTokenFilterBase(Version, TokenStream, Set, boolean) instead
protected CompoundWordTokenFilterBase(TokenStream input, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. use CompoundWordTokenFilterBase(Version, TokenStream, Set, int, int, int, boolean) instead
protected CompoundWordTokenFilterBase(TokenStream input, String[] dictionary)
Deprecated. use CompoundWordTokenFilterBase(Version, TokenStream, String[]) instead
protected CompoundWordTokenFilterBase(TokenStream input, String[] dictionary, boolean onlyLongestMatch)
Deprecated. use CompoundWordTokenFilterBase(Version, TokenStream, String[], boolean) instead
protected CompoundWordTokenFilterBase(TokenStream input, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. use CompoundWordTokenFilterBase(Version, TokenStream, String[], int, int, int, boolean) instead
protected CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, Set<?> dictionary)
protected CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, Set<?> dictionary, boolean onlyLongestMatch)
protected CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
protected CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, String[] dictionary)
protected CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, String[] dictionary, boolean onlyLongestMatch)
protected CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Method Summary
protected abstract void | decompose() Decomposes the current termAtt and places CompoundWordTokenFilterBase.CompoundToken instances in the tokens list.
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
static CharArraySet | makeDictionary(Version matchVersion, String[] dictionary) Deprecated. Only available for backwards compatibility.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_MIN_WORD_SIZE

public static final int DEFAULT_MIN_WORD_SIZE
The default for minimal word length that gets decomposed

See Also:
Constant Field Values

DEFAULT_MIN_SUBWORD_SIZE

public static final int DEFAULT_MIN_SUBWORD_SIZE
The default for minimal length of subwords that get propagated to the output of this filter

See Also:
Constant Field Values

DEFAULT_MAX_SUBWORD_SIZE

public static final int DEFAULT_MAX_SUBWORD_SIZE
The default for maximal length of subwords that get propagated to the output of this filter

See Also:
Constant Field Values

dictionary

protected final CharArraySet dictionary

tokens

protected final LinkedList<CompoundWordTokenFilterBase.CompoundToken> tokens

minWordSize

protected final int minWordSize

minSubwordSize

protected final int minSubwordSize

maxSubwordSize

protected final int maxSubwordSize

onlyLongestMatch

protected final boolean onlyLongestMatch

termAtt

protected final CharTermAttribute termAtt

offsetAtt

protected final OffsetAttribute offsetAtt
Constructor Detail

CompoundWordTokenFilterBase

@Deprecated
protected CompoundWordTokenFilterBase(TokenStream input,
                                                 String[] dictionary,
                                                 int minWordSize,
                                                 int minSubwordSize,
                                                 int maxSubwordSize,
                                                 boolean onlyLongestMatch)
Deprecated. use CompoundWordTokenFilterBase(Version, TokenStream, String[], int, int, int, boolean) instead

CompoundWordTokenFilterBase

@Deprecated
protected CompoundWordTokenFilterBase(TokenStream input,
                                                 String[] dictionary,
                                                 boolean onlyLongestMatch)
Deprecated. use CompoundWordTokenFilterBase(Version, TokenStream, String[], boolean) instead

CompoundWordTokenFilterBase

@Deprecated
protected CompoundWordTokenFilterBase(TokenStream input,
                                                 Set<?> dictionary,
                                                 boolean onlyLongestMatch)
Deprecated. use CompoundWordTokenFilterBase(Version, TokenStream, Set, boolean) instead

CompoundWordTokenFilterBase

@Deprecated
protected CompoundWordTokenFilterBase(TokenStream input,
                                                 String[] dictionary)
Deprecated. use CompoundWordTokenFilterBase(Version, TokenStream, String[]) instead

CompoundWordTokenFilterBase

@Deprecated
protected CompoundWordTokenFilterBase(TokenStream input,
                                                 Set<?> dictionary)
Deprecated. use CompoundWordTokenFilterBase(Version, TokenStream, Set) instead

CompoundWordTokenFilterBase

@Deprecated
protected CompoundWordTokenFilterBase(TokenStream input,
                                                 Set<?> dictionary,
                                                 int minWordSize,
                                                 int minSubwordSize,
                                                 int maxSubwordSize,
                                                 boolean onlyLongestMatch)
Deprecated. use CompoundWordTokenFilterBase(Version, TokenStream, Set, int, int, int, boolean) instead

CompoundWordTokenFilterBase

protected CompoundWordTokenFilterBase(Version matchVersion,
                                      TokenStream input,
                                      String[] dictionary,
                                      int minWordSize,
                                      int minSubwordSize,
                                      int maxSubwordSize,
                                      boolean onlyLongestMatch)

CompoundWordTokenFilterBase

protected CompoundWordTokenFilterBase(Version matchVersion,
                                      TokenStream input,
                                      String[] dictionary,
                                      boolean onlyLongestMatch)

CompoundWordTokenFilterBase

protected CompoundWordTokenFilterBase(Version matchVersion,
                                      TokenStream input,
                                      Set<?> dictionary,
                                      boolean onlyLongestMatch)

CompoundWordTokenFilterBase

protected CompoundWordTokenFilterBase(Version matchVersion,
                                      TokenStream input,
                                      String[] dictionary)

CompoundWordTokenFilterBase

protected CompoundWordTokenFilterBase(Version matchVersion,
                                      TokenStream input,
                                      Set<?> dictionary)

CompoundWordTokenFilterBase

protected CompoundWordTokenFilterBase(Version matchVersion,
                                      TokenStream input,
                                      Set<?> dictionary,
                                      int minWordSize,
                                      int minSubwordSize,
                                      int maxSubwordSize,
                                      boolean onlyLongestMatch)
Method Detail

makeDictionary

@Deprecated
public static CharArraySet makeDictionary(Version matchVersion,
                                                     String[] dictionary)
Deprecated. Only available for backwards compatibility.

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

decompose

protected abstract void decompose()
Decomposes the current termAtt and places CompoundWordTokenFilterBase.CompoundToken instances in the tokens list. The original token may not be placed in the list, as it is automatically passed through this filter.

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DictionaryCompoundWordTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.compound
Class DictionaryCompoundWordTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
                    extended by  org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter
All Implemented Interfaces:
Closeable
public class DictionaryCompoundWordTokenFilter
extends CompoundWordTokenFilterBase

A TokenFilter that decomposes compound words found in many Germanic languages.

"Donaudampfschiff" becomes Donau, dampf, schiff so that you can find "Donaudampfschiff" even when you only enter "schiff". It uses a brute-force algorithm to achieve this.

You must specify the required Version compatibility when creating CompoundWordTokenFilterBase:

  • As of 3.1, CompoundWordTokenFilterBase correctly handles Unicode 4.0 supplementary characters in strings and char arrays provided as compound word dictionaries.

If you pass in a CharArraySet as dictionary, it should be case-insensitive unless it contains only lowercased entries and you have LowerCaseFilter before this filter in your analysis chain. For optional performance (as this filter does lots of lookups to the dictionary, you should use the latter analysis chain/CharArraySet). Be aware: If you supply arbitrary Sets to the ctors or String[] dictionaries, they will be automatically transformed to case-insensitive!

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
CompoundWordTokenFilterBase.CompoundToken
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
DEFAULT_MAX_SUBWORD_SIZE, DEFAULT_MIN_SUBWORD_SIZE, DEFAULT_MIN_WORD_SIZE, dictionary, maxSubwordSize, minSubwordSize, minWordSize, offsetAtt, onlyLongestMatch, termAtt, tokens
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
DictionaryCompoundWordTokenFilter(TokenStream input, Set dictionary)
Deprecated. use DictionaryCompoundWordTokenFilter(Version, TokenStream, Set) instead
DictionaryCompoundWordTokenFilter(TokenStream input, Set dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. use DictionaryCompoundWordTokenFilter(Version, TokenStream, Set, int, int, int, boolean) instead
DictionaryCompoundWordTokenFilter(TokenStream input, String[] dictionary)
Deprecated. use DictionaryCompoundWordTokenFilter(Version, TokenStream, String[]) instead
DictionaryCompoundWordTokenFilter(TokenStream input, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. use DictionaryCompoundWordTokenFilter(Version, TokenStream, String[], int, int, int, boolean) instead
DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, Set<?> dictionary)
Creates a new DictionaryCompoundWordTokenFilter
DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Creates a new DictionaryCompoundWordTokenFilter
DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, String[] dictionary)
Deprecated. Use the constructors taking Set
DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. Use the constructors taking Set
Method Summary
protected  void decompose()
Decomposes the current CompoundWordTokenFilterBase.termAtt and places CompoundWordTokenFilterBase.CompoundToken instances in the CompoundWordTokenFilterBase.tokens list.
Methods inherited from class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
incrementToken, makeDictionary, reset
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

DictionaryCompoundWordTokenFilter

@Deprecated
public DictionaryCompoundWordTokenFilter(TokenStream input,
                                                    String[] dictionary,
                                                    int minWordSize,
                                                    int minSubwordSize,
                                                    int maxSubwordSize,
                                                    boolean onlyLongestMatch)
Deprecated. use DictionaryCompoundWordTokenFilter(Version, TokenStream, String[], int, int, int, boolean) instead

Creates a new DictionaryCompoundWordTokenFilter.

Parameters:
input - the TokenStream to process
dictionary - the word dictionary to match against
minWordSize - only words longer than this get processed
minSubwordSize - only subwords longer than this get to the output stream
maxSubwordSize - only subwords shorter than this get to the output stream
onlyLongestMatch - Add only the longest matching subword to the stream

DictionaryCompoundWordTokenFilter

@Deprecated
public DictionaryCompoundWordTokenFilter(TokenStream input,
                                                    String[] dictionary)
Deprecated. use DictionaryCompoundWordTokenFilter(Version, TokenStream, String[]) instead

Creates a new DictionaryCompoundWordTokenFilter

Parameters:
input - the TokenStream to process
dictionary - the word dictionary to match against

DictionaryCompoundWordTokenFilter

@Deprecated
public DictionaryCompoundWordTokenFilter(TokenStream input,
                                                    Set dictionary)
Deprecated. use DictionaryCompoundWordTokenFilter(Version, TokenStream, Set) instead

Creates a new DictionaryCompoundWordTokenFilter

Parameters:
input - the TokenStream to process
dictionary - the word dictionary to match against. If this is a CharArraySet it must have set ignoreCase=false and only contain lower case strings.

DictionaryCompoundWordTokenFilter

@Deprecated
public DictionaryCompoundWordTokenFilter(TokenStream input,
                                                    Set dictionary,
                                                    int minWordSize,
                                                    int minSubwordSize,
                                                    int maxSubwordSize,
                                                    boolean onlyLongestMatch)
Deprecated. use DictionaryCompoundWordTokenFilter(Version, TokenStream, Set, int, int, int, boolean) instead

Creates a new DictionaryCompoundWordTokenFilter

Parameters:
input - the TokenStream to process
dictionary - the word dictionary to match against. If this is a CharArraySet it must have set ignoreCase=false and only contain lower case strings.
minWordSize - only words longer than this get processed
minSubwordSize - only subwords longer than this get to the output stream
maxSubwordSize - only subwords shorter than this get to the output stream
onlyLongestMatch - Add only the longest matching subword to the stream

DictionaryCompoundWordTokenFilter

@Deprecated
public DictionaryCompoundWordTokenFilter(Version matchVersion,
                                                    TokenStream input,
                                                    String[] dictionary,
                                                    int minWordSize,
                                                    int minSubwordSize,
                                                    int maxSubwordSize,
                                                    boolean onlyLongestMatch)
Deprecated. Use the constructors taking Set

Creates a new DictionaryCompoundWordTokenFilter

Parameters:
matchVersion - Lucene version to enable correct Unicode 4.0 behavior in the dictionaries if Version > 3.0. See CompoundWordTokenFilterBase for details.
input - the TokenStream to process
dictionary - the word dictionary to match against
minWordSize - only words longer than this get processed
minSubwordSize - only subwords longer than this get to the output stream
maxSubwordSize - only subwords shorter than this get to the output stream
onlyLongestMatch - Add only the longest matching subword to the stream

DictionaryCompoundWordTokenFilter

@Deprecated
public DictionaryCompoundWordTokenFilter(Version matchVersion,
                                                    TokenStream input,
                                                    String[] dictionary)
Deprecated. Use the constructors taking Set

Creates a new DictionaryCompoundWordTokenFilter

Parameters:
matchVersion - Lucene version to enable correct Unicode 4.0 behavior in the dictionaries if Version > 3.0. See CompoundWordTokenFilterBase for details.
input - the TokenStream to process
dictionary - the word dictionary to match against

DictionaryCompoundWordTokenFilter

public DictionaryCompoundWordTokenFilter(Version matchVersion,
                                         TokenStream input,
                                         Set<?> dictionary)
Creates a new DictionaryCompoundWordTokenFilter

Parameters:
matchVersion - Lucene version to enable correct Unicode 4.0 behavior in the dictionaries if Version > 3.0. See CompoundWordTokenFilterBase for details.
input - the TokenStream to process
dictionary - the word dictionary to match against.

DictionaryCompoundWordTokenFilter

public DictionaryCompoundWordTokenFilter(Version matchVersion,
                                         TokenStream input,
                                         Set<?> dictionary,
                                         int minWordSize,
                                         int minSubwordSize,
                                         int maxSubwordSize,
                                         boolean onlyLongestMatch)
Creates a new DictionaryCompoundWordTokenFilter

Parameters:
matchVersion - Lucene version to enable correct Unicode 4.0 behavior in the dictionaries if Version > 3.0. See CompoundWordTokenFilterBase for details.
input - the TokenStream to process
dictionary - the word dictionary to match against.
minWordSize - only words longer than this get processed
minSubwordSize - only subwords longer than this get to the output stream
maxSubwordSize - only subwords shorter than this get to the output stream
onlyLongestMatch - Add only the longest matching subword to the stream
Method Detail

decompose

protected void decompose()
Description copied from class: CompoundWordTokenFilterBase
Decomposes the current CompoundWordTokenFilterBase.termAtt and places CompoundWordTokenFilterBase.CompoundToken instances in the CompoundWordTokenFilterBase.tokens list. The original token may not be placed in the list, as it is automatically passed through this filter.

Specified by:
decompose in class CompoundWordTokenFilterBase
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HyphenationCompoundWordTokenFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.compound
Class HyphenationCompoundWordTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
                    extended by  org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
All Implemented Interfaces:
Closeable
public class HyphenationCompoundWordTokenFilter
extends CompoundWordTokenFilterBase

A TokenFilter that decomposes compound words found in many Germanic languages.

"Donaudampfschiff" becomes Donau, dampf, schiff so that you can find "Donaudampfschiff" even when you only enter "schiff". It uses a hyphenation grammar and a word dictionary to achieve this.

You must specify the required Version compatibility when creating CompoundWordTokenFilterBase:

  • As of 3.1, CompoundWordTokenFilterBase correctly handles Unicode 4.0 supplementary characters in strings and char arrays provided as compound word dictionaries.

If you pass in a CharArraySet as dictionary, it should be case-insensitive unless it contains only lowercased entries and you have LowerCaseFilter before this filter in your analysis chain. For optional performance (as this filter does lots of lookups to the dictionary, you should use the latter analysis chain/CharArraySet). Be aware: If you supply arbitrary Sets to the ctors or String[] dictionaries, they will be automatically transformed to case-insensitive!

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
CompoundWordTokenFilterBase.CompoundToken
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
DEFAULT_MAX_SUBWORD_SIZE, DEFAULT_MIN_SUBWORD_SIZE, DEFAULT_MIN_WORD_SIZE, dictionary, maxSubwordSize, minSubwordSize, minWordSize, offsetAtt, onlyLongestMatch, termAtt, tokens
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
HyphenationCompoundWordTokenFilter(TokenStream input, HyphenationTree hyphenator, Set<?> dictionary)
Deprecated. use HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set) instead.
HyphenationCompoundWordTokenFilter(TokenStream input, HyphenationTree hyphenator, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. use HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set, int, int, int, boolean) instead.
HyphenationCompoundWordTokenFilter(TokenStream input, HyphenationTree hyphenator, String[] dictionary)
Deprecated. use HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[]) instead.
HyphenationCompoundWordTokenFilter(TokenStream input, HyphenationTree hyphenator, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. use HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[], int, int, int, boolean) instead.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator)
Create a HyphenationCompoundWordTokenFilter with no dictionary.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, int minWordSize, int minSubwordSize, int maxSubwordSize)
Create a HyphenationCompoundWordTokenFilter with no dictionary.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, Set<?> dictionary)
Creates a new HyphenationCompoundWordTokenFilter instance.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Creates a new HyphenationCompoundWordTokenFilter instance.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, String[] dictionary)
Deprecated. Use the constructors taking Set
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. Use the constructors taking Set
Method Summary
protected void | decompose() Decomposes the current CompoundWordTokenFilterBase.termAtt and places CompoundWordTokenFilterBase.CompoundToken instances in the CompoundWordTokenFilterBase.tokens list.
static HyphenationTree | getHyphenationTree(File hyphenationFile) Create a hyphenator tree
static HyphenationTree | getHyphenationTree(InputSource hyphenationSource) Create a hyphenator tree
static HyphenationTree | getHyphenationTree(Reader hyphenationReader) Deprecated. Don't use Readers with fixed charset to load XML files, unless programatically created. Use getHyphenationTree(InputSource) instead, where you can supply default charset and input stream, if you like.
static HyphenationTree | getHyphenationTree(String hyphenationFilename) Create a hyphenator tree
Methods inherited from class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
incrementToken, makeDictionary, reset
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

HyphenationCompoundWordTokenFilter

@Deprecated
public HyphenationCompoundWordTokenFilter(Version matchVersion,
                                                     TokenStream input,
                                                     HyphenationTree hyphenator,
                                                     String[] dictionary,
                                                     int minWordSize,
                                                     int minSubwordSize,
                                                     int maxSubwordSize,
                                                     boolean onlyLongestMatch)
Deprecated. Use the constructors taking Set

Creates a new HyphenationCompoundWordTokenFilter instance.

Parameters:
matchVersion - Lucene version to enable correct Unicode 4.0 behavior in the dictionaries if Version > 3.0. See CompoundWordTokenFilterBase for details.
input - the TokenStream to process
hyphenator - the hyphenation pattern tree to use for hyphenation
dictionary - the word dictionary to match against
minWordSize - only words longer than this get processed
minSubwordSize - only subwords longer than this get to the output stream
maxSubwordSize - only subwords shorter than this get to the output stream
onlyLongestMatch - Add only the longest matching subword to the stream

HyphenationCompoundWordTokenFilter

@Deprecated
public HyphenationCompoundWordTokenFilter(Version matchVersion,
                                                     TokenStream input,
                                                     HyphenationTree hyphenator,
                                                     String[] dictionary)
Deprecated. Use the constructors taking Set

Creates a new HyphenationCompoundWordTokenFilter instance.

Parameters:
matchVersion - Lucene version to enable correct Unicode 4.0 behavior in the dictionaries if Version > 3.0. See CompoundWordTokenFilterBase for details.
input - the TokenStream to process
hyphenator - the hyphenation pattern tree to use for hyphenation
dictionary - the word dictionary to match against

HyphenationCompoundWordTokenFilter

public HyphenationCompoundWordTokenFilter(Version matchVersion,
                                          TokenStream input,
                                          HyphenationTree hyphenator,
                                          Set<?> dictionary)
Creates a new HyphenationCompoundWordTokenFilter instance.

Parameters:
matchVersion - Lucene version to enable correct Unicode 4.0 behavior in the dictionaries if Version > 3.0. See CompoundWordTokenFilterBase for details.
input - the TokenStream to process
hyphenator - the hyphenation pattern tree to use for hyphenation
dictionary - the word dictionary to match against.

HyphenationCompoundWordTokenFilter

public HyphenationCompoundWordTokenFilter(Version matchVersion,
                                          TokenStream input,
                                          HyphenationTree hyphenator,
                                          Set<?> dictionary,
                                          int minWordSize,
                                          int minSubwordSize,
                                          int maxSubwordSize,
                                          boolean onlyLongestMatch)
Creates a new HyphenationCompoundWordTokenFilter instance.

Parameters:
matchVersion - Lucene version to enable correct Unicode 4.0 behavior in the dictionaries if Version > 3.0. See CompoundWordTokenFilterBase for details.
input - the TokenStream to process
hyphenator - the hyphenation pattern tree to use for hyphenation
dictionary - the word dictionary to match against.
minWordSize - only words longer than this get processed
minSubwordSize - only subwords longer than this get to the output stream
maxSubwordSize - only subwords shorter than this get to the output stream
onlyLongestMatch - Add only the longest matching subword to the stream

HyphenationCompoundWordTokenFilter

public HyphenationCompoundWordTokenFilter(Version matchVersion,
                                          TokenStream input,
                                          HyphenationTree hyphenator,
                                          int minWordSize,
                                          int minSubwordSize,
                                          int maxSubwordSize)
Create a HyphenationCompoundWordTokenFilter with no dictionary.

Calls HyphenationCompoundWordTokenFilter(matchVersion, input, hyphenator, null, minWordSize, minSubwordSize, maxSubwordSize

HyphenationCompoundWordTokenFilter

public HyphenationCompoundWordTokenFilter(Version matchVersion,
                                          TokenStream input,
                                          HyphenationTree hyphenator)
Create a HyphenationCompoundWordTokenFilter with no dictionary.

Calls HyphenationCompoundWordTokenFilter(matchVersion, input, hyphenator, DEFAULT_MIN_WORD_SIZE, DEFAULT_MIN_SUBWORD_SIZE, DEFAULT_MAX_SUBWORD_SIZE

HyphenationCompoundWordTokenFilter

@Deprecated
public HyphenationCompoundWordTokenFilter(TokenStream input,
                                                     HyphenationTree hyphenator,
                                                     String[] dictionary,
                                                     int minWordSize,
                                                     int minSubwordSize,
                                                     int maxSubwordSize,
                                                     boolean onlyLongestMatch)
Deprecated. use HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[], int, int, int, boolean) instead.

Creates a new HyphenationCompoundWordTokenFilter instance.

Parameters:
input - the TokenStream to process
hyphenator - the hyphenation pattern tree to use for hyphenation
dictionary - the word dictionary to match against
minWordSize - only words longer than this get processed
minSubwordSize - only subwords longer than this get to the output stream
maxSubwordSize - only subwords shorter than this get to the output stream
onlyLongestMatch - Add only the longest matching subword to the stream

HyphenationCompoundWordTokenFilter

@Deprecated
public HyphenationCompoundWordTokenFilter(TokenStream input,
                                                     HyphenationTree hyphenator,
                                                     String[] dictionary)
Deprecated. use HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[]) instead.

Creates a new HyphenationCompoundWordTokenFilter instance.

Parameters:
input - the TokenStream to process
hyphenator - the hyphenation pattern tree to use for hyphenation
dictionary - the word dictionary to match against

HyphenationCompoundWordTokenFilter

@Deprecated
public HyphenationCompoundWordTokenFilter(TokenStream input,
                                                     HyphenationTree hyphenator,
                                                     Set<?> dictionary)
Deprecated. use HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set) instead.

Creates a new HyphenationCompoundWordTokenFilter instance.

Parameters:
input - the TokenStream to process
hyphenator - the hyphenation pattern tree to use for hyphenation
dictionary - the word dictionary to match against. If this is a CharArraySet it must have set ignoreCase=false and only contain lower case strings.

HyphenationCompoundWordTokenFilter

@Deprecated
public HyphenationCompoundWordTokenFilter(TokenStream input,
                                                     HyphenationTree hyphenator,
                                                     Set<?> dictionary,
                                                     int minWordSize,
                                                     int minSubwordSize,
                                                     int maxSubwordSize,
                                                     boolean onlyLongestMatch)
Deprecated. use HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set, int, int, int, boolean) instead.

Creates a new HyphenationCompoundWordTokenFilter instance.

Parameters:
input - the TokenStream to process
hyphenator - the hyphenation pattern tree to use for hyphenation
dictionary - the word dictionary to match against. If this is a CharArraySet it must have set ignoreCase=false and only contain lower case strings.
minWordSize - only words longer than this get processed
minSubwordSize - only subwords longer than this get to the output stream
maxSubwordSize - only subwords shorter than this get to the output stream
onlyLongestMatch - Add only the longest matching subword to the stream
Method Detail

getHyphenationTree

public static HyphenationTree getHyphenationTree(String hyphenationFilename)
                                          throws Exception
Create a hyphenator tree

Parameters:
hyphenationFilename - the filename of the XML grammar to load
Returns:
An object representing the hyphenation patterns
Throws:
Exception

getHyphenationTree

public static HyphenationTree getHyphenationTree(File hyphenationFile)
                                          throws Exception
Create a hyphenator tree

Parameters:
hyphenationFile - the file of the XML grammar to load
Returns:
An object representing the hyphenation patterns
Throws:
Exception

getHyphenationTree

@Deprecated
public static HyphenationTree getHyphenationTree(Reader hyphenationReader)
                                          throws Exception
Deprecated. Don't use Readers with fixed charset to load XML files, unless programatically created. Use getHyphenationTree(InputSource) instead, where you can supply default charset and input stream, if you like.

Create a hyphenator tree

Parameters:
hyphenationReader - the reader of the XML grammar to load from
Returns:
An object representing the hyphenation patterns
Throws:
Exception

getHyphenationTree

public static HyphenationTree getHyphenationTree(InputSource hyphenationSource)
                                          throws Exception
Create a hyphenator tree

Parameters:
hyphenationSource - the InputSource pointing to the XML grammar
Returns:
An object representing the hyphenation patterns
Throws:
Exception

decompose

protected void decompose()
Description copied from class: CompoundWordTokenFilterBase
Decomposes the current CompoundWordTokenFilterBase.termAtt and places CompoundWordTokenFilterBase.CompoundToken instances in the CompoundWordTokenFilterBase.tokens list. The original token may not be placed in the list, as it is automatically passed through this filter.

Specified by:
decompose in class CompoundWordTokenFilterBase
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.compound
Classes
CompoundWordTokenFilterBase
DictionaryCompoundWordTokenFilter
HyphenationCompoundWordTokenFilter


org.apache.lucene.analysis.compound

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.compound

A filter that decomposes compound words you find in many Germanic languages into the word parts.

See:
Description

Class Summary
CompoundWordTokenFilterBase | Base class for decomposition token filters.
DictionaryCompoundWordTokenFilter | A TokenFilter that decomposes compound words found in many Germanic languages.
HyphenationCompoundWordTokenFilter | A TokenFilter that decomposes compound words found in many Germanic languages.

Package org.apache.lucene.analysis.compound Description

A filter that decomposes compound words you find in many Germanic languages into the word parts. This example shows what it does:

Input token stream
Rindfleischüberwachungsgesetz Drahtschere abba

Output token stream
(Rindfleischüberwachungsgesetz,0,29)
(Rind,0,4,posIncr=0)
(fleisch,4,11,posIncr=0)
(überwachung,11,22,posIncr=0)
(gesetz,23,29,posIncr=0)
(Drahtschere,30,41)
(Draht,30,35,posIncr=0)
(schere,35,41,posIncr=0)
(abba,42,46)
The input token is always preserved and the filters do not alter the case of word parts. There are two variants of the filter available:
  • HyphenationCompoundWordTokenFilter: it uses a hyphenation grammar based approach to find potential word parts of a given word.
  • DictionaryCompoundWordTokenFilter: it uses a brute-force dictionary-only based approach to find the word parts of a given word.

Compound word token filters

HyphenationCompoundWordTokenFilter

The HyphenationCompoundWordTokenFilter uses hyphenation grammars to find potential subwords that a worth to check against the dictionary. It can be used without a dictionary as well but then produces a lot of "nonword" tokens. The quality of the output tokens is directly connected to the quality of the grammar file you use. For languages like German they are quite good.
Grammar file
Unfortunately we cannot bundle the hyphenation grammar files with Lucene because they do not use an ASF compatible license (they use the LaTeX Project Public License instead). You can find the XML based grammar files at the Objects For Formatting Objects (OFFO) Sourceforge project (direct link to download the pattern files: http://downloads.sourceforge.net/offo/offo-hyphenation.zip ). The files you need are in the subfolder offo-hyphenation/hyph/ .
Credits for the hyphenation code go to the Apache FOP project .

DictionaryCompoundWordTokenFilter

The DictionaryCompoundWordTokenFilter uses a dictionary-only approach to find subwords in a compound word. It is much slower than the one that uses the hyphenation grammars. You can use it as a first start to see if your dictionary is good or not because it is much simpler in design.

Dictionary

The output quality of both token filters is directly connected to the quality of the dictionary you use. They are language dependent of course. You always should use a dictionary that fits to the text you want to index. If you index medical text for example then you should use a dictionary that contains medical words. A good start for general text are the dictionaries you find at the OpenOffice dictionaries Wiki.

Which variant should I use?

This decision matrix should help you:
Token filter | Output quality | Performance
HyphenationCompoundWordTokenFilter | good if grammar file is good – acceptable otherwise | fast
DictionaryCompoundWordTokenFilter | good | slow

Examples

  public void testHyphenationCompoundWordsDE() throws Exception {
    String[] dict = { "Rind", "Fleisch", "Draht", "Schere", "Gesetz",
        "Aufgabe", "Überwachung" };

    Reader reader = new FileReader("de_DR.xml");

    HyphenationTree hyphenator = HyphenationCompoundWordTokenFilter
        .getHyphenationTree(reader);

    HyphenationCompoundWordTokenFilter tf = new HyphenationCompoundWordTokenFilter(
        new WhitespaceTokenizer(new StringReader(
            "Rindfleischüberwachungsgesetz Drahtschere abba")), hyphenator,
        dict, CompoundWordTokenFilterBase.DEFAULT_MIN_WORD_SIZE,
        CompoundWordTokenFilterBase.DEFAULT_MIN_SUBWORD_SIZE,
        CompoundWordTokenFilterBase.DEFAULT_MAX_SUBWORD_SIZE, false);

    CharTermAttribute t = tf.addAttribute(CharTermAttribute.class);
    while (tf.incrementToken()) {
       System.out.println(t);
    }
  }

  public void testHyphenationCompoundWordsWithoutDictionaryDE() throws Exception {
    Reader reader = new FileReader("de_DR.xml");

    HyphenationTree hyphenator = HyphenationCompoundWordTokenFilter
        .getHyphenationTree(reader);

    HyphenationCompoundWordTokenFilter tf = new HyphenationCompoundWordTokenFilter(
        new WhitespaceTokenizer(new StringReader(
            "Rindfleischüberwachungsgesetz Drahtschere abba")), hyphenator);

    CharTermAttribute t = tf.addAttribute(CharTermAttribute.class);
    while (tf.incrementToken()) {
       System.out.println(t);
    }
  }

  public void testDumbCompoundWordsSE() throws Exception {
    String[] dict = { "Bil", "Dörr", "Motor", "Tak", "Borr", "Slag", "Hammar",
        "Pelar", "Glas", "Ögon", "Fodral", "Bas", "Fiol", "Makare", "Gesäll",
        "Sko", "Vind", "Rute", "Torkare", "Blad" };

    DictionaryCompoundWordTokenFilter tf = new DictionaryCompoundWordTokenFilter(
        new WhitespaceTokenizer(
            new StringReader(
                "Bildörr Bilmotor Biltak Slagborr Hammarborr Pelarborr Glasögonfodral Basfiolsfodral Basfiolsfodralmakaregesäll Skomakare Vindrutetorkare Vindrutetorkarblad abba")),
        dict);
    CharTermAttribute t = tf.addAttribute(CharTermAttribute.class);
    while (tf.incrementToken()) {
       System.out.println(t);
    }
  }


org.apache.lucene.analysis.compound Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.compound

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase
            • org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter
            • org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter
    • org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase.CompoundToken


Uses of Package org.apache.lucene.analysis.compound

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.compound

Packages that use org.apache.lucene.analysis.compound
org.apache.lucene.analysis.compound A filter that decomposes compound words you find in many Germanic languages into the word parts.

Classes in org.apache.lucene.analysis.compound used by org.apache.lucene.analysis.compound
CompoundWordTokenFilterBase
Base class for decomposition token filters.
CompoundWordTokenFilterBase.CompoundToken
Helper class to hold decompounded token information

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase.CompoundToken

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase.CompoundToken

Packages that use CompoundWordTokenFilterBase.CompoundToken
org.apache.lucene.analysis.compound A filter that decomposes compound words you find in many Germanic languages into the word parts.

Uses of CompoundWordTokenFilterBase.CompoundToken in org.apache.lucene.analysis.compound

Fields in org.apache.lucene.analysis.compound with type parameters of type CompoundWordTokenFilterBase.CompoundToken
protected  LinkedList<CompoundWordTokenFilterBase.CompoundToken> CompoundWordTokenFilterBase.tokens

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.compound.CompoundWordTokenFilterBase

Packages that use CompoundWordTokenFilterBase
org.apache.lucene.analysis.compound A filter that decomposes compound words you find in many Germanic languages into the word parts.

Uses of CompoundWordTokenFilterBase in org.apache.lucene.analysis.compound

Subclasses of CompoundWordTokenFilterBase in org.apache.lucene.analysis.compound
class | DictionaryCompoundWordTokenFilter A TokenFilter that decomposes compound words found in many Germanic languages.
class | HyphenationCompoundWordTokenFilter A TokenFilter that decomposes compound words found in many Germanic languages.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter

No usage of org.apache.lucene.analysis.compound.DictionaryCompoundWordTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter

No usage of org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ByteVector

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.compound.hyphenation
Class ByteVector

java.lang.Object
    extended by  org.apache.lucene.analysis.compound.hyphenation.ByteVector
All Implemented Interfaces:
Serializable
public class ByteVector
extends Object
implements Serializable

This class implements a simple byte vector with access to the underlying array. This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.

See Also:
Serialized Form

Constructor Summary
ByteVector()
ByteVector(byte[] a)
ByteVector(byte[] a, int capacity)
ByteVector(int capacity)
Method Summary
int | alloc(int size) This is to implement memory allocation in the array.
int | capacity() returns current capacity of array
byte | get(int index)
byte[] | getArray()
int | length() return number of items in array
void | put(int index, byte val)
void | trimToSize()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ByteVector

public ByteVector()

ByteVector

public ByteVector(int capacity)

ByteVector

public ByteVector(byte[] a)

ByteVector

public ByteVector(byte[] a,
                  int capacity)
Method Detail

getArray

public byte[] getArray()

length

public int length()
return number of items in array

capacity

public int capacity()
returns current capacity of array

put

public void put(int index,
                byte val)

get

public byte get(int index)

alloc

public int alloc(int size)
This is to implement memory allocation in the array. Like malloc().

trimToSize

public void trimToSize()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CharVector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.compound.hyphenation
Class CharVector

java.lang.Object
    extended by  org.apache.lucene.analysis.compound.hyphenation.CharVector
All Implemented Interfaces:
Serializable, Cloneable
public class CharVector
extends Object
implements Cloneable, Serializable

This class implements a simple char vector with access to the underlying array. This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.

See Also:
Serialized Form

Constructor Summary
CharVector()
CharVector(char[] a)
CharVector(char[] a, int capacity)
CharVector(int capacity)
Method Summary
int | alloc(int size)
int | capacity() returns current capacity of array
void | clear() Reset Vector but don't resize or clear elements
Object | clone()
char | get(int index)
char[] | getArray()
int | length() return number of items in array
void | put(int index, char val)
void | trimToSize()
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CharVector

public CharVector()

CharVector

public CharVector(int capacity)

CharVector

public CharVector(char[] a)

CharVector

public CharVector(char[] a,
                  int capacity)
Method Detail

clear

public void clear()
Reset Vector but don't resize or clear elements

clone

public Object clone()
Overrides:
clone in class Object

getArray

public char[] getArray()

length

public int length()
return number of items in array

capacity

public int capacity()
returns current capacity of array

put

public void put(int index,
                char val)

get

public char get(int index)

alloc

public int alloc(int size)

trimToSize

public void trimToSize()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Hyphen

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.compound.hyphenation
Class Hyphen

java.lang.Object
    extended by  org.apache.lucene.analysis.compound.hyphenation.Hyphen
All Implemented Interfaces:
Serializable
public class Hyphen
extends Object
implements Serializable

This class represents a hyphen. A 'full' hyphen is made of 3 parts: the pre-break text, post-break text and no-break. If no line-break is generated at this position, the no-break text is used, otherwise, pre-break and post-break are used. Typically, pre-break is equal to the hyphen character and the others are empty. However, this general scheme allows support for cases in some languages where words change spelling if they're split across lines, like german's 'backen' which hyphenates 'bak-ken'. BTW, this comes from TeX. This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.

See Also:
Serialized Form

Field Summary
String | noBreak
String | postBreak
String | preBreak
Method Summary
 String toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

preBreak

public String preBreak

noBreak

public String noBreak

postBreak

public String postBreak
Method Detail

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Hyphenation

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.compound.hyphenation
Class Hyphenation

java.lang.Object
    extended by  org.apache.lucene.analysis.compound.hyphenation.Hyphenation

public class Hyphenation
extends Object

This class represents a hyphenated word. This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.

Method Summary
int[] | getHyphenationPoints()
int | length()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

length

public int length()
Returns:
the number of hyphenation points in the word

getHyphenationPoints

public int[] getHyphenationPoints()
Returns:
the hyphenation points
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HyphenationException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.compound.hyphenation
Class HyphenationException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  org.apache.lucene.analysis.compound.hyphenation.HyphenationException
All Implemented Interfaces:
Serializable
public class HyphenationException
extends Exception

This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.

See Also:
Serialized Form

Constructor Summary
HyphenationException(String msg)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

HyphenationException

public HyphenationException(String msg)
See Also:
Throwable.Throwable(String)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HyphenationTree

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.compound.hyphenation
Class HyphenationTree

java.lang.Object
    extended by  org.apache.lucene.analysis.compound.hyphenation.TernaryTree
        extended by  org.apache.lucene.analysis.compound.hyphenation.HyphenationTree
All Implemented Interfaces:
Serializable, Cloneable, PatternConsumer
public class HyphenationTree
extends TernaryTree
implements PatternConsumer, Serializable

This tree structure stores the hyphenation patterns in an efficient way for fast lookup. It provides the provides the method to hyphenate a word. This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.compound.hyphenation.TernaryTree
TernaryTree.Iterator
Field Summary
protected TernaryTree | classmap This map stores the character classes
protected HashMap<String,ArrayList<Object>> | stoplist This map stores hyphenation exceptions
protected ByteVector | vspace value space: stores the interletter values
Fields inherited from class org.apache.lucene.analysis.compound.hyphenation.TernaryTree
BLOCK_SIZE, eq, freenode, hi, kv, length, lo, root, sc
Constructor Summary
HyphenationTree()
Method Summary
void | addClass(String chargroup) Add a character class to the tree.
void | addException(String word, ArrayList<Object> hyphenatedword) Add an exception to the tree.
void | addPattern(String pattern, String ivalue) Add a pattern to the tree.
String | findPattern(String pat)
protected byte[] | getValues(int k)
protected int | hstrcmp(char[] s, int si, char[] t, int ti) String compare, returns 0 if equal or t is a substring of s
Hyphenation | hyphenate(char[] w, int offset, int len, int remainCharCount, int pushCharCount) Hyphenate word and return an array of hyphenation points.
Hyphenation | hyphenate(String word, int remainCharCount, int pushCharCount) Hyphenate word and return a Hyphenation object.
void | loadPatterns(File f) Read hyphenation patterns from an XML file.
void | loadPatterns(InputSource source) Read hyphenation patterns from an XML file.
protected int | packValues(String values) Packs the values by storing them in 4 bits, two values into a byte Values range is from 0 to 9.
void | printStats()
protected void | searchPatterns(char[] word, int index, byte[] il) Search for all possible partial matches of word starting at index an update interletter values.
protected String | unpackValues(int k)
Methods inherited from class org.apache.lucene.analysis.compound.hyphenation.TernaryTree
balance, clone, find, find, init, insert, insert, insertBalanced, keys, knows, main, size, strcmp, strcmp, strcpy, strlen, strlen, trimToSize
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

vspace

protected ByteVector vspace
value space: stores the interletter values

stoplist

protected HashMap<String,ArrayList<Object>> stoplist
This map stores hyphenation exceptions

classmap

protected TernaryTree classmap
This map stores the character classes

Constructor Detail

HyphenationTree

public HyphenationTree()
Method Detail

packValues

protected int packValues(String values)
Packs the values by storing them in 4 bits, two values into a byte Values range is from 0 to 9. We use zero as terminator, so we'll add 1 to the value.

Parameters:
values - a string of digits from '0' to '9' representing the interletter values.
Returns:
the index into the vspace array where the packed values are stored.

unpackValues

protected String unpackValues(int k)

loadPatterns

public void loadPatterns(File f)
                  throws HyphenationException
Read hyphenation patterns from an XML file.

Parameters:
f - the filename
Throws:
HyphenationException - In case the parsing fails

loadPatterns

public void loadPatterns(InputSource source)
                  throws HyphenationException
Read hyphenation patterns from an XML file.

Parameters:
source - the InputSource for the file
Throws:
HyphenationException - In case the parsing fails

findPattern

public String findPattern(String pat)

hstrcmp

protected int hstrcmp(char[] s,
                      int si,
                      char[] t,
                      int ti)
String compare, returns 0 if equal or t is a substring of s

getValues

protected byte[] getValues(int k)

searchPatterns

protected void searchPatterns(char[] word,
                              int index,
                              byte[] il)

Search for all possible partial matches of word starting at index an update interletter values. In other words, it does something like:

for(i=0; i

But it is done in an efficient way since the patterns are stored in a ternary tree. In fact, this is the whole purpose of having the tree: doing this search without having to test every single pattern. The number of patterns for languages such as English range from 4000 to 10000. Thus, doing thousands of string comparisons for each word to hyphenate would be really slow without the tree. The tradeoff is memory, but using a ternary tree instead of a trie, almost halves the the memory used by Lout or TeX. It's also faster than using a hash table

Parameters:
word - null terminated word to match
index - start index from word
il - interletter values array to update

hyphenate

public Hyphenation hyphenate(String word,
                             int remainCharCount,
                             int pushCharCount)
Hyphenate word and return a Hyphenation object.

Parameters:
word - the word to be hyphenated
remainCharCount - Minimum number of characters allowed before the hyphenation point.
pushCharCount - Minimum number of characters allowed after the hyphenation point.
Returns:
a Hyphenation object representing the hyphenated word or null if word is not hyphenated.

hyphenate

public Hyphenation hyphenate(char[] w,
                             int offset,
                             int len,
                             int remainCharCount,
                             int pushCharCount)
Hyphenate word and return an array of hyphenation points.

Parameters:
w - char array that contains the word
offset - Offset to first character in word
len - Length of word
remainCharCount - Minimum number of characters allowed before the hyphenation point.
pushCharCount - Minimum number of characters allowed after the hyphenation point.
Returns:
a Hyphenation object representing the hyphenated word or null if word is not hyphenated.

addClass

public void addClass(String chargroup)
Add a character class to the tree. It is used by PatternParser as callback to add character classes. Character classes define the valid word characters for hyphenation. If a word contains a character not defined in any of the classes, it is not hyphenated. It also defines a way to normalize the characters in order to compare them with the stored patterns. Usually pattern files use only lower case characters, in this case a class for letter 'a', for example, should be defined as "aA", the first character being the normalization char.

Specified by:
addClass in interface PatternConsumer
Parameters:
chargroup - character group

addException

public void addException(String word,
                         ArrayList<Object> hyphenatedword)
Add an exception to the tree. It is used by PatternParser class as callback to store the hyphenation exceptions.

Specified by:
addException in interface PatternConsumer
Parameters:
word - normalized word
hyphenatedword - a vector of alternating strings and hyphen objects.

addPattern

public void addPattern(String pattern,
                       String ivalue)
Add a pattern to the tree. Mainly, to be used by PatternParser class as callback to add a pattern to the tree.

Specified by:
addPattern in interface PatternConsumer
Parameters:
pattern - the hyphenation pattern
ivalue - interletter weight values indicating the desirability and priority of hyphenating at a given point within the pattern. It should contain only digit characters. (i.e. '0' to '9').

printStats

public void printStats()
Overrides:
printStats in class TernaryTree
Overview  Package   Class  Use  Tree  Deprecated  Index  Help
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.compound.hyphenation
Interfaces
PatternConsumer
Classes
ByteVector
CharVector
Hyphen
Hyphenation
HyphenationTree
PatternParser
TernaryTree
Exceptions
HyphenationException


org.apache.lucene.analysis.compound.hyphenation

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.compound.hyphenation

The code for the compound word hyphenation is taken from the Apache FOP project.

See:
Description

Interface Summary
PatternConsumer This interface is used to connect the XML pattern file parser to the hyphenation tree.

Class Summary
ByteVector | This class implements a simple byte vector with access to the underlying array.
CharVector | This class implements a simple char vector with access to the underlying array.
Hyphen | This class represents a hyphen.
Hyphenation | This class represents a hyphenated word.
HyphenationTree | This tree structure stores the hyphenation patterns in an efficient way for fast lookup.
PatternParser | A SAX document handler to read and parse hyphenation patterns from a XML file.
TernaryTree | Ternary Search Tree.

Exception Summary
HyphenationException This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/).

Package org.apache.lucene.analysis.compound.hyphenation Description

The code for the compound word hyphenation is taken from the Apache FOP project. All credits for the hyphenation code belongs to them.


org.apache.lucene.analysis.compound.hyphenation Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.compound.hyphenation

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.compound.hyphenation.ByteVector (implements java.io.Serializable)
    • org.apache.lucene.analysis.compound.hyphenation.CharVector (implements java.lang.Cloneable, java.io.Serializable)
    • org.xml.sax.helpers.DefaultHandler (implements org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler)
      • org.apache.lucene.analysis.compound.hyphenation.PatternParser (implements org.apache.lucene.analysis.compound.hyphenation.PatternConsumer)
    • org.apache.lucene.analysis.compound.hyphenation.Hyphen (implements java.io.Serializable)
    • org.apache.lucene.analysis.compound.hyphenation.Hyphenation
    • org.apache.lucene.analysis.compound.hyphenation.TernaryTree (implements java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.analysis.compound.hyphenation.HyphenationTree (implements org.apache.lucene.analysis.compound.hyphenation.PatternConsumer, java.io.Serializable)
    • org.apache.lucene.analysis.compound.hyphenation.TernaryTree.Iterator (implements java.util.Enumeration<E>)
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.apache.lucene.analysis.compound.hyphenation.HyphenationException

Interface Hierarchy

  • org.apache.lucene.analysis.compound.hyphenation.PatternConsumer


Uses of Package org.apache.lucene.analysis.compound.hyphenation

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.compound.hyphenation

Packages that use org.apache.lucene.analysis.compound.hyphenation
org.apache.lucene.analysis.compound | A filter that decomposes compound words you find in many Germanic languages into the word parts.
org.apache.lucene.analysis.compound.hyphenation | The code for the compound word hyphenation is taken from the Apache FOP project.

Classes in org.apache.lucene.analysis.compound.hyphenation used by org.apache.lucene.analysis.compound
HyphenationTree
This tree structure stores the hyphenation patterns in an efficient way for fast lookup.

Classes in org.apache.lucene.analysis.compound.hyphenation used by org.apache.lucene.analysis.compound.hyphenation
ByteVector
This class implements a simple byte vector with access to the underlying array.
CharVector
This class implements a simple char vector with access to the underlying array.
Hyphenation
This class represents a hyphenated word.
HyphenationException
This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/).
PatternConsumer
This interface is used to connect the XML pattern file parser to the hyphenation tree.
TernaryTree
Ternary Search Tree.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PatternConsumer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.compound.hyphenation
Interface PatternConsumer

All Known Implementing Classes:
HyphenationTree, PatternParser
public interface PatternConsumer

This interface is used to connect the XML pattern file parser to the hyphenation tree. This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.

Method Summary
void | addClass(String chargroup) Add a character class.
void | addException(String word, ArrayList<Object> hyphenatedword) Add a hyphenation exception.
void | addPattern(String pattern, String values) Add hyphenation patterns.

Method Detail

addClass

void addClass(String chargroup)
Add a character class. A character class defines characters that are considered equivalent for the purpose of hyphenation (e.g. "aA"). It usually means to ignore case.

Parameters:
chargroup - character group

addException

void addException(String word,
                  ArrayList<Object> hyphenatedword)
Add a hyphenation exception. An exception replaces the result obtained by the algorithm for cases for which this fails or the user wants to provide his own hyphenation. A hyphenatedword is a vector of alternating String's and Hyphen instances

addPattern

void addPattern(String pattern,
                String values)
Add hyphenation patterns.

Parameters:
pattern - the pattern
values - interletter values expressed as a string of digit characters.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PatternParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.compound.hyphenation
Class PatternParser

java.lang.Object
    extended by  org.xml.sax.helpers.DefaultHandler
        extended by  org.apache.lucene.analysis.compound.hyphenation.PatternParser
All Implemented Interfaces:
PatternConsumer, ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class PatternParser
extends DefaultHandler
implements PatternConsumer

A SAX document handler to read and parse hyphenation patterns from a XML file. This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.

Constructor Summary
PatternParser()
PatternParser(PatternConsumer consumer)
Method Summary
void | addClass(String c) Add a character class.
void | addException(String w, ArrayList<Object> e) Add a hyphenation exception.
void | addPattern(String p, String v) Add hyphenation patterns.
void | characters(char[] ch, int start, int length)
void | endElement(String uri, String local, String raw)
protected String | getExceptionWord(ArrayList<?> ex)
protected static String | getInterletterValues(String pat)
protected static String | getPattern(String word)
static void | main(String[] args)
protected ArrayList<Object> | normalizeException(ArrayList<?> ex)
void | parse(File file) Parses a hyphenation pattern file.
void | parse(InputSource source) Parses a hyphenation pattern file.
void | parse(String filename) Parses a hyphenation pattern file.
protected String | readToken(StringBuffer chars)
InputSource | resolveEntity(String publicId, String systemId)
void | setConsumer(PatternConsumer consumer)
void | startElement(String uri, String local, String raw, Attributes attrs)
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PatternParser

public PatternParser()
              throws HyphenationException
Throws:
HyphenationException

PatternParser

public PatternParser(PatternConsumer consumer)
              throws HyphenationException
Throws:
HyphenationException
Method Detail

setConsumer

public void setConsumer(PatternConsumer consumer)

parse

public void parse(String filename)
           throws HyphenationException
Parses a hyphenation pattern file.

Parameters:
filename - the filename
Throws:
HyphenationException - In case of an exception while parsing

parse

public void parse(File file)
           throws HyphenationException
Parses a hyphenation pattern file.

Parameters:
file - the pattern file
Throws:
HyphenationException - In case of an exception while parsing

parse

public void parse(InputSource source)
           throws HyphenationException
Parses a hyphenation pattern file.

Parameters:
source - the InputSource for the file
Throws:
HyphenationException - In case of an exception while parsing

readToken

protected String readToken(StringBuffer chars)

getPattern

protected static String getPattern(String word)

normalizeException

protected ArrayList<Object> normalizeException(ArrayList<?> ex)

getExceptionWord

protected String getExceptionWord(ArrayList<?> ex)

getInterletterValues

protected static String getInterletterValues(String pat)

resolveEntity

public InputSource resolveEntity(String publicId,
                                 String systemId)
Specified by:
resolveEntity in interface EntityResolver
Overrides:
resolveEntity in class DefaultHandler

startElement

public void startElement(String uri,
                         String local,
                         String raw,
                         Attributes attrs)
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
See Also:
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)

endElement

public void endElement(String uri,
                       String local,
                       String raw)
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
See Also:
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)

characters

public void characters(char[] ch,
                       int start,
                       int length)
Specified by:
characters in interface ContentHandler
Overrides:
characters in class DefaultHandler
See Also:
ContentHandler.characters(char[], int, int)

addClass

public void addClass(String c)
Description copied from interface: PatternConsumer
Add a character class. A character class defines characters that are considered equivalent for the purpose of hyphenation (e.g. "aA"). It usually means to ignore case.

Specified by:
addClass in interface PatternConsumer
Parameters:
c - character group

addException

public void addException(String w,
                         ArrayList<Object> e)
Description copied from interface: PatternConsumer
Add a hyphenation exception. An exception replaces the result obtained by the algorithm for cases for which this fails or the user wants to provide his own hyphenation. A hyphenatedword is a vector of alternating String's and Hyphen instances

Specified by:
addException in interface PatternConsumer

addPattern

public void addPattern(String p,
                       String v)
Description copied from interface: PatternConsumer
Add hyphenation patterns.

Specified by:
addPattern in interface PatternConsumer
Parameters:
p - the pattern
v - interletter values expressed as a string of digit characters.

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TernaryTree

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.compound.hyphenation
Class TernaryTree

java.lang.Object
    extended by  org.apache.lucene.analysis.compound.hyphenation.TernaryTree
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
HyphenationTree
public class TernaryTree
extends Object
implements Cloneable, Serializable

Ternary Search Tree.

A ternary search tree is a hybrid between a binary tree and a digital search tree (trie). Keys are limited to strings. A data value of type char is stored in each leaf node. It can be used as an index (or pointer) to the data. Branches that only contain one key are compressed to one node by storing a pointer to the trailer substring of the key. This class is intended to serve as base class or helper class to implement Dictionary collections or the like. Ternary trees have some nice properties as the following: the tree can be traversed in sorted order, partial matches (wildcard) can be implemented, retrieval of all keys within a given distance from the target, etc. The storage requirements are higher than a binary tree but a lot less than a trie. Performance is comparable with a hash table, sometimes it outperforms a hash function (most of the time can determine a miss faster than a hash).

The main purpose of this java port is to serve as a base for implementing TeX's hyphenation algorithm (see The TeXBook, appendix H). Each language requires from 5000 to 15000 hyphenation patterns which will be keys in this tree. The strings patterns are usually small (from 2 to 5 characters), but each char in the tree is stored in a node. Thus memory usage is the main concern. We will sacrifice 'elegance' to keep memory requirements to the minimum. Using java's char type as pointer (yes, I know pointer it is a forbidden word in java) we can keep the size of the node to be just 8 bytes (3 pointers and the data char). This gives room for about 65000 nodes. In my tests the english patterns took 7694 nodes and the german patterns 10055 nodes, so I think we are safe.

All said, this is a map with strings as keys and char as value. Pretty limited!. It can be extended to a general map by using the string representation of an object and using the char value as an index to an array that contains the object values.

This class has been taken from the Apache FOP project (http://xmlgraphics.apache.org/fop/). They have been slightly modified.

See Also:
Serialized Form

Nested Class Summary
 class TernaryTree.Iterator
Field Summary
protected static int | BLOCK_SIZE
protected char[] | eq Pointer to equal branch and to data when this node is a string terminator.
protected char | freenode
protected char[] | hi Pointer to high branch.
protected CharVector | kv This vector holds the trailing of the keys when the branch is compressed.
protected int | length
protected char[] | lo Pointer to low branch and to rest of the key when it is stored directly in this node, we don't have unions in java!
protected char | root
protected char[] | sc The character stored in this node: splitchar.
Method Summary
void | balance() Balance the tree for best search performance
Object | clone()
int | find(char[] key, int start)
int | find(String key)
protected void | init()
void | insert(char[] key, int start, char val)
void | insert(String key, char val) Branches are initially compressed, needing one node per key plus the size of the string key.
protected void | insertBalanced(String[] k, char[] v, int offset, int n) Recursively insert the median first and then the median of the lower and upper halves, and so on in order to get a balanced tree.
Enumeration<String> | keys()
boolean | knows(String key)
static void | main(String[] args)
void | printStats()
int | size()
static int | strcmp(char[] a, int startA, char[] b, int startB) Compares 2 null terminated char arrays
static int | strcmp(String str, char[] a, int start) Compares a string with null terminated char array
static void | strcpy(char[] dst, int di, char[] src, int si)
static int | strlen(char[] a)
static int | strlen(char[] a, int start)
void | trimToSize() Each node stores a character (splitchar) which is part of some key(s).
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

lo

protected char[] lo
Pointer to low branch and to rest of the key when it is stored directly in this node, we don't have unions in java!

hi

protected char[] hi
Pointer to high branch.

eq

protected char[] eq
Pointer to equal branch and to data when this node is a string terminator.

sc

protected char[] sc

The character stored in this node: splitchar. Two special values are reserved:

  • 0x0000 as string terminator
  • 0xFFFF to indicate that the branch starting at this node is compressed

This shouldn't be a problem if we give the usual semantics to strings since 0xFFFF is guaranteed not to be an Unicode character.

kv

protected CharVector kv
This vector holds the trailing of the keys when the branch is compressed.

root

protected char root

freenode

protected char freenode

length

protected int length

BLOCK_SIZE

protected static final int BLOCK_SIZE
See Also:
Constant Field Values
Method Detail

init

protected void init()

insert

public void insert(String key,
                   char val)
Branches are initially compressed, needing one node per key plus the size of the string key. They are decompressed as needed when another key with same prefix is inserted. This saves a lot of space, specially for long keys.

insert

public void insert(char[] key,
                   int start,
                   char val)

strcmp

public static int strcmp(char[] a,
                         int startA,
                         char[] b,
                         int startB)
Compares 2 null terminated char arrays

strcmp

public static int strcmp(String str,
                         char[] a,
                         int start)
Compares a string with null terminated char array

strcpy

public static void strcpy(char[] dst,
                          int di,
                          char[] src,
                          int si)

strlen

public static int strlen(char[] a,
                         int start)

strlen

public static int strlen(char[] a)

find

public int find(String key)

find

public int find(char[] key,
                int start)

knows

public boolean knows(String key)

size

public int size()

clone

public Object clone()
Overrides:
clone in class Object

insertBalanced

protected void insertBalanced(String[] k,
                              char[] v,
                              int offset,
                              int n)
Recursively insert the median first and then the median of the lower and upper halves, and so on in order to get a balanced tree. The array of keys is assumed to be sorted in ascending order.

balance

public void balance()
Balance the tree for best search performance

trimToSize

public void trimToSize()
Each node stores a character (splitchar) which is part of some key(s). In a compressed branch (one that only contain a single string key) the trailer of the key which is not already in nodes is stored externally in the kv array. As items are inserted, key substrings decrease. Some substrings may completely disappear when the whole branch is totally decompressed. The tree is traversed to find the key substrings actually used. In addition, duplicate substrings are removed using a map (implemented with a TernaryTree!).

keys

public Enumeration<String> keys()

printStats

public void printStats()

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TernaryTree.Iterator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.compound.hyphenation
Class TernaryTree.Iterator

java.lang.Object
    extended by  org.apache.lucene.analysis.compound.hyphenation.TernaryTree.Iterator
All Implemented Interfaces:
Enumeration<String>
Enclosing class:
TernaryTree
public class TernaryTree.Iterator
extends Object
implements Enumeration<String>

Constructor Summary
TernaryTree.Iterator()
Method Summary
char | getValue()
boolean | hasMoreElements()
String | nextElement()
void | rewind()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TernaryTree.Iterator

public TernaryTree.Iterator()
Method Detail

rewind

public void rewind()

nextElement

public String nextElement()
Specified by:
nextElement in interface Enumeration<String>

getValue

public char getValue()

hasMoreElements

public boolean hasMoreElements()
Specified by:
hasMoreElements in interface Enumeration<String>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.compound.hyphenation.ByteVector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.compound.hyphenation.ByteVector

Packages that use ByteVector
org.apache.lucene.analysis.compound.hyphenation The code for the compound word hyphenation is taken from the Apache FOP project.

Uses of ByteVector in org.apache.lucene.analysis.compound.hyphenation

Fields in org.apache.lucene.analysis.compound.hyphenation declared as ByteVector
protected  ByteVector HyphenationTree.vspace
value space: stores the interletter values

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.compound.hyphenation.CharVector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.compound.hyphenation.CharVector

Packages that use CharVector
org.apache.lucene.analysis.compound.hyphenation The code for the compound word hyphenation is taken from the Apache FOP project.

Uses of CharVector in org.apache.lucene.analysis.compound.hyphenation

Fields in org.apache.lucene.analysis.compound.hyphenation declared as CharVector
protected  CharVector TernaryTree.kv
This vector holds the trailing of the keys when the branch is compressed.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.compound.hyphenation.Hyphen

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.compound.hyphenation.Hyphen

No usage of org.apache.lucene.analysis.compound.hyphenation.Hyphen

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.compound.hyphenation.Hyphenation

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.compound.hyphenation.Hyphenation

Packages that use Hyphenation
org.apache.lucene.analysis.compound.hyphenation The code for the compound word hyphenation is taken from the Apache FOP project.

Uses of Hyphenation in org.apache.lucene.analysis.compound.hyphenation

Methods in org.apache.lucene.analysis.compound.hyphenation that return Hyphenation
Hyphenation | HyphenationTree.hyphenate(char[] w, int offset, int len, int remainCharCount, int pushCharCount) Hyphenate word and return an array of hyphenation points.
Hyphenation | HyphenationTree.hyphenate(String word, int remainCharCount, int pushCharCount) Hyphenate word and return a Hyphenation object.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.compound.hyphenation.HyphenationException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.compound.hyphenation.HyphenationException

Packages that use HyphenationException
org.apache.lucene.analysis.compound.hyphenation The code for the compound word hyphenation is taken from the Apache FOP project.

Uses of HyphenationException in org.apache.lucene.analysis.compound.hyphenation

Methods in org.apache.lucene.analysis.compound.hyphenation that throw HyphenationException
void | HyphenationTree.loadPatterns(File f) Read hyphenation patterns from an XML file.
void | HyphenationTree.loadPatterns(InputSource source) Read hyphenation patterns from an XML file.
void | PatternParser.parse(File file) Parses a hyphenation pattern file.
void | PatternParser.parse(InputSource source) Parses a hyphenation pattern file.
void | PatternParser.parse(String filename) Parses a hyphenation pattern file.

Constructors in org.apache.lucene.analysis.compound.hyphenation that throw HyphenationException
PatternParser()
PatternParser(PatternConsumer consumer)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.compound.hyphenation.HyphenationTree

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.compound.hyphenation.HyphenationTree

Packages that use HyphenationTree
org.apache.lucene.analysis.compound A filter that decomposes compound words you find in many Germanic languages into the word parts.

Uses of HyphenationTree in org.apache.lucene.analysis.compound

Methods in org.apache.lucene.analysis.compound that return HyphenationTree
static HyphenationTree HyphenationCompoundWordTokenFilter.getHyphenationTree(File hyphenationFile)
Create a hyphenator tree
static HyphenationTree HyphenationCompoundWordTokenFilter.getHyphenationTree(InputSource hyphenationSource)
Create a hyphenator tree
static HyphenationTree HyphenationCompoundWordTokenFilter.getHyphenationTree(Reader hyphenationReader)
Deprecated. Don't use Readers with fixed charset to load XML files, unless programatically created. Use HyphenationCompoundWordTokenFilter.getHyphenationTree(InputSource) instead, where you can supply default charset and input stream, if you like.
static HyphenationTree HyphenationCompoundWordTokenFilter.getHyphenationTree(String hyphenationFilename)
Create a hyphenator tree

Constructors in org.apache.lucene.analysis.compound with parameters of type HyphenationTree
HyphenationCompoundWordTokenFilter(TokenStream input, HyphenationTree hyphenator, Set<?> dictionary)
Deprecated. use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set) instead.
HyphenationCompoundWordTokenFilter(TokenStream input, HyphenationTree hyphenator, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, Set, int, int, int, boolean) instead.
HyphenationCompoundWordTokenFilter(TokenStream input, HyphenationTree hyphenator, String[] dictionary)
Deprecated. use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[]) instead.
HyphenationCompoundWordTokenFilter(TokenStream input, HyphenationTree hyphenator, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. use HyphenationCompoundWordTokenFilter.HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, String[], int, int, int, boolean) instead.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator)
Create a HyphenationCompoundWordTokenFilter with no dictionary.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, int minWordSize, int minSubwordSize, int maxSubwordSize)
Create a HyphenationCompoundWordTokenFilter with no dictionary.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, Set<?> dictionary)
Creates a new HyphenationCompoundWordTokenFilter instance.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Creates a new HyphenationCompoundWordTokenFilter instance.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, String[] dictionary)
Deprecated. Use the constructors taking Set
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. Use the constructors taking Set

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.compound.hyphenation.PatternConsumer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.compound.hyphenation.PatternConsumer

Packages that use PatternConsumer
org.apache.lucene.analysis.compound.hyphenation The code for the compound word hyphenation is taken from the Apache FOP project.

Uses of PatternConsumer in org.apache.lucene.analysis.compound.hyphenation

Classes in org.apache.lucene.analysis.compound.hyphenation that implement PatternConsumer
class | HyphenationTree This tree structure stores the hyphenation patterns in an efficient way for fast lookup.
class | PatternParser A SAX document handler to read and parse hyphenation patterns from a XML file.

Methods in org.apache.lucene.analysis.compound.hyphenation with parameters of type PatternConsumer
 void PatternParser.setConsumer(PatternConsumer consumer)

Constructors in org.apache.lucene.analysis.compound.hyphenation with parameters of type PatternConsumer
PatternParser(PatternConsumer consumer)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.compound.hyphenation.PatternParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.compound.hyphenation.PatternParser

No usage of org.apache.lucene.analysis.compound.hyphenation.PatternParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.compound.hyphenation.TernaryTree

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.compound.hyphenation.TernaryTree

Packages that use TernaryTree
org.apache.lucene.analysis.compound.hyphenation The code for the compound word hyphenation is taken from the Apache FOP project.

Uses of TernaryTree in org.apache.lucene.analysis.compound.hyphenation

Subclasses of TernaryTree in org.apache.lucene.analysis.compound.hyphenation
 class HyphenationTree
This tree structure stores the hyphenation patterns in an efficient way for fast lookup.

Fields in org.apache.lucene.analysis.compound.hyphenation declared as TernaryTree
protected  TernaryTree HyphenationTree.classmap
This map stores the character classes

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.compound.hyphenation.TernaryTree.Iterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.compound.hyphenation.TernaryTree.Iterator

No usage of org.apache.lucene.analysis.compound.hyphenation.TernaryTree.Iterator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CzechAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cz
Class CzechAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.cz.CzechAnalyzer
All Implemented Interfaces:
Closeable
public final class CzechAnalyzer
extends ReusableAnalyzerBase

Analyzer for Czech language.

Supports an external list of stopwords (words that will not be indexed at all). A default set of stopwords is used unless an alternative list is specified.

You must specify the required Version compatibility when creating CzechAnalyzer:

  • As of 3.1, words are stemmed with CzechStemFilter
  • As of 2.9, StopFilter preserves position increments
  • As of 2.4, Tokens incorrectly identified as acronyms are corrected (see LUCENE-1068)

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String[] | CZECH_STOP_WORDS Deprecated. use getDefaultStopSet() instead
static String | DEFAULT_STOPWORD_FILE File containing default Czech stopwords.
Constructor Summary
CzechAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (getDefaultStopSet()).
CzechAnalyzer(Version matchVersion, File stopwords)
Deprecated. use CzechAnalyzer(Version, Set) instead
CzechAnalyzer(Version matchVersion, HashSet<?> stopwords)
Deprecated. use CzechAnalyzer(Version, Set) instead
CzechAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
CzechAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionTable)
Builds an analyzer with the given stop words and a set of work to be excluded from the CzechStemFilter.
CzechAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use CzechAnalyzer(Version, Set) instead
Method Summary
protected  ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
static Set<?> getDefaultStopSet()
Returns a set of default Czech-stopwords
 void loadStopWords(InputStream wordfile, String encoding)
Deprecated. use WordlistLoader.getWordSet(Reader, String, Version) and CzechAnalyzer(Version, Set) instead
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

CZECH_STOP_WORDS

@Deprecated
public static final String[] CZECH_STOP_WORDS
Deprecated. use getDefaultStopSet() instead
List of typical stopwords.

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Czech stopwords.

See Also:
Constant Field Values
Constructor Detail

CzechAnalyzer

public CzechAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (getDefaultStopSet()).

Parameters:
matchVersion - Lucene version to match See above

CzechAnalyzer

public CzechAnalyzer(Version matchVersion,
                     Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - Lucene version to match See above
stopwords - a stopword set

CzechAnalyzer

public CzechAnalyzer(Version matchVersion,
                     Set<?> stopwords,
                     Set<?> stemExclusionTable)
Builds an analyzer with the given stop words and a set of work to be excluded from the CzechStemFilter.

Parameters:
matchVersion - Lucene version to match See above
stopwords - a stopword set
stemExclusionTable - a stemming exclusion set

CzechAnalyzer

@Deprecated
public CzechAnalyzer(Version matchVersion,
                                String... stopwords)
Deprecated. use CzechAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

Parameters:
matchVersion - Lucene version to match See above
stopwords - a stopword set

CzechAnalyzer

@Deprecated
public CzechAnalyzer(Version matchVersion,
                                HashSet<?> stopwords)
Deprecated. use CzechAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

Parameters:
matchVersion - Lucene version to match See above
stopwords - a stopword set

CzechAnalyzer

@Deprecated
public CzechAnalyzer(Version matchVersion,
                                File stopwords)
              throws IOException
Deprecated. use CzechAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

Parameters:
matchVersion - Lucene version to match See above
stopwords - a file containing stopwords
Throws:
IOException
Method Detail

getDefaultStopSet

public static final Set<?> getDefaultStopSet()
Returns a set of default Czech-stopwords

Returns:
a set of default Czech-stopwords

loadStopWords

@Deprecated
public void loadStopWords(InputStream wordfile,
                                     String encoding)
Deprecated. use WordlistLoader.getWordSet(Reader, String, Version) and CzechAnalyzer(Version, Set) instead

Loads stopwords hash from resource stream (file, database...).

Parameters:
wordfile - File containing the wordlist
encoding - Encoding used (win-1250, iso-8859-2, ...), null for default system encoding

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
ReusableAnalyzerBase.TokenStreamComponents built from a StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , and CzechStemFilter (only if version is >= LUCENE_31). If a version is >= LUCENE_31 and a stem exclusion set is provided via CzechAnalyzer(Version, Set, Set) a KeywordMarkerFilter is added before CzechStemFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CzechStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cz
Class CzechStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.cz.CzechStemFilter
All Implemented Interfaces:
Closeable
public final class CzechStemFilter
extends TokenFilter

A TokenFilter that applies CzechStemmer to stem Czech words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

NOTE: Input is expected to be in lowercase, but with diacritical marks

See Also:
KeywordMarkerFilter

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
CzechStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CzechStemFilter

public CzechStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CzechStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.cz
Class CzechStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.cz.CzechStemmer

public class CzechStemmer
extends Object

Light Stemmer for Czech.

Implements the algorithm described in: Indexing and stemming approaches for the Czech language http://portal.acm.org/citation.cfm?id=1598600

Constructor Summary
CzechStemmer()
Method Summary
 int stem(char[] s, int len)
Stem an input buffer of Czech text.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CzechStemmer

public CzechStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Stem an input buffer of Czech text.

Parameters:
s - input buffer
len - length of input buffer
Returns:
length of input buffer after normalization

NOTE: Input is expected to be in lowercase, but with diacritical marks

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.cz
Classes
CzechAnalyzer
CzechStemFilter
CzechStemmer


org.apache.lucene.analysis.cz

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.cz

Analyzer for Czech.

See:
Description

Class Summary
CzechAnalyzer | Analyzer for Czech language.
CzechStemFilter | A TokenFilter that applies CzechStemmer to stem Czech words.
CzechStemmer | Light Stemmer for Czech.

Package org.apache.lucene.analysis.cz Description

Analyzer for Czech.


org.apache.lucene.analysis.cz Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.cz

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.cz.CzechAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.cz.CzechStemFilter
    • org.apache.lucene.analysis.cz.CzechStemmer


Uses of Package org.apache.lucene.analysis.cz

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.cz

No usage of org.apache.lucene.analysis.cz

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cz.CzechAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cz.CzechAnalyzer

No usage of org.apache.lucene.analysis.cz.CzechAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cz.CzechStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cz.CzechStemFilter

No usage of org.apache.lucene.analysis.cz.CzechStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.cz.CzechStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.cz.CzechStemmer

No usage of org.apache.lucene.analysis.cz.CzechStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


DanishAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.da
Class DanishAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.da.DanishAnalyzer
All Implemented Interfaces:
Closeable
public final class DanishAnalyzer
extends StopwordAnalyzerBase

Analyzer for Danish.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Danish stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
DanishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
DanishAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
DanishAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Danish stopwords.

See Also:
Constant Field Values
Constructor Detail

DanishAnalyzer

public DanishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

DanishAnalyzer

public DanishAnalyzer(Version matchVersion,
                      Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

DanishAnalyzer

public DanishAnalyzer(Version matchVersion,
                      Set<?> stopwords,
                      Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and SnowballFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.da
Classes
DanishAnalyzer


org.apache.lucene.analysis.da

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.da

Analyzer for Danish.

See:
Description

Class Summary
DanishAnalyzer Analyzer for Danish.

Package org.apache.lucene.analysis.da Description

Analyzer for Danish.


org.apache.lucene.analysis.da Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.da

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.da.DanishAnalyzer


Uses of Package org.apache.lucene.analysis.da

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.da

No usage of org.apache.lucene.analysis.da

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.da.DanishAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.da.DanishAnalyzer

No usage of org.apache.lucene.analysis.da.DanishAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


GermanAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.de
Class GermanAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.de.GermanAnalyzer
All Implemented Interfaces:
Closeable
public final class GermanAnalyzer
extends StopwordAnalyzerBase

Analyzer for German language.

Supports an external list of stopwords (words that will not be indexed at all) and an external list of exclusions (word that will not be stemmed, but indexed). A default set of stopwords is used unless an alternative list is specified, but the exclusion list is empty by default.

You must specify the required Version compatibility when creating GermanAnalyzer:

  • As of 3.6, GermanLightStemFilter is used for less aggressive stemming.
  • As of 3.1, Snowball stemming is done with SnowballFilter, and Snowball stopwords are used by default.
  • As of 2.9, StopFilter preserves position increments

NOTE: This class uses the same Version dependent settings as StandardAnalyzer.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String | DEFAULT_STOPWORD_FILE File containing default German stopwords.
static String[] | GERMAN_STOP_WORDS Deprecated. use getDefaultStopSet() instead
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
GermanAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: getDefaultStopSet().
GermanAnalyzer(Version matchVersion, File stopwords)
Deprecated. use GermanAnalyzer(Version, Set)
GermanAnalyzer(Version matchVersion, Map<?,?> stopwords)
Deprecated. use GermanAnalyzer(Version, Set)
GermanAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
GermanAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words
GermanAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use GermanAnalyzer(Version, Set)
Method Summary
protected  ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
static Set<?> getDefaultStopSet()
Returns a set of default German-stopwords
 void setStemExclusionTable(File exclusionlist)
Deprecated. use GermanAnalyzer(Version, Set, Set) instead
 void setStemExclusionTable(Map<?,?> exclusionlist)
Deprecated. use GermanAnalyzer(Version, Set, Set) instead
 void setStemExclusionTable(String[] exclusionlist)
Deprecated. use GermanAnalyzer(Version, Set, Set) instead
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

GERMAN_STOP_WORDS

@Deprecated
public static final String[] GERMAN_STOP_WORDS
Deprecated. use getDefaultStopSet() instead
List of typical german stopwords.

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default German stopwords.

See Also:
Constant Field Values
Constructor Detail

GermanAnalyzer

public GermanAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: getDefaultStopSet().

GermanAnalyzer

public GermanAnalyzer(Version matchVersion,
                      Set<?> stopwords)
Builds an analyzer with the given stop words

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

GermanAnalyzer

public GermanAnalyzer(Version matchVersion,
                      Set<?> stopwords,
                      Set<?> stemExclusionSet)
Builds an analyzer with the given stop words

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a stemming exclusion set

GermanAnalyzer

@Deprecated
public GermanAnalyzer(Version matchVersion,
                                 String... stopwords)
Deprecated. use GermanAnalyzer(Version, Set)

Builds an analyzer with the given stop words.

GermanAnalyzer

@Deprecated
public GermanAnalyzer(Version matchVersion,
                                 Map<?,?> stopwords)
Deprecated. use GermanAnalyzer(Version, Set)

Builds an analyzer with the given stop words.

GermanAnalyzer

@Deprecated
public GermanAnalyzer(Version matchVersion,
                                 File stopwords)
               throws IOException
Deprecated. use GermanAnalyzer(Version, Set)

Builds an analyzer with the given stop words.

Throws:
IOException
Method Detail

getDefaultStopSet

public static final Set<?> getDefaultStopSet()
Returns a set of default German-stopwords

Returns:
a set of default German-stopwords

setStemExclusionTable

@Deprecated
public void setStemExclusionTable(String[] exclusionlist)
Deprecated. use GermanAnalyzer(Version, Set, Set) instead

Builds an exclusionlist from an array of Strings.

setStemExclusionTable

@Deprecated
public void setStemExclusionTable(Map<?,?> exclusionlist)
Deprecated. use GermanAnalyzer(Version, Set, Set) instead

Builds an exclusionlist from a Map

setStemExclusionTable

@Deprecated
public void setStemExclusionTable(File exclusionlist)
                           throws IOException
Deprecated. use GermanAnalyzer(Version, Set, Set) instead

Builds an exclusionlist from the words contained in the given file.

Throws:
IOException

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
ReusableAnalyzerBase.TokenStreamComponents built from a StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided, GermanNormalizationFilter and GermanLightStemFilter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


GermanLightStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.de
Class GermanLightStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.de.GermanLightStemFilter
All Implemented Interfaces:
Closeable
public final class GermanLightStemFilter
extends TokenFilter

A TokenFilter that applies GermanLightStemmer to stem German words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
GermanLightStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

GermanLightStemFilter

public GermanLightStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GermanLightStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.de
Class GermanLightStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.de.GermanLightStemmer

public class GermanLightStemmer
extends Object

Light Stemmer for German.

This stemmer implements the "UniNE" algorithm in: Light Stemming Approaches for the French, Portuguese, German and Hungarian Languages Jacques Savoy

Constructor Summary
GermanLightStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GermanLightStemmer

public GermanLightStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GermanMinimalStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.de
Class GermanMinimalStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.de.GermanMinimalStemFilter
All Implemented Interfaces:
Closeable
public final class GermanMinimalStemFilter
extends TokenFilter

A TokenFilter that applies GermanMinimalStemmer to stem German words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
GermanMinimalStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

GermanMinimalStemFilter

public GermanMinimalStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GermanMinimalStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.de
Class GermanMinimalStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.de.GermanMinimalStemmer

public class GermanMinimalStemmer
extends Object

Minimal Stemmer for German.

This stemmer implements the following algorithm: Morphologie et recherche d'information Jacques Savoy.

Constructor Summary
GermanMinimalStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GermanMinimalStemmer

public GermanMinimalStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GermanNormalizationFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.de
Class GermanNormalizationFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.de.GermanNormalizationFilter
All Implemented Interfaces:
Closeable
public final class GermanNormalizationFilter
extends TokenFilter

Normalizes German characters according to the heuristics of the German2 snowball algorithm. It allows for the fact that ?, ? and ü are sometimes written as ae, oe and ue.

  • '?' is replaced by 'ss'
  • '?', '?', 'ü' are replaced by 'a', 'o', 'u', respectively.
  • 'ae' and 'oe' are replaced by 'a', and 'o', respectively.
  • 'ue' is replaced by 'u', when not following a vowel or q.

This is useful if you want this normalization without using the German2 stemmer, or perhaps no stemming at all.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
GermanNormalizationFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

GermanNormalizationFilter

public GermanNormalizationFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GermanStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.de
Class GermanStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.de.GermanStemFilter
All Implemented Interfaces:
Closeable
public final class GermanStemFilter
extends TokenFilter

A TokenFilter that stems German words.

It supports a table of words that should not be stemmed at all. The stemmer used can be changed at runtime after the filter object is created (as long as it is a GermanStemmer).

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

See Also:
KeywordMarkerFilter

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
GermanStemFilter(TokenStream in)
Creates a GermanStemFilter instance
GermanStemFilter(TokenStream in, Set<?> exclusionSet)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | setExclusionSet(Set<?> exclusionSet) Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
void | setStemmer(GermanStemmer stemmer) Set a alternative/custom GermanStemmer for this filter.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

GermanStemFilter

public GermanStemFilter(TokenStream in)
Creates a GermanStemFilter instance

Parameters:
in - the source TokenStream

GermanStemFilter

@Deprecated
public GermanStemFilter(TokenStream in,
                                   Set<?> exclusionSet)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.

Builds a GermanStemFilter that uses an exclusion table.

Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
Returns true for next token in the stream, or false at EOS
Throws:
IOException

setStemmer

public void setStemmer(GermanStemmer stemmer)
Set a alternative/custom GermanStemmer for this filter.

setExclusionSet

@Deprecated
public void setExclusionSet(Set<?> exclusionSet)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.

Set an alternative exclusion list for this filter.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GermanStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.de
Class GermanStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.de.GermanStemmer

public class GermanStemmer
extends Object

A stemmer for German words.

The algorithm is based on the report "A Fast and Simple Stemming Algorithm for German Words" by Jörg Caumanns (joerg.caumanns at isst.fhg.de).

Constructor Summary
GermanStemmer()
Method Summary
protected  String stem(String term)
Stemms the given term to an unique discriminator.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GermanStemmer

public GermanStemmer()
Method Detail

stem

protected String stem(String term)
Stemms the given term to an unique discriminator.

Parameters:
term - The term that should be stemmed.
Returns:
Discriminator for term
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.de
Classes
GermanAnalyzer
GermanLightStemFilter
GermanLightStemmer
GermanMinimalStemFilter
GermanMinimalStemmer
GermanNormalizationFilter
GermanStemFilter
GermanStemmer


org.apache.lucene.analysis.de

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.de

Analyzer for German.

See:
Description

Class Summary
GermanAnalyzer | Analyzer for German language.
GermanLightStemFilter | A TokenFilter that applies GermanLightStemmer to stem German words.
GermanLightStemmer | Light Stemmer for German.
GermanMinimalStemFilter | A TokenFilter that applies GermanMinimalStemmer to stem German words.
GermanMinimalStemmer | Minimal Stemmer for German.
GermanNormalizationFilter | Normalizes German characters according to the heuristics of the German2 snowball algorithm.
GermanStemFilter | A TokenFilter that stems German words.
GermanStemmer | A stemmer for German words.

Package org.apache.lucene.analysis.de Description

Analyzer for German.


org.apache.lucene.analysis.de Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.de

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.de.GermanAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.de.GermanLightStemFilter
          • org.apache.lucene.analysis.de.GermanMinimalStemFilter
          • org.apache.lucene.analysis.de.GermanNormalizationFilter
          • org.apache.lucene.analysis.de.GermanStemFilter
    • org.apache.lucene.analysis.de.GermanLightStemmer
    • org.apache.lucene.analysis.de.GermanMinimalStemmer
    • org.apache.lucene.analysis.de.GermanStemmer


Uses of Package org.apache.lucene.analysis.de

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.de

Packages that use org.apache.lucene.analysis.de
org.apache.lucene.analysis.de Analyzer for German.

Classes in org.apache.lucene.analysis.de used by org.apache.lucene.analysis.de
GermanStemmer
A stemmer for German words.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.de.GermanAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.de.GermanAnalyzer

No usage of org.apache.lucene.analysis.de.GermanAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.de.GermanLightStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.de.GermanLightStemFilter

No usage of org.apache.lucene.analysis.de.GermanLightStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.de.GermanLightStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.de.GermanLightStemmer

No usage of org.apache.lucene.analysis.de.GermanLightStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.de.GermanMinimalStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.de.GermanMinimalStemFilter

No usage of org.apache.lucene.analysis.de.GermanMinimalStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.de.GermanMinimalStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.de.GermanMinimalStemmer

No usage of org.apache.lucene.analysis.de.GermanMinimalStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.de.GermanNormalizationFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.de.GermanNormalizationFilter

No usage of org.apache.lucene.analysis.de.GermanNormalizationFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.de.GermanStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.de.GermanStemFilter

No usage of org.apache.lucene.analysis.de.GermanStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.de.GermanStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.de.GermanStemmer

Packages that use GermanStemmer
org.apache.lucene.analysis.de Analyzer for German.

Uses of GermanStemmer in org.apache.lucene.analysis.de

Methods in org.apache.lucene.analysis.de with parameters of type GermanStemmer
 void GermanStemFilter.setStemmer(GermanStemmer stemmer)
Set a alternative/custom GermanStemmer for this filter.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


GreekAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.el
Class GreekAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.el.GreekAnalyzer
All Implemented Interfaces:
Closeable
public final class GreekAnalyzer
extends StopwordAnalyzerBase

Analyzer for the Greek language.

Supports an external list of stopwords (words that will not be indexed at all). A default set of stopwords is used unless an alternative list is specified.

You must specify the required Version compatibility when creating GreekAnalyzer:

  • As of 3.1, StandardFilter and GreekStemmer are used by default.
  • As of 2.9, StopFilter preserves position increments

NOTE: This class uses the same Version dependent settings as StandardAnalyzer.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Greek stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
GreekAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words.
GreekAnalyzer(Version matchVersion, Map<?,?> stopwords)
Deprecated. use GreekAnalyzer(Version, Set) instead
GreekAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
GreekAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use GreekAnalyzer(Version, Set) instead
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns a set of default Greek-stopwords
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Greek stopwords.

See Also:
Constant Field Values
Constructor Detail

GreekAnalyzer

public GreekAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words.

Parameters:
matchVersion - Lucene compatibility version, See above

GreekAnalyzer

public GreekAnalyzer(Version matchVersion,
                     Set<?> stopwords)
Builds an analyzer with the given stop words.

NOTE: The stopwords set should be pre-processed with the logic of GreekLowerCaseFilter for best results.

Parameters:
matchVersion - Lucene compatibility version, See above
stopwords - a stopword set

GreekAnalyzer

@Deprecated
public GreekAnalyzer(Version matchVersion,
                                String... stopwords)
Deprecated. use GreekAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

Parameters:
stopwords - Array of stopwords to use.

GreekAnalyzer

@Deprecated
public GreekAnalyzer(Version matchVersion,
                                Map<?,?> stopwords)
Deprecated. use GreekAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

Method Detail

getDefaultStopSet

public static final Set<?> getDefaultStopSet()
Returns a set of default Greek-stopwords

Returns:
a set of default Greek-stopwords

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
ReusableAnalyzerBase.TokenStreamComponents built from a StandardTokenizer filtered with GreekLowerCaseFilter, StandardFilter, StopFilter, and GreekStemFilter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


GreekLowerCaseFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.el
Class GreekLowerCaseFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.el.GreekLowerCaseFilter
All Implemented Interfaces:
Closeable
public final class GreekLowerCaseFilter
extends TokenFilter

Normalizes token text to lower case, removes some Greek diacritics, and standardizes final sigma to sigma.

You must specify the required Version compatibility when creating GreekLowerCaseFilter:

  • As of 3.1, supplementary characters are properly lowercased.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
GreekLowerCaseFilter(TokenStream in)
Deprecated. Use GreekLowerCaseFilter(Version, TokenStream) instead.
GreekLowerCaseFilter(Version matchVersion, TokenStream in)
Create a GreekLowerCaseFilter that normalizes Greek token text.
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

GreekLowerCaseFilter

@Deprecated
public GreekLowerCaseFilter(TokenStream in)
Deprecated. Use GreekLowerCaseFilter(Version, TokenStream) instead.

GreekLowerCaseFilter

public GreekLowerCaseFilter(Version matchVersion,
                            TokenStream in)
Create a GreekLowerCaseFilter that normalizes Greek token text.

Parameters:
matchVersion - Lucene compatibility version, See above
in - TokenStream to filter
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GreekStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.el
Class GreekStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.el.GreekStemFilter
All Implemented Interfaces:
Closeable
public final class GreekStemFilter
extends TokenFilter

A TokenFilter that applies GreekStemmer to stem Greek words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

NOTE: Input is expected to be casefolded for Greek (including folding of final sigma to sigma), and with diacritics removed. This can be achieved by using either GreekLowerCaseFilter or ICUFoldingFilter before GreekStemFilter.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
GreekStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

GreekStemFilter

public GreekStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GreekStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.el
Class GreekStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.el.GreekStemmer

public class GreekStemmer
extends Object

A stemmer for Greek words, according to: Development of a Stemmer for the Greek Language. Georgios Ntais

NOTE: Input is expected to be casefolded for Greek (including folding of final sigma to sigma), and with diacritics removed. This can be achieved with either GreekLowerCaseFilter or ICUFoldingFilter.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
GreekStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GreekStemmer

public GreekStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.el
Classes
GreekAnalyzer
GreekLowerCaseFilter
GreekStemFilter
GreekStemmer


org.apache.lucene.analysis.el

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.el

Analyzer for Greek.

See:
Description

Class Summary
GreekAnalyzer | Analyzer for the Greek language.
GreekLowerCaseFilter | Normalizes token text to lower case, removes some Greek diacritics, and standardizes final sigma to sigma.
GreekStemFilter | A TokenFilter that applies GreekStemmer to stem Greek words.
GreekStemmer | A stemmer for Greek words, according to: Development of a Stemmer for the Greek Language. Georgios Ntais

Package org.apache.lucene.analysis.el Description

Analyzer for Greek.


org.apache.lucene.analysis.el Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.el

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.el.GreekAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.el.GreekLowerCaseFilter
          • org.apache.lucene.analysis.el.GreekStemFilter
    • org.apache.lucene.analysis.el.GreekStemmer


Uses of Package org.apache.lucene.analysis.el

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.el

No usage of org.apache.lucene.analysis.el

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.el.GreekAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.el.GreekAnalyzer

No usage of org.apache.lucene.analysis.el.GreekAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.el.GreekLowerCaseFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.el.GreekLowerCaseFilter

No usage of org.apache.lucene.analysis.el.GreekLowerCaseFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.el.GreekStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.el.GreekStemFilter

No usage of org.apache.lucene.analysis.el.GreekStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.el.GreekStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.el.GreekStemmer

No usage of org.apache.lucene.analysis.el.GreekStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


EnglishAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.en
Class EnglishAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.en.EnglishAnalyzer
All Implemented Interfaces:
Closeable
public final class EnglishAnalyzer
extends StopwordAnalyzerBase

Analyzer for English.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
EnglishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: getDefaultStopSet().
EnglishAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
EnglishAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EnglishAnalyzer

public EnglishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: getDefaultStopSet().

EnglishAnalyzer

public EnglishAnalyzer(Version matchVersion,
                       Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

EnglishAnalyzer

public EnglishAnalyzer(Version matchVersion,
                       Set<?> stopwords,
                       Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and PorterStemFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


EnglishMinimalStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.en
Class EnglishMinimalStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.en.EnglishMinimalStemFilter
All Implemented Interfaces:
Closeable
public final class EnglishMinimalStemFilter
extends TokenFilter

A TokenFilter that applies EnglishMinimalStemmer to stem English words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
EnglishMinimalStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

EnglishMinimalStemFilter

public EnglishMinimalStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EnglishMinimalStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.en
Class EnglishMinimalStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.en.EnglishMinimalStemmer

public class EnglishMinimalStemmer
extends Object

Minimal plural stemmer for English.

This stemmer implements the "S-Stemmer" from How Effective Is Suffixing? Donna Harman.

Constructor Summary
EnglishMinimalStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EnglishMinimalStemmer

public EnglishMinimalStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EnglishPossessiveFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.en
Class EnglishPossessiveFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.en.EnglishPossessiveFilter
All Implemented Interfaces:
Closeable
public final class EnglishPossessiveFilter
extends TokenFilter

TokenFilter that removes possessives (trailing 's) from words.

You must specify the required Version compatibility when creating EnglishPossessiveFilter:

  • As of 3.6, U+2019 RIGHT SINGLE QUOTATION MARK and U+FF07 FULLWIDTH APOSTROPHE are also treated as quotation marks.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
EnglishPossessiveFilter(TokenStream input)
Deprecated. Use EnglishPossessiveFilter(Version, TokenStream) instead.
EnglishPossessiveFilter(Version version, TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

EnglishPossessiveFilter

@Deprecated
public EnglishPossessiveFilter(TokenStream input)
Deprecated. Use EnglishPossessiveFilter(Version, TokenStream) instead.

EnglishPossessiveFilter

public EnglishPossessiveFilter(Version version,
                               TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.en
Class KStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.en.KStemFilter
All Implemented Interfaces:
Closeable
public final class KStemFilter
extends TokenFilter

A high-performance kstem filter for english.

See "Viewing Morphology as an Inference Process" (Krovetz, R., Proceedings of the Sixteenth Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, 191-203, 1993).

All terms must already be lowercased for this filter to work correctly.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
KStemFilter(TokenStream in)
Method Summary
 boolean incrementToken()
Returns the next, stemmed, input Token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

KStemFilter

public KStemFilter(TokenStream in)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Returns the next, stemmed, input Token.

Specified by:
incrementToken in class TokenStream
Returns:
The stemed form of a token.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.en
Class KStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.en.KStemmer

public class KStemmer
extends Object

This class implements the Kstem algorithm

Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.en
Classes
EnglishAnalyzer
EnglishMinimalStemFilter
EnglishMinimalStemmer
EnglishPossessiveFilter
KStemFilter
KStemmer


org.apache.lucene.analysis.en

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.en

Analyzer for English.

See:
Description

Class Summary
EnglishAnalyzer | Analyzer for English.
EnglishMinimalStemFilter | A TokenFilter that applies EnglishMinimalStemmer to stem English words.
EnglishMinimalStemmer | Minimal plural stemmer for English.
EnglishPossessiveFilter | TokenFilter that removes possessives (trailing 's) from words.
KStemFilter | A high-performance kstem filter for english.
KStemmer | This class implements the Kstem algorithm

Package org.apache.lucene.analysis.en Description

Analyzer for English.


org.apache.lucene.analysis.en Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.en

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.en.EnglishAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.en.EnglishMinimalStemFilter
          • org.apache.lucene.analysis.en.EnglishPossessiveFilter
          • org.apache.lucene.analysis.en.KStemFilter
    • org.apache.lucene.analysis.en.EnglishMinimalStemmer
    • org.apache.lucene.analysis.en.KStemmer


Uses of Package org.apache.lucene.analysis.en

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.en

No usage of org.apache.lucene.analysis.en

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.en.EnglishAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.en.EnglishAnalyzer

No usage of org.apache.lucene.analysis.en.EnglishAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.en.EnglishMinimalStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.en.EnglishMinimalStemFilter

No usage of org.apache.lucene.analysis.en.EnglishMinimalStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.en.EnglishMinimalStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.en.EnglishMinimalStemmer

No usage of org.apache.lucene.analysis.en.EnglishMinimalStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.en.EnglishPossessiveFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.en.EnglishPossessiveFilter

No usage of org.apache.lucene.analysis.en.EnglishPossessiveFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.en.KStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.en.KStemFilter

No usage of org.apache.lucene.analysis.en.KStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.en.KStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.en.KStemmer

No usage of org.apache.lucene.analysis.en.KStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.es
Classes
SpanishAnalyzer
SpanishLightStemFilter
SpanishLightStemmer


org.apache.lucene.analysis.es

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.es

Analyzer for Spanish.

See:
Description

Class Summary
SpanishAnalyzer | Analyzer for Spanish.
SpanishLightStemFilter | A TokenFilter that applies SpanishLightStemmer to stem Spanish words.
SpanishLightStemmer | Light Stemmer for Spanish

Package org.apache.lucene.analysis.es Description

Analyzer for Spanish.


org.apache.lucene.analysis.es Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.es

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.es.SpanishAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.es.SpanishLightStemFilter
    • org.apache.lucene.analysis.es.SpanishLightStemmer


Uses of Package org.apache.lucene.analysis.es

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.es

No usage of org.apache.lucene.analysis.es

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SpanishAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.es
Class SpanishAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.es.SpanishAnalyzer
All Implemented Interfaces:
Closeable
public final class SpanishAnalyzer
extends StopwordAnalyzerBase

Analyzer for Spanish.

You must specify the required Version compatibility when creating SpanishAnalyzer:

  • As of 3.6, SpanishLightStemFilter is used for less aggressive stemming.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Spanish stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
SpanishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
SpanishAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
SpanishAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Spanish stopwords.

See Also:
Constant Field Values
Constructor Detail

SpanishAnalyzer

public SpanishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

SpanishAnalyzer

public SpanishAnalyzer(Version matchVersion,
                       Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

SpanishAnalyzer

public SpanishAnalyzer(Version matchVersion,
                       Set<?> stopwords,
                       Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and SpanishLightStemFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


SpanishLightStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.es
Class SpanishLightStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.es.SpanishLightStemFilter
All Implemented Interfaces:
Closeable
public final class SpanishLightStemFilter
extends TokenFilter

A TokenFilter that applies SpanishLightStemmer to stem Spanish words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
SpanishLightStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SpanishLightStemFilter

public SpanishLightStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanishLightStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.es
Class SpanishLightStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.es.SpanishLightStemmer

public class SpanishLightStemmer
extends Object

Light Stemmer for Spanish

This stemmer implements the algorithm described in: Report on CLEF-2001 Experiments Jacques Savoy

Constructor Summary
SpanishLightStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanishLightStemmer

public SpanishLightStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.es.SpanishAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.es.SpanishAnalyzer

No usage of org.apache.lucene.analysis.es.SpanishAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.es.SpanishLightStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.es.SpanishLightStemFilter

No usage of org.apache.lucene.analysis.es.SpanishLightStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.es.SpanishLightStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.es.SpanishLightStemmer

No usage of org.apache.lucene.analysis.es.SpanishLightStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


BasqueAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.eu
Class BasqueAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.eu.BasqueAnalyzer
All Implemented Interfaces:
Closeable
public final class BasqueAnalyzer
extends StopwordAnalyzerBase

Analyzer for Basque.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Basque stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
BasqueAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
BasqueAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
BasqueAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Basque stopwords.

See Also:
Constant Field Values
Constructor Detail

BasqueAnalyzer

public BasqueAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

BasqueAnalyzer

public BasqueAnalyzer(Version matchVersion,
                      Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

BasqueAnalyzer

public BasqueAnalyzer(Version matchVersion,
                      Set<?> stopwords,
                      Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and SnowballFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.eu
Classes
BasqueAnalyzer


org.apache.lucene.analysis.eu

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.eu

Analyzer for Basque.

See:
Description

Class Summary
BasqueAnalyzer Analyzer for Basque.

Package org.apache.lucene.analysis.eu Description

Analyzer for Basque.


org.apache.lucene.analysis.eu Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.eu

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.eu.BasqueAnalyzer


Uses of Package org.apache.lucene.analysis.eu

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.eu

No usage of org.apache.lucene.analysis.eu

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.eu.BasqueAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.eu.BasqueAnalyzer

No usage of org.apache.lucene.analysis.eu.BasqueAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.fa
Classes
PersianAnalyzer
PersianCharFilter
PersianNormalizationFilter
PersianNormalizer


org.apache.lucene.analysis.fa

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.fa

Analyzer for Persian.

See:
Description

Class Summary
PersianAnalyzer | Analyzer for Persian.
PersianCharFilter | CharFilter that replaces instances of Zero-width non-joiner with an ordinary space.
PersianNormalizationFilter | A TokenFilter that applies PersianNormalizer to normalize the orthography.
PersianNormalizer | Normalizer for Persian.

Package org.apache.lucene.analysis.fa Description

Analyzer for Persian.


org.apache.lucene.analysis.fa Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.fa

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.fa.PersianAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.fa.PersianNormalizationFilter
    • org.apache.lucene.analysis.fa.PersianNormalizer
    • java.io.Reader (implements java.io.Closeable, java.lang.Readable)
      • org.apache.lucene.analysis.CharStream
        • org.apache.lucene.analysis.CharFilter
          • org.apache.lucene.analysis.fa.PersianCharFilter


Uses of Package org.apache.lucene.analysis.fa

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.fa

No usage of org.apache.lucene.analysis.fa

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PersianAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.fa
Class PersianAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.fa.PersianAnalyzer
All Implemented Interfaces:
Closeable
public final class PersianAnalyzer
extends StopwordAnalyzerBase

Analyzer for Persian.

This Analyzer uses ArabicLetterTokenizer which implies tokenizing around zero-width non-joiner in addition to whitespace. Some persian-specific variant forms (such as farsi yeh and keheh) are standardized. "Stemming" is accomplished via stopwords.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String | DEFAULT_STOPWORD_FILE File containing default Persian stopwords.
static String | STOPWORDS_COMMENT The comment character in the stopwords file.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
PersianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
PersianAnalyzer(Version matchVersion, File stopwords)
Deprecated. use PersianAnalyzer(Version, Set) instead
PersianAnalyzer(Version matchVersion, Hashtable<?,?> stopwords)
Deprecated. use PersianAnalyzer(Version, Set) instead
PersianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
PersianAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use PersianAnalyzer(Version, Set) instead
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop-words set.
protected Reader | initReader(Reader reader) Wraps the Reader with PersianCharFilter
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Persian stopwords. Default stopword list is from http://members.unine.ch/jacques.savoy/clef/index.html The stopword list is BSD-Licensed.

See Also:
Constant Field Values

STOPWORDS_COMMENT

public static final String STOPWORDS_COMMENT
The comment character in the stopwords file. All lines prefixed with this will be ignored

See Also:
Constant Field Values
Constructor Detail

PersianAnalyzer

public PersianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

PersianAnalyzer

public PersianAnalyzer(Version matchVersion,
                       Set<?> stopwords)
Builds an analyzer with the given stop words

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

PersianAnalyzer

@Deprecated
public PersianAnalyzer(Version matchVersion,
                                  String... stopwords)
Deprecated. use PersianAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

PersianAnalyzer

@Deprecated
public PersianAnalyzer(Version matchVersion,
                                  Hashtable<?,?> stopwords)
Deprecated. use PersianAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

PersianAnalyzer

@Deprecated
public PersianAnalyzer(Version matchVersion,
                                  File stopwords)
                throws IOException
Deprecated. use PersianAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words. Lines can be commented out using STOPWORDS_COMMENT

Throws:
IOException
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.

Returns:
an unmodifiable instance of the default stop-words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
ReusableAnalyzerBase.TokenStreamComponents built from a StandardTokenizer filtered with LowerCaseFilter, ArabicNormalizationFilter, PersianNormalizationFilter and Persian Stop words

initReader

protected Reader initReader(Reader reader)
Wraps the Reader with PersianCharFilter

Overrides:
initReader in class ReusableAnalyzerBase
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


PersianCharFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.fa
Class PersianCharFilter

java.lang.Object
    extended by  java.io.Reader
        extended by  org.apache.lucene.analysis.CharStream
            extended by  org.apache.lucene.analysis.CharFilter
                extended by  org.apache.lucene.analysis.fa.PersianCharFilter
All Implemented Interfaces:
Closeable, Readable
public class PersianCharFilter
extends CharFilter

CharFilter that replaces instances of Zero-width non-joiner with an ordinary space.

Field Summary
Fields inherited from class org.apache.lucene.analysis.CharFilter
input
Fields inherited from class java.io.Reader
lock
Constructor Summary
PersianCharFilter(CharStream in)
Method Summary
 int read(char[] cbuf, int off, int len)
Methods inherited from class org.apache.lucene.analysis.CharFilter
close, correct, correctOffset, mark, markSupported, reset
Methods inherited from class java.io.Reader
read, read, read, ready, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PersianCharFilter

public PersianCharFilter(CharStream in)
Method Detail

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Overrides:
read in class CharFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PersianNormalizationFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.fa
Class PersianNormalizationFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.fa.PersianNormalizationFilter
All Implemented Interfaces:
Closeable
public final class PersianNormalizationFilter
extends TokenFilter

A TokenFilter that applies PersianNormalizer to normalize the orthography.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
PersianNormalizationFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PersianNormalizationFilter

public PersianNormalizationFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PersianNormalizer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.fa
Class PersianNormalizer

java.lang.Object
    extended by  org.apache.lucene.analysis.fa.PersianNormalizer

public class PersianNormalizer
extends Object

Normalizer for Persian.

Normalization is done in-place for efficiency, operating on a termbuffer.

Normalization is defined as:

  • Normalization of various heh + hamza forms and heh goal to heh.
  • Normalization of farsi yeh and yeh barree to arabic yeh
  • Normalization of persian keheh to arabic kaf

Field Summary
static char | FARSI_YEH
static char | HAMZA_ABOVE
static char | HEH
static char | HEH_GOAL
static char | HEH_YEH
static char | KAF
static char | KEHEH
static char | YEH
static char | YEH_BARREE
Constructor Summary
PersianNormalizer()
Method Summary
 int normalize(char[] s, int len)
Normalize an input buffer of Persian text
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

YEH

public static final char YEH
See Also:
Constant Field Values

FARSI_YEH

public static final char FARSI_YEH
See Also:
Constant Field Values

YEH_BARREE

public static final char YEH_BARREE
See Also:
Constant Field Values

KEHEH

public static final char KEHEH
See Also:
Constant Field Values

KAF

public static final char KAF
See Also:
Constant Field Values

HAMZA_ABOVE

public static final char HAMZA_ABOVE
See Also:
Constant Field Values

HEH_YEH

public static final char HEH_YEH
See Also:
Constant Field Values

HEH_GOAL

public static final char HEH_GOAL
See Also:
Constant Field Values

HEH

public static final char HEH
See Also:
Constant Field Values
Constructor Detail

PersianNormalizer

public PersianNormalizer()
Method Detail

normalize

public int normalize(char[] s,
                     int len)
Normalize an input buffer of Persian text

Parameters:
s - input buffer
len - length of input buffer
Returns:
length of input buffer after normalization
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.fa.PersianAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.fa.PersianAnalyzer

No usage of org.apache.lucene.analysis.fa.PersianAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.fa.PersianCharFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.fa.PersianCharFilter

No usage of org.apache.lucene.analysis.fa.PersianCharFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.fa.PersianNormalizationFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.fa.PersianNormalizationFilter

No usage of org.apache.lucene.analysis.fa.PersianNormalizationFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.fa.PersianNormalizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.fa.PersianNormalizer

No usage of org.apache.lucene.analysis.fa.PersianNormalizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


FinnishAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.fi
Class FinnishAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.fi.FinnishAnalyzer
All Implemented Interfaces:
Closeable
public final class FinnishAnalyzer
extends StopwordAnalyzerBase

Analyzer for Finnish.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Italian stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
FinnishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
FinnishAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
FinnishAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Italian stopwords.

See Also:
Constant Field Values
Constructor Detail

FinnishAnalyzer

public FinnishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

FinnishAnalyzer

public FinnishAnalyzer(Version matchVersion,
                       Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

FinnishAnalyzer

public FinnishAnalyzer(Version matchVersion,
                       Set<?> stopwords,
                       Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and SnowballFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


FinnishLightStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.fi
Class FinnishLightStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.fi.FinnishLightStemFilter
All Implemented Interfaces:
Closeable
public final class FinnishLightStemFilter
extends TokenFilter

A TokenFilter that applies FinnishLightStemmer to stem Finnish words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
FinnishLightStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FinnishLightStemFilter

public FinnishLightStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FinnishLightStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.fi
Class FinnishLightStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.fi.FinnishLightStemmer

public class FinnishLightStemmer
extends Object

Light Stemmer for Finnish.

This stemmer implements the algorithm described in: Report on CLEF-2003 Monolingual Tracks Jacques Savoy

Constructor Summary
FinnishLightStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FinnishLightStemmer

public FinnishLightStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.fi
Classes
FinnishAnalyzer
FinnishLightStemFilter
FinnishLightStemmer


org.apache.lucene.analysis.fi

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.fi

Analyzer for Finnish.

See:
Description

Class Summary
FinnishAnalyzer | Analyzer for Finnish.
FinnishLightStemFilter | A TokenFilter that applies FinnishLightStemmer to stem Finnish words.
FinnishLightStemmer | Light Stemmer for Finnish.

Package org.apache.lucene.analysis.fi Description

Analyzer for Finnish.


org.apache.lucene.analysis.fi Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.fi

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.fi.FinnishAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.fi.FinnishLightStemFilter
    • org.apache.lucene.analysis.fi.FinnishLightStemmer


Uses of Package org.apache.lucene.analysis.fi

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.fi

No usage of org.apache.lucene.analysis.fi

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.fi.FinnishAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.fi.FinnishAnalyzer

No usage of org.apache.lucene.analysis.fi.FinnishAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.fi.FinnishLightStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.fi.FinnishLightStemFilter

No usage of org.apache.lucene.analysis.fi.FinnishLightStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.fi.FinnishLightStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.fi.FinnishLightStemmer

No usage of org.apache.lucene.analysis.fi.FinnishLightStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ElisionFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.fr
Class ElisionFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.fr.ElisionFilter
All Implemented Interfaces:
Closeable
public final class ElisionFilter
extends TokenFilter

Removes elisions from a TokenStream. For example, "l'avion" (the plane) will be tokenized as "avion" (plane).

See Also:
Elision in Wikipedia

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ElisionFilter(TokenStream input)
Deprecated. use ElisionFilter(Version, TokenStream) instead
ElisionFilter(TokenStream input, Set<?> articles)
Deprecated. use ElisionFilter(Version, TokenStream, Set) instead
ElisionFilter(TokenStream input, String[] articles)
Deprecated. use ElisionFilter(Version, TokenStream, Set) instead
ElisionFilter(Version matchVersion, TokenStream input)
Constructs an elision filter with standard stop words
ElisionFilter(Version matchVersion, TokenStream input, Set<?> articles)
Constructs an elision filter with a Set of stop words
Method Summary
 boolean incrementToken()
Increments the TokenStream with a CharTermAttribute without elisioned start
 void setArticles(Set<?> articles)
Deprecated. use setArticles(Version, Set) instead
 void setArticles(Version matchVersion, Set<?> articles)
Deprecated. use ElisionFilter(Version, TokenStream, Set) instead
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ElisionFilter

public ElisionFilter(Version matchVersion,
                     TokenStream input)
Constructs an elision filter with standard stop words

ElisionFilter

@Deprecated
public ElisionFilter(TokenStream input)
Deprecated. use ElisionFilter(Version, TokenStream) instead

Constructs an elision filter with standard stop words

ElisionFilter

@Deprecated
public ElisionFilter(TokenStream input,
                                Set<?> articles)
Deprecated. use ElisionFilter(Version, TokenStream, Set) instead

Constructs an elision filter with a Set of stop words

ElisionFilter

public ElisionFilter(Version matchVersion,
                     TokenStream input,
                     Set<?> articles)
Constructs an elision filter with a Set of stop words

Parameters:
matchVersion - the lucene backwards compatibility version
input - the source TokenStream
articles - a set of stopword articles

ElisionFilter

@Deprecated
public ElisionFilter(TokenStream input,
                                String[] articles)
Deprecated. use ElisionFilter(Version, TokenStream, Set) instead

Constructs an elision filter with an array of stop words

Method Detail

setArticles

@Deprecated
public void setArticles(Version matchVersion,
                                   Set<?> articles)
Deprecated. use ElisionFilter(Version, TokenStream, Set) instead

Set the stopword articles

Parameters:
matchVersion - the lucene backwards compatibility version
articles - a set of articles

setArticles

@Deprecated
public void setArticles(Set<?> articles)
Deprecated. use setArticles(Version, Set) instead

Set the stopword articles

Parameters:
articles - a set of articles

incrementToken

public final boolean incrementToken()
                             throws IOException
Increments the TokenStream with a CharTermAttribute without elisioned start

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


FrenchAnalyzer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.fr
Class FrenchAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.fr.FrenchAnalyzer
All Implemented Interfaces:
Closeable
public final class FrenchAnalyzer
extends StopwordAnalyzerBase

Analyzer for French language.

Supports an external list of stopwords (words that will not be indexed at all) and an external list of exclusions (word that will not be stemmed, but indexed). A default set of stopwords is used unless an alternative list is specified, but the exclusion list is empty by default.

You must specify the required Version compatibility when creating FrenchAnalyzer:

  • As of 3.6, FrenchLightStemFilter is used for less aggressive stemming.
  • As of 3.1, Snowball stemming is done with SnowballFilter, LowerCaseFilter is used prior to StopFilter, and ElisionFilter and Snowball stopwords are used by default.
  • As of 2.9, StopFilter preserves position increments

NOTE: This class uses the same Version dependent settings as StandardAnalyzer.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String | DEFAULT_STOPWORD_FILE File containing default French stopwords.
static String[] | FRENCH_STOP_WORDS Deprecated. use getDefaultStopSet() instead
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
FrenchAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (getDefaultStopSet()).
FrenchAnalyzer(Version matchVersion, File stopwords)
Deprecated. use FrenchAnalyzer(Version, Set) instead
FrenchAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
FrenchAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclutionSet)
Builds an analyzer with the given stop words
FrenchAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use FrenchAnalyzer(Version, Set) instead
Method Summary
protected  ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.
 void setStemExclusionTable(File exclusionlist)
Deprecated. use FrenchAnalyzer(Version, Set, Set) instead
 void setStemExclusionTable(Map<?,?> exclusionlist)
Deprecated. use FrenchAnalyzer(Version, Set, Set) instead
 void setStemExclusionTable(String... exclusionlist)
Deprecated. use FrenchAnalyzer(Version, Set, Set) instead
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

FRENCH_STOP_WORDS

@Deprecated
public static final String[] FRENCH_STOP_WORDS
Deprecated. use getDefaultStopSet() instead
Extended list of typical French stopwords.

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default French stopwords.

See Also:
Constant Field Values
Constructor Detail

FrenchAnalyzer

public FrenchAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (getDefaultStopSet()).

FrenchAnalyzer

public FrenchAnalyzer(Version matchVersion,
                      Set<?> stopwords)
Builds an analyzer with the given stop words

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

FrenchAnalyzer

public FrenchAnalyzer(Version matchVersion,
                      Set<?> stopwords,
                      Set<?> stemExclutionSet)
Builds an analyzer with the given stop words

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclutionSet - a stemming exclusion set

FrenchAnalyzer

@Deprecated
public FrenchAnalyzer(Version matchVersion,
                                 String... stopwords)
Deprecated. use FrenchAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

FrenchAnalyzer

@Deprecated
public FrenchAnalyzer(Version matchVersion,
                                 File stopwords)
               throws IOException
Deprecated. use FrenchAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

Throws:
IOException
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.

Returns:
an unmodifiable instance of the default stop-words set.

setStemExclusionTable

@Deprecated
public void setStemExclusionTable(String... exclusionlist)
Deprecated. use FrenchAnalyzer(Version, Set, Set) instead

Builds an exclusionlist from an array of Strings.

setStemExclusionTable

@Deprecated
public void setStemExclusionTable(Map<?,?> exclusionlist)
Deprecated. use FrenchAnalyzer(Version, Set, Set) instead

Builds an exclusionlist from a Map.

setStemExclusionTable

@Deprecated
public void setStemExclusionTable(File exclusionlist)
                           throws IOException
Deprecated. use FrenchAnalyzer(Version, Set, Set) instead

Builds an exclusionlist from the words contained in the given file.

Throws:
IOException

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
ReusableAnalyzerBase.TokenStreamComponents built from a StandardTokenizer filtered with StandardFilter, ElisionFilter, LowerCaseFilter, StopFilter, KeywordMarkerFilter if a stem exclusion set is provided, and FrenchLightStemFilter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FrenchLightStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.fr
Class FrenchLightStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.fr.FrenchLightStemFilter
All Implemented Interfaces:
Closeable
public final class FrenchLightStemFilter
extends TokenFilter

A TokenFilter that applies FrenchLightStemmer to stem French words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
FrenchLightStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FrenchLightStemFilter

public FrenchLightStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FrenchLightStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.fr
Class FrenchLightStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.fr.FrenchLightStemmer

public class FrenchLightStemmer
extends Object

Light Stemmer for French.

This stemmer implements the "UniNE" algorithm in: Light Stemming Approaches for the French, Portuguese, German and Hungarian Languages Jacques Savoy

Constructor Summary
FrenchLightStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FrenchLightStemmer

public FrenchLightStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FrenchMinimalStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.fr
Class FrenchMinimalStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.fr.FrenchMinimalStemFilter
All Implemented Interfaces:
Closeable
public final class FrenchMinimalStemFilter
extends TokenFilter

A TokenFilter that applies FrenchMinimalStemmer to stem French words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
FrenchMinimalStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FrenchMinimalStemFilter

public FrenchMinimalStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FrenchMinimalStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.fr
Class FrenchMinimalStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.fr.FrenchMinimalStemmer

public class FrenchMinimalStemmer
extends Object

Light Stemmer for French.

This stemmer implements the following algorithm: A Stemming procedure and stopword list for general French corpora. Jacques Savoy.

Constructor Summary
FrenchMinimalStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FrenchMinimalStemmer

public FrenchMinimalStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FrenchStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.fr
Class FrenchStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.fr.FrenchStemFilter
All Implemented Interfaces:
Closeable
Deprecated. Use SnowballFilter with FrenchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0

@Deprecated
public final class FrenchStemFilter
extends TokenFilter

A TokenFilter that stems french words.

The used stemmer can be changed at runtime after the filter object is created (as long as it is a FrenchStemmer).

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

See Also:
KeywordMarkerFilter

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
FrenchStemFilter(TokenStream in)
Deprecated.
FrenchStemFilter(TokenStream in, Set<?> exclusiontable)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
Method Summary
boolean | incrementToken() Deprecated. Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | setExclusionTable(Map<?,?> exclusiontable) Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
void | setStemmer(FrenchStemmer stemmer) Deprecated. Set a alternative/custom FrenchStemmer for this filter.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FrenchStemFilter

public FrenchStemFilter(TokenStream in)
Deprecated.

FrenchStemFilter

@Deprecated
public FrenchStemFilter(TokenStream in,
                                   Set<?> exclusiontable)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.

Parameters:
in - the TokenStream to filter
exclusiontable - a set of terms not to be stemmed
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Deprecated.
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
Returns true for the next token in the stream, or false at EOS
Throws:
IOException

setStemmer

public void setStemmer(FrenchStemmer stemmer)
Deprecated.
Set a alternative/custom FrenchStemmer for this filter.

setExclusionTable

@Deprecated
public void setExclusionTable(Map<?,?> exclusiontable)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.

Set an alternative exclusion list for this filter.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FrenchStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.fr
Class FrenchStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.fr.FrenchStemmer
Deprecated. Use FrenchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0

@Deprecated
public class FrenchStemmer
extends Object

A stemmer for French words.

The algorithm is based on the work of Dr Martin Porter on his snowball project
refer to http://snowball.sourceforge.net/french/stemmer.html
(French stemming algorithm) for details

Constructor Summary
FrenchStemmer()
Deprecated.
Method Summary
protected  String stem(String term)
Deprecated. Stems the given term to a unique discriminator.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FrenchStemmer

public FrenchStemmer()
Deprecated.
Method Detail

stem

protected String stem(String term)
Deprecated.
Stems the given term to a unique discriminator.

Parameters:
term - java.langString The term that should be stemmed
Returns:
java.lang.String Discriminator for term
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.fr
Classes
ElisionFilter
FrenchAnalyzer
FrenchLightStemFilter
FrenchLightStemmer
FrenchMinimalStemFilter
FrenchMinimalStemmer
FrenchStemFilter
FrenchStemmer


org.apache.lucene.analysis.fr

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.fr

Analyzer for French.

See:
Description

Class Summary
ElisionFilter | Removes elisions from a TokenStream.
FrenchAnalyzer | Analyzer for French language.
FrenchLightStemFilter | A TokenFilter that applies FrenchLightStemmer to stem French words.
FrenchLightStemmer | Light Stemmer for French.
FrenchMinimalStemFilter | A TokenFilter that applies FrenchMinimalStemmer to stem French words.
FrenchMinimalStemmer | Light Stemmer for French.
FrenchStemFilter | Deprecated. Use SnowballFilter with FrenchStemmer instead, which has the same functionality.
FrenchStemmer | Deprecated. Use FrenchStemmer instead, which has the same functionality.

Package org.apache.lucene.analysis.fr Description

Analyzer for French.


org.apache.lucene.analysis.fr Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.fr

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.fr.FrenchAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.fr.ElisionFilter
          • org.apache.lucene.analysis.fr.FrenchLightStemFilter
          • org.apache.lucene.analysis.fr.FrenchMinimalStemFilter
          • org.apache.lucene.analysis.fr.FrenchStemFilter
    • org.apache.lucene.analysis.fr.FrenchLightStemmer
    • org.apache.lucene.analysis.fr.FrenchMinimalStemmer
    • org.apache.lucene.analysis.fr.FrenchStemmer


Uses of Package org.apache.lucene.analysis.fr

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.fr

Packages that use org.apache.lucene.analysis.fr
org.apache.lucene.analysis.fr Analyzer for French.

Classes in org.apache.lucene.analysis.fr used by org.apache.lucene.analysis.fr
FrenchStemmer
Deprecated. Use FrenchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.fr.ElisionFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.fr.ElisionFilter

No usage of org.apache.lucene.analysis.fr.ElisionFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.fr.FrenchAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.fr.FrenchAnalyzer

No usage of org.apache.lucene.analysis.fr.FrenchAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.fr.FrenchLightStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.fr.FrenchLightStemFilter

No usage of org.apache.lucene.analysis.fr.FrenchLightStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.fr.FrenchLightStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.fr.FrenchLightStemmer

No usage of org.apache.lucene.analysis.fr.FrenchLightStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.fr.FrenchMinimalStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.fr.FrenchMinimalStemFilter

No usage of org.apache.lucene.analysis.fr.FrenchMinimalStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.fr.FrenchMinimalStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.fr.FrenchMinimalStemmer

No usage of org.apache.lucene.analysis.fr.FrenchMinimalStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.fr.FrenchStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.fr.FrenchStemFilter

No usage of org.apache.lucene.analysis.fr.FrenchStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.fr.FrenchStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.fr.FrenchStemmer

Packages that use FrenchStemmer
org.apache.lucene.analysis.fr Analyzer for French.

Uses of FrenchStemmer in org.apache.lucene.analysis.fr

Methods in org.apache.lucene.analysis.fr with parameters of type FrenchStemmer
 void FrenchStemFilter.setStemmer(FrenchStemmer stemmer)
Deprecated. Set a alternative/custom FrenchStemmer for this filter.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


IrishAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ga
Class IrishAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.ga.IrishAnalyzer
All Implemented Interfaces:
Closeable
public final class IrishAnalyzer
extends StopwordAnalyzerBase

Analyzer for Irish.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Irish stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
IrishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
IrishAnalyzer(Version matchVersion, CharArraySet stopwords)
Builds an analyzer with the given stop words.
IrishAnalyzer(Version matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static CharArraySet | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Irish stopwords.

See Also:
Constant Field Values
Constructor Detail

IrishAnalyzer

public IrishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

IrishAnalyzer

public IrishAnalyzer(Version matchVersion,
                     CharArraySet stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

IrishAnalyzer

public IrishAnalyzer(Version matchVersion,
                     CharArraySet stopwords,
                     CharArraySet stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static CharArraySet getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, IrishLowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and SnowballFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


IrishLowerCaseFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ga
Class IrishLowerCaseFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.ga.IrishLowerCaseFilter
All Implemented Interfaces:
Closeable
public final class IrishLowerCaseFilter
extends TokenFilter

Normalises token text to lower case, handling t-prothesis and n-eclipsis (i.e., that 'nAthair' should become 'n-athair')

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
IrishLowerCaseFilter(TokenStream in)
Create an IrishLowerCaseFilter that normalises Irish token text.
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

IrishLowerCaseFilter

public IrishLowerCaseFilter(TokenStream in)
Create an IrishLowerCaseFilter that normalises Irish token text.

Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.ga
Classes
IrishAnalyzer
IrishLowerCaseFilter


org.apache.lucene.analysis.ga

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.ga

Analysis for Irish.

See:
Description

Class Summary
IrishAnalyzer | Analyzer for Irish.
IrishLowerCaseFilter | Normalises token text to lower case, handling t-prothesis and n-eclipsis (i.e., that 'nAthair' should become 'n-athair')

Package org.apache.lucene.analysis.ga Description

Analysis for Irish.


org.apache.lucene.analysis.ga Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.ga

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.ga.IrishAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.ga.IrishLowerCaseFilter


Uses of Package org.apache.lucene.analysis.ga

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.ga

No usage of org.apache.lucene.analysis.ga

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ga.IrishAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ga.IrishAnalyzer

No usage of org.apache.lucene.analysis.ga.IrishAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ga.IrishLowerCaseFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ga.IrishLowerCaseFilter

No usage of org.apache.lucene.analysis.ga.IrishLowerCaseFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


GalicianAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.gl
Class GalicianAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.gl.GalicianAnalyzer
All Implemented Interfaces:
Closeable
public final class GalicianAnalyzer
extends StopwordAnalyzerBase

Analyzer for Galician.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Galician stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
GalicianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
GalicianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
GalicianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Galician stopwords.

See Also:
Constant Field Values
Constructor Detail

GalicianAnalyzer

public GalicianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

GalicianAnalyzer

public GalicianAnalyzer(Version matchVersion,
                        Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

GalicianAnalyzer

public GalicianAnalyzer(Version matchVersion,
                        Set<?> stopwords,
                        Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and GalicianStemFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


GalicianMinimalStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.gl
Class GalicianMinimalStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.gl.GalicianMinimalStemFilter
All Implemented Interfaces:
Closeable
public final class GalicianMinimalStemFilter
extends TokenFilter

A TokenFilter that applies GalicianMinimalStemmer to stem Galician words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
GalicianMinimalStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

GalicianMinimalStemFilter

public GalicianMinimalStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GalicianMinimalStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.gl
Class GalicianMinimalStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.pt.RSLPStemmerBase
        extended by  org.apache.lucene.analysis.gl.GalicianMinimalStemmer

public class GalicianMinimalStemmer
extends RSLPStemmerBase

Minimal Stemmer for Galician

This follows the "RSLP-S" algorithm, but modified for Galician. Hence this stemmer only applies the plural reduction step of: "Regras do lematizador para o galego"

See Also:
RSLPStemmerBase

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.pt.RSLPStemmerBase
RSLPStemmerBase.Rule, RSLPStemmerBase.RuleWithSetExceptions, RSLPStemmerBase.RuleWithSuffixExceptions, RSLPStemmerBase.Step
Constructor Summary
GalicianMinimalStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class org.apache.lucene.analysis.pt.RSLPStemmerBase
parse
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GalicianMinimalStemmer

public GalicianMinimalStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GalicianStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.gl
Class GalicianStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.gl.GalicianStemFilter
All Implemented Interfaces:
Closeable
public final class GalicianStemFilter
extends TokenFilter

A TokenFilter that applies GalicianStemmer to stem Galician words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
GalicianStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

GalicianStemFilter

public GalicianStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GalicianStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.gl
Class GalicianStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.pt.RSLPStemmerBase
        extended by  org.apache.lucene.analysis.gl.GalicianStemmer

public class GalicianStemmer
extends RSLPStemmerBase

Galician stemmer implementing "Regras do lematizador para o galego".

See Also:
RSLPStemmerBase, Description of rules

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.pt.RSLPStemmerBase
RSLPStemmerBase.Rule, RSLPStemmerBase.RuleWithSetExceptions, RSLPStemmerBase.RuleWithSuffixExceptions, RSLPStemmerBase.Step
Constructor Summary
GalicianStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class org.apache.lucene.analysis.pt.RSLPStemmerBase
parse
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GalicianStemmer

public GalicianStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Parameters:
s - buffer, oversized to at least len+1
len - initial valid length of buffer
Returns:
new valid length, stemmed
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.gl
Classes
GalicianAnalyzer
GalicianMinimalStemFilter
GalicianMinimalStemmer
GalicianStemFilter
GalicianStemmer


org.apache.lucene.analysis.gl

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.gl

Analyzer for Galician.

See:
Description

Class Summary
GalicianAnalyzer | Analyzer for Galician.
GalicianMinimalStemFilter | A TokenFilter that applies GalicianMinimalStemmer to stem Galician words.
GalicianMinimalStemmer | Minimal Stemmer for Galician
GalicianStemFilter | A TokenFilter that applies GalicianStemmer to stem Galician words.
GalicianStemmer | Galician stemmer implementing "Regras do lematizador para o galego".

Package org.apache.lucene.analysis.gl Description

Analyzer for Galician.


org.apache.lucene.analysis.gl Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.gl

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.gl.GalicianAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.gl.GalicianMinimalStemFilter
          • org.apache.lucene.analysis.gl.GalicianStemFilter
    • org.apache.lucene.analysis.pt.RSLPStemmerBase
      • org.apache.lucene.analysis.gl.GalicianMinimalStemmer
      • org.apache.lucene.analysis.gl.GalicianStemmer


Uses of Package org.apache.lucene.analysis.gl

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.gl

No usage of org.apache.lucene.analysis.gl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.gl.GalicianAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.gl.GalicianAnalyzer

No usage of org.apache.lucene.analysis.gl.GalicianAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.gl.GalicianMinimalStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.gl.GalicianMinimalStemFilter

No usage of org.apache.lucene.analysis.gl.GalicianMinimalStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.gl.GalicianMinimalStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.gl.GalicianMinimalStemmer

No usage of org.apache.lucene.analysis.gl.GalicianMinimalStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.gl.GalicianStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.gl.GalicianStemFilter

No usage of org.apache.lucene.analysis.gl.GalicianStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.gl.GalicianStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.gl.GalicianStemmer

No usage of org.apache.lucene.analysis.gl.GalicianStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


HindiAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.hi
Class HindiAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.hi.HindiAnalyzer
All Implemented Interfaces:
Closeable
public final class HindiAnalyzer
extends StopwordAnalyzerBase

Analyzer for Hindi.

You must specify the required Version compatibility when creating HindiAnalyzer:

  • As of 3.6, StandardTokenizer is used for tokenization

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Hindi stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
HindiAnalyzer(Version version)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
HindiAnalyzer(Version version, Set<?> stopwords)
Builds an analyzer with the given stop words
HindiAnalyzer(Version version, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop-words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Hindi stopwords. Default stopword list is from http://members.unine.ch/jacques.savoy/clef/index.html The stopword list is BSD-Licensed.

See Also:
Constant Field Values
Constructor Detail

HindiAnalyzer

public HindiAnalyzer(Version version,
                     Set<?> stopwords,
                     Set<?> stemExclusionSet)
Builds an analyzer with the given stop words

Parameters:
version - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a stemming exclusion set

HindiAnalyzer

public HindiAnalyzer(Version version,
                     Set<?> stopwords)
Builds an analyzer with the given stop words

Parameters:
version - lucene compatibility version
stopwords - a stopword set

HindiAnalyzer

public HindiAnalyzer(Version version)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.

Returns:
an unmodifiable instance of the default stop-words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
ReusableAnalyzerBase.TokenStreamComponents built from a StandardTokenizer filtered with LowerCaseFilter, IndicNormalizationFilter, HindiNormalizationFilter, KeywordMarkerFilter if a stem exclusion set is provided, HindiStemFilter, and Hindi Stop words
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


HindiNormalizationFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.hi
Class HindiNormalizationFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.hi.HindiNormalizationFilter
All Implemented Interfaces:
Closeable
public final class HindiNormalizationFilter
extends TokenFilter

A TokenFilter that applies HindiNormalizer to normalize the orthography.

In some cases the normalization may cause unrelated terms to conflate, so to prevent terms from being normalized use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

See Also:
HindiNormalizer

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
HindiNormalizationFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

HindiNormalizationFilter

public HindiNormalizationFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HindiNormalizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.hi
Class HindiNormalizer

java.lang.Object
    extended by  org.apache.lucene.analysis.hi.HindiNormalizer

public class HindiNormalizer
extends Object

Normalizer for Hindi.

Normalizes text to remove some differences in spelling variations.

Implements the Hindi-language specific algorithm specified in: Word normalization in Indian languages Prasad Pingali and Vasudeva Varma. http://web2py.iiit.ac.in/publications/default/download/inproceedings.pdf.3fe5b38c-02ee-41ce-9a8f-3e745670be32.pdf

with the following additions from Hindi CLIR in Thirty Days Leah S. Larkey, Margaret E. Connell, and Nasreen AbdulJaleel. http://maroo.cs.umass.edu/pub/web/getpdf.php?id=454:

  • Internal Zero-width joiner and Zero-width non-joiners are removed
  • In addition to chandrabindu, NA+halant is normalized to anusvara

Constructor Summary
HindiNormalizer()
Method Summary
 int normalize(char[] s, int len)
Normalize an input buffer of Hindi text
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HindiNormalizer

public HindiNormalizer()
Method Detail

normalize

public int normalize(char[] s,
                     int len)
Normalize an input buffer of Hindi text

Parameters:
s - input buffer
len - length of input buffer
Returns:
length of input buffer after normalization
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HindiStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.hi
Class HindiStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.hi.HindiStemFilter
All Implemented Interfaces:
Closeable
public final class HindiStemFilter
extends TokenFilter

A TokenFilter that applies HindiStemmer to stem Hindi words.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
HindiStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

HindiStemFilter

public HindiStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HindiStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.hi
Class HindiStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.hi.HindiStemmer

public class HindiStemmer
extends Object

Light Stemmer for Hindi.

Implements the algorithm specified in: A Lightweight Stemmer for Hindi Ananthakrishnan Ramanathan and Durgesh D Rao. http://computing.open.ac.uk/Sites/EACLSouthAsia/Papers/p6-Ramanathan.pdf

Constructor Summary
HindiStemmer()
Method Summary
 int stem(char[] buffer, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HindiStemmer

public HindiStemmer()
Method Detail

stem

public int stem(char[] buffer,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.hi
Classes
HindiAnalyzer
HindiNormalizationFilter
HindiNormalizer
HindiStemFilter
HindiStemmer


org.apache.lucene.analysis.hi

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.hi

Analyzer for Hindi.

See:
Description

Class Summary
HindiAnalyzer | Analyzer for Hindi.
HindiNormalizationFilter | A TokenFilter that applies HindiNormalizer to normalize the orthography.
HindiNormalizer | Normalizer for Hindi.
HindiStemFilter | A TokenFilter that applies HindiStemmer to stem Hindi words.
HindiStemmer | Light Stemmer for Hindi.

Package org.apache.lucene.analysis.hi Description

Analyzer for Hindi.


org.apache.lucene.analysis.hi Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.hi

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.hi.HindiAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.hi.HindiNormalizationFilter
          • org.apache.lucene.analysis.hi.HindiStemFilter
    • org.apache.lucene.analysis.hi.HindiNormalizer
    • org.apache.lucene.analysis.hi.HindiStemmer


Uses of Package org.apache.lucene.analysis.hi

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.hi

No usage of org.apache.lucene.analysis.hi

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.hi.HindiAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.hi.HindiAnalyzer

No usage of org.apache.lucene.analysis.hi.HindiAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.hi.HindiNormalizationFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.hi.HindiNormalizationFilter

No usage of org.apache.lucene.analysis.hi.HindiNormalizationFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.hi.HindiNormalizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.hi.HindiNormalizer

No usage of org.apache.lucene.analysis.hi.HindiNormalizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.hi.HindiStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.hi.HindiStemFilter

No usage of org.apache.lucene.analysis.hi.HindiStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.hi.HindiStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.hi.HindiStemmer

No usage of org.apache.lucene.analysis.hi.HindiStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


HungarianAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.hu
Class HungarianAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.hu.HungarianAnalyzer
All Implemented Interfaces:
Closeable
public final class HungarianAnalyzer
extends StopwordAnalyzerBase

Analyzer for Hungarian.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Hungarian stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
HungarianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
HungarianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
HungarianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Hungarian stopwords.

See Also:
Constant Field Values
Constructor Detail

HungarianAnalyzer

public HungarianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

HungarianAnalyzer

public HungarianAnalyzer(Version matchVersion,
                         Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

HungarianAnalyzer

public HungarianAnalyzer(Version matchVersion,
                         Set<?> stopwords,
                         Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and SnowballFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


HungarianLightStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.hu
Class HungarianLightStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.hu.HungarianLightStemFilter
All Implemented Interfaces:
Closeable
public final class HungarianLightStemFilter
extends TokenFilter

A TokenFilter that applies HungarianLightStemmer to stem Hungarian words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
HungarianLightStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

HungarianLightStemFilter

public HungarianLightStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HungarianLightStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.hu
Class HungarianLightStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.hu.HungarianLightStemmer

public class HungarianLightStemmer
extends Object

Light Stemmer for Hungarian.

This stemmer implements the "UniNE" algorithm in: Light Stemming Approaches for the French, Portuguese, German and Hungarian Languages Jacques Savoy

Constructor Summary
HungarianLightStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HungarianLightStemmer

public HungarianLightStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.hu
Classes
HungarianAnalyzer
HungarianLightStemFilter
HungarianLightStemmer


org.apache.lucene.analysis.hu

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.hu

Analyzer for Hungarian.

See:
Description

Class Summary
HungarianAnalyzer | Analyzer for Hungarian.
HungarianLightStemFilter | A TokenFilter that applies HungarianLightStemmer to stem Hungarian words.
HungarianLightStemmer | Light Stemmer for Hungarian.

Package org.apache.lucene.analysis.hu Description

Analyzer for Hungarian.


org.apache.lucene.analysis.hu Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.hu

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.hu.HungarianAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.hu.HungarianLightStemFilter
    • org.apache.lucene.analysis.hu.HungarianLightStemmer


Uses of Package org.apache.lucene.analysis.hu

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.hu

No usage of org.apache.lucene.analysis.hu

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.hu.HungarianAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.hu.HungarianAnalyzer

No usage of org.apache.lucene.analysis.hu.HungarianAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.hu.HungarianLightStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.hu.HungarianLightStemFilter

No usage of org.apache.lucene.analysis.hu.HungarianLightStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.hu.HungarianLightStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.hu.HungarianLightStemmer

No usage of org.apache.lucene.analysis.hu.HungarianLightStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


HunspellAffix

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.hunspell
Class HunspellAffix

java.lang.Object
    extended by  org.apache.lucene.analysis.hunspell.HunspellAffix

public class HunspellAffix
extends Object

Wrapper class representing a hunspell affix

Constructor Summary
HunspellAffix()
Method Summary
boolean | checkCondition(CharSequence text) Checks whether the given text matches the conditional pattern on this affix
String | getAppend() Returns the append defined for the affix
char[] | getAppendFlags() Returns the flags defined for the affix append
String | getCondition() Returns the condition that must be met before the affix can be applied
char | getFlag() Returns the affix flag
String | getStrip() Returns the stripping characters defined for the affix
boolean | isCrossProduct() Returns whether the affix is defined as cross product
void | setAppend(String append) Sets the append defined for the affix
void | setAppendFlags(char[] appendFlags) Sets the flags defined for the affix append
void | setCondition(String condition, String pattern) Sets the condition that must be met before the affix can be applied
void | setCrossProduct(boolean crossProduct) Sets whether the affix is defined as cross product
void | setFlag(char flag) Sets the affix flag
void | setStrip(String strip) Sets the stripping characters defined for the affix
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HunspellAffix

public HunspellAffix()
Method Detail

checkCondition

public boolean checkCondition(CharSequence text)
Checks whether the given text matches the conditional pattern on this affix

Parameters:
text - Text to check if it matches the affix's conditional pattern
Returns:
true if the text meets the condition, false otherwise

getAppend

public String getAppend()
Returns the append defined for the affix

Returns:
Defined append

setAppend

public void setAppend(String append)
Sets the append defined for the affix

Parameters:
append - Defined append for the affix

getAppendFlags

public char[] getAppendFlags()
Returns the flags defined for the affix append

Returns:
Flags defined for the affix append

setAppendFlags

public void setAppendFlags(char[] appendFlags)
Sets the flags defined for the affix append

Parameters:
appendFlags - Flags defined for the affix append

getStrip

public String getStrip()
Returns the stripping characters defined for the affix

Returns:
Stripping characters defined for the affix

setStrip

public void setStrip(String strip)
Sets the stripping characters defined for the affix

Parameters:
strip - Stripping characters defined for the affix

getCondition

public String getCondition()
Returns the condition that must be met before the affix can be applied

Returns:
Condition that must be met before the affix can be applied

setCondition

public void setCondition(String condition,
                         String pattern)
Sets the condition that must be met before the affix can be applied

Parameters:
condition - Condition to be met before affix application
pattern - Condition as a regular expression pattern

getFlag

public char getFlag()
Returns the affix flag

Returns:
Affix flag

setFlag

public void setFlag(char flag)
Sets the affix flag

Parameters:
flag - Affix flag

isCrossProduct

public boolean isCrossProduct()
Returns whether the affix is defined as cross product

Returns:
true if the affix is cross product, false otherwise

setCrossProduct

public void setCrossProduct(boolean crossProduct)
Sets whether the affix is defined as cross product

Parameters:
crossProduct - Whether the affix is defined as cross product
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


HunspellDictionary

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.hunspell
Class HunspellDictionary

java.lang.Object
    extended by  org.apache.lucene.analysis.hunspell.HunspellDictionary

public class HunspellDictionary
extends Object

In-memory structure for the dictionary (.dic) and affix (.aff) data of a hunspell dictionary.

Constructor Summary
HunspellDictionary(InputStream affix, InputStream dictionary, Version version)
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files.
HunspellDictionary(InputStream affix, InputStream dictionary, Version version, boolean ignoreCase)
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files.
HunspellDictionary(InputStream affix, List<InputStream> dictionaries, Version version, boolean ignoreCase)
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files.
Method Summary
Version | getVersion()
boolean | isIgnoreCase()
List<HunspellAffix> | lookupPrefix(char[] word, int offset, int length) Looks up HunspellAffix prefixes that have an append that matches the String created from the given char array, offset and length
List<HunspellAffix> | lookupSuffix(char[] word, int offset, int length) Looks up HunspellAffix suffixes that have an append that matches the String created from the given char array, offset and length
List<HunspellWord> | lookupWord(char[] word, int offset, int length) Looks up HunspellWords that match the String created from the given char array, offset and length
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HunspellDictionary

public HunspellDictionary(InputStream affix,
                          InputStream dictionary,
                          Version version)
                   throws IOException,
                          ParseException
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files. You have to close the provided InputStreams yourself.

Parameters:
affix - InputStream for reading the hunspell affix file (won't be closed).
dictionary - InputStream for reading the hunspell dictionary file (won't be closed).
version - Lucene Version
Throws:
IOException - Can be thrown while reading from the InputStreams
ParseException - Can be thrown if the content of the files does not meet expected formats

HunspellDictionary

public HunspellDictionary(InputStream affix,
                          InputStream dictionary,
                          Version version,
                          boolean ignoreCase)
                   throws IOException,
                          ParseException
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files. You have to close the provided InputStreams yourself.

Parameters:
affix - InputStream for reading the hunspell affix file (won't be closed).
dictionary - InputStream for reading the hunspell dictionary file (won't be closed).
version - Lucene Version
ignoreCase - If true, dictionary matching will be case insensitive
Throws:
IOException - Can be thrown while reading from the InputStreams
ParseException - Can be thrown if the content of the files does not meet expected formats

HunspellDictionary

public HunspellDictionary(InputStream affix,
                          List<InputStream> dictionaries,
                          Version version,
                          boolean ignoreCase)
                   throws IOException,
                          ParseException
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files. You have to close the provided InputStreams yourself.

Parameters:
affix - InputStream for reading the hunspell affix file (won't be closed).
dictionaries - InputStreams for reading the hunspell dictionary file (won't be closed).
version - Lucene Version
ignoreCase - If true, dictionary matching will be case insensitive
Throws:
IOException - Can be thrown while reading from the InputStreams
ParseException - Can be thrown if the content of the files does not meet expected formats
Method Detail

lookupWord

public List<HunspellWord> lookupWord(char[] word,
                                     int offset,
                                     int length)
Looks up HunspellWords that match the String created from the given char array, offset and length

Parameters:
word - Char array to generate the String from
offset - Offset in the char array that the String starts at
length - Length from the offset that the String is
Returns:
List of HunspellWords that match the generated String, or null if none are found

lookupPrefix

public List<HunspellAffix> lookupPrefix(char[] word,
                                        int offset,
                                        int length)
Looks up HunspellAffix prefixes that have an append that matches the String created from the given char array, offset and length

Parameters:
word - Char array to generate the String from
offset - Offset in the char array that the String starts at
length - Length from the offset that the String is
Returns:
List of HunspellAffix prefixes with an append that matches the String, or null if none are found

lookupSuffix

public List<HunspellAffix> lookupSuffix(char[] word,
                                        int offset,
                                        int length)
Looks up HunspellAffix suffixes that have an append that matches the String created from the given char array, offset and length

Parameters:
word - Char array to generate the String from
offset - Offset in the char array that the String starts at
length - Length from the offset that the String is
Returns:
List of HunspellAffix suffixes with an append that matches the String, or null if none are found

getVersion

public Version getVersion()

isIgnoreCase

public boolean isIgnoreCase()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HunspellStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.hunspell
Class HunspellStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.hunspell.HunspellStemFilter
All Implemented Interfaces:
Closeable
public final class HunspellStemFilter
extends TokenFilter

TokenFilter that uses hunspell affix rules and words to stem tokens. Since hunspell supports a word having multiple stems, this filter can emit multiple tokens for each consumed token

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
HunspellStemFilter(TokenStream input, HunspellDictionary dictionary)
Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using affix rules in the provided HunspellDictionary
HunspellStemFilter(TokenStream input, HunspellDictionary dictionary, boolean dedup)
Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using affix rules in the provided HunspellDictionary
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

HunspellStemFilter

public HunspellStemFilter(TokenStream input,
                          HunspellDictionary dictionary)
Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using affix rules in the provided HunspellDictionary

Parameters:
input - TokenStream whose tokens will be stemmed
dictionary - HunspellDictionary containing the affix rules and words that will be used to stem the tokens

HunspellStemFilter

public HunspellStemFilter(TokenStream input,
                          HunspellDictionary dictionary,
                          boolean dedup)
Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using affix rules in the provided HunspellDictionary

Parameters:
input - TokenStream whose tokens will be stemmed
dictionary - HunspellDictionary containing the affix rules and words that will be used to stem the tokens
dedup - true if only unique terms should be output.
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HunspellStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.hunspell
Class HunspellStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.hunspell.HunspellStemmer

public class HunspellStemmer
extends Object

HunspellStemmer uses the affix rules declared in the HunspellDictionary to generate one or more stems for a word. It conforms to the algorithm in the original hunspell algorithm, including recursive suffix stripping.

Nested Class Summary
static class HunspellStemmer.Stem
Stem represents all information known about a stem of a word.
Constructor Summary
HunspellStemmer(HunspellDictionary dictionary)
Constructs a new HunspellStemmer which will use the provided HunspellDictionary to create its stems
Method Summary
List<HunspellStemmer.Stem> | applyAffix(char[] strippedWord, int length, HunspellAffix affix, int recursionDepth) Applies the affix rule to the given word, producing a list of stems if any are found
static void | main(String[] args) HunspellStemmer entry point.
List<HunspellStemmer.Stem> | stem(char[] word, int length) Find the stem(s) of the provided word
List<HunspellStemmer.Stem> | stem(String word) Find the stem(s) of the provided word
List<HunspellStemmer.Stem> | uniqueStems(char[] word, int length) Find the unique stem(s) of the provided word
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HunspellStemmer

public HunspellStemmer(HunspellDictionary dictionary)
Constructs a new HunspellStemmer which will use the provided HunspellDictionary to create its stems

Parameters:
dictionary - HunspellDictionary that will be used to create the stems
Method Detail

stem

public List<HunspellStemmer.Stem> stem(String word)
Find the stem(s) of the provided word

Parameters:
word - Word to find the stems for
Returns:
List of stems for the word

stem

public List<HunspellStemmer.Stem> stem(char[] word,
                                       int length)
Find the stem(s) of the provided word

Parameters:
word - Word to find the stems for
Returns:
List of stems for the word

uniqueStems

public List<HunspellStemmer.Stem> uniqueStems(char[] word,
                                              int length)
Find the unique stem(s) of the provided word

Parameters:
word - Word to find the stems for
Returns:
List of stems for the word

applyAffix

public List<HunspellStemmer.Stem> applyAffix(char[] strippedWord,
                                             int length,
                                             HunspellAffix affix,
                                             int recursionDepth)
Applies the affix rule to the given word, producing a list of stems if any are found

Parameters:
strippedWord - Word the affix has been removed and the strip added
affix - HunspellAffix representing the affix rule itself
recursionDepth - Level of recursion this stemming step is at
Returns:
List of stems for the word, or an empty list if none are found

main

public static void main(String[] args)
                 throws IOException,
                        ParseException
HunspellStemmer entry point. Accepts two arguments: location of affix file and location of dic file

Parameters:
args - Program arguments. Should contain location of affix file and location of dic file
Throws:
IOException - Can be thrown while reading from the files
ParseException - Can be thrown while parsing the files
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HunspellStemmer.Stem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.hunspell
Class HunspellStemmer.Stem

java.lang.Object
    extended by  org.apache.lucene.analysis.hunspell.HunspellStemmer.Stem
Enclosing class:
HunspellStemmer
public static class HunspellStemmer.Stem
extends Object

Stem represents all information known about a stem of a word. This includes the stem, and the prefixes and suffixes that were used to change the word into the stem.

Constructor Summary
HunspellStemmer.Stem(char[] stem, int stemLength)
Creates a new Stem wrapping the given word stem
Method Summary
void | addPrefix(HunspellAffix prefix) Adds a prefix to the list of prefixes used to generate this stem.
void | addSuffix(HunspellAffix suffix) Adds a suffix to the list of suffixes used to generate this stem.
List<HunspellAffix> | getPrefixes() Returns the list of prefixes used to generate the stem
char[] | getStem() Returns the actual word stem itself
int | getStemLength()
String | getStemString()
List<HunspellAffix> | getSuffixes() Returns the list of suffixes used to generate the stem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HunspellStemmer.Stem

public HunspellStemmer.Stem(char[] stem,
                            int stemLength)
Creates a new Stem wrapping the given word stem

Parameters:
stem - Stem of a word
Method Detail

addPrefix

public void addPrefix(HunspellAffix prefix)
Adds a prefix to the list of prefixes used to generate this stem. Because it is assumed that prefixes are added depth first, the prefix is added to the front of the list

Parameters:
prefix - Prefix to add to the list of prefixes for this stem

addSuffix

public void addSuffix(HunspellAffix suffix)
Adds a suffix to the list of suffixes used to generate this stem. Because it is assumed that suffixes are added depth first, the suffix is added to the end of the list

Parameters:
suffix - Suffix to add to the list of suffixes for this stem

getPrefixes

public List<HunspellAffix> getPrefixes()
Returns the list of prefixes used to generate the stem

Returns:
List of prefixes used to generate the stem or an empty list if no prefixes were required

getSuffixes

public List<HunspellAffix> getSuffixes()
Returns the list of suffixes used to generate the stem

Returns:
List of suffixes used to generate the stem or an empty list if no suffixes were required

getStem

public char[] getStem()
Returns the actual word stem itself

Returns:
Word stem itself

getStemLength

public int getStemLength()
Returns:
the stemLength

getStemString

public String getStemString()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HunspellWord

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.hunspell
Class HunspellWord

java.lang.Object
    extended by  org.apache.lucene.analysis.hunspell.HunspellWord

public class HunspellWord
extends Object

A dictionary (.dic) entry with its associated flags.

Constructor Summary
HunspellWord()
Creates a new HunspellWord with no associated flags
HunspellWord(char[] flags)
Constructs a new HunspellWord with the given flags
Method Summary
char[] | getFlags() Returns the flags associated with the word
boolean | hasFlag(char flag) Checks whether the word has the given flag associated with it
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HunspellWord

public HunspellWord()
Creates a new HunspellWord with no associated flags

HunspellWord

public HunspellWord(char[] flags)
Constructs a new HunspellWord with the given flags

Parameters:
flags - Flags to associate with the word
Method Detail

hasFlag

public boolean hasFlag(char flag)
Checks whether the word has the given flag associated with it

Parameters:
flag - Flag to check whether it is associated with the word
Returns:
true if the flag is associated, false otherwise

getFlags

public char[] getFlags()
Returns the flags associated with the word

Returns:
Flags asssociated with the word
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.hunspell
Classes
HunspellAffix
HunspellDictionary
HunspellStemFilter
HunspellStemmer
HunspellStemmer.Stem
HunspellWord


org.apache.lucene.analysis.hunspell

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.hunspell

Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.

See:
Description

Class Summary
HunspellAffix | Wrapper class representing a hunspell affix
HunspellDictionary | In-memory structure for the dictionary (.dic) and affix (.aff) data of a hunspell dictionary.
HunspellStemFilter | TokenFilter that uses hunspell affix rules and words to stem tokens.
HunspellStemmer | HunspellStemmer uses the affix rules declared in the HunspellDictionary to generate one or more stems for a word.
HunspellStemmer.Stem | Stem represents all information known about a stem of a word.
HunspellWord | A dictionary (.dic) entry with its associated flags.

Package org.apache.lucene.analysis.hunspell Description

Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.

Dictionaries can be found on OpenOffice's wiki


org.apache.lucene.analysis.hunspell Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.hunspell

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.hunspell.HunspellStemFilter
    • org.apache.lucene.analysis.hunspell.HunspellAffix
    • org.apache.lucene.analysis.hunspell.HunspellDictionary
    • org.apache.lucene.analysis.hunspell.HunspellStemmer
    • org.apache.lucene.analysis.hunspell.HunspellStemmer.Stem
    • org.apache.lucene.analysis.hunspell.HunspellWord


Uses of Package org.apache.lucene.analysis.hunspell

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.hunspell

Packages that use org.apache.lucene.analysis.hunspell
org.apache.lucene.analysis.hunspell Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.

Classes in org.apache.lucene.analysis.hunspell used by org.apache.lucene.analysis.hunspell
HunspellAffix
Wrapper class representing a hunspell affix
HunspellDictionary
In-memory structure for the dictionary (.dic) and affix (.aff) data of a hunspell dictionary.
HunspellStemmer.Stem
Stem represents all information known about a stem of a word.
HunspellWord
A dictionary (.dic) entry with its associated flags.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.hunspell.HunspellAffix

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.hunspell.HunspellAffix

Packages that use HunspellAffix
org.apache.lucene.analysis.hunspell Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.

Uses of HunspellAffix in org.apache.lucene.analysis.hunspell

Methods in org.apache.lucene.analysis.hunspell that return types with arguments of type HunspellAffix
List<HunspellAffix> | HunspellStemmer.Stem.getPrefixes() Returns the list of prefixes used to generate the stem
List<HunspellAffix> | HunspellStemmer.Stem.getSuffixes() Returns the list of suffixes used to generate the stem
List<HunspellAffix> | HunspellDictionary.lookupPrefix(char[] word, int offset, int length) Looks up HunspellAffix prefixes that have an append that matches the String created from the given char array, offset and length
List<HunspellAffix> | HunspellDictionary.lookupSuffix(char[] word, int offset, int length) Looks up HunspellAffix suffixes that have an append that matches the String created from the given char array, offset and length

Methods in org.apache.lucene.analysis.hunspell with parameters of type HunspellAffix
void | HunspellStemmer.Stem.addPrefix(HunspellAffix prefix) Adds a prefix to the list of prefixes used to generate this stem.
void | HunspellStemmer.Stem.addSuffix(HunspellAffix suffix) Adds a suffix to the list of suffixes used to generate this stem.
List<HunspellStemmer.Stem> | HunspellStemmer.applyAffix(char[] strippedWord, int length, HunspellAffix affix, int recursionDepth) Applies the affix rule to the given word, producing a list of stems if any are found

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.hunspell.HunspellDictionary

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.hunspell.HunspellDictionary

Packages that use HunspellDictionary
org.apache.lucene.analysis.hunspell Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.

Uses of HunspellDictionary in org.apache.lucene.analysis.hunspell

Constructors in org.apache.lucene.analysis.hunspell with parameters of type HunspellDictionary
HunspellStemFilter(TokenStream input, HunspellDictionary dictionary)
Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using affix rules in the provided HunspellDictionary
HunspellStemFilter(TokenStream input, HunspellDictionary dictionary, boolean dedup)
Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using affix rules in the provided HunspellDictionary
HunspellStemmer(HunspellDictionary dictionary)
Constructs a new HunspellStemmer which will use the provided HunspellDictionary to create its stems

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.hunspell.HunspellStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.hunspell.HunspellStemFilter

No usage of org.apache.lucene.analysis.hunspell.HunspellStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.hunspell.HunspellStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.hunspell.HunspellStemmer

No usage of org.apache.lucene.analysis.hunspell.HunspellStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.hunspell.HunspellStemmer.Stem

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.hunspell.HunspellStemmer.Stem

Packages that use HunspellStemmer.Stem
org.apache.lucene.analysis.hunspell Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.

Uses of HunspellStemmer.Stem in org.apache.lucene.analysis.hunspell

Methods in org.apache.lucene.analysis.hunspell that return types with arguments of type HunspellStemmer.Stem
List<HunspellStemmer.Stem> | HunspellStemmer.applyAffix(char[] strippedWord, int length, HunspellAffix affix, int recursionDepth) Applies the affix rule to the given word, producing a list of stems if any are found
List<HunspellStemmer.Stem> | HunspellStemmer.stem(char[] word, int length) Find the stem(s) of the provided word
List<HunspellStemmer.Stem> | HunspellStemmer.stem(String word) Find the stem(s) of the provided word
List<HunspellStemmer.Stem> | HunspellStemmer.uniqueStems(char[] word, int length) Find the unique stem(s) of the provided word

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.hunspell.HunspellWord

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.hunspell.HunspellWord

Packages that use HunspellWord
org.apache.lucene.analysis.hunspell Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.

Uses of HunspellWord in org.apache.lucene.analysis.hunspell

Methods in org.apache.lucene.analysis.hunspell that return types with arguments of type HunspellWord
 List<HunspellWord> HunspellDictionary.lookupWord(char[] word, int offset, int length)
Looks up HunspellWords that match the String created from the given char array, offset and length

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ArmenianAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.hy
Class ArmenianAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.hy.ArmenianAnalyzer
All Implemented Interfaces:
Closeable
public final class ArmenianAnalyzer
extends StopwordAnalyzerBase

Analyzer for Armenian.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Armenian stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
ArmenianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
ArmenianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
ArmenianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Armenian stopwords.

See Also:
Constant Field Values
Constructor Detail

ArmenianAnalyzer

public ArmenianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

ArmenianAnalyzer

public ArmenianAnalyzer(Version matchVersion,
                        Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

ArmenianAnalyzer

public ArmenianAnalyzer(Version matchVersion,
                        Set<?> stopwords,
                        Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and SnowballFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.hy
Classes
ArmenianAnalyzer


org.apache.lucene.analysis.hy

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.hy

Analyzer for Armenian.

See:
Description

Class Summary
ArmenianAnalyzer Analyzer for Armenian.

Package org.apache.lucene.analysis.hy Description

Analyzer for Armenian.


org.apache.lucene.analysis.hy Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.hy

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.hy.ArmenianAnalyzer


Uses of Package org.apache.lucene.analysis.hy

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.hy

No usage of org.apache.lucene.analysis.hy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.hy.ArmenianAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.hy.ArmenianAnalyzer

No usage of org.apache.lucene.analysis.hy.ArmenianAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ICUFoldingFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.icu
Class ICUFoldingFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.icu.ICUNormalizer2Filter
                    extended by  org.apache.lucene.analysis.icu.ICUFoldingFilter
All Implemented Interfaces:
Closeable
public final class ICUFoldingFilter
extends ICUNormalizer2Filter

A TokenFilter that applies search term folding to Unicode text, applying foldings from UTR#30 Character Foldings.

This filter applies the following foldings from the report to unicode text:

  • Accent removal
  • Case folding
  • Canonical duplicates folding
  • Dashes folding
  • Diacritic removal (including stroke, hook, descender)
  • Greek letterforms folding
  • Han Radical folding
  • Hebrew Alternates folding
  • Jamo folding
  • Letterforms folding
  • Math symbol folding
  • Multigraph Expansions: All
  • Native digit folding
  • No-break folding
  • Overline folding
  • Positional forms folding
  • Small forms folding
  • Space folding
  • Spacing Accents folding
  • Subscript folding
  • Superscript folding
  • Suzhou Numeral folding
  • Symbol folding
  • Underline folding
  • Vertical forms folding
  • Width folding

Additionally, Default Ignorables are removed, and text is normalized to NFKC. All foldings, case folding, and normalization mappings are applied recursively to ensure a fully folded and normalized result.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ICUFoldingFilter(TokenStream input)
Create a new ICUFoldingFilter on the specified input
Method Summary
Methods inherited from class org.apache.lucene.analysis.icu.ICUNormalizer2Filter
incrementToken
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ICUFoldingFilter

public ICUFoldingFilter(TokenStream input)
Create a new ICUFoldingFilter on the specified input

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ICUNormalizer2Filter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.icu
Class ICUNormalizer2Filter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.icu.ICUNormalizer2Filter
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
ICUFoldingFilter
public class ICUNormalizer2Filter
extends TokenFilter

Normalize token text with ICU's Normalizer2

With this filter, you can normalize text in the following ways:

  • NFKC Normalization, Case Folding, and removing Ignorables (the default)
  • Using a standard Normalization mode (NFC, NFD, NFKC, NFKD)
  • Based on rules from a custom normalization mapping.

If you use the defaults, this filter is a simple way to standardize Unicode text in a language-independent way for search:

  • The case folding that it does can be seen as a replacement for LowerCaseFilter: For example, it handles cases such as the Greek sigma, so that "Μ??ο?" and "Μ??ΟΣ" will match correctly.
  • The normalization will standardizes different forms of the same character in Unicode. For example, CJK full-width numbers will be standardized to their ASCII forms.
  • Ignorables such as Zero-Width Joiner and Variation Selectors are removed. These are typically modifier characters that affect display.

See Also:
Normalizer2, FilteredNormalizer2

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ICUNormalizer2Filter(TokenStream input)
Create a new Normalizer2Filter that combines NFKC normalization, Case Folding, and removes Default Ignorables (NFKC_Casefold)
ICUNormalizer2Filter(TokenStream input, com.ibm.icu.text.Normalizer2 normalizer)
Create a new Normalizer2Filter with the specified Normalizer2
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ICUNormalizer2Filter

public ICUNormalizer2Filter(TokenStream input)
Create a new Normalizer2Filter that combines NFKC normalization, Case Folding, and removes Default Ignorables (NFKC_Casefold)

ICUNormalizer2Filter

public ICUNormalizer2Filter(TokenStream input,
                            com.ibm.icu.text.Normalizer2 normalizer)
Create a new Normalizer2Filter with the specified Normalizer2

Parameters:
input - stream
normalizer - normalizer to use
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ICUTransformFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.icu
Class ICUTransformFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.icu.ICUTransformFilter
All Implemented Interfaces:
Closeable
public final class ICUTransformFilter
extends TokenFilter

A TokenFilter that transforms text with ICU.

ICU provides text-transformation functionality via its Transliteration API. Although script conversion is its most common use, a Transliterator can actually perform a more general class of tasks. In fact, Transliterator defines a very general API which specifies only that a segment of the input text is replaced by new text. The particulars of this conversion are determined entirely by subclasses of Transliterator.

Some useful transformations for search are built-in:

  • Conversion from Traditional to Simplified Chinese characters
  • Conversion from Hiragana to Katakana
  • Conversion from Fullwidth to Halfwidth forms.
  • Script conversions, for example Serbian Cyrillic to Latin

Example usage:

stream = new ICUTransformFilter(stream, Transliterator.getInstance("Traditional-Simplified"));

For more details, see the ICU User Guide.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ICUTransformFilter(TokenStream input, com.ibm.icu.text.Transliterator transform)
Create a new ICUTransformFilter that transforms text on the given stream.
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ICUTransformFilter

public ICUTransformFilter(TokenStream input,
                          com.ibm.icu.text.Transliterator transform)
Create a new ICUTransformFilter that transforms text on the given stream.

Parameters:
input - TokenStream to filter.
transform - Transliterator to transform the text.
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.icu
Classes
ICUFoldingFilter
ICUNormalizer2Filter
ICUTransformFilter


org.apache.lucene.analysis.icu

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.icu

Analysis components based on ICU

See:
Description

Class Summary
ICUFoldingFilter | A TokenFilter that applies search term folding to Unicode text, applying foldings from UTR#30 Character Foldings.
ICUNormalizer2Filter | Normalize token text with ICU's Normalizer2
ICUTransformFilter | A TokenFilter that transforms text with ICU.

Package org.apache.lucene.analysis.icu Description

Analysis components based on ICU


org.apache.lucene.analysis.icu Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.icu

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.icu.ICUNormalizer2Filter
            • org.apache.lucene.analysis.icu.ICUFoldingFilter
          • org.apache.lucene.analysis.icu.ICUTransformFilter


Uses of Package org.apache.lucene.analysis.icu

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.icu

Packages that use org.apache.lucene.analysis.icu
org.apache.lucene.analysis.icu Analysis components based on ICU

Classes in org.apache.lucene.analysis.icu used by org.apache.lucene.analysis.icu
ICUNormalizer2Filter
Normalize token text with ICU's Normalizer2

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.icu.ICUFoldingFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.icu.ICUFoldingFilter

No usage of org.apache.lucene.analysis.icu.ICUFoldingFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.icu.ICUNormalizer2Filter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.icu.ICUNormalizer2Filter

Packages that use ICUNormalizer2Filter
org.apache.lucene.analysis.icu Analysis components based on ICU

Uses of ICUNormalizer2Filter in org.apache.lucene.analysis.icu

Subclasses of ICUNormalizer2Filter in org.apache.lucene.analysis.icu
 class ICUFoldingFilter
A TokenFilter that applies search term folding to Unicode text, applying foldings from UTR#30 Character Foldings.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.icu.ICUTransformFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.icu.ICUTransformFilter

No usage of org.apache.lucene.analysis.icu.ICUTransformFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


DefaultICUTokenizerConfig

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.icu.segmentation
Class DefaultICUTokenizerConfig

java.lang.Object
    extended by  org.apache.lucene.analysis.icu.segmentation.ICUTokenizerConfig
        extended by  org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig

public class DefaultICUTokenizerConfig
extends ICUTokenizerConfig

Default ICUTokenizerConfig that is generally applicable to many languages.

Generally tokenizes Unicode text according to UAX#29 (BreakIterator.getWordInstance(ULocale.ROOT)), but with the following tailorings:

  • Thai text is broken into words with a DictionaryBasedBreakIterator
  • Lao, Myanmar, and Khmer text is broken into syllables based on custom BreakIterator rules.
  • Hebrew text has custom tailorings to handle special cases involving punctuation.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static String | WORD_HANGUL Token type for words containing Korean hangul
static String | WORD_HIRAGANA Token type for words containing Japanese hiragana
static String | WORD_IDEO Token type for words containing ideographic characters
static String | WORD_KATAKANA Token type for words containing Japanese katakana
static String | WORD_LETTER Token type for words that contain letters
static String | WORD_NUMBER Token type for words that appear to be numbers
Constructor Summary
DefaultICUTokenizerConfig()
Method Summary
com.ibm.icu.text.BreakIterator | getBreakIterator(int script) Return a breakiterator capable of processing a given script.
String | getType(int script, int ruleStatus) Return a token type value for a given script and BreakIterator rule status.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

WORD_IDEO

public static final String WORD_IDEO
Token type for words containing ideographic characters

WORD_HIRAGANA

public static final String WORD_HIRAGANA
Token type for words containing Japanese hiragana

WORD_KATAKANA

public static final String WORD_KATAKANA
Token type for words containing Japanese katakana

WORD_HANGUL

public static final String WORD_HANGUL
Token type for words containing Korean hangul

WORD_LETTER

public static final String WORD_LETTER
Token type for words that contain letters

WORD_NUMBER

public static final String WORD_NUMBER
Token type for words that appear to be numbers

Constructor Detail

DefaultICUTokenizerConfig

public DefaultICUTokenizerConfig()
Method Detail

getBreakIterator

public com.ibm.icu.text.BreakIterator getBreakIterator(int script)
Description copied from class: ICUTokenizerConfig
Return a breakiterator capable of processing a given script.

Specified by:
getBreakIterator in class ICUTokenizerConfig

getType

public String getType(int script,
                      int ruleStatus)
Description copied from class: ICUTokenizerConfig
Return a token type value for a given script and BreakIterator rule status.

Specified by:
getType in class ICUTokenizerConfig
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ICUTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.icu.segmentation
Class ICUTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.icu.segmentation.ICUTokenizer
All Implemented Interfaces:
Closeable
public final class ICUTokenizer
extends Tokenizer

Breaks text into words according to UAX #29: Unicode Text Segmentation (http://www.unicode.org/reports/tr29/)

Words are broken across script boundaries, then segmented according to the BreakIterator and typing provided by the ICUTokenizerConfig

See Also:
ICUTokenizerConfig
WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
ICUTokenizer(Reader input)
Construct a new ICUTokenizer that breaks text into words from the given Reader.
ICUTokenizer(Reader input, ICUTokenizerConfig config)
Construct a new ICUTokenizer that breaks text into words from the given Reader, using a tailored BreakIterator configuration.
Method Summary
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset()
Resets this stream to the beginning.
 void reset(Reader input)
Expert: Reset the tokenizer to a new reader.
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ICUTokenizer

public ICUTokenizer(Reader input)
Construct a new ICUTokenizer that breaks text into words from the given Reader.

The default script-specific handling is used.

Parameters:
input - Reader containing text to tokenize.
See Also:
DefaultICUTokenizerConfig

ICUTokenizer

public ICUTokenizer(Reader input,
                    ICUTokenizerConfig config)
Construct a new ICUTokenizer that breaks text into words from the given Reader, using a tailored BreakIterator configuration.

Parameters:
input - Reader containing text to tokenize.
config - Tailored BreakIterator configuration
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException

reset

public void reset(Reader input)
           throws IOException
Description copied from class: Tokenizer
Expert: Reset the tokenizer to a new reader. Typically, an analyzer (in its reusableTokenStream method) will use this to re-use a previously created tokenizer.

Overrides:
reset in class Tokenizer
Throws:
IOException

end

public void end()
         throws IOException
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ICUTokenizerConfig

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.icu.segmentation
Class ICUTokenizerConfig

java.lang.Object
    extended by  org.apache.lucene.analysis.icu.segmentation.ICUTokenizerConfig
Direct Known Subclasses:
DefaultICUTokenizerConfig
public abstract class ICUTokenizerConfig
extends Object

Class that allows for tailored Unicode Text Segmentation on a per-writing system basis.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ICUTokenizerConfig()
Method Summary
abstract com.ibm.icu.text.BreakIterator | getBreakIterator(int script) Return a breakiterator capable of processing a given script.
abstract String | getType(int script, int ruleStatus) Return a token type value for a given script and BreakIterator rule status.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ICUTokenizerConfig

public ICUTokenizerConfig()
Method Detail

getBreakIterator

public abstract com.ibm.icu.text.BreakIterator getBreakIterator(int script)
Return a breakiterator capable of processing a given script.

getType

public abstract String getType(int script,
                               int ruleStatus)
Return a token type value for a given script and BreakIterator rule status.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LaoBreakIterator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.icu.segmentation
Class LaoBreakIterator

java.lang.Object
    extended by  com.ibm.icu.text.BreakIterator
        extended by  org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator
All Implemented Interfaces:
Cloneable
public class LaoBreakIterator
extends com.ibm.icu.text.BreakIterator

Syllable iterator for Lao text.

This breaks Lao text into syllables according to: Syllabification of Lao Script for Line Breaking Phonpasit Phissamay, Valaxay Dalolay, Chitaphone Chanhsililath, Oulaiphone Silimasak, Sarmad Hussain, Nadir Durrani, Science Technology and Environment Agency, CRULP.

  • http://www.panl10n.net/english/final%20reports/pdf%20files/Laos/LAO06.pdf
  • http://www.panl10n.net/Presentations/Cambodia/Phonpassit/LineBreakingAlgo.pdf

Most work is accomplished with RBBI rules, however some additional special logic is needed that cannot be coded in a grammar, and this is implemented here.

For example, what appears to be a final consonant might instead be part of the next syllable. Rules match in a greedy fashion, leaving an illegal sequence that matches no rules.

Take for instance the text ??????? The first rule greedily matches ?????, but then ?? is encountered, which is illegal. What LaoBreakIterator does, according to the paper:

  1. backtrack and remove the ? from the last syllable, placing it on the current syllable.
  2. verify the modified previous syllable (???? ) is still legal.
  3. verify the modified current syllable (???) is now legal.
  4. If 2 or 3 fails, then restore the ? to the last syllable and skip the current character.

Finally, LaoBreakIterator also takes care of the second concern mentioned in the paper. This is the issue of combining marks being in the wrong order (typos).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class com.ibm.icu.text.BreakIterator
DONE, KIND_CHARACTER, KIND_LINE, KIND_SENTENCE, KIND_TITLE, KIND_WORD
Constructor Summary
LaoBreakIterator(com.ibm.icu.text.RuleBasedBreakIterator rules)
Method Summary
Object | clone() Clone method.
int | current()
int | first()
int | following(int offset)
CharacterIterator | getText()
int | last()
int | next()
int | next(int n)
int | previous()
void | setText(CharacterIterator text)
void | setText(String newText)
Methods inherited from class com.ibm.icu.text.BreakIterator
getAvailableLocales, getAvailableULocales, getBreakInstance, getCharacterInstance, getCharacterInstance, getCharacterInstance, getLineInstance, getLineInstance, getLineInstance, getLocale, getSentenceInstance, getSentenceInstance, getSentenceInstance, getTitleInstance, getTitleInstance, getTitleInstance, getWordInstance, getWordInstance, getWordInstance, isBoundary, preceding, registerInstance, registerInstance, unregister
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LaoBreakIterator

public LaoBreakIterator(com.ibm.icu.text.RuleBasedBreakIterator rules)
Method Detail

current

public int current()
Specified by:
current in class com.ibm.icu.text.BreakIterator

first

public int first()
Specified by:
first in class com.ibm.icu.text.BreakIterator

following

public int following(int offset)
Specified by:
following in class com.ibm.icu.text.BreakIterator

getText

public CharacterIterator getText()
Specified by:
getText in class com.ibm.icu.text.BreakIterator

last

public int last()
Specified by:
last in class com.ibm.icu.text.BreakIterator

next

public int next()
Specified by:
next in class com.ibm.icu.text.BreakIterator

next

public int next(int n)
Specified by:
next in class com.ibm.icu.text.BreakIterator

previous

public int previous()
Specified by:
previous in class com.ibm.icu.text.BreakIterator

setText

public void setText(CharacterIterator text)
Specified by:
setText in class com.ibm.icu.text.BreakIterator

setText

public void setText(String newText)
Overrides:
setText in class com.ibm.icu.text.BreakIterator

clone

public Object clone()
Clone method. Creates another LaoBreakIterator with the same behavior and current state as this one.

Overrides:
clone in class com.ibm.icu.text.BreakIterator
Returns:
The clone.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.icu.segmentation
Classes
DefaultICUTokenizerConfig
ICUTokenizer
ICUTokenizerConfig
LaoBreakIterator


org.apache.lucene.analysis.icu.segmentation

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.icu.segmentation

Tokenizer that breaks text into words with the Unicode Text Segmentation algorithm.

See:
Description

Class Summary
DefaultICUTokenizerConfig | Default ICUTokenizerConfig that is generally applicable to many languages.
ICUTokenizer | Breaks text into words according to UAX #29: Unicode Text Segmentation (http://www.unicode.org/reports/tr29/)
ICUTokenizerConfig | Class that allows for tailored Unicode Text Segmentation on a per-writing system basis.
LaoBreakIterator | Syllable iterator for Lao text.

Package org.apache.lucene.analysis.icu.segmentation Description

Tokenizer that breaks text into words with the Unicode Text Segmentation algorithm.


org.apache.lucene.analysis.icu.segmentation Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.icu.segmentation

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.Tokenizer
          • org.apache.lucene.analysis.icu.segmentation.ICUTokenizer
    • com.ibm.icu.text.BreakIterator (implements java.lang.Cloneable)
      • org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator
    • org.apache.lucene.analysis.icu.segmentation.ICUTokenizerConfig
      • org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig


Uses of Package org.apache.lucene.analysis.icu.segmentation

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.icu.segmentation

Packages that use org.apache.lucene.analysis.icu.segmentation
org.apache.lucene.analysis.icu.segmentation Tokenizer that breaks text into words with the Unicode Text Segmentation algorithm.

Classes in org.apache.lucene.analysis.icu.segmentation used by org.apache.lucene.analysis.icu.segmentation
ICUTokenizerConfig
Class that allows for tailored Unicode Text Segmentation on a per-writing system basis.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig

No usage of org.apache.lucene.analysis.icu.segmentation.DefaultICUTokenizerConfig

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.icu.segmentation.ICUTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.icu.segmentation.ICUTokenizer

No usage of org.apache.lucene.analysis.icu.segmentation.ICUTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.icu.segmentation.ICUTokenizerConfig

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.icu.segmentation.ICUTokenizerConfig

Packages that use ICUTokenizerConfig
org.apache.lucene.analysis.icu.segmentation Tokenizer that breaks text into words with the Unicode Text Segmentation algorithm.

Uses of ICUTokenizerConfig in org.apache.lucene.analysis.icu.segmentation

Subclasses of ICUTokenizerConfig in org.apache.lucene.analysis.icu.segmentation
 class DefaultICUTokenizerConfig
Default ICUTokenizerConfig that is generally applicable to many languages.

Constructors in org.apache.lucene.analysis.icu.segmentation with parameters of type ICUTokenizerConfig
ICUTokenizer(Reader input, ICUTokenizerConfig config)
Construct a new ICUTokenizer that breaks text into words from the given Reader, using a tailored BreakIterator configuration.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator

No usage of org.apache.lucene.analysis.icu.segmentation.LaoBreakIterator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.icu.tokenattributes
Interfaces
ScriptAttribute
Classes
ScriptAttributeImpl


org.apache.lucene.analysis.icu.tokenattributes

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.icu.tokenattributes

Additional ICU-specific Attributes for text analysis.

See:
Description

Interface Summary
ScriptAttribute This attribute stores the UTR #24 script value for a token of text.

Class Summary
ScriptAttributeImpl Implementation of ScriptAttribute that stores the script as an integer.

Package org.apache.lucene.analysis.icu.tokenattributes Description

Additional ICU-specific Attributes for text analysis.


org.apache.lucene.analysis.icu.tokenattributes Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.icu.tokenattributes

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeImpl (implements org.apache.lucene.util.Attribute, java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.icu.tokenattributes.ScriptAttribute, java.io.Serializable)

Interface Hierarchy

  • org.apache.lucene.util.Attribute
    • org.apache.lucene.analysis.icu.tokenattributes.ScriptAttribute


Uses of Package org.apache.lucene.analysis.icu.tokenattributes

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.icu.tokenattributes

Packages that use org.apache.lucene.analysis.icu.tokenattributes
org.apache.lucene.analysis.icu.tokenattributes Additional ICU-specific Attributes for text analysis.

Classes in org.apache.lucene.analysis.icu.tokenattributes used by org.apache.lucene.analysis.icu.tokenattributes
ScriptAttribute
This attribute stores the UTR #24 script value for a token of text.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ScriptAttribute

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.icu.tokenattributes
Interface ScriptAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
ScriptAttributeImpl
public interface ScriptAttribute
extends Attribute

This attribute stores the UTR #24 script value for a token of text.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
int | getCode() Get the numeric code for this script value.
String | getName() Get the full name.
String | getShortName() Get the abbreviated name.
void | setCode(int code) Set the numeric code for this script value.

Method Detail

getCode

int getCode()
Get the numeric code for this script value. This is the constant value from UScript.

Returns:
numeric code

setCode

void setCode(int code)
Set the numeric code for this script value. This is the constant value from UScript.

Parameters:
code - numeric code

getName

String getName()
Get the full name.

Returns:
UTR #24 full name.

getShortName

String getShortName()
Get the abbreviated name.

Returns:
UTR #24 abbreviated name.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ScriptAttributeImpl

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.icu.tokenattributes
Class ScriptAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ScriptAttribute, Attribute
public class ScriptAttributeImpl
extends AttributeImpl
implements ScriptAttribute, Cloneable, Serializable

Implementation of ScriptAttribute that stores the script as an integer.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
ScriptAttributeImpl()
Method Summary
void | clear() Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other)
int | getCode() Get the numeric code for this script value.
String | getName() Get the full name.
String | getShortName() Get the abbreviated name.
int | hashCode()
void | reflectWith(AttributeReflector reflector) This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.
void | setCode(int code) Set the numeric code for this script value.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ScriptAttributeImpl

public ScriptAttributeImpl()
Method Detail

getCode

public int getCode()
Description copied from interface: ScriptAttribute
Get the numeric code for this script value. This is the constant value from UScript.

Specified by:
getCode in interface ScriptAttribute
Returns:
numeric code

setCode

public void setCode(int code)
Description copied from interface: ScriptAttribute
Set the numeric code for this script value. This is the constant value from UScript.

Specified by:
setCode in interface ScriptAttribute
Parameters:
code - numeric code

getName

public String getName()
Description copied from interface: ScriptAttribute
Get the full name.

Specified by:
getName in interface ScriptAttribute
Returns:
UTR #24 full name.

getShortName

public String getShortName()
Description copied from interface: ScriptAttribute
Get the abbreviated name.

Specified by:
getShortName in interface ScriptAttribute
Returns:
UTR #24 abbreviated name.

clear

public void clear()
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

reflectWith

public void reflectWith(AttributeReflector reflector)
Description copied from class: AttributeImpl
This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.

The default implementation calls AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) for all non-static fields from the implementing class, using the field name as key and the field value as value. The Attribute class is also determined by reflection. Please note that the default implementation can only handle single-Attribute implementations.

Custom implementations look like this (e.g. for a combined attribute implementation):

   public void reflectWith(AttributeReflector reflector) {
     reflector.reflect(CharTermAttribute.class, "term", term());
     reflector.reflect(PositionIncrementAttribute.class, "positionIncrement", getPositionIncrement());
   }

If you implement this method, make sure that for each invocation, the same set of Attribute interfaces and keys are passed to AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) in the same order, but possibly different values. So don't automatically exclude e.g. null properties!

Overrides:
reflectWith in class AttributeImpl
See Also:
AttributeImpl.reflectAsString(boolean)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Interface org.apache.lucene.analysis.icu.tokenattributes.ScriptAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.icu.tokenattributes.ScriptAttribute

Packages that use ScriptAttribute
org.apache.lucene.analysis.icu.tokenattributes Additional ICU-specific Attributes for text analysis.

Uses of ScriptAttribute in org.apache.lucene.analysis.icu.tokenattributes

Classes in org.apache.lucene.analysis.icu.tokenattributes that implement ScriptAttribute
 class ScriptAttributeImpl
Implementation of ScriptAttribute that stores the script as an integer.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl

No usage of org.apache.lucene.analysis.icu.tokenattributes.ScriptAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


IndonesianAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.id
Class IndonesianAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.id.IndonesianAnalyzer
All Implemented Interfaces:
Closeable
public final class IndonesianAnalyzer
extends StopwordAnalyzerBase

Analyzer for Indonesian (Bahasa)

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Indonesian stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
IndonesianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
IndonesianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
IndonesianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop word.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop-words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Indonesian stopwords.

See Also:
Constant Field Values
Constructor Detail

IndonesianAnalyzer

public IndonesianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

IndonesianAnalyzer

public IndonesianAnalyzer(Version matchVersion,
                          Set<?> stopwords)
Builds an analyzer with the given stop words

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

IndonesianAnalyzer

public IndonesianAnalyzer(Version matchVersion,
                          Set<?> stopwords,
                          Set<?> stemExclusionSet)
Builds an analyzer with the given stop word. If a none-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before IndonesianStemFilter.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.

Returns:
an unmodifiable instance of the default stop-words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter, KeywordMarkerFilter if a stem exclusion set is provided and IndonesianStemFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


IndonesianStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.id
Class IndonesianStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.id.IndonesianStemFilter
All Implemented Interfaces:
Closeable
public final class IndonesianStemFilter
extends TokenFilter

A TokenFilter that applies IndonesianStemmer to stem Indonesian words.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
IndonesianStemFilter(TokenStream input)
Calls IndonesianStemFilter(input, true)
IndonesianStemFilter(TokenStream input, boolean stemDerivational)
Create a new IndonesianStemFilter.
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

IndonesianStemFilter

public IndonesianStemFilter(TokenStream input)
Calls IndonesianStemFilter(input, true)

IndonesianStemFilter

public IndonesianStemFilter(TokenStream input,
                            boolean stemDerivational)
Create a new IndonesianStemFilter.

If stemDerivational is false, only inflectional suffixes (particles and possessive pronouns) are stemmed.

Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndonesianStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.id
Class IndonesianStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.id.IndonesianStemmer

public class IndonesianStemmer
extends Object

Stemmer for Indonesian.

Stems Indonesian words with the algorithm presented in: A Study of Stemming Effects on Information Retrieval in Bahasa Indonesia, Fadillah Z Tala. http://www.illc.uva.nl/Publications/ResearchReports/MoL-2003-02.text.pdf

Constructor Summary
IndonesianStemmer()
Method Summary
 int stem(char[] text, int length, boolean stemDerivational)
Stem a term (returning its new length).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IndonesianStemmer

public IndonesianStemmer()
Method Detail

stem

public int stem(char[] text,
                int length,
                boolean stemDerivational)
Stem a term (returning its new length).

Use stemDerivational to control whether full stemming or only light inflectional stemming is done.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.id
Classes
IndonesianAnalyzer
IndonesianStemFilter
IndonesianStemmer


org.apache.lucene.analysis.id

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.id

Analyzer for Indonesian.

See:
Description

Class Summary
IndonesianAnalyzer | Analyzer for Indonesian (Bahasa)
IndonesianStemFilter | A TokenFilter that applies IndonesianStemmer to stem Indonesian words.
IndonesianStemmer | Stemmer for Indonesian.

Package org.apache.lucene.analysis.id Description

Analyzer for Indonesian.


org.apache.lucene.analysis.id Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.id

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.id.IndonesianAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.id.IndonesianStemFilter
    • org.apache.lucene.analysis.id.IndonesianStemmer


Uses of Package org.apache.lucene.analysis.id

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.id

No usage of org.apache.lucene.analysis.id

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.id.IndonesianAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.id.IndonesianAnalyzer

No usage of org.apache.lucene.analysis.id.IndonesianAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.id.IndonesianStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.id.IndonesianStemFilter

No usage of org.apache.lucene.analysis.id.IndonesianStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.id.IndonesianStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.id.IndonesianStemmer

No usage of org.apache.lucene.analysis.id.IndonesianStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


IndicNormalizationFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.in
Class IndicNormalizationFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.in.IndicNormalizationFilter
All Implemented Interfaces:
Closeable
public final class IndicNormalizationFilter
extends TokenFilter

A TokenFilter that applies IndicNormalizer to normalize text in Indian Languages.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
IndicNormalizationFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

IndicNormalizationFilter

public IndicNormalizationFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


IndicNormalizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.in
Class IndicNormalizer

java.lang.Object
    extended by  org.apache.lucene.analysis.in.IndicNormalizer

public class IndicNormalizer
extends Object

Normalizes the Unicode representation of text in Indian languages.

Follows guidelines from Unicode 5.2, chapter 6, South Asian Scripts I and graphical decompositions from http://ldc.upenn.edu/myl/IndianScriptsUnicode.html

Constructor Summary
IndicNormalizer()
Method Summary
 int normalize(char[] text, int len)
Normalizes input text, and returns the new length.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IndicNormalizer

public IndicNormalizer()
Method Detail

normalize

public int normalize(char[] text,
                     int len)
Normalizes input text, and returns the new length. The length will always be less than or equal to the existing length.

Parameters:
text - input text
len - valid length
Returns:
normalized length
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndicTokenizer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.in
Class IndicTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.CharTokenizer
                    extended by  org.apache.lucene.analysis.in.IndicTokenizer
All Implemented Interfaces:
Closeable
Deprecated. (3.6) Use StandardTokenizer instead.

@Deprecated
public final class IndicTokenizer
extends CharTokenizer

Simple Tokenizer for text in Indian Languages.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
IndicTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader input)
Deprecated.
IndicTokenizer(Version matchVersion, AttributeSource source, Reader input)
Deprecated.
IndicTokenizer(Version matchVersion, Reader input)
Deprecated.
Method Summary
protected  boolean isTokenChar(int c)
Deprecated. Returns true iff a codepoint should be included in a token.
Methods inherited from class org.apache.lucene.analysis.CharTokenizer
end, incrementToken, isTokenChar, normalize, normalize, reset
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.analysis.TokenStream
reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

IndicTokenizer

public IndicTokenizer(Version matchVersion,
                      AttributeSource.AttributeFactory factory,
                      Reader input)
Deprecated.

IndicTokenizer

public IndicTokenizer(Version matchVersion,
                      AttributeSource source,
                      Reader input)
Deprecated.

IndicTokenizer

public IndicTokenizer(Version matchVersion,
                      Reader input)
Deprecated.
Method Detail

isTokenChar

protected boolean isTokenChar(int c)
Deprecated.
Description copied from class: CharTokenizer
Returns true iff a codepoint should be included in a token. This tokenizer generates as tokens adjacent sequences of codepoints which satisfy this predicate. Codepoints for which this is false are used to define token boundaries and are not included in tokens.

As of Lucene 3.1 the char based API (CharTokenizer.isTokenChar(char) and CharTokenizer.normalize(char)) has been depreciated in favor of a Unicode 4.0 compatible int based API to support codepoints instead of UTF-16 code units. Subclasses of CharTokenizer must not override the char based methods if a Version >= 3.1 is passed to the constructor.

NOTE: This method will be marked abstract in Lucene 4.0.

Overrides:
isTokenChar in class CharTokenizer
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.in
Classes
IndicNormalizationFilter
IndicNormalizer
IndicTokenizer


org.apache.lucene.analysis.in

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.in

Analysis components for Indian languages.

See:
Description

Class Summary
IndicNormalizationFilter | A TokenFilter that applies IndicNormalizer to normalize text in Indian Languages.
IndicNormalizer | Normalizes the Unicode representation of text in Indian languages.
IndicTokenizer | Deprecated. (3.6) Use StandardTokenizer instead.

Package org.apache.lucene.analysis.in Description

Analysis components for Indian languages.


org.apache.lucene.analysis.in Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.in

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.in.IndicNormalizationFilter
        • org.apache.lucene.analysis.Tokenizer
          • org.apache.lucene.analysis.CharTokenizer
            • org.apache.lucene.analysis.in.IndicTokenizer
    • org.apache.lucene.analysis.in.IndicNormalizer


Uses of Package org.apache.lucene.analysis.in

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.in

No usage of org.apache.lucene.analysis.in

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.in.IndicNormalizationFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.in.IndicNormalizationFilter

No usage of org.apache.lucene.analysis.in.IndicNormalizationFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.in.IndicNormalizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.in.IndicNormalizer

No usage of org.apache.lucene.analysis.in.IndicNormalizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.in.IndicTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.in.IndicTokenizer

No usage of org.apache.lucene.analysis.in.IndicTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ItalianAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.it
Class ItalianAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.it.ItalianAnalyzer
All Implemented Interfaces:
Closeable
public final class ItalianAnalyzer
extends StopwordAnalyzerBase

Analyzer for Italian.

You must specify the required Version compatibility when creating ItalianAnalyzer:

  • As of 3.6, ItalianLightStemFilter is used for less aggressive stemming.
  • As of 3.2, ElisionFilter with a set of Italian contractions is used by default.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Italian stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
ItalianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
ItalianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
ItalianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Italian stopwords.

See Also:
Constant Field Values
Constructor Detail

ItalianAnalyzer

public ItalianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

ItalianAnalyzer

public ItalianAnalyzer(Version matchVersion,
                       Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

ItalianAnalyzer

public ItalianAnalyzer(Version matchVersion,
                       Set<?> stopwords,
                       Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, ElisionFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and ItalianLightStemFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ItalianLightStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.it
Class ItalianLightStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.it.ItalianLightStemFilter
All Implemented Interfaces:
Closeable
public final class ItalianLightStemFilter
extends TokenFilter

A TokenFilter that applies ItalianLightStemmer to stem Italian words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ItalianLightStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ItalianLightStemFilter

public ItalianLightStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ItalianLightStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.it
Class ItalianLightStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.it.ItalianLightStemmer

public class ItalianLightStemmer
extends Object

Light Stemmer for Italian.

This stemmer implements the algorithm described in: Report on CLEF-2001 Experiments Jacques Savoy

Constructor Summary
ItalianLightStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ItalianLightStemmer

public ItalianLightStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.it
Classes
ItalianAnalyzer
ItalianLightStemFilter
ItalianLightStemmer


org.apache.lucene.analysis.it

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.it

Analyzer for Italian.

See:
Description

Class Summary
ItalianAnalyzer | Analyzer for Italian.
ItalianLightStemFilter | A TokenFilter that applies ItalianLightStemmer to stem Italian words.
ItalianLightStemmer | Light Stemmer for Italian.

Package org.apache.lucene.analysis.it Description

Analyzer for Italian.


org.apache.lucene.analysis.it Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.it

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.it.ItalianAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.it.ItalianLightStemFilter
    • org.apache.lucene.analysis.it.ItalianLightStemmer


Uses of Package org.apache.lucene.analysis.it

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.it

No usage of org.apache.lucene.analysis.it

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.it.ItalianAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.it.ItalianAnalyzer

No usage of org.apache.lucene.analysis.it.ItalianAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.it.ItalianLightStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.it.ItalianLightStemFilter

No usage of org.apache.lucene.analysis.it.ItalianLightStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.it.ItalianLightStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.it.ItalianLightStemmer

No usage of org.apache.lucene.analysis.it.ItalianLightStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


GraphvizFormatter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja
Class GraphvizFormatter

java.lang.Object
    extended by  org.apache.lucene.analysis.ja.GraphvizFormatter

public class GraphvizFormatter
extends Object

Outputs the dot (graphviz) string for the viterbi lattice.

Constructor Summary
GraphvizFormatter(ConnectionCosts costs)
Method Summary
 String finish()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GraphvizFormatter

public GraphvizFormatter(ConnectionCosts costs)
Method Detail

finish

public String finish()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


JapaneseAnalyzer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja
Class JapaneseAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.ja.JapaneseAnalyzer
All Implemented Interfaces:
Closeable
public class JapaneseAnalyzer
extends StopwordAnalyzerBase

Analyzer for Japanese that uses morphological analysis.

See Also:
JapaneseTokenizer

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
JapaneseAnalyzer(Version matchVersion)
JapaneseAnalyzer(Version matchVersion, UserDictionary userDict, JapaneseTokenizer.Mode mode, CharArraySet stopwords, Set<String> stoptags)
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.
static CharArraySet | getDefaultStopSet()
static Set<String> | getDefaultStopTags()
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JapaneseAnalyzer

public JapaneseAnalyzer(Version matchVersion)

JapaneseAnalyzer

public JapaneseAnalyzer(Version matchVersion,
                        UserDictionary userDict,
                        JapaneseTokenizer.Mode mode,
                        CharArraySet stopwords,
                        Set<String> stoptags)
Method Detail

getDefaultStopSet

public static CharArraySet getDefaultStopSet()

getDefaultStopTags

public static Set<String> getDefaultStopTags()

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Description copied from class: ReusableAnalyzerBase
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
the ReusableAnalyzerBase.TokenStreamComponents for this analyzer.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JapaneseBaseFormFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja
Class JapaneseBaseFormFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.ja.JapaneseBaseFormFilter
All Implemented Interfaces:
Closeable
public final class JapaneseBaseFormFilter
extends TokenFilter

Replaces term text with the BaseFormAttribute.

This acts as a lemmatizer for verbs and adjectives.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
JapaneseBaseFormFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

JapaneseBaseFormFilter

public JapaneseBaseFormFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JapaneseKatakanaStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja
Class JapaneseKatakanaStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.ja.JapaneseKatakanaStemFilter
All Implemented Interfaces:
Closeable
public final class JapaneseKatakanaStemFilter
extends TokenFilter

A TokenFilter that normalizes common katakana spelling variations ending in a long sound character by removing this character (U+30FC). Only katakana words longer than a minimum length are stemmed (default is four).

Note that only full-width katakana characters are supported. Please use a CJKWidthFilter to convert half-width katakana to full-width before using this filter.

In order to prevent terms from being stemmed, use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static int DEFAULT_MINIMUM_LENGTH
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
JapaneseKatakanaStemFilter(TokenStream input)
JapaneseKatakanaStemFilter(TokenStream input, int minimumLength)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_MINIMUM_LENGTH

public static final int DEFAULT_MINIMUM_LENGTH
See Also:
Constant Field Values
Constructor Detail

JapaneseKatakanaStemFilter

public JapaneseKatakanaStemFilter(TokenStream input,
                                  int minimumLength)

JapaneseKatakanaStemFilter

public JapaneseKatakanaStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JapanesePartOfSpeechStopFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja
Class JapanesePartOfSpeechStopFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.FilteringTokenFilter
                    extended by  org.apache.lucene.analysis.ja.JapanesePartOfSpeechStopFilter
All Implemented Interfaces:
Closeable
public final class JapanesePartOfSpeechStopFilter
extends FilteringTokenFilter

Removes tokens that match a set of part-of-speech tags.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
JapanesePartOfSpeechStopFilter(boolean enablePositionIncrements, TokenStream input, Set<String> stopTags)
Method Summary
protected  boolean accept()
Override this method and return if the current input token should be returned by FilteringTokenFilter.incrementToken().
Methods inherited from class org.apache.lucene.analysis.FilteringTokenFilter
getEnablePositionIncrements, incrementToken, reset, setEnablePositionIncrements
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

JapanesePartOfSpeechStopFilter

public JapanesePartOfSpeechStopFilter(boolean enablePositionIncrements,
                                      TokenStream input,
                                      Set<String> stopTags)
Method Detail

accept

protected boolean accept()
                  throws IOException
Description copied from class: FilteringTokenFilter
Override this method and return if the current input token should be returned by FilteringTokenFilter.incrementToken().

Specified by:
accept in class FilteringTokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JapaneseReadingFormFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja
Class JapaneseReadingFormFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.ja.JapaneseReadingFormFilter
All Implemented Interfaces:
Closeable
public final class JapaneseReadingFormFilter
extends TokenFilter

A TokenFilter that replaces the term attribute with the reading of a token in either katakana or romaji form. The default reading form is katakana.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
JapaneseReadingFormFilter(TokenStream input)
JapaneseReadingFormFilter(TokenStream input, boolean useRomaji)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

JapaneseReadingFormFilter

public JapaneseReadingFormFilter(TokenStream input,
                                 boolean useRomaji)

JapaneseReadingFormFilter

public JapaneseReadingFormFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JapaneseTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja
Class JapaneseTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.ja.JapaneseTokenizer
All Implemented Interfaces:
Closeable
public final class JapaneseTokenizer
extends Tokenizer

Tokenizer for Japanese that uses morphological analysis.

This tokenizer sets a number of additional attributes:

  • BaseFormAttribute containing base form for inflected adjectives and verbs.
  • PartOfSpeechAttribute containing part-of-speech.
  • ReadingAttribute containing reading and pronunciation.
  • InflectionAttribute containing additional part-of-speech information for inflected forms.

This tokenizer uses a rolling Viterbi search to find the least cost segmentation (path) of the incoming characters. For tokens that appear to be compound (> length 2 for all Kanji, or > length 7 for non-Kanji), we see if there is a 2nd best segmentation of that token after applying penalties to the long tokens. If so, and the Mode is JapaneseTokenizer.Mode.SEARCH, we output the alternate segmentation as well.

Nested Class Summary
static class JapaneseTokenizer.Mode
Tokenization mode: this determines how the tokenizer handles compound and unknown words.
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static JapaneseTokenizer.Mode DEFAULT_MODE
Default tokenization mode.
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
JapaneseTokenizer(Reader input, UserDictionary userDictionary, boolean discardPunctuation, JapaneseTokenizer.Mode mode)
Create a new JapaneseTokenizer.
Method Summary
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset()
Resets this stream to the beginning.
 void reset(Reader input)
Expert: Reset the tokenizer to a new reader.
 void setGraphvizFormatter(GraphvizFormatter dotOut)
Expert: set this to produce graphviz (dot) output of the Viterbi lattice
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_MODE

public static final JapaneseTokenizer.Mode DEFAULT_MODE
Default tokenization mode. Currently this is JapaneseTokenizer.Mode.SEARCH.

Constructor Detail

JapaneseTokenizer

public JapaneseTokenizer(Reader input,
                         UserDictionary userDictionary,
                         boolean discardPunctuation,
                         JapaneseTokenizer.Mode mode)
Create a new JapaneseTokenizer.

Parameters:
input - Reader containing text
userDictionary - Optional: if non-null, user dictionary.
discardPunctuation - true if punctuation tokens should be dropped from the output.
mode - tokenization mode.
Method Detail

setGraphvizFormatter

public void setGraphvizFormatter(GraphvizFormatter dotOut)
Expert: set this to produce graphviz (dot) output of the Viterbi lattice

reset

public void reset(Reader input)
           throws IOException
Description copied from class: Tokenizer
Expert: Reset the tokenizer to a new reader. Typically, an analyzer (in its reusableTokenStream method) will use this to re-use a previously created tokenizer.

Overrides:
reset in class Tokenizer
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException

end

public void end()
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JapaneseTokenizer.Mode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.analysis.ja
Enum JapaneseTokenizer.Mode

java.lang.Object
    extended by  java.lang.Enum<JapaneseTokenizer.Mode>
        extended by  org.apache.lucene.analysis.ja.JapaneseTokenizer.Mode
All Implemented Interfaces:
Serializable, Comparable<JapaneseTokenizer.Mode>
Enclosing class:
JapaneseTokenizer
public static enum JapaneseTokenizer.Mode
extends Enum<JapaneseTokenizer.Mode>

Tokenization mode: this determines how the tokenizer handles compound and unknown words.

Enum Constant Summary
EXTENDED
Extended mode outputs unigrams for unknown words.
NORMAL
Ordinary segmentation: no decomposition for compounds,
SEARCH
Segmentation geared towards search: this includes a decompounding process for long nouns, also including the full compound token as a synonym.
Method Summary
static JapaneseTokenizer.Mode | valueOf(String name) Returns the enum constant of this type with the specified name.
static JapaneseTokenizer.Mode[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

NORMAL

public static final JapaneseTokenizer.Mode NORMAL
Ordinary segmentation: no decomposition for compounds,

SEARCH

public static final JapaneseTokenizer.Mode SEARCH
Segmentation geared towards search: this includes a decompounding process for long nouns, also including the full compound token as a synonym.

EXTENDED

public static final JapaneseTokenizer.Mode EXTENDED
Extended mode outputs unigrams for unknown words.

WARNING: This API is experimental and might change in incompatible ways in the next release.
Method Detail

values

public static final JapaneseTokenizer.Mode[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(JapaneseTokenizer.Mode c : JapaneseTokenizer.Mode.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static JapaneseTokenizer.Mode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


 org.apache.lucene.analysis.ja
Classes
GraphvizFormatter
JapaneseAnalyzer
JapaneseBaseFormFilter
JapaneseKatakanaStemFilter
JapanesePartOfSpeechStopFilter
JapaneseReadingFormFilter
JapaneseTokenizer
Token
Enums
JapaneseTokenizer.Mode


org.apache.lucene.analysis.ja

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.ja

Analyzer for Japanese.

See:
Description

Class Summary
GraphvizFormatter | Outputs the dot (graphviz) string for the viterbi lattice.
JapaneseAnalyzer | Analyzer for Japanese that uses morphological analysis.
JapaneseBaseFormFilter | Replaces term text with the BaseFormAttribute.
JapaneseKatakanaStemFilter | A TokenFilter that normalizes common katakana spelling variations ending in a long sound character by removing this character (U+30FC).
JapanesePartOfSpeechStopFilter | Removes tokens that match a set of part-of-speech tags.
JapaneseReadingFormFilter | A TokenFilter that replaces the term attribute with the reading of a token in either katakana or romaji form.
JapaneseTokenizer | Tokenizer for Japanese that uses morphological analysis.
Token | Analyzed token with morphological data from its dictionary.

Enum Summary
JapaneseTokenizer.Mode Tokenization mode: this determines how the tokenizer handles compound and unknown words.

Package org.apache.lucene.analysis.ja Description

Analyzer for Japanese.


org.apache.lucene.analysis.ja Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.ja

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.ja.JapaneseAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.FilteringTokenFilter
            • org.apache.lucene.analysis.ja.JapanesePartOfSpeechStopFilter
          • org.apache.lucene.analysis.ja.JapaneseBaseFormFilter
          • org.apache.lucene.analysis.ja.JapaneseKatakanaStemFilter
          • org.apache.lucene.analysis.ja.JapaneseReadingFormFilter
        • org.apache.lucene.analysis.Tokenizer
          • org.apache.lucene.analysis.ja.JapaneseTokenizer
    • org.apache.lucene.analysis.ja.GraphvizFormatter
    • org.apache.lucene.analysis.ja.Token

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.analysis.ja.JapaneseTokenizer.Mode


Uses of Package org.apache.lucene.analysis.ja

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.ja

Packages that use org.apache.lucene.analysis.ja
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.ja.tokenattributes | Additional Kuromoji-specific Attributes for text analysis.

Classes in org.apache.lucene.analysis.ja used by org.apache.lucene.analysis.ja
GraphvizFormatter
Outputs the dot (graphviz) string for the viterbi lattice.
JapaneseTokenizer.Mode
Tokenization mode: this determines how the tokenizer handles compound and unknown words.

Classes in org.apache.lucene.analysis.ja used by org.apache.lucene.analysis.ja.tokenattributes
Token
Analyzed token with morphological data from its dictionary.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Token

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja
Class Token

java.lang.Object
    extended by  org.apache.lucene.analysis.ja.Token

public class Token
extends Object

Analyzed token with morphological data from its dictionary.

Constructor Summary
Token(int wordId, char[] surfaceForm, int offset, int length, org.apache.lucene.analysis.ja.JapaneseTokenizer.Type type, int position, Dictionary dictionary)
Method Summary
String | getBaseForm()
String | getInflectionForm()
String | getInflectionType()
int | getLength()
int | getOffset()
String | getPartOfSpeech()
int | getPosition() Get index of this token in input text
int | getPositionLength() Get the length (in tokens) of this token.
String | getPronunciation()
String | getReading()
char[] | getSurfaceForm()
String | getSurfaceFormString()
boolean | isKnown() Returns true if this token is known word
boolean | isUnknown() Returns true if this token is unknown word
boolean | isUser() Returns true if this token is defined in user dictionary
void | setPositionLength(int positionLength) Set the position length (in tokens) of this token.
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Token

public Token(int wordId,
             char[] surfaceForm,
             int offset,
             int length,
             org.apache.lucene.analysis.ja.JapaneseTokenizer.Type type,
             int position,
             Dictionary dictionary)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getSurfaceForm

public char[] getSurfaceForm()
Returns:
surfaceForm

getOffset

public int getOffset()
Returns:
offset into surfaceForm

getLength

public int getLength()
Returns:
length of surfaceForm

getSurfaceFormString

public String getSurfaceFormString()
Returns:
surfaceForm as a String

getReading

public String getReading()
Returns:
reading. null if token doesn't have reading.

getPronunciation

public String getPronunciation()
Returns:
pronunciation. null if token doesn't have pronunciation.

getPartOfSpeech

public String getPartOfSpeech()
Returns:
part of speech.

getInflectionType

public String getInflectionType()
Returns:
inflection type or null

getInflectionForm

public String getInflectionForm()
Returns:
inflection form or null

getBaseForm

public String getBaseForm()
Returns:
base form or null if token is not inflected

isKnown

public boolean isKnown()
Returns true if this token is known word

Returns:
true if this token is in standard dictionary. false if not.

isUnknown

public boolean isUnknown()
Returns true if this token is unknown word

Returns:
true if this token is unknown word. false if not.

isUser

public boolean isUser()
Returns true if this token is defined in user dictionary

Returns:
true if this token is in user dictionary. false if not.

getPosition

public int getPosition()
Get index of this token in input text

Returns:
position of token

setPositionLength

public void setPositionLength(int positionLength)
Set the position length (in tokens) of this token. For normal tokens this is 1; for compound tokens it's > 1.

getPositionLength

public int getPositionLength()
Get the length (in tokens) of this token. For normal tokens this is 1; for compound tokens it's > 1.

Returns:
position length of token
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.ja.GraphvizFormatter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.GraphvizFormatter

Packages that use GraphvizFormatter
org.apache.lucene.analysis.ja Analyzer for Japanese.

Uses of GraphvizFormatter in org.apache.lucene.analysis.ja

Methods in org.apache.lucene.analysis.ja with parameters of type GraphvizFormatter
 void JapaneseTokenizer.setGraphvizFormatter(GraphvizFormatter dotOut)
Expert: set this to produce graphviz (dot) output of the Viterbi lattice

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.JapaneseAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.JapaneseAnalyzer

No usage of org.apache.lucene.analysis.ja.JapaneseAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.JapaneseBaseFormFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.JapaneseBaseFormFilter

No usage of org.apache.lucene.analysis.ja.JapaneseBaseFormFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.JapaneseKatakanaStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.JapaneseKatakanaStemFilter

No usage of org.apache.lucene.analysis.ja.JapaneseKatakanaStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.JapanesePartOfSpeechStopFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.JapanesePartOfSpeechStopFilter

No usage of org.apache.lucene.analysis.ja.JapanesePartOfSpeechStopFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.JapaneseReadingFormFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.JapaneseReadingFormFilter

No usage of org.apache.lucene.analysis.ja.JapaneseReadingFormFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.JapaneseTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.JapaneseTokenizer

No usage of org.apache.lucene.analysis.ja.JapaneseTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.JapaneseTokenizer.Mode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.JapaneseTokenizer.Mode

Packages that use JapaneseTokenizer.Mode
org.apache.lucene.analysis.ja Analyzer for Japanese.

Uses of JapaneseTokenizer.Mode in org.apache.lucene.analysis.ja

Fields in org.apache.lucene.analysis.ja declared as JapaneseTokenizer.Mode
static JapaneseTokenizer.Mode JapaneseTokenizer.DEFAULT_MODE
Default tokenization mode.

Methods in org.apache.lucene.analysis.ja that return JapaneseTokenizer.Mode
static JapaneseTokenizer.Mode | JapaneseTokenizer.Mode.valueOf(String name) Returns the enum constant of this type with the specified name.
static JapaneseTokenizer.Mode[] | JapaneseTokenizer.Mode.values() Returns an array containing the constants of this enum type, in the order they're declared.

Constructors in org.apache.lucene.analysis.ja with parameters of type JapaneseTokenizer.Mode
JapaneseAnalyzer(Version matchVersion, UserDictionary userDict, JapaneseTokenizer.Mode mode, CharArraySet stopwords, Set<String> stoptags)
JapaneseTokenizer(Reader input, UserDictionary userDictionary, boolean discardPunctuation, JapaneseTokenizer.Mode mode)
Create a new JapaneseTokenizer.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.Token

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.Token

Packages that use Token
org.apache.lucene.analysis.ja.tokenattributes Additional Kuromoji-specific Attributes for text analysis.

Uses of Token in org.apache.lucene.analysis.ja.tokenattributes

Methods in org.apache.lucene.analysis.ja.tokenattributes with parameters of type Token
void | InflectionAttribute.setToken(Token token)
void | InflectionAttributeImpl.setToken(Token token)
void | PartOfSpeechAttributeImpl.setToken(Token token)
void | BaseFormAttributeImpl.setToken(Token token)
void | ReadingAttribute.setToken(Token token)
void | BaseFormAttribute.setToken(Token token)
void | ReadingAttributeImpl.setToken(Token token)
void | PartOfSpeechAttribute.setToken(Token token)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


BinaryDictionary

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.dict
Class BinaryDictionary

java.lang.Object
    extended by  org.apache.lucene.analysis.ja.dict.BinaryDictionary
All Implemented Interfaces:
Dictionary
Direct Known Subclasses:
TokenInfoDictionary, UnknownDictionary
public abstract class BinaryDictionary
extends Object
implements Dictionary

Base class for a binary-encoded in-memory dictionary.

Field Summary
static String | DICT_FILENAME_SUFFIX
static String | DICT_HEADER
static int | HAS_BASEFORM flag that the entry has baseform data.
static int | HAS_PRONUNCIATION flag that the entry has pronunciation data.
static int | HAS_READING flag that the entry has reading data.
static String | POSDICT_FILENAME_SUFFIX
static String | POSDICT_HEADER
static String | TARGETMAP_FILENAME_SUFFIX
static String | TARGETMAP_HEADER
static int | VERSION
Fields inherited from interface org.apache.lucene.analysis.ja.dict.Dictionary
INTERNAL_SEPARATOR
Constructor Summary
protected BinaryDictionary()
Method Summary
String | getBaseForm(int wordId, char[] surfaceForm, int off, int len) Get base form of word
static InputStream | getClassResource(Class<?> clazz, String suffix)
String | getInflectionForm(int wordId) Get inflection form of tokens
String | getInflectionType(int wordId) Get inflection type of tokens
int | getLeftId(int wordId) Get left id of specified word
String | getPartOfSpeech(int wordId) Get Part-Of-Speech of tokens
String | getPronunciation(int wordId, char[] surface, int off, int len) Get pronunciation of tokens
String | getReading(int wordId, char[] surface, int off, int len) Get reading of tokens
protected InputStream | getResource(String suffix)
int | getRightId(int wordId) Get right id of specified word
int | getWordCost(int wordId) Get word cost of specified word
void | lookupWordIds(int sourceId, IntsRef ref)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DICT_FILENAME_SUFFIX

public static final String DICT_FILENAME_SUFFIX
See Also:
Constant Field Values

TARGETMAP_FILENAME_SUFFIX

public static final String TARGETMAP_FILENAME_SUFFIX
See Also:
Constant Field Values

POSDICT_FILENAME_SUFFIX

public static final String POSDICT_FILENAME_SUFFIX
See Also:
Constant Field Values

DICT_HEADER

public static final String DICT_HEADER
See Also:
Constant Field Values

TARGETMAP_HEADER

public static final String TARGETMAP_HEADER
See Also:
Constant Field Values

POSDICT_HEADER

public static final String POSDICT_HEADER
See Also:
Constant Field Values

VERSION

public static final int VERSION
See Also:
Constant Field Values

HAS_BASEFORM

public static final int HAS_BASEFORM
flag that the entry has baseform data. otherwise its not inflected (same as surface form)

See Also:
Constant Field Values

HAS_READING

public static final int HAS_READING
flag that the entry has reading data. otherwise reading is surface form converted to katakana

See Also:
Constant Field Values

HAS_PRONUNCIATION

public static final int HAS_PRONUNCIATION
flag that the entry has pronunciation data. otherwise pronunciation is the reading

See Also:
Constant Field Values
Constructor Detail

BinaryDictionary

protected BinaryDictionary()
                    throws IOException
Throws:
IOException
Method Detail

getResource

protected final InputStream getResource(String suffix)
                                 throws IOException
Throws:
IOException

getClassResource

public static final InputStream getClassResource(Class<?> clazz,
                                                 String suffix)
                                          throws IOException
Throws:
IOException

lookupWordIds

public void lookupWordIds(int sourceId,
                          IntsRef ref)

getLeftId

public int getLeftId(int wordId)
Description copied from interface: Dictionary
Get left id of specified word

Specified by:
getLeftId in interface Dictionary
Returns:
left id

getRightId

public int getRightId(int wordId)
Description copied from interface: Dictionary
Get right id of specified word

Specified by:
getRightId in interface Dictionary
Returns:
left id

getWordCost

public int getWordCost(int wordId)
Description copied from interface: Dictionary
Get word cost of specified word

Specified by:
getWordCost in interface Dictionary
Returns:
left id

getBaseForm

public String getBaseForm(int wordId,
                          char[] surfaceForm,
                          int off,
                          int len)
Description copied from interface: Dictionary
Get base form of word

Specified by:
getBaseForm in interface Dictionary
Parameters:
wordId - word ID of token
Returns:
Base form (only different for inflected words, otherwise null)

getReading

public String getReading(int wordId,
                         char[] surface,
                         int off,
                         int len)
Description copied from interface: Dictionary
Get reading of tokens

Specified by:
getReading in interface Dictionary
Parameters:
wordId - word ID of token
Returns:
Reading of the token

getPartOfSpeech

public String getPartOfSpeech(int wordId)
Description copied from interface: Dictionary
Get Part-Of-Speech of tokens

Specified by:
getPartOfSpeech in interface Dictionary
Parameters:
wordId - word ID of token
Returns:
Part-Of-Speech of the token

getPronunciation

public String getPronunciation(int wordId,
                               char[] surface,
                               int off,
                               int len)
Description copied from interface: Dictionary
Get pronunciation of tokens

Specified by:
getPronunciation in interface Dictionary
Parameters:
wordId - word ID of token
Returns:
Pronunciation of the token

getInflectionType

public String getInflectionType(int wordId)
Description copied from interface: Dictionary
Get inflection type of tokens

Specified by:
getInflectionType in interface Dictionary
Parameters:
wordId - word ID of token
Returns:
inflection type, or null

getInflectionForm

public String getInflectionForm(int wordId)
Description copied from interface: Dictionary
Get inflection form of tokens

Specified by:
getInflectionForm in interface Dictionary
Parameters:
wordId - word ID of token
Returns:
inflection form, or null
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CharacterDefinition

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.dict
Class CharacterDefinition

java.lang.Object
    extended by  org.apache.lucene.analysis.ja.dict.CharacterDefinition

public final class CharacterDefinition
extends Object

Character category data.

Field Summary
static byte | ALPHA
static int | CLASS_COUNT
static byte | CYRILLIC
static byte | DEFAULT
static String | FILENAME_SUFFIX
static byte | GREEK
static String | HEADER
static byte | HIRAGANA
static byte | KANJI
static byte | KANJINUMERIC
static byte | KATAKANA
static byte | NGRAM
static byte | NUMERIC
static byte | SPACE
static byte | SYMBOL
static int | VERSION
Method Summary
byte | getCharacterClass(char c)
static CharacterDefinition | getInstance()
boolean | isGroup(char c)
boolean | isInvoke(char c)
boolean | isKanji(char c)
static byte | lookupCharacterClass(String characterClassName)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

FILENAME_SUFFIX

public static final String FILENAME_SUFFIX
See Also:
Constant Field Values

HEADER

public static final String HEADER
See Also:
Constant Field Values

VERSION

public static final int VERSION
See Also:
Constant Field Values

CLASS_COUNT

public static final int CLASS_COUNT

NGRAM

public static final byte NGRAM

DEFAULT

public static final byte DEFAULT

SPACE

public static final byte SPACE

SYMBOL

public static final byte SYMBOL

NUMERIC

public static final byte NUMERIC

ALPHA

public static final byte ALPHA

CYRILLIC

public static final byte CYRILLIC

GREEK

public static final byte GREEK

HIRAGANA

public static final byte HIRAGANA

KATAKANA

public static final byte KATAKANA

KANJI

public static final byte KANJI

KANJINUMERIC

public static final byte KANJINUMERIC
Method Detail

getCharacterClass

public byte getCharacterClass(char c)

isInvoke

public boolean isInvoke(char c)

isGroup

public boolean isGroup(char c)

isKanji

public boolean isKanji(char c)

lookupCharacterClass

public static byte lookupCharacterClass(String characterClassName)

getInstance

public static CharacterDefinition getInstance()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ConnectionCosts

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.dict
Class ConnectionCosts

java.lang.Object
    extended by  org.apache.lucene.analysis.ja.dict.ConnectionCosts

public final class ConnectionCosts
extends Object

n-gram connection cost data

Field Summary
static String | FILENAME_SUFFIX
static String | HEADER
static int | VERSION
Method Summary
int | get(int forwardId, int backwardId)
static ConnectionCosts | getInstance()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

FILENAME_SUFFIX

public static final String FILENAME_SUFFIX
See Also:
Constant Field Values

HEADER

public static final String HEADER
See Also:
Constant Field Values

VERSION

public static final int VERSION
See Also:
Constant Field Values
Method Detail

get

public int get(int forwardId,
               int backwardId)

getInstance

public static ConnectionCosts getInstance()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Dictionary

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.dict
Interface Dictionary

All Known Implementing Classes:
BinaryDictionary, TokenInfoDictionary, UnknownDictionary, UserDictionary
public interface Dictionary

Dictionary interface for retrieving morphological data by id.

Field Summary
static String INTERNAL_SEPARATOR
Method Summary
String | getBaseForm(int wordId, char[] surface, int off, int len) Get base form of word
String | getInflectionForm(int wordId) Get inflection form of tokens
String | getInflectionType(int wordId) Get inflection type of tokens
int | getLeftId(int wordId) Get left id of specified word
String | getPartOfSpeech(int wordId) Get Part-Of-Speech of tokens
String | getPronunciation(int wordId, char[] surface, int off, int len) Get pronunciation of tokens
String | getReading(int wordId, char[] surface, int off, int len) Get reading of tokens
int | getRightId(int wordId) Get right id of specified word
int | getWordCost(int wordId) Get word cost of specified word

Field Detail

INTERNAL_SEPARATOR

static final String INTERNAL_SEPARATOR
See Also:
Constant Field Values
Method Detail

getLeftId

int getLeftId(int wordId)
Get left id of specified word

Parameters:
wordId -
Returns:
left id

getRightId

int getRightId(int wordId)
Get right id of specified word

Parameters:
wordId -
Returns:
left id

getWordCost

int getWordCost(int wordId)
Get word cost of specified word

Parameters:
wordId -
Returns:
left id

getPartOfSpeech

String getPartOfSpeech(int wordId)
Get Part-Of-Speech of tokens

Parameters:
wordId - word ID of token
Returns:
Part-Of-Speech of the token

getReading

String getReading(int wordId,
                  char[] surface,
                  int off,
                  int len)
Get reading of tokens

Parameters:
wordId - word ID of token
Returns:
Reading of the token

getBaseForm

String getBaseForm(int wordId,
                   char[] surface,
                   int off,
                   int len)
Get base form of word

Parameters:
wordId - word ID of token
Returns:
Base form (only different for inflected words, otherwise null)

getPronunciation

String getPronunciation(int wordId,
                        char[] surface,
                        int off,
                        int len)
Get pronunciation of tokens

Parameters:
wordId - word ID of token
Returns:
Pronunciation of the token

getInflectionType

String getInflectionType(int wordId)
Get inflection type of tokens

Parameters:
wordId - word ID of token
Returns:
inflection type, or null

getInflectionForm

String getInflectionForm(int wordId)
Get inflection form of tokens

Parameters:
wordId - word ID of token
Returns:
inflection form, or null
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.ja.dict
Interfaces
Dictionary
Classes
BinaryDictionary
CharacterDefinition
ConnectionCosts
TokenInfoDictionary
TokenInfoFST
UnknownDictionary
UserDictionary


org.apache.lucene.analysis.ja.dict

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.ja.dict

Kuromoji dictionary implementation.

See:
Description

Interface Summary
Dictionary Dictionary interface for retrieving morphological data by id.

Class Summary
BinaryDictionary | Base class for a binary-encoded in-memory dictionary.
CharacterDefinition | Character category data.
ConnectionCosts | n-gram connection cost data
TokenInfoDictionary | Binary dictionary implementation for a known-word dictionary model: Words are encoded into an FST mapping to a list of wordIDs.
TokenInfoFST | Thin wrapper around an FST with root-arc caching for Japanese.
UnknownDictionary | Dictionary for unknown-word handling.
UserDictionary | Class for building a User Dictionary.

Package org.apache.lucene.analysis.ja.dict Description

Kuromoji dictionary implementation.


org.apache.lucene.analysis.ja.dict Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.ja.dict

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.ja.dict.BinaryDictionary (implements org.apache.lucene.analysis.ja.dict.Dictionary)
      • org.apache.lucene.analysis.ja.dict.TokenInfoDictionary
      • org.apache.lucene.analysis.ja.dict.UnknownDictionary
    • org.apache.lucene.analysis.ja.dict.CharacterDefinition
    • org.apache.lucene.analysis.ja.dict.ConnectionCosts
    • org.apache.lucene.analysis.ja.dict.TokenInfoFST
    • org.apache.lucene.analysis.ja.dict.UserDictionary (implements org.apache.lucene.analysis.ja.dict.Dictionary)

Interface Hierarchy

  • org.apache.lucene.analysis.ja.dict.Dictionary


Uses of Package org.apache.lucene.analysis.ja.dict

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.ja.dict

Packages that use org.apache.lucene.analysis.ja.dict
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.ja.dict | Kuromoji dictionary implementation.

Classes in org.apache.lucene.analysis.ja.dict used by org.apache.lucene.analysis.ja
ConnectionCosts
n-gram connection cost data
Dictionary
Dictionary interface for retrieving morphological data by id.
UserDictionary
Class for building a User Dictionary.

Classes in org.apache.lucene.analysis.ja.dict used by org.apache.lucene.analysis.ja.dict
BinaryDictionary
Base class for a binary-encoded in-memory dictionary.
CharacterDefinition
Character category data.
ConnectionCosts
n-gram connection cost data
Dictionary
Dictionary interface for retrieving morphological data by id.
TokenInfoDictionary
Binary dictionary implementation for a known-word dictionary model: Words are encoded into an FST mapping to a list of wordIDs.
TokenInfoFST
Thin wrapper around an FST with root-arc caching for Japanese.
UnknownDictionary
Dictionary for unknown-word handling.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


TokenInfoDictionary

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.dict
Class TokenInfoDictionary

java.lang.Object
    extended by  org.apache.lucene.analysis.ja.dict.BinaryDictionary
        extended by  org.apache.lucene.analysis.ja.dict.TokenInfoDictionary
All Implemented Interfaces:
Dictionary
public final class TokenInfoDictionary
extends BinaryDictionary

Binary dictionary implementation for a known-word dictionary model: Words are encoded into an FST mapping to a list of wordIDs.

Field Summary
static String FST_FILENAME_SUFFIX
Fields inherited from class org.apache.lucene.analysis.ja.dict.BinaryDictionary
DICT_FILENAME_SUFFIX, DICT_HEADER, HAS_BASEFORM, HAS_PRONUNCIATION, HAS_READING, POSDICT_FILENAME_SUFFIX, POSDICT_HEADER, TARGETMAP_FILENAME_SUFFIX, TARGETMAP_HEADER, VERSION
Fields inherited from interface org.apache.lucene.analysis.ja.dict.Dictionary
INTERNAL_SEPARATOR
Method Summary
TokenInfoFST | getFST()
static TokenInfoDictionary | getInstance()
Methods inherited from class org.apache.lucene.analysis.ja.dict.BinaryDictionary
getBaseForm, getClassResource, getInflectionForm, getInflectionType, getLeftId, getPartOfSpeech, getPronunciation, getReading, getResource, getRightId, getWordCost, lookupWordIds
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

FST_FILENAME_SUFFIX

public static final String FST_FILENAME_SUFFIX
See Also:
Constant Field Values
Method Detail

getFST

public TokenInfoFST getFST()

getInstance

public static TokenInfoDictionary getInstance()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TokenInfoFST

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.dict
Class TokenInfoFST

java.lang.Object
    extended by  org.apache.lucene.analysis.ja.dict.TokenInfoFST

public final class TokenInfoFST
extends Object

Thin wrapper around an FST with root-arc caching for Japanese.

Depending upon fasterButMoreRam, either just kana (191 arcs), or kana and han (28,607 arcs) are cached. The latter offers additional performance at the cost of more RAM.

Field Summary
 Long NO_OUTPUT
Constructor Summary
TokenInfoFST(FST<Long> fst, boolean fasterButMoreRam)
Method Summary
FST.Arc<Long> | findTargetArc(int ch, FST.Arc<Long> follow, FST.Arc<Long> arc, boolean useCache, FST.BytesReader fstReader)
FST.BytesReader | getBytesReader(int pos)
FST.Arc<Long> | getFirstArc(FST.Arc<Long> arc)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

NO_OUTPUT

public final Long NO_OUTPUT
Constructor Detail

TokenInfoFST

public TokenInfoFST(FST<Long> fst,
                    boolean fasterButMoreRam)
             throws IOException
Throws:
IOException
Method Detail

findTargetArc

public FST.Arc<Long> findTargetArc(int ch,
                                   FST.Arc<Long> follow,
                                   FST.Arc<Long> arc,
                                   boolean useCache,
                                   FST.BytesReader fstReader)
                            throws IOException
Throws:
IOException

getFirstArc

public FST.Arc<Long> getFirstArc(FST.Arc<Long> arc)

getBytesReader

public FST.BytesReader getBytesReader(int pos)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnknownDictionary

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.dict
Class UnknownDictionary

java.lang.Object
    extended by  org.apache.lucene.analysis.ja.dict.BinaryDictionary
        extended by  org.apache.lucene.analysis.ja.dict.UnknownDictionary
All Implemented Interfaces:
Dictionary
public final class UnknownDictionary
extends BinaryDictionary

Dictionary for unknown-word handling.

Field Summary
Fields inherited from class org.apache.lucene.analysis.ja.dict.BinaryDictionary
DICT_FILENAME_SUFFIX, DICT_HEADER, HAS_BASEFORM, HAS_PRONUNCIATION, HAS_READING, POSDICT_FILENAME_SUFFIX, POSDICT_HEADER, TARGETMAP_FILENAME_SUFFIX, TARGETMAP_HEADER, VERSION
Fields inherited from interface org.apache.lucene.analysis.ja.dict.Dictionary
INTERNAL_SEPARATOR
Method Summary
CharacterDefinition | getCharacterDefinition()
String | getInflectionForm(int wordId) Get inflection form of tokens
String | getInflectionType(int wordId) Get inflection type of tokens
static UnknownDictionary | getInstance()
String | getReading(int wordId, char[] surface, int off, int len) Get reading of tokens
int | lookup(char[] text, int offset, int len)
Methods inherited from class org.apache.lucene.analysis.ja.dict.BinaryDictionary
getBaseForm, getClassResource, getLeftId, getPartOfSpeech, getPronunciation, getResource, getRightId, getWordCost, lookupWordIds
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

lookup

public int lookup(char[] text,
                  int offset,
                  int len)

getCharacterDefinition

public CharacterDefinition getCharacterDefinition()

getReading

public String getReading(int wordId,
                         char[] surface,
                         int off,
                         int len)
Description copied from interface: Dictionary
Get reading of tokens

Specified by:
getReading in interface Dictionary
Overrides:
getReading in class BinaryDictionary
Parameters:
wordId - word ID of token
Returns:
Reading of the token

getInflectionType

public String getInflectionType(int wordId)
Description copied from interface: Dictionary
Get inflection type of tokens

Specified by:
getInflectionType in interface Dictionary
Overrides:
getInflectionType in class BinaryDictionary
Parameters:
wordId - word ID of token
Returns:
inflection type, or null

getInflectionForm

public String getInflectionForm(int wordId)
Description copied from interface: Dictionary
Get inflection form of tokens

Specified by:
getInflectionForm in interface Dictionary
Overrides:
getInflectionForm in class BinaryDictionary
Parameters:
wordId - word ID of token
Returns:
inflection form, or null

getInstance

public static UnknownDictionary getInstance()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UserDictionary

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.dict
Class UserDictionary

java.lang.Object
    extended by  org.apache.lucene.analysis.ja.dict.UserDictionary
All Implemented Interfaces:
Dictionary
public final class UserDictionary
extends Object
implements Dictionary

Class for building a User Dictionary. This class allows for custom segmentation of phrases.

Field Summary
static int | LEFT_ID
static int | RIGHT_ID
static int | WORD_COST
Fields inherited from interface org.apache.lucene.analysis.ja.dict.Dictionary
INTERNAL_SEPARATOR
Constructor Summary
UserDictionary(Reader reader)
Method Summary
String | getBaseForm(int wordId, char[] surface, int off, int len) Get base form of word
TokenInfoFST | getFST()
String | getInflectionForm(int wordId) Get inflection form of tokens
String | getInflectionType(int wordId) Get inflection type of tokens
int | getLeftId(int wordId) Get left id of specified word
String | getPartOfSpeech(int wordId) Get Part-Of-Speech of tokens
String | getPronunciation(int wordId, char[] surface, int off, int len) Get pronunciation of tokens
String | getReading(int wordId, char[] surface, int off, int len) Get reading of tokens
int | getRightId(int wordId) Get right id of specified word
int | getWordCost(int wordId) Get word cost of specified word
int[][] | lookup(char[] chars, int off, int len) Lookup words in text
int[] | lookupSegmentation(int phraseID)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

WORD_COST

public static final int WORD_COST
See Also:
Constant Field Values

LEFT_ID

public static final int LEFT_ID
See Also:
Constant Field Values

RIGHT_ID

public static final int RIGHT_ID
See Also:
Constant Field Values
Constructor Detail

UserDictionary

public UserDictionary(Reader reader)
               throws IOException
Throws:
IOException
Method Detail

lookup

public int[][] lookup(char[] chars,
                      int off,
                      int len)
               throws IOException
Lookup words in text

Parameters:
chars - text
off - offset into text
len - length of text
Returns:
array of {wordId, position, length}
Throws:
IOException

getFST

public TokenInfoFST getFST()

lookupSegmentation

public int[] lookupSegmentation(int phraseID)

getLeftId

public int getLeftId(int wordId)
Description copied from interface: Dictionary
Get left id of specified word

Specified by:
getLeftId in interface Dictionary
Returns:
left id

getRightId

public int getRightId(int wordId)
Description copied from interface: Dictionary
Get right id of specified word

Specified by:
getRightId in interface Dictionary
Returns:
left id

getWordCost

public int getWordCost(int wordId)
Description copied from interface: Dictionary
Get word cost of specified word

Specified by:
getWordCost in interface Dictionary
Returns:
left id

getReading

public String getReading(int wordId,
                         char[] surface,
                         int off,
                         int len)
Description copied from interface: Dictionary
Get reading of tokens

Specified by:
getReading in interface Dictionary
Parameters:
wordId - word ID of token
Returns:
Reading of the token

getPartOfSpeech

public String getPartOfSpeech(int wordId)
Description copied from interface: Dictionary
Get Part-Of-Speech of tokens

Specified by:
getPartOfSpeech in interface Dictionary
Parameters:
wordId - word ID of token
Returns:
Part-Of-Speech of the token

getBaseForm

public String getBaseForm(int wordId,
                          char[] surface,
                          int off,
                          int len)
Description copied from interface: Dictionary
Get base form of word

Specified by:
getBaseForm in interface Dictionary
Parameters:
wordId - word ID of token
Returns:
Base form (only different for inflected words, otherwise null)

getPronunciation

public String getPronunciation(int wordId,
                               char[] surface,
                               int off,
                               int len)
Description copied from interface: Dictionary
Get pronunciation of tokens

Specified by:
getPronunciation in interface Dictionary
Parameters:
wordId - word ID of token
Returns:
Pronunciation of the token

getInflectionType

public String getInflectionType(int wordId)
Description copied from interface: Dictionary
Get inflection type of tokens

Specified by:
getInflectionType in interface Dictionary
Parameters:
wordId - word ID of token
Returns:
inflection type, or null

getInflectionForm

public String getInflectionForm(int wordId)
Description copied from interface: Dictionary
Get inflection form of tokens

Specified by:
getInflectionForm in interface Dictionary
Parameters:
wordId - word ID of token
Returns:
inflection form, or null
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.ja.dict.BinaryDictionary

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.dict.BinaryDictionary

Packages that use BinaryDictionary
org.apache.lucene.analysis.ja.dict Kuromoji dictionary implementation.

Uses of BinaryDictionary in org.apache.lucene.analysis.ja.dict

Subclasses of BinaryDictionary in org.apache.lucene.analysis.ja.dict
class | TokenInfoDictionary Binary dictionary implementation for a known-word dictionary model: Words are encoded into an FST mapping to a list of wordIDs.
class | UnknownDictionary Dictionary for unknown-word handling.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.dict.CharacterDefinition

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.dict.CharacterDefinition

Packages that use CharacterDefinition
org.apache.lucene.analysis.ja.dict Kuromoji dictionary implementation.

Uses of CharacterDefinition in org.apache.lucene.analysis.ja.dict

Methods in org.apache.lucene.analysis.ja.dict that return CharacterDefinition
CharacterDefinition | UnknownDictionary.getCharacterDefinition()
static CharacterDefinition | CharacterDefinition.getInstance()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.dict.ConnectionCosts

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.dict.ConnectionCosts

Packages that use ConnectionCosts
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.ja.dict | Kuromoji dictionary implementation.

Uses of ConnectionCosts in org.apache.lucene.analysis.ja

Constructors in org.apache.lucene.analysis.ja with parameters of type ConnectionCosts
GraphvizFormatter(ConnectionCosts costs)

Uses of ConnectionCosts in org.apache.lucene.analysis.ja.dict

Methods in org.apache.lucene.analysis.ja.dict that return ConnectionCosts
static ConnectionCosts ConnectionCosts.getInstance()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.ja.dict.Dictionary

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.ja.dict.Dictionary

Packages that use Dictionary
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.ja.dict | Kuromoji dictionary implementation.

Uses of Dictionary in org.apache.lucene.analysis.ja

Constructors in org.apache.lucene.analysis.ja with parameters of type Dictionary
Token(int wordId, char[] surfaceForm, int offset, int length, org.apache.lucene.analysis.ja.JapaneseTokenizer.Type type, int position, Dictionary dictionary)

Uses of Dictionary in org.apache.lucene.analysis.ja.dict

Classes in org.apache.lucene.analysis.ja.dict that implement Dictionary
class | BinaryDictionary Base class for a binary-encoded in-memory dictionary.
class | TokenInfoDictionary Binary dictionary implementation for a known-word dictionary model: Words are encoded into an FST mapping to a list of wordIDs.
class | UnknownDictionary Dictionary for unknown-word handling.
class | UserDictionary Class for building a User Dictionary.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.dict.TokenInfoDictionary

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.dict.TokenInfoDictionary

Packages that use TokenInfoDictionary
org.apache.lucene.analysis.ja.dict Kuromoji dictionary implementation.

Uses of TokenInfoDictionary in org.apache.lucene.analysis.ja.dict

Methods in org.apache.lucene.analysis.ja.dict that return TokenInfoDictionary
static TokenInfoDictionary TokenInfoDictionary.getInstance()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.dict.TokenInfoFST

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.dict.TokenInfoFST

Packages that use TokenInfoFST
org.apache.lucene.analysis.ja.dict Kuromoji dictionary implementation.

Uses of TokenInfoFST in org.apache.lucene.analysis.ja.dict

Methods in org.apache.lucene.analysis.ja.dict that return TokenInfoFST
TokenInfoFST | UserDictionary.getFST()
TokenInfoFST | TokenInfoDictionary.getFST()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.dict.UnknownDictionary

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.dict.UnknownDictionary

Packages that use UnknownDictionary
org.apache.lucene.analysis.ja.dict Kuromoji dictionary implementation.

Uses of UnknownDictionary in org.apache.lucene.analysis.ja.dict

Methods in org.apache.lucene.analysis.ja.dict that return UnknownDictionary
static UnknownDictionary UnknownDictionary.getInstance()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.dict.UserDictionary

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.dict.UserDictionary

Packages that use UserDictionary
org.apache.lucene.analysis.ja Analyzer for Japanese.

Uses of UserDictionary in org.apache.lucene.analysis.ja

Constructors in org.apache.lucene.analysis.ja with parameters of type UserDictionary
JapaneseAnalyzer(Version matchVersion, UserDictionary userDict, JapaneseTokenizer.Mode mode, CharArraySet stopwords, Set<String> stoptags)
JapaneseTokenizer(Reader input, UserDictionary userDictionary, boolean discardPunctuation, JapaneseTokenizer.Mode mode)
Create a new JapaneseTokenizer.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


BaseFormAttribute

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.tokenattributes
Interface BaseFormAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
BaseFormAttributeImpl
public interface BaseFormAttribute
extends Attribute

Attribute for Token.getBaseForm().

Note: depending on part of speech, this value may not be applicable, and will be null.

Method Summary
String | getBaseForm()
void | setToken(Token token)

Method Detail

getBaseForm

String getBaseForm()

setToken

void setToken(Token token)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BaseFormAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.tokenattributes
Class BaseFormAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, BaseFormAttribute, Attribute
public class BaseFormAttributeImpl
extends AttributeImpl
implements BaseFormAttribute, Cloneable

Attribute for Token.getBaseForm().

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
BaseFormAttributeImpl()
Method Summary
void | clear() Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
String | getBaseForm()
void | reflectWith(AttributeReflector reflector) This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.
void | setToken(Token token)
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BaseFormAttributeImpl

public BaseFormAttributeImpl()
Method Detail

getBaseForm

public String getBaseForm()
Specified by:
getBaseForm in interface BaseFormAttribute

setToken

public void setToken(Token token)
Specified by:
setToken in interface BaseFormAttribute

clear

public void clear()
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

reflectWith

public void reflectWith(AttributeReflector reflector)
Description copied from class: AttributeImpl
This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.

The default implementation calls AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) for all non-static fields from the implementing class, using the field name as key and the field value as value. The Attribute class is also determined by reflection. Please note that the default implementation can only handle single-Attribute implementations.

Custom implementations look like this (e.g. for a combined attribute implementation):

   public void reflectWith(AttributeReflector reflector) {
     reflector.reflect(CharTermAttribute.class, "term", term());
     reflector.reflect(PositionIncrementAttribute.class, "positionIncrement", getPositionIncrement());
   }

If you implement this method, make sure that for each invocation, the same set of Attribute interfaces and keys are passed to AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) in the same order, but possibly different values. So don't automatically exclude e.g. null properties!

Overrides:
reflectWith in class AttributeImpl
See Also:
AttributeImpl.reflectAsString(boolean)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InflectionAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.tokenattributes
Interface InflectionAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
InflectionAttributeImpl
public interface InflectionAttribute
extends Attribute

Attribute for Kuromoji inflection data.

Note: in some cases this value may not be applicable, and will be null.

Method Summary
String | getInflectionForm()
String | getInflectionType()
void | setToken(Token token)

Method Detail

getInflectionType

String getInflectionType()

getInflectionForm

String getInflectionForm()

setToken

void setToken(Token token)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InflectionAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.tokenattributes
Class InflectionAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.ja.tokenattributes.InflectionAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, InflectionAttribute, Attribute
public class InflectionAttributeImpl
extends AttributeImpl
implements InflectionAttribute, Cloneable

Attribute for Kuromoji inflection data.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
InflectionAttributeImpl()
Method Summary
void | clear() Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
String | getInflectionForm()
String | getInflectionType()
void | reflectWith(AttributeReflector reflector) This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.
void | setToken(Token token)
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InflectionAttributeImpl

public InflectionAttributeImpl()
Method Detail

getInflectionType

public String getInflectionType()
Specified by:
getInflectionType in interface InflectionAttribute

getInflectionForm

public String getInflectionForm()
Specified by:
getInflectionForm in interface InflectionAttribute

setToken

public void setToken(Token token)
Specified by:
setToken in interface InflectionAttribute

clear

public void clear()
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

reflectWith

public void reflectWith(AttributeReflector reflector)
Description copied from class: AttributeImpl
This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.

The default implementation calls AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) for all non-static fields from the implementing class, using the field name as key and the field value as value. The Attribute class is also determined by reflection. Please note that the default implementation can only handle single-Attribute implementations.

Custom implementations look like this (e.g. for a combined attribute implementation):

   public void reflectWith(AttributeReflector reflector) {
     reflector.reflect(CharTermAttribute.class, "term", term());
     reflector.reflect(PositionIncrementAttribute.class, "positionIncrement", getPositionIncrement());
   }

If you implement this method, make sure that for each invocation, the same set of Attribute interfaces and keys are passed to AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) in the same order, but possibly different values. So don't automatically exclude e.g. null properties!

Overrides:
reflectWith in class AttributeImpl
See Also:
AttributeImpl.reflectAsString(boolean)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.ja.tokenattributes
Interfaces
BaseFormAttribute
InflectionAttribute
PartOfSpeechAttribute
ReadingAttribute
Classes
BaseFormAttributeImpl
InflectionAttributeImpl
PartOfSpeechAttributeImpl
ReadingAttributeImpl


org.apache.lucene.analysis.ja.tokenattributes

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.ja.tokenattributes

Additional Kuromoji-specific Attributes for text analysis.

See:
Description

Interface Summary
BaseFormAttribute | Attribute for Token.getBaseForm().
InflectionAttribute | Attribute for Kuromoji inflection data.
PartOfSpeechAttribute | Attribute for Token.getPartOfSpeech().
ReadingAttribute | Attribute for Kuromoji reading data

Class Summary
BaseFormAttributeImpl | Attribute for Token.getBaseForm().
InflectionAttributeImpl | Attribute for Kuromoji inflection data.
PartOfSpeechAttributeImpl | Attribute for Token.getPartOfSpeech().
ReadingAttributeImpl | Attribute for Kuromoji reading data

Package org.apache.lucene.analysis.ja.tokenattributes Description

Additional Kuromoji-specific Attributes for text analysis.


org.apache.lucene.analysis.ja.tokenattributes Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.ja.tokenattributes

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeImpl (implements org.apache.lucene.util.Attribute, java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttributeImpl (implements org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttribute, java.lang.Cloneable)
      • org.apache.lucene.analysis.ja.tokenattributes.InflectionAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.ja.tokenattributes.InflectionAttribute)
      • org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttribute)
      • org.apache.lucene.analysis.ja.tokenattributes.ReadingAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.ja.tokenattributes.ReadingAttribute)

Interface Hierarchy

  • org.apache.lucene.util.Attribute
    • org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttribute
    • org.apache.lucene.analysis.ja.tokenattributes.InflectionAttribute
    • org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttribute
    • org.apache.lucene.analysis.ja.tokenattributes.ReadingAttribute


Uses of Package org.apache.lucene.analysis.ja.tokenattributes

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.ja.tokenattributes

Packages that use org.apache.lucene.analysis.ja.tokenattributes
org.apache.lucene.analysis.ja.tokenattributes Additional Kuromoji-specific Attributes for text analysis.

Classes in org.apache.lucene.analysis.ja.tokenattributes used by org.apache.lucene.analysis.ja.tokenattributes
BaseFormAttribute
Attribute for Token.getBaseForm().
InflectionAttribute
Attribute for Kuromoji inflection data.
PartOfSpeechAttribute
Attribute for Token.getPartOfSpeech().
ReadingAttribute
Attribute for Kuromoji reading data

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PartOfSpeechAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.tokenattributes
Interface PartOfSpeechAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
PartOfSpeechAttributeImpl
public interface PartOfSpeechAttribute
extends Attribute

Attribute for Token.getPartOfSpeech().

Method Summary
String | getPartOfSpeech()
void | setToken(Token token)

Method Detail

getPartOfSpeech

String getPartOfSpeech()

setToken

void setToken(Token token)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PartOfSpeechAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.tokenattributes
Class PartOfSpeechAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, PartOfSpeechAttribute, Attribute
public class PartOfSpeechAttributeImpl
extends AttributeImpl
implements PartOfSpeechAttribute, Cloneable

Attribute for Token.getPartOfSpeech().

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
PartOfSpeechAttributeImpl()
Method Summary
void | clear() Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
String | getPartOfSpeech()
void | reflectWith(AttributeReflector reflector) This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.
void | setToken(Token token)
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PartOfSpeechAttributeImpl

public PartOfSpeechAttributeImpl()
Method Detail

getPartOfSpeech

public String getPartOfSpeech()
Specified by:
getPartOfSpeech in interface PartOfSpeechAttribute

setToken

public void setToken(Token token)
Specified by:
setToken in interface PartOfSpeechAttribute

clear

public void clear()
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

reflectWith

public void reflectWith(AttributeReflector reflector)
Description copied from class: AttributeImpl
This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.

The default implementation calls AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) for all non-static fields from the implementing class, using the field name as key and the field value as value. The Attribute class is also determined by reflection. Please note that the default implementation can only handle single-Attribute implementations.

Custom implementations look like this (e.g. for a combined attribute implementation):

   public void reflectWith(AttributeReflector reflector) {
     reflector.reflect(CharTermAttribute.class, "term", term());
     reflector.reflect(PositionIncrementAttribute.class, "positionIncrement", getPositionIncrement());
   }

If you implement this method, make sure that for each invocation, the same set of Attribute interfaces and keys are passed to AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) in the same order, but possibly different values. So don't automatically exclude e.g. null properties!

Overrides:
reflectWith in class AttributeImpl
See Also:
AttributeImpl.reflectAsString(boolean)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReadingAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.tokenattributes
Interface ReadingAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
ReadingAttributeImpl
public interface ReadingAttribute
extends Attribute

Attribute for Kuromoji reading data

Note: in some cases this value may not be applicable, and will be null.

Method Summary
String | getPronunciation()
String | getReading()
void | setToken(Token token)

Method Detail

getReading

String getReading()

getPronunciation

String getPronunciation()

setToken

void setToken(Token token)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReadingAttributeImpl

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.tokenattributes
Class ReadingAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.ja.tokenattributes.ReadingAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ReadingAttribute, Attribute
public class ReadingAttributeImpl
extends AttributeImpl
implements ReadingAttribute, Cloneable

Attribute for Kuromoji reading data

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
ReadingAttributeImpl()
Method Summary
void | clear() Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
String | getPronunciation()
String | getReading()
void | reflectWith(AttributeReflector reflector) This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.
void | setToken(Token token)
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ReadingAttributeImpl

public ReadingAttributeImpl()
Method Detail

getReading

public String getReading()
Specified by:
getReading in interface ReadingAttribute

getPronunciation

public String getPronunciation()
Specified by:
getPronunciation in interface ReadingAttribute

setToken

public void setToken(Token token)
Specified by:
setToken in interface ReadingAttribute

clear

public void clear()
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

reflectWith

public void reflectWith(AttributeReflector reflector)
Description copied from class: AttributeImpl
This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.

The default implementation calls AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) for all non-static fields from the implementing class, using the field name as key and the field value as value. The Attribute class is also determined by reflection. Please note that the default implementation can only handle single-Attribute implementations.

Custom implementations look like this (e.g. for a combined attribute implementation):

   public void reflectWith(AttributeReflector reflector) {
     reflector.reflect(CharTermAttribute.class, "term", term());
     reflector.reflect(PositionIncrementAttribute.class, "positionIncrement", getPositionIncrement());
   }

If you implement this method, make sure that for each invocation, the same set of Attribute interfaces and keys are passed to AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) in the same order, but possibly different values. So don't automatically exclude e.g. null properties!

Overrides:
reflectWith in class AttributeImpl
See Also:
AttributeImpl.reflectAsString(boolean)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Interface org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttribute

Packages that use BaseFormAttribute
org.apache.lucene.analysis.ja.tokenattributes Additional Kuromoji-specific Attributes for text analysis.

Uses of BaseFormAttribute in org.apache.lucene.analysis.ja.tokenattributes

Classes in org.apache.lucene.analysis.ja.tokenattributes that implement BaseFormAttribute
 class BaseFormAttributeImpl
Attribute for Token.getBaseForm().

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttributeImpl

No usage of org.apache.lucene.analysis.ja.tokenattributes.BaseFormAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.ja.tokenattributes.InflectionAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.ja.tokenattributes.InflectionAttribute

Packages that use InflectionAttribute
org.apache.lucene.analysis.ja.tokenattributes Additional Kuromoji-specific Attributes for text analysis.

Uses of InflectionAttribute in org.apache.lucene.analysis.ja.tokenattributes

Classes in org.apache.lucene.analysis.ja.tokenattributes that implement InflectionAttribute
 class InflectionAttributeImpl
Attribute for Kuromoji inflection data.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.tokenattributes.InflectionAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.tokenattributes.InflectionAttributeImpl

No usage of org.apache.lucene.analysis.ja.tokenattributes.InflectionAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttribute

Packages that use PartOfSpeechAttribute
org.apache.lucene.analysis.ja.tokenattributes Additional Kuromoji-specific Attributes for text analysis.

Uses of PartOfSpeechAttribute in org.apache.lucene.analysis.ja.tokenattributes

Classes in org.apache.lucene.analysis.ja.tokenattributes that implement PartOfSpeechAttribute
 class PartOfSpeechAttributeImpl
Attribute for Token.getPartOfSpeech().

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttributeImpl

No usage of org.apache.lucene.analysis.ja.tokenattributes.PartOfSpeechAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.ja.tokenattributes.ReadingAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.ja.tokenattributes.ReadingAttribute

Packages that use ReadingAttribute
org.apache.lucene.analysis.ja.tokenattributes Additional Kuromoji-specific Attributes for text analysis.

Uses of ReadingAttribute in org.apache.lucene.analysis.ja.tokenattributes

Classes in org.apache.lucene.analysis.ja.tokenattributes that implement ReadingAttribute
 class ReadingAttributeImpl
Attribute for Kuromoji reading data

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.tokenattributes.ReadingAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.tokenattributes.ReadingAttributeImpl

No usage of org.apache.lucene.analysis.ja.tokenattributes.ReadingAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CSVUtil

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.util
Class CSVUtil

java.lang.Object
    extended by  org.apache.lucene.analysis.ja.util.CSVUtil

public final class CSVUtil
extends Object

Utility class for parsing CSV text

Method Summary
static String[] | parse(String line) Parse CSV line
static String | quoteEscape(String original) Quote and escape input value for CSV
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

parse

public static String[] parse(String line)
Parse CSV line

Parameters:
line -
Returns:
Array of values

quoteEscape

public static String quoteEscape(String original)
Quote and escape input value for CSV

Parameters:
original -
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.ja.util
Classes
CSVUtil
ToStringUtil


org.apache.lucene.analysis.ja.util

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.ja.util

Kuromoji utility classes.

See:
Description

Class Summary
CSVUtil | Utility class for parsing CSV text
ToStringUtil | Utility class for english translations of morphological data, used only for debugging.

Package org.apache.lucene.analysis.ja.util Description

Kuromoji utility classes.


org.apache.lucene.analysis.ja.util Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.ja.util

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.ja.util.CSVUtil
    • org.apache.lucene.analysis.ja.util.ToStringUtil


Uses of Package org.apache.lucene.analysis.ja.util

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.ja.util

No usage of org.apache.lucene.analysis.ja.util

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ToStringUtil

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ja.util
Class ToStringUtil

java.lang.Object
    extended by  org.apache.lucene.analysis.ja.util.ToStringUtil

public class ToStringUtil
extends Object

Utility class for english translations of morphological data, used only for debugging.

Constructor Summary
ToStringUtil()
Method Summary
static String | getInflectedFormTranslation(String s) Get the english form of inflected form
static String | getInflectionTypeTranslation(String s) Get the english form of inflection type
static String | getPOSTranslation(String s) Get the english form of a POS tag
static void | getRomanization(Appendable builder, CharSequence s) Romanize katakana with modified hepburn
static String | getRomanization(String s) Romanize katakana with modified hepburn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ToStringUtil

public ToStringUtil()
Method Detail

getPOSTranslation

public static String getPOSTranslation(String s)
Get the english form of a POS tag

getInflectionTypeTranslation

public static String getInflectionTypeTranslation(String s)
Get the english form of inflection type

getInflectedFormTranslation

public static String getInflectedFormTranslation(String s)
Get the english form of inflected form

getRomanization

public static String getRomanization(String s)
Romanize katakana with modified hepburn

getRomanization

public static void getRomanization(Appendable builder,
                                   CharSequence s)
                            throws IOException
Romanize katakana with modified hepburn

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.ja.util.CSVUtil

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.util.CSVUtil

No usage of org.apache.lucene.analysis.ja.util.CSVUtil

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ja.util.ToStringUtil

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ja.util.ToStringUtil

No usage of org.apache.lucene.analysis.ja.util.ToStringUtil

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


LatvianAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.lv
Class LatvianAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.lv.LatvianAnalyzer
All Implemented Interfaces:
Closeable
public final class LatvianAnalyzer
extends StopwordAnalyzerBase

Analyzer for Latvian.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Latvian stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
LatvianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
LatvianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
LatvianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Latvian stopwords.

See Also:
Constant Field Values
Constructor Detail

LatvianAnalyzer

public LatvianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

LatvianAnalyzer

public LatvianAnalyzer(Version matchVersion,
                       Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

LatvianAnalyzer

public LatvianAnalyzer(Version matchVersion,
                       Set<?> stopwords,
                       Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and LatvianStemFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


LatvianStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.lv
Class LatvianStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.lv.LatvianStemFilter
All Implemented Interfaces:
Closeable
public final class LatvianStemFilter
extends TokenFilter

A TokenFilter that applies LatvianStemmer to stem Latvian words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
LatvianStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

LatvianStemFilter

public LatvianStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LatvianStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.lv
Class LatvianStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.lv.LatvianStemmer

public class LatvianStemmer
extends Object

Light stemmer for Latvian.

This is a light version of the algorithm in Karlis Kreslin's PhD thesis A stemming algorithm for Latvian with the following modifications:

  • Only explicitly stems noun and adjective morphology
  • Stricter length/vowel checks for the resulting stems (verb etc suffix stripping is removed)
  • Removes only the primary inflectional suffixes: case and number for nouns ; case, number, gender, and definitiveness for adjectives.
  • Palatalization is only handled when a declension II,V,VI noun suffix is removed.

Constructor Summary
LatvianStemmer()
Method Summary
 int stem(char[] s, int len)
Stem a latvian word.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LatvianStemmer

public LatvianStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Stem a latvian word. returns the new adjusted length.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.lv
Classes
LatvianAnalyzer
LatvianStemFilter
LatvianStemmer


org.apache.lucene.analysis.lv

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.lv

Analyzer for Latvian.

See:
Description

Class Summary
LatvianAnalyzer | Analyzer for Latvian.
LatvianStemFilter | A TokenFilter that applies LatvianStemmer to stem Latvian words.
LatvianStemmer | Light stemmer for Latvian.

Package org.apache.lucene.analysis.lv Description

Analyzer for Latvian.


org.apache.lucene.analysis.lv Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.lv

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.lv.LatvianAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.lv.LatvianStemFilter
    • org.apache.lucene.analysis.lv.LatvianStemmer


Uses of Package org.apache.lucene.analysis.lv

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.lv

No usage of org.apache.lucene.analysis.lv

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.lv.LatvianAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.lv.LatvianAnalyzer

No usage of org.apache.lucene.analysis.lv.LatvianAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.lv.LatvianStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.lv.LatvianStemFilter

No usage of org.apache.lucene.analysis.lv.LatvianStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.lv.LatvianStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.lv.LatvianStemmer

No usage of org.apache.lucene.analysis.lv.LatvianStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


EmptyTokenStream

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.miscellaneous
Class EmptyTokenStream

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.miscellaneous.EmptyTokenStream
All Implemented Interfaces:
Closeable
public final class EmptyTokenStream
extends TokenStream

An always exhausted token stream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Constructor Summary
EmptyTokenStream()
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenStream
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

EmptyTokenStream

public EmptyTokenStream()
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.miscellaneous
Classes
EmptyTokenStream
PatternAnalyzer
PrefixAndSuffixAwareTokenFilter
PrefixAwareTokenFilter
SingleTokenTokenStream
StemmerOverrideFilter


org.apache.lucene.analysis.miscellaneous

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.miscellaneous

Miscellaneous TokenStreams

See:
Description

Class Summary
EmptyTokenStream | An always exhausted token stream.
PatternAnalyzer | Efficient Lucene analyzer/tokenizer that preferably operates on a String rather than a Reader, that can flexibly separate text into terms via a regular expression Pattern (with behaviour identical to String.split(String)), and that combines the functionality of LetterTokenizer, LowerCaseTokenizer, WhitespaceTokenizer, StopFilter into a single efficient multi-purpose class.
PrefixAndSuffixAwareTokenFilter | Links two PrefixAwareTokenFilter.
PrefixAwareTokenFilter | Joins two token streams and leaves the last token of the first stream available to be used when updating the token values in the second stream based on that token.
SingleTokenTokenStream | A TokenStream containing a single token.
StemmerOverrideFilter | Provides the ability to override any KeywordAttribute aware stemmer with custom dictionary-based stemming.

Package org.apache.lucene.analysis.miscellaneous Description

Miscellaneous TokenStreams


org.apache.lucene.analysis.miscellaneous Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.miscellaneous

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.miscellaneous.PatternAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.miscellaneous.EmptyTokenStream
        • org.apache.lucene.analysis.miscellaneous.PrefixAndSuffixAwareTokenFilter
        • org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter
        • org.apache.lucene.analysis.miscellaneous.SingleTokenTokenStream
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter


Uses of Package org.apache.lucene.analysis.miscellaneous

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.miscellaneous

Packages that use org.apache.lucene.analysis.miscellaneous
org.apache.lucene.analysis.miscellaneous Miscellaneous TokenStreams

Classes in org.apache.lucene.analysis.miscellaneous used by org.apache.lucene.analysis.miscellaneous
PatternAnalyzer
Efficient Lucene analyzer/tokenizer that preferably operates on a String rather than a Reader, that can flexibly separate text into terms via a regular expression Pattern (with behaviour identical to String.split(String)), and that combines the functionality of LetterTokenizer, LowerCaseTokenizer, WhitespaceTokenizer, StopFilter into a single efficient multi-purpose class.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PatternAnalyzer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.miscellaneous
Class PatternAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.miscellaneous.PatternAnalyzer
All Implemented Interfaces:
Closeable
public final class PatternAnalyzer
extends ReusableAnalyzerBase

Efficient Lucene analyzer/tokenizer that preferably operates on a String rather than a Reader, that can flexibly separate text into terms via a regular expression Pattern (with behaviour identical to String.split(String)), and that combines the functionality of LetterTokenizer, LowerCaseTokenizer, WhitespaceTokenizer, StopFilter into a single efficient multi-purpose class.

If you are unsure how exactly a regular expression should look like, consider prototyping by simply trying various expressions on some test texts via String.split(String). Once you are satisfied, give that regex to PatternAnalyzer. Also see Java Regular Expression Tutorial.

This class can be considerably faster than the "normal" Lucene tokenizers. It can also serve as a building block in a compound Lucene TokenFilter chain. For example as in this stemming example:

 PatternAnalyzer pat = ...
 TokenStream tokenStream = new SnowballFilter(
     pat.tokenStream("content", "James is running round in the woods"),
     "English"));

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static PatternAnalyzer | DEFAULT_ANALYZER A lower-casing word analyzer with English stop words (can be shared freely across threads without harm); global per class loader.
static PatternAnalyzer | EXTENDED_ANALYZER A lower-casing word analyzer with extended English stop words (can be shared freely across threads without harm); global per class loader.
static Pattern | NON_WORD_PATTERN "\\W+"; Divides text at non-letters (NOT Character.isLetter(c))
static Pattern | WHITESPACE_PATTERN "\\s+"; Divides text at whitespaces (Character.isWhitespace(c))
Constructor Summary
PatternAnalyzer(Version matchVersion, Pattern pattern, boolean toLowerCase, Set<?> stopWords)
Constructs a new instance with the given parameters.
Method Summary
 ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
Creates a token stream that tokenizes all the text in the given Reader; This implementation forwards to tokenStream(String, Reader, String) and is less efficient than tokenStream(String, Reader, String).
 ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader, String text)
Creates a token stream that tokenizes the given string into token terms (aka words).
 boolean equals(Object other)
Indicates whether some other object is "equal to" this one.
 int hashCode()
Returns a hash code value for the object.
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

NON_WORD_PATTERN

public static final Pattern NON_WORD_PATTERN
"\\W+"; Divides text at non-letters (NOT Character.isLetter(c))

WHITESPACE_PATTERN

public static final Pattern WHITESPACE_PATTERN
"\\s+"; Divides text at whitespaces (Character.isWhitespace(c))

DEFAULT_ANALYZER

public static final PatternAnalyzer DEFAULT_ANALYZER
A lower-casing word analyzer with English stop words (can be shared freely across threads without harm); global per class loader.

EXTENDED_ANALYZER

public static final PatternAnalyzer EXTENDED_ANALYZER
A lower-casing word analyzer with extended English stop words (can be shared freely across threads without harm); global per class loader. The stop words are borrowed from http://thomas.loc.gov/home/stopwords.html, see http://thomas.loc.gov/home/all.about.inquery.html

Constructor Detail

PatternAnalyzer

public PatternAnalyzer(Version matchVersion,
                       Pattern pattern,
                       boolean toLowerCase,
                       Set<?> stopWords)
Constructs a new instance with the given parameters.

Parameters:
matchVersion - currently does nothing
pattern - a regular expression delimiting tokens
toLowerCase - if true returns tokens after applying String.toLowerCase()
stopWords - if non-null, ignores all tokens that are contained in the given stop set (after previously having applied toLowerCase() if applicable). For example, created via StopFilter.makeStopSet(Version, String[])and/or WordlistLoaderas in WordlistLoader.getWordSet(new File("samples/fulltext/stopwords.txt") or other stop words lists .
Method Detail

createComponents

public ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                   Reader reader,
                                                                   String text)
Creates a token stream that tokenizes the given string into token terms (aka words).

Parameters:
fieldName - the name of the field to tokenize (currently ignored).
reader - reader (e.g. charfilter) of the original text. can be null.
text - the string to tokenize
Returns:
a new token stream

createComponents

public ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                   Reader reader)
Creates a token stream that tokenizes all the text in the given Reader; This implementation forwards to tokenStream(String, Reader, String) and is less efficient than tokenStream(String, Reader, String).

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the field to tokenize (currently ignored).
reader - the reader delivering the text
Returns:
a new token stream

equals

public boolean equals(Object other)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
other - the reference object with which to compare.
Returns:
true if equal, false otherwise

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class Object
Returns:
the hash code.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrefixAndSuffixAwareTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.miscellaneous
Class PrefixAndSuffixAwareTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.miscellaneous.PrefixAndSuffixAwareTokenFilter
All Implemented Interfaces:
Closeable
public class PrefixAndSuffixAwareTokenFilter
extends TokenStream

Links two PrefixAwareTokenFilter.

NOTE: This filter might not behave correctly if used with custom Attributes, i.e. Attributes other than the ones located in org.apache.lucene.analysis.tokenattributes.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Constructor Summary
PrefixAndSuffixAwareTokenFilter(TokenStream prefix, TokenStream input, TokenStream suffix)
Method Summary
 void close()
Releases resources associated with this stream.
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset()
Resets this stream to the beginning.
 Token updateInputToken(Token inputToken, Token lastPrefixToken)
 Token updateSuffixToken(Token suffixToken, Token lastInputToken)
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PrefixAndSuffixAwareTokenFilter

public PrefixAndSuffixAwareTokenFilter(TokenStream prefix,
                                       TokenStream input,
                                       TokenStream suffix)
Method Detail

updateInputToken

public Token updateInputToken(Token inputToken,
                              Token lastPrefixToken)

updateSuffixToken

public Token updateSuffixToken(Token suffixToken,
                               Token lastInputToken)

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException

close

public void close()
           throws IOException
Description copied from class: TokenStream
Releases resources associated with this stream.

Specified by:
close in interface Closeable
Overrides:
close in class TokenStream
Throws:
IOException

end

public void end()
         throws IOException
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrefixAwareTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.miscellaneous
Class PrefixAwareTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter
All Implemented Interfaces:
Closeable
public class PrefixAwareTokenFilter
extends TokenStream

Joins two token streams and leaves the last token of the first stream available to be used when updating the token values in the second stream based on that token. The default implementation adds last prefix token end offset to the suffix token start and end offsets.

NOTE: This filter might not behave correctly if used with custom Attributes, i.e. Attributes other than the ones located in org.apache.lucene.analysis.tokenattributes.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Constructor Summary
PrefixAwareTokenFilter(TokenStream prefix, TokenStream suffix)
Method Summary
 void close()
Releases resources associated with this stream.
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 TokenStream getPrefix()
 TokenStream getSuffix()
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset()
Resets this stream to the beginning.
 void setPrefix(TokenStream prefix)
 void setSuffix(TokenStream suffix)
 Token updateSuffixToken(Token suffixToken, Token lastPrefixToken)
The default implementation adds last prefix token end offset to the suffix token start and end offsets.
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PrefixAwareTokenFilter

public PrefixAwareTokenFilter(TokenStream prefix,
                              TokenStream suffix)
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

updateSuffixToken

public Token updateSuffixToken(Token suffixToken,
                               Token lastPrefixToken)
The default implementation adds last prefix token end offset to the suffix token start and end offsets.

Parameters:
suffixToken - a token from the suffix stream
lastPrefixToken - the last token from the prefix stream
Returns:
consumer token

end

public void end()
         throws IOException
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream
Throws:
IOException

close

public void close()
           throws IOException
Description copied from class: TokenStream
Releases resources associated with this stream.

Specified by:
close in interface Closeable
Overrides:
close in class TokenStream
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException

getPrefix

public TokenStream getPrefix()

setPrefix

public void setPrefix(TokenStream prefix)

getSuffix

public TokenStream getSuffix()

setSuffix

public void setSuffix(TokenStream suffix)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SingleTokenTokenStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.miscellaneous
Class SingleTokenTokenStream

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.miscellaneous.SingleTokenTokenStream
All Implemented Interfaces:
Closeable
public final class SingleTokenTokenStream
extends TokenStream

A TokenStream containing a single token.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Constructor Summary
SingleTokenTokenStream(Token token)
Method Summary
Token | getToken()
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Resets this stream to the beginning.
void | setToken(Token token)
Methods inherited from class org.apache.lucene.analysis.TokenStream
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SingleTokenTokenStream

public SingleTokenTokenStream(Token token)
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException

getToken

public Token getToken()

setToken

public void setToken(Token token)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StemmerOverrideFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.miscellaneous
Class StemmerOverrideFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter
All Implemented Interfaces:
Closeable
public final class StemmerOverrideFilter
extends TokenFilter

Provides the ability to override any KeywordAttribute aware stemmer with custom dictionary-based stemming.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
StemmerOverrideFilter(Version matchVersion, TokenStream input, Map<?,String> dictionary)
Create a new StemmerOverrideFilter, performing dictionary-based stemming with the provided dictionary.
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

StemmerOverrideFilter

public StemmerOverrideFilter(Version matchVersion,
                             TokenStream input,
                             Map<?,String> dictionary)
Create a new StemmerOverrideFilter, performing dictionary-based stemming with the provided dictionary.

Any dictionary-stemmed terms will be marked with KeywordAttribute so that they will not be stemmed with stemmers down the chain.

Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.miscellaneous.EmptyTokenStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.miscellaneous.EmptyTokenStream

No usage of org.apache.lucene.analysis.miscellaneous.EmptyTokenStream

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.miscellaneous.PatternAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.miscellaneous.PatternAnalyzer

Packages that use PatternAnalyzer
org.apache.lucene.analysis.miscellaneous Miscellaneous TokenStreams

Uses of PatternAnalyzer in org.apache.lucene.analysis.miscellaneous

Fields in org.apache.lucene.analysis.miscellaneous declared as PatternAnalyzer
static PatternAnalyzer | PatternAnalyzer.DEFAULT_ANALYZER A lower-casing word analyzer with English stop words (can be shared freely across threads without harm); global per class loader.
static PatternAnalyzer | PatternAnalyzer.EXTENDED_ANALYZER A lower-casing word analyzer with extended English stop words (can be shared freely across threads without harm); global per class loader.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.miscellaneous.PrefixAndSuffixAwareTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.miscellaneous.PrefixAndSuffixAwareTokenFilter

No usage of org.apache.lucene.analysis.miscellaneous.PrefixAndSuffixAwareTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter

No usage of org.apache.lucene.analysis.miscellaneous.PrefixAwareTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.miscellaneous.SingleTokenTokenStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.miscellaneous.SingleTokenTokenStream

No usage of org.apache.lucene.analysis.miscellaneous.SingleTokenTokenStream

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter

No usage of org.apache.lucene.analysis.miscellaneous.StemmerOverrideFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


EdgeNGramTokenFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ngram
Class EdgeNGramTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter
All Implemented Interfaces:
Closeable
public final class EdgeNGramTokenFilter
extends TokenFilter

Tokenizes the given token into n-grams of given size(s).

This TokenFilter create n-grams from the beginning edge or ending edge of a input token.

Nested Class Summary
static class EdgeNGramTokenFilter.Side
Specifies which side of the input the n-gram should be generated from
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static int | DEFAULT_MAX_GRAM_SIZE
static int | DEFAULT_MIN_GRAM_SIZE
static EdgeNGramTokenFilter.Side | DEFAULT_SIDE
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
EdgeNGramTokenFilter(TokenStream input, EdgeNGramTokenFilter.Side side, int minGram, int maxGram)
Creates EdgeNGramTokenFilter that can generate n-grams in the sizes of the given range
EdgeNGramTokenFilter(TokenStream input, String sideLabel, int minGram, int maxGram)
Creates EdgeNGramTokenFilter that can generate n-grams in the sizes of the given range
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_SIDE

public static final EdgeNGramTokenFilter.Side DEFAULT_SIDE

DEFAULT_MAX_GRAM_SIZE

public static final int DEFAULT_MAX_GRAM_SIZE
See Also:
Constant Field Values

DEFAULT_MIN_GRAM_SIZE

public static final int DEFAULT_MIN_GRAM_SIZE
See Also:
Constant Field Values
Constructor Detail

EdgeNGramTokenFilter

public EdgeNGramTokenFilter(TokenStream input,
                            EdgeNGramTokenFilter.Side side,
                            int minGram,
                            int maxGram)
Creates EdgeNGramTokenFilter that can generate n-grams in the sizes of the given range

Parameters:
input - TokenStream holding the input to be tokenized
side - the EdgeNGramTokenFilter.Side from which to chop off an n-gram
minGram - the smallest n-gram to generate
maxGram - the largest n-gram to generate

EdgeNGramTokenFilter

public EdgeNGramTokenFilter(TokenStream input,
                            String sideLabel,
                            int minGram,
                            int maxGram)
Creates EdgeNGramTokenFilter that can generate n-grams in the sizes of the given range

Parameters:
input - TokenStream holding the input to be tokenized
sideLabel - the name of the EdgeNGramTokenFilter.Side from which to chop off an n-gram
minGram - the smallest n-gram to generate
maxGram - the largest n-gram to generate
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


EdgeNGramTokenFilter.Side

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.analysis.ngram
Enum EdgeNGramTokenFilter.Side

java.lang.Object
    extended by  java.lang.Enum<EdgeNGramTokenFilter.Side>
        extended by  org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter.Side
All Implemented Interfaces:
Serializable, Comparable<EdgeNGramTokenFilter.Side>
Enclosing class:
EdgeNGramTokenFilter
public static enum EdgeNGramTokenFilter.Side
extends Enum<EdgeNGramTokenFilter.Side>

Specifies which side of the input the n-gram should be generated from

Enum Constant Summary
BACK
Get the n-gram from the end of the input
FRONT
Get the n-gram from the front of the input
Method Summary
abstract String | getLabel()
static EdgeNGramTokenFilter.Side | getSide(String sideName)
static EdgeNGramTokenFilter.Side | valueOf(String name) Returns the enum constant of this type with the specified name.
static EdgeNGramTokenFilter.Side[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

FRONT

public static final EdgeNGramTokenFilter.Side FRONT
Get the n-gram from the front of the input

BACK

public static final EdgeNGramTokenFilter.Side BACK
Get the n-gram from the end of the input

Method Detail

values

public static final EdgeNGramTokenFilter.Side[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(EdgeNGramTokenFilter.Side c : EdgeNGramTokenFilter.Side.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static EdgeNGramTokenFilter.Side valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

getLabel

public abstract String getLabel()

getSide

public static EdgeNGramTokenFilter.Side getSide(String sideName)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


EdgeNGramTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ngram
Class EdgeNGramTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.ngram.EdgeNGramTokenizer
All Implemented Interfaces:
Closeable
public final class EdgeNGramTokenizer
extends Tokenizer

Tokenizes the input from an edge into n-grams of given size(s).

This Tokenizer create n-grams from the beginning edge or ending edge of a input token. MaxGram can't be larger than 1024 because of limitation.

Nested Class Summary
static class EdgeNGramTokenizer.Side
Specifies which side of the input the n-gram should be generated from
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static int | DEFAULT_MAX_GRAM_SIZE
static int | DEFAULT_MIN_GRAM_SIZE
static EdgeNGramTokenizer.Side | DEFAULT_SIDE
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
EdgeNGramTokenizer(AttributeSource.AttributeFactory factory, Reader input, EdgeNGramTokenizer.Side side, int minGram, int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
EdgeNGramTokenizer(AttributeSource.AttributeFactory factory, Reader input, String sideLabel, int minGram, int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
EdgeNGramTokenizer(AttributeSource source, Reader input, EdgeNGramTokenizer.Side side, int minGram, int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
EdgeNGramTokenizer(AttributeSource source, Reader input, String sideLabel, int minGram, int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
EdgeNGramTokenizer(Reader input, EdgeNGramTokenizer.Side side, int minGram, int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
EdgeNGramTokenizer(Reader input, String sideLabel, int minGram, int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
Method Summary
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 boolean incrementToken()
Returns the next token in the stream, or null at EOS.
 void reset()
Resets this stream to the beginning.
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_SIDE

public static final EdgeNGramTokenizer.Side DEFAULT_SIDE

DEFAULT_MAX_GRAM_SIZE

public static final int DEFAULT_MAX_GRAM_SIZE
See Also:
Constant Field Values

DEFAULT_MIN_GRAM_SIZE

public static final int DEFAULT_MIN_GRAM_SIZE
See Also:
Constant Field Values
Constructor Detail

EdgeNGramTokenizer

public EdgeNGramTokenizer(Reader input,
                          EdgeNGramTokenizer.Side side,
                          int minGram,
                          int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range

Parameters:
input - Reader holding the input to be tokenized
side - the EdgeNGramTokenizer.Side from which to chop off an n-gram
minGram - the smallest n-gram to generate
maxGram - the largest n-gram to generate

EdgeNGramTokenizer

public EdgeNGramTokenizer(AttributeSource source,
                          Reader input,
                          EdgeNGramTokenizer.Side side,
                          int minGram,
                          int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range

Parameters:
source - AttributeSource to use
input - Reader holding the input to be tokenized
side - the EdgeNGramTokenizer.Side from which to chop off an n-gram
minGram - the smallest n-gram to generate
maxGram - the largest n-gram to generate

EdgeNGramTokenizer

public EdgeNGramTokenizer(AttributeSource.AttributeFactory factory,
                          Reader input,
                          EdgeNGramTokenizer.Side side,
                          int minGram,
                          int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range

Parameters:
factory - AttributeSource.AttributeFactory to use
input - Reader holding the input to be tokenized
side - the EdgeNGramTokenizer.Side from which to chop off an n-gram
minGram - the smallest n-gram to generate
maxGram - the largest n-gram to generate

EdgeNGramTokenizer

public EdgeNGramTokenizer(Reader input,
                          String sideLabel,
                          int minGram,
                          int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range

Parameters:
input - Reader holding the input to be tokenized
sideLabel - the name of the EdgeNGramTokenizer.Side from which to chop off an n-gram
minGram - the smallest n-gram to generate
maxGram - the largest n-gram to generate

EdgeNGramTokenizer

public EdgeNGramTokenizer(AttributeSource source,
                          Reader input,
                          String sideLabel,
                          int minGram,
                          int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range

Parameters:
source - AttributeSource to use
input - Reader holding the input to be tokenized
sideLabel - the name of the EdgeNGramTokenizer.Side from which to chop off an n-gram
minGram - the smallest n-gram to generate
maxGram - the largest n-gram to generate

EdgeNGramTokenizer

public EdgeNGramTokenizer(AttributeSource.AttributeFactory factory,
                          Reader input,
                          String sideLabel,
                          int minGram,
                          int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range

Parameters:
factory - AttributeSource.AttributeFactory to use
input - Reader holding the input to be tokenized
sideLabel - the name of the EdgeNGramTokenizer.Side from which to chop off an n-gram
minGram - the smallest n-gram to generate
maxGram - the largest n-gram to generate
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Returns the next token in the stream, or null at EOS.

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

end

public void end()
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream

reset

public void reset()
           throws IOException
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EdgeNGramTokenizer.Side

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.analysis.ngram
Enum EdgeNGramTokenizer.Side

java.lang.Object
    extended by  java.lang.Enum<EdgeNGramTokenizer.Side>
        extended by  org.apache.lucene.analysis.ngram.EdgeNGramTokenizer.Side
All Implemented Interfaces:
Serializable, Comparable<EdgeNGramTokenizer.Side>
Enclosing class:
EdgeNGramTokenizer
public static enum EdgeNGramTokenizer.Side
extends Enum<EdgeNGramTokenizer.Side>

Specifies which side of the input the n-gram should be generated from

Enum Constant Summary
BACK
Get the n-gram from the end of the input
FRONT
Get the n-gram from the front of the input
Method Summary
abstract String | getLabel()
static EdgeNGramTokenizer.Side | getSide(String sideName)
static EdgeNGramTokenizer.Side | valueOf(String name) Returns the enum constant of this type with the specified name.
static EdgeNGramTokenizer.Side[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

FRONT

public static final EdgeNGramTokenizer.Side FRONT
Get the n-gram from the front of the input

BACK

public static final EdgeNGramTokenizer.Side BACK
Get the n-gram from the end of the input

Method Detail

values

public static final EdgeNGramTokenizer.Side[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(EdgeNGramTokenizer.Side c : EdgeNGramTokenizer.Side.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static EdgeNGramTokenizer.Side valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

getLabel

public abstract String getLabel()

getSide

public static EdgeNGramTokenizer.Side getSide(String sideName)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


NGramTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ngram
Class NGramTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.ngram.NGramTokenFilter
All Implemented Interfaces:
Closeable
public final class NGramTokenFilter
extends TokenFilter

Tokenizes the input into n-grams of the given size(s).

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static int | DEFAULT_MAX_NGRAM_SIZE
static int | DEFAULT_MIN_NGRAM_SIZE
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
NGramTokenFilter(TokenStream input)
Creates NGramTokenFilter with default min and max n-grams.
NGramTokenFilter(TokenStream input, int minGram, int maxGram)
Creates NGramTokenFilter with given min and max n-grams.
Method Summary
boolean | incrementToken() Returns the next token in the stream, or null at EOS.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_MIN_NGRAM_SIZE

public static final int DEFAULT_MIN_NGRAM_SIZE
See Also:
Constant Field Values

DEFAULT_MAX_NGRAM_SIZE

public static final int DEFAULT_MAX_NGRAM_SIZE
See Also:
Constant Field Values
Constructor Detail

NGramTokenFilter

public NGramTokenFilter(TokenStream input,
                        int minGram,
                        int maxGram)
Creates NGramTokenFilter with given min and max n-grams.

Parameters:
input - TokenStream holding the input to be tokenized
minGram - the smallest n-gram to generate
maxGram - the largest n-gram to generate

NGramTokenFilter

public NGramTokenFilter(TokenStream input)
Creates NGramTokenFilter with default min and max n-grams.

Parameters:
input - TokenStream holding the input to be tokenized
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Returns the next token in the stream, or null at EOS.

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NGramTokenizer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ngram
Class NGramTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.ngram.NGramTokenizer
All Implemented Interfaces:
Closeable
public final class NGramTokenizer
extends Tokenizer

Tokenizes the input into n-grams of the given size(s).

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static int | DEFAULT_MAX_NGRAM_SIZE
static int | DEFAULT_MIN_NGRAM_SIZE
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
NGramTokenizer(AttributeSource.AttributeFactory factory, Reader input, int minGram, int maxGram)
Creates NGramTokenizer with given min and max n-grams.
NGramTokenizer(AttributeSource source, Reader input, int minGram, int maxGram)
Creates NGramTokenizer with given min and max n-grams.
NGramTokenizer(Reader input)
Creates NGramTokenizer with default min and max n-grams.
NGramTokenizer(Reader input, int minGram, int maxGram)
Creates NGramTokenizer with given min and max n-grams.
Method Summary
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 boolean incrementToken()
Returns the next token in the stream, or null at EOS.
 void reset()
Resets this stream to the beginning.
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_MIN_NGRAM_SIZE

public static final int DEFAULT_MIN_NGRAM_SIZE
See Also:
Constant Field Values

DEFAULT_MAX_NGRAM_SIZE

public static final int DEFAULT_MAX_NGRAM_SIZE
See Also:
Constant Field Values
Constructor Detail

NGramTokenizer

public NGramTokenizer(Reader input,
                      int minGram,
                      int maxGram)
Creates NGramTokenizer with given min and max n-grams.

Parameters:
input - Reader holding the input to be tokenized
minGram - the smallest n-gram to generate
maxGram - the largest n-gram to generate

NGramTokenizer

public NGramTokenizer(AttributeSource source,
                      Reader input,
                      int minGram,
                      int maxGram)
Creates NGramTokenizer with given min and max n-grams.

Parameters:
source - AttributeSource to use
input - Reader holding the input to be tokenized
minGram - the smallest n-gram to generate
maxGram - the largest n-gram to generate

NGramTokenizer

public NGramTokenizer(AttributeSource.AttributeFactory factory,
                      Reader input,
                      int minGram,
                      int maxGram)
Creates NGramTokenizer with given min and max n-grams.

Parameters:
factory - AttributeSource.AttributeFactory to use
input - Reader holding the input to be tokenized
minGram - the smallest n-gram to generate
maxGram - the largest n-gram to generate

NGramTokenizer

public NGramTokenizer(Reader input)
Creates NGramTokenizer with default min and max n-grams.

Parameters:
input - Reader holding the input to be tokenized
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Returns the next token in the stream, or null at EOS.

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

end

public void end()
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream

reset

public void reset()
           throws IOException
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.ngram
Classes
EdgeNGramTokenFilter
EdgeNGramTokenizer
NGramTokenFilter
NGramTokenizer
Enums
EdgeNGramTokenFilter.Side
EdgeNGramTokenizer.Side


org.apache.lucene.analysis.ngram

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.ngram

Character n-gram tokenizers and filters.

See:
Description

Class Summary
EdgeNGramTokenFilter | Tokenizes the given token into n-grams of given size(s).
EdgeNGramTokenizer | Tokenizes the input from an edge into n-grams of given size(s).
NGramTokenFilter | Tokenizes the input into n-grams of the given size(s).
NGramTokenizer | Tokenizes the input into n-grams of the given size(s).

Enum Summary
EdgeNGramTokenFilter.Side | Specifies which side of the input the n-gram should be generated from
EdgeNGramTokenizer.Side | Specifies which side of the input the n-gram should be generated from

Package org.apache.lucene.analysis.ngram Description

Character n-gram tokenizers and filters.


org.apache.lucene.analysis.ngram Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.ngram

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter
          • org.apache.lucene.analysis.ngram.NGramTokenFilter
        • org.apache.lucene.analysis.Tokenizer
          • org.apache.lucene.analysis.ngram.EdgeNGramTokenizer
          • org.apache.lucene.analysis.ngram.NGramTokenizer

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter.Side
      • org.apache.lucene.analysis.ngram.EdgeNGramTokenizer.Side


Uses of Package org.apache.lucene.analysis.ngram

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.ngram

Packages that use org.apache.lucene.analysis.ngram
org.apache.lucene.analysis.ngram Character n-gram tokenizers and filters.

Classes in org.apache.lucene.analysis.ngram used by org.apache.lucene.analysis.ngram
EdgeNGramTokenFilter.Side
Specifies which side of the input the n-gram should be generated from
EdgeNGramTokenizer.Side
Specifies which side of the input the n-gram should be generated from

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter

No usage of org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter.Side

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ngram.EdgeNGramTokenFilter.Side

Packages that use EdgeNGramTokenFilter.Side
org.apache.lucene.analysis.ngram Character n-gram tokenizers and filters.

Uses of EdgeNGramTokenFilter.Side in org.apache.lucene.analysis.ngram

Fields in org.apache.lucene.analysis.ngram declared as EdgeNGramTokenFilter.Side
static EdgeNGramTokenFilter.Side EdgeNGramTokenFilter.DEFAULT_SIDE

Methods in org.apache.lucene.analysis.ngram that return EdgeNGramTokenFilter.Side
static EdgeNGramTokenFilter.Side | EdgeNGramTokenFilter.Side.getSide(String sideName)
static EdgeNGramTokenFilter.Side | EdgeNGramTokenFilter.Side.valueOf(String name) Returns the enum constant of this type with the specified name.
static EdgeNGramTokenFilter.Side[] | EdgeNGramTokenFilter.Side.values() Returns an array containing the constants of this enum type, in the order they're declared.

Constructors in org.apache.lucene.analysis.ngram with parameters of type EdgeNGramTokenFilter.Side
EdgeNGramTokenFilter(TokenStream input, EdgeNGramTokenFilter.Side side, int minGram, int maxGram)
Creates EdgeNGramTokenFilter that can generate n-grams in the sizes of the given range

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ngram.EdgeNGramTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ngram.EdgeNGramTokenizer

No usage of org.apache.lucene.analysis.ngram.EdgeNGramTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ngram.EdgeNGramTokenizer.Side

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ngram.EdgeNGramTokenizer.Side

Packages that use EdgeNGramTokenizer.Side
org.apache.lucene.analysis.ngram Character n-gram tokenizers and filters.

Uses of EdgeNGramTokenizer.Side in org.apache.lucene.analysis.ngram

Fields in org.apache.lucene.analysis.ngram declared as EdgeNGramTokenizer.Side
static EdgeNGramTokenizer.Side EdgeNGramTokenizer.DEFAULT_SIDE

Methods in org.apache.lucene.analysis.ngram that return EdgeNGramTokenizer.Side
static EdgeNGramTokenizer.Side | EdgeNGramTokenizer.Side.getSide(String sideName)
static EdgeNGramTokenizer.Side | EdgeNGramTokenizer.Side.valueOf(String name) Returns the enum constant of this type with the specified name.
static EdgeNGramTokenizer.Side[] | EdgeNGramTokenizer.Side.values() Returns an array containing the constants of this enum type, in the order they're declared.

Constructors in org.apache.lucene.analysis.ngram with parameters of type EdgeNGramTokenizer.Side
EdgeNGramTokenizer(AttributeSource.AttributeFactory factory, Reader input, EdgeNGramTokenizer.Side side, int minGram, int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
EdgeNGramTokenizer(AttributeSource source, Reader input, EdgeNGramTokenizer.Side side, int minGram, int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
EdgeNGramTokenizer(Reader input, EdgeNGramTokenizer.Side side, int minGram, int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ngram.NGramTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ngram.NGramTokenFilter

No usage of org.apache.lucene.analysis.ngram.NGramTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ngram.NGramTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ngram.NGramTokenizer

No usage of org.apache.lucene.analysis.ngram.NGramTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


DutchAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.nl
Class DutchAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.nl.DutchAnalyzer
All Implemented Interfaces:
Closeable
public final class DutchAnalyzer
extends ReusableAnalyzerBase

Analyzer for Dutch language.

Supports an external list of stopwords (words that will not be indexed at all), an external list of exclusions (word that will not be stemmed, but indexed) and an external list of word-stem pairs that overrule the algorithm (dictionary stemming). A default set of stopwords is used unless an alternative list is specified, but the exclusion list is empty by default.

You must specify the required Version compatibility when creating DutchAnalyzer:

  • As of 3.6, DutchAnalyzer(Version, Set) and DutchAnalyzer(Version, Set, Set) also populate the default entries for the stem override dictionary
  • As of 3.1, Snowball stemming is done with SnowballFilter, LowerCaseFilter is used prior to StopFilter, and Snowball stopwords are used by default.
  • As of 2.9, StopFilter preserves position increments

NOTE: This class uses the same Version dependent settings as StandardAnalyzer.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String | DEFAULT_STOPWORD_FILE File containing default Dutch stopwords.
static String[] | DUTCH_STOP_WORDS Deprecated. use getDefaultStopSet() instead
Constructor Summary
DutchAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (getDefaultStopSet()) and a few default entries for the stem exclusion table.
DutchAnalyzer(Version matchVersion, File stopwords)
Deprecated. use DutchAnalyzer(Version, Set) instead
DutchAnalyzer(Version matchVersion, HashSet<?> stopwords)
Deprecated. use DutchAnalyzer(Version, Set) instead
DutchAnalyzer(Version matchVersion, Set<?> stopwords)
DutchAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionTable)
DutchAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionTable, CharArrayMap<String> stemOverrideDict)
DutchAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use DutchAnalyzer(Version, Set) instead
Method Summary
protected  ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader aReader)
Returns a (possibly reused) TokenStream which tokenizes all the text in the provided Reader.
static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.
 void setStemDictionary(File stemdictFile)
Deprecated. This prevents reuse of TokenStreams. If you wish to use a custom stem dictionary, create your own Analyzer with StemmerOverrideFilter
 void setStemExclusionTable(File exclusionlist)
Deprecated. use DutchAnalyzer(Version, Set, Set) instead
 void setStemExclusionTable(HashSet<?> exclusionlist)
Deprecated. use DutchAnalyzer(Version, Set, Set) instead
 void setStemExclusionTable(String... exclusionlist)
Deprecated. use DutchAnalyzer(Version, Set, Set) instead
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DUTCH_STOP_WORDS

@Deprecated
public static final String[] DUTCH_STOP_WORDS
Deprecated. use getDefaultStopSet() instead
List of typical Dutch stopwords.

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Dutch stopwords.

See Also:
Constant Field Values
Constructor Detail

DutchAnalyzer

public DutchAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (getDefaultStopSet()) and a few default entries for the stem exclusion table.

DutchAnalyzer

public DutchAnalyzer(Version matchVersion,
                     Set<?> stopwords)

DutchAnalyzer

public DutchAnalyzer(Version matchVersion,
                     Set<?> stopwords,
                     Set<?> stemExclusionTable)

DutchAnalyzer

public DutchAnalyzer(Version matchVersion,
                     Set<?> stopwords,
                     Set<?> stemExclusionTable,
                     CharArrayMap<String> stemOverrideDict)

DutchAnalyzer

@Deprecated
public DutchAnalyzer(Version matchVersion,
                                String... stopwords)
Deprecated. use DutchAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

Parameters:
matchVersion -
stopwords -

DutchAnalyzer

@Deprecated
public DutchAnalyzer(Version matchVersion,
                                HashSet<?> stopwords)
Deprecated. use DutchAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

Parameters:
stopwords -

DutchAnalyzer

@Deprecated
public DutchAnalyzer(Version matchVersion,
                                File stopwords)
Deprecated. use DutchAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

Parameters:
stopwords -
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.

Returns:
an unmodifiable instance of the default stop-words set.

setStemExclusionTable

@Deprecated
public void setStemExclusionTable(String... exclusionlist)
Deprecated. use DutchAnalyzer(Version, Set, Set) instead

Builds an exclusionlist from an array of Strings.

Parameters:
exclusionlist -

setStemExclusionTable

@Deprecated
public void setStemExclusionTable(HashSet<?> exclusionlist)
Deprecated. use DutchAnalyzer(Version, Set, Set) instead

Builds an exclusionlist from a Hashtable.

setStemExclusionTable

@Deprecated
public void setStemExclusionTable(File exclusionlist)
Deprecated. use DutchAnalyzer(Version, Set, Set) instead

Builds an exclusionlist from the words contained in the given file.

setStemDictionary

@Deprecated
public void setStemDictionary(File stemdictFile)
Deprecated. This prevents reuse of TokenStreams. If you wish to use a custom stem dictionary, create your own Analyzer with StemmerOverrideFilter

Reads a stemdictionary file , that overrules the stemming algorithm This is a textfile that contains per line word\tstem, i.e: two tab seperated words

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader aReader)
Returns a (possibly reused) TokenStream which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
aReader - the reader passed to the Tokenizer constructor
Returns:
A TokenStream built from a StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter, KeywordMarkerFilter if a stem exclusion set is provided, StemmerOverrideFilter, and SnowballFilter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DutchStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.nl
Class DutchStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.nl.DutchStemFilter
All Implemented Interfaces:
Closeable
Deprecated. Use SnowballFilter with DutchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0

@Deprecated
public final class DutchStemFilter
extends TokenFilter

A TokenFilter that stems Dutch words.

It supports a table of words that should not be stemmed at all. The stemmer used can be changed at runtime after the filter object is created (as long as it is a DutchStemmer).

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

See Also:
KeywordMarkerFilter

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
DutchStemFilter(TokenStream _in)
Deprecated.
DutchStemFilter(TokenStream _in, Map<?,?> stemdictionary)
Deprecated.
DutchStemFilter(TokenStream _in, Set<?> exclusiontable)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
DutchStemFilter(TokenStream _in, Set<?> exclusiontable, Map<?,?> stemdictionary)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
Method Summary
boolean | incrementToken() Deprecated. Returns the next token in the stream, or null at EOS
void | setExclusionTable(HashSet<?> exclusiontable) Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.
void | setStemDictionary(HashMap<?,?> dict) Deprecated. Set dictionary for stemming, this dictionary overrules the algorithm, so you can correct for a particular unwanted word-stem pair.
void | setStemmer(DutchStemmer stemmer) Deprecated. Set a alternative/custom DutchStemmer for this filter.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

DutchStemFilter

public DutchStemFilter(TokenStream _in)
Deprecated.

DutchStemFilter

@Deprecated
public DutchStemFilter(TokenStream _in,
                                  Set<?> exclusiontable)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.

Builds a DutchStemFilter that uses an exclusion table.

DutchStemFilter

public DutchStemFilter(TokenStream _in,
                       Map<?,?> stemdictionary)
Deprecated.
Parameters:
stemdictionary - Dictionary of word stem pairs, that overrule the algorithm

DutchStemFilter

@Deprecated
public DutchStemFilter(TokenStream _in,
                                  Set<?> exclusiontable,
                                  Map<?,?> stemdictionary)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.

Parameters:
stemdictionary - Dictionary of word stem pairs, that overrule the algorithm
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Deprecated.
Returns the next token in the stream, or null at EOS

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

setStemmer

public void setStemmer(DutchStemmer stemmer)
Deprecated.
Set a alternative/custom DutchStemmer for this filter.

setExclusionTable

@Deprecated
public void setExclusionTable(HashSet<?> exclusiontable)
Deprecated. use KeywordAttribute with KeywordMarkerFilter instead.

Set an alternative exclusion list for this filter.

setStemDictionary

public void setStemDictionary(HashMap<?,?> dict)
Deprecated.
Set dictionary for stemming, this dictionary overrules the algorithm, so you can correct for a particular unwanted word-stem pair.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DutchStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.nl
Class DutchStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.nl.DutchStemmer
Deprecated. Use DutchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0

@Deprecated
public class DutchStemmer
extends Object

A stemmer for Dutch words.

The algorithm is an implementation of the dutch stemming algorithm in Martin Porter's snowball project.

Constructor Summary
DutchStemmer()
Deprecated.
Method Summary
 String stem(String term)
Deprecated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DutchStemmer

public DutchStemmer()
Deprecated.
Method Detail

stem

public String stem(String term)
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.nl
Classes
DutchAnalyzer
DutchStemFilter
DutchStemmer


org.apache.lucene.analysis.nl

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.nl

Analyzer for Dutch.

See:
Description

Class Summary
DutchAnalyzer | Analyzer for Dutch language.
DutchStemFilter | Deprecated. Use SnowballFilter with DutchStemmer instead, which has the same functionality.
DutchStemmer | Deprecated. Use DutchStemmer instead, which has the same functionality.

Package org.apache.lucene.analysis.nl Description

Analyzer for Dutch.


org.apache.lucene.analysis.nl Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.nl

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.nl.DutchAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.nl.DutchStemFilter
    • org.apache.lucene.analysis.nl.DutchStemmer


Uses of Package org.apache.lucene.analysis.nl

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.nl

Packages that use org.apache.lucene.analysis.nl
org.apache.lucene.analysis.nl Analyzer for Dutch.

Classes in org.apache.lucene.analysis.nl used by org.apache.lucene.analysis.nl
DutchStemmer
Deprecated. Use DutchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.nl.DutchAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.nl.DutchAnalyzer

No usage of org.apache.lucene.analysis.nl.DutchAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.nl.DutchStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.nl.DutchStemFilter

No usage of org.apache.lucene.analysis.nl.DutchStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.nl.DutchStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.nl.DutchStemmer

Packages that use DutchStemmer
org.apache.lucene.analysis.nl Analyzer for Dutch.

Uses of DutchStemmer in org.apache.lucene.analysis.nl

Methods in org.apache.lucene.analysis.nl with parameters of type DutchStemmer
 void DutchStemFilter.setStemmer(DutchStemmer stemmer)
Deprecated. Set a alternative/custom DutchStemmer for this filter.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


NorwegianAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.no
Class NorwegianAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.no.NorwegianAnalyzer
All Implemented Interfaces:
Closeable
public final class NorwegianAnalyzer
extends StopwordAnalyzerBase

Analyzer for Norwegian.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Norwegian stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
NorwegianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
NorwegianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
NorwegianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Norwegian stopwords.

See Also:
Constant Field Values
Constructor Detail

NorwegianAnalyzer

public NorwegianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

NorwegianAnalyzer

public NorwegianAnalyzer(Version matchVersion,
                         Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

NorwegianAnalyzer

public NorwegianAnalyzer(Version matchVersion,
                         Set<?> stopwords,
                         Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and SnowballFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


NorwegianLightStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.no
Class NorwegianLightStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.no.NorwegianLightStemFilter
All Implemented Interfaces:
Closeable
public final class NorwegianLightStemFilter
extends TokenFilter

A TokenFilter that applies NorwegianLightStemmer to stem Norwegian words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
NorwegianLightStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

NorwegianLightStemFilter

public NorwegianLightStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NorwegianLightStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.no
Class NorwegianLightStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.no.NorwegianLightStemmer

public class NorwegianLightStemmer
extends Object

Light Stemmer for Norwegian.

Parts of this stemmer is adapted from SwedishLightStemFilter, except that while the Swedish one has a pre-defined rule set and a corresponding corpus to validate against whereas the Norwegian one is hand crafted.

Constructor Summary
NorwegianLightStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NorwegianLightStemmer

public NorwegianLightStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NorwegianMinimalStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.no
Class NorwegianMinimalStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.no.NorwegianMinimalStemFilter
All Implemented Interfaces:
Closeable
public final class NorwegianMinimalStemFilter
extends TokenFilter

A TokenFilter that applies NorwegianMinimalStemmer to stem Norwegian words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
NorwegianMinimalStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

NorwegianMinimalStemFilter

public NorwegianMinimalStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NorwegianMinimalStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.no
Class NorwegianMinimalStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.no.NorwegianMinimalStemmer

public class NorwegianMinimalStemmer
extends Object

Minimal Stemmer for Norwegian bokm?l (no-nb)

Stems known plural forms for Norwegian nouns only, together with genitiv -s

Constructor Summary
NorwegianMinimalStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NorwegianMinimalStemmer

public NorwegianMinimalStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.no
Classes
NorwegianAnalyzer
NorwegianLightStemFilter
NorwegianLightStemmer
NorwegianMinimalStemFilter
NorwegianMinimalStemmer


org.apache.lucene.analysis.no

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.no

Analyzer for Norwegian.

See:
Description

Class Summary
NorwegianAnalyzer | Analyzer for Norwegian.
NorwegianLightStemFilter | A TokenFilter that applies NorwegianLightStemmer to stem Norwegian words.
NorwegianLightStemmer | Light Stemmer for Norwegian.
NorwegianMinimalStemFilter | A TokenFilter that applies NorwegianMinimalStemmer to stem Norwegian words.
NorwegianMinimalStemmer | Minimal Stemmer for Norwegian bokm?l (no-nb)

Package org.apache.lucene.analysis.no Description

Analyzer for Norwegian.


org.apache.lucene.analysis.no Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.no

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.no.NorwegianAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.no.NorwegianLightStemFilter
          • org.apache.lucene.analysis.no.NorwegianMinimalStemFilter
    • org.apache.lucene.analysis.no.NorwegianLightStemmer
    • org.apache.lucene.analysis.no.NorwegianMinimalStemmer


Uses of Package org.apache.lucene.analysis.no

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.no

No usage of org.apache.lucene.analysis.no

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.no.NorwegianAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.no.NorwegianAnalyzer

No usage of org.apache.lucene.analysis.no.NorwegianAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.no.NorwegianLightStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.no.NorwegianLightStemFilter

No usage of org.apache.lucene.analysis.no.NorwegianLightStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.no.NorwegianLightStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.no.NorwegianLightStemmer

No usage of org.apache.lucene.analysis.no.NorwegianLightStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.no.NorwegianMinimalStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.no.NorwegianMinimalStemFilter

No usage of org.apache.lucene.analysis.no.NorwegianMinimalStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.no.NorwegianMinimalStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.no.NorwegianMinimalStemmer

No usage of org.apache.lucene.analysis.no.NorwegianMinimalStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.path
Classes
PathHierarchyTokenizer
ReversePathHierarchyTokenizer


org.apache.lucene.analysis.path

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.path

Analysis components for path-like strings such as filenames.

See:
Description

Class Summary
PathHierarchyTokenizer | Tokenizer for path-like hierarchies.
ReversePathHierarchyTokenizer | Tokenizer for domain-like hierarchies.

Package org.apache.lucene.analysis.path Description

Analysis components for path-like strings such as filenames.


org.apache.lucene.analysis.path Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.path

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.Tokenizer
          • org.apache.lucene.analysis.path.PathHierarchyTokenizer
          • org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer


Uses of Package org.apache.lucene.analysis.path

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.path

No usage of org.apache.lucene.analysis.path

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PathHierarchyTokenizer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.path
Class PathHierarchyTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.path.PathHierarchyTokenizer
All Implemented Interfaces:
Closeable
public class PathHierarchyTokenizer
extends Tokenizer

Tokenizer for path-like hierarchies.

Take something like:

  /something/something/else
and make:
  /something
  /something/something
  /something/something/else

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static char | DEFAULT_DELIMITER
static int | DEFAULT_SKIP
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
PathHierarchyTokenizer(Reader input)
PathHierarchyTokenizer(Reader input, char delimiter, char replacement)
PathHierarchyTokenizer(Reader input, char delimiter, char replacement, int skip)
PathHierarchyTokenizer(Reader input, int skip)
PathHierarchyTokenizer(Reader input, int bufferSize, char delimiter)
PathHierarchyTokenizer(Reader input, int bufferSize, char delimiter, char replacement, int skip)
Method Summary
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset()
Resets this stream to the beginning.
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_DELIMITER

public static final char DEFAULT_DELIMITER
See Also:
Constant Field Values

DEFAULT_SKIP

public static final int DEFAULT_SKIP
See Also:
Constant Field Values
Constructor Detail

PathHierarchyTokenizer

public PathHierarchyTokenizer(Reader input)

PathHierarchyTokenizer

public PathHierarchyTokenizer(Reader input,
                              int skip)

PathHierarchyTokenizer

public PathHierarchyTokenizer(Reader input,
                              int bufferSize,
                              char delimiter)

PathHierarchyTokenizer

public PathHierarchyTokenizer(Reader input,
                              char delimiter,
                              char replacement)

PathHierarchyTokenizer

public PathHierarchyTokenizer(Reader input,
                              char delimiter,
                              char replacement,
                              int skip)

PathHierarchyTokenizer

public PathHierarchyTokenizer(Reader input,
                              int bufferSize,
                              char delimiter,
                              char replacement,
                              int skip)
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

end

public final void end()
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream

reset

public void reset()
           throws IOException
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ReversePathHierarchyTokenizer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.path
Class ReversePathHierarchyTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer
All Implemented Interfaces:
Closeable
public class ReversePathHierarchyTokenizer
extends Tokenizer

Tokenizer for domain-like hierarchies.

Take something like:

 www.site.co.uk
and make:
 www.site.co.uk
 site.co.uk
 co.uk
 uk

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static char | DEFAULT_DELIMITER
static int | DEFAULT_SKIP
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
ReversePathHierarchyTokenizer(Reader input)
ReversePathHierarchyTokenizer(Reader input, char delimiter, char replacement)
ReversePathHierarchyTokenizer(Reader input, char delimiter, char replacement, int skip)
ReversePathHierarchyTokenizer(Reader input, char delimiter, int skip)
ReversePathHierarchyTokenizer(Reader input, int skip)
ReversePathHierarchyTokenizer(Reader input, int bufferSize, char delimiter)
ReversePathHierarchyTokenizer(Reader input, int bufferSize, char delimiter, char replacement)
ReversePathHierarchyTokenizer(Reader input, int bufferSize, char delimiter, char replacement, int skip)
Method Summary
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset()
Resets this stream to the beginning.
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_DELIMITER

public static final char DEFAULT_DELIMITER
See Also:
Constant Field Values

DEFAULT_SKIP

public static final int DEFAULT_SKIP
See Also:
Constant Field Values
Constructor Detail

ReversePathHierarchyTokenizer

public ReversePathHierarchyTokenizer(Reader input)

ReversePathHierarchyTokenizer

public ReversePathHierarchyTokenizer(Reader input,
                                     int skip)

ReversePathHierarchyTokenizer

public ReversePathHierarchyTokenizer(Reader input,
                                     int bufferSize,
                                     char delimiter)

ReversePathHierarchyTokenizer

public ReversePathHierarchyTokenizer(Reader input,
                                     char delimiter,
                                     char replacement)

ReversePathHierarchyTokenizer

public ReversePathHierarchyTokenizer(Reader input,
                                     int bufferSize,
                                     char delimiter,
                                     char replacement)

ReversePathHierarchyTokenizer

public ReversePathHierarchyTokenizer(Reader input,
                                     char delimiter,
                                     int skip)

ReversePathHierarchyTokenizer

public ReversePathHierarchyTokenizer(Reader input,
                                     char delimiter,
                                     char replacement,
                                     int skip)

ReversePathHierarchyTokenizer

public ReversePathHierarchyTokenizer(Reader input,
                                     int bufferSize,
                                     char delimiter,
                                     char replacement,
                                     int skip)
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

end

public final void end()
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream

reset

public void reset()
           throws IOException
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.path.PathHierarchyTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.path.PathHierarchyTokenizer

No usage of org.apache.lucene.analysis.path.PathHierarchyTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

No usage of org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AbstractEncoder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.payloads
Class AbstractEncoder

java.lang.Object
    extended by  org.apache.lucene.analysis.payloads.AbstractEncoder
All Implemented Interfaces:
PayloadEncoder
Direct Known Subclasses:
FloatEncoder, IdentityEncoder, IntegerEncoder
public abstract class AbstractEncoder
extends Object
implements PayloadEncoder

Base class for payload encoders.

Constructor Summary
AbstractEncoder()
Method Summary
 Payload encode(char[] buffer)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.analysis.payloads.PayloadEncoder
encode

Constructor Detail

AbstractEncoder

public AbstractEncoder()
Method Detail

encode

public Payload encode(char[] buffer)
Specified by:
encode in interface PayloadEncoder
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DelimitedPayloadTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.payloads
Class DelimitedPayloadTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.payloads.DelimitedPayloadTokenFilter
All Implemented Interfaces:
Closeable
public final class DelimitedPayloadTokenFilter
extends TokenFilter

Characters before the delimiter are the "token", those after are the payload.

For example, if the delimiter is '|', then for the string "foo|bar", foo is the token and "bar" is a payload.

Note, you can also include a PayloadEncoder to convert the payload in an appropriate way (from characters to bytes).

Note make sure your Tokenizer doesn't split on the delimiter, or this won't work

See Also:
PayloadEncoder

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static char DEFAULT_DELIMITER
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
DelimitedPayloadTokenFilter(TokenStream input, char delimiter, PayloadEncoder encoder)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_DELIMITER

public static final char DEFAULT_DELIMITER
See Also:
Constant Field Values
Constructor Detail

DelimitedPayloadTokenFilter

public DelimitedPayloadTokenFilter(TokenStream input,
                                   char delimiter,
                                   PayloadEncoder encoder)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FloatEncoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.payloads
Class FloatEncoder

java.lang.Object
    extended by  org.apache.lucene.analysis.payloads.AbstractEncoder
        extended by  org.apache.lucene.analysis.payloads.FloatEncoder
All Implemented Interfaces:
PayloadEncoder
public class FloatEncoder
extends AbstractEncoder
implements PayloadEncoder

Encode a character array Float as a Payload.

See Also:
PayloadHelper.encodeFloat(float, byte[], int)

Constructor Summary
FloatEncoder()
Method Summary
 Payload encode(char[] buffer, int offset, int length)
Convert a char array to a Payload
Methods inherited from class org.apache.lucene.analysis.payloads.AbstractEncoder
encode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.analysis.payloads.PayloadEncoder
encode

Constructor Detail

FloatEncoder

public FloatEncoder()
Method Detail

encode

public Payload encode(char[] buffer,
                      int offset,
                      int length)
Description copied from interface: PayloadEncoder
Convert a char array to a Payload

Specified by:
encode in interface PayloadEncoder
Returns:
encoded Payload
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IdentityEncoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.payloads
Class IdentityEncoder

java.lang.Object
    extended by  org.apache.lucene.analysis.payloads.AbstractEncoder
        extended by  org.apache.lucene.analysis.payloads.IdentityEncoder
All Implemented Interfaces:
PayloadEncoder
public class IdentityEncoder
extends AbstractEncoder
implements PayloadEncoder

Does nothing other than convert the char array to a byte array using the specified encoding.

Field Summary
protected Charset | charset
protected String | charsetName Deprecated. This field is no longer used. Use charset instead.
Constructor Summary
IdentityEncoder()
IdentityEncoder(Charset charset)
Method Summary
 Payload encode(char[] buffer, int offset, int length)
Convert a char array to a Payload
Methods inherited from class org.apache.lucene.analysis.payloads.AbstractEncoder
encode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.analysis.payloads.PayloadEncoder
encode

Field Detail

charset

protected Charset charset

charsetName

@Deprecated
protected String charsetName
Deprecated. This field is no longer used. Use charset instead.
Constructor Detail

IdentityEncoder

public IdentityEncoder()

IdentityEncoder

public IdentityEncoder(Charset charset)
Method Detail

encode

public Payload encode(char[] buffer,
                      int offset,
                      int length)
Description copied from interface: PayloadEncoder
Convert a char array to a Payload

Specified by:
encode in interface PayloadEncoder
Returns:
encoded Payload
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntegerEncoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.payloads
Class IntegerEncoder

java.lang.Object
    extended by  org.apache.lucene.analysis.payloads.AbstractEncoder
        extended by  org.apache.lucene.analysis.payloads.IntegerEncoder
All Implemented Interfaces:
PayloadEncoder
public class IntegerEncoder
extends AbstractEncoder
implements PayloadEncoder

Encode a character array Integer as a Payload.

See PayloadHelper.encodeInt(int, byte[], int).

Constructor Summary
IntegerEncoder()
Method Summary
 Payload encode(char[] buffer, int offset, int length)
Convert a char array to a Payload
Methods inherited from class org.apache.lucene.analysis.payloads.AbstractEncoder
encode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.analysis.payloads.PayloadEncoder
encode

Constructor Detail

IntegerEncoder

public IntegerEncoder()
Method Detail

encode

public Payload encode(char[] buffer,
                      int offset,
                      int length)
Description copied from interface: PayloadEncoder
Convert a char array to a Payload

Specified by:
encode in interface PayloadEncoder
Returns:
encoded Payload
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericPayloadTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.payloads
Class NumericPayloadTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.payloads.NumericPayloadTokenFilter
All Implemented Interfaces:
Closeable
public class NumericPayloadTokenFilter
extends TokenFilter

Assigns a payload to a token based on the Token.type()

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
NumericPayloadTokenFilter(TokenStream input, float payload, String typeMatch)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

NumericPayloadTokenFilter

public NumericPayloadTokenFilter(TokenStream input,
                                 float payload,
                                 String typeMatch)
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.payloads
Interfaces
PayloadEncoder
Classes
AbstractEncoder
DelimitedPayloadTokenFilter
FloatEncoder
IdentityEncoder
IntegerEncoder
NumericPayloadTokenFilter
PayloadHelper
TokenOffsetPayloadTokenFilter
TypeAsPayloadTokenFilter


org.apache.lucene.analysis.payloads

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.payloads

Provides various convenience classes for creating payloads on Tokens.

See:
Description

Interface Summary
PayloadEncoder Mainly for use with the DelimitedPayloadTokenFilter, converts char buffers to Payload.

Class Summary
AbstractEncoder | Base class for payload encoders.
DelimitedPayloadTokenFilter | Characters before the delimiter are the "token", those after are the payload.
FloatEncoder | Encode a character array Float as a Payload.
IdentityEncoder | Does nothing other than convert the char array to a byte array using the specified encoding.
IntegerEncoder | Encode a character array Integer as a Payload.
NumericPayloadTokenFilter | Assigns a payload to a token based on the Token.type()
PayloadHelper | Utility methods for encoding payloads.
TokenOffsetPayloadTokenFilter | Adds the Token.setStartOffset(int) and Token.setEndOffset(int) First 4 bytes are the start
TypeAsPayloadTokenFilter | Makes the Token.type() a payload.

Package org.apache.lucene.analysis.payloads Description

Provides various convenience classes for creating payloads on Tokens.
Copyright © 2007 Apache Software Foundation


org.apache.lucene.analysis.payloads Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.payloads

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.payloads.AbstractEncoder (implements org.apache.lucene.analysis.payloads.PayloadEncoder)
      • org.apache.lucene.analysis.payloads.FloatEncoder (implements org.apache.lucene.analysis.payloads.PayloadEncoder)
      • org.apache.lucene.analysis.payloads.IdentityEncoder (implements org.apache.lucene.analysis.payloads.PayloadEncoder)
      • org.apache.lucene.analysis.payloads.IntegerEncoder (implements org.apache.lucene.analysis.payloads.PayloadEncoder)
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.payloads.DelimitedPayloadTokenFilter
          • org.apache.lucene.analysis.payloads.NumericPayloadTokenFilter
          • org.apache.lucene.analysis.payloads.TokenOffsetPayloadTokenFilter
          • org.apache.lucene.analysis.payloads.TypeAsPayloadTokenFilter
    • org.apache.lucene.analysis.payloads.PayloadHelper

Interface Hierarchy

  • org.apache.lucene.analysis.payloads.PayloadEncoder


Uses of Package org.apache.lucene.analysis.payloads

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.payloads

Packages that use org.apache.lucene.analysis.payloads
org.apache.lucene.analysis.payloads
Provides various convenience classes for creating payloads on Tokens.

Classes in org.apache.lucene.analysis.payloads used by org.apache.lucene.analysis.payloads
AbstractEncoder
Base class for payload encoders.
PayloadEncoder
Mainly for use with the DelimitedPayloadTokenFilter, converts char buffers to Payload.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PayloadEncoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.payloads
Interface PayloadEncoder

All Known Implementing Classes:
AbstractEncoder, FloatEncoder, IdentityEncoder, IntegerEncoder
public interface PayloadEncoder

Mainly for use with the DelimitedPayloadTokenFilter, converts char buffers to Payload.

NOTE: This interface is subject to change

Method Summary
Payload | encode(char[] buffer)
Payload | encode(char[] buffer, int offset, int length) Convert a char array to a Payload

Method Detail

encode

Payload encode(char[] buffer)

encode

Payload encode(char[] buffer,
               int offset,
               int length)
Convert a char array to a Payload

Parameters:
buffer -
offset -
length -
Returns:
encoded Payload
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PayloadHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.payloads
Class PayloadHelper

java.lang.Object
    extended by  org.apache.lucene.analysis.payloads.PayloadHelper

public class PayloadHelper
extends Object

Utility methods for encoding payloads.

Constructor Summary
PayloadHelper()
Method Summary
static float | decodeFloat(byte[] bytes)
static float | decodeFloat(byte[] bytes, int offset) Decode the payload that was encoded using encodeFloat(float).
static int | decodeInt(byte[] bytes, int offset)
static byte[] | encodeFloat(float payload)
static byte[] | encodeFloat(float payload, byte[] data, int offset)
static byte[] | encodeInt(int payload)
static byte[] | encodeInt(int payload, byte[] data, int offset)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PayloadHelper

public PayloadHelper()
Method Detail

encodeFloat

public static byte[] encodeFloat(float payload)

encodeFloat

public static byte[] encodeFloat(float payload,
                                 byte[] data,
                                 int offset)

encodeInt

public static byte[] encodeInt(int payload)

encodeInt

public static byte[] encodeInt(int payload,
                               byte[] data,
                               int offset)

decodeFloat

public static float decodeFloat(byte[] bytes)
Parameters:
bytes -
Returns:
the decoded float
See Also:
decodeFloat(byte[], int), encodeFloat(float)

decodeFloat

public static final float decodeFloat(byte[] bytes,
                                      int offset)
Decode the payload that was encoded using encodeFloat(float). NOTE: the length of the array must be at least offset + 4 long.

Parameters:
bytes - The bytes to decode
offset - The offset into the array.
Returns:
The float that was encoded
See Also:
encodeFloat(float)

decodeInt

public static final int decodeInt(byte[] bytes,
                                  int offset)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TokenOffsetPayloadTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.payloads
Class TokenOffsetPayloadTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.payloads.TokenOffsetPayloadTokenFilter
All Implemented Interfaces:
Closeable
public class TokenOffsetPayloadTokenFilter
extends TokenFilter

Adds the Token.setStartOffset(int) and Token.setEndOffset(int) First 4 bytes are the start

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
TokenOffsetPayloadTokenFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

TokenOffsetPayloadTokenFilter

public TokenOffsetPayloadTokenFilter(TokenStream input)
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TypeAsPayloadTokenFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.payloads
Class TypeAsPayloadTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.payloads.TypeAsPayloadTokenFilter
All Implemented Interfaces:
Closeable
public class TypeAsPayloadTokenFilter
extends TokenFilter

Makes the Token.type() a payload. Encodes the type using String.getBytes(String) with "UTF-8" as the encoding

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
TypeAsPayloadTokenFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

TypeAsPayloadTokenFilter

public TypeAsPayloadTokenFilter(TokenStream input)
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.payloads.AbstractEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.payloads.AbstractEncoder

Packages that use AbstractEncoder
org.apache.lucene.analysis.payloads
Provides various convenience classes for creating payloads on Tokens.

Uses of AbstractEncoder in org.apache.lucene.analysis.payloads

Subclasses of AbstractEncoder in org.apache.lucene.analysis.payloads
class | FloatEncoder Encode a character array Float as a Payload.
class | IdentityEncoder Does nothing other than convert the char array to a byte array using the specified encoding.
class | IntegerEncoder Encode a character array Integer as a Payload.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.payloads.DelimitedPayloadTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.payloads.DelimitedPayloadTokenFilter

No usage of org.apache.lucene.analysis.payloads.DelimitedPayloadTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.payloads.FloatEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.payloads.FloatEncoder

No usage of org.apache.lucene.analysis.payloads.FloatEncoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.payloads.IdentityEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.payloads.IdentityEncoder

No usage of org.apache.lucene.analysis.payloads.IdentityEncoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.payloads.IntegerEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.payloads.IntegerEncoder

No usage of org.apache.lucene.analysis.payloads.IntegerEncoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.payloads.NumericPayloadTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.payloads.NumericPayloadTokenFilter

No usage of org.apache.lucene.analysis.payloads.NumericPayloadTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.payloads.PayloadEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.payloads.PayloadEncoder

Packages that use PayloadEncoder
org.apache.lucene.analysis.payloads
Provides various convenience classes for creating payloads on Tokens.

Uses of PayloadEncoder in org.apache.lucene.analysis.payloads

Classes in org.apache.lucene.analysis.payloads that implement PayloadEncoder
class | AbstractEncoder Base class for payload encoders.
class | FloatEncoder Encode a character array Float as a Payload.
class | IdentityEncoder Does nothing other than convert the char array to a byte array using the specified encoding.
class | IntegerEncoder Encode a character array Integer as a Payload.

Constructors in org.apache.lucene.analysis.payloads with parameters of type PayloadEncoder
DelimitedPayloadTokenFilter(TokenStream input, char delimiter, PayloadEncoder encoder)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.payloads.PayloadHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.payloads.PayloadHelper

No usage of org.apache.lucene.analysis.payloads.PayloadHelper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.payloads.TokenOffsetPayloadTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.payloads.TokenOffsetPayloadTokenFilter

No usage of org.apache.lucene.analysis.payloads.TokenOffsetPayloadTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.payloads.TypeAsPayloadTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.payloads.TypeAsPayloadTokenFilter

No usage of org.apache.lucene.analysis.payloads.TypeAsPayloadTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


BeiderMorseFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.phonetic
Class BeiderMorseFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.phonetic.BeiderMorseFilter
All Implemented Interfaces:
Closeable
public final class BeiderMorseFilter
extends TokenFilter

TokenFilter for Beider-Morse phonetic encoding.

WARNING: some inputs can cause extremely high RAM usage! https://issues.apache.org/jira/browse/CODEC-132

See Also:
BeiderMorseEncoder
WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
BeiderMorseFilter(TokenStream input, org.apache.commons.codec.language.bm.PhoneticEngine engine)
Calls BeiderMorseFilter(input, engine, null)
BeiderMorseFilter(TokenStream input, org.apache.commons.codec.language.bm.PhoneticEngine engine, org.apache.commons.codec.language.bm.Languages.LanguageSet languages)
Create a new BeiderMorseFilter
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

BeiderMorseFilter

public BeiderMorseFilter(TokenStream input,
                         org.apache.commons.codec.language.bm.PhoneticEngine engine)
Calls BeiderMorseFilter(input, engine, null)

BeiderMorseFilter

public BeiderMorseFilter(TokenStream input,
                         org.apache.commons.codec.language.bm.PhoneticEngine engine,
                         org.apache.commons.codec.language.bm.Languages.LanguageSet languages)
Create a new BeiderMorseFilter

Parameters:
input - TokenStream to filter
engine - configured PhoneticEngine with BM settings.
languages - optional Set of original languages. Can be null (which means it will be guessed).
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DoubleMetaphoneFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.phonetic
Class DoubleMetaphoneFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.phonetic.DoubleMetaphoneFilter
All Implemented Interfaces:
Closeable
public class DoubleMetaphoneFilter
extends TokenFilter

Filter for DoubleMetaphone (supporting secondary codes)

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
DoubleMetaphoneFilter(TokenStream input, int maxCodeLength, boolean inject)
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

DoubleMetaphoneFilter

public DoubleMetaphoneFilter(TokenStream input,
                             int maxCodeLength,
                             boolean inject)
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.phonetic
Classes
BeiderMorseFilter
DoubleMetaphoneFilter
PhoneticFilter


org.apache.lucene.analysis.phonetic

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.phonetic

Analysis components for phonetic search.

See:
Description

Class Summary
BeiderMorseFilter | TokenFilter for Beider-Morse phonetic encoding.
DoubleMetaphoneFilter | Filter for DoubleMetaphone (supporting secondary codes)
PhoneticFilter | Create tokens for phonetic matches.

Package org.apache.lucene.analysis.phonetic Description

Analysis components for phonetic search.


org.apache.lucene.analysis.phonetic Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.phonetic

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.phonetic.BeiderMorseFilter
          • org.apache.lucene.analysis.phonetic.DoubleMetaphoneFilter
          • org.apache.lucene.analysis.phonetic.PhoneticFilter


Uses of Package org.apache.lucene.analysis.phonetic

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.phonetic

No usage of org.apache.lucene.analysis.phonetic

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PhoneticFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.phonetic
Class PhoneticFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.phonetic.PhoneticFilter
All Implemented Interfaces:
Closeable
public class PhoneticFilter
extends TokenFilter

Create tokens for phonetic matches. See: http://jakarta.apache.org/commons/codec/api-release/org/apache/commons/codec/language/package-summary.html

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
protected org.apache.commons.codec.Encoder | encoder
protected boolean | inject
protected AttributeSource.State | save
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
PhoneticFilter(TokenStream in, org.apache.commons.codec.Encoder encoder, boolean inject)
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

inject

protected boolean inject

encoder

protected org.apache.commons.codec.Encoder encoder

save

protected AttributeSource.State save
Constructor Detail

PhoneticFilter

public PhoneticFilter(TokenStream in,
                      org.apache.commons.codec.Encoder encoder,
                      boolean inject)
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.phonetic.BeiderMorseFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.phonetic.BeiderMorseFilter

No usage of org.apache.lucene.analysis.phonetic.BeiderMorseFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.phonetic.DoubleMetaphoneFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.phonetic.DoubleMetaphoneFilter

No usage of org.apache.lucene.analysis.phonetic.DoubleMetaphoneFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.phonetic.PhoneticFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.phonetic.PhoneticFilter

No usage of org.apache.lucene.analysis.phonetic.PhoneticFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.pl
Classes
PolishAnalyzer


org.apache.lucene.analysis.pl

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.pl

Analyzer for Polish.

See:
Description

Class Summary
PolishAnalyzer Analyzer for Polish.

Package org.apache.lucene.analysis.pl Description

Analyzer for Polish.


org.apache.lucene.analysis.pl Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.pl

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.pl.PolishAnalyzer


Uses of Package org.apache.lucene.analysis.pl

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.pl

No usage of org.apache.lucene.analysis.pl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PolishAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.pl
Class PolishAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.pl.PolishAnalyzer
All Implemented Interfaces:
Closeable
public final class PolishAnalyzer
extends StopwordAnalyzerBase

Analyzer for Polish.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String | DEFAULT_STEMMER_FILE File containing default Polish stemmer table.
static String | DEFAULT_STOPWORD_FILE File containing default Polish stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
PolishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
PolishAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
PolishAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Polish stopwords.

See Also:
Constant Field Values

DEFAULT_STEMMER_FILE

public static final String DEFAULT_STEMMER_FILE
File containing default Polish stemmer table.

See Also:
Constant Field Values
Constructor Detail

PolishAnalyzer

public PolishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

PolishAnalyzer

public PolishAnalyzer(Version matchVersion,
                      Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

PolishAnalyzer

public PolishAnalyzer(Version matchVersion,
                      Set<?> stopwords,
                      Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and StempelFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.pl.PolishAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.pl.PolishAnalyzer

No usage of org.apache.lucene.analysis.pl.PolishAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.position
Classes
PositionFilter


org.apache.lucene.analysis.position

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.position

Filter for assigning position increments.

See:
Description

Class Summary
PositionFilter Set the positionIncrement of all tokens to the "positionIncrement", except the first return token which retains its original positionIncrement value.

Package org.apache.lucene.analysis.position Description

Filter for assigning position increments.


org.apache.lucene.analysis.position Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.position

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.position.PositionFilter


Uses of Package org.apache.lucene.analysis.position

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.position

No usage of org.apache.lucene.analysis.position

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PositionFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.position
Class PositionFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.position.PositionFilter
All Implemented Interfaces:
Closeable
public final class PositionFilter
extends TokenFilter

Set the positionIncrement of all tokens to the "positionIncrement", except the first return token which retains its original positionIncrement value. The default positionIncrement value is zero.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
PositionFilter(TokenStream input)
Constructs a PositionFilter that assigns a position increment of zero to all but the first token from the given input stream.
PositionFilter(TokenStream input, int positionIncrement)
Constructs a PositionFilter that assigns the given position increment to all but the first token from the given input stream.
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PositionFilter

public PositionFilter(TokenStream input)
Constructs a PositionFilter that assigns a position increment of zero to all but the first token from the given input stream.

Parameters:
input - the input stream

PositionFilter

public PositionFilter(TokenStream input,
                      int positionIncrement)
Constructs a PositionFilter that assigns the given position increment to all but the first token from the given input stream.

Parameters:
input - the input stream
positionIncrement - position increment to assign to all but the first token from the input stream
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.position.PositionFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.position.PositionFilter

No usage of org.apache.lucene.analysis.position.PositionFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.pt
Classes
PortugueseAnalyzer
PortugueseLightStemFilter
PortugueseLightStemmer
PortugueseMinimalStemFilter
PortugueseMinimalStemmer
PortugueseStemFilter
PortugueseStemmer
RSLPStemmerBase
RSLPStemmerBase.Rule
RSLPStemmerBase.RuleWithSetExceptions
RSLPStemmerBase.RuleWithSuffixExceptions
RSLPStemmerBase.Step


org.apache.lucene.analysis.pt

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.pt

Analyzer for Portuguese.

See:
Description

Class Summary
PortugueseAnalyzer | Analyzer for Portuguese.
PortugueseLightStemFilter | A TokenFilter that applies PortugueseLightStemmer to stem Portuguese words.
PortugueseLightStemmer | Light Stemmer for Portuguese
PortugueseMinimalStemFilter | A TokenFilter that applies PortugueseMinimalStemmer to stem Portuguese words.
PortugueseMinimalStemmer | Minimal Stemmer for Portuguese
PortugueseStemFilter | A TokenFilter that applies PortugueseStemmer to stem Portuguese words.
PortugueseStemmer | Portuguese stemmer implementing the RSLP (Removedor de Sufixos da Lingua Portuguesa) algorithm.
RSLPStemmerBase | Base class for stemmers that use a set of RSLP-like stemming steps.
RSLPStemmerBase.Rule | A basic rule, with no exceptions.
RSLPStemmerBase.RuleWithSetExceptions | A rule with a set of whole-word exceptions.
RSLPStemmerBase.RuleWithSuffixExceptions | A rule with a set of exceptional suffixes.
RSLPStemmerBase.Step | A step containing a list of rules.

Package org.apache.lucene.analysis.pt Description

Analyzer for Portuguese.


org.apache.lucene.analysis.pt Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.pt

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.pt.PortugueseAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.pt.PortugueseLightStemFilter
          • org.apache.lucene.analysis.pt.PortugueseMinimalStemFilter
          • org.apache.lucene.analysis.pt.PortugueseStemFilter
    • org.apache.lucene.analysis.pt.PortugueseLightStemmer
    • org.apache.lucene.analysis.pt.RSLPStemmerBase
      • org.apache.lucene.analysis.pt.PortugueseMinimalStemmer
      • org.apache.lucene.analysis.pt.PortugueseStemmer
    • org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule
      • org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSetExceptions
      • org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSuffixExceptions
    • org.apache.lucene.analysis.pt.RSLPStemmerBase.Step


Uses of Package org.apache.lucene.analysis.pt

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.pt

Packages that use org.apache.lucene.analysis.pt
org.apache.lucene.analysis.gl | Analyzer for Galician.
org.apache.lucene.analysis.pt | Analyzer for Portuguese.

Classes in org.apache.lucene.analysis.pt used by org.apache.lucene.analysis.gl
RSLPStemmerBase
Base class for stemmers that use a set of RSLP-like stemming steps.

Classes in org.apache.lucene.analysis.pt used by org.apache.lucene.analysis.pt
RSLPStemmerBase
Base class for stemmers that use a set of RSLP-like stemming steps.
RSLPStemmerBase.Rule
A basic rule, with no exceptions.
RSLPStemmerBase.Step
A step containing a list of rules.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PortugueseAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.pt
Class PortugueseAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.pt.PortugueseAnalyzer
All Implemented Interfaces:
Closeable
public final class PortugueseAnalyzer
extends StopwordAnalyzerBase

Analyzer for Portuguese.

You must specify the required Version compatibility when creating PortugueseAnalyzer:

  • As of 3.6, PortugueseLightStemFilter is used for less aggressive stemming.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Portuguese stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
PortugueseAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
PortugueseAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
PortugueseAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Portuguese stopwords.

See Also:
Constant Field Values
Constructor Detail

PortugueseAnalyzer

public PortugueseAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

PortugueseAnalyzer

public PortugueseAnalyzer(Version matchVersion,
                          Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

PortugueseAnalyzer

public PortugueseAnalyzer(Version matchVersion,
                          Set<?> stopwords,
                          Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and PortugueseLightStemFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


PortugueseLightStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.pt
Class PortugueseLightStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.pt.PortugueseLightStemFilter
All Implemented Interfaces:
Closeable
public final class PortugueseLightStemFilter
extends TokenFilter

A TokenFilter that applies PortugueseLightStemmer to stem Portuguese words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
PortugueseLightStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PortugueseLightStemFilter

public PortugueseLightStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PortugueseLightStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.pt
Class PortugueseLightStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.pt.PortugueseLightStemmer

public class PortugueseLightStemmer
extends Object

Light Stemmer for Portuguese

This stemmer implements the "UniNE" algorithm in: Light Stemming Approaches for the French, Portuguese, German and Hungarian Languages Jacques Savoy

Constructor Summary
PortugueseLightStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PortugueseLightStemmer

public PortugueseLightStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PortugueseMinimalStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.pt
Class PortugueseMinimalStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.pt.PortugueseMinimalStemFilter
All Implemented Interfaces:
Closeable
public final class PortugueseMinimalStemFilter
extends TokenFilter

A TokenFilter that applies PortugueseMinimalStemmer to stem Portuguese words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
PortugueseMinimalStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PortugueseMinimalStemFilter

public PortugueseMinimalStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PortugueseMinimalStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.pt
Class PortugueseMinimalStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.pt.RSLPStemmerBase
        extended by  org.apache.lucene.analysis.pt.PortugueseMinimalStemmer

public class PortugueseMinimalStemmer
extends RSLPStemmerBase

Minimal Stemmer for Portuguese

This follows the "RSLP-S" algorithm presented in: A study on the Use of Stemming for Monolingual Ad-Hoc Portuguese Information Retrieval (Orengo, et al) which is just the plural reduction step of the RSLP algorithm from A Stemming Algorithm for the Portuguese Language, Orengo et al.

See Also:
RSLPStemmerBase

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.pt.RSLPStemmerBase
RSLPStemmerBase.Rule, RSLPStemmerBase.RuleWithSetExceptions, RSLPStemmerBase.RuleWithSuffixExceptions, RSLPStemmerBase.Step
Constructor Summary
PortugueseMinimalStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class org.apache.lucene.analysis.pt.RSLPStemmerBase
parse
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PortugueseMinimalStemmer

public PortugueseMinimalStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PortugueseStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.pt
Class PortugueseStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.pt.PortugueseStemFilter
All Implemented Interfaces:
Closeable
public final class PortugueseStemFilter
extends TokenFilter

A TokenFilter that applies PortugueseStemmer to stem Portuguese words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
PortugueseStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PortugueseStemFilter

public PortugueseStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PortugueseStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.pt
Class PortugueseStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.pt.RSLPStemmerBase
        extended by  org.apache.lucene.analysis.pt.PortugueseStemmer

public class PortugueseStemmer
extends RSLPStemmerBase

Portuguese stemmer implementing the RSLP (Removedor de Sufixos da Lingua Portuguesa) algorithm. This is sometimes also referred to as the Orengo stemmer.

See Also:
RSLPStemmerBase

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.pt.RSLPStemmerBase
RSLPStemmerBase.Rule, RSLPStemmerBase.RuleWithSetExceptions, RSLPStemmerBase.RuleWithSuffixExceptions, RSLPStemmerBase.Step
Constructor Summary
PortugueseStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class org.apache.lucene.analysis.pt.RSLPStemmerBase
parse
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PortugueseStemmer

public PortugueseStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Parameters:
s - buffer, oversized to at least len+1
len - initial valid length of buffer
Returns:
new valid length, stemmed
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RSLPStemmerBase

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.pt
Class RSLPStemmerBase

java.lang.Object
    extended by  org.apache.lucene.analysis.pt.RSLPStemmerBase
Direct Known Subclasses:
GalicianMinimalStemmer, GalicianStemmer, PortugueseMinimalStemmer, PortugueseStemmer
public abstract class RSLPStemmerBase
extends Object

Base class for stemmers that use a set of RSLP-like stemming steps.

RSLP (Removedor de Sufixos da Lingua Portuguesa) is an algorithm designed originally for stemming the Portuguese language, described in the paper A Stemming Algorithm for the Portuguese Language, Orengo et. al.

Since this time a plural-only modification (RSLP-S) as well as a modification for the Galician language have been implemented. This class parses a configuration file that describes RSLPStemmerBase.Steps, where each Step contains a set of RSLPStemmerBase.Rules.

The general rule format is:

{ "suffix", N, "replacement", { "exception1", "exception2", ...}}
where:
  • suffix is the suffix to be removed (such as "inho").
  • N is the min stem size, where stem is defined as the candidate stem after removing the suffix (but before appending the replacement!)
  • replacement is an optimal string to append after removing the suffix. This can be the empty string.
  • exceptions is an optional list of exceptions, patterns that should not be stemmed. These patterns can be specified as whole word or suffix (ends-with) patterns, depending upon the exceptions format flag in the step header.

A step is an ordered list of rules, with a structure in this format:

{ "name", N, B, { "cond1", "cond2", ... } ... rules ... };
where:
  • name is a name for the step (such as "Plural").
  • N is the min word size. Words that are less than this length bypass the step completely, as an optimization. Note: N can be zero, in this case this implementation will automatically calculate the appropriate value from the underlying rules.
  • B is a "boolean" flag specifying how exceptions in the rules are matched. A value of 1 indicates whole-word pattern matching, a value of 0 indicates that exceptions are actually suffixes and should be matched with ends-with.
  • conds are an optional list of conditions to enter the step at all. If the list is non-empty, then a word must end with one of these conditions or it will bypass the step completely as an optimization.

See Also:
RSLP description
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
protected static class | RSLPStemmerBase.Rule A basic rule, with no exceptions.
protected static class | RSLPStemmerBase.RuleWithSetExceptions A rule with a set of whole-word exceptions.
protected static class | RSLPStemmerBase.RuleWithSuffixExceptions A rule with a set of exceptional suffixes.
protected static class | RSLPStemmerBase.Step A step containing a list of rules.
Constructor Summary
RSLPStemmerBase()
Method Summary
protected static Map<String,RSLPStemmerBase.Step> parse(Class<? extends RSLPStemmerBase> clazz, String resource)
Parse a resource file into an RSLP stemmer description.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RSLPStemmerBase

public RSLPStemmerBase()
Method Detail

parse

protected static Map<String,RSLPStemmerBase.Step> parse(Class<? extends RSLPStemmerBase> clazz,
                                                        String resource)
Parse a resource file into an RSLP stemmer description.

Returns:
a Map containing the named Steps in this description.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RSLPStemmerBase.Rule

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.pt
Class RSLPStemmerBase.Rule

java.lang.Object
    extended by  org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule
Direct Known Subclasses:
RSLPStemmerBase.RuleWithSetExceptions, RSLPStemmerBase.RuleWithSuffixExceptions
Enclosing class:
RSLPStemmerBase
protected static class RSLPStemmerBase.Rule
extends Object

A basic rule, with no exceptions.

Field Summary
protected int | min
protected char[] | replacement
protected char[] | suffix
Constructor Summary
RSLPStemmerBase.Rule(String suffix, int min, String replacement)
Create a rule.
Method Summary
boolean | matches(char[] s, int len)
int | replace(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

suffix

protected final char[] suffix

replacement

protected final char[] replacement

min

protected final int min
Constructor Detail

RSLPStemmerBase.Rule

public RSLPStemmerBase.Rule(String suffix,
                            int min,
                            String replacement)
Create a rule.

Parameters:
suffix - suffix to remove
min - minimum stem length
replacement - replacement string
Method Detail

matches

public boolean matches(char[] s,
                       int len)
Returns:
true if the word matches this rule.

replace

public int replace(char[] s,
                   int len)
Returns:
new valid length of the string after firing this rule.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RSLPStemmerBase.RuleWithSetExceptions

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.pt
Class RSLPStemmerBase.RuleWithSetExceptions

java.lang.Object
    extended by  org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule
        extended by  org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSetExceptions
Enclosing class:
RSLPStemmerBase
protected static class RSLPStemmerBase.RuleWithSetExceptions
extends RSLPStemmerBase.Rule

A rule with a set of whole-word exceptions.

Field Summary
protected  CharArraySet exceptions
Fields inherited from class org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule
min, replacement, suffix
Constructor Summary
RSLPStemmerBase.RuleWithSetExceptions(String suffix, int min, String replacement, String[] exceptions)
Method Summary
 boolean matches(char[] s, int len)
Methods inherited from class org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule
replace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

exceptions

protected final CharArraySet exceptions
Constructor Detail

RSLPStemmerBase.RuleWithSetExceptions

public RSLPStemmerBase.RuleWithSetExceptions(String suffix,
                                             int min,
                                             String replacement,
                                             String[] exceptions)
Method Detail

matches

public boolean matches(char[] s,
                       int len)
Overrides:
matches in class RSLPStemmerBase.Rule
Returns:
true if the word matches this rule.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RSLPStemmerBase.RuleWithSuffixExceptions

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.pt
Class RSLPStemmerBase.RuleWithSuffixExceptions

java.lang.Object
    extended by  org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule
        extended by  org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSuffixExceptions
Enclosing class:
RSLPStemmerBase
protected static class RSLPStemmerBase.RuleWithSuffixExceptions
extends RSLPStemmerBase.Rule

A rule with a set of exceptional suffixes.

Field Summary
protected  char[][] exceptions
Fields inherited from class org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule
min, replacement, suffix
Constructor Summary
RSLPStemmerBase.RuleWithSuffixExceptions(String suffix, int min, String replacement, String[] exceptions)
Method Summary
 boolean matches(char[] s, int len)
Methods inherited from class org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule
replace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

exceptions

protected final char[][] exceptions
Constructor Detail

RSLPStemmerBase.RuleWithSuffixExceptions

public RSLPStemmerBase.RuleWithSuffixExceptions(String suffix,
                                                int min,
                                                String replacement,
                                                String[] exceptions)
Method Detail

matches

public boolean matches(char[] s,
                       int len)
Overrides:
matches in class RSLPStemmerBase.Rule
Returns:
true if the word matches this rule.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RSLPStemmerBase.Step

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.pt
Class RSLPStemmerBase.Step

java.lang.Object
    extended by  org.apache.lucene.analysis.pt.RSLPStemmerBase.Step
Enclosing class:
RSLPStemmerBase
protected static class RSLPStemmerBase.Step
extends Object

A step containing a list of rules.

Field Summary
protected int | min
protected String | name
protected RSLPStemmerBase.Rule[] | rules
protected char[][] | suffixes
Constructor Summary
RSLPStemmerBase.Step(String name, RSLPStemmerBase.Rule[] rules, int min, String[] suffixes)
Create a new step
Method Summary
 int apply(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

name

protected final String name

rules

protected final RSLPStemmerBase.Rule[] rules

min

protected final int min

suffixes

protected final char[][] suffixes
Constructor Detail

RSLPStemmerBase.Step

public RSLPStemmerBase.Step(String name,
                            RSLPStemmerBase.Rule[] rules,
                            int min,
                            String[] suffixes)
Create a new step

Parameters:
name - Step's name.
rules - an ordered list of rules.
min - minimum word size. if this is 0 it is automatically calculated.
suffixes - optional list of conditional suffixes. may be null.
Method Detail

apply

public int apply(char[] s,
                 int len)
Returns:
new valid length of the string after applying the entire step.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.pt.PortugueseAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.pt.PortugueseAnalyzer

No usage of org.apache.lucene.analysis.pt.PortugueseAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.pt.PortugueseLightStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.pt.PortugueseLightStemFilter

No usage of org.apache.lucene.analysis.pt.PortugueseLightStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.pt.PortugueseLightStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.pt.PortugueseLightStemmer

No usage of org.apache.lucene.analysis.pt.PortugueseLightStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.pt.PortugueseMinimalStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.pt.PortugueseMinimalStemFilter

No usage of org.apache.lucene.analysis.pt.PortugueseMinimalStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.pt.PortugueseMinimalStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.pt.PortugueseMinimalStemmer

No usage of org.apache.lucene.analysis.pt.PortugueseMinimalStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.pt.PortugueseStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.pt.PortugueseStemFilter

No usage of org.apache.lucene.analysis.pt.PortugueseStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.pt.PortugueseStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.pt.PortugueseStemmer

No usage of org.apache.lucene.analysis.pt.PortugueseStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.pt.RSLPStemmerBase

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.pt.RSLPStemmerBase

Packages that use RSLPStemmerBase
org.apache.lucene.analysis.gl | Analyzer for Galician.
org.apache.lucene.analysis.pt | Analyzer for Portuguese.

Uses of RSLPStemmerBase in org.apache.lucene.analysis.gl

Subclasses of RSLPStemmerBase in org.apache.lucene.analysis.gl
class | GalicianMinimalStemmer Minimal Stemmer for Galician
class | GalicianStemmer Galician stemmer implementing "Regras do lematizador para o galego".

Uses of RSLPStemmerBase in org.apache.lucene.analysis.pt

Subclasses of RSLPStemmerBase in org.apache.lucene.analysis.pt
class | PortugueseMinimalStemmer Minimal Stemmer for Portuguese
class | PortugueseStemmer Portuguese stemmer implementing the RSLP (Removedor de Sufixos da Lingua Portuguesa) algorithm.

Method parameters in org.apache.lucene.analysis.pt with type arguments of type RSLPStemmerBase
protected static Map<String,RSLPStemmerBase.Step> RSLPStemmerBase.parse(Class<? extends RSLPStemmerBase> clazz, String resource)
Parse a resource file into an RSLP stemmer description.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.pt.RSLPStemmerBase.Rule

Packages that use RSLPStemmerBase.Rule
org.apache.lucene.analysis.pt Analyzer for Portuguese.

Uses of RSLPStemmerBase.Rule in org.apache.lucene.analysis.pt

Subclasses of RSLPStemmerBase.Rule in org.apache.lucene.analysis.pt
protected static class | RSLPStemmerBase.RuleWithSetExceptions A rule with a set of whole-word exceptions.
protected static class | RSLPStemmerBase.RuleWithSuffixExceptions A rule with a set of exceptional suffixes.

Fields in org.apache.lucene.analysis.pt declared as RSLPStemmerBase.Rule
protected  RSLPStemmerBase.Rule[] RSLPStemmerBase.Step.rules

Constructors in org.apache.lucene.analysis.pt with parameters of type RSLPStemmerBase.Rule
RSLPStemmerBase.Step(String name, RSLPStemmerBase.Rule[] rules, int min, String[] suffixes)
Create a new step

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSetExceptions

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSetExceptions

No usage of org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSetExceptions

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSuffixExceptions

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSuffixExceptions

No usage of org.apache.lucene.analysis.pt.RSLPStemmerBase.RuleWithSuffixExceptions

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.pt.RSLPStemmerBase.Step

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.pt.RSLPStemmerBase.Step

Packages that use RSLPStemmerBase.Step
org.apache.lucene.analysis.pt Analyzer for Portuguese.

Uses of RSLPStemmerBase.Step in org.apache.lucene.analysis.pt

Methods in org.apache.lucene.analysis.pt that return types with arguments of type RSLPStemmerBase.Step
protected static Map<String,RSLPStemmerBase.Step> RSLPStemmerBase.parse(Class<? extends RSLPStemmerBase> clazz, String resource)
Parse a resource file into an RSLP stemmer description.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.query
Classes
QueryAutoStopWordAnalyzer


org.apache.lucene.analysis.query

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.query

Automatically filter high-frequency stopwords.

See:
Description

Class Summary
QueryAutoStopWordAnalyzer An Analyzer used primarily at query time to wrap another analyzer and provide a layer of protection which prevents very common words from being passed into queries.

Package org.apache.lucene.analysis.query Description

Automatically filter high-frequency stopwords.


org.apache.lucene.analysis.query Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.query

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer


Uses of Package org.apache.lucene.analysis.query

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.query

No usage of org.apache.lucene.analysis.query

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


QueryAutoStopWordAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.query
Class QueryAutoStopWordAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer
All Implemented Interfaces:
Closeable
public final class QueryAutoStopWordAnalyzer
extends Analyzer

An Analyzer used primarily at query time to wrap another analyzer and provide a layer of protection which prevents very common words from being passed into queries.

For very large indexes the cost of reading TermDocs for a very common word can be high. This analyzer was created after experience with a 38 million doc index which had a term in around 50% of docs and was causing TermQueries for this term to take 2 seconds.

Use the various "addStopWords" methods in this class to automate the identification and addition of stop words found in an already existing index.

Field Summary
static float defaultMaxDocFreqPercent
Constructor Summary
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate)
Deprecated. Stopwords should be calculated at instantiation using one of the other constructors
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency percentage greater than defaultMaxDocFreqPercent
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, Collection<String> fields, float maxPercentDocs)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for the given selection of fields from terms with a document frequency percentage greater than the given maxPercentDocs
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, Collection<String> fields, int maxDocFreq)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for the given selection of fields from terms with a document frequency greater than the given maxDocFreq
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, float maxPercentDocs)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency percentage greater than the given maxPercentDocs
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, int maxDocFreq)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency greater than the given maxDocFreq
Method Summary
 int addStopWords(IndexReader reader)
Deprecated. Stopwords should be calculated at instantiation using QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader)
 int addStopWords(IndexReader reader, float maxPercentDocs)
Deprecated. Stowords should be calculated at instantiation using QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, float)
 int addStopWords(IndexReader reader, int maxDocFreq)
Deprecated. Stopwords should be calculated at instantiation using QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, int)
 int addStopWords(IndexReader reader, String fieldName, float maxPercentDocs)
Deprecated. Stowords should be calculated at instantiation using QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, Collection, float)
 int addStopWords(IndexReader reader, String fieldName, int maxDocFreq)
Deprecated. Stowords should be calculated at instantiation using QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, Collection, int)
 Term[] getStopWords()
Provides information on which stop words have been identified for all fields
 String[] getStopWords(String fieldName)
Provides information on which stop words have been identified for a field
 TokenStream reusableTokenStream(String fieldName, Reader reader)
Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method.
 TokenStream tokenStream(String fieldName, Reader reader)
Creates a TokenStream which tokenizes all the text in the provided Reader.
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

defaultMaxDocFreqPercent

public static final float defaultMaxDocFreqPercent
See Also:
Constant Field Values
Constructor Detail

QueryAutoStopWordAnalyzer

@Deprecated
public QueryAutoStopWordAnalyzer(Version matchVersion,
                                            Analyzer delegate)
Deprecated. Stopwords should be calculated at instantiation using one of the other constructors

Initializes this analyzer with the Analyzer object that actually produces the tokens

Parameters:
delegate - The choice of Analyzer that is used to produce the token stream which needs filtering

QueryAutoStopWordAnalyzer

public QueryAutoStopWordAnalyzer(Version matchVersion,
                                 Analyzer delegate,
                                 IndexReader indexReader)
                          throws IOException
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency percentage greater than defaultMaxDocFreqPercent

Parameters:
matchVersion - Version to be used in StopFilter
delegate - Analyzer whose TokenStream will be filtered
indexReader - IndexReader to identify the stopwords from
Throws:
IOException - Can be thrown while reading from the IndexReader

QueryAutoStopWordAnalyzer

public QueryAutoStopWordAnalyzer(Version matchVersion,
                                 Analyzer delegate,
                                 IndexReader indexReader,
                                 int maxDocFreq)
                          throws IOException
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency greater than the given maxDocFreq

Parameters:
matchVersion - Version to be used in StopFilter
delegate - Analyzer whose TokenStream will be filtered
indexReader - IndexReader to identify the stopwords from
maxDocFreq - Document frequency terms should be above in order to be stopwords
Throws:
IOException - Can be thrown while reading from the IndexReader

QueryAutoStopWordAnalyzer

public QueryAutoStopWordAnalyzer(Version matchVersion,
                                 Analyzer delegate,
                                 IndexReader indexReader,
                                 float maxPercentDocs)
                          throws IOException
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency percentage greater than the given maxPercentDocs

Parameters:
matchVersion - Version to be used in StopFilter
delegate - Analyzer whose TokenStream will be filtered
indexReader - IndexReader to identify the stopwords from
maxPercentDocs - The maximum percentage (between 0.0 and 1.0) of index documents which contain a term, after which the word is considered to be a stop word
Throws:
IOException - Can be thrown while reading from the IndexReader

QueryAutoStopWordAnalyzer

public QueryAutoStopWordAnalyzer(Version matchVersion,
                                 Analyzer delegate,
                                 IndexReader indexReader,
                                 Collection<String> fields,
                                 float maxPercentDocs)
                          throws IOException
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for the given selection of fields from terms with a document frequency percentage greater than the given maxPercentDocs

Parameters:
matchVersion - Version to be used in StopFilter
delegate - Analyzer whose TokenStream will be filtered
indexReader - IndexReader to identify the stopwords from
fields - Selection of fields to calculate stopwords for
maxPercentDocs - The maximum percentage (between 0.0 and 1.0) of index documents which contain a term, after which the word is considered to be a stop word
Throws:
IOException - Can be thrown while reading from the IndexReader

QueryAutoStopWordAnalyzer

public QueryAutoStopWordAnalyzer(Version matchVersion,
                                 Analyzer delegate,
                                 IndexReader indexReader,
                                 Collection<String> fields,
                                 int maxDocFreq)
                          throws IOException
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for the given selection of fields from terms with a document frequency greater than the given maxDocFreq

Parameters:
matchVersion - Version to be used in StopFilter
delegate - Analyzer whose TokenStream will be filtered
indexReader - IndexReader to identify the stopwords from
fields - Selection of fields to calculate stopwords for
maxDocFreq - Document frequency terms should be above in order to be stopwords
Throws:
IOException - Can be thrown while reading from the IndexReader
Method Detail

addStopWords

@Deprecated
public int addStopWords(IndexReader reader)
                 throws IOException
Deprecated. Stopwords should be calculated at instantiation using QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader)

Automatically adds stop words for all fields with terms exceeding the defaultMaxDocFreqPercent

Parameters:
reader - The IndexReader which will be consulted to identify potential stop words that exceed the required document frequency
Returns:
The number of stop words identified.
Throws:
IOException

addStopWords

@Deprecated
public int addStopWords(IndexReader reader,
                                   int maxDocFreq)
                 throws IOException
Deprecated. Stopwords should be calculated at instantiation using QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, int)

Automatically adds stop words for all fields with terms exceeding the maxDocFreqPercent

Parameters:
reader - The IndexReader which will be consulted to identify potential stop words that exceed the required document frequency
maxDocFreq - The maximum number of index documents which can contain a term, after which the term is considered to be a stop word
Returns:
The number of stop words identified.
Throws:
IOException

addStopWords

@Deprecated
public int addStopWords(IndexReader reader,
                                   float maxPercentDocs)
                 throws IOException
Deprecated. Stowords should be calculated at instantiation using QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, float)

Automatically adds stop words for all fields with terms exceeding the maxDocFreqPercent

Parameters:
reader - The IndexReader which will be consulted to identify potential stop words that exceed the required document frequency
maxPercentDocs - The maximum percentage (between 0.0 and 1.0) of index documents which contain a term, after which the word is considered to be a stop word.
Returns:
The number of stop words identified.
Throws:
IOException

addStopWords

@Deprecated
public int addStopWords(IndexReader reader,
                                   String fieldName,
                                   float maxPercentDocs)
                 throws IOException
Deprecated. Stowords should be calculated at instantiation using QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, Collection, float)

Automatically adds stop words for the given field with terms exceeding the maxPercentDocs

Parameters:
reader - The IndexReader which will be consulted to identify potential stop words that exceed the required document frequency
fieldName - The field for which stopwords will be added
maxPercentDocs - The maximum percentage (between 0.0 and 1.0) of index documents which contain a term, after which the word is considered to be a stop word.
Returns:
The number of stop words identified.
Throws:
IOException

addStopWords

@Deprecated
public int addStopWords(IndexReader reader,
                                   String fieldName,
                                   int maxDocFreq)
                 throws IOException
Deprecated. Stowords should be calculated at instantiation using QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, Collection, int)

Automatically adds stop words for the given field with terms exceeding the maxPercentDocs

Parameters:
reader - The IndexReader which will be consulted to identify potential stop words that exceed the required document frequency
fieldName - The field for which stopwords will be added
maxDocFreq - The maximum number of index documents which can contain a term, after which the term is considered to be a stop word.
Returns:
The number of stop words identified.
Throws:
IOException

tokenStream

public TokenStream tokenStream(String fieldName,
                               Reader reader)
Description copied from class: Analyzer
Creates a TokenStream which tokenizes all the text in the provided Reader. Must be able to handle null field name for backward compatibility.

Specified by:
tokenStream in class Analyzer

reusableTokenStream

public TokenStream reusableTokenStream(String fieldName,
                                       Reader reader)
                                throws IOException
Description copied from class: Analyzer
Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method. Callers that do not need to use more than one TokenStream at the same time from this analyzer should use this method for better performance.

Overrides:
reusableTokenStream in class Analyzer
Throws:
IOException

getStopWords

public String[] getStopWords(String fieldName)
Provides information on which stop words have been identified for a field

Parameters:
fieldName - The field for which stop words identified in "addStopWords" method calls will be returned
Returns:
the stop words identified for a field

getStopWords

public Term[] getStopWords()
Provides information on which stop words have been identified for all fields

Returns:
the stop words (as terms)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer

No usage of org.apache.lucene.analysis.query.QueryAutoStopWordAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.reverse
Classes
ReverseStringFilter


org.apache.lucene.analysis.reverse

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.reverse

Filter to reverse token text.

See:
Description

Class Summary
ReverseStringFilter Reverse token string, for example "country" => "yrtnuoc".

Package org.apache.lucene.analysis.reverse Description

Filter to reverse token text.


org.apache.lucene.analysis.reverse Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.reverse

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.reverse.ReverseStringFilter


Uses of Package org.apache.lucene.analysis.reverse

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.reverse

No usage of org.apache.lucene.analysis.reverse

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ReverseStringFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.reverse
Class ReverseStringFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.reverse.ReverseStringFilter
All Implemented Interfaces:
Closeable
public final class ReverseStringFilter
extends TokenFilter

Reverse token string, for example "country" => "yrtnuoc".

If marker is supplied, then tokens will be also prepended by that character. For example, with a marker of \u0001, "country" => "\u0001yrtnuoc". This is useful when implementing efficient leading wildcards search.

You must specify the required Version compatibility when creating ReverseStringFilter, or when using any of its static methods:

  • As of 3.1, supplementary characters are handled correctly

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static char | INFORMATION_SEPARATOR_MARKER Example marker character: U+001F (INFORMATION SEPARATOR ONE)
static char | PUA_EC00_MARKER Example marker character: U+EC00 (PRIVATE USE AREA: EC00)
static char | RTL_DIRECTION_MARKER Example marker character: U+200F (RIGHT-TO-LEFT MARK)
static char | START_OF_HEADING_MARKER Example marker character: U+0001 (START OF HEADING)
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ReverseStringFilter(TokenStream in)
Deprecated. use ReverseStringFilter(Version, TokenStream) instead. This constructor will be removed in Lucene 4.0
ReverseStringFilter(TokenStream in, char marker)
Deprecated. use ReverseStringFilter(Version, TokenStream, char) instead. This constructor will be removed in Lucene 4.0
ReverseStringFilter(Version matchVersion, TokenStream in)
Create a new ReverseStringFilter that reverses all tokens in the supplied TokenStream.
ReverseStringFilter(Version matchVersion, TokenStream in, char marker)
Create a new ReverseStringFilter that reverses and marks all tokens in the supplied TokenStream.
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
static void reverse(char[] buffer)
Deprecated. use reverse(Version, char[]) instead. This method will be removed in Lucene 4.0
static void reverse(char[] buffer, int len)
Deprecated. use reverse(Version, char[], int) instead. This method will be removed in Lucene 4.0
static void reverse(char[] buffer, int start, int len)
Deprecated. use reverse(Version, char[], int, int) instead. This method will be removed in Lucene 4.0
static String reverse(String input)
Deprecated. use reverse(Version, String) instead. This method will be removed in Lucene 4.0
static void reverse(Version matchVersion, char[] buffer)
Reverses the given input buffer in-place
static void reverse(Version matchVersion, char[] buffer, int len)
Partially reverses the given input buffer in-place from offset 0 up to the given length.
static void reverse(Version matchVersion, char[] buffer, int start, int len)
Partially reverses the given input buffer in-place from the given offset up to the given length.
static String reverse(Version matchVersion, String input)
Reverses the given input string
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

START_OF_HEADING_MARKER

public static final char START_OF_HEADING_MARKER
Example marker character: U+0001 (START OF HEADING)

See Also:
Constant Field Values

INFORMATION_SEPARATOR_MARKER

public static final char INFORMATION_SEPARATOR_MARKER
Example marker character: U+001F (INFORMATION SEPARATOR ONE)

See Also:
Constant Field Values

PUA_EC00_MARKER

public static final char PUA_EC00_MARKER
Example marker character: U+EC00 (PRIVATE USE AREA: EC00)

See Also:
Constant Field Values

RTL_DIRECTION_MARKER

public static final char RTL_DIRECTION_MARKER
Example marker character: U+200F (RIGHT-TO-LEFT MARK)

See Also:
Constant Field Values
Constructor Detail

ReverseStringFilter

@Deprecated
public ReverseStringFilter(TokenStream in)
Deprecated. use ReverseStringFilter(Version, TokenStream) instead. This constructor will be removed in Lucene 4.0

Create a new ReverseStringFilter that reverses all tokens in the supplied TokenStream.

The reversed tokens will not be marked.

Parameters:
in - TokenStream to filter

ReverseStringFilter

@Deprecated
public ReverseStringFilter(TokenStream in,
                                      char marker)
Deprecated. use ReverseStringFilter(Version, TokenStream, char) instead. This constructor will be removed in Lucene 4.0

Create a new ReverseStringFilter that reverses and marks all tokens in the supplied TokenStream.

The reversed tokens will be prepended (marked) by the marker character.

Parameters:
in - TokenStream to filter
marker - A character used to mark reversed tokens

ReverseStringFilter

public ReverseStringFilter(Version matchVersion,
                           TokenStream in)
Create a new ReverseStringFilter that reverses all tokens in the supplied TokenStream.

The reversed tokens will not be marked.

Parameters:
matchVersion - See above
in - TokenStream to filter

ReverseStringFilter

public ReverseStringFilter(Version matchVersion,
                           TokenStream in,
                           char marker)
Create a new ReverseStringFilter that reverses and marks all tokens in the supplied TokenStream.

The reversed tokens will be prepended (marked) by the marker character.

Parameters:
matchVersion - See above
in - TokenStream to filter
marker - A character used to mark reversed tokens
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reverse

@Deprecated
public static String reverse(String input)
Deprecated. use reverse(Version, String) instead. This method will be removed in Lucene 4.0

Reverses the given input string

Parameters:
input - the string to reverse
Returns:
the given input string in reversed order

reverse

public static String reverse(Version matchVersion,
                             String input)
Reverses the given input string

Parameters:
matchVersion - See above
input - the string to reverse
Returns:
the given input string in reversed order

reverse

@Deprecated
public static void reverse(char[] buffer)
Deprecated. use reverse(Version, char[]) instead. This method will be removed in Lucene 4.0

Reverses the given input buffer in-place

Parameters:
buffer - the input char array to reverse

reverse

public static void reverse(Version matchVersion,
                           char[] buffer)
Reverses the given input buffer in-place

Parameters:
matchVersion - See above
buffer - the input char array to reverse

reverse

@Deprecated
public static void reverse(char[] buffer,
                                      int len)
Deprecated. use reverse(Version, char[], int) instead. This method will be removed in Lucene 4.0

Partially reverses the given input buffer in-place from offset 0 up to the given length.

Parameters:
buffer - the input char array to reverse
len - the length in the buffer up to where the buffer should be reversed

reverse

public static void reverse(Version matchVersion,
                           char[] buffer,
                           int len)
Partially reverses the given input buffer in-place from offset 0 up to the given length.

Parameters:
matchVersion - See above
buffer - the input char array to reverse
len - the length in the buffer up to where the buffer should be reversed

reverse

@Deprecated
public static void reverse(char[] buffer,
                                      int start,
                                      int len)
Deprecated. use reverse(Version, char[], int, int) instead. This method will be removed in Lucene 4.0

Partially reverses the given input buffer in-place from the given offset up to the given length.

Parameters:
buffer - the input char array to reverse
start - the offset from where to reverse the buffer
len - the length in the buffer up to where the buffer should be reversed

reverse

public static void reverse(Version matchVersion,
                           char[] buffer,
                           int start,
                           int len)
Partially reverses the given input buffer in-place from the given offset up to the given length.

Parameters:
matchVersion - See above
buffer - the input char array to reverse
start - the offset from where to reverse the buffer
len - the length in the buffer up to where the buffer should be reversed
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.reverse.ReverseStringFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.reverse.ReverseStringFilter

No usage of org.apache.lucene.analysis.reverse.ReverseStringFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.ro
Classes
RomanianAnalyzer


org.apache.lucene.analysis.ro

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.ro

Analyzer for Romanian.

See:
Description

Class Summary
RomanianAnalyzer Analyzer for Romanian.

Package org.apache.lucene.analysis.ro Description

Analyzer for Romanian.


org.apache.lucene.analysis.ro Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.ro

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.ro.RomanianAnalyzer


Uses of Package org.apache.lucene.analysis.ro

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.ro

No usage of org.apache.lucene.analysis.ro

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


RomanianAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ro
Class RomanianAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.ro.RomanianAnalyzer
All Implemented Interfaces:
Closeable
public final class RomanianAnalyzer
extends StopwordAnalyzerBase

Analyzer for Romanian.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Romanian stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
RomanianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
RomanianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
RomanianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Romanian stopwords.

See Also:
Constant Field Values
Constructor Detail

RomanianAnalyzer

public RomanianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

RomanianAnalyzer

public RomanianAnalyzer(Version matchVersion,
                        Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

RomanianAnalyzer

public RomanianAnalyzer(Version matchVersion,
                        Set<?> stopwords,
                        Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and SnowballFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.ro.RomanianAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ro.RomanianAnalyzer

No usage of org.apache.lucene.analysis.ro.RomanianAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.ru
Classes
RussianAnalyzer
RussianLetterTokenizer
RussianLightStemFilter
RussianLightStemmer
RussianLowerCaseFilter
RussianStemFilter


org.apache.lucene.analysis.ru

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.ru

Analyzer for Russian.

See:
Description

Class Summary
RussianAnalyzer | Analyzer for Russian language.
RussianLetterTokenizer | Deprecated. Use StandardTokenizer instead, which has the same functionality.
RussianLightStemFilter | A TokenFilter that applies RussianLightStemmer to stem Russian words.
RussianLightStemmer | Light Stemmer for Russian.
RussianLowerCaseFilter | Deprecated. Use LowerCaseFilter instead, which has the same functionality.
RussianStemFilter | Deprecated. Use SnowballFilter with RussianStemmer instead, which has the same functionality.

Package org.apache.lucene.analysis.ru Description

Analyzer for Russian.


org.apache.lucene.analysis.ru Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.ru

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.ru.RussianAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.ru.RussianLightStemFilter
          • org.apache.lucene.analysis.ru.RussianLowerCaseFilter
          • org.apache.lucene.analysis.ru.RussianStemFilter
        • org.apache.lucene.analysis.Tokenizer
          • org.apache.lucene.analysis.CharTokenizer
            • org.apache.lucene.analysis.ru.RussianLetterTokenizer
    • org.apache.lucene.analysis.ru.RussianLightStemmer


Uses of Package org.apache.lucene.analysis.ru

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.ru

No usage of org.apache.lucene.analysis.ru

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


RussianAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ru
Class RussianAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.ru.RussianAnalyzer
All Implemented Interfaces:
Closeable
public final class RussianAnalyzer
extends StopwordAnalyzerBase

Analyzer for Russian language.

Supports an external list of stopwords (words that will not be indexed at all). A default set of stopwords is used unless an alternative list is specified.

You must specify the required Version compatibility when creating RussianAnalyzer:

  • As of 3.1, StandardTokenizer is used, Snowball stemming is done with SnowballFilter, and Snowball stopwords are used by default.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Russian stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
RussianAnalyzer(Version matchVersion)
RussianAnalyzer(Version matchVersion, Map<?,?> stopwords)
Deprecated. use RussianAnalyzer(Version, Set) instead
RussianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
RussianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words
RussianAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use RussianAnalyzer(Version, Set) instead
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop-words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Russian stopwords.

See Also:
Constant Field Values
Constructor Detail

RussianAnalyzer

public RussianAnalyzer(Version matchVersion)

RussianAnalyzer

@Deprecated
public RussianAnalyzer(Version matchVersion,
                                  String... stopwords)
Deprecated. use RussianAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words.

RussianAnalyzer

public RussianAnalyzer(Version matchVersion,
                       Set<?> stopwords)
Builds an analyzer with the given stop words

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

RussianAnalyzer

public RussianAnalyzer(Version matchVersion,
                       Set<?> stopwords,
                       Set<?> stemExclusionSet)
Builds an analyzer with the given stop words

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of words not to be stemmed

RussianAnalyzer

@Deprecated
public RussianAnalyzer(Version matchVersion,
                                  Map<?,?> stopwords)
Deprecated. use RussianAnalyzer(Version, Set) instead

Builds an analyzer with the given stop words. TODO: create a Set version of this ctor

Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.

Returns:
an unmodifiable instance of the default stop-words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
ReusableAnalyzerBase.TokenStreamComponents built from a StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided, and SnowballFilter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


RussianLetterTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ru
Class RussianLetterTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.CharTokenizer
                    extended by  org.apache.lucene.analysis.ru.RussianLetterTokenizer
All Implemented Interfaces:
Closeable
Deprecated. Use StandardTokenizer instead, which has the same functionality. This filter will be removed in Lucene 5.0

@Deprecated
public class RussianLetterTokenizer
extends CharTokenizer

A RussianLetterTokenizer is a Tokenizer that extends LetterTokenizer by also allowing the basic Latin digits 0-9.

You must specify the required Version compatibility when creating RussianLetterTokenizer:

  • As of 3.1, CharTokenizer uses an int based API to normalize and detect token characters. See CharTokenizer.isTokenChar(int) and CharTokenizer.normalize(int) for details.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
RussianLetterTokenizer(AttributeSource.AttributeFactory factory, Reader in)
Deprecated. use RussianLetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
RussianLetterTokenizer(AttributeSource source, Reader in)
Deprecated. use RussianLetterTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
RussianLetterTokenizer(Reader in)
Deprecated. use RussianLetterTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.
RussianLetterTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader in)
Deprecated. Construct a new RussianLetterTokenizer using a given AttributeSource.AttributeFactory.
RussianLetterTokenizer(Version matchVersion, AttributeSource source, Reader in)
Deprecated. Construct a new RussianLetterTokenizer using a given AttributeSource.
RussianLetterTokenizer(Version matchVersion, Reader in)
Deprecated. Construct a new RussianLetterTokenizer.
Method Summary
protected  boolean isTokenChar(int c)
Deprecated. Collects only characters which satisfy Character.isLetter(int).
Methods inherited from class org.apache.lucene.analysis.CharTokenizer
end, incrementToken, isTokenChar, normalize, normalize, reset
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.analysis.TokenStream
reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

RussianLetterTokenizer

public RussianLetterTokenizer(Version matchVersion,
                              Reader in)
Deprecated.
Construct a new RussianLetterTokenizer. * @param matchVersion Lucene version to match See above

Parameters:
in - the input to split up into tokens

RussianLetterTokenizer

public RussianLetterTokenizer(Version matchVersion,
                              AttributeSource source,
                              Reader in)
Deprecated.
Construct a new RussianLetterTokenizer using a given AttributeSource.

Parameters:
matchVersion - Lucene version to match See above
source - the attribute source to use for this Tokenizer
in - the input to split up into tokens

RussianLetterTokenizer

public RussianLetterTokenizer(Version matchVersion,
                              AttributeSource.AttributeFactory factory,
                              Reader in)
Deprecated.
Construct a new RussianLetterTokenizer using a given AttributeSource.AttributeFactory. * @param matchVersion Lucene version to match See above

Parameters:
factory - the attribute factory to use for this Tokenizer
in - the input to split up into tokens

RussianLetterTokenizer

@Deprecated
public RussianLetterTokenizer(Reader in)
Deprecated. use RussianLetterTokenizer(Version, Reader) instead. This will be removed in Lucene 4.0.

Construct a new RussianLetterTokenizer.

RussianLetterTokenizer

@Deprecated
public RussianLetterTokenizer(AttributeSource source,
                                         Reader in)
Deprecated. use RussianLetterTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.

Construct a new RussianLetterTokenizer using a given AttributeSource.

RussianLetterTokenizer

@Deprecated
public RussianLetterTokenizer(AttributeSource.AttributeFactory factory,
                                         Reader in)
Deprecated. use RussianLetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.

Construct a new RussianLetterTokenizer using a given AttributeSource.AttributeFactory.

Method Detail

isTokenChar

protected boolean isTokenChar(int c)
Deprecated.
Collects only characters which satisfy Character.isLetter(int).

Overrides:
isTokenChar in class CharTokenizer
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RussianLightStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ru
Class RussianLightStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.ru.RussianLightStemFilter
All Implemented Interfaces:
Closeable
public final class RussianLightStemFilter
extends TokenFilter

A TokenFilter that applies RussianLightStemmer to stem Russian words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
RussianLightStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

RussianLightStemFilter

public RussianLightStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RussianLightStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ru
Class RussianLightStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.ru.RussianLightStemmer

public class RussianLightStemmer
extends Object

Light Stemmer for Russian.

This stemmer implements the following algorithm: Indexing and Searching Strategies for the Russian Language. Ljiljana Dolamic and Jacques Savoy.

Constructor Summary
RussianLightStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RussianLightStemmer

public RussianLightStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RussianLowerCaseFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ru
Class RussianLowerCaseFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.ru.RussianLowerCaseFilter
All Implemented Interfaces:
Closeable
Deprecated. Use LowerCaseFilter instead, which has the same functionality. This filter will be removed in Lucene 4.0

@Deprecated
public final class RussianLowerCaseFilter
extends TokenFilter

Normalizes token text to lower case.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
RussianLowerCaseFilter(TokenStream in)
Deprecated.
Method Summary
 boolean incrementToken()
Deprecated. Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

RussianLowerCaseFilter

public RussianLowerCaseFilter(TokenStream in)
Deprecated.
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Deprecated.
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RussianStemFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.ru
Class RussianStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.ru.RussianStemFilter
All Implemented Interfaces:
Closeable
Deprecated. Use SnowballFilter with RussianStemmer instead, which has the same functionality. This filter will be removed in Lucene 4.0

@Deprecated
public final class RussianStemFilter
extends TokenFilter

A TokenFilter that stems Russian words.

The implementation was inspired by GermanStemFilter. The input should be filtered by LowerCaseFilter before passing it to RussianStemFilter , because RussianStemFilter only works with lowercase characters.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

See Also:
KeywordMarkerFilter

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
RussianStemFilter(TokenStream in)
Deprecated.
Method Summary
boolean | incrementToken() Deprecated. Returns the next token in the stream, or null at EOS
void | setStemmer(org.apache.lucene.analysis.ru.RussianStemmer stemmer) Deprecated. Set a alternative/custom RussianStemmer for this filter.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

RussianStemFilter

public RussianStemFilter(TokenStream in)
Deprecated.
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Deprecated.
Returns the next token in the stream, or null at EOS

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

setStemmer

public void setStemmer(org.apache.lucene.analysis.ru.RussianStemmer stemmer)
Deprecated.
Set a alternative/custom RussianStemmer for this filter.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.ru.RussianAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ru.RussianAnalyzer

No usage of org.apache.lucene.analysis.ru.RussianAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ru.RussianLetterTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ru.RussianLetterTokenizer

No usage of org.apache.lucene.analysis.ru.RussianLetterTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ru.RussianLightStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ru.RussianLightStemFilter

No usage of org.apache.lucene.analysis.ru.RussianLightStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ru.RussianLightStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ru.RussianLightStemmer

No usage of org.apache.lucene.analysis.ru.RussianLightStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ru.RussianLowerCaseFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ru.RussianLowerCaseFilter

No usage of org.apache.lucene.analysis.ru.RussianLowerCaseFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.ru.RussianStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.ru.RussianStemFilter

No usage of org.apache.lucene.analysis.ru.RussianStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.shingle
Classes
ShingleAnalyzerWrapper
ShingleFilter
ShingleMatrixFilter
ShingleMatrixFilter.Matrix
ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec
ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec
ShingleMatrixFilter.TokenPositioner
ShingleMatrixFilter.TokenSettingsCodec
ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec


org.apache.lucene.analysis.shingle

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.shingle

Word n-gram filters

See:
Description

Class Summary
ShingleAnalyzerWrapper | A ShingleAnalyzerWrapper wraps a ShingleFilter around another Analyzer.
ShingleFilter | A ShingleFilter constructs shingles (token n-grams) from a token stream.
ShingleMatrixFilter | Deprecated. Will be removed in Lucene 4.0.
ShingleMatrixFilter.Matrix | A column focused matrix in three dimensions:
ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec | Using this codec makes a ShingleMatrixFilter act like ShingleFilter.
ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec | A full featured codec not to be used for something serious.
ShingleMatrixFilter.TokenPositioner | Used to describe how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
ShingleMatrixFilter.TokenSettingsCodec | Strategy used to code and decode meta data of the tokens from the input stream regarding how to position the tokens in the matrix, set and retreive weight, et c.
ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec | A codec that creates a two dimensional matrix by treating tokens from the input stream with 0 position increment as new rows to the current column.

Package org.apache.lucene.analysis.shingle Description

Word n-gram filters


org.apache.lucene.analysis.shingle Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.shingle

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.shingle.ShingleMatrixFilter
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.shingle.ShingleFilter
    • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix
    • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column
    • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column.Row
    • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenPositioner
    • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec
      • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec
      • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec
      • org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec


Uses of Package org.apache.lucene.analysis.shingle

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.shingle

Packages that use org.apache.lucene.analysis.shingle
org.apache.lucene.analysis.shingle Word n-gram filters

Classes in org.apache.lucene.analysis.shingle used by org.apache.lucene.analysis.shingle
ShingleMatrixFilter.Matrix
Deprecated. A column focused matrix in three dimensions:
ShingleMatrixFilter.Matrix.Column
ShingleMatrixFilter.Matrix.Column.Row
ShingleMatrixFilter.TokenPositioner
Deprecated. Used to describe how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
ShingleMatrixFilter.TokenSettingsCodec
Deprecated. Strategy used to code and decode meta data of the tokens from the input stream regarding how to position the tokens in the matrix, set and retreive weight, et c.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ShingleAnalyzerWrapper

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.shingle
Class ShingleAnalyzerWrapper

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper
All Implemented Interfaces:
Closeable
public final class ShingleAnalyzerWrapper
extends Analyzer

A ShingleAnalyzerWrapper wraps a ShingleFilter around another Analyzer.

A shingle is another name for a token based n-gram.

Constructor Summary
ShingleAnalyzerWrapper(Analyzer defaultAnalyzer)
ShingleAnalyzerWrapper(Analyzer defaultAnalyzer, int maxShingleSize)
ShingleAnalyzerWrapper(Analyzer defaultAnalyzer, int minShingleSize, int maxShingleSize)
ShingleAnalyzerWrapper(Analyzer defaultAnalyzer, int minShingleSize, int maxShingleSize, String tokenSeparator, boolean outputUnigrams, boolean outputUnigramsIfNoShingles)
Creates a new ShingleAnalyzerWrapper
ShingleAnalyzerWrapper(Version matchVersion)
Wraps StandardAnalyzer.
ShingleAnalyzerWrapper(Version matchVersion, int minShingleSize, int maxShingleSize)
Wraps StandardAnalyzer.
Method Summary
int | getMaxShingleSize() The max shingle (token ngram) size
int | getMinShingleSize() The min shingle (token ngram) size
String | getTokenSeparator()
boolean | isOutputUnigrams()
boolean | isOutputUnigramsIfNoShingles()
TokenStream | reusableTokenStream(String fieldName, Reader reader) Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method.
void | setMaxShingleSize(int maxShingleSize) Deprecated. Setting maxShingleSize after Analyzer instantiation prevents reuse. Confgure maxShingleSize during construction.
void | setMinShingleSize(int minShingleSize) Deprecated. Setting minShingleSize after Analyzer instantiation prevents reuse. Confgure minShingleSize during construction.
void | setOutputUnigrams(boolean outputUnigrams) Deprecated. Setting outputUnigrams after Analyzer instantiation prevents reuse. Confgure outputUnigrams during construction.
void | setOutputUnigramsIfNoShingles(boolean outputUnigramsIfNoShingles) Deprecated. Setting outputUnigramsIfNoShingles after Analyzer instantiation prevents reuse. Confgure outputUnigramsIfNoShingles during construction.
void | setTokenSeparator(String tokenSeparator) Deprecated. Setting tokenSeparator after Analyzer instantiation prevents reuse. Confgure tokenSeparator during construction.
TokenStream | tokenStream(String fieldName, Reader reader) Creates a TokenStream which tokenizes all the text in the provided Reader.
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ShingleAnalyzerWrapper

public ShingleAnalyzerWrapper(Analyzer defaultAnalyzer)

ShingleAnalyzerWrapper

public ShingleAnalyzerWrapper(Analyzer defaultAnalyzer,
                              int maxShingleSize)

ShingleAnalyzerWrapper

public ShingleAnalyzerWrapper(Analyzer defaultAnalyzer,
                              int minShingleSize,
                              int maxShingleSize)

ShingleAnalyzerWrapper

public ShingleAnalyzerWrapper(Analyzer defaultAnalyzer,
                              int minShingleSize,
                              int maxShingleSize,
                              String tokenSeparator,
                              boolean outputUnigrams,
                              boolean outputUnigramsIfNoShingles)
Creates a new ShingleAnalyzerWrapper

Parameters:
defaultAnalyzer - Analyzer whose TokenStream is to be filtered
minShingleSize - Min shingle (token ngram) size
maxShingleSize - Max shingle size
tokenSeparator - Used to separate input stream tokens in output shingles
outputUnigrams - Whether or not the filter shall pass the original tokens to the output stream
outputUnigramsIfNoShingles - Overrides the behavior of outputUnigrams==false for those times when no shingles are available (because there are fewer than minShingleSize tokens in the input stream)? Note that if outputUnigrams==true, then unigrams are always output, regardless of whether any shingles are available.

ShingleAnalyzerWrapper

public ShingleAnalyzerWrapper(Version matchVersion)
Wraps StandardAnalyzer.

ShingleAnalyzerWrapper

public ShingleAnalyzerWrapper(Version matchVersion,
                              int minShingleSize,
                              int maxShingleSize)
Wraps StandardAnalyzer.

Method Detail

getMaxShingleSize

public int getMaxShingleSize()
The max shingle (token ngram) size

Returns:
The max shingle (token ngram) size

setMaxShingleSize

@Deprecated
public void setMaxShingleSize(int maxShingleSize)
Deprecated. Setting maxShingleSize after Analyzer instantiation prevents reuse. Confgure maxShingleSize during construction.

Set the maximum size of output shingles (default: 2)

Parameters:
maxShingleSize - max shingle size

getMinShingleSize

public int getMinShingleSize()
The min shingle (token ngram) size

Returns:
The min shingle (token ngram) size

setMinShingleSize

@Deprecated
public void setMinShingleSize(int minShingleSize)
Deprecated. Setting minShingleSize after Analyzer instantiation prevents reuse. Confgure minShingleSize during construction.

Set the min shingle size (default: 2).

This method requires that the passed in minShingleSize is not greater than maxShingleSize, so make sure that maxShingleSize is set before calling this method.

Parameters:
minShingleSize - min size of output shingles

getTokenSeparator

public String getTokenSeparator()

setTokenSeparator

@Deprecated
public void setTokenSeparator(String tokenSeparator)
Deprecated. Setting tokenSeparator after Analyzer instantiation prevents reuse. Confgure tokenSeparator during construction.

Sets the string to use when joining adjacent tokens to form a shingle

Parameters:
tokenSeparator - used to separate input stream tokens in output shingles

isOutputUnigrams

public boolean isOutputUnigrams()

setOutputUnigrams

@Deprecated
public void setOutputUnigrams(boolean outputUnigrams)
Deprecated. Setting outputUnigrams after Analyzer instantiation prevents reuse. Confgure outputUnigrams during construction.

Shall the filter pass the original tokens (the "unigrams") to the output stream?

Parameters:
outputUnigrams - Whether or not the filter shall pass the original tokens to the output stream

isOutputUnigramsIfNoShingles

public boolean isOutputUnigramsIfNoShingles()

setOutputUnigramsIfNoShingles

@Deprecated
public void setOutputUnigramsIfNoShingles(boolean outputUnigramsIfNoShingles)
Deprecated. Setting outputUnigramsIfNoShingles after Analyzer instantiation prevents reuse. Confgure outputUnigramsIfNoShingles during construction.

Shall we override the behavior of outputUnigrams==false for those times when no shingles are available (because there are fewer than minShingleSize tokens in the input stream)? (default: false.)

Note that if outputUnigrams==true, then unigrams are always output, regardless of whether any shingles are available.

Parameters:
outputUnigramsIfNoShingles - Whether or not to output a single unigram when no shingles are available.

tokenStream

public TokenStream tokenStream(String fieldName,
                               Reader reader)
Description copied from class: Analyzer
Creates a TokenStream which tokenizes all the text in the provided Reader. Must be able to handle null field name for backward compatibility.

Specified by:
tokenStream in class Analyzer

reusableTokenStream

public TokenStream reusableTokenStream(String fieldName,
                                       Reader reader)
                                throws IOException
Description copied from class: Analyzer
Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method. Callers that do not need to use more than one TokenStream at the same time from this analyzer should use this method for better performance.

Overrides:
reusableTokenStream in class Analyzer
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ShingleFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.shingle
Class ShingleFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.shingle.ShingleFilter
All Implemented Interfaces:
Closeable
public final class ShingleFilter
extends TokenFilter

A ShingleFilter constructs shingles (token n-grams) from a token stream. In other words, it creates combinations of tokens as a single token.

For example, the sentence "please divide this sentence into shingles" might be tokenized into shingles "please divide", "divide this", "this sentence", "sentence into", and "into shingles".

This filter handles position increments > 1 by inserting filler tokens (tokens with termtext "_"). It does not handle a position increment of 0.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static int | DEFAULT_MAX_SHINGLE_SIZE default maximum shingle size is 2.
static int | DEFAULT_MIN_SHINGLE_SIZE default minimum shingle size is 2.
static String | DEFAULT_TOKEN_TYPE default token type attribute value is "shingle"
static char[] | FILLER_TOKEN filler token for when positionIncrement is more than 1
static String | TOKEN_SEPARATOR The default string to use when joining adjacent tokens to form a shingle
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ShingleFilter(TokenStream input)
Construct a ShingleFilter with default shingle size: 2.
ShingleFilter(TokenStream input, int maxShingleSize)
Constructs a ShingleFilter with the specified shingle size from the TokenStream input
ShingleFilter(TokenStream input, int minShingleSize, int maxShingleSize)
Constructs a ShingleFilter with the specified shingle size from the TokenStream input
ShingleFilter(TokenStream input, String tokenType)
Construct a ShingleFilter with the specified token type for shingle tokens and the default shingle size: 2
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Reset the filter as well as the input TokenStream.
void | setMaxShingleSize(int maxShingleSize) Set the max shingle size (default: 2)
void | setMinShingleSize(int minShingleSize) Set the min shingle size (default: 2).
void | setOutputUnigrams(boolean outputUnigrams) Shall the output stream contain the input tokens (unigrams) as well as shingles? (default: true.)
void | setOutputUnigramsIfNoShingles(boolean outputUnigramsIfNoShingles) Shall we override the behavior of outputUnigrams==false for those times when no shingles are available (because there are fewer than minShingleSize tokens in the input stream)? (default: false.)
void | setTokenSeparator(String tokenSeparator) Sets the string to use when joining adjacent tokens to form a shingle
void | setTokenType(String tokenType) Set the type of the shingle tokens produced by this filter.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

FILLER_TOKEN

public static final char[] FILLER_TOKEN
filler token for when positionIncrement is more than 1

DEFAULT_MAX_SHINGLE_SIZE

public static final int DEFAULT_MAX_SHINGLE_SIZE
default maximum shingle size is 2.

See Also:
Constant Field Values

DEFAULT_MIN_SHINGLE_SIZE

public static final int DEFAULT_MIN_SHINGLE_SIZE
default minimum shingle size is 2.

See Also:
Constant Field Values

DEFAULT_TOKEN_TYPE

public static final String DEFAULT_TOKEN_TYPE
default token type attribute value is "shingle"

See Also:
Constant Field Values

TOKEN_SEPARATOR

public static final String TOKEN_SEPARATOR
The default string to use when joining adjacent tokens to form a shingle

See Also:
Constant Field Values
Constructor Detail

ShingleFilter

public ShingleFilter(TokenStream input,
                     int minShingleSize,
                     int maxShingleSize)
Constructs a ShingleFilter with the specified shingle size from the TokenStream input

Parameters:
input - input stream
minShingleSize - minimum shingle size produced by the filter.
maxShingleSize - maximum shingle size produced by the filter.

ShingleFilter

public ShingleFilter(TokenStream input,
                     int maxShingleSize)
Constructs a ShingleFilter with the specified shingle size from the TokenStream input

Parameters:
input - input stream
maxShingleSize - maximum shingle size produced by the filter.

ShingleFilter

public ShingleFilter(TokenStream input)
Construct a ShingleFilter with default shingle size: 2.

Parameters:
input - input stream

ShingleFilter

public ShingleFilter(TokenStream input,
                     String tokenType)
Construct a ShingleFilter with the specified token type for shingle tokens and the default shingle size: 2

Parameters:
input - input stream
tokenType - token type for shingle tokens
Method Detail

setTokenType

public void setTokenType(String tokenType)
Set the type of the shingle tokens produced by this filter. (default: "shingle")

Parameters:
tokenType - token tokenType

setOutputUnigrams

public void setOutputUnigrams(boolean outputUnigrams)
Shall the output stream contain the input tokens (unigrams) as well as shingles? (default: true.)

Parameters:
outputUnigrams - Whether or not the output stream shall contain the input tokens (unigrams)

setOutputUnigramsIfNoShingles

public void setOutputUnigramsIfNoShingles(boolean outputUnigramsIfNoShingles)

Shall we override the behavior of outputUnigrams==false for those times when no shingles are available (because there are fewer than minShingleSize tokens in the input stream)? (default: false.)

Note that if outputUnigrams==true, then unigrams are always output, regardless of whether any shingles are available.

Parameters:
outputUnigramsIfNoShingles - Whether or not to output a single unigram when no shingles are available.

setMaxShingleSize

public void setMaxShingleSize(int maxShingleSize)
Set the max shingle size (default: 2)

Parameters:
maxShingleSize - max size of output shingles

setMinShingleSize

public void setMinShingleSize(int minShingleSize)

Set the min shingle size (default: 2).

This method requires that the passed in minShingleSize is not greater than maxShingleSize, so make sure that maxShingleSize is set before calling this method.

The unigram output option is independent of the min shingle size.

Parameters:
minShingleSize - min size of output shingles

setTokenSeparator

public void setTokenSeparator(String tokenSeparator)
Sets the string to use when joining adjacent tokens to form a shingle

Parameters:
tokenSeparator - used to separate input stream tokens in output shingles

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShingleMatrixFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.shingle
Class ShingleMatrixFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.shingle.ShingleMatrixFilter
All Implemented Interfaces:
Closeable
Deprecated. Will be removed in Lucene 4.0. This filter is unmaintained and might not behave correctly if used with custom Attributes, i.e. Attributes other than the ones located in org.apache.lucene.analysis.tokenattributes. It also uses hardcoded payload encoders which makes it not easily adaptable to other use-cases.

@Deprecated
public final class ShingleMatrixFilter
extends TokenStream

A ShingleMatrixFilter constructs shingles (token n-grams) from a token stream. In other words, it creates combinations of tokens as a single token.

For example, the sentence "please divide this sentence into shingles" might be tokenized into shingles "please divide", "divide this", "this sentence", "sentence into", and "into shingles".

Using a shingle filter at index and query time can in some instances be used to replace phrase queries, especially them with 0 slop.

Without a spacer character it can be used to handle composition and decomposition of words such as searching for "multi dimensional" instead of "multidimensional". It is a rather common human problem at query time in several languages, notably the northern Germanic branch.

Shingles are amongst many things also known to solve problems in spell checking, language detection and document clustering.

This filter is backed by a three dimensional column oriented matrix used to create permutations of the second dimension, the rows, and leaves the third, the z-axis, for for multi token synonyms.

In order to use this filter you need to define a way of positioning the input stream tokens in the matrix. This is done using a ShingleMatrixFilter.TokenSettingsCodec. There are three simple implementations for demonstrational purposes, see ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec, ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec and ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec.

Consider this token matrix:

  Token[column][row][z-axis]{
    {{hello}, {greetings, and, salutations}},
    {{world}, {earth}, {tellus}}
  };
It would produce the following 2-3 gram sized shingles:
 "hello_world"
 "greetings_and"
 "greetings_and_salutations"
 "and_salutations"
 "and_salutations_world"
 "salutations_world"
 "hello_earth"
 "and_salutations_earth"
 "salutations_earth"
 "hello_tellus"
 "and_salutations_tellus"
 "salutations_tellus"

This implementation can be rather heap demanding if (maximum shingle size - minimum shingle size) is a great number and the stream contains many columns, or if each column contains a great number of rows.

The problem is that in order avoid producing duplicates the filter needs to keep track of any shingle already produced and returned to the consumer. There is a bit of resource management to handle this but it would of course be much better if the filter was written so it never created the same shingle more than once in the first place.

The filter also has basic support for calculating weights for the shingles based on the weights of the tokens from the input stream, output shingle size, etc. See calculateShingleWeight(org.apache.lucene.analysis.Token, java.util.List, int, java.util.List, java.util.List).

Nested Class Summary
static class | ShingleMatrixFilter.Matrix Deprecated. A column focused matrix in three dimensions:
static class | ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec Deprecated. Using this codec makes a ShingleMatrixFilter act like ShingleFilter.
static class | ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec Deprecated. A full featured codec not to be used for something serious.
static class | ShingleMatrixFilter.TokenPositioner Deprecated. Used to describe how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
static class | ShingleMatrixFilter.TokenSettingsCodec Deprecated. Strategy used to code and decode meta data of the tokens from the input stream regarding how to position the tokens in the matrix, set and retreive weight, et c.
static class | ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec Deprecated. A codec that creates a two dimensional matrix by treating tokens from the input stream with 0 position increment as new rows to the current column.
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static ShingleMatrixFilter.TokenSettingsCodec | defaultSettingsCodec Deprecated.
static Character | defaultSpacerCharacter Deprecated.
static boolean | ignoringSinglePrefixOrSuffixShingleByDefault Deprecated.
Constructor Summary
ShingleMatrixFilter(ShingleMatrixFilter.Matrix matrix, int minimumShingleSize, int maximumShingleSize, Character spacerCharacter, boolean ignoringSinglePrefixOrSuffixShingle, ShingleMatrixFilter.TokenSettingsCodec settingsCodec)
Deprecated. Creates a shingle filter based on a user defined matrix.
ShingleMatrixFilter(TokenStream input, int minimumShingleSize, int maximumShingleSize)
Deprecated. Creates a shingle filter using default settings.
ShingleMatrixFilter(TokenStream input, int minimumShingleSize, int maximumShingleSize, Character spacerCharacter)
Deprecated. Creates a shingle filter using default settings.
ShingleMatrixFilter(TokenStream input, int minimumShingleSize, int maximumShingleSize, Character spacerCharacter, boolean ignoringSinglePrefixOrSuffixShingle)
Deprecated. Creates a shingle filter using the default ShingleMatrixFilter.TokenSettingsCodec.
ShingleMatrixFilter(TokenStream input, int minimumShingleSize, int maximumShingleSize, Character spacerCharacter, boolean ignoringSinglePrefixOrSuffixShingle, ShingleMatrixFilter.TokenSettingsCodec settingsCodec)
Deprecated. Creates a shingle filter with ad hoc parameter settings.
Method Summary
 float calculateShingleWeight(Token shingleToken, List<Token> shingle, int currentPermutationStartOffset, List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows, List<Token> currentPermuationTokens)
Deprecated. Evaluates the new shingle token weight.
 ShingleMatrixFilter.Matrix getMatrix()
Deprecated.
 int getMaximumShingleSize()
Deprecated.
 int getMinimumShingleSize()
Deprecated.
 Character getSpacerCharacter()
Deprecated.
 boolean incrementToken()
Deprecated. Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 boolean isIgnoringSinglePrefixOrSuffixShingle()
Deprecated.
 void reset()
Deprecated. Resets this stream to the beginning.
 void setIgnoringSinglePrefixOrSuffixShingle(boolean ignoringSinglePrefixOrSuffixShingle)
Deprecated.
 void setMatrix(ShingleMatrixFilter.Matrix matrix)
Deprecated.
 void setMaximumShingleSize(int maximumShingleSize)
Deprecated.
 void setMinimumShingleSize(int minimumShingleSize)
Deprecated.
 void setSpacerCharacter(Character spacerCharacter)
Deprecated.
 void updateToken(Token token, List<Token> shingle, int currentPermutationStartOffset, List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows, List<Token> currentPermuationTokens)
Deprecated. Final touch of a shingle token before it is passed on to the consumer from method incrementToken().
Methods inherited from class org.apache.lucene.analysis.TokenStream
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

defaultSpacerCharacter

public static Character defaultSpacerCharacter
Deprecated.

defaultSettingsCodec

public static ShingleMatrixFilter.TokenSettingsCodec defaultSettingsCodec
Deprecated.

ignoringSinglePrefixOrSuffixShingleByDefault

public static boolean ignoringSinglePrefixOrSuffixShingleByDefault
Deprecated.
Constructor Detail

ShingleMatrixFilter

public ShingleMatrixFilter(ShingleMatrixFilter.Matrix matrix,
                           int minimumShingleSize,
                           int maximumShingleSize,
                           Character spacerCharacter,
                           boolean ignoringSinglePrefixOrSuffixShingle,
                           ShingleMatrixFilter.TokenSettingsCodec settingsCodec)
Deprecated.
Creates a shingle filter based on a user defined matrix. The filter /will/ delete columns from the input matrix! You will not be able to reset the filter if you used this constructor. todo: don't touch the matrix! use a boolean, set the input stream to null or something, and keep track of where in the matrix we are at.

Parameters:
matrix - the input based for creating shingles. Does not need to contain any information until incrementToken() is called the first time.
minimumShingleSize - minimum number of tokens in any shingle.
maximumShingleSize - maximum number of tokens in any shingle.
spacerCharacter - character to use between texts of the token parts in a shingle. null for none.
ignoringSinglePrefixOrSuffixShingle - if true, shingles that only contains permutation of the first of the last column will not be produced as shingles. Useful when adding boundary marker tokens such as '^' and '$'.
settingsCodec - codec used to read input token weight and matrix positioning.

ShingleMatrixFilter

public ShingleMatrixFilter(TokenStream input,
                           int minimumShingleSize,
                           int maximumShingleSize)
Deprecated.
Creates a shingle filter using default settings.

Parameters:
input - stream from which to construct the matrix
minimumShingleSize - minimum number of tokens in any shingle.
maximumShingleSize - maximum number of tokens in any shingle.
See Also:
defaultSpacerCharacter, ignoringSinglePrefixOrSuffixShingleByDefault, defaultSettingsCodec

ShingleMatrixFilter

public ShingleMatrixFilter(TokenStream input,
                           int minimumShingleSize,
                           int maximumShingleSize,
                           Character spacerCharacter)
Deprecated.
Creates a shingle filter using default settings.

Parameters:
input - stream from which to construct the matrix
minimumShingleSize - minimum number of tokens in any shingle.
maximumShingleSize - maximum number of tokens in any shingle.
spacerCharacter - character to use between texts of the token parts in a shingle. null for none.
See Also:
ignoringSinglePrefixOrSuffixShingleByDefault, defaultSettingsCodec

ShingleMatrixFilter

public ShingleMatrixFilter(TokenStream input,
                           int minimumShingleSize,
                           int maximumShingleSize,
                           Character spacerCharacter,
                           boolean ignoringSinglePrefixOrSuffixShingle)
Deprecated.
Creates a shingle filter using the default ShingleMatrixFilter.TokenSettingsCodec.

Parameters:
input - stream from which to construct the matrix
minimumShingleSize - minimum number of tokens in any shingle.
maximumShingleSize - maximum number of tokens in any shingle.
spacerCharacter - character to use between texts of the token parts in a shingle. null for none.
ignoringSinglePrefixOrSuffixShingle - if true, shingles that only contains permutation of the first of the last column will not be produced as shingles. Useful when adding boundary marker tokens such as '^' and '$'.
See Also:
defaultSettingsCodec

ShingleMatrixFilter

public ShingleMatrixFilter(TokenStream input,
                           int minimumShingleSize,
                           int maximumShingleSize,
                           Character spacerCharacter,
                           boolean ignoringSinglePrefixOrSuffixShingle,
                           ShingleMatrixFilter.TokenSettingsCodec settingsCodec)
Deprecated.
Creates a shingle filter with ad hoc parameter settings.

Parameters:
input - stream from which to construct the matrix
minimumShingleSize - minimum number of tokens in any shingle.
maximumShingleSize - maximum number of tokens in any shingle.
spacerCharacter - character to use between texts of the token parts in a shingle. null for none.
ignoringSinglePrefixOrSuffixShingle - if true, shingles that only contains permutation of the first of the last column will not be produced as shingles. Useful when adding boundary marker tokens such as '^' and '$'.
settingsCodec - codec used to read input token weight and matrix positioning.
Method Detail

reset

public void reset()
           throws IOException
Deprecated.
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException

incrementToken

public final boolean incrementToken()
                             throws IOException
Deprecated.
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

updateToken

public void updateToken(Token token,
                        List<Token> shingle,
                        int currentPermutationStartOffset,
                        List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows,
                        List<Token> currentPermuationTokens)
Deprecated.
Final touch of a shingle token before it is passed on to the consumer from method incrementToken(). Calculates and sets type, flags, position increment, start/end offsets and weight.

Parameters:
token - Shingle token
shingle - Tokens used to produce the shingle token.
currentPermutationStartOffset - Start offset in parameter currentPermutationTokens
currentPermutationRows - index to Matrix.Column.Row from the position of tokens in parameter currentPermutationTokens
currentPermuationTokens - tokens of the current permutation of rows in the matrix.

calculateShingleWeight

public float calculateShingleWeight(Token shingleToken,
                                    List<Token> shingle,
                                    int currentPermutationStartOffset,
                                    List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows,
                                    List<Token> currentPermuationTokens)
Deprecated.
Evaluates the new shingle token weight. for (shingle part token in shingle) weight += shingle part token weight * (1 / sqrt(all shingle part token weights summed)) This algorithm gives a slightly greater score for longer shingles and is rather penalising to great shingle token part weights.

Parameters:
shingleToken - token returned to consumer
shingle - tokens the tokens used to produce the shingle token.
currentPermutationStartOffset - start offset in parameter currentPermutationRows and currentPermutationTokens.
currentPermutationRows - an index to what matrix row a token in parameter currentPermutationTokens exist.
currentPermuationTokens - all tokens in the current row permutation of the matrix. A sub list (parameter offset, parameter shingle.size) equals parameter shingle.
Returns:
weight to be set for parameter shingleToken

getMinimumShingleSize

public int getMinimumShingleSize()
Deprecated.

setMinimumShingleSize

public void setMinimumShingleSize(int minimumShingleSize)
Deprecated.

getMaximumShingleSize

public int getMaximumShingleSize()
Deprecated.

setMaximumShingleSize

public void setMaximumShingleSize(int maximumShingleSize)
Deprecated.

getMatrix

public ShingleMatrixFilter.Matrix getMatrix()
Deprecated.

setMatrix

public void setMatrix(ShingleMatrixFilter.Matrix matrix)
Deprecated.

getSpacerCharacter

public Character getSpacerCharacter()
Deprecated.

setSpacerCharacter

public void setSpacerCharacter(Character spacerCharacter)
Deprecated.

isIgnoringSinglePrefixOrSuffixShingle

public boolean isIgnoringSinglePrefixOrSuffixShingle()
Deprecated.

setIgnoringSinglePrefixOrSuffixShingle

public void setIgnoringSinglePrefixOrSuffixShingle(boolean ignoringSinglePrefixOrSuffixShingle)
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShingleMatrixFilter.Matrix.Column

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.shingle
Class ShingleMatrixFilter.Matrix.Column

java.lang.Object
    extended by  org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column
Enclosing class:
ShingleMatrixFilter.Matrix
public class ShingleMatrixFilter.Matrix.Column
extends Object

Nested Class Summary
 class ShingleMatrixFilter.Matrix.Column.Row
Constructor Summary
ShingleMatrixFilter.Matrix.Column()
ShingleMatrixFilter.Matrix.Column(Token token)
Method Summary
int | getIndex()
ShingleMatrixFilter.Matrix | getMatrix()
List<ShingleMatrixFilter.Matrix.Column.Row> | getRows()
boolean | isFirst()
boolean | isLast()
void | setFirst(boolean first)
void | setLast(boolean last)
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ShingleMatrixFilter.Matrix.Column

public ShingleMatrixFilter.Matrix.Column(Token token)

ShingleMatrixFilter.Matrix.Column

public ShingleMatrixFilter.Matrix.Column()
Method Detail

getMatrix

public ShingleMatrixFilter.Matrix getMatrix()

getRows

public List<ShingleMatrixFilter.Matrix.Column.Row> getRows()

getIndex

public int getIndex()

toString

public String toString()
Overrides:
toString in class Object

isFirst

public boolean isFirst()

setFirst

public void setFirst(boolean first)

setLast

public void setLast(boolean last)

isLast

public boolean isLast()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShingleMatrixFilter.Matrix.Column.Row

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.shingle
Class ShingleMatrixFilter.Matrix.Column.Row

java.lang.Object
    extended by  org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column.Row
Enclosing class:
ShingleMatrixFilter.Matrix.Column
public class ShingleMatrixFilter.Matrix.Column.Row
extends Object

Constructor Summary
ShingleMatrixFilter.Matrix.Column.Row()
Method Summary
ShingleMatrixFilter.Matrix.Column | getColumn()
int | getIndex()
List<Token> | getTokens()
void | setTokens(List<Token> tokens)
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ShingleMatrixFilter.Matrix.Column.Row

public ShingleMatrixFilter.Matrix.Column.Row()
Method Detail

getColumn

public ShingleMatrixFilter.Matrix.Column getColumn()

getIndex

public int getIndex()

getTokens

public List<Token> getTokens()

setTokens

public void setTokens(List<Token> tokens)

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShingleMatrixFilter.Matrix

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.shingle
Class ShingleMatrixFilter.Matrix

java.lang.Object
    extended by  org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix
Enclosing class:
ShingleMatrixFilter
public static class ShingleMatrixFilter.Matrix
extends Object

A column focused matrix in three dimensions:

 Token[column][row][z-axis] {
     {{hello}, {greetings, and, salutations}},
     {{world}, {earth}, {tellus}}
 };
todo consider row groups to indicate that shingles is only to contain permutations with texts in that same row group.

Nested Class Summary
 class ShingleMatrixFilter.Matrix.Column
Constructor Summary
ShingleMatrixFilter.Matrix()
Method Summary
List<ShingleMatrixFilter.Matrix.Column> | getColumns()
Iterator<ShingleMatrixFilter.Matrix.Column.Row[]> | permutationIterator()
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ShingleMatrixFilter.Matrix

public ShingleMatrixFilter.Matrix()
Method Detail

getColumns

public List<ShingleMatrixFilter.Matrix.Column> getColumns()

permutationIterator

public Iterator<ShingleMatrixFilter.Matrix.Column.Row[]> permutationIterator()

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.shingle
Class ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec

java.lang.Object
    extended by  org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec
        extended by  org.apache.lucene.analysis.shingle.ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec
Enclosing class:
ShingleMatrixFilter
public static class ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec
extends ShingleMatrixFilter.TokenSettingsCodec

Using this codec makes a ShingleMatrixFilter act like ShingleFilter. It produces the most simple sort of shingles, ignoring token position increments, et c. It adds each token as a new column.

Constructor Summary
ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec()
Method Summary
ShingleMatrixFilter.TokenPositioner | getTokenPositioner(Token token) Retrieves information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
float | getWeight(Token token) Have this method return 1f in order to 'disable' weights.
void | setTokenPositioner(Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner) Sets information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
void | setWeight(Token token, float weight) Have this method do nothing in order to 'disable' weights.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec

public ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec()
Method Detail

getTokenPositioner

public ShingleMatrixFilter.TokenPositioner getTokenPositioner(Token token)
                                                       throws IOException
Description copied from class: ShingleMatrixFilter.TokenSettingsCodec
Retrieves information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.

Specified by:
getTokenPositioner in class ShingleMatrixFilter.TokenSettingsCodec
Returns:
ShingleMatrixFilter.TokenPositioner
Throws:
IOException

setTokenPositioner

public void setTokenPositioner(Token token,
                               ShingleMatrixFilter.TokenPositioner tokenPositioner)
Description copied from class: ShingleMatrixFilter.TokenSettingsCodec
Sets information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.

Specified by:
setTokenPositioner in class ShingleMatrixFilter.TokenSettingsCodec

getWeight

public float getWeight(Token token)
Description copied from class: ShingleMatrixFilter.TokenSettingsCodec
Have this method return 1f in order to 'disable' weights.

Specified by:
getWeight in class ShingleMatrixFilter.TokenSettingsCodec
Returns:
the weight of parameter token

setWeight

public void setWeight(Token token,
                      float weight)
Description copied from class: ShingleMatrixFilter.TokenSettingsCodec
Have this method do nothing in order to 'disable' weights.

Specified by:
setWeight in class ShingleMatrixFilter.TokenSettingsCodec
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.shingle
Class ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec

java.lang.Object
    extended by  org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec
        extended by  org.apache.lucene.analysis.shingle.ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec
Enclosing class:
ShingleMatrixFilter
public static class ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec
extends ShingleMatrixFilter.TokenSettingsCodec

A full featured codec not to be used for something serious. It takes complete control of payload for weight and the bit flags for positioning in the matrix. Mainly exist for demonstrational purposes.

Constructor Summary
ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec()
Method Summary
 ShingleMatrixFilter.TokenPositioner getTokenPositioner(Token token)
Retrieves information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
 float getWeight(Token token)
Returns a 32 bit float from the payload, or 1f it null.
 void setTokenPositioner(Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner)
Sets the TokenPositioner as token flags int value.
 void setWeight(Token token, float weight)
Stores a 32 bit float in the payload, or set it to null if 1f;
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec

public ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec()
Method Detail

getTokenPositioner

public ShingleMatrixFilter.TokenPositioner getTokenPositioner(Token token)
                                                       throws IOException
Description copied from class: ShingleMatrixFilter.TokenSettingsCodec
Retrieves information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.

Specified by:
getTokenPositioner in class ShingleMatrixFilter.TokenSettingsCodec
Parameters:
token -
Returns:
the token flags int value as TokenPosition
Throws:
IOException

setTokenPositioner

public void setTokenPositioner(Token token,
                               ShingleMatrixFilter.TokenPositioner tokenPositioner)
Sets the TokenPositioner as token flags int value.

Specified by:
setTokenPositioner in class ShingleMatrixFilter.TokenSettingsCodec
Parameters:
token -
tokenPositioner -

getWeight

public float getWeight(Token token)
Returns a 32 bit float from the payload, or 1f it null.

Specified by:
getWeight in class ShingleMatrixFilter.TokenSettingsCodec
Parameters:
token -
Returns:
32 bit float

setWeight

public void setWeight(Token token,
                      float weight)
Stores a 32 bit float in the payload, or set it to null if 1f;

Specified by:
setWeight in class ShingleMatrixFilter.TokenSettingsCodec
Parameters:
token -
weight -
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShingleMatrixFilter.TokenPositioner

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.shingle
Class ShingleMatrixFilter.TokenPositioner

java.lang.Object
    extended by  org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenPositioner
Enclosing class:
ShingleMatrixFilter
public static class ShingleMatrixFilter.TokenPositioner
extends Object

Used to describe how a Token is to be inserted to a ShingleMatrixFilter.Matrix.

See Also:
ShingleMatrixFilter.TokenSettingsCodec.getTokenPositioner(org.apache.lucene.analysis.Token), ShingleMatrixFilter.TokenSettingsCodec.setTokenPositioner(org.apache.lucene.analysis.Token,org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenPositioner)

Field Summary
static ShingleMatrixFilter.TokenPositioner | newColumn
static ShingleMatrixFilter.TokenPositioner | newRow
static ShingleMatrixFilter.TokenPositioner | sameRow
Method Summary
 int getIndex()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

newColumn

public static final ShingleMatrixFilter.TokenPositioner newColumn

newRow

public static final ShingleMatrixFilter.TokenPositioner newRow

sameRow

public static final ShingleMatrixFilter.TokenPositioner sameRow
Method Detail

getIndex

public int getIndex()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShingleMatrixFilter.TokenSettingsCodec

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.shingle
Class ShingleMatrixFilter.TokenSettingsCodec

java.lang.Object
    extended by  org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec
Direct Known Subclasses:
ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec, ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec, ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec
Enclosing class:
ShingleMatrixFilter
public abstract static class ShingleMatrixFilter.TokenSettingsCodec
extends Object

Strategy used to code and decode meta data of the tokens from the input stream regarding how to position the tokens in the matrix, set and retreive weight, et c.

Constructor Summary
ShingleMatrixFilter.TokenSettingsCodec()
Method Summary
abstract ShingleMatrixFilter.TokenPositioner | getTokenPositioner(Token token) Retrieves information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
abstract float | getWeight(Token token) Have this method return 1f in order to 'disable' weights.
abstract void | setTokenPositioner(Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner) Sets information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
abstract void | setWeight(Token token, float weight) Have this method do nothing in order to 'disable' weights.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ShingleMatrixFilter.TokenSettingsCodec

public ShingleMatrixFilter.TokenSettingsCodec()
Method Detail

getTokenPositioner

public abstract ShingleMatrixFilter.TokenPositioner getTokenPositioner(Token token)
                                                                throws IOException
Retrieves information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.

Parameters:
token -
Returns:
ShingleMatrixFilter.TokenPositioner
Throws:
IOException

setTokenPositioner

public abstract void setTokenPositioner(Token token,
                                        ShingleMatrixFilter.TokenPositioner tokenPositioner)
Sets information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.

Parameters:
token -
tokenPositioner -

getWeight

public abstract float getWeight(Token token)
Have this method return 1f in order to 'disable' weights.

Parameters:
token -
Returns:
the weight of parameter token

setWeight

public abstract void setWeight(Token token,
                               float weight)
Have this method do nothing in order to 'disable' weights.

Parameters:
token -
weight -
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.shingle
Class ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec

java.lang.Object
    extended by  org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec
        extended by  org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec
Enclosing class:
ShingleMatrixFilter
public static class ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec
extends ShingleMatrixFilter.TokenSettingsCodec

A codec that creates a two dimensional matrix by treating tokens from the input stream with 0 position increment as new rows to the current column.

Constructor Summary
ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec()
Method Summary
ShingleMatrixFilter.TokenPositioner | getTokenPositioner(Token token) Retrieves information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
float | getWeight(Token token) Have this method return 1f in order to 'disable' weights.
void | setTokenPositioner(Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner) Sets information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
void | setWeight(Token token, float weight) Have this method do nothing in order to 'disable' weights.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec

public ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec()
Method Detail

getTokenPositioner

public ShingleMatrixFilter.TokenPositioner getTokenPositioner(Token token)
                                                       throws IOException
Description copied from class: ShingleMatrixFilter.TokenSettingsCodec
Retrieves information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.

Specified by:
getTokenPositioner in class ShingleMatrixFilter.TokenSettingsCodec
Returns:
ShingleMatrixFilter.TokenPositioner
Throws:
IOException

setTokenPositioner

public void setTokenPositioner(Token token,
                               ShingleMatrixFilter.TokenPositioner tokenPositioner)
Description copied from class: ShingleMatrixFilter.TokenSettingsCodec
Sets information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.

Specified by:
setTokenPositioner in class ShingleMatrixFilter.TokenSettingsCodec

getWeight

public float getWeight(Token token)
Description copied from class: ShingleMatrixFilter.TokenSettingsCodec
Have this method return 1f in order to 'disable' weights.

Specified by:
getWeight in class ShingleMatrixFilter.TokenSettingsCodec
Returns:
the weight of parameter token

setWeight

public void setWeight(Token token,
                      float weight)
Description copied from class: ShingleMatrixFilter.TokenSettingsCodec
Have this method do nothing in order to 'disable' weights.

Specified by:
setWeight in class ShingleMatrixFilter.TokenSettingsCodec
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper

No usage of org.apache.lucene.analysis.shingle.ShingleAnalyzerWrapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.shingle.ShingleFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.shingle.ShingleFilter

No usage of org.apache.lucene.analysis.shingle.ShingleFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.shingle.ShingleMatrixFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.shingle.ShingleMatrixFilter

No usage of org.apache.lucene.analysis.shingle.ShingleMatrixFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column

Packages that use ShingleMatrixFilter.Matrix.Column
org.apache.lucene.analysis.shingle Word n-gram filters

Uses of ShingleMatrixFilter.Matrix.Column in org.apache.lucene.analysis.shingle

Methods in org.apache.lucene.analysis.shingle that return ShingleMatrixFilter.Matrix.Column
 ShingleMatrixFilter.Matrix.Column ShingleMatrixFilter.Matrix.Column.Row.getColumn()

Methods in org.apache.lucene.analysis.shingle that return types with arguments of type ShingleMatrixFilter.Matrix.Column
 List<ShingleMatrixFilter.Matrix.Column> ShingleMatrixFilter.Matrix.getColumns()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column.Row

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix.Column.Row

Packages that use ShingleMatrixFilter.Matrix.Column.Row
org.apache.lucene.analysis.shingle Word n-gram filters

Uses of ShingleMatrixFilter.Matrix.Column.Row in org.apache.lucene.analysis.shingle

Methods in org.apache.lucene.analysis.shingle that return types with arguments of type ShingleMatrixFilter.Matrix.Column.Row
 List<ShingleMatrixFilter.Matrix.Column.Row> ShingleMatrixFilter.Matrix.Column.getRows()

Method parameters in org.apache.lucene.analysis.shingle with type arguments of type ShingleMatrixFilter.Matrix.Column.Row
 float ShingleMatrixFilter.calculateShingleWeight(Token shingleToken, List<Token> shingle, int currentPermutationStartOffset, List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows, List<Token> currentPermuationTokens)
Deprecated. Evaluates the new shingle token weight.
 void ShingleMatrixFilter.updateToken(Token token, List<Token> shingle, int currentPermutationStartOffset, List<ShingleMatrixFilter.Matrix.Column.Row> currentPermutationRows, List<Token> currentPermuationTokens)
Deprecated. Final touch of a shingle token before it is passed on to the consumer from method ShingleMatrixFilter.incrementToken().

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.shingle.ShingleMatrixFilter.Matrix

Packages that use ShingleMatrixFilter.Matrix
org.apache.lucene.analysis.shingle Word n-gram filters

Uses of ShingleMatrixFilter.Matrix in org.apache.lucene.analysis.shingle

Methods in org.apache.lucene.analysis.shingle that return ShingleMatrixFilter.Matrix
ShingleMatrixFilter.Matrix | ShingleMatrixFilter.getMatrix() Deprecated.
ShingleMatrixFilter.Matrix | ShingleMatrixFilter.Matrix.Column.getMatrix()

Methods in org.apache.lucene.analysis.shingle with parameters of type ShingleMatrixFilter.Matrix
 void ShingleMatrixFilter.setMatrix(ShingleMatrixFilter.Matrix matrix)
Deprecated.

Constructors in org.apache.lucene.analysis.shingle with parameters of type ShingleMatrixFilter.Matrix
ShingleMatrixFilter(ShingleMatrixFilter.Matrix matrix, int minimumShingleSize, int maximumShingleSize, Character spacerCharacter, boolean ignoringSinglePrefixOrSuffixShingle, ShingleMatrixFilter.TokenSettingsCodec settingsCodec)
Deprecated. Creates a shingle filter based on a user defined matrix.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.shingle.ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec

No usage of org.apache.lucene.analysis.shingle.ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.shingle.ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec

No usage of org.apache.lucene.analysis.shingle.ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenPositioner

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenPositioner

Packages that use ShingleMatrixFilter.TokenPositioner
org.apache.lucene.analysis.shingle Word n-gram filters

Uses of ShingleMatrixFilter.TokenPositioner in org.apache.lucene.analysis.shingle

Fields in org.apache.lucene.analysis.shingle declared as ShingleMatrixFilter.TokenPositioner
static ShingleMatrixFilter.TokenPositioner | ShingleMatrixFilter.TokenPositioner.newColumn
static ShingleMatrixFilter.TokenPositioner | ShingleMatrixFilter.TokenPositioner.newRow
static ShingleMatrixFilter.TokenPositioner | ShingleMatrixFilter.TokenPositioner.sameRow

Methods in org.apache.lucene.analysis.shingle that return ShingleMatrixFilter.TokenPositioner
abstract ShingleMatrixFilter.TokenPositioner | ShingleMatrixFilter.TokenSettingsCodec.getTokenPositioner(Token token) Retrieves information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
ShingleMatrixFilter.TokenPositioner | ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec.getTokenPositioner(Token token)
ShingleMatrixFilter.TokenPositioner | ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec.getTokenPositioner(Token token)
ShingleMatrixFilter.TokenPositioner | ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec.getTokenPositioner(Token token)

Methods in org.apache.lucene.analysis.shingle with parameters of type ShingleMatrixFilter.TokenPositioner
abstract void | ShingleMatrixFilter.TokenSettingsCodec.setTokenPositioner(Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner) Sets information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
void | ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec.setTokenPositioner(Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner)
void | ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec.setTokenPositioner(Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner)
void | ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec.setTokenPositioner(Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner) Sets the TokenPositioner as token flags int value.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec

Packages that use ShingleMatrixFilter.TokenSettingsCodec
org.apache.lucene.analysis.shingle Word n-gram filters

Uses of ShingleMatrixFilter.TokenSettingsCodec in org.apache.lucene.analysis.shingle

Subclasses of ShingleMatrixFilter.TokenSettingsCodec in org.apache.lucene.analysis.shingle
static class | ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec Deprecated. Using this codec makes a ShingleMatrixFilter act like ShingleFilter.
static class | ShingleMatrixFilter.SimpleThreeDimensionalTokenSettingsCodec Deprecated. A full featured codec not to be used for something serious.
static class | ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec Deprecated. A codec that creates a two dimensional matrix by treating tokens from the input stream with 0 position increment as new rows to the current column.

Fields in org.apache.lucene.analysis.shingle declared as ShingleMatrixFilter.TokenSettingsCodec
static ShingleMatrixFilter.TokenSettingsCodec ShingleMatrixFilter.defaultSettingsCodec
Deprecated.

Constructors in org.apache.lucene.analysis.shingle with parameters of type ShingleMatrixFilter.TokenSettingsCodec
ShingleMatrixFilter(ShingleMatrixFilter.Matrix matrix, int minimumShingleSize, int maximumShingleSize, Character spacerCharacter, boolean ignoringSinglePrefixOrSuffixShingle, ShingleMatrixFilter.TokenSettingsCodec settingsCodec)
Deprecated. Creates a shingle filter based on a user defined matrix.
ShingleMatrixFilter(TokenStream input, int minimumShingleSize, int maximumShingleSize, Character spacerCharacter, boolean ignoringSinglePrefixOrSuffixShingle, ShingleMatrixFilter.TokenSettingsCodec settingsCodec)
Deprecated. Creates a shingle filter with ad hoc parameter settings.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec

No usage of org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


DateRecognizerSinkFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.sinks
Class DateRecognizerSinkFilter

java.lang.Object
    extended by  org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter
        extended by  org.apache.lucene.analysis.sinks.DateRecognizerSinkFilter

public class DateRecognizerSinkFilter
extends TeeSinkTokenFilter.SinkFilter

Attempts to parse the CharTermAttributeImpl.termBuffer() as a Date using a DateFormat. If the value is a Date, it will add it to the sink.

Field Summary
static String | DATE_TYPE
protected DateFormat | dateFormat
protected CharTermAttribute | termAtt
Constructor Summary
DateRecognizerSinkFilter()
Uses DateFormat.getDateInstance() as the DateFormat object.
DateRecognizerSinkFilter(DateFormat dateFormat)
Method Summary
 boolean accept(AttributeSource source)
Returns true, iff the current state of the passed-in AttributeSource shall be stored in the sink.
Methods inherited from class org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter
reset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DATE_TYPE

public static final String DATE_TYPE
See Also:
Constant Field Values

dateFormat

protected DateFormat dateFormat

termAtt

protected CharTermAttribute termAtt
Constructor Detail

DateRecognizerSinkFilter

public DateRecognizerSinkFilter()
Uses DateFormat.getDateInstance() as the DateFormat object.

DateRecognizerSinkFilter

public DateRecognizerSinkFilter(DateFormat dateFormat)
Method Detail

accept

public boolean accept(AttributeSource source)
Description copied from class: TeeSinkTokenFilter.SinkFilter
Returns true, iff the current state of the passed-in AttributeSource shall be stored in the sink.

Specified by:
accept in class TeeSinkTokenFilter.SinkFilter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.sinks
Classes
DateRecognizerSinkFilter
TokenRangeSinkFilter
TokenTypeSinkFilter


org.apache.lucene.analysis.sinks

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.sinks

Implementations of the SinkTokenizer that might be useful.

See:
Description

Class Summary
DateRecognizerSinkFilter | Attempts to parse the CharTermAttributeImpl.termBuffer() as a Date using a DateFormat.
TokenRangeSinkFilter | Counts the tokens as they go by and saves to the internal list those between the range of lower and upper, exclusive of upper
TokenTypeSinkFilter | Adds a token to the sink if it has a specific type.

Package org.apache.lucene.analysis.sinks Description

Implementations of the SinkTokenizer that might be useful.
Copyright © 2007 Apache Software Foundation


org.apache.lucene.analysis.sinks Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.sinks

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter
      • org.apache.lucene.analysis.sinks.DateRecognizerSinkFilter
      • org.apache.lucene.analysis.sinks.TokenRangeSinkFilter
      • org.apache.lucene.analysis.sinks.TokenTypeSinkFilter


Uses of Package org.apache.lucene.analysis.sinks

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.sinks

No usage of org.apache.lucene.analysis.sinks

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


TokenRangeSinkFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.sinks
Class TokenRangeSinkFilter

java.lang.Object
    extended by  org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter
        extended by  org.apache.lucene.analysis.sinks.TokenRangeSinkFilter

public class TokenRangeSinkFilter
extends TeeSinkTokenFilter.SinkFilter

Counts the tokens as they go by and saves to the internal list those between the range of lower and upper, exclusive of upper

Constructor Summary
TokenRangeSinkFilter(int lower, int upper)
Method Summary
 boolean accept(AttributeSource source)
Returns true, iff the current state of the passed-in AttributeSource shall be stored in the sink.
 void reset()
Called by TeeSinkTokenFilter.SinkTokenStream.reset().
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TokenRangeSinkFilter

public TokenRangeSinkFilter(int lower,
                            int upper)
Method Detail

accept

public boolean accept(AttributeSource source)
Description copied from class: TeeSinkTokenFilter.SinkFilter
Returns true, iff the current state of the passed-in AttributeSource shall be stored in the sink.

Specified by:
accept in class TeeSinkTokenFilter.SinkFilter

reset

public void reset()
           throws IOException
Description copied from class: TeeSinkTokenFilter.SinkFilter
Called by TeeSinkTokenFilter.SinkTokenStream.reset(). This method does nothing by default and can optionally be overridden.

Overrides:
reset in class TeeSinkTokenFilter.SinkFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TokenTypeSinkFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.sinks
Class TokenTypeSinkFilter

java.lang.Object
    extended by  org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter
        extended by  org.apache.lucene.analysis.sinks.TokenTypeSinkFilter

public class TokenTypeSinkFilter
extends TeeSinkTokenFilter.SinkFilter

Adds a token to the sink if it has a specific type.

Constructor Summary
TokenTypeSinkFilter(String typeToMatch)
Method Summary
 boolean accept(AttributeSource source)
Returns true, iff the current state of the passed-in AttributeSource shall be stored in the sink.
Methods inherited from class org.apache.lucene.analysis.TeeSinkTokenFilter.SinkFilter
reset
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TokenTypeSinkFilter

public TokenTypeSinkFilter(String typeToMatch)
Method Detail

accept

public boolean accept(AttributeSource source)
Description copied from class: TeeSinkTokenFilter.SinkFilter
Returns true, iff the current state of the passed-in AttributeSource shall be stored in the sink.

Specified by:
accept in class TeeSinkTokenFilter.SinkFilter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.sinks.DateRecognizerSinkFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.sinks.DateRecognizerSinkFilter

No usage of org.apache.lucene.analysis.sinks.DateRecognizerSinkFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.sinks.TokenRangeSinkFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.sinks.TokenRangeSinkFilter

No usage of org.apache.lucene.analysis.sinks.TokenRangeSinkFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.sinks.TokenTypeSinkFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.sinks.TokenTypeSinkFilter

No usage of org.apache.lucene.analysis.sinks.TokenTypeSinkFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.snowball
Classes
SnowballAnalyzer
SnowballFilter


org.apache.lucene.analysis.snowball

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.snowball

TokenFilter and Analyzer implementations that use Snowball stemmers.

See:
Description

Class Summary
SnowballAnalyzer | Deprecated. Use the language-specific analyzer in contrib/analyzers instead.
SnowballFilter | A filter that stems words using a Snowball-generated stemmer.

Package org.apache.lucene.analysis.snowball Description

TokenFilter and Analyzer implementations that use Snowball stemmers.

This project provides pre-compiled version of the Snowball stemmers based on revision 500 of the Tartarus Snowball repository, together with classes integrating them with the Lucene search engine.

A few changes has been made to the static Snowball code and compiled stemmers:

  • Class SnowballProgram is made abstract and contains new abstract method stem() to avoid reflection in Lucene filter class SnowballFilter.
  • All use of StringBuffers has been refactored to StringBuilder for speed.
  • Snowball BSD license header has been added to the Java classes to avoid having RAT adding ASL headers.

See the Snowball home page for more information about the algorithms.

IMPORTANT NOTICE ON BACKWARDS COMPATIBILITY!

An index created using the Snowball module in Lucene 2.3.2 and below might not be compatible with the Snowball module in Lucene 2.4 or greater.

For more information about this issue see: https://issues.apache.org/jira/browse/LUCENE-1142


org.apache.lucene.analysis.snowball Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.snowball

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.snowball.SnowballAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.snowball.SnowballFilter


Uses of Package org.apache.lucene.analysis.snowball

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.snowball

No usage of org.apache.lucene.analysis.snowball

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SnowballAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.snowball
Class SnowballAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.snowball.SnowballAnalyzer
All Implemented Interfaces:
Closeable
Deprecated. Use the language-specific analyzer in contrib/analyzers instead. This analyzer will be removed in Lucene 5.0

@Deprecated
public final class SnowballAnalyzer
extends Analyzer

Filters StandardTokenizer with StandardFilter, LowerCaseFilter, StopFilter and SnowballFilter. Available stemmers are listed in org.tartarus.snowball.ext. The name of a stemmer is the part of the class name before "Stemmer", e.g., the stemmer in EnglishStemmer is named "English".

NOTE: This class uses the same Version dependent settings as StandardAnalyzer, with the following addition:

  • As of 3.1, uses TurkishLowerCaseFilter for Turkish language.

Constructor Summary
SnowballAnalyzer(Version matchVersion, String name)
Deprecated. Builds the named analyzer with no stop words.
SnowballAnalyzer(Version matchVersion, String name, Set<?> stopWords)
Deprecated. Builds the named analyzer with the given stop words.
SnowballAnalyzer(Version matchVersion, String name, String[] stopWords)
Deprecated. Use SnowballAnalyzer(Version, String, Set) instead.
Method Summary
TokenStream | reusableTokenStream(String fieldName, Reader reader) Deprecated. Returns a (possibly reused) StandardTokenizer filtered by a StandardFilter, a LowerCaseFilter, a StopFilter, and a SnowballFilter
TokenStream | tokenStream(String fieldName, Reader reader) Deprecated. Constructs a StandardTokenizer filtered by a StandardFilter, a LowerCaseFilter, a StopFilter, and a SnowballFilter
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SnowballAnalyzer

public SnowballAnalyzer(Version matchVersion,
                        String name)
Deprecated.
Builds the named analyzer with no stop words.

SnowballAnalyzer

@Deprecated
public SnowballAnalyzer(Version matchVersion,
                                   String name,
                                   String[] stopWords)
Deprecated. Use SnowballAnalyzer(Version, String, Set) instead.

Builds the named analyzer with the given stop words.

SnowballAnalyzer

public SnowballAnalyzer(Version matchVersion,
                        String name,
                        Set<?> stopWords)
Deprecated.
Builds the named analyzer with the given stop words.

Method Detail

tokenStream

public TokenStream tokenStream(String fieldName,
                               Reader reader)
Deprecated.
Constructs a StandardTokenizer filtered by a StandardFilter, a LowerCaseFilter, a StopFilter, and a SnowballFilter

Specified by:
tokenStream in class Analyzer

reusableTokenStream

public TokenStream reusableTokenStream(String fieldName,
                                       Reader reader)
                                throws IOException
Deprecated.
Returns a (possibly reused) StandardTokenizer filtered by a StandardFilter, a LowerCaseFilter, a StopFilter, and a SnowballFilter

Overrides:
reusableTokenStream in class Analyzer
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


SnowballFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.snowball
Class SnowballFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.snowball.SnowballFilter
All Implemented Interfaces:
Closeable
public final class SnowballFilter
extends TokenFilter

A filter that stems words using a Snowball-generated stemmer. Available stemmers are listed in org.tartarus.snowball.ext.

NOTE: SnowballFilter expects lowercased text.

  • For the Turkish language, see TurkishLowerCaseFilter.
  • For other languages, see LowerCaseFilter.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
SnowballFilter(TokenStream input, SnowballProgram stemmer)
SnowballFilter(TokenStream in, String name)
Construct the named stemming filter.
Method Summary
 boolean incrementToken()
Returns the next input Token, after being stemmed
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SnowballFilter

public SnowballFilter(TokenStream input,
                      SnowballProgram stemmer)

SnowballFilter

public SnowballFilter(TokenStream in,
                      String name)
Construct the named stemming filter. Available stemmers are listed in org.tartarus.snowball.ext. The name of a stemmer is the part of the class name before "Stemmer", e.g., the stemmer in EnglishStemmer is named "English".

Parameters:
in - the input tokens to stem
name - the name of a stemmer
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Returns the next input Token, after being stemmed

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.snowball.SnowballAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.snowball.SnowballAnalyzer

No usage of org.apache.lucene.analysis.snowball.SnowballAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.snowball.SnowballFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.snowball.SnowballFilter

No usage of org.apache.lucene.analysis.snowball.SnowballFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ClassicAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.standard
Class ClassicAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.standard.ClassicAnalyzer
All Implemented Interfaces:
Closeable
public final class ClassicAnalyzer
extends StopwordAnalyzerBase

Filters ClassicTokenizer with ClassicFilter, LowerCaseFilter and StopFilter, using a list of English stop words.

You must specify the required Version compatibility when creating ClassicAnalyzer:

  • As of 3.1, StopFilter correctly handles Unicode 4.0 supplementary characters in stopwords
  • As of 2.9, StopFilter preserves position increments
  • As of 2.4, Tokens incorrectly identified as acronyms are corrected (see LUCENE-1068)
ClassicAnalyzer was named StandardAnalyzer in Lucene versions prior to 3.1. As of 3.1, StandardAnalyzer implements Unicode text segmentation, as specified by UAX#29.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static int | DEFAULT_MAX_TOKEN_LENGTH Default maximum allowed token length
static Set<?> | STOP_WORDS_SET An unmodifiable set containing some common English words that are usually not useful for searching.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
ClassicAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (STOP_WORDS_SET).
ClassicAnalyzer(Version matchVersion, File stopwords)
Deprecated. Use ClassicAnalyzer(Version, Reader) instead.
ClassicAnalyzer(Version matchVersion, Reader stopwords)
Builds an analyzer with the stop words from the given reader.
ClassicAnalyzer(Version matchVersion, Set<?> stopWords)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.
int | getMaxTokenLength()
void | setMaxTokenLength(int length) Set maximum allowed token length.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_MAX_TOKEN_LENGTH

public static final int DEFAULT_MAX_TOKEN_LENGTH
Default maximum allowed token length

See Also:
Constant Field Values

STOP_WORDS_SET

public static final Set<?> STOP_WORDS_SET
An unmodifiable set containing some common English words that are usually not useful for searching.

Constructor Detail

ClassicAnalyzer

public ClassicAnalyzer(Version matchVersion,
                       Set<?> stopWords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - Lucene version to match See above
stopWords - stop words

ClassicAnalyzer

public ClassicAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (STOP_WORDS_SET).

Parameters:
matchVersion - Lucene version to match See above

ClassicAnalyzer

@Deprecated
public ClassicAnalyzer(Version matchVersion,
                                  File stopwords)
                throws IOException
Deprecated. Use ClassicAnalyzer(Version, Reader) instead.

Builds an analyzer with the stop words from the given file.

Parameters:
matchVersion - Lucene version to match See above
stopwords - File to read stop words from
Throws:
IOException
See Also:
WordlistLoader.getWordSet(Reader, Version)

ClassicAnalyzer

public ClassicAnalyzer(Version matchVersion,
                       Reader stopwords)
                throws IOException
Builds an analyzer with the stop words from the given reader.

Parameters:
matchVersion - Lucene version to match See above
stopwords - Reader to read stop words from
Throws:
IOException
See Also:
WordlistLoader.getWordSet(Reader, Version)
Method Detail

setMaxTokenLength

public void setMaxTokenLength(int length)
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.

getMaxTokenLength

public int getMaxTokenLength()
See Also:
setMaxTokenLength(int)

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Description copied from class: ReusableAnalyzerBase
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
the ReusableAnalyzerBase.TokenStreamComponents for this analyzer.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ClassicFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.standard
Class ClassicFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.standard.ClassicFilter
All Implemented Interfaces:
Closeable
public class ClassicFilter
extends TokenFilter

Normalizes tokens extracted with ClassicTokenizer.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ClassicFilter(TokenStream in)
Construct filtering in.
Method Summary
 boolean incrementToken()
Returns the next token in the stream, or null at EOS.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ClassicFilter

public ClassicFilter(TokenStream in)
Construct filtering in.

Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Returns the next token in the stream, or null at EOS.

Removes 's from the end of words.

Removes dots from acronyms.

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ClassicTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.standard
Class ClassicTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.standard.ClassicTokenizer
All Implemented Interfaces:
Closeable
public final class ClassicTokenizer
extends Tokenizer

A grammar-based tokenizer constructed with JFlex

This should be a good tokenizer for most European-language documents:

  • Splits words at punctuation characters, removing punctuation. However, a dot that's not followed by whitespace is considered part of a token.
  • Splits words at hyphens, unless there's a number in the token, in which case the whole token is interpreted as a product number and is not split.
  • Recognizes email addresses and internet hostnames as one token.

Many applications have specific tokenizer needs. If this tokenizer does not suit your application, please consider copying this source code directory to your project and maintaining your own grammar-based tokenizer.

You must specify the required Version compatibility when creating ClassicAnalyzer:

  • As of 2.4, Tokens incorrectly identified as acronyms are corrected (see LUCENE-1608
ClassicTokenizer was named StandardTokenizer in Lucene versions prior to 3.1. As of 3.1, StandardTokenizer implements Unicode text segmentation, as specified by UAX#29.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static int | ACRONYM
static int | ACRONYM_DEP Deprecated. this solves a bug where HOSTs that end with '.' are identified as ACRONYMs.
static int | ALPHANUM
static int | APOSTROPHE
static int | CJ
static int | COMPANY
static int | EMAIL
static int | HOST
static int | NUM
static String[] | TOKEN_TYPES String token types that correspond to token type int constants
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
ClassicTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader input)
Creates a new ClassicTokenizer with a given AttributeSource.AttributeFactory
ClassicTokenizer(Version matchVersion, AttributeSource source, Reader input)
Creates a new ClassicTokenizer with a given AttributeSource.
ClassicTokenizer(Version matchVersion, Reader input)
Creates a new instance of the ClassicTokenizer.
Method Summary
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 int getMaxTokenLength()
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 boolean isReplaceInvalidAcronym()
Deprecated. Remove in 3.X and make true the only valid value
 void reset(Reader reader)
Expert: Reset the tokenizer to a new reader.
 void setMaxTokenLength(int length)
Set the max allowed token length.
 void setReplaceInvalidAcronym(boolean replaceInvalidAcronym)
Deprecated. Remove in 3.X and make true the only valid value See https://issues.apache.org/jira/browse/LUCENE-1068
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.analysis.TokenStream
reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

ALPHANUM

public static final int ALPHANUM
See Also:
Constant Field Values

APOSTROPHE

public static final int APOSTROPHE
See Also:
Constant Field Values

ACRONYM

public static final int ACRONYM
See Also:
Constant Field Values

COMPANY

public static final int COMPANY
See Also:
Constant Field Values

EMAIL

public static final int EMAIL
See Also:
Constant Field Values

HOST

public static final int HOST
See Also:
Constant Field Values

NUM

public static final int NUM
See Also:
Constant Field Values

CJ

public static final int CJ
See Also:
Constant Field Values

ACRONYM_DEP

@Deprecated
public static final int ACRONYM_DEP
Deprecated. this solves a bug where HOSTs that end with '.' are identified as ACRONYMs.
See Also:
Constant Field Values

TOKEN_TYPES

public static final String[] TOKEN_TYPES
String token types that correspond to token type int constants

Constructor Detail

ClassicTokenizer

public ClassicTokenizer(Version matchVersion,
                        Reader input)
Creates a new instance of the ClassicTokenizer. Attaches the input to the newly created JFlex scanner.

Parameters:
input - The input reader See http://issues.apache.org/jira/browse/LUCENE-1068

ClassicTokenizer

public ClassicTokenizer(Version matchVersion,
                        AttributeSource source,
                        Reader input)
Creates a new ClassicTokenizer with a given AttributeSource.

ClassicTokenizer

public ClassicTokenizer(Version matchVersion,
                        AttributeSource.AttributeFactory factory,
                        Reader input)
Creates a new ClassicTokenizer with a given AttributeSource.AttributeFactory

Method Detail

setMaxTokenLength

public void setMaxTokenLength(int length)
Set the max allowed token length. Any token longer than this is skipped.

getMaxTokenLength

public int getMaxTokenLength()
See Also:
setMaxTokenLength(int)

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

end

public final void end()
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream

reset

public void reset(Reader reader)
           throws IOException
Description copied from class: Tokenizer
Expert: Reset the tokenizer to a new reader. Typically, an analyzer (in its reusableTokenStream method) will use this to re-use a previously created tokenizer.

Overrides:
reset in class Tokenizer
Throws:
IOException

isReplaceInvalidAcronym

@Deprecated
public boolean isReplaceInvalidAcronym()
Deprecated. Remove in 3.X and make true the only valid value

Prior to https://issues.apache.org/jira/browse/LUCENE-1068, ClassicTokenizer mischaracterized as acronyms tokens like www.abc.com when they should have been labeled as hosts instead.

Returns:
true if ClassicTokenizer now returns these tokens as Hosts, otherwise false

setReplaceInvalidAcronym

@Deprecated
public void setReplaceInvalidAcronym(boolean replaceInvalidAcronym)
Deprecated. Remove in 3.X and make true the only valid value See https://issues.apache.org/jira/browse/LUCENE-1068

Parameters:
replaceInvalidAcronym - Set to true to replace mischaracterized acronyms as HOST.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.standard
Interfaces
StandardTokenizerInterface
Classes
ClassicAnalyzer
ClassicFilter
ClassicTokenizer
StandardAnalyzer
StandardFilter
StandardTokenizer
StandardTokenizerImpl
UAX29URLEmailAnalyzer
UAX29URLEmailTokenizer
UAX29URLEmailTokenizerImpl


org.apache.lucene.analysis.standard

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.standard

Standards-based analyzers implemented with JFlex.

See:
Description

Interface Summary
StandardTokenizerInterface Internal interface for supporting versioned grammars.

Class Summary
ClassicAnalyzer | Filters ClassicTokenizer with ClassicFilter, LowerCaseFilter and StopFilter, using a list of English stop words.
ClassicFilter | Normalizes tokens extracted with ClassicTokenizer.
ClassicTokenizer | A grammar-based tokenizer constructed with JFlex
StandardAnalyzer | Filters StandardTokenizer with StandardFilter, LowerCaseFilter and StopFilter, using a list of English stop words.
StandardFilter | Normalizes tokens extracted with StandardTokenizer.
StandardTokenizer | A grammar-based tokenizer constructed with JFlex.
StandardTokenizerImpl | This class implements Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29 Tokens produced are of the following types: <ALPHANUM>: A sequence of alphabetic and numeric characters <NUM>: A number <SOUTHEAST_ASIAN>: A sequence of characters from South and Southeast Asian languages, including Thai, Lao, Myanmar, and Khmer <IDEOGRAPHIC>: A single CJKV ideographic character <HIRAGANA>: A single hiragana character
UAX29URLEmailAnalyzer | Filters UAX29URLEmailTokenizer with StandardFilter, LowerCaseFilter and StopFilter, using a list of English stop words.
UAX29URLEmailTokenizer | This class implements Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29 URLs and email addresses are also tokenized according to the relevant RFCs.
UAX29URLEmailTokenizerImpl | This class implements Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29 URLs and email addresses are also tokenized according to the relevant RFCs.

Package org.apache.lucene.analysis.standard Description

Standards-based analyzers implemented with JFlex.

The org.apache.lucene.analysis.standard package contains three fast grammar-based tokenizers constructed with JFlex:

  • StandardTokenizer: as of Lucene 3.1, implements the Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29. Unlike UAX29URLEmailTokenizer, URLs and email addresses are not tokenized as single tokens, but are instead split up into tokens according to the UAX#29 word break rules.
    StandardAnalyzer includes StandardTokenizer, StandardFilter, LowerCaseFilter and StopFilter. When the Version specified in the constructor is lower than 3.1, the ClassicTokenizer implementation is invoked.
  • ClassicTokenizer: this class was formerly (prior to Lucene 3.1) named StandardTokenizer. (Its tokenization rules are not based on the Unicode Text Segmentation algorithm.) ClassicAnalyzer includes ClassicTokenizer, StandardFilter, LowerCaseFilter and StopFilter.
  • UAX29URLEmailTokenizer: implements the Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29. URLs and email addresses are also tokenized according to the relevant RFCs.
    UAX29URLEmailAnalyzer includes UAX29URLEmailTokenizer, StandardFilter, LowerCaseFilter and StopFilter.


org.apache.lucene.analysis.standard Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.standard

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.standard.ClassicAnalyzer
          • org.apache.lucene.analysis.standard.StandardAnalyzer
          • org.apache.lucene.analysis.standard.UAX29URLEmailAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.standard.ClassicFilter
          • org.apache.lucene.analysis.standard.StandardFilter
        • org.apache.lucene.analysis.Tokenizer
          • org.apache.lucene.analysis.standard.ClassicTokenizer
          • org.apache.lucene.analysis.standard.StandardTokenizer
          • org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
    • org.apache.lucene.analysis.standard.StandardTokenizerImpl (implements org.apache.lucene.analysis.standard.StandardTokenizerInterface)
    • org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl (implements org.apache.lucene.analysis.standard.StandardTokenizerInterface)

Interface Hierarchy

  • org.apache.lucene.analysis.standard.StandardTokenizerInterface


Uses of Package org.apache.lucene.analysis.standard

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.standard

Packages that use org.apache.lucene.analysis.standard
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.standard.std31 | Backwards-compatible implementation to match Version.LUCENE_31
org.apache.lucene.analysis.standard.std34 | Backwards-compatible implementation to match Version.LUCENE_34

Classes in org.apache.lucene.analysis.standard used by org.apache.lucene.analysis.standard
StandardTokenizerInterface
Internal interface for supporting versioned grammars.

Classes in org.apache.lucene.analysis.standard used by org.apache.lucene.analysis.standard.std31
StandardTokenizerInterface
Internal interface for supporting versioned grammars.

Classes in org.apache.lucene.analysis.standard used by org.apache.lucene.analysis.standard.std34
StandardTokenizerInterface
Internal interface for supporting versioned grammars.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


StandardAnalyzer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.standard
Class StandardAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.standard.StandardAnalyzer
All Implemented Interfaces:
Closeable
public final class StandardAnalyzer
extends StopwordAnalyzerBase

Filters StandardTokenizer with StandardFilter, LowerCaseFilter and StopFilter, using a list of English stop words.

You must specify the required Version compatibility when creating StandardAnalyzer:

  • As of 3.4, Hiragana and Han characters are no longer wrongly split from their combining characters. If you use a previous version number, you get the exact broken behavior for backwards compatibility.
  • As of 3.1, StandardTokenizer implements Unicode text segmentation, and StopFilter correctly handles Unicode 4.0 supplementary characters in stopwords. ClassicTokenizer and ClassicAnalyzer are the pre-3.1 implementations of StandardTokenizer and StandardAnalyzer.
  • As of 2.9, StopFilter preserves position increments
  • As of 2.4, Tokens incorrectly identified as acronyms are corrected (see LUCENE-1068)

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static int | DEFAULT_MAX_TOKEN_LENGTH Default maximum allowed token length
static Set<?> | STOP_WORDS_SET An unmodifiable set containing some common English words that are usually not useful for searching.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
StandardAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (STOP_WORDS_SET).
StandardAnalyzer(Version matchVersion, File stopwords)
Deprecated. Use StandardAnalyzer(Version, Reader) instead.
StandardAnalyzer(Version matchVersion, Reader stopwords)
Builds an analyzer with the stop words from the given reader.
StandardAnalyzer(Version matchVersion, Set<?> stopWords)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.
int | getMaxTokenLength()
void | setMaxTokenLength(int length) Set maximum allowed token length.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_MAX_TOKEN_LENGTH

public static final int DEFAULT_MAX_TOKEN_LENGTH
Default maximum allowed token length

See Also:
Constant Field Values

STOP_WORDS_SET

public static final Set<?> STOP_WORDS_SET
An unmodifiable set containing some common English words that are usually not useful for searching.

Constructor Detail

StandardAnalyzer

public StandardAnalyzer(Version matchVersion,
                        Set<?> stopWords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - Lucene version to match See above
stopWords - stop words

StandardAnalyzer

public StandardAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (STOP_WORDS_SET).

Parameters:
matchVersion - Lucene version to match See above

StandardAnalyzer

@Deprecated
public StandardAnalyzer(Version matchVersion,
                                   File stopwords)
                 throws IOException
Deprecated. Use StandardAnalyzer(Version, Reader) instead.

Builds an analyzer with the stop words from the given file.

Parameters:
matchVersion - Lucene version to match See above
stopwords - File to read stop words from
Throws:
IOException
See Also:
WordlistLoader.getWordSet(Reader, Version)

StandardAnalyzer

public StandardAnalyzer(Version matchVersion,
                        Reader stopwords)
                 throws IOException
Builds an analyzer with the stop words from the given reader.

Parameters:
matchVersion - Lucene version to match See above
stopwords - Reader to read stop words from
Throws:
IOException
See Also:
WordlistLoader.getWordSet(Reader, Version)
Method Detail

setMaxTokenLength

public void setMaxTokenLength(int length)
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.

getMaxTokenLength

public int getMaxTokenLength()
See Also:
setMaxTokenLength(int)

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Description copied from class: ReusableAnalyzerBase
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
the ReusableAnalyzerBase.TokenStreamComponents for this analyzer.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.standard
Class StandardFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.standard.StandardFilter
All Implemented Interfaces:
Closeable
public class StandardFilter
extends TokenFilter

Normalizes tokens extracted with StandardTokenizer.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
StandardFilter(TokenStream in)
Deprecated. Use StandardFilter(Version, TokenStream) instead.
StandardFilter(Version matchVersion, TokenStream in)
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
boolean | incrementTokenClassic()
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

StandardFilter

@Deprecated
public StandardFilter(TokenStream in)
Deprecated. Use StandardFilter(Version, TokenStream) instead.

StandardFilter

public StandardFilter(Version matchVersion,
                      TokenStream in)
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

incrementTokenClassic

public final boolean incrementTokenClassic()
                                    throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.standard
Class StandardTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.standard.StandardTokenizer
All Implemented Interfaces:
Closeable
public final class StandardTokenizer
extends Tokenizer

A grammar-based tokenizer constructed with JFlex.

As of Lucene version 3.1, this class implements the Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29.

Many applications have specific tokenizer needs. If this tokenizer does not suit your application, please consider copying this source code directory to your project and maintaining your own grammar-based tokenizer.

You must specify the required Version compatibility when creating StandardTokenizer:

  • As of 3.4, Hiragana and Han characters are no longer wrongly split from their combining characters. If you use a previous version number, you get the exact broken behavior for backwards compatibility.
  • As of 3.1, StandardTokenizer implements Unicode text segmentation. If you use a previous version number, you get the exact behavior of ClassicTokenizer for backwards compatibility.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static int | ACRONYM Deprecated.
static int | ACRONYM_DEP Deprecated. this solves a bug where HOSTs that end with '.' are identified as ACRONYMs.
static int | ALPHANUM
static int | APOSTROPHE Deprecated.
static int | CJ Deprecated.
static int | COMPANY Deprecated.
static int | EMAIL
static int | HANGUL
static int | HIRAGANA
static int | HOST Deprecated.
static int | IDEOGRAPHIC
static int | KATAKANA
static int | NUM
static int | SOUTHEAST_ASIAN
static String[] | TOKEN_TYPES String token types that correspond to token type int constants
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
StandardTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader input)
Creates a new StandardTokenizer with a given AttributeSource.AttributeFactory
StandardTokenizer(Version matchVersion, AttributeSource source, Reader input)
Creates a new StandardTokenizer with a given AttributeSource.
StandardTokenizer(Version matchVersion, Reader input)
Creates a new instance of the StandardTokenizer.
Method Summary
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 int getMaxTokenLength()
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 boolean isReplaceInvalidAcronym()
Deprecated. Remove in 3.X and make true the only valid value
 void reset(Reader reader)
Expert: Reset the tokenizer to a new reader.
 void setMaxTokenLength(int length)
Set the max allowed token length.
 void setReplaceInvalidAcronym(boolean replaceInvalidAcronym)
Deprecated. Remove in 3.X and make true the only valid value See https://issues.apache.org/jira/browse/LUCENE-1068
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.analysis.TokenStream
reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

ALPHANUM

public static final int ALPHANUM
See Also:
Constant Field Values

APOSTROPHE

@Deprecated
public static final int APOSTROPHE
Deprecated.
See Also:
Constant Field Values

ACRONYM

@Deprecated
public static final int ACRONYM
Deprecated.
See Also:
Constant Field Values

COMPANY

@Deprecated
public static final int COMPANY
Deprecated.
See Also:
Constant Field Values

EMAIL

public static final int EMAIL
See Also:
Constant Field Values

HOST

@Deprecated
public static final int HOST
Deprecated.
See Also:
Constant Field Values

NUM

public static final int NUM
See Also:
Constant Field Values

CJ

@Deprecated
public static final int CJ
Deprecated.
See Also:
Constant Field Values

ACRONYM_DEP

@Deprecated
public static final int ACRONYM_DEP
Deprecated. this solves a bug where HOSTs that end with '.' are identified as ACRONYMs.
See Also:
Constant Field Values

SOUTHEAST_ASIAN

public static final int SOUTHEAST_ASIAN
See Also:
Constant Field Values

IDEOGRAPHIC

public static final int IDEOGRAPHIC
See Also:
Constant Field Values

HIRAGANA

public static final int HIRAGANA
See Also:
Constant Field Values

KATAKANA

public static final int KATAKANA
See Also:
Constant Field Values

HANGUL

public static final int HANGUL
See Also:
Constant Field Values

TOKEN_TYPES

public static final String[] TOKEN_TYPES
String token types that correspond to token type int constants

Constructor Detail

StandardTokenizer

public StandardTokenizer(Version matchVersion,
                         Reader input)
Creates a new instance of the StandardTokenizer. Attaches the input to the newly created JFlex scanner.

Parameters:
input - The input reader See http://issues.apache.org/jira/browse/LUCENE-1068

StandardTokenizer

public StandardTokenizer(Version matchVersion,
                         AttributeSource source,
                         Reader input)
Creates a new StandardTokenizer with a given AttributeSource.

StandardTokenizer

public StandardTokenizer(Version matchVersion,
                         AttributeSource.AttributeFactory factory,
                         Reader input)
Creates a new StandardTokenizer with a given AttributeSource.AttributeFactory

Method Detail

setMaxTokenLength

public void setMaxTokenLength(int length)
Set the max allowed token length. Any token longer than this is skipped.

getMaxTokenLength

public int getMaxTokenLength()
See Also:
setMaxTokenLength(int)

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

end

public final void end()
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream

reset

public void reset(Reader reader)
           throws IOException
Description copied from class: Tokenizer
Expert: Reset the tokenizer to a new reader. Typically, an analyzer (in its reusableTokenStream method) will use this to re-use a previously created tokenizer.

Overrides:
reset in class Tokenizer
Throws:
IOException

isReplaceInvalidAcronym

@Deprecated
public boolean isReplaceInvalidAcronym()
Deprecated. Remove in 3.X and make true the only valid value

Prior to https://issues.apache.org/jira/browse/LUCENE-1068, StandardTokenizer mischaracterized as acronyms tokens like www.abc.com when they should have been labeled as hosts instead.

Returns:
true if StandardTokenizer now returns these tokens as Hosts, otherwise false

setReplaceInvalidAcronym

@Deprecated
public void setReplaceInvalidAcronym(boolean replaceInvalidAcronym)
Deprecated. Remove in 3.X and make true the only valid value See https://issues.apache.org/jira/browse/LUCENE-1068

Parameters:
replaceInvalidAcronym - Set to true to replace mischaracterized acronyms as HOST.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardTokenizerImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.standard
Class StandardTokenizerImpl

java.lang.Object
    extended by  org.apache.lucene.analysis.standard.StandardTokenizerImpl
All Implemented Interfaces:
StandardTokenizerInterface
public final class StandardTokenizerImpl
extends Object
implements StandardTokenizerInterface

This class implements Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29

Tokens produced are of the following types:

  • <ALPHANUM>: A sequence of alphabetic and numeric characters
  • <NUM>: A number
  • <SOUTHEAST_ASIAN>: A sequence of characters from South and Southeast Asian languages, including Thai, Lao, Myanmar, and Khmer
  • <IDEOGRAPHIC>: A single CJKV ideographic character
  • <HIRAGANA>: A single hiragana character

Field Summary
static int | HANGUL_TYPE
static int | HIRAGANA_TYPE
static int | IDEOGRAPHIC_TYPE
static int | KATAKANA_TYPE
static int | NUMERIC_TYPE Numbers
static int | SOUTH_EAST_ASIAN_TYPE Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.).
static int | WORD_TYPE Alphanumeric sequences
static int | YYEOF This character denotes the end of file
static int | YYINITIAL lexical states
Constructor Summary
StandardTokenizerImpl(InputStream in)
Creates a new scanner.
StandardTokenizerImpl(Reader in)
Creates a new scanner There is also a java.io.InputStream version of this constructor.
Method Summary
int | getNextToken() Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
void | getText(CharTermAttribute t) Fills CharTermAttribute with the current token text.
void | yybegin(int newState) Enters a new lexical state
int | yychar() Returns the current position.
char | yycharat(int pos) Returns the character at position pos from the matched text.
void | yyclose() Closes the input stream.
int | yylength() Returns the length of the matched text region.
void | yypushback(int number) Pushes the specified amount of characters back into the input stream.
void | yyreset(Reader reader) Resets the scanner to read from a new input stream.
int | yystate() Returns the current lexical state.
String | yytext() Returns the text matched by the current regular expression.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

YYEOF

public static final int YYEOF
This character denotes the end of file

See Also:
Constant Field Values

YYINITIAL

public static final int YYINITIAL
lexical states

See Also:
Constant Field Values

WORD_TYPE

public static final int WORD_TYPE
Alphanumeric sequences

See Also:
Constant Field Values

NUMERIC_TYPE

public static final int NUMERIC_TYPE
Numbers

See Also:
Constant Field Values

SOUTH_EAST_ASIAN_TYPE

public static final int SOUTH_EAST_ASIAN_TYPE
Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.). Sequences of these are kept together as as a single token rather than broken up, because the logic required to break them at word boundaries is too complex for UAX#29.

See Unicode Line Breaking Algorithm: http://www.unicode.org/reports/tr14/#SA

See Also:
Constant Field Values

IDEOGRAPHIC_TYPE

public static final int IDEOGRAPHIC_TYPE
See Also:
Constant Field Values

HIRAGANA_TYPE

public static final int HIRAGANA_TYPE
See Also:
Constant Field Values

KATAKANA_TYPE

public static final int KATAKANA_TYPE
See Also:
Constant Field Values

HANGUL_TYPE

public static final int HANGUL_TYPE
See Also:
Constant Field Values
Constructor Detail

StandardTokenizerImpl

public StandardTokenizerImpl(Reader in)
Creates a new scanner There is also a java.io.InputStream version of this constructor.

Parameters:
in - the java.io.Reader to read input from.

StandardTokenizerImpl

public StandardTokenizerImpl(InputStream in)
Creates a new scanner. There is also java.io.Reader version of this constructor.

Parameters:
in - the java.io.Inputstream to read input from.
Method Detail

yychar

public final int yychar()
Description copied from interface: StandardTokenizerInterface
Returns the current position.

Specified by:
yychar in interface StandardTokenizerInterface

getText

public final void getText(CharTermAttribute t)
Fills CharTermAttribute with the current token text.

Specified by:
getText in interface StandardTokenizerInterface

yyclose

public final void yyclose()
                   throws IOException
Closes the input stream.

Throws:
IOException

yyreset

public final void yyreset(Reader reader)
Resets the scanner to read from a new input stream. Does not close the old reader. All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to ZZ_INITIAL. Internal scan buffer is resized down to its initial length, if it has grown.

Specified by:
yyreset in interface StandardTokenizerInterface
Parameters:
reader - the new input stream

yystate

public final int yystate()
Returns the current lexical state.

yybegin

public final void yybegin(int newState)
Enters a new lexical state

Parameters:
newState - the new lexical state

yytext

public final String yytext()
Returns the text matched by the current regular expression.

yycharat

public final char yycharat(int pos)
Returns the character at position pos from the matched text. It is equivalent to yytext().charAt(pos), but faster

Parameters:
pos - the position of the character to fetch. A value from 0 to yylength()-1.
Returns:
the character at position pos

yylength

public final int yylength()
Returns the length of the matched text region.

Specified by:
yylength in interface StandardTokenizerInterface

yypushback

public void yypushback(int number)
Pushes the specified amount of characters back into the input stream. They will be read again by then next call of the scanning method

Parameters:
number - the number of characters to be read again. This number must not be greater than yylength()!

getNextToken

public int getNextToken()
                 throws IOException
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.

Specified by:
getNextToken in interface StandardTokenizerInterface
Returns:
the next token
Throws:
IOException - if any I/O-Error occurs
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardTokenizerInterface

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.standard
Interface StandardTokenizerInterface

All Known Implementing Classes:
StandardTokenizerImpl, StandardTokenizerImpl31, UAX29URLEmailTokenizerImpl, UAX29URLEmailTokenizerImpl31, UAX29URLEmailTokenizerImpl34
public interface StandardTokenizerInterface

Internal interface for supporting versioned grammars.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
static int YYEOF
This character denotes the end of file
Method Summary
int | getNextToken() Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
void | getText(CharTermAttribute t) Copies the matched text into the CharTermAttribute
int | yychar() Returns the current position.
int | yylength() Returns the length of the matched text region.
void | yyreset(Reader reader) Resets the scanner to read from a new input stream.

Field Detail

YYEOF

static final int YYEOF
This character denotes the end of file

See Also:
Constant Field Values
Method Detail

getText

void getText(CharTermAttribute t)
Copies the matched text into the CharTermAttribute

yychar

int yychar()
Returns the current position.

yyreset

void yyreset(Reader reader)
Resets the scanner to read from a new input stream. Does not close the old reader. All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to ZZ_INITIAL.

Parameters:
reader - the new input stream

yylength

int yylength()
Returns the length of the matched text region.

getNextToken

int getNextToken()
                 throws IOException
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.

Returns:
the next token, YYEOF on end of stream
Throws:
IOException - if any I/O-Error occurs
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UAX29URLEmailAnalyzer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.standard
Class UAX29URLEmailAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.standard.UAX29URLEmailAnalyzer
All Implemented Interfaces:
Closeable
public final class UAX29URLEmailAnalyzer
extends StopwordAnalyzerBase

Filters UAX29URLEmailTokenizer with StandardFilter, LowerCaseFilter and StopFilter, using a list of English stop words.

You must specify the required Version compatibility when creating UAX29URLEmailAnalyzer

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static int | DEFAULT_MAX_TOKEN_LENGTH Default maximum allowed token length
static Set<?> | STOP_WORDS_SET An unmodifiable set containing some common English words that are usually not useful for searching.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
UAX29URLEmailAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (STOP_WORDS_SET).
UAX29URLEmailAnalyzer(Version matchVersion, Reader stopwords)
Builds an analyzer with the stop words from the given reader.
UAX29URLEmailAnalyzer(Version matchVersion, Set<?> stopWords)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.
int | getMaxTokenLength()
void | setMaxTokenLength(int length) Set maximum allowed token length.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_MAX_TOKEN_LENGTH

public static final int DEFAULT_MAX_TOKEN_LENGTH
Default maximum allowed token length

See Also:
Constant Field Values

STOP_WORDS_SET

public static final Set<?> STOP_WORDS_SET
An unmodifiable set containing some common English words that are usually not useful for searching.

Constructor Detail

UAX29URLEmailAnalyzer

public UAX29URLEmailAnalyzer(Version matchVersion,
                             Set<?> stopWords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - Lucene version to match See above
stopWords - stop words

UAX29URLEmailAnalyzer

public UAX29URLEmailAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (STOP_WORDS_SET).

Parameters:
matchVersion - Lucene version to match See above

UAX29URLEmailAnalyzer

public UAX29URLEmailAnalyzer(Version matchVersion,
                             Reader stopwords)
                      throws IOException
Builds an analyzer with the stop words from the given reader.

Parameters:
matchVersion - Lucene version to match See above
stopwords - Reader to read stop words from
Throws:
IOException
See Also:
WordlistLoader.getWordSet(java.io.Reader, org.apache.lucene.util.Version)
Method Detail

setMaxTokenLength

public void setMaxTokenLength(int length)
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.

getMaxTokenLength

public int getMaxTokenLength()
See Also:
setMaxTokenLength(int)

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Description copied from class: ReusableAnalyzerBase
Creates a new ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
the ReusableAnalyzerBase.TokenStreamComponents for this analyzer.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UAX29URLEmailTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.standard
Class UAX29URLEmailTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer
All Implemented Interfaces:
Closeable
public final class UAX29URLEmailTokenizer
extends Tokenizer

This class implements Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29 URLs and email addresses are also tokenized according to the relevant RFCs.

Tokens produced are of the following types:

  • <ALPHANUM>: A sequence of alphabetic and numeric characters
  • <NUM>: A number
  • <URL>: A URL
  • <EMAIL>: An email address
  • <SOUTHEAST_ASIAN>: A sequence of characters from South and Southeast Asian languages, including Thai, Lao, Myanmar, and Khmer
  • <IDEOGRAPHIC>: A single CJKV ideographic character
  • <HIRAGANA>: A single hiragana character

You must specify the required Version compatibility when creating UAX29URLEmailTokenizer:

  • As of 3.4, Hiragana and Han characters are no longer wrongly split from their combining characters. If you use a previous version number, you get the exact broken behavior for backwards compatibility.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static int | ALPHANUM
static int | EMAIL
static String | EMAIL_TYPE Deprecated. use TOKEN_TYPES instead
static int | HANGUL
static String | HANGUL_TYPE Deprecated. use TOKEN_TYPES instead
static int | HIRAGANA
static String | HIRAGANA_TYPE Deprecated. use TOKEN_TYPES instead
static int | IDEOGRAPHIC
static String | IDEOGRAPHIC_TYPE Deprecated. use TOKEN_TYPES instead
static int | KATAKANA
static String | KATAKANA_TYPE Deprecated. use TOKEN_TYPES instead
static int | NUM
static String | NUMERIC_TYPE Deprecated. use TOKEN_TYPES instead
static String | SOUTH_EAST_ASIAN_TYPE Deprecated. use TOKEN_TYPES instead
static int | SOUTHEAST_ASIAN
static String[] | TOKEN_TYPES String token types that correspond to token type int constants
static int | URL
static String | URL_TYPE Deprecated. use TOKEN_TYPES instead
static String | WORD_TYPE Deprecated. use TOKEN_TYPES instead
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
UAX29URLEmailTokenizer(AttributeSource.AttributeFactory factory, Reader input)
Deprecated. use UAX29URLEmailTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead.
UAX29URLEmailTokenizer(AttributeSource source, Reader input)
Deprecated. use UAX29URLEmailTokenizer(Version, AttributeSource, Reader) instead.
UAX29URLEmailTokenizer(InputStream input)
Deprecated. use UAX29URLEmailTokenizer(Version, Reader) instead.
UAX29URLEmailTokenizer(Reader input)
Deprecated. use UAX29URLEmailTokenizer(Version, Reader) instead.
UAX29URLEmailTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader input)
Creates a new UAX29URLEmailTokenizer with a given AttributeSource.AttributeFactory
UAX29URLEmailTokenizer(Version matchVersion, AttributeSource source, Reader input)
Creates a new UAX29URLEmailTokenizer with a given AttributeSource.
UAX29URLEmailTokenizer(Version matchVersion, Reader input)
Creates a new instance of the UAX29URLEmailTokenizer.
Method Summary
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 int getMaxTokenLength()
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset(Reader reader)
Expert: Reset the tokenizer to a new reader.
 void setMaxTokenLength(int length)
Set the max allowed token length.
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.analysis.TokenStream
reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

ALPHANUM

public static final int ALPHANUM
See Also:
Constant Field Values

NUM

public static final int NUM
See Also:
Constant Field Values

SOUTHEAST_ASIAN

public static final int SOUTHEAST_ASIAN
See Also:
Constant Field Values

IDEOGRAPHIC

public static final int IDEOGRAPHIC
See Also:
Constant Field Values

HIRAGANA

public static final int HIRAGANA
See Also:
Constant Field Values

KATAKANA

public static final int KATAKANA
See Also:
Constant Field Values

HANGUL

public static final int HANGUL
See Also:
Constant Field Values

URL

public static final int URL
See Also:
Constant Field Values

EMAIL

public static final int EMAIL
See Also:
Constant Field Values

TOKEN_TYPES

public static final String[] TOKEN_TYPES
String token types that correspond to token type int constants

WORD_TYPE

@Deprecated
public static final String WORD_TYPE
Deprecated. use TOKEN_TYPES instead
Alphanumeric sequences

NUMERIC_TYPE

@Deprecated
public static final String NUMERIC_TYPE
Deprecated. use TOKEN_TYPES instead
Numbers

URL_TYPE

@Deprecated
public static final String URL_TYPE
Deprecated. use TOKEN_TYPES instead
URLs with scheme: HTTP(S), FTP, or FILE; no-scheme URLs match HTTP syntax

EMAIL_TYPE

@Deprecated
public static final String EMAIL_TYPE
Deprecated. use TOKEN_TYPES instead
E-mail addresses

SOUTH_EAST_ASIAN_TYPE

@Deprecated
public static final String SOUTH_EAST_ASIAN_TYPE
Deprecated. use TOKEN_TYPES instead
Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.). Sequences of these are kept together as as a single token rather than broken up, because the logic required to break them at word boundaries is too complex for UAX#29.

See Unicode Line Breaking Algorithm: http://www.unicode.org/reports/tr14/#SA

IDEOGRAPHIC_TYPE

@Deprecated
public static final String IDEOGRAPHIC_TYPE
Deprecated. use TOKEN_TYPES instead

HIRAGANA_TYPE

@Deprecated
public static final String HIRAGANA_TYPE
Deprecated. use TOKEN_TYPES instead

KATAKANA_TYPE

@Deprecated
public static final String KATAKANA_TYPE
Deprecated. use TOKEN_TYPES instead

HANGUL_TYPE

@Deprecated
public static final String HANGUL_TYPE
Deprecated. use TOKEN_TYPES instead
Constructor Detail

UAX29URLEmailTokenizer

@Deprecated
public UAX29URLEmailTokenizer(Reader input)
Deprecated. use UAX29URLEmailTokenizer(Version, Reader) instead.

UAX29URLEmailTokenizer

@Deprecated
public UAX29URLEmailTokenizer(InputStream input)
Deprecated. use UAX29URLEmailTokenizer(Version, Reader) instead.

UAX29URLEmailTokenizer

@Deprecated
public UAX29URLEmailTokenizer(AttributeSource source,
                                         Reader input)
Deprecated. use UAX29URLEmailTokenizer(Version, AttributeSource, Reader) instead.

UAX29URLEmailTokenizer

@Deprecated
public UAX29URLEmailTokenizer(AttributeSource.AttributeFactory factory,
                                         Reader input)
Deprecated. use UAX29URLEmailTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead.

UAX29URLEmailTokenizer

public UAX29URLEmailTokenizer(Version matchVersion,
                              Reader input)
Creates a new instance of the UAX29URLEmailTokenizer. Attaches the input to the newly created JFlex scanner.

Parameters:
input - The input reader

UAX29URLEmailTokenizer

public UAX29URLEmailTokenizer(Version matchVersion,
                              AttributeSource source,
                              Reader input)
Creates a new UAX29URLEmailTokenizer with a given AttributeSource.

UAX29URLEmailTokenizer

public UAX29URLEmailTokenizer(Version matchVersion,
                              AttributeSource.AttributeFactory factory,
                              Reader input)
Creates a new UAX29URLEmailTokenizer with a given AttributeSource.AttributeFactory

Method Detail

setMaxTokenLength

public void setMaxTokenLength(int length)
Set the max allowed token length. Any token longer than this is skipped.

getMaxTokenLength

public int getMaxTokenLength()
See Also:
setMaxTokenLength(int)

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

end

public final void end()
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream

reset

public void reset(Reader reader)
           throws IOException
Description copied from class: Tokenizer
Expert: Reset the tokenizer to a new reader. Typically, an analyzer (in its reusableTokenStream method) will use this to re-use a previously created tokenizer.

Overrides:
reset in class Tokenizer
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UAX29URLEmailTokenizerImpl

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.standard
Class UAX29URLEmailTokenizerImpl

java.lang.Object
    extended by  org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl
All Implemented Interfaces:
StandardTokenizerInterface
public final class UAX29URLEmailTokenizerImpl
extends Object
implements StandardTokenizerInterface

This class implements Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29 URLs and email addresses are also tokenized according to the relevant RFCs.

Tokens produced are of the following types:

  • <ALPHANUM>: A sequence of alphabetic and numeric characters
  • <NUM>: A number
  • <URL>: A URL
  • <EMAIL>: An email address
  • <SOUTHEAST_ASIAN>: A sequence of characters from South and Southeast Asian languages, including Thai, Lao, Myanmar, and Khmer
  • <IDEOGRAPHIC>: A single CJKV ideographic character
  • <HIRAGANA>: A single hiragana character

Field Summary
static int | EMAIL_TYPE
static int | HANGUL_TYPE
static int | HIRAGANA_TYPE
static int | IDEOGRAPHIC_TYPE
static int | KATAKANA_TYPE
static int | NUMERIC_TYPE Numbers
static int | SOUTH_EAST_ASIAN_TYPE Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.).
static int | URL_TYPE
static int | WORD_TYPE Alphanumeric sequences
static int | YYEOF This character denotes the end of file
static int | YYINITIAL lexical states
Constructor Summary
UAX29URLEmailTokenizerImpl(InputStream in)
Creates a new scanner.
UAX29URLEmailTokenizerImpl(Reader in)
Creates a new scanner There is also a java.io.InputStream version of this constructor.
Method Summary
int | getNextToken() Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
void | getText(CharTermAttribute t) Fills CharTermAttribute with the current token text.
void | yybegin(int newState) Enters a new lexical state
int | yychar() Returns the current position.
char | yycharat(int pos) Returns the character at position pos from the matched text.
void | yyclose() Closes the input stream.
int | yylength() Returns the length of the matched text region.
void | yypushback(int number) Pushes the specified amount of characters back into the input stream.
void | yyreset(Reader reader) Resets the scanner to read from a new input stream.
int | yystate() Returns the current lexical state.
String | yytext() Returns the text matched by the current regular expression.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

YYEOF

public static final int YYEOF
This character denotes the end of file

See Also:
Constant Field Values

YYINITIAL

public static final int YYINITIAL
lexical states

See Also:
Constant Field Values

WORD_TYPE

public static final int WORD_TYPE
Alphanumeric sequences

See Also:
Constant Field Values

NUMERIC_TYPE

public static final int NUMERIC_TYPE
Numbers

See Also:
Constant Field Values

SOUTH_EAST_ASIAN_TYPE

public static final int SOUTH_EAST_ASIAN_TYPE
Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.). Sequences of these are kept together as as a single token rather than broken up, because the logic required to break them at word boundaries is too complex for UAX#29.

See Unicode Line Breaking Algorithm: http://www.unicode.org/reports/tr14/#SA

See Also:
Constant Field Values

IDEOGRAPHIC_TYPE

public static final int IDEOGRAPHIC_TYPE
See Also:
Constant Field Values

HIRAGANA_TYPE

public static final int HIRAGANA_TYPE
See Also:
Constant Field Values

KATAKANA_TYPE

public static final int KATAKANA_TYPE
See Also:
Constant Field Values

HANGUL_TYPE

public static final int HANGUL_TYPE
See Also:
Constant Field Values

EMAIL_TYPE

public static final int EMAIL_TYPE
See Also:
Constant Field Values

URL_TYPE

public static final int URL_TYPE
See Also:
Constant Field Values
Constructor Detail

UAX29URLEmailTokenizerImpl

public UAX29URLEmailTokenizerImpl(Reader in)
Creates a new scanner There is also a java.io.InputStream version of this constructor.

Parameters:
in - the java.io.Reader to read input from.

UAX29URLEmailTokenizerImpl

public UAX29URLEmailTokenizerImpl(InputStream in)
Creates a new scanner. There is also java.io.Reader version of this constructor.

Parameters:
in - the java.io.Inputstream to read input from.
Method Detail

yychar

public final int yychar()
Description copied from interface: StandardTokenizerInterface
Returns the current position.

Specified by:
yychar in interface StandardTokenizerInterface

getText

public final void getText(CharTermAttribute t)
Fills CharTermAttribute with the current token text.

Specified by:
getText in interface StandardTokenizerInterface

yyclose

public final void yyclose()
                   throws IOException
Closes the input stream.

Throws:
IOException

yyreset

public final void yyreset(Reader reader)
Resets the scanner to read from a new input stream. Does not close the old reader. All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to ZZ_INITIAL. Internal scan buffer is resized down to its initial length, if it has grown.

Specified by:
yyreset in interface StandardTokenizerInterface
Parameters:
reader - the new input stream

yystate

public final int yystate()
Returns the current lexical state.

yybegin

public final void yybegin(int newState)
Enters a new lexical state

Parameters:
newState - the new lexical state

yytext

public final String yytext()
Returns the text matched by the current regular expression.

yycharat

public final char yycharat(int pos)
Returns the character at position pos from the matched text. It is equivalent to yytext().charAt(pos), but faster

Parameters:
pos - the position of the character to fetch. A value from 0 to yylength()-1.
Returns:
the character at position pos

yylength

public final int yylength()
Returns the length of the matched text region.

Specified by:
yylength in interface StandardTokenizerInterface

yypushback

public void yypushback(int number)
Pushes the specified amount of characters back into the input stream. They will be read again by then next call of the scanning method

Parameters:
number - the number of characters to be read again. This number must not be greater than yylength()!

getNextToken

public int getNextToken()
                 throws IOException
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.

Specified by:
getNextToken in interface StandardTokenizerInterface
Returns:
the next token
Throws:
IOException - if any I/O-Error occurs
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.standard.ClassicAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.standard.ClassicAnalyzer

No usage of org.apache.lucene.analysis.standard.ClassicAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.standard.ClassicFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.standard.ClassicFilter

No usage of org.apache.lucene.analysis.standard.ClassicFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.standard.ClassicTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.standard.ClassicTokenizer

No usage of org.apache.lucene.analysis.standard.ClassicTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.standard.StandardAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.standard.StandardAnalyzer

No usage of org.apache.lucene.analysis.standard.StandardAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.standard.StandardFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.standard.StandardFilter

No usage of org.apache.lucene.analysis.standard.StandardFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.standard.StandardTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.standard.StandardTokenizer

No usage of org.apache.lucene.analysis.standard.StandardTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.standard.StandardTokenizerImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.standard.StandardTokenizerImpl

No usage of org.apache.lucene.analysis.standard.StandardTokenizerImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.standard.StandardTokenizerInterface

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.standard.StandardTokenizerInterface

Packages that use StandardTokenizerInterface
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.standard.std31 | Backwards-compatible implementation to match Version.LUCENE_31
org.apache.lucene.analysis.standard.std34 | Backwards-compatible implementation to match Version.LUCENE_34

Uses of StandardTokenizerInterface in org.apache.lucene.analysis.standard

Classes in org.apache.lucene.analysis.standard that implement StandardTokenizerInterface
class | StandardTokenizerImpl This class implements Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29 Tokens produced are of the following types: <ALPHANUM>: A sequence of alphabetic and numeric characters <NUM>: A number <SOUTHEAST_ASIAN>: A sequence of characters from South and Southeast Asian languages, including Thai, Lao, Myanmar, and Khmer <IDEOGRAPHIC>: A single CJKV ideographic character <HIRAGANA>: A single hiragana character
class | UAX29URLEmailTokenizerImpl This class implements Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29 URLs and email addresses are also tokenized according to the relevant RFCs.

Uses of StandardTokenizerInterface in org.apache.lucene.analysis.standard.std31

Classes in org.apache.lucene.analysis.standard.std31 that implement StandardTokenizerInterface
class | StandardTokenizerImpl31 Deprecated. This class is only for exact backwards compatibility
class | UAX29URLEmailTokenizerImpl31 Deprecated. This class is only for exact backwards compatibility

Uses of StandardTokenizerInterface in org.apache.lucene.analysis.standard.std34

Classes in org.apache.lucene.analysis.standard.std34 that implement StandardTokenizerInterface
 class UAX29URLEmailTokenizerImpl34
Deprecated. This class is only for exact backwards compatibility

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.standard.UAX29URLEmailAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.standard.UAX29URLEmailAnalyzer

No usage of org.apache.lucene.analysis.standard.UAX29URLEmailAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

No usage of org.apache.lucene.analysis.standard.UAX29URLEmailTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl

No usage of org.apache.lucene.analysis.standard.UAX29URLEmailTokenizerImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.standard.std31
Classes
StandardTokenizerImpl31
UAX29URLEmailTokenizerImpl31


org.apache.lucene.analysis.standard.std31

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.standard.std31

Backwards-compatible implementation to match Version.LUCENE_31

See:
Description

Class Summary
StandardTokenizerImpl31 | Deprecated. This class is only for exact backwards compatibility
UAX29URLEmailTokenizerImpl31 | Deprecated. This class is only for exact backwards compatibility

Package org.apache.lucene.analysis.standard.std31 Description

Backwards-compatible implementation to match Version.LUCENE_31


org.apache.lucene.analysis.standard.std31 Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.standard.std31

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31 (implements org.apache.lucene.analysis.standard.StandardTokenizerInterface)
    • org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31 (implements org.apache.lucene.analysis.standard.StandardTokenizerInterface)


Uses of Package org.apache.lucene.analysis.standard.std31

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.standard.std31

No usage of org.apache.lucene.analysis.standard.std31

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


StandardTokenizerImpl31

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.standard.std31
Class StandardTokenizerImpl31

java.lang.Object
    extended by  org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31
All Implemented Interfaces:
StandardTokenizerInterface
Deprecated. This class is only for exact backwards compatibility

@Deprecated
public final class StandardTokenizerImpl31
extends Object
implements StandardTokenizerInterface

This class implements StandardTokenizer, except with a bug (https://issues.apache.org/jira/browse/LUCENE-3358) where Han and Hiragana characters would be split from combining characters:

Field Summary
static int | HANGUL_TYPE Deprecated.
static int | HIRAGANA_TYPE Deprecated.
static int | IDEOGRAPHIC_TYPE Deprecated.
static int | KATAKANA_TYPE Deprecated.
static int | NUMERIC_TYPE Deprecated. Numbers
static int | SOUTH_EAST_ASIAN_TYPE Deprecated. Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.).
static int | WORD_TYPE Deprecated. Alphanumeric sequences
static int | YYEOF Deprecated. This character denotes the end of file
static int | YYINITIAL Deprecated. lexical states
Constructor Summary
StandardTokenizerImpl31(InputStream in)
Deprecated. Creates a new scanner.
StandardTokenizerImpl31(Reader in)
Deprecated. Creates a new scanner There is also a java.io.InputStream version of this constructor.
Method Summary
int | getNextToken() Deprecated. Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
void | getText(CharTermAttribute t) Deprecated. Fills CharTermAttribute with the current token text.
void | yybegin(int newState) Deprecated. Enters a new lexical state
int | yychar() Deprecated. Returns the current position.
char | yycharat(int pos) Deprecated. Returns the character at position pos from the matched text.
void | yyclose() Deprecated. Closes the input stream.
int | yylength() Deprecated. Returns the length of the matched text region.
void | yypushback(int number) Deprecated. Pushes the specified amount of characters back into the input stream.
void | yyreset(Reader reader) Deprecated. Resets the scanner to read from a new input stream.
int | yystate() Deprecated. Returns the current lexical state.
String | yytext() Deprecated. Returns the text matched by the current regular expression.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

YYEOF

public static final int YYEOF
Deprecated.
This character denotes the end of file

See Also:
Constant Field Values

YYINITIAL

public static final int YYINITIAL
Deprecated.
lexical states

See Also:
Constant Field Values

WORD_TYPE

public static final int WORD_TYPE
Deprecated.
Alphanumeric sequences

See Also:
Constant Field Values

NUMERIC_TYPE

public static final int NUMERIC_TYPE
Deprecated.
Numbers

See Also:
Constant Field Values

SOUTH_EAST_ASIAN_TYPE

public static final int SOUTH_EAST_ASIAN_TYPE
Deprecated.
Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.). Sequences of these are kept together as as a single token rather than broken up, because the logic required to break them at word boundaries is too complex for UAX#29.

See Unicode Line Breaking Algorithm: http://www.unicode.org/reports/tr14/#SA

See Also:
Constant Field Values

IDEOGRAPHIC_TYPE

public static final int IDEOGRAPHIC_TYPE
Deprecated.
See Also:
Constant Field Values

HIRAGANA_TYPE

public static final int HIRAGANA_TYPE
Deprecated.
See Also:
Constant Field Values

KATAKANA_TYPE

public static final int KATAKANA_TYPE
Deprecated.
See Also:
Constant Field Values

HANGUL_TYPE

public static final int HANGUL_TYPE
Deprecated.
See Also:
Constant Field Values
Constructor Detail

StandardTokenizerImpl31

public StandardTokenizerImpl31(Reader in)
Deprecated.
Creates a new scanner There is also a java.io.InputStream version of this constructor.

Parameters:
in - the java.io.Reader to read input from.

StandardTokenizerImpl31

public StandardTokenizerImpl31(InputStream in)
Deprecated.
Creates a new scanner. There is also java.io.Reader version of this constructor.

Parameters:
in - the java.io.Inputstream to read input from.
Method Detail

yychar

public final int yychar()
Deprecated.
Description copied from interface: StandardTokenizerInterface
Returns the current position.

Specified by:
yychar in interface StandardTokenizerInterface

getText

public final void getText(CharTermAttribute t)
Deprecated.
Fills CharTermAttribute with the current token text.

Specified by:
getText in interface StandardTokenizerInterface

yyclose

public final void yyclose()
                   throws IOException
Deprecated.
Closes the input stream.

Throws:
IOException

yyreset

public final void yyreset(Reader reader)
Deprecated.
Resets the scanner to read from a new input stream. Does not close the old reader. All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to ZZ_INITIAL. Internal scan buffer is resized down to its initial length, if it has grown.

Specified by:
yyreset in interface StandardTokenizerInterface
Parameters:
reader - the new input stream

yystate

public final int yystate()
Deprecated.
Returns the current lexical state.

yybegin

public final void yybegin(int newState)
Deprecated.
Enters a new lexical state

Parameters:
newState - the new lexical state

yytext

public final String yytext()
Deprecated.
Returns the text matched by the current regular expression.

yycharat

public final char yycharat(int pos)
Deprecated.
Returns the character at position pos from the matched text. It is equivalent to yytext().charAt(pos), but faster

Parameters:
pos - the position of the character to fetch. A value from 0 to yylength()-1.
Returns:
the character at position pos

yylength

public final int yylength()
Deprecated.
Returns the length of the matched text region.

Specified by:
yylength in interface StandardTokenizerInterface

yypushback

public void yypushback(int number)
Deprecated.
Pushes the specified amount of characters back into the input stream. They will be read again by then next call of the scanning method

Parameters:
number - the number of characters to be read again. This number must not be greater than yylength()!

getNextToken

public int getNextToken()
                 throws IOException
Deprecated.
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.

Specified by:
getNextToken in interface StandardTokenizerInterface
Returns:
the next token
Throws:
IOException - if any I/O-Error occurs
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


UAX29URLEmailTokenizerImpl31

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.standard.std31
Class UAX29URLEmailTokenizerImpl31

java.lang.Object
    extended by  org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31
All Implemented Interfaces:
StandardTokenizerInterface
Deprecated. This class is only for exact backwards compatibility

@Deprecated
public final class UAX29URLEmailTokenizerImpl31
extends Object
implements StandardTokenizerInterface

This class implements UAX29URLEmailTokenizer, except with a bug (https://issues.apache.org/jira/browse/LUCENE-3358) where Han and Hiragana characters would be split from combining characters:

Field Summary
static int | EMAIL_TYPE Deprecated.
static int | HANGUL_TYPE Deprecated.
static int | HIRAGANA_TYPE Deprecated.
static int | IDEOGRAPHIC_TYPE Deprecated.
static int | KATAKANA_TYPE Deprecated.
static int | NUMERIC_TYPE Deprecated. Numbers
static int | SOUTH_EAST_ASIAN_TYPE Deprecated. Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.).
static int | URL_TYPE Deprecated.
static int | WORD_TYPE Deprecated. Alphanumeric sequences
static int | YYEOF Deprecated. This character denotes the end of file
static int | YYINITIAL Deprecated. lexical states
Constructor Summary
UAX29URLEmailTokenizerImpl31(InputStream in)
Deprecated. Creates a new scanner.
UAX29URLEmailTokenizerImpl31(Reader in)
Deprecated. Creates a new scanner There is also a java.io.InputStream version of this constructor.
Method Summary
int | getNextToken() Deprecated. Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
void | getText(CharTermAttribute t) Deprecated. Fills CharTermAttribute with the current token text.
void | yybegin(int newState) Deprecated. Enters a new lexical state
int | yychar() Deprecated. Returns the current position.
char | yycharat(int pos) Deprecated. Returns the character at position pos from the matched text.
void | yyclose() Deprecated. Closes the input stream.
int | yylength() Deprecated. Returns the length of the matched text region.
void | yypushback(int number) Deprecated. Pushes the specified amount of characters back into the input stream.
void | yyreset(Reader reader) Deprecated. Resets the scanner to read from a new input stream.
int | yystate() Deprecated. Returns the current lexical state.
String | yytext() Deprecated. Returns the text matched by the current regular expression.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

YYEOF

public static final int YYEOF
Deprecated.
This character denotes the end of file

See Also:
Constant Field Values

YYINITIAL

public static final int YYINITIAL
Deprecated.
lexical states

See Also:
Constant Field Values

WORD_TYPE

public static final int WORD_TYPE
Deprecated.
Alphanumeric sequences

See Also:
Constant Field Values

NUMERIC_TYPE

public static final int NUMERIC_TYPE
Deprecated.
Numbers

See Also:
Constant Field Values

SOUTH_EAST_ASIAN_TYPE

public static final int SOUTH_EAST_ASIAN_TYPE
Deprecated.
Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.). Sequences of these are kept together as as a single token rather than broken up, because the logic required to break them at word boundaries is too complex for UAX#29.

See Unicode Line Breaking Algorithm: http://www.unicode.org/reports/tr14/#SA

See Also:
Constant Field Values

IDEOGRAPHIC_TYPE

public static final int IDEOGRAPHIC_TYPE
Deprecated.
See Also:
Constant Field Values

HIRAGANA_TYPE

public static final int HIRAGANA_TYPE
Deprecated.
See Also:
Constant Field Values

KATAKANA_TYPE

public static final int KATAKANA_TYPE
Deprecated.
See Also:
Constant Field Values

HANGUL_TYPE

public static final int HANGUL_TYPE
Deprecated.
See Also:
Constant Field Values

EMAIL_TYPE

public static final int EMAIL_TYPE
Deprecated.
See Also:
Constant Field Values

URL_TYPE

public static final int URL_TYPE
Deprecated.
See Also:
Constant Field Values
Constructor Detail

UAX29URLEmailTokenizerImpl31

public UAX29URLEmailTokenizerImpl31(Reader in)
Deprecated.
Creates a new scanner There is also a java.io.InputStream version of this constructor.

Parameters:
in - the java.io.Reader to read input from.

UAX29URLEmailTokenizerImpl31

public UAX29URLEmailTokenizerImpl31(InputStream in)
Deprecated.
Creates a new scanner. There is also java.io.Reader version of this constructor.

Parameters:
in - the java.io.Inputstream to read input from.
Method Detail

yychar

public final int yychar()
Deprecated.
Description copied from interface: StandardTokenizerInterface
Returns the current position.

Specified by:
yychar in interface StandardTokenizerInterface

getText

public final void getText(CharTermAttribute t)
Deprecated.
Fills CharTermAttribute with the current token text.

Specified by:
getText in interface StandardTokenizerInterface

yyclose

public final void yyclose()
                   throws IOException
Deprecated.
Closes the input stream.

Throws:
IOException

yyreset

public final void yyreset(Reader reader)
Deprecated.
Resets the scanner to read from a new input stream. Does not close the old reader. All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to ZZ_INITIAL. Internal scan buffer is resized down to its initial length, if it has grown.

Specified by:
yyreset in interface StandardTokenizerInterface
Parameters:
reader - the new input stream

yystate

public final int yystate()
Deprecated.
Returns the current lexical state.

yybegin

public final void yybegin(int newState)
Deprecated.
Enters a new lexical state

Parameters:
newState - the new lexical state

yytext

public final String yytext()
Deprecated.
Returns the text matched by the current regular expression.

yycharat

public final char yycharat(int pos)
Deprecated.
Returns the character at position pos from the matched text. It is equivalent to yytext().charAt(pos), but faster

Parameters:
pos - the position of the character to fetch. A value from 0 to yylength()-1.
Returns:
the character at position pos

yylength

public final int yylength()
Deprecated.
Returns the length of the matched text region.

Specified by:
yylength in interface StandardTokenizerInterface

yypushback

public void yypushback(int number)
Deprecated.
Pushes the specified amount of characters back into the input stream. They will be read again by then next call of the scanning method

Parameters:
number - the number of characters to be read again. This number must not be greater than yylength()!

getNextToken

public int getNextToken()
                 throws IOException
Deprecated.
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.

Specified by:
getNextToken in interface StandardTokenizerInterface
Returns:
the next token
Throws:
IOException - if any I/O-Error occurs
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31

No usage of org.apache.lucene.analysis.standard.std31.StandardTokenizerImpl31

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31

No usage of org.apache.lucene.analysis.standard.std31.UAX29URLEmailTokenizerImpl31

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.standard.std34
Classes
UAX29URLEmailTokenizerImpl34


org.apache.lucene.analysis.standard.std34

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.standard.std34

Backwards-compatible implementation to match Version.LUCENE_34

See:
Description

Class Summary
UAX29URLEmailTokenizerImpl34 Deprecated. This class is only for exact backwards compatibility

Package org.apache.lucene.analysis.standard.std34 Description

Backwards-compatible implementation to match Version.LUCENE_34


org.apache.lucene.analysis.standard.std34 Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.standard.std34

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34 (implements org.apache.lucene.analysis.standard.StandardTokenizerInterface)


Uses of Package org.apache.lucene.analysis.standard.std34

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.standard.std34

No usage of org.apache.lucene.analysis.standard.std34

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


UAX29URLEmailTokenizerImpl34

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.standard.std34
Class UAX29URLEmailTokenizerImpl34

java.lang.Object
    extended by  org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34
All Implemented Interfaces:
StandardTokenizerInterface
Deprecated. This class is only for exact backwards compatibility

@Deprecated
public final class UAX29URLEmailTokenizerImpl34
extends Object
implements StandardTokenizerInterface

This class implements UAX29URLEmailTokenizer, except with a bug (https://issues.apache.org/jira/browse/LUCENE-3880) where "mailto:" URI scheme prepended to an email address will disrupt recognition of the email address.

Field Summary
static int | EMAIL_TYPE Deprecated.
static int | HANGUL_TYPE Deprecated.
static int | HIRAGANA_TYPE Deprecated.
static int | IDEOGRAPHIC_TYPE Deprecated.
static int | KATAKANA_TYPE Deprecated.
static int | NUMERIC_TYPE Deprecated. Numbers
static int | SOUTH_EAST_ASIAN_TYPE Deprecated. Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.).
static int | URL_TYPE Deprecated.
static int | WORD_TYPE Deprecated. Alphanumeric sequences
static int | YYEOF Deprecated. This character denotes the end of file
static int | YYINITIAL Deprecated. lexical states
Constructor Summary
UAX29URLEmailTokenizerImpl34(InputStream in)
Deprecated. Creates a new scanner.
UAX29URLEmailTokenizerImpl34(Reader in)
Deprecated. Creates a new scanner There is also a java.io.InputStream version of this constructor.
Method Summary
int | getNextToken() Deprecated. Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
void | getText(CharTermAttribute t) Deprecated. Fills CharTermAttribute with the current token text.
void | yybegin(int newState) Deprecated. Enters a new lexical state
int | yychar() Deprecated. Returns the current position.
char | yycharat(int pos) Deprecated. Returns the character at position pos from the matched text.
void | yyclose() Deprecated. Closes the input stream.
int | yylength() Deprecated. Returns the length of the matched text region.
void | yypushback(int number) Deprecated. Pushes the specified amount of characters back into the input stream.
void | yyreset(Reader reader) Deprecated. Resets the scanner to read from a new input stream.
int | yystate() Deprecated. Returns the current lexical state.
String | yytext() Deprecated. Returns the text matched by the current regular expression.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

YYEOF

public static final int YYEOF
Deprecated.
This character denotes the end of file

See Also:
Constant Field Values

YYINITIAL

public static final int YYINITIAL
Deprecated.
lexical states

See Also:
Constant Field Values

WORD_TYPE

public static final int WORD_TYPE
Deprecated.
Alphanumeric sequences

See Also:
Constant Field Values

NUMERIC_TYPE

public static final int NUMERIC_TYPE
Deprecated.
Numbers

See Also:
Constant Field Values

SOUTH_EAST_ASIAN_TYPE

public static final int SOUTH_EAST_ASIAN_TYPE
Deprecated.
Chars in class \p{Line_Break = Complex_Context} are from South East Asian scripts (Thai, Lao, Myanmar, Khmer, etc.). Sequences of these are kept together as as a single token rather than broken up, because the logic required to break them at word boundaries is too complex for UAX#29.

See Unicode Line Breaking Algorithm: http://www.unicode.org/reports/tr14/#SA

See Also:
Constant Field Values

IDEOGRAPHIC_TYPE

public static final int IDEOGRAPHIC_TYPE
Deprecated.
See Also:
Constant Field Values

HIRAGANA_TYPE

public static final int HIRAGANA_TYPE
Deprecated.
See Also:
Constant Field Values

KATAKANA_TYPE

public static final int KATAKANA_TYPE
Deprecated.
See Also:
Constant Field Values

HANGUL_TYPE

public static final int HANGUL_TYPE
Deprecated.
See Also:
Constant Field Values

EMAIL_TYPE

public static final int EMAIL_TYPE
Deprecated.
See Also:
Constant Field Values

URL_TYPE

public static final int URL_TYPE
Deprecated.
See Also:
Constant Field Values
Constructor Detail

UAX29URLEmailTokenizerImpl34

public UAX29URLEmailTokenizerImpl34(Reader in)
Deprecated.
Creates a new scanner There is also a java.io.InputStream version of this constructor.

Parameters:
in - the java.io.Reader to read input from.

UAX29URLEmailTokenizerImpl34

public UAX29URLEmailTokenizerImpl34(InputStream in)
Deprecated.
Creates a new scanner. There is also java.io.Reader version of this constructor.

Parameters:
in - the java.io.Inputstream to read input from.
Method Detail

yychar

public final int yychar()
Deprecated.
Description copied from interface: StandardTokenizerInterface
Returns the current position.

Specified by:
yychar in interface StandardTokenizerInterface

getText

public final void getText(CharTermAttribute t)
Deprecated.
Fills CharTermAttribute with the current token text.

Specified by:
getText in interface StandardTokenizerInterface

yyclose

public final void yyclose()
                   throws IOException
Deprecated.
Closes the input stream.

Throws:
IOException

yyreset

public final void yyreset(Reader reader)
Deprecated.
Resets the scanner to read from a new input stream. Does not close the old reader. All internal variables are reset, the old input stream cannot be reused (internal buffer is discarded and lost). Lexical state is set to ZZ_INITIAL. Internal scan buffer is resized down to its initial length, if it has grown.

Specified by:
yyreset in interface StandardTokenizerInterface
Parameters:
reader - the new input stream

yystate

public final int yystate()
Deprecated.
Returns the current lexical state.

yybegin

public final void yybegin(int newState)
Deprecated.
Enters a new lexical state

Parameters:
newState - the new lexical state

yytext

public final String yytext()
Deprecated.
Returns the text matched by the current regular expression.

yycharat

public final char yycharat(int pos)
Deprecated.
Returns the character at position pos from the matched text. It is equivalent to yytext().charAt(pos), but faster

Parameters:
pos - the position of the character to fetch. A value from 0 to yylength()-1.
Returns:
the character at position pos

yylength

public final int yylength()
Deprecated.
Returns the length of the matched text region.

Specified by:
yylength in interface StandardTokenizerInterface

yypushback

public void yypushback(int number)
Deprecated.
Pushes the specified amount of characters back into the input stream. They will be read again by then next call of the scanning method

Parameters:
number - the number of characters to be read again. This number must not be greater than yylength()!

getNextToken

public int getNextToken()
                 throws IOException
Deprecated.
Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.

Specified by:
getNextToken in interface StandardTokenizerInterface
Returns:
the next token
Throws:
IOException - if any I/O-Error occurs
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34

No usage of org.apache.lucene.analysis.standard.std34.UAX29URLEmailTokenizerImpl34

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.stempel
Classes
StempelFilter
StempelStemmer


org.apache.lucene.analysis.stempel

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.stempel

Stempel: Algorithmic Stemmer

See:
Description

Class Summary
StempelFilter | Transforms the token stream as per the stemming algorithm.
StempelStemmer | Stemmer class is a convenient facade for other stemmer-related classes.

Package org.apache.lucene.analysis.stempel Description

Stempel: Algorithmic Stemmer


org.apache.lucene.analysis.stempel Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.stempel

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.stempel.StempelFilter
    • org.apache.lucene.analysis.stempel.StempelStemmer


Uses of Package org.apache.lucene.analysis.stempel

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.stempel

Packages that use org.apache.lucene.analysis.stempel
org.apache.lucene.analysis.stempel Stempel: Algorithmic Stemmer

Classes in org.apache.lucene.analysis.stempel used by org.apache.lucene.analysis.stempel
StempelStemmer
Stemmer class is a convenient facade for other stemmer-related classes.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


StempelFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.stempel
Class StempelFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.stempel.StempelFilter
All Implemented Interfaces:
Closeable
public final class StempelFilter
extends TokenFilter

Transforms the token stream as per the stemming algorithm.

Note: the input to the stemming filter must already be in lower case, so you will need to use LowerCaseFilter or LowerCaseTokenizer farther down the Tokenizer chain in order for this to work properly!

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static int DEFAULT_MIN_LENGTH
Minimum length of input words to be processed.
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
StempelFilter(TokenStream in, StempelStemmer stemmer)
Create filter using the supplied stemming table.
StempelFilter(TokenStream in, StempelStemmer stemmer, int minLength)
Create filter using the supplied stemming table.
Method Summary
 boolean incrementToken()
Returns the next input Token, after being stemmed
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_MIN_LENGTH

public static final int DEFAULT_MIN_LENGTH
Minimum length of input words to be processed. Shorter words are returned unchanged.

See Also:
Constant Field Values
Constructor Detail

StempelFilter

public StempelFilter(TokenStream in,
                     StempelStemmer stemmer)
Create filter using the supplied stemming table.

Parameters:
in - input token stream
stemmer - stemmer

StempelFilter

public StempelFilter(TokenStream in,
                     StempelStemmer stemmer,
                     int minLength)
Create filter using the supplied stemming table.

Parameters:
in - input token stream
stemmer - stemmer
minLength - For performance reasons words shorter than minLength characters are not processed, but simply returned.
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Returns the next input Token, after being stemmed

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


StempelStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.stempel
Class StempelStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.stempel.StempelStemmer

public class StempelStemmer
extends Object

Stemmer class is a convenient facade for other stemmer-related classes. The core stemming algorithm and its implementation is taken verbatim from the Egothor project ( www.egothor.org ).

Even though the stemmer tables supplied in the distribution package are built for Polish language, there is nothing language-specific here.

Constructor Summary
StempelStemmer(InputStream stemmerTable)
Create a Stemmer using selected stemmer table
StempelStemmer(Trie stemmer)
Create a Stemmer using pre-loaded stemmer table
Method Summary
static Trie | load(InputStream stemmerTable) Load a stemmer table from an inputstream.
StringBuilder | stem(CharSequence word) Stem a word.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StempelStemmer

public StempelStemmer(InputStream stemmerTable)
               throws IOException
Create a Stemmer using selected stemmer table

Parameters:
stemmerTable - stemmer table.
Throws:
IOException

StempelStemmer

public StempelStemmer(Trie stemmer)
Create a Stemmer using pre-loaded stemmer table

Parameters:
stemmer - pre-loaded stemmer table
Method Detail

load

public static Trie load(InputStream stemmerTable)
                 throws IOException
Load a stemmer table from an inputstream.

Throws:
IOException

stem

public StringBuilder stem(CharSequence word)
Stem a word.

Parameters:
word - input word to be stemmed.
Returns:
stemmed word, or null if the stem could not be generated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.stempel.StempelFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.stempel.StempelFilter

No usage of org.apache.lucene.analysis.stempel.StempelFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.stempel.StempelStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.stempel.StempelStemmer

Packages that use StempelStemmer
org.apache.lucene.analysis.stempel Stempel: Algorithmic Stemmer

Uses of StempelStemmer in org.apache.lucene.analysis.stempel

Constructors in org.apache.lucene.analysis.stempel with parameters of type StempelStemmer
StempelFilter(TokenStream in, StempelStemmer stemmer)
Create filter using the supplied stemming table.
StempelFilter(TokenStream in, StempelStemmer stemmer, int minLength)
Create filter using the supplied stemming table.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.sv
Classes
SwedishAnalyzer
SwedishLightStemFilter
SwedishLightStemmer


org.apache.lucene.analysis.sv

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.sv

Analyzer for Swedish.

See:
Description

Class Summary
SwedishAnalyzer | Analyzer for Swedish.
SwedishLightStemFilter | A TokenFilter that applies SwedishLightStemmer to stem Swedish words.
SwedishLightStemmer | Light Stemmer for Swedish.

Package org.apache.lucene.analysis.sv Description

Analyzer for Swedish.


org.apache.lucene.analysis.sv Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.sv

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.sv.SwedishAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.sv.SwedishLightStemFilter
    • org.apache.lucene.analysis.sv.SwedishLightStemmer


Uses of Package org.apache.lucene.analysis.sv

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.sv

No usage of org.apache.lucene.analysis.sv

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SwedishAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.sv
Class SwedishAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.sv.SwedishAnalyzer
All Implemented Interfaces:
Closeable
public final class SwedishAnalyzer
extends StopwordAnalyzerBase

Analyzer for Swedish.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Swedish stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
SwedishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
SwedishAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
SwedishAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Swedish stopwords.

See Also:
Constant Field Values
Constructor Detail

SwedishAnalyzer

public SwedishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

SwedishAnalyzer

public SwedishAnalyzer(Version matchVersion,
                       Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

SwedishAnalyzer

public SwedishAnalyzer(Version matchVersion,
                       Set<?> stopwords,
                       Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, LowerCaseFilter, StopFilter , KeywordMarkerFilter if a stem exclusion set is provided and SnowballFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


SwedishLightStemFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.sv
Class SwedishLightStemFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.sv.SwedishLightStemFilter
All Implemented Interfaces:
Closeable
public final class SwedishLightStemFilter
extends TokenFilter

A TokenFilter that applies SwedishLightStemmer to stem Swedish words.

To prevent terms from being stemmed use an instance of KeywordMarkerFilter or a custom TokenFilter that sets the KeywordAttribute before this TokenStream.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
SwedishLightStemFilter(TokenStream input)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SwedishLightStemFilter

public SwedishLightStemFilter(TokenStream input)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SwedishLightStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.sv
Class SwedishLightStemmer

java.lang.Object
    extended by  org.apache.lucene.analysis.sv.SwedishLightStemmer

public class SwedishLightStemmer
extends Object

Light Stemmer for Swedish.

This stemmer implements the algorithm described in: Report on CLEF-2003 Monolingual Tracks Jacques Savoy

Constructor Summary
SwedishLightStemmer()
Method Summary
 int stem(char[] s, int len)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SwedishLightStemmer

public SwedishLightStemmer()
Method Detail

stem

public int stem(char[] s,
                int len)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.sv.SwedishAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.sv.SwedishAnalyzer

No usage of org.apache.lucene.analysis.sv.SwedishAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.sv.SwedishLightStemFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.sv.SwedishLightStemFilter

No usage of org.apache.lucene.analysis.sv.SwedishLightStemFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.sv.SwedishLightStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.sv.SwedishLightStemmer

No usage of org.apache.lucene.analysis.sv.SwedishLightStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.synonym
Classes
SolrSynonymParser
SynonymFilter
SynonymMap
SynonymMap.Builder
WordnetSynonymParser


org.apache.lucene.analysis.synonym

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.synonym

Analysis components for Synonyms.

See:
Description

Class Summary
SolrSynonymParser | Parser for the Solr synonyms format.
SynonymFilter | Matches single or multi word synonyms in a token stream.
SynonymMap | A map of synonyms, keys and values are phrases.
SynonymMap.Builder | Builds an FSTSynonymMap.
WordnetSynonymParser | Parser for wordnet prolog format

Package org.apache.lucene.analysis.synonym Description

Analysis components for Synonyms.


org.apache.lucene.analysis.synonym Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.synonym

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.synonym.SynonymFilter
    • org.apache.lucene.analysis.synonym.SynonymMap
    • org.apache.lucene.analysis.synonym.SynonymMap.Builder
      • org.apache.lucene.analysis.synonym.SolrSynonymParser
      • org.apache.lucene.analysis.synonym.WordnetSynonymParser


Uses of Package org.apache.lucene.analysis.synonym

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.synonym

Packages that use org.apache.lucene.analysis.synonym
org.apache.lucene.analysis.synonym Analysis components for Synonyms.

Classes in org.apache.lucene.analysis.synonym used by org.apache.lucene.analysis.synonym
SynonymMap
A map of synonyms, keys and values are phrases.
SynonymMap.Builder
Builds an FSTSynonymMap.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SolrSynonymParser

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.synonym
Class SolrSynonymParser

java.lang.Object
    extended by  org.apache.lucene.analysis.synonym.SynonymMap.Builder
        extended by  org.apache.lucene.analysis.synonym.SolrSynonymParser

public class SolrSynonymParser
extends SynonymMap.Builder

Parser for the Solr synonyms format.

  1. Blank lines and lines starting with '#' are comments.
  2. Explicit mappings match any token sequence on the LHS of "=>" and replace with all alternatives on the RHS. These types of mappings ignore the expand parameter in the constructor. Example:
    i-pod, i pod => ipod
  3. Equivalent synonyms may be separated with commas and give no explicit mapping. In this case the mapping behavior will be taken from the expand parameter in the constructor. This allows the same synonym file to be used in different synonym handling strategies. Example:
    ipod, i-pod, i pod
  4. Multiple synonym mapping entries are merged. Example:
    foo => foo bar
    foo => baz

    is equivalent to

    foo => foo bar, baz

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
SolrSynonymParser(boolean dedup, boolean expand, Analyzer analyzer)
Method Summary
 void add(Reader in)
Methods inherited from class org.apache.lucene.analysis.synonym.SynonymMap.Builder
add, analyze, build, join
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SolrSynonymParser

public SolrSynonymParser(boolean dedup,
                         boolean expand,
                         Analyzer analyzer)
Method Detail

add

public void add(Reader in)
         throws IOException,
                ParseException
Throws:
IOException
ParseException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


SynonymFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.synonym
Class SynonymFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.synonym.SynonymFilter
All Implemented Interfaces:
Closeable
public final class SynonymFilter
extends TokenFilter

Matches single or multi word synonyms in a token stream. This token stream cannot properly handle position increments != 1, ie, you should place this filter before filtering out stop words.

Note that with the current implementation, parsing is greedy, so whenever multiple parses would apply, the rule starting the earliest and parsing the most tokens wins. For example if you have these rules:

   a -> x
   a b -> y
   b c d -> z
Then input a b c d e parses to y b c d, ie the 2nd rule "wins" because it started earliest and matched the most input tokens of other rules starting at that point.

A future improvement to this filter could allow non-greedy parsing, such that the 3rd rule would win, and also separately allow multiple parses, such that all 3 rules would match, perhaps even on a rule by rule basis.

NOTE: when a match occurs, the output tokens associated with the matching rule are "stacked" on top of the input stream (if the rule had keepOrig=true) and also on top of aother matched rule's output tokens. This is not a correct solution, as really the output should be an abitrary graph/lattice. For example, with the above match, you would expect an exact PhraseQuery "y b c" to match the parsed tokens, but it will fail to do so. This limitations is necessary because Lucene's TokenStream (and index) cannot yet represent an arbitrary graph.

NOTE: If multiple incoming tokens arrive on the same position, only the first token at that position is used for parsing. Subsequent tokens simply pass through and are not parsed. A future improvement would be to allow these tokens to also be matched.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static String TYPE_SYNONYM
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
SynonymFilter(TokenStream input, SynonymMap synonyms, boolean ignoreCase)
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

TYPE_SYNONYM

public static final String TYPE_SYNONYM
See Also:
Constant Field Values
Constructor Detail

SynonymFilter

public SynonymFilter(TokenStream input,
                     SynonymMap synonyms,
                     boolean ignoreCase)
Parameters:
input - input tokenstream
synonyms - synonym map
ignoreCase - case-folds input for matching with Character.toLowerCase(int). Note, if you set this to true, its your responsibility to lowercase the input entries when you create the SynonymMap
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SynonymMap.Builder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.synonym
Class SynonymMap.Builder

java.lang.Object
    extended by  org.apache.lucene.analysis.synonym.SynonymMap.Builder
Direct Known Subclasses:
SolrSynonymParser, WordnetSynonymParser
Enclosing class:
SynonymMap
public static class SynonymMap.Builder
extends Object

Builds an FSTSynonymMap.

Call add() until you have added all the mappings, then call build() to get an FSTSynonymMap

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
SynonymMap.Builder(boolean dedup)
If dedup is true then identical rules (same input, same output) will be added only once.
Method Summary
 void add(CharsRef input, CharsRef output, boolean includeOrig)
Add a phrase->phrase synonym mapping.
static CharsRef analyze(Analyzer analyzer, String text, CharsRef reuse)
Sugar: analyzes the text with the analyzer and separates by SynonymMap.WORD_SEPARATOR.
 SynonymMap build()
Builds an SynonymMap and returns it.
static CharsRef join(String[] words, CharsRef reuse)
Sugar: just joins the provided terms with SynonymMap.WORD_SEPARATOR.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SynonymMap.Builder

public SynonymMap.Builder(boolean dedup)
If dedup is true then identical rules (same input, same output) will be added only once.

Method Detail

join

public static CharsRef join(String[] words,
                            CharsRef reuse)
Sugar: just joins the provided terms with SynonymMap.WORD_SEPARATOR. reuse and its chars must not be null.

analyze

public static CharsRef analyze(Analyzer analyzer,
                               String text,
                               CharsRef reuse)
                        throws IOException
Sugar: analyzes the text with the analyzer and separates by SynonymMap.WORD_SEPARATOR. reuse and its chars must not be null.

Throws:
IOException

add

public void add(CharsRef input,
                CharsRef output,
                boolean includeOrig)
Add a phrase->phrase synonym mapping. Phrases are character sequences where words are separated with character zero (). Empty words (two s in a row) are not allowed in the input nor the output!

Parameters:
input - input phrase
output - output phrase
includeOrig - true if the original should be included

build

public SynonymMap build()
                 throws IOException
Builds an SynonymMap and returns it.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SynonymMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.synonym
Class SynonymMap

java.lang.Object
    extended by  org.apache.lucene.analysis.synonym.SynonymMap

public class SynonymMap
extends Object

A map of synonyms, keys and values are phrases.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class SynonymMap.Builder
Builds an FSTSynonymMap.
Field Summary
FST<BytesRef> | fst map>
int | maxHorizontalContext maxHorizontalContext: maximum context we need on the tokenstream
static char | WORD_SEPARATOR for multiword support, you must separate words with this separator
BytesRefHash | words map
Constructor Summary
SynonymMap(FST<BytesRef> fst, BytesRefHash words, int maxHorizontalContext)
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

WORD_SEPARATOR

public static final char WORD_SEPARATOR
for multiword support, you must separate words with this separator

See Also:
Constant Field Values

fst

public final FST<BytesRef> fst
map>

words

public final BytesRefHash words
map

maxHorizontalContext

public final int maxHorizontalContext
maxHorizontalContext: maximum context we need on the tokenstream

Constructor Detail

SynonymMap

public SynonymMap(FST<BytesRef> fst,
                  BytesRefHash words,
                  int maxHorizontalContext)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WordnetSynonymParser

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.synonym
Class WordnetSynonymParser

java.lang.Object
    extended by  org.apache.lucene.analysis.synonym.SynonymMap.Builder
        extended by  org.apache.lucene.analysis.synonym.WordnetSynonymParser

public class WordnetSynonymParser
extends SynonymMap.Builder

Parser for wordnet prolog format

See http://wordnet.princeton.edu/man/prologdb.5WN.html for a description of the format.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
WordnetSynonymParser(boolean dedup, boolean expand, Analyzer analyzer)
Method Summary
 void add(Reader in)
Methods inherited from class org.apache.lucene.analysis.synonym.SynonymMap.Builder
add, analyze, build, join
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WordnetSynonymParser

public WordnetSynonymParser(boolean dedup,
                            boolean expand,
                            Analyzer analyzer)
Method Detail

add

public void add(Reader in)
         throws IOException,
                ParseException
Throws:
IOException
ParseException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.synonym.SolrSynonymParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.synonym.SolrSynonymParser

No usage of org.apache.lucene.analysis.synonym.SolrSynonymParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.synonym.SynonymFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.synonym.SynonymFilter

No usage of org.apache.lucene.analysis.synonym.SynonymFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.synonym.SynonymMap.Builder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.synonym.SynonymMap.Builder

Packages that use SynonymMap.Builder
org.apache.lucene.analysis.synonym Analysis components for Synonyms.

Uses of SynonymMap.Builder in org.apache.lucene.analysis.synonym

Subclasses of SynonymMap.Builder in org.apache.lucene.analysis.synonym
class | SolrSynonymParser Parser for the Solr synonyms format.
class | WordnetSynonymParser Parser for wordnet prolog format

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.synonym.SynonymMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.synonym.SynonymMap

Packages that use SynonymMap
org.apache.lucene.analysis.synonym Analysis components for Synonyms.

Uses of SynonymMap in org.apache.lucene.analysis.synonym

Methods in org.apache.lucene.analysis.synonym that return SynonymMap
 SynonymMap SynonymMap.Builder.build()
Builds an SynonymMap and returns it.

Constructors in org.apache.lucene.analysis.synonym with parameters of type SynonymMap
SynonymFilter(TokenStream input, SynonymMap synonyms, boolean ignoreCase)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.synonym.WordnetSynonymParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.synonym.WordnetSynonymParser

No usage of org.apache.lucene.analysis.synonym.WordnetSynonymParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.th
Classes
ThaiAnalyzer
ThaiWordFilter


org.apache.lucene.analysis.th

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.th

Analyzer for Thai.

See:
Description

Class Summary
ThaiAnalyzer | Analyzer for Thai language.
ThaiWordFilter | TokenFilter that use BreakIterator to break each Token that is Thai into separate Token(s) for each Thai word.

Package org.apache.lucene.analysis.th Description

Analyzer for Thai.


org.apache.lucene.analysis.th Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.th

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.th.ThaiAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.th.ThaiWordFilter


Uses of Package org.apache.lucene.analysis.th

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.th

No usage of org.apache.lucene.analysis.th

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ThaiAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.th
Class ThaiAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.th.ThaiAnalyzer
All Implemented Interfaces:
Closeable
public final class ThaiAnalyzer
extends StopwordAnalyzerBase

Analyzer for Thai language. It uses BreakIterator to break words.

You must specify the required Version compatibility when creating ThaiAnalyzer:

  • As of 3.6, a set of Thai stopwords is used by default

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Thai stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
ThaiAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words.
ThaiAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Thai stopwords.

See Also:
Constant Field Values
Constructor Detail

ThaiAnalyzer

public ThaiAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words.

Parameters:
matchVersion - lucene compatibility version

ThaiAnalyzer

public ThaiAnalyzer(Version matchVersion,
                    Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates ReusableAnalyzerBase.TokenStreamComponents used to tokenize all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
ReusableAnalyzerBase.TokenStreamComponents built from a StandardTokenizer filtered with StandardFilter, LowerCaseFilter, ThaiWordFilter, and StopFilter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ThaiWordFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.th
Class ThaiWordFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.th.ThaiWordFilter
All Implemented Interfaces:
Closeable
public final class ThaiWordFilter
extends TokenFilter

TokenFilter that use BreakIterator to break each Token that is Thai into separate Token(s) for each Thai word.

Please note: Since matchVersion 3.1 on, this filter no longer lowercases non-thai text. ThaiAnalyzer will insert a LowerCaseFilter before this filter so the behaviour of the Analyzer does not change. With version 3.1, the filter handles position increments correctly.

WARNING: this filter may not be supported by all JREs. It is known to work with Sun/Oracle and Harmony JREs. If your application needs to be fully portable, consider using ICUTokenizer instead, which uses an ICU Thai BreakIterator that will always be available.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static boolean DBBI_AVAILABLE
True if the JRE supports a working dictionary-based breakiterator for Thai.
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ThaiWordFilter(TokenStream input)
Deprecated. Use the ctor with matchVersion instead!
ThaiWordFilter(Version matchVersion, TokenStream input)
Creates a new ThaiWordFilter with the specified match version.
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

DBBI_AVAILABLE

public static final boolean DBBI_AVAILABLE
True if the JRE supports a working dictionary-based breakiterator for Thai. If this is false, this filter will not work at all!

Constructor Detail

ThaiWordFilter

@Deprecated
public ThaiWordFilter(TokenStream input)
Deprecated. Use the ctor with matchVersion instead!

Creates a new ThaiWordFilter that also lowercases non-thai text.

ThaiWordFilter

public ThaiWordFilter(Version matchVersion,
                      TokenStream input)
Creates a new ThaiWordFilter with the specified match version.

Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.th.ThaiAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.th.ThaiAnalyzer

No usage of org.apache.lucene.analysis.th.ThaiAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.th.ThaiWordFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.th.ThaiWordFilter

No usage of org.apache.lucene.analysis.th.ThaiWordFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CharTermAttribute

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Interface CharTermAttribute

All Superinterfaces:
Appendable, Attribute, CharSequence
All Known Implementing Classes:
CharTermAttributeImpl, TermAttributeImpl, Token
public interface CharTermAttribute
extends Attribute, CharSequence, Appendable

The term text of a Token.

Method Summary
CharTermAttribute | append(char c)
CharTermAttribute | append(CharSequence csq)
CharTermAttribute | append(CharSequence csq, int start, int end)
CharTermAttribute | append(CharTermAttribute termAtt) Appends the contents of the other CharTermAttribute to this character sequence.
CharTermAttribute | append(String s) Appends the specified String to this character sequence.
CharTermAttribute | append(StringBuilder sb) Appends the specified StringBuilder to this character sequence.
char[] | buffer() Returns the internal termBuffer character array which you can then directly alter.
void | copyBuffer(char[] buffer, int offset, int length) Copies the contents of buffer, starting at offset for length characters, into the termBuffer array.
char[] | resizeBuffer(int newSize) Grows the termBuffer to at least size newSize, preserving the existing content.
CharTermAttribute | setEmpty() Sets the length of the termBuffer to zero.
CharTermAttribute | setLength(int length) Set number of valid characters (length of the term) in the termBuffer array.
Methods inherited from interface java.lang.CharSequence
charAt, length, subSequence, toString

Method Detail

copyBuffer

void copyBuffer(char[] buffer,
                int offset,
                int length)
Copies the contents of buffer, starting at offset for length characters, into the termBuffer array.

Parameters:
buffer - the buffer to copy
offset - the index in the buffer of the first character to copy
length - the number of characters to copy

buffer

char[] buffer()
Returns the internal termBuffer character array which you can then directly alter. If the array is too small for your token, use resizeBuffer(int) to increase it. After altering the buffer be sure to call setLength(int) to record the number of valid characters that were placed into the termBuffer.

resizeBuffer

char[] resizeBuffer(int newSize)
Grows the termBuffer to at least size newSize, preserving the existing content.

Parameters:
newSize - minimum size of the new termBuffer
Returns:
newly created termBuffer with length >= newSize

setLength

CharTermAttribute setLength(int length)
Set number of valid characters (length of the term) in the termBuffer array. Use this to truncate the termBuffer or to synchronize with external manipulation of the termBuffer. Note: to grow the size of the array, use resizeBuffer(int) first.

Parameters:
length - the truncated length

setEmpty

CharTermAttribute setEmpty()
Sets the length of the termBuffer to zero. Use this method before appending contents using the Appendable interface.

append

CharTermAttribute append(CharSequence csq)
Specified by:
append in interface Appendable

append

CharTermAttribute append(CharSequence csq,
                         int start,
                         int end)
Specified by:
append in interface Appendable

append

CharTermAttribute append(char c)
Specified by:
append in interface Appendable

append

CharTermAttribute append(String s)
Appends the specified String to this character sequence.

The characters of the String argument are appended, in order, increasing the length of this sequence by the length of the argument. If argument is null, then the four characters "null" are appended.

append

CharTermAttribute append(StringBuilder sb)
Appends the specified StringBuilder to this character sequence.

The characters of the StringBuilder argument are appended, in order, increasing the length of this sequence by the length of the argument. If argument is null, then the four characters "null" are appended.

append

CharTermAttribute append(CharTermAttribute termAtt)
Appends the contents of the other CharTermAttribute to this character sequence.

The characters of the CharTermAttribute argument are appended, in order, increasing the length of this sequence by the length of the argument. If argument is null, then the four characters "null" are appended.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CharTermAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Class CharTermAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
All Implemented Interfaces:
Serializable, Appendable, CharSequence, Cloneable, CharTermAttribute, TermAttribute, Attribute
Direct Known Subclasses:
TermAttributeImpl
public class CharTermAttributeImpl
extends AttributeImpl
implements CharTermAttribute, TermAttribute, Cloneable, Serializable

The term text of a Token.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
CharTermAttributeImpl()
Method Summary
CharTermAttribute | append(char c)
CharTermAttribute | append(CharSequence csq)
CharTermAttribute | append(CharSequence csq, int start, int end)
CharTermAttribute | append(CharTermAttribute ta) Appends the contents of the other CharTermAttribute to this character sequence.
CharTermAttribute | append(String s) Appends the specified String to this character sequence.
CharTermAttribute | append(StringBuilder s) Appends the specified StringBuilder to this character sequence.
char[] | buffer() Returns the internal termBuffer character array which you can then directly alter.
char | charAt(int index)
void | clear() Clears the values in this AttributeImpl and resets it to its default value.
Object | clone() Shallow clone.
void | copyBuffer(char[] buffer, int offset, int length) Copies the contents of buffer, starting at offset for length characters, into the termBuffer array.
void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other)
int | hashCode()
int | length()
void | reflectWith(AttributeReflector reflector) This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.
char[] | resizeBuffer(int newSize) Grows the termBuffer to at least size newSize, preserving the existing content.
char[] | resizeTermBuffer(int newSize) Deprecated.
CharTermAttribute | setEmpty() Sets the length of the termBuffer to zero.
CharTermAttribute | setLength(int length) Set number of valid characters (length of the term) in the termBuffer array.
void | setTermBuffer(char[] buffer, int offset, int length) Deprecated.
void | setTermBuffer(String buffer) Deprecated.
void | setTermBuffer(String buffer, int offset, int length) Deprecated.
void | setTermLength(int length) Deprecated.
CharSequence | subSequence(int start, int end)
String | term() Deprecated.
char[] | termBuffer() Deprecated.
int | termLength() Deprecated.
String | toString() Returns solely the term text as specified by the CharSequence interface.
Methods inherited from class org.apache.lucene.util.AttributeImpl
reflectAsString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CharTermAttributeImpl

public CharTermAttributeImpl()
Method Detail

term

@Deprecated
public String term()
Deprecated.

Description copied from interface: TermAttribute
Returns the Token's term text. This method has a performance penalty because the text is stored internally in a char[]. If possible, use TermAttribute.termBuffer() and TermAttribute.termLength() directly instead. If you really need a String, use this method, which is nothing more than a convenience call to new String(token.termBuffer(), 0, token.termLength())

Specified by:
term in interface TermAttribute

copyBuffer

public final void copyBuffer(char[] buffer,
                             int offset,
                             int length)
Description copied from interface: CharTermAttribute
Copies the contents of buffer, starting at offset for length characters, into the termBuffer array.

Specified by:
copyBuffer in interface CharTermAttribute
Parameters:
buffer - the buffer to copy
offset - the index in the buffer of the first character to copy
length - the number of characters to copy

setTermBuffer

@Deprecated
public void setTermBuffer(char[] buffer,
                                     int offset,
                                     int length)
Deprecated.

Description copied from interface: TermAttribute
Copies the contents of buffer, starting at offset for length characters, into the termBuffer array.

Specified by:
setTermBuffer in interface TermAttribute
Parameters:
buffer - the buffer to copy
offset - the index in the buffer of the first character to copy
length - the number of characters to copy

setTermBuffer

@Deprecated
public void setTermBuffer(String buffer)
Deprecated.

Description copied from interface: TermAttribute
Copies the contents of buffer into the termBuffer array.

Specified by:
setTermBuffer in interface TermAttribute
Parameters:
buffer - the buffer to copy

setTermBuffer

@Deprecated
public void setTermBuffer(String buffer,
                                     int offset,
                                     int length)
Deprecated.

Description copied from interface: TermAttribute
Copies the contents of buffer, starting at offset and continuing for length characters, into the termBuffer array.

Specified by:
setTermBuffer in interface TermAttribute
Parameters:
buffer - the buffer to copy
offset - the index in the buffer of the first character to copy
length - the number of characters to copy

buffer

public final char[] buffer()
Description copied from interface: CharTermAttribute
Returns the internal termBuffer character array which you can then directly alter. If the array is too small for your token, use CharTermAttribute.resizeBuffer(int) to increase it. After altering the buffer be sure to call CharTermAttribute.setLength(int) to record the number of valid characters that were placed into the termBuffer.

Specified by:
buffer in interface CharTermAttribute

termBuffer

@Deprecated
public char[] termBuffer()
Deprecated.

Description copied from interface: TermAttribute
Returns the internal termBuffer character array which you can then directly alter. If the array is too small for your token, use TermAttribute.resizeTermBuffer(int) to increase it. After altering the buffer be sure to call TermAttribute.setTermLength(int) to record the number of valid characters that were placed into the termBuffer.

Specified by:
termBuffer in interface TermAttribute

resizeBuffer

public final char[] resizeBuffer(int newSize)
Description copied from interface: CharTermAttribute
Grows the termBuffer to at least size newSize, preserving the existing content.

Specified by:
resizeBuffer in interface CharTermAttribute
Parameters:
newSize - minimum size of the new termBuffer
Returns:
newly created termBuffer with length >= newSize

resizeTermBuffer

@Deprecated
public char[] resizeTermBuffer(int newSize)
Deprecated.

Description copied from interface: TermAttribute
Grows the termBuffer to at least size newSize, preserving the existing content. Note: If the next operation is to change the contents of the term buffer use TermAttribute.setTermBuffer(char[], int, int), TermAttribute.setTermBuffer(String), or TermAttribute.setTermBuffer(String, int, int) to optimally combine the resize with the setting of the termBuffer.

Specified by:
resizeTermBuffer in interface TermAttribute
Parameters:
newSize - minimum size of the new termBuffer
Returns:
newly created termBuffer with length >= newSize

termLength

@Deprecated
public int termLength()
Deprecated.

Description copied from interface: TermAttribute
Return number of valid characters (length of the term) in the termBuffer array.

Specified by:
termLength in interface TermAttribute

setLength

public final CharTermAttribute setLength(int length)
Description copied from interface: CharTermAttribute
Set number of valid characters (length of the term) in the termBuffer array. Use this to truncate the termBuffer or to synchronize with external manipulation of the termBuffer. Note: to grow the size of the array, use CharTermAttribute.resizeBuffer(int) first.

Specified by:
setLength in interface CharTermAttribute
Parameters:
length - the truncated length

setEmpty

public final CharTermAttribute setEmpty()
Description copied from interface: CharTermAttribute
Sets the length of the termBuffer to zero. Use this method before appending contents using the Appendable interface.

Specified by:
setEmpty in interface CharTermAttribute

setTermLength

@Deprecated
public void setTermLength(int length)
Deprecated.

Description copied from interface: TermAttribute
Set number of valid characters (length of the term) in the termBuffer array. Use this to truncate the termBuffer or to synchronize with external manipulation of the termBuffer. Note: to grow the size of the array, use TermAttribute.resizeTermBuffer(int) first.

Specified by:
setTermLength in interface TermAttribute
Parameters:
length - the truncated length

length

public final int length()
Specified by:
length in interface CharSequence

charAt

public final char charAt(int index)
Specified by:
charAt in interface CharSequence

subSequence

public final CharSequence subSequence(int start,
                                      int end)
Specified by:
subSequence in interface CharSequence

append

public final CharTermAttribute append(CharSequence csq)
Specified by:
append in interface Appendable
Specified by:
append in interface CharTermAttribute

append

public final CharTermAttribute append(CharSequence csq,
                                      int start,
                                      int end)
Specified by:
append in interface Appendable
Specified by:
append in interface CharTermAttribute

append

public final CharTermAttribute append(char c)
Specified by:
append in interface Appendable
Specified by:
append in interface CharTermAttribute

append

public final CharTermAttribute append(String s)
Description copied from interface: CharTermAttribute
Appends the specified String to this character sequence.

The characters of the String argument are appended, in order, increasing the length of this sequence by the length of the argument. If argument is null, then the four characters "null" are appended.

Specified by:
append in interface CharTermAttribute

append

public final CharTermAttribute append(StringBuilder s)
Description copied from interface: CharTermAttribute
Appends the specified StringBuilder to this character sequence.

The characters of the StringBuilder argument are appended, in order, increasing the length of this sequence by the length of the argument. If argument is null, then the four characters "null" are appended.

Specified by:
append in interface CharTermAttribute

append

public final CharTermAttribute append(CharTermAttribute ta)
Description copied from interface: CharTermAttribute
Appends the contents of the other CharTermAttribute to this character sequence.

The characters of the CharTermAttribute argument are appended, in order, increasing the length of this sequence by the length of the argument. If argument is null, then the four characters "null" are appended.

Specified by:
append in interface CharTermAttribute

hashCode

public int hashCode()
Overrides:
hashCode in class Object

clear

public void clear()
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

clone

public Object clone()
Description copied from class: AttributeImpl
Shallow clone. Subclasses must override this if they need to clone any members deeply,

Overrides:
clone in class AttributeImpl

equals

public boolean equals(Object other)
Overrides:
equals in class Object

toString

public String toString()
Returns solely the term text as specified by the CharSequence interface.

This method changed the behavior with Lucene 3.1, before it returned a String representation of the whole term with all attributes. This affects especially the Token subclass.

Specified by:
toString in interface CharSequence
Overrides:
toString in class AttributeImpl

reflectWith

public void reflectWith(AttributeReflector reflector)
Description copied from class: AttributeImpl
This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.

The default implementation calls AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) for all non-static fields from the implementing class, using the field name as key and the field value as value. The Attribute class is also determined by reflection. Please note that the default implementation can only handle single-Attribute implementations.

Custom implementations look like this (e.g. for a combined attribute implementation):

   public void reflectWith(AttributeReflector reflector) {
     reflector.reflect(CharTermAttribute.class, "term", term());
     reflector.reflect(PositionIncrementAttribute.class, "positionIncrement", getPositionIncrement());
   }

If you implement this method, make sure that for each invocation, the same set of Attribute interfaces and keys are passed to AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) in the same order, but possibly different values. So don't automatically exclude e.g. null properties!

Overrides:
reflectWith in class AttributeImpl
See Also:
AttributeImpl.reflectAsString(boolean)

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FlagsAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Interface FlagsAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
FlagsAttributeImpl, Token
public interface FlagsAttribute
extends Attribute

This attribute can be used to pass different flags down the Tokenizer chain, eg from one TokenFilter to another one.

WARNING: This API is experimental and might change in incompatible ways in the next release.
While we think this is here to stay, we may want to change it to be a long.

Method Summary
int | getFlags() Get the bitset for any bits that have been set.
void | setFlags(int flags)

Method Detail

getFlags

int getFlags()

Get the bitset for any bits that have been set. This is completely distinct from TypeAttribute.type(), although they do share similar purposes. The flags can be used to encode information about the token for use by other TokenFilters.

Returns:
The bits

setFlags

void setFlags(int flags)
See Also:
getFlags()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FlagsAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Class FlagsAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.tokenattributes.FlagsAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, FlagsAttribute, Attribute
public class FlagsAttributeImpl
extends AttributeImpl
implements FlagsAttribute, Cloneable, Serializable

This attribute can be used to pass different flags down the tokenizer chain, eg from one TokenFilter to another one.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.
While we think this is here to stay, we may want to change it to be a long.

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
FlagsAttributeImpl()
Method Summary
void | clear() Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other)
int | getFlags() Get the bitset for any bits that have been set.
int | hashCode()
void | setFlags(int flags)
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FlagsAttributeImpl

public FlagsAttributeImpl()
Method Detail

getFlags

public int getFlags()

Get the bitset for any bits that have been set. This is completely distinct from TypeAttribute.type(), although they do share similar purposes. The flags can be used to encode information about the token for use by other TokenFilters.

Specified by:
getFlags in interface FlagsAttribute
Returns:
The bits

setFlags

public void setFlags(int flags)
Specified by:
setFlags in interface FlagsAttribute
See Also:
getFlags()

clear

public void clear()
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeywordAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Interface KeywordAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
KeywordAttributeImpl
public interface KeywordAttribute
extends Attribute

This attribute can be used to mark a token as a keyword. Keyword aware TokenStreams can decide to modify a token based on the return value of isKeyword() if the token is modified. Stemming filters for instance can use this attribute to conditionally skip a term if isKeyword() returns true.

Method Summary
boolean | isKeyword() Returns true iff the current token is a keyword, otherwise false/
void | setKeyword(boolean isKeyword) Marks the current token as keyword iff set to true.

Method Detail

isKeyword

boolean isKeyword()
Returns true iff the current token is a keyword, otherwise false/

Returns:
true iff the current token is a keyword, otherwise false/

setKeyword

void setKeyword(boolean isKeyword)
Marks the current token as keyword iff set to true.

Parameters:
isKeyword - true iff the current token is a keyword, otherwise false.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KeywordAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Class KeywordAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.tokenattributes.KeywordAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, KeywordAttribute, Attribute
public final class KeywordAttributeImpl
extends AttributeImpl
implements KeywordAttribute

This attribute can be used to mark a token as a keyword. Keyword aware TokenStreams can decide to modify a token based on the return value of isKeyword() if the token is modified. Stemming filters for instance can use this attribute to conditionally skip a term if isKeyword() returns true.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
KeywordAttributeImpl()
Method Summary
void | clear() Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object obj)
int | hashCode()
boolean | isKeyword() Returns true iff the current token is a keyword, otherwise false/
void | setKeyword(boolean isKeyword) Marks the current token as keyword iff set to true.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

KeywordAttributeImpl

public KeywordAttributeImpl()
Method Detail

clear

public void clear()
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

isKeyword

public boolean isKeyword()
Returns true iff the current token is a keyword, otherwise false/

Specified by:
isKeyword in interface KeywordAttribute
Returns:
true iff the current token is a keyword, otherwise false/

setKeyword

public void setKeyword(boolean isKeyword)
Marks the current token as keyword iff set to true.

Specified by:
setKeyword in interface KeywordAttribute
Parameters:
isKeyword - true iff the current token is a keyword, otherwise false.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OffsetAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Interface OffsetAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
OffsetAttributeImpl, Token
public interface OffsetAttribute
extends Attribute

The start and end character offset of a Token.

Method Summary
int | endOffset() Returns this Token's ending offset, one greater than the position of the last character corresponding to this token in the source text.
void | setOffset(int startOffset, int endOffset) Set the starting and ending offset.
int | startOffset() Returns this Token's starting offset, the position of the first character corresponding to this token in the source text.

Method Detail

startOffset

int startOffset()
Returns this Token's starting offset, the position of the first character corresponding to this token in the source text. Note that the difference between endOffset() and startOffset() may not be equal to termText.length(), as the term text may have been altered by a stemmer or some other filter.

setOffset

void setOffset(int startOffset,
               int endOffset)
Set the starting and ending offset.

See Also:
and #endOffset()

endOffset

int endOffset()
Returns this Token's ending offset, one greater than the position of the last character corresponding to this token in the source text. The length of the token in the source text is (endOffset - startOffset).

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OffsetAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Class OffsetAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, OffsetAttribute, Attribute
public class OffsetAttributeImpl
extends AttributeImpl
implements OffsetAttribute, Cloneable, Serializable

The start and end character offset of a Token.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
OffsetAttributeImpl()
Method Summary
void | clear() Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
int | endOffset() Returns this Token's ending offset, one greater than the position of the last character corresponding to this token in the source text.
boolean | equals(Object other)
int | hashCode()
void | setOffset(int startOffset, int endOffset) Set the starting and ending offset.
int | startOffset() Returns this Token's starting offset, the position of the first character corresponding to this token in the source text.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

OffsetAttributeImpl

public OffsetAttributeImpl()
Method Detail

startOffset

public int startOffset()
Returns this Token's starting offset, the position of the first character corresponding to this token in the source text. Note that the difference between endOffset() and startOffset() may not be equal to termText.length(), as the term text may have been altered by a stemmer or some other filter.

Specified by:
startOffset in interface OffsetAttribute

setOffset

public void setOffset(int startOffset,
                      int endOffset)
Set the starting and ending offset.

Specified by:
setOffset in interface OffsetAttribute
See Also:
and #endOffset()

endOffset

public int endOffset()
Returns this Token's ending offset, one greater than the position of the last character corresponding to this token in the source text. The length of the token in the source text is (endOffset - startOffset).

Specified by:
endOffset in interface OffsetAttribute

clear

public void clear()
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.tokenattributes
Interfaces
CharTermAttribute
FlagsAttribute
KeywordAttribute
OffsetAttribute
PayloadAttribute
PositionIncrementAttribute
PositionLengthAttribute
TermAttribute
TypeAttribute
Classes
CharTermAttributeImpl
FlagsAttributeImpl
KeywordAttributeImpl
OffsetAttributeImpl
PayloadAttributeImpl
PositionIncrementAttributeImpl
PositionLengthAttributeImpl
TermAttributeImpl
TypeAttributeImpl


org.apache.lucene.analysis.tokenattributes

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.tokenattributes

Useful Attributes for text analysis.

See:
Description

Interface Summary
CharTermAttribute | The term text of a Token.
FlagsAttribute | This attribute can be used to pass different flags down the Tokenizer chain, eg from one TokenFilter to another one.
KeywordAttribute | This attribute can be used to mark a token as a keyword.
OffsetAttribute | The start and end character offset of a Token.
PayloadAttribute | The payload of a Token.
PositionIncrementAttribute | The positionIncrement determines the position of this token relative to the previous Token in a TokenStream, used in phrase searching.
PositionLengthAttribute | The positionLength determines how many positions this token spans.
TermAttribute | Deprecated. Use CharTermAttribute instead.
TypeAttribute | A Token's lexical type.

Class Summary
CharTermAttributeImpl | The term text of a Token.
FlagsAttributeImpl | This attribute can be used to pass different flags down the tokenizer chain, eg from one TokenFilter to another one.
KeywordAttributeImpl | This attribute can be used to mark a token as a keyword.
OffsetAttributeImpl | The start and end character offset of a Token.
PayloadAttributeImpl | The payload of a Token.
PositionIncrementAttributeImpl | The positionIncrement determines the position of this token relative to the previous Token in a TokenStream, used in phrase searching.
PositionLengthAttributeImpl | See PositionLengthAttribute.
TermAttributeImpl | Deprecated. This class is not used anymore.
TypeAttributeImpl | A Token's lexical type.

Package org.apache.lucene.analysis.tokenattributes Description

Useful Attributes for text analysis.


org.apache.lucene.analysis.tokenattributes Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.tokenattributes

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeImpl (implements org.apache.lucene.util.Attribute, java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl (implements org.apache.lucene.analysis.tokenattributes.CharTermAttribute, java.lang.Cloneable, java.io.Serializable, org.apache.lucene.analysis.tokenattributes.TermAttribute)
        • org.apache.lucene.analysis.tokenattributes.TermAttributeImpl
      • org.apache.lucene.analysis.tokenattributes.FlagsAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.tokenattributes.FlagsAttribute, java.io.Serializable)
      • org.apache.lucene.analysis.tokenattributes.KeywordAttributeImpl (implements org.apache.lucene.analysis.tokenattributes.KeywordAttribute)
      • org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.tokenattributes.OffsetAttribute, java.io.Serializable)
      • org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.tokenattributes.PayloadAttribute, java.io.Serializable)
      • org.apache.lucene.analysis.tokenattributes.PositionIncrementAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute, java.io.Serializable)
      • org.apache.lucene.analysis.tokenattributes.PositionLengthAttributeImpl (implements java.lang.Cloneable, org.apache.lucene.analysis.tokenattributes.PositionLengthAttribute)
      • org.apache.lucene.analysis.tokenattributes.TypeAttributeImpl (implements java.lang.Cloneable, java.io.Serializable, org.apache.lucene.analysis.tokenattributes.TypeAttribute)

Interface Hierarchy

  • java.lang.Appendable
    • org.apache.lucene.analysis.tokenattributes.CharTermAttribute (also extends org.apache.lucene.util.Attribute, java.lang.CharSequence)
  • org.apache.lucene.util.Attribute
    • org.apache.lucene.analysis.tokenattributes.CharTermAttribute (also extends java.lang.Appendable, java.lang.CharSequence)
    • org.apache.lucene.analysis.tokenattributes.FlagsAttribute
    • org.apache.lucene.analysis.tokenattributes.KeywordAttribute
    • org.apache.lucene.analysis.tokenattributes.OffsetAttribute
    • org.apache.lucene.analysis.tokenattributes.PayloadAttribute
    • org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute
    • org.apache.lucene.analysis.tokenattributes.PositionLengthAttribute
    • org.apache.lucene.analysis.tokenattributes.TermAttribute
    • org.apache.lucene.analysis.tokenattributes.TypeAttribute
  • java.lang.CharSequence
    • org.apache.lucene.analysis.tokenattributes.CharTermAttribute (also extends java.lang.Appendable, org.apache.lucene.util.Attribute)


Uses of Package org.apache.lucene.analysis.tokenattributes

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.tokenattributes

Packages that use org.apache.lucene.analysis.tokenattributes
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.compound | A filter that decomposes compound words you find in many Germanic languages into the word parts.
org.apache.lucene.analysis.sinks | Implementations of the SinkTokenizer that might be useful.
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.standard.std31 | Backwards-compatible implementation to match Version.LUCENE_31
org.apache.lucene.analysis.standard.std34 | Backwards-compatible implementation to match Version.LUCENE_34
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets

Classes in org.apache.lucene.analysis.tokenattributes used by org.apache.lucene.analysis
CharTermAttribute
The term text of a Token.
CharTermAttributeImpl
The term text of a Token.
FlagsAttribute
This attribute can be used to pass different flags down the Tokenizer chain, eg from one TokenFilter to another one.
OffsetAttribute
The start and end character offset of a Token.
PayloadAttribute
The payload of a Token.
PositionIncrementAttribute
The positionIncrement determines the position of this token relative to the previous Token in a TokenStream, used in phrase searching.
PositionLengthAttribute
The positionLength determines how many positions this token spans.
TermAttribute
Deprecated. Use CharTermAttribute instead.
TermAttributeImpl
Deprecated. This class is not used anymore. The backwards layer in AttributeFactory uses the replacement implementation.
TypeAttribute
A Token's lexical type.

Classes in org.apache.lucene.analysis.tokenattributes used by org.apache.lucene.analysis.compound
CharTermAttribute
The term text of a Token.
OffsetAttribute
The start and end character offset of a Token.

Classes in org.apache.lucene.analysis.tokenattributes used by org.apache.lucene.analysis.sinks
CharTermAttribute
The term text of a Token.

Classes in org.apache.lucene.analysis.tokenattributes used by org.apache.lucene.analysis.standard
CharTermAttribute
The term text of a Token.

Classes in org.apache.lucene.analysis.tokenattributes used by org.apache.lucene.analysis.standard.std31
CharTermAttribute
The term text of a Token.

Classes in org.apache.lucene.analysis.tokenattributes used by org.apache.lucene.analysis.standard.std34
CharTermAttribute
The term text of a Token.

Classes in org.apache.lucene.analysis.tokenattributes used by org.apache.lucene.analysis.tokenattributes
CharTermAttribute
The term text of a Token.
CharTermAttributeImpl
The term text of a Token.
FlagsAttribute
This attribute can be used to pass different flags down the Tokenizer chain, eg from one TokenFilter to another one.
KeywordAttribute
This attribute can be used to mark a token as a keyword.
OffsetAttribute
The start and end character offset of a Token.
PayloadAttribute
The payload of a Token.
PositionIncrementAttribute
The positionIncrement determines the position of this token relative to the previous Token in a TokenStream, used in phrase searching.
PositionLengthAttribute
The positionLength determines how many positions this token spans.
TermAttribute
Deprecated. Use CharTermAttribute instead.
TypeAttribute
A Token's lexical type.

Classes in org.apache.lucene.analysis.tokenattributes used by org.apache.lucene.facet.index.streaming
CharTermAttribute
The term text of a Token.
PayloadAttribute
The payload of a Token.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PayloadAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Interface PayloadAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
PayloadAttributeImpl, Token
public interface PayloadAttribute
extends Attribute

The payload of a Token. See also Payload.

Method Summary
Payload | getPayload() Returns this Token's payload.
void | setPayload(Payload payload) Sets this Token's payload.

Method Detail

getPayload

Payload getPayload()
Returns this Token's payload.

setPayload

void setPayload(Payload payload)
Sets this Token's payload.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PayloadAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Class PayloadAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, PayloadAttribute, Attribute
public class PayloadAttributeImpl
extends AttributeImpl
implements PayloadAttribute, Cloneable, Serializable

The payload of a Token. See also Payload.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
PayloadAttributeImpl()
Initialize this attribute with no payload.
PayloadAttributeImpl(Payload payload)
Initialize this attribute with the given payload.
Method Summary
void | clear() Clears the values in this AttributeImpl and resets it to its default value.
Object | clone() Shallow clone.
void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other)
Payload | getPayload() Returns this Token's payload.
int | hashCode()
void | setPayload(Payload payload) Sets this Token's payload.
Methods inherited from class org.apache.lucene.util.AttributeImpl
reflectAsString, reflectWith, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PayloadAttributeImpl

public PayloadAttributeImpl()
Initialize this attribute with no payload.

PayloadAttributeImpl

public PayloadAttributeImpl(Payload payload)
Initialize this attribute with the given payload.

Method Detail

getPayload

public Payload getPayload()
Returns this Token's payload.

Specified by:
getPayload in interface PayloadAttribute

setPayload

public void setPayload(Payload payload)
Sets this Token's payload.

Specified by:
setPayload in interface PayloadAttribute

clear

public void clear()
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

clone

public Object clone()
Description copied from class: AttributeImpl
Shallow clone. Subclasses must override this if they need to clone any members deeply,

Overrides:
clone in class AttributeImpl

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PositionIncrementAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Interface PositionIncrementAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
PositionIncrementAttributeImpl, Token
public interface PositionIncrementAttribute
extends Attribute

The positionIncrement determines the position of this token relative to the previous Token in a TokenStream, used in phrase searching.

The default value is one.

Some common uses for this are:

  • 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.
  • 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.

See Also:
TermPositions

Method Summary
int | getPositionIncrement() Returns the position increment of this Token.
void | setPositionIncrement(int positionIncrement) Set the position increment.

Method Detail

setPositionIncrement

void setPositionIncrement(int positionIncrement)
Set the position increment. The default value is one.

Parameters:
positionIncrement - the distance from the prior term

getPositionIncrement

int getPositionIncrement()
Returns the position increment of this Token.

See Also:
setPositionIncrement(int)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PositionIncrementAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Class PositionIncrementAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.tokenattributes.PositionIncrementAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, PositionIncrementAttribute, Attribute
public class PositionIncrementAttributeImpl
extends AttributeImpl
implements PositionIncrementAttribute, Cloneable, Serializable

The positionIncrement determines the position of this token relative to the previous Token in a TokenStream, used in phrase searching.

The default value is one.

Some common uses for this are:

  • 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.
  • 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.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
PositionIncrementAttributeImpl()
Method Summary
void | clear() Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other)
int | getPositionIncrement() Returns the position increment of this Token.
int | hashCode()
void | setPositionIncrement(int positionIncrement) Set the position increment.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PositionIncrementAttributeImpl

public PositionIncrementAttributeImpl()
Method Detail

setPositionIncrement

public void setPositionIncrement(int positionIncrement)
Set the position increment. The default value is one.

Specified by:
setPositionIncrement in interface PositionIncrementAttribute
Parameters:
positionIncrement - the distance from the prior term

getPositionIncrement

public int getPositionIncrement()
Returns the position increment of this Token.

Specified by:
getPositionIncrement in interface PositionIncrementAttribute
See Also:
setPositionIncrement(int)

clear

public void clear()
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PositionLengthAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Interface PositionLengthAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
PositionLengthAttributeImpl, Token
public interface PositionLengthAttribute
extends Attribute

The positionLength determines how many positions this token spans. Very few analyzer components actually produce this attribute, and indexing ignores it, but it's useful to express the graph structure naturally produced by decompounding, word splitting/joining, synonym filtering, etc.

The default value is one.

Method Summary
int | getPositionLength() Returns the position length of this Token.
void | setPositionLength(int positionLength)

Method Detail

setPositionLength

void setPositionLength(int positionLength)
Parameters:
positionLength - how many positions this token spans.

getPositionLength

int getPositionLength()
Returns the position length of this Token.

See Also:
setPositionLength(int)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PositionLengthAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Class PositionLengthAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.tokenattributes.PositionLengthAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, PositionLengthAttribute, Attribute
public class PositionLengthAttributeImpl
extends AttributeImpl
implements PositionLengthAttribute, Cloneable

See PositionLengthAttribute.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
PositionLengthAttributeImpl()
Method Summary
void | clear() Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other)
int | getPositionLength() Returns the position length of this Token.
int | hashCode()
void | setPositionLength(int positionLength)
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PositionLengthAttributeImpl

public PositionLengthAttributeImpl()
Method Detail

setPositionLength

public void setPositionLength(int positionLength)
Specified by:
setPositionLength in interface PositionLengthAttribute
Parameters:
positionLength - how many positions this token spans. NOTE: this is optional, and most analyzers don't change the default value (1).

getPositionLength

public int getPositionLength()
Returns the position length of this Token.

Specified by:
getPositionLength in interface PositionLengthAttribute
See Also:
setPositionLength(int)

clear

public void clear()
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Interface TermAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
CharTermAttributeImpl, TermAttributeImpl, Token
Deprecated. Use CharTermAttribute instead.

@Deprecated
public interface TermAttribute
extends Attribute

The term text of a Token.

Method Summary
char[] | resizeTermBuffer(int newSize) Deprecated. Grows the termBuffer to at least size newSize, preserving the existing content.
void | setTermBuffer(char[] buffer, int offset, int length) Deprecated. Copies the contents of buffer, starting at offset for length characters, into the termBuffer array.
void | setTermBuffer(String buffer) Deprecated. Copies the contents of buffer into the termBuffer array.
void | setTermBuffer(String buffer, int offset, int length) Deprecated. Copies the contents of buffer, starting at offset and continuing for length characters, into the termBuffer array.
void | setTermLength(int length) Deprecated. Set number of valid characters (length of the term) in the termBuffer array.
String | term() Deprecated. Returns the Token's term text.
char[] | termBuffer() Deprecated. Returns the internal termBuffer character array which you can then directly alter.
int | termLength() Deprecated. Return number of valid characters (length of the term) in the termBuffer array.

Method Detail

term

String term()
Deprecated.
Returns the Token's term text. This method has a performance penalty because the text is stored internally in a char[]. If possible, use termBuffer() and termLength() directly instead. If you really need a String, use this method, which is nothing more than a convenience call to new String(token.termBuffer(), 0, token.termLength())

setTermBuffer

void setTermBuffer(char[] buffer,
                   int offset,
                   int length)
Deprecated.
Copies the contents of buffer, starting at offset for length characters, into the termBuffer array.

Parameters:
buffer - the buffer to copy
offset - the index in the buffer of the first character to copy
length - the number of characters to copy

setTermBuffer

void setTermBuffer(String buffer)
Deprecated.
Copies the contents of buffer into the termBuffer array.

Parameters:
buffer - the buffer to copy

setTermBuffer

void setTermBuffer(String buffer,
                   int offset,
                   int length)
Deprecated.
Copies the contents of buffer, starting at offset and continuing for length characters, into the termBuffer array.

Parameters:
buffer - the buffer to copy
offset - the index in the buffer of the first character to copy
length - the number of characters to copy

termBuffer

char[] termBuffer()
Deprecated.
Returns the internal termBuffer character array which you can then directly alter. If the array is too small for your token, use resizeTermBuffer(int) to increase it. After altering the buffer be sure to call setTermLength(int) to record the number of valid characters that were placed into the termBuffer.

resizeTermBuffer

char[] resizeTermBuffer(int newSize)
Deprecated.
Grows the termBuffer to at least size newSize, preserving the existing content. Note: If the next operation is to change the contents of the term buffer use setTermBuffer(char[], int, int), setTermBuffer(String), or setTermBuffer(String, int, int) to optimally combine the resize with the setting of the termBuffer.

Parameters:
newSize - minimum size of the new termBuffer
Returns:
newly created termBuffer with length >= newSize

termLength

int termLength()
Deprecated.
Return number of valid characters (length of the term) in the termBuffer array.

setTermLength

void setTermLength(int length)
Deprecated.
Set number of valid characters (length of the term) in the termBuffer array. Use this to truncate the termBuffer or to synchronize with external manipulation of the termBuffer. Note: to grow the size of the array, use resizeTermBuffer(int) first.

Parameters:
length - the truncated length
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Class TermAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
            extended by  org.apache.lucene.analysis.tokenattributes.TermAttributeImpl
All Implemented Interfaces:
Serializable, Appendable, CharSequence, Cloneable, CharTermAttribute, TermAttribute, Attribute
Direct Known Subclasses:
Token
Deprecated. This class is not used anymore. The backwards layer in AttributeFactory uses the replacement implementation.

@Deprecated
public class TermAttributeImpl
extends CharTermAttributeImpl

The term text of a Token.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
TermAttributeImpl()
Deprecated.
Method Summary
Methods inherited from class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
append, append, append, append, append, append, buffer, charAt, clear, clone, copyBuffer, copyTo, equals, hashCode, length, reflectWith, resizeBuffer, resizeTermBuffer, setEmpty, setLength, setTermBuffer, setTermBuffer, setTermBuffer, setTermLength, subSequence, term, termBuffer, termLength, toString
Methods inherited from class org.apache.lucene.util.AttributeImpl
reflectAsString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

TermAttributeImpl

public TermAttributeImpl()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TypeAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Interface TypeAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
Token, TypeAttributeImpl
public interface TypeAttribute
extends Attribute

A Token's lexical type. The Default value is "word".

Field Summary
static String DEFAULT_TYPE
the default type
Method Summary
void | setType(String type) Set the lexical type.
String | type() Returns this Token's lexical type.

Field Detail

DEFAULT_TYPE

static final String DEFAULT_TYPE
the default type

See Also:
Constant Field Values
Method Detail

type

String type()
Returns this Token's lexical type. Defaults to "word".

setType

void setType(String type)
Set the lexical type.

See Also:
type()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TypeAttributeImpl

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tokenattributes
Class TypeAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.analysis.tokenattributes.TypeAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, TypeAttribute, Attribute
public class TypeAttributeImpl
extends AttributeImpl
implements TypeAttribute, Cloneable, Serializable

A Token's lexical type. The Default value is "word".

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Fields inherited from interface org.apache.lucene.analysis.tokenattributes.TypeAttribute
DEFAULT_TYPE
Constructor Summary
TypeAttributeImpl()
TypeAttributeImpl(String type)
Method Summary
void | clear() Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other)
int | hashCode()
void | setType(String type) Set the lexical type.
String | type() Returns this Token's lexical type.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

TypeAttributeImpl

public TypeAttributeImpl()

TypeAttributeImpl

public TypeAttributeImpl(String type)
Method Detail

type

public String type()
Returns this Token's lexical type. Defaults to "word".

Specified by:
type in interface TypeAttribute

setType

public void setType(String type)
Set the lexical type.

Specified by:
setType in interface TypeAttribute
See Also:
type()

clear

public void clear()
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Interface org.apache.lucene.analysis.tokenattributes.CharTermAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.tokenattributes.CharTermAttribute

Packages that use CharTermAttribute
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.compound | A filter that decomposes compound words you find in many Germanic languages into the word parts.
org.apache.lucene.analysis.sinks | Implementations of the SinkTokenizer that might be useful.
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.standard.std31 | Backwards-compatible implementation to match Version.LUCENE_31
org.apache.lucene.analysis.standard.std34 | Backwards-compatible implementation to match Version.LUCENE_34
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets

Uses of CharTermAttribute in org.apache.lucene.analysis

Classes in org.apache.lucene.analysis that implement CharTermAttribute
 class Token
A Token is an occurrence of a term from the text of a field.

Uses of CharTermAttribute in org.apache.lucene.analysis.compound

Fields in org.apache.lucene.analysis.compound declared as CharTermAttribute
protected  CharTermAttribute CompoundWordTokenFilterBase.termAtt

Uses of CharTermAttribute in org.apache.lucene.analysis.sinks

Fields in org.apache.lucene.analysis.sinks declared as CharTermAttribute
protected  CharTermAttribute DateRecognizerSinkFilter.termAtt

Uses of CharTermAttribute in org.apache.lucene.analysis.standard

Methods in org.apache.lucene.analysis.standard with parameters of type CharTermAttribute
void | UAX29URLEmailTokenizerImpl.getText(CharTermAttribute t) Fills CharTermAttribute with the current token text.
void | StandardTokenizerImpl.getText(CharTermAttribute t) Fills CharTermAttribute with the current token text.
void | StandardTokenizerInterface.getText(CharTermAttribute t) Copies the matched text into the CharTermAttribute

Uses of CharTermAttribute in org.apache.lucene.analysis.standard.std31

Methods in org.apache.lucene.analysis.standard.std31 with parameters of type CharTermAttribute
void | StandardTokenizerImpl31.getText(CharTermAttribute t) Deprecated. Fills CharTermAttribute with the current token text.
void | UAX29URLEmailTokenizerImpl31.getText(CharTermAttribute t) Deprecated. Fills CharTermAttribute with the current token text.

Uses of CharTermAttribute in org.apache.lucene.analysis.standard.std34

Methods in org.apache.lucene.analysis.standard.std34 with parameters of type CharTermAttribute
 void UAX29URLEmailTokenizerImpl34.getText(CharTermAttribute t)
Deprecated. Fills CharTermAttribute with the current token text.

Uses of CharTermAttribute in org.apache.lucene.analysis.tokenattributes

Classes in org.apache.lucene.analysis.tokenattributes that implement CharTermAttribute
class | CharTermAttributeImpl The term text of a Token.
class | TermAttributeImpl Deprecated. This class is not used anymore. The backwards layer in AttributeFactory uses the replacement implementation.

Methods in org.apache.lucene.analysis.tokenattributes that return CharTermAttribute
CharTermAttribute | CharTermAttribute.append(char c)
CharTermAttribute | CharTermAttributeImpl.append(char c)
CharTermAttribute | CharTermAttribute.append(CharSequence csq)
CharTermAttribute | CharTermAttributeImpl.append(CharSequence csq)
CharTermAttribute | CharTermAttribute.append(CharSequence csq, int start, int end)
CharTermAttribute | CharTermAttributeImpl.append(CharSequence csq, int start, int end)
CharTermAttribute | CharTermAttribute.append(CharTermAttribute termAtt) Appends the contents of the other CharTermAttribute to this character sequence.
CharTermAttribute | CharTermAttributeImpl.append(CharTermAttribute ta)
CharTermAttribute | CharTermAttribute.append(String s) Appends the specified String to this character sequence.
CharTermAttribute | CharTermAttributeImpl.append(String s)
CharTermAttribute | CharTermAttribute.append(StringBuilder sb) Appends the specified StringBuilder to this character sequence.
CharTermAttribute | CharTermAttributeImpl.append(StringBuilder s)
CharTermAttribute | CharTermAttribute.setEmpty() Sets the length of the termBuffer to zero.
CharTermAttribute | CharTermAttributeImpl.setEmpty()
CharTermAttribute | CharTermAttribute.setLength(int length) Set number of valid characters (length of the term) in the termBuffer array.
CharTermAttribute | CharTermAttributeImpl.setLength(int length)

Methods in org.apache.lucene.analysis.tokenattributes with parameters of type CharTermAttribute
CharTermAttribute | CharTermAttribute.append(CharTermAttribute termAtt) Appends the contents of the other CharTermAttribute to this character sequence.
CharTermAttribute | CharTermAttributeImpl.append(CharTermAttribute ta)

Uses of CharTermAttribute in org.apache.lucene.facet.index.streaming

Fields in org.apache.lucene.facet.index.streaming declared as CharTermAttribute
protected  CharTermAttribute CategoryTokenizerBase.termAttribute
The stream's term attribute.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl

Packages that use CharTermAttributeImpl
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.

Uses of CharTermAttributeImpl in org.apache.lucene.analysis

Subclasses of CharTermAttributeImpl in org.apache.lucene.analysis
 class Token
A Token is an occurrence of a term from the text of a field.

Uses of CharTermAttributeImpl in org.apache.lucene.analysis.tokenattributes

Subclasses of CharTermAttributeImpl in org.apache.lucene.analysis.tokenattributes
 class TermAttributeImpl
Deprecated. This class is not used anymore. The backwards layer in AttributeFactory uses the replacement implementation.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.tokenattributes.FlagsAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.tokenattributes.FlagsAttribute

Packages that use FlagsAttribute
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.

Uses of FlagsAttribute in org.apache.lucene.analysis

Classes in org.apache.lucene.analysis that implement FlagsAttribute
 class Token
A Token is an occurrence of a term from the text of a field.

Uses of FlagsAttribute in org.apache.lucene.analysis.tokenattributes

Classes in org.apache.lucene.analysis.tokenattributes that implement FlagsAttribute
 class FlagsAttributeImpl
This attribute can be used to pass different flags down the tokenizer chain, eg from one TokenFilter to another one.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.tokenattributes.FlagsAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.tokenattributes.FlagsAttributeImpl

No usage of org.apache.lucene.analysis.tokenattributes.FlagsAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.tokenattributes.KeywordAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.tokenattributes.KeywordAttribute

Packages that use KeywordAttribute
org.apache.lucene.analysis.tokenattributes Useful Attributes for text analysis.

Uses of KeywordAttribute in org.apache.lucene.analysis.tokenattributes

Classes in org.apache.lucene.analysis.tokenattributes that implement KeywordAttribute
 class KeywordAttributeImpl
This attribute can be used to mark a token as a keyword.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.tokenattributes.KeywordAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.tokenattributes.KeywordAttributeImpl

No usage of org.apache.lucene.analysis.tokenattributes.KeywordAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.tokenattributes.OffsetAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.tokenattributes.OffsetAttribute

Packages that use OffsetAttribute
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.compound | A filter that decomposes compound words you find in many Germanic languages into the word parts.
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.

Uses of OffsetAttribute in org.apache.lucene.analysis

Classes in org.apache.lucene.analysis that implement OffsetAttribute
 class Token
A Token is an occurrence of a term from the text of a field.

Fields in org.apache.lucene.analysis declared as OffsetAttribute
protected  OffsetAttribute LookaheadTokenFilter.offsetAtt

Uses of OffsetAttribute in org.apache.lucene.analysis.compound

Fields in org.apache.lucene.analysis.compound declared as OffsetAttribute
protected  OffsetAttribute CompoundWordTokenFilterBase.offsetAtt

Uses of OffsetAttribute in org.apache.lucene.analysis.tokenattributes

Classes in org.apache.lucene.analysis.tokenattributes that implement OffsetAttribute
 class OffsetAttributeImpl
The start and end character offset of a Token.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl

No usage of org.apache.lucene.analysis.tokenattributes.OffsetAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.tokenattributes.PayloadAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.tokenattributes.PayloadAttribute

Packages that use PayloadAttribute
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets

Uses of PayloadAttribute in org.apache.lucene.analysis

Classes in org.apache.lucene.analysis that implement PayloadAttribute
 class Token
A Token is an occurrence of a term from the text of a field.

Uses of PayloadAttribute in org.apache.lucene.analysis.tokenattributes

Classes in org.apache.lucene.analysis.tokenattributes that implement PayloadAttribute
 class PayloadAttributeImpl
The payload of a Token.

Uses of PayloadAttribute in org.apache.lucene.facet.index.streaming

Fields in org.apache.lucene.facet.index.streaming declared as PayloadAttribute
protected  PayloadAttribute CategoryTokenizerBase.payloadAttribute
The stream's payload attribute.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl

No usage of org.apache.lucene.analysis.tokenattributes.PayloadAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute

Packages that use PositionIncrementAttribute
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.

Uses of PositionIncrementAttribute in org.apache.lucene.analysis

Classes in org.apache.lucene.analysis that implement PositionIncrementAttribute
 class Token
A Token is an occurrence of a term from the text of a field.

Fields in org.apache.lucene.analysis declared as PositionIncrementAttribute
protected  PositionIncrementAttribute LookaheadTokenFilter.posIncAtt

Uses of PositionIncrementAttribute in org.apache.lucene.analysis.tokenattributes

Classes in org.apache.lucene.analysis.tokenattributes that implement PositionIncrementAttribute
 class PositionIncrementAttributeImpl
The positionIncrement determines the position of this token relative to the previous Token in a TokenStream, used in phrase searching.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.tokenattributes.PositionIncrementAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.tokenattributes.PositionIncrementAttributeImpl

No usage of org.apache.lucene.analysis.tokenattributes.PositionIncrementAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.tokenattributes.PositionLengthAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.tokenattributes.PositionLengthAttribute

Packages that use PositionLengthAttribute
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.

Uses of PositionLengthAttribute in org.apache.lucene.analysis

Classes in org.apache.lucene.analysis that implement PositionLengthAttribute
 class Token
A Token is an occurrence of a term from the text of a field.

Fields in org.apache.lucene.analysis declared as PositionLengthAttribute
protected  PositionLengthAttribute LookaheadTokenFilter.posLenAtt

Uses of PositionLengthAttribute in org.apache.lucene.analysis.tokenattributes

Classes in org.apache.lucene.analysis.tokenattributes that implement PositionLengthAttribute
 class PositionLengthAttributeImpl
See PositionLengthAttribute.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.tokenattributes.PositionLengthAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.tokenattributes.PositionLengthAttributeImpl

No usage of org.apache.lucene.analysis.tokenattributes.PositionLengthAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.tokenattributes.TermAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.tokenattributes.TermAttribute

Packages that use TermAttribute
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.

Uses of TermAttribute in org.apache.lucene.analysis

Classes in org.apache.lucene.analysis that implement TermAttribute
 class Token
A Token is an occurrence of a term from the text of a field.

Uses of TermAttribute in org.apache.lucene.analysis.tokenattributes

Classes in org.apache.lucene.analysis.tokenattributes that implement TermAttribute
class | CharTermAttributeImpl The term text of a Token.
class | TermAttributeImpl Deprecated. This class is not used anymore. The backwards layer in AttributeFactory uses the replacement implementation.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.tokenattributes.TermAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.tokenattributes.TermAttributeImpl

Packages that use TermAttributeImpl
org.apache.lucene.analysis API and code to convert text into indexable/searchable tokens.

Uses of TermAttributeImpl in org.apache.lucene.analysis

Subclasses of TermAttributeImpl in org.apache.lucene.analysis
 class Token
A Token is an occurrence of a term from the text of a field.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.analysis.tokenattributes.TypeAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.analysis.tokenattributes.TypeAttribute

Packages that use TypeAttribute
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.

Uses of TypeAttribute in org.apache.lucene.analysis

Classes in org.apache.lucene.analysis that implement TypeAttribute
 class Token
A Token is an occurrence of a term from the text of a field.

Uses of TypeAttribute in org.apache.lucene.analysis.tokenattributes

Classes in org.apache.lucene.analysis.tokenattributes that implement TypeAttribute
 class TypeAttributeImpl
A Token's lexical type.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.tokenattributes.TypeAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.tokenattributes.TypeAttributeImpl

No usage of org.apache.lucene.analysis.tokenattributes.TypeAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.tr
Classes
TurkishAnalyzer
TurkishLowerCaseFilter


org.apache.lucene.analysis.tr

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.tr

Analyzer for Turkish.

See:
Description

Class Summary
TurkishAnalyzer | Analyzer for Turkish.
TurkishLowerCaseFilter | Normalizes Turkish token text to lower case.

Package org.apache.lucene.analysis.tr Description

Analyzer for Turkish.


org.apache.lucene.analysis.tr Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.tr

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.analysis.ReusableAnalyzerBase
        • org.apache.lucene.analysis.StopwordAnalyzerBase
          • org.apache.lucene.analysis.tr.TurkishAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.analysis.tr.TurkishLowerCaseFilter


Uses of Package org.apache.lucene.analysis.tr

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.tr

No usage of org.apache.lucene.analysis.tr

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


TurkishAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tr
Class TurkishAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.analysis.ReusableAnalyzerBase
            extended by  org.apache.lucene.analysis.StopwordAnalyzerBase
                extended by  org.apache.lucene.analysis.tr.TurkishAnalyzer
All Implemented Interfaces:
Closeable
public final class TurkishAnalyzer
extends StopwordAnalyzerBase

Analyzer for Turkish.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
Field Summary
static String DEFAULT_STOPWORD_FILE
File containing default Turkish stopwords.
Fields inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
matchVersion, stopwords
Constructor Summary
TurkishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.
TurkishAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
TurkishAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
Method Summary
protected ReusableAnalyzerBase.TokenStreamComponents | createComponents(String fieldName, Reader reader) Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.
static Set<?> | getDefaultStopSet() Returns an unmodifiable instance of the default stop words set.
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_STOPWORD_FILE

public static final String DEFAULT_STOPWORD_FILE
File containing default Turkish stopwords.

See Also:
Constant Field Values
Constructor Detail

TurkishAnalyzer

public TurkishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DEFAULT_STOPWORD_FILE.

TurkishAnalyzer

public TurkishAnalyzer(Version matchVersion,
                       Set<?> stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set

TurkishAnalyzer

public TurkishAnalyzer(Version matchVersion,
                       Set<?> stopwords,
                       Set<?> stemExclusionSet)
Builds an analyzer with the given stop words. If a non-empty stem exclusion set is provided this analyzer will add a KeywordMarkerFilter before stemming.

Parameters:
matchVersion - lucene compatibility version
stopwords - a stopword set
stemExclusionSet - a set of terms not to be stemmed
Method Detail

getDefaultStopSet

public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop words set.

Returns:
default stop words set.

createComponents

protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName,
                                                                      Reader reader)
Creates a ReusableAnalyzerBase.TokenStreamComponents which tokenizes all the text in the provided Reader.

Specified by:
createComponents in class ReusableAnalyzerBase
Parameters:
fieldName - the name of the fields content passed to the ReusableAnalyzerBase.TokenStreamComponents sink as a reader
reader - the reader passed to the Tokenizer constructor
Returns:
A ReusableAnalyzerBase.TokenStreamComponents built from an StandardTokenizer filtered with StandardFilter, TurkishLowerCaseFilter, StopFilter, KeywordMarkerFilter if a stem exclusion set is provided and SnowballFilter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


TurkishLowerCaseFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.tr
Class TurkishLowerCaseFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.analysis.tr.TurkishLowerCaseFilter
All Implemented Interfaces:
Closeable
public final class TurkishLowerCaseFilter
extends TokenFilter

Normalizes Turkish token text to lower case.

Turkish and Azeri have unique casing behavior for some characters. This filter applies Turkish lowercase rules. For more information, see http://en.wikipedia.org/wiki/Turkish_dotted_and_dotless_I

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
TurkishLowerCaseFilter(TokenStream in)
Create a new TurkishLowerCaseFilter, that normalizes Turkish token text to lower case.
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

TurkishLowerCaseFilter

public TurkishLowerCaseFilter(TokenStream in)
Create a new TurkishLowerCaseFilter, that normalizes Turkish token text to lower case.

Parameters:
in - TokenStream to filter
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.tr.TurkishAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.tr.TurkishAnalyzer

No usage of org.apache.lucene.analysis.tr.TurkishAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.tr.TurkishLowerCaseFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.tr.TurkishLowerCaseFilter

No usage of org.apache.lucene.analysis.tr.TurkishLowerCaseFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CharArrayIterator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.util
Class CharArrayIterator

java.lang.Object
    extended by  org.apache.lucene.analysis.util.CharArrayIterator
All Implemented Interfaces:
Cloneable, CharacterIterator
public abstract class CharArrayIterator
extends Object
implements CharacterIterator

A CharacterIterator used internally for use with BreakIterator

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
static boolean HAS_BUGGY_BREAKITERATORS
True if this JRE has a buggy BreakIterator implementation
Fields inherited from interface java.text.CharacterIterator
DONE
Constructor Summary
CharArrayIterator()
Method Summary
 Object clone()
 char current()
 char first()
 int getBeginIndex()
 int getEndIndex()
 int getIndex()
 int getLength()
 int getStart()
 char[] getText()
protected abstract  char jreBugWorkaround(char ch)
 char last()
static CharArrayIterator newSentenceInstance()
Create a new CharArrayIterator that works around JRE bugs in a manner suitable for BreakIterator.getSentenceInstance()
static CharArrayIterator newWordInstance()
Create a new CharArrayIterator that works around JRE bugs in a manner suitable for BreakIterator.getWordInstance()
 char next()
 char previous()
 char setIndex(int position)
 void setText(char[] array, int start, int length)
Set a new region of text to be examined by this iterator
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

HAS_BUGGY_BREAKITERATORS

public static final boolean HAS_BUGGY_BREAKITERATORS
True if this JRE has a buggy BreakIterator implementation

Constructor Detail

CharArrayIterator

public CharArrayIterator()
Method Detail

getText

public char[] getText()

getStart

public int getStart()

getLength

public int getLength()

setText

public void setText(char[] array,
                    int start,
                    int length)
Set a new region of text to be examined by this iterator

Parameters:
array - text buffer to examine
start - offset into buffer
length - maximum length to examine

current

public char current()
Specified by:
current in interface CharacterIterator

jreBugWorkaround

protected abstract char jreBugWorkaround(char ch)

first

public char first()
Specified by:
first in interface CharacterIterator

getBeginIndex

public int getBeginIndex()
Specified by:
getBeginIndex in interface CharacterIterator

getEndIndex

public int getEndIndex()
Specified by:
getEndIndex in interface CharacterIterator

getIndex

public int getIndex()
Specified by:
getIndex in interface CharacterIterator

last

public char last()
Specified by:
last in interface CharacterIterator

next

public char next()
Specified by:
next in interface CharacterIterator

previous

public char previous()
Specified by:
previous in interface CharacterIterator

setIndex

public char setIndex(int position)
Specified by:
setIndex in interface CharacterIterator

clone

public Object clone()
Specified by:
clone in interface CharacterIterator
Overrides:
clone in class Object

newSentenceInstance

public static CharArrayIterator newSentenceInstance()
Create a new CharArrayIterator that works around JRE bugs in a manner suitable for BreakIterator.getSentenceInstance()

newWordInstance

public static CharArrayIterator newWordInstance()
Create a new CharArrayIterator that works around JRE bugs in a manner suitable for BreakIterator.getWordInstance()

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


OpenStringBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.util
Class OpenStringBuilder

java.lang.Object
    extended by  org.apache.lucene.analysis.util.OpenStringBuilder
All Implemented Interfaces:
Appendable, CharSequence
public class OpenStringBuilder
extends Object
implements Appendable, CharSequence

A StringBuilder that allows one to access the array.

Field Summary
protected char[] | buf
protected int | len
Constructor Summary
OpenStringBuilder()
OpenStringBuilder(char[] arr, int len)
OpenStringBuilder(int size)
Method Summary
Appendable | append(char c)
Appendable | append(CharSequence csq)
Appendable | append(CharSequence csq, int start, int end)
int | capacity()
char | charAt(int index)
void | flush()
char[] | getArray()
int | length()
void | reserve(int num)
void | reset()
protected void | resize(int len)
void | set(char[] arr, int end)
void | setCharAt(int index, char ch)
void | setLength(int len)
int | size()
CharSequence | subSequence(int start, int end)
char[] | toCharArray()
String | toString()
void | unsafeWrite(char b)
void | unsafeWrite(char[] b, int off, int len)
void | unsafeWrite(int b)
void | write(char b)
void | write(char[] b)
void | write(char[] b, int off, int len)
void | write(int b)
void | write(OpenStringBuilder arr)
void | write(String s)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

buf

protected char[] buf

len

protected int len
Constructor Detail

OpenStringBuilder

public OpenStringBuilder()

OpenStringBuilder

public OpenStringBuilder(int size)

OpenStringBuilder

public OpenStringBuilder(char[] arr,
                         int len)
Method Detail

setLength

public void setLength(int len)

set

public void set(char[] arr,
                int end)

getArray

public char[] getArray()

size

public int size()

length

public int length()
Specified by:
length in interface CharSequence

capacity

public int capacity()

append

public Appendable append(CharSequence csq)
Specified by:
append in interface Appendable

append

public Appendable append(CharSequence csq,
                         int start,
                         int end)
Specified by:
append in interface Appendable

append

public Appendable append(char c)
Specified by:
append in interface Appendable

charAt

public char charAt(int index)
Specified by:
charAt in interface CharSequence

setCharAt

public void setCharAt(int index,
                      char ch)

subSequence

public CharSequence subSequence(int start,
                                int end)
Specified by:
subSequence in interface CharSequence

unsafeWrite

public void unsafeWrite(char b)

unsafeWrite

public void unsafeWrite(int b)

unsafeWrite

public void unsafeWrite(char[] b,
                        int off,
                        int len)

resize

protected void resize(int len)

reserve

public void reserve(int num)

write

public void write(char b)

write

public void write(int b)

write

public final void write(char[] b)

write

public void write(char[] b,
                  int off,
                  int len)

write

public final void write(OpenStringBuilder arr)

write

public void write(String s)

flush

public void flush()

reset

public final void reset()

toCharArray

public char[] toCharArray()

toString

public String toString()
Specified by:
toString in interface CharSequence
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.analysis.util
Classes
CharArrayIterator
OpenStringBuilder
StemmerUtil


org.apache.lucene.analysis.util

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.util

Utility functions for text analysis.

See:
Description

Class Summary
CharArrayIterator | A CharacterIterator used internally for use with BreakIterator
OpenStringBuilder | A StringBuilder that allows one to access the array.
StemmerUtil | Some commonly-used stemming functions

Package org.apache.lucene.analysis.util Description

Utility functions for text analysis.


org.apache.lucene.analysis.util Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.util

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.util.CharArrayIterator (implements java.text.CharacterIterator)
    • org.apache.lucene.analysis.util.OpenStringBuilder (implements java.lang.Appendable, java.lang.CharSequence)
    • org.apache.lucene.analysis.util.StemmerUtil


Uses of Package org.apache.lucene.analysis.util

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.util

Packages that use org.apache.lucene.analysis.util
org.apache.lucene.analysis.util Utility functions for text analysis.

Classes in org.apache.lucene.analysis.util used by org.apache.lucene.analysis.util
CharArrayIterator
A CharacterIterator used internally for use with BreakIterator
OpenStringBuilder
A StringBuilder that allows one to access the array.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


StemmerUtil

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.util
Class StemmerUtil

java.lang.Object
    extended by  org.apache.lucene.analysis.util.StemmerUtil

public class StemmerUtil
extends Object

Some commonly-used stemming functions

Constructor Summary
StemmerUtil()
Method Summary
static int | delete(char[] s, int pos, int len) Delete a character in-place
static int | deleteN(char[] s, int pos, int len, int nChars) Delete n characters in-place
static boolean | endsWith(char[] s, int len, char[] suffix) Returns true if the character array ends with the suffix.
static boolean | endsWith(char[] s, int len, String suffix) Returns true if the character array ends with the suffix.
static boolean | startsWith(char[] s, int len, String prefix) Returns true if the character array starts with the suffix.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StemmerUtil

public StemmerUtil()
Method Detail

startsWith

public static boolean startsWith(char[] s,
                                 int len,
                                 String prefix)
Returns true if the character array starts with the suffix.

Parameters:
s - Input Buffer
len - length of input buffer
prefix - Prefix string to test
Returns:
true if s starts with prefix

endsWith

public static boolean endsWith(char[] s,
                               int len,
                               String suffix)
Returns true if the character array ends with the suffix.

Parameters:
s - Input Buffer
len - length of input buffer
suffix - Suffix string to test
Returns:
true if s ends with suffix

endsWith

public static boolean endsWith(char[] s,
                               int len,
                               char[] suffix)
Returns true if the character array ends with the suffix.

Parameters:
s - Input Buffer
len - length of input buffer
suffix - Suffix string to test
Returns:
true if s ends with suffix

delete

public static int delete(char[] s,
                         int pos,
                         int len)
Delete a character in-place

Parameters:
s - Input Buffer
pos - Position of character to delete
len - length of input buffer
Returns:
length of input buffer after deletion

deleteN

public static int deleteN(char[] s,
                          int pos,
                          int len,
                          int nChars)
Delete n characters in-place

Parameters:
s - Input Buffer
pos - Position of character to delete
len - Length of input buffer
nChars - number of characters to delete
Returns:
length of input buffer after deletion
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.util.CharArrayIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.util.CharArrayIterator

Packages that use CharArrayIterator
org.apache.lucene.analysis.util Utility functions for text analysis.

Uses of CharArrayIterator in org.apache.lucene.analysis.util

Methods in org.apache.lucene.analysis.util that return CharArrayIterator
static CharArrayIterator CharArrayIterator.newSentenceInstance()
Create a new CharArrayIterator that works around JRE bugs in a manner suitable for BreakIterator.getSentenceInstance()
static CharArrayIterator CharArrayIterator.newWordInstance()
Create a new CharArrayIterator that works around JRE bugs in a manner suitable for BreakIterator.getWordInstance()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.util.OpenStringBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.util.OpenStringBuilder

Packages that use OpenStringBuilder
org.apache.lucene.analysis.util Utility functions for text analysis.

Uses of OpenStringBuilder in org.apache.lucene.analysis.util

Methods in org.apache.lucene.analysis.util with parameters of type OpenStringBuilder
 void OpenStringBuilder.write(OpenStringBuilder arr)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.analysis.util.StemmerUtil

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.util.StemmerUtil

No usage of org.apache.lucene.analysis.util.StemmerUtil

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.analysis.wikipedia
Classes
WikipediaTokenizer


org.apache.lucene.analysis.wikipedia

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.analysis.wikipedia

Tokenizer that is aware of Wikipedia syntax.

See:
Description

Class Summary
WikipediaTokenizer Extension of StandardTokenizer that is aware of Wikipedia syntax.

Package org.apache.lucene.analysis.wikipedia Description

Tokenizer that is aware of Wikipedia syntax.


org.apache.lucene.analysis.wikipedia Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.analysis.wikipedia

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.Tokenizer
          • org.apache.lucene.analysis.wikipedia.WikipediaTokenizer


Uses of Package org.apache.lucene.analysis.wikipedia

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.analysis.wikipedia

No usage of org.apache.lucene.analysis.wikipedia

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


WikipediaTokenizer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.analysis.wikipedia
Class WikipediaTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.Tokenizer
                extended by  org.apache.lucene.analysis.wikipedia.WikipediaTokenizer
All Implemented Interfaces:
Closeable
public final class WikipediaTokenizer
extends Tokenizer

Extension of StandardTokenizer that is aware of Wikipedia syntax. It is based off of the Wikipedia tutorial available at http://en.wikipedia.org/wiki/Wikipedia:Tutorial, but it may not be complete.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
static int | ACRONYM_ID
static int | ALPHANUM_ID
static int | APOSTROPHE_ID
static String | BOLD
static int | BOLD_ID
static String | BOLD_ITALICS
static int | BOLD_ITALICS_ID
static int | BOTH Output the both the untokenized token and the splits
static String | CATEGORY
static int | CATEGORY_ID
static String | CITATION
static int | CITATION_ID
static int | CJ_ID
static int | COMPANY_ID
static int | EMAIL_ID
static String | EXTERNAL_LINK
static int | EXTERNAL_LINK_ID
static String | EXTERNAL_LINK_URL
static int | EXTERNAL_LINK_URL_ID
static String | HEADING
static int | HEADING_ID
static int | HOST_ID
static String | INTERNAL_LINK
static int | INTERNAL_LINK_ID
static String | ITALICS
static int | ITALICS_ID
static int | NUM_ID
static String | SUB_HEADING
static int | SUB_HEADING_ID
static String[] | TOKEN_TYPES String token types that correspond to token type int constants
static int | TOKENS_ONLY Only output tokens
static int | UNTOKENIZED_ONLY Only output untokenized tokens, which are tokens that would normally be split into several tokens
static int | UNTOKENIZED_TOKEN_FLAG This flag is used to indicate that the produced "Token" would, if TOKENS_ONLY was used, produce multiple tokens.
Fields inherited from class org.apache.lucene.analysis.Tokenizer
input
Constructor Summary
WikipediaTokenizer(AttributeSource.AttributeFactory factory, Reader input, int tokenOutput, Set<String> untokenizedTypes)
Creates a new instance of the WikipediaTokenizer.
WikipediaTokenizer(AttributeSource source, Reader input, int tokenOutput, Set<String> untokenizedTypes)
Creates a new instance of the WikipediaTokenizer.
WikipediaTokenizer(Reader input)
Creates a new instance of the WikipediaTokenizer.
WikipediaTokenizer(Reader input, int tokenOutput, Set<String> untokenizedTypes)
Creates a new instance of the WikipediaTokenizer.
Method Summary
 void end()
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API).
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
 void reset()
Resets this stream to the beginning.
 void reset(Reader reader)
Expert: Reset the tokenizer to a new reader.
Methods inherited from class org.apache.lucene.analysis.Tokenizer
close, correctOffset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

INTERNAL_LINK

public static final String INTERNAL_LINK
See Also:
Constant Field Values

EXTERNAL_LINK

public static final String EXTERNAL_LINK
See Also:
Constant Field Values

EXTERNAL_LINK_URL

public static final String EXTERNAL_LINK_URL
See Also:
Constant Field Values

CITATION

public static final String CITATION
See Also:
Constant Field Values

CATEGORY

public static final String CATEGORY
See Also:
Constant Field Values

BOLD

public static final String BOLD
See Also:
Constant Field Values

ITALICS

public static final String ITALICS
See Also:
Constant Field Values

BOLD_ITALICS

public static final String BOLD_ITALICS
See Also:
Constant Field Values

HEADING

public static final String HEADING
See Also:
Constant Field Values

SUB_HEADING

public static final String SUB_HEADING
See Also:
Constant Field Values

ALPHANUM_ID

public static final int ALPHANUM_ID
See Also:
Constant Field Values

APOSTROPHE_ID

public static final int APOSTROPHE_ID
See Also:
Constant Field Values

ACRONYM_ID

public static final int ACRONYM_ID
See Also:
Constant Field Values

COMPANY_ID

public static final int COMPANY_ID
See Also:
Constant Field Values

EMAIL_ID

public static final int EMAIL_ID
See Also:
Constant Field Values

HOST_ID

public static final int HOST_ID
See Also:
Constant Field Values

NUM_ID

public static final int NUM_ID
See Also:
Constant Field Values

CJ_ID

public static final int CJ_ID
See Also:
Constant Field Values

INTERNAL_LINK_ID

public static final int INTERNAL_LINK_ID
See Also:
Constant Field Values

EXTERNAL_LINK_ID

public static final int EXTERNAL_LINK_ID
See Also:
Constant Field Values

CITATION_ID

public static final int CITATION_ID
See Also:
Constant Field Values

CATEGORY_ID

public static final int CATEGORY_ID
See Also:
Constant Field Values

BOLD_ID

public static final int BOLD_ID
See Also:
Constant Field Values

ITALICS_ID

public static final int ITALICS_ID
See Also:
Constant Field Values

BOLD_ITALICS_ID

public static final int BOLD_ITALICS_ID
See Also:
Constant Field Values

HEADING_ID

public static final int HEADING_ID
See Also:
Constant Field Values

SUB_HEADING_ID

public static final int SUB_HEADING_ID
See Also:
Constant Field Values

EXTERNAL_LINK_URL_ID

public static final int EXTERNAL_LINK_URL_ID
See Also:
Constant Field Values

TOKEN_TYPES

public static final String[] TOKEN_TYPES
String token types that correspond to token type int constants

TOKENS_ONLY

public static final int TOKENS_ONLY
Only output tokens

See Also:
Constant Field Values

UNTOKENIZED_ONLY

public static final int UNTOKENIZED_ONLY
Only output untokenized tokens, which are tokens that would normally be split into several tokens

See Also:
Constant Field Values

BOTH

public static final int BOTH
Output the both the untokenized token and the splits

See Also:
Constant Field Values

UNTOKENIZED_TOKEN_FLAG

public static final int UNTOKENIZED_TOKEN_FLAG
This flag is used to indicate that the produced "Token" would, if TOKENS_ONLY was used, produce multiple tokens.

See Also:
Constant Field Values
Constructor Detail

WikipediaTokenizer

public WikipediaTokenizer(Reader input)
Creates a new instance of the WikipediaTokenizer. Attaches the input to a newly created JFlex scanner.

Parameters:
input - The Input Reader

WikipediaTokenizer

public WikipediaTokenizer(Reader input,
                          int tokenOutput,
                          Set<String> untokenizedTypes)
Creates a new instance of the WikipediaTokenizer. Attaches the input to a the newly created JFlex scanner.

Parameters:
input - The input
tokenOutput - One of TOKENS_ONLY, UNTOKENIZED_ONLY, BOTH
untokenizedTypes -

WikipediaTokenizer

public WikipediaTokenizer(AttributeSource.AttributeFactory factory,
                          Reader input,
                          int tokenOutput,
                          Set<String> untokenizedTypes)
Creates a new instance of the WikipediaTokenizer. Attaches the input to a the newly created JFlex scanner. Uses the given AttributeSource.AttributeFactory.

Parameters:
input - The input
tokenOutput - One of TOKENS_ONLY, UNTOKENIZED_ONLY, BOTH
untokenizedTypes -

WikipediaTokenizer

public WikipediaTokenizer(AttributeSource source,
                          Reader input,
                          int tokenOutput,
                          Set<String> untokenizedTypes)
Creates a new instance of the WikipediaTokenizer. Attaches the input to a the newly created JFlex scanner. Uses the given AttributeSource.

Parameters:
input - The input
tokenOutput - One of TOKENS_ONLY, UNTOKENIZED_ONLY, BOTH
untokenizedTypes -
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException

reset

public void reset(Reader reader)
           throws IOException
Description copied from class: Tokenizer
Expert: Reset the tokenizer to a new reader. Typically, an analyzer (in its reusableTokenStream method) will use this to re-use a previously created tokenizer.

Overrides:
reset in class Tokenizer
Throws:
IOException

end

public void end()
         throws IOException
Description copied from class: TokenStream
This method is called by the consumer after the last token has been consumed, after TokenStream.incrementToken() returned false (using the new TokenStream API). Streams implementing the old API should upgrade to use this feature.

This method can be used to perform any end-of-stream operations, such as setting the final offset of a stream. The final offset of a stream might differ from the offset of the last token eg in case one or more whitespaces followed after the last token, but a WhitespaceTokenizer was used.

Overrides:
end in class TokenStream
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

No usage of org.apache.lucene.analysis.wikipedia.WikipediaTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Constants

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark
Class Constants

java.lang.Object
    extended by  org.apache.lucene.benchmark.Constants

public class Constants
extends Object

Various benchmarking constants (mostly defaults)

Field Summary
static Boolean[] | BOOLEANS
static int | DEFAULT_LOG_STEP
static int | DEFAULT_MAXIMUM_DOCUMENTS
static int | DEFAULT_RUN_COUNT
static int | DEFAULT_SCALE_UP
Constructor Summary
Constants()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_RUN_COUNT

public static final int DEFAULT_RUN_COUNT
See Also:
Constant Field Values

DEFAULT_SCALE_UP

public static final int DEFAULT_SCALE_UP
See Also:
Constant Field Values

DEFAULT_LOG_STEP

public static final int DEFAULT_LOG_STEP
See Also:
Constant Field Values

BOOLEANS

public static Boolean[] BOOLEANS

DEFAULT_MAXIMUM_DOCUMENTS

public static final int DEFAULT_MAXIMUM_DOCUMENTS
See Also:
Constant Field Values
Constructor Detail

Constants

public Constants()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.benchmark
Classes
Constants


org.apache.lucene.benchmark

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.benchmark

The benchmark contribution contains tools for benchmarking Lucene using standard, freely available corpora.

See:
Description

Class Summary
Constants Various benchmarking constants (mostly defaults)

Package org.apache.lucene.benchmark Description

The benchmark contribution contains tools for benchmarking Lucene using standard, freely available corpora. ANT will download the corpus automatically, place it in a temp directory and then unpack it to the working.dir directory specified in the build. The temp directory and working directory can be safely removed after a run. However, the next time the task is run, it will need to download the files again.

Classes implementing the Benchmarker interface should have a no-argument constructor if they are to be used with the Driver class. The Driver class is provided for convenience only. Feel free to implement your own main class for your benchmarker.

The StandardBenchmarker is meant to be just that, a standard that runs out of the box with no configuration or changes needed. Other benchmarking classes may derive from it to provide alternate views or to take in command line options. When reporting benchmarking runs you should state any alterations you have made.

To run the short version of the StandardBenchmarker, call "ant run-micro-standard". This should take a minute or so to complete and give you a preliminary idea of how your change affects the code

To run the long version of the StandardBenchmarker, call "ant run-standard". This takes considerably longer.

The original code for these classes was donated by Andrzej Bialecki at http://issues.apache.org/jira/browse/LUCENE-675 and has been updated by Grant Ingersoll to make some parts of the code reusable in other benchmarkers


org.apache.lucene.benchmark Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.benchmark

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.benchmark.Constants


Uses of Package org.apache.lucene.benchmark

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.benchmark

No usage of org.apache.lucene.benchmark

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Benchmark

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask
Class Benchmark

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.Benchmark

public class Benchmark
extends Object

Run the benchmark algorithm.

Usage: java Benchmark algorithm-file

  1. Read algorithm.
  2. Run the algorithm.
Things to be added/fixed in "Benchmarking by tasks":
  1. TODO - report into Excel and/or graphed view.
  2. TODO - perf comparison between Lucene releases over the years.
  3. TODO - perf report adequate to include in Lucene nightly build site? (so we can easily track performance changes.)
  4. TODO - add overall time control for repeated execution (vs. current by-count only).
  5. TODO - query maker that is based on index statistics.

Constructor Summary
Benchmark(Reader algReader)
Method Summary
static void | exec(String[] args) Utility: execute benchmark from command line
void | execute() Execute this benchmark
Algorithm | getAlgorithm()
PerfRunData | getRunData()
static void | main(String[] args) Run the benchmark algorithm.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Benchmark

public Benchmark(Reader algReader)
          throws Exception
Throws:
Exception
Method Detail

execute

public void execute()
             throws Exception
Execute this benchmark

Throws:
Exception

main

public static void main(String[] args)
Run the benchmark algorithm.

Parameters:
args - benchmark config and algorithm files

exec

public static void exec(String[] args)
Utility: execute benchmark from command line

Parameters:
args - single argument is expected: algorithm-file

getAlgorithm

public Algorithm getAlgorithm()
Returns:
Returns the algorithm.

getRunData

public PerfRunData getRunData()
Returns:
Returns the runData.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.benchmark.byTask
Classes
Benchmark
PerfRunData


org.apache.lucene.benchmark.byTask

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.benchmark.byTask

Benchmarking Lucene By Tasks.

See:
Description

Class Summary
Benchmark | Run the benchmark algorithm.
PerfRunData | Data maintained by a performance test run.

Package org.apache.lucene.benchmark.byTask Description

Benchmarking Lucene By Tasks.

This package provides "task based" performance benchmarking of Lucene. One can use the predefined benchmarks, or create new ones.

Contained packages:

Package | Description
stats | Statistics maintained when running benchmark tasks.
tasks | Benchmark tasks.
feeds | Sources for benchmark inputs: documents and queries.
utils | Utilities used for the benchmark, and for the reports.
programmatic | Sample performance test written programatically.

Table Of Contents

  1. Benchmarking By Tasks
  2. How to use
  3. Benchmark "algorithm"
  4. Supported tasks/commands
  5. Benchmark properties
  6. Example input algorithm and the result benchmark report.
  7. Results record counting clarified

Benchmarking By Tasks

Benchmark Lucene using task primitives.

A benchmark is composed of some predefined tasks, allowing for creating an index, adding documents, optimizing, searching, generating reports, and more. A benchmark run takes an "algorithm" file that contains a description of the sequence of tasks making up the run, and some properties defining a few additional characteristics of the benchmark run.

How to use

Easiest way to run a benchmarks is using the predefined ant task:

  • ant run-task
    - would run the micro-standard.alg "algorithm".
  • ant run-task -Dtask.alg=conf/compound-penalty.alg
    - would run the compound-penalty.alg "algorithm".
  • ant run-task -Dtask.alg=[full-path-to-your-alg-file]
    - would run your perf test "algorithm".
  • java org.apache.lucene.benchmark.byTask.programmatic.Sample
    - would run a performance test programmatically - without using an alg file. This is less readable, and less convinient, but possible.

You may find existing tasks sufficient for defining the benchmark you need, otherwise, you can extend the framework to meet your needs, as explained herein.

Each benchmark run has a DocMaker and a QueryMaker. These two should usually match, so that "meaningful" queries are used for a certain collection. Properties set at the header of the alg file define which "makers" should be used. You can also specify your own makers, extending DocMaker and implementing QureyMaker.

Note: since 2.9, DocMaker is a concrete class which accepts a ContentSource. In most cases, you can use the DocMaker class to create Documents, while providing your own ContentSource implementation. For example, the current Benchmark package includes ContentSource implementations for TREC, Enwiki and Reuters collections, as well as others like LineDocSource which reads a 'line' file produced by WriteLineDocTask.

Benchmark .alg file contains the benchmark "algorithm". The syntax is described below. Within the algorithm, you can specify groups of commands, assign them names, specify commands that should be repeated, do commands in serial or in parallel, and also control the speed of "firing" the commands.

This allows, for instance, to specify that an index should be opened for update, documents should be added to it one by one but not faster than 20 docs a minute, and, in parallel with this, some N queries should be searched against that index, again, no more than 2 queries a second. You can have the searches all share an index reader, or have them each open its own reader and close it afterwords.

If the commands available for use in the algorithm do not meet your needs, you can add commands by adding a new task under org.apache.lucene.benchmark.byTask.tasks - you should extend the PerfTask abstract class. Make sure that your new task class name is suffixed by Task. Assume you added the class "WonderfulTask" - doing so also enables the command "Wonderful" to be used in the algorithm.

External classes: It is sometimes useful to invoke the benchmark package with your external alg file that configures the use of your own doc/query maker and or html parser. You can work this out without modifying the benchmark package code, by passing your class path with the benchmark.ext.classpath property:

  • ant run-task -Dtask.alg=[full-path-to-your-alg-file] -Dbenchmark.ext.classpath=/mydir/classes -Dtask.mem=512M
External tasks: When writing your own tasks under a package other than org.apache.lucene.benchmark.byTask.tasks specify that package thru the alt.tasks.packages property.

Benchmark "algorithm"

The following is an informal description of the supported syntax.

  1. Measuring: When a command is executed, statistics for the elapsed execution time and memory consumption are collected. At any time, those statistics can be printed, using one of the available ReportTasks.
  2. Comments start with '#'.
  3. Serial sequences are enclosed within '{ }'.
  4. Parallel sequences are enclosed within '[ ]'
  5. Sequence naming: To name a sequence, put '"name"' just after '{' or '['.
    Example - { "ManyAdds" AddDoc } : 1000000 - would name the sequence of 1M add docs "ManyAdds", and this name would later appear in statistic reports. If you don't specify a name for a sequence, it is given one: you can see it as the algorithm is printed just before benchmark execution starts.
  6. Repeating: To repeat sequence tasks N times, add ': N' just after the sequence closing tag - '}' or ']' or '>'.
    Example - [ AddDoc ] : 4 - would do 4 addDoc in parallel, spawning 4 threads at once.
    Example - [ AddDoc AddDoc ] : 4 - would do 8 addDoc in parallel, spawning 8 threads at once.
    Example - { AddDoc } : 30 - would do addDoc 30 times in a row.
    Example - { AddDoc AddDoc } : 30 - would do addDoc 60 times in a row.
    Exhaustive repeating: use * instead of a number to repeat exhaustively. This is sometimes useful, for adding as many files as a doc maker can create, without iterating over the same file again, especially when the exact number of documents is not known in advance. For insance, TREC files extracted from a zip file. Note: when using this, you must also set doc.maker.forever to false.
    Example - { AddDoc } : * - would add docs until the doc maker is "exhausted".
  7. Command parameter: a command can optionally take a single parameter. If the certain command does not support a parameter, or if the parameter is of the wrong type, reading the algorithm will fail with an exception and the test would not start. Currently the following tasks take optional parameters:
    • AddDoc takes a numeric parameter, indicating the required size of added document. Note: if the DocMaker implementation used in the test does not support makeDoc(size), an exception would be thrown and the test would fail.
    • DeleteDoc takes numeric parameter, indicating the docid to be deleted. The latter is not very useful for loops, since the docid is fixed, so for deletion in loops it is better to use the doc.delete.step property.
    • SetProp takes a name,value mandatory param, ',' used as a separator.
    • SearchTravRetTask and SearchTravTask take a numeric parameter, indicating the required traversal size.
    • SearchTravRetLoadFieldSelectorTask takes a string parameter: a comma separated list of Fields to load.
    • SearchTravRetHighlighterTask takes a string parameter: a comma separated list of parameters to define highlighting. See that tasks javadocs for more information

    Example - AddDoc(2000) - would add a document of size 2000 (~bytes).
    See conf/task-sample.alg for how this can be used, for instance, to check which is faster, adding many smaller documents, or few larger documents. Next candidates for supporting a parameter may be the Search tasks, for controlling the qurey size.
  8. Statistic recording elimination: - a sequence can also end with '>', in which case child tasks would not store their statistics. This can be useful to avoid exploding stats data, for adding say 1M docs.
    Example - { "ManyAdds" AddDoc > : 1000000 - would add million docs, measure that total, but not save stats for each addDoc.
    Notice that the granularity of System.currentTimeMillis() (which is used here) is system dependant, and in some systems an operation that takes 5 ms to complete may show 0 ms latency time in performance measurements. Therefore it is sometimes more accurate to look at the elapsed time of a larger sequence, as demonstrated here.
  9. Rate: To set a rate (ops/sec or ops/min) for a sequence, add ': N : R' just after sequence closing tag. This would specify repetition of N with rate of R operations/sec. Use 'R/sec' or 'R/min' to explicitely specify that the rate is per second or per minute. The default is per second,
    Example - [ AddDoc ] : 400 : 3 - would do 400 addDoc in parallel, starting up to 3 threads per second.
    Example - { AddDoc } : 100 : 200/min - would do 100 addDoc serially, waiting before starting next add, if otherwise rate would exceed 200 adds/min.
  10. Disable Counting: Each task executed contributes to the records count. This count is reflected in reports under recs/s and under recsPerRun. Most tasks count 1, some count 0, and some count more. (See Results record counting clarified for more details.) It is possible to disable counting for a task by preceding it with -.
    Example - -CreateIndex - would count 0 while the default behavior for CreateIndex is to count 1.
  11. Command names: Each class "AnyNameTask" in the package org.apache.lucene.benchmark.byTask.tasks, that extends PerfTask, is supported as command "AnyName" that can be used in the benchmark "algorithm" description. This allows to add new commands by just adding such classes.

Supported tasks/commands

Existing tasks can be divided into a few groups: regular index/search work tasks, report tasks, and control tasks.

  1. Report tasks: There are a few Report commands for generating reports. Only task runs that were completed are reported. (The 'Report tasks' themselves are not measured and not reported.)
    • RepAll - all (completed) task runs.
    • RepSumByName - all statistics, aggregated by name. So, if AddDoc was executed 2000 times, only 1 report line would be created for it, aggregating all those 2000 statistic records.
    • RepSelectByPref   prefixWord - all records for tasks whose name start with prefixWord.
    • RepSumByPref   prefixWord - all records for tasks whose name start with prefixWord, aggregated by their full task name.
    • RepSumByNameRound - all statistics, aggregated by name and by Round. So, if AddDoc was executed 2000 times in each of 3 rounds, 3 report lines would be created for it, aggregating all those 2000 statistic records in each round. See more about rounds in the NewRound command description below.
    • RepSumByPrefRound   prefixWord - similar to RepSumByNameRound, just that only tasks whose name starts with prefixWord are included.
    If needed, additional reports can be added by extending the abstract class ReportTask, and by manipulating the statistics data in Points and TaskStats.
  2. Control tasks: Few of the tasks control the benchmark algorithm all over:
    • ClearStats - clears the entire statistics. Further reports would only include task runs that would start after this call.
    • NewRound - virtually start a new round of performance test. Although this command can be placed anywhere, it mostly makes sense at the end of an outermost sequence.
      This increments a global "round counter". All task runs that would start now would record the new, updated round counter as their round number. This would appear in reports. In particular, see RepSumByNameRound above.
      An additional effect of NewRound, is that numeric and boolean properties defined (at the head of the .alg file) as a sequence of values, e.g. merge.factor=mrg:10:100:10:100 would increment (cyclic) to the next value. Note: this would also be reflected in the reports, in this case under a column that would be named "mrg".
    • ResetInputs - DocMaker and the various QueryMakers would reset their counters to start. The way these Maker interfaces work, each call for makeDocument() or makeQuery() creates the next document or query that it "knows" to create. If that pool is "exhausted", the "maker" start over again. The resetInpus command therefore allows to make the rounds comparable. It is therefore useful to invoke ResetInputs together with NewRound.
    • ResetSystemErase - reset all index and input data and call gc. Does NOT reset statistics. This contains ResetInputs. All writers/readers are nullified, deleted, closed. Index is erased. Directory is erased. You would have to call CreateIndex once this was called...
    • ResetSystemSoft - reset all index and input data and call gc. Does NOT reset statistics. This contains ResetInputs. All writers/readers are nullified, closed. Index is NOT erased. Directory is NOT erased. This is useful for testing performance on an existing index, for instance if the construction of a large index took a very long time and now you would to test its search or update performance.
  3. Other existing tasks are quite straightforward and would just be briefly described here.
    • CreateIndex and OpenIndex both leave the index open for later update operations. CloseIndex would close it.
    • OpenReader, similarly, would leave an index reader open for later search operations. But this have further semantics. If a Read operation is performed, and an open reader exists, it would be used. Otherwise, the read operation would open its own reader and close it when the read operation is done. This allows testing various scenarios - sharing a reader, searching with "cold" reader, with "warmed" reader, etc. The read operations affected by this are: Warm, Search, SearchTrav (search and traverse), and SearchTravRet (search and traverse and retrieve). Notice that each of the 3 search task types maintains its own queryMaker instance.
    • CommitIndex and Optimize can be used to commit changes to the index and/or optimize the index created thus far.
    • WriteLineDoc prepares a 'line' file where each line holds a document with title, date and body elements, seperated by [TAB]. A line file is useful if one wants to measure pure indexing performance, without the overhead of parsing the data.
      You can use LineDocSource as a ContentSource over a 'line' file.
    • ConsumeContentSource consumes a ContentSource. Useful for e.g. testing a ContentSource performance, without the overhead of preparing a Document out of it.

Benchmark properties

Properties are read from the header of the .alg file, and define several parameters of the performance test. As mentioned above for the NewRound task, numeric and boolean properties that are defined as a sequence of values, e.g. merge.factor=mrg:10:100:10:100 would increment (cyclic) to the next value, when NewRound is called, and would also appear as a named column in the reports (column name would be "mrg" in this example).

Some of the currently defined properties are:

  1. analyzer - full class name for the analyzer to use. Same analyzer would be used in the entire test.
  2. directory - valid values are This tells which directory to use for the performance test.
  3. Index work parameters: Multi int/boolean values would be iterated with calls to NewRound. There would be also added as columns in the reports, first string in the sequence is the column name. (Make sure it is no shorter than any value in the sequence).
    • max.buffered
      Example: max.buffered=buf:10:10:100:100 - this would define using maxBufferedDocs of 10 in iterations 0 and 1, and 100 in iterations 2 and 3.
    • merge.factor - which merge factor to use.
    • compound - whether the index is using the compound format or not. Valid values are "true" and "false".

Here is a list of currently defined properties:

  1. Root directory for data and indexes:
    • work.dir (default is System property "benchmark.work.dir" or "work".)
  2. Docs and queries creation:
    • analyzer
    • doc.maker
    • doc.maker.forever
    • html.parser
    • doc.stored
    • doc.tokenized
    • doc.term.vector
    • doc.term.vector.positions
    • doc.term.vector.offsets
    • doc.store.body.bytes
    • docs.dir
    • query.maker
    • file.query.maker.file
    • file.query.maker.default.field
    • search.num.hits
  3. Logging:
    • log.step
    • log.step.[class name]Task ie log.step.DeleteDoc (e.g. log.step.Wonderful for the WonderfulTask example above).
    • log.queries
    • task.max.depth.log
  4. Index writing:
    • compound
    • merge.factor
    • max.buffered
    • directory
    • ram.flush.mb
  5. Doc deletion:
    • doc.delete.step
  6. Task alternative packages:
    • alt.tasks.packages - comma separated list of additional packages where tasks classes will be looked for when not found in the default package (that of PerfTask). If the same task class appears in more than one package, the package indicated first in this list will be used.

For sample use of these properties see the *.alg files under conf.

Example input algorithm and the result benchmark report

The following example is in conf/sample.alg:

# --------------------------------------------------------
#
# Sample: what is the effect of doc size on indexing time?
#
# There are two parts in this test:
# - PopulateShort adds 2N documents of length  L
# - PopulateLong  adds  N documents of length 2L
# Which one would be faster?
# The comparison is done twice.
#
# --------------------------------------------------------

# -------------------------------------------------------------------------------------
# multi val params are iterated by NewRound's, added to reports, start with column name.
merge.factor=mrg:10:20
max.buffered=buf:100:1000
compound=true

analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer
directory=FSDirectory

doc.stored=true
doc.tokenized=true
doc.term.vector=false
doc.add.log.step=500

docs.dir=reuters-out

doc.maker=org.apache.lucene.benchmark.byTask.feeds.SimpleDocMaker

query.maker=org.apache.lucene.benchmark.byTask.feeds.SimpleQueryMaker

# task at this depth or less would print when they start
task.max.depth.log=2

log.queries=false
# -------------------------------------------------------------------------------------
{

    { "PopulateShort"
        CreateIndex
        { AddDoc(4000) > : 20000
        Optimize
        CloseIndex
    >

    ResetSystemErase

    { "PopulateLong"
        CreateIndex
        { AddDoc(8000) > : 10000
        Optimize
        CloseIndex
    >

    ResetSystemErase

    NewRound

} : 2

RepSumByName
RepSelectByPref Populate

The command line for running this sample:
ant run-task -Dtask.alg=conf/sample.alg

The output report from running this test contains the following:

Operation     round mrg  buf   runCnt   recsPerRun        rec/s  elapsedSec    avgUsedMem    avgTotalMem
PopulateShort     0  10  100        1        20003        119.6      167.26    12,959,120     14,241,792
PopulateLong -  - 0  10  100 -  -   1 -  -   10003 -  -  - 74.3 -  - 134.57 -  17,085,208 -   20,635,648
PopulateShort     1  20 1000        1        20003        143.5      139.39    63,982,040     94,756,864
PopulateLong -  - 1  20 1000 -  -   1 -  -   10003 -  -  - 77.0 -  - 129.92 -  87,309,608 -  100,831,232

Results record counting clarified

Two columns in the results table indicate records counts: records-per-run and records-per-second. What does it mean?

Almost every task gets 1 in this count just for being executed. Task sequences aggregate the counts of their child tasks, plus their own count of 1. So, a task sequence containing 5 other task sequences, each running a single other task 10 times, would have a count of 1 + 5 * (1 + 10) = 56.

The traverse and retrieve tasks "count" more: a traverse task would add 1 for each traversed result (hit), and a retrieve task would additionally add 1 for each retrieved doc. So, regular Search would count 1, SearchTrav that traverses 10 hits would count 11, and a SearchTravRet task that retrieves (and traverses) 10, would count 21.

Confusing? this might help: always examine the elapsedSec column, and always compare "apples to apples", .i.e. it is interesting to check how the rec/s changed for the same task (or sequence) between two different runs, but it is not very useful to know how the rec/s differs between Search and SearchTrav tasks. For the latter, elapsedSec would bring more insight.


org.apache.lucene.benchmark.byTask Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.benchmark.byTask

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.benchmark.byTask.Benchmark
    • org.apache.lucene.benchmark.byTask.PerfRunData (implements java.io.Closeable)


Uses of Package org.apache.lucene.benchmark.byTask

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.benchmark.byTask

Packages that use org.apache.lucene.benchmark.byTask
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.benchmark.byTask.utils | Utilities used for the benchmark, and for the reports.

Classes in org.apache.lucene.benchmark.byTask used by org.apache.lucene.benchmark.byTask
PerfRunData
Data maintained by a performance test run.

Classes in org.apache.lucene.benchmark.byTask used by org.apache.lucene.benchmark.byTask.tasks
PerfRunData
Data maintained by a performance test run.

Classes in org.apache.lucene.benchmark.byTask used by org.apache.lucene.benchmark.byTask.utils
PerfRunData
Data maintained by a performance test run.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PerfRunData

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask
Class PerfRunData

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.PerfRunData
All Implemented Interfaces:
Closeable
public class PerfRunData
extends Object
implements Closeable

Data maintained by a performance test run.

Data includes:

  • Configuration.
  • Directory, Writer, Reader.
  • Taxonomy Directory, Writer, Reader.
  • DocMaker, FacetSource and a few instances of QueryMaker.
  • Analyzer.
  • Statistics data which updated during the run.
Config properties:
  • work.dir=<path to root of docs and index dirs| Default: work>
  • analyzer=<class name for analyzer| Default: StandardAnalyzer>
  • doc.maker=<class name for doc-maker| Default: DocMaker>
  • facet.source=<class name for facet-source| Default: RandomFacetSource>
  • query.maker=<class name for query-maker| Default: SimpleQueryMaker>
  • log.queries=<whether queries should be printed| Default: false>
  • directory=<type of directory to use for the index| Default: RAMDirectory>
  • taxonomy.directory=<type of directory for taxonomy index| Default: RAMDirectory>

Constructor Summary
PerfRunData(Config config)
Method Summary
void | close()
Analyzer | getAnalyzer()
Config | getConfig()
Directory | getDirectory()
DocMaker | getDocMaker() Returns the docMaker.
FacetSource | getFacetSource() Returns the facet source.
IndexReader | getIndexReader()
IndexSearcher | getIndexSearcher()
IndexWriter | getIndexWriter()
Locale | getLocale()
Object | getPerfObject(String key) Returns an object that was previously set by setPerfObject(String, Object).
Points | getPoints()
QueryMaker | getQueryMaker(ReadTask readTask)
long | getStartTimeMillis()
Directory | getTaxonomyDir()
TaxonomyReader | getTaxonomyReader()
TaxonomyWriter | getTaxonomyWriter()
void | reinit(boolean eraseIndex)
void | resetInputs()
void | setAnalyzer(Analyzer analyzer)
void | setDirectory(Directory directory)
void | setIndexReader(IndexReader indexReader) Set the index reader.
void | setIndexWriter(IndexWriter indexWriter)
void | setLocale(Locale locale)
void | setPerfObject(String key, Object obj) Sets an object that is required by PerfTasks, keyed by the given key.
long | setStartTimeMillis()
void | setTaxonomyReader(TaxonomyReader taxoReader) Set the taxonomy reader.
void | setTaxonomyWriter(TaxonomyWriter taxoWriter)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PerfRunData

public PerfRunData(Config config)
            throws Exception
Throws:
Exception
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException

reinit

public void reinit(boolean eraseIndex)
            throws Exception
Throws:
Exception

getPerfObject

public Object getPerfObject(String key)
Returns an object that was previously set by setPerfObject(String, Object).

setPerfObject

public void setPerfObject(String key,
                          Object obj)
Sets an object that is required by PerfTasks, keyed by the given key. If the object implements Closeable, it will be closed by close().

setStartTimeMillis

public long setStartTimeMillis()

getStartTimeMillis

public long getStartTimeMillis()
Returns:
Start time in milliseconds

getPoints

public Points getPoints()
Returns:
Returns the points.

getDirectory

public Directory getDirectory()
Returns:
Returns the directory.

setDirectory

public void setDirectory(Directory directory)
Parameters:
directory - The directory to set.

getTaxonomyDir

public Directory getTaxonomyDir()
Returns:
Returns the taxonomy directory

setTaxonomyReader

public void setTaxonomyReader(TaxonomyReader taxoReader)
                       throws IOException
Set the taxonomy reader. Takes ownership of that taxonomy reader, that is, internally performs taxoReader.incRef() (If caller no longer needs that reader it should decRef()/close() it after calling this method, otherwise, the reader will remain open).

Parameters:
taxoReader - The taxonomy reader to set.
Throws:
IOException

getTaxonomyReader

public TaxonomyReader getTaxonomyReader()
Returns:
Returns the taxonomyReader. NOTE: this returns a reference. You must call TaxonomyReader.decRef() when you're done.

setTaxonomyWriter

public void setTaxonomyWriter(TaxonomyWriter taxoWriter)
Parameters:
taxoWriter - The taxonomy writer to set.

getTaxonomyWriter

public TaxonomyWriter getTaxonomyWriter()

getIndexReader

public IndexReader getIndexReader()
Returns:
Returns the indexReader. NOTE: this returns a reference. You must call IndexReader.decRef() when you're done.

getIndexSearcher

public IndexSearcher getIndexSearcher()
Returns:
Returns the indexSearcher. NOTE: this returns a reference to the underlying IndexReader. You must call IndexReader.decRef() when you're done.

setIndexReader

public void setIndexReader(IndexReader indexReader)
                    throws IOException
Set the index reader. Takes ownership of that index reader, that is, internally performs indexReader.incRef() (If caller no longer needs that reader it should decRef()/close() it after calling this method, otherwise, the reader will remain open).

Parameters:
indexReader - The indexReader to set.
Throws:
IOException

getIndexWriter

public IndexWriter getIndexWriter()
Returns:
Returns the indexWriter.

setIndexWriter

public void setIndexWriter(IndexWriter indexWriter)
Parameters:
indexWriter - The indexWriter to set.

getAnalyzer

public Analyzer getAnalyzer()
Returns:
Returns the anlyzer.

setAnalyzer

public void setAnalyzer(Analyzer analyzer)

getDocMaker

public DocMaker getDocMaker()
Returns the docMaker.

getFacetSource

public FacetSource getFacetSource()
Returns the facet source.

getLocale

public Locale getLocale()
Returns:
the locale

setLocale

public void setLocale(Locale locale)
Parameters:
locale - the locale to set

getConfig

public Config getConfig()
Returns:
Returns the config.

resetInputs

public void resetInputs()
                 throws IOException
Throws:
IOException

getQueryMaker

public QueryMaker getQueryMaker(ReadTask readTask)
Returns:
Returns the queryMaker by read task type (class)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.benchmark.byTask.Benchmark

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.Benchmark

No usage of org.apache.lucene.benchmark.byTask.Benchmark

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.PerfRunData

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.PerfRunData

Packages that use PerfRunData
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.benchmark.byTask.utils | Utilities used for the benchmark, and for the reports.

Uses of PerfRunData in org.apache.lucene.benchmark.byTask

Methods in org.apache.lucene.benchmark.byTask that return PerfRunData
 PerfRunData Benchmark.getRunData()

Uses of PerfRunData in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks that return PerfRunData
 PerfRunData PerfTask.getRunData()

Methods in org.apache.lucene.benchmark.byTask.tasks with parameters of type PerfRunData
static IndexWriter | CreateIndexTask.configureWriter(Config config, PerfRunData runData, IndexWriterConfig.OpenMode mode, IndexCommit commit)
static IndexWriterConfig | CreateIndexTask.createWriterConfig(Config config, PerfRunData runData, IndexWriterConfig.OpenMode mode, IndexCommit commit)

Constructors in org.apache.lucene.benchmark.byTask.tasks with parameters of type PerfRunData
AddDocTask(PerfRunData runData)
AddFacetedDocTask(PerfRunData runData)
ClearStatsTask(PerfRunData runData)
CloseIndexTask(PerfRunData runData)
CloseReaderTask(PerfRunData runData)
CloseTaxonomyIndexTask(PerfRunData runData)
CloseTaxonomyReaderTask(PerfRunData runData)
CommitIndexTask(PerfRunData runData)
CommitTaxonomyIndexTask(PerfRunData runData)
ConsumeContentSourceTask(PerfRunData runData)
CreateIndexTask(PerfRunData runData)
CreateTaxonomyIndexTask(PerfRunData runData)
DeleteByPercentTask(PerfRunData runData)
DeleteDocTask(PerfRunData runData)
FlushReaderTask(PerfRunData runData)
ForceMergeTask(PerfRunData runData)
NearRealtimeReaderTask(PerfRunData runData)
NewAnalyzerTask(PerfRunData runData)
NewCollationAnalyzerTask(PerfRunData runData)
NewLocaleTask(PerfRunData runData)
Create a new Locale and set it it in the getRunData() for use by all future tasks.
NewRoundTask(PerfRunData runData)
NewShingleAnalyzerTask(PerfRunData runData)
OpenIndexTask(PerfRunData runData)
OpenReaderTask(PerfRunData runData)
OpenTaxonomyIndexTask(PerfRunData runData)
OpenTaxonomyReaderTask(PerfRunData runData)
PerfTask(PerfRunData runData)
PrintReaderTask(PerfRunData runData)
ReadTask(PerfRunData runData)
ReadTokensTask(PerfRunData runData)
ReopenReaderTask(PerfRunData runData)
RepAllTask(PerfRunData runData)
ReportTask(PerfRunData runData)
RepSelectByPrefTask(PerfRunData runData)
RepSumByNameRoundTask(PerfRunData runData)
RepSumByNameTask(PerfRunData runData)
RepSumByPrefRoundTask(PerfRunData runData)
RepSumByPrefTask(PerfRunData runData)
ResetInputsTask(PerfRunData runData)
ResetSystemEraseTask(PerfRunData runData)
ResetSystemSoftTask(PerfRunData runData)
RollbackIndexTask(PerfRunData runData)
SearchTask(PerfRunData runData)
SearchTravRetHighlightTask(PerfRunData runData)
SearchTravRetLoadFieldSelectorTask(PerfRunData runData)
SearchTravRetTask(PerfRunData runData)
SearchTravRetVectorHighlightTask(PerfRunData runData)
SearchTravTask(PerfRunData runData)
SearchWithCollectorTask(PerfRunData runData)
SearchWithSortTask(PerfRunData runData)
SetPropTask(PerfRunData runData)
TaskSequence(PerfRunData runData, String name, TaskSequence parent, boolean parallel)
UpdateDocTask(PerfRunData runData)
WaitForMergesTask(PerfRunData runData)
WaitTask(PerfRunData runData)
WarmTask(PerfRunData runData)
WriteLineDocTask(PerfRunData runData)

Uses of PerfRunData in org.apache.lucene.benchmark.byTask.utils

Constructors in org.apache.lucene.benchmark.byTask.utils with parameters of type PerfRunData
Algorithm(PerfRunData runData)
Read algorithm from file Property examined: alt.tasks.packages == comma separated list of alternate package names where tasks would be searched for, when not found in the default package (that of PerfTask Object.getClass()).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AbstractQueryMaker

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class AbstractQueryMaker

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
All Implemented Interfaces:
QueryMaker
Direct Known Subclasses:
EnwikiQueryMaker, FileBasedQueryMaker, ReutersQueryMaker, SimpleQueryMaker
public abstract class AbstractQueryMaker
extends Object
implements QueryMaker

Abstract base query maker. Each query maker should just implement the prepareQueries() method.

Field Summary
protected Config | config
protected int | qnum
protected Query[] | queries
Constructor Summary
AbstractQueryMaker()
Method Summary
Query | makeQuery() Create the next query
Query | makeQuery(int size) Create the next query, of the given size.
protected int | nextQnum()
protected abstract Query[] | prepareQueries()
String | printQueries() Print the queries
void | resetInputs() Reset inputs so that the test run would behave, input wise, as if it just started.
void | setConfig(Config config) Set the properties
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

qnum

protected int qnum

queries

protected Query[] queries

config

protected Config config
Constructor Detail

AbstractQueryMaker

public AbstractQueryMaker()
Method Detail

resetInputs

public void resetInputs()
Description copied from interface: QueryMaker
Reset inputs so that the test run would behave, input wise, as if it just started.

Specified by:
resetInputs in interface QueryMaker

prepareQueries

protected abstract Query[] prepareQueries()
                                   throws Exception
Throws:
Exception

setConfig

public void setConfig(Config config)
               throws Exception
Description copied from interface: QueryMaker
Set the properties

Specified by:
setConfig in interface QueryMaker
Throws:
Exception

printQueries

public String printQueries()
Description copied from interface: QueryMaker
Print the queries

Specified by:
printQueries in interface QueryMaker

makeQuery

public Query makeQuery()
                throws Exception
Description copied from interface: QueryMaker
Create the next query

Specified by:
makeQuery in interface QueryMaker
Throws:
Exception

nextQnum

protected int nextQnum()

makeQuery

public Query makeQuery(int size)
                throws Exception
Description copied from interface: QueryMaker
Create the next query, of the given size.

Specified by:
makeQuery in interface QueryMaker
Parameters:
size - the size of the query - number of terms, etc.
Throws:
Exception - if cannot make the query, or if size>0 was specified but this feature is not supported.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ContentItemsSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class ContentItemsSource

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
ContentSource, FacetSource
public abstract class ContentItemsSource
extends Object
implements Closeable

Base class for source of data for benchmarking

Keeps track of various statistics, such as how many data items were generated, size in bytes etc.

Supports the following configuration parameters:

  • content.source.forever - specifies whether to generate items forever (default=true).
  • content.source.verbose - specifies whether messages should be output by the content source (default=false).
  • content.source.encoding - specifies which encoding to use when reading the files of that content source. Certain implementations may define a default value if this parameter is not specified. (default=null).
  • content.source.log.step - specifies for how many items a message should be logged. If set to 0 it means no logging should occur. NOTE: if verbose is set to false, logging should not occur even if logStep is not 0 (default=0).

Field Summary
protected String | encoding
protected boolean | forever
protected int | logStep
protected boolean | verbose
Constructor Summary
ContentItemsSource()
Method Summary
protected void | addBytes(long numBytes) update count of bytes generated by this source
protected void | addItem() update count of items generated by this source
abstract void | close() Called when reading from this content source is no longer required.
protected void | collectFiles(File dir, ArrayList<File> files) A convenience method for collecting all the files of a content source from a given directory.
long | getBytesCount() Returns the number of bytes generated since last reset.
Config | getConfig()
int | getItemsCount() Returns the number of generated items since last reset.
long | getTotalBytesCount() Returns the total number of bytes that were generated by this source.
int | getTotalItemsCount() Returns the total number of generated items.
void | printStatistics(String itemsName)
void | resetInputs() Resets the input for this content source, so that the test would behave as if it was just started, input-wise.
void | setConfig(Config config) Sets the Config for this content source.
protected boolean | shouldLog() Returns true whether it's time to log a message (depending on verbose and the number of items generated).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

forever

protected boolean forever

logStep

protected int logStep

verbose

protected boolean verbose

encoding

protected String encoding
Constructor Detail

ContentItemsSource

public ContentItemsSource()
Method Detail

addBytes

protected final void addBytes(long numBytes)
update count of bytes generated by this source

addItem

protected final void addItem()
update count of items generated by this source

collectFiles

protected final void collectFiles(File dir,
                                  ArrayList<File> files)
A convenience method for collecting all the files of a content source from a given directory. The collected File instances are stored in the given files.

shouldLog

protected final boolean shouldLog()
Returns true whether it's time to log a message (depending on verbose and the number of items generated).

close

public abstract void close()
                    throws IOException
Called when reading from this content source is no longer required.

Specified by:
close in interface Closeable
Throws:
IOException

getBytesCount

public final long getBytesCount()
Returns the number of bytes generated since last reset.

getItemsCount

public final int getItemsCount()
Returns the number of generated items since last reset.

getConfig

public final Config getConfig()

getTotalBytesCount

public final long getTotalBytesCount()
Returns the total number of bytes that were generated by this source.

getTotalItemsCount

public final int getTotalItemsCount()
Returns the total number of generated items.

resetInputs

public void resetInputs()
                 throws IOException
Resets the input for this content source, so that the test would behave as if it was just started, input-wise.

NOTE: the default implementation resets the number of bytes and items generated since the last reset, so it's important to call super.resetInputs in case you override this method.

Throws:
IOException

setConfig

public void setConfig(Config config)
Sets the Config for this content source. If you override this method, you must call super.setConfig.

printStatistics

public void printStatistics(String itemsName)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ContentSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class ContentSource

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
        extended by  org.apache.lucene.benchmark.byTask.feeds.ContentSource
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
DirContentSource, EnwikiContentSource, LineDocSource, LongToEnglishContentSource, ReutersContentSource, SingleDocSource, TrecContentSource
public abstract class ContentSource
extends ContentItemsSource

Represents content from a specified source, such as TREC, Reuters etc. A ContentSource is responsible for creating DocData objects for its documents to be consumed by DocMaker. It also keeps track of various statistics, such as how many documents were generated, size in bytes etc.

For supported configuration parameters see ContentItemsSource.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
encoding, forever, logStep, verbose
Constructor Summary
ContentSource()
Method Summary
abstract  DocData getNextDocData(DocData docData)
Returns the next DocData from the content source.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
addBytes, addItem, close, collectFiles, getBytesCount, getConfig, getItemsCount, getTotalBytesCount, getTotalItemsCount, printStatistics, resetInputs, setConfig, shouldLog
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ContentSource

public ContentSource()
Method Detail

getNextDocData

public abstract DocData getNextDocData(DocData docData)
                                throws NoMoreDataException,
                                       IOException
Returns the next DocData from the content source. Implementations must account for multi-threading, as multiple threads can call this method simultaneously.

Throws:
NoMoreDataException
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DemoHTMLParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class DemoHTMLParser

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.DemoHTMLParser
All Implemented Interfaces:
HTMLParser
public class DemoHTMLParser
extends Object
implements HTMLParser

HTML Parser that is based on Lucene's demo HTML parser.

Constructor Summary
DemoHTMLParser()
Method Summary
 DocData parse(DocData docData, String name, Date date, String title, Reader reader, DateFormat dateFormat)
Parse the input Reader and return DocData.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DemoHTMLParser

public DemoHTMLParser()
Method Detail

parse

public DocData parse(DocData docData,
                     String name,
                     Date date,
                     String title,
                     Reader reader,
                     DateFormat dateFormat)
              throws IOException,
                     InterruptedException
Description copied from interface: HTMLParser
Parse the input Reader and return DocData. The provided name,title,date are used for the result, unless when they're null, in which case an attempt is made to set them from the parsed data.

Specified by:
parse in interface HTMLParser
Parameters:
docData - result reused
name - name of the result doc data.
date - date of the result doc data. If null, attempt to set by parsed data.
title - title of the result doc data. If null, attempt to set by parsed data.
reader - reader of html text to parse.
dateFormat - date formatter to use for extracting the date.
Returns:
Parsed doc data.
Throws:
IOException
InterruptedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DirContentSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class DirContentSource

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
        extended by  org.apache.lucene.benchmark.byTask.feeds.ContentSource
            extended by  org.apache.lucene.benchmark.byTask.feeds.DirContentSource
All Implemented Interfaces:
Closeable
public class DirContentSource
extends ContentSource

A ContentSource using the Dir collection for its input. Supports the following configuration parameters (on top of ContentSource):

  • work.dir - specifies the working directory. Required if "docs.dir" denotes a relative path (default=work).
  • docs.dir - specifies the directory the Dir collection. Can be set to a relative path if "work.dir" is also specified (default=dir-out).

Nested Class Summary
static class DirContentSource.Iterator
Iterator over the files in the directory
Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
encoding, forever, logStep, verbose
Constructor Summary
DirContentSource()
Method Summary
void | close() Called when reading from this content source is no longer required.
DocData | getNextDocData(DocData docData) Returns the next DocData from the content source.
void | resetInputs() Resets the input for this content source, so that the test would behave as if it was just started, input-wise.
void | setConfig(Config config) Sets the Config for this content source.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
addBytes, addItem, collectFiles, getBytesCount, getConfig, getItemsCount, getTotalBytesCount, getTotalItemsCount, printStatistics, shouldLog
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DirContentSource

public DirContentSource()
Method Detail

close

public void close()
           throws IOException
Description copied from class: ContentItemsSource
Called when reading from this content source is no longer required.

Specified by:
close in interface Closeable
Specified by:
close in class ContentItemsSource
Throws:
IOException

getNextDocData

public DocData getNextDocData(DocData docData)
                       throws NoMoreDataException,
                              IOException
Description copied from class: ContentSource
Returns the next DocData from the content source. Implementations must account for multi-threading, as multiple threads can call this method simultaneously.

Specified by:
getNextDocData in class ContentSource
Throws:
NoMoreDataException
IOException

resetInputs

public void resetInputs()
                 throws IOException
Description copied from class: ContentItemsSource
Resets the input for this content source, so that the test would behave as if it was just started, input-wise.

NOTE: the default implementation resets the number of bytes and items generated since the last reset, so it's important to call super.resetInputs in case you override this method.

Overrides:
resetInputs in class ContentItemsSource
Throws:
IOException

setConfig

public void setConfig(Config config)
Description copied from class: ContentItemsSource
Sets the Config for this content source. If you override this method, you must call super.setConfig.

Overrides:
setConfig in class ContentItemsSource
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DirContentSource.Iterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class DirContentSource.Iterator

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.DirContentSource.Iterator
All Implemented Interfaces:
Iterator<File>
Enclosing class:
DirContentSource
public static class DirContentSource.Iterator
extends Object
implements Iterator<File>

Iterator over the files in the directory

Constructor Summary
DirContentSource.Iterator(File f)
Method Summary
int | getCount()
boolean | hasNext()
File | next()
void | remove()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DirContentSource.Iterator

public DirContentSource.Iterator(File f)
Method Detail

getCount

public int getCount()

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<File>

next

public File next()
Specified by:
next in interface Iterator<File>

remove

public void remove()
Specified by:
remove in interface Iterator<File>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DocData

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class DocData

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.DocData

public class DocData
extends Object

Output of parsing (e.g. HTML parsing) of an input document.

Constructor Summary
DocData()
Method Summary
void | clear()
String | getBody()
String | getDate()
int | getID()
String | getName()
Properties | getProps()
String | getTitle()
void | setBody(String body)
void | setDate(Date date)
void | setDate(String date)
void | setID(int id)
void | setName(String name)
void | setProps(Properties props)
void | setTitle(String title)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DocData

public DocData()
Method Detail

clear

public void clear()

getBody

public String getBody()

getDate

public String getDate()
Returns:
the date. If the ctor with Date was called, then the String returned is the output of DateTools.dateToString(Date, org.apache.lucene.document.DateTools.Resolution) . Otherwise it's the String passed to the other ctor.

getName

public String getName()

getID

public int getID()

getProps

public Properties getProps()

getTitle

public String getTitle()

setBody

public void setBody(String body)

setDate

public void setDate(Date date)

setDate

public void setDate(String date)

setName

public void setName(String name)

setID

public void setID(int id)

setProps

public void setProps(Properties props)

setTitle

public void setTitle(String title)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DocMaker

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class DocMaker

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.DocMaker
All Implemented Interfaces:
Closeable
public class DocMaker
extends Object
implements Closeable

Creates Document objects. Uses a ContentSource to generate DocData objects. Supports the following parameters:

  • content.source - specifies the ContentSource class to use (default SingleDocSource).
  • doc.stored - specifies whether fields should be stored (default false).
  • doc.body.stored - specifies whether the body field should be stored (default = doc.stored).
  • doc.tokenized - specifies whether fields should be tokenized (default true).
  • doc.body.tokenized - specifies whether the body field should be tokenized (default = doc.tokenized).
  • doc.tokenized.norms - specifies whether norms should be stored in the index or not. (default false).
  • doc.body.tokenized.norms - specifies whether norms should be stored in the index for the body field. This can be set to true, while doc.tokenized.norms is set to false, to allow norms storing just for the body field. (default true).
  • doc.term.vector - specifies whether term vectors should be stored for fields (default false).
  • doc.term.vector.positions - specifies whether term vectors should be stored with positions (default false).
  • doc.term.vector.offsets - specifies whether term vectors should be stored with offsets (default false).
  • doc.store.body.bytes - specifies whether to store the raw bytes of the document's content in the document (default false).
  • doc.reuse.fields - specifies whether Field and Document objects should be reused (default true).
  • doc.index.props - specifies whether the properties returned by
  • doc.random.id.limit - if specified, docs will be assigned random IDs from 0 to this limit. This is useful with UpdateDoc for testing performance of IndexWriter.updateDocument. DocData.getProps() will be indexed. (default false).

Field Summary
static String | BODY_FIELD
protected Field.Index | bodyIndexVal
protected Field.Store | bodyStoreVal
static String | BYTES_FIELD
protected Config | config
static String | DATE_FIELD
static String | DATE_MSEC_FIELD
static String | ID_FIELD
protected boolean | indexProperties
protected Field.Index | indexVal
static String | NAME_FIELD
protected boolean | reuseFields
protected ContentSource | source
protected Field.Store | storeVal
protected Field.TermVector | termVecVal
static String | TIME_SEC_FIELD
static String | TITLE_FIELD
Constructor Summary
DocMaker()
Method Summary
void | close() Closes the DocMaker.
long | getBytesCount() Returns the number of bytes generated by the content source since last reset.
protected org.apache.lucene.benchmark.byTask.feeds.DocMaker.DocState | getDocState()
long | getTotalBytesCount() Returns the total number of bytes that were generated by the content source defined to that doc maker.
Document | makeDocument() Creates a Document object ready for indexing.
Document | makeDocument(int size) Same as makeDocument(), only this method creates a document of the given size input by size.
void | resetInputs() Reset inputs so that the test run would behave, input wise, as if it just started.
void | setConfig(Config config) Set the configuration parameters of this doc maker.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

BODY_FIELD

public static final String BODY_FIELD
See Also:
Constant Field Values

TITLE_FIELD

public static final String TITLE_FIELD
See Also:
Constant Field Values

DATE_FIELD

public static final String DATE_FIELD
See Also:
Constant Field Values

DATE_MSEC_FIELD

public static final String DATE_MSEC_FIELD
See Also:
Constant Field Values

TIME_SEC_FIELD

public static final String TIME_SEC_FIELD
See Also:
Constant Field Values

ID_FIELD

public static final String ID_FIELD
See Also:
Constant Field Values

BYTES_FIELD

public static final String BYTES_FIELD
See Also:
Constant Field Values

NAME_FIELD

public static final String NAME_FIELD
See Also:
Constant Field Values

config

protected Config config

storeVal

protected Field.Store storeVal

bodyStoreVal

protected Field.Store bodyStoreVal

indexVal

protected Field.Index indexVal

bodyIndexVal

protected Field.Index bodyIndexVal

termVecVal

protected Field.TermVector termVecVal

source

protected ContentSource source

reuseFields

protected boolean reuseFields

indexProperties

protected boolean indexProperties
Constructor Detail

DocMaker

public DocMaker()
Method Detail

getDocState

protected org.apache.lucene.benchmark.byTask.feeds.DocMaker.DocState getDocState()

close

public void close()
           throws IOException
Closes the DocMaker. The base implementation closes the ContentSource, and it can be overridden to do more work (but make sure to call super.close()).

Specified by:
close in interface Closeable
Throws:
IOException

getBytesCount

public long getBytesCount()
Returns the number of bytes generated by the content source since last reset.

getTotalBytesCount

public long getTotalBytesCount()
Returns the total number of bytes that were generated by the content source defined to that doc maker.

makeDocument

public Document makeDocument()
                      throws Exception
Creates a Document object ready for indexing. This method uses the ContentSource to get the next document from the source, and creates a Document object from the returned fields. If reuseFields was set to true, it will reuse Document and Field instances.

Throws:
Exception

makeDocument

public Document makeDocument(int size)
                      throws Exception
Same as makeDocument(), only this method creates a document of the given size input by size.

Throws:
Exception

resetInputs

public void resetInputs()
                 throws IOException
Reset inputs so that the test run would behave, input wise, as if it just started.

Throws:
IOException

setConfig

public void setConfig(Config config)
Set the configuration parameters of this doc maker.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EnwikiContentSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class EnwikiContentSource

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
        extended by  org.apache.lucene.benchmark.byTask.feeds.ContentSource
            extended by  org.apache.lucene.benchmark.byTask.feeds.EnwikiContentSource
All Implemented Interfaces:
Closeable
public class EnwikiContentSource
extends ContentSource

A ContentSource which reads the English Wikipedia dump. You can read the .bz2 file directly (it will be decompressed on the fly). Config properties:

  • keep.image.only.docs=false|true (default true).
  • docs.file=<path to the file>

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
encoding, forever, logStep, verbose
Constructor Summary
EnwikiContentSource()
Method Summary
void | close() Called when reading from this content source is no longer required.
DocData | getNextDocData(DocData docData) Returns the next DocData from the content source.
void | resetInputs() Resets the input for this content source, so that the test would behave as if it was just started, input-wise.
void | setConfig(Config config) Sets the Config for this content source.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
addBytes, addItem, collectFiles, getBytesCount, getConfig, getItemsCount, getTotalBytesCount, getTotalItemsCount, printStatistics, shouldLog
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EnwikiContentSource

public EnwikiContentSource()
Method Detail

close

public void close()
           throws IOException
Description copied from class: ContentItemsSource
Called when reading from this content source is no longer required.

Specified by:
close in interface Closeable
Specified by:
close in class ContentItemsSource
Throws:
IOException

getNextDocData

public DocData getNextDocData(DocData docData)
                       throws NoMoreDataException,
                              IOException
Description copied from class: ContentSource
Returns the next DocData from the content source. Implementations must account for multi-threading, as multiple threads can call this method simultaneously.

Specified by:
getNextDocData in class ContentSource
Throws:
NoMoreDataException
IOException

resetInputs

public void resetInputs()
                 throws IOException
Description copied from class: ContentItemsSource
Resets the input for this content source, so that the test would behave as if it was just started, input-wise.

NOTE: the default implementation resets the number of bytes and items generated since the last reset, so it's important to call super.resetInputs in case you override this method.

Overrides:
resetInputs in class ContentItemsSource
Throws:
IOException

setConfig

public void setConfig(Config config)
Description copied from class: ContentItemsSource
Sets the Config for this content source. If you override this method, you must call super.setConfig.

Overrides:
setConfig in class ContentItemsSource
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EnwikiQueryMaker

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class EnwikiQueryMaker

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
        extended by  org.apache.lucene.benchmark.byTask.feeds.EnwikiQueryMaker
All Implemented Interfaces:
QueryMaker
public class EnwikiQueryMaker
extends AbstractQueryMaker

A QueryMaker that uses common and uncommon actual Wikipedia queries for searching the English Wikipedia collection. 90 queries total.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
config, qnum, queries
Constructor Summary
EnwikiQueryMaker()
Method Summary
protected  Query[] prepareQueries()
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
makeQuery, makeQuery, nextQnum, printQueries, resetInputs, setConfig
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EnwikiQueryMaker

public EnwikiQueryMaker()
Method Detail

prepareQueries

protected Query[] prepareQueries()
                          throws Exception
Specified by:
prepareQueries in class AbstractQueryMaker
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FacetSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class FacetSource

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
        extended by  org.apache.lucene.benchmark.byTask.feeds.FacetSource
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
RandomFacetSource
public abstract class FacetSource
extends ContentItemsSource

Source items for facets.

For supported configuration parameters see ContentItemsSource.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
encoding, forever, logStep, verbose
Constructor Summary
FacetSource()
Method Summary
abstract CategoryContainer | getNextFacets(CategoryContainer facets) Returns the next facets content item.
void | resetInputs() Resets the input for this content source, so that the test would behave as if it was just started, input-wise.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
addBytes, addItem, close, collectFiles, getBytesCount, getConfig, getItemsCount, getTotalBytesCount, getTotalItemsCount, printStatistics, setConfig, shouldLog
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FacetSource

public FacetSource()
Method Detail

getNextFacets

public abstract CategoryContainer getNextFacets(CategoryContainer facets)
                                         throws NoMoreDataException,
                                                IOException
Returns the next facets content item. Implementations must account for multi-threading, as multiple threads can call this method simultaneously.

Throws:
NoMoreDataException
IOException

resetInputs

public void resetInputs()
                 throws IOException
Description copied from class: ContentItemsSource
Resets the input for this content source, so that the test would behave as if it was just started, input-wise.

NOTE: the default implementation resets the number of bytes and items generated since the last reset, so it's important to call super.resetInputs in case you override this method.

Overrides:
resetInputs in class ContentItemsSource
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileBasedQueryMaker

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class FileBasedQueryMaker

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
        extended by  org.apache.lucene.benchmark.byTask.feeds.FileBasedQueryMaker
All Implemented Interfaces:
QueryMaker
public class FileBasedQueryMaker
extends AbstractQueryMaker

Create queries from a FileReader. One per line, pass them through the QueryParser. Lines beginning with # are treated as comments File can be specified as a absolute, relative or resource. Two properties can be set: file.query.maker.file=<Full path to file containing queries>
file.query.maker.default.field=<Name of default field - Default value is "body"> Example: file.query.maker.file=c:/myqueries.txt file.query.maker.default.field=body

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
config, qnum, queries
Constructor Summary
FileBasedQueryMaker()
Method Summary
protected  Query[] prepareQueries()
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
makeQuery, makeQuery, nextQnum, printQueries, resetInputs, setConfig
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FileBasedQueryMaker

public FileBasedQueryMaker()
Method Detail

prepareQueries

protected Query[] prepareQueries()
                          throws Exception
Specified by:
prepareQueries in class AbstractQueryMaker
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HTMLParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Interface HTMLParser

All Known Implementing Classes:
DemoHTMLParser
public interface HTMLParser

HTML Parsing Interface for test purposes

Method Summary
 DocData parse(DocData docData, String name, Date date, String title, Reader reader, DateFormat dateFormat)
Parse the input Reader and return DocData.

Method Detail

parse

DocData parse(DocData docData,
              String name,
              Date date,
              String title,
              Reader reader,
              DateFormat dateFormat)
              throws IOException,
                     InterruptedException
Parse the input Reader and return DocData. The provided name,title,date are used for the result, unless when they're null, in which case an attempt is made to set them from the parsed data.

Parameters:
docData - result reused
name - name of the result doc data.
date - date of the result doc data. If null, attempt to set by parsed data.
title - title of the result doc data. If null, attempt to set by parsed data.
reader - reader of html text to parse.
dateFormat - date formatter to use for extracting the date.
Returns:
Parsed doc data.
Throws:
IOException
InterruptedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LineDocSource.HeaderLineParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class LineDocSource.HeaderLineParser

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.LineDocSource.LineParser
        extended by  org.apache.lucene.benchmark.byTask.feeds.LineDocSource.HeaderLineParser
Enclosing class:
LineDocSource
public static class LineDocSource.HeaderLineParser
extends LineDocSource.LineParser

LineDocSource.LineParser which sets field names and order by the header - any header - of the lines file. It is less efficient than LineDocSource.SimpleLineParser but more powerful.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.LineDocSource.LineParser
header
Constructor Summary
LineDocSource.HeaderLineParser(String[] header)
Method Summary
 void parseLine(DocData docData, String line)
parse an input line and fill doc data appropriately
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LineDocSource.HeaderLineParser

public LineDocSource.HeaderLineParser(String[] header)
Method Detail

parseLine

public void parseLine(DocData docData,
                      String line)
Description copied from class: LineDocSource.LineParser
parse an input line and fill doc data appropriately

Specified by:
parseLine in class LineDocSource.LineParser
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LineDocSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class LineDocSource

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
        extended by  org.apache.lucene.benchmark.byTask.feeds.ContentSource
            extended by  org.apache.lucene.benchmark.byTask.feeds.LineDocSource
All Implemented Interfaces:
Closeable
public class LineDocSource
extends ContentSource

A ContentSource reading one line at a time as a Document from a single file. This saves IO cost (over DirContentSource) of recursing through a directory and opening a new file for every document.
The expected format of each line is (arguments are separated by <TAB>): title, date, body. If a line is read in a different format, a RuntimeException will be thrown. In general, you should use this content source for files that were created with WriteLineDocTask.

Config properties:

  • docs.file=<path to the file>
  • content.source.encoding - default to UTF-8.
  • line.parser - default to LineDocSource.HeaderLineParser if a header line exists which differs from WriteLineDocTask.DEFAULT_FIELDS and to LineDocSource.SimpleLineParser otherwise.

Nested Class Summary
static class | LineDocSource.HeaderLineParser LineDocSource.LineParser which sets field names and order by the header - any header - of the lines file.
static class | LineDocSource.LineParser Reader of a single input line into DocData.
static class | LineDocSource.SimpleLineParser LineDocSource.LineParser which ignores the header passed to its constructor and assumes simply that field names and their order are the same as in WriteLineDocTask.DEFAULT_FIELDS
Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
encoding, forever, logStep, verbose
Constructor Summary
LineDocSource()
Method Summary
void | close() Called when reading from this content source is no longer required.
DocData | getNextDocData(DocData docData) Returns the next DocData from the content source.
void | resetInputs() Resets the input for this content source, so that the test would behave as if it was just started, input-wise.
void | setConfig(Config config) Sets the Config for this content source.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
addBytes, addItem, collectFiles, getBytesCount, getConfig, getItemsCount, getTotalBytesCount, getTotalItemsCount, printStatistics, shouldLog
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LineDocSource

public LineDocSource()
Method Detail

close

public void close()
           throws IOException
Description copied from class: ContentItemsSource
Called when reading from this content source is no longer required.

Specified by:
close in interface Closeable
Specified by:
close in class ContentItemsSource
Throws:
IOException

getNextDocData

public DocData getNextDocData(DocData docData)
                       throws NoMoreDataException,
                              IOException
Description copied from class: ContentSource
Returns the next DocData from the content source. Implementations must account for multi-threading, as multiple threads can call this method simultaneously.

Specified by:
getNextDocData in class ContentSource
Throws:
NoMoreDataException
IOException

resetInputs

public void resetInputs()
                 throws IOException
Description copied from class: ContentItemsSource
Resets the input for this content source, so that the test would behave as if it was just started, input-wise.

NOTE: the default implementation resets the number of bytes and items generated since the last reset, so it's important to call super.resetInputs in case you override this method.

Overrides:
resetInputs in class ContentItemsSource
Throws:
IOException

setConfig

public void setConfig(Config config)
Description copied from class: ContentItemsSource
Sets the Config for this content source. If you override this method, you must call super.setConfig.

Overrides:
setConfig in class ContentItemsSource
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LineDocSource.LineParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class LineDocSource.LineParser

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.LineDocSource.LineParser
Direct Known Subclasses:
LineDocSource.HeaderLineParser, LineDocSource.SimpleLineParser
Enclosing class:
LineDocSource
public abstract static class LineDocSource.LineParser
extends Object

Reader of a single input line into DocData.

Field Summary
protected  String[] header
Constructor Summary
LineDocSource.LineParser(String[] header)
Construct with the header
Method Summary
abstract  void parseLine(DocData docData, String line)
parse an input line and fill doc data appropriately
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

header

protected final String[] header
Constructor Detail

LineDocSource.LineParser

public LineDocSource.LineParser(String[] header)
Construct with the header

Parameters:
header - header line found in the input file, or null if none
Method Detail

parseLine

public abstract void parseLine(DocData docData,
                               String line)
parse an input line and fill doc data appropriately

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LineDocSource.SimpleLineParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class LineDocSource.SimpleLineParser

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.LineDocSource.LineParser
        extended by  org.apache.lucene.benchmark.byTask.feeds.LineDocSource.SimpleLineParser
Enclosing class:
LineDocSource
public static class LineDocSource.SimpleLineParser
extends LineDocSource.LineParser

LineDocSource.LineParser which ignores the header passed to its constructor and assumes simply that field names and their order are the same as in WriteLineDocTask.DEFAULT_FIELDS

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.LineDocSource.LineParser
header
Constructor Summary
LineDocSource.SimpleLineParser(String[] header)
Method Summary
 void parseLine(DocData docData, String line)
parse an input line and fill doc data appropriately
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LineDocSource.SimpleLineParser

public LineDocSource.SimpleLineParser(String[] header)
Method Detail

parseLine

public void parseLine(DocData docData,
                      String line)
Description copied from class: LineDocSource.LineParser
parse an input line and fill doc data appropriately

Specified by:
parseLine in class LineDocSource.LineParser
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LongToEnglishContentSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class LongToEnglishContentSource

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
        extended by  org.apache.lucene.benchmark.byTask.feeds.ContentSource
            extended by  org.apache.lucene.benchmark.byTask.feeds.LongToEnglishContentSource
All Implemented Interfaces:
Closeable
public class LongToEnglishContentSource
extends ContentSource

Creates documents whose content is a long number starting from Long.MIN_VALUE + 10.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
encoding, forever, logStep, verbose
Constructor Summary
LongToEnglishContentSource()
Method Summary
void | close() Called when reading from this content source is no longer required.
DocData | getNextDocData(DocData docData) Returns the next DocData from the content source.
void | resetInputs() Resets the input for this content source, so that the test would behave as if it was just started, input-wise.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
addBytes, addItem, collectFiles, getBytesCount, getConfig, getItemsCount, getTotalBytesCount, getTotalItemsCount, printStatistics, setConfig, shouldLog
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LongToEnglishContentSource

public LongToEnglishContentSource()
Method Detail

close

public void close()
           throws IOException
Description copied from class: ContentItemsSource
Called when reading from this content source is no longer required.

Specified by:
close in interface Closeable
Specified by:
close in class ContentItemsSource
Throws:
IOException

getNextDocData

public DocData getNextDocData(DocData docData)
                       throws NoMoreDataException,
                              IOException
Description copied from class: ContentSource
Returns the next DocData from the content source. Implementations must account for multi-threading, as multiple threads can call this method simultaneously.

Specified by:
getNextDocData in class ContentSource
Throws:
NoMoreDataException
IOException

resetInputs

public void resetInputs()
                 throws IOException
Description copied from class: ContentItemsSource
Resets the input for this content source, so that the test would behave as if it was just started, input-wise.

NOTE: the default implementation resets the number of bytes and items generated since the last reset, so it's important to call super.resetInputs in case you override this method.

Overrides:
resetInputs in class ContentItemsSource
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LongToEnglishQueryMaker

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class LongToEnglishQueryMaker

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.LongToEnglishQueryMaker
All Implemented Interfaces:
QueryMaker
public class LongToEnglishQueryMaker
extends Object
implements QueryMaker

Creates queries whose content is a spelled-out long number starting from Long.MIN_VALUE + 10.

Field Summary
protected  QueryParser parser
Constructor Summary
LongToEnglishQueryMaker()
Method Summary
Query | makeQuery() Create the next query
Query | makeQuery(int size) Create the next query, of the given size.
String | printQueries() Print the queries
void | resetInputs() Reset inputs so that the test run would behave, input wise, as if it just started.
void | setConfig(Config config) Set the properties
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

parser

protected QueryParser parser
Constructor Detail

LongToEnglishQueryMaker

public LongToEnglishQueryMaker()
Method Detail

makeQuery

public Query makeQuery(int size)
                throws Exception
Description copied from interface: QueryMaker
Create the next query, of the given size.

Specified by:
makeQuery in interface QueryMaker
Parameters:
size - the size of the query - number of terms, etc.
Throws:
Exception - if cannot make the query, or if size>0 was specified but this feature is not supported.

makeQuery

public Query makeQuery()
                throws Exception
Description copied from interface: QueryMaker
Create the next query

Specified by:
makeQuery in interface QueryMaker
Throws:
Exception

setConfig

public void setConfig(Config config)
               throws Exception
Description copied from interface: QueryMaker
Set the properties

Specified by:
setConfig in interface QueryMaker
Throws:
Exception

resetInputs

public void resetInputs()
Description copied from interface: QueryMaker
Reset inputs so that the test run would behave, input wise, as if it just started.

Specified by:
resetInputs in interface QueryMaker

printQueries

public String printQueries()
Description copied from interface: QueryMaker
Print the queries

Specified by:
printQueries in interface QueryMaker
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoMoreDataException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class NoMoreDataException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  org.apache.lucene.benchmark.byTask.feeds.NoMoreDataException
All Implemented Interfaces:
Serializable
public class NoMoreDataException
extends Exception

Exception indicating there is no more data. Thrown by Docs Makers if doc.maker.forever is false and docs sources of that maker where exhausted. This is useful for iterating all document of a source, in case we don't know in advance how many docs there are.

See Also:
Serialized Form

Constructor Summary
NoMoreDataException()
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoMoreDataException

public NoMoreDataException()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.benchmark.byTask.feeds
Interfaces
HTMLParser
QueryMaker
Classes
AbstractQueryMaker
ContentItemsSource
ContentSource
DemoHTMLParser
DirContentSource
DirContentSource.Iterator
DocData
DocMaker
EnwikiContentSource
EnwikiQueryMaker
FacetSource
FileBasedQueryMaker
LineDocSource
LineDocSource.HeaderLineParser
LineDocSource.LineParser
LineDocSource.SimpleLineParser
LongToEnglishContentSource
LongToEnglishQueryMaker
RandomFacetSource
ReutersContentSource
ReutersQueryMaker
SimpleQueryMaker
SimpleSloppyPhraseQueryMaker
SingleDocSource
SortableSingleDocSource
TrecContentSource
TrecDocParser
TrecFBISParser
TrecFR94Parser
TrecFTParser
TrecGov2Parser
TrecLATimesParser
TrecParserByPath
Enums
TrecDocParser.ParsePathType
Exceptions
NoMoreDataException


org.apache.lucene.benchmark.byTask.feeds

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.benchmark.byTask.feeds

Sources for benchmark inputs: documents and queries.

See:
Description

Interface Summary
HTMLParser | HTML Parsing Interface for test purposes
QueryMaker | Create queries for the test.

Class Summary
AbstractQueryMaker | Abstract base query maker.
ContentItemsSource | Base class for source of data for benchmarking
ContentSource | Represents content from a specified source, such as TREC, Reuters etc.
DemoHTMLParser | HTML Parser that is based on Lucene's demo HTML parser.
DirContentSource | A ContentSource using the Dir collection for its input.
DirContentSource.Iterator | Iterator over the files in the directory
DocData | Output of parsing (e.g.
DocMaker | Creates Document objects.
EnwikiContentSource | A ContentSource which reads the English Wikipedia dump.
EnwikiQueryMaker | A QueryMaker that uses common and uncommon actual Wikipedia queries for searching the English Wikipedia collection.
FacetSource | Source items for facets.
FileBasedQueryMaker | Create queries from a FileReader.
LineDocSource | A ContentSource reading one line at a time as a Document from a single file.
LineDocSource.HeaderLineParser | LineDocSource.LineParser which sets field names and order by the header - any header - of the lines file.
LineDocSource.LineParser | Reader of a single input line into DocData.
LineDocSource.SimpleLineParser | LineDocSource.LineParser which ignores the header passed to its constructor and assumes simply that field names and their order are the same as in WriteLineDocTask.DEFAULT_FIELDS
LongToEnglishContentSource | Creates documents whose content is a long number starting from Long.MIN_VALUE + 10.
LongToEnglishQueryMaker | Creates queries whose content is a spelled-out long number starting from Long.MIN_VALUE + 10.
RandomFacetSource | Simple implementation of a random facet source
ReutersContentSource | A ContentSource reading from the Reuters collection.
ReutersQueryMaker | A QueryMaker that makes queries devised manually (by Grant Ingersoll) for searching in the Reuters collection.
SimpleQueryMaker | A QueryMaker that makes queries for a collection created using SingleDocSource.
SimpleSloppyPhraseQueryMaker | Create sloppy phrase queries for performance test, in an index created using simple doc maker.
SingleDocSource | Creates the same document each time SingleDocSource.getNextDocData(DocData) is called.
SortableSingleDocSource | Adds fields appropriate for sorting: country, random_string and sort_field (int).
TrecContentSource | Implements a ContentSource over the TREC collection.
TrecDocParser | Parser for trec doc content, invoked on doc text excluding and which are handled in TrecContentSource.
TrecFBISParser | Parser for the FBIS docs in trec disks 4+5 collection format
TrecFR94Parser | Parser for the FR94 docs in trec disks 4+5 collection format
TrecFTParser | Parser for the FT docs in trec disks 4+5 collection format
TrecGov2Parser | Parser for the GOV2 collection format
TrecLATimesParser | Parser for the FT docs in trec disks 4+5 collection format
TrecParserByPath | Parser for trec docs which selects the parser to apply according to the source files path, defaulting to TrecGov2Parser.

Enum Summary
TrecDocParser.ParsePathType Types of trec parse paths,

Exception Summary
NoMoreDataException Exception indicating there is no more data.

Package org.apache.lucene.benchmark.byTask.feeds Description

Sources for benchmark inputs: documents and queries.


org.apache.lucene.benchmark.byTask.feeds Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.benchmark.byTask.feeds

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker (implements org.apache.lucene.benchmark.byTask.feeds.QueryMaker)
      • org.apache.lucene.benchmark.byTask.feeds.EnwikiQueryMaker
      • org.apache.lucene.benchmark.byTask.feeds.FileBasedQueryMaker
      • org.apache.lucene.benchmark.byTask.feeds.ReutersQueryMaker (implements org.apache.lucene.benchmark.byTask.feeds.QueryMaker)
      • org.apache.lucene.benchmark.byTask.feeds.SimpleQueryMaker
        • org.apache.lucene.benchmark.byTask.feeds.SimpleSloppyPhraseQueryMaker
    • org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource (implements java.io.Closeable)
      • org.apache.lucene.benchmark.byTask.feeds.ContentSource
        • org.apache.lucene.benchmark.byTask.feeds.DirContentSource
        • org.apache.lucene.benchmark.byTask.feeds.EnwikiContentSource
        • org.apache.lucene.benchmark.byTask.feeds.LineDocSource
        • org.apache.lucene.benchmark.byTask.feeds.LongToEnglishContentSource
        • org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource
        • org.apache.lucene.benchmark.byTask.feeds.SingleDocSource
          • org.apache.lucene.benchmark.byTask.feeds.SortableSingleDocSource
        • org.apache.lucene.benchmark.byTask.feeds.TrecContentSource
      • org.apache.lucene.benchmark.byTask.feeds.FacetSource
        • org.apache.lucene.benchmark.byTask.feeds.RandomFacetSource
    • org.apache.lucene.benchmark.byTask.feeds.DemoHTMLParser (implements org.apache.lucene.benchmark.byTask.feeds.HTMLParser)
    • org.apache.lucene.benchmark.byTask.feeds.DirContentSource.Iterator (implements java.util.Iterator<E>)
    • org.apache.lucene.benchmark.byTask.feeds.DocData
    • org.apache.lucene.benchmark.byTask.feeds.DocMaker (implements java.io.Closeable)
    • org.apache.lucene.benchmark.byTask.feeds.LineDocSource.LineParser
      • org.apache.lucene.benchmark.byTask.feeds.LineDocSource.HeaderLineParser
      • org.apache.lucene.benchmark.byTask.feeds.LineDocSource.SimpleLineParser
    • org.apache.lucene.benchmark.byTask.feeds.LongToEnglishQueryMaker (implements org.apache.lucene.benchmark.byTask.feeds.QueryMaker)
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.apache.lucene.benchmark.byTask.feeds.NoMoreDataException
    • org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
      • org.apache.lucene.benchmark.byTask.feeds.TrecFBISParser
      • org.apache.lucene.benchmark.byTask.feeds.TrecFR94Parser
      • org.apache.lucene.benchmark.byTask.feeds.TrecFTParser
      • org.apache.lucene.benchmark.byTask.feeds.TrecGov2Parser
      • org.apache.lucene.benchmark.byTask.feeds.TrecLATimesParser
      • org.apache.lucene.benchmark.byTask.feeds.TrecParserByPath

Interface Hierarchy

  • org.apache.lucene.benchmark.byTask.feeds.HTMLParser
  • org.apache.lucene.benchmark.byTask.feeds.QueryMaker

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.benchmark.byTask.feeds.TrecDocParser.ParsePathType


Uses of Package org.apache.lucene.benchmark.byTask.feeds

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.benchmark.byTask.feeds

Packages that use org.apache.lucene.benchmark.byTask.feeds
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.benchmark.utils | Benchmark Utility functions.

Classes in org.apache.lucene.benchmark.byTask.feeds used by org.apache.lucene.benchmark.byTask
DocMaker
Creates Document objects.
FacetSource
Source items for facets.
QueryMaker
Create queries for the test.

Classes in org.apache.lucene.benchmark.byTask.feeds used by org.apache.lucene.benchmark.byTask.feeds
AbstractQueryMaker
Abstract base query maker.
ContentItemsSource
Base class for source of data for benchmarking
ContentSource
Represents content from a specified source, such as TREC, Reuters etc.
DocData
Output of parsing (e.g.
FacetSource
Source items for facets.
HTMLParser
HTML Parsing Interface for test purposes
LineDocSource.LineParser
Reader of a single input line into DocData.
NoMoreDataException
Exception indicating there is no more data.
QueryMaker
Create queries for the test.
SimpleQueryMaker
A QueryMaker that makes queries for a collection created using SingleDocSource.
SingleDocSource
Creates the same document each time SingleDocSource.getNextDocData(DocData) is called.
TrecContentSource
Implements a ContentSource over the TREC collection.
TrecDocParser
Parser for trec doc content, invoked on doc text excluding and which are handled in TrecContentSource.
TrecDocParser.ParsePathType
Types of trec parse paths,

Classes in org.apache.lucene.benchmark.byTask.feeds used by org.apache.lucene.benchmark.byTask.tasks
QueryMaker
Create queries for the test.

Classes in org.apache.lucene.benchmark.byTask.feeds used by org.apache.lucene.benchmark.utils
DocMaker
Creates Document objects.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


QueryMaker

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Interface QueryMaker

All Known Implementing Classes:
AbstractQueryMaker, EnwikiQueryMaker, FileBasedQueryMaker, LongToEnglishQueryMaker, ReutersQueryMaker, SimpleQueryMaker, SimpleSloppyPhraseQueryMaker
public interface QueryMaker

Create queries for the test.

Method Summary
Query | makeQuery() Create the next query
Query | makeQuery(int size) Create the next query, of the given size.
String | printQueries() Print the queries
void | resetInputs() Reset inputs so that the test run would behave, input wise, as if it just started.
void | setConfig(Config config) Set the properties

Method Detail

makeQuery

Query makeQuery(int size)
                throws Exception
Create the next query, of the given size.

Parameters:
size - the size of the query - number of terms, etc.
Throws:
Exception - if cannot make the query, or if size>0 was specified but this feature is not supported.

makeQuery

Query makeQuery()
                throws Exception
Create the next query

Throws:
Exception

setConfig

void setConfig(Config config)
               throws Exception
Set the properties

Throws:
Exception

resetInputs

void resetInputs()
Reset inputs so that the test run would behave, input wise, as if it just started.

printQueries

String printQueries()
Print the queries

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RandomFacetSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class RandomFacetSource

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
        extended by  org.apache.lucene.benchmark.byTask.feeds.FacetSource
            extended by  org.apache.lucene.benchmark.byTask.feeds.RandomFacetSource
All Implemented Interfaces:
Closeable
public class RandomFacetSource
extends FacetSource

Simple implementation of a random facet source

Supports the following parameters:

  • rand.seed - defines the seed to initialize Random with (default: 13).
  • max.doc.facets - maximal #facets per doc (default: 10). Actual number of facets in a certain doc would be anything between 1 and that number.
  • max.facet.depth - maximal #components in a facet (default: 3). Actual number of components in a certain facet would be anything between 1 and that number.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
encoding, forever, logStep, verbose
Constructor Summary
RandomFacetSource()
Method Summary
void | close() Called when reading from this content source is no longer required.
CategoryContainer | getNextFacets(CategoryContainer facets) Returns the next facets content item.
void | setConfig(Config config) Sets the Config for this content source.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.FacetSource
resetInputs
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
addBytes, addItem, collectFiles, getBytesCount, getConfig, getItemsCount, getTotalBytesCount, getTotalItemsCount, printStatistics, shouldLog
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RandomFacetSource

public RandomFacetSource()
Method Detail

getNextFacets

public CategoryContainer getNextFacets(CategoryContainer facets)
                                throws NoMoreDataException,
                                       IOException
Description copied from class: FacetSource
Returns the next facets content item. Implementations must account for multi-threading, as multiple threads can call this method simultaneously.

Specified by:
getNextFacets in class FacetSource
Throws:
NoMoreDataException
IOException

close

public void close()
           throws IOException
Description copied from class: ContentItemsSource
Called when reading from this content source is no longer required.

Specified by:
close in interface Closeable
Specified by:
close in class ContentItemsSource
Throws:
IOException

setConfig

public void setConfig(Config config)
Description copied from class: ContentItemsSource
Sets the Config for this content source. If you override this method, you must call super.setConfig.

Overrides:
setConfig in class ContentItemsSource
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReutersContentSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class ReutersContentSource

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
        extended by  org.apache.lucene.benchmark.byTask.feeds.ContentSource
            extended by  org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource
All Implemented Interfaces:
Closeable
public class ReutersContentSource
extends ContentSource

A ContentSource reading from the Reuters collection.

Config properties:

  • work.dir - path to the root of docs and indexes dirs (default work).
  • docs.dir - path to the docs dir (default reuters-out).

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
encoding, forever, logStep, verbose
Constructor Summary
ReutersContentSource()
Method Summary
void | close() Called when reading from this content source is no longer required.
DocData | getNextDocData(DocData docData) Returns the next DocData from the content source.
void | resetInputs() Resets the input for this content source, so that the test would behave as if it was just started, input-wise.
void | setConfig(Config config) Sets the Config for this content source.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
addBytes, addItem, collectFiles, getBytesCount, getConfig, getItemsCount, getTotalBytesCount, getTotalItemsCount, printStatistics, shouldLog
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ReutersContentSource

public ReutersContentSource()
Method Detail

setConfig

public void setConfig(Config config)
Description copied from class: ContentItemsSource
Sets the Config for this content source. If you override this method, you must call super.setConfig.

Overrides:
setConfig in class ContentItemsSource

close

public void close()
           throws IOException
Description copied from class: ContentItemsSource
Called when reading from this content source is no longer required.

Specified by:
close in interface Closeable
Specified by:
close in class ContentItemsSource
Throws:
IOException

getNextDocData

public DocData getNextDocData(DocData docData)
                       throws NoMoreDataException,
                              IOException
Description copied from class: ContentSource
Returns the next DocData from the content source. Implementations must account for multi-threading, as multiple threads can call this method simultaneously.

Specified by:
getNextDocData in class ContentSource
Throws:
NoMoreDataException
IOException

resetInputs

public void resetInputs()
                 throws IOException
Description copied from class: ContentItemsSource
Resets the input for this content source, so that the test would behave as if it was just started, input-wise.

NOTE: the default implementation resets the number of bytes and items generated since the last reset, so it's important to call super.resetInputs in case you override this method.

Overrides:
resetInputs in class ContentItemsSource
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReutersQueryMaker

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class ReutersQueryMaker

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
        extended by  org.apache.lucene.benchmark.byTask.feeds.ReutersQueryMaker
All Implemented Interfaces:
QueryMaker
public class ReutersQueryMaker
extends AbstractQueryMaker
implements QueryMaker

A QueryMaker that makes queries devised manually (by Grant Ingersoll) for searching in the Reuters collection.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
config, qnum, queries
Constructor Summary
ReutersQueryMaker()
Method Summary
protected  Query[] prepareQueries()
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
makeQuery, makeQuery, nextQnum, printQueries, resetInputs, setConfig
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.benchmark.byTask.feeds.QueryMaker
makeQuery, makeQuery, printQueries, resetInputs, setConfig

Constructor Detail

ReutersQueryMaker

public ReutersQueryMaker()
Method Detail

prepareQueries

protected Query[] prepareQueries()
                          throws Exception
Specified by:
prepareQueries in class AbstractQueryMaker
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleQueryMaker

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class SimpleQueryMaker

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
        extended by  org.apache.lucene.benchmark.byTask.feeds.SimpleQueryMaker
All Implemented Interfaces:
QueryMaker
Direct Known Subclasses:
SimpleSloppyPhraseQueryMaker
public class SimpleQueryMaker
extends AbstractQueryMaker

A QueryMaker that makes queries for a collection created using SingleDocSource.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
config, qnum, queries
Constructor Summary
SimpleQueryMaker()
Method Summary
protected  Query[] prepareQueries()
Prepare the queries for this test.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
makeQuery, makeQuery, nextQnum, printQueries, resetInputs, setConfig
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SimpleQueryMaker

public SimpleQueryMaker()
Method Detail

prepareQueries

protected Query[] prepareQueries()
                          throws Exception
Prepare the queries for this test. Extending classes can override this method for preparing different queries.

Specified by:
prepareQueries in class AbstractQueryMaker
Returns:
prepared queries.
Throws:
Exception - if cannot prepare the queries.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleSloppyPhraseQueryMaker

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class SimpleSloppyPhraseQueryMaker

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
        extended by  org.apache.lucene.benchmark.byTask.feeds.SimpleQueryMaker
            extended by  org.apache.lucene.benchmark.byTask.feeds.SimpleSloppyPhraseQueryMaker
All Implemented Interfaces:
QueryMaker
public class SimpleSloppyPhraseQueryMaker
extends SimpleQueryMaker

Create sloppy phrase queries for performance test, in an index created using simple doc maker.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
config, qnum, queries
Constructor Summary
SimpleSloppyPhraseQueryMaker()
Method Summary
protected  Query[] prepareQueries()
Prepare the queries for this test.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker
makeQuery, makeQuery, nextQnum, printQueries, resetInputs, setConfig
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SimpleSloppyPhraseQueryMaker

public SimpleSloppyPhraseQueryMaker()
Method Detail

prepareQueries

protected Query[] prepareQueries()
                          throws Exception
Description copied from class: SimpleQueryMaker
Prepare the queries for this test. Extending classes can override this method for preparing different queries.

Overrides:
prepareQueries in class SimpleQueryMaker
Returns:
prepared queries.
Throws:
Exception - if cannot prepare the queries.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SingleDocSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class SingleDocSource

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
        extended by  org.apache.lucene.benchmark.byTask.feeds.ContentSource
            extended by  org.apache.lucene.benchmark.byTask.feeds.SingleDocSource
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
SortableSingleDocSource
public class SingleDocSource
extends ContentSource

Creates the same document each time getNextDocData(DocData) is called.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
encoding, forever, logStep, verbose
Constructor Summary
SingleDocSource()
Method Summary
void | close() Called when reading from this content source is no longer required.
DocData | getNextDocData(DocData docData) Returns the next DocData from the content source.
void | resetInputs() Resets the input for this content source, so that the test would behave as if it was just started, input-wise.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
addBytes, addItem, collectFiles, getBytesCount, getConfig, getItemsCount, getTotalBytesCount, getTotalItemsCount, printStatistics, setConfig, shouldLog
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SingleDocSource

public SingleDocSource()
Method Detail

close

public void close()
           throws IOException
Description copied from class: ContentItemsSource
Called when reading from this content source is no longer required.

Specified by:
close in interface Closeable
Specified by:
close in class ContentItemsSource
Throws:
IOException

getNextDocData

public DocData getNextDocData(DocData docData)
                       throws NoMoreDataException
Description copied from class: ContentSource
Returns the next DocData from the content source. Implementations must account for multi-threading, as multiple threads can call this method simultaneously.

Specified by:
getNextDocData in class ContentSource
Throws:
NoMoreDataException

resetInputs

public void resetInputs()
                 throws IOException
Description copied from class: ContentItemsSource
Resets the input for this content source, so that the test would behave as if it was just started, input-wise.

NOTE: the default implementation resets the number of bytes and items generated since the last reset, so it's important to call super.resetInputs in case you override this method.

Overrides:
resetInputs in class ContentItemsSource
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SortableSingleDocSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class SortableSingleDocSource

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
        extended by  org.apache.lucene.benchmark.byTask.feeds.ContentSource
            extended by  org.apache.lucene.benchmark.byTask.feeds.SingleDocSource
                extended by  org.apache.lucene.benchmark.byTask.feeds.SortableSingleDocSource
All Implemented Interfaces:
Closeable
public class SortableSingleDocSource
extends SingleDocSource

Adds fields appropriate for sorting: country, random_string and sort_field (int). Supports the following parameters:

  • sort.rng - defines the range for sort-by-int field (default 20000).
  • rand.seed - defines the seed to initialize Random with (default 13).

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
encoding, forever, logStep, verbose
Constructor Summary
SortableSingleDocSource()
Method Summary
DocData | getNextDocData(DocData docData) Returns the next DocData from the content source.
void | setConfig(Config config) Sets the Config for this content source.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.SingleDocSource
close, resetInputs
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
addBytes, addItem, collectFiles, getBytesCount, getConfig, getItemsCount, getTotalBytesCount, getTotalItemsCount, printStatistics, shouldLog
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SortableSingleDocSource

public SortableSingleDocSource()
Method Detail

getNextDocData

public DocData getNextDocData(DocData docData)
                       throws NoMoreDataException
Description copied from class: ContentSource
Returns the next DocData from the content source. Implementations must account for multi-threading, as multiple threads can call this method simultaneously.

Overrides:
getNextDocData in class SingleDocSource
Throws:
NoMoreDataException

setConfig

public void setConfig(Config config)
Description copied from class: ContentItemsSource
Sets the Config for this content source. If you override this method, you must call super.setConfig.

Overrides:
setConfig in class ContentItemsSource
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TrecContentSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class TrecContentSource

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
        extended by  org.apache.lucene.benchmark.byTask.feeds.ContentSource
            extended by  org.apache.lucene.benchmark.byTask.feeds.TrecContentSource
All Implemented Interfaces:
Closeable
public class TrecContentSource
extends ContentSource

Implements a ContentSource over the TREC collection.

Supports the following configuration parameters (on top of ContentSource):

  • work.dir - specifies the working directory. Required if "docs.dir" denotes a relative path (default=work).
  • docs.dir - specifies the directory where the TREC files reside. Can be set to a relative path if "work.dir" is also specified (default=trec).
  • trec.doc.parser - specifies the TrecDocParser class to use for parsing the TREC documents content (default=TrecGov2Parser).
  • html.parser - specifies the HTMLParser class to use for parsing the HTML parts of the TREC documents content (default=DemoHTMLParser).
  • content.source.encoding - if not specified, ISO-8859-1 is used.
  • content.source.excludeIteration - if true, do not append iteration number to docname

Field Summary
static String | DOC
static String | DOCNO
static String | NEW_LINE separator between lines in the byffer
static String | TERMINATING_DOC
static String | TERMINATING_DOCNO
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
encoding, forever, logStep, verbose
Constructor Summary
TrecContentSource()
Method Summary
void | close() Called when reading from this content source is no longer required.
DocData | getNextDocData(DocData docData) Returns the next DocData from the content source.
Date | parseDate(String dateStr)
void | resetInputs() Resets the input for this content source, so that the test would behave as if it was just started, input-wise.
void | setConfig(Config config) Sets the Config for this content source.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource
addBytes, addItem, collectFiles, getBytesCount, getConfig, getItemsCount, getTotalBytesCount, getTotalItemsCount, printStatistics, shouldLog
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DOCNO

public static final String DOCNO
See Also:
Constant Field Values

TERMINATING_DOCNO

public static final String TERMINATING_DOCNO
See Also:
Constant Field Values

DOC

public static final String DOC
See Also:
Constant Field Values

TERMINATING_DOC

public static final String TERMINATING_DOC
See Also:
Constant Field Values

NEW_LINE

public static final String NEW_LINE
separator between lines in the byffer

Constructor Detail

TrecContentSource

public TrecContentSource()
Method Detail

parseDate

public Date parseDate(String dateStr)

close

public void close()
           throws IOException
Description copied from class: ContentItemsSource
Called when reading from this content source is no longer required.

Specified by:
close in interface Closeable
Specified by:
close in class ContentItemsSource
Throws:
IOException

getNextDocData

public DocData getNextDocData(DocData docData)
                       throws NoMoreDataException,
                              IOException
Description copied from class: ContentSource
Returns the next DocData from the content source. Implementations must account for multi-threading, as multiple threads can call this method simultaneously.

Specified by:
getNextDocData in class ContentSource
Throws:
NoMoreDataException
IOException

resetInputs

public void resetInputs()
                 throws IOException
Description copied from class: ContentItemsSource
Resets the input for this content source, so that the test would behave as if it was just started, input-wise.

NOTE: the default implementation resets the number of bytes and items generated since the last reset, so it's important to call super.resetInputs in case you override this method.

Overrides:
resetInputs in class ContentItemsSource
Throws:
IOException

setConfig

public void setConfig(Config config)
Description copied from class: ContentItemsSource
Sets the Config for this content source. If you override this method, you must call super.setConfig.

Overrides:
setConfig in class ContentItemsSource
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TrecDocParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class TrecDocParser

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
Direct Known Subclasses:
TrecFBISParser, TrecFR94Parser, TrecFTParser, TrecGov2Parser, TrecLATimesParser, TrecParserByPath
public abstract class TrecDocParser
extends Object

Parser for trec doc content, invoked on doc text excluding and which are handled in TrecContentSource. Required to be stateless and hence thread safe.

Nested Class Summary
static class TrecDocParser.ParsePathType
Types of trec parse paths,
Field Summary
static TrecDocParser.ParsePathType DEFAULT_PATH_TYPE
trec parser type used for unknown extensions
Constructor Summary
TrecDocParser()
Method Summary
static String | extract(StringBuilder buf, String startTag, String endTag, int maxPos, String[] noisePrefixes) Extract from buf the text of interest within specified tags
abstract DocData | parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType) parse the text prepared in docBuf into a result DocData, no synchronization is required.
static TrecDocParser.ParsePathType | pathType(File f) Compute the path type of a file by inspecting name of file and its parents
static String | stripTags(StringBuilder buf, int start) strip tags from buf: each tag is replaced by a single blank.
static String | stripTags(String buf, int start) strip tags from input.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_PATH_TYPE

public static final TrecDocParser.ParsePathType DEFAULT_PATH_TYPE
trec parser type used for unknown extensions

Constructor Detail

TrecDocParser

public TrecDocParser()
Method Detail

pathType

public static TrecDocParser.ParsePathType pathType(File f)
Compute the path type of a file by inspecting name of file and its parents

parse

public abstract DocData parse(DocData docData,
                              String name,
                              TrecContentSource trecSrc,
                              StringBuilder docBuf,
                              TrecDocParser.ParsePathType pathType)
                       throws IOException,
                              InterruptedException
parse the text prepared in docBuf into a result DocData, no synchronization is required.

Parameters:
docData - reusable result
name - name that should be set to the result
trecSrc - calling trec content source
docBuf - text to parse
pathType - type of parsed file, or null if unknown - may be used by parsers to alter their behavior according to the file path type.
Throws:
IOException
InterruptedException

stripTags

public static String stripTags(StringBuilder buf,
                               int start)
strip tags from buf: each tag is replaced by a single blank.

Returns:
text obtained when stripping all tags from buf (Input StringBuilder is unmodified).

stripTags

public static String stripTags(String buf,
                               int start)
strip tags from input.

See Also:
stripTags(StringBuilder, int)

extract

public static String extract(StringBuilder buf,
                             String startTag,
                             String endTag,
                             int maxPos,
                             String[] noisePrefixes)
Extract from buf the text of interest within specified tags

Parameters:
buf - entire input text
startTag - tag marking start of text of interest
endTag - tag marking end of text of interest
maxPos - if ≥ 0 sets a limit on start of text of interest
Returns:
text of interest or null if not found
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TrecDocParser.ParsePathType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.benchmark.byTask.feeds
Enum TrecDocParser.ParsePathType

java.lang.Object
    extended by  java.lang.Enum<TrecDocParser.ParsePathType>
        extended by  org.apache.lucene.benchmark.byTask.feeds.TrecDocParser.ParsePathType
All Implemented Interfaces:
Serializable, Comparable<TrecDocParser.ParsePathType>
Enclosing class:
TrecDocParser
public static enum TrecDocParser.ParsePathType
extends Enum<TrecDocParser.ParsePathType>

Types of trec parse paths,

Enum Constant Summary
FBIS
FR94
FT
GOV2
LATIMES
Method Summary
static TrecDocParser.ParsePathType | valueOf(String name) Returns the enum constant of this type with the specified name.
static TrecDocParser.ParsePathType[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

GOV2

public static final TrecDocParser.ParsePathType GOV2

FBIS

public static final TrecDocParser.ParsePathType FBIS

FT

public static final TrecDocParser.ParsePathType FT

FR94

public static final TrecDocParser.ParsePathType FR94

LATIMES

public static final TrecDocParser.ParsePathType LATIMES
Method Detail

values

public static final TrecDocParser.ParsePathType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(TrecDocParser.ParsePathType c : TrecDocParser.ParsePathType.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static TrecDocParser.ParsePathType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


TrecFBISParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class TrecFBISParser

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
        extended by  org.apache.lucene.benchmark.byTask.feeds.TrecFBISParser

public class TrecFBISParser
extends TrecDocParser

Parser for the FBIS docs in trec disks 4+5 collection format

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
TrecDocParser.ParsePathType
Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
DEFAULT_PATH_TYPE
Constructor Summary
TrecFBISParser()
Method Summary
 DocData parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
parse the text prepared in docBuf into a result DocData, no synchronization is required.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
extract, pathType, stripTags, stripTags
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TrecFBISParser

public TrecFBISParser()
Method Detail

parse

public DocData parse(DocData docData,
                     String name,
                     TrecContentSource trecSrc,
                     StringBuilder docBuf,
                     TrecDocParser.ParsePathType pathType)
              throws IOException,
                     InterruptedException
Description copied from class: TrecDocParser
parse the text prepared in docBuf into a result DocData, no synchronization is required.

Specified by:
parse in class TrecDocParser
Parameters:
docData - reusable result
name - name that should be set to the result
trecSrc - calling trec content source
docBuf - text to parse
pathType - type of parsed file, or null if unknown - may be used by parsers to alter their behavior according to the file path type.
Throws:
IOException
InterruptedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TrecFR94Parser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class TrecFR94Parser

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
        extended by  org.apache.lucene.benchmark.byTask.feeds.TrecFR94Parser

public class TrecFR94Parser
extends TrecDocParser

Parser for the FR94 docs in trec disks 4+5 collection format

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
TrecDocParser.ParsePathType
Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
DEFAULT_PATH_TYPE
Constructor Summary
TrecFR94Parser()
Method Summary
 DocData parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
parse the text prepared in docBuf into a result DocData, no synchronization is required.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
extract, pathType, stripTags, stripTags
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TrecFR94Parser

public TrecFR94Parser()
Method Detail

parse

public DocData parse(DocData docData,
                     String name,
                     TrecContentSource trecSrc,
                     StringBuilder docBuf,
                     TrecDocParser.ParsePathType pathType)
              throws IOException,
                     InterruptedException
Description copied from class: TrecDocParser
parse the text prepared in docBuf into a result DocData, no synchronization is required.

Specified by:
parse in class TrecDocParser
Parameters:
docData - reusable result
name - name that should be set to the result
trecSrc - calling trec content source
docBuf - text to parse
pathType - type of parsed file, or null if unknown - may be used by parsers to alter their behavior according to the file path type.
Throws:
IOException
InterruptedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TrecFTParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class TrecFTParser

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
        extended by  org.apache.lucene.benchmark.byTask.feeds.TrecFTParser

public class TrecFTParser
extends TrecDocParser

Parser for the FT docs in trec disks 4+5 collection format

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
TrecDocParser.ParsePathType
Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
DEFAULT_PATH_TYPE
Constructor Summary
TrecFTParser()
Method Summary
 DocData parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
parse the text prepared in docBuf into a result DocData, no synchronization is required.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
extract, pathType, stripTags, stripTags
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TrecFTParser

public TrecFTParser()
Method Detail

parse

public DocData parse(DocData docData,
                     String name,
                     TrecContentSource trecSrc,
                     StringBuilder docBuf,
                     TrecDocParser.ParsePathType pathType)
              throws IOException,
                     InterruptedException
Description copied from class: TrecDocParser
parse the text prepared in docBuf into a result DocData, no synchronization is required.

Specified by:
parse in class TrecDocParser
Parameters:
docData - reusable result
name - name that should be set to the result
trecSrc - calling trec content source
docBuf - text to parse
pathType - type of parsed file, or null if unknown - may be used by parsers to alter their behavior according to the file path type.
Throws:
IOException
InterruptedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TrecGov2Parser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class TrecGov2Parser

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
        extended by  org.apache.lucene.benchmark.byTask.feeds.TrecGov2Parser

public class TrecGov2Parser
extends TrecDocParser

Parser for the GOV2 collection format

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
TrecDocParser.ParsePathType
Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
DEFAULT_PATH_TYPE
Constructor Summary
TrecGov2Parser()
Method Summary
 DocData parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
parse the text prepared in docBuf into a result DocData, no synchronization is required.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
extract, pathType, stripTags, stripTags
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TrecGov2Parser

public TrecGov2Parser()
Method Detail

parse

public DocData parse(DocData docData,
                     String name,
                     TrecContentSource trecSrc,
                     StringBuilder docBuf,
                     TrecDocParser.ParsePathType pathType)
              throws IOException,
                     InterruptedException
Description copied from class: TrecDocParser
parse the text prepared in docBuf into a result DocData, no synchronization is required.

Specified by:
parse in class TrecDocParser
Parameters:
docData - reusable result
name - name that should be set to the result
trecSrc - calling trec content source
docBuf - text to parse
pathType - type of parsed file, or null if unknown - may be used by parsers to alter their behavior according to the file path type.
Throws:
IOException
InterruptedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TrecLATimesParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class TrecLATimesParser

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
        extended by  org.apache.lucene.benchmark.byTask.feeds.TrecLATimesParser

public class TrecLATimesParser
extends TrecDocParser

Parser for the FT docs in trec disks 4+5 collection format

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
TrecDocParser.ParsePathType
Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
DEFAULT_PATH_TYPE
Constructor Summary
TrecLATimesParser()
Method Summary
 DocData parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
parse the text prepared in docBuf into a result DocData, no synchronization is required.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
extract, pathType, stripTags, stripTags
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TrecLATimesParser

public TrecLATimesParser()
Method Detail

parse

public DocData parse(DocData docData,
                     String name,
                     TrecContentSource trecSrc,
                     StringBuilder docBuf,
                     TrecDocParser.ParsePathType pathType)
              throws IOException,
                     InterruptedException
Description copied from class: TrecDocParser
parse the text prepared in docBuf into a result DocData, no synchronization is required.

Specified by:
parse in class TrecDocParser
Parameters:
docData - reusable result
name - name that should be set to the result
trecSrc - calling trec content source
docBuf - text to parse
pathType - type of parsed file, or null if unknown - may be used by parsers to alter their behavior according to the file path type.
Throws:
IOException
InterruptedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TrecParserByPath

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds
Class TrecParserByPath

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
        extended by  org.apache.lucene.benchmark.byTask.feeds.TrecParserByPath

public class TrecParserByPath
extends TrecDocParser

Parser for trec docs which selects the parser to apply according to the source files path, defaulting to TrecGov2Parser.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
TrecDocParser.ParsePathType
Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
DEFAULT_PATH_TYPE
Constructor Summary
TrecParserByPath()
Method Summary
 DocData parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
parse the text prepared in docBuf into a result DocData, no synchronization is required.
Methods inherited from class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser
extract, pathType, stripTags, stripTags
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TrecParserByPath

public TrecParserByPath()
Method Detail

parse

public DocData parse(DocData docData,
                     String name,
                     TrecContentSource trecSrc,
                     StringBuilder docBuf,
                     TrecDocParser.ParsePathType pathType)
              throws IOException,
                     InterruptedException
Description copied from class: TrecDocParser
parse the text prepared in docBuf into a result DocData, no synchronization is required.

Specified by:
parse in class TrecDocParser
Parameters:
docData - reusable result
name - name that should be set to the result
trecSrc - calling trec content source
docBuf - text to parse
pathType - type of parsed file, or null if unknown - may be used by parsers to alter their behavior according to the file path type.
Throws:
IOException
InterruptedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.AbstractQueryMaker

Packages that use AbstractQueryMaker
org.apache.lucene.benchmark.byTask.feeds Sources for benchmark inputs: documents and queries.

Uses of AbstractQueryMaker in org.apache.lucene.benchmark.byTask.feeds

Subclasses of AbstractQueryMaker in org.apache.lucene.benchmark.byTask.feeds
class | EnwikiQueryMaker A QueryMaker that uses common and uncommon actual Wikipedia queries for searching the English Wikipedia collection.
class | FileBasedQueryMaker Create queries from a FileReader.
class | ReutersQueryMaker A QueryMaker that makes queries devised manually (by Grant Ingersoll) for searching in the Reuters collection.
class | SimpleQueryMaker A QueryMaker that makes queries for a collection created using SingleDocSource.
class | SimpleSloppyPhraseQueryMaker Create sloppy phrase queries for performance test, in an index created using simple doc maker.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.ContentItemsSource

Packages that use ContentItemsSource
org.apache.lucene.benchmark.byTask.feeds Sources for benchmark inputs: documents and queries.

Uses of ContentItemsSource in org.apache.lucene.benchmark.byTask.feeds

Subclasses of ContentItemsSource in org.apache.lucene.benchmark.byTask.feeds
class | ContentSource Represents content from a specified source, such as TREC, Reuters etc.
class | DirContentSource A ContentSource using the Dir collection for its input.
class | EnwikiContentSource A ContentSource which reads the English Wikipedia dump.
class | FacetSource Source items for facets.
class | LineDocSource A ContentSource reading one line at a time as a Document from a single file.
class | LongToEnglishContentSource Creates documents whose content is a long number starting from Long.MIN_VALUE + 10.
class | RandomFacetSource Simple implementation of a random facet source
class | ReutersContentSource A ContentSource reading from the Reuters collection.
class | SingleDocSource Creates the same document each time SingleDocSource.getNextDocData(DocData) is called.
class | SortableSingleDocSource Adds fields appropriate for sorting: country, random_string and sort_field (int).
class | TrecContentSource Implements a ContentSource over the TREC collection.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.ContentSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.ContentSource

Packages that use ContentSource
org.apache.lucene.benchmark.byTask.feeds Sources for benchmark inputs: documents and queries.

Uses of ContentSource in org.apache.lucene.benchmark.byTask.feeds

Subclasses of ContentSource in org.apache.lucene.benchmark.byTask.feeds
class | DirContentSource A ContentSource using the Dir collection for its input.
class | EnwikiContentSource A ContentSource which reads the English Wikipedia dump.
class | LineDocSource A ContentSource reading one line at a time as a Document from a single file.
class | LongToEnglishContentSource Creates documents whose content is a long number starting from Long.MIN_VALUE + 10.
class | ReutersContentSource A ContentSource reading from the Reuters collection.
class | SingleDocSource Creates the same document each time SingleDocSource.getNextDocData(DocData) is called.
class | SortableSingleDocSource Adds fields appropriate for sorting: country, random_string and sort_field (int).
class | TrecContentSource Implements a ContentSource over the TREC collection.

Fields in org.apache.lucene.benchmark.byTask.feeds declared as ContentSource
protected  ContentSource DocMaker.source

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.DemoHTMLParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.DemoHTMLParser

No usage of org.apache.lucene.benchmark.byTask.feeds.DemoHTMLParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.DirContentSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.DirContentSource

No usage of org.apache.lucene.benchmark.byTask.feeds.DirContentSource

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.DirContentSource.Iterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.DirContentSource.Iterator

No usage of org.apache.lucene.benchmark.byTask.feeds.DirContentSource.Iterator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.DocData

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.DocData

Packages that use DocData
org.apache.lucene.benchmark.byTask.feeds Sources for benchmark inputs: documents and queries.

Uses of DocData in org.apache.lucene.benchmark.byTask.feeds

Methods in org.apache.lucene.benchmark.byTask.feeds that return DocData
DocData | ReutersContentSource.getNextDocData(DocData docData)
DocData | SingleDocSource.getNextDocData(DocData docData)
DocData | DirContentSource.getNextDocData(DocData docData)
DocData | LongToEnglishContentSource.getNextDocData(DocData docData)
DocData | TrecContentSource.getNextDocData(DocData docData)
DocData | LineDocSource.getNextDocData(DocData docData)
DocData | SortableSingleDocSource.getNextDocData(DocData docData)
abstract DocData | ContentSource.getNextDocData(DocData docData) Returns the next DocData from the content source.
DocData | EnwikiContentSource.getNextDocData(DocData docData)
DocData | DemoHTMLParser.parse(DocData docData, String name, Date date, String title, Reader reader, DateFormat dateFormat)
DocData | HTMLParser.parse(DocData docData, String name, Date date, String title, Reader reader, DateFormat dateFormat) Parse the input Reader and return DocData.
DocData | TrecFBISParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecGov2Parser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecParserByPath.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecFTParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecFR94Parser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecLATimesParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
abstract DocData | TrecDocParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType) parse the text prepared in docBuf into a result DocData, no synchronization is required.

Methods in org.apache.lucene.benchmark.byTask.feeds with parameters of type DocData
DocData | ReutersContentSource.getNextDocData(DocData docData)
DocData | SingleDocSource.getNextDocData(DocData docData)
DocData | DirContentSource.getNextDocData(DocData docData)
DocData | LongToEnglishContentSource.getNextDocData(DocData docData)
DocData | TrecContentSource.getNextDocData(DocData docData)
DocData | LineDocSource.getNextDocData(DocData docData)
DocData | SortableSingleDocSource.getNextDocData(DocData docData)
abstract DocData | ContentSource.getNextDocData(DocData docData) Returns the next DocData from the content source.
DocData | EnwikiContentSource.getNextDocData(DocData docData)
DocData | DemoHTMLParser.parse(DocData docData, String name, Date date, String title, Reader reader, DateFormat dateFormat)
DocData | HTMLParser.parse(DocData docData, String name, Date date, String title, Reader reader, DateFormat dateFormat) Parse the input Reader and return DocData.
DocData | TrecFBISParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecGov2Parser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecParserByPath.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecFTParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecFR94Parser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecLATimesParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
abstract DocData | TrecDocParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType) parse the text prepared in docBuf into a result DocData, no synchronization is required.
abstract void | LineDocSource.LineParser.parseLine(DocData docData, String line) parse an input line and fill doc data appropriately
void | LineDocSource.SimpleLineParser.parseLine(DocData docData, String line)
void | LineDocSource.HeaderLineParser.parseLine(DocData docData, String line)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.DocMaker

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.DocMaker

Packages that use DocMaker
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.utils | Benchmark Utility functions.

Uses of DocMaker in org.apache.lucene.benchmark.byTask

Methods in org.apache.lucene.benchmark.byTask that return DocMaker
 DocMaker PerfRunData.getDocMaker()
Returns the docMaker.

Uses of DocMaker in org.apache.lucene.benchmark.utils

Fields in org.apache.lucene.benchmark.utils declared as DocMaker
protected  DocMaker ExtractWikipedia.docMaker

Constructors in org.apache.lucene.benchmark.utils with parameters of type DocMaker
ExtractWikipedia(DocMaker docMaker, File outputDir)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.EnwikiContentSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.EnwikiContentSource

No usage of org.apache.lucene.benchmark.byTask.feeds.EnwikiContentSource

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.EnwikiQueryMaker

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.EnwikiQueryMaker

No usage of org.apache.lucene.benchmark.byTask.feeds.EnwikiQueryMaker

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.FacetSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.FacetSource

Packages that use FacetSource
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.

Uses of FacetSource in org.apache.lucene.benchmark.byTask

Methods in org.apache.lucene.benchmark.byTask that return FacetSource
 FacetSource PerfRunData.getFacetSource()
Returns the facet source.

Uses of FacetSource in org.apache.lucene.benchmark.byTask.feeds

Subclasses of FacetSource in org.apache.lucene.benchmark.byTask.feeds
 class RandomFacetSource
Simple implementation of a random facet source

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.FileBasedQueryMaker

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.FileBasedQueryMaker

No usage of org.apache.lucene.benchmark.byTask.feeds.FileBasedQueryMaker

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.benchmark.byTask.feeds.HTMLParser

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.benchmark.byTask.feeds.HTMLParser

Packages that use HTMLParser
org.apache.lucene.benchmark.byTask.feeds Sources for benchmark inputs: documents and queries.

Uses of HTMLParser in org.apache.lucene.benchmark.byTask.feeds

Classes in org.apache.lucene.benchmark.byTask.feeds that implement HTMLParser
 class DemoHTMLParser
HTML Parser that is based on Lucene's demo HTML parser.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.LineDocSource.HeaderLineParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.LineDocSource.HeaderLineParser

No usage of org.apache.lucene.benchmark.byTask.feeds.LineDocSource.HeaderLineParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.LineDocSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.LineDocSource

No usage of org.apache.lucene.benchmark.byTask.feeds.LineDocSource

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.LineDocSource.LineParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.LineDocSource.LineParser

Packages that use LineDocSource.LineParser
org.apache.lucene.benchmark.byTask.feeds Sources for benchmark inputs: documents and queries.

Uses of LineDocSource.LineParser in org.apache.lucene.benchmark.byTask.feeds

Subclasses of LineDocSource.LineParser in org.apache.lucene.benchmark.byTask.feeds
static class | LineDocSource.HeaderLineParser LineDocSource.LineParser which sets field names and order by the header - any header - of the lines file.
static class | LineDocSource.SimpleLineParser LineDocSource.LineParser which ignores the header passed to its constructor and assumes simply that field names and their order are the same as in WriteLineDocTask.DEFAULT_FIELDS

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.LineDocSource.SimpleLineParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.LineDocSource.SimpleLineParser

No usage of org.apache.lucene.benchmark.byTask.feeds.LineDocSource.SimpleLineParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.LongToEnglishContentSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.LongToEnglishContentSource

No usage of org.apache.lucene.benchmark.byTask.feeds.LongToEnglishContentSource

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.LongToEnglishQueryMaker

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.LongToEnglishQueryMaker

No usage of org.apache.lucene.benchmark.byTask.feeds.LongToEnglishQueryMaker

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.NoMoreDataException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.NoMoreDataException

Packages that use NoMoreDataException
org.apache.lucene.benchmark.byTask.feeds Sources for benchmark inputs: documents and queries.

Uses of NoMoreDataException in org.apache.lucene.benchmark.byTask.feeds

Methods in org.apache.lucene.benchmark.byTask.feeds that throw NoMoreDataException
DocData | ReutersContentSource.getNextDocData(DocData docData)
DocData | SingleDocSource.getNextDocData(DocData docData)
DocData | DirContentSource.getNextDocData(DocData docData)
DocData | LongToEnglishContentSource.getNextDocData(DocData docData)
DocData | TrecContentSource.getNextDocData(DocData docData)
DocData | LineDocSource.getNextDocData(DocData docData)
DocData | SortableSingleDocSource.getNextDocData(DocData docData)
abstract DocData | ContentSource.getNextDocData(DocData docData) Returns the next DocData from the content source.
DocData | EnwikiContentSource.getNextDocData(DocData docData)
CategoryContainer | RandomFacetSource.getNextFacets(CategoryContainer facets)
abstract CategoryContainer | FacetSource.getNextFacets(CategoryContainer facets) Returns the next facets content item.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.benchmark.byTask.feeds.QueryMaker

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.benchmark.byTask.feeds.QueryMaker

Packages that use QueryMaker
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.

Uses of QueryMaker in org.apache.lucene.benchmark.byTask

Methods in org.apache.lucene.benchmark.byTask that return QueryMaker
 QueryMaker PerfRunData.getQueryMaker(ReadTask readTask)

Uses of QueryMaker in org.apache.lucene.benchmark.byTask.feeds

Classes in org.apache.lucene.benchmark.byTask.feeds that implement QueryMaker
class | AbstractQueryMaker Abstract base query maker.
class | EnwikiQueryMaker A QueryMaker that uses common and uncommon actual Wikipedia queries for searching the English Wikipedia collection.
class | FileBasedQueryMaker Create queries from a FileReader.
class | LongToEnglishQueryMaker Creates queries whose content is a spelled-out long number starting from Long.MIN_VALUE + 10.
class | ReutersQueryMaker A QueryMaker that makes queries devised manually (by Grant Ingersoll) for searching in the Reuters collection.
class | SimpleQueryMaker A QueryMaker that makes queries for a collection created using SingleDocSource.
class | SimpleSloppyPhraseQueryMaker Create sloppy phrase queries for performance test, in an index created using simple doc maker.

Uses of QueryMaker in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks that return QueryMaker
QueryMaker | SearchTask.getQueryMaker()
QueryMaker | SearchWithCollectorTask.getQueryMaker()
abstract QueryMaker | ReadTask.getQueryMaker() Return query maker used for this task.
QueryMaker | SearchTravTask.getQueryMaker()
QueryMaker | SearchWithSortTask.getQueryMaker()
QueryMaker | WarmTask.getQueryMaker()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.RandomFacetSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.RandomFacetSource

No usage of org.apache.lucene.benchmark.byTask.feeds.RandomFacetSource

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource

No usage of org.apache.lucene.benchmark.byTask.feeds.ReutersContentSource

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.ReutersQueryMaker

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.ReutersQueryMaker

No usage of org.apache.lucene.benchmark.byTask.feeds.ReutersQueryMaker

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.SimpleQueryMaker

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.SimpleQueryMaker

Packages that use SimpleQueryMaker
org.apache.lucene.benchmark.byTask.feeds Sources for benchmark inputs: documents and queries.

Uses of SimpleQueryMaker in org.apache.lucene.benchmark.byTask.feeds

Subclasses of SimpleQueryMaker in org.apache.lucene.benchmark.byTask.feeds
 class SimpleSloppyPhraseQueryMaker
Create sloppy phrase queries for performance test, in an index created using simple doc maker.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.SimpleSloppyPhraseQueryMaker

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.SimpleSloppyPhraseQueryMaker

No usage of org.apache.lucene.benchmark.byTask.feeds.SimpleSloppyPhraseQueryMaker

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.SingleDocSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.SingleDocSource

Packages that use SingleDocSource
org.apache.lucene.benchmark.byTask.feeds Sources for benchmark inputs: documents and queries.

Uses of SingleDocSource in org.apache.lucene.benchmark.byTask.feeds

Subclasses of SingleDocSource in org.apache.lucene.benchmark.byTask.feeds
 class SortableSingleDocSource
Adds fields appropriate for sorting: country, random_string and sort_field (int).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.SortableSingleDocSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.SortableSingleDocSource

No usage of org.apache.lucene.benchmark.byTask.feeds.SortableSingleDocSource

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.TrecContentSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.TrecContentSource

Packages that use TrecContentSource
org.apache.lucene.benchmark.byTask.feeds Sources for benchmark inputs: documents and queries.

Uses of TrecContentSource in org.apache.lucene.benchmark.byTask.feeds

Methods in org.apache.lucene.benchmark.byTask.feeds with parameters of type TrecContentSource
DocData | TrecFBISParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecGov2Parser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecParserByPath.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecFTParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecFR94Parser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecLATimesParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
abstract DocData | TrecDocParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType) parse the text prepared in docBuf into a result DocData, no synchronization is required.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.TrecDocParser

Packages that use TrecDocParser
org.apache.lucene.benchmark.byTask.feeds Sources for benchmark inputs: documents and queries.

Uses of TrecDocParser in org.apache.lucene.benchmark.byTask.feeds

Subclasses of TrecDocParser in org.apache.lucene.benchmark.byTask.feeds
class | TrecFBISParser Parser for the FBIS docs in trec disks 4+5 collection format
class | TrecFR94Parser Parser for the FR94 docs in trec disks 4+5 collection format
class | TrecFTParser Parser for the FT docs in trec disks 4+5 collection format
class | TrecGov2Parser Parser for the GOV2 collection format
class | TrecLATimesParser Parser for the FT docs in trec disks 4+5 collection format
class | TrecParserByPath Parser for trec docs which selects the parser to apply according to the source files path, defaulting to TrecGov2Parser.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.TrecDocParser.ParsePathType

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.TrecDocParser.ParsePathType

Packages that use TrecDocParser.ParsePathType
org.apache.lucene.benchmark.byTask.feeds Sources for benchmark inputs: documents and queries.

Uses of TrecDocParser.ParsePathType in org.apache.lucene.benchmark.byTask.feeds

Fields in org.apache.lucene.benchmark.byTask.feeds declared as TrecDocParser.ParsePathType
static TrecDocParser.ParsePathType TrecDocParser.DEFAULT_PATH_TYPE
trec parser type used for unknown extensions

Methods in org.apache.lucene.benchmark.byTask.feeds that return TrecDocParser.ParsePathType
static TrecDocParser.ParsePathType | TrecDocParser.pathType(File f) Compute the path type of a file by inspecting name of file and its parents
static TrecDocParser.ParsePathType | TrecDocParser.ParsePathType.valueOf(String name) Returns the enum constant of this type with the specified name.
static TrecDocParser.ParsePathType[] | TrecDocParser.ParsePathType.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.benchmark.byTask.feeds with parameters of type TrecDocParser.ParsePathType
DocData | TrecFBISParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecGov2Parser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecParserByPath.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecFTParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecFR94Parser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
DocData | TrecLATimesParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType)
abstract DocData | TrecDocParser.parse(DocData docData, String name, TrecContentSource trecSrc, StringBuilder docBuf, TrecDocParser.ParsePathType pathType) parse the text prepared in docBuf into a result DocData, no synchronization is required.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.TrecFBISParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.TrecFBISParser

No usage of org.apache.lucene.benchmark.byTask.feeds.TrecFBISParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.TrecFR94Parser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.TrecFR94Parser

No usage of org.apache.lucene.benchmark.byTask.feeds.TrecFR94Parser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.TrecFTParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.TrecFTParser

No usage of org.apache.lucene.benchmark.byTask.feeds.TrecFTParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.TrecGov2Parser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.TrecGov2Parser

No usage of org.apache.lucene.benchmark.byTask.feeds.TrecGov2Parser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.TrecLATimesParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.TrecLATimesParser

No usage of org.apache.lucene.benchmark.byTask.feeds.TrecLATimesParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.TrecParserByPath

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.TrecParserByPath

No usage of org.apache.lucene.benchmark.byTask.feeds.TrecParserByPath

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Entities

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds.demohtml
Class Entities

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.demohtml.Entities

public class Entities
extends Object

Constructor Summary
Entities()
Method Summary
static String encode(String s)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Entities

public Entities()
Method Detail

encode

public static final String encode(String s)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


HTMLParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds.demohtml
Class HTMLParser

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser
All Implemented Interfaces:
HTMLParserConstants
public class HTMLParser
extends Object
implements HTMLParserConstants

Field Summary
Token | jj_nt Next token.
static int | SUMMARY_LENGTH
Token | token Current token.
HTMLParserTokenManager | token_source Generated Token Manager.
Fields inherited from interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
AfterEquals, ArgEquals, ArgName, ArgQuote1, ArgQuote2, ArgValue, CloseQuote1, CloseQuote2, Comment1, Comment2, CommentEnd1, CommentEnd2, CommentText1, CommentText2, DeclName, DEFAULT, Entity, EOF, HEX, LET, NUM, Punct, Quote1Text, Quote2Text, ScriptEnd, ScriptStart, ScriptText, SP, Space, TagEnd, TagName, tokenImage, WithinComment1, WithinComment2, WithinQuote1, WithinQuote2, WithinScript, WithinTag, Word
Constructor Summary
HTMLParser(HTMLParserTokenManager tm)
Constructor with generated Token Manager.
HTMLParser(InputStream stream)
Constructor with InputStream.
HTMLParser(InputStream stream, String encoding)
Constructor with InputStream and supplied encoding
HTMLParser(Reader stream)
Constructor.
Method Summary
Token | ArgValue()
void | CommentTag()
Token | Decl()
void | disable_tracing() Disable tracing.
void | enable_tracing() Enable tracing.
ParseException | generateParseException() Generate ParseException.
Properties | getMetaTags()
Token | getNextToken() Get the next Token.
Reader | getReader()
String | getSummary()
String | getTitle()
Token | getToken(int index) Get the specific Token.
void | HTMLDocument()
void | ReInit(HTMLParserTokenManager tm) Reinitialise.
void | ReInit(InputStream stream) Reinitialise.
void | ReInit(InputStream stream, String encoding) Reinitialise.
void | ReInit(Reader stream) Reinitialise.
void | ScriptTag()
void | Tag()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

SUMMARY_LENGTH

public static int SUMMARY_LENGTH

token_source

public HTMLParserTokenManager token_source
Generated Token Manager.

token

public Token token
Current token.

jj_nt

public Token jj_nt
Next token.

Constructor Detail

HTMLParser

public HTMLParser(InputStream stream)
Constructor with InputStream.

HTMLParser

public HTMLParser(InputStream stream,
                  String encoding)
Constructor with InputStream and supplied encoding

HTMLParser

public HTMLParser(Reader stream)
Constructor.

HTMLParser

public HTMLParser(HTMLParserTokenManager tm)
Constructor with generated Token Manager.

Method Detail

getTitle

public String getTitle()
                throws IOException,
                       InterruptedException
Throws:
IOException
InterruptedException

getMetaTags

public Properties getMetaTags()
                       throws IOException,
                              InterruptedException
Throws:
IOException
InterruptedException

getSummary

public String getSummary()
                  throws IOException,
                         InterruptedException
Throws:
IOException
InterruptedException

getReader

public Reader getReader()
                 throws IOException
Throws:
IOException

HTMLDocument

public final void HTMLDocument()
                        throws ParseException,
                               IOException
Throws:
ParseException
IOException

Tag

public final void Tag()
               throws ParseException,
                      IOException
Throws:
ParseException
IOException

ArgValue

public final Token ArgValue()
                     throws ParseException
Throws:
ParseException

Decl

public final Token Decl()
                 throws ParseException
Throws:
ParseException

CommentTag

public final void CommentTag()
                      throws ParseException
Throws:
ParseException

ScriptTag

public final void ScriptTag()
                     throws ParseException
Throws:
ParseException

ReInit

public void ReInit(InputStream stream)
Reinitialise.

ReInit

public void ReInit(InputStream stream,
                   String encoding)
Reinitialise.

ReInit

public void ReInit(Reader stream)
Reinitialise.

ReInit

public void ReInit(HTMLParserTokenManager tm)
Reinitialise.

getNextToken

public final Token getNextToken()
Get the next Token.

getToken

public final Token getToken(int index)
Get the specific Token.

generateParseException

public ParseException generateParseException()
Generate ParseException.

enable_tracing

public final void enable_tracing()
Enable tracing.

disable_tracing

public final void disable_tracing()
Disable tracing.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HTMLParserConstants

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds.demohtml
Interface HTMLParserConstants

All Known Implementing Classes:
HTMLParser, HTMLParserTokenManager
public interface HTMLParserConstants

Token literal values and constants. Generated by org.javacc.parser.OtherFilesGen#start()

Field Summary
static int | AfterEquals Lexical state.
static int | ArgEquals RegularExpression Id.
static int | ArgName RegularExpression Id.
static int | ArgQuote1 RegularExpression Id.
static int | ArgQuote2 RegularExpression Id.
static int | ArgValue RegularExpression Id.
static int | CloseQuote1 RegularExpression Id.
static int | CloseQuote2 RegularExpression Id.
static int | Comment1 RegularExpression Id.
static int | Comment2 RegularExpression Id.
static int | CommentEnd1 RegularExpression Id.
static int | CommentEnd2 RegularExpression Id.
static int | CommentText1 RegularExpression Id.
static int | CommentText2 RegularExpression Id.
static int | DeclName RegularExpression Id.
static int | DEFAULT Lexical state.
static int | Entity RegularExpression Id.
static int | EOF End of File.
static int | HEX RegularExpression Id.
static int | LET RegularExpression Id.
static int | NUM RegularExpression Id.
static int | Punct RegularExpression Id.
static int | Quote1Text RegularExpression Id.
static int | Quote2Text RegularExpression Id.
static int | ScriptEnd RegularExpression Id.
static int | ScriptStart RegularExpression Id.
static int | ScriptText RegularExpression Id.
static int | SP RegularExpression Id.
static int | Space RegularExpression Id.
static int | TagEnd RegularExpression Id.
static int | TagName RegularExpression Id.
static String[] | tokenImage Literal token values.
static int | WithinComment1 Lexical state.
static int | WithinComment2 Lexical state.
static int | WithinQuote1 Lexical state.
static int | WithinQuote2 Lexical state.
static int | WithinScript Lexical state.
static int | WithinTag Lexical state.
static int | Word RegularExpression Id.

Field Detail

EOF

static final int EOF
End of File.

See Also:
Constant Field Values

ScriptStart

static final int ScriptStart
RegularExpression Id.

See Also:
Constant Field Values

TagName

static final int TagName
RegularExpression Id.

See Also:
Constant Field Values

DeclName

static final int DeclName
RegularExpression Id.

See Also:
Constant Field Values

Comment1

static final int Comment1
RegularExpression Id.

See Also:
Constant Field Values

Comment2

static final int Comment2
RegularExpression Id.

See Also:
Constant Field Values

Word

static final int Word
RegularExpression Id.

See Also:
Constant Field Values

LET

static final int LET
RegularExpression Id.

See Also:
Constant Field Values

NUM

static final int NUM
RegularExpression Id.

See Also:
Constant Field Values

HEX

static final int HEX
RegularExpression Id.

See Also:
Constant Field Values

Entity

static final int Entity
RegularExpression Id.

See Also:
Constant Field Values

Space

static final int Space
RegularExpression Id.

See Also:
Constant Field Values

SP

static final int SP
RegularExpression Id.

See Also:
Constant Field Values

Punct

static final int Punct
RegularExpression Id.

See Also:
Constant Field Values

ScriptText

static final int ScriptText
RegularExpression Id.

See Also:
Constant Field Values

ScriptEnd

static final int ScriptEnd
RegularExpression Id.

See Also:
Constant Field Values

ArgName

static final int ArgName
RegularExpression Id.

See Also:
Constant Field Values

ArgEquals

static final int ArgEquals
RegularExpression Id.

See Also:
Constant Field Values

TagEnd

static final int TagEnd
RegularExpression Id.

See Also:
Constant Field Values

ArgValue

static final int ArgValue
RegularExpression Id.

See Also:
Constant Field Values

ArgQuote1

static final int ArgQuote1
RegularExpression Id.

See Also:
Constant Field Values

ArgQuote2

static final int ArgQuote2
RegularExpression Id.

See Also:
Constant Field Values

Quote1Text

static final int Quote1Text
RegularExpression Id.

See Also:
Constant Field Values

CloseQuote1

static final int CloseQuote1
RegularExpression Id.

See Also:
Constant Field Values

Quote2Text

static final int Quote2Text
RegularExpression Id.

See Also:
Constant Field Values

CloseQuote2

static final int CloseQuote2
RegularExpression Id.

See Also:
Constant Field Values

CommentText1

static final int CommentText1
RegularExpression Id.

See Also:
Constant Field Values

CommentEnd1

static final int CommentEnd1
RegularExpression Id.

See Also:
Constant Field Values

CommentText2

static final int CommentText2
RegularExpression Id.

See Also:
Constant Field Values

CommentEnd2

static final int CommentEnd2
RegularExpression Id.

See Also:
Constant Field Values

DEFAULT

static final int DEFAULT
Lexical state.

See Also:
Constant Field Values

WithinScript

static final int WithinScript
Lexical state.

See Also:
Constant Field Values

WithinTag

static final int WithinTag
Lexical state.

See Also:
Constant Field Values

AfterEquals

static final int AfterEquals
Lexical state.

See Also:
Constant Field Values

WithinQuote1

static final int WithinQuote1
Lexical state.

See Also:
Constant Field Values

WithinQuote2

static final int WithinQuote2
Lexical state.

See Also:
Constant Field Values

WithinComment1

static final int WithinComment1
Lexical state.

See Also:
Constant Field Values

WithinComment2

static final int WithinComment2
Lexical state.

See Also:
Constant Field Values

tokenImage

static final String[] tokenImage
Literal token values.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HTMLParserTokenManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds.demohtml
Class HTMLParserTokenManager

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager
All Implemented Interfaces:
HTMLParserConstants
public class HTMLParserTokenManager
extends Object
implements HTMLParserConstants

Token Manager.

Field Summary
protected char | curChar
PrintStream | debugStream Debug output.
protected SimpleCharStream | input_stream
static int[] | jjnewLexState Lex State array.
static String[] | jjstrLiteralImages Token literal values.
static String[] | lexStateNames Lexer state names.
Fields inherited from interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants
AfterEquals, ArgEquals, ArgName, ArgQuote1, ArgQuote2, ArgValue, CloseQuote1, CloseQuote2, Comment1, Comment2, CommentEnd1, CommentEnd2, CommentText1, CommentText2, DeclName, DEFAULT, Entity, EOF, HEX, LET, NUM, Punct, Quote1Text, Quote2Text, ScriptEnd, ScriptStart, ScriptText, SP, Space, TagEnd, TagName, tokenImage, WithinComment1, WithinComment2, WithinQuote1, WithinQuote2, WithinScript, WithinTag, Word
Constructor Summary
HTMLParserTokenManager(SimpleCharStream stream)
Constructor.
HTMLParserTokenManager(SimpleCharStream stream, int lexState)
Constructor.
Method Summary
Token | getNextToken() Get the next Token.
protected Token | jjFillToken()
void | ReInit(SimpleCharStream stream) Reinitialise parser.
void | ReInit(SimpleCharStream stream, int lexState) Reinitialise parser.
void | setDebugStream(PrintStream ds) Set debug output.
void | SwitchTo(int lexState) Switch to specified lex state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

debugStream

public PrintStream debugStream
Debug output.

jjstrLiteralImages

public static final String[] jjstrLiteralImages
Token literal values.

lexStateNames

public static final String[] lexStateNames
Lexer state names.

jjnewLexState

public static final int[] jjnewLexState
Lex State array.

input_stream

protected SimpleCharStream input_stream

curChar

protected char curChar
Constructor Detail

HTMLParserTokenManager

public HTMLParserTokenManager(SimpleCharStream stream)
Constructor.

HTMLParserTokenManager

public HTMLParserTokenManager(SimpleCharStream stream,
                              int lexState)
Constructor.

Method Detail

setDebugStream

public void setDebugStream(PrintStream ds)
Set debug output.

ReInit

public void ReInit(SimpleCharStream stream)
Reinitialise parser.

ReInit

public void ReInit(SimpleCharStream stream,
                   int lexState)
Reinitialise parser.

SwitchTo

public void SwitchTo(int lexState)
Switch to specified lex state.

jjFillToken

protected Token jjFillToken()

getNextToken

public Token getNextToken()
Get the next Token.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.benchmark.byTask.feeds.demohtml
Interfaces
HTMLParserConstants
Classes
Entities
HTMLParser
HTMLParserTokenManager
SimpleCharStream
Tags
Token
Exceptions
ParseException
Errors
TokenMgrError


org.apache.lucene.benchmark.byTask.feeds.demohtml

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.benchmark.byTask.feeds.demohtml

Example html parser based on JavaCC

See:
Description

Interface Summary
HTMLParserConstants Token literal values and constants.

Class Summary
Entities |
HTMLParser |
HTMLParserTokenManager | Token Manager.
SimpleCharStream | An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without unicode processing).
Tags |
Token | Describes the input token stream.

Exception Summary
ParseException This exception is thrown when parse errors are encountered.

Error Summary
TokenMgrError Token Manager Error.

Package org.apache.lucene.benchmark.byTask.feeds.demohtml Description

Example html parser based on JavaCC


org.apache.lucene.benchmark.byTask.feeds.demohtml Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.benchmark.byTask.feeds.demohtml

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.benchmark.byTask.feeds.demohtml.Entities
    • org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser (implements org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants)
    • org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager (implements org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants)
    • org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream
    • org.apache.lucene.benchmark.byTask.feeds.demohtml.Tags
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Error
        • org.apache.lucene.benchmark.byTask.feeds.demohtml.TokenMgrError
      • java.lang.Exception
        • org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException
    • org.apache.lucene.benchmark.byTask.feeds.demohtml.Token

Interface Hierarchy

  • org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants


Uses of Package org.apache.lucene.benchmark.byTask.feeds.demohtml

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.benchmark.byTask.feeds.demohtml

Packages that use org.apache.lucene.benchmark.byTask.feeds.demohtml
org.apache.lucene.benchmark.byTask.feeds.demohtml Example html parser based on JavaCC

Classes in org.apache.lucene.benchmark.byTask.feeds.demohtml used by org.apache.lucene.benchmark.byTask.feeds.demohtml
HTMLParserConstants
Token literal values and constants.
HTMLParserTokenManager
Token Manager.
ParseException
This exception is thrown when parse errors are encountered.
SimpleCharStream
An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without unicode processing).
Token
Describes the input token stream.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ParseException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds.demohtml
Class ParseException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException
All Implemented Interfaces:
Serializable
public class ParseException
extends Exception

This exception is thrown when parse errors are encountered. You can explicitly create objects of this exception type by calling the method generateParseException in the generated parser. You can modify this class to customize your error reporting mechanisms so long as you retain the public fields.

See Also:
Serialized Form

Field Summary
Token | currentToken This is the last token that has been consumed successfully.
protected String | eol The end of line string for this machine.
int[][] | expectedTokenSequences Each entry in this array is an array of integers.
protected boolean | specialConstructor This variable determines which constructor was used to create this object and thereby affects the semantics of the "getMessage" method (see below).
String[] | tokenImage This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred.
Constructor Summary
ParseException()
The following constructors are for use by you for whatever purpose you can think of.
ParseException(String message)
Constructor with message.
ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal)
This constructor is used by the method "generateParseException" in the generated parser.
Method Summary
protected String | add_escapes(String str) Used to convert raw characters to their escaped version when these raw version cannot be used as part of an ASCII string literal.
String | getMessage() This method has the standard behavior when this object has been created using the standard constructors.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

specialConstructor

protected boolean specialConstructor
This variable determines which constructor was used to create this object and thereby affects the semantics of the "getMessage" method (see below).

currentToken

public Token currentToken
This is the last token that has been consumed successfully. If this object has been created due to a parse error, the token followng this token will (therefore) be the first error token.

expectedTokenSequences

public int[][] expectedTokenSequences
Each entry in this array is an array of integers. Each array of integers represents a sequence of tokens (by their ordinal values) that is expected at this point of the parse.

tokenImage

public String[] tokenImage
This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred. This array is defined in the generated ...Constants interface.

eol

protected String eol
The end of line string for this machine.

Constructor Detail

ParseException

public ParseException(Token currentTokenVal,
                      int[][] expectedTokenSequencesVal,
                      String[] tokenImageVal)
This constructor is used by the method "generateParseException" in the generated parser. Calling this constructor generates a new object of this type with the fields "currentToken", "expectedTokenSequences", and "tokenImage" set. The boolean flag "specialConstructor" is also set to true to indicate that this constructor was used to create this object. This constructor calls its super class with the empty string to force the "toString" method of parent class "Throwable" to print the error message in the form: ParseException:

ParseException

public ParseException()
The following constructors are for use by you for whatever purpose you can think of. Constructing the exception in this manner makes the exception behave in the normal way - i.e., as documented in the class "Throwable". The fields "errorToken", "expectedTokenSequences", and "tokenImage" do not contain relevant information. The JavaCC generated code does not use these constructors.

ParseException

public ParseException(String message)
Constructor with message.

Method Detail

getMessage

public String getMessage()
This method has the standard behavior when this object has been created using the standard constructors. Otherwise, it uses "currentToken" and "expectedTokenSequences" to generate a parse error message and returns it. If this object has been created due to a parse error, and you do not catch it (it gets thrown from the parser), then this method is called during the printing of the final stack trace, and hence the correct error message gets displayed.

Overrides:
getMessage in class Throwable

add_escapes

protected String add_escapes(String str)
Used to convert raw characters to their escaped version when these raw version cannot be used as part of an ASCII string literal.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleCharStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds.demohtml
Class SimpleCharStream

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

public class SimpleCharStream
extends Object

An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without unicode processing).

Field Summary
protected int[] | bufcolumn
protected char[] | buffer
protected int[] | bufline
int | bufpos Position in buffer.
protected int | column
protected int | inBuf
protected Reader | inputStream
protected int | line
protected int | maxNextCharInd
protected boolean | prevCharIsCR
protected boolean | prevCharIsLF
static boolean | staticFlag Whether parser is static.
protected int | tabSize
Constructor Summary
SimpleCharStream(InputStream dstream)
Constructor.
SimpleCharStream(InputStream dstream, int startline, int startcolumn)
Constructor.
SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
Constructor.
SimpleCharStream(InputStream dstream, String encoding)
Constructor.
SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn)
Constructor.
SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
Constructor.
SimpleCharStream(Reader dstream)
Constructor.
SimpleCharStream(Reader dstream, int startline, int startcolumn)
Constructor.
SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
Constructor.
Method Summary
void | adjustBeginLineColumn(int newLine, int newCol) Method to adjust line and column numbers for the start of a token.
void | backup(int amount) Backup a number of characters.
char | BeginToken() Start.
void | Done() Reset buffer when finished.
protected void | ExpandBuff(boolean wrapAround)
protected void | FillBuff()
int | getBeginColumn() Get token beginning column number.
int | getBeginLine() Get token beginning line number.
int | getColumn() Deprecated.
int | getEndColumn() Get token end column number.
int | getEndLine() Get token end line number.
String | GetImage() Get token literal value.
int | getLine() Deprecated.
char[] | GetSuffix(int len) Get the suffix.
protected int | getTabSize(int i)
char | readChar() Read a character.
void | ReInit(InputStream dstream) Reinitialise.
void | ReInit(InputStream dstream, int startline, int startcolumn) Reinitialise.
void | ReInit(InputStream dstream, int startline, int startcolumn, int buffersize) Reinitialise.
void | ReInit(InputStream dstream, String encoding) Reinitialise.
void | ReInit(InputStream dstream, String encoding, int startline, int startcolumn) Reinitialise.
void | ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) Reinitialise.
void | ReInit(Reader dstream) Reinitialise.
void | ReInit(Reader dstream, int startline, int startcolumn) Reinitialise.
void | ReInit(Reader dstream, int startline, int startcolumn, int buffersize) Reinitialise.
protected void | setTabSize(int i)
protected void | UpdateLineColumn(char c)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

staticFlag

public static final boolean staticFlag
Whether parser is static.

See Also:
Constant Field Values

bufpos

public int bufpos
Position in buffer.

bufline

protected int[] bufline

bufcolumn

protected int[] bufcolumn

column

protected int column

line

protected int line

prevCharIsCR

protected boolean prevCharIsCR

prevCharIsLF

protected boolean prevCharIsLF

inputStream

protected Reader inputStream

buffer

protected char[] buffer

maxNextCharInd

protected int maxNextCharInd

inBuf

protected int inBuf

tabSize

protected int tabSize
Constructor Detail

SimpleCharStream

public SimpleCharStream(Reader dstream,
                        int startline,
                        int startcolumn,
                        int buffersize)
Constructor.

SimpleCharStream

public SimpleCharStream(Reader dstream,
                        int startline,
                        int startcolumn)
Constructor.

SimpleCharStream

public SimpleCharStream(Reader dstream)
Constructor.

SimpleCharStream

public SimpleCharStream(InputStream dstream,
                        String encoding,
                        int startline,
                        int startcolumn,
                        int buffersize)
                 throws UnsupportedEncodingException
Constructor.

Throws:
UnsupportedEncodingException

SimpleCharStream

public SimpleCharStream(InputStream dstream,
                        int startline,
                        int startcolumn,
                        int buffersize)
Constructor.

SimpleCharStream

public SimpleCharStream(InputStream dstream,
                        String encoding,
                        int startline,
                        int startcolumn)
                 throws UnsupportedEncodingException
Constructor.

Throws:
UnsupportedEncodingException

SimpleCharStream

public SimpleCharStream(InputStream dstream,
                        int startline,
                        int startcolumn)
Constructor.

SimpleCharStream

public SimpleCharStream(InputStream dstream,
                        String encoding)
                 throws UnsupportedEncodingException
Constructor.

Throws:
UnsupportedEncodingException

SimpleCharStream

public SimpleCharStream(InputStream dstream)
Constructor.

Method Detail

setTabSize

protected void setTabSize(int i)

getTabSize

protected int getTabSize(int i)

ExpandBuff

protected void ExpandBuff(boolean wrapAround)

FillBuff

protected void FillBuff()
                 throws IOException
Throws:
IOException

BeginToken

public char BeginToken()
                throws IOException
Start.

Throws:
IOException

UpdateLineColumn

protected void UpdateLineColumn(char c)

readChar

public char readChar()
              throws IOException
Read a character.

Throws:
IOException

getColumn

public int getColumn()
Deprecated.

See Also:
getEndColumn()

getLine

public int getLine()
Deprecated.

See Also:
getEndLine()

getEndColumn

public int getEndColumn()
Get token end column number.

getEndLine

public int getEndLine()
Get token end line number.

getBeginColumn

public int getBeginColumn()
Get token beginning column number.

getBeginLine

public int getBeginLine()
Get token beginning line number.

backup

public void backup(int amount)
Backup a number of characters.

ReInit

public void ReInit(Reader dstream,
                   int startline,
                   int startcolumn,
                   int buffersize)
Reinitialise.

ReInit

public void ReInit(Reader dstream,
                   int startline,
                   int startcolumn)
Reinitialise.

ReInit

public void ReInit(Reader dstream)
Reinitialise.

ReInit

public void ReInit(InputStream dstream,
                   String encoding,
                   int startline,
                   int startcolumn,
                   int buffersize)
            throws UnsupportedEncodingException
Reinitialise.

Throws:
UnsupportedEncodingException

ReInit

public void ReInit(InputStream dstream,
                   int startline,
                   int startcolumn,
                   int buffersize)
Reinitialise.

ReInit

public void ReInit(InputStream dstream,
                   String encoding)
            throws UnsupportedEncodingException
Reinitialise.

Throws:
UnsupportedEncodingException

ReInit

public void ReInit(InputStream dstream)
Reinitialise.

ReInit

public void ReInit(InputStream dstream,
                   String encoding,
                   int startline,
                   int startcolumn)
            throws UnsupportedEncodingException
Reinitialise.

Throws:
UnsupportedEncodingException

ReInit

public void ReInit(InputStream dstream,
                   int startline,
                   int startcolumn)
Reinitialise.

GetImage

public String GetImage()
Get token literal value.

GetSuffix

public char[] GetSuffix(int len)
Get the suffix.

Done

public void Done()
Reset buffer when finished.

adjustBeginLineColumn

public void adjustBeginLineColumn(int newLine,
                                  int newCol)
Method to adjust line and column numbers for the start of a token.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Tags

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds.demohtml
Class Tags

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.demohtml.Tags

public final class Tags
extends Object

Field Summary
static Set<String> WS_ELEMS
contains all tags for which whitespaces have to be inserted for proper tokenization
Constructor Summary
Tags()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

WS_ELEMS

public static final Set<String> WS_ELEMS
contains all tags for which whitespaces have to be inserted for proper tokenization

Constructor Detail

Tags

public Tags()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Token

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds.demohtml
Class Token

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.feeds.demohtml.Token

public class Token
extends Object

Describes the input token stream.

Field Summary
int | beginColumn The column number of the first character of this Token.
int | beginLine The line number of the first character of this Token.
int | endColumn The column number of the last character of this Token.
int | endLine The line number of the last character of this Token.
String | image The string image of the token.
int | kind An integer that describes the kind of this token.
Token | next A reference to the next regular (non-special) token from the input stream.
Token | specialToken This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token.
Constructor Summary
Token()
No-argument constructor
Token(int kind)
Constructs a new token for the specified Image.
Token(int kind, String image)
Constructs a new token for the specified Image and Kind.
Method Summary
Object | getValue() An optional attribute value of the Token.
static Token | newToken(int ofKind)
static Token | newToken(int ofKind, String image) Returns a new Token object, by default.
String | toString() Returns the image.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

kind

public int kind
An integer that describes the kind of this token. This numbering system is determined by JavaCCParser, and a table of these numbers is stored in the file ...Constants.java.

beginLine

public int beginLine
The line number of the first character of this Token.

beginColumn

public int beginColumn
The column number of the first character of this Token.

endLine

public int endLine
The line number of the last character of this Token.

endColumn

public int endColumn
The column number of the last character of this Token.

image

public String image
The string image of the token.

next

public Token next
A reference to the next regular (non-special) token from the input stream. If this is the last token from the input stream, or if the token manager has not read tokens beyond this one, this field is set to null. This is true only if this token is also a regular token. Otherwise, see below for a description of the contents of this field.

specialToken

public Token specialToken
This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token. If there are no such special tokens, this field is set to null. When there are more than one such special token, this field refers to the last of these special tokens, which in turn refers to the next previous special token through its specialToken field, and so on until the first special token (whose specialToken field is null). The next fields of special tokens refer to other special tokens that immediately follow it (without an intervening regular token). If there is no such token, this field is null.

Constructor Detail

Token

public Token()
No-argument constructor

Token

public Token(int kind)
Constructs a new token for the specified Image.

Token

public Token(int kind,
             String image)
Constructs a new token for the specified Image and Kind.

Method Detail

getValue

public Object getValue()
An optional attribute value of the Token. Tokens which are not used as syntactic sugar will often contain meaningful values that will be used later on by the compiler or interpreter. This attribute value is often different from the image. Any subclass of Token that actually wants to return a non-null value can override this method as appropriate.

toString

public String toString()
Returns the image.

Overrides:
toString in class Object

newToken

public static Token newToken(int ofKind,
                             String image)
Returns a new Token object, by default. However, if you want, you can create and return subclass objects based on the value of ofKind. Simply add the cases to the switch for all those special cases. For example, if you have a subclass of Token called IDToken that you want to create if ofKind is ID, simply add something like : case MyParserConstants.ID : return new IDToken(ofKind, image); to the following switch statement. Then you can cast matchedToken variable to the appropriate type and use sit in your lexical actions.

newToken

public static Token newToken(int ofKind)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TokenMgrError

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.feeds.demohtml
Class TokenMgrError

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Error
            extended by  org.apache.lucene.benchmark.byTask.feeds.demohtml.TokenMgrError
All Implemented Interfaces:
Serializable
public class TokenMgrError
extends Error

Token Manager Error.

See Also:
Serialized Form

Constructor Summary
TokenMgrError()
No arg constructor.
TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason)
Full Constructor.
TokenMgrError(String message, int reason)
Constructor with message and reason.
Method Summary
protected static String | addEscapes(String str) Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string
String | getMessage() You can also modify the body of this method to customize your error messages.
protected static String | LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TokenMgrError

public TokenMgrError()
No arg constructor.

TokenMgrError

public TokenMgrError(String message,
                     int reason)
Constructor with message and reason.

TokenMgrError

public TokenMgrError(boolean EOFSeen,
                     int lexState,
                     int errorLine,
                     int errorColumn,
                     String errorAfter,
                     char curChar,
                     int reason)
Full Constructor.

Method Detail

addEscapes

protected static final String addEscapes(String str)
Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string

LexicalError

protected static String LexicalError(boolean EOFSeen,
                                     int lexState,
                                     int errorLine,
                                     int errorColumn,
                                     String errorAfter,
                                     char curChar)
Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error. Parameters : EOFSeen : indicates if EOF caused the lexical error curLexState : lexical state in which this error occurred errorLine : line number when the error occurred errorColumn : column number when the error occurred errorAfter : prefix that was seen before this error occurred curchar : the offending character Note: You can customize the lexical error message by modifying this method.

getMessage

public String getMessage()
You can also modify the body of this method to customize your error messages. For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not of end-users concern, so you can return something like : "Internal Error : Please file a bug report .... " from this method for such cases in the release version of your parser.

Overrides:
getMessage in class Throwable
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.benchmark.byTask.feeds.demohtml.Entities

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.demohtml.Entities

No usage of org.apache.lucene.benchmark.byTask.feeds.demohtml.Entities

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser

No usage of org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserConstants

Packages that use HTMLParserConstants
org.apache.lucene.benchmark.byTask.feeds.demohtml Example html parser based on JavaCC

Uses of HTMLParserConstants in org.apache.lucene.benchmark.byTask.feeds.demohtml

Classes in org.apache.lucene.benchmark.byTask.feeds.demohtml that implement HTMLParserConstants
class | HTMLParser
class | HTMLParserTokenManager Token Manager.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.demohtml.HTMLParserTokenManager

Packages that use HTMLParserTokenManager
org.apache.lucene.benchmark.byTask.feeds.demohtml Example html parser based on JavaCC

Uses of HTMLParserTokenManager in org.apache.lucene.benchmark.byTask.feeds.demohtml

Fields in org.apache.lucene.benchmark.byTask.feeds.demohtml declared as HTMLParserTokenManager
 HTMLParserTokenManager HTMLParser.token_source
Generated Token Manager.

Methods in org.apache.lucene.benchmark.byTask.feeds.demohtml with parameters of type HTMLParserTokenManager
 void HTMLParser.ReInit(HTMLParserTokenManager tm)
Reinitialise.

Constructors in org.apache.lucene.benchmark.byTask.feeds.demohtml with parameters of type HTMLParserTokenManager
HTMLParser(HTMLParserTokenManager tm)
Constructor with generated Token Manager.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.demohtml.ParseException

Packages that use ParseException
org.apache.lucene.benchmark.byTask.feeds.demohtml Example html parser based on JavaCC

Uses of ParseException in org.apache.lucene.benchmark.byTask.feeds.demohtml

Methods in org.apache.lucene.benchmark.byTask.feeds.demohtml that return ParseException
 ParseException HTMLParser.generateParseException()
Generate ParseException.

Methods in org.apache.lucene.benchmark.byTask.feeds.demohtml that throw ParseException
Token | HTMLParser.ArgValue()
void | HTMLParser.CommentTag()
Token | HTMLParser.Decl()
void | HTMLParser.HTMLDocument()
void | HTMLParser.ScriptTag()
void | HTMLParser.Tag()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.demohtml.SimpleCharStream

Packages that use SimpleCharStream
org.apache.lucene.benchmark.byTask.feeds.demohtml Example html parser based on JavaCC

Uses of SimpleCharStream in org.apache.lucene.benchmark.byTask.feeds.demohtml

Fields in org.apache.lucene.benchmark.byTask.feeds.demohtml declared as SimpleCharStream
protected  SimpleCharStream HTMLParserTokenManager.input_stream

Methods in org.apache.lucene.benchmark.byTask.feeds.demohtml with parameters of type SimpleCharStream
void | HTMLParserTokenManager.ReInit(SimpleCharStream stream) Reinitialise parser.
void | HTMLParserTokenManager.ReInit(SimpleCharStream stream, int lexState) Reinitialise parser.

Constructors in org.apache.lucene.benchmark.byTask.feeds.demohtml with parameters of type SimpleCharStream
HTMLParserTokenManager(SimpleCharStream stream)
Constructor.
HTMLParserTokenManager(SimpleCharStream stream, int lexState)
Constructor.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.demohtml.Tags

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.demohtml.Tags

No usage of org.apache.lucene.benchmark.byTask.feeds.demohtml.Tags

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.demohtml.Token

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.demohtml.Token

Packages that use Token
org.apache.lucene.benchmark.byTask.feeds.demohtml Example html parser based on JavaCC

Uses of Token in org.apache.lucene.benchmark.byTask.feeds.demohtml

Fields in org.apache.lucene.benchmark.byTask.feeds.demohtml declared as Token
Token | ParseException.currentToken This is the last token that has been consumed successfully.
Token | HTMLParser.jj_nt Next token.
Token | Token.next A reference to the next regular (non-special) token from the input stream.
Token | Token.specialToken This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token.
Token | HTMLParser.token Current token.

Methods in org.apache.lucene.benchmark.byTask.feeds.demohtml that return Token
Token | HTMLParser.ArgValue()
Token | HTMLParser.Decl()
Token | HTMLParserTokenManager.getNextToken() Get the next Token.
Token | HTMLParser.getNextToken() Get the next Token.
Token | HTMLParser.getToken(int index) Get the specific Token.
protected Token | HTMLParserTokenManager.jjFillToken()
static Token | Token.newToken(int ofKind)
static Token | Token.newToken(int ofKind, String image) Returns a new Token object, by default.

Constructors in org.apache.lucene.benchmark.byTask.feeds.demohtml with parameters of type Token
ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal)
This constructor is used by the method "generateParseException" in the generated parser.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.feeds.demohtml.TokenMgrError

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.feeds.demohtml.TokenMgrError

No usage of org.apache.lucene.benchmark.byTask.feeds.demohtml.TokenMgrError

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.benchmark.byTask.programmatic
Classes
Sample


org.apache.lucene.benchmark.byTask.programmatic

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.benchmark.byTask.programmatic

Sample performance test written programmatically - no algorithm file is needed here.

See:
Description

Class Summary
Sample Sample performance test written programmatically - no algorithm file is needed here.

Package org.apache.lucene.benchmark.byTask.programmatic Description

Sample performance test written programmatically - no algorithm file is needed here.


org.apache.lucene.benchmark.byTask.programmatic Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.benchmark.byTask.programmatic

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.benchmark.byTask.programmatic.Sample


Uses of Package org.apache.lucene.benchmark.byTask.programmatic

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.benchmark.byTask.programmatic

No usage of org.apache.lucene.benchmark.byTask.programmatic

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Sample

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.programmatic
Class Sample

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.programmatic.Sample

public class Sample
extends Object

Sample performance test written programmatically - no algorithm file is needed here.

Constructor Summary
Sample()
Method Summary
static void main(String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Sample

public Sample()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Parameters:
args -
Throws:
Exception
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.benchmark.byTask.programmatic.Sample

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.programmatic.Sample

No usage of org.apache.lucene.benchmark.byTask.programmatic.Sample

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.benchmark.byTask.stats
Classes
Points
Report
TaskStats


org.apache.lucene.benchmark.byTask.stats

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.benchmark.byTask.stats

Statistics maintained when running benchmark tasks.

See:
Description

Class Summary
Points | Test run data points collected as the test proceeds.
Report | Textual report of current statistics.
TaskStats | Statistics for a task run.

Package org.apache.lucene.benchmark.byTask.stats Description

Statistics maintained when running benchmark tasks.


org.apache.lucene.benchmark.byTask.stats Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.benchmark.byTask.stats

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.benchmark.byTask.stats.Points
    • org.apache.lucene.benchmark.byTask.stats.Report
    • org.apache.lucene.benchmark.byTask.stats.TaskStats (implements java.lang.Cloneable)


Uses of Package org.apache.lucene.benchmark.byTask.stats

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.benchmark.byTask.stats

Packages that use org.apache.lucene.benchmark.byTask.stats
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.stats | Statistics maintained when running benchmark tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.

Classes in org.apache.lucene.benchmark.byTask.stats used by org.apache.lucene.benchmark.byTask
Points
Test run data points collected as the test proceeds.

Classes in org.apache.lucene.benchmark.byTask.stats used by org.apache.lucene.benchmark.byTask.stats
TaskStats
Statistics for a task run.

Classes in org.apache.lucene.benchmark.byTask.stats used by org.apache.lucene.benchmark.byTask.tasks
Report
Textual report of current statistics.
TaskStats
Statistics for a task run.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Points

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.stats
Class Points

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.stats.Points

public class Points
extends Object

Test run data points collected as the test proceeds.

Constructor Summary
Points(Config config)
Create a Points statistics object.
Method Summary
void | clearData() Clear all data, prepare for more tests.
TaskStats | getCurrentStats()
void | markTaskEnd(TaskStats stats, int count) mark the end of a task
TaskStats | markTaskStart(PerfTask task, int round) Mark that a task is starting.
List<TaskStats> | taskStats() Return the current task stats.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Points

public Points(Config config)
Create a Points statistics object.

Method Detail

taskStats

public List<TaskStats> taskStats()
Return the current task stats. the actual task stats are returned, so caller should not modify this task stats.

Returns:
current TaskStats.

markTaskStart

public TaskStats markTaskStart(PerfTask task,
                               int round)
Mark that a task is starting. Create a task stats for it and store it as a point.

Parameters:
task - the starting task.
Returns:
the new task stats created for the starting task.

getCurrentStats

public TaskStats getCurrentStats()

markTaskEnd

public void markTaskEnd(TaskStats stats,
                        int count)
mark the end of a task

clearData

public void clearData()
Clear all data, prepare for more tests.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Report

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.stats
Class Report

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.stats.Report

public class Report
extends Object

Textual report of current statistics.

Constructor Summary
Report(String text, int size, int reported, int outOf)
Method Summary
int | getOutOf() Returns total number of stats points when this report was created.
int | getReported() Returns number of stats points represented in this report.
int | getSize() Returns number of lines in the report.
String | getText() Returns the report text.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Report

public Report(String text,
              int size,
              int reported,
              int outOf)
Method Detail

getOutOf

public int getOutOf()
Returns total number of stats points when this report was created.

getSize

public int getSize()
Returns number of lines in the report.

getText

public String getText()
Returns the report text.

getReported

public int getReported()
Returns number of stats points represented in this report.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TaskStats

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.stats
Class TaskStats

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.stats.TaskStats
All Implemented Interfaces:
Cloneable
public class TaskStats
extends Object
implements Cloneable

Statistics for a task run.
The same task can run more than once, but, if that task records statistics, each run would create its own TaskStats.

Method Summary
void | add(TaskStats stat2) Add data from another stat, for aggregation
Object | clone()
int | getCount()
int[] | getCountsByTime()
long | getCountsByTimeStepMSec()
long | getElapsed()
long | getMaxTotMem()
long | getMaxUsedMem()
int | getNumParallelTasks()
int | getNumRuns()
int | getRound()
PerfTask | getTask()
int | getTaskRunNum()
void | setCountsByTime(int[] counts, long msecStep)
String | toString()
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Method Detail

setCountsByTime

public void setCountsByTime(int[] counts,
                            long msecStep)

getCountsByTime

public int[] getCountsByTime()

getCountsByTimeStepMSec

public long getCountsByTimeStepMSec()

getTaskRunNum

public int getTaskRunNum()
Returns:
the taskRunNum.

toString

public String toString()
Overrides:
toString in class Object

getCount

public int getCount()
Returns:
Returns the count.

getElapsed

public long getElapsed()
Returns:
elapsed time.

getMaxTotMem

public long getMaxTotMem()
Returns:
Returns the maxTotMem.

getMaxUsedMem

public long getMaxUsedMem()
Returns:
Returns the maxUsedMem.

getNumParallelTasks

public int getNumParallelTasks()
Returns:
Returns the numParallelTasks.

getTask

public PerfTask getTask()
Returns:
Returns the task.

getNumRuns

public int getNumRuns()
Returns:
Returns the numRuns.

add

public void add(TaskStats stat2)
Add data from another stat, for aggregation

Parameters:
stat2 - the added stat data.

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

getRound

public int getRound()
Returns:
the round number.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.benchmark.byTask.stats.Points

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.stats.Points

Packages that use Points
org.apache.lucene.benchmark.byTask
Benchmarking Lucene By Tasks.

Uses of Points in org.apache.lucene.benchmark.byTask

Methods in org.apache.lucene.benchmark.byTask that return Points
 Points PerfRunData.getPoints()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.stats.Report

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.stats.Report

Packages that use Report
org.apache.lucene.benchmark.byTask.tasks Extendable benchmark tasks.

Uses of Report in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks that return Report
protected Report | ReportTask.genPartialReport(int reported, LinkedHashMap<String,TaskStats> partOfTasks, int totalSize)
protected Report | RepAllTask.reportAll(List<TaskStats> taskStats) Report detailed statistics as a string
protected Report | RepSelectByPrefTask.reportSelectByPrefix(List<TaskStats> taskStats)
protected Report | RepSumByNameTask.reportSumByName(List<TaskStats> taskStats) Report statistics as a string, aggregate for tasks named the same.
protected Report | RepSumByNameRoundTask.reportSumByNameRound(List<TaskStats> taskStats) Report statistics as a string, aggregate for tasks named the same, and from the same round.
protected Report | RepSumByPrefTask.reportSumByPrefix(List<TaskStats> taskStats)
protected Report | RepSumByPrefRoundTask.reportSumByPrefixRound(List<TaskStats> taskStats)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.stats.TaskStats

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.stats.TaskStats

Packages that use TaskStats
org.apache.lucene.benchmark.byTask.stats | Statistics maintained when running benchmark tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.

Uses of TaskStats in org.apache.lucene.benchmark.byTask.stats

Methods in org.apache.lucene.benchmark.byTask.stats that return TaskStats
TaskStats | Points.getCurrentStats()
TaskStats | Points.markTaskStart(PerfTask task, int round) Mark that a task is starting.

Methods in org.apache.lucene.benchmark.byTask.stats that return types with arguments of type TaskStats
 List<TaskStats> Points.taskStats()
Return the current task stats.

Methods in org.apache.lucene.benchmark.byTask.stats with parameters of type TaskStats
void | TaskStats.add(TaskStats stat2) Add data from another stat, for aggregation
void | Points.markTaskEnd(TaskStats stats, int count) mark the end of a task

Uses of TaskStats in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks with parameters of type TaskStats
protected  String ReportTask.taskReportLine(String longestOp, TaskStats stat)
Compute a report line for the given task stat.

Method parameters in org.apache.lucene.benchmark.byTask.tasks with type arguments of type TaskStats
protected Report | ReportTask.genPartialReport(int reported, LinkedHashMap<String,TaskStats> partOfTasks, int totalSize)
protected String | ReportTask.longestOp(Iterable<TaskStats> taskStats) find the longest op name out of completed tasks.
protected Report | RepAllTask.reportAll(List<TaskStats> taskStats) Report detailed statistics as a string
protected Report | RepSelectByPrefTask.reportSelectByPrefix(List<TaskStats> taskStats)
protected Report | RepSumByNameTask.reportSumByName(List<TaskStats> taskStats) Report statistics as a string, aggregate for tasks named the same.
protected Report | RepSumByNameRoundTask.reportSumByNameRound(List<TaskStats> taskStats) Report statistics as a string, aggregate for tasks named the same, and from the same round.
protected Report | RepSumByPrefTask.reportSumByPrefix(List<TaskStats> taskStats)
protected Report | RepSumByPrefRoundTask.reportSumByPrefixRound(List<TaskStats> taskStats)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AddDocTask

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class AddDocTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.AddDocTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
AddFacetedDocTask
public class AddDocTask
extends PerfTask

Add a document, optionally of a certain size.
Other side effects: none.
Takes optional param: document size.

Field Summary
protected  Document doc
volatile data passed between setup(), doLogic(), tearDown().
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
AddDocTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected String | getLogMessage(int recsCount)
void | setParams(String params) Set the params (docSize only)
void | setup() Task setup work that should not be measured for that specific task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
void | tearDown() Task tearDown work that should not be measured for that specific task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

doc

protected Document doc
volatile data passed between setup(), doLogic(), tearDown(). the doc is created at setup() and added at doLogic().

Constructor Detail

AddDocTask

public AddDocTask(PerfRunData runData)
Method Detail

setup

public void setup()
           throws Exception
Description copied from class: PerfTask
Task setup work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from PerfTask.doLogic() to this method. Only the work done in PerfTask.doLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.

Overrides:
setup in class PerfTask
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Description copied from class: PerfTask
Task tearDown work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from PerfTask.doLogic() to this method. Only the work done in PerfTask.doLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.

Overrides:
tearDown in class PerfTask
Throws:
Exception

getLogMessage

protected String getLogMessage(int recsCount)
Overrides:
getLogMessage in class PerfTask

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

setParams

public void setParams(String params)
Set the params (docSize only)

Overrides:
setParams in class PerfTask
Parameters:
params - docSize, or 0 for no limit.

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AddFacetedDocTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class AddFacetedDocTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.AddDocTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.AddFacetedDocTask
All Implemented Interfaces:
Cloneable
public class AddFacetedDocTask
extends AddDocTask

Add a faceted document.

Config properties:

  • with.facets=<tells whether to actually add any facets to the document| Default: true>
    This config property allows to easily compare the performance of adding docs with and without facets. Note that facets are created even when this is false, just that they are not added to the document (nor to the taxonomy).

See AddDocTask for general document parameters and configuration.

Makes use of the FacetSource in effect - see PerfRunData for facet source settings.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.AddDocTask
doc
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
AddFacetedDocTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected String | getLogMessage(int recsCount)
void | setup() Task setup work that should not be measured for that specific task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.AddDocTask
setParams, supportsParams, tearDown
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AddFacetedDocTask

public AddFacetedDocTask(PerfRunData runData)
Method Detail

setup

public void setup()
           throws Exception
Description copied from class: PerfTask
Task setup work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from PerfTask.doLogic() to this method. Only the work done in PerfTask.doLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.

Overrides:
setup in class AddDocTask
Throws:
Exception

getLogMessage

protected String getLogMessage(int recsCount)
Overrides:
getLogMessage in class AddDocTask

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Overrides:
doLogic in class AddDocTask
Returns:
number of work items done by this task.
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BenchmarkHighlighter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class BenchmarkHighlighter

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.BenchmarkHighlighter

public abstract class BenchmarkHighlighter
extends Object

Constructor Summary
BenchmarkHighlighter()
Method Summary
abstract  int doHighlight(IndexReader reader, int doc, String field, Document document, Analyzer analyzer, String text)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BenchmarkHighlighter

public BenchmarkHighlighter()
Method Detail

doHighlight

public abstract int doHighlight(IndexReader reader,
                                int doc,
                                String field,
                                Document document,
                                Analyzer analyzer,
                                String text)
                         throws Exception
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ClearStatsTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class ClearStatsTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ClearStatsTask
All Implemented Interfaces:
Cloneable
public class ClearStatsTask
extends PerfTask

Clear statistics data.
Other side effects: None.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
ClearStatsTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected boolean | shouldNotRecordStats() Tasks that should not record statistics can override this.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ClearStatsTask

public ClearStatsTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

shouldNotRecordStats

protected boolean shouldNotRecordStats()
Description copied from class: PerfTask
Tasks that should not record statistics can override this.

Overrides:
shouldNotRecordStats in class PerfTask
Returns:
true if this task should never record its statistics.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CloseIndexTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class CloseIndexTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.CloseIndexTask
All Implemented Interfaces:
Cloneable
public class CloseIndexTask
extends PerfTask

Close index writer.
Other side effects: index writer object in perfRunData is nullified.
Takes optional param "doWait": if false, then close(false) is called.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
CloseIndexTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
void | setParams(String params) Set the params of this task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CloseIndexTask

public CloseIndexTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws IOException
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
IOException

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class PerfTask

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CloseReaderTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class CloseReaderTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.CloseReaderTask
All Implemented Interfaces:
Cloneable
public class CloseReaderTask
extends PerfTask

Close index reader.
Other side effects: index reader in perfRunData is nullified.
This would cause read related tasks to reopen their own reader.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
CloseReaderTask(PerfRunData runData)
Method Summary
 int doLogic()
Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CloseReaderTask

public CloseReaderTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws IOException
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CloseTaxonomyIndexTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class CloseTaxonomyIndexTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyIndexTask
All Implemented Interfaces:
Cloneable
public class CloseTaxonomyIndexTask
extends PerfTask

Close taxonomy index.
Other side effects: taxonomy writer object in perfRunData is nullified.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
CloseTaxonomyIndexTask(PerfRunData runData)
Method Summary
 int doLogic()
Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CloseTaxonomyIndexTask

public CloseTaxonomyIndexTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws IOException
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CloseTaxonomyReaderTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class CloseTaxonomyReaderTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyReaderTask
All Implemented Interfaces:
Cloneable
public class CloseTaxonomyReaderTask
extends PerfTask

Close taxonomy reader.
Other side effects: taxonomy reader in perfRunData is nullified.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
CloseTaxonomyReaderTask(PerfRunData runData)
Method Summary
 int doLogic()
Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CloseTaxonomyReaderTask

public CloseTaxonomyReaderTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws IOException
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CommitIndexTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class CommitIndexTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.CommitIndexTask
All Implemented Interfaces:
Cloneable
public class CommitIndexTask
extends PerfTask

Commits the IndexWriter.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
CommitIndexTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
void | setParams(String params) Set the params of this task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CommitIndexTask

public CommitIndexTask(PerfRunData runData)
Method Detail

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class PerfTask

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CommitTaxonomyIndexTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class CommitTaxonomyIndexTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.CommitTaxonomyIndexTask
All Implemented Interfaces:
Cloneable
public class CommitTaxonomyIndexTask
extends PerfTask

Commits the Taxonomy Index.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
CommitTaxonomyIndexTask(PerfRunData runData)
Method Summary
 int doLogic()
Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CommitTaxonomyIndexTask

public CommitTaxonomyIndexTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ConsumeContentSourceTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class ConsumeContentSourceTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ConsumeContentSourceTask
All Implemented Interfaces:
Cloneable
public class ConsumeContentSourceTask
extends PerfTask

Consumes a ContentSource. Supports the following parameters:

  • content.source - the content source to use. (mandatory)

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
ConsumeContentSourceTask(PerfRunData runData)
Method Summary
void | close()
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected String | getLogMessage(int recsCount)
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, getBackgroundDeltaPriority, getDepth, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ConsumeContentSourceTask

public ConsumeContentSourceTask(PerfRunData runData)
Method Detail

getLogMessage

protected String getLogMessage(int recsCount)
Overrides:
getLogMessage in class PerfTask

close

public void close()
           throws Exception
Overrides:
close in class PerfTask
Throws:
Exception

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CreateIndexTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class CreateIndexTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask
All Implemented Interfaces:
Cloneable
public class CreateIndexTask
extends PerfTask

Create an index.
Other side effects: index writer object in perfRunData is set.
Relevant properties: merge.factor (default 10), max.buffered (default no flush), max.field.length (default 10,000 tokens), max.field.length, compound (default true), ram.flush.mb [default 0], merge.policy (default org.apache.lucene.index.LogByteSizeMergePolicy), merge.scheduler (default org.apache.lucene.index.ConcurrentMergeScheduler), concurrent.merge.scheduler.max.thread.count and concurrent.merge.scheduler.max.merge.count (defaults per ConcurrentMergeScheduler) .

This task also supports a "writer.info.stream" property with the following values:

  • SystemOut - sets IndexWriter.setInfoStream(java.io.PrintStream) to System.out.
  • SystemErr - sets IndexWriter.setInfoStream(java.io.PrintStream) to System.err.
  • <file_name> - attempts to create a file given that name and sets IndexWriter.setInfoStream(java.io.PrintStream) to that file. If this denotes an invalid file name, or some error occurs, an exception will be thrown.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
CreateIndexTask(PerfRunData runData)
Method Summary
static IndexWriter | configureWriter(Config config, PerfRunData runData, IndexWriterConfig.OpenMode mode, IndexCommit commit)
static IndexWriterConfig | createWriterConfig(Config config, PerfRunData runData, IndexWriterConfig.OpenMode mode, IndexCommit commit)
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
static IndexDeletionPolicy | getIndexDeletionPolicy(Config config)
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CreateIndexTask

public CreateIndexTask(PerfRunData runData)
Method Detail

getIndexDeletionPolicy

public static IndexDeletionPolicy getIndexDeletionPolicy(Config config)

doLogic

public int doLogic()
            throws IOException
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
IOException

createWriterConfig

public static IndexWriterConfig createWriterConfig(Config config,
                                                   PerfRunData runData,
                                                   IndexWriterConfig.OpenMode mode,
                                                   IndexCommit commit)

configureWriter

public static IndexWriter configureWriter(Config config,
                                          PerfRunData runData,
                                          IndexWriterConfig.OpenMode mode,
                                          IndexCommit commit)
                                   throws CorruptIndexException,
                                          LockObtainFailedException,
                                          IOException
Throws:
CorruptIndexException
LockObtainFailedException
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CreateTaxonomyIndexTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class CreateTaxonomyIndexTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.CreateTaxonomyIndexTask
All Implemented Interfaces:
Cloneable
public class CreateTaxonomyIndexTask
extends PerfTask

Create a taxonomy index.
Other side effects: taxonomy writer object in perfRunData is set.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
CreateTaxonomyIndexTask(PerfRunData runData)
Method Summary
 int doLogic()
Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CreateTaxonomyIndexTask

public CreateTaxonomyIndexTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws IOException
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DeleteByPercentTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class DeleteByPercentTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.DeleteByPercentTask
All Implemented Interfaces:
Cloneable
public class DeleteByPercentTask
extends PerfTask

Deletes a percentage of documents from an index randomly over the number of documents. The parameter, X, is in percent. EG 50 means 1/2 of all documents will be deleted.

NOTE: the param is an absolute percentage of maxDoc(). This means if you delete 50%, and then delete 50% again, the 2nd delete will do nothing.

Parameters:

  • delete.percent.rand.seed - defines the seed to initialize Random (default 1717)

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
DeleteByPercentTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
void | setParams(String params) Set the params of this task.
void | setup() Task setup work that should not be measured for that specific task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DeleteByPercentTask

public DeleteByPercentTask(PerfRunData runData)
Method Detail

setup

public void setup()
           throws Exception
Description copied from class: PerfTask
Task setup work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from PerfTask.doLogic() to this method. Only the work done in PerfTask.doLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.

Overrides:
setup in class PerfTask
Throws:
Exception

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class PerfTask

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DeleteDocTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class DeleteDocTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.DeleteDocTask
All Implemented Interfaces:
Cloneable
public class DeleteDocTask
extends PerfTask

Delete a document by docid. If no docid param is supplied, deletes doc with id = last-deleted-doc + doc.delete.step.

Field Summary
static int DEFAULT_DOC_DELETE_STEP
Gap between ids of deleted docs, applies when no docid param is provided.
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
DeleteDocTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected String | getLogMessage(int recsCount)
void | setParams(String params) Set the params (docid only)
void | setup() Task setup work that should not be measured for that specific task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_DOC_DELETE_STEP

public static final int DEFAULT_DOC_DELETE_STEP
Gap between ids of deleted docs, applies when no docid param is provided.

See Also:
Constant Field Values
Constructor Detail

DeleteDocTask

public DeleteDocTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

setup

public void setup()
           throws Exception
Description copied from class: PerfTask
Task setup work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from PerfTask.doLogic() to this method. Only the work done in PerfTask.doLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.

Overrides:
setup in class PerfTask
Throws:
Exception

getLogMessage

protected String getLogMessage(int recsCount)
Overrides:
getLogMessage in class PerfTask

setParams

public void setParams(String params)
Set the params (docid only)

Overrides:
setParams in class PerfTask
Parameters:
params - docid to delete, or -1 for deleting by delete gap settings.

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FlushReaderTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class FlushReaderTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.FlushReaderTask
All Implemented Interfaces:
Cloneable
public class FlushReaderTask
extends PerfTask

Commits via IndexReader.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
FlushReaderTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
void | setParams(String params) Set the params of this task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FlushReaderTask

public FlushReaderTask(PerfRunData runData)
Method Detail

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class PerfTask

doLogic

public int doLogic()
            throws IOException
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ForceMergeTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class ForceMergeTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ForceMergeTask
All Implemented Interfaces:
Cloneable
public class ForceMergeTask
extends PerfTask

Runs forceMerge on the index.
Other side effects: none.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
ForceMergeTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
void | setParams(String params) Set the params of this task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ForceMergeTask

public ForceMergeTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class PerfTask

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NearRealtimeReaderTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class NearRealtimeReaderTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask
All Implemented Interfaces:
Cloneable
public class NearRealtimeReaderTask
extends PerfTask

Spawns a BG thread that periodically (defaults to 3.0 seconds, but accepts param in seconds) wakes up and asks IndexWriter for a near real-time reader. Then runs a single query (body: 1) sorted by docdate, and prints time to reopen and time to run the search.

WARNING: This API is experimental and might change in incompatible ways in the next release.
It's also not generally usable, eg you cannot change which query is executed.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
NearRealtimeReaderTask(PerfRunData runData)
Method Summary
void | close()
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
void | setParams(String params) Set the params of this task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NearRealtimeReaderTask

public NearRealtimeReaderTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class PerfTask

close

public void close()
Overrides:
close in class PerfTask

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NewAnalyzerTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class NewAnalyzerTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask
All Implemented Interfaces:
Cloneable
public class NewAnalyzerTask
extends PerfTask

Create a new Analyzer and set it it in the getRunData() for use by all future tasks.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
NewAnalyzerTask(PerfRunData runData)
Method Summary
static Analyzer | createAnalyzer(String className)
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
void | setParams(String params) Set the params (analyzerClassName only), Comma-separate list of Analyzer class names.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NewAnalyzerTask

public NewAnalyzerTask(PerfRunData runData)
Method Detail

createAnalyzer

public static final Analyzer createAnalyzer(String className)
                                     throws Exception
Throws:
Exception

doLogic

public int doLogic()
            throws IOException
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
IOException

setParams

public void setParams(String params)
Set the params (analyzerClassName only), Comma-separate list of Analyzer class names. If the Analyzer lives in org.apache.lucene.analysis, the name can be shortened by dropping the o.a.l.a part of the Fully Qualified Class Name.

Example Declaration: {"NewAnalyzer" NewAnalyzer(WhitespaceAnalyzer, SimpleAnalyzer, StopAnalyzer, standard.StandardAnalyzer) >

Overrides:
setParams in class PerfTask
Parameters:
params - analyzerClassName, or empty for the StandardAnalyzer

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NewCollationAnalyzerTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class NewCollationAnalyzerTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask
All Implemented Interfaces:
Cloneable
public class NewCollationAnalyzerTask
extends PerfTask

Task to support benchmarking collation.

  • NewCollationAnalyzer with the default jdk impl
  • NewCollationAnalyzer(impl:icu) specify an impl (jdk,icu)

Nested Class Summary
static class NewCollationAnalyzerTask.Implementation
Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
NewCollationAnalyzerTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
void | setParams(String params) Set the params of this task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NewCollationAnalyzerTask

public NewCollationAnalyzerTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class PerfTask

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NewCollationAnalyzerTask.Implementation

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.benchmark.byTask.tasks
Enum NewCollationAnalyzerTask.Implementation

java.lang.Object
    extended by  java.lang.Enum<NewCollationAnalyzerTask.Implementation>
        extended by  org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask.Implementation
All Implemented Interfaces:
Serializable, Comparable<NewCollationAnalyzerTask.Implementation>
Enclosing class:
NewCollationAnalyzerTask
public static enum NewCollationAnalyzerTask.Implementation
extends Enum<NewCollationAnalyzerTask.Implementation>

Enum Constant Summary
ICU
JDK
Method Summary
static NewCollationAnalyzerTask.Implementation | valueOf(String name) Returns the enum constant of this type with the specified name.
static NewCollationAnalyzerTask.Implementation[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

JDK

public static final NewCollationAnalyzerTask.Implementation JDK

ICU

public static final NewCollationAnalyzerTask.Implementation ICU
Method Detail

values

public static final NewCollationAnalyzerTask.Implementation[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(NewCollationAnalyzerTask.Implementation c : NewCollationAnalyzerTask.Implementation.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static NewCollationAnalyzerTask.Implementation valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


NewLocaleTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class NewLocaleTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.NewLocaleTask
All Implemented Interfaces:
Cloneable
public class NewLocaleTask
extends PerfTask

Set a Locale for use in benchmarking.

Locales can be specified in the following ways:

  • de: Language "de"
  • en,US: Language "en", country "US"
  • no,NO,NY: Language "no", country "NO", variant "NY"
  • ROOT: The root (language-agnostic) Locale
  • <empty string>: Erase the Locale (null)

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
NewLocaleTask(PerfRunData runData)
Create a new Locale and set it it in the getRunData() for use by all future tasks.
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
void | setParams(String params) Set the params of this task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NewLocaleTask

public NewLocaleTask(PerfRunData runData)
Create a new Locale and set it it in the getRunData() for use by all future tasks.

Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class PerfTask

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NewRoundTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class NewRoundTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.NewRoundTask
All Implemented Interfaces:
Cloneable
public class NewRoundTask
extends PerfTask

Increment the counter for properties maintained by Round Number.
Other side effects: if there are props by round number, log value change.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
NewRoundTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected boolean | shouldNotRecordStats() Tasks that should not record statistics can override this.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NewRoundTask

public NewRoundTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

shouldNotRecordStats

protected boolean shouldNotRecordStats()
Description copied from class: PerfTask
Tasks that should not record statistics can override this.

Overrides:
shouldNotRecordStats in class PerfTask
Returns:
true if this task should never record its statistics.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NewShingleAnalyzerTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class NewShingleAnalyzerTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.NewShingleAnalyzerTask
All Implemented Interfaces:
Cloneable
public class NewShingleAnalyzerTask
extends PerfTask

Task to support benchmarking ShingleFilter / ShingleAnalyzerWrapper

  • NewShingleAnalyzer (constructs with all defaults)
  • NewShingleAnalyzer(analyzer:o.a.l.analysis.StandardAnalyzer,maxShingleSize:2,outputUnigrams:true)

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
NewShingleAnalyzerTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
void | setParams(String params) Set the params of this task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NewShingleAnalyzerTask

public NewShingleAnalyzerTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class PerfTask

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OpenIndexTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class OpenIndexTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask
All Implemented Interfaces:
Cloneable
public class OpenIndexTask
extends PerfTask

Open an index writer.
Other side effects: index writer object in perfRunData is set.
Relevant properties: merge.factor, max.buffered, max.field.length, ram.flush.mb [default 0].

Accepts a param specifying the commit point as previously saved with CommitIndexTask. If you specify this, it rolls the index back to that commit on opening the IndexWriter.

Field Summary
static int | DEFAULT_MAX_BUFFERED
static int | DEFAULT_MAX_FIELD_LENGTH
static int | DEFAULT_MERGE_PFACTOR
static double | DEFAULT_RAM_FLUSH_MB
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
OpenIndexTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
void | setParams(String params) Set the params of this task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_MAX_BUFFERED

public static final int DEFAULT_MAX_BUFFERED
See Also:
Constant Field Values

DEFAULT_MAX_FIELD_LENGTH

public static final int DEFAULT_MAX_FIELD_LENGTH

DEFAULT_MERGE_PFACTOR

public static final int DEFAULT_MERGE_PFACTOR
See Also:
Constant Field Values

DEFAULT_RAM_FLUSH_MB

public static final double DEFAULT_RAM_FLUSH_MB
See Also:
Constant Field Values
Constructor Detail

OpenIndexTask

public OpenIndexTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws IOException
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
IOException

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class PerfTask

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OpenReaderTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class OpenReaderTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.OpenReaderTask
All Implemented Interfaces:
Cloneable
public class OpenReaderTask
extends PerfTask

Open an index reader.
Other side effects: index reader object in perfRunData is set.
Optional params readOnly,commitUserData eg. OpenReader(false,commit1)

Field Summary
static String USER_DATA
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
OpenReaderTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
static IndexCommit | findIndexCommit(Directory dir, String userData)
void | setParams(String params) Set the params of this task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

USER_DATA

public static final String USER_DATA
See Also:
Constant Field Values
Constructor Detail

OpenReaderTask

public OpenReaderTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws IOException
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
IOException

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class PerfTask

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.

findIndexCommit

public static IndexCommit findIndexCommit(Directory dir,
                                          String userData)
                                   throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OpenTaxonomyIndexTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class OpenTaxonomyIndexTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyIndexTask
All Implemented Interfaces:
Cloneable
public class OpenTaxonomyIndexTask
extends PerfTask

Open a taxonomy index.
Other side effects: taxonomy writer object in perfRunData is set.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
OpenTaxonomyIndexTask(PerfRunData runData)
Method Summary
 int doLogic()
Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

OpenTaxonomyIndexTask

public OpenTaxonomyIndexTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws IOException
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OpenTaxonomyReaderTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class OpenTaxonomyReaderTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyReaderTask
All Implemented Interfaces:
Cloneable
public class OpenTaxonomyReaderTask
extends PerfTask

Open a taxonomy index reader.
Other side effects: taxonomy reader object in perfRunData is set.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
OpenTaxonomyReaderTask(PerfRunData runData)
Method Summary
 int doLogic()
Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

OpenTaxonomyReaderTask

public OpenTaxonomyReaderTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws IOException
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.benchmark.byTask.tasks
Classes
AddDocTask
AddFacetedDocTask
BenchmarkHighlighter
ClearStatsTask
CloseIndexTask
CloseReaderTask
CloseTaxonomyIndexTask
CloseTaxonomyReaderTask
CommitIndexTask
CommitTaxonomyIndexTask
ConsumeContentSourceTask
CreateIndexTask
CreateTaxonomyIndexTask
DeleteByPercentTask
DeleteDocTask
FlushReaderTask
ForceMergeTask
NearRealtimeReaderTask
NewAnalyzerTask
NewCollationAnalyzerTask
NewLocaleTask
NewRoundTask
NewShingleAnalyzerTask
OpenIndexTask
OpenReaderTask
OpenTaxonomyIndexTask
OpenTaxonomyReaderTask
PerfTask
PrintReaderTask
ReadTask
ReadTokensTask
ReopenReaderTask
RepAllTask
ReportTask
RepSelectByPrefTask
RepSumByNameRoundTask
RepSumByNameTask
RepSumByPrefRoundTask
RepSumByPrefTask
ResetInputsTask
ResetSystemEraseTask
ResetSystemSoftTask
RollbackIndexTask
SearchTask
SearchTravRetHighlightTask
SearchTravRetLoadFieldSelectorTask
SearchTravRetTask
SearchTravRetVectorHighlightTask
SearchTravTask
SearchWithCollectorTask
SearchWithSortTask
SetPropTask
TaskSequence
UpdateDocTask
WaitForMergesTask
WaitTask
WarmTask
WriteLineDocTask
Enums
NewCollationAnalyzerTask.Implementation


org.apache.lucene.benchmark.byTask.tasks

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.benchmark.byTask.tasks

Extendable benchmark tasks.

See:
Description

Class Summary
AddDocTask | Add a document, optionally of a certain size.
AddFacetedDocTask | Add a faceted document.
BenchmarkHighlighter |
ClearStatsTask | Clear statistics data.
CloseIndexTask | Close index writer.
CloseReaderTask | Close index reader.
CloseTaxonomyIndexTask | Close taxonomy index.
CloseTaxonomyReaderTask | Close taxonomy reader.
CommitIndexTask | Commits the IndexWriter.
CommitTaxonomyIndexTask | Commits the Taxonomy Index.
ConsumeContentSourceTask | Consumes a ContentSource.
CreateIndexTask | Create an index.
CreateTaxonomyIndexTask | Create a taxonomy index.
DeleteByPercentTask | Deletes a percentage of documents from an index randomly over the number of documents.
DeleteDocTask | Delete a document by docid.
FlushReaderTask | Commits via IndexReader.
ForceMergeTask | Runs forceMerge on the index.
NearRealtimeReaderTask | Spawns a BG thread that periodically (defaults to 3.0 seconds, but accepts param in seconds) wakes up and asks IndexWriter for a near real-time reader.
NewAnalyzerTask | Create a new Analyzer and set it it in the getRunData() for use by all future tasks.
NewCollationAnalyzerTask | Task to support benchmarking collation.
NewLocaleTask | Set a Locale for use in benchmarking.
NewRoundTask | Increment the counter for properties maintained by Round Number.
NewShingleAnalyzerTask | Task to support benchmarking ShingleFilter / ShingleAnalyzerWrapper
OpenIndexTask | Open an index writer.
OpenReaderTask | Open an index reader.
OpenTaxonomyIndexTask | Open a taxonomy index.
OpenTaxonomyReaderTask | Open a taxonomy index reader.
PerfTask | An abstract task to be tested for performance.
PrintReaderTask | Opens a reader and prints basic statistics.
ReadTask | Read index (abstract) task.
ReadTokensTask | Simple task to test performance of tokenizers.
ReopenReaderTask | Reopens IndexReader and closes old IndexReader.
RepAllTask | Report all statistics with no aggregations.
ReportTask | Report (abstract) task - all report tasks extend this task.
RepSelectByPrefTask | Report by-name-prefix statistics with no aggregations.
RepSumByNameRoundTask | Report all statistics grouped/aggregated by name and round.
RepSumByNameTask | Report all statistics aggregated by name.
RepSumByPrefRoundTask | Report all prefix matching statistics grouped/aggregated by name and round.
RepSumByPrefTask | Report by-name-prefix statistics aggregated by name.
ResetInputsTask | Reset inputs so that the test run would behave, input wise, as if it just started.
ResetSystemEraseTask | Reset all index and input data and call gc, erase index and dir, does NOT clear statistics.
ResetSystemSoftTask | Reset all index and input data and call gc, does NOT erase index/dir, does NOT clear statistics.
RollbackIndexTask | Rollback the index writer.
SearchTask | Search task.
SearchTravRetHighlightTask | Search and Traverse and Retrieve docs task.
SearchTravRetLoadFieldSelectorTask | Search and Traverse and Retrieve docs task using a SetBasedFieldSelector.
SearchTravRetTask | Search and Traverse and Retrieve docs task.
SearchTravRetVectorHighlightTask | Search and Traverse and Retrieve docs task.
SearchTravTask | Search and Traverse task.
SearchWithCollectorTask | Does search w/ a custom collector
SearchWithSortTask | Does sort search on specified field.
SetPropTask | Set a performance test configuration property.
TaskSequence | Sequence of parallel or sequential tasks.
UpdateDocTask | Update a document, using IndexWriter.updateDocument, optionally with of a certain size.
WaitForMergesTask | Waits for merges to finish.
WaitTask | Simply waits for the specified (via the parameter) amount of time.
WarmTask | Warm reader task: retrieve all reader documents.
WriteLineDocTask | A task which writes documents, one line per document.

Enum Summary
NewCollationAnalyzerTask.Implementation

Package org.apache.lucene.benchmark.byTask.tasks Description

Extendable benchmark tasks.


org.apache.lucene.benchmark.byTask.tasks Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.benchmark.byTask.tasks

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.benchmark.byTask.tasks.BenchmarkHighlighter
    • org.apache.lucene.benchmark.byTask.tasks.PerfTask (implements java.lang.Cloneable)
      • org.apache.lucene.benchmark.byTask.tasks.AddDocTask
        • org.apache.lucene.benchmark.byTask.tasks.AddFacetedDocTask
      • org.apache.lucene.benchmark.byTask.tasks.ClearStatsTask
      • org.apache.lucene.benchmark.byTask.tasks.CloseIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.CloseReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.CommitIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.CommitTaxonomyIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.ConsumeContentSourceTask
      • org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.CreateTaxonomyIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.DeleteByPercentTask
      • org.apache.lucene.benchmark.byTask.tasks.DeleteDocTask
      • org.apache.lucene.benchmark.byTask.tasks.FlushReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.ForceMergeTask
      • org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask
      • org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask
      • org.apache.lucene.benchmark.byTask.tasks.NewLocaleTask
      • org.apache.lucene.benchmark.byTask.tasks.NewRoundTask
      • org.apache.lucene.benchmark.byTask.tasks.NewShingleAnalyzerTask
      • org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.OpenReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.PrintReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.ReadTask
        • org.apache.lucene.benchmark.byTask.tasks.SearchTask
          • org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask
        • org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
          • org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask
          • org.apache.lucene.benchmark.byTask.tasks.SearchTravRetLoadFieldSelectorTask
          • org.apache.lucene.benchmark.byTask.tasks.SearchTravRetTask
          • org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask
        • org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask
        • org.apache.lucene.benchmark.byTask.tasks.WarmTask
      • org.apache.lucene.benchmark.byTask.tasks.ReadTokensTask
      • org.apache.lucene.benchmark.byTask.tasks.ReopenReaderTask
      • org.apache.lucene.benchmark.byTask.tasks.ReportTask
        • org.apache.lucene.benchmark.byTask.tasks.RepAllTask
        • org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask
        • org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask
        • org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask
          • org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask
          • org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask
      • org.apache.lucene.benchmark.byTask.tasks.ResetInputsTask
        • org.apache.lucene.benchmark.byTask.tasks.ResetSystemSoftTask
          • org.apache.lucene.benchmark.byTask.tasks.ResetSystemEraseTask
      • org.apache.lucene.benchmark.byTask.tasks.RollbackIndexTask
      • org.apache.lucene.benchmark.byTask.tasks.SetPropTask
      • org.apache.lucene.benchmark.byTask.tasks.TaskSequence
      • org.apache.lucene.benchmark.byTask.tasks.UpdateDocTask
      • org.apache.lucene.benchmark.byTask.tasks.WaitForMergesTask
      • org.apache.lucene.benchmark.byTask.tasks.WaitTask
      • org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask.Implementation


Uses of Package org.apache.lucene.benchmark.byTask.tasks

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.benchmark.byTask.tasks

Packages that use org.apache.lucene.benchmark.byTask.tasks
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.stats | Statistics maintained when running benchmark tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.benchmark.byTask.utils | Utilities used for the benchmark, and for the reports.

Classes in org.apache.lucene.benchmark.byTask.tasks used by org.apache.lucene.benchmark.byTask
ReadTask
Read index (abstract) task.

Classes in org.apache.lucene.benchmark.byTask.tasks used by org.apache.lucene.benchmark.byTask.stats
PerfTask
An abstract task to be tested for performance.

Classes in org.apache.lucene.benchmark.byTask.tasks used by org.apache.lucene.benchmark.byTask.tasks
AddDocTask
Add a document, optionally of a certain size.
BenchmarkHighlighter
NewCollationAnalyzerTask.Implementation
PerfTask
An abstract task to be tested for performance.
ReadTask
Read index (abstract) task.
ReportTask
Report (abstract) task - all report tasks extend this task.
RepSumByPrefTask
Report by-name-prefix statistics aggregated by name.
ResetInputsTask
Reset inputs so that the test run would behave, input wise, as if it just started.
ResetSystemSoftTask
Reset all index and input data and call gc, does NOT erase index/dir, does NOT clear statistics.
SearchTask
Search task.
SearchTravTask
Search and Traverse task.
TaskSequence
Sequence of parallel or sequential tasks.

Classes in org.apache.lucene.benchmark.byTask.tasks used by org.apache.lucene.benchmark.byTask.utils
PerfTask
An abstract task to be tested for performance.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PerfTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class PerfTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
AddDocTask, ClearStatsTask, CloseIndexTask, CloseReaderTask, CloseTaxonomyIndexTask, CloseTaxonomyReaderTask, CommitIndexTask, CommitTaxonomyIndexTask, ConsumeContentSourceTask, CreateIndexTask, CreateTaxonomyIndexTask, DeleteByPercentTask, DeleteDocTask, FlushReaderTask, ForceMergeTask, NearRealtimeReaderTask, NewAnalyzerTask, NewCollationAnalyzerTask, NewLocaleTask, NewRoundTask, NewShingleAnalyzerTask, OpenIndexTask, OpenReaderTask, OpenTaxonomyIndexTask, OpenTaxonomyReaderTask, PrintReaderTask, ReadTask, ReadTokensTask, ReopenReaderTask, ReportTask, ResetInputsTask, RollbackIndexTask, SetPropTask, TaskSequence, UpdateDocTask, WaitForMergesTask, WaitTask, WriteLineDocTask
public abstract class PerfTask
extends Object
implements Cloneable

An abstract task to be tested for performance.
Every performance task extends this class, and provides its own doLogic() method, which performs the actual task.
Tasks performing some work that should be measured for the task, can override setup() and/or tearDown() and place that work there.
Relevant properties: task.max.depth.log.
Also supports the following logging attributes:

  • log.step - specifies how often to log messages about the current running task. Default is 1000 doLogic() invocations. Set to -1 to disable logging.
  • log.step.[class Task Name] - specifies the same as 'log.step', only for a particular task name. For example, log.step.AddDoc will be applied only for AddDocTask, but not for DeleteDocTask. It's a way to control per task logging settings. If you want to omit logging for any other task, include log.step=-1. The syntax is "log.step." together with the Task's 'short' name (i.e., without the 'Task' part).

Field Summary
protected int | logStep
protected static String | NEW_LINE
protected String | params
protected boolean | stopNow
Constructor Summary
PerfTask(PerfRunData runData)
Method Summary
protected Object | clone()
void | close()
abstract int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
int | getBackgroundDeltaPriority()
int | getDepth()
protected String | getLogMessage(int recsCount)
String | getName()
String | getParams()
PerfRunData | getRunData()
boolean | getRunInBackground()
boolean | isDisableCounting() Return true if counting is disabled for this task.
int | runAndMaybeStats(boolean reportStats) Run the task, record statistics.
void | setDepth(int depth)
void | setDisableCounting(boolean disableCounting) See isDisableCounting()
protected void | setName(String name)
void | setParams(String params) Set the params of this task.
void | setRunInBackground(int deltaPri)
void | setup() Task setup work that should not be measured for that specific task.
protected boolean | shouldNeverLogAtStart() Tasks that should never log at start can override this.
protected boolean | shouldNotRecordStats() Tasks that should not record statistics can override this.
void | stopNow()
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
void | tearDown() Task tearDown work that should not be measured for that specific task.
String | toString()
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

logStep

protected int logStep

params

protected String params

NEW_LINE

protected static final String NEW_LINE

stopNow

protected volatile boolean stopNow
Constructor Detail

PerfTask

public PerfTask(PerfRunData runData)
Method Detail

setRunInBackground

public void setRunInBackground(int deltaPri)

getRunInBackground

public boolean getRunInBackground()

getBackgroundDeltaPriority

public int getBackgroundDeltaPriority()

stopNow

public void stopNow()

clone

protected Object clone()
                throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

close

public void close()
           throws Exception
Throws:
Exception

runAndMaybeStats

public final int runAndMaybeStats(boolean reportStats)
                           throws Exception
Run the task, record statistics.

Returns:
number of work items done by this task.
Throws:
Exception

doLogic

public abstract int doLogic()
                     throws Exception
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Returns:
number of work items done by this task.
Throws:
Exception

getName

public String getName()
Returns:
Returns the name.

setName

protected void setName(String name)
Parameters:
name - The name to set.

getRunData

public PerfRunData getRunData()
Returns:
Returns the run data.

getDepth

public int getDepth()
Returns:
Returns the depth.

setDepth

public void setDepth(int depth)
Parameters:
depth - The depth to set.

toString

public String toString()
Overrides:
toString in class Object

getLogMessage

protected String getLogMessage(int recsCount)

shouldNeverLogAtStart

protected boolean shouldNeverLogAtStart()
Tasks that should never log at start can override this.

Returns:
true if this task should never log when it start.

shouldNotRecordStats

protected boolean shouldNotRecordStats()
Tasks that should not record statistics can override this.

Returns:
true if this task should never record its statistics.

setup

public void setup()
           throws Exception
Task setup work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from doLogic() to this method. Only the work done in doLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.

Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Task tearDown work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from doLogic() to this method. Only the work done in doLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.

Throws:
Exception

supportsParams

public boolean supportsParams()
Sub classes that support parameters must override this method to return true.

Returns:
true iff this task supports command line params.

setParams

public void setParams(String params)
Set the params of this task.

Throws:
UnsupportedOperationException - for tasks supporting command line parameters.

getParams

public String getParams()
Returns:
Returns the Params.

isDisableCounting

public boolean isDisableCounting()
Return true if counting is disabled for this task.

setDisableCounting

public void setDisableCounting(boolean disableCounting)
See isDisableCounting()

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrintReaderTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class PrintReaderTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.PrintReaderTask
All Implemented Interfaces:
Cloneable
public class PrintReaderTask
extends PerfTask

Opens a reader and prints basic statistics.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
PrintReaderTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
void | setParams(String params) Set the params of this task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PrintReaderTask

public PrintReaderTask(PerfRunData runData)
Method Detail

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class PerfTask

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReadTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class ReadTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReadTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
SearchTask, SearchTravTask, SearchWithSortTask, WarmTask
public abstract class ReadTask
extends PerfTask

Read index (abstract) task. Sub classes implement withSearch(), withWarm(), withTraverse() and withRetrieve() methods to configure the actual action.

Note: All ReadTasks reuse the reader if it is already open. Otherwise a reader is opened at start and closed at the end.

The search.num.hits config parameter sets the top number of hits to collect during searching. If print.hits.field is set, then each hit is printed along with the value of that field.

Other side effects: none.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
ReadTask(PerfRunData runData)
Method Summary
protected Collector | createCollector()
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected BenchmarkHighlighter | getBenchmarkHighlighter(Query q) Return an appropriate highlighter to be used with highlighting tasks
protected Collection<String> | getFieldsToHighlight(Document document) Define the fields to highlight.
abstract QueryMaker | getQueryMaker() Return query maker used for this task.
protected Sort | getSort()
int | numHits() Specify the number of hits to retrieve.
int | numToHighlight() Set to the number of documents to highlight.
protected Document | retrieveDoc(IndexReader ir, int id)
void | setup() Task setup work that should not be measured for that specific task.
int | traversalSize() Specify the number of hits to traverse.
boolean | withCollector()
boolean | withMaxScore() Whether maxScores should be computed (only useful with field sort)
abstract boolean | withRetrieve() Return true if, with search & results traversing, docs should be retrieved.
boolean | withScore() Whether scores should be computed (only useful with field sort)
abstract boolean | withSearch() Return true if search should be performed.
abstract boolean | withTraverse() Return true if, with search, results should be traversed.
abstract boolean | withWarm() Return true if warming should be performed.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ReadTask

public ReadTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

createCollector

protected Collector createCollector()
                             throws Exception
Throws:
Exception

retrieveDoc

protected Document retrieveDoc(IndexReader ir,
                               int id)
                        throws IOException
Throws:
IOException

getQueryMaker

public abstract QueryMaker getQueryMaker()
Return query maker used for this task.

withSearch

public abstract boolean withSearch()
Return true if search should be performed.

withCollector

public boolean withCollector()

withWarm

public abstract boolean withWarm()
Return true if warming should be performed.

withTraverse

public abstract boolean withTraverse()
Return true if, with search, results should be traversed.

withScore

public boolean withScore()
Whether scores should be computed (only useful with field sort)

withMaxScore

public boolean withMaxScore()
Whether maxScores should be computed (only useful with field sort)

traversalSize

public int traversalSize()
Specify the number of hits to traverse. Tasks should override this if they want to restrict the number of hits that are traversed when withTraverse() is true. Must be greater than 0.

Read task calculates the traversal as: Math.min(hits.length(), traversalSize())

Returns:
Integer.MAX_VALUE

setup

public void setup()
           throws Exception
Description copied from class: PerfTask
Task setup work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from PerfTask.doLogic() to this method. Only the work done in PerfTask.doLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.

Overrides:
setup in class PerfTask
Throws:
Exception

numHits

public int numHits()
Specify the number of hits to retrieve. Tasks should override this if they want to restrict the number of hits that are collected during searching. Must be greater than 0.

Returns:
10 by default, or search.num.hits config if set.

withRetrieve

public abstract boolean withRetrieve()
Return true if, with search & results traversing, docs should be retrieved.

numToHighlight

public int numToHighlight()
Set to the number of documents to highlight.

Returns:
The number of the results to highlight. O means no docs will be highlighted.

getBenchmarkHighlighter

protected BenchmarkHighlighter getBenchmarkHighlighter(Query q)
Return an appropriate highlighter to be used with highlighting tasks

getSort

protected Sort getSort()

getFieldsToHighlight

protected Collection<String> getFieldsToHighlight(Document document)
Define the fields to highlight. Base implementation returns all fields

Parameters:
document - The Document
Returns:
A Collection of Field names (Strings)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReadTokensTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class ReadTokensTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReadTokensTask
All Implemented Interfaces:
Cloneable
public class ReadTokensTask
extends PerfTask

Simple task to test performance of tokenizers. It just creates a token stream for each field of the document and read all tokens out of that stream.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
ReadTokensTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected String | getLogMessage(int recsCount)
void | setup() Task setup work that should not be measured for that specific task.
void | tearDown() Task tearDown work that should not be measured for that specific task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ReadTokensTask

public ReadTokensTask(PerfRunData runData)
Method Detail

setup

public void setup()
           throws Exception
Description copied from class: PerfTask
Task setup work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from PerfTask.doLogic() to this method. Only the work done in PerfTask.doLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.

Overrides:
setup in class PerfTask
Throws:
Exception

getLogMessage

protected String getLogMessage(int recsCount)
Overrides:
getLogMessage in class PerfTask

tearDown

public void tearDown()
              throws Exception
Description copied from class: PerfTask
Task tearDown work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from PerfTask.doLogic() to this method. Only the work done in PerfTask.doLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.

Overrides:
tearDown in class PerfTask
Throws:
Exception

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReopenReaderTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class ReopenReaderTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReopenReaderTask
All Implemented Interfaces:
Cloneable
public class ReopenReaderTask
extends PerfTask

Reopens IndexReader and closes old IndexReader.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
ReopenReaderTask(PerfRunData runData)
Method Summary
 int doLogic()
Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ReopenReaderTask

public ReopenReaderTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws IOException
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RepAllTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class RepAllTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReportTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.RepAllTask
All Implemented Interfaces:
Cloneable
public class RepAllTask
extends ReportTask

Report all statistics with no aggregations.
Other side effects: None.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.ReportTask
COLS, ELAPSED, newline, OP, RECCNT, RECSEC, ROUND, RUNCNT, TOTMEM, USEDMEM
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
RepAllTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected Report | reportAll(List<TaskStats> taskStats) Report detailed statistics as a string
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReportTask
genPartialReport, longestOp, shouldNeverLogAtStart, shouldNotRecordStats, tableTitle, taskReportLine
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

RepAllTask

public RepAllTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

reportAll

protected Report reportAll(List<TaskStats> taskStats)
Report detailed statistics as a string

Returns:
the report
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReportTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class ReportTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReportTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
RepAllTask, RepSumByNameRoundTask, RepSumByNameTask, RepSumByPrefTask
public abstract class ReportTask
extends PerfTask

Report (abstract) task - all report tasks extend this task.

Field Summary
protected static String[] | COLS
protected static String | ELAPSED
protected static String | newline
protected static String | OP Get a textual summary of the benchmark results, average from all test runs.
protected static String | RECCNT
protected static String | RECSEC
protected static String | ROUND
protected static String | RUNCNT
protected static String | TOTMEM
protected static String | USEDMEM
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
ReportTask(PerfRunData runData)
Method Summary
protected Report | genPartialReport(int reported, LinkedHashMap<String,TaskStats> partOfTasks, int totalSize)
protected String | longestOp(Iterable<TaskStats> taskStats) find the longest op name out of completed tasks.
protected boolean | shouldNeverLogAtStart() Tasks that should never log at start can override this.
protected boolean | shouldNotRecordStats() Tasks that should not record statistics can override this.
protected String | tableTitle(String longestOp) Compute a title line for a report table
protected String | taskReportLine(String longestOp, TaskStats stat) Compute a report line for the given task stat.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, doLogic, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

newline

protected static final String newline

OP

protected static final String OP
Get a textual summary of the benchmark results, average from all test runs.

See Also:
Constant Field Values

ROUND

protected static final String ROUND
See Also:
Constant Field Values

RUNCNT

protected static final String RUNCNT
See Also:
Constant Field Values

RECCNT

protected static final String RECCNT
See Also:
Constant Field Values

RECSEC

protected static final String RECSEC
See Also:
Constant Field Values

ELAPSED

protected static final String ELAPSED
See Also:
Constant Field Values

USEDMEM

protected static final String USEDMEM
See Also:
Constant Field Values

TOTMEM

protected static final String TOTMEM
See Also:
Constant Field Values

COLS

protected static final String[] COLS
Constructor Detail

ReportTask

public ReportTask(PerfRunData runData)
Method Detail

shouldNeverLogAtStart

protected boolean shouldNeverLogAtStart()
Description copied from class: PerfTask
Tasks that should never log at start can override this.

Overrides:
shouldNeverLogAtStart in class PerfTask
Returns:
true if this task should never log when it start.

shouldNotRecordStats

protected boolean shouldNotRecordStats()
Description copied from class: PerfTask
Tasks that should not record statistics can override this.

Overrides:
shouldNotRecordStats in class PerfTask
Returns:
true if this task should never record its statistics.

tableTitle

protected String tableTitle(String longestOp)
Compute a title line for a report table

Parameters:
longestOp - size of longest op name in the table
Returns:
the table title line.

longestOp

protected String longestOp(Iterable<TaskStats> taskStats)
find the longest op name out of completed tasks.

Parameters:
taskStats - completed tasks to be considered.
Returns:
the longest op name out of completed tasks.

taskReportLine

protected String taskReportLine(String longestOp,
                                TaskStats stat)
Compute a report line for the given task stat.

Parameters:
longestOp - size of longest op name in the table.
stat - task stat to be printed.
Returns:
the report line.

genPartialReport

protected Report genPartialReport(int reported,
                                  LinkedHashMap<String,TaskStats> partOfTasks,
                                  int totalSize)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RepSelectByPrefTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class RepSelectByPrefTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReportTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask
                extended by  org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask
All Implemented Interfaces:
Cloneable
public class RepSelectByPrefTask
extends RepSumByPrefTask

Report by-name-prefix statistics with no aggregations.
Other side effects: None.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask
prefix
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.ReportTask
COLS, ELAPSED, newline, OP, RECCNT, RECSEC, ROUND, RUNCNT, TOTMEM, USEDMEM
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
RepSelectByPrefTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected Report | reportSelectByPrefix(List<TaskStats> taskStats)
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask
reportSumByPrefix, setPrefix, toString
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReportTask
genPartialReport, longestOp, shouldNeverLogAtStart, shouldNotRecordStats, tableTitle, taskReportLine
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, stopNow, supportsParams, tearDown
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

RepSelectByPrefTask

public RepSelectByPrefTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Overrides:
doLogic in class RepSumByPrefTask
Returns:
number of work items done by this task.
Throws:
Exception

reportSelectByPrefix

protected Report reportSelectByPrefix(List<TaskStats> taskStats)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RepSumByNameRoundTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class RepSumByNameRoundTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReportTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask
All Implemented Interfaces:
Cloneable
public class RepSumByNameRoundTask
extends ReportTask

Report all statistics grouped/aggregated by name and round.
Other side effects: None.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.ReportTask
COLS, ELAPSED, newline, OP, RECCNT, RECSEC, ROUND, RUNCNT, TOTMEM, USEDMEM
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
RepSumByNameRoundTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected Report | reportSumByNameRound(List<TaskStats> taskStats) Report statistics as a string, aggregate for tasks named the same, and from the same round.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReportTask
genPartialReport, longestOp, shouldNeverLogAtStart, shouldNotRecordStats, tableTitle, taskReportLine
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

RepSumByNameRoundTask

public RepSumByNameRoundTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

reportSumByNameRound

protected Report reportSumByNameRound(List<TaskStats> taskStats)
Report statistics as a string, aggregate for tasks named the same, and from the same round.

Returns:
the report
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RepSumByNameTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class RepSumByNameTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReportTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask
All Implemented Interfaces:
Cloneable
public class RepSumByNameTask
extends ReportTask

Report all statistics aggregated by name.
Other side effects: None.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.ReportTask
COLS, ELAPSED, newline, OP, RECCNT, RECSEC, ROUND, RUNCNT, TOTMEM, USEDMEM
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
RepSumByNameTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected Report | reportSumByName(List<TaskStats> taskStats) Report statistics as a string, aggregate for tasks named the same.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReportTask
genPartialReport, longestOp, shouldNeverLogAtStart, shouldNotRecordStats, tableTitle, taskReportLine
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

RepSumByNameTask

public RepSumByNameTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

reportSumByName

protected Report reportSumByName(List<TaskStats> taskStats)
Report statistics as a string, aggregate for tasks named the same.

Returns:
the report
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RepSumByPrefRoundTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class RepSumByPrefRoundTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReportTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask
                extended by  org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask
All Implemented Interfaces:
Cloneable
public class RepSumByPrefRoundTask
extends RepSumByPrefTask

Report all prefix matching statistics grouped/aggregated by name and round.
Other side effects: None.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask
prefix
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.ReportTask
COLS, ELAPSED, newline, OP, RECCNT, RECSEC, ROUND, RUNCNT, TOTMEM, USEDMEM
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
RepSumByPrefRoundTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected Report | reportSumByPrefixRound(List<TaskStats> taskStats)
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask
reportSumByPrefix, setPrefix, toString
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReportTask
genPartialReport, longestOp, shouldNeverLogAtStart, shouldNotRecordStats, tableTitle, taskReportLine
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, stopNow, supportsParams, tearDown
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

RepSumByPrefRoundTask

public RepSumByPrefRoundTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Overrides:
doLogic in class RepSumByPrefTask
Returns:
number of work items done by this task.
Throws:
Exception

reportSumByPrefixRound

protected Report reportSumByPrefixRound(List<TaskStats> taskStats)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RepSumByPrefTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class RepSumByPrefTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReportTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
RepSelectByPrefTask, RepSumByPrefRoundTask
public class RepSumByPrefTask
extends ReportTask

Report by-name-prefix statistics aggregated by name.
Other side effects: None.

Field Summary
protected  String prefix
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.ReportTask
COLS, ELAPSED, newline, OP, RECCNT, RECSEC, ROUND, RUNCNT, TOTMEM, USEDMEM
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
RepSumByPrefTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected Report | reportSumByPrefix(List<TaskStats> taskStats)
void | setPrefix(String prefix)
String | toString()
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReportTask
genPartialReport, longestOp, shouldNeverLogAtStart, shouldNotRecordStats, tableTitle, taskReportLine
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, stopNow, supportsParams, tearDown
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

prefix

protected String prefix
Constructor Detail

RepSumByPrefTask

public RepSumByPrefTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

reportSumByPrefix

protected Report reportSumByPrefix(List<TaskStats> taskStats)

setPrefix

public void setPrefix(String prefix)

toString

public String toString()
Overrides:
toString in class PerfTask
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ResetInputsTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class ResetInputsTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ResetInputsTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ResetSystemSoftTask
public class ResetInputsTask
extends PerfTask

Reset inputs so that the test run would behave, input wise, as if it just started. This affects e.g. the generation of docs and queries.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
ResetInputsTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected boolean | shouldNotRecordStats() Tasks that should not record statistics can override this.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ResetInputsTask

public ResetInputsTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

shouldNotRecordStats

protected boolean shouldNotRecordStats()
Description copied from class: PerfTask
Tasks that should not record statistics can override this.

Overrides:
shouldNotRecordStats in class PerfTask
Returns:
true if this task should never record its statistics.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ResetSystemEraseTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class ResetSystemEraseTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ResetInputsTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.ResetSystemSoftTask
                extended by  org.apache.lucene.benchmark.byTask.tasks.ResetSystemEraseTask
All Implemented Interfaces:
Cloneable
public class ResetSystemEraseTask
extends ResetSystemSoftTask

Reset all index and input data and call gc, erase index and dir, does NOT clear statistics.
This contains ResetInputs.
Other side effects: writers/readers nullified, deleted, closed. Index is erased. Directory is erased.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
ResetSystemEraseTask(PerfRunData runData)
Method Summary
 int doLogic()
Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ResetInputsTask
shouldNotRecordStats
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ResetSystemEraseTask

public ResetSystemEraseTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Overrides:
doLogic in class ResetSystemSoftTask
Returns:
number of work items done by this task.
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ResetSystemSoftTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class ResetSystemSoftTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ResetInputsTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.ResetSystemSoftTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ResetSystemEraseTask
public class ResetSystemSoftTask
extends ResetInputsTask

Reset all index and input data and call gc, does NOT erase index/dir, does NOT clear statistics. This contains ResetInputs.
Other side effects: writers/readers nullified, closed. Index is NOT erased. Directory is NOT erased.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
ResetSystemSoftTask(PerfRunData runData)
Method Summary
 int doLogic()
Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ResetInputsTask
shouldNotRecordStats
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ResetSystemSoftTask

public ResetSystemSoftTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Overrides:
doLogic in class ResetInputsTask
Returns:
number of work items done by this task.
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RollbackIndexTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class RollbackIndexTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.RollbackIndexTask
All Implemented Interfaces:
Cloneable
public class RollbackIndexTask
extends PerfTask

Rollback the index writer.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
RollbackIndexTask(PerfRunData runData)
Method Summary
 int doLogic()
Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

RollbackIndexTask

public RollbackIndexTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws IOException
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SearchTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class SearchTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReadTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.SearchTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
SearchWithCollectorTask
public class SearchTask
extends ReadTask

Search task.

Note: This task reuses the reader if it is already open. Otherwise a reader is opened at start and closed at the end.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
SearchTask(PerfRunData runData)
Method Summary
QueryMaker | getQueryMaker() Return query maker used for this task.
boolean | withRetrieve() Return true if, with search & results traversing, docs should be retrieved.
boolean | withSearch() Return true if search should be performed.
boolean | withTraverse() Return true if, with search, results should be traversed.
boolean | withWarm() Return true if warming should be performed.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReadTask
createCollector, doLogic, getBenchmarkHighlighter, getFieldsToHighlight, getSort, numHits, numToHighlight, retrieveDoc, setup, traversalSize, withCollector, withMaxScore, withScore
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SearchTask

public SearchTask(PerfRunData runData)
Method Detail

withRetrieve

public boolean withRetrieve()
Description copied from class: ReadTask
Return true if, with search & results traversing, docs should be retrieved.

Specified by:
withRetrieve in class ReadTask

withSearch

public boolean withSearch()
Description copied from class: ReadTask
Return true if search should be performed.

Specified by:
withSearch in class ReadTask

withTraverse

public boolean withTraverse()
Description copied from class: ReadTask
Return true if, with search, results should be traversed.

Specified by:
withTraverse in class ReadTask

withWarm

public boolean withWarm()
Description copied from class: ReadTask
Return true if warming should be performed.

Specified by:
withWarm in class ReadTask

getQueryMaker

public QueryMaker getQueryMaker()
Description copied from class: ReadTask
Return query maker used for this task.

Specified by:
getQueryMaker in class ReadTask
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SearchTravRetHighlightTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class SearchTravRetHighlightTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReadTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
                extended by  org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask
All Implemented Interfaces:
Cloneable
public class SearchTravRetHighlightTask
extends SearchTravTask

Search and Traverse and Retrieve docs task. Highlight the fields in the retrieved documents. Uses the SimpleHTMLFormatter for formatting.

Note: This task reuses the reader if it is already open. Otherwise a reader is opened at start and closed at the end.

Takes optional multivalued, comma separated param string as: size[<traversal size>],highlight[<int>],maxFrags[<int>],mergeContiguous[<boolean>],fields[name1;name2;...]

  • traversal size - The number of hits to traverse, otherwise all will be traversed
  • highlight - The number of the hits to highlight. Will always be less than or equal to traversal size. Default is Integer.MAX_VALUE (i.e. hits.length())
  • maxFrags - The maximum number of fragments to score by the highlighter
  • mergeContiguous - true if contiguous fragments should be merged.
  • fields - The fields to highlight. If not specified all fields will be highlighted (or at least attempted)
Example:
"SearchHlgtSameRdr" SearchTravRetHighlight(size[10],highlight[10],mergeContiguous[true],maxFrags[3],fields[body]) > : 1000
Documents must be stored in order for this task to work. Additionally, term vector positions can be used as well.

Other side effects: counts additional 1 (record) for each traversed hit, and 1 more for each retrieved (non null) document and 1 for each fragment returned.

Field Summary
protected Highlighter | highlighter
protected int | maxDocCharsToAnalyze
protected int | maxFrags
protected boolean | mergeContiguous
protected int | numToHighlight
protected Set<String> | paramFields
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
traversalSize
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
SearchTravRetHighlightTask(PerfRunData runData)
Method Summary
protected BenchmarkHighlighter | getBenchmarkHighlighter(Query q) Return an appropriate highlighter to be used with highlighting tasks
protected Collection<String> | getFieldsToHighlight(Document document) Define the fields to highlight.
int | numToHighlight() Set to the number of documents to highlight.
void | setParams(String params) Set the params of this task.
void | setup() Task setup work that should not be measured for that specific task.
boolean | withRetrieve() Return true if, with search & results traversing, docs should be retrieved.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
getQueryMaker, supportsParams, traversalSize, withSearch, withTraverse, withWarm
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReadTask
createCollector, doLogic, getSort, numHits, retrieveDoc, withCollector, withMaxScore, withScore
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

numToHighlight

protected int numToHighlight

mergeContiguous

protected boolean mergeContiguous

maxFrags

protected int maxFrags

paramFields

protected Set<String> paramFields

highlighter

protected Highlighter highlighter

maxDocCharsToAnalyze

protected int maxDocCharsToAnalyze
Constructor Detail

SearchTravRetHighlightTask

public SearchTravRetHighlightTask(PerfRunData runData)
Method Detail

setup

public void setup()
           throws Exception
Description copied from class: PerfTask
Task setup work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from PerfTask.doLogic() to this method. Only the work done in PerfTask.doLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.

Overrides:
setup in class ReadTask
Throws:
Exception

withRetrieve

public boolean withRetrieve()
Description copied from class: ReadTask
Return true if, with search & results traversing, docs should be retrieved.

Overrides:
withRetrieve in class SearchTravTask

numToHighlight

public int numToHighlight()
Description copied from class: ReadTask
Set to the number of documents to highlight.

Overrides:
numToHighlight in class ReadTask
Returns:
The number of the results to highlight. O means no docs will be highlighted.

getBenchmarkHighlighter

protected BenchmarkHighlighter getBenchmarkHighlighter(Query q)
Description copied from class: ReadTask
Return an appropriate highlighter to be used with highlighting tasks

Overrides:
getBenchmarkHighlighter in class ReadTask

getFieldsToHighlight

protected Collection<String> getFieldsToHighlight(Document document)
Description copied from class: ReadTask
Define the fields to highlight. Base implementation returns all fields

Overrides:
getFieldsToHighlight in class ReadTask
Parameters:
document - The Document
Returns:
A Collection of Field names (Strings)

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class SearchTravTask
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SearchTravRetLoadFieldSelectorTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class SearchTravRetLoadFieldSelectorTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReadTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
                extended by  org.apache.lucene.benchmark.byTask.tasks.SearchTravRetLoadFieldSelectorTask
All Implemented Interfaces:
Cloneable
public class SearchTravRetLoadFieldSelectorTask
extends SearchTravTask

Search and Traverse and Retrieve docs task using a SetBasedFieldSelector.

Note: This task reuses the reader if it is already open. Otherwise a reader is opened at start and closed at the end.

Takes optional param: comma separated list of Fields to load.

Other side effects: counts additional 1 (record) for each traversed hit, and 1 more for each retrieved (non null) document.

Field Summary
protected  FieldSelector fieldSelector
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
traversalSize
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
SearchTravRetLoadFieldSelectorTask(PerfRunData runData)
Method Summary
protected Document | retrieveDoc(IndexReader ir, int id)
void | setParams(String params) Set the params of this task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
boolean | withRetrieve() Return true if, with search & results traversing, docs should be retrieved.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
getQueryMaker, traversalSize, withSearch, withTraverse, withWarm
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReadTask
createCollector, doLogic, getBenchmarkHighlighter, getFieldsToHighlight, getSort, numHits, numToHighlight, setup, withCollector, withMaxScore, withScore
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

fieldSelector

protected FieldSelector fieldSelector
Constructor Detail

SearchTravRetLoadFieldSelectorTask

public SearchTravRetLoadFieldSelectorTask(PerfRunData runData)
Method Detail

withRetrieve

public boolean withRetrieve()
Description copied from class: ReadTask
Return true if, with search & results traversing, docs should be retrieved.

Overrides:
withRetrieve in class SearchTravTask

retrieveDoc

protected Document retrieveDoc(IndexReader ir,
                               int id)
                        throws IOException
Overrides:
retrieveDoc in class ReadTask
Throws:
IOException

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class SearchTravTask

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class SearchTravTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SearchTravRetTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class SearchTravRetTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReadTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
                extended by  org.apache.lucene.benchmark.byTask.tasks.SearchTravRetTask
All Implemented Interfaces:
Cloneable
public class SearchTravRetTask
extends SearchTravTask

Search and Traverse and Retrieve docs task.

Note: This task reuses the reader if it is already open. Otherwise a reader is opened at start and closed at the end.

Takes optional param: traversal size (otherwise all results are traversed).

Other side effects: counts additional 1 (record) for each traversed hit, and 1 more for each retrieved (non null) document.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
traversalSize
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
SearchTravRetTask(PerfRunData runData)
Method Summary
 boolean withRetrieve()
Return true if, with search & results traversing, docs should be retrieved.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
getQueryMaker, setParams, supportsParams, traversalSize, withSearch, withTraverse, withWarm
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReadTask
createCollector, doLogic, getBenchmarkHighlighter, getFieldsToHighlight, getSort, numHits, numToHighlight, retrieveDoc, setup, withCollector, withMaxScore, withScore
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SearchTravRetTask

public SearchTravRetTask(PerfRunData runData)
Method Detail

withRetrieve

public boolean withRetrieve()
Description copied from class: ReadTask
Return true if, with search & results traversing, docs should be retrieved.

Overrides:
withRetrieve in class SearchTravTask
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SearchTravRetVectorHighlightTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class SearchTravRetVectorHighlightTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReadTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
                extended by  org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask
All Implemented Interfaces:
Cloneable
public class SearchTravRetVectorHighlightTask
extends SearchTravTask

Search and Traverse and Retrieve docs task. Highlight the fields in the retrieved documents by using FastVectorHighlighter.

Note: This task reuses the reader if it is already open. Otherwise a reader is opened at start and closed at the end.

Takes optional multivalued, comma separated param string as: size[<traversal size>],highlight[<int>],maxFrags[<int>],mergeContiguous[<boolean>],fields[name1;name2;...]

  • traversal size - The number of hits to traverse, otherwise all will be traversed
  • highlight - The number of the hits to highlight. Will always be less than or equal to traversal size. Default is Integer.MAX_VALUE (i.e. hits.length())
  • maxFrags - The maximum number of fragments to score by the highlighter
  • fragSize - The length of fragments
  • fields - The fields to highlight. If not specified all fields will be highlighted (or at least attempted)
Example:
"SearchVecHlgtSameRdr" SearchTravRetVectorHighlight(size[10],highlight[10],maxFrags[3],fields[body]) > : 1000
Fields must be stored and term vector offsets and positions in order must be true for this task to work.

Other side effects: counts additional 1 (record) for each traversed hit, and 1 more for each retrieved (non null) document and 1 for each fragment returned.

Field Summary
protected int | fragSize
protected FastVectorHighlighter | highlighter
protected int | maxFrags
protected int | numToHighlight
protected Set<String> | paramFields
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
traversalSize
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
SearchTravRetVectorHighlightTask(PerfRunData runData)
Method Summary
protected BenchmarkHighlighter | getBenchmarkHighlighter(Query q) Return an appropriate highlighter to be used with highlighting tasks
protected Collection<String> | getFieldsToHighlight(Document document) Define the fields to highlight.
int | numToHighlight() Set to the number of documents to highlight.
void | setParams(String params) Set the params of this task.
void | setup() Task setup work that should not be measured for that specific task.
boolean | withRetrieve() Return true if, with search & results traversing, docs should be retrieved.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
getQueryMaker, supportsParams, traversalSize, withSearch, withTraverse, withWarm
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReadTask
createCollector, doLogic, getSort, numHits, retrieveDoc, withCollector, withMaxScore, withScore
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

numToHighlight

protected int numToHighlight

maxFrags

protected int maxFrags

fragSize

protected int fragSize

paramFields

protected Set<String> paramFields

highlighter

protected FastVectorHighlighter highlighter
Constructor Detail

SearchTravRetVectorHighlightTask

public SearchTravRetVectorHighlightTask(PerfRunData runData)
Method Detail

setup

public void setup()
           throws Exception
Description copied from class: PerfTask
Task setup work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from PerfTask.doLogic() to this method. Only the work done in PerfTask.doLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.

Overrides:
setup in class ReadTask
Throws:
Exception

withRetrieve

public boolean withRetrieve()
Description copied from class: ReadTask
Return true if, with search & results traversing, docs should be retrieved.

Overrides:
withRetrieve in class SearchTravTask

numToHighlight

public int numToHighlight()
Description copied from class: ReadTask
Set to the number of documents to highlight.

Overrides:
numToHighlight in class ReadTask
Returns:
The number of the results to highlight. O means no docs will be highlighted.

getBenchmarkHighlighter

protected BenchmarkHighlighter getBenchmarkHighlighter(Query q)
Description copied from class: ReadTask
Return an appropriate highlighter to be used with highlighting tasks

Overrides:
getBenchmarkHighlighter in class ReadTask

getFieldsToHighlight

protected Collection<String> getFieldsToHighlight(Document document)
Description copied from class: ReadTask
Define the fields to highlight. Base implementation returns all fields

Overrides:
getFieldsToHighlight in class ReadTask
Parameters:
document - The Document
Returns:
A Collection of Field names (Strings)

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class SearchTravTask
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SearchTravTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class SearchTravTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReadTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.SearchTravTask
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
SearchTravRetHighlightTask, SearchTravRetLoadFieldSelectorTask, SearchTravRetTask, SearchTravRetVectorHighlightTask
public class SearchTravTask
extends ReadTask

Search and Traverse task.

Note: This task reuses the reader if it is already open. Otherwise a reader is opened at start and closed at the end.

Takes optional param: traversal size (otherwise all results are traversed).

Other side effects: counts additional 1 (record) for each traversed hit.

Field Summary
protected  int traversalSize
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
SearchTravTask(PerfRunData runData)
Method Summary
QueryMaker | getQueryMaker() Return query maker used for this task.
void | setParams(String params) Set the params of this task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
int | traversalSize() Specify the number of hits to traverse.
boolean | withRetrieve() Return true if, with search & results traversing, docs should be retrieved.
boolean | withSearch() Return true if search should be performed.
boolean | withTraverse() Return true if, with search, results should be traversed.
boolean | withWarm() Return true if warming should be performed.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReadTask
createCollector, doLogic, getBenchmarkHighlighter, getFieldsToHighlight, getSort, numHits, numToHighlight, retrieveDoc, setup, withCollector, withMaxScore, withScore
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

traversalSize

protected int traversalSize
Constructor Detail

SearchTravTask

public SearchTravTask(PerfRunData runData)
Method Detail

withRetrieve

public boolean withRetrieve()
Description copied from class: ReadTask
Return true if, with search & results traversing, docs should be retrieved.

Specified by:
withRetrieve in class ReadTask

withSearch

public boolean withSearch()
Description copied from class: ReadTask
Return true if search should be performed.

Specified by:
withSearch in class ReadTask

withTraverse

public boolean withTraverse()
Description copied from class: ReadTask
Return true if, with search, results should be traversed.

Specified by:
withTraverse in class ReadTask

withWarm

public boolean withWarm()
Description copied from class: ReadTask
Return true if warming should be performed.

Specified by:
withWarm in class ReadTask

getQueryMaker

public QueryMaker getQueryMaker()
Description copied from class: ReadTask
Return query maker used for this task.

Specified by:
getQueryMaker in class ReadTask

traversalSize

public int traversalSize()
Description copied from class: ReadTask
Specify the number of hits to traverse. Tasks should override this if they want to restrict the number of hits that are traversed when ReadTask.withTraverse() is true. Must be greater than 0.

Read task calculates the traversal as: Math.min(hits.length(), traversalSize())

Overrides:
traversalSize in class ReadTask
Returns:
Integer.MAX_VALUE

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class PerfTask

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SearchWithCollectorTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class SearchWithCollectorTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReadTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.SearchTask
                extended by  org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask
All Implemented Interfaces:
Cloneable
public class SearchWithCollectorTask
extends SearchTask

Does search w/ a custom collector

Field Summary
protected  String clnName
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
SearchWithCollectorTask(PerfRunData runData)
Method Summary
protected Collector | createCollector()
QueryMaker | getQueryMaker() Return query maker used for this task.
void | setup() Task setup work that should not be measured for that specific task.
boolean | withCollector()
boolean | withRetrieve() Return true if, with search & results traversing, docs should be retrieved.
boolean | withSearch() Return true if search should be performed.
boolean | withTraverse() Return true if, with search, results should be traversed.
boolean | withWarm() Return true if warming should be performed.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReadTask
doLogic, getBenchmarkHighlighter, getFieldsToHighlight, getSort, numHits, numToHighlight, retrieveDoc, traversalSize, withMaxScore, withScore
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

clnName

protected String clnName
Constructor Detail

SearchWithCollectorTask

public SearchWithCollectorTask(PerfRunData runData)
Method Detail

setup

public void setup()
           throws Exception
Description copied from class: PerfTask
Task setup work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from PerfTask.doLogic() to this method. Only the work done in PerfTask.doLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.

Overrides:
setup in class ReadTask
Throws:
Exception

withCollector

public boolean withCollector()
Overrides:
withCollector in class ReadTask

createCollector

protected Collector createCollector()
                             throws Exception
Overrides:
createCollector in class ReadTask
Throws:
Exception

getQueryMaker

public QueryMaker getQueryMaker()
Description copied from class: ReadTask
Return query maker used for this task.

Overrides:
getQueryMaker in class SearchTask

withRetrieve

public boolean withRetrieve()
Description copied from class: ReadTask
Return true if, with search & results traversing, docs should be retrieved.

Overrides:
withRetrieve in class SearchTask

withSearch

public boolean withSearch()
Description copied from class: ReadTask
Return true if search should be performed.

Overrides:
withSearch in class SearchTask

withTraverse

public boolean withTraverse()
Description copied from class: ReadTask
Return true if, with search, results should be traversed.

Overrides:
withTraverse in class SearchTask

withWarm

public boolean withWarm()
Description copied from class: ReadTask
Return true if warming should be performed.

Overrides:
withWarm in class SearchTask
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SearchWithSortTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class SearchWithSortTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReadTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask
All Implemented Interfaces:
Cloneable
public class SearchWithSortTask
extends ReadTask

Does sort search on specified field.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
SearchWithSortTask(PerfRunData runData)
Method Summary
QueryMaker | getQueryMaker() Return query maker used for this task.
Sort | getSort()
void | setParams(String sortField) SortFields: field:type,field:type[,noscore][,nomaxscore] If noscore is present, then we turn off score tracking in TopFieldCollector.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
boolean | withMaxScore() Whether maxScores should be computed (only useful with field sort)
boolean | withRetrieve() Return true if, with search & results traversing, docs should be retrieved.
boolean | withScore() Whether scores should be computed (only useful with field sort)
boolean | withSearch() Return true if search should be performed.
boolean | withTraverse() Return true if, with search, results should be traversed.
boolean | withWarm() Return true if warming should be performed.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReadTask
createCollector, doLogic, getBenchmarkHighlighter, getFieldsToHighlight, numHits, numToHighlight, retrieveDoc, setup, traversalSize, withCollector
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SearchWithSortTask

public SearchWithSortTask(PerfRunData runData)
Method Detail

setParams

public void setParams(String sortField)
SortFields: field:type,field:type[,noscore][,nomaxscore] If noscore is present, then we turn off score tracking in TopFieldCollector. If nomaxscore is present, then we turn off maxScore tracking in TopFieldCollector. name:string,page:int,subject:string

Overrides:
setParams in class PerfTask

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.

getQueryMaker

public QueryMaker getQueryMaker()
Description copied from class: ReadTask
Return query maker used for this task.

Specified by:
getQueryMaker in class ReadTask

withRetrieve

public boolean withRetrieve()
Description copied from class: ReadTask
Return true if, with search & results traversing, docs should be retrieved.

Specified by:
withRetrieve in class ReadTask

withSearch

public boolean withSearch()
Description copied from class: ReadTask
Return true if search should be performed.

Specified by:
withSearch in class ReadTask

withTraverse

public boolean withTraverse()
Description copied from class: ReadTask
Return true if, with search, results should be traversed.

Specified by:
withTraverse in class ReadTask

withWarm

public boolean withWarm()
Description copied from class: ReadTask
Return true if warming should be performed.

Specified by:
withWarm in class ReadTask

withScore

public boolean withScore()
Description copied from class: ReadTask
Whether scores should be computed (only useful with field sort)

Overrides:
withScore in class ReadTask

withMaxScore

public boolean withMaxScore()
Description copied from class: ReadTask
Whether maxScores should be computed (only useful with field sort)

Overrides:
withMaxScore in class ReadTask

getSort

public Sort getSort()
Overrides:
getSort in class ReadTask
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SetPropTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class SetPropTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.SetPropTask
All Implemented Interfaces:
Cloneable
public class SetPropTask
extends PerfTask

Set a performance test configuration property. A property may have a single value, or a sequence of values, separated by ":". If a sequence of values is specified, each time a new round starts, the next (cyclic) value is taken.
Other side effects: none.
Takes mandatory param: "name,value" pair.

See Also:
NewRoundTask

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
SetPropTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
void | setParams(String params) Set the params (property name and value).
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SetPropTask

public SetPropTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

setParams

public void setParams(String params)
Set the params (property name and value).

Overrides:
setParams in class PerfTask
Parameters:
params - property name and value separated by ','.

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TaskSequence

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class TaskSequence

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.TaskSequence
All Implemented Interfaces:
Cloneable
public class TaskSequence
extends PerfTask

Sequence of parallel or sequential tasks.

Field Summary
static int REPEAT_EXHAUST
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
TaskSequence(PerfRunData runData, String name, TaskSequence parent, boolean parallel)
Method Summary
void | addTask(PerfTask task)
protected Object | clone()
void | close()
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
String | getName()
TaskSequence | getParent()
int | getRate() Returns the rate per minute: how many operations should be performed in a minute.
int | getRepetitions()
ArrayList<PerfTask> | getTasks()
boolean | isCollapsable() Return true if can be collapsed in case it is outermost sequence
boolean | isParallel()
void | setNoChildReport() Execute child tasks in a way that they do not report their time separately.
void | setRate(int rate, boolean perMin)
void | setRepetitions(int repetitions)
void | setRunTime(double sec)
void | stopNow()
String | toString()
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
getBackgroundDeltaPriority, getDepth, getLogMessage, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, supportsParams, tearDown
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

REPEAT_EXHAUST

public static int REPEAT_EXHAUST
Constructor Detail

TaskSequence

public TaskSequence(PerfRunData runData,
                    String name,
                    TaskSequence parent,
                    boolean parallel)
Method Detail

close

public void close()
           throws Exception
Overrides:
close in class PerfTask
Throws:
Exception

isParallel

public boolean isParallel()
Returns:
Returns the parallel.

getRepetitions

public int getRepetitions()
Returns:
Returns the repetitions.

setRunTime

public void setRunTime(double sec)
                throws Exception
Throws:
Exception

setRepetitions

public void setRepetitions(int repetitions)
                    throws Exception
Parameters:
repetitions - The repetitions to set.
Throws:
Exception

getParent

public TaskSequence getParent()
Returns:
Returns the parent.

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

stopNow

public void stopNow()
Overrides:
stopNow in class PerfTask

addTask

public void addTask(PerfTask task)

toString

public String toString()
Overrides:
toString in class PerfTask

setNoChildReport

public void setNoChildReport()
Execute child tasks in a way that they do not report their time separately.

getRate

public int getRate()
Returns the rate per minute: how many operations should be performed in a minute. If 0 this has no effect.

Returns:
the rate per min: how many operations should be performed in a minute.

setRate

public void setRate(int rate,
                    boolean perMin)
Parameters:
rate - The rate to set.

getName

public String getName()
Overrides:
getName in class PerfTask
Returns:
Returns the name.

getTasks

public ArrayList<PerfTask> getTasks()
Returns:
Returns the tasks.

clone

protected Object clone()
                throws CloneNotSupportedException
Overrides:
clone in class PerfTask
Throws:
CloneNotSupportedException

isCollapsable

public boolean isCollapsable()
Return true if can be collapsed in case it is outermost sequence

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UpdateDocTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class UpdateDocTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.UpdateDocTask
All Implemented Interfaces:
Cloneable
public class UpdateDocTask
extends PerfTask

Update a document, using IndexWriter.updateDocument, optionally with of a certain size.
Other side effects: none.
Takes optional param: document size.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
UpdateDocTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected String | getLogMessage(int recsCount)
void | setParams(String params) Set the params (docSize only)
void | setup() Task setup work that should not be measured for that specific task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
void | tearDown() Task tearDown work that should not be measured for that specific task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UpdateDocTask

public UpdateDocTask(PerfRunData runData)
Method Detail

setup

public void setup()
           throws Exception
Description copied from class: PerfTask
Task setup work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from PerfTask.doLogic() to this method. Only the work done in PerfTask.doLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.

Overrides:
setup in class PerfTask
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Description copied from class: PerfTask
Task tearDown work that should not be measured for that specific task. By default it does nothing, but tasks can implement this, moving work from PerfTask.doLogic() to this method. Only the work done in PerfTask.doLogic() is measured for this task. Notice that higher level (sequence) tasks containing this task would then measure larger time than the sum of their contained tasks.

Overrides:
tearDown in class PerfTask
Throws:
Exception

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

getLogMessage

protected String getLogMessage(int recsCount)
Overrides:
getLogMessage in class PerfTask

setParams

public void setParams(String params)
Set the params (docSize only)

Overrides:
setParams in class PerfTask
Parameters:
params - docSize, or 0 for no limit.

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WaitForMergesTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class WaitForMergesTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.WaitForMergesTask
All Implemented Interfaces:
Cloneable
public class WaitForMergesTask
extends PerfTask

Waits for merges to finish.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
WaitForMergesTask(PerfRunData runData)
Method Summary
 int doLogic()
Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

WaitForMergesTask

public WaitForMergesTask(PerfRunData runData)
Method Detail

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WaitTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class WaitTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.WaitTask
All Implemented Interfaces:
Cloneable
public class WaitTask
extends PerfTask

Simply waits for the specified (via the parameter) amount of time. For example Wait(30s) waits for 30 seconds. This is useful with background tasks to control how long the tasks run.

You can specify h, m, or s (hours, minutes, seconds) as the trailing time unit. No unit is interpreted as seconds.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
WaitTask(PerfRunData runData)
Method Summary
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
void | setParams(String params) Set the params of this task.
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

WaitTask

public WaitTask(PerfRunData runData)
Method Detail

setParams

public void setParams(String params)
Description copied from class: PerfTask
Set the params of this task.

Overrides:
setParams in class PerfTask

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WarmTask

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class WarmTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.ReadTask
            extended by  org.apache.lucene.benchmark.byTask.tasks.WarmTask
All Implemented Interfaces:
Cloneable
public class WarmTask
extends ReadTask

Warm reader task: retrieve all reader documents.

Note: This task reuses the reader if it is already open. Otherwise a reader is opened at start and closed at the end.

Other side effects: counts additional 1 (record) for each retrieved (non null) document.

Field Summary
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
WarmTask(PerfRunData runData)
Method Summary
QueryMaker | getQueryMaker() Return query maker used for this task.
boolean | withRetrieve() Return true if, with search & results traversing, docs should be retrieved.
boolean | withSearch() Return true if search should be performed.
boolean | withTraverse() Return true if, with search, results should be traversed.
boolean | withWarm() Return true if warming should be performed.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.ReadTask
createCollector, doLogic, getBenchmarkHighlighter, getFieldsToHighlight, getSort, numHits, numToHighlight, retrieveDoc, setup, traversalSize, withCollector, withMaxScore, withScore
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, close, getBackgroundDeltaPriority, getDepth, getLogMessage, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, supportsParams, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

WarmTask

public WarmTask(PerfRunData runData)
Method Detail

withRetrieve

public boolean withRetrieve()
Description copied from class: ReadTask
Return true if, with search & results traversing, docs should be retrieved.

Specified by:
withRetrieve in class ReadTask

withSearch

public boolean withSearch()
Description copied from class: ReadTask
Return true if search should be performed.

Specified by:
withSearch in class ReadTask

withTraverse

public boolean withTraverse()
Description copied from class: ReadTask
Return true if, with search, results should be traversed.

Specified by:
withTraverse in class ReadTask

withWarm

public boolean withWarm()
Description copied from class: ReadTask
Return true if warming should be performed.

Specified by:
withWarm in class ReadTask

getQueryMaker

public QueryMaker getQueryMaker()
Description copied from class: ReadTask
Return query maker used for this task.

Specified by:
getQueryMaker in class ReadTask
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WriteLineDocTask

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.tasks
Class WriteLineDocTask

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.tasks.PerfTask
        extended by  org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask
All Implemented Interfaces:
Cloneable
public class WriteLineDocTask
extends PerfTask

A task which writes documents, one line per document. Each line is in the following format: title <TAB> date <TAB> body. The output of this task can be consumed by LineDocSource and is intended to save the IO overhead of opening a file per document to be indexed.

The format of the output is set according to the output file extension. Compression is recommended when the output file is expected to be large. See info on file extensions in StreamUtils.Type

Supports the following parameters:

  • line.file.out - the name of the file to write the output to. That parameter is mandatory. NOTE: the file is re-created.
  • line.fields - which fields should be written in each line. (optional, default: DEFAULT_FIELDS).
  • sufficient.fields - list of field names, separated by comma, which, if all of them are missing, the document will be skipped. For example, to require that at least one of f1,f2 is not empty, specify: "f1,f2" in this field. To specify that no field is required, i.e. that even empty docs should be emitted, specify ",". (optional, default: DEFAULT_SUFFICIENT_FIELDS).
NOTE: this class is not thread-safe and if used by multiple threads the output is unspecified (as all will write to the same output file in a non-synchronized way).

Field Summary
static String[] | DEFAULT_FIELDS Fields to be written by default
static String | DEFAULT_SUFFICIENT_FIELDS Default fields which at least one of them is required to not skip the doc.
static String | FIELDS_HEADER_INDICATOR
static char | SEP
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
logStep, NEW_LINE, params, stopNow
Constructor Summary
WriteLineDocTask(PerfRunData runData)
Method Summary
void | close()
int | doLogic() Perform the task once (ignoring repetitions specification) Return number of work items done by this task.
protected String | getLogMessage(int recsCount)
void | setParams(String params) Set the params (docSize only)
boolean | supportsParams() Sub classes that support parameters must override this method to return true.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, getBackgroundDeltaPriority, getDepth, getName, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, stopNow, tearDown, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

FIELDS_HEADER_INDICATOR

public static final String FIELDS_HEADER_INDICATOR
See Also:
Constant Field Values

SEP

public static final char SEP
See Also:
Constant Field Values

DEFAULT_FIELDS

public static final String[] DEFAULT_FIELDS
Fields to be written by default

DEFAULT_SUFFICIENT_FIELDS

public static final String DEFAULT_SUFFICIENT_FIELDS
Default fields which at least one of them is required to not skip the doc.

See Also:
Constant Field Values
Constructor Detail

WriteLineDocTask

public WriteLineDocTask(PerfRunData runData)
                 throws Exception
Throws:
Exception
Method Detail

getLogMessage

protected String getLogMessage(int recsCount)
Overrides:
getLogMessage in class PerfTask

doLogic

public int doLogic()
            throws Exception
Description copied from class: PerfTask
Perform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.

Specified by:
doLogic in class PerfTask
Returns:
number of work items done by this task.
Throws:
Exception

close

public void close()
           throws Exception
Overrides:
close in class PerfTask
Throws:
Exception

setParams

public void setParams(String params)
Set the params (docSize only)

Overrides:
setParams in class PerfTask
Parameters:
params - docSize, or 0 for no limit.

supportsParams

public boolean supportsParams()
Description copied from class: PerfTask
Sub classes that support parameters must override this method to return true.

Overrides:
supportsParams in class PerfTask
Returns:
true iff this task supports command line params.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.benchmark.byTask.tasks.AddDocTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.AddDocTask

Packages that use AddDocTask
org.apache.lucene.benchmark.byTask.tasks Extendable benchmark tasks.

Uses of AddDocTask in org.apache.lucene.benchmark.byTask.tasks

Subclasses of AddDocTask in org.apache.lucene.benchmark.byTask.tasks
 class AddFacetedDocTask
Add a faceted document.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.AddFacetedDocTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.AddFacetedDocTask

No usage of org.apache.lucene.benchmark.byTask.tasks.AddFacetedDocTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.BenchmarkHighlighter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.BenchmarkHighlighter

Packages that use BenchmarkHighlighter
org.apache.lucene.benchmark.byTask.tasks Extendable benchmark tasks.

Uses of BenchmarkHighlighter in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks that return BenchmarkHighlighter
protected BenchmarkHighlighter | SearchTravRetHighlightTask.getBenchmarkHighlighter(Query q)
protected BenchmarkHighlighter | ReadTask.getBenchmarkHighlighter(Query q) Return an appropriate highlighter to be used with highlighting tasks
protected BenchmarkHighlighter | SearchTravRetVectorHighlightTask.getBenchmarkHighlighter(Query q)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.ClearStatsTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.ClearStatsTask

No usage of org.apache.lucene.benchmark.byTask.tasks.ClearStatsTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.CloseIndexTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.CloseIndexTask

No usage of org.apache.lucene.benchmark.byTask.tasks.CloseIndexTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.CloseReaderTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.CloseReaderTask

No usage of org.apache.lucene.benchmark.byTask.tasks.CloseReaderTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyIndexTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyIndexTask

No usage of org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyIndexTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyReaderTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyReaderTask

No usage of org.apache.lucene.benchmark.byTask.tasks.CloseTaxonomyReaderTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.CommitIndexTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.CommitIndexTask

No usage of org.apache.lucene.benchmark.byTask.tasks.CommitIndexTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.CommitTaxonomyIndexTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.CommitTaxonomyIndexTask

No usage of org.apache.lucene.benchmark.byTask.tasks.CommitTaxonomyIndexTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.ConsumeContentSourceTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.ConsumeContentSourceTask

No usage of org.apache.lucene.benchmark.byTask.tasks.ConsumeContentSourceTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask

No usage of org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.CreateTaxonomyIndexTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.CreateTaxonomyIndexTask

No usage of org.apache.lucene.benchmark.byTask.tasks.CreateTaxonomyIndexTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.DeleteByPercentTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.DeleteByPercentTask

No usage of org.apache.lucene.benchmark.byTask.tasks.DeleteByPercentTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.DeleteDocTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.DeleteDocTask

No usage of org.apache.lucene.benchmark.byTask.tasks.DeleteDocTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.FlushReaderTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.FlushReaderTask

No usage of org.apache.lucene.benchmark.byTask.tasks.FlushReaderTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.ForceMergeTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.ForceMergeTask

No usage of org.apache.lucene.benchmark.byTask.tasks.ForceMergeTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask

No usage of org.apache.lucene.benchmark.byTask.tasks.NearRealtimeReaderTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask

No usage of org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask

No usage of org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask.Implementation

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.NewCollationAnalyzerTask.Implementation

Packages that use NewCollationAnalyzerTask.Implementation
org.apache.lucene.benchmark.byTask.tasks Extendable benchmark tasks.

Uses of NewCollationAnalyzerTask.Implementation in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks that return NewCollationAnalyzerTask.Implementation
static NewCollationAnalyzerTask.Implementation | NewCollationAnalyzerTask.Implementation.valueOf(String name) Returns the enum constant of this type with the specified name.
static NewCollationAnalyzerTask.Implementation[] | NewCollationAnalyzerTask.Implementation.values() Returns an array containing the constants of this enum type, in the order they're declared.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.NewLocaleTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.NewLocaleTask

No usage of org.apache.lucene.benchmark.byTask.tasks.NewLocaleTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.NewRoundTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.NewRoundTask

No usage of org.apache.lucene.benchmark.byTask.tasks.NewRoundTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.NewShingleAnalyzerTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.NewShingleAnalyzerTask

No usage of org.apache.lucene.benchmark.byTask.tasks.NewShingleAnalyzerTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask

No usage of org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.OpenReaderTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.OpenReaderTask

No usage of org.apache.lucene.benchmark.byTask.tasks.OpenReaderTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyIndexTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyIndexTask

No usage of org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyIndexTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyReaderTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyReaderTask

No usage of org.apache.lucene.benchmark.byTask.tasks.OpenTaxonomyReaderTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.PerfTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.PerfTask

Packages that use PerfTask
org.apache.lucene.benchmark.byTask.stats | Statistics maintained when running benchmark tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.benchmark.byTask.utils | Utilities used for the benchmark, and for the reports.

Uses of PerfTask in org.apache.lucene.benchmark.byTask.stats

Methods in org.apache.lucene.benchmark.byTask.stats that return PerfTask
 PerfTask TaskStats.getTask()

Methods in org.apache.lucene.benchmark.byTask.stats with parameters of type PerfTask
 TaskStats Points.markTaskStart(PerfTask task, int round)
Mark that a task is starting.

Uses of PerfTask in org.apache.lucene.benchmark.byTask.tasks

Subclasses of PerfTask in org.apache.lucene.benchmark.byTask.tasks
class | AddDocTask Add a document, optionally of a certain size.
class | AddFacetedDocTask Add a faceted document.
class | ClearStatsTask Clear statistics data.
class | CloseIndexTask Close index writer.
class | CloseReaderTask Close index reader.
class | CloseTaxonomyIndexTask Close taxonomy index.
class | CloseTaxonomyReaderTask Close taxonomy reader.
class | CommitIndexTask Commits the IndexWriter.
class | CommitTaxonomyIndexTask Commits the Taxonomy Index.
class | ConsumeContentSourceTask Consumes a ContentSource.
class | CreateIndexTask Create an index.
class | CreateTaxonomyIndexTask Create a taxonomy index.
class | DeleteByPercentTask Deletes a percentage of documents from an index randomly over the number of documents.
class | DeleteDocTask Delete a document by docid.
class | FlushReaderTask Commits via IndexReader.
class | ForceMergeTask Runs forceMerge on the index.
class | NearRealtimeReaderTask Spawns a BG thread that periodically (defaults to 3.0 seconds, but accepts param in seconds) wakes up and asks IndexWriter for a near real-time reader.
class | NewAnalyzerTask Create a new Analyzer and set it it in the getRunData() for use by all future tasks.
class | NewCollationAnalyzerTask Task to support benchmarking collation.
class | NewLocaleTask Set a Locale for use in benchmarking.
class | NewRoundTask Increment the counter for properties maintained by Round Number.
class | NewShingleAnalyzerTask Task to support benchmarking ShingleFilter / ShingleAnalyzerWrapper
class | OpenIndexTask Open an index writer.
class | OpenReaderTask Open an index reader.
class | OpenTaxonomyIndexTask Open a taxonomy index.
class | OpenTaxonomyReaderTask Open a taxonomy index reader.
class | PrintReaderTask Opens a reader and prints basic statistics.
class | ReadTask Read index (abstract) task.
class | ReadTokensTask Simple task to test performance of tokenizers.
class | ReopenReaderTask Reopens IndexReader and closes old IndexReader.
class | RepAllTask Report all statistics with no aggregations.
class | ReportTask Report (abstract) task - all report tasks extend this task.
class | RepSelectByPrefTask Report by-name-prefix statistics with no aggregations.
class | RepSumByNameRoundTask Report all statistics grouped/aggregated by name and round.
class | RepSumByNameTask Report all statistics aggregated by name.
class | RepSumByPrefRoundTask Report all prefix matching statistics grouped/aggregated by name and round.
class | RepSumByPrefTask Report by-name-prefix statistics aggregated by name.
class | ResetInputsTask Reset inputs so that the test run would behave, input wise, as if it just started.
class | ResetSystemEraseTask Reset all index and input data and call gc, erase index and dir, does NOT clear statistics.
class | ResetSystemSoftTask Reset all index and input data and call gc, does NOT erase index/dir, does NOT clear statistics.
class | RollbackIndexTask Rollback the index writer.
class | SearchTask Search task.
class | SearchTravRetHighlightTask Search and Traverse and Retrieve docs task.
class | SearchTravRetLoadFieldSelectorTask Search and Traverse and Retrieve docs task using a SetBasedFieldSelector.
class | SearchTravRetTask Search and Traverse and Retrieve docs task.
class | SearchTravRetVectorHighlightTask Search and Traverse and Retrieve docs task.
class | SearchTravTask Search and Traverse task.
class | SearchWithCollectorTask Does search w/ a custom collector
class | SearchWithSortTask Does sort search on specified field.
class | SetPropTask Set a performance test configuration property.
class | TaskSequence Sequence of parallel or sequential tasks.
class | UpdateDocTask Update a document, using IndexWriter.updateDocument, optionally with of a certain size.
class | WaitForMergesTask Waits for merges to finish.
class | WaitTask Simply waits for the specified (via the parameter) amount of time.
class | WarmTask Warm reader task: retrieve all reader documents.
class | WriteLineDocTask A task which writes documents, one line per document.

Methods in org.apache.lucene.benchmark.byTask.tasks that return types with arguments of type PerfTask
 ArrayList<PerfTask> TaskSequence.getTasks()

Methods in org.apache.lucene.benchmark.byTask.tasks with parameters of type PerfTask
 void TaskSequence.addTask(PerfTask task)

Uses of PerfTask in org.apache.lucene.benchmark.byTask.utils

Methods in org.apache.lucene.benchmark.byTask.utils that return types with arguments of type PerfTask
 ArrayList<PerfTask> Algorithm.extractTasks()
Expert: for test purposes, return all tasks participating in this algorithm.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.PrintReaderTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.PrintReaderTask

No usage of org.apache.lucene.benchmark.byTask.tasks.PrintReaderTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.ReadTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.ReadTask

Packages that use ReadTask
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.

Uses of ReadTask in org.apache.lucene.benchmark.byTask

Methods in org.apache.lucene.benchmark.byTask with parameters of type ReadTask
 QueryMaker PerfRunData.getQueryMaker(ReadTask readTask)

Uses of ReadTask in org.apache.lucene.benchmark.byTask.tasks

Subclasses of ReadTask in org.apache.lucene.benchmark.byTask.tasks
class | SearchTask Search task.
class | SearchTravRetHighlightTask Search and Traverse and Retrieve docs task.
class | SearchTravRetLoadFieldSelectorTask Search and Traverse and Retrieve docs task using a SetBasedFieldSelector.
class | SearchTravRetTask Search and Traverse and Retrieve docs task.
class | SearchTravRetVectorHighlightTask Search and Traverse and Retrieve docs task.
class | SearchTravTask Search and Traverse task.
class | SearchWithCollectorTask Does search w/ a custom collector
class | SearchWithSortTask Does sort search on specified field.
class | WarmTask Warm reader task: retrieve all reader documents.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.ReadTokensTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.ReadTokensTask

No usage of org.apache.lucene.benchmark.byTask.tasks.ReadTokensTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.ReopenReaderTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.ReopenReaderTask

No usage of org.apache.lucene.benchmark.byTask.tasks.ReopenReaderTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.RepAllTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.RepAllTask

No usage of org.apache.lucene.benchmark.byTask.tasks.RepAllTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.ReportTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.ReportTask

Packages that use ReportTask
org.apache.lucene.benchmark.byTask.tasks Extendable benchmark tasks.

Uses of ReportTask in org.apache.lucene.benchmark.byTask.tasks

Subclasses of ReportTask in org.apache.lucene.benchmark.byTask.tasks
class | RepAllTask Report all statistics with no aggregations.
class | RepSelectByPrefTask Report by-name-prefix statistics with no aggregations.
class | RepSumByNameRoundTask Report all statistics grouped/aggregated by name and round.
class | RepSumByNameTask Report all statistics aggregated by name.
class | RepSumByPrefRoundTask Report all prefix matching statistics grouped/aggregated by name and round.
class | RepSumByPrefTask Report by-name-prefix statistics aggregated by name.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask

No usage of org.apache.lucene.benchmark.byTask.tasks.RepSelectByPrefTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask

No usage of org.apache.lucene.benchmark.byTask.tasks.RepSumByNameRoundTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask

No usage of org.apache.lucene.benchmark.byTask.tasks.RepSumByNameTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask

No usage of org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefRoundTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.RepSumByPrefTask

Packages that use RepSumByPrefTask
org.apache.lucene.benchmark.byTask.tasks Extendable benchmark tasks.

Uses of RepSumByPrefTask in org.apache.lucene.benchmark.byTask.tasks

Subclasses of RepSumByPrefTask in org.apache.lucene.benchmark.byTask.tasks
class | RepSelectByPrefTask Report by-name-prefix statistics with no aggregations.
class | RepSumByPrefRoundTask Report all prefix matching statistics grouped/aggregated by name and round.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.ResetInputsTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.ResetInputsTask

Packages that use ResetInputsTask
org.apache.lucene.benchmark.byTask.tasks Extendable benchmark tasks.

Uses of ResetInputsTask in org.apache.lucene.benchmark.byTask.tasks

Subclasses of ResetInputsTask in org.apache.lucene.benchmark.byTask.tasks
class | ResetSystemEraseTask Reset all index and input data and call gc, erase index and dir, does NOT clear statistics.
class | ResetSystemSoftTask Reset all index and input data and call gc, does NOT erase index/dir, does NOT clear statistics.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.ResetSystemEraseTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.ResetSystemEraseTask

No usage of org.apache.lucene.benchmark.byTask.tasks.ResetSystemEraseTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.ResetSystemSoftTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.ResetSystemSoftTask

Packages that use ResetSystemSoftTask
org.apache.lucene.benchmark.byTask.tasks Extendable benchmark tasks.

Uses of ResetSystemSoftTask in org.apache.lucene.benchmark.byTask.tasks

Subclasses of ResetSystemSoftTask in org.apache.lucene.benchmark.byTask.tasks
 class ResetSystemEraseTask
Reset all index and input data and call gc, erase index and dir, does NOT clear statistics.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.RollbackIndexTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.RollbackIndexTask

No usage of org.apache.lucene.benchmark.byTask.tasks.RollbackIndexTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.SearchTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.SearchTask

Packages that use SearchTask
org.apache.lucene.benchmark.byTask.tasks Extendable benchmark tasks.

Uses of SearchTask in org.apache.lucene.benchmark.byTask.tasks

Subclasses of SearchTask in org.apache.lucene.benchmark.byTask.tasks
 class SearchWithCollectorTask
Does search w/ a custom collector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

No usage of org.apache.lucene.benchmark.byTask.tasks.SearchTravRetHighlightTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetLoadFieldSelectorTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.SearchTravRetLoadFieldSelectorTask

No usage of org.apache.lucene.benchmark.byTask.tasks.SearchTravRetLoadFieldSelectorTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.SearchTravRetTask

No usage of org.apache.lucene.benchmark.byTask.tasks.SearchTravRetTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask

No usage of org.apache.lucene.benchmark.byTask.tasks.SearchTravRetVectorHighlightTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.SearchTravTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.SearchTravTask

Packages that use SearchTravTask
org.apache.lucene.benchmark.byTask.tasks Extendable benchmark tasks.

Uses of SearchTravTask in org.apache.lucene.benchmark.byTask.tasks

Subclasses of SearchTravTask in org.apache.lucene.benchmark.byTask.tasks
class | SearchTravRetHighlightTask Search and Traverse and Retrieve docs task.
class | SearchTravRetLoadFieldSelectorTask Search and Traverse and Retrieve docs task using a SetBasedFieldSelector.
class | SearchTravRetTask Search and Traverse and Retrieve docs task.
class | SearchTravRetVectorHighlightTask Search and Traverse and Retrieve docs task.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask

No usage of org.apache.lucene.benchmark.byTask.tasks.SearchWithCollectorTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask

No usage of org.apache.lucene.benchmark.byTask.tasks.SearchWithSortTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.SetPropTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.SetPropTask

No usage of org.apache.lucene.benchmark.byTask.tasks.SetPropTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.TaskSequence

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.TaskSequence

Packages that use TaskSequence
org.apache.lucene.benchmark.byTask.tasks Extendable benchmark tasks.

Uses of TaskSequence in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks that return TaskSequence
 TaskSequence TaskSequence.getParent()

Constructors in org.apache.lucene.benchmark.byTask.tasks with parameters of type TaskSequence
TaskSequence(PerfRunData runData, String name, TaskSequence parent, boolean parallel)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.UpdateDocTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.UpdateDocTask

No usage of org.apache.lucene.benchmark.byTask.tasks.UpdateDocTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.WaitForMergesTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.WaitForMergesTask

No usage of org.apache.lucene.benchmark.byTask.tasks.WaitForMergesTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.WaitTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.WaitTask

No usage of org.apache.lucene.benchmark.byTask.tasks.WaitTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.WarmTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.WarmTask

No usage of org.apache.lucene.benchmark.byTask.tasks.WarmTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask

No usage of org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Algorithm

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.utils
Class Algorithm

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.utils.Algorithm

public class Algorithm
extends Object

Test algorithm, as read from file

Constructor Summary
Algorithm(PerfRunData runData)
Read algorithm from file Property examined: alt.tasks.packages == comma separated list of alternate package names where tasks would be searched for, when not found in the default package (that of PerfTask Object.getClass()).
Method Summary
void | execute() Execute this algorithm
ArrayList<PerfTask> | extractTasks() Expert: for test purposes, return all tasks participating in this algorithm.
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Algorithm

public Algorithm(PerfRunData runData)
          throws Exception
Read algorithm from file Property examined: alt.tasks.packages == comma separated list of alternate package names where tasks would be searched for, when not found in the default package (that of PerfTask Object.getClass()). If the same task class appears in more than one package, the package indicated first in this list will be used.

Parameters:
runData - perf-run-data used at running the tasks.
Throws:
Exception - if errors while parsing the algorithm
Method Detail

toString

public String toString()
Overrides:
toString in class Object

execute

public void execute()
             throws Exception
Execute this algorithm

Throws:
Exception

extractTasks

public ArrayList<PerfTask> extractTasks()
Expert: for test purposes, return all tasks participating in this algorithm.

Returns:
all tasks participating in this algorithm.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Config

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.utils
Class Config

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.utils.Config

public class Config
extends Object

Perf run configuration properties.

Numeric property containing ":", e.g. "10:100:5" is interpreted as array of numeric values. It is extracted once, on first use, and maintain a round number to return the appropriate value.

The config property "work.dir" tells where is the root of docs data dirs and indexes dirs. It is set to either of:

  • value supplied for it in the alg file;
  • otherwise, value of System property "benchmark.work.dir";
  • otherwise, "work".

Constructor Summary
Config(Properties props)
Create config without algorithm - useful for a programmatic perf test.
Config(Reader algReader)
Read both algorithm and config properties.
Method Summary
boolean | get(String name, boolean dflt) Return a boolean property.
double | get(String name, double dflt) Return a double property.
int | get(String name, int dflt) Return an int property.
String | get(String name, String dflt) Return a string property.
String | getAlgorithmText()
String | getColsNamesForValsByRound()
String | getColsValuesForValsByRound(int roundNum)
int | getRoundNumber()
int | newRound() Increment the round number, for config values that are extracted by round number.
void | set(String name, String value) Set a property.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Config

public Config(Reader algReader)
       throws IOException
Read both algorithm and config properties.

Parameters:
algReader - from where to read algorithm and config properties.
Throws:
IOException

Config

public Config(Properties props)
Create config without algorithm - useful for a programmatic perf test.

Parameters:
props - - configuration properties.
Method Detail

get

public String get(String name,
                  String dflt)
Return a string property.

Parameters:
name - name of property.
dflt - default value.
Returns:
a string property.

set

public void set(String name,
                String value)
         throws Exception
Set a property. Note: once a multiple values property is set, it can no longer be modified.

Parameters:
name - name of property.
value - either single or multiple property value (multiple values are separated by ":")
Throws:
Exception

get

public int get(String name,
               int dflt)
Return an int property. If the property contain ":", e.g. "10:100:5", it is interpreted as array of ints. It is extracted once, on first call to get() it, and a by-round-value is returned.

Parameters:
name - name of property
dflt - default value
Returns:
a int property.

get

public double get(String name,
                  double dflt)
Return a double property. If the property contain ":", e.g. "10:100:5", it is interpreted as array of doubles. It is extracted once, on first call to get() it, and a by-round-value is returned.

Parameters:
name - name of property
dflt - default value
Returns:
a double property.

get

public boolean get(String name,
                   boolean dflt)
Return a boolean property. If the property contain ":", e.g. "true.true.false", it is interpreted as array of booleans. It is extracted once, on first call to get() it, and a by-round-value is returned.

Parameters:
name - name of property
dflt - default value
Returns:
a int property.

newRound

public int newRound()
Increment the round number, for config values that are extracted by round number.

Returns:
the new round number.

getColsNamesForValsByRound

public String getColsNamesForValsByRound()
Returns:
names of params set by round, for reports title

getColsValuesForValsByRound

public String getColsValuesForValsByRound(int roundNum)
Returns:
values of params set by round, for reports lines.

getRoundNumber

public int getRoundNumber()
Returns:
the round number.

getAlgorithmText

public String getAlgorithmText()
Returns:
Returns the algorithmText.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileUtils

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.utils
Class FileUtils

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.utils.FileUtils

public class FileUtils
extends Object

File utilities.

Constructor Summary
FileUtils()
Method Summary
static boolean fullyDelete(File dir)
Delete files and directories, even if non-empty.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FileUtils

public FileUtils()
Method Detail

fullyDelete

public static boolean fullyDelete(File dir)
                           throws IOException
Delete files and directories, even if non-empty.

Parameters:
dir - file or directory
Returns:
true on success, false if no or part of files have been deleted
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Format

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.utils
Class Format

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.utils.Format

public class Format
extends Object

Formatting utilities (for reports).

Constructor Summary
Format()
Method Summary
static String | format(int numFracDigits, double f, String col)
static String | format(int numFracDigits, float f, String col) Padd a number from left.
static String | format(int n, String col) Pad a number from left.
static String | format(String s, String col) Pad a string from right.
static String | formatPaddLeft(String s, String col) Pad a string from left.
static String | formatPaddRight(int numFracDigits, double f, String col)
static String | formatPaddRight(int numFracDigits, float f, String col) Pad a number from right.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Format

public Format()
Method Detail

format

public static String format(int numFracDigits,
                            float f,
                            String col)
Padd a number from left.

Parameters:
numFracDigits - number of digits in fraction part - must be 0 or 1 or 2.
f - number to be formatted.
col - column name (used for deciding on length).
Returns:
formatted string.

format

public static String format(int numFracDigits,
                            double f,
                            String col)

formatPaddRight

public static String formatPaddRight(int numFracDigits,
                                     float f,
                                     String col)
Pad a number from right.

Parameters:
numFracDigits - number of digits in fraction part - must be 0 or 1 or 2.
f - number to be formatted.
col - column name (used for deciding on length).
Returns:
formatted string.

formatPaddRight

public static String formatPaddRight(int numFracDigits,
                                     double f,
                                     String col)

format

public static String format(int n,
                            String col)
Pad a number from left.

Parameters:
n - number to be formatted.
col - column name (used for deciding on length).
Returns:
formatted string.

format

public static String format(String s,
                            String col)
Pad a string from right.

Parameters:
s - string to be formatted.
col - column name (used for deciding on length).
Returns:
formatted string.

formatPaddLeft

public static String formatPaddLeft(String s,
                                    String col)
Pad a string from left.

Parameters:
s - string to be formatted.
col - column name (used for deciding on length).
Returns:
formatted string.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.benchmark.byTask.utils
Classes
Algorithm
Config
FileUtils
Format
StreamUtils
StringBuilderReader
Enums
StreamUtils.Type


org.apache.lucene.benchmark.byTask.utils

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.benchmark.byTask.utils

Utilities used for the benchmark, and for the reports.

See:
Description

Class Summary
Algorithm | Test algorithm, as read from file
Config | Perf run configuration properties.
FileUtils | File utilities.
Format | Formatting utilities (for reports).
StreamUtils | Stream utilities.
StringBuilderReader | Implements a Reader over a StringBuilder instance.

Enum Summary
StreamUtils.Type File format type

Package org.apache.lucene.benchmark.byTask.utils Description

Utilities used for the benchmark, and for the reports.


org.apache.lucene.benchmark.byTask.utils Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.benchmark.byTask.utils

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.benchmark.byTask.utils.Algorithm
    • org.apache.lucene.benchmark.byTask.utils.Config
    • org.apache.lucene.benchmark.byTask.utils.FileUtils
    • org.apache.lucene.benchmark.byTask.utils.Format
    • java.io.Reader (implements java.io.Closeable, java.lang.Readable)
      • org.apache.lucene.benchmark.byTask.utils.StringBuilderReader
    • org.apache.lucene.benchmark.byTask.utils.StreamUtils

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.benchmark.byTask.utils.StreamUtils.Type


Uses of Package org.apache.lucene.benchmark.byTask.utils

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.benchmark.byTask.utils

Packages that use org.apache.lucene.benchmark.byTask.utils
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.benchmark.byTask.stats | Statistics maintained when running benchmark tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.benchmark.byTask.utils | Utilities used for the benchmark, and for the reports.

Classes in org.apache.lucene.benchmark.byTask.utils used by org.apache.lucene.benchmark.byTask
Algorithm
Test algorithm, as read from file
Config
Perf run configuration properties.

Classes in org.apache.lucene.benchmark.byTask.utils used by org.apache.lucene.benchmark.byTask.feeds
Config
Perf run configuration properties.

Classes in org.apache.lucene.benchmark.byTask.utils used by org.apache.lucene.benchmark.byTask.stats
Config
Perf run configuration properties.

Classes in org.apache.lucene.benchmark.byTask.utils used by org.apache.lucene.benchmark.byTask.tasks
Config
Perf run configuration properties.

Classes in org.apache.lucene.benchmark.byTask.utils used by org.apache.lucene.benchmark.byTask.utils
StreamUtils.Type
File format type

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


StreamUtils

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.utils
Class StreamUtils

java.lang.Object
    extended by  org.apache.lucene.benchmark.byTask.utils.StreamUtils

public class StreamUtils
extends Object

Stream utilities.

Nested Class Summary
static class StreamUtils.Type
File format type
Field Summary
static int BUFFER_SIZE
Buffer size used across the benchmark package
Constructor Summary
StreamUtils()
Method Summary
static InputStream | inputStream(File file) Returns an InputStream over the requested file.
static OutputStream | outputStream(File file) Returns an OutputStream over the requested file, identifying the appropriate OutputStream instance similar to inputStream(File).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

BUFFER_SIZE

public static final int BUFFER_SIZE
Buffer size used across the benchmark package

See Also:
Constant Field Values
Constructor Detail

StreamUtils

public StreamUtils()
Method Detail

inputStream

public static InputStream inputStream(File file)
                               throws IOException
Returns an InputStream over the requested file. This method attempts to identify the appropriate InputStream instance to return based on the file name (e.g., if it ends with .bz2 or .bzip, return a 'bzip' InputStream).

Throws:
IOException

outputStream

public static OutputStream outputStream(File file)
                                 throws IOException
Returns an OutputStream over the requested file, identifying the appropriate OutputStream instance similar to inputStream(File).

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StreamUtils.Type

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.benchmark.byTask.utils
Enum StreamUtils.Type

java.lang.Object
    extended by  java.lang.Enum<StreamUtils.Type>
        extended by  org.apache.lucene.benchmark.byTask.utils.StreamUtils.Type
All Implemented Interfaces:
Serializable, Comparable<StreamUtils.Type>
Enclosing class:
StreamUtils
public static enum StreamUtils.Type
extends Enum<StreamUtils.Type>

File format type

Enum Constant Summary
BZIP2
BZIP2 is automatically used for .bz2 and .bzip2 extensions.
GZIP
GZIP is automatically used for .gz and .gzip extensions.
PLAIN
Plain text is used for anything which is not GZIP or BZIP.
Method Summary
static StreamUtils.Type | valueOf(String name) Returns the enum constant of this type with the specified name.
static StreamUtils.Type[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

BZIP2

public static final StreamUtils.Type BZIP2
BZIP2 is automatically used for .bz2 and .bzip2 extensions.

GZIP

public static final StreamUtils.Type GZIP
GZIP is automatically used for .gz and .gzip extensions.

PLAIN

public static final StreamUtils.Type PLAIN
Plain text is used for anything which is not GZIP or BZIP.

Method Detail

values

public static final StreamUtils.Type[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(StreamUtils.Type c : StreamUtils.Type.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static StreamUtils.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


StringBuilderReader

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.byTask.utils
Class StringBuilderReader

java.lang.Object
    extended by  java.io.Reader
        extended by  org.apache.lucene.benchmark.byTask.utils.StringBuilderReader
All Implemented Interfaces:
Closeable, Readable
public class StringBuilderReader
extends Reader

Implements a Reader over a StringBuilder instance. Although one can use StringReader by passing it StringBuilder.toString(), it is better to use this class, as it doesn't mark the passed-in StringBuilder as shared (which will cause inner char[] allocations at the next append() attempt).
Notes:

  • This implementation assumes the underlying StringBuilder is not changed during the use of this Reader implementation.
  • This implementation is thread-safe.
  • The implementation looks very much like StringReader (for the right reasons).
  • If one wants to reuse that instance, then the following needs to be done:
     StringBuilder sb = new StringBuilder("some text");
 Reader reader = new StringBuilderReader(sb);
 ... read from reader - don't close it ! ...
 sb.setLength(0);
 sb.append("some new text");
 reader.reset();
 ... read the new string from the reader ...

Field Summary
Fields inherited from class java.io.Reader
lock
Constructor Summary
StringBuilderReader(StringBuilder sb)
Method Summary
void | close()
void | mark(int readAheadLimit) Mark the present position in the stream.
boolean | markSupported()
int | read()
int | read(char[] cbuf, int off, int len)
boolean | ready()
void | reset()
void | set(StringBuilder sb)
long | skip(long ns)
Methods inherited from class java.io.Reader
read, read
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StringBuilderReader

public StringBuilderReader(StringBuilder sb)
Method Detail

close

public void close()
Specified by:
close in interface Closeable
Specified by:
close in class Reader

mark

public void mark(int readAheadLimit)
          throws IOException
Mark the present position in the stream. Subsequent calls to reset() will reposition the stream to this point.

Overrides:
mark in class Reader
Parameters:
readAheadLimit - Limit on the number of characters that may be read while still preserving the mark. Because the stream's input comes from a StringBuilder, there is no actual limit, so this argument must not be negative, but is otherwise ignored.
Throws:
IllegalArgumentException - If readAheadLimit is < 0
IOException - If an I/O error occurs

markSupported

public boolean markSupported()
Overrides:
markSupported in class Reader

read

public int read()
         throws IOException
Overrides:
read in class Reader
Throws:
IOException

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Specified by:
read in class Reader
Throws:
IOException

ready

public boolean ready()
              throws IOException
Overrides:
ready in class Reader
Throws:
IOException

reset

public void reset()
           throws IOException
Overrides:
reset in class Reader
Throws:
IOException

set

public void set(StringBuilder sb)

skip

public long skip(long ns)
          throws IOException
Overrides:
skip in class Reader
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.benchmark.byTask.utils.Algorithm

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.utils.Algorithm

Packages that use Algorithm
org.apache.lucene.benchmark.byTask
Benchmarking Lucene By Tasks.

Uses of Algorithm in org.apache.lucene.benchmark.byTask

Methods in org.apache.lucene.benchmark.byTask that return Algorithm
 Algorithm Benchmark.getAlgorithm()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.utils.Config

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.utils.Config

Packages that use Config
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.benchmark.byTask.stats | Statistics maintained when running benchmark tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.

Uses of Config in org.apache.lucene.benchmark.byTask

Methods in org.apache.lucene.benchmark.byTask that return Config
 Config PerfRunData.getConfig()

Constructors in org.apache.lucene.benchmark.byTask with parameters of type Config
PerfRunData(Config config)

Uses of Config in org.apache.lucene.benchmark.byTask.feeds

Fields in org.apache.lucene.benchmark.byTask.feeds declared as Config
protected Config | DocMaker.config
protected Config | AbstractQueryMaker.config

Methods in org.apache.lucene.benchmark.byTask.feeds that return Config
 Config ContentItemsSource.getConfig()

Methods in org.apache.lucene.benchmark.byTask.feeds with parameters of type Config
void | RandomFacetSource.setConfig(Config config)
void | LongToEnglishQueryMaker.setConfig(Config config)
void | ContentItemsSource.setConfig(Config config) Sets the Config for this content source.
void | ReutersContentSource.setConfig(Config config)
void | DirContentSource.setConfig(Config config)
void | DocMaker.setConfig(Config config) Set the configuration parameters of this doc maker.
void | TrecContentSource.setConfig(Config config)
void | LineDocSource.setConfig(Config config)
void | QueryMaker.setConfig(Config config) Set the properties
void | SortableSingleDocSource.setConfig(Config config)
void | AbstractQueryMaker.setConfig(Config config)
void | EnwikiContentSource.setConfig(Config config)

Uses of Config in org.apache.lucene.benchmark.byTask.stats

Constructors in org.apache.lucene.benchmark.byTask.stats with parameters of type Config
Points(Config config)
Create a Points statistics object.

Uses of Config in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks with parameters of type Config
static IndexWriter | CreateIndexTask.configureWriter(Config config, PerfRunData runData, IndexWriterConfig.OpenMode mode, IndexCommit commit)
static IndexWriterConfig | CreateIndexTask.createWriterConfig(Config config, PerfRunData runData, IndexWriterConfig.OpenMode mode, IndexCommit commit)
static IndexDeletionPolicy | CreateIndexTask.getIndexDeletionPolicy(Config config)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.utils.FileUtils

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.utils.FileUtils

No usage of org.apache.lucene.benchmark.byTask.utils.FileUtils

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.utils.Format

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.utils.Format

No usage of org.apache.lucene.benchmark.byTask.utils.Format

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.utils.StreamUtils

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.utils.StreamUtils

No usage of org.apache.lucene.benchmark.byTask.utils.StreamUtils

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.utils.StreamUtils.Type

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.utils.StreamUtils.Type

Packages that use StreamUtils.Type
org.apache.lucene.benchmark.byTask.utils Utilities used for the benchmark, and for the reports.

Uses of StreamUtils.Type in org.apache.lucene.benchmark.byTask.utils

Methods in org.apache.lucene.benchmark.byTask.utils that return StreamUtils.Type
static StreamUtils.Type | StreamUtils.Type.valueOf(String name) Returns the enum constant of this type with the specified name.
static StreamUtils.Type[] | StreamUtils.Type.values() Returns an array containing the constants of this enum type, in the order they're declared.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.byTask.utils.StringBuilderReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.byTask.utils.StringBuilderReader

No usage of org.apache.lucene.benchmark.byTask.utils.StringBuilderReader

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.Constants

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.Constants

No usage of org.apache.lucene.benchmark.Constants

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Judge

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.quality
Interface Judge

All Known Implementing Classes:
TrecJudge
public interface Judge

Judge if a document is relevant for a quality query.

Method Summary
boolean | isRelevant(String docName, QualityQuery query) Judge if document docName is relevant for the given quality query.
int | maxRecall(QualityQuery query) Return the maximal recall for the input quality query.
boolean | validateData(QualityQuery[] qq, PrintWriter logger) Validate that queries and this Judge match each other.

Method Detail

isRelevant

boolean isRelevant(String docName,
                   QualityQuery query)
Judge if document docName is relevant for the given quality query.

Parameters:
docName - name of doc tested for relevancy.
query - tested quality query.
Returns:
true if relevant, false if not.

validateData

boolean validateData(QualityQuery[] qq,
                     PrintWriter logger)
Validate that queries and this Judge match each other. To be perfectly valid, this Judge must have some data for each and every input quality query, and must not have any data on any other quality query. Note: the quality benchmark run would not fail in case of imperfect validity, just a warning message would be logged.

Parameters:
qq - quality queries to be validated.
logger - if not null, validation issues are logged.
Returns:
true if perfectly valid, false if not.

maxRecall

int maxRecall(QualityQuery query)
Return the maximal recall for the input quality query. It is the number of relevant docs this Judge "knows" for the query.

Parameters:
query - the query whose maximal recall is needed.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.benchmark.quality
Interfaces
Judge
QualityQueryParser
Classes
QualityBenchmark
QualityQuery
QualityStats
QualityStats.RecallPoint


org.apache.lucene.benchmark.quality

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.benchmark.quality

Search Quality Benchmarking.

See:
Description

Interface Summary
Judge | Judge if a document is relevant for a quality query.
QualityQueryParser | Parse a QualityQuery into a Lucene query.

Class Summary
QualityBenchmark | Main entry point for running a quality benchmark.
QualityQuery | A QualityQuery has an ID and some name-value pairs.
QualityStats | Results of quality benchmark run for a single query or for a set of queries.
QualityStats.RecallPoint | A certain rank in which a relevant doc was found.

Package org.apache.lucene.benchmark.quality Description

Search Quality Benchmarking.

This package allows to benchmark search quality of a Lucene application.

In order to use this package you should provide:

  • A searcher.
  • Quality queries.
  • Judging object.
  • Reporting object.

For benchmarking TREC collections with TREC QRels, take a look at the trec package.

Here is a sample code used to run the TREC 2006 queries 701-850 on the .Gov2 collection:

    File topicsFile = new File("topics-701-850.txt");
    File qrelsFile = new File("qrels-701-850.txt");
    Searcher searcher = new IndexSearcher("index");

    int maxResults = 1000;
    String docNameField = "docname";

    PrintWriter logger = new PrintWriter(System.out,true);

    // use trec utilities to read trec topics into quality queries
    TrecTopicsReader qReader = new TrecTopicsReader();
    QualityQuery qqs[] = qReader.readQueries(new BufferedReader(new FileReader(topicsFile)));

    // prepare judge, with trec utilities that read from a QRels file
    Judge judge = new TrecJudge(new BufferedReader(new FileReader(qrelsFile)));

    // validate topics & judgments match each other
    judge.validateData(qqs, logger);

    // set the parsing of quality queries into Lucene queries.
    QualityQueryParser qqParser = new SimpleQQParser("title", "body");

    // run the benchmark
    QualityBenchmark qrun = new QualityBenchmark(qqs, qqParser, searcher, docNameField);
    SubmissionReport submitLog = null;
    QualityStats stats[] = qrun.execute(maxResults, judge, submitLog, logger);

    // print an avarage sum of the results
    QualityStats avg = QualityStats.average(stats);
    avg.log("SUMMARY",2,logger, "  ");

Some immediate ways to modify this program to your needs are:

  • To run on different formats of queries and judgements provide your own Judge and Quality queries.
  • Create sophisticated Lucene queries by supplying a different Quality query parser.


org.apache.lucene.benchmark.quality Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.benchmark.quality

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.benchmark.quality.QualityBenchmark
    • org.apache.lucene.benchmark.quality.QualityQuery (implements java.lang.Comparable<T>)
    • org.apache.lucene.benchmark.quality.QualityStats
    • org.apache.lucene.benchmark.quality.QualityStats.RecallPoint

Interface Hierarchy

  • org.apache.lucene.benchmark.quality.Judge
  • org.apache.lucene.benchmark.quality.QualityQueryParser


Uses of Package org.apache.lucene.benchmark.quality

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.benchmark.quality

Packages that use org.apache.lucene.benchmark.quality
org.apache.lucene.benchmark.quality | Search Quality Benchmarking.
org.apache.lucene.benchmark.quality.trec | Utilities for Trec related quality benchmarking, feeding from Trec Topics and QRels inputs.
org.apache.lucene.benchmark.quality.utils | Miscellaneous utilities for search quality benchmarking: query parsing, submission reports.

Classes in org.apache.lucene.benchmark.quality used by org.apache.lucene.benchmark.quality
Judge
Judge if a document is relevant for a quality query.
QualityQuery
A QualityQuery has an ID and some name-value pairs.
QualityQueryParser
Parse a QualityQuery into a Lucene query.
QualityStats
Results of quality benchmark run for a single query or for a set of queries.
QualityStats.RecallPoint
A certain rank in which a relevant doc was found.

Classes in org.apache.lucene.benchmark.quality used by org.apache.lucene.benchmark.quality.trec
Judge
Judge if a document is relevant for a quality query.
QualityQuery
A QualityQuery has an ID and some name-value pairs.

Classes in org.apache.lucene.benchmark.quality used by org.apache.lucene.benchmark.quality.utils
QualityQuery
A QualityQuery has an ID and some name-value pairs.
QualityQueryParser
Parse a QualityQuery into a Lucene query.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


QualityBenchmark

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.quality
Class QualityBenchmark

java.lang.Object
    extended by  org.apache.lucene.benchmark.quality.QualityBenchmark

public class QualityBenchmark
extends Object

Main entry point for running a quality benchmark.

There are two main configurations for running a quality benchmark:

  • Against existing judgements.
  • For submission (e.g. for a contest).
The first configuration requires a non null Judge. The second configuration requires a non null SubmissionLogger.

Field Summary
protected String | docNameField index field to extract doc name for each search result; used for judging the results.
protected QualityQueryParser | qqParser Parser for turning QualityQueries into Lucene Queries.
protected QualityQuery[] | qualityQueries Quality Queries that this quality benchmark would execute.
protected IndexSearcher | searcher Index to be searched.
Constructor Summary
QualityBenchmark(QualityQuery[] qqs, QualityQueryParser qqParser, IndexSearcher searcher, String docNameField)
Create a QualityBenchmark.
Method Summary
QualityStats[] | execute(Judge judge, SubmissionReport submitRep, PrintWriter qualityLog) Run the quality benchmark.
int | getMaxQueries()
int | getMaxResults()
void | setMaxQueries(int maxQueries) Set the maximum number of quality queries to run.
void | setMaxResults(int maxResults) set the maximum number of results to collect for each quality query.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

qualityQueries

protected QualityQuery[] qualityQueries
Quality Queries that this quality benchmark would execute.

qqParser

protected QualityQueryParser qqParser
Parser for turning QualityQueries into Lucene Queries.

searcher

protected IndexSearcher searcher
Index to be searched.

docNameField

protected String docNameField
index field to extract doc name for each search result; used for judging the results.

Constructor Detail

QualityBenchmark

public QualityBenchmark(QualityQuery[] qqs,
                        QualityQueryParser qqParser,
                        IndexSearcher searcher,
                        String docNameField)
Create a QualityBenchmark.

Parameters:
qqs - quality queries to run.
qqParser - parser for turning QualityQueries into Lucene Queries.
searcher - index to be searched.
docNameField - name of field containing the document name. This allows to extract the doc name for search results, and is important for judging the results.
Method Detail

execute

public QualityStats[] execute(Judge judge,
                              SubmissionReport submitRep,
                              PrintWriter qualityLog)
                       throws Exception
Run the quality benchmark.

Parameters:
judge - the judge that can tell if a certain result doc is relevant for a certain quality query. If null, no judgements would be made. Usually null for a submission run.
submitRep - submission report is created if non null.
qualityLog - If not null, quality run data would be printed for each query.
Returns:
QualityStats of each quality query that was executed.
Throws:
Exception - if quality benchmark failed to run.

getMaxQueries

public int getMaxQueries()
Returns:
the maximum number of quality queries to run. Useful at debugging.

setMaxQueries

public void setMaxQueries(int maxQueries)
Set the maximum number of quality queries to run. Useful at debugging.

getMaxResults

public int getMaxResults()
Returns:
the maximum number of results to collect for each quality query.

setMaxResults

public void setMaxResults(int maxResults)
set the maximum number of results to collect for each quality query.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QualityQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.quality
Class QualityQuery

java.lang.Object
    extended by  org.apache.lucene.benchmark.quality.QualityQuery
All Implemented Interfaces:
Comparable<QualityQuery>
public class QualityQuery
extends Object
implements Comparable<QualityQuery>

A QualityQuery has an ID and some name-value pairs.

The ID allows to map the quality query with its judgements.

The name-value pairs are used by a QualityQueryParser to create a Lucene Query.

It is very likely that name-value-pairs would be mapped into fields in a Lucene query, but it is up to the QualityQueryParser how to map - e.g. all values in a single field, or each pair as its own field, etc., - and this of course must match the way the searched index was constructed.

Constructor Summary
QualityQuery(String queryID, Map<String,String> nameValPairs)
Create a QualityQuery with given ID and name-value pairs.
Method Summary
int | compareTo(QualityQuery other)
String[] | getNames() Return all the names of name-value-pairs in this QualityQuery.
String | getQueryID() Return the ID of this query.
String | getValue(String name) Return the value of a certain name-value pair.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

QualityQuery

public QualityQuery(String queryID,
                    Map<String,String> nameValPairs)
Create a QualityQuery with given ID and name-value pairs.

Parameters:
queryID - ID of this quality query.
nameValPairs - the contents of this quality query.
Method Detail

getNames

public String[] getNames()
Return all the names of name-value-pairs in this QualityQuery.

getValue

public String getValue(String name)
Return the value of a certain name-value pair.

Parameters:
name - the name whose value should be returned.

getQueryID

public String getQueryID()
Return the ID of this query. The ID allows to map the quality query with its judgements.

compareTo

public int compareTo(QualityQuery other)
Specified by:
compareTo in interface Comparable<QualityQuery>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QualityQueryParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.quality
Interface QualityQueryParser

All Known Implementing Classes:
SimpleQQParser
public interface QualityQueryParser

Parse a QualityQuery into a Lucene query.

Method Summary
 Query parse(QualityQuery qq)
Parse a given QualityQuery into a Lucene query.

Method Detail

parse

Query parse(QualityQuery qq)
            throws ParseException
Parse a given QualityQuery into a Lucene query.

Parameters:
qq - the quality query to be parsed.
Throws:
ParseException - if parsing failed.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QualityStats

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.quality
Class QualityStats

java.lang.Object
    extended by  org.apache.lucene.benchmark.quality.QualityStats

public class QualityStats
extends Object

Results of quality benchmark run for a single query or for a set of queries.

Nested Class Summary
static class QualityStats.RecallPoint
A certain rank in which a relevant doc was found.
Field Summary
static int MAX_POINTS
Number of points for which precision is computed.
Constructor Summary
QualityStats(double maxGoodPoints, long searchTime)
Construct a QualityStats object with anticipated maximal number of relevant hits.
Method Summary
void | addResult(int n, boolean isRelevant, long docNameExtractTime) Add a (possibly relevant) doc.
static QualityStats | average(QualityStats[] stats) Create a QualityStats object that is the average of the input QualityStats objects.
double | getAvp() Return the average precision at recall points.
long | getDocNamesExtractTime() Returns the time it took to extract doc names for judging the measured query, in milliseconds.
double | getMaxGoodPoints() Returns the maximal number of good points.
double | getMRR() Returns the Mean reciprocal rank over the queries or RR for a single query.
double | getNumGoodPoints() Returns the number of good points (only relevant points).
double | getNumPoints() Returns the number of points (both relevant and irrelevant points).
double | getPrecisionAt(int n) Return the precision at rank n: |{relevant hits within first n hits}| / n.
double | getRecall() Return the recall: |{relevant hits found}| / |{relevant hits existing}|.
QualityStats.RecallPoint[] | getRecallPoints() Returns the recallPoints.
long | getSearchTime() Returns the search time in milliseconds for the measured query.
void | log(String title, int paddLines, PrintWriter logger, String prefix) Log information on this QualityStats object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

MAX_POINTS

public static final int MAX_POINTS
Number of points for which precision is computed.

See Also:
Constant Field Values
Constructor Detail

QualityStats

public QualityStats(double maxGoodPoints,
                    long searchTime)
Construct a QualityStats object with anticipated maximal number of relevant hits.

Parameters:
maxGoodPoints - maximal possible relevant hits.
Method Detail

addResult

public void addResult(int n,
                      boolean isRelevant,
                      long docNameExtractTime)
Add a (possibly relevant) doc.

Parameters:
n - rank of the added doc (its ordinal position within the query results).
isRelevant - true if the added doc is relevant, false otherwise.

getPrecisionAt

public double getPrecisionAt(int n)
Return the precision at rank n: |{relevant hits within first n hits}| / n.

Parameters:
n - requested precision point, must be at least 1 and at most MAX_POINTS.

getAvp

public double getAvp()
Return the average precision at recall points.

getRecall

public double getRecall()
Return the recall: |{relevant hits found}| / |{relevant hits existing}|.

log

public void log(String title,
                int paddLines,
                PrintWriter logger,
                String prefix)
Log information on this QualityStats object.

Parameters:
logger - Logger.
prefix - prefix before each log line.

average

public static QualityStats average(QualityStats[] stats)
Create a QualityStats object that is the average of the input QualityStats objects.

Parameters:
stats - array of input stats to be averaged.
Returns:
an average over the input stats.

getDocNamesExtractTime

public long getDocNamesExtractTime()
Returns the time it took to extract doc names for judging the measured query, in milliseconds.

getMaxGoodPoints

public double getMaxGoodPoints()
Returns the maximal number of good points. This is the number of relevant docs known by the judge for the measured query.

getNumGoodPoints

public double getNumGoodPoints()
Returns the number of good points (only relevant points).

getNumPoints

public double getNumPoints()
Returns the number of points (both relevant and irrelevant points).

getRecallPoints

public QualityStats.RecallPoint[] getRecallPoints()
Returns the recallPoints.

getMRR

public double getMRR()
Returns the Mean reciprocal rank over the queries or RR for a single query.

Reciprocal rank is defined as 1/r where r is the rank of the first correct result, or 0 if there are no correct results within the top 5 results.

This follows the definition in Question Answering - CNLP at the TREC-10 Question Answering Track.

getSearchTime

public long getSearchTime()
Returns the search time in milliseconds for the measured query.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QualityStats.RecallPoint

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.quality
Class QualityStats.RecallPoint

java.lang.Object
    extended by  org.apache.lucene.benchmark.quality.QualityStats.RecallPoint
Enclosing class:
QualityStats
public static class QualityStats.RecallPoint
extends Object

A certain rank in which a relevant doc was found.

Method Summary
int | getRank() Returns the rank: where on the list of returned docs this relevant doc appeared.
double | getRecall() Returns the recall: how many relevant docs were returned up to this point, inclusive.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getRank

public int getRank()
Returns the rank: where on the list of returned docs this relevant doc appeared.

getRecall

public double getRecall()
Returns the recall: how many relevant docs were returned up to this point, inclusive.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Interface org.apache.lucene.benchmark.quality.Judge

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.benchmark.quality.Judge

Packages that use Judge
org.apache.lucene.benchmark.quality | Search Quality Benchmarking.
org.apache.lucene.benchmark.quality.trec | Utilities for Trec related quality benchmarking, feeding from Trec Topics and QRels inputs.

Uses of Judge in org.apache.lucene.benchmark.quality

Methods in org.apache.lucene.benchmark.quality with parameters of type Judge
 QualityStats[] QualityBenchmark.execute(Judge judge, SubmissionReport submitRep, PrintWriter qualityLog)
Run the quality benchmark.

Uses of Judge in org.apache.lucene.benchmark.quality.trec

Classes in org.apache.lucene.benchmark.quality.trec that implement Judge
 class TrecJudge
Judge if given document is relevant to given quality query, based on Trec format for judgements.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.quality.QualityBenchmark

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.quality.QualityBenchmark

No usage of org.apache.lucene.benchmark.quality.QualityBenchmark

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.quality.QualityQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.quality.QualityQuery

Packages that use QualityQuery
org.apache.lucene.benchmark.quality | Search Quality Benchmarking.
org.apache.lucene.benchmark.quality.trec | Utilities for Trec related quality benchmarking, feeding from Trec Topics and QRels inputs.
org.apache.lucene.benchmark.quality.utils | Miscellaneous utilities for search quality benchmarking: query parsing, submission reports.

Uses of QualityQuery in org.apache.lucene.benchmark.quality

Fields in org.apache.lucene.benchmark.quality declared as QualityQuery
protected  QualityQuery[] QualityBenchmark.qualityQueries
Quality Queries that this quality benchmark would execute.

Methods in org.apache.lucene.benchmark.quality with parameters of type QualityQuery
int | QualityQuery.compareTo(QualityQuery other)
boolean | Judge.isRelevant(String docName, QualityQuery query) Judge if document docName is relevant for the given quality query.
int | Judge.maxRecall(QualityQuery query) Return the maximal recall for the input quality query.
Query | QualityQueryParser.parse(QualityQuery qq) Parse a given QualityQuery into a Lucene query.
boolean | Judge.validateData(QualityQuery[] qq, PrintWriter logger) Validate that queries and this Judge match each other.

Constructors in org.apache.lucene.benchmark.quality with parameters of type QualityQuery
QualityBenchmark(QualityQuery[] qqs, QualityQueryParser qqParser, IndexSearcher searcher, String docNameField)
Create a QualityBenchmark.

Uses of QualityQuery in org.apache.lucene.benchmark.quality.trec

Methods in org.apache.lucene.benchmark.quality.trec that return QualityQuery
QualityQuery[] | TrecTopicsReader.readQueries(BufferedReader reader) Read quality queries from trec format topics file.
QualityQuery[] | Trec1MQReader.readQueries(BufferedReader reader) Read quality queries from trec 1MQ format topics file.

Methods in org.apache.lucene.benchmark.quality.trec with parameters of type QualityQuery
boolean | TrecJudge.isRelevant(String docName, QualityQuery query)
int | TrecJudge.maxRecall(QualityQuery query)
boolean | TrecJudge.validateData(QualityQuery[] qq, PrintWriter logger)

Uses of QualityQuery in org.apache.lucene.benchmark.quality.utils

Methods in org.apache.lucene.benchmark.quality.utils with parameters of type QualityQuery
Query | SimpleQQParser.parse(QualityQuery qq)
void | SubmissionReport.report(QualityQuery qq, TopDocs td, String docNameField, IndexSearcher searcher) Report a search result for a certain quality query.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.benchmark.quality.QualityQueryParser

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.benchmark.quality.QualityQueryParser

Packages that use QualityQueryParser
org.apache.lucene.benchmark.quality | Search Quality Benchmarking.
org.apache.lucene.benchmark.quality.utils | Miscellaneous utilities for search quality benchmarking: query parsing, submission reports.

Uses of QualityQueryParser in org.apache.lucene.benchmark.quality

Fields in org.apache.lucene.benchmark.quality declared as QualityQueryParser
protected  QualityQueryParser QualityBenchmark.qqParser
Parser for turning QualityQueries into Lucene Queries.

Constructors in org.apache.lucene.benchmark.quality with parameters of type QualityQueryParser
QualityBenchmark(QualityQuery[] qqs, QualityQueryParser qqParser, IndexSearcher searcher, String docNameField)
Create a QualityBenchmark.

Uses of QualityQueryParser in org.apache.lucene.benchmark.quality.utils

Classes in org.apache.lucene.benchmark.quality.utils that implement QualityQueryParser
 class SimpleQQParser
Simplistic quality query parser.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.quality.QualityStats

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.quality.QualityStats

Packages that use QualityStats
org.apache.lucene.benchmark.quality Search Quality Benchmarking.

Uses of QualityStats in org.apache.lucene.benchmark.quality

Methods in org.apache.lucene.benchmark.quality that return QualityStats
static QualityStats | QualityStats.average(QualityStats[] stats) Create a QualityStats object that is the average of the input QualityStats objects.
QualityStats[] | QualityBenchmark.execute(Judge judge, SubmissionReport submitRep, PrintWriter qualityLog) Run the quality benchmark.

Methods in org.apache.lucene.benchmark.quality with parameters of type QualityStats
static QualityStats QualityStats.average(QualityStats[] stats)
Create a QualityStats object that is the average of the input QualityStats objects.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.quality.QualityStats.RecallPoint

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.quality.QualityStats.RecallPoint

Packages that use QualityStats.RecallPoint
org.apache.lucene.benchmark.quality Search Quality Benchmarking.

Uses of QualityStats.RecallPoint in org.apache.lucene.benchmark.quality

Methods in org.apache.lucene.benchmark.quality that return QualityStats.RecallPoint
 QualityStats.RecallPoint[] QualityStats.getRecallPoints()
Returns the recallPoints.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.benchmark.quality.trec
Classes
QueryDriver
Trec1MQReader
TrecJudge
TrecTopicsReader


org.apache.lucene.benchmark.quality.trec

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.benchmark.quality.trec

Utilities for Trec related quality benchmarking, feeding from Trec Topics and QRels inputs.

See:
Description

Class Summary
QueryDriver | Command-line tool for doing a TREC evaluation run.
Trec1MQReader | Read topics of TREC 1MQ track.
TrecJudge | Judge if given document is relevant to given quality query, based on Trec format for judgements.
TrecTopicsReader | Read TREC topics.

Package org.apache.lucene.benchmark.quality.trec Description

Utilities for Trec related quality benchmarking, feeding from Trec Topics and QRels inputs.


org.apache.lucene.benchmark.quality.trec Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.benchmark.quality.trec

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.benchmark.quality.trec.QueryDriver
    • org.apache.lucene.benchmark.quality.trec.Trec1MQReader
    • org.apache.lucene.benchmark.quality.trec.TrecJudge (implements org.apache.lucene.benchmark.quality.Judge)
    • org.apache.lucene.benchmark.quality.trec.TrecTopicsReader


Uses of Package org.apache.lucene.benchmark.quality.trec

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.benchmark.quality.trec

No usage of org.apache.lucene.benchmark.quality.trec

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


QueryDriver

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.quality.trec
Class QueryDriver

java.lang.Object
    extended by  org.apache.lucene.benchmark.quality.trec.QueryDriver

public class QueryDriver
extends Object

Command-line tool for doing a TREC evaluation run.

Constructor Summary
QueryDriver()
Method Summary
static void main(String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

QueryDriver

public QueryDriver()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Trec1MQReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.quality.trec
Class Trec1MQReader

java.lang.Object
    extended by  org.apache.lucene.benchmark.quality.trec.Trec1MQReader

public class Trec1MQReader
extends Object

Read topics of TREC 1MQ track.

Expects this topic format -

   qnum:qtext
Comment lines starting with '#' are ignored.

All topics will have a single name value pair.

Constructor Summary
Trec1MQReader(String name)
Constructor for Trec's 1MQ TopicsReader
Method Summary
 QualityQuery[] readQueries(BufferedReader reader)
Read quality queries from trec 1MQ format topics file.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Trec1MQReader

public Trec1MQReader(String name)
Constructor for Trec's 1MQ TopicsReader

Parameters:
name - name of name-value pair to set for all queries.
Method Detail

readQueries

public QualityQuery[] readQueries(BufferedReader reader)
                           throws IOException
Read quality queries from trec 1MQ format topics file.

Parameters:
reader - where queries are read from.
Returns:
the result quality queries.
Throws:
IOException - if cannot read the queries.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TrecJudge

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.quality.trec
Class TrecJudge

java.lang.Object
    extended by  org.apache.lucene.benchmark.quality.trec.TrecJudge
All Implemented Interfaces:
Judge
public class TrecJudge
extends Object
implements Judge

Judge if given document is relevant to given quality query, based on Trec format for judgements.

Constructor Summary
TrecJudge(BufferedReader reader)
Constructor from a reader.
Method Summary
boolean | isRelevant(String docName, QualityQuery query) Judge if document docName is relevant for the given quality query.
int | maxRecall(QualityQuery query) Return the maximal recall for the input quality query.
boolean | validateData(QualityQuery[] qq, PrintWriter logger) Validate that queries and this Judge match each other.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TrecJudge

public TrecJudge(BufferedReader reader)
          throws IOException
Constructor from a reader.

Expected input format:

     qnum  0   doc-name     is-relevant
Two sample lines:

     19    0   doc303       1
     19    0   doc7295      0

Parameters:
reader - where judgments are read from.
Throws:
IOException
Method Detail

isRelevant

public boolean isRelevant(String docName,
                          QualityQuery query)
Description copied from interface: Judge
Judge if document docName is relevant for the given quality query.

Specified by:
isRelevant in interface Judge
Parameters:
docName - name of doc tested for relevancy.
query - tested quality query.
Returns:
true if relevant, false if not.

validateData

public boolean validateData(QualityQuery[] qq,
                            PrintWriter logger)
Description copied from interface: Judge
Validate that queries and this Judge match each other. To be perfectly valid, this Judge must have some data for each and every input quality query, and must not have any data on any other quality query. Note: the quality benchmark run would not fail in case of imperfect validity, just a warning message would be logged.

Specified by:
validateData in interface Judge
Parameters:
qq - quality queries to be validated.
logger - if not null, validation issues are logged.
Returns:
true if perfectly valid, false if not.

maxRecall

public int maxRecall(QualityQuery query)
Description copied from interface: Judge
Return the maximal recall for the input quality query. It is the number of relevant docs this Judge "knows" for the query.

Specified by:
maxRecall in interface Judge
Parameters:
query - the query whose maximal recall is needed.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TrecTopicsReader

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.quality.trec
Class TrecTopicsReader

java.lang.Object
    extended by  org.apache.lucene.benchmark.quality.trec.TrecTopicsReader

public class TrecTopicsReader
extends Object

Read TREC topics.

Expects this topic format -

   <top>
   <num> Number: nnn

   <title> title of the topic

   <desc> Description:
   description of the topic

   <narr> Narrative:
   "story" composed by assessors.

   </top>
Comment lines starting with '#' are ignored.

Constructor Summary
TrecTopicsReader()
Constructor for Trec's TopicsReader
Method Summary
 QualityQuery[] readQueries(BufferedReader reader)
Read quality queries from trec format topics file.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TrecTopicsReader

public TrecTopicsReader()
Constructor for Trec's TopicsReader

Method Detail

readQueries

public QualityQuery[] readQueries(BufferedReader reader)
                           throws IOException
Read quality queries from trec format topics file.

Parameters:
reader - where queries are read from.
Returns:
the result quality queries.
Throws:
IOException - if cannot read the queries.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.benchmark.quality.trec.QueryDriver

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.quality.trec.QueryDriver

No usage of org.apache.lucene.benchmark.quality.trec.QueryDriver

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.quality.trec.Trec1MQReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.quality.trec.Trec1MQReader

No usage of org.apache.lucene.benchmark.quality.trec.Trec1MQReader

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.quality.trec.TrecJudge

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.quality.trec.TrecJudge

No usage of org.apache.lucene.benchmark.quality.trec.TrecJudge

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.quality.trec.TrecTopicsReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.quality.trec.TrecTopicsReader

No usage of org.apache.lucene.benchmark.quality.trec.TrecTopicsReader

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


DocNameExtractor

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.quality.utils
Class DocNameExtractor

java.lang.Object
    extended by  org.apache.lucene.benchmark.quality.utils.DocNameExtractor

public class DocNameExtractor
extends Object

Utility: extract doc names from an index

Constructor Summary
DocNameExtractor(String docNameField)
Constructor for DocNameExtractor.
Method Summary
 String docName(IndexSearcher searcher, int docid)
Extract the name of the input doc from the index.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DocNameExtractor

public DocNameExtractor(String docNameField)
Constructor for DocNameExtractor.

Parameters:
docNameField - name of the stored field containing the doc name.
Method Detail

docName

public String docName(IndexSearcher searcher,
                      int docid)
               throws IOException
Extract the name of the input doc from the index.

Parameters:
searcher - access to the index.
docid - ID of doc whose name is needed.
Returns:
the name of the input doc as extracted from the index.
Throws:
IOException - if cannot extract the doc name from the index.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.benchmark.quality.utils
Classes
DocNameExtractor
QualityQueriesFinder
SimpleQQParser
SubmissionReport


org.apache.lucene.benchmark.quality.utils

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.benchmark.quality.utils

Miscellaneous utilities for search quality benchmarking: query parsing, submission reports.

See:
Description

Class Summary
DocNameExtractor | Utility: extract doc names from an index
QualityQueriesFinder | Suggest Quality queries based on an index contents.
SimpleQQParser | Simplistic quality query parser.
SubmissionReport | Create a log ready for submission.

Package org.apache.lucene.benchmark.quality.utils Description

Miscellaneous utilities for search quality benchmarking: query parsing, submission reports.


org.apache.lucene.benchmark.quality.utils Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.benchmark.quality.utils

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.benchmark.quality.utils.DocNameExtractor
    • org.apache.lucene.benchmark.quality.utils.QualityQueriesFinder
    • org.apache.lucene.benchmark.quality.utils.SimpleQQParser (implements org.apache.lucene.benchmark.quality.QualityQueryParser)
    • org.apache.lucene.benchmark.quality.utils.SubmissionReport


Uses of Package org.apache.lucene.benchmark.quality.utils

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.benchmark.quality.utils

Packages that use org.apache.lucene.benchmark.quality.utils
org.apache.lucene.benchmark.quality Search Quality Benchmarking.

Classes in org.apache.lucene.benchmark.quality.utils used by org.apache.lucene.benchmark.quality
SubmissionReport
Create a log ready for submission.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


QualityQueriesFinder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.quality.utils
Class QualityQueriesFinder

java.lang.Object
    extended by  org.apache.lucene.benchmark.quality.utils.QualityQueriesFinder

public class QualityQueriesFinder
extends Object

Suggest Quality queries based on an index contents. Utility class, used for making quality test benchmarks.

Method Summary
static void main(String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

main

public static void main(String[] args)
                 throws IOException
Parameters:
args - {index-dir}
Throws:
IOException - if cannot access the index.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleQQParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.quality.utils
Class SimpleQQParser

java.lang.Object
    extended by  org.apache.lucene.benchmark.quality.utils.SimpleQQParser
All Implemented Interfaces:
QualityQueryParser
public class SimpleQQParser
extends Object
implements QualityQueryParser

Simplistic quality query parser. A Lucene query is created by passing the value of the specified QualityQuery name-value pair(s) into a Lucene's QueryParser using StandardAnalyzer.

Constructor Summary
SimpleQQParser(String[] qqNames, String indexField)
Constructor of a simple qq parser.
SimpleQQParser(String qqName, String indexField)
Constructor of a simple qq parser.
Method Summary
 Query parse(QualityQuery qq)
Parse a given QualityQuery into a Lucene query.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SimpleQQParser

public SimpleQQParser(String[] qqNames,
                      String indexField)
Constructor of a simple qq parser.

Parameters:
qqNames - name-value pairs of quality query to use for creating the query
indexField - corresponding index field

SimpleQQParser

public SimpleQQParser(String qqName,
                      String indexField)
Constructor of a simple qq parser.

Parameters:
qqName - name-value pair of quality query to use for creating the query
indexField - corresponding index field
Method Detail

parse

public Query parse(QualityQuery qq)
            throws ParseException
Description copied from interface: QualityQueryParser
Parse a given QualityQuery into a Lucene query.

Specified by:
parse in interface QualityQueryParser
Parameters:
qq - the quality query to be parsed.
Throws:
ParseException - if parsing failed.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SubmissionReport

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.quality.utils
Class SubmissionReport

java.lang.Object
    extended by  org.apache.lucene.benchmark.quality.utils.SubmissionReport

public class SubmissionReport
extends Object

Create a log ready for submission. Extend this class and override report(QualityQuery, TopDocs, String, IndexSearcher) to create different reports.

Constructor Summary
SubmissionReport(PrintWriter logger, String name)
Constructor for SubmissionReport.
Method Summary
void | flush()
void | report(QualityQuery qq, TopDocs td, String docNameField, IndexSearcher searcher) Report a search result for a certain quality query.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SubmissionReport

public SubmissionReport(PrintWriter logger,
                        String name)
Constructor for SubmissionReport.

Parameters:
logger - if null, no submission data is created.
name - name of this run.
Method Detail

report

public void report(QualityQuery qq,
                   TopDocs td,
                   String docNameField,
                   IndexSearcher searcher)
            throws IOException
Report a search result for a certain quality query.

Parameters:
qq - quality query for which the results are reported.
td - search results for the query.
docNameField - stored field used for fetching the result doc name.
searcher - index access for fetching doc name.
Throws:
IOException - in case of a problem.

flush

public void flush()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.benchmark.quality.utils.DocNameExtractor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.quality.utils.DocNameExtractor

No usage of org.apache.lucene.benchmark.quality.utils.DocNameExtractor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.quality.utils.QualityQueriesFinder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.quality.utils.QualityQueriesFinder

No usage of org.apache.lucene.benchmark.quality.utils.QualityQueriesFinder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.quality.utils.SimpleQQParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.quality.utils.SimpleQQParser

No usage of org.apache.lucene.benchmark.quality.utils.SimpleQQParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.quality.utils.SubmissionReport

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.quality.utils.SubmissionReport

Packages that use SubmissionReport
org.apache.lucene.benchmark.quality Search Quality Benchmarking.

Uses of SubmissionReport in org.apache.lucene.benchmark.quality

Methods in org.apache.lucene.benchmark.quality with parameters of type SubmissionReport
 QualityStats[] QualityBenchmark.execute(Judge judge, SubmissionReport submitRep, PrintWriter qualityLog)
Run the quality benchmark.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ExtractReuters

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.utils
Class ExtractReuters

java.lang.Object
    extended by  org.apache.lucene.benchmark.utils.ExtractReuters

public class ExtractReuters
extends Object

Split the Reuters SGML documents into Simple Text files containing: Title, Date, Dateline, Body

Constructor Summary
ExtractReuters(File reutersDir, File outputDir)
Method Summary
void | extract()
protected void | extractFile(File sgmFile) Override if you wish to change what is extracted
static void | main(String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ExtractReuters

public ExtractReuters(File reutersDir,
                      File outputDir)
Method Detail

extract

public void extract()

extractFile

protected void extractFile(File sgmFile)
Override if you wish to change what is extracted

Parameters:
sgmFile -

main

public static void main(String[] args)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ExtractWikipedia

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.benchmark.utils
Class ExtractWikipedia

java.lang.Object
    extended by  org.apache.lucene.benchmark.utils.ExtractWikipedia

public class ExtractWikipedia
extends Object

Extract the downloaded Wikipedia dump into separate files for indexing.

Field Summary
static int | count
protected DocMaker | docMaker
Constructor Summary
ExtractWikipedia(DocMaker docMaker, File outputDir)
Method Summary
void | create(String id, String title, String time, String body)
File | directory(int count, File directory)
void | extract()
static void | main(String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

count

public static int count

docMaker

protected DocMaker docMaker
Constructor Detail

ExtractWikipedia

public ExtractWikipedia(DocMaker docMaker,
                        File outputDir)
Method Detail

directory

public File directory(int count,
                      File directory)

create

public void create(String id,
                   String title,
                   String time,
                   String body)

extract

public void extract()
             throws Exception
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.benchmark.utils
Classes
ExtractReuters
ExtractWikipedia


org.apache.lucene.benchmark.utils

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.benchmark.utils

Benchmark Utility functions.

See:
Description

Class Summary
ExtractReuters | Split the Reuters SGML documents into Simple Text files containing: Title, Date, Dateline, Body
ExtractWikipedia | Extract the downloaded Wikipedia dump into separate files for indexing.

Package org.apache.lucene.benchmark.utils Description

Benchmark Utility functions.


org.apache.lucene.benchmark.utils Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.benchmark.utils

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.benchmark.utils.ExtractReuters
    • org.apache.lucene.benchmark.utils.ExtractWikipedia


Uses of Package org.apache.lucene.benchmark.utils

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.benchmark.utils

No usage of org.apache.lucene.benchmark.utils

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.utils.ExtractReuters

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.utils.ExtractReuters

No usage of org.apache.lucene.benchmark.utils.ExtractReuters

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.benchmark.utils.ExtractWikipedia

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.benchmark.utils.ExtractWikipedia

No usage of org.apache.lucene.benchmark.utils.ExtractWikipedia

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.LucenePackage

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.LucenePackage

No usage of org.apache.lucene.LucenePackage

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CollationKeyAnalyzer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.collation
Class CollationKeyAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.collation.CollationKeyAnalyzer
All Implemented Interfaces:
Closeable
public final class CollationKeyAnalyzer
extends Analyzer

Filters KeywordTokenizer with CollationKeyFilter.

Converts the token into its CollationKey, and then encodes the CollationKey with IndexableBinaryStringTools, to allow it to be stored as an index term.

WARNING: Make sure you use exactly the same Collator at index and query time -- CollationKeys are only comparable when produced by the same Collator. Since RuleBasedCollators are not independently versioned, it is unsafe to search against stored CollationKeys unless the following are exactly the same (best practice is to store this information with the index and check that they remain the same at query time):

  1. JVM vendor
  2. JVM version, including patch version
  3. The language (and country and variant, if specified) of the Locale used when constructing the collator via Collator.getInstance(java.util.Locale).
  4. The collation strength used - see Collator.setStrength(int)

The ICUCollationKeyAnalyzer in the icu package of Lucene's contrib area uses ICU4J's Collator, which makes its its version available, thus allowing collation to be versioned independently from the JVM. ICUCollationKeyAnalyzer is also significantly faster and generates significantly shorter keys than CollationKeyAnalyzer. See http://site.icu-project.org/charts/collation-icu4j-sun for key generation timing and key length comparisons between ICU4J and java.text.Collator over several languages.

CollationKeys generated by java.text.Collators are not compatible with those those generated by ICU Collators. Specifically, if you use CollationKeyAnalyzer to generate index terms, do not use ICUCollationKeyAnalyzer on the query side, or vice versa.

Constructor Summary
CollationKeyAnalyzer(Collator collator)
Method Summary
TokenStream | reusableTokenStream(String fieldName, Reader reader) Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method.
TokenStream | tokenStream(String fieldName, Reader reader) Creates a TokenStream which tokenizes all the text in the provided Reader.
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CollationKeyAnalyzer

public CollationKeyAnalyzer(Collator collator)
Method Detail

tokenStream

public TokenStream tokenStream(String fieldName,
                               Reader reader)
Description copied from class: Analyzer
Creates a TokenStream which tokenizes all the text in the provided Reader. Must be able to handle null field name for backward compatibility.

Specified by:
tokenStream in class Analyzer

reusableTokenStream

public TokenStream reusableTokenStream(String fieldName,
                                       Reader reader)
                                throws IOException
Description copied from class: Analyzer
Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method. Callers that do not need to use more than one TokenStream at the same time from this analyzer should use this method for better performance.

Overrides:
reusableTokenStream in class Analyzer
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CollationKeyFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.collation
Class CollationKeyFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.collation.CollationKeyFilter
All Implemented Interfaces:
Closeable
public final class CollationKeyFilter
extends TokenFilter

Converts each token into its CollationKey, and then encodes the CollationKey with IndexableBinaryStringTools, to allow it to be stored as an index term.

WARNING: Make sure you use exactly the same Collator at index and query time -- CollationKeys are only comparable when produced by the same Collator. Since RuleBasedCollators are not independently versioned, it is unsafe to search against stored CollationKeys unless the following are exactly the same (best practice is to store this information with the index and check that they remain the same at query time):

  1. JVM vendor
  2. JVM version, including patch version
  3. The language (and country and variant, if specified) of the Locale used when constructing the collator via Collator.getInstance(java.util.Locale).
  4. The collation strength used - see Collator.setStrength(int)

The ICUCollationKeyFilter in the icu package of Lucene's contrib area uses ICU4J's Collator, which makes its version available, thus allowing collation to be versioned independently from the JVM. ICUCollationKeyFilter is also significantly faster and generates significantly shorter keys than CollationKeyFilter. See http://site.icu-project.org/charts/collation-icu4j-sun for key generation timing and key length comparisons between ICU4J and java.text.Collator over several languages.

CollationKeys generated by java.text.Collators are not compatible with those those generated by ICU Collators. Specifically, if you use CollationKeyFilter to generate index terms, do not use ICUCollationKeyFilter on the query side, or vice versa.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
CollationKeyFilter(TokenStream input, Collator collator)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CollationKeyFilter

public CollationKeyFilter(TokenStream input,
                          Collator collator)
Parameters:
input - Source token stream
collator - CollationKey generator
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ICUCollationKeyAnalyzer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.collation
Class ICUCollationKeyAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.collation.ICUCollationKeyAnalyzer
All Implemented Interfaces:
Closeable
public final class ICUCollationKeyAnalyzer
extends Analyzer

Filters KeywordTokenizer with ICUCollationKeyFilter.

Converts the token into its CollationKey, and then encodes the CollationKey with IndexableBinaryStringTools, to allow it to be stored as an index term.

WARNING: Make sure you use exactly the same Collator at index and query time -- CollationKeys are only comparable when produced by the same Collator. RuleBasedCollators are independently versioned, so it is safe to search against stored CollationKeys if the following are exactly the same (best practice is to store this information with the index and check that they remain the same at query time):

  1. Collator version - see Collator.getVersion()
  2. The collation strength used - see Collator.setStrength(int)

CollationKeys generated by ICU Collators are not compatible with those generated by java.text.Collators. Specifically, if you use ICUCollationKeyAnalyzer to generate index terms, do not use CollationKeyAnalyzer on the query side, or vice versa.

ICUCollationKeyAnalyzer is significantly faster and generates significantly shorter keys than CollationKeyAnalyzer. See http://site.icu-project.org/charts/collation-icu4j-sun for key generation timing and key length comparisons between ICU4J and java.text.Collator over several languages.

Constructor Summary
ICUCollationKeyAnalyzer(com.ibm.icu.text.Collator collator)
Method Summary
TokenStream | reusableTokenStream(String fieldName, Reader reader) Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method.
TokenStream | tokenStream(String fieldName, Reader reader) Creates a TokenStream which tokenizes all the text in the provided Reader.
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ICUCollationKeyAnalyzer

public ICUCollationKeyAnalyzer(com.ibm.icu.text.Collator collator)
Method Detail

tokenStream

public TokenStream tokenStream(String fieldName,
                               Reader reader)
Description copied from class: Analyzer
Creates a TokenStream which tokenizes all the text in the provided Reader. Must be able to handle null field name for backward compatibility.

Specified by:
tokenStream in class Analyzer

reusableTokenStream

public TokenStream reusableTokenStream(String fieldName,
                                       Reader reader)
                                throws IOException
Description copied from class: Analyzer
Creates a TokenStream that is allowed to be re-used from the previous time that the same thread called this method. Callers that do not need to use more than one TokenStream at the same time from this analyzer should use this method for better performance.

Overrides:
reusableTokenStream in class Analyzer
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ICUCollationKeyFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.collation
Class ICUCollationKeyFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.collation.ICUCollationKeyFilter
All Implemented Interfaces:
Closeable
public final class ICUCollationKeyFilter
extends TokenFilter

Converts each token into its CollationKey, and then encodes the CollationKey with IndexableBinaryStringTools, to allow it to be stored as an index term.

WARNING: Make sure you use exactly the same Collator at index and query time -- CollationKeys are only comparable when produced by the same Collator. RuleBasedCollators are independently versioned, so it is safe to search against stored CollationKeys if the following are exactly the same (best practice is to store this information with the index and check that they remain the same at query time):

  1. Collator version - see Collator.getVersion()
  2. The collation strength used - see Collator.setStrength(int)

CollationKeys generated by ICU Collators are not compatible with those generated by java.text.Collators. Specifically, if you use ICUCollationKeyFilter to generate index terms, do not use CollationKeyFilter on the query side, or vice versa.

ICUCollationKeyFilter is significantly faster and generates significantly shorter keys than CollationKeyFilter. See http://site.icu-project.org/charts/collation-icu4j-sun for key generation timing and key length comparisons between ICU4J and java.text.Collator over several languages.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
ICUCollationKeyFilter(TokenStream input, com.ibm.icu.text.Collator collator)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ICUCollationKeyFilter

public ICUCollationKeyFilter(TokenStream input,
                             com.ibm.icu.text.Collator collator)
Parameters:
input - Source token stream
collator - CollationKey generator
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.collation
Classes
CollationKeyAnalyzer
CollationKeyFilter
ICUCollationKeyAnalyzer
ICUCollationKeyFilter


org.apache.lucene.collation

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.collation

CollationKeyFilter converts each token into its binary CollationKey using the provided Collator, and then encode the CollationKey as a String using IndexableBinaryStringTools, to allow it to be stored as an index term.

See:
Description

Class Summary
CollationKeyAnalyzer | Filters KeywordTokenizer with CollationKeyFilter.
CollationKeyFilter | Converts each token into its CollationKey, and then encodes the CollationKey with IndexableBinaryStringTools, to allow it to be stored as an index term.
ICUCollationKeyAnalyzer | Filters KeywordTokenizer with ICUCollationKeyFilter.
ICUCollationKeyFilter | Converts each token into its CollationKey, and then encodes the CollationKey with IndexableBinaryStringTools, to allow it to be stored as an index term.

Package org.apache.lucene.collation Description

CollationKeyFilter converts each token into its binary CollationKey using the provided Collator, and then encode the CollationKey as a String using IndexableBinaryStringTools, to allow it to be stored as an index term.

Use Cases

  • Efficient sorting of terms in languages that use non-Unicode character orderings. (Lucene Sort using a Locale can be very slow.)
  • Efficient range queries over fields that contain terms in languages that use non-Unicode character orderings. (Range queries using a Locale can be very slow.)
  • Effective Locale-specific normalization (case differences, diacritics, etc.). (LowerCaseFilter and ASCIIFoldingFilter provide these services in a generic way that doesn't take into account locale-specific needs.)

Example Usages

Farsi Range Queries

  // "fa" Locale is not supported by Sun JDK 1.4 or 1.5
  Collator collator = Collator.getInstance(new Locale("ar"));
  CollationKeyAnalyzer analyzer = new CollationKeyAnalyzer(collator);
  RAMDirectory ramDir = new RAMDirectory();
  IndexWriter writer = new IndexWriter
    (ramDir, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
  Document doc = new Document();
  doc.add(new Field("content", "\u0633\u0627\u0628",
                    Field.Store.YES, Field.Index.ANALYZED));
  writer.addDocument(doc);
  writer.close();
  IndexSearcher is = new IndexSearcher(ramDir, true);

  // The AnalyzingQueryParser in Lucene's contrib allows terms in range queries
  // to be passed through an analyzer - Lucene's standard QueryParser does not
  // allow this.
  AnalyzingQueryParser aqp = new AnalyzingQueryParser("content", analyzer);
  aqp.setLowercaseExpandedTerms(false);

  // Unicode order would include U+0633 in [ U+062F - U+0698 ], but Farsi
  // orders the U+0698 character before the U+0633 character, so the single
  // indexed Term above should NOT be returned by a ConstantScoreRangeQuery
  // with a Farsi Collator (or an Arabic one for the case when Farsi is not
  // supported).
  ScoreDoc[] result
    = is.search(aqp.parse("[ \u062F TO \u0698 ]"), null, 1000).scoreDocs;
  assertEquals("The index Term should not be included.", 0, result.length);

Danish Sorting

  Analyzer analyzer
    = new CollationKeyAnalyzer(Collator.getInstance(new Locale("da", "dk")));
  RAMDirectory indexStore = new RAMDirectory();
  IndexWriter writer = new IndexWriter
    (indexStore, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
  String[] tracer = new String[] { "A", "B", "C", "D", "E" };
  String[] data = new String[] { "HAT", "HUT", "H\u00C5T", "H\u00D8T", "HOT" };
  String[] sortedTracerOrder = new String[] { "A", "E", "B", "D", "C" };
  for (int i = 0 ; i < data.length ; ++i) {
    Document doc = new Document();
    doc.add(new Field("tracer", tracer[i], Field.Store.YES, Field.Index.NO));
    doc.add(new Field("contents", data[i], Field.Store.NO, Field.Index.ANALYZED));
    writer.addDocument(doc);
  }
  writer.close();
  Searcher searcher = new IndexSearcher(indexStore, true);
  Sort sort = new Sort();
  sort.setSort(new SortField("contents", SortField.STRING));
  Query query = new MatchAllDocsQuery();
  ScoreDoc[] result = searcher.search(query, null, 1000, sort).scoreDocs;
  for (int i = 0 ; i < result.length ; ++i) {
    Document doc = searcher.doc(result[i].doc);
    assertEquals(sortedTracerOrder[i], doc.getValues("tracer")[0]);
  }

Turkish Case Normalization

  Collator collator = Collator.getInstance(new Locale("tr", "TR"));
  collator.setStrength(Collator.PRIMARY);
  Analyzer analyzer = new CollationKeyAnalyzer(collator);
  RAMDirectory ramDir = new RAMDirectory();
  IndexWriter writer = new IndexWriter
    (ramDir, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
  Document doc = new Document();
  doc.add(new Field("contents", "DIGY", Field.Store.NO, Field.Index.ANALYZED));
  writer.addDocument(doc);
  writer.close();
  IndexSearcher is = new IndexSearcher(ramDir, true);
  QueryParser parser = new QueryParser("contents", analyzer);
  Query query = parser.parse("d\u0131gy");   // U+0131: dotless i
  ScoreDoc[] result = is.search(query, null, 1000).scoreDocs;
  assertEquals("The index Term should be included.", 1, result.length);

Caveats and Comparisons

WARNING: Make sure you use exactly the same Collator at index and query time -- CollationKeys are only comparable when produced by the same Collator. Since RuleBasedCollators are not independently versioned, it is unsafe to search against stored CollationKeys unless the following are exactly the same (best practice is to store this information with the index and check that they remain the same at query time):

  1. JVM vendor
  2. JVM version, including patch version
  3. The language (and country and variant, if specified) of the Locale used when constructing the collator via Collator.getInstance(java.util.Locale).
  4. The collation strength used - see Collator.setStrength(int)

ICUCollationKeyFilter, available in the icu package in Lucene's contrib area, uses ICU4J's Collator, which makes its version available, thus allowing collation to be versioned independently from the JVM. ICUCollationKeyFilter is also significantly faster and generates significantly shorter keys than CollationKeyFilter. See http://site.icu-project.org/charts/collation-icu4j-sun for key generation timing and key length comparisons between ICU4J and java.text.Collator over several languages.

CollationKeys generated by java.text.Collators are not compatible with those those generated by ICU Collators. Specifically, if you use CollationKeyFilter to generate index terms, do not use ICUCollationKeyFilter on the query side, or vice versa.

      Overview
    Package
      Class
      Use
      Tree
      Deprecated
      Index
      Help


org.apache.lucene.collation Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.collation

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.collation.CollationKeyAnalyzer
      • org.apache.lucene.collation.ICUCollationKeyAnalyzer
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.collation.CollationKeyFilter
          • org.apache.lucene.collation.ICUCollationKeyFilter


Uses of Package org.apache.lucene.collation

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.collation

No usage of org.apache.lucene.collation

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.collation.CollationKeyAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.collation.CollationKeyAnalyzer

No usage of org.apache.lucene.collation.CollationKeyAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.collation.CollationKeyFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.collation.CollationKeyFilter

No usage of org.apache.lucene.collation.CollationKeyFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.collation.ICUCollationKeyAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.collation.ICUCollationKeyAnalyzer

No usage of org.apache.lucene.collation.ICUCollationKeyAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.collation.ICUCollationKeyFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.collation.ICUCollationKeyFilter

No usage of org.apache.lucene.collation.ICUCollationKeyFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


IndexFiles

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.demo
Class IndexFiles

java.lang.Object
    extended by  org.apache.lucene.demo.IndexFiles

public class IndexFiles
extends Object

Index all text files under a directory.

This is a command-line application demonstrating simple Lucene indexing. Run it with no command-line arguments for usage information.

Method Summary
static void main(String[] args)
Index all text files under a directory.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

main

public static void main(String[] args)
Index all text files under a directory.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.demo
Classes
IndexFiles
SearchFiles


org.apache.lucene.demo

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.demo

Demo applications for indexing and searching.

See:
Description

Class Summary
IndexFiles | Index all text files under a directory.
SearchFiles | Simple command-line based search demo.

Package org.apache.lucene.demo Description

Demo applications for indexing and searching.


org.apache.lucene.demo Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.demo

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.demo.IndexFiles
    • org.apache.lucene.demo.SearchFiles


Uses of Package org.apache.lucene.demo

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.demo

No usage of org.apache.lucene.demo

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SearchFiles

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.demo
Class SearchFiles

java.lang.Object
    extended by  org.apache.lucene.demo.SearchFiles

public class SearchFiles
extends Object

Simple command-line based search demo.

Method Summary
static void | doPagingSearch(BufferedReader in, IndexSearcher searcher, Query query, int hitsPerPage, boolean raw, boolean interactive) This demonstrates a typical paging search scenario, where the search engine presents pages of size n to the user.
static void | main(String[] args) Simple command-line based search demo.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

main

public static void main(String[] args)
                 throws Exception
Simple command-line based search demo.

Throws:
Exception

doPagingSearch

public static void doPagingSearch(BufferedReader in,
                                  IndexSearcher searcher,
                                  Query query,
                                  int hitsPerPage,
                                  boolean raw,
                                  boolean interactive)
                           throws IOException
This demonstrates a typical paging search scenario, where the search engine presents pages of size n to the user. The user can then go to the next page if interested in the next hits. When the query is executed for the first time, then only enough results are collected to fill 5 result pages. If the user wants to page beyond this limit, then the query is executed another time and all hits are collected.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.demo.IndexFiles

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.demo.IndexFiles

No usage of org.apache.lucene.demo.IndexFiles

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.demo.SearchFiles

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.demo.SearchFiles

No usage of org.apache.lucene.demo.SearchFiles

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AbstractField

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.document
Class AbstractField

java.lang.Object
    extended by  org.apache.lucene.document.AbstractField
All Implemented Interfaces:
Serializable, Fieldable
Direct Known Subclasses:
Field, NumericField
public abstract class AbstractField
extends Object
implements Fieldable

Base class for Field implementations

See Also:
Serialized Form

Field Summary
protected int | binaryLength
protected int | binaryOffset
protected float | boost
protected Object | fieldsData
protected FieldInfo.IndexOptions | indexOptions
protected boolean | isBinary
protected boolean | isIndexed
protected boolean | isStored
protected boolean | isTokenized
protected boolean | lazy
protected String | name
protected boolean | omitNorms
protected boolean | storeOffsetWithTermVector
protected boolean | storePositionWithTermVector
protected boolean | storeTermVector
protected TokenStream | tokenStream
Constructor Summary
protected | AbstractField()
protected | AbstractField(String name, Field.Store store, Field.Index index, Field.TermVector termVector)
Method Summary
 int getBinaryLength()
Returns length of byte[] segment that is used as value, if Field is not binary returned value is undefined
 int getBinaryOffset()
Returns offset into byte[] segment that is used as value, if Field is not binary returned value is undefined
 byte[] getBinaryValue()
Return the raw byte[] for the binary field.
 byte[] getBinaryValue(byte[] result)
Return the raw byte[] for the binary field.
 float getBoost()
Returns the boost factor for hits for this field.
 FieldInfo.IndexOptions getIndexOptions()
 boolean getOmitNorms()
True if norms are omitted for this indexed field
 boolean getOmitTermFreqAndPositions()
Deprecated. use getIndexOptions() instead.
 boolean isBinary()
True iff the value of the filed is stored as binary
 boolean isIndexed()
True iff the value of the field is to be indexed, so that it may be searched on.
 boolean isLazy()
Indicates whether a Field is Lazy or not.
 boolean isStored()
True iff the value of the field is to be stored in the index for return with search hits.
 boolean isStoreOffsetWithTermVector()
True iff terms are stored as term vector together with their offsets (start and end position in source text).
 boolean isStorePositionWithTermVector()
True iff terms are stored as term vector together with their token positions.
 boolean isTermVectorStored()
True iff the term or terms used to index this field are stored as a term vector, available from IndexReader.getTermFreqVector(int,String).
 boolean isTokenized()
True iff the value of the field should be tokenized as text prior to indexing.
 String name()
Returns the name of the field as an interned string.
 void setBoost(float boost)
Sets the boost factor hits on this field.
 void setIndexOptions(FieldInfo.IndexOptions indexOptions)
Expert: If set, omit term freq, and optionally also positions and payloads from postings for this field.
 void setOmitNorms(boolean omitNorms)
Expert: If set, omit normalization factors associated with this indexed field.
 void setOmitTermFreqAndPositions(boolean omitTermFreqAndPositions)
Deprecated. use setIndexOptions(FieldInfo.IndexOptions) instead.
protected  void setStoreTermVector(Field.TermVector termVector)
 String toString()
Prints a Field for human consumption.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.document.Fieldable
readerValue, stringValue, tokenStreamValue

Field Detail

name

protected String name

storeTermVector

protected boolean storeTermVector

storeOffsetWithTermVector

protected boolean storeOffsetWithTermVector

storePositionWithTermVector

protected boolean storePositionWithTermVector

omitNorms

protected boolean omitNorms

isStored

protected boolean isStored

isIndexed

protected boolean isIndexed

isTokenized

protected boolean isTokenized

isBinary

protected boolean isBinary

lazy

protected boolean lazy

indexOptions

protected FieldInfo.IndexOptions indexOptions

boost

protected float boost

fieldsData

protected Object fieldsData

tokenStream

protected TokenStream tokenStream

binaryLength

protected int binaryLength

binaryOffset

protected int binaryOffset
Constructor Detail

AbstractField

protected AbstractField()

AbstractField

protected AbstractField(String name,
                        Field.Store store,
                        Field.Index index,
                        Field.TermVector termVector)
Method Detail

setBoost

public void setBoost(float boost)
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.

The boost is multiplied by 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 Similarity.computeNorm(String, FieldInvertState) method, the boost value is multiplied by the Similarity.lengthNorm(String, int) and then rounded by Similarity.encodeNormValue(float) before it is stored in the index. One should attempt to ensure that this product does not overflow the range of that encoding.

Specified by:
setBoost in interface Fieldable
See Also:
Document.setBoost(float),
Similarity.computeNorm(String, FieldInvertState),
Similarity.encodeNormValue(float)

getBoost

public float getBoost()
Returns the boost factor for hits for this field.

The default value is 1.0.

Note: this value is not stored directly with the document in the index. Documents returned from IndexReader.document(int) and Searcher.doc(int) may thus not have the same value present as when this field was indexed.

Specified by:
getBoost in interface Fieldable
See Also:
setBoost(float)

name

public String name()
Returns the name of the field as an interned string. For example "date", "title", "body", ...

Specified by:
name in interface Fieldable

setStoreTermVector

protected void setStoreTermVector(Field.TermVector termVector)

isStored

public final boolean isStored()
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.

Specified by:
isStored in interface Fieldable

isIndexed

public final boolean isIndexed()
True iff the value of the field is to be indexed, so that it may be searched on.

Specified by:
isIndexed in interface Fieldable

isTokenized

public final boolean isTokenized()
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.

Specified by:
isTokenized in interface Fieldable

isTermVectorStored

public final boolean isTermVectorStored()
True iff the term or terms used to index this field are stored as a term vector, available from 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 stored attribute instead.

Specified by:
isTermVectorStored in interface Fieldable
See Also:
IndexReader.getTermFreqVector(int, String)

isStoreOffsetWithTermVector

public boolean isStoreOffsetWithTermVector()
True iff terms are stored as term vector together with their offsets (start and end position in source text).

Specified by:
isStoreOffsetWithTermVector in interface Fieldable

isStorePositionWithTermVector

public boolean isStorePositionWithTermVector()
True iff terms are stored as term vector together with their token positions.

Specified by:
isStorePositionWithTermVector in interface Fieldable

isBinary

public final boolean isBinary()
True iff the value of the filed is stored as binary

Specified by:
isBinary in interface Fieldable

getBinaryValue

public byte[] getBinaryValue()
Return the raw byte[] for the binary field. Note that you must also call getBinaryLength() and getBinaryOffset() to know which range of bytes in this returned array belong to the field.

Specified by:
getBinaryValue in interface Fieldable
Returns:
reference to the Field value as byte[].

getBinaryValue

public byte[] getBinaryValue(byte[] result)
Description copied from interface: Fieldable
Return the raw byte[] for the binary field. Note that you must also call Fieldable.getBinaryLength() and Fieldable.getBinaryOffset() to know which range of bytes in this returned array belong to the field.

About reuse: if you pass in the result byte[] and it is used, likely the underlying implementation will hold onto this byte[] and return it in future calls to Fieldable.getBinaryValue(). So if you subsequently re-use the same byte[] elsewhere it will alter this Fieldable's value.

Specified by:
getBinaryValue in interface Fieldable
Parameters:
result - User defined buffer that will be used if possible. If this is null or not large enough, a new buffer is allocated
Returns:
reference to the Field value as byte[].

getBinaryLength

public int getBinaryLength()
Returns length of byte[] segment that is used as value, if Field is not binary returned value is undefined

Specified by:
getBinaryLength in interface Fieldable
Returns:
length of byte[] segment that represents this Field value

getBinaryOffset

public int getBinaryOffset()
Returns offset into byte[] segment that is used as value, if Field is not binary returned value is undefined

Specified by:
getBinaryOffset in interface Fieldable
Returns:
index of the first character in byte[] segment that represents this Field value

getOmitNorms

public boolean getOmitNorms()
True if norms are omitted for this indexed field

Specified by:
getOmitNorms in interface Fieldable

getOmitTermFreqAndPositions

@Deprecated
public boolean getOmitTermFreqAndPositions()
Deprecated. use getIndexOptions() instead.

getIndexOptions

public FieldInfo.IndexOptions getIndexOptions()
Specified by:
getIndexOptions in interface Fieldable
See Also:
setIndexOptions(org.apache.lucene.index.FieldInfo.IndexOptions)

setOmitNorms

public void setOmitNorms(boolean omitNorms)
Expert: If set, omit normalization factors associated with this indexed field. This effectively disables indexing boosts and length normalization for this field.

Specified by:
setOmitNorms in interface Fieldable

setOmitTermFreqAndPositions

@Deprecated
public void setOmitTermFreqAndPositions(boolean omitTermFreqAndPositions)
Deprecated. use setIndexOptions(FieldInfo.IndexOptions) instead.

setIndexOptions

public void setIndexOptions(FieldInfo.IndexOptions indexOptions)
Expert: If set, omit term freq, and optionally also positions and payloads from postings for this field.

NOTE: While this option reduces storage space required in the index, it also means any query requiring positional information, such as PhraseQuery or SpanQuery subclasses will silently fail to find results.

Specified by:
setIndexOptions in interface Fieldable

isLazy

public boolean isLazy()
Description copied from interface: Fieldable
Indicates whether a Field is Lazy or not. The semantics of Lazy loading are such that if a Field is lazily loaded, retrieving it's values via Fieldable.stringValue() or Fieldable.getBinaryValue() is only valid as long as the IndexReader that retrieved the Document is still open.

Specified by:
isLazy in interface Fieldable
Returns:
true if this field can be loaded lazily

toString

public final String toString()
Prints a Field for human consumption.

Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CompressionTools

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.document
Class CompressionTools

java.lang.Object
    extended by  org.apache.lucene.document.CompressionTools

public class CompressionTools
extends Object

Simple utility class providing static methods to compress and decompress binary data for stored fields. This class uses java.util.zip.Deflater and Inflater classes to compress and decompress.

Method Summary
static byte[] | compress(byte[] value) Compresses all bytes in the array, with default BEST_COMPRESSION level
static byte[] | compress(byte[] value, int offset, int length) Compresses the specified byte range, with default BEST_COMPRESSION level
static byte[] | compress(byte[] value, int offset, int length, int compressionLevel) Compresses the specified byte range using the specified compressionLevel (constants are defined in java.util.zip.Deflater).
static byte[] | compressString(String value) Compresses the String value, with default BEST_COMPRESSION level
static byte[] | compressString(String value, int compressionLevel) Compresses the String value using the specified compressionLevel (constants are defined in java.util.zip.Deflater).
static byte[] | decompress(byte[] value) Decompress the byte array previously returned by compress
static String | decompressString(byte[] value) Decompress the byte array previously returned by compressString back into a String
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

compress

public static byte[] compress(byte[] value,
                              int offset,
                              int length,
                              int compressionLevel)
Compresses the specified byte range using the specified compressionLevel (constants are defined in java.util.zip.Deflater).

compress

public static byte[] compress(byte[] value,
                              int offset,
                              int length)
Compresses the specified byte range, with default BEST_COMPRESSION level

compress

public static byte[] compress(byte[] value)
Compresses all bytes in the array, with default BEST_COMPRESSION level

compressString

public static byte[] compressString(String value)
Compresses the String value, with default BEST_COMPRESSION level

compressString

public static byte[] compressString(String value,
                                    int compressionLevel)
Compresses the String value using the specified compressionLevel (constants are defined in java.util.zip.Deflater).

decompress

public static byte[] decompress(byte[] value)
                         throws DataFormatException
Decompress the byte array previously returned by compress

Throws:
DataFormatException

decompressString

public static String decompressString(byte[] value)
                               throws DataFormatException
Decompress the byte array previously returned by compressString back into a String

Throws:
DataFormatException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DateField

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.document
Class DateField

java.lang.Object
    extended by  org.apache.lucene.document.DateField
Deprecated. If you build a new index, use DateTools or NumericField instead. This class is included for use with existing indices and will be removed in a future release (possibly Lucene 4.0).

@Deprecated
public class DateField
extends Object

Provides support for converting dates to strings and vice-versa. The strings are structured so that lexicographic sorting orders by date, which makes them suitable for use as field values and search terms.

Note that this class saves dates with millisecond granularity, which is bad for TermRangeQuery and PrefixQuery, as those queries are expanded to a BooleanQuery with a potentially large number of terms when searching. Thus you might want to use DateTools instead.

Note: dates before 1970 cannot be used, and therefore cannot be indexed when using this class. See DateTools for an alternative without such a limitation.

Another approach is NumericUtils, which provides a sortable binary representation (prefix encoded) of numeric values, which date/time are. For indexing a Date or Calendar, just get the unix timestamp as long using Date.getTime() or Calendar.getTimeInMillis() and index this as a numeric value with NumericField and use NumericRangeQuery to query it.

Method Summary
static String | dateToString(Date date) Deprecated. Converts a Date to a string suitable for indexing.
static String | MAX_DATE_STRING() Deprecated.
static String | MIN_DATE_STRING() Deprecated.
static Date | stringToDate(String s) Deprecated. Converts a string-encoded date into a Date object.
static long | stringToTime(String s) Deprecated. Converts a string-encoded date into a millisecond time.
static String | timeToString(long time) Deprecated. Converts a millisecond time to a string suitable for indexing.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

MIN_DATE_STRING

public static String MIN_DATE_STRING()
Deprecated.

MAX_DATE_STRING

public static String MAX_DATE_STRING()
Deprecated.

dateToString

public static String dateToString(Date date)
Deprecated.
Converts a Date to a string suitable for indexing.

Throws:
RuntimeException - if the date specified in the method argument is before 1970

timeToString

public static String timeToString(long time)
Deprecated.
Converts a millisecond time to a string suitable for indexing.

Throws:
RuntimeException - if the time specified in the method argument is negative, that is, before 1970

stringToTime

public static long stringToTime(String s)
Deprecated.
Converts a string-encoded date into a millisecond time.

stringToDate

public static Date stringToDate(String s)
Deprecated.
Converts a string-encoded date into a Date object.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DateTools

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.document
Class DateTools

java.lang.Object
    extended by  org.apache.lucene.document.DateTools

public class DateTools
extends Object

Provides support for converting dates to strings and vice-versa. The strings are structured so that lexicographic sorting orders them by date, which makes them suitable for use as field values and search terms.

This class also helps you to limit the resolution of your dates. Do not save dates with a finer resolution than you really need, as then RangeQuery and PrefixQuery will require more memory and become slower.

Compared to DateField the strings generated by the methods in this class take slightly more space, unless your selected resolution is set to Resolution.DAY or lower.

Another approach is NumericUtils, which provides a sortable binary representation (prefix encoded) of numeric values, which date/time are. For indexing a Date or Calendar, just get the unix timestamp as long using Date.getTime() or Calendar.getTimeInMillis() and index this as a numeric value with NumericField and use NumericRangeQuery to query it.

Nested Class Summary
static class DateTools.Resolution
Specifies the time granularity.
Method Summary
static String | dateToString(Date date, DateTools.Resolution resolution) Converts a Date to a string suitable for indexing.
static Date | round(Date date, DateTools.Resolution resolution) Limit a date's resolution.
static long | round(long time, DateTools.Resolution resolution) Limit a date's resolution.
static Date | stringToDate(String dateString) Converts a string produced by timeToString or dateToString back to a time, represented as a Date object.
static long | stringToTime(String dateString) Converts a string produced by timeToString or dateToString back to a time, represented as the number of milliseconds since January 1, 1970, 00:00:00 GMT.
static String | timeToString(long time, DateTools.Resolution resolution) Converts a millisecond time to a string suitable for indexing.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

dateToString

public static String dateToString(Date date,
                                  DateTools.Resolution resolution)
Converts a Date to a string suitable for indexing.

Parameters:
date - the date to be converted
resolution - the desired resolution, see round(Date, DateTools.Resolution)
Returns:
a string in format yyyyMMddHHmmssSSS or shorter, depending on resolution; using GMT as timezone

timeToString

public static String timeToString(long time,
                                  DateTools.Resolution resolution)
Converts a millisecond time to a string suitable for indexing.

Parameters:
time - the date expressed as milliseconds since January 1, 1970, 00:00:00 GMT
resolution - the desired resolution, see round(long, DateTools.Resolution)
Returns:
a string in format yyyyMMddHHmmssSSS or shorter, depending on resolution; using GMT as timezone

stringToTime

public static long stringToTime(String dateString)
                         throws ParseException
Converts a string produced by timeToString or dateToString back to a time, represented as the number of milliseconds since January 1, 1970, 00:00:00 GMT.

Parameters:
dateString - the date string to be converted
Returns:
the number of milliseconds since January 1, 1970, 00:00:00 GMT
Throws:
ParseException - if dateString is not in the expected format

stringToDate

public static Date stringToDate(String dateString)
                         throws ParseException
Converts a string produced by timeToString or dateToString back to a time, represented as a Date object.

Parameters:
dateString - the date string to be converted
Returns:
the parsed time as a Date object
Throws:
ParseException - if dateString is not in the expected format

round

public static Date round(Date date,
                         DateTools.Resolution resolution)
Limit a date's resolution. For example, the date 2004-09-21 13:50:11 will be changed to 2004-09-01 00:00:00 when using Resolution.MONTH.

Parameters:
resolution - The desired resolution of the date to be returned
Returns:
the date with all values more precise than resolution set to 0 or 1

round

public static long round(long time,
                         DateTools.Resolution resolution)
Limit a date's resolution. For example, the date 1095767411000 (which represents 2004-09-21 13:50:11) will be changed to 1093989600000 (2004-09-01 00:00:00) when using Resolution.MONTH.

Parameters:
resolution - The desired resolution of the date to be returned
Returns:
the date with all values more precise than resolution set to 0 or 1, expressed as milliseconds since January 1, 1970, 00:00:00 GMT
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DateTools.Resolution

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.document
Enum DateTools.Resolution

java.lang.Object
    extended by  java.lang.Enum<DateTools.Resolution>
        extended by  org.apache.lucene.document.DateTools.Resolution
All Implemented Interfaces:
Serializable, Comparable<DateTools.Resolution>
Enclosing class:
DateTools
public static enum DateTools.Resolution
extends Enum<DateTools.Resolution>

Specifies the time granularity.

Enum Constant Summary
DAY
HOUR
MILLISECOND
MINUTE
MONTH
SECOND
YEAR
Method Summary
String | toString() this method returns the name of the resolution in lowercase (for backwards compatibility)
static DateTools.Resolution | valueOf(String name) Returns the enum constant of this type with the specified name.
static DateTools.Resolution[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

YEAR

public static final DateTools.Resolution YEAR

MONTH

public static final DateTools.Resolution MONTH

DAY

public static final DateTools.Resolution DAY

HOUR

public static final DateTools.Resolution HOUR

MINUTE

public static final DateTools.Resolution MINUTE

SECOND

public static final DateTools.Resolution SECOND

MILLISECOND

public static final DateTools.Resolution MILLISECOND
Method Detail

values

public static final DateTools.Resolution[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(DateTools.Resolution c : DateTools.Resolution.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static DateTools.Resolution valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

toString

public String toString()
this method returns the name of the resolution in lowercase (for backwards compatibility)

Overrides:
toString in class Enum<DateTools.Resolution>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


Document

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.document
Class Document

java.lang.Object
    extended by  org.apache.lucene.document.Document
All Implemented Interfaces:
Serializable
public final class Document
extends Object
implements Serializable

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 stored 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.

Note that fields which are not stored are not available in documents retrieved from the index, e.g. with ScoreDoc.doc, Searcher.doc(int) or IndexReader.document(int).

See Also:
Serialized Form

Constructor Summary
Document()
Constructs a new document with no fields.
Method Summary
void | add(Fieldable field) Adds a field to a document.
String | get(String name) Returns the string value of the field with the given name if any exist in this document, or null.
byte[] | getBinaryValue(String name) Returns an array of bytes for the first (or only) field that has the name specified as the method parameter.
byte[][] | getBinaryValues(String name) Returns an array of byte arrays for of the fields that have the name specified as the method parameter.
float | getBoost() Returns, at indexing time, the boost factor as set by setBoost(float).
Field | getField(String name) Deprecated. use getFieldable(java.lang.String) instead and cast depending on data type.
Fieldable | getFieldable(String name) Returns a field with the given name if any exist in this document, or null.
Fieldable[] | getFieldables(String name) Returns an array of Fieldables with the given name.
List<Fieldable> | getFields() Returns a List of all the fields in a document.
Field[] | getFields(String name) Deprecated. use getFieldable(java.lang.String) instead and cast depending on data type.
String[] | getValues(String name) Returns an array of values of the field specified as the method parameter.
void | removeField(String name) Removes field with the specified name from the document.
void | removeFields(String name) Removes all fields with the given name from the document.
void | setBoost(float boost) Sets a boost factor for hits on any field of this document.
String | toString() Prints the fields of a document for human consumption.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Document

public Document()
Constructs a new document with no fields.

Method Detail

setBoost

public void setBoost(float boost)
Sets a boost factor for hits on any field of this document. This value will be multiplied into the score of all hits on this document.

The default value is 1.0.

Values are multiplied into the value of Fieldable.getBoost() of each field in this document. Thus, this method in effect sets a default boost for the fields of this document.

See Also:
Fieldable.setBoost(float)

getBoost

public float getBoost()
Returns, at indexing time, the boost factor as set by setBoost(float).

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 Similarity.)

See Also:
setBoost(float)

add

public final void add(Fieldable field)

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.

Note that add like the removeField(s) methods only makes sense prior to adding a document to an index. These methods cannot be used to change the content of an existing index! In order to achieve this, a document has to be deleted from an index and a new changed version of that document has to be added.

removeField

public final void removeField(String name)

Removes field with the specified name from the document. If multiple fields exist with this name, this method removes the first field that has been added. If there is no field with the specified name, the document remains unchanged.

Note that the removeField(s) methods like the add method only make sense prior to adding a document to an index. These methods cannot be used to change the content of an existing index! In order to achieve this, a document has to be deleted from an index and a new changed version of that document has to be added.

removeFields

public final void removeFields(String name)

Removes all fields with the given name from the document. If there is no field with the specified name, the document remains unchanged.

Note that the removeField(s) methods like the add method only make sense prior to adding a document to an index. These methods cannot be used to change the content of an existing index! In order to achieve this, a document has to be deleted from an index and a new changed version of that document has to be added.

getField

@Deprecated
public final Field getField(String name)
Deprecated. use getFieldable(java.lang.String) instead and cast depending on data type.

Returns a field with the given name if any exist in this document, or null. If multiple fields exists with this name, this method returns the first value added. Do not use this method with lazy loaded fields or NumericField.

Throws:
ClassCastException - if you try to retrieve a numerical or lazy loaded field.

getFieldable

public Fieldable getFieldable(String name)
Returns a field with the given name if any exist in this document, or null. If multiple fields exists with this name, this method returns the first value added.

get

public final String get(String name)
Returns the string value of the field with the given name if any exist in this document, or null. If multiple fields exist with this name, this method returns the first value added. If only binary fields with this name exist, returns null. For NumericField it returns the string value of the number. If you want the actual NumericField instance back, use getFieldable(java.lang.String).

getFields

public final List<Fieldable> getFields()
Returns a List of all the fields in a document.

Note that fields which are not stored are not available in documents retrieved from the index, e.g. Searcher.doc(int) or IndexReader.document(int).

getFields

@Deprecated
public final Field[] getFields(String name)
Deprecated. use getFieldable(java.lang.String) instead and cast depending on data type.

Returns an array of Fields with the given name. This method returns an empty array when there are no matching fields. It never returns null. Do not use this method with lazy loaded fields or NumericField.

Parameters:
name - the name of the field
Returns:
a Field[] array
Throws:
ClassCastException - if you try to retrieve a numerical or lazy loaded field.

getFieldables

public Fieldable[] getFieldables(String name)
Returns an array of Fieldables with the given name. This method returns an empty array when there are no matching fields. It never returns null.

Parameters:
name - the name of the field
Returns:
a Fieldable[] array

getValues

public final String[] getValues(String name)
Returns an array of values of the field specified as the method parameter. This method returns an empty array when there are no matching fields. It never returns null. For NumericFields it returns the string value of the number. If you want the actual NumericField instances back, use getFieldables(java.lang.String).

Parameters:
name - the name of the field
Returns:
a String[] of field values

getBinaryValues

public final byte[][] getBinaryValues(String name)
Returns an array of byte arrays for of the fields that have the name specified as the method parameter. This method returns an empty array when there are no matching fields. It never returns null.

Parameters:
name - the name of the field
Returns:
a byte[][] of binary field values

getBinaryValue

public final byte[] getBinaryValue(String name)
Returns an array of bytes for the first (or only) field that has the name specified as the method parameter. This method will return null if no binary fields with the specified name are available. There may be non-binary fields with the same name.

Parameters:
name - the name of the field.
Returns:
a byte[] containing the binary field value or null

toString

public final String toString()
Prints the fields of a document for human consumption.

Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Field

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.document
Class Field

java.lang.Object
    extended by  org.apache.lucene.document.AbstractField
        extended by  org.apache.lucene.document.Field
All Implemented Interfaces:
Serializable, Fieldable
public final class Field
extends AbstractField
implements Fieldable, Serializable

A field is a section of a Document. Each field has two parts, a name and a value. Values may be free text, provided as a String or as a Reader, or they may be atomic keywords, which are not further processed. Such keywords may be used to represent dates, urls, etc. Fields are optionally stored in the index, so that they may be returned with hits on the document.

See Also:
Serialized Form

Nested Class Summary
static class | Field.Index Specifies whether and how a field should be indexed.
static class | Field.Store Specifies whether and how a field should be stored.
static class | Field.TermVector Specifies whether and how a field should have term vectors.
Field Summary
Fields inherited from class org.apache.lucene.document.AbstractField
binaryLength, binaryOffset, boost, fieldsData, indexOptions, isBinary, isIndexed, isStored, isTokenized, lazy, name, omitNorms, storeOffsetWithTermVector, storePositionWithTermVector, storeTermVector, tokenStream
Constructor Summary
Field(String name, boolean internName, String value, Field.Store store, Field.Index index, Field.TermVector termVector)
Create a field by specifying its name, value and how it will be saved in the index.
Field(String name, byte[] value)
Create a stored field with binary value.
Field(String name, byte[] value, Field.Store store)
Deprecated. Use instead
Field(String name, byte[] value, int offset, int length)
Create a stored field with binary value.
Field(String name, byte[] value, int offset, int length, Field.Store store)
Deprecated. Use instead
Field(String name, Reader reader)
Create a tokenized and indexed field that is not stored.
Field(String name, Reader reader, Field.TermVector termVector)
Create a tokenized and indexed field that is not stored, optionally with storing term vectors.
Field(String name, String value, Field.Store store, Field.Index index)
Create a field by specifying its name, value and how it will be saved in the index.
Field(String name, String value, Field.Store store, Field.Index index, Field.TermVector termVector)
Create a field by specifying its name, value and how it will be saved in the index.
Field(String name, TokenStream tokenStream)
Create a tokenized and indexed field that is not stored.
Field(String name, TokenStream tokenStream, Field.TermVector termVector)
Create a tokenized and indexed field that is not stored, optionally with storing term vectors.
Method Summary
Reader | readerValue() The value of the field as a Reader, or null.
void | setTokenStream(TokenStream tokenStream) Expert: sets the token stream to be used for indexing and causes isIndexed() and isTokenized() to return true.
void | setValue(byte[] value) Expert: change the value of this field.
void | setValue(byte[] value, int offset, int length) Expert: change the value of this field.
void | setValue(Reader value) Expert: change the value of this field.
void | setValue(String value) Expert: change the value of this field.
String | stringValue() The value of the field as a String, or null.
TokenStream | tokenStreamValue() The TokesStream for this field to be used when indexing, or null.
Methods inherited from class org.apache.lucene.document.AbstractField
getBinaryLength, getBinaryOffset, getBinaryValue, getBinaryValue, getBoost, getIndexOptions, getOmitNorms, getOmitTermFreqAndPositions, isBinary, isIndexed, isLazy, isStored, isStoreOffsetWithTermVector, isStorePositionWithTermVector, isTermVectorStored, isTokenized, name, setBoost, setIndexOptions, setOmitNorms, setOmitTermFreqAndPositions, setStoreTermVector, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.document.Fieldable
getBinaryLength, getBinaryOffset, getBinaryValue, getBinaryValue, getBoost, getIndexOptions, getOmitNorms, isBinary, isIndexed, isLazy, isStored, isStoreOffsetWithTermVector, isStorePositionWithTermVector, isTermVectorStored, isTokenized, name, setBoost, setIndexOptions, setOmitNorms

Constructor Detail

Field

public Field(String name,
             String value,
             Field.Store store,
             Field.Index index)
Create a field by specifying its name, value and how it will be saved in the index. Term vectors will not be stored in the index.

Parameters:
name - The name of the field
value - The string to process
store - Whether value should be stored in the index
index - Whether the field should be indexed, and if so, if it should be tokenized before indexing
Throws:
NullPointerException - if name or value is null
IllegalArgumentException - if the field is neither stored nor indexed

Field

public Field(String name,
             String value,
             Field.Store store,
             Field.Index index,
             Field.TermVector termVector)
Create a field by specifying its name, value and how it will be saved in the index.

Parameters:
name - The name of the field
value - The string to process
store - Whether value should be stored in the index
index - Whether the field should be indexed, and if so, if it should be tokenized before indexing
termVector - Whether term vector should be stored
Throws:
NullPointerException - if name or value is null
IllegalArgumentException - in any of the following situations:
  • the field is neither stored nor indexed
  • the field is not indexed but termVector is TermVector.YES

Field

public Field(String name,
             boolean internName,
             String value,
             Field.Store store,
             Field.Index index,
             Field.TermVector termVector)
Create a field by specifying its name, value and how it will be saved in the index.

Parameters:
name - The name of the field
internName - Whether to .intern() name or not
value - The string to process
store - Whether value should be stored in the index
index - Whether the field should be indexed, and if so, if it should be tokenized before indexing
termVector - Whether term vector should be stored
Throws:
NullPointerException - if name or value is null
IllegalArgumentException - in any of the following situations:
  • the field is neither stored nor indexed
  • the field is not indexed but termVector is TermVector.YES

Field

public Field(String name,
             Reader reader)
Create a tokenized and indexed field that is not stored. Term vectors will not be stored. The Reader is read only when the Document is added to the index, i.e. you may not close the Reader until IndexWriter.addDocument(Document) has been called.

Parameters:
name - The name of the field
reader - The reader with the content
Throws:
NullPointerException - if name or reader is null

Field

public Field(String name,
             Reader reader,
             Field.TermVector termVector)
Create a tokenized and indexed field that is not stored, optionally with storing term vectors. The Reader is read only when the Document is added to the index, i.e. you may not close the Reader until IndexWriter.addDocument(Document) has been called.

Parameters:
name - The name of the field
reader - The reader with the content
termVector - Whether term vector should be stored
Throws:
NullPointerException - if name or reader is null

Field

public Field(String name,
             TokenStream tokenStream)
Create a tokenized and indexed field that is not stored. Term vectors will not be stored. This is useful for pre-analyzed fields. The TokenStream is read only when the Document is added to the index, i.e. you may not close the TokenStream until IndexWriter.addDocument(Document) has been called.

Parameters:
name - The name of the field
tokenStream - The TokenStream with the content
Throws:
NullPointerException - if name or tokenStream is null

Field

public Field(String name,
             TokenStream tokenStream,
             Field.TermVector termVector)
Create a tokenized and indexed field that is not stored, optionally with storing term vectors. This is useful for pre-analyzed fields. The TokenStream is read only when the Document is added to the index, i.e. you may not close the TokenStream until IndexWriter.addDocument(Document) has been called.

Parameters:
name - The name of the field
tokenStream - The TokenStream with the content
termVector - Whether term vector should be stored
Throws:
NullPointerException - if name or tokenStream is null

Field

@Deprecated
public Field(String name,
                        byte[] value,
                        Field.Store store)
Deprecated. Use instead

Create a stored field with binary value. Optionally the value may be compressed.

Parameters:
name - The name of the field
value - The binary value
store - Must be Store.YES
Throws:
IllegalArgumentException - if store is Store.NO

Field

public Field(String name,
             byte[] value)
Create a stored field with binary value. Optionally the value may be compressed.

Parameters:
name - The name of the field
value - The binary value

Field

@Deprecated
public Field(String name,
                        byte[] value,
                        int offset,
                        int length,
                        Field.Store store)
Deprecated. Use instead

Create a stored field with binary value. Optionally the value may be compressed.

Parameters:
name - The name of the field
value - The binary value
offset - Starting offset in value where this Field's bytes are
length - Number of bytes to use for this Field, starting at offset
store - How value should be stored (compressed or not)
Throws:
IllegalArgumentException - if store is Store.NO

Field

public Field(String name,
             byte[] value,
             int offset,
             int length)
Create a stored field with binary value. Optionally the value may be compressed.

Parameters:
name - The name of the field
value - The binary value
offset - Starting offset in value where this Field's bytes are
length - Number of bytes to use for this Field, starting at offset
Method Detail

stringValue

public String stringValue()
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.

Specified by:
stringValue in interface Fieldable

readerValue

public Reader readerValue()
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.

Specified by:
readerValue in interface Fieldable
See Also:
Fieldable.stringValue()

tokenStreamValue

public TokenStream tokenStreamValue()
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.

Specified by:
tokenStreamValue in interface Fieldable
See Also:
Fieldable.stringValue()

setValue

public void setValue(String value)

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 of new'ing and reclaiming Field instances. Typically a single Document instance is re-used as well. This helps most on small documents.

Each Field instance should only be used once within a single Document instance. See ImproveIndexingSpeed for details.

setValue

public void setValue(Reader value)
Expert: change the value of this field. See setValue(String).

setValue

public void setValue(byte[] value)
Expert: change the value of this field. See setValue(String).

setValue

public void setValue(byte[] value,
                     int offset,
                     int length)
Expert: change the value of this field. See setValue(String).

setTokenStream

public void setTokenStream(TokenStream tokenStream)
Expert: sets the token stream to be used for indexing and causes isIndexed() and isTokenized() to return true. May be combined with stored values from stringValue() or getBinaryValue()

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Field.Index

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.document
Enum Field.Index

java.lang.Object
    extended by  java.lang.Enum<Field.Index>
        extended by  org.apache.lucene.document.Field.Index
All Implemented Interfaces:
Serializable, Comparable<Field.Index>
Enclosing class:
Field
public static enum Field.Index
extends Enum<Field.Index>

Specifies whether and how a field should be indexed.

Enum Constant Summary
ANALYZED
Index the tokens produced by running the field's value through an Analyzer.
ANALYZED_NO_NORMS
Expert: Index the tokens produced by running the field's value through an Analyzer, and also separately disable the storing of norms.
NO
Do not index the field value.
NOT_ANALYZED
Index the field's value without using an Analyzer, so it can be searched.
NOT_ANALYZED_NO_NORMS
Expert: Index the field's value without an Analyzer, and also disable the indexing of norms.
Method Summary
abstract boolean | isAnalyzed()
abstract boolean | isIndexed()
abstract boolean | omitNorms()
static Field.Index | toIndex(boolean indexed, boolean analyzed) Get the best representation of the index given the flags.
static Field.Index | toIndex(boolean indexed, boolean analyzed, boolean omitNorms) Expert: Get the best representation of the index given the flags.
static Field.Index | valueOf(String name) Returns the enum constant of this type with the specified name.
static Field.Index[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

NO

public static final Field.Index NO
Do not index the field value. This field can thus not be searched, but one can still access its contents provided it is stored.

ANALYZED

public static final Field.Index ANALYZED
Index the tokens produced by running the field's value through an Analyzer. This is useful for common text.

NOT_ANALYZED

public static final Field.Index NOT_ANALYZED
Index the field's value without using an Analyzer, so it can be searched. As no analyzer is used the value will be stored as a single term. This is useful for unique Ids like product numbers.

NOT_ANALYZED_NO_NORMS

public static final Field.Index NOT_ANALYZED_NO_NORMS
Expert: Index the field's value without an Analyzer, and also disable the indexing of norms. Note that you can also separately enable/disable norms by calling AbstractField.setOmitNorms(boolean). No norms means that index-time field and document boosting and field length normalization are disabled. The benefit is less memory usage as norms take up one byte of RAM per indexed field for every document in the index, during searching. Note that once you index a given field with norms enabled, disabling norms will have no effect. In other words, for this to have the above described effect on a field, all instances of that field must be indexed with NOT_ANALYZED_NO_NORMS from the beginning.

ANALYZED_NO_NORMS

public static final Field.Index ANALYZED_NO_NORMS
Expert: Index the tokens produced by running the field's value through an Analyzer, and also separately disable the storing of norms. See NOT_ANALYZED_NO_NORMS for what norms are and why you may want to disable them.

Method Detail

values

public static final Field.Index[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Field.Index c : Field.Index.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static Field.Index valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

toIndex

public static Field.Index toIndex(boolean indexed,
                                  boolean analyzed)
Get the best representation of the index given the flags.

toIndex

public static Field.Index toIndex(boolean indexed,
                                  boolean analyzed,
                                  boolean omitNorms)
Expert: Get the best representation of the index given the flags.

isIndexed

public abstract boolean isIndexed()

isAnalyzed

public abstract boolean isAnalyzed()

omitNorms

public abstract boolean omitNorms()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


Field.Store

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.document
Enum Field.Store

java.lang.Object
    extended by  java.lang.Enum<Field.Store>
        extended by  org.apache.lucene.document.Field.Store
All Implemented Interfaces:
Serializable, Comparable<Field.Store>
Enclosing class:
Field
public static enum Field.Store
extends Enum<Field.Store>

Specifies whether and how a field should be stored.

Enum Constant Summary
NO
Do not store the field value in the index.
YES
Store the original field value in the index.
Method Summary
abstract boolean | isStored()
static Field.Store | valueOf(String name) Returns the enum constant of this type with the specified name.
static Field.Store[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

YES

public static final Field.Store YES
Store the original field value in the index. This is useful for short texts like a document's title which should be displayed with the results. The value is stored in its original form, i.e. no analyzer is used before it is stored.

NO

public static final Field.Store NO
Do not store the field value in the index.

Method Detail

values

public static final Field.Store[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Field.Store c : Field.Store.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static Field.Store valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

isStored

public abstract boolean isStored()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


Field.TermVector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.document
Enum Field.TermVector

java.lang.Object
    extended by  java.lang.Enum<Field.TermVector>
        extended by  org.apache.lucene.document.Field.TermVector
All Implemented Interfaces:
Serializable, Comparable<Field.TermVector>
Enclosing class:
Field
public static enum Field.TermVector
extends Enum<Field.TermVector>

Specifies whether and how a field should have term vectors.

Enum Constant Summary
NO
Do not store term vectors.
WITH_OFFSETS
Store the term vector + Token offset information
WITH_POSITIONS
Store the term vector + token position information
WITH_POSITIONS_OFFSETS
Store the term vector + Token position and offset information
YES
Store the term vectors of each document.
Method Summary
abstract boolean | isStored()
static Field.TermVector | toTermVector(boolean stored, boolean withOffsets, boolean withPositions) Get the best representation of a TermVector given the flags.
static Field.TermVector | valueOf(String name) Returns the enum constant of this type with the specified name.
static Field.TermVector[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
abstract boolean | withOffsets()
abstract boolean | withPositions()
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

NO

public static final Field.TermVector NO
Do not store term vectors.

YES

public static final Field.TermVector YES
Store the term vectors of each document. A term vector is a list of the document's terms and their number of occurrences in that document.

WITH_POSITIONS

public static final Field.TermVector WITH_POSITIONS
Store the term vector + token position information

See Also:
YES

WITH_OFFSETS

public static final Field.TermVector WITH_OFFSETS
Store the term vector + Token offset information

See Also:
YES

WITH_POSITIONS_OFFSETS

public static final Field.TermVector WITH_POSITIONS_OFFSETS
Store the term vector + Token position and offset information

See Also:
YES, WITH_POSITIONS, WITH_OFFSETS
Method Detail

values

public static final Field.TermVector[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Field.TermVector c : Field.TermVector.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static Field.TermVector valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

toTermVector

public static Field.TermVector toTermVector(boolean stored,
                                            boolean withOffsets,
                                            boolean withPositions)
Get the best representation of a TermVector given the flags.

isStored

public abstract boolean isStored()

withPositions

public abstract boolean withPositions()

withOffsets

public abstract boolean withOffsets()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


Fieldable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.document
Interface Fieldable

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractField, Field, NumericField
public interface Fieldable
extends Serializable

Synonymous with Field.

WARNING: This interface may change within minor versions, despite Lucene's backward compatibility requirements. This means new methods may be added from version to version. This change only affects the Fieldable API; other backwards compatibility promises remain intact. For example, Lucene can still read and write indices created within the same major version.

Method Summary
 int getBinaryLength()
Returns length of byte[] segment that is used as value, if Field is not binary returned value is undefined
 int getBinaryOffset()
Returns offset into byte[] segment that is used as value, if Field is not binary returned value is undefined
 byte[] getBinaryValue()
Return the raw byte[] for the binary field.
 byte[] getBinaryValue(byte[] result)
Return the raw byte[] for the binary field.
 float getBoost()
Returns the boost factor for hits for this field.
 FieldInfo.IndexOptions getIndexOptions()
 boolean getOmitNorms()
True if norms are omitted for this indexed field
 boolean isBinary()
True if the value of the field is stored as binary
 boolean isIndexed()
True if the value of the field is to be indexed, so that it may be searched on.
 boolean isLazy()
Indicates whether a Field is Lazy or not.
 boolean isStored()
True if the value of the field is to be stored in the index for return with search hits.
 boolean isStoreOffsetWithTermVector()
True if terms are stored as term vector together with their offsets (start and end positon in source text).
 boolean isStorePositionWithTermVector()
True if terms are stored as term vector together with their token positions.
 boolean isTermVectorStored()
True if the term or terms used to index this field are stored as a term vector, available from IndexReader.getTermFreqVector(int,String).
 boolean isTokenized()
True if the value of the field should be tokenized as text prior to indexing.
 String name()
Returns the name of the field as an interned string.
 Reader readerValue()
The value of the field as a Reader, which can be used at index time to generate indexed tokens.
 void setBoost(float boost)
Sets the boost factor hits on this field.
 void setIndexOptions(FieldInfo.IndexOptions indexOptions)
Expert: If set, omit term freq, and optionally positions and payloads from postings for this field.
 void setOmitNorms(boolean omitNorms)
Expert: If set, omit normalization factors associated with this indexed field.
 String stringValue()
The value of the field as a String, or null.
 TokenStream tokenStreamValue()
The TokenStream for this field to be used when indexing, or null.

Method Detail

setBoost

void setBoost(float boost)
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.

The boost is multiplied by 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 Similarity.computeNorm(String, FieldInvertState) method, the boost value is multiplied by the Similarity.lengthNorm(String, int) and then rounded by Similarity.encodeNormValue(float) before it is stored in the index. One should attempt to ensure that this product does not overflow the range of that encoding.

See Also:
Document.setBoost(float),
Similarity.computeNorm(String, FieldInvertState),
Similarity.encodeNormValue(float)

getBoost

float getBoost()
Returns the boost factor for hits for this field.

The default value is 1.0.

Note: this value is not stored directly with the document in the index. Documents returned from IndexReader.document(int) and Searcher.doc(int) may thus not have the same value present as when this field was indexed.

See Also:
setBoost(float)

name

String name()
Returns the name of the field as an interned string. For example "date", "title", "body", ...

stringValue

String stringValue()
The value of the field as a String, or null.

For indexing, if isStored()==true, the stringValue() will be used as the stored field value unless isBinary()==true, in which case getBinaryValue() will be used. If isIndexed()==true and isTokenized()==false, this String value will be indexed as a single token. If isIndexed()==true and isTokenized()==true, then tokenStreamValue() will be used to generate indexed tokens if not null, else readerValue() will be used to generate indexed tokens if not null, else stringValue() will be used to generate tokens.

readerValue

Reader readerValue()
The value of the field as a Reader, which can be used at index time to generate indexed tokens.

See Also:
stringValue()

tokenStreamValue

TokenStream tokenStreamValue()
The TokenStream for this field to be used when indexing, or null.

See Also:
stringValue()

isStored

boolean isStored()
True if the value of the field is to be stored in the index for return with search hits.

isIndexed

boolean isIndexed()
True if the value of the field is to be indexed, so that it may be searched on.

isTokenized

boolean isTokenized()
True if 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.

isTermVectorStored

boolean isTermVectorStored()
True if the term or terms used to index this field are stored as a term vector, available from 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 stored attribute instead.

See Also:
IndexReader.getTermFreqVector(int, String)

isStoreOffsetWithTermVector

boolean isStoreOffsetWithTermVector()
True if terms are stored as term vector together with their offsets (start and end positon in source text).

isStorePositionWithTermVector

boolean isStorePositionWithTermVector()
True if terms are stored as term vector together with their token positions.

isBinary

boolean isBinary()
True if the value of the field is stored as binary

getOmitNorms

boolean getOmitNorms()
True if norms are omitted for this indexed field

setOmitNorms

void setOmitNorms(boolean omitNorms)
Expert: If set, omit normalization factors associated with this indexed field. This effectively disables indexing boosts and length normalization for this field.

isLazy

boolean isLazy()
Indicates whether a Field is Lazy or not. The semantics of Lazy loading are such that if a Field is lazily loaded, retrieving it's values via stringValue() or getBinaryValue() is only valid as long as the IndexReader that retrieved the Document is still open.

Returns:
true if this field can be loaded lazily

getBinaryOffset

int getBinaryOffset()
Returns offset into byte[] segment that is used as value, if Field is not binary returned value is undefined

Returns:
index of the first character in byte[] segment that represents this Field value

getBinaryLength

int getBinaryLength()
Returns length of byte[] segment that is used as value, if Field is not binary returned value is undefined

Returns:
length of byte[] segment that represents this Field value

getBinaryValue

byte[] getBinaryValue()
Return the raw byte[] for the binary field. Note that you must also call getBinaryLength() and getBinaryOffset() to know which range of bytes in this returned array belong to the field.

Returns:
reference to the Field value as byte[].

getBinaryValue

byte[] getBinaryValue(byte[] result)
Return the raw byte[] for the binary field. Note that you must also call getBinaryLength() and getBinaryOffset() to know which range of bytes in this returned array belong to the field.

About reuse: if you pass in the result byte[] and it is used, likely the underlying implementation will hold onto this byte[] and return it in future calls to getBinaryValue(). So if you subsequently re-use the same byte[] elsewhere it will alter this Fieldable's value.

Parameters:
result - User defined buffer that will be used if possible. If this is null or not large enough, a new buffer is allocated
Returns:
reference to the Field value as byte[].

getIndexOptions

FieldInfo.IndexOptions getIndexOptions()
See Also:
setIndexOptions(org.apache.lucene.index.FieldInfo.IndexOptions)

setIndexOptions

void setIndexOptions(FieldInfo.IndexOptions indexOptions)
Expert: If set, omit term freq, and optionally positions and payloads from postings for this field.

NOTE: While this option reduces storage space required in the index, it also means any query requiring positional information, such as PhraseQuery or SpanQuery subclasses will silently fail to find results.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldSelector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.document
Interface FieldSelector

All Superinterfaces:
Serializable
All Known Implementing Classes:
LoadFirstFieldSelector, MapFieldSelector, SetBasedFieldSelector
public interface FieldSelector
extends Serializable

Similar to a FileFilter, the FieldSelector allows one to make decisions about what Fields get loaded on a Document by IndexReader.document(int,org.apache.lucene.document.FieldSelector)

Method Summary
 FieldSelectorResult accept(String fieldName)

Method Detail

accept

FieldSelectorResult accept(String fieldName)
Parameters:
fieldName - the field to accept or reject
Returns:
an instance of FieldSelectorResult if the Field named fieldName should be loaded.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldSelectorResult

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.document
Enum FieldSelectorResult

java.lang.Object
    extended by  java.lang.Enum<FieldSelectorResult>
        extended by  org.apache.lucene.document.FieldSelectorResult
All Implemented Interfaces:
Serializable, Comparable<FieldSelectorResult>
public enum FieldSelectorResult
extends Enum<FieldSelectorResult>

Provides information about what should be done with this Field

Enum Constant Summary
LATENT
Lazily load this Field, but do not cache the result.
LAZY_LOAD
Lazily load this Field.
LOAD
Load this Field every time the Document is loaded, reading in the data as it is encountered.
LOAD_AND_BREAK
Load this field as in the LOAD case, but immediately return from Field loading for the Document.
NO_LOAD
Do not load the Field.
SIZE
Expert: Load the size of this Field rather than its value.
SIZE_AND_BREAK
Expert: Like SIZE but immediately break from the field loading loop, i.e., stop loading further fields, after the size is loaded
Method Summary
static FieldSelectorResult | valueOf(String name) Returns the enum constant of this type with the specified name.
static FieldSelectorResult[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

LOAD

public static final FieldSelectorResult LOAD
Load this Field every time the Document is loaded, reading in the data as it is encountered. Document.getField(String) and Document.getFieldable(String) should not return null.

Document.add(Fieldable) should be called by the Reader.

LAZY_LOAD

public static final FieldSelectorResult LAZY_LOAD
Lazily load this Field. This means the Field is valid, but it may not actually contain its data until invoked. Document.getField(String) SHOULD NOT BE USED. Document.getFieldable(String) is safe to use and should return a valid instance of a Fieldable.

Document.add(Fieldable) should be called by the Reader.

NO_LOAD

public static final FieldSelectorResult NO_LOAD
Do not load the Field. Document.getField(String) and Document.getFieldable(String) should return null. Document.add(Fieldable) is not called.

Document.add(Fieldable) should not be called by the Reader.

LOAD_AND_BREAK

public static final FieldSelectorResult LOAD_AND_BREAK
Load this field as in the LOAD case, but immediately return from Field loading for the Document. Thus, the Document may not have its complete set of Fields. Document.getField(String) and Document.getFieldable(String) should both be valid for this Field

Document.add(Fieldable) should be called by the Reader.

SIZE

public static final FieldSelectorResult SIZE
Expert: Load the size of this Field rather than its value. Size is measured as number of bytes required to store the field == bytes for a binary or any compressed value, and 2*chars for a String value. The size is stored as a binary value, represented as an int in a byte[], with the higher order byte first in [0]

SIZE_AND_BREAK

public static final FieldSelectorResult SIZE_AND_BREAK
Expert: Like SIZE but immediately break from the field loading loop, i.e., stop loading further fields, after the size is loaded

LATENT

public static final FieldSelectorResult LATENT
Lazily load this Field, but do not cache the result. This means the Field is valid, but it may not actually contain its data until invoked. Document.getField(String) SHOULD NOT BE USED. Document.getFieldable(String) is safe to use and should return a valid instance of a Fieldable.

Document.add(Fieldable) should be called by the Reader.

Method Detail

values

public static final FieldSelectorResult[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(FieldSelectorResult c : FieldSelectorResult.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static FieldSelectorResult valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


LoadFirstFieldSelector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.document
Class LoadFirstFieldSelector

java.lang.Object
    extended by  org.apache.lucene.document.LoadFirstFieldSelector
All Implemented Interfaces:
Serializable, FieldSelector
public class LoadFirstFieldSelector
extends Object
implements FieldSelector

Load the First field and break.

See FieldSelectorResult.LOAD_AND_BREAK

See Also:
Serialized Form

Constructor Summary
LoadFirstFieldSelector()
Method Summary
 FieldSelectorResult accept(String fieldName)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LoadFirstFieldSelector

public LoadFirstFieldSelector()
Method Detail

accept

public FieldSelectorResult accept(String fieldName)
Specified by:
accept in interface FieldSelector
Parameters:
fieldName - the field to accept or reject
Returns:
an instance of FieldSelectorResult if the Field named fieldName should be loaded.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MapFieldSelector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.document
Class MapFieldSelector

java.lang.Object
    extended by  org.apache.lucene.document.MapFieldSelector
All Implemented Interfaces:
Serializable, FieldSelector
public class MapFieldSelector
extends Object
implements FieldSelector

A FieldSelector based on a Map of field names to FieldSelectorResults

See Also:
Serialized Form

Constructor Summary
MapFieldSelector(List<String> fields)
Create a a MapFieldSelector
MapFieldSelector(Map<String,FieldSelectorResult> fieldSelections)
Create a a MapFieldSelector
MapFieldSelector(String... fields)
Create a a MapFieldSelector
Method Summary
 FieldSelectorResult accept(String field)
Load field according to its associated value in fieldSelections
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MapFieldSelector

public MapFieldSelector(Map<String,FieldSelectorResult> fieldSelections)
Create a a MapFieldSelector

Parameters:
fieldSelections - maps from field names (String) to FieldSelectorResults

MapFieldSelector

public MapFieldSelector(List<String> fields)
Create a a MapFieldSelector

Parameters:
fields - fields to LOAD. List of Strings. All other fields are NO_LOAD.

MapFieldSelector

public MapFieldSelector(String... fields)
Create a a MapFieldSelector

Parameters:
fields - fields to LOAD. All other fields are NO_LOAD.
Method Detail

accept

public FieldSelectorResult accept(String field)
Load field according to its associated value in fieldSelections

Specified by:
accept in interface FieldSelector
Parameters:
field - a field name
Returns:
the fieldSelections value that field maps to or NO_LOAD if none.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumberTools

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.document
Class NumberTools

java.lang.Object
    extended by  org.apache.lucene.document.NumberTools
Deprecated. For new indexes use NumericUtils instead, which provides a sortable binary representation (prefix encoded) of numeric values. To index and efficiently query numeric values use NumericField and NumericRangeQuery. This class is included for use with existing indices and will be removed in a future release (possibly Lucene 4.0).

@Deprecated
public class NumberTools
extends Object

Provides support for converting longs to Strings, and back again. The strings are structured so that lexicographic sorting order is preserved.

That is, if l1 is less than l2 for any two longs l1 and l2, then NumberTools.longToString(l1) is lexicographically less than NumberTools.longToString(l2). (Similarly for "greater than" and "equals".)

This class handles all long values (unlike DateField).

Field Summary
static String | MAX_STRING_VALUE Deprecated. Equivalent to longToString(Long.MAX_VALUE)
static String | MIN_STRING_VALUE Deprecated. Equivalent to longToString(Long.MIN_VALUE)
static int | STR_SIZE Deprecated. The length of (all) strings returned by longToString(long)
Constructor Summary
NumberTools()
Deprecated.
Method Summary
static String | longToString(long l) Deprecated. Converts a long to a String suitable for indexing.
static long | stringToLong(String str) Deprecated. Converts a String that was returned by longToString(long) back to a long.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

MIN_STRING_VALUE

public static final String MIN_STRING_VALUE
Deprecated.
Equivalent to longToString(Long.MIN_VALUE)

See Also:
Constant Field Values

MAX_STRING_VALUE

public static final String MAX_STRING_VALUE
Deprecated.
Equivalent to longToString(Long.MAX_VALUE)

See Also:
Constant Field Values

STR_SIZE

public static final int STR_SIZE
Deprecated.
The length of (all) strings returned by longToString(long)

Constructor Detail

NumberTools

public NumberTools()
Deprecated.
Method Detail

longToString

public static String longToString(long l)
Deprecated.
Converts a long to a String suitable for indexing.

stringToLong

public static long stringToLong(String str)
Deprecated.
Converts a String that was returned by longToString(long) back to a long.

Throws:
IllegalArgumentException - if the input is null
NumberFormatException - if the input does not parse (it was not a String returned by longToString()).
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericField.DataType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.document
Enum NumericField.DataType

java.lang.Object
    extended by  java.lang.Enum<NumericField.DataType>
        extended by  org.apache.lucene.document.NumericField.DataType
All Implemented Interfaces:
Serializable, Comparable<NumericField.DataType>
Enclosing class:
NumericField
public static enum NumericField.DataType
extends Enum<NumericField.DataType>

Data type of the value in NumericField.

Since:
3.2

Enum Constant Summary
DOUBLE
FLOAT
INT
LONG
Method Summary
static NumericField.DataType | valueOf(String name) Returns the enum constant of this type with the specified name.
static NumericField.DataType[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

INT

public static final NumericField.DataType INT

LONG

public static final NumericField.DataType LONG

FLOAT

public static final NumericField.DataType FLOAT

DOUBLE

public static final NumericField.DataType DOUBLE
Method Detail

values

public static final NumericField.DataType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(NumericField.DataType c : NumericField.DataType.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static NumericField.DataType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


NumericField

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.document
Class NumericField

java.lang.Object
    extended by  org.apache.lucene.document.AbstractField
        extended by  org.apache.lucene.document.NumericField
All Implemented Interfaces:
Serializable, Fieldable
public final class NumericField
extends AbstractField

This class provides a Field that enables indexing of numeric values for efficient range filtering and sorting. Here's an example usage, adding an int value:

  document.add(new NumericField(name).setIntValue(value));
For optimal performance, re-use the NumericField and Document instance for more than one document:
  NumericField field = new NumericField(name);
  Document document = new Document();
  document.add(field);

  for(all documents) {
    ...
    field.setIntValue(value)
    writer.addDocument(document);
    ...
  }

The java native types int, long, float and double are directly supported. However, any value that can be converted into these native types can also be indexed. For example, date/time values represented by a Date can be translated into a long value using the Date.getTime() method. If you don't need millisecond precision, you can quantize the value, either by dividing the result of Date.getTime() or using the separate getters (for year, month, etc.) to construct an int or long value.

To perform range querying or filtering against a NumericField, use NumericRangeQuery or NumericRangeFilter. To sort according to a NumericField, use the normal numeric sort types, eg SortField.INT. NumericField values can also be loaded directly from FieldCache.

By default, a NumericField's value is not stored but is indexed for range filtering and sorting. You can use the NumericField(String,Field.Store,boolean) constructor if you need to change these defaults.

You may add the same field name as a NumericField to the same document more than once. Range querying and filtering will be the logical OR of all values; so a range query will hit all documents that have at least one value in the range. However sort behavior is not defined. If you need to sort, you should separately index a single-valued NumericField.

A NumericField will consume somewhat more disk space in the index than an ordinary single-valued field. However, for a typical index that includes substantial textual content per document, this increase will likely be in the noise.

Within Lucene, each numeric value is indexed as a trie structure, where each term is logically assigned to larger and larger pre-defined brackets (which are simply lower-precision representations of the value). The step size between each successive bracket is called the precisionStep, measured in bits. Smaller precisionStep values result in larger number of brackets, which consumes more disk space in the index but may result in faster range search performance. The default value, 4, was selected for a reasonable tradeoff of disk space consumption versus performance. You can use the expert constructor NumericField(String,int,Field.Store,boolean) if you'd like to change the value. Note that you must also specify a congruent value when creating NumericRangeQuery or NumericRangeFilter. For low cardinality fields larger precision steps are good. If the cardinality is < 100, it is fair to use Integer.MAX_VALUE, which produces one term per value.

For more information on the internals of numeric trie indexing, including the precisionStep configuration, see NumericRangeQuery. The format of indexed values is described in NumericUtils.

If you only need to sort by numeric value, and never run range querying/filtering, you can index using a precisionStep of Integer.MAX_VALUE. This will minimize disk space consumed.

More advanced users can instead use NumericTokenStream directly, when indexing numbers. This class is a wrapper around this token stream type for easier, more intuitive usage.

Since:
2.9
See Also:
Serialized Form

Nested Class Summary
static class NumericField.DataType
Data type of the value in NumericField.
Field Summary
Fields inherited from class org.apache.lucene.document.AbstractField
binaryLength, binaryOffset, boost, fieldsData, indexOptions, isBinary, isIndexed, isStored, isTokenized, lazy, name, omitNorms, storeOffsetWithTermVector, storePositionWithTermVector, storeTermVector, tokenStream
Constructor Summary
NumericField(String name)
Creates a field for numeric values using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
NumericField(String name, Field.Store store, boolean index)
Creates a field for numeric values using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
NumericField(String name, int precisionStep)
Creates a field for numeric values with the specified precisionStep.
NumericField(String name, int precisionStep, Field.Store store, boolean index)
Creates a field for numeric values with the specified precisionStep.
Method Summary
byte[] | getBinaryValue(byte[] result) Returns always null for numeric fields
NumericField.DataType | getDataType() Returns the data type of the current value, null if not yet set.
Number | getNumericValue() Returns the current numeric value as a subclass of Number, null if not yet initialized.
int | getPrecisionStep() Returns the precision step.
Reader | readerValue() Returns always null for numeric fields
NumericField | setDoubleValue(double value) Initializes the field with the supplied double value.
NumericField | setFloatValue(float value) Initializes the field with the supplied float value.
NumericField | setIntValue(int value) Initializes the field with the supplied int value.
NumericField | setLongValue(long value) Initializes the field with the supplied long value.
String | stringValue() Returns the numeric value as a string.
TokenStream | tokenStreamValue() Returns a NumericTokenStream for indexing the numeric value.
Methods inherited from class org.apache.lucene.document.AbstractField
getBinaryLength, getBinaryOffset, getBinaryValue, getBoost, getIndexOptions, getOmitNorms, getOmitTermFreqAndPositions, isBinary, isIndexed, isLazy, isStored, isStoreOffsetWithTermVector, isStorePositionWithTermVector, isTermVectorStored, isTokenized, name, setBoost, setIndexOptions, setOmitNorms, setOmitTermFreqAndPositions, setStoreTermVector, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NumericField

public NumericField(String name)
Creates a field for numeric values using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4). The instance is not yet initialized with a numeric value, before indexing a document containing this field, set a value using the various set???Value() methods. This constructor creates an indexed, but not stored field.

Parameters:
name - the field name

NumericField

public NumericField(String name,
                    Field.Store store,
                    boolean index)
Creates a field for numeric values using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4). The instance is not yet initialized with a numeric value, before indexing a document containing this field, set a value using the various set???Value() methods.

Parameters:
name - the field name
store - if the field should be stored, Document.getFieldable(java.lang.String) then returns NumericField instances on search results.
index - if the field should be indexed using NumericTokenStream

NumericField

public NumericField(String name,
                    int precisionStep)
Creates a field for numeric values with the specified precisionStep. The instance is not yet initialized with a numeric value, before indexing a document containing this field, set a value using the various set???Value() methods. This constructor creates an indexed, but not stored field.

Parameters:
name - the field name
precisionStep - the used precision step

NumericField

public NumericField(String name,
                    int precisionStep,
                    Field.Store store,
                    boolean index)
Creates a field for numeric values with the specified precisionStep. The instance is not yet initialized with a numeric value, before indexing a document containing this field, set a value using the various set???Value() methods.

Parameters:
name - the field name
precisionStep - the used precision step
store - if the field should be stored, Document.getFieldable(java.lang.String) then returns NumericField instances on search results.
index - if the field should be indexed using NumericTokenStream
Method Detail

tokenStreamValue

public TokenStream tokenStreamValue()
Returns a NumericTokenStream for indexing the numeric value.

See Also:
Fieldable.stringValue()

getBinaryValue

public byte[] getBinaryValue(byte[] result)
Returns always null for numeric fields

Specified by:
getBinaryValue in interface Fieldable
Overrides:
getBinaryValue in class AbstractField
Parameters:
result - User defined buffer that will be used if possible. If this is null or not large enough, a new buffer is allocated
Returns:
reference to the Field value as byte[].

readerValue

public Reader readerValue()
Returns always null for numeric fields

See Also:
Fieldable.stringValue()

stringValue

public String stringValue()
Returns the numeric value as a string. This format is also returned if you call Document.get(String) on search results. It is recommended to use Document.getFieldable(java.lang.String) instead that returns NumericField instances. You can then use getNumericValue() to return the stored value.

getNumericValue

public Number getNumericValue()
Returns the current numeric value as a subclass of Number, null if not yet initialized.

getPrecisionStep

public int getPrecisionStep()
Returns the precision step.

getDataType

public NumericField.DataType getDataType()
Returns the data type of the current value, null if not yet set.

Since:
3.2

setLongValue

public NumericField setLongValue(long value)
Initializes the field with the supplied long value.

Parameters:
value - the numeric value
Returns:
this instance, because of this you can use it the following way: document.add(new NumericField(name, precisionStep).setLongValue(value))

setIntValue

public NumericField setIntValue(int value)
Initializes the field with the supplied int value.

Parameters:
value - the numeric value
Returns:
this instance, because of this you can use it the following way: document.add(new NumericField(name, precisionStep).setIntValue(value))

setDoubleValue

public NumericField setDoubleValue(double value)
Initializes the field with the supplied double value.

Parameters:
value - the numeric value
Returns:
this instance, because of this you can use it the following way: document.add(new NumericField(name, precisionStep).setDoubleValue(value))

setFloatValue

public NumericField setFloatValue(float value)
Initializes the field with the supplied float value.

Parameters:
value - the numeric value
Returns:
this instance, because of this you can use it the following way: document.add(new NumericField(name, precisionStep).setFloatValue(value))
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.document
Interfaces
Fieldable
FieldSelector
Classes
AbstractField
CompressionTools
DateField
DateTools
Document
Field
LoadFirstFieldSelector
MapFieldSelector
NumberTools
NumericField
SetBasedFieldSelector
Enums
DateTools.Resolution
Field.Index
Field.Store
Field.TermVector
FieldSelectorResult
NumericField.DataType


org.apache.lucene.document

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.document

The logical representation of a Document for indexing and searching.

See:
Description

Interface Summary
Fieldable | Synonymous with Field.
FieldSelector | Similar to a FileFilter, the FieldSelector allows one to make decisions about what Fields get loaded on a Document by IndexReader.document(int,org.apache.lucene.document.FieldSelector)

Class Summary
AbstractField | Base class for Field implementations
CompressionTools | Simple utility class providing static methods to compress and decompress binary data for stored fields.
DateField | Deprecated. If you build a new index, use DateTools or NumericField instead.
DateTools | Provides support for converting dates to strings and vice-versa.
Document | Documents are the unit of indexing and search.
Field | A field is a section of a Document.
LoadFirstFieldSelector | Load the First field and break.
MapFieldSelector | A FieldSelector based on a Map of field names to FieldSelectorResults
NumberTools | Deprecated. For new indexes use NumericUtils instead, which provides a sortable binary representation (prefix encoded) of numeric values.
NumericField | This class provides a Field that enables indexing of numeric values for efficient range filtering and sorting.
SetBasedFieldSelector | Declare what fields to load normally and what fields to load lazily

Enum Summary
DateTools.Resolution | Specifies the time granularity.
Field.Index | Specifies whether and how a field should be indexed.
Field.Store | Specifies whether and how a field should be stored.
Field.TermVector | Specifies whether and how a field should have term vectors.
FieldSelectorResult | Provides information about what should be done with this Field
NumericField.DataType | Data type of the value in NumericField.

Package org.apache.lucene.document Description

The logical representation of a Document for indexing and searching.

The document package provides the user level logical representation of content to be indexed and searched. The package also provides utilities for working with Documents and Fieldables.

Document and Fieldable

A Document is a collection of Fieldables. A Fieldable is a logical representation of a user's content that needs to be indexed or stored. Fieldables have a number of properties that tell Lucene how to treat the content (like indexed, tokenized, stored, etc.) See the Field implementation of Fieldable for specifics on these properties.

Note: it is common to refer to Documents having Fields, even though technically they have Fieldables.

Working with Documents

First and foremost, a Document is something created by the user application. It is your job to create Documents based on the content of the files you are working with in your application (Word, txt, PDF, Excel or any other format.) How this is done is completely up to you. That being said, there are many tools available in other projects that can make the process of taking a file and converting it into a Lucene Document. To see an example of this, take a look at the Lucene demo and the associated source code for extracting content from HTML.

The DateTools is a utility class to make dates and times searchable (remember, Lucene only searches text). NumericField is a special helper class to simplify indexing of numeric values (and also dates) for fast range range queries with NumericRangeQuery (using a special sortable string representation of numeric values).

The FieldSelector class provides a mechanism to tell Lucene how to load Documents from storage. If no FieldSelector is used, all Fieldables on a Document will be loaded. As an example of the FieldSelector usage, consider the common use case of displaying search results on a web page and then having users click through to see the full document. In this scenario, it is often the case that there are many small fields and one or two large fields (containing the contents of the original file). Before the FieldSelector, the full Document had to be loaded, including the large fields, in order to display the results. Now, using the FieldSelector, one can FieldSelectorResult.LAZY_LOAD the large fields, thus only loading the large fields when a user clicks on the actual link to view the original content.


org.apache.lucene.document Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.document

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.document.AbstractField (implements org.apache.lucene.document.Fieldable)
      • org.apache.lucene.document.Field (implements org.apache.lucene.document.Fieldable, java.io.Serializable)
      • org.apache.lucene.document.NumericField
    • org.apache.lucene.document.CompressionTools
    • org.apache.lucene.document.DateField
    • org.apache.lucene.document.DateTools
    • org.apache.lucene.document.Document (implements java.io.Serializable)
    • org.apache.lucene.document.LoadFirstFieldSelector (implements org.apache.lucene.document.FieldSelector)
    • org.apache.lucene.document.MapFieldSelector (implements org.apache.lucene.document.FieldSelector)
    • org.apache.lucene.document.NumberTools
    • org.apache.lucene.document.SetBasedFieldSelector (implements org.apache.lucene.document.FieldSelector)

Interface Hierarchy

  • java.io.Serializable
    • org.apache.lucene.document.Fieldable
    • org.apache.lucene.document.FieldSelector

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.document.Field.Store
      • org.apache.lucene.document.Field.Index
      • org.apache.lucene.document.Field.TermVector
      • org.apache.lucene.document.FieldSelectorResult
      • org.apache.lucene.document.NumericField.DataType
      • org.apache.lucene.document.DateTools.Resolution


Uses of Package org.apache.lucene.document

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.document

Packages that use org.apache.lucene.document
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.document | The logical representation of a Document for indexing and searching.
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.pruning | Static Index Pruning Tools
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.search.vectorhighlight | This is an another highlighter implementation.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.
org.apache.lucene.util | Some utility classes.

Classes in org.apache.lucene.document used by org.apache.lucene.analysis
Fieldable
Synonymous with Field.

Classes in org.apache.lucene.document used by org.apache.lucene.benchmark.byTask.feeds
Document
Documents are the unit of indexing and search.
Field.Index
Specifies whether and how a field should be indexed.
Field.Store
Specifies whether and how a field should be stored.
Field.TermVector
Specifies whether and how a field should have term vectors.

Classes in org.apache.lucene.document used by org.apache.lucene.benchmark.byTask.tasks
Document
Documents are the unit of indexing and search.
FieldSelector
Similar to a FileFilter, the FieldSelector allows one to make decisions about what Fields get loaded on a Document by IndexReader.document(int,org.apache.lucene.document.FieldSelector)

Classes in org.apache.lucene.document used by org.apache.lucene.document
AbstractField
Base class for Field implementations
DateTools.Resolution
Specifies the time granularity.
Field
A field is a section of a Document.
Field.Index
Specifies whether and how a field should be indexed.
Field.Store
Specifies whether and how a field should be stored.
Field.TermVector
Specifies whether and how a field should have term vectors.
Fieldable
Synonymous with Field.
FieldSelector
Similar to a FileFilter, the FieldSelector allows one to make decisions about what Fields get loaded on a Document by IndexReader.document(int,org.apache.lucene.document.FieldSelector)
FieldSelectorResult
Provides information about what should be done with this Field
NumericField
This class provides a Field that enables indexing of numeric values for efficient range filtering and sorting.
NumericField.DataType
Data type of the value in NumericField.

Classes in org.apache.lucene.document used by org.apache.lucene.facet.index
Document
Documents are the unit of indexing and search.
Field
A field is a section of a Document.

Classes in org.apache.lucene.document used by org.apache.lucene.index
Document
Documents are the unit of indexing and search.
FieldSelector
Similar to a FileFilter, the FieldSelector allows one to make decisions about what Fields get loaded on a Document by IndexReader.document(int,org.apache.lucene.document.FieldSelector)

Classes in org.apache.lucene.document used by org.apache.lucene.index.pruning
Document
Documents are the unit of indexing and search.
FieldSelector
Similar to a FileFilter, the FieldSelector allows one to make decisions about what Fields get loaded on a Document by IndexReader.document(int,org.apache.lucene.document.FieldSelector)

Classes in org.apache.lucene.document used by org.apache.lucene.queryParser
DateTools.Resolution
Specifies the time granularity.

Classes in org.apache.lucene.document used by org.apache.lucene.queryParser.standard
DateTools.Resolution
Specifies the time granularity.

Classes in org.apache.lucene.document used by org.apache.lucene.queryParser.standard.config
DateTools.Resolution
Specifies the time granularity.
NumericField.DataType
Data type of the value in NumericField.

Classes in org.apache.lucene.document used by org.apache.lucene.search
Document
Documents are the unit of indexing and search.
FieldSelector
Similar to a FileFilter, the FieldSelector allows one to make decisions about what Fields get loaded on a Document by IndexReader.document(int,org.apache.lucene.document.FieldSelector)

Classes in org.apache.lucene.document used by org.apache.lucene.search.highlight
Document
Documents are the unit of indexing and search.

Classes in org.apache.lucene.document used by org.apache.lucene.search.vectorhighlight
Field
A field is a section of a Document.

Classes in org.apache.lucene.document used by org.apache.lucene.store.instantiated
Document
Documents are the unit of indexing and search.
FieldSelector
Similar to a FileFilter, the FieldSelector allows one to make decisions about what Fields get loaded on a Document by IndexReader.document(int,org.apache.lucene.document.FieldSelector)

Classes in org.apache.lucene.document used by org.apache.lucene.util
Document
Documents are the unit of indexing and search.
Field
A field is a section of a Document.
Field.Index
Specifies whether and how a field should be indexed.
Field.Store
Specifies whether and how a field should be stored.
Field.TermVector
Specifies whether and how a field should have term vectors.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SetBasedFieldSelector

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.document
Class SetBasedFieldSelector

java.lang.Object
    extended by  org.apache.lucene.document.SetBasedFieldSelector
All Implemented Interfaces:
Serializable, FieldSelector
public class SetBasedFieldSelector
extends Object
implements FieldSelector

Declare what fields to load normally and what fields to load lazily

See Also:
Serialized Form

Constructor Summary
SetBasedFieldSelector(Set<String> fieldsToLoad, Set<String> lazyFieldsToLoad)
Pass in the Set of Field names to load and the Set of Field names to load lazily.
Method Summary
 FieldSelectorResult accept(String fieldName)
Indicate whether to load the field with the given name or not.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SetBasedFieldSelector

public SetBasedFieldSelector(Set<String> fieldsToLoad,
                             Set<String> lazyFieldsToLoad)
Pass in the Set of Field names to load and the Set of Field names to load lazily. If both are null, the Document will not have any Field on it.

Parameters:
fieldsToLoad - A Set of String field names to load. May be empty, but not null
lazyFieldsToLoad - A Set of String field names to load lazily. May be empty, but not null
Method Detail

accept

public FieldSelectorResult accept(String fieldName)
Indicate whether to load the field with the given name or not. If the AbstractField.name() is not in either of the initializing Sets, then FieldSelectorResult.NO_LOAD is returned. If a Field name is in both fieldsToLoad and lazyFieldsToLoad, lazy has precedence.

Specified by:
accept in interface FieldSelector
Parameters:
fieldName - The Field name to check
Returns:
The FieldSelectorResult
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.document.AbstractField

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.AbstractField

Packages that use AbstractField
org.apache.lucene.document The logical representation of a Document for indexing and searching.

Uses of AbstractField in org.apache.lucene.document

Subclasses of AbstractField in org.apache.lucene.document
class | Field A field is a section of a Document.
class | NumericField This class provides a Field that enables indexing of numeric values for efficient range filtering and sorting.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.CompressionTools

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.CompressionTools

No usage of org.apache.lucene.document.CompressionTools

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.DateField

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.DateField

No usage of org.apache.lucene.document.DateField

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.DateTools

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.DateTools

No usage of org.apache.lucene.document.DateTools

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.DateTools.Resolution

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.DateTools.Resolution

Packages that use DateTools.Resolution
org.apache.lucene.document | The logical representation of a Document for indexing and searching.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration

Uses of DateTools.Resolution in org.apache.lucene.document

Methods in org.apache.lucene.document that return DateTools.Resolution
static DateTools.Resolution | DateTools.Resolution.valueOf(String name) Returns the enum constant of this type with the specified name.
static DateTools.Resolution[] | DateTools.Resolution.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.document with parameters of type DateTools.Resolution
static String | DateTools.dateToString(Date date, DateTools.Resolution resolution) Converts a Date to a string suitable for indexing.
static Date | DateTools.round(Date date, DateTools.Resolution resolution) Limit a date's resolution.
static long | DateTools.round(long time, DateTools.Resolution resolution) Limit a date's resolution.
static String | DateTools.timeToString(long time, DateTools.Resolution resolution) Converts a millisecond time to a string suitable for indexing.

Uses of DateTools.Resolution in org.apache.lucene.queryParser

Methods in org.apache.lucene.queryParser that return DateTools.Resolution
 DateTools.Resolution QueryParser.getDateResolution(String fieldName)
Returns the date resolution that is used by RangeQueries for the given field.

Methods in org.apache.lucene.queryParser with parameters of type DateTools.Resolution
void | QueryParserTestBase.assertDateRangeQueryEquals(QueryParser qp, String field, String startDate, String endDate, Date endDateInclusive, DateTools.Resolution resolution)
void | QueryParser.setDateResolution(DateTools.Resolution dateResolution) Sets the default date resolution used by RangeQueries for fields for which no specific date resolutions has been set.
void | QueryParser.setDateResolution(String fieldName, DateTools.Resolution dateResolution) Sets the date resolution used by RangeQueries for a specific field.

Uses of DateTools.Resolution in org.apache.lucene.queryParser.standard

Methods in org.apache.lucene.queryParser.standard that return DateTools.Resolution
DateTools.Resolution | StandardQueryParser.getDateResolution() Returns the default DateTools.Resolution used for certain field when no DateTools.Resolution is defined for this field.
DateTools.Resolution | QueryParserWrapper.getDateResolution(String fieldName) Deprecated.

Methods in org.apache.lucene.queryParser.standard that return types with arguments of type DateTools.Resolution
 Map<CharSequence,DateTools.Resolution> StandardQueryParser.getDateResolutionMap()
Returns the field to DateTools.Resolution map used to normalize each date field.

Methods in org.apache.lucene.queryParser.standard with parameters of type DateTools.Resolution
void | QueryParserWrapper.setDateResolution(DateTools.Resolution dateResolution) Deprecated.
void | StandardQueryParser.setDateResolution(DateTools.Resolution dateResolution) Sets the default DateTools.Resolution used for certain field when no DateTools.Resolution is defined for this field.
void | QueryParserWrapper.setDateResolution(String fieldName, DateTools.Resolution dateResolution) Deprecated.

Method parameters in org.apache.lucene.queryParser.standard with type arguments of type DateTools.Resolution
 void StandardQueryParser.setDateResolution(Map<CharSequence,DateTools.Resolution> dateRes)
Deprecated. this method was renamed to StandardQueryParser.setDateResolutionMap(Map)
 void StandardQueryParser.setDateResolutionMap(Map<CharSequence,DateTools.Resolution> dateRes)
Sets the DateTools.Resolution used for each field

Uses of DateTools.Resolution in org.apache.lucene.queryParser.standard.config

Fields in org.apache.lucene.queryParser.standard.config with type parameters of type DateTools.Resolution
static ConfigurationKey<DateTools.Resolution> | StandardQueryConfigHandler.ConfigurationKeys.DATE_RESOLUTION Key used to set default DateTools.Resolution.
static ConfigurationKey<Map<CharSequence,DateTools.Resolution>> | StandardQueryConfigHandler.ConfigurationKeys.FIELD_DATE_RESOLUTION_MAP Key used to set a field to DateTools.Resolution map that is used to normalize each date field value.

Methods in org.apache.lucene.queryParser.standard.config that return DateTools.Resolution
DateTools.Resolution | DateResolutionAttributeImpl.getDateResolution() Deprecated.
DateTools.Resolution | DateResolutionAttribute.getDateResolution() Deprecated.

Methods in org.apache.lucene.queryParser.standard.config that return types with arguments of type DateTools.Resolution
Map<CharSequence,DateTools.Resolution> | FieldDateResolutionMapAttribute.getFieldDateResolutionMap() Deprecated.
Map<CharSequence,DateTools.Resolution> | FieldDateResolutionMapAttributeImpl.getFieldDateResolutionMap() Deprecated.

Methods in org.apache.lucene.queryParser.standard.config with parameters of type DateTools.Resolution
void | DateResolutionAttributeImpl.setDateResolution(DateTools.Resolution dateResolution) Deprecated.
void | DateResolutionAttribute.setDateResolution(DateTools.Resolution dateResolution) Deprecated. Sets the default date resolution used by RangeQueryNodes for fields for which no specific date resolutions has been set.

Method parameters in org.apache.lucene.queryParser.standard.config with type arguments of type DateTools.Resolution
void | FieldDateResolutionMapAttribute.setFieldDateResolutionMap(Map<CharSequence,DateTools.Resolution> dateRes) Deprecated.
void | FieldDateResolutionMapAttributeImpl.setFieldDateResolutionMap(Map<CharSequence,DateTools.Resolution> dateRes) Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.Document

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.Document

Packages that use Document
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.pruning | Static Index Pruning Tools
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.
org.apache.lucene.util | Some utility classes.

Uses of Document in org.apache.lucene.benchmark.byTask.feeds

Methods in org.apache.lucene.benchmark.byTask.feeds that return Document
 Document DocMaker.makeDocument()
Creates a Document object ready for indexing.
 Document DocMaker.makeDocument(int size)
Same as DocMaker.makeDocument(), only this method creates a document of the given size input by size.

Uses of Document in org.apache.lucene.benchmark.byTask.tasks

Fields in org.apache.lucene.benchmark.byTask.tasks declared as Document
protected  Document AddDocTask.doc
volatile data passed between setup(), doLogic(), tearDown().

Methods in org.apache.lucene.benchmark.byTask.tasks that return Document
protected Document | SearchTravRetLoadFieldSelectorTask.retrieveDoc(IndexReader ir, int id)
protected Document | ReadTask.retrieveDoc(IndexReader ir, int id)

Methods in org.apache.lucene.benchmark.byTask.tasks with parameters of type Document
abstract int | BenchmarkHighlighter.doHighlight(IndexReader reader, int doc, String field, Document document, Analyzer analyzer, String text)
protected Collection<String> | SearchTravRetHighlightTask.getFieldsToHighlight(Document document)
protected Collection<String> | ReadTask.getFieldsToHighlight(Document document) Define the fields to highlight.
protected Collection<String> | SearchTravRetVectorHighlightTask.getFieldsToHighlight(Document document)

Uses of Document in org.apache.lucene.facet.index

Methods in org.apache.lucene.facet.index that return Document
 Document CategoryDocumentBuilder.build(Document doc)
Adds the fields created in one of the "set" methods to the document

Methods in org.apache.lucene.facet.index with parameters of type Document
 Document CategoryDocumentBuilder.build(Document doc)
Adds the fields created in one of the "set" methods to the document

Uses of Document in org.apache.lucene.index

Methods in org.apache.lucene.index that return Document
Document | IndexReader.document(int n) Returns the stored fields of the nth Document in this index.
Document | PruningReader.document(int n, FieldSelector fieldSelector) Applies a StorePruningPolicy to stored fields of a document.
abstract Document | IndexReader.document(int n, FieldSelector fieldSelector) Get the Document at the n th position.
Document | MultiReader.document(int n, FieldSelector fieldSelector)
Document | SegmentReader.document(int n, FieldSelector fieldSelector)
Document | ParallelReader.document(int n, FieldSelector fieldSelector)
Document | FilterIndexReader.document(int n, FieldSelector fieldSelector)

Methods in org.apache.lucene.index with parameters of type Document
 void FieldInfos.add(Document doc)
Adds field info for a Document.
 void RandomIndexWriter.addDocument(Document doc)
Adds a Document.
 void IndexWriter.addDocument(Document doc)
Adds a document to this index.
 void IndexWriter.addDocument(Document doc, Analyzer analyzer)
Adds a document to this index, using the provided analyzer instead of the value of IndexWriter.getAnalyzer().
protected  void ThreadedIndexingAndSearchingTestCase.addDocument(Term id, Document doc)
 void RandomIndexWriter.updateDocument(Term t, Document doc)
Updates a document.
protected  void ThreadedIndexingAndSearchingTestCase.updateDocument(Term term, Document doc)
 void IndexWriter.updateDocument(Term term, Document doc)
Updates a document by first deleting the document(s) containing term and then adding the new document.
 void IndexWriter.updateDocument(Term term, Document doc, Analyzer analyzer)
Updates a document by first deleting the document(s) containing term and then adding the new document.

Method parameters in org.apache.lucene.index with type arguments of type Document
void | RandomIndexWriter.addDocuments(Collection<Document> docs)
void | IndexWriter.addDocuments(Collection<Document> docs) Atomically adds a block of documents with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
void | IndexWriter.addDocuments(Collection<Document> docs, Analyzer analyzer) Atomically adds a block of documents, analyzed using the provided analyzer, with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
protected void | ThreadedIndexingAndSearchingTestCase.addDocuments(Term id, Collection<Document> docs)
void | RandomIndexWriter.updateDocuments(Term delTerm, Collection<Document> docs)
protected void | ThreadedIndexingAndSearchingTestCase.updateDocuments(Term id, Collection<Document> docs)
void | IndexWriter.updateDocuments(Term delTerm, Collection<Document> docs) Atomically deletes documents matching the provided delTerm and adds a block of documents with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
void | IndexWriter.updateDocuments(Term delTerm, Collection<Document> docs, Analyzer analyzer) Atomically deletes documents matching the provided delTerm and adds a block of documents, analyzed using the provided analyzer, with sequentially assigned document IDs, such that an external reader will see all or none of the documents.

Uses of Document in org.apache.lucene.index.pruning

Methods in org.apache.lucene.index.pruning that return Document
 Document StorePruningPolicy.pruneDocument(int doc, FieldSelector parent)
Prune stored fields of a document.

Uses of Document in org.apache.lucene.search

Methods in org.apache.lucene.search that return Document
Document | RemoteSearchable.doc(int i) Deprecated.
Document | IndexSearcher.doc(int docID)
abstract Document | Searcher.doc(int i) Deprecated.
Document | Searchable.doc(int i) Deprecated. Returns the stored fields of document i.
Document | MultiSearcher.doc(int n) Deprecated.
Document | RemoteSearchable.doc(int i, FieldSelector fieldSelector) Deprecated.
Document | IndexSearcher.doc(int docID, FieldSelector fieldSelector)
abstract Document | Searcher.doc(int docid, FieldSelector fieldSelector) Deprecated.
Document | Searchable.doc(int n, FieldSelector fieldSelector) Deprecated. Get the Document at the nth position.
Document | MultiSearcher.doc(int n, FieldSelector fieldSelector) Deprecated.

Methods in org.apache.lucene.search with parameters of type Document
long | NRTManager.TrackingIndexWriter.addDocument(Document d)
long | NRTManager.TrackingIndexWriter.addDocument(Document d, Analyzer a)
long | NRTManager.TrackingIndexWriter.updateDocument(Term t, Document d)
long | NRTManager.TrackingIndexWriter.updateDocument(Term t, Document d, Analyzer a)

Method parameters in org.apache.lucene.search with type arguments of type Document
long | NRTManager.TrackingIndexWriter.addDocuments(Collection<Document> docs)
long | NRTManager.TrackingIndexWriter.addDocuments(Collection<Document> docs, Analyzer a)
long | NRTManager.TrackingIndexWriter.updateDocuments(Term t, Collection<Document> docs)
long | NRTManager.TrackingIndexWriter.updateDocuments(Term t, Collection<Document> docs, Analyzer a)

Uses of Document in org.apache.lucene.search.highlight

Methods in org.apache.lucene.search.highlight with parameters of type Document
static TokenStream | TokenSources.getAnyTokenStream(IndexReader reader, int docId, String field, Document doc, Analyzer analyzer) A convenience method that tries to first get a TermPositionVector for the specified docId, then, falls back to using the passed in Document to retrieve the TokenStream.
static TokenStream | TokenSources.getTokenStream(Document doc, String field, Analyzer analyzer)

Uses of Document in org.apache.lucene.store.instantiated

Methods in org.apache.lucene.store.instantiated that return Document
Document | InstantiatedIndexReader.document(int n, FieldSelector fieldSelector) Deprecated. Return the Document at the nth position.
Document | InstantiatedDocument.getDocument()

Methods in org.apache.lucene.store.instantiated with parameters of type Document
 void InstantiatedIndexWriter.addDocument(Document doc)
Deprecated. Adds a document to this index.
 void InstantiatedIndexWriter.addDocument(Document doc, Analyzer analyzer)
Deprecated. Adds a document to this index, using the provided analyzer instead of the value of InstantiatedIndexWriter.getAnalyzer().
 void InstantiatedIndexWriter.updateDocument(Term term, Document doc)
Deprecated.
 void InstantiatedIndexWriter.updateDocument(Term term, Document doc, Analyzer analyzer)
Deprecated.

Constructors in org.apache.lucene.store.instantiated with parameters of type Document
InstantiatedDocument(Document document)

Uses of Document in org.apache.lucene.util

Methods in org.apache.lucene.util that return Document
static Document | _TestUtil.cloneDocument(Document doc1)
Document | LineFileDocs.nextDoc() Note: Document instance is re-used per-thread

Methods in org.apache.lucene.util with parameters of type Document
static Document _TestUtil.cloneDocument(Document doc1)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.Field

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.Field

Packages that use Field
org.apache.lucene.document | The logical representation of a Document for indexing and searching.
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.search.vectorhighlight | This is an another highlighter implementation.
org.apache.lucene.util | Some utility classes.

Uses of Field in org.apache.lucene.document

Methods in org.apache.lucene.document that return Field
 Field Document.getField(String name)
Deprecated. use Document.getFieldable(java.lang.String) instead and cast depending on data type.
 Field[] Document.getFields(String name)
Deprecated. use Document.getFieldable(java.lang.String) instead and cast depending on data type.

Uses of Field in org.apache.lucene.facet.index

Fields in org.apache.lucene.facet.index with type parameters of type Field
protected  ArrayList<Field> CategoryDocumentBuilder.fieldList
A list of fields which is filled at ancestors' construction and used during CategoryDocumentBuilder.build(Document).

Uses of Field in org.apache.lucene.search.vectorhighlight

Methods in org.apache.lucene.search.vectorhighlight that return Field
protected  Field[] BaseFragmentsBuilder.getFields(IndexReader reader, int docId, String fieldName)

Methods in org.apache.lucene.search.vectorhighlight with parameters of type Field
protected String | BaseFragmentsBuilder.getFragmentSource(StringBuilder buffer, int[] index, Field[] values, int startOffset, int endOffset)
protected String | BaseFragmentsBuilder.getFragmentSourceMSO(StringBuilder buffer, int[] index, Field[] values, int startOffset, int endOffset, int[] modifiedStartOffset)
protected String | BaseFragmentsBuilder.makeFragment(StringBuilder buffer, int[] index, Field[] values, FieldFragList.WeightedFragInfo fragInfo, String[] preTags, String[] postTags, Encoder encoder)

Uses of Field in org.apache.lucene.util

Methods in org.apache.lucene.util that return Field
static Field | LuceneTestCase.newField(Random random, String name, String value, Field.Index index) Returns a new field instance, using the specified random.
static Field | LuceneTestCase.newField(Random random, String name, String value, Field.Store store, Field.Index index) Returns a new field instance, using the specified random.
static Field | LuceneTestCase.newField(Random random, String name, String value, Field.Store store, Field.Index index, Field.TermVector tv) Returns a new field instance, using the specified random.
static Field | LuceneTestCase.newField(String name, String value, Field.Index index) Returns a new field instance.
static Field | LuceneTestCase.newField(String name, String value, Field.Store store, Field.Index index) Returns a new field instance.
static Field | LuceneTestCase.newField(String name, String value, Field.Store store, Field.Index index, Field.TermVector tv) Returns a new Field instance.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.Field.Index

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.Field.Index

Packages that use Field.Index
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.document | The logical representation of a Document for indexing and searching.
org.apache.lucene.util | Some utility classes.

Uses of Field.Index in org.apache.lucene.benchmark.byTask.feeds

Fields in org.apache.lucene.benchmark.byTask.feeds declared as Field.Index
protected Field.Index | DocMaker.bodyIndexVal
protected Field.Index | DocMaker.indexVal

Uses of Field.Index in org.apache.lucene.document

Methods in org.apache.lucene.document that return Field.Index
static Field.Index | Field.Index.toIndex(boolean indexed, boolean analyzed) Get the best representation of the index given the flags.
static Field.Index | Field.Index.toIndex(boolean indexed, boolean analyzed, boolean omitNorms) Expert: Get the best representation of the index given the flags.
static Field.Index | Field.Index.valueOf(String name) Returns the enum constant of this type with the specified name.
static Field.Index[] | Field.Index.values() Returns an array containing the constants of this enum type, in the order they're declared.

Constructors in org.apache.lucene.document with parameters of type Field.Index
AbstractField(String name, Field.Store store, Field.Index index, Field.TermVector termVector)
Field(String name, boolean internName, String value, Field.Store store, Field.Index index, Field.TermVector termVector)
Create a field by specifying its name, value and how it will be saved in the index.
Field(String name, String value, Field.Store store, Field.Index index)
Create a field by specifying its name, value and how it will be saved in the index.
Field(String name, String value, Field.Store store, Field.Index index, Field.TermVector termVector)
Create a field by specifying its name, value and how it will be saved in the index.

Uses of Field.Index in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type Field.Index
static Field | LuceneTestCase.newField(Random random, String name, String value, Field.Index index) Returns a new field instance, using the specified random.
static Field | LuceneTestCase.newField(Random random, String name, String value, Field.Store store, Field.Index index) Returns a new field instance, using the specified random.
static Field | LuceneTestCase.newField(Random random, String name, String value, Field.Store store, Field.Index index, Field.TermVector tv) Returns a new field instance, using the specified random.
static Field | LuceneTestCase.newField(String name, String value, Field.Index index) Returns a new field instance.
static Field | LuceneTestCase.newField(String name, String value, Field.Store store, Field.Index index) Returns a new field instance.
static Field | LuceneTestCase.newField(String name, String value, Field.Store store, Field.Index index, Field.TermVector tv) Returns a new Field instance.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.Field.Store

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.Field.Store

Packages that use Field.Store
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.document | The logical representation of a Document for indexing and searching.
org.apache.lucene.util | Some utility classes.

Uses of Field.Store in org.apache.lucene.benchmark.byTask.feeds

Fields in org.apache.lucene.benchmark.byTask.feeds declared as Field.Store
protected Field.Store | DocMaker.bodyStoreVal
protected Field.Store | DocMaker.storeVal

Uses of Field.Store in org.apache.lucene.document

Methods in org.apache.lucene.document that return Field.Store
static Field.Store | Field.Store.valueOf(String name) Returns the enum constant of this type with the specified name.
static Field.Store[] | Field.Store.values() Returns an array containing the constants of this enum type, in the order they're declared.

Constructors in org.apache.lucene.document with parameters of type Field.Store
AbstractField(String name, Field.Store store, Field.Index index, Field.TermVector termVector)
Field(String name, boolean internName, String value, Field.Store store, Field.Index index, Field.TermVector termVector)
Create a field by specifying its name, value and how it will be saved in the index.
Field(String name, byte[] value, Field.Store store)
Deprecated. Use instead
Field(String name, byte[] value, int offset, int length, Field.Store store)
Deprecated. Use instead
Field(String name, String value, Field.Store store, Field.Index index)
Create a field by specifying its name, value and how it will be saved in the index.
Field(String name, String value, Field.Store store, Field.Index index, Field.TermVector termVector)
Create a field by specifying its name, value and how it will be saved in the index.
NumericField(String name, Field.Store store, boolean index)
Creates a field for numeric values using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
NumericField(String name, int precisionStep, Field.Store store, boolean index)
Creates a field for numeric values with the specified precisionStep.

Uses of Field.Store in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type Field.Store
static Field | LuceneTestCase.newField(Random random, String name, String value, Field.Store store, Field.Index index) Returns a new field instance, using the specified random.
static Field | LuceneTestCase.newField(Random random, String name, String value, Field.Store store, Field.Index index, Field.TermVector tv) Returns a new field instance, using the specified random.
static Field | LuceneTestCase.newField(String name, String value, Field.Store store, Field.Index index) Returns a new field instance.
static Field | LuceneTestCase.newField(String name, String value, Field.Store store, Field.Index index, Field.TermVector tv) Returns a new Field instance.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.Field.TermVector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.Field.TermVector

Packages that use Field.TermVector
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.document | The logical representation of a Document for indexing and searching.
org.apache.lucene.util | Some utility classes.

Uses of Field.TermVector in org.apache.lucene.benchmark.byTask.feeds

Fields in org.apache.lucene.benchmark.byTask.feeds declared as Field.TermVector
protected  Field.TermVector DocMaker.termVecVal

Uses of Field.TermVector in org.apache.lucene.document

Methods in org.apache.lucene.document that return Field.TermVector
static Field.TermVector | Field.TermVector.toTermVector(boolean stored, boolean withOffsets, boolean withPositions) Get the best representation of a TermVector given the flags.
static Field.TermVector | Field.TermVector.valueOf(String name) Returns the enum constant of this type with the specified name.
static Field.TermVector[] | Field.TermVector.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.document with parameters of type Field.TermVector
protected  void AbstractField.setStoreTermVector(Field.TermVector termVector)

Constructors in org.apache.lucene.document with parameters of type Field.TermVector
AbstractField(String name, Field.Store store, Field.Index index, Field.TermVector termVector)
Field(String name, boolean internName, String value, Field.Store store, Field.Index index, Field.TermVector termVector)
Create a field by specifying its name, value and how it will be saved in the index.
Field(String name, Reader reader, Field.TermVector termVector)
Create a tokenized and indexed field that is not stored, optionally with storing term vectors.
Field(String name, String value, Field.Store store, Field.Index index, Field.TermVector termVector)
Create a field by specifying its name, value and how it will be saved in the index.
Field(String name, TokenStream tokenStream, Field.TermVector termVector)
Create a tokenized and indexed field that is not stored, optionally with storing term vectors.

Uses of Field.TermVector in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type Field.TermVector
static Field | LuceneTestCase.newField(Random random, String name, String value, Field.Store store, Field.Index index, Field.TermVector tv) Returns a new field instance, using the specified random.
static Field | LuceneTestCase.newField(String name, String value, Field.Store store, Field.Index index, Field.TermVector tv) Returns a new Field instance.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.document.Fieldable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.document.Fieldable

Packages that use Fieldable
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.document | The logical representation of a Document for indexing and searching.

Uses of Fieldable in org.apache.lucene.analysis

Methods in org.apache.lucene.analysis with parameters of type Fieldable
 int LimitTokenCountAnalyzer.getOffsetGap(Fieldable field)
 int PerFieldAnalyzerWrapper.getOffsetGap(Fieldable field)
Return the offsetGap from the analyzer assigned to field
 int Analyzer.getOffsetGap(Fieldable field)
Just like Analyzer.getPositionIncrementGap(java.lang.String), except for Token offsets instead.

Uses of Fieldable in org.apache.lucene.document

Classes in org.apache.lucene.document that implement Fieldable
class | AbstractField Base class for Field implementations
class | Field A field is a section of a Document.
class | NumericField This class provides a Field that enables indexing of numeric values for efficient range filtering and sorting.

Methods in org.apache.lucene.document that return Fieldable
Fieldable | Document.getFieldable(String name) Returns a field with the given name if any exist in this document, or null.
Fieldable[] | Document.getFieldables(String name) Returns an array of Fieldables with the given name.

Methods in org.apache.lucene.document that return types with arguments of type Fieldable
 List<Fieldable> Document.getFields()
Returns a List of all the fields in a document.

Methods in org.apache.lucene.document with parameters of type Fieldable
 void Document.add(Fieldable field)
Adds a field to a document.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.document.FieldSelector

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.document.FieldSelector

Packages that use FieldSelector
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.document | The logical representation of a Document for indexing and searching.
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.pruning | Static Index Pruning Tools
org.apache.lucene.search | Code to search indices.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.

Uses of FieldSelector in org.apache.lucene.benchmark.byTask.tasks

Fields in org.apache.lucene.benchmark.byTask.tasks declared as FieldSelector
protected  FieldSelector SearchTravRetLoadFieldSelectorTask.fieldSelector

Uses of FieldSelector in org.apache.lucene.document

Classes in org.apache.lucene.document that implement FieldSelector
class | LoadFirstFieldSelector Load the First field and break.
class | MapFieldSelector A FieldSelector based on a Map of field names to FieldSelectorResults
class | SetBasedFieldSelector Declare what fields to load normally and what fields to load lazily

Uses of FieldSelector in org.apache.lucene.index

Methods in org.apache.lucene.index with parameters of type FieldSelector
Document | PruningReader.document(int n, FieldSelector fieldSelector) Applies a StorePruningPolicy to stored fields of a document.
abstract Document | IndexReader.document(int n, FieldSelector fieldSelector) Get the Document at the n th position.
Document | MultiReader.document(int n, FieldSelector fieldSelector)
Document | SegmentReader.document(int n, FieldSelector fieldSelector)
Document | ParallelReader.document(int n, FieldSelector fieldSelector)
Document | FilterIndexReader.document(int n, FieldSelector fieldSelector)

Uses of FieldSelector in org.apache.lucene.index.pruning

Methods in org.apache.lucene.index.pruning with parameters of type FieldSelector
 Document StorePruningPolicy.pruneDocument(int doc, FieldSelector parent)
Prune stored fields of a document.

Uses of FieldSelector in org.apache.lucene.search

Methods in org.apache.lucene.search with parameters of type FieldSelector
Document | RemoteSearchable.doc(int i, FieldSelector fieldSelector) Deprecated.
Document | IndexSearcher.doc(int docID, FieldSelector fieldSelector)
abstract Document | Searcher.doc(int docid, FieldSelector fieldSelector) Deprecated.
Document | Searchable.doc(int n, FieldSelector fieldSelector) Deprecated. Get the Document at the nth position.
Document | MultiSearcher.doc(int n, FieldSelector fieldSelector) Deprecated.

Uses of FieldSelector in org.apache.lucene.store.instantiated

Methods in org.apache.lucene.store.instantiated with parameters of type FieldSelector
 Document InstantiatedIndexReader.document(int n, FieldSelector fieldSelector)
Deprecated. Return the Document at the nth position.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.FieldSelectorResult

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.FieldSelectorResult

Packages that use FieldSelectorResult
org.apache.lucene.document The logical representation of a Document for indexing and searching.

Uses of FieldSelectorResult in org.apache.lucene.document

Methods in org.apache.lucene.document that return FieldSelectorResult
FieldSelectorResult | MapFieldSelector.accept(String field) Load field according to its associated value in fieldSelections
FieldSelectorResult | SetBasedFieldSelector.accept(String fieldName) Indicate whether to load the field with the given name or not.
FieldSelectorResult | FieldSelector.accept(String fieldName)
FieldSelectorResult | LoadFirstFieldSelector.accept(String fieldName)
static FieldSelectorResult | FieldSelectorResult.valueOf(String name) Returns the enum constant of this type with the specified name.
static FieldSelectorResult[] | FieldSelectorResult.values() Returns an array containing the constants of this enum type, in the order they're declared.

Constructor parameters in org.apache.lucene.document with type arguments of type FieldSelectorResult
MapFieldSelector(Map<String,FieldSelectorResult> fieldSelections)
Create a a MapFieldSelector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.LoadFirstFieldSelector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.LoadFirstFieldSelector

No usage of org.apache.lucene.document.LoadFirstFieldSelector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.MapFieldSelector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.MapFieldSelector

No usage of org.apache.lucene.document.MapFieldSelector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.NumberTools

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.NumberTools

No usage of org.apache.lucene.document.NumberTools

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.NumericField.DataType

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.NumericField.DataType

Packages that use NumericField.DataType
org.apache.lucene.document | The logical representation of a Document for indexing and searching.
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration

Uses of NumericField.DataType in org.apache.lucene.document

Methods in org.apache.lucene.document that return NumericField.DataType
NumericField.DataType | NumericField.getDataType() Returns the data type of the current value, null if not yet set.
static NumericField.DataType | NumericField.DataType.valueOf(String name) Returns the enum constant of this type with the specified name.
static NumericField.DataType[] | NumericField.DataType.values() Returns an array containing the constants of this enum type, in the order they're declared.

Uses of NumericField.DataType in org.apache.lucene.queryParser.standard.config

Methods in org.apache.lucene.queryParser.standard.config that return NumericField.DataType
 NumericField.DataType NumericConfig.getType()
Returns the numeric type used to index the numeric values

Methods in org.apache.lucene.queryParser.standard.config with parameters of type NumericField.DataType
 void NumericConfig.setType(NumericField.DataType type)
Sets the numeric type used to index the numeric values

Constructors in org.apache.lucene.queryParser.standard.config with parameters of type NumericField.DataType
NumericConfig(int precisionStep, NumberFormat format, NumericField.DataType type)
Constructs a NumericConfig object.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.NumericField

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.NumericField

Packages that use NumericField
org.apache.lucene.document The logical representation of a Document for indexing and searching.

Uses of NumericField in org.apache.lucene.document

Methods in org.apache.lucene.document that return NumericField
NumericField | NumericField.setDoubleValue(double value) Initializes the field with the supplied double value.
NumericField | NumericField.setFloatValue(float value) Initializes the field with the supplied float value.
NumericField | NumericField.setIntValue(int value) Initializes the field with the supplied int value.
NumericField | NumericField.setLongValue(long value) Initializes the field with the supplied long value.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.document.SetBasedFieldSelector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.document.SetBasedFieldSelector

No usage of org.apache.lucene.document.SetBasedFieldSelector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


FacetException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet
Class FacetException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.io.IOException
                extended by  org.apache.lucene.facet.FacetException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FacetParamsMissingPropertyException
public class FacetException
extends IOException

A parent class for exceptions thrown by the Facets code.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
FacetException()
FacetException(String message)
FacetException(String message, Throwable cause)
FacetException(Throwable cause)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FacetException

public FacetException()

FacetException

public FacetException(String message)

FacetException

public FacetException(String message,
                      Throwable cause)

FacetException

public FacetException(Throwable cause)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet
Exceptions
FacetException


org.apache.lucene.facet

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet

Provides faceted indexing and search capabilities.

See:
Description

Exception Summary
FacetException A parent class for exceptions thrown by the Facets code.

Package org.apache.lucene.facet Description

Provides faceted indexing and search capabilities. The userguide is recommended for a start.


org.apache.lucene.facet Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.io.IOException
          • org.apache.lucene.facet.FacetException


Uses of Package org.apache.lucene.facet

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet

Packages that use org.apache.lucene.facet
org.apache.lucene.facet.index.params Indexing-time specifications for handling facets

Classes in org.apache.lucene.facet used by org.apache.lucene.facet.index.params
FacetException
A parent class for exceptions thrown by the Facets code.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.FacetException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.FacetException

Packages that use FacetException
org.apache.lucene.facet.index.params Indexing-time specifications for handling facets

Uses of FacetException in org.apache.lucene.facet.index.params

Subclasses of FacetException in org.apache.lucene.facet.index.params
 class FacetParamsMissingPropertyException
Thrown when the facets params are missing a property.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Facet Userguide

Apache Lucene
Faceted Search
User's Guide

Table of Contents

  1. Introduction
  2. Facet Features
  3. Indexing Categories Illustrated
  4. Accumulating Facets Illustrated
  5. Indexed Facet Information
  6. Taxonomy Index
  7. Facet Parameters
  8. Advanced Faceted Examples
  9. Optimizations
  10. Concurrent Indexing and Search

Introduction

A category is an aspect of indexed documents which can be used to classify the documents. For example, in a collection of books at an online bookstore, categories of a book can be its price, author, publication date, binding type, and so on.

In faceted search, in addition to the standard set of search results, we also get facet results, which are lists of subcategories for certain categories. For example, for the price facet, we get a list of relevant price ranges; for the author facet, we get a list of relevant authors; and so on. In most UIs, when users click one of these subcategories, the search is narrowed, or drilled down, and a new search limited to this subcategory (e.g., to a specific price range or author) is performed.

Note that faceted search is more than just the ordinary fielded search. In fielded search, users can add search keywords like price:10 or author:"Mark Twain" to the query to narrow the search, but this requires knowledge of which fields are available, and which values are worth trying. This is where faceted search comes in: it provides a list of useful subcategories, which ensures that the user only drills down into useful subcategories and never into a category for which there are no results. In essence, faceted search makes it easy to navigate through the search results. The list of subcategories provided for each facet is also useful to the user in itself, even when the user never drills down. This list allows the user to see at one glance some statistics on the search results, e.g., what price ranges and which authors are most relevant to the given query.

In recent years, faceted search has become a very common UI feature in search engines, especially in e-commerce websites. Faceted search makes it easy for untrained users to find the specific item they are interested in, whereas manually adding search keywords (as in the examples above) proved too cumbersome for ordinary users, and required too much guesswork, trial-and-error, or the reading of lengthy help pages.

See http://en.wikipedia.org/wiki/Faceted_search for more information on faceted search.

Facet Features

First and main faceted search capability that comes to mind is counting, but in fact faceted search is more than facet counting. We now briefly discuss the available faceted search features.

Facet Counting

Which of the available subcategories of a facet should a UI display? A query in a book store might yield books by a hundred different authors, but normally we'd want do display only, say, ten of those.

Most available faceted search implementations use counts to determine the importance of each subcategory. These implementations go over all search results for the given query, and count how many results are in each subcategory. Finally, the subcategories with the most results can be displayed. So the user sees the price ranges, authors, and so on, for which there are most results. Often, the count is displayed next to the subcategory name, in parentheses, telling the user how many results he can expect to see if he drills down into this subcategory.

The main API for obtaining facet counting is CountFacetRequest, as in the following code snippet:

new CountFacetRequest(new CategoryPath("author"), 10));
A detailed code example using count facet requests is shown below - see Accumulating Facets.

Facet Associations

So far we've discussed categories as binary features, where a document either belongs to a category, or not.

While counts are useful in most situations, they are sometimes not sufficiently informative for the user, with respect to deciding which subcategory is more important to display.

For this, the facets package allows to associate a value with a category. The search time interpretation of the associated value is application dependent. For example, a possible interpretation is as a match level (e.g., confidence level). This value can then be used so that a document that is very weakly associated with a certain category will only contribute little to this category's aggregated weight.

Multiple Facet Requests

A single faceted accumulation is capable of servicing multiple facet requests. Programmatic, this is quite simple - wrap all the facet requests of interest into the facet-search-parameters which are passed to a facets accumulator/collector (more on these objects below). The results would be comprised of as many facet results as there were facet requests.

However there is a delicate limitation: all facets maintained in the same location in the index are required to be treated the same. See the section on Indexing Parameters for an explanation on maintaining certain facets at certain locations.

Facet Labels at Search Time

Facets results always contain the facet (internal) ID and (accumulated) value. Some of the results also contain the facet label, AKA the category name. We mention this here since computing the label is a time consuming task, and hence applications can specify with a facet request to return top 1000 facets but to compute the label only for the top 10 facets. In order to compute labels for more of the facet results it is not required to perform accumulation again.

See FacetRequest.getNumResults(), FacetRequest.getNumLabel() and FacetResultNode.getLabel(TaxonomyReader).

Indexing Categories Illustrated

In order to find facets at search time they must first be added to the index at indexing time. Recall that Lucene documents are made of fields for textual search. The addition of categories is performed by an appropriate DocumentBuilder - or CategoryDocumentBuilder in our case.

Indexing therefore usually goes like this:

  • For each input document:
    • Create a fresh (empty) Lucene Document
    • Parse input text and add appropriate text search fields
    • Gather all input categories associated with the document and create a CategoryDocumentBuilder with the list of categories
    • Build the document - this actually adds the categories to the Lucene document.
    • Add the document to the index
Following is a code snippet for indexing categories. The complete example can be found in package org.apache.lucene.facet.example.simple.SimpleIndexer.
IndexWriter writer = ...
TaxonomyWriter taxo = new DirectoryTaxonomyWriter(taxoDir, OpenMode.CREATE);
...
Document doc = new Document();
doc.add(new Field("title", titleText, Store.YES, Index.ANALYZED));
...
List<CategoryPath> categories = new ArrayList<CategoryPath>();
categories.add(new CategoryPath("author", "Mark Twain"));
categories.add(new CategoryPath("year", "2010"));
...
DocumentBuilder categoryDocBuilder = new CategoryDocumentBuilder(taxo);
categoryDocBuilder.setCategoryPaths(categories);
categoryDocBuilder.build(doc);
writer.addDocument(doc);

We now explain the steps above, following the code line numbers:

(4) | Document contains not only text search fields but also facet search information.
(7) | Prepare a container for document categories.
(8) | Categories that should be added to the document are accumulated in the categories list.
(11) A CategoryDocumentBuilder is created, set with the appropriate list of categories, and invoked to build - that is, to populate the document with categories. It is in this step that the taxonomy is updated to contain the newly added categories (if not already there) - see more on this in the section about the Taxonomy Index below. This line could be made more compact: one can create a single CategoryDocumentBuilder cBuilder and reuse it like this:
DocumentBuilder cBuilder = new CategoryDocumentBuilder(taxo);
cBuilder.setCategoryPaths(categories).build(doc);
(14) | Add the document to the index. As a result, category info is saved also in the regular search index, for supporting facet aggregation at search time (e.g. facet counting) as well as facet drill-down. For more information on indexed facet information see below the section Indexed Facet Information.

Accumulating Facets Illustrated

Facets accumulation reflects a set of documents over some facet requests:

  • Document set - a subset of the index documents, usually documents matching a user query.
  • Facet requests - facet accumulation specification, e.g. count a certain facet dimension.

FacetRequest is a basic component in faceted search - it describes the facet information need. Every facet request is made of at least two fields:

  • CategoryPath - root category of the facet request. The categories that are returned as a result of the request will all be descendants of this root
  • Number of Results - number of sub-categories to return (at most).

There are other parameters to a facet request, such as -how many facet results to label-, -how deep to go from the request root when serving the facet request- and more - see the API Javadocs for FacetRequest and its subclasses for more information on these parameters. For labels in particular, see the section Facet Labels at Search Time.

FacetRequest in an abstract class, open for extensions, and users may add their own requests. The most often used request is CountFacetRequest - used for counting facets.

Facets accumulation is - not surprisingly - driven by a FacetsAccumulator. The most used one is StandardFacetsAccumulator, however there are also accumulators that support sampling - to be used in huge collections, and there's an adaptive facets accumulator which applies sampling conditionally on the statistics of the data. While facets accumulators are very extendible and powerful, they might be too overwhelming for beginners. For this reason, the code offers a higher level interface for facets accumulating: the FacetsCollector. It extends Collector, and as such can be passed to the search() method of Lucene's IndexSearcher. In case the application also needs to collect documents (in addition to accumulating/collecting facets), it can wrap multiple collectors with MultiCollector. Most code samples below use FacetsCollector due to its simple interface. It is quite likely that FacetsCollector should suffice the needs of most applications, therefore we recommend to start with it, and only when needing more flexibility turn to directly use facets accumulators.

Following is a code snippet from the example code - the complete example can be found under org.apache.lucene.facet.example.simple.Searcher:

IndexReader indexReader = IndexReader.open(indexDir);
Searcher searcher = new IndexSearcher(indexReader);
TaxonomyReader taxo = new DirectoryTaxonomyReader(taxoDir);
...
Query q = new TermQuery(new Term(SimpleUtils.TEXT, "white"));
TopScoreDocCollector tdc = TopScoreDocCollector.create(10, true);
...
FacetSearchParams facetSearchParams = new FacetSearchParams();
facetSearchParams.addFacetRequest(new CountFacetRequest(
    new CategoryPath("author"), 10));
...
FacetsCollector facetsCollector = new FacetsCollector(facetSearchParams, indexReader, taxo);
searcher.search(q, MultiCollector.wrap(topDocsCollector, facetsCollector));
List<FacetResult> res = facetsCollector.getFacetResults();

We now explain the steps above, following the code line numbers:

(1) | Index reader and Searcher are initialized as usual.
(3) | A taxonomy reader is opened - it provides access to the facet information which was stored by the Taxonomy Writer at indexing time.
(5) | Regular text query is created to find the documents matching user need, and a collector for collecting the top matching documents is created.
(8) | Facet-search-params is a container for facet requests.
(10) | A single facet-request - namely a count facet request - is created and added to the facet search params. The request should return top 10 Author subcategory counts.
(12) | Facets-Collector is the simplest interface for facets accumulation (counting in this example).
(13) | Lucene search takes both collectors - facets-collector and top-doccollector, both wrapped by a multi-collector. This way, a single search operation finds both top documents and top facets. Note however that facets aggregation takes place not only over the top documents, but rather over all documents matching the query.
(14) | Once search completes, facet-results can be obtained from the facetscollector.

Returned facet results are organized in a list, conveniently ordered the same as the facet-requests in the facet-search-params. Each result however contains the request for which it was created.

Here is the (recursive) structure of the facet result:

  • Facet Result
    • Facet Request - the request for which this result was obtained.
    • Valid Descendants - how many valid descendants were encountered over the set of matching documents (some of which might have been filtered out because e.g. only top 10 results were requested).
    • Root Result Node - root facet result for the request
      • Ordinal - unique internal ID of the facet
      • Label - full label of the facet (possibly null)
      • Value - facet value, e.g. count
      • Sub-results-nodes - child result nodes (possibly null)

Note that not always there would be sub result nodes - this depends on the requested result mode:

  • PER_NODE_IN_TREE - a tree, and so there may be sub results.
  • GLOBAL_FLAT - here the results tree would be rather flat, with only (at most) leaves below the root result node.

Indexed Facet Information

When indexing a document to which categories were added, information on these categories is added to the search index, in two locations:

  • Category Tokens are added to the document for each category attached to that document. These categories can be used at search time for drill-down.
  • A special Category List Token is added to each document containing information on all the categories that were added to this document. This can be used at search time for facet accumulation, e.g. facet counting.

When a category is added to the index (that is, when a document containing a category is indexed), all its parent categories are added as well. For example, indexing a document with the category <"author", "American-, "Mark Twain"> results in creating three tokens: "/author", "/author/American", and "/author/American/Mark Twain" (the character '/' here is just a human readable separator - there's no such element in the actual index). This allows drilling down and counting any category in the taxonomy, and not just leaf nodes, enabling a UI application to show either how many books have authors, or how many books have American authors, or how many books have Mark Twain as their (American) author.

Similarly, Drill-down capabilities are this way possible also for node categories.

In order to keep the counting list compact, it is built using category ordinal - an ordinal is an integer number attached to a category when it is added for the first time into the taxonomy.

For ways to further alter facet index see the section below on Facet Indexing Parameters.

Taxonomy Index

The taxonomy is an auxiliary data-structure maintained side-by-side with the regular index to support faceted search operations. It contains information about all the categories that ever existed in any document in the index. Its API is open and allows simple usage, or more advanced for the interested users.

When a category is added to a document, a corresponding node is added to the taxonomy (unless already there). In fact, sometimes more than one node is added - each parent category is added as well, so that the taxonomy is maintained as a Tree, with a virtual root.

So, for the above example, adding the category the category <"author", "American-, "Mark Twain"> actually added three nodes: one for "/author", one for "/author/American" and one for "/author/American/Mark Twain".

An integer number - called ordinal is attached to each category the first time the category is added to the taxonomy. This allows for a compact representation of category list tokens in the index, for facets accumulation.

One interesting fact about the taxonomy index is worth knowing: once a category is added to the taxonomy, it is never removed, even if all related documents are removed. This differs from a regular index, where if all documents containing a certain term are removed, and their segments are merged, the term will also be removed. This might cause a performance issue: large taxonomy means large ordinal numbers for categories, and hence large categories values arrays would be maintained during accumulation. It is probably not a real problem for most applications, but be aware of this. If, for example, an application at a certain point in time removes an index entirely in order to recreate it, or, if it removed all the documents from the index in order to re-populate it, it also makes sense in this opportunity to remove the taxonomy index and create a new, fresh one, without the unused categories.

Facet Parameters

Facet parameters control how categories and facets are indexed and searched. Apart from specifying facet requests within facet search parameters, under default settings it is not required to provide any parameters, as there are ready to use working defaults for everything.

However many aspects are configurable and can be modified by providing altered facet parameters for either search or indexing.

Facet Indexing Parameters

Facet Indexing Parameters are consulted with during indexing. Among several parameters it defines, the following two are likely to interest many applications:

  • Category list definitions - in the index, facets are maintained in two forms: category-tokens (for drill-down) and category-list-tokens (for accumulation). This parameter allows to specify, for each category, the Lucene term used for maintaining the category-list-tokens for that category. The default implementation in DefaultFacetIndexingParams maintains this information for all categories under the same special dedicated term. One case where it is needed to maintain two categories in separate category lists, is when it is known that at search time it would be required to use different types of accumulation logic for each, but at the same accumulation call.
  • Partition size - category lists can be maintained in a partitioned way. If, for example, the partition size is set to 1000, a distinct sub-term is used for maintaining each 1000 categories, e.g. term1 for categories 0 to 999, term2 for categories 1000 to 1999, etc. The default implementation in DefaultFacetIndexingParams maintains category lists in a single partition, hence it defines the partition size as Integer.MAX_VALUE. The importance of this parameter is on allowing to handle very large taxonomies without exhausting RAM resources. This is because at facet accumulation time, facet values arrays are maintained in the size of the partition. With a single partition, the size of these arrays is as the size of the taxonomy, which might be OK for most applications. Limited partition sizes allow to perform the accumulation with less RAM, but with some runtime overhead, as the matching documents are processed for each of the partitions.

See the API Javadocs of FacetIndexingParams for additional configuration capabilities which were not discussed here.

Facet Search Parameters

Facet Search Parameters, consulted at search time (during facets accumulation) are rather plain, providing the following:

  • Facet indexing parameters - which were in effect at indexing time - allowing facets accumulation to understand how facets are maintained in the index.
  • Container of facet requests - the requests which should be accumulated.

Category Lists, Multiple Dimensions

Category list parameters which are accessible through the facet indexing parameters provide the information about:

  • Lucene Term under which category information is maintained in the index.
  • Encoding (and decoding) used for writing and reading the categories information in the index.

For cases when certain categories should be maintained in different location than others, use PerDimensionIndexingParams, which returns a different CategoryListParams object for each dimension. This is a good opportunity to explain about dimensions. This is just a notion: the top element - or first element - in a category path is denoted as the dimension of that category. Indeed, the dimension stands out as a top important part of the category path, such as "Location" for the category "Location/Europe/France/Paris".

Advanced Faceted Examples

We now provide examples for more advanced facet indexing and search, such as drilling-down on facet values and multiple category lists.

Drill-Down with Regular Facets

Drill-down allows users to focus on part of the results. Assume a commercial sport equipment site where a user is searching for a tennis racquet. The user issues the query tennis racquet and as result is shown a page with 10 tennis racquets, by various providers, of various types and prices. In addition, the site UI shows to the user a break down of all available racquets by price and make. The user now decides to focus on racquets made by Head, and will now be shown a new page, with 10 Head racquets, and new break down of the results into racquet types and prices. Additionally, the application can choose to display a new breakdown, by racquet weights. This step of moving from results (and facet statistics) of the entire (or larger) data set into a portion of it by specifying a certain category, is what we call Drilldown. We now show the required code lines for implementing such a drill-down.

Query baseQuery = queryParser.parse("tennis racquet");
Query q2 = DrillDown.query(baseQuery, new CategoryPath("make", "head"), 10));

In line 1 the original user query is created and then used to obtain information on all tennis racquets.

In line 2, a specific category from within the facet results was selected by the user, and is hence used for creating the drill-down query.

Please refer to SimpleSearcher.searchWithDrillDown() for a more detailed code example performing drill-down.

Multiple Category Lists

The default is to maintain all categories information in a single list. While this will suit most applications, in some situations an application may wish to use multiple category lists, for example, when the distribution of some category values is different than that of other categories and calls for using a different encoding, more efficient for the specific distribution. Another example is when most facets are rarely used while some facets are used very heavily, so an application may opt to maintain the latter in memory - and in order to keep memory footprint lower it is useful to maintain only those heavily used facets in a separate category list.

First we define indexing parameters with multiple category lists:

PerDimensionIndexingParams iParams = new PerDimensionIndexingParams();
iParams.addCategoryListParams(new CategoryPath("Author"),
    new CategoryListParams(new Term("$RarelyUsed", "Facets")));
iParams.addCategoryListParams(new CategoryPath("Language"),
    new CategoryListParams(new Term("$HeavilyUsed", "Ones")));

This will cause the Language categories to be maintained in one category list, and Author facets to be maintained in a another category list. Note that any other category, if encountered, will still be maintained in the default category list.

These non-default indexing parameters should now be used both at indexing and search time. As depicted below, at indexing time this is done when creating the category document builder, while at search time this is done when creating the search parameters. Other than that the faceted search code is unmodified.

DocumentBuilder categoryDocBuilder = new CategoryDocumentBuilder(taxo, iParams);
...
FacetSearchParams facetSearchParams = new FacetSearchParams(iParams);

A complete simple example can be found in package org.apache.lucene.facet.example.multiCL under the example code.

Optimizations

Faceted search through a large collection of documents with large numbers of facets altogether and/or large numbers of facets per document is challenging performance wise, either in CPU, RAM, or both. A few ready to use optimizations exist to tackle these challenges.

Sampling

Facet sampling allows to accumulate facets over a sample of the matching documents set. In many cases, once top facets are found over the sample set, exact accumulations are computed for those facets only, this time over the entire matching document set.

Two kinds of sampling exist: complete support and wrapping support. The complete support is through SamplingAccumulator and is tied to an extension of the StandardFacetsAccumulator and has the benefit of automatically applying other optimizations, such as Complements. The wrapping support is through SamplingWrapper and can wrap any accumulator, and as such, provides more freedom for applications.

Complements

When accumulating facets over a very large matching documents set, possibly almost as large as the entire collection, it is possible to speed up accumulation by looking at the complement set of documents, and then obtaining the actual results by subtracting from the total results. It should be noted that this is available only for count requests, and that the first invocation that involves this optimization might take longer because the total counts have to be computed.

This optimization is applied automatically by StandardFacetsAccumulator.

Partitions

Partitions are also discussed in the section about Facet Indexing parameters.

Facets are internally accumulated by first accumulating all facets and later on extracting the results for the requested facets. During this process, accumulation arrays are maintained in the size of the taxonomy. For a very large taxonomy, with multiple simultaneous faceted search operations, this might lead to excessive memory footprint. Partitioning the faceted information allows to relax the memory usage, by maintaining the category lists in several partitions, and by processing one partition at a time. This is automatically done by StandardFacetsAccumulator. However the default partition size is Integer.MAX_VALUE, practically setting to a single partition, i.e. no partitions at all.

Decision to override this behavior and use multiple partitions must be taken at indexing time. Once the index is created and already contains category lists it is too late to modify this.

See FacetIndexingParams.getPartitionSize() for API to alter this default behavior.

Concurrent Indexing and Search

Sometimes, indexing is done once, and when the index is fully prepared, searching starts. However, in most real applications indexing is incremental (new data comes in once in a while, and needs to be indexed), and indexing often needs to happen while searching is continuing at full steam.

Luckily, Lucene supports multiprocessing - one process writing to an index while another is reading from it. One of the key insights behind how Lucene allows multiprocessing is Point In Time semantics. The idea is that when an IndexReader is opened, it gets a view of the index at the point in time it was opened. If an IndexWriter in a different process or thread modifies the index, the reader does not know about it until a new IndexReader is opened (or the reopen() method of an existing IndexReader is called).

In faceted search, we complicate things somewhat by adding a second index - the taxonomy index. The taxonomy API also follows point-in-time semantics, but this is not quite enough. Some attention must be paid by the user to keep those two indexes consistently in sync:

The main index refers to category numbers defined in the taxonomy index. Therefore, it is important that we open the TaxonomyReader after opening the IndexReader. Moreover, every time an IndexReader is reopen()ed, the TaxonomyReader needs to be refresh()'ed as well.

But there is one extra caution: whenever the application deems it has written enough information worthy a commit, it must first call commit() for the TaxonomyWriter and only after that call commit() for the IndexWriter. Closing the indices should also be done in this order - first close the taxonomy, and only after that close the index.

To summarize, if you're writing a faceted search application where searching and indexing happens concurrently, please follow these guidelines (in addition to the usual guidelines on how to use Lucene correctly in the concurrent case):

  • In the indexing process:
    1. Before a writer commit()s the IndexWriter, it must commit() the TaxonomyWriter. Nothing should be added to the index between these two commit()s.
    2. Similarly, before a writer close()s the IndexWriter, it must close() the TaxonomyWriter.
  • In the searching process:
    1. Open the IndexReader first, and then the TaxonomyReader.
    2. After a reopen() on the IndexReader, refresh() the TaxonomyReader. No search should be performed on the new IndexReader until refresh() has finished.

Note that the above discussion assumes that the underlying file-system on which the index and the taxonomy are stored respects ordering: if index A is written before index B, then any reader finding a modified index B will also see a modified index A.

Note: TaxonomyReader's refresh() is simpler than IndexReader's reopen(). While the latter keeps both the old and new reader open, the former keeps only the new reader. The reason is that a new IndexReader might have modified old information (old documents deleted, for example) so a thread which is in the middle of a search needs to continue using the old information. With TaxonomyReader, however, we are guaranteed that existing categories are never deleted or modified - the only thing that can happen is that new categories are added. Since search threads do not care if new categories are added in the middle of a search, there is no reason to keep around the old object, and the new one suffices.
However, if the taxonomy index was recreated since the TaxonomyReader was opened or refreshed, this assumption (that categories are forevr) no longer holds, and refresh() will throw an InconsistentTaxonomyException, guiding the application to open a new TaxonomyReader for up-to-date taxonomy data. (Old one can be closed as soon as it is no more used.)


CategoryEnhancement

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.enhancements
Interface CategoryEnhancement

All Known Implementing Classes:
AssociationEnhancement
public interface CategoryEnhancement

This interface allows easy addition of enhanced category features. Usually, a CategoryEnhancement will correspond to a CategoryProperty.

A category enhancement can contribute to the index in two possible ways:

  1. To each category with data relevant to the enhancement, add this data to the category's token payload, through getCategoryTokenBytes(CategoryAttribute). This data will be read during search using extractCategoryTokenData(byte[], int, int).
  2. To each document which contains categories with data relevant to the enhancement, add a CategoryListTokenizer through getCategoryListTokenizer(TokenStream, EnhancementsIndexingParams, TaxonomyWriter) . The CategoryListTokenizer should add a single token which includes all the enhancement relevant data from the categories. The category list token's text is defined by getCategoryListTermText().

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
boolean | equals(Object o) Category enhancements must override Object.equals(Object), as it is used in EnhancementsPayloadIterator.getCategoryData(CategoryEnhancement).
Object | extractCategoryTokenData(byte[] buffer, int offset, int length) Get the data of this enhancement from a category token payload.
boolean | generatesCategoryList() Declarative method to indicate whether this enhancement generates separate category list.
String | getCategoryListTermText() Returns the text of this enhancement's category list term.
CategoryListTokenizer | getCategoryListTokenizer(TokenStream tokenizer, EnhancementsIndexingParams indexingParams, TaxonomyWriter taxonomyWriter) Get the CategoryListTokenizer which generates the category list for this enhancement.
byte[] | getCategoryTokenBytes(CategoryAttribute categoryAttribute) Get the bytes to be added to the category token payload for this enhancement.
Class<? extends CategoryProperty> | getRetainableProperty() Get a CategoryProperty class to be retained when creating CategoryParentsStream.

Method Detail

getCategoryTokenBytes

byte[] getCategoryTokenBytes(CategoryAttribute categoryAttribute)
Get the bytes to be added to the category token payload for this enhancement.

NOTE: The returned array is copied, it is recommended to allocate a new one each time.

The bytes generated by this method are the input of extractCategoryTokenData(byte[], int, int).

Parameters:
categoryAttribute - The attribute of the category.
Returns:
The bytes to be added to the category token payload for this enhancement.

extractCategoryTokenData

Object extractCategoryTokenData(byte[] buffer,
                                int offset,
                                int length)
Get the data of this enhancement from a category token payload.

The input bytes for this method are generated in getCategoryTokenBytes(CategoryAttribute).

Parameters:
buffer - The payload buffer.
offset - The offset of this enhancement's data in the buffer.
length - The length of this enhancement's data (bytes).
Returns:
An Object containing the data.

generatesCategoryList

boolean generatesCategoryList()
Declarative method to indicate whether this enhancement generates separate category list.

Returns:
true if generates category list, else false.

getCategoryListTermText

String getCategoryListTermText()
Returns the text of this enhancement's category list term.

Returns:
The text of this enhancement's category list term.

getCategoryListTokenizer

CategoryListTokenizer getCategoryListTokenizer(TokenStream tokenizer,
                                               EnhancementsIndexingParams indexingParams,
                                               TaxonomyWriter taxonomyWriter)
Get the CategoryListTokenizer which generates the category list for this enhancement. If generatesCategoryList() returns false this method will not be called.

Parameters:
tokenizer - The input stream containing categories.
indexingParams - The indexing params to use.
taxonomyWriter - The taxonomy to add categories and get their ordinals.
Returns:
A CategoryListTokenizer generating the category list for this enhancement, with tokenizer as it's input.

getRetainableProperty

Class<? extends CategoryProperty> getRetainableProperty()
Get a CategoryProperty class to be retained when creating CategoryParentsStream.

Returns:
the CategoryProperty class to be retained when creating CategoryParentsStream, or null if there is no such property.

equals

boolean equals(Object o)
Category enhancements must override Object.equals(Object), as it is used in EnhancementsPayloadIterator.getCategoryData(CategoryEnhancement).

Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


EnhancementsCategoryTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.enhancements
Class EnhancementsCategoryTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
                    extended by  org.apache.lucene.facet.index.streaming.CategoryTokenizer
                        extended by  org.apache.lucene.facet.enhancements.EnhancementsCategoryTokenizer
All Implemented Interfaces:
Closeable
public class EnhancementsCategoryTokenizer
extends CategoryTokenizer

A tokenizer which adds to each category token payload according to the CategoryEnhancements defined in the given EnhancementsIndexingParams.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
protected byte[][] | enhancementBytes Buffers for enhancement payload bytes
protected List<CategoryEnhancement> | enhancements The category enhancements to handle
protected byte[] | payloadBytes The data buffer used for payload instance.
Fields inherited from class org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
categoryAttribute, indexingParams, payload, payloadAttribute, termAttribute
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
EnhancementsCategoryTokenizer(TokenStream input, EnhancementsIndexingParams indexingParams)
Constructor.
Method Summary
protected  void setPayload()
Set the payload of the current category token.
Methods inherited from class org.apache.lucene.facet.index.streaming.CategoryTokenizer
incrementToken
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

payloadBytes

protected byte[] payloadBytes
The data buffer used for payload instance.

enhancements

protected List<CategoryEnhancement> enhancements
The category enhancements to handle

enhancementBytes

protected byte[][] enhancementBytes
Buffers for enhancement payload bytes

Constructor Detail

EnhancementsCategoryTokenizer

public EnhancementsCategoryTokenizer(TokenStream input,
                                     EnhancementsIndexingParams indexingParams)
                              throws IOException
Constructor.

Parameters:
input - The stream of category tokens.
indexingParams - The indexing params to use.
Throws:
IOException
Method Detail

setPayload

protected void setPayload()
Description copied from class: CategoryTokenizer
Set the payload of the current category token.

Overrides:
setPayload in class CategoryTokenizer
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EnhancementsDocumentBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.enhancements
Class EnhancementsDocumentBuilder

java.lang.Object
    extended by  org.apache.lucene.facet.index.CategoryDocumentBuilder
        extended by  org.apache.lucene.facet.enhancements.EnhancementsDocumentBuilder

public class EnhancementsDocumentBuilder
extends CategoryDocumentBuilder

An EnhancementsDocumentBuilder is a CategoryDocumentBuilder which adds categories to documents according to the list of CategoryEnhancements from EnhancementsIndexingParams. The additions over CategoryDocumentBuilder could be in both category tokens, and additional category lists.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.facet.index.CategoryDocumentBuilder
categoriesMap, fieldList, indexingParams, taxonomyWriter
Constructor Summary
EnhancementsDocumentBuilder(TaxonomyWriter taxonomyWriter, EnhancementsIndexingParams params)
Method Summary
protected CategoryListTokenizer | getCategoryListTokenizer(TokenStream categoryStream) Get a category list tokenizer (or a series of such tokenizers) to create the category list tokens.
protected CategoryTokenizer | getCategoryTokenizer(TokenStream categoryStream) Get a CategoryTokenizer to create the category tokens.
protected TokenStream | getParentsStream(CategoryAttributesStream categoryAttributesStream) Get a stream of categories which includes the parents, according to policies defined in indexing parameters.
Methods inherited from class org.apache.lucene.facet.index.CategoryDocumentBuilder
build, fillCategoriesMap, getCountingListTokenizer, setCategories, setCategoryPaths
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EnhancementsDocumentBuilder

public EnhancementsDocumentBuilder(TaxonomyWriter taxonomyWriter,
                                   EnhancementsIndexingParams params)
                            throws IOException
Parameters:
taxonomyWriter -
params - Indexing params which include CategoryEnhancements.
Throws:
IOException
Method Detail

getParentsStream

protected TokenStream getParentsStream(CategoryAttributesStream categoryAttributesStream)
Description copied from class: CategoryDocumentBuilder
Get a stream of categories which includes the parents, according to policies defined in indexing parameters.

Overrides:
getParentsStream in class CategoryDocumentBuilder
Parameters:
categoryAttributesStream - The input stream
Returns:
The parents stream.
See Also:
OrdinalPolicy (for policy of adding category tokens for parents), PathPolicy (for policy of adding category list tokens for parents)

getCategoryListTokenizer

protected CategoryListTokenizer getCategoryListTokenizer(TokenStream categoryStream)
Description copied from class: CategoryDocumentBuilder
Get a category list tokenizer (or a series of such tokenizers) to create the category list tokens.

Overrides:
getCategoryListTokenizer in class CategoryDocumentBuilder
Parameters:
categoryStream - A stream containing CategoryAttribute with the relevant data.
Returns:
The category list tokenizer (or series of tokenizers) to be used in creating category list tokens.

getCategoryTokenizer

protected CategoryTokenizer getCategoryTokenizer(TokenStream categoryStream)
                                          throws IOException
Description copied from class: CategoryDocumentBuilder
Get a CategoryTokenizer to create the category tokens. This method can be overridden for adding more attributes to the category tokens.

Overrides:
getCategoryTokenizer in class CategoryDocumentBuilder
Parameters:
categoryStream - A stream containing CategoryAttribute with the relevant data.
Returns:
The CategoryTokenizer to be used in creating category tokens.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EnhancementsPayloadIterator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.enhancements
Class EnhancementsPayloadIterator

java.lang.Object
    extended by  org.apache.lucene.facet.search.PayloadIterator
        extended by  org.apache.lucene.facet.enhancements.EnhancementsPayloadIterator

public class EnhancementsPayloadIterator
extends PayloadIterator

A PayloadIterator for iterating over category posting lists generated using EnhancementsCategoryTokenizer.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.facet.search.PayloadIterator
buffer, payloadLength
Constructor Summary
EnhancementsPayloadIterator(List<CategoryEnhancement> enhancementsList, IndexReader indexReader, Term term)
Constructor.
Method Summary
Object | getCategoryData(CategoryEnhancement enhancedCategory) Get the data of the current category and document for a certain enhancement, or null if no such enhancement exists.
boolean | setdoc(int docId) Skip forward to document docId.
Methods inherited from class org.apache.lucene.facet.search.PayloadIterator
getBuffer, getPayloadLength, init
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EnhancementsPayloadIterator

public EnhancementsPayloadIterator(List<CategoryEnhancement> enhancementsList,
                                   IndexReader indexReader,
                                   Term term)
                            throws IOException
Constructor.

Parameters:
enhancementsList - A list of the CategoryEnhancements from the indexing params.
indexReader - A reader of the index.
term - The category term to iterate.
Throws:
IOException
Method Detail

setdoc

public boolean setdoc(int docId)
               throws IOException
Description copied from class: PayloadIterator
Skip forward to document docId. Return true if this document exists and has any payload.

Users should call this method with increasing docIds, and implementations can assume that this is the case.

Overrides:
setdoc in class PayloadIterator
Throws:
IOException

getCategoryData

public Object getCategoryData(CategoryEnhancement enhancedCategory)
Get the data of the current category and document for a certain enhancement, or null if no such enhancement exists.

Parameters:
enhancedCategory - The category enhancement to apply.
Returns:
the data of the current category and document for a certain enhancement, or null if no such enhancement exists.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.enhancements
Interfaces
CategoryEnhancement
Classes
EnhancementsCategoryTokenizer
EnhancementsDocumentBuilder
EnhancementsPayloadIterator


org.apache.lucene.facet.enhancements

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.enhancements

Enhanced category features

See:
Description

Interface Summary
CategoryEnhancement This interface allows easy addition of enhanced category features.

Class Summary
EnhancementsCategoryTokenizer | A tokenizer which adds to each category token payload according to the CategoryEnhancements defined in the given EnhancementsIndexingParams.
EnhancementsDocumentBuilder | An EnhancementsDocumentBuilder is a CategoryDocumentBuilder which adds categories to documents according to the list of CategoryEnhancements from EnhancementsIndexingParams.
EnhancementsPayloadIterator | A PayloadIterator for iterating over category posting lists generated using EnhancementsCategoryTokenizer.

Package org.apache.lucene.facet.enhancements Description

Enhanced category features

Mechanisms for addition of enhanced category features.

A CategoryEnhancement (which can correspond to a CategoryProperty) can contribute to the index in two possible ways:

  1. To each category with data relevant to the enhancement, add this data to the category's token payload, through CategoryEnhancement.getCategoryTokenBytes(). This data will be read during search using CategoryEnhancement.extractCategoryTokenData().
  2. To each document which contains categories with data relevant to the enhancement, add a CategoryListTokenizer through CategoryEnhancement.getCategoryListTokenizer() . The CategoryListTokenizer should add a single token which includes all the enhancement relevant data from the categories. The category list token's text is defined by CategoryEnhancement.getCategoryListTermText().


org.apache.lucene.facet.enhancements Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.enhancements

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
            • org.apache.lucene.facet.index.streaming.CategoryTokenizer
              • org.apache.lucene.facet.enhancements.EnhancementsCategoryTokenizer
    • org.apache.lucene.facet.index.CategoryDocumentBuilder
      • org.apache.lucene.facet.enhancements.EnhancementsDocumentBuilder
    • org.apache.lucene.facet.search.PayloadIterator
      • org.apache.lucene.facet.enhancements.EnhancementsPayloadIterator

Interface Hierarchy

  • org.apache.lucene.facet.enhancements.CategoryEnhancement


Uses of Package org.apache.lucene.facet.enhancements

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.enhancements

Packages that use org.apache.lucene.facet.enhancements
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.enhancements.params | Enhanced category features

Classes in org.apache.lucene.facet.enhancements used by org.apache.lucene.facet.enhancements
CategoryEnhancement
This interface allows easy addition of enhanced category features.

Classes in org.apache.lucene.facet.enhancements used by org.apache.lucene.facet.enhancements.association
CategoryEnhancement
This interface allows easy addition of enhanced category features.

Classes in org.apache.lucene.facet.enhancements used by org.apache.lucene.facet.enhancements.params
CategoryEnhancement
This interface allows easy addition of enhanced category features.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AssociationEnhancement

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.enhancements.association
Class AssociationEnhancement

java.lang.Object
    extended by  org.apache.lucene.facet.enhancements.association.AssociationEnhancement
All Implemented Interfaces:
CategoryEnhancement
public class AssociationEnhancement
extends Object
implements CategoryEnhancement

A CategoryEnhancement for adding associations data to the index (categories with AssociationPropertys).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
AssociationEnhancement()
Method Summary
boolean | equals(Object o) Category enhancements must override Object.equals(Object), as it is used in EnhancementsPayloadIterator.getCategoryData(CategoryEnhancement).
Object | extractCategoryTokenData(byte[] buffer, int offset, int length) Get the data of this enhancement from a category token payload.
boolean | generatesCategoryList() Declarative method to indicate whether this enhancement generates separate category list.
static AssociationProperty | getAssociationProperty(CategoryAttribute categoryAttribute)
String | getCategoryListTermText() Returns the text of this enhancement's category list term.
CategoryListTokenizer | getCategoryListTokenizer(TokenStream tokenizer, EnhancementsIndexingParams indexingParams, TaxonomyWriter taxonomyWriter) Get the CategoryListTokenizer which generates the category list for this enhancement.
byte[] | getCategoryTokenBytes(CategoryAttribute categoryAttribute) Get the bytes to be added to the category token payload for this enhancement.
Class<? extends CategoryProperty> | getRetainableProperty() Get a CategoryProperty class to be retained when creating CategoryParentsStream.
int | hashCode()
static boolean | isAssociationProperty(Class<? extends CategoryProperty> clazz) For a given class which extends a CategoryProperty, answers whether it is an instance of AssociationProperty (AP) or not.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AssociationEnhancement

public AssociationEnhancement()
Method Detail

isAssociationProperty

public static boolean isAssociationProperty(Class<? extends CategoryProperty> clazz)
For a given class which extends a CategoryProperty, answers whether it is an instance of AssociationProperty (AP) or not.
This method is a cheaper replacement for a call to instanceof. It has two HashSets - one for classes which are an extension to AP and one for the classes which are not. Whenever a property class is introduced:
  • if it is known as a property class extending AP (contained in the validHashSet)- returns true
  • if it is known as a property class NOT extending AP - returns false
  • If it was not matched against both sets, it calls 'instanceof' to find out if it extends AP, puts it in the matching Set and returning true or false accordingly
NOTE: 'instanceof' is only called once per a Class (not instance) of a property. And as there are few properties (currently 4 concrete implementations) the two sets would be rather small

generatesCategoryList

public boolean generatesCategoryList()
Description copied from interface: CategoryEnhancement
Declarative method to indicate whether this enhancement generates separate category list.

Specified by:
generatesCategoryList in interface CategoryEnhancement
Returns:
true if generates category list, else false.

getCategoryListTermText

public String getCategoryListTermText()
Description copied from interface: CategoryEnhancement
Returns the text of this enhancement's category list term.

Specified by:
getCategoryListTermText in interface CategoryEnhancement
Returns:
The text of this enhancement's category list term.

getCategoryListTokenizer

public CategoryListTokenizer getCategoryListTokenizer(TokenStream tokenizer,
                                                      EnhancementsIndexingParams indexingParams,
                                                      TaxonomyWriter taxonomyWriter)
Description copied from interface: CategoryEnhancement
Get the CategoryListTokenizer which generates the category list for this enhancement. If CategoryEnhancement.generatesCategoryList() returns false this method will not be called.

Specified by:
getCategoryListTokenizer in interface CategoryEnhancement
Parameters:
tokenizer - The input stream containing categories.
indexingParams - The indexing params to use.
taxonomyWriter - The taxonomy to add categories and get their ordinals.
Returns:
A CategoryListTokenizer generating the category list for this enhancement, with tokenizer as it's input.

getCategoryTokenBytes

public byte[] getCategoryTokenBytes(CategoryAttribute categoryAttribute)
Description copied from interface: CategoryEnhancement
Get the bytes to be added to the category token payload for this enhancement.

NOTE: The returned array is copied, it is recommended to allocate a new one each time.

The bytes generated by this method are the input of CategoryEnhancement.extractCategoryTokenData(byte[], int, int).

Specified by:
getCategoryTokenBytes in interface CategoryEnhancement
Parameters:
categoryAttribute - The attribute of the category.
Returns:
The bytes to be added to the category token payload for this enhancement.

getAssociationProperty

public static AssociationProperty getAssociationProperty(CategoryAttribute categoryAttribute)

extractCategoryTokenData

public Object extractCategoryTokenData(byte[] buffer,
                                       int offset,
                                       int length)
Description copied from interface: CategoryEnhancement
Get the data of this enhancement from a category token payload.

The input bytes for this method are generated in CategoryEnhancement.getCategoryTokenBytes(CategoryAttribute).

Specified by:
extractCategoryTokenData in interface CategoryEnhancement
Parameters:
buffer - The payload buffer.
offset - The offset of this enhancement's data in the buffer.
length - The length of this enhancement's data (bytes).
Returns:
An Object containing the data.

getRetainableProperty

public Class<? extends CategoryProperty> getRetainableProperty()
Description copied from interface: CategoryEnhancement
Get a CategoryProperty class to be retained when creating CategoryParentsStream.

Specified by:
getRetainableProperty in interface CategoryEnhancement
Returns:
the CategoryProperty class to be retained when creating CategoryParentsStream, or null if there is no such property.

equals

public boolean equals(Object o)
Description copied from interface: CategoryEnhancement
Category enhancements must override Object.equals(Object), as it is used in EnhancementsPayloadIterator.getCategoryData(CategoryEnhancement).

Specified by:
equals in interface CategoryEnhancement
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AssociationFloatProperty

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.enhancements.association
Class AssociationFloatProperty

java.lang.Object
    extended by  org.apache.lucene.facet.enhancements.association.AssociationProperty
        extended by  org.apache.lucene.facet.enhancements.association.AssociationFloatProperty
All Implemented Interfaces:
Serializable, CategoryProperty
public class AssociationFloatProperty
extends AssociationProperty

An AssociationProperty which treats the association as float - the association bits are actually float bits, and thus merging two associations is done by float summation.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.facet.enhancements.association.AssociationProperty
association
Constructor Summary
AssociationFloatProperty(float value)
Constructor.
Method Summary
boolean | equals(Object other)
float | getFloatAssociation()
int | hashCode()
void | merge(CategoryProperty other) When adding categories with properties to a certain document, it is possible that the same category will be added more than once with different instances of the same property.
String | toString()
Methods inherited from class org.apache.lucene.facet.enhancements.association.AssociationProperty
getAssociation, hasBeenSet
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

AssociationFloatProperty

public AssociationFloatProperty(float value)
Constructor.

Parameters:
value - The association value.
Method Detail

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

merge

public void merge(CategoryProperty other)
Description copied from interface: CategoryProperty
When adding categories with properties to a certain document, it is possible that the same category will be added more than once with different instances of the same property. This method defined how to treat such cases, by merging the newly added property into the one previously added. Implementing classes can assume that this method will be called only with a property of the same class.

Parameters:
other - The category property to merge.

getFloatAssociation

public float getFloatAssociation()

toString

public String toString()
Overrides:
toString in class AssociationProperty
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AssociationIntProperty

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.enhancements.association
Class AssociationIntProperty

java.lang.Object
    extended by  org.apache.lucene.facet.enhancements.association.AssociationProperty
        extended by  org.apache.lucene.facet.enhancements.association.AssociationIntProperty
All Implemented Interfaces:
Serializable, CategoryProperty
public class AssociationIntProperty
extends AssociationProperty

An AssociationProperty which treats the association as int - merges two associations by summation.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.facet.enhancements.association.AssociationProperty
association
Constructor Summary
AssociationIntProperty(int value)
Method Summary
boolean | equals(Object other)
int | hashCode()
void | merge(CategoryProperty other) When adding categories with properties to a certain document, it is possible that the same category will be added more than once with different instances of the same property.
Methods inherited from class org.apache.lucene.facet.enhancements.association.AssociationProperty
getAssociation, hasBeenSet, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

AssociationIntProperty

public AssociationIntProperty(int value)
Parameters:
value - The association value.
Method Detail

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

merge

public void merge(CategoryProperty other)
Description copied from interface: CategoryProperty
When adding categories with properties to a certain document, it is possible that the same category will be added more than once with different instances of the same property. This method defined how to treat such cases, by merging the newly added property into the one previously added. Implementing classes can assume that this method will be called only with a property of the same class.

Parameters:
other - The category property to merge.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AssociationListTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.enhancements.association
Class AssociationListTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
                    extended by  org.apache.lucene.facet.index.streaming.CategoryListTokenizer
                        extended by  org.apache.lucene.facet.enhancements.association.AssociationListTokenizer
All Implemented Interfaces:
Closeable
public class AssociationListTokenizer
extends CategoryListTokenizer

Tokenizer for associations of a category

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
protected  CategoryListPayloadStream payloadStream
Fields inherited from class org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
categoryAttribute, indexingParams, payload, payloadAttribute, termAttribute
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
AssociationListTokenizer(TokenStream input, EnhancementsIndexingParams indexingParams, CategoryEnhancement enhancement)
Method Summary
protected void | handleStartOfInput() A method invoked once when the input stream begins, for subclass-specific processing.
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.facet.index.streaming.CategoryListTokenizer
handleEndOfInput, reset
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

payloadStream

protected CategoryListPayloadStream payloadStream
Constructor Detail

AssociationListTokenizer

public AssociationListTokenizer(TokenStream input,
                                EnhancementsIndexingParams indexingParams,
                                CategoryEnhancement enhancement)
Method Detail

handleStartOfInput

protected void handleStartOfInput()
                           throws IOException
Description copied from class: CategoryListTokenizer
A method invoked once when the input stream begins, for subclass-specific processing. Subclass implementations must invoke this one, too!

Overrides:
handleStartOfInput in class CategoryListTokenizer
Throws:
IOException

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class CategoryListTokenizer
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AssociationProperty

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.enhancements.association
Class AssociationProperty

java.lang.Object
    extended by  org.apache.lucene.facet.enhancements.association.AssociationProperty
All Implemented Interfaces:
Serializable, CategoryProperty
Direct Known Subclasses:
AssociationFloatProperty, AssociationIntProperty
public abstract class AssociationProperty
extends Object
implements CategoryProperty

A CategoryProperty associating a single integer value to a CategoryAttribute. It should be used to describe the association between the category and the document.

This class leave to extending classes the definition of CategoryProperty.merge(CategoryProperty) policy for the integer associations.

Note: The association value is added both to a special category list, and to the category tokens.

See Also:
AssociationEnhancement, Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected  long association
Constructor Summary
AssociationProperty(int value)
Construct an AssociationProperty.
Method Summary
int | getAssociation() Returns the association value.
boolean | hasBeenSet() Returns whether this attribute has been set (not all categories have an association).
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.facet.index.attributes.CategoryProperty
merge

Field Detail

association

protected long association
Constructor Detail

AssociationProperty

public AssociationProperty(int value)
Construct an AssociationProperty.

Parameters:
value - The association value.
Method Detail

getAssociation

public int getAssociation()
Returns the association value.

Returns:
The association value.

hasBeenSet

public boolean hasBeenSet()
Returns whether this attribute has been set (not all categories have an association).

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AssociationsPayloadIterator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.enhancements.association
Class AssociationsPayloadIterator

java.lang.Object
    extended by  org.apache.lucene.facet.enhancements.association.AssociationsPayloadIterator

public class AssociationsPayloadIterator
extends Object

Allows easy iteration over the associations payload, decoding and breaking it to (ordinal, value) pairs, stored in a hash.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static Term | ASSOCIATION_POSTING_TERM Default Term for associations
static long | NO_ASSOCIATION The long-special-value returned for ordinals which have no associated int value.
Constructor Summary
AssociationsPayloadIterator(IndexReader reader, String field)
Construct a new association-iterator, initializing the inner payload iterator, with the supplied term and checking whether there are any associations within the given index
Method Summary
boolean | equals(Object obj)
IntIterator | getAssociatedOrdinals() Get an iterator over the ordinals which has an association for the document set by setNextDoc(int).
long | getAssociation(int ordinal) Get int association value for the given ordinal.
int | hashCode()
boolean | setNextDoc(int docId) Skipping to the next document, fetching its associations & populating the map.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

ASSOCIATION_POSTING_TERM

public static final Term ASSOCIATION_POSTING_TERM
Default Term for associations

NO_ASSOCIATION

public static final long NO_ASSOCIATION
The long-special-value returned for ordinals which have no associated int value. It is not in the int range of values making it a valid mark.

See Also:
Constant Field Values
Constructor Detail

AssociationsPayloadIterator

public AssociationsPayloadIterator(IndexReader reader,
                                   String field)
                            throws IOException
Construct a new association-iterator, initializing the inner payload iterator, with the supplied term and checking whether there are any associations within the given index

Parameters:
reader - a reader containing the postings to be iterated
field - the field containing the relevant associations list term
Throws:
IOException
Method Detail

setNextDoc

public boolean setNextDoc(int docId)
                   throws IOException
Skipping to the next document, fetching its associations & populating the map.

Parameters:
docId - document id to be skipped to
Returns:
true if the document contains associations and they were fetched correctly. false otherwise.
Throws:
IOException - on error

getAssociation

public long getAssociation(int ordinal)
Get int association value for the given ordinal.
The return is either an int value casted as long if the ordinal has an associated value. Otherwise the returned value would be NO_ASSOCIATION which is 'pure long' value (e.g not in the int range of values)

Parameters:
ordinal - for which the association value is requested
Returns:
the associated int value (encapsulated in a long) if the ordinal had an associated value, or NO_ASSOCIATION otherwise

getAssociatedOrdinals

public IntIterator getAssociatedOrdinals()
Get an iterator over the ordinals which has an association for the document set by setNextDoc(int).

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.enhancements.association
Classes
AssociationEnhancement
AssociationFloatProperty
AssociationIntProperty
AssociationListTokenizer
AssociationProperty
AssociationsPayloadIterator


org.apache.lucene.facet.enhancements.association

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.enhancements.association

Association category enhancements

See:
Description

Class Summary
AssociationEnhancement | A CategoryEnhancement for adding associations data to the index (categories with AssociationPropertys).
AssociationFloatProperty | An AssociationProperty which treats the association as float - the association bits are actually float bits, and thus merging two associations is done by float summation.
AssociationIntProperty | An AssociationProperty which treats the association as int - merges two associations by summation.
AssociationListTokenizer | Tokenizer for associations of a category
AssociationProperty | A CategoryProperty associating a single integer value to a CategoryAttribute.
AssociationsPayloadIterator | Allows easy iteration over the associations payload, decoding and breaking it to (ordinal, value) pairs, stored in a hash.

Package org.apache.lucene.facet.enhancements.association Description

Association category enhancements

A CategoryEnhancement for adding associations data to the index (categories with AssociationProperty's).


org.apache.lucene.facet.enhancements.association Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.enhancements.association

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.enhancements.association.AssociationEnhancement (implements org.apache.lucene.facet.enhancements.CategoryEnhancement)
    • org.apache.lucene.facet.enhancements.association.AssociationProperty (implements org.apache.lucene.facet.index.attributes.CategoryProperty)
      • org.apache.lucene.facet.enhancements.association.AssociationFloatProperty
      • org.apache.lucene.facet.enhancements.association.AssociationIntProperty
    • org.apache.lucene.facet.enhancements.association.AssociationsPayloadIterator
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
            • org.apache.lucene.facet.index.streaming.CategoryListTokenizer
              • org.apache.lucene.facet.enhancements.association.AssociationListTokenizer


Uses of Package org.apache.lucene.facet.enhancements.association

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.enhancements.association

Packages that use org.apache.lucene.facet.enhancements.association
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.search.aggregator.association | Association-based aggregators.

Classes in org.apache.lucene.facet.enhancements.association used by org.apache.lucene.facet.enhancements.association
AssociationProperty
A CategoryProperty associating a single integer value to a CategoryAttribute.

Classes in org.apache.lucene.facet.enhancements.association used by org.apache.lucene.facet.search.aggregator.association
AssociationsPayloadIterator
Allows easy iteration over the associations payload, decoding and breaking it to (ordinal, value) pairs, stored in a hash.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.enhancements.association.AssociationEnhancement

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.enhancements.association.AssociationEnhancement

No usage of org.apache.lucene.facet.enhancements.association.AssociationEnhancement

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.enhancements.association.AssociationFloatProperty

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.enhancements.association.AssociationFloatProperty

No usage of org.apache.lucene.facet.enhancements.association.AssociationFloatProperty

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.enhancements.association.AssociationIntProperty

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.enhancements.association.AssociationIntProperty

No usage of org.apache.lucene.facet.enhancements.association.AssociationIntProperty

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.enhancements.association.AssociationListTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.enhancements.association.AssociationListTokenizer

No usage of org.apache.lucene.facet.enhancements.association.AssociationListTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.enhancements.association.AssociationProperty

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.enhancements.association.AssociationProperty

Packages that use AssociationProperty
org.apache.lucene.facet.enhancements.association Association category enhancements

Uses of AssociationProperty in org.apache.lucene.facet.enhancements.association

Subclasses of AssociationProperty in org.apache.lucene.facet.enhancements.association
class | AssociationFloatProperty An AssociationProperty which treats the association as float - the association bits are actually float bits, and thus merging two associations is done by float summation.
class | AssociationIntProperty An AssociationProperty which treats the association as int - merges two associations by summation.

Methods in org.apache.lucene.facet.enhancements.association that return AssociationProperty
static AssociationProperty AssociationEnhancement.getAssociationProperty(CategoryAttribute categoryAttribute)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.enhancements.association.AssociationsPayloadIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.enhancements.association.AssociationsPayloadIterator

Packages that use AssociationsPayloadIterator
org.apache.lucene.facet.search.aggregator.association Association-based aggregators.

Uses of AssociationsPayloadIterator in org.apache.lucene.facet.search.aggregator.association

Fields in org.apache.lucene.facet.search.aggregator.association declared as AssociationsPayloadIterator
protected AssociationsPayloadIterator | AssociationFloatSumAggregator.associationsPayloadIterator
protected AssociationsPayloadIterator | AssociationIntSumAggregator.associationsPayloadIterator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.enhancements.CategoryEnhancement

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.enhancements.CategoryEnhancement

Packages that use CategoryEnhancement
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.enhancements.params | Enhanced category features

Uses of CategoryEnhancement in org.apache.lucene.facet.enhancements

Fields in org.apache.lucene.facet.enhancements with type parameters of type CategoryEnhancement
protected  List<CategoryEnhancement> EnhancementsCategoryTokenizer.enhancements
The category enhancements to handle

Methods in org.apache.lucene.facet.enhancements with parameters of type CategoryEnhancement
 Object EnhancementsPayloadIterator.getCategoryData(CategoryEnhancement enhancedCategory)
Get the data of the current category and document for a certain enhancement, or null if no such enhancement exists.

Constructor parameters in org.apache.lucene.facet.enhancements with type arguments of type CategoryEnhancement
EnhancementsPayloadIterator(List<CategoryEnhancement> enhancementsList, IndexReader indexReader, Term term)
Constructor.

Uses of CategoryEnhancement in org.apache.lucene.facet.enhancements.association

Classes in org.apache.lucene.facet.enhancements.association that implement CategoryEnhancement
 class AssociationEnhancement
A CategoryEnhancement for adding associations data to the index (categories with AssociationPropertys).

Constructors in org.apache.lucene.facet.enhancements.association with parameters of type CategoryEnhancement
AssociationListTokenizer(TokenStream input, EnhancementsIndexingParams indexingParams, CategoryEnhancement enhancement)

Uses of CategoryEnhancement in org.apache.lucene.facet.enhancements.params

Methods in org.apache.lucene.facet.enhancements.params that return types with arguments of type CategoryEnhancement
List<CategoryEnhancement> | EnhancementsIndexingParams.getCategoryEnhancements() Get a list of the active category enhancements.
List<CategoryEnhancement> | DefaultEnhancementsIndexingParams.getCategoryEnhancements()

Methods in org.apache.lucene.facet.enhancements.params with parameters of type CategoryEnhancement
void | EnhancementsIndexingParams.addCategoryEnhancements(CategoryEnhancement... enhancements) Add CategoryEnhancements to the indexing parameters
void | DefaultEnhancementsIndexingParams.addCategoryEnhancements(CategoryEnhancement... enhancements)

Constructors in org.apache.lucene.facet.enhancements.params with parameters of type CategoryEnhancement
DefaultEnhancementsIndexingParams(CategoryEnhancement... enhancements)
Construct with a certain enhancement
DefaultEnhancementsIndexingParams(CategoryListParams categoryListParams, CategoryEnhancement... enhancements)
Construct with certain enhancements and CategoryListParams

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.enhancements.EnhancementsCategoryTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.enhancements.EnhancementsCategoryTokenizer

No usage of org.apache.lucene.facet.enhancements.EnhancementsCategoryTokenizer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.enhancements.EnhancementsDocumentBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.enhancements.EnhancementsDocumentBuilder

No usage of org.apache.lucene.facet.enhancements.EnhancementsDocumentBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.enhancements.EnhancementsPayloadIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.enhancements.EnhancementsPayloadIterator

No usage of org.apache.lucene.facet.enhancements.EnhancementsPayloadIterator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


DefaultEnhancementsIndexingParams

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.enhancements.params
Class DefaultEnhancementsIndexingParams

java.lang.Object
    extended by  org.apache.lucene.facet.index.params.DefaultFacetIndexingParams
        extended by  org.apache.lucene.facet.index.params.PerDimensionIndexingParams
            extended by  org.apache.lucene.facet.enhancements.params.DefaultEnhancementsIndexingParams
All Implemented Interfaces:
Serializable, EnhancementsIndexingParams, FacetIndexingParams
public class DefaultEnhancementsIndexingParams
extends PerDimensionIndexingParams
implements EnhancementsIndexingParams

Default implementation of EnhancementsIndexingParams

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams
DEFAULT_FACET_DELIM_CHAR
Constructor Summary
DefaultEnhancementsIndexingParams(CategoryEnhancement... enhancements)
Construct with a certain enhancement
DefaultEnhancementsIndexingParams(CategoryListParams categoryListParams, CategoryEnhancement... enhancements)
Construct with certain enhancements and CategoryListParams
Method Summary
void | addCategoryEnhancements(CategoryEnhancement... enhancements) Add CategoryEnhancements to the indexing parameters
List<CategoryEnhancement> | getCategoryEnhancements() Get a list of the active category enhancements.
List<Class<? extends CategoryProperty>> | getRetainableProperties() Get a list of CategoryProperty classes to be retained when creating CategoryParentsStream.
Methods inherited from class org.apache.lucene.facet.index.params.PerDimensionIndexingParams
addCategoryListParams, getAllCategoryListParams, getCategoryListParams
Methods inherited from class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams
drillDownTermText, equals, fixedOrdinalPolicy, fixedPartitionSize, fixedPathPolicy, getFacetDelimChar, getOrdinalPolicy, getPartitionSize, getPathPolicy, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.facet.index.params.FacetIndexingParams
drillDownTermText, getAllCategoryListParams, getCategoryListParams, getFacetDelimChar, getOrdinalPolicy, getPartitionSize, getPathPolicy

Constructor Detail

DefaultEnhancementsIndexingParams

public DefaultEnhancementsIndexingParams(CategoryEnhancement... enhancements)
Construct with a certain enhancement

Throws:
IllegalArgumentException - if no enhancements are provided

DefaultEnhancementsIndexingParams

public DefaultEnhancementsIndexingParams(CategoryListParams categoryListParams,
                                         CategoryEnhancement... enhancements)
Construct with certain enhancements and CategoryListParams

Throws:
IllegalArgumentException - if no enhancements are provided
Method Detail

addCategoryEnhancements

public void addCategoryEnhancements(CategoryEnhancement... enhancements)
Description copied from interface: EnhancementsIndexingParams
Add CategoryEnhancements to the indexing parameters

Specified by:
addCategoryEnhancements in interface EnhancementsIndexingParams
Parameters:
enhancements - enhancements to add

getCategoryEnhancements

public List<CategoryEnhancement> getCategoryEnhancements()
Description copied from interface: EnhancementsIndexingParams
Get a list of the active category enhancements. If no enhancements exist return null. The order of enhancements in the returned list dictates the order in which the enhancements data appear in the category tokens payload.

Specified by:
getCategoryEnhancements in interface EnhancementsIndexingParams
Returns:
A list of the active category enhancements, or null if there are no enhancements.

getRetainableProperties

public List<Class<? extends CategoryProperty>> getRetainableProperties()
Description copied from interface: EnhancementsIndexingParams
Get a list of CategoryProperty classes to be retained when creating CategoryParentsStream.

Specified by:
getRetainableProperties in interface EnhancementsIndexingParams
Returns:
the list of CategoryProperty classes to be retained when creating CategoryParentsStream, or null if there are no such properties.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


EnhancementsIndexingParams

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.enhancements.params
Interface EnhancementsIndexingParams

All Superinterfaces:
FacetIndexingParams, Serializable
All Known Implementing Classes:
DefaultEnhancementsIndexingParams
public interface EnhancementsIndexingParams
extends FacetIndexingParams

Facet indexing parameters for defining category enhancements. It must contain at least one enhancement, otherwise nothing is "enhanced" about it. When there are more than one, the order matters - see getCategoryEnhancements().

See Also:
EnhancementsDocumentBuilder
WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
void | addCategoryEnhancements(CategoryEnhancement... enhancements) Add CategoryEnhancements to the indexing parameters
List<CategoryEnhancement> | getCategoryEnhancements() Get a list of the active category enhancements.
List<Class<? extends CategoryProperty>> | getRetainableProperties() Get a list of CategoryProperty classes to be retained when creating CategoryParentsStream.
Methods inherited from interface org.apache.lucene.facet.index.params.FacetIndexingParams
drillDownTermText, getAllCategoryListParams, getCategoryListParams, getFacetDelimChar, getOrdinalPolicy, getPartitionSize, getPathPolicy

Method Detail

addCategoryEnhancements

void addCategoryEnhancements(CategoryEnhancement... enhancements)
Add CategoryEnhancements to the indexing parameters

Parameters:
enhancements - enhancements to add

getCategoryEnhancements

List<CategoryEnhancement> getCategoryEnhancements()
Get a list of the active category enhancements. If no enhancements exist return null. The order of enhancements in the returned list dictates the order in which the enhancements data appear in the category tokens payload.

Returns:
A list of the active category enhancements, or null if there are no enhancements.

getRetainableProperties

List<Class<? extends CategoryProperty>> getRetainableProperties()
Get a list of CategoryProperty classes to be retained when creating CategoryParentsStream.

Returns:
the list of CategoryProperty classes to be retained when creating CategoryParentsStream, or null if there are no such properties.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.enhancements.params
Interfaces
EnhancementsIndexingParams
Classes
DefaultEnhancementsIndexingParams


org.apache.lucene.facet.enhancements.params

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.enhancements.params

Enhanced category features

See:
Description

Interface Summary
EnhancementsIndexingParams Facet indexing parameters for defining category enhancements.

Class Summary
DefaultEnhancementsIndexingParams Default implementation of EnhancementsIndexingParams

Package org.apache.lucene.facet.enhancements.params Description

Enhanced category features

FacetIndexingParams used by EnhancementsDocumentBuilder for adding CategoryEnhancement's to the indexing parameters, and accessing them during indexing and search.


org.apache.lucene.facet.enhancements.params Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.enhancements.params

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.index.params.DefaultFacetIndexingParams (implements org.apache.lucene.facet.index.params.FacetIndexingParams)
      • org.apache.lucene.facet.index.params.PerDimensionIndexingParams
        • org.apache.lucene.facet.enhancements.params.DefaultEnhancementsIndexingParams (implements org.apache.lucene.facet.enhancements.params.EnhancementsIndexingParams)

Interface Hierarchy

  • java.io.Serializable
    • org.apache.lucene.facet.index.params.FacetIndexingParams
      • org.apache.lucene.facet.enhancements.params.EnhancementsIndexingParams


Uses of Package org.apache.lucene.facet.enhancements.params

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.enhancements.params

Packages that use org.apache.lucene.facet.enhancements.params
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.enhancements.params | Enhanced category features

Classes in org.apache.lucene.facet.enhancements.params used by org.apache.lucene.facet.enhancements
EnhancementsIndexingParams
Facet indexing parameters for defining category enhancements.

Classes in org.apache.lucene.facet.enhancements.params used by org.apache.lucene.facet.enhancements.association
EnhancementsIndexingParams
Facet indexing parameters for defining category enhancements.

Classes in org.apache.lucene.facet.enhancements.params used by org.apache.lucene.facet.enhancements.params
EnhancementsIndexingParams
Facet indexing parameters for defining category enhancements.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.enhancements.params.DefaultEnhancementsIndexingParams

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.enhancements.params.DefaultEnhancementsIndexingParams

No usage of org.apache.lucene.facet.enhancements.params.DefaultEnhancementsIndexingParams

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.enhancements.params.EnhancementsIndexingParams

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.enhancements.params.EnhancementsIndexingParams

Packages that use EnhancementsIndexingParams
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.enhancements.params | Enhanced category features

Uses of EnhancementsIndexingParams in org.apache.lucene.facet.enhancements

Methods in org.apache.lucene.facet.enhancements with parameters of type EnhancementsIndexingParams
 CategoryListTokenizer CategoryEnhancement.getCategoryListTokenizer(TokenStream tokenizer, EnhancementsIndexingParams indexingParams, TaxonomyWriter taxonomyWriter)
Get the CategoryListTokenizer which generates the category list for this enhancement.

Constructors in org.apache.lucene.facet.enhancements with parameters of type EnhancementsIndexingParams
EnhancementsCategoryTokenizer(TokenStream input, EnhancementsIndexingParams indexingParams)
Constructor.
EnhancementsDocumentBuilder(TaxonomyWriter taxonomyWriter, EnhancementsIndexingParams params)

Uses of EnhancementsIndexingParams in org.apache.lucene.facet.enhancements.association

Methods in org.apache.lucene.facet.enhancements.association with parameters of type EnhancementsIndexingParams
 CategoryListTokenizer AssociationEnhancement.getCategoryListTokenizer(TokenStream tokenizer, EnhancementsIndexingParams indexingParams, TaxonomyWriter taxonomyWriter)

Constructors in org.apache.lucene.facet.enhancements.association with parameters of type EnhancementsIndexingParams
AssociationListTokenizer(TokenStream input, EnhancementsIndexingParams indexingParams, CategoryEnhancement enhancement)

Uses of EnhancementsIndexingParams in org.apache.lucene.facet.enhancements.params

Classes in org.apache.lucene.facet.enhancements.params that implement EnhancementsIndexingParams
 class DefaultEnhancementsIndexingParams
Default implementation of EnhancementsIndexingParams

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CategoryContainer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index
Class CategoryContainer

java.lang.Object
    extended by  org.apache.lucene.facet.index.CategoryContainer
All Implemented Interfaces:
Serializable, Iterable<CategoryAttribute>
public class CategoryContainer
extends Object
implements Iterable<CategoryAttribute>, Serializable

A container to add categories which are to be introduced to CategoryDocumentBuilder.setCategories(Iterable). Categories can be added with Properties.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected  Map<CategoryPath,CategoryAttribute> map
Constructor Summary
CategoryContainer()
Constructor.
Method Summary
CategoryAttribute | addCategory(CategoryAttribute categoryAttribute) Add an entire CategoryAttribute.
CategoryAttribute | addCategory(CategoryPath categoryPath) Add a category.
CategoryAttribute | addCategory(CategoryPath categoryPath, CategoryProperty... properties) Add a category with multiple properties.
CategoryAttribute | addCategory(CategoryPath categoryPath, CategoryProperty property) Add a category with a property.
void | clear() Remove all categories.
protected void | deserializeCategoryAttribute(ObjectInputStream in) De-Serialize each of the CategoryAttributes from the given ObjectInputStream.
boolean | equals(Object o)
CategoryAttribute | getCategoryAttribute(CategoryPath categoryPath) Get the CategoryAttribute this container has for a certain category, or null if the category is not in the container.
int | hashCode()
Iterator<CategoryAttribute> | iterator()
void | merge(CategoryContainer other) Add the categories from another CategoryContainer to this one.
protected void | serializeCategoryAttribute(ObjectOutputStream out, CategoryAttribute ca) Serialize each of the CategoryAttributes to the given ObjectOutputStream. NOTE: CategoryPropertys are Serializable, but do not assume that Lucene's Attributes are as well
int | size() Get the number of categories in the container.
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

map

protected transient Map<CategoryPath,CategoryAttribute> map
Constructor Detail

CategoryContainer

public CategoryContainer()
Constructor.

Method Detail

addCategory

public CategoryAttribute addCategory(CategoryPath categoryPath)
Add a category.

Parameters:
categoryPath - The path of the category.
Returns:
The CategoryAttribute of the category.

addCategory

public CategoryAttribute addCategory(CategoryPath categoryPath,
                                     CategoryProperty property)
Add a category with a property.

Parameters:
categoryPath - The path of the category.
property - The property to associate to the category.
Returns:
The CategoryAttribute of the category.

addCategory

public CategoryAttribute addCategory(CategoryPath categoryPath,
                                     CategoryProperty... properties)
Add a category with multiple properties.

Parameters:
categoryPath - The path of the category.
properties - The properties to associate to the category.
Returns:
The CategoryAttribute of the category.

addCategory

public CategoryAttribute addCategory(CategoryAttribute categoryAttribute)
Add an entire CategoryAttribute.

Parameters:
categoryAttribute - The CategoryAttribute to add.
Returns:
The CategoryAttribute of the category (could be different from the one provided).

getCategoryAttribute

public CategoryAttribute getCategoryAttribute(CategoryPath categoryPath)
Get the CategoryAttribute this container has for a certain category, or null if the category is not in the container.

Parameters:
categoryPath - The category path of the requested category.

iterator

public Iterator<CategoryAttribute> iterator()
Specified by:
iterator in interface Iterable<CategoryAttribute>

clear

public void clear()
Remove all categories.

merge

public void merge(CategoryContainer other)
Add the categories from another CategoryContainer to this one.

size

public int size()
Get the number of categories in the container.

Returns:
The number of categories in the container.

toString

public String toString()
Overrides:
toString in class Object

serializeCategoryAttribute

protected void serializeCategoryAttribute(ObjectOutputStream out,
                                          CategoryAttribute ca)
                                   throws IOException
Serialize each of the CategoryAttributes to the given ObjectOutputStream.
NOTE: CategoryPropertys are Serializable, but do not assume that Lucene's Attributes are as well

Throws:
IOException

deserializeCategoryAttribute

protected void deserializeCategoryAttribute(ObjectInputStream in)
                                     throws IOException,
                                            ClassNotFoundException
De-Serialize each of the CategoryAttributes from the given ObjectInputStream.

Throws:
IOException
ClassNotFoundException

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CategoryDocumentBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index
Class CategoryDocumentBuilder

java.lang.Object
    extended by  org.apache.lucene.facet.index.CategoryDocumentBuilder
Direct Known Subclasses:
EnhancementsDocumentBuilder
public class CategoryDocumentBuilder
extends Object

A utility class which allows attachment of CategoryPaths or CategoryAttributes to a given document using a taxonomy.
Construction could be done with either a given FacetIndexingParams or the default implementation DefaultFacetIndexingParams.
A CategoryDocumentBuilder can be reused by repeatedly setting the categories and building the document. Categories are provided either as CategoryAttribute elements through setCategories(Iterable), or as CategoryPath elements through setCategoryPaths(Iterable).

Note that both setCategories(Iterable) and setCategoryPaths(Iterable) return this CategoryDocumentBuilder, allowing the following pattern: new CategoryDocumentBuilder(taxonomy, params).setCategories(categories).build(doc).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected Map<String,List<CategoryAttribute>> | categoriesMap
protected ArrayList<Field> | fieldList A list of fields which is filled at ancestors' construction and used during build(Document).
protected FacetIndexingParams | indexingParams Parameters to be used when indexing categories.
protected TaxonomyWriter | taxonomyWriter A TaxonomyWriter for adding categories and retrieving their ordinals.
Constructor Summary
CategoryDocumentBuilder(TaxonomyWriter taxonomyWriter)
Creating a facets document builder with default facet indexing parameters.
See: CategoryDocumentBuilder(TaxonomyWriter, FacetIndexingParams)
CategoryDocumentBuilder(TaxonomyWriter taxonomyWriter, FacetIndexingParams params)
Creating a facets document builder with a given facet indexing parameters object.

Method Summary
Document | build(Document doc) Adds the fields created in one of the "set" methods to the document
protected void | fillCategoriesMap(Iterable<CategoryAttribute> categories) Fills the categories mapping between a field name and a list of categories that belongs to it according to this builder's FacetIndexingParams object
protected CategoryListTokenizer | getCategoryListTokenizer(TokenStream categoryStream) Get a category list tokenizer (or a series of such tokenizers) to create the category list tokens.
protected CategoryTokenizer | getCategoryTokenizer(TokenStream categoryStream) Get a CategoryTokenizer to create the category tokens.
protected CountingListTokenizer | getCountingListTokenizer(TokenStream categoryStream) Get a CountingListTokenizer for creating counting list token.
protected TokenStream | getParentsStream(CategoryAttributesStream categoryAttributesStream) Get a stream of categories which includes the parents, according to policies defined in indexing parameters.
CategoryDocumentBuilder | setCategories(Iterable<CategoryAttribute> categories) Set the categories of the document builder from an Iterable of CategoryAttribute objects.
CategoryDocumentBuilder | setCategoryPaths(Iterable<CategoryPath> categoryPaths) Set the categories of the document builder from an Iterable of CategoryPath objects.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

taxonomyWriter

protected final TaxonomyWriter taxonomyWriter
A TaxonomyWriter for adding categories and retrieving their ordinals.

indexingParams

protected final FacetIndexingParams indexingParams
Parameters to be used when indexing categories.

fieldList

protected final ArrayList<Field> fieldList
A list of fields which is filled at ancestors' construction and used during build(Document).

categoriesMap

protected Map<String,List<CategoryAttribute>> categoriesMap
Constructor Detail

CategoryDocumentBuilder

public CategoryDocumentBuilder(TaxonomyWriter taxonomyWriter)
                        throws IOException
Creating a facets document builder with default facet indexing parameters.
See: CategoryDocumentBuilder(TaxonomyWriter, FacetIndexingParams)

Parameters:
taxonomyWriter - to which new categories will be added, as well as translating known categories to ordinals
Throws:
IOException

CategoryDocumentBuilder

public CategoryDocumentBuilder(TaxonomyWriter taxonomyWriter,
                               FacetIndexingParams params)
                        throws IOException
Creating a facets document builder with a given facet indexing parameters object.

Parameters:
taxonomyWriter - to which new categories will be added, as well as translating known categories to ordinals
params - holds all parameters the indexing process should use such as category-list parameters
Throws:
IOException
Method Detail

setCategoryPaths

public CategoryDocumentBuilder setCategoryPaths(Iterable<CategoryPath> categoryPaths)
                                         throws IOException
Set the categories of the document builder from an Iterable of CategoryPath objects.

Parameters:
categoryPaths - An iterable of CategoryPath objects which holds the categories (facets) which will be added to the document at build(Document)
Returns:
This CategoryDocumentBuilder, to enable this one line call: new CategoryDocumentBuilder(TaxonomyWriter). setCategoryPaths(Iterable).build(Document).
Throws:
IOException

setCategories

public CategoryDocumentBuilder setCategories(Iterable<CategoryAttribute> categories)
                                      throws IOException
Set the categories of the document builder from an Iterable of CategoryAttribute objects.

Parameters:
categories - An iterable of CategoryAttribute objects which holds the categories (facets) which will be added to the document at build(Document)
Returns:
This CategoryDocumentBuilder, to enable this one line call: new CategoryDocumentBuilder(TaxonomyWriter). setCategories(Iterable).build(Document).
Throws:
IOException

getParentsStream

protected TokenStream getParentsStream(CategoryAttributesStream categoryAttributesStream)
Get a stream of categories which includes the parents, according to policies defined in indexing parameters.

Parameters:
categoryAttributesStream - The input stream
Returns:
The parents stream.
See Also:
OrdinalPolicy (for policy of adding category tokens for parents), PathPolicy (for policy of adding category list tokens for parents)

fillCategoriesMap

protected void fillCategoriesMap(Iterable<CategoryAttribute> categories)
                          throws IOException
Fills the categories mapping between a field name and a list of categories that belongs to it according to this builder's FacetIndexingParams object

Parameters:
categories - Iterable over the category attributes
Throws:
IOException

getCategoryListTokenizer

protected CategoryListTokenizer getCategoryListTokenizer(TokenStream categoryStream)
Get a category list tokenizer (or a series of such tokenizers) to create the category list tokens.

Parameters:
categoryStream - A stream containing CategoryAttribute with the relevant data.
Returns:
The category list tokenizer (or series of tokenizers) to be used in creating category list tokens.

getCountingListTokenizer

protected CountingListTokenizer getCountingListTokenizer(TokenStream categoryStream)
Get a CountingListTokenizer for creating counting list token.

Parameters:
categoryStream - A stream containing CategoryAttributes with the relevant data.
Returns:
A counting list tokenizer to be used in creating counting list token.

getCategoryTokenizer

protected CategoryTokenizer getCategoryTokenizer(TokenStream categoryStream)
                                          throws IOException
Get a CategoryTokenizer to create the category tokens. This method can be overridden for adding more attributes to the category tokens.

Parameters:
categoryStream - A stream containing CategoryAttribute with the relevant data.
Returns:
The CategoryTokenizer to be used in creating category tokens.
Throws:
IOException

build

public Document build(Document doc)
Adds the fields created in one of the "set" methods to the document

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CategoryListPayloadStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index
Class CategoryListPayloadStream

java.lang.Object
    extended by  org.apache.lucene.facet.index.CategoryListPayloadStream

public class CategoryListPayloadStream
extends Object

Accumulates category IDs for a single document, for writing in byte array form, for example, to a Lucene Payload.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
CategoryListPayloadStream(IntEncoder encoder)
Creates a Payload stream using the specified encoder.
Method Summary
void | appendIntToStream(int intValue) Appends an integer to the stream.
byte[] | convertStreamToByteArray() Returns the streamed bytes so far accumulated, as an array of bytes.
void | reset() Resets this stream to begin building a new payload.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CategoryListPayloadStream

public CategoryListPayloadStream(IntEncoder encoder)
Creates a Payload stream using the specified encoder.

Method Detail

appendIntToStream

public void appendIntToStream(int intValue)
                       throws IOException
Appends an integer to the stream.

Throws:
IOException

convertStreamToByteArray

public byte[] convertStreamToByteArray()
Returns the streamed bytes so far accumulated, as an array of bytes.

reset

public void reset()
           throws IOException
Resets this stream to begin building a new payload.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index
Class FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor

java.lang.Object
    extended by  org.apache.lucene.index.PayloadProcessorProvider.ReaderPayloadProcessor
        extended by  org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor
Enclosing class:
FacetsPayloadProcessorProvider
public static class FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor
extends PayloadProcessorProvider.ReaderPayloadProcessor

Constructor Summary
protected FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor(FacetIndexingParams indexingParams, int[] ordinalMap)
Construct FacetsDirPayloadProcessor with custom FacetIndexingParams
Method Summary
 PayloadProcessorProvider.PayloadProcessor getProcessor(Term term)
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for the given term.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor

protected FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor(FacetIndexingParams indexingParams,
                                                                   int[] ordinalMap)
Construct FacetsDirPayloadProcessor with custom FacetIndexingParams

Parameters:
ordinalMap - an array mapping previous facets ordinals to new ones
indexingParams - the facets indexing parameters
Method Detail

getProcessor

public PayloadProcessorProvider.PayloadProcessor getProcessor(Term term)
                                                       throws IOException
Description copied from class: PayloadProcessorProvider.ReaderPayloadProcessor
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for the given term.

Specified by:
getProcessor in class PayloadProcessorProvider.ReaderPayloadProcessor
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FacetsPayloadProcessorProvider.FacetsPayloadProcessor

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index
Class FacetsPayloadProcessorProvider.FacetsPayloadProcessor

java.lang.Object
    extended by  org.apache.lucene.index.PayloadProcessorProvider.PayloadProcessor
        extended by  org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsPayloadProcessor
Enclosing class:
FacetsPayloadProcessorProvider
public static class FacetsPayloadProcessorProvider.FacetsPayloadProcessor
extends PayloadProcessorProvider.PayloadProcessor

A PayloadProcessor for updating facets ordinal references, based on an ordinal map

Constructor Summary
protected FacetsPayloadProcessorProvider.FacetsPayloadProcessor(CategoryListParams params, int[] ordinalMap)
Method Summary
 int payloadLength()
Returns the length of the payload that was returned by PayloadProcessorProvider.PayloadProcessor.processPayload(byte[], int, int).
 byte[] processPayload(byte[] payload, int start, int length)
Process the incoming payload and returns the resulting byte[].
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FacetsPayloadProcessorProvider.FacetsPayloadProcessor

protected FacetsPayloadProcessorProvider.FacetsPayloadProcessor(CategoryListParams params,
                                                                int[] ordinalMap)
Parameters:
params - defines the encoding of facet ordinals as payload
ordinalMap - an array mapping previous facets ordinals to new ones
Method Detail

payloadLength

public int payloadLength()
                  throws IOException
Description copied from class: PayloadProcessorProvider.PayloadProcessor
Returns the length of the payload that was returned by PayloadProcessorProvider.PayloadProcessor.processPayload(byte[], int, int).

Specified by:
payloadLength in class PayloadProcessorProvider.PayloadProcessor
Throws:
IOException

processPayload

public byte[] processPayload(byte[] payload,
                             int start,
                             int length)
                      throws IOException
Description copied from class: PayloadProcessorProvider.PayloadProcessor
Process the incoming payload and returns the resulting byte[]. Note that a new array might be allocated if the given array is not big enough. The length of the new payload data can be obtained via PayloadProcessorProvider.PayloadProcessor.payloadLength().

Specified by:
processPayload in class PayloadProcessorProvider.PayloadProcessor
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


FacetsPayloadProcessorProvider

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index
Class FacetsPayloadProcessorProvider

java.lang.Object
    extended by  org.apache.lucene.index.PayloadProcessorProvider
        extended by  org.apache.lucene.facet.index.FacetsPayloadProcessorProvider

public class FacetsPayloadProcessorProvider
extends PayloadProcessorProvider

A PayloadProcessorProvider for updating facets ordinal references, based on an ordinal map. You should use this code in conjunction with merging taxonomies - after you merge taxonomies, you receive an DirectoryTaxonomyWriter.OrdinalMap which maps the 'old' payloads to the 'new' ones. You can use that map to re-map the payloads which contain the facets information (ordinals) either before or while merging the indexes.

For re-mapping the ordinals before you merge the indexes, do the following:

 // merge the old taxonomy with the new one.
 OrdinalMap map = LuceneTaxonomyWriter.addTaxonomies();
 int[] ordmap = map.getMap();

 // re-map the ordinals on the old directory.
 Directory oldDir;
 FacetsPayloadProcessorProvider fppp = new FacetsPayloadProcessorProvider(
     oldDir, ordmap);
 IndexWriterConfig conf = new IndexWriterConfig(VER, ANALYZER);
 conf.setMergePolicy(new ForceOptimizeMergePolicy());
 IndexWriter writer = new IndexWriter(oldDir, conf);
 writer.setPayloadProcessorProvider(fppp);
 writer.forceMerge(1);
 writer.close();

 // merge that directory with the new index.
 IndexWriter newWriter; // opened on the 'new' Directory
 newWriter.addIndexes(oldDir);
 newWriter.commit();
For re-mapping the ordinals during index merge, do the following:
 // merge the old taxonomy with the new one.
 OrdinalMap map = LuceneTaxonomyWriter.addTaxonomies();
 int[] ordmap = map.getMap();

 // Add the index and re-map ordinals on the go
 IndexReader r = IndexReader.open(oldDir);
 IndexWriterConfig conf = new IndexWriterConfig(VER, ANALYZER);
 IndexWriter writer = new IndexWriter(newDir, conf);
 writer.setPayloadProcessorProvider(fppp);
 writer.addIndexes(r);
 writer.commit();

NOTE: while the second example looks simpler, IndexWriter may trigger a long merge due to addIndexes. The first example avoids this perhaps unneeded merge, as well as can be done separately (e.g. on another node) before the index is merged.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor
static class | FacetsPayloadProcessorProvider.FacetsPayloadProcessor A PayloadProcessor for updating facets ordinal references, based on an ordinal map
Nested classes/interfaces inherited from class org.apache.lucene.index.PayloadProcessorProvider
PayloadProcessorProvider.DirPayloadProcessor, PayloadProcessorProvider.PayloadProcessor, PayloadProcessorProvider.ReaderPayloadProcessor
Constructor Summary
FacetsPayloadProcessorProvider(Directory dir, int[] ordinalMap, FacetIndexingParams indexingParams)
Construct FacetsPayloadProcessorProvider with FacetIndexingParams
Method Summary
 PayloadProcessorProvider.ReaderPayloadProcessor getReaderProcessor(IndexReader reader)
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for the given Directory, through which PayloadProcessorProvider.ReaderPayloadProcessors can be obtained for each Term, or null if none should be used.
Methods inherited from class org.apache.lucene.index.PayloadProcessorProvider
getDirProcessor
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FacetsPayloadProcessorProvider

public FacetsPayloadProcessorProvider(Directory dir,
                                      int[] ordinalMap,
                                      FacetIndexingParams indexingParams)
Construct FacetsPayloadProcessorProvider with FacetIndexingParams

Parameters:
dir - the Directory containing the segments to update
ordinalMap - an array mapping previous facets ordinals to new ones
indexingParams - the facets indexing parameters
Method Detail

getReaderProcessor

public PayloadProcessorProvider.ReaderPayloadProcessor getReaderProcessor(IndexReader reader)
                                                                   throws IOException
Description copied from class: PayloadProcessorProvider
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for the given Directory, through which PayloadProcessorProvider.ReaderPayloadProcessors can be obtained for each Term, or null if none should be used. You should override this method, not PayloadProcessorProvider.getDirProcessor(org.apache.lucene.store.Directory).

Overrides:
getReaderProcessor in class PayloadProcessorProvider
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.index
Classes
CategoryContainer
CategoryDocumentBuilder
CategoryListPayloadStream
FacetsPayloadProcessorProvider
FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor
FacetsPayloadProcessorProvider.FacetsPayloadProcessor


org.apache.lucene.facet.index

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.index

Indexing of document categories

See:
Description

Class Summary
CategoryContainer | A container to add categories which are to be introduced to CategoryDocumentBuilder.setCategories(Iterable).
CategoryDocumentBuilder | A utility class which allows attachment of CategoryPaths or CategoryAttributes to a given document using a taxonomy. Construction could be done with either a given FacetIndexingParams or the default implementation DefaultFacetIndexingParams. A CategoryDocumentBuilder can be reused by repeatedly setting the categories and building the document.
CategoryListPayloadStream | Accumulates category IDs for a single document, for writing in byte array form, for example, to a Lucene Payload.
FacetsPayloadProcessorProvider | A PayloadProcessorProvider for updating facets ordinal references, based on an ordinal map.
FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor |
FacetsPayloadProcessorProvider.FacetsPayloadProcessor | A PayloadProcessor for updating facets ordinal references, based on an ordinal map

Package org.apache.lucene.facet.index Description

Indexing of document categories

Attachment of CategoryPath's or CategoryAttribute's to a given document using a Taxonomy.


org.apache.lucene.facet.index Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.index

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.index.CategoryContainer (implements java.lang.Iterable<T>, java.io.Serializable)
    • org.apache.lucene.facet.index.CategoryDocumentBuilder
    • org.apache.lucene.facet.index.CategoryListPayloadStream
    • org.apache.lucene.index.PayloadProcessorProvider
      • org.apache.lucene.facet.index.FacetsPayloadProcessorProvider
    • org.apache.lucene.index.PayloadProcessorProvider.PayloadProcessor
      • org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsPayloadProcessor
    • org.apache.lucene.index.PayloadProcessorProvider.ReaderPayloadProcessor
      • org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor


Uses of Package org.apache.lucene.facet.index

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.index

Packages that use org.apache.lucene.facet.index
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets

Classes in org.apache.lucene.facet.index used by org.apache.lucene.benchmark.byTask.feeds
CategoryContainer
A container to add categories which are to be introduced to CategoryDocumentBuilder.setCategories(Iterable).

Classes in org.apache.lucene.facet.index used by org.apache.lucene.facet.enhancements
CategoryDocumentBuilder
A utility class which allows attachment of CategoryPaths or CategoryAttributes to a given document using a taxonomy.
Construction could be done with either a given FacetIndexingParams or the default implementation DefaultFacetIndexingParams.
A CategoryDocumentBuilder can be reused by repeatedly setting the categories and building the document.

Classes in org.apache.lucene.facet.index used by org.apache.lucene.facet.enhancements.association
CategoryListPayloadStream
Accumulates category IDs for a single document, for writing in byte array form, for example, to a Lucene Payload.

Classes in org.apache.lucene.facet.index used by org.apache.lucene.facet.index
CategoryContainer
A container to add categories which are to be introduced to CategoryDocumentBuilder.setCategories(Iterable).
CategoryDocumentBuilder
A utility class which allows attachment of CategoryPaths or CategoryAttributes to a given document using a taxonomy.
Construction could be done with either a given FacetIndexingParams or the default implementation DefaultFacetIndexingParams.
A CategoryDocumentBuilder can be reused by repeatedly setting the categories and building the document.

Classes in org.apache.lucene.facet.index used by org.apache.lucene.facet.index.streaming
CategoryListPayloadStream
Accumulates category IDs for a single document, for writing in byte array form, for example, to a Lucene Payload.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CategoryAttribute

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.attributes
Interface CategoryAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
CategoryAttributeImpl
public interface CategoryAttribute
extends Attribute

An attribute which contains for a certain category the CategoryPath and additional properties.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
void | addProperty(CategoryProperty property) Add a property.
void | clear() Resets this attribute to its initial value: a null category path and no properties.
void | clearProperties() Clear all properties.
CategoryAttribute | clone() Clone this CategoryAttribute.
CategoryPath | getCategoryPath() Returns the value of this attribute: a category path.
CategoryProperty | getProperty(Class<? extends CategoryProperty> propertyClass) Get a property of a certain property class.
CategoryProperty | getProperty(Collection<Class<? extends CategoryProperty>> propertyClasses) Get a property of one of given property classes.
Set<Class<? extends CategoryProperty>> | getPropertyClasses() Get all the active property classes.
void | remove(Class<? extends CategoryProperty> propertyClass) Remove an property of a certain property class.
void | set(CategoryAttribute other) Set the content of this CategoryAttribute from another CategoryAttribute object.
void | setCategoryPath(CategoryPath cp) Sets the category path value of this attribute.

Method Detail

set

void set(CategoryAttribute other)
Set the content of this CategoryAttribute from another CategoryAttribute object.

Parameters:
other - The CategoryAttribute to take the content from.

setCategoryPath

void setCategoryPath(CategoryPath cp)
Sets the category path value of this attribute.

Parameters:
cp - A category path. May not be null.

getCategoryPath

CategoryPath getCategoryPath()
Returns the value of this attribute: a category path.

Returns:
The category path last assigned to this attribute, or null if none has been assigned.

addProperty

void addProperty(CategoryProperty property)
                 throws UnsupportedOperationException
Add a property. The property can be later retrieved using getProperty(Class) with this property class .
Adding multiple properties of the same class is forbidden.

Parameters:
property - The property to add.
Throws:
UnsupportedOperationException - When attempting to add a property of a class that was added before and merge is prohibited.

getProperty

CategoryProperty getProperty(Class<? extends CategoryProperty> propertyClass)
Get a property of a certain property class.

Parameters:
propertyClass - The required property class.
Returns:
The property of the given class, or null if no such property exists.

getProperty

CategoryProperty getProperty(Collection<Class<? extends CategoryProperty>> propertyClasses)
Get a property of one of given property classes.

Parameters:
propertyClasses - The property classes.
Returns:
A property matching one of the given classes, or null if no such property exists.

getPropertyClasses

Set<Class<? extends CategoryProperty>> getPropertyClasses()
Get all the active property classes.

Returns:
A set containing the active property classes, or null if there are no properties.

clone

CategoryAttribute clone()
Clone this CategoryAttribute.

Returns:
A clone of this CategoryAttribute.

clear

void clear()
Resets this attribute to its initial value: a null category path and no properties.

clearProperties

void clearProperties()
Clear all properties.

remove

void remove(Class<? extends CategoryProperty> propertyClass)
Remove an property of a certain property class.

Parameters:
propertyClass - The required property class.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CategoryAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.attributes
Class CategoryAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.facet.index.attributes.CategoryAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, CategoryAttribute, Attribute
public final class CategoryAttributeImpl
extends AttributeImpl
implements CategoryAttribute

An implementation of CategoryAttribute.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected CategoryPath | categoryPath The category path instance.
protected HashMap<Class<? extends CategoryProperty>,CategoryProperty> | properties A map of properties associated to the current category path.
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
CategoryAttributeImpl()
Construct an empty CategoryAttributeImpl.
CategoryAttributeImpl(CategoryPath categoryPath)
Construct a CategoryAttributeImpl with the given CategoryPath.
Method Summary
void | addProperty(CategoryProperty property) Add a property.
void | clear() Clears the values in this AttributeImpl and resets it to its default value.
void | clearProperties() Clear all properties.
CategoryAttribute | clone() Shallow clone.
void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object o)
CategoryPath | getCategoryPath() Returns the category path value.
CategoryProperty | getProperty(Class<? extends CategoryProperty> propertyClass) Get a property of a certain property class.
CategoryProperty | getProperty(Collection<Class<? extends CategoryProperty>> propertyClasses) Get a property of one of given property classes.
Set<Class<? extends CategoryProperty>> | getPropertyClasses() Get all the active property classes.
int | hashCode()
void | remove(Class<? extends CategoryProperty> propertyClass) Remove an property of a certain property class.
void | set(CategoryAttribute other) Set the content of this CategoryAttribute from another CategoryAttribute object.
void | setCategoryPath(CategoryPath cp) Sets the category path value of this attribute.
Methods inherited from class org.apache.lucene.util.AttributeImpl
reflectAsString, reflectWith, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

categoryPath

protected CategoryPath categoryPath
The category path instance.

properties

protected HashMap<Class<? extends CategoryProperty>,CategoryProperty> properties
A map of properties associated to the current category path.

Constructor Detail

CategoryAttributeImpl

public CategoryAttributeImpl()
Construct an empty CategoryAttributeImpl.

CategoryAttributeImpl

public CategoryAttributeImpl(CategoryPath categoryPath)
Construct a CategoryAttributeImpl with the given CategoryPath.

Parameters:
categoryPath - The category path to use.
Method Detail

set

public void set(CategoryAttribute other)
Description copied from interface: CategoryAttribute
Set the content of this CategoryAttribute from another CategoryAttribute object.

Specified by:
set in interface CategoryAttribute
Parameters:
other - The CategoryAttribute to take the content from.

getCategoryPath

public CategoryPath getCategoryPath()
Returns the category path value.

Specified by:
getCategoryPath in interface CategoryAttribute
Returns:
The category path last assigned to this attribute, or null if none has been assigned.

setCategoryPath

public void setCategoryPath(CategoryPath cp)
Description copied from interface: CategoryAttribute
Sets the category path value of this attribute.

Specified by:
setCategoryPath in interface CategoryAttribute
Parameters:
cp - A category path. May not be null.

addProperty

public void addProperty(CategoryProperty property)
                 throws UnsupportedOperationException
Description copied from interface: CategoryAttribute
Add a property. The property can be later retrieved using CategoryAttribute.getProperty(Class) with this property class .
Adding multiple properties of the same class is forbidden.

Specified by:
addProperty in interface CategoryAttribute
Parameters:
property - The property to add.
Throws:
UnsupportedOperationException - When attempting to add a property of a class that was added before and merge is prohibited.

getProperty

public CategoryProperty getProperty(Class<? extends CategoryProperty> propertyClass)
Description copied from interface: CategoryAttribute
Get a property of a certain property class.

Specified by:
getProperty in interface CategoryAttribute
Parameters:
propertyClass - The required property class.
Returns:
The property of the given class, or null if no such property exists.

getProperty

public CategoryProperty getProperty(Collection<Class<? extends CategoryProperty>> propertyClasses)
Description copied from interface: CategoryAttribute
Get a property of one of given property classes.

Specified by:
getProperty in interface CategoryAttribute
Parameters:
propertyClasses - The property classes.
Returns:
A property matching one of the given classes, or null if no such property exists.

copyTo

public void copyTo(AttributeImpl target)
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

clone

public CategoryAttribute clone()
Description copied from class: AttributeImpl
Shallow clone. Subclasses must override this if they need to clone any members deeply,

Specified by:
clone in interface CategoryAttribute
Overrides:
clone in class AttributeImpl
Returns:
A clone of this CategoryAttribute.

clear

public void clear()
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in interface CategoryAttribute
Specified by:
clear in class AttributeImpl

clearProperties

public void clearProperties()
Description copied from interface: CategoryAttribute
Clear all properties.

Specified by:
clearProperties in interface CategoryAttribute

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getPropertyClasses

public Set<Class<? extends CategoryProperty>> getPropertyClasses()
Description copied from interface: CategoryAttribute
Get all the active property classes.

Specified by:
getPropertyClasses in interface CategoryAttribute
Returns:
A set containing the active property classes, or null if there are no properties.

remove

public void remove(Class<? extends CategoryProperty> propertyClass)
Description copied from interface: CategoryAttribute
Remove an property of a certain property class.

Specified by:
remove in interface CategoryAttribute
Parameters:
propertyClass - The required property class.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CategoryAttributesIterable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.attributes
Class CategoryAttributesIterable

java.lang.Object
    extended by  org.apache.lucene.facet.index.attributes.CategoryAttributesIterable
All Implemented Interfaces:
Iterable<CategoryAttribute>
public class CategoryAttributesIterable
extends Object
implements Iterable<CategoryAttribute>

This class transforms an Iterable of CategoryPath objects into an Iterable of CategoryAttribute objects, which can be used to construct a CategoryAttributesStream.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
CategoryAttributesIterable(Iterable<CategoryPath> inputIterable)
Method Summary
 Iterator<CategoryAttribute> iterator()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CategoryAttributesIterable

public CategoryAttributesIterable(Iterable<CategoryPath> inputIterable)
Method Detail

iterator

public Iterator<CategoryAttribute> iterator()
Specified by:
iterator in interface Iterable<CategoryAttribute>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CategoryProperty

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.attributes
Interface CategoryProperty

All Superinterfaces:
Serializable
All Known Implementing Classes:
AssociationFloatProperty, AssociationIntProperty, AssociationProperty, OrdinalProperty
public interface CategoryProperty
extends Serializable

Property that can be added to CategoryAttributes during indexing. Note that properties are put in a map and could be shallow copied during CategoryAttributeImpl.clone(), therefore reuse of CategoryProperty objects is not recommended. Also extends Serializable, making the CategoryContainer serialization more elegant.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 void merge(CategoryProperty other)
When adding categories with properties to a certain document, it is possible that the same category will be added more than once with different instances of the same property.

Method Detail

merge

void merge(CategoryProperty other)
           throws UnsupportedOperationException
When adding categories with properties to a certain document, it is possible that the same category will be added more than once with different instances of the same property. This method defined how to treat such cases, by merging the newly added property into the one previously added. Implementing classes can assume that this method will be called only with a property of the same class.

Parameters:
other - The category property to merge.
Throws:
UnsupportedOperationException - If merging is prohibited for this property.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OrdinalProperty

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.attributes
Class OrdinalProperty

java.lang.Object
    extended by  org.apache.lucene.facet.index.attributes.OrdinalProperty
All Implemented Interfaces:
Serializable, CategoryProperty
public class OrdinalProperty
extends Object
implements CategoryProperty

A CategoryProperty holding the ordinal from the taxonomy of the current category in CategoryAttribute.

Ordinal properties are added internally during processing of category streams, and it is recommended not to use it externally.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected  int ordinal
Constructor Summary
OrdinalProperty()
Method Summary
void | clear()
boolean | equals(Object other)
int | getOrdinal()
boolean | hasBeenSet()
int | hashCode()
void | merge(CategoryProperty other) When adding categories with properties to a certain document, it is possible that the same category will be added more than once with different instances of the same property.
void | setOrdinal(int value)
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

ordinal

protected int ordinal
Constructor Detail

OrdinalProperty

public OrdinalProperty()
Method Detail

getOrdinal

public int getOrdinal()

hasBeenSet

public boolean hasBeenSet()

setOrdinal

public void setOrdinal(int value)

clear

public void clear()

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

merge

public void merge(CategoryProperty other)
Description copied from interface: CategoryProperty
When adding categories with properties to a certain document, it is possible that the same category will be added more than once with different instances of the same property. This method defined how to treat such cases, by merging the newly added property into the one previously added. Implementing classes can assume that this method will be called only with a property of the same class.

Specified by:
merge in interface CategoryProperty
Parameters:
other - The category property to merge.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.index.attributes
Interfaces
CategoryAttribute
CategoryProperty
Classes
CategoryAttributeImpl
CategoryAttributesIterable
OrdinalProperty


org.apache.lucene.facet.index.attributes

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.index.attributes

Category attributes and their properties for indexing

See:
Description

Interface Summary
CategoryAttribute | An attribute which contains for a certain category the CategoryPath and additional properties.
CategoryProperty | Property that can be added to CategoryAttributes during indexing.

Class Summary
CategoryAttributeImpl | An implementation of CategoryAttribute.
CategoryAttributesIterable | This class transforms an Iterable of CategoryPath objects into an Iterable of CategoryAttribute objects, which can be used to construct a CategoryAttributesStream.
OrdinalProperty | A CategoryProperty holding the ordinal from the taxonomy of the current category in CategoryAttribute.

Package org.apache.lucene.facet.index.attributes Description

Category attributes and their properties for indexing

Attributes for a category, possibly containing category property's.


org.apache.lucene.facet.index.attributes Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.index.attributes

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeImpl (implements org.apache.lucene.util.Attribute, java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.facet.index.attributes.CategoryAttributeImpl (implements org.apache.lucene.facet.index.attributes.CategoryAttribute)
    • org.apache.lucene.facet.index.attributes.CategoryAttributesIterable (implements java.lang.Iterable<T>)
    • org.apache.lucene.facet.index.attributes.OrdinalProperty (implements org.apache.lucene.facet.index.attributes.CategoryProperty)

Interface Hierarchy

  • org.apache.lucene.util.Attribute
    • org.apache.lucene.facet.index.attributes.CategoryAttribute
  • java.io.Serializable
    • org.apache.lucene.facet.index.attributes.CategoryProperty


Uses of Package org.apache.lucene.facet.index.attributes

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.index.attributes

Packages that use org.apache.lucene.facet.index.attributes
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.enhancements.params | Enhanced category features
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.attributes | Category attributes and their properties for indexing
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets

Classes in org.apache.lucene.facet.index.attributes used by org.apache.lucene.facet.enhancements
CategoryAttribute
An attribute which contains for a certain category the CategoryPath and additional properties.
CategoryProperty
Property that can be added to CategoryAttributes during indexing.

Classes in org.apache.lucene.facet.index.attributes used by org.apache.lucene.facet.enhancements.association
CategoryAttribute
An attribute which contains for a certain category the CategoryPath and additional properties.
CategoryProperty
Property that can be added to CategoryAttributes during indexing.

Classes in org.apache.lucene.facet.index.attributes used by org.apache.lucene.facet.enhancements.params
CategoryProperty
Property that can be added to CategoryAttributes during indexing.

Classes in org.apache.lucene.facet.index.attributes used by org.apache.lucene.facet.index
CategoryAttribute
An attribute which contains for a certain category the CategoryPath and additional properties.
CategoryProperty
Property that can be added to CategoryAttributes during indexing.

Classes in org.apache.lucene.facet.index.attributes used by org.apache.lucene.facet.index.attributes
CategoryAttribute
An attribute which contains for a certain category the CategoryPath and additional properties.
CategoryProperty
Property that can be added to CategoryAttributes during indexing.

Classes in org.apache.lucene.facet.index.attributes used by org.apache.lucene.facet.index.streaming
CategoryAttribute
An attribute which contains for a certain category the CategoryPath and additional properties.
CategoryProperty
Property that can be added to CategoryAttributes during indexing.
OrdinalProperty
A CategoryProperty holding the ordinal from the taxonomy of the current category in CategoryAttribute.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.index.attributes.CategoryAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.index.attributes.CategoryAttribute

Packages that use CategoryAttribute
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.attributes | Category attributes and their properties for indexing
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets

Uses of CategoryAttribute in org.apache.lucene.facet.enhancements

Methods in org.apache.lucene.facet.enhancements with parameters of type CategoryAttribute
 byte[] CategoryEnhancement.getCategoryTokenBytes(CategoryAttribute categoryAttribute)
Get the bytes to be added to the category token payload for this enhancement.

Uses of CategoryAttribute in org.apache.lucene.facet.enhancements.association

Methods in org.apache.lucene.facet.enhancements.association with parameters of type CategoryAttribute
static AssociationProperty | AssociationEnhancement.getAssociationProperty(CategoryAttribute categoryAttribute)
byte[] | AssociationEnhancement.getCategoryTokenBytes(CategoryAttribute categoryAttribute)

Uses of CategoryAttribute in org.apache.lucene.facet.index

Fields in org.apache.lucene.facet.index with type parameters of type CategoryAttribute
protected Map<String,List<CategoryAttribute>> | CategoryDocumentBuilder.categoriesMap
protected Map<CategoryPath,CategoryAttribute> | CategoryContainer.map

Methods in org.apache.lucene.facet.index that return CategoryAttribute
CategoryAttribute | CategoryContainer.addCategory(CategoryAttribute categoryAttribute) Add an entire CategoryAttribute.
CategoryAttribute | CategoryContainer.addCategory(CategoryPath categoryPath) Add a category.
CategoryAttribute | CategoryContainer.addCategory(CategoryPath categoryPath, CategoryProperty... properties) Add a category with multiple properties.
CategoryAttribute | CategoryContainer.addCategory(CategoryPath categoryPath, CategoryProperty property) Add a category with a property.
CategoryAttribute | CategoryContainer.getCategoryAttribute(CategoryPath categoryPath) Get the CategoryAttribute this container has for a certain category, or null if the category is not in the container.

Methods in org.apache.lucene.facet.index that return types with arguments of type CategoryAttribute
 Iterator<CategoryAttribute> CategoryContainer.iterator()

Methods in org.apache.lucene.facet.index with parameters of type CategoryAttribute
CategoryAttribute | CategoryContainer.addCategory(CategoryAttribute categoryAttribute) Add an entire CategoryAttribute.
protected void | CategoryContainer.serializeCategoryAttribute(ObjectOutputStream out, CategoryAttribute ca) Serialize each of the CategoryAttributes to the given ObjectOutputStream. NOTE: CategoryPropertys are Serializable, but do not assume that Lucene's Attributes are as well

Method parameters in org.apache.lucene.facet.index with type arguments of type CategoryAttribute
protected void | CategoryDocumentBuilder.fillCategoriesMap(Iterable<CategoryAttribute> categories) Fills the categories mapping between a field name and a list of categories that belongs to it according to this builder's FacetIndexingParams object
CategoryDocumentBuilder | CategoryDocumentBuilder.setCategories(Iterable<CategoryAttribute> categories) Set the categories of the document builder from an Iterable of CategoryAttribute objects.

Uses of CategoryAttribute in org.apache.lucene.facet.index.attributes

Classes in org.apache.lucene.facet.index.attributes that implement CategoryAttribute
 class CategoryAttributeImpl
An implementation of CategoryAttribute.

Methods in org.apache.lucene.facet.index.attributes that return CategoryAttribute
CategoryAttribute | CategoryAttribute.clone() Clone this CategoryAttribute.
CategoryAttribute | CategoryAttributeImpl.clone()

Methods in org.apache.lucene.facet.index.attributes that return types with arguments of type CategoryAttribute
 Iterator<CategoryAttribute> CategoryAttributesIterable.iterator()

Methods in org.apache.lucene.facet.index.attributes with parameters of type CategoryAttribute
void | CategoryAttribute.set(CategoryAttribute other) Set the content of this CategoryAttribute from another CategoryAttribute object.
void | CategoryAttributeImpl.set(CategoryAttribute other)

Uses of CategoryAttribute in org.apache.lucene.facet.index.streaming

Fields in org.apache.lucene.facet.index.streaming declared as CategoryAttribute
protected CategoryAttribute | CategoryAttributesStream.categoryAttribute
protected CategoryAttribute | CategoryParentsStream.categoryAttribute An attribute containing all data related to the category
protected CategoryAttribute | CategoryTokenizerBase.categoryAttribute The stream's category attributes.

Constructor parameters in org.apache.lucene.facet.index.streaming with type arguments of type CategoryAttribute
CategoryAttributesStream(Iterable<CategoryAttribute> iterable)
Constructor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

No usage of org.apache.lucene.facet.index.attributes.CategoryAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.attributes.CategoryAttributesIterable

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.attributes.CategoryAttributesIterable

No usage of org.apache.lucene.facet.index.attributes.CategoryAttributesIterable

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.index.attributes.CategoryProperty

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.index.attributes.CategoryProperty

Packages that use CategoryProperty
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.enhancements.params | Enhanced category features
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.attributes | Category attributes and their properties for indexing
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets

Uses of CategoryProperty in org.apache.lucene.facet.enhancements

Methods in org.apache.lucene.facet.enhancements that return types with arguments of type CategoryProperty
 Class<? extends CategoryProperty> CategoryEnhancement.getRetainableProperty()
Get a CategoryProperty class to be retained when creating CategoryParentsStream.

Uses of CategoryProperty in org.apache.lucene.facet.enhancements.association

Classes in org.apache.lucene.facet.enhancements.association that implement CategoryProperty
class | AssociationFloatProperty An AssociationProperty which treats the association as float - the association bits are actually float bits, and thus merging two associations is done by float summation.
class | AssociationIntProperty An AssociationProperty which treats the association as int - merges two associations by summation.
class | AssociationProperty A CategoryProperty associating a single integer value to a CategoryAttribute.

Methods in org.apache.lucene.facet.enhancements.association that return types with arguments of type CategoryProperty
 Class<? extends CategoryProperty> AssociationEnhancement.getRetainableProperty()

Methods in org.apache.lucene.facet.enhancements.association with parameters of type CategoryProperty
void | AssociationIntProperty.merge(CategoryProperty other)
void | AssociationFloatProperty.merge(CategoryProperty other)

Method parameters in org.apache.lucene.facet.enhancements.association with type arguments of type CategoryProperty
static boolean AssociationEnhancement.isAssociationProperty(Class<? extends CategoryProperty> clazz)
For a given class which extends a CategoryProperty, answers whether it is an instance of AssociationProperty (AP) or not.

Uses of CategoryProperty in org.apache.lucene.facet.enhancements.params

Methods in org.apache.lucene.facet.enhancements.params that return types with arguments of type CategoryProperty
List<Class<? extends CategoryProperty>> | EnhancementsIndexingParams.getRetainableProperties() Get a list of CategoryProperty classes to be retained when creating CategoryParentsStream.
List<Class<? extends CategoryProperty>> | DefaultEnhancementsIndexingParams.getRetainableProperties()

Uses of CategoryProperty in org.apache.lucene.facet.index

Methods in org.apache.lucene.facet.index with parameters of type CategoryProperty
CategoryAttribute | CategoryContainer.addCategory(CategoryPath categoryPath, CategoryProperty... properties) Add a category with multiple properties.
CategoryAttribute | CategoryContainer.addCategory(CategoryPath categoryPath, CategoryProperty property) Add a category with a property.

Uses of CategoryProperty in org.apache.lucene.facet.index.attributes

Classes in org.apache.lucene.facet.index.attributes that implement CategoryProperty
 class OrdinalProperty
A CategoryProperty holding the ordinal from the taxonomy of the current category in CategoryAttribute.

Fields in org.apache.lucene.facet.index.attributes with type parameters of type CategoryProperty
protected HashMap<Class<? extends CategoryProperty>,CategoryProperty> | CategoryAttributeImpl.properties A map of properties associated to the current category path.
protected HashMap<Class<? extends CategoryProperty>,CategoryProperty> | CategoryAttributeImpl.properties A map of properties associated to the current category path.

Methods in org.apache.lucene.facet.index.attributes that return CategoryProperty
CategoryProperty | CategoryAttribute.getProperty(Class<? extends CategoryProperty> propertyClass) Get a property of a certain property class.
CategoryProperty | CategoryAttributeImpl.getProperty(Class<? extends CategoryProperty> propertyClass)
CategoryProperty | CategoryAttribute.getProperty(Collection<Class<? extends CategoryProperty>> propertyClasses) Get a property of one of given property classes.
CategoryProperty | CategoryAttributeImpl.getProperty(Collection<Class<? extends CategoryProperty>> propertyClasses)

Methods in org.apache.lucene.facet.index.attributes that return types with arguments of type CategoryProperty
Set<Class<? extends CategoryProperty>> | CategoryAttribute.getPropertyClasses() Get all the active property classes.
Set<Class<? extends CategoryProperty>> | CategoryAttributeImpl.getPropertyClasses()

Methods in org.apache.lucene.facet.index.attributes with parameters of type CategoryProperty
void | CategoryAttribute.addProperty(CategoryProperty property) Add a property.
void | CategoryAttributeImpl.addProperty(CategoryProperty property)
void | OrdinalProperty.merge(CategoryProperty other)
void | CategoryProperty.merge(CategoryProperty other) When adding categories with properties to a certain document, it is possible that the same category will be added more than once with different instances of the same property.

Method parameters in org.apache.lucene.facet.index.attributes with type arguments of type CategoryProperty
CategoryProperty | CategoryAttribute.getProperty(Class<? extends CategoryProperty> propertyClass) Get a property of a certain property class.
CategoryProperty | CategoryAttributeImpl.getProperty(Class<? extends CategoryProperty> propertyClass)
CategoryProperty | CategoryAttribute.getProperty(Collection<Class<? extends CategoryProperty>> propertyClasses) Get a property of one of given property classes.
CategoryProperty | CategoryAttributeImpl.getProperty(Collection<Class<? extends CategoryProperty>> propertyClasses)
void | CategoryAttribute.remove(Class<? extends CategoryProperty> propertyClass) Remove an property of a certain property class.
void | CategoryAttributeImpl.remove(Class<? extends CategoryProperty> propertyClass)

Uses of CategoryProperty in org.apache.lucene.facet.index.streaming

Method parameters in org.apache.lucene.facet.index.streaming with type arguments of type CategoryProperty
 void CategoryParentsStream.addRetainableProperty(Class<? extends CategoryProperty> toRetain)
Add a CategoryProperty class which is retained when creating parent tokens.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.attributes.OrdinalProperty

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.attributes.OrdinalProperty

Packages that use OrdinalProperty
org.apache.lucene.facet.index.streaming Expert: attributes streaming definition for indexing facets

Uses of OrdinalProperty in org.apache.lucene.facet.index.streaming

Fields in org.apache.lucene.facet.index.streaming declared as OrdinalProperty
protected  OrdinalProperty CategoryParentsStream.ordinalProperty
A category property containing the category ordinal

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


DefaultOrdinalPolicy

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.categorypolicy
Class DefaultOrdinalPolicy

java.lang.Object
    extended by  org.apache.lucene.facet.index.categorypolicy.DefaultOrdinalPolicy
All Implemented Interfaces:
Serializable, OrdinalPolicy
public class DefaultOrdinalPolicy
extends Object
implements OrdinalPolicy

This class filters our the ROOT category ID. For more information see OrdinalPolicy.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
DefaultOrdinalPolicy()
Method Summary
void | init(TaxonomyWriter taxonomyWriter) Implemented as NO-OP as the default is not taxonomy dependent
boolean | shouldAdd(int ordinal) Filters out (returns false) ordinals equal or less than TaxonomyReader.ROOT_ORDINAL.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultOrdinalPolicy

public DefaultOrdinalPolicy()
Method Detail

shouldAdd

public boolean shouldAdd(int ordinal)
Filters out (returns false) ordinals equal or less than TaxonomyReader.ROOT_ORDINAL. true otherwise.

Specified by:
shouldAdd in interface OrdinalPolicy
Parameters:
ordinal - A given category ordinal which is to be tested for stream addition.
Returns:
true if the category should be added. false otherwise.

init

public void init(TaxonomyWriter taxonomyWriter)
Implemented as NO-OP as the default is not taxonomy dependent

Specified by:
init in interface OrdinalPolicy
Parameters:
taxonomyWriter - A relevant taxonomyWriter object, with which ordinals sent to OrdinalPolicy.shouldAdd(int) are examined.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DefaultPathPolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.categorypolicy
Class DefaultPathPolicy

java.lang.Object
    extended by  org.apache.lucene.facet.index.categorypolicy.DefaultPathPolicy
All Implemented Interfaces:
Serializable, PathPolicy
public class DefaultPathPolicy
extends Object
implements PathPolicy

This class filters our the ROOT category path. For more information see PathPolicy.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
DefaultPathPolicy()
Method Summary
 boolean shouldAdd(CategoryPath categoryPath)
Filters out (returns false) CategoryPaths equal or less than TaxonomyReader.ROOT_ORDINAL.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultPathPolicy

public DefaultPathPolicy()
Method Detail

shouldAdd

public boolean shouldAdd(CategoryPath categoryPath)
Filters out (returns false) CategoryPaths equal or less than TaxonomyReader.ROOT_ORDINAL. true otherwise.

Specified by:
shouldAdd in interface PathPolicy
Parameters:
categoryPath - A given category path which is to be tested for stream addition.
Returns:
true if the category path should be added. false otherwise.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NonTopLevelOrdinalPolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.categorypolicy
Class NonTopLevelOrdinalPolicy

java.lang.Object
    extended by  org.apache.lucene.facet.index.categorypolicy.NonTopLevelOrdinalPolicy
All Implemented Interfaces:
Serializable, OrdinalPolicy
public class NonTopLevelOrdinalPolicy
extends Object
implements OrdinalPolicy

Filter out any "top level" category ordinals.
shouldAdd(int).

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
NonTopLevelOrdinalPolicy()
Constructs a new non-top-level-ordinal-filter.
Method Summary
void | init(TaxonomyWriter taxonomyWriter) Initialize the policy with a TaxonomyWriter.
boolean | shouldAdd(int ordinal) Filters out ordinal which are ROOT or who's parent is ROOT.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NonTopLevelOrdinalPolicy

public NonTopLevelOrdinalPolicy()
Constructs a new non-top-level-ordinal-filter. With a given taxonomyWriter.

Method Detail

init

public void init(TaxonomyWriter taxonomyWriter)
Description copied from interface: OrdinalPolicy
Initialize the policy with a TaxonomyWriter. This method can be implemented as noop if the ordinal policy is not taxonomy dependent

Specified by:
init in interface OrdinalPolicy
Parameters:
taxonomyWriter - A relevant taxonomyWriter object, with which ordinals sent to shouldAdd(int) are examined.

shouldAdd

public boolean shouldAdd(int ordinal)
Filters out ordinal which are ROOT or who's parent is ROOT. In order to determine if a parent is root, there's a need for TaxonomyWriter.getParent(int).

Specified by:
shouldAdd in interface OrdinalPolicy
Parameters:
ordinal - A given category ordinal which is to be tested for stream addition.
Returns:
true if the category should be added. false otherwise.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NonTopLevelPathPolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.categorypolicy
Class NonTopLevelPathPolicy

java.lang.Object
    extended by  org.apache.lucene.facet.index.categorypolicy.NonTopLevelPathPolicy
All Implemented Interfaces:
Serializable, PathPolicy
public class NonTopLevelPathPolicy
extends Object
implements PathPolicy

This class filters our the ROOT category, and it's direct descendants. For more information see PathPolicy.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
 int DEFAULT_MINIMAL_SUBPATH_LENGTH
The shortest path length delivered is two components (root + one child).
Constructor Summary
NonTopLevelPathPolicy()
Method Summary
 boolean shouldAdd(CategoryPath categoryPath)
Filters out (returns false) CategoryPaths equal or less than TaxonomyReader.ROOT_ORDINAL.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_MINIMAL_SUBPATH_LENGTH

public final int DEFAULT_MINIMAL_SUBPATH_LENGTH
The shortest path length delivered is two components (root + one child).

See Also:
Constant Field Values
Constructor Detail

NonTopLevelPathPolicy

public NonTopLevelPathPolicy()
Method Detail

shouldAdd

public boolean shouldAdd(CategoryPath categoryPath)
Filters out (returns false) CategoryPaths equal or less than TaxonomyReader.ROOT_ORDINAL. true otherwise.

Specified by:
shouldAdd in interface PathPolicy
Parameters:
categoryPath - A given category path which is to be tested for stream addition.
Returns:
true if the category path should be added. false otherwise.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OrdinalPolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.categorypolicy
Interface OrdinalPolicy

All Superinterfaces:
Serializable
All Known Implementing Classes:
DefaultOrdinalPolicy, NonTopLevelOrdinalPolicy
public interface OrdinalPolicy
extends Serializable

Filtering category ordinals in CategoryParentsStream, where a given category ordinal is added to the stream, and than its parents are being added one after the other using TaxonomyWriter.getParent(int).
That loop should have a stop point - the default approach (excluding the ROOT) is implemented in DefaultOrdinalPolicy.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
void | init(TaxonomyWriter taxonomyWriter) Initialize the policy with a TaxonomyWriter.
boolean | shouldAdd(int ordinal) Check whether a given category ordinal should be added to the stream.

Method Detail

shouldAdd

boolean shouldAdd(int ordinal)
Check whether a given category ordinal should be added to the stream.

Parameters:
ordinal - A given category ordinal which is to be tested for stream addition.
Returns:
true if the category should be added. false otherwise.

init

void init(TaxonomyWriter taxonomyWriter)
Initialize the policy with a TaxonomyWriter. This method can be implemented as noop if the ordinal policy is not taxonomy dependent

Parameters:
taxonomyWriter - A relevant taxonomyWriter object, with which ordinals sent to shouldAdd(int) are examined.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.index.categorypolicy
Interfaces
OrdinalPolicy
PathPolicy
Classes
DefaultOrdinalPolicy
DefaultPathPolicy
NonTopLevelOrdinalPolicy
NonTopLevelPathPolicy


org.apache.lucene.facet.index.categorypolicy

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.index.categorypolicy

Policies for indexing categories

See:
Description

Interface Summary
OrdinalPolicy | Filtering category ordinals in CategoryParentsStream, where a given category ordinal is added to the stream, and than its parents are being added one after the other using TaxonomyWriter.getParent(int).
PathPolicy | Filtering category paths in CategoryParentsStream, where a given category is added to the stream, and than all its parents are being added one after the other by successively removing the last component.

Class Summary
DefaultOrdinalPolicy | This class filters our the ROOT category ID.
DefaultPathPolicy | This class filters our the ROOT category path.
NonTopLevelOrdinalPolicy | Filter out any "top level" category ordinals.
NonTopLevelPathPolicy | This class filters our the ROOT category, and it's direct descendants.

Package org.apache.lucene.facet.index.categorypolicy Description

Policies for indexing categories

There are two kinds of policies:
  • Path policies are based on the path of the category.
  • Ordinal policies are based on the ordinal of the category.
Policies are "consulted" with during indexing, for deciding whether a category should be added to the index or not. The two kinds of policies can be used for different purposes. For example, path policies dictates which categories can participate in a drill-down operation, while ordinal policies affect which can be accumulated (e.g. counted).


org.apache.lucene.facet.index.categorypolicy Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.index.categorypolicy

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.index.categorypolicy.DefaultOrdinalPolicy (implements org.apache.lucene.facet.index.categorypolicy.OrdinalPolicy)
    • org.apache.lucene.facet.index.categorypolicy.DefaultPathPolicy (implements org.apache.lucene.facet.index.categorypolicy.PathPolicy)
    • org.apache.lucene.facet.index.categorypolicy.NonTopLevelOrdinalPolicy (implements org.apache.lucene.facet.index.categorypolicy.OrdinalPolicy)
    • org.apache.lucene.facet.index.categorypolicy.NonTopLevelPathPolicy (implements org.apache.lucene.facet.index.categorypolicy.PathPolicy)

Interface Hierarchy

  • java.io.Serializable
    • org.apache.lucene.facet.index.categorypolicy.OrdinalPolicy
    • org.apache.lucene.facet.index.categorypolicy.PathPolicy


Uses of Package org.apache.lucene.facet.index.categorypolicy

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.index.categorypolicy

Packages that use org.apache.lucene.facet.index.categorypolicy
org.apache.lucene.facet.index.categorypolicy | Policies for indexing categories
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets

Classes in org.apache.lucene.facet.index.categorypolicy used by org.apache.lucene.facet.index.categorypolicy
OrdinalPolicy
Filtering category ordinals in CategoryParentsStream, where a given category ordinal is added to the stream, and than its parents are being added one after the other using TaxonomyWriter.getParent(int).
PathPolicy
Filtering category paths in CategoryParentsStream, where a given category is added to the stream, and than all its parents are being added one after the other by successively removing the last component.

Classes in org.apache.lucene.facet.index.categorypolicy used by org.apache.lucene.facet.index.params
OrdinalPolicy
Filtering category ordinals in CategoryParentsStream, where a given category ordinal is added to the stream, and than its parents are being added one after the other using TaxonomyWriter.getParent(int).
PathPolicy
Filtering category paths in CategoryParentsStream, where a given category is added to the stream, and than all its parents are being added one after the other by successively removing the last component.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PathPolicy

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.categorypolicy
Interface PathPolicy

All Superinterfaces:
Serializable
All Known Implementing Classes:
DefaultPathPolicy, NonTopLevelPathPolicy
public interface PathPolicy
extends Serializable

Filtering category paths in CategoryParentsStream, where a given category is added to the stream, and than all its parents are being added one after the other by successively removing the last component.
That loop should have a stop point - the default approach (excluding the ROOT) is implemented in DefaultOrdinalPolicy.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 boolean shouldAdd(CategoryPath categoryPath)
Check whether a given category path should be added to the stream.

Method Detail

shouldAdd

boolean shouldAdd(CategoryPath categoryPath)
Check whether a given category path should be added to the stream.

Parameters:
categoryPath - A given category path which is to be tested for stream addition.
Returns:
true if the category path should be added. false otherwise.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.facet.index.categorypolicy.DefaultOrdinalPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.categorypolicy.DefaultOrdinalPolicy

No usage of org.apache.lucene.facet.index.categorypolicy.DefaultOrdinalPolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.categorypolicy.DefaultPathPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.categorypolicy.DefaultPathPolicy

No usage of org.apache.lucene.facet.index.categorypolicy.DefaultPathPolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.categorypolicy.NonTopLevelOrdinalPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.categorypolicy.NonTopLevelOrdinalPolicy

No usage of org.apache.lucene.facet.index.categorypolicy.NonTopLevelOrdinalPolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.categorypolicy.NonTopLevelPathPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.categorypolicy.NonTopLevelPathPolicy

No usage of org.apache.lucene.facet.index.categorypolicy.NonTopLevelPathPolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.index.categorypolicy.OrdinalPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.index.categorypolicy.OrdinalPolicy

Packages that use OrdinalPolicy
org.apache.lucene.facet.index.categorypolicy | Policies for indexing categories
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets

Uses of OrdinalPolicy in org.apache.lucene.facet.index.categorypolicy

Classes in org.apache.lucene.facet.index.categorypolicy that implement OrdinalPolicy
class | DefaultOrdinalPolicy This class filters our the ROOT category ID.
class | NonTopLevelOrdinalPolicy Filter out any "top level" category ordinals.

Uses of OrdinalPolicy in org.apache.lucene.facet.index.params

Methods in org.apache.lucene.facet.index.params that return OrdinalPolicy
protected OrdinalPolicy | DefaultFacetIndexingParams.fixedOrdinalPolicy() "fixed" ordinal policy.
OrdinalPolicy | DefaultFacetIndexingParams.getOrdinalPolicy()
OrdinalPolicy | FacetIndexingParams.getOrdinalPolicy() Get the policy for indexing category ordinals, used for deciding how "high" to climb in taxonomy from a category when ingesting its ordinals

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.index.categorypolicy.PathPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.index.categorypolicy.PathPolicy

Packages that use PathPolicy
org.apache.lucene.facet.index.categorypolicy | Policies for indexing categories
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets

Uses of PathPolicy in org.apache.lucene.facet.index.categorypolicy

Classes in org.apache.lucene.facet.index.categorypolicy that implement PathPolicy
class | DefaultPathPolicy This class filters our the ROOT category path.
class | NonTopLevelPathPolicy This class filters our the ROOT category, and it's direct descendants.

Uses of PathPolicy in org.apache.lucene.facet.index.params

Methods in org.apache.lucene.facet.index.params that return PathPolicy
protected PathPolicy | DefaultFacetIndexingParams.fixedPathPolicy() "fixed" path policy.
PathPolicy | DefaultFacetIndexingParams.getPathPolicy()
PathPolicy | FacetIndexingParams.getPathPolicy() Get the policy for indexing category paths, used for deciding how "high" to climb in taxonomy from a category when ingesting its category paths.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.CategoryContainer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.CategoryContainer

Packages that use CategoryContainer
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.facet.index | Indexing of document categories

Uses of CategoryContainer in org.apache.lucene.benchmark.byTask.feeds

Methods in org.apache.lucene.benchmark.byTask.feeds that return CategoryContainer
CategoryContainer | RandomFacetSource.getNextFacets(CategoryContainer facets)
abstract CategoryContainer | FacetSource.getNextFacets(CategoryContainer facets) Returns the next facets content item.

Methods in org.apache.lucene.benchmark.byTask.feeds with parameters of type CategoryContainer
CategoryContainer | RandomFacetSource.getNextFacets(CategoryContainer facets)
abstract CategoryContainer | FacetSource.getNextFacets(CategoryContainer facets) Returns the next facets content item.

Uses of CategoryContainer in org.apache.lucene.facet.index

Methods in org.apache.lucene.facet.index with parameters of type CategoryContainer
 void CategoryContainer.merge(CategoryContainer other)
Add the categories from another CategoryContainer to this one.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.CategoryDocumentBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.CategoryDocumentBuilder

Packages that use CategoryDocumentBuilder
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.index | Indexing of document categories

Uses of CategoryDocumentBuilder in org.apache.lucene.facet.enhancements

Subclasses of CategoryDocumentBuilder in org.apache.lucene.facet.enhancements
 class EnhancementsDocumentBuilder
An EnhancementsDocumentBuilder is a CategoryDocumentBuilder which adds categories to documents according to the list of CategoryEnhancements from EnhancementsIndexingParams.

Uses of CategoryDocumentBuilder in org.apache.lucene.facet.index

Methods in org.apache.lucene.facet.index that return CategoryDocumentBuilder
CategoryDocumentBuilder | CategoryDocumentBuilder.setCategories(Iterable<CategoryAttribute> categories) Set the categories of the document builder from an Iterable of CategoryAttribute objects.
CategoryDocumentBuilder | CategoryDocumentBuilder.setCategoryPaths(Iterable<CategoryPath> categoryPaths) Set the categories of the document builder from an Iterable of CategoryPath objects.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.CategoryListPayloadStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.CategoryListPayloadStream

Packages that use CategoryListPayloadStream
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets

Uses of CategoryListPayloadStream in org.apache.lucene.facet.enhancements.association

Fields in org.apache.lucene.facet.enhancements.association declared as CategoryListPayloadStream
protected  CategoryListPayloadStream AssociationListTokenizer.payloadStream

Uses of CategoryListPayloadStream in org.apache.lucene.facet.index.streaming

Fields in org.apache.lucene.facet.index.streaming with type parameters of type CategoryListPayloadStream
protected Iterator<Map.Entry<String,CategoryListPayloadStream>> | CountingListTokenizer.payloadStreamIterator An iterator over the payload streams
protected HashMap<String,CategoryListPayloadStream> | CountingListTokenizer.payloadStreamsByName A table for retrieving payload streams by category-list name.

Methods in org.apache.lucene.facet.index.streaming that return CategoryListPayloadStream
protected  CategoryListPayloadStream CountingListTokenizer.getPayloadStream(CategoryPath categoryPath, int ordinal)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor

No usage of org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsPayloadProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsPayloadProcessor

No usage of org.apache.lucene.facet.index.FacetsPayloadProcessorProvider.FacetsPayloadProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.FacetsPayloadProcessorProvider

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.FacetsPayloadProcessorProvider

No usage of org.apache.lucene.facet.index.FacetsPayloadProcessorProvider

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CategoryListParams

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.params
Class CategoryListParams

java.lang.Object
    extended by  org.apache.lucene.facet.index.params.CategoryListParams
All Implemented Interfaces:
Serializable
public class CategoryListParams
extends Object
implements Serializable

Contains parameters for a category list *

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static Term DEFAULT_TERM
The default term used to store the facets information.
Constructor Summary
CategoryListParams()
Constructs a default category list parameters object, using DEFAULT_TERM.
CategoryListParams(Term term)
Constructs a category list parameters object, using the given Term.
Method Summary
CategoryListIterator | createCategoryListIterator(IndexReader reader, int partition) Create the category list iterator for the specified partition.
IntEncoder | createEncoder() Allows to override how categories are encoded and decoded.
boolean | equals(Object o) Equality is defined by the 'term' that defines this category list.
Term | getTerm() A Term who's payload holds the category-list.
int | hashCode() Hashcode is similar to equals(Object), in that it uses the term that defines this category list to derive the hashcode.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_TERM

public static final Term DEFAULT_TERM
The default term used to store the facets information.

Constructor Detail

CategoryListParams

public CategoryListParams()
Constructs a default category list parameters object, using DEFAULT_TERM.

CategoryListParams

public CategoryListParams(Term term)
Constructs a category list parameters object, using the given Term.

Parameters:
term - who's payload hold the category-list.
Method Detail

getTerm

public final Term getTerm()
A Term who's payload holds the category-list.

createEncoder

public IntEncoder createEncoder()
Allows to override how categories are encoded and decoded. A matching IntDecoder is provided by the IntEncoder.

Default implementation creates a new Sorting(Unique(DGap)) encoder. Uniqueness in this regard means when the same category appears twice in a document, only one appearance would be encoded. This has effect on facet counting results.

Some possible considerations when overriding may be:

  • an application "knows" that all categories are unique. So no need to pass through the unique filter.
  • Another application might wish to count multiple occurrences of the same category, or, use a faster encoding which will consume more space.
In any event when changing this value make sure you know what you are doing, and test the results - e.g. counts, if the application is about counting facets.

equals

public boolean equals(Object o)
Equality is defined by the 'term' that defines this category list. Sub-classes should override this method if a more complex calculation is needed to ensure equality.

Overrides:
equals in class Object

hashCode

public int hashCode()
Hashcode is similar to equals(Object), in that it uses the term that defines this category list to derive the hashcode. Subclasses need to ensure that equality/hashcode is correctly defined, or there could be side-effects in the TotalFacetCounts caching mechanism (as the filename for a Total Facet Counts array cache is dependent on the hashCode, so it should consistently return the same hash for identity).

Overrides:
hashCode in class Object

createCategoryListIterator

public CategoryListIterator createCategoryListIterator(IndexReader reader,
                                                       int partition)
                                                throws IOException
Create the category list iterator for the specified partition.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DefaultFacetIndexingParams

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.params
Class DefaultFacetIndexingParams

java.lang.Object
    extended by  org.apache.lucene.facet.index.params.DefaultFacetIndexingParams
All Implemented Interfaces:
Serializable, FacetIndexingParams
Direct Known Subclasses:
PerDimensionIndexingParams
public class DefaultFacetIndexingParams
extends Object
implements FacetIndexingParams

Default implementation for FacetIndexingParams.

Getters for partition-size, OrdinalPolicy and PathPolicy are all final, and so the proper way to modify them when extending this class is through fixedPartitionSize(), fixedOrdinalPolicy() or fixedPathPolicy() accordingly.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static char DEFAULT_FACET_DELIM_CHAR
delimiter between a categories in a path, e.g.
Constructor Summary
DefaultFacetIndexingParams()
DefaultFacetIndexingParams(CategoryListParams categoryListParams)
Method Summary
int | drillDownTermText(CategoryPath path, char[] buffer) Return the drilldown Term-Text which does not need to do any allocations.
boolean | equals(Object obj)
protected OrdinalPolicy | fixedOrdinalPolicy() "fixed" ordinal policy.
protected int | fixedPartitionSize() "fixed" partition size.
protected PathPolicy | fixedPathPolicy() "fixed" path policy.
Iterable<CategoryListParams> | getAllCategoryListParams() Return info about all category lists in the index.
CategoryListParams | getCategoryListParams(CategoryPath category) The name of the category-list to put this category in, or null if this category should not be aggregatable.
char | getFacetDelimChar() Use DEFAULT_FACET_DELIM_CHAR as the delimiter.
OrdinalPolicy | getOrdinalPolicy() Get the policy for indexing category ordinals, used for deciding how "high" to climb in taxonomy from a category when ingesting its ordinals
int | getPartitionSize() Get the partition size.
PathPolicy | getPathPolicy() Get the policy for indexing category paths, used for deciding how "high" to climb in taxonomy from a category when ingesting its category paths.
int | hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_FACET_DELIM_CHAR

public static final char DEFAULT_FACET_DELIM_CHAR
delimiter between a categories in a path, e.g. Products FACET_DELIM Consumer FACET_DELIM Tv. This should be a character not found in any path component

See Also:
Constant Field Values
Constructor Detail

DefaultFacetIndexingParams

public DefaultFacetIndexingParams()

DefaultFacetIndexingParams

public DefaultFacetIndexingParams(CategoryListParams categoryListParams)
Method Detail

getCategoryListParams

public CategoryListParams getCategoryListParams(CategoryPath category)
Description copied from interface: FacetIndexingParams
The name of the category-list to put this category in, or null if this category should not be aggregatable.

By default, all categories are written to the same category list, but applications which know in advance that in some situations only parts of the category hierarchy needs to be counted can divide the categories into two or more different category lists.

If null is returned for a category, it means that this category should not appear in any category list, and thus counts for it cannot be aggregated. This category can still be used for drill-down, even though the count for it is not known.

Specified by:
getCategoryListParams in interface FacetIndexingParams

drillDownTermText

public int drillDownTermText(CategoryPath path,
                             char[] buffer)
Description copied from interface: FacetIndexingParams
Return the drilldown Term-Text which does not need to do any allocations. The number of chars set is returned.

Note: Make sure buffer is large enough.

Specified by:
drillDownTermText in interface FacetIndexingParams
See Also:
CategoryPath.charsNeededForFullPath()

fixedPartitionSize

protected int fixedPartitionSize()
"fixed" partition size.

See Also:
getPartitionSize()

fixedOrdinalPolicy

protected OrdinalPolicy fixedOrdinalPolicy()
"fixed" ordinal policy.

See Also:
getOrdinalPolicy()

fixedPathPolicy

protected PathPolicy fixedPathPolicy()
"fixed" path policy.

See Also:
getPathPolicy()

getPartitionSize

public final int getPartitionSize()
Description copied from interface: FacetIndexingParams
Get the partition size. Same value should be used during the life time of an index. At search time this value is compared with actual taxonomy size and their minimum is used.

Specified by:
getPartitionSize in interface FacetIndexingParams

getAllCategoryListParams

public Iterable<CategoryListParams> getAllCategoryListParams()
Description copied from interface: FacetIndexingParams
Return info about all category lists in the index.

Specified by:
getAllCategoryListParams in interface FacetIndexingParams
See Also:
FacetIndexingParams.getCategoryListParams(CategoryPath)

getOrdinalPolicy

public final OrdinalPolicy getOrdinalPolicy()
Description copied from interface: FacetIndexingParams
Get the policy for indexing category ordinals, used for deciding how "high" to climb in taxonomy from a category when ingesting its ordinals

Specified by:
getOrdinalPolicy in interface FacetIndexingParams

getPathPolicy

public final PathPolicy getPathPolicy()
Description copied from interface: FacetIndexingParams
Get the policy for indexing category paths, used for deciding how "high" to climb in taxonomy from a category when ingesting its category paths.

Specified by:
getPathPolicy in interface FacetIndexingParams

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getFacetDelimChar

public char getFacetDelimChar()
Use DEFAULT_FACET_DELIM_CHAR as the delimiter.

Specified by:
getFacetDelimChar in interface FacetIndexingParams
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FacetIndexingParams

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.params
Interface FacetIndexingParams

All Superinterfaces:
Serializable
All Known Subinterfaces:
EnhancementsIndexingParams
All Known Implementing Classes:
DefaultEnhancementsIndexingParams, DefaultFacetIndexingParams, PerDimensionIndexingParams
public interface FacetIndexingParams
extends Serializable

Parameters on how facets are to be written to the index. For example, which fields and terms are used to refer to the indexed posting list.

If non-default parameters were used during indexing, the same parameters must also be passed during faceted search. This requirement is analogous to the requirement during search to know which fields were indexed, and which Analyzer was used on the text.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
int | drillDownTermText(CategoryPath path, char[] buffer) Return the drilldown Term-Text which does not need to do any allocations.
Iterable<CategoryListParams> | getAllCategoryListParams() Return info about all category lists in the index.
CategoryListParams | getCategoryListParams(CategoryPath category) The name of the category-list to put this category in, or null if this category should not be aggregatable.
char | getFacetDelimChar() Get the delimiter character used internally for drill-down terms
OrdinalPolicy | getOrdinalPolicy() Get the policy for indexing category ordinals, used for deciding how "high" to climb in taxonomy from a category when ingesting its ordinals
int | getPartitionSize() Get the partition size.
PathPolicy | getPathPolicy() Get the policy for indexing category paths, used for deciding how "high" to climb in taxonomy from a category when ingesting its category paths.

Method Detail

getCategoryListParams

CategoryListParams getCategoryListParams(CategoryPath category)
The name of the category-list to put this category in, or null if this category should not be aggregatable.

By default, all categories are written to the same category list, but applications which know in advance that in some situations only parts of the category hierarchy needs to be counted can divide the categories into two or more different category lists.

If null is returned for a category, it means that this category should not appear in any category list, and thus counts for it cannot be aggregated. This category can still be used for drill-down, even though the count for it is not known.

getAllCategoryListParams

Iterable<CategoryListParams> getAllCategoryListParams()
Return info about all category lists in the index.

See Also:
getCategoryListParams(CategoryPath)

drillDownTermText

int drillDownTermText(CategoryPath path,
                      char[] buffer)
Return the drilldown Term-Text which does not need to do any allocations. The number of chars set is returned.

Note: Make sure buffer is large enough.

See Also:
CategoryPath.charsNeededForFullPath()

getPartitionSize

int getPartitionSize()
Get the partition size. Same value should be used during the life time of an index. At search time this value is compared with actual taxonomy size and their minimum is used.

getPathPolicy

PathPolicy getPathPolicy()
Get the policy for indexing category paths, used for deciding how "high" to climb in taxonomy from a category when ingesting its category paths.

getOrdinalPolicy

OrdinalPolicy getOrdinalPolicy()
Get the policy for indexing category ordinals, used for deciding how "high" to climb in taxonomy from a category when ingesting its ordinals

getFacetDelimChar

char getFacetDelimChar()
Get the delimiter character used internally for drill-down terms

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FacetParamsMissingPropertyException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.params
Class FacetParamsMissingPropertyException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.io.IOException
                extended by  org.apache.lucene.facet.FacetException
                    extended by  org.apache.lucene.facet.index.params.FacetParamsMissingPropertyException
All Implemented Interfaces:
Serializable
public class FacetParamsMissingPropertyException
extends FacetException

Thrown when the facets params are missing a property. *

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
FacetParamsMissingPropertyException(String key)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FacetParamsMissingPropertyException

public FacetParamsMissingPropertyException(String key)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.index.params
Interfaces
FacetIndexingParams
Classes
CategoryListParams
DefaultFacetIndexingParams
PerDimensionIndexingParams
Exceptions
FacetParamsMissingPropertyException


org.apache.lucene.facet.index.params

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.index.params

Indexing-time specifications for handling facets

See:
Description

Interface Summary
FacetIndexingParams Parameters on how facets are to be written to the index.

Class Summary
CategoryListParams | Contains parameters for a category list *
DefaultFacetIndexingParams | Default implementation for FacetIndexingParams.
PerDimensionIndexingParams | A FacetIndexingParams that utilizes different category lists, defined by the dimension specified CategoryPaths (see PerDimensionIndexingParams.addCategoryListParams(CategoryPath, CategoryListParams)

Exception Summary
FacetParamsMissingPropertyException Thrown when the facets params are missing a property.

Package org.apache.lucene.facet.index.params Description

Indexing-time specifications for handling facets

Parameters on how facets are to be written to the index, such as which fields and terms are used to refer to the facets posting list.


org.apache.lucene.facet.index.params Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.index.params

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.index.params.CategoryListParams (implements java.io.Serializable)
    • org.apache.lucene.facet.index.params.DefaultFacetIndexingParams (implements org.apache.lucene.facet.index.params.FacetIndexingParams)
      • org.apache.lucene.facet.index.params.PerDimensionIndexingParams
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.io.IOException
          • org.apache.lucene.facet.FacetException
            • org.apache.lucene.facet.index.params.FacetParamsMissingPropertyException

Interface Hierarchy

  • java.io.Serializable
    • org.apache.lucene.facet.index.params.FacetIndexingParams


Uses of Package org.apache.lucene.facet.index.params

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.index.params

Packages that use org.apache.lucene.facet.index.params
org.apache.lucene.facet.enhancements.params | Enhanced category features
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.cache | Caching to speed up facets accumulation.
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.util | Various utilities for faceted search

Classes in org.apache.lucene.facet.index.params used by org.apache.lucene.facet.enhancements.params
CategoryListParams
Contains parameters for a category list *
DefaultFacetIndexingParams
Default implementation for FacetIndexingParams.
FacetIndexingParams
Parameters on how facets are to be written to the index.
PerDimensionIndexingParams
A FacetIndexingParams that utilizes different category lists, defined by the dimension specified CategoryPaths (see PerDimensionIndexingParams.addCategoryListParams(CategoryPath, CategoryListParams)

Classes in org.apache.lucene.facet.index.params used by org.apache.lucene.facet.index
CategoryListParams
Contains parameters for a category list *
FacetIndexingParams
Parameters on how facets are to be written to the index.

Classes in org.apache.lucene.facet.index.params used by org.apache.lucene.facet.index.params
CategoryListParams
Contains parameters for a category list *
DefaultFacetIndexingParams
Default implementation for FacetIndexingParams.
FacetIndexingParams
Parameters on how facets are to be written to the index.

Classes in org.apache.lucene.facet.index.params used by org.apache.lucene.facet.index.streaming
FacetIndexingParams
Parameters on how facets are to be written to the index.

Classes in org.apache.lucene.facet.index.params used by org.apache.lucene.facet.search
FacetIndexingParams
Parameters on how facets are to be written to the index.

Classes in org.apache.lucene.facet.index.params used by org.apache.lucene.facet.search.cache
CategoryListParams
Contains parameters for a category list *
FacetIndexingParams
Parameters on how facets are to be written to the index.

Classes in org.apache.lucene.facet.index.params used by org.apache.lucene.facet.search.params
FacetIndexingParams
Parameters on how facets are to be written to the index.

Classes in org.apache.lucene.facet.index.params used by org.apache.lucene.facet.util
CategoryListParams
Contains parameters for a category list *
FacetIndexingParams
Parameters on how facets are to be written to the index.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PerDimensionIndexingParams

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.params
Class PerDimensionIndexingParams

java.lang.Object
    extended by  org.apache.lucene.facet.index.params.DefaultFacetIndexingParams
        extended by  org.apache.lucene.facet.index.params.PerDimensionIndexingParams
All Implemented Interfaces:
Serializable, FacetIndexingParams
Direct Known Subclasses:
DefaultEnhancementsIndexingParams
public class PerDimensionIndexingParams
extends DefaultFacetIndexingParams

A FacetIndexingParams that utilizes different category lists, defined by the dimension specified CategoryPaths (see addCategoryListParams(CategoryPath, CategoryListParams)

A 'dimension' is defined as the first or "zero-th" component in a CategoryPath. For example, if a CategoryPath is defined as "/Author/American/Mark Twain", then the dimension is "Author".

This class also uses the 'default' CategoryListParams (as specified by CategoryListParams.CategoryListParams() when getCategoryListParams(CategoryPath) is called for a CategoryPath whose dimension component has not been specifically defined.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams
DEFAULT_FACET_DELIM_CHAR
Constructor Summary
PerDimensionIndexingParams()
Construct with the default CategoryListParams as the default CategoryListParams for unspecified CategoryPaths.
PerDimensionIndexingParams(CategoryListParams categoryListParams)
Construct with the included categoryListParams as the default CategoryListParams for unspecified CategoryPaths.
Method Summary
void | addCategoryListParams(CategoryPath category, CategoryListParams clParams) Add a CategoryListParams for a given CategoryPath's dimension or "zero-th" category.
Iterable<CategoryListParams> | getAllCategoryListParams() Get all the categoryListParams, including the default.
CategoryListParams | getCategoryListParams(CategoryPath category) Get the CategoryListParams based on the dimension or "zero-th category" of the specified CategoryPath.
Methods inherited from class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams
drillDownTermText, equals, fixedOrdinalPolicy, fixedPartitionSize, fixedPathPolicy, getFacetDelimChar, getOrdinalPolicy, getPartitionSize, getPathPolicy, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PerDimensionIndexingParams

public PerDimensionIndexingParams()
Construct with the default CategoryListParams as the default CategoryListParams for unspecified CategoryPaths.

PerDimensionIndexingParams

public PerDimensionIndexingParams(CategoryListParams categoryListParams)
Construct with the included categoryListParams as the default CategoryListParams for unspecified CategoryPaths.

Parameters:
categoryListParams - the default categoryListParams to use
Method Detail

getAllCategoryListParams

public Iterable<CategoryListParams> getAllCategoryListParams()
Get all the categoryListParams, including the default.

Specified by:
getAllCategoryListParams in interface FacetIndexingParams
Overrides:
getAllCategoryListParams in class DefaultFacetIndexingParams
See Also:
FacetIndexingParams.getCategoryListParams(CategoryPath)

getCategoryListParams

public CategoryListParams getCategoryListParams(CategoryPath category)
Get the CategoryListParams based on the dimension or "zero-th category" of the specified CategoryPath.

Specified by:
getCategoryListParams in interface FacetIndexingParams
Overrides:
getCategoryListParams in class DefaultFacetIndexingParams

addCategoryListParams

public void addCategoryListParams(CategoryPath category,
                                  CategoryListParams clParams)
Add a CategoryListParams for a given CategoryPath's dimension or "zero-th" category.

Parameters:
category -
clParams -
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.facet.index.params.CategoryListParams

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.params.CategoryListParams

Packages that use CategoryListParams
org.apache.lucene.facet.enhancements.params | Enhanced category features
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets
org.apache.lucene.facet.search.cache | Caching to speed up facets accumulation.
org.apache.lucene.facet.util | Various utilities for faceted search

Uses of CategoryListParams in org.apache.lucene.facet.enhancements.params

Constructors in org.apache.lucene.facet.enhancements.params with parameters of type CategoryListParams
DefaultEnhancementsIndexingParams(CategoryListParams categoryListParams, CategoryEnhancement... enhancements)
Construct with certain enhancements and CategoryListParams

Uses of CategoryListParams in org.apache.lucene.facet.index

Constructors in org.apache.lucene.facet.index with parameters of type CategoryListParams
FacetsPayloadProcessorProvider.FacetsPayloadProcessor(CategoryListParams params, int[] ordinalMap)

Uses of CategoryListParams in org.apache.lucene.facet.index.params

Methods in org.apache.lucene.facet.index.params that return CategoryListParams
CategoryListParams | DefaultFacetIndexingParams.getCategoryListParams(CategoryPath category)
CategoryListParams | PerDimensionIndexingParams.getCategoryListParams(CategoryPath category) Get the CategoryListParams based on the dimension or "zero-th category" of the specified CategoryPath.
CategoryListParams | FacetIndexingParams.getCategoryListParams(CategoryPath category) The name of the category-list to put this category in, or null if this category should not be aggregatable.

Methods in org.apache.lucene.facet.index.params that return types with arguments of type CategoryListParams
Iterable<CategoryListParams> | DefaultFacetIndexingParams.getAllCategoryListParams()
Iterable<CategoryListParams> | PerDimensionIndexingParams.getAllCategoryListParams() Get all the categoryListParams, including the default.
Iterable<CategoryListParams> | FacetIndexingParams.getAllCategoryListParams() Return info about all category lists in the index.

Methods in org.apache.lucene.facet.index.params with parameters of type CategoryListParams
 void PerDimensionIndexingParams.addCategoryListParams(CategoryPath category, CategoryListParams clParams)
Add a CategoryListParams for a given CategoryPath's dimension or "zero-th" category.

Constructors in org.apache.lucene.facet.index.params with parameters of type CategoryListParams
DefaultFacetIndexingParams(CategoryListParams categoryListParams)
PerDimensionIndexingParams(CategoryListParams categoryListParams)
Construct with the included categoryListParams as the default CategoryListParams for unspecified CategoryPaths.

Uses of CategoryListParams in org.apache.lucene.facet.search.cache

Methods in org.apache.lucene.facet.search.cache with parameters of type CategoryListParams
CategoryListData | CategoryListCache.get(CategoryListParams clp) Fetch the cached CategoryListData for a given CategoryListParams.
void | CategoryListCache.loadAndRegister(CategoryListParams clp, IndexReader reader, TaxonomyReader taxo, FacetIndexingParams iparams) Load and register CategoryListData.
void | CategoryListCache.register(CategoryListParams clp, CategoryListData clData) Register a pre-computed CategoryListData.

Uses of CategoryListParams in org.apache.lucene.facet.util

Methods in org.apache.lucene.facet.util with parameters of type CategoryListParams
static String | PartitionsUtils.partitionName(CategoryListParams clParams, int partition) Partition name by its number
static String | PartitionsUtils.partitionNameByOrdinal(FacetIndexingParams iParams, CategoryListParams clParams, int ordinal) Partition name by category ordinal

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.params.DefaultFacetIndexingParams

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.params.DefaultFacetIndexingParams

Packages that use DefaultFacetIndexingParams
org.apache.lucene.facet.enhancements.params | Enhanced category features
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets

Uses of DefaultFacetIndexingParams in org.apache.lucene.facet.enhancements.params

Subclasses of DefaultFacetIndexingParams in org.apache.lucene.facet.enhancements.params
 class DefaultEnhancementsIndexingParams
Default implementation of EnhancementsIndexingParams

Uses of DefaultFacetIndexingParams in org.apache.lucene.facet.index.params

Subclasses of DefaultFacetIndexingParams in org.apache.lucene.facet.index.params
 class PerDimensionIndexingParams
A FacetIndexingParams that utilizes different category lists, defined by the dimension specified CategoryPaths (see PerDimensionIndexingParams.addCategoryListParams(CategoryPath, CategoryListParams)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.index.params.FacetIndexingParams

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.index.params.FacetIndexingParams

Packages that use FacetIndexingParams
org.apache.lucene.facet.enhancements.params | Enhanced category features
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.cache | Caching to speed up facets accumulation.
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.util | Various utilities for faceted search

Uses of FacetIndexingParams in org.apache.lucene.facet.enhancements.params

Subinterfaces of FacetIndexingParams in org.apache.lucene.facet.enhancements.params
 interface EnhancementsIndexingParams
Facet indexing parameters for defining category enhancements.

Classes in org.apache.lucene.facet.enhancements.params that implement FacetIndexingParams
 class DefaultEnhancementsIndexingParams
Default implementation of EnhancementsIndexingParams

Uses of FacetIndexingParams in org.apache.lucene.facet.index

Fields in org.apache.lucene.facet.index declared as FacetIndexingParams
protected  FacetIndexingParams CategoryDocumentBuilder.indexingParams
Parameters to be used when indexing categories.

Constructors in org.apache.lucene.facet.index with parameters of type FacetIndexingParams
CategoryDocumentBuilder(TaxonomyWriter taxonomyWriter, FacetIndexingParams params)
Creating a facets document builder with a given facet indexing parameters object.
FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor(FacetIndexingParams indexingParams, int[] ordinalMap)
Construct FacetsDirPayloadProcessor with custom FacetIndexingParams
FacetsPayloadProcessorProvider(Directory dir, int[] ordinalMap, FacetIndexingParams indexingParams)
Construct FacetsPayloadProcessorProvider with FacetIndexingParams

Uses of FacetIndexingParams in org.apache.lucene.facet.index.params

Classes in org.apache.lucene.facet.index.params that implement FacetIndexingParams
class | DefaultFacetIndexingParams Default implementation for FacetIndexingParams.
class | PerDimensionIndexingParams A FacetIndexingParams that utilizes different category lists, defined by the dimension specified CategoryPaths (see PerDimensionIndexingParams.addCategoryListParams(CategoryPath, CategoryListParams)

Uses of FacetIndexingParams in org.apache.lucene.facet.index.streaming

Fields in org.apache.lucene.facet.index.streaming declared as FacetIndexingParams
protected  FacetIndexingParams CategoryTokenizerBase.indexingParams
Indexing params for creating term text

Constructors in org.apache.lucene.facet.index.streaming with parameters of type FacetIndexingParams
CategoryListTokenizer(TokenStream input, FacetIndexingParams indexingParams)
CategoryParentsStream(CategoryAttributesStream input, TaxonomyWriter taxonomyWriter, FacetIndexingParams indexingParams)
Constructor.
CategoryTokenizer(TokenStream input, FacetIndexingParams indexingParams)
CategoryTokenizerBase(TokenStream input, FacetIndexingParams indexingParams)
Constructor.
CountingListTokenizer(TokenStream input, FacetIndexingParams indexingParams)

Uses of FacetIndexingParams in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search with parameters of type FacetIndexingParams
 TotalFacetCounts TotalFacetCountsCache.getTotalCounts(IndexReader indexReader, TaxonomyReader taxonomy, FacetIndexingParams facetIndexingParams, CategoryListCache clCache)
Get the total facet counts for a reader/taxonomy pair and facet indexing parameters.
 void TotalFacetCountsCache.load(File inputFile, IndexReader indexReader, TaxonomyReader taxonomy, FacetIndexingParams facetIndexingParams)
Load TotalFacetCounts matching input parameters from the provided outputFile and add them into the cache for the provided indexReader, taxonomy, and facetIndexingParams.
static Query DrillDown.query(FacetIndexingParams iParams, CategoryPath... paths)
Return a query for drilling down into all given categories (AND).
static Query DrillDown.query(FacetIndexingParams iParams, Query baseQuery, CategoryPath... paths)
Turn a base query into a drilling-down query for all given category paths (AND).
 void TotalFacetCountsCache.store(File outputFile, IndexReader indexReader, TaxonomyReader taxonomy, FacetIndexingParams facetIndexingParams, CategoryListCache clCache)
Store the TotalFacetCounts matching input parameters into the provided outputFile, making them available for a later call to TotalFacetCountsCache.load(File, IndexReader, TaxonomyReader, FacetIndexingParams).
static Term DrillDown.term(FacetIndexingParams iParams, CategoryPath path)
Return a term for drilling down into a category.

Uses of FacetIndexingParams in org.apache.lucene.facet.search.cache

Methods in org.apache.lucene.facet.search.cache with parameters of type FacetIndexingParams
 void CategoryListCache.loadAndRegister(CategoryListParams clp, IndexReader reader, TaxonomyReader taxo, FacetIndexingParams iparams)
Load and register CategoryListData.

Uses of FacetIndexingParams in org.apache.lucene.facet.search.params

Fields in org.apache.lucene.facet.search.params declared as FacetIndexingParams
protected  FacetIndexingParams FacetSearchParams.indexingParams

Methods in org.apache.lucene.facet.search.params that return FacetIndexingParams
 FacetIndexingParams FacetSearchParams.getFacetIndexingParams()
A list of FacetRequest objects, determining what to count.

Constructors in org.apache.lucene.facet.search.params with parameters of type FacetIndexingParams
FacetSearchParams(FacetIndexingParams indexingParams)
Construct with specific faceted indexing parameters.

Uses of FacetIndexingParams in org.apache.lucene.facet.util

Methods in org.apache.lucene.facet.util with parameters of type FacetIndexingParams
static String | PartitionsUtils.partitionNameByOrdinal(FacetIndexingParams iParams, CategoryListParams clParams, int ordinal) Partition name by category ordinal
static int | PartitionsUtils.partitionNumber(FacetIndexingParams iParams, int ordinal) Partition number of an ordinal.
static int | PartitionsUtils.partitionOffset(FacetIndexingParams iParams, int partitionNumber, TaxonomyReader taxonomyReader) Get the offset for a given partition.
static int | PartitionsUtils.partitionSize(FacetIndexingParams indexingParams, TaxonomyReader taxonomyReader) Get the partition size in this parameter, or return the size of the taxonomy, which is smaller.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.params.FacetParamsMissingPropertyException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.params.FacetParamsMissingPropertyException

No usage of org.apache.lucene.facet.index.params.FacetParamsMissingPropertyException

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.params.PerDimensionIndexingParams

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.params.PerDimensionIndexingParams

Packages that use PerDimensionIndexingParams
org.apache.lucene.facet.enhancements.params Enhanced category features

Uses of PerDimensionIndexingParams in org.apache.lucene.facet.enhancements.params

Subclasses of PerDimensionIndexingParams in org.apache.lucene.facet.enhancements.params
 class DefaultEnhancementsIndexingParams
Default implementation of EnhancementsIndexingParams

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CategoryAttributesStream

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.streaming
Class CategoryAttributesStream

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.facet.index.streaming.CategoryAttributesStream
All Implemented Interfaces:
Closeable
public class CategoryAttributesStream
extends TokenStream

An attribute stream built from an Iterable of CategoryAttribute. This stream should then be passed through several filters (see CategoryParentsStream, CategoryListTokenizer and CategoryTokenizer) until a token stream is produced that can be indexed by Lucene.

A CategoryAttributesStream object can be reused for producing more than one stream. To do that, the user should cause the underlying Iterable object to return a new set of categories, and then call reset() to allow this stream to be used again.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
protected  CategoryAttribute categoryAttribute
Constructor Summary
CategoryAttributesStream(Iterable<CategoryAttribute> iterable)
Constructor
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Resets this stream to the beginning.
Methods inherited from class org.apache.lucene.analysis.TokenStream
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

categoryAttribute

protected CategoryAttribute categoryAttribute
Constructor Detail

CategoryAttributesStream

public CategoryAttributesStream(Iterable<CategoryAttribute> iterable)
Constructor

Parameters:
iterable - Iterable of CategoryAttribute, from which categories are taken.
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CategoryListTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.streaming
Class CategoryListTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
                    extended by  org.apache.lucene.facet.index.streaming.CategoryListTokenizer
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
AssociationListTokenizer, CountingListTokenizer
public abstract class CategoryListTokenizer
extends CategoryTokenizerBase

A base class for category list tokenizers, which add category list tokens to category streams.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
categoryAttribute, indexingParams, payload, payloadAttribute, termAttribute
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
CategoryListTokenizer(TokenStream input, FacetIndexingParams indexingParams)
Method Summary
protected void | handleEndOfInput() A method invoked once when the input stream ends, for subclass-specific processing.
protected void | handleStartOfInput() A method invoked once when the input stream begins, for subclass-specific processing.
abstract boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CategoryListTokenizer

public CategoryListTokenizer(TokenStream input,
                             FacetIndexingParams indexingParams)
See Also:
CategoryTokenizerBase.CategoryTokenizerBase(TokenStream, FacetIndexingParams)
Method Detail

handleStartOfInput

protected void handleStartOfInput()
                           throws IOException
A method invoked once when the input stream begins, for subclass-specific processing. Subclass implementations must invoke this one, too!

Throws:
IOException

handleEndOfInput

protected void handleEndOfInput()
                         throws IOException
A method invoked once when the input stream ends, for subclass-specific processing.

Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException

incrementToken

public abstract boolean incrementToken()
                                throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class CategoryTokenizerBase
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CategoryParentsStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.streaming
Class CategoryParentsStream

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.facet.index.streaming.CategoryParentsStream
All Implemented Interfaces:
Closeable
public class CategoryParentsStream
extends TokenFilter

This class adds parents to a CategoryAttributesStream. The parents are added according to the PathPolicy and OrdinalPolicy from the FacetIndexingParams given in the constructor.
By default, category properties are removed when creating parents of a certain category. However, it is possible to retain certain property types using addRetainableProperty(Class).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
protected CategoryAttribute | categoryAttribute An attribute containing all data related to the category
protected OrdinalProperty | ordinalProperty A category property containing the category ordinal
protected TaxonomyWriter | taxonomyWriter A TaxonomyWriter for adding categories and retrieving their ordinals.
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
CategoryParentsStream(CategoryAttributesStream input, TaxonomyWriter taxonomyWriter, FacetIndexingParams indexingParams)
Constructor.
Method Summary
void | addRetainableProperty(Class<? extends CategoryProperty> toRetain) Add a CategoryProperty class which is retained when creating parent tokens.
protected void | clearCategoryProperties() Clear the properties of the current CategoryAttribute attribute before setting the parent attributes.
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

taxonomyWriter

protected TaxonomyWriter taxonomyWriter
A TaxonomyWriter for adding categories and retrieving their ordinals.

categoryAttribute

protected CategoryAttribute categoryAttribute
An attribute containing all data related to the category

ordinalProperty

protected OrdinalProperty ordinalProperty
A category property containing the category ordinal

Constructor Detail

CategoryParentsStream

public CategoryParentsStream(CategoryAttributesStream input,
                             TaxonomyWriter taxonomyWriter,
                             FacetIndexingParams indexingParams)
Constructor.

Parameters:
input - The input stream to handle, must be derived from CategoryAttributesStream.
taxonomyWriter - The taxonomy writer to use for adding categories and retrieving their ordinals.
indexingParams - The indexing params used for filtering parents.
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

clearCategoryProperties

protected void clearCategoryProperties()
Clear the properties of the current CategoryAttribute attribute before setting the parent attributes.
It is possible to retain properties of certain types the parent tokens, using addRetainableProperty(Class).

addRetainableProperty

public void addRetainableProperty(Class<? extends CategoryProperty> toRetain)
Add a CategoryProperty class which is retained when creating parent tokens.

Parameters:
toRetain - The property class to retain.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CategoryTokenizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.streaming
Class CategoryTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
                    extended by  org.apache.lucene.facet.index.streaming.CategoryTokenizer
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
EnhancementsCategoryTokenizer
public class CategoryTokenizer
extends CategoryTokenizerBase

Basic class for setting the CharTermAttributes and PayloadAttributes of category tokens.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
categoryAttribute, indexingParams, payload, payloadAttribute, termAttribute
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
CategoryTokenizer(TokenStream input, FacetIndexingParams indexingParams)
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
protected void | setPayload() Set the payload of the current category token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CategoryTokenizer

public CategoryTokenizer(TokenStream input,
                         FacetIndexingParams indexingParams)
See Also:
CategoryTokenizerBase.CategoryTokenizerBase(TokenStream, FacetIndexingParams)
Method Detail

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class CategoryTokenizerBase
Returns:
false for end of stream; true otherwise
Throws:
IOException

setPayload

protected void setPayload()
Set the payload of the current category token.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CategoryTokenizerBase

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.streaming
Class CategoryTokenizerBase

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
CategoryListTokenizer, CategoryTokenizer
public abstract class CategoryTokenizerBase
extends TokenFilter

A base class for all token filters which add term and payload attributes to tokens and are to be used in CategoryDocumentBuilder. Contains three attributes: CategoryAttribute, CharTermAttribute and PayloadAttribute.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
protected CategoryAttribute | categoryAttribute The stream's category attributes.
protected FacetIndexingParams | indexingParams Indexing params for creating term text
protected Payload | payload The object used for constructing payloads.
protected PayloadAttribute | payloadAttribute The stream's payload attribute.
protected CharTermAttribute | termAttribute The stream's term attribute.
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
CategoryTokenizerBase(TokenStream input, FacetIndexingParams indexingParams)
Constructor.
Method Summary
abstract  boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

categoryAttribute

protected CategoryAttribute categoryAttribute
The stream's category attributes.

payloadAttribute

protected PayloadAttribute payloadAttribute
The stream's payload attribute.

termAttribute

protected CharTermAttribute termAttribute
The stream's term attribute.

payload

protected Payload payload
The object used for constructing payloads.

indexingParams

protected FacetIndexingParams indexingParams
Indexing params for creating term text

Constructor Detail

CategoryTokenizerBase

public CategoryTokenizerBase(TokenStream input,
                             FacetIndexingParams indexingParams)
Constructor.

Parameters:
input - The input stream, either CategoryParentsStream or an extension of CategoryTokenizerBase.
indexingParams - The indexing params to use.
Method Detail

incrementToken

public abstract boolean incrementToken()
                                throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CountingListTokenizer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.index.streaming
Class CountingListTokenizer

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
                    extended by  org.apache.lucene.facet.index.streaming.CategoryListTokenizer
                        extended by  org.apache.lucene.facet.index.streaming.CountingListTokenizer
All Implemented Interfaces:
Closeable
public class CountingListTokenizer
extends CategoryListTokenizer

CategoryListTokenizer for facet counting

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
protected Iterator<Map.Entry<String,CategoryListPayloadStream>> | payloadStreamIterator An iterator over the payload streams
protected HashMap<String,CategoryListPayloadStream> | payloadStreamsByName A table for retrieving payload streams by category-list name.
Fields inherited from class org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
categoryAttribute, indexingParams, payload, payloadAttribute, termAttribute
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
CountingListTokenizer(TokenStream input, FacetIndexingParams indexingParams)
Method Summary
protected CategoryListPayloadStream | getPayloadStream(CategoryPath categoryPath, int ordinal)
protected void | handleStartOfInput() A method invoked once when the input stream begins, for subclass-specific processing.
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
protected boolean | legalCategory() A method which allows extending classes to filter the categories going into the counting list.
Methods inherited from class org.apache.lucene.facet.index.streaming.CategoryListTokenizer
handleEndOfInput, reset
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

payloadStreamsByName

protected HashMap<String,CategoryListPayloadStream> payloadStreamsByName
A table for retrieving payload streams by category-list name.

payloadStreamIterator

protected Iterator<Map.Entry<String,CategoryListPayloadStream>> payloadStreamIterator
An iterator over the payload streams

Constructor Detail

CountingListTokenizer

public CountingListTokenizer(TokenStream input,
                             FacetIndexingParams indexingParams)
Method Detail

handleStartOfInput

protected void handleStartOfInput()
                           throws IOException
Description copied from class: CategoryListTokenizer
A method invoked once when the input stream begins, for subclass-specific processing. Subclass implementations must invoke this one, too!

Overrides:
handleStartOfInput in class CategoryListTokenizer
Throws:
IOException

incrementToken

public final boolean incrementToken()
                             throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class CategoryListTokenizer
Returns:
false for end of stream; true otherwise
Throws:
IOException

legalCategory

protected boolean legalCategory()
A method which allows extending classes to filter the categories going into the counting list.

Returns:
By default returns true, meaning the current category is to be part of the counting list. For categories that should be filtered, return false.

getPayloadStream

protected CategoryListPayloadStream getPayloadStream(CategoryPath categoryPath,
                                                     int ordinal)
                                              throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.index.streaming
Classes
CategoryAttributesStream
CategoryListTokenizer
CategoryParentsStream
CategoryTokenizer
CategoryTokenizerBase
CountingListTokenizer


org.apache.lucene.facet.index.streaming

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.index.streaming

Expert: attributes streaming definition for indexing facets

See:
Description

Class Summary
CategoryAttributesStream | An attribute stream built from an Iterable of CategoryAttribute.
CategoryListTokenizer | A base class for category list tokenizers, which add category list tokens to category streams.
CategoryParentsStream | This class adds parents to a CategoryAttributesStream.
CategoryTokenizer | Basic class for setting the CharTermAttributes and PayloadAttributes of category tokens.
CategoryTokenizerBase | A base class for all token filters which add term and payload attributes to tokens and are to be used in CategoryDocumentBuilder.
CountingListTokenizer | CategoryListTokenizer for facet counting

Package org.apache.lucene.facet.index.streaming Description

Expert: attributes streaming definition for indexing facets

Steaming of facets attributes is a low level indexing interface with Lucene indexing. There are two types of category related streams:
  • Category tokenizer stream handles tokenization for a single category, e.g. for creating drill-down tokens.
  • Category list tokenizer stream handles tokenization for multiple categories, e.g. for creating a counting list token, representing all the categories of a certain document.


org.apache.lucene.facet.index.streaming Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.index.streaming

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.facet.index.streaming.CategoryAttributesStream
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.facet.index.streaming.CategoryParentsStream
          • org.apache.lucene.facet.index.streaming.CategoryTokenizerBase
            • org.apache.lucene.facet.index.streaming.CategoryListTokenizer
              • org.apache.lucene.facet.index.streaming.CountingListTokenizer
            • org.apache.lucene.facet.index.streaming.CategoryTokenizer


Uses of Package org.apache.lucene.facet.index.streaming

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.index.streaming

Packages that use org.apache.lucene.facet.index.streaming
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets

Classes in org.apache.lucene.facet.index.streaming used by org.apache.lucene.facet.enhancements
CategoryAttributesStream
An attribute stream built from an Iterable of CategoryAttribute.
CategoryListTokenizer
A base class for category list tokenizers, which add category list tokens to category streams.
CategoryTokenizer
Basic class for setting the CharTermAttributes and PayloadAttributes of category tokens.
CategoryTokenizerBase
A base class for all token filters which add term and payload attributes to tokens and are to be used in CategoryDocumentBuilder.

Classes in org.apache.lucene.facet.index.streaming used by org.apache.lucene.facet.enhancements.association
CategoryListTokenizer
A base class for category list tokenizers, which add category list tokens to category streams.
CategoryTokenizerBase
A base class for all token filters which add term and payload attributes to tokens and are to be used in CategoryDocumentBuilder.

Classes in org.apache.lucene.facet.index.streaming used by org.apache.lucene.facet.index
CategoryAttributesStream
An attribute stream built from an Iterable of CategoryAttribute.
CategoryListTokenizer
A base class for category list tokenizers, which add category list tokens to category streams.
CategoryTokenizer
Basic class for setting the CharTermAttributes and PayloadAttributes of category tokens.
CountingListTokenizer
CategoryListTokenizer for facet counting

Classes in org.apache.lucene.facet.index.streaming used by org.apache.lucene.facet.index.streaming
CategoryAttributesStream
An attribute stream built from an Iterable of CategoryAttribute.
CategoryListTokenizer
A base class for category list tokenizers, which add category list tokens to category streams.
CategoryTokenizerBase
A base class for all token filters which add term and payload attributes to tokens and are to be used in CategoryDocumentBuilder.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.streaming.CategoryAttributesStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.streaming.CategoryAttributesStream

Packages that use CategoryAttributesStream
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets

Uses of CategoryAttributesStream in org.apache.lucene.facet.enhancements

Methods in org.apache.lucene.facet.enhancements with parameters of type CategoryAttributesStream
protected  TokenStream EnhancementsDocumentBuilder.getParentsStream(CategoryAttributesStream categoryAttributesStream)

Uses of CategoryAttributesStream in org.apache.lucene.facet.index

Methods in org.apache.lucene.facet.index with parameters of type CategoryAttributesStream
protected  TokenStream CategoryDocumentBuilder.getParentsStream(CategoryAttributesStream categoryAttributesStream)
Get a stream of categories which includes the parents, according to policies defined in indexing parameters.

Uses of CategoryAttributesStream in org.apache.lucene.facet.index.streaming

Constructors in org.apache.lucene.facet.index.streaming with parameters of type CategoryAttributesStream
CategoryParentsStream(CategoryAttributesStream input, TaxonomyWriter taxonomyWriter, FacetIndexingParams indexingParams)
Constructor.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.streaming.CategoryListTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.streaming.CategoryListTokenizer

Packages that use CategoryListTokenizer
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets

Uses of CategoryListTokenizer in org.apache.lucene.facet.enhancements

Methods in org.apache.lucene.facet.enhancements that return CategoryListTokenizer
protected CategoryListTokenizer | EnhancementsDocumentBuilder.getCategoryListTokenizer(TokenStream categoryStream)
CategoryListTokenizer | CategoryEnhancement.getCategoryListTokenizer(TokenStream tokenizer, EnhancementsIndexingParams indexingParams, TaxonomyWriter taxonomyWriter) Get the CategoryListTokenizer which generates the category list for this enhancement.

Uses of CategoryListTokenizer in org.apache.lucene.facet.enhancements.association

Subclasses of CategoryListTokenizer in org.apache.lucene.facet.enhancements.association
 class AssociationListTokenizer
Tokenizer for associations of a category

Methods in org.apache.lucene.facet.enhancements.association that return CategoryListTokenizer
 CategoryListTokenizer AssociationEnhancement.getCategoryListTokenizer(TokenStream tokenizer, EnhancementsIndexingParams indexingParams, TaxonomyWriter taxonomyWriter)

Uses of CategoryListTokenizer in org.apache.lucene.facet.index

Methods in org.apache.lucene.facet.index that return CategoryListTokenizer
protected  CategoryListTokenizer CategoryDocumentBuilder.getCategoryListTokenizer(TokenStream categoryStream)
Get a category list tokenizer (or a series of such tokenizers) to create the category list tokens.

Uses of CategoryListTokenizer in org.apache.lucene.facet.index.streaming

Subclasses of CategoryListTokenizer in org.apache.lucene.facet.index.streaming
 class CountingListTokenizer
CategoryListTokenizer for facet counting

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.streaming.CategoryParentsStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.streaming.CategoryParentsStream

No usage of org.apache.lucene.facet.index.streaming.CategoryParentsStream

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.streaming.CategoryTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.streaming.CategoryTokenizer

Packages that use CategoryTokenizer
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.index | Indexing of document categories

Uses of CategoryTokenizer in org.apache.lucene.facet.enhancements

Subclasses of CategoryTokenizer in org.apache.lucene.facet.enhancements
 class EnhancementsCategoryTokenizer
A tokenizer which adds to each category token payload according to the CategoryEnhancements defined in the given EnhancementsIndexingParams.

Methods in org.apache.lucene.facet.enhancements that return CategoryTokenizer
protected  CategoryTokenizer EnhancementsDocumentBuilder.getCategoryTokenizer(TokenStream categoryStream)

Uses of CategoryTokenizer in org.apache.lucene.facet.index

Methods in org.apache.lucene.facet.index that return CategoryTokenizer
protected  CategoryTokenizer CategoryDocumentBuilder.getCategoryTokenizer(TokenStream categoryStream)
Get a CategoryTokenizer to create the category tokens.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.streaming.CategoryTokenizerBase

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.streaming.CategoryTokenizerBase

Packages that use CategoryTokenizerBase
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets

Uses of CategoryTokenizerBase in org.apache.lucene.facet.enhancements

Subclasses of CategoryTokenizerBase in org.apache.lucene.facet.enhancements
 class EnhancementsCategoryTokenizer
A tokenizer which adds to each category token payload according to the CategoryEnhancements defined in the given EnhancementsIndexingParams.

Uses of CategoryTokenizerBase in org.apache.lucene.facet.enhancements.association

Subclasses of CategoryTokenizerBase in org.apache.lucene.facet.enhancements.association
 class AssociationListTokenizer
Tokenizer for associations of a category

Uses of CategoryTokenizerBase in org.apache.lucene.facet.index.streaming

Subclasses of CategoryTokenizerBase in org.apache.lucene.facet.index.streaming
class | CategoryListTokenizer A base class for category list tokenizers, which add category list tokens to category streams.
class | CategoryTokenizer Basic class for setting the CharTermAttributes and PayloadAttributes of category tokens.
class | CountingListTokenizer CategoryListTokenizer for facet counting

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.index.streaming.CountingListTokenizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.index.streaming.CountingListTokenizer

Packages that use CountingListTokenizer
org.apache.lucene.facet.index Indexing of document categories

Uses of CountingListTokenizer in org.apache.lucene.facet.index

Methods in org.apache.lucene.facet.index that return CountingListTokenizer
protected  CountingListTokenizer CategoryDocumentBuilder.getCountingListTokenizer(TokenStream categoryStream)
Get a CountingListTokenizer for creating counting list token.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AdaptiveFacetsAccumulator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class AdaptiveFacetsAccumulator

java.lang.Object
    extended by  org.apache.lucene.facet.search.FacetsAccumulator
        extended by  org.apache.lucene.facet.search.StandardFacetsAccumulator
            extended by  org.apache.lucene.facet.search.AdaptiveFacetsAccumulator

public final class AdaptiveFacetsAccumulator
extends StandardFacetsAccumulator

FacetsAccumulator whose behavior regarding complements, sampling, etc. is not set up front but rather is determined at accumulation time according to the statistics of the accumulated set of documents and the index.

Note: Sampling accumulation (Accumulation over a sampled-set of the results), does not guarantee accurate values for FacetResult.getNumValidDescendants() & FacetResultNode.getResidue().

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.facet.search.StandardFacetsAccumulator
floatArrayAllocator, intArrayAllocator, isUsingComplements, maxPartitions, partitionSize
Fields inherited from class org.apache.lucene.facet.search.FacetsAccumulator
DEFAULT_COMPLEMENT_THRESHOLD, DISABLE_COMPLEMENT, FORCE_COMPLEMENT, indexReader, searchParams, taxonomyReader
Constructor Summary
AdaptiveFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Create an AdaptiveFacetsAccumulator
AdaptiveFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Create an AdaptiveFacetsAccumulator
Method Summary
List<FacetResult> | accumulate(ScoredDocIDs docids) Accumulate facets over given documents, according to facet requests in effect.
Sampler | getSampler()
void | setSampler(Sampler sampler) Set the sampler.
Methods inherited from class org.apache.lucene.facet.search.StandardFacetsAccumulator
actualDocsToAccumulate, getCategoryListMap, getTotalCountsFactor, shouldComplement
Methods inherited from class org.apache.lucene.facet.search.FacetsAccumulator
getComplementThreshold, isAllowLabeling, mayComplement, setAllowLabeling, setComplementThreshold
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AdaptiveFacetsAccumulator

public AdaptiveFacetsAccumulator(FacetSearchParams searchParams,
                                 IndexReader indexReader,
                                 TaxonomyReader taxonomyReader)
Create an AdaptiveFacetsAccumulator

See Also:
StandardFacetsAccumulator.StandardFacetsAccumulator(FacetSearchParams, IndexReader, TaxonomyReader)

AdaptiveFacetsAccumulator

public AdaptiveFacetsAccumulator(FacetSearchParams searchParams,
                                 IndexReader indexReader,
                                 TaxonomyReader taxonomyReader,
                                 IntArrayAllocator intArrayAllocator,
                                 FloatArrayAllocator floatArrayAllocator)
Create an AdaptiveFacetsAccumulator

See Also:
StandardFacetsAccumulator.StandardFacetsAccumulator(FacetSearchParams, IndexReader, TaxonomyReader, IntArrayAllocator, FloatArrayAllocator)
Method Detail

setSampler

public void setSampler(Sampler sampler)
Set the sampler.

Parameters:
sampler - sampler to set

accumulate

public List<FacetResult> accumulate(ScoredDocIDs docids)
                             throws IOException
Description copied from class: FacetsAccumulator
Accumulate facets over given documents, according to facet requests in effect.

Overrides:
accumulate in class StandardFacetsAccumulator
Parameters:
docids - documents (and their scores) for which facets are Accumulated.
Returns:
Accumulated facets.
Throws:
IOException - on error.

getSampler

public final Sampler getSampler()
Returns:
the sampler in effect
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CategoryListIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Interface CategoryListIterator

All Known Implementing Classes:
MultiCategoryListIterator, PayloadIntDecodingIterator
public interface CategoryListIterator

An interface for iterating over a "category list", i.e., the list of categories per document.

NOTE:

  • This class operates as a key to a Map. Appropriate implementation of hashCode() and equals() must be provided.
  • init() must be called before you consume any categories, or call skipTo(int).
  • skipTo(int) must be called before any calls to nextCategory().
  • nextCategory() returns values < Integer.MAX_VALUE, so you can use it as a stop condition.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
boolean | init() Initializes the iterator.
long | nextCategory() Returns the next category for the current document that is set through skipTo(int), or a number higher than Integer.MAX_VALUE.
boolean | skipTo(int docId) Skips forward to document docId.

Method Detail

init

boolean init()
             throws IOException
Initializes the iterator. This method must be called before any calls to skipTo(int), and its return value indicates whether there are any relevant documents for this iterator. If it returns false, any call to skipTo(int) will return false as well.
NOTE: calling this method twice may result in skipping over documents for some implementations. Also, calling it again after all documents were consumed may yield unexpected behavior.

Throws:
IOException

skipTo

boolean skipTo(int docId)
               throws IOException
Skips forward to document docId. Returns true iff this document exists and has any categories. This method must be called before calling nextCategory() for a particular document.
NOTE: Users should call this method with increasing docIds, and implementations can assume that this is the case.

Throws:
IOException

nextCategory

long nextCategory()
                  throws IOException
Returns the next category for the current document that is set through skipTo(int), or a number higher than Integer.MAX_VALUE. No assumptions can be made on the order of the categories.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DrillDown

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class DrillDown

java.lang.Object
    extended by  org.apache.lucene.facet.search.DrillDown

public final class DrillDown
extends Object

Creation of drill down term or query.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
DrillDown()
Method Summary
static Query | query(FacetIndexingParams iParams, CategoryPath... paths) Return a query for drilling down into all given categories (AND).
static Query | query(FacetIndexingParams iParams, Query baseQuery, CategoryPath... paths) Turn a base query into a drilling-down query for all given category paths (AND).
static Query | query(FacetSearchParams sParams, CategoryPath... paths) Return a query for drilling down into all given categories (AND).
static Query | query(FacetSearchParams sParams, Query baseQuery, CategoryPath... paths) Turn a base query into a drilling-down query for all given category paths (AND).
static Query | query(Query baseQuery, CategoryPath... paths) Turn a base query into a drilling-down query using the default FacetSearchParams
static Term | term(FacetIndexingParams iParams, CategoryPath path) Return a term for drilling down into a category.
static Term | term(FacetSearchParams sParams, CategoryPath path)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DrillDown

public DrillDown()
Method Detail

term

public static final Term term(FacetSearchParams sParams,
                              CategoryPath path)
See Also:
term(FacetIndexingParams, CategoryPath)

term

public static final Term term(FacetIndexingParams iParams,
                              CategoryPath path)
Return a term for drilling down into a category.

query

public static final Query query(FacetIndexingParams iParams,
                                CategoryPath... paths)
Return a query for drilling down into all given categories (AND).

See Also:
term(FacetSearchParams, CategoryPath), query(FacetSearchParams, Query, CategoryPath...)

query

public static final Query query(FacetSearchParams sParams,
                                CategoryPath... paths)
Return a query for drilling down into all given categories (AND).

See Also:
term(FacetSearchParams, CategoryPath), query(FacetSearchParams, Query, CategoryPath...)

query

public static final Query query(FacetIndexingParams iParams,
                                Query baseQuery,
                                CategoryPath... paths)
Turn a base query into a drilling-down query for all given category paths (AND).

See Also:
query(FacetIndexingParams, CategoryPath...)

query

public static final Query query(FacetSearchParams sParams,
                                Query baseQuery,
                                CategoryPath... paths)
Turn a base query into a drilling-down query for all given category paths (AND).

See Also:
query(FacetSearchParams, CategoryPath...)

query

public static final Query query(Query baseQuery,
                                CategoryPath... paths)
Turn a base query into a drilling-down query using the default FacetSearchParams

See Also:
query(FacetSearchParams, Query, CategoryPath...)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FacetArrays

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class FacetArrays

java.lang.Object
    extended by  org.apache.lucene.facet.search.FacetArrays

public class FacetArrays
extends Object

Provider of arrays used for facet operations such as counting.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
FacetArrays(IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Create a FacetArrays with certain array allocators.
Method Summary
void | free() Notify allocators that they can free arrays allocated on behalf of this FacetArrays object.
int | getArraysLength() Return the arrays length
float[] | getFloatArray() Obtain a float array, e.g.
int[] | getIntArray() Obtain an int array, e.g.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FacetArrays

public FacetArrays(IntArrayAllocator intArrayAllocator,
                   FloatArrayAllocator floatArrayAllocator)
Create a FacetArrays with certain array allocators.

Parameters:
intArrayAllocator - allocator for int arrays.
floatArrayAllocator - allocator for float arrays.
Method Detail

free

public void free()
Notify allocators that they can free arrays allocated on behalf of this FacetArrays object.

getIntArray

public int[] getIntArray()
Obtain an int array, e.g. for facet counting.

getFloatArray

public float[] getFloatArray()
Obtain a float array, e.g. for evaluating facet association values.

getArraysLength

public int getArraysLength()
Return the arrays length

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FacetResultsHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class FacetResultsHandler

java.lang.Object
    extended by  org.apache.lucene.facet.search.FacetResultsHandler
Direct Known Subclasses:
TopKFacetResultsHandler, TopKInEachNodeHandler
public abstract class FacetResultsHandler
extends Object

Handler for facet results.

The facet results handler provided by the FacetRequest to a FacetsAccumulator.

First it is used by FacetsAccumulator to obtain a temporary facet result for each partition and to merge results of several partitions.

Later the accumulator invokes the handler to render the results, creating FacetResult objects.

Last the accumulator invokes the handler to label final results.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected FacetRequest | facetRequest Facet request served by this handler.
protected TaxonomyReader | taxonomyReader Taxonomy for which facets are handled
Constructor Summary
FacetResultsHandler(TaxonomyReader taxonomyReader, FacetRequest facetRequest)
Create a faceted search handler.
Method Summary
abstract IntermediateFacetResult | fetchPartitionResult(FacetArrays arrays, int offset) Fetch results of a single partition, given facet arrays for that partition, and based on the matching documents and faceted search parameters.
FacetRequest | getFacetRequest() Return the facet request served by this handler.
TaxonomyReader | getTaxonomyReader() Return taxonomy reader used for current facets accumulation operation.
protected boolean | isSelfPartition(int ordinal, FacetArrays facetArrays, int offset) Check if an array contains the partition which contains ordinal
abstract void | labelResult(FacetResult facetResult) Label results according to settings in FacetRequest, such as FacetRequest.getNumLabel().
abstract IntermediateFacetResult | mergeResults(IntermediateFacetResult... tmpResults) Merge results of several facet partitions.
abstract FacetResult | rearrangeFacetResult(FacetResult facetResult) Perform any rearrangement as required on a facet result that has changed after it was rendered.
abstract FacetResult | renderFacetResult(IntermediateFacetResult tmpResult) Create a facet result from the temporary result.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

taxonomyReader

protected final TaxonomyReader taxonomyReader
Taxonomy for which facets are handled

facetRequest

protected final FacetRequest facetRequest
Facet request served by this handler.

Constructor Detail

FacetResultsHandler

public FacetResultsHandler(TaxonomyReader taxonomyReader,
                           FacetRequest facetRequest)
Create a faceted search handler.

Parameters:
taxonomyReader - See getTaxonomyReader().
facetRequest - See getFacetRequest().
Method Detail

fetchPartitionResult

public abstract IntermediateFacetResult fetchPartitionResult(FacetArrays arrays,
                                                             int offset)
                                                      throws IOException
Fetch results of a single partition, given facet arrays for that partition, and based on the matching documents and faceted search parameters.

Parameters:
arrays - facet arrays for the certain partition
offset - offset in input arrays where partition starts
Returns:
temporary facet result, potentially, to be passed back to this result handler for merging, or null in case that constructor parameter, facetRequest, requests an illegal FacetResult, like, e.g., a root node category path that does not exist in constructor parameter taxonomyReader .
Throws:
IOException - on error

mergeResults

public abstract IntermediateFacetResult mergeResults(IntermediateFacetResult... tmpResults)
                                              throws IOException,
                                                     ClassCastException,
                                                     IllegalArgumentException
Merge results of several facet partitions. Logic of the merge is undefined and open for interpretations. For example, a merge implementation could keep top K results. Passed IntermediateFacetResult must be ones that were created by this handler otherwise a ClassCastException is thrown. In addition, all passed IntermediateFacetResult must have the same FacetRequest otherwise an IllegalArgumentException is thrown.

Parameters:
tmpResults - one or more temporary results created by this handler.
Returns:
temporary facet result that represents to union, as specified by this handler, of the input temporary facet results.
Throws:
IOException - on error.
ClassCastException - if the temporary result passed was not created by this handler
IllegalArgumentException - if passed facetResults do not have the same FacetRequest
See Also:
IntermediateFacetResult.getFacetRequest()

renderFacetResult

public abstract FacetResult renderFacetResult(IntermediateFacetResult tmpResult)
                                       throws IOException
Create a facet result from the temporary result.

Parameters:
tmpResult - temporary result to be rendered as a FacetResult
Throws:
IOException - on error.

rearrangeFacetResult

public abstract FacetResult rearrangeFacetResult(FacetResult facetResult)
Perform any rearrangement as required on a facet result that has changed after it was rendered.

Possible use case: a sampling facets accumulator invoked another other facets accumulator on a sample set of documents, obtained rendered facet results, fixed their counts, and now it is needed to sort the results differently according to the fixed counts.

Parameters:
facetResult - result to be rearranged.
See Also:
FacetResultNode.setValue(double)

labelResult

public abstract void labelResult(FacetResult facetResult)
                          throws IOException
Label results according to settings in FacetRequest, such as FacetRequest.getNumLabel(). Usually invoked by FacetsAccumulator.accumulate(ScoredDocIDs)

Parameters:
facetResult - facet result to be labeled.
Throws:
IOException - on error

getTaxonomyReader

public final TaxonomyReader getTaxonomyReader()
Return taxonomy reader used for current facets accumulation operation.

getFacetRequest

public final FacetRequest getFacetRequest()
Return the facet request served by this handler.

isSelfPartition

protected boolean isSelfPartition(int ordinal,
                                  FacetArrays facetArrays,
                                  int offset)
Check if an array contains the partition which contains ordinal

Parameters:
ordinal - checked facet
facetArrays - facet arrays for the certain partition
offset - offset in input arrays where partition starts
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FacetsAccumulator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class FacetsAccumulator

java.lang.Object
    extended by  org.apache.lucene.facet.search.FacetsAccumulator
Direct Known Subclasses:
SamplingWrapper, StandardFacetsAccumulator
public abstract class FacetsAccumulator
extends Object

Driver for Accumulating facets of faceted search requests over given documents.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static double | DEFAULT_COMPLEMENT_THRESHOLD Default threshold for using the complements optimization.
static double | DISABLE_COMPLEMENT Passing this to setComplementThreshold(double) will disable using complement optimization.
static double | FORCE_COMPLEMENT Passing this to setComplementThreshold(double) will force using complement optimization.
protected IndexReader | indexReader
protected FacetSearchParams | searchParams
protected TaxonomyReader | taxonomyReader
Constructor Summary
FacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Method Summary
abstract List<FacetResult> | accumulate(ScoredDocIDs docids) Accumulate facets over given documents, according to facet requests in effect.
double | getComplementThreshold()
protected boolean | isAllowLabeling() Check if labeling is allowed for this accumulator.
protected boolean | mayComplement() check if all requests are complementable
protected void | setAllowLabeling(boolean allowLabeling) Set whether labeling is allowed for this accumulator.
void | setComplementThreshold(double complementThreshold) Set the complement threshold.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_COMPLEMENT_THRESHOLD

public static final double DEFAULT_COMPLEMENT_THRESHOLD
Default threshold for using the complements optimization. If accumulating facets for a document set larger than this ratio of the index size than perform the complement optimization.

See Also:
for more info on the complements optimization., Constant Field Values

DISABLE_COMPLEMENT

public static final double DISABLE_COMPLEMENT
Passing this to setComplementThreshold(double) will disable using complement optimization.

See Also:
Constant Field Values

FORCE_COMPLEMENT

public static final double FORCE_COMPLEMENT
Passing this to setComplementThreshold(double) will force using complement optimization.

See Also:
Constant Field Values

taxonomyReader

protected final TaxonomyReader taxonomyReader

indexReader

protected final IndexReader indexReader

searchParams

protected FacetSearchParams searchParams
Constructor Detail

FacetsAccumulator

public FacetsAccumulator(FacetSearchParams searchParams,
                         IndexReader indexReader,
                         TaxonomyReader taxonomyReader)
Method Detail

accumulate

public abstract List<FacetResult> accumulate(ScoredDocIDs docids)
                                      throws IOException
Accumulate facets over given documents, according to facet requests in effect.

Parameters:
docids - documents (and their scores) for which facets are Accumulated.
Returns:
Accumulated facets.
Throws:
IOException - on error.

getComplementThreshold

public double getComplementThreshold()
Returns:
the complement threshold
See Also:
setComplementThreshold(double)

setComplementThreshold

public void setComplementThreshold(double complementThreshold)
Set the complement threshold. This threshold will dictate whether the complements optimization is applied. The optimization is to count for less documents. It is useful when the same FacetSearchParams are used for varying sets of documents. The first time complements is used the "total counts" are computed - counting for all the documents in the collection. Then, only the complementing set of documents is considered, and used to decrement from the overall counts, thereby walking through less documents, which is faster.

Note that this optimization is only available when searching an index whose IndexReader implements both IndexReader.directory() and IndexReader.getVersion() otherwise the optimization is silently disabled regardless of the complement threshold settings.

For the default settings see DEFAULT_COMPLEMENT_THRESHOLD.

To forcing complements in all cases pass FORCE_COMPLEMENT. This is mostly useful for testing purposes, as forcing complements when only tiny fraction of available documents match the query does not make sense and would incur performance degradations.

To disable complements pass DISABLE_COMPLEMENT.

Parameters:
complementThreshold - the complement threshold to set

isAllowLabeling

protected boolean isAllowLabeling()
Check if labeling is allowed for this accumulator.

By default labeling is allowed. This allows one accumulator to invoke other accumulators for accumulation but keep to itself the responsibility of labeling. This might br handy since labeling is a costly operation.

Returns:
true of labeling is allowed for this accumulator
See Also:
setAllowLabeling(boolean)

setAllowLabeling

protected void setAllowLabeling(boolean allowLabeling)
Set whether labeling is allowed for this accumulator.

Parameters:
allowLabeling - new setting for allow labeling
See Also:
isAllowLabeling()

mayComplement

protected boolean mayComplement()
check if all requests are complementable

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FacetsCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class FacetsCollector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.facet.search.FacetsCollector

public class FacetsCollector
extends Collector

Collector for facet accumulation. *

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected  FacetsAccumulator facetsAccumulator
Constructor Summary
FacetsCollector(FacetSearchParams facetSearchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Create a collector for accumulating facets while collecting documents during search.
Method Summary
 boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
 void collect(int doc)
Called once for every document matching a query, with the unbased document number.
 List<FacetResult> getFacetResults()
Return accumulated facets results (according to faceted search parameters) for collected documents.
protected  FacetsAccumulator initFacetsAccumulator(FacetSearchParams facetSearchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Create the FacetsAccumulator to be used.
protected  ScoredDocIdCollector initScoredDocCollector(FacetSearchParams facetSearchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Create a ScoredDocIdCollector to be used as the first phase of the facet collection.
 void setNextReader(IndexReader reader, int docBase)
Called before collecting from each IndexReader.
 void setScorer(Scorer scorer)
Called before successive calls to Collector.collect(int).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

facetsAccumulator

protected final FacetsAccumulator facetsAccumulator
Constructor Detail

FacetsCollector

public FacetsCollector(FacetSearchParams facetSearchParams,
                       IndexReader indexReader,
                       TaxonomyReader taxonomyReader)
Create a collector for accumulating facets while collecting documents during search.

Parameters:
facetSearchParams - faceted search parameters defining which facets are required and how.
indexReader - searched index.
taxonomyReader - taxonomy containing the facets.
Method Detail

initScoredDocCollector

protected ScoredDocIdCollector initScoredDocCollector(FacetSearchParams facetSearchParams,
                                                      IndexReader indexReader,
                                                      TaxonomyReader taxonomyReader)
Create a ScoredDocIdCollector to be used as the first phase of the facet collection. If all facetRequests are do not require the document score, a ScoredDocIdCollector which does not store the document scores would be returned. Otherwise a SDIC which does store the documents will be returned, having an initial allocated space for 1000 such documents' scores.

initFacetsAccumulator

protected FacetsAccumulator initFacetsAccumulator(FacetSearchParams facetSearchParams,
                                                  IndexReader indexReader,
                                                  TaxonomyReader taxonomyReader)
Create the FacetsAccumulator to be used. Default is StandardFacetsAccumulator. Called once at the constructor of the collector.

Parameters:
facetSearchParams - The search params.
indexReader - A reader to the index to search in.
taxonomyReader - A reader to the active taxonomy.
Returns:
The FacetsAccumulator to use.

getFacetResults

public List<FacetResult> getFacetResults()
                                  throws IOException
Return accumulated facets results (according to faceted search parameters) for collected documents.

Throws:
IOException - on error

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Description copied from class: Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Specified by:
acceptsDocsOutOfOrder in class Collector

collect

public void collect(int doc)
             throws IOException
Description copied from class: Collector
Called once for every document matching a query, with the unbased document number.

Note: This is called in an inner search loop. For good search performance, implementations of this method should not call Searcher.doc(int) or IndexReader.document(int) on every hit. Doing so can slow searches by an order of magnitude or more.

Specified by:
collect in class Collector
Throws:
IOException

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Specified by:
setNextReader in class Collector
Parameters:
reader - next IndexReader
Throws:
IOException

setScorer

public void setScorer(Scorer scorer)
               throws IOException
Description copied from class: Collector
Called before successive calls to Collector.collect(int). Implementations that need the score of the current document (passed-in to Collector.collect(int)), should save the passed-in Scorer and call scorer.score() when needed.

Specified by:
setScorer in class Collector
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FloatArrayAllocator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class FloatArrayAllocator

java.lang.Object
    extended by  org.apache.lucene.facet.search.TemporaryObjectAllocator<float[]>
        extended by  org.apache.lucene.facet.search.FloatArrayAllocator

public final class FloatArrayAllocator
extends TemporaryObjectAllocator<float[]>

An FloatArrayAllocator is an object which manages float array objects of a certain size. These float arrays are needed temporarily during faceted search (see FacetsAccumulator and can be reused across searches instead of being allocated afresh on every search.

An FloatArrayAllocator is thread-safe.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
FloatArrayAllocator(int size, int maxArrays)
Construct an allocator for float arrays of size size, keeping around a pool of up to maxArrays old arrays.
Method Summary
void | clear(float[] array) Subclasses must override this method to clear an existing object of the desired type, to prepare it for reuse.
float[] | create() Subclasses must override this method to actually create a new object of the desired type.
Methods inherited from class org.apache.lucene.facet.search.TemporaryObjectAllocator
allocate, free
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FloatArrayAllocator

public FloatArrayAllocator(int size,
                           int maxArrays)
Construct an allocator for float arrays of size size, keeping around a pool of up to maxArrays old arrays.

Note that the pool size only restricts the number of arrays that hang around when not needed, but not the maximum number of arrays that are allocated when actually is use: If a number of concurrent threads ask for an allocation, all of them will get a counter array, even if their number is greater than maxArrays. If an application wants to limit the number of concurrent threads making allocations, it needs to do so on its own - for example by blocking new threads until the existing ones have finished.

In particular, when maxArrays=0, this object behaves as a trivial allocator, always allocating a new array and never reusing an old one.

Method Detail

create

public float[] create()
Description copied from class: TemporaryObjectAllocator
Subclasses must override this method to actually create a new object of the desired type.

Specified by:
create in class TemporaryObjectAllocator<float[]>

clear

public void clear(float[] array)
Description copied from class: TemporaryObjectAllocator
Subclasses must override this method to clear an existing object of the desired type, to prepare it for reuse. Note that objects will be cleared just before reuse (on allocation), not when freed.

Specified by:
clear in class TemporaryObjectAllocator<float[]>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Heap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Interface Heap<T>

public interface Heap<T>

Declares an interface for heap (and heap alike) structures, handling a given type T

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 T add(T frn)
Add a new value to the heap, return the new top().
 void clear()
Clear the heap
 T insertWithOverflow(T value)
Insert a new value, returning the overflowen object
NOTE: This method should not be called after invoking pop()
 T pop()
Get and remove the top of the Heap
NOTE: Once pop() is called no other add(Object) or insertWithOverflow(Object) should be called.
 int size()
Return the amount of objects currently in the heap
 T top()
Get (But not remove) the top of the Heap

Method Detail

pop

T pop()
Get and remove the top of the Heap
NOTE: Once pop() is called no other add(Object) or insertWithOverflow(Object) should be called.

top

T top()
Get (But not remove) the top of the Heap

insertWithOverflow

T insertWithOverflow(T value)
Insert a new value, returning the overflowen object
NOTE: This method should not be called after invoking pop()

add

T add(T frn)
Add a new value to the heap, return the new top().
Some implementations may choose to not implement this functionality. In such a case null should be returned.
NOTE: This method should not be called after invoking pop()

clear

void clear()
Clear the heap

size

int size()
Return the amount of objects currently in the heap

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntArrayAllocator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class IntArrayAllocator

java.lang.Object
    extended by  org.apache.lucene.facet.search.TemporaryObjectAllocator<int[]>
        extended by  org.apache.lucene.facet.search.IntArrayAllocator

public final class IntArrayAllocator
extends TemporaryObjectAllocator<int[]>

An IntArrayAllocator is an object which manages counter array objects of a certain length. These counter arrays are needed temporarily during faceted search (see FacetsAccumulator and can be reused across searches instead of being allocated afresh on every search.

An IntArrayAllocator is thread-safe.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
IntArrayAllocator(int length, int maxArrays)
Construct an allocator for counter arrays of length length, keeping around a pool of up to maxArrays old arrays.
Method Summary
void | clear(int[] array) Subclasses must override this method to clear an existing object of the desired type, to prepare it for reuse.
int[] | create() Subclasses must override this method to actually create a new object of the desired type.
Methods inherited from class org.apache.lucene.facet.search.TemporaryObjectAllocator
allocate, free
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IntArrayAllocator

public IntArrayAllocator(int length,
                         int maxArrays)
Construct an allocator for counter arrays of length length, keeping around a pool of up to maxArrays old arrays.

Note that the pool size only restricts the number of arrays that hang around when not needed, but not the maximum number of arrays that are allocated when actually is use: If a number of concurrent threads ask for an allocation, all of them will get a counter array, even if their number is greater than maxArrays. If an application wants to limit the number of concurrent threads making allocations, it needs to do so on its own - for example by blocking new threads until the existing ones have finished.

In particular, when maxArrays=0, this object behaves as a trivial allocator, always allocating a new array and never reusing an old one.

Method Detail

create

public int[] create()
Description copied from class: TemporaryObjectAllocator
Subclasses must override this method to actually create a new object of the desired type.

Specified by:
create in class TemporaryObjectAllocator<int[]>

clear

public void clear(int[] array)
Description copied from class: TemporaryObjectAllocator
Subclasses must override this method to clear an existing object of the desired type, to prepare it for reuse. Note that objects will be cleared just before reuse (on allocation), not when freed.

Specified by:
clear in class TemporaryObjectAllocator<int[]>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.search
Interfaces
CategoryListIterator
Heap
ScoredDocIDs
ScoredDocIDsIterator
Classes
AdaptiveFacetsAccumulator
DrillDown
FacetArrays
FacetResultsHandler
FacetsAccumulator
FacetsCollector
FloatArrayAllocator
IntArrayAllocator
PayloadIntDecodingIterator
PayloadIterator
SamplingWrapper
ScoredDocIdCollector
StandardFacetsAccumulator
TemporaryObjectAllocator
TopKFacetResultsHandler
TopKInEachNodeHandler
TopKInEachNodeHandler.IntermediateFacetResultWithHash
TotalFacetCounts
TotalFacetCountsCache


org.apache.lucene.facet.search

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.search

Faceted Search API

See:
Description

Interface Summary
CategoryListIterator | An interface for iterating over a "category list", i.e., the list of categories per document.
Heap<T> | Declares an interface for heap (and heap alike) structures, handling a given type T
ScoredDocIDs | Document IDs with scores for each, driving facets accumulation.
ScoredDocIDsIterator | Iterator over document IDs and their scores.

Class Summary
AdaptiveFacetsAccumulator | FacetsAccumulator whose behavior regarding complements, sampling, etc.
DrillDown | Creation of drill down term or query.
FacetArrays | Provider of arrays used for facet operations such as counting.
FacetResultsHandler | Handler for facet results.
FacetsAccumulator | Driver for Accumulating facets of faceted search requests over given documents.
FacetsCollector | Collector for facet accumulation.
FloatArrayAllocator | An FloatArrayAllocator is an object which manages float array objects of a certain size.
IntArrayAllocator | An IntArrayAllocator is an object which manages counter array objects of a certain length.
PayloadIntDecodingIterator | A payload deserializer comes with its own working space (buffer).
PayloadIterator | A utility class for iterating through a posting list of a given term and retrieving the payload of the first occurrence in every document.
SamplingWrapper | Wrap any Facets Accumulator with sampling.
ScoredDocIdCollector | A Collector which stores all docIDs and their scores in a ScoredDocIDs instance.
StandardFacetsAccumulator | Standard implementation for FacetsAccumulator, utilizing partitions to save on memory.
TemporaryObjectAllocator<T> | An TemporaryObjectAllocator is an object which manages large, reusable, temporary objects needed during multiple concurrent computations.
TopKFacetResultsHandler | Generate Top-K results for a particular FacetRequest.
TopKInEachNodeHandler | Generates FacetResult from the count arrays aggregated for a particular FacetRequest.
TopKInEachNodeHandler.IntermediateFacetResultWithHash | Intermediate result to hold counts from one or more partitions processed thus far.
TotalFacetCounts | Maintain Total Facet Counts per partition, for given parameters: Index reader of an index Taxonomy index reader Facet indexing params (and particularly the category list params) The total facet counts are maintained as an array of arrays of integers, where a separate array is kept for each partition.
TotalFacetCountsCache | Manage an LRU cache for TotalFacetCounts per index, taxonomy, and facet indexing params.

Package org.apache.lucene.facet.search Description

Faceted Search API

API for faceted search has several interfaces - simple, top level ones, adequate for most users, and advanced, more complicated ones, for the more advanced users.

We now describe the simpler interfaces. There are mainly 3 interfaces for faceted search:

  1. Facets Request defines requirements:
    • which facets are required, e.g. depth
    • what is computed for each facet - e.g. count, score.
  2. Facets Extractor Controls how facets are extracted, with variations of:
    • default (partitioned, like all extractors).
    • sampled - inspects only a fraction of the documents.
  3. Facet Results Handler Controls how results are further processed and merged (also between partitions):
    • Top K.
    • Tree.
    • Tree with top K at each level
    • ...


org.apache.lucene.facet.search Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.search

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.search.Collector
      • org.apache.lucene.facet.search.FacetsCollector
      • org.apache.lucene.facet.search.ScoredDocIdCollector
    • org.apache.lucene.facet.search.DrillDown
    • org.apache.lucene.facet.search.FacetArrays
    • org.apache.lucene.facet.search.FacetResultsHandler
      • org.apache.lucene.facet.search.TopKFacetResultsHandler
      • org.apache.lucene.facet.search.TopKInEachNodeHandler
    • org.apache.lucene.facet.search.FacetsAccumulator
      • org.apache.lucene.facet.search.SamplingWrapper
      • org.apache.lucene.facet.search.StandardFacetsAccumulator
        • org.apache.lucene.facet.search.AdaptiveFacetsAccumulator
    • org.apache.lucene.facet.search.PayloadIntDecodingIterator (implements org.apache.lucene.facet.search.CategoryListIterator)
    • org.apache.lucene.facet.search.PayloadIterator
    • org.apache.lucene.facet.search.TemporaryObjectAllocator<T>
      • org.apache.lucene.facet.search.FloatArrayAllocator
      • org.apache.lucene.facet.search.IntArrayAllocator
    • org.apache.lucene.facet.search.TopKInEachNodeHandler.IntermediateFacetResultWithHash (implements org.apache.lucene.facet.search.results.IntermediateFacetResult)
    • org.apache.lucene.facet.search.TotalFacetCounts
    • org.apache.lucene.facet.search.TotalFacetCountsCache

Interface Hierarchy

  • org.apache.lucene.facet.search.CategoryListIterator
  • org.apache.lucene.facet.search.Heap<T>
  • org.apache.lucene.facet.search.ScoredDocIDs
  • org.apache.lucene.facet.search.ScoredDocIDsIterator


Uses of Package org.apache.lucene.facet.search

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.search

Packages that use org.apache.lucene.facet.search
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.cache | Caching to speed up facets accumulation.
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.search.params.association | Association-based Parameters for Faceted Search.
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation
org.apache.lucene.facet.util | Various utilities for faceted search

Classes in org.apache.lucene.facet.search used by org.apache.lucene.facet.enhancements
PayloadIterator
A utility class for iterating through a posting list of a given term and retrieving the payload of the first occurrence in every document.

Classes in org.apache.lucene.facet.search used by org.apache.lucene.facet.index.params
CategoryListIterator
An interface for iterating over a "category list", i.e., the list of categories per document.

Classes in org.apache.lucene.facet.search used by org.apache.lucene.facet.search
CategoryListIterator
An interface for iterating over a "category list", i.e., the list of categories per document.
FacetArrays
Provider of arrays used for facet operations such as counting.
FacetResultsHandler
Handler for facet results.
FacetsAccumulator
Driver for Accumulating facets of faceted search requests over given documents.
FloatArrayAllocator
An FloatArrayAllocator is an object which manages float array objects of a certain size.
IntArrayAllocator
An IntArrayAllocator is an object which manages counter array objects of a certain length.
ScoredDocIdCollector
A Collector which stores all docIDs and their scores in a ScoredDocIDs instance.
ScoredDocIDs
Document IDs with scores for each, driving facets accumulation.
ScoredDocIDsIterator
Iterator over document IDs and their scores.
StandardFacetsAccumulator
Standard implementation for FacetsAccumulator, utilizing partitions to save on memory.
TemporaryObjectAllocator
An TemporaryObjectAllocator is an object which manages large, reusable, temporary objects needed during multiple concurrent computations.
TotalFacetCounts
Maintain Total Facet Counts per partition, for given parameters: Index reader of an index Taxonomy index reader Facet indexing params (and particularly the category list params) The total facet counts are maintained as an array of arrays of integers, where a separate array is kept for each partition.
TotalFacetCountsCache
Manage an LRU cache for TotalFacetCounts per index, taxonomy, and facet indexing params.

Classes in org.apache.lucene.facet.search used by org.apache.lucene.facet.search.cache
CategoryListIterator
An interface for iterating over a "category list", i.e., the list of categories per document.

Classes in org.apache.lucene.facet.search used by org.apache.lucene.facet.search.params
CategoryListIterator
An interface for iterating over a "category list", i.e., the list of categories per document.
FacetArrays
Provider of arrays used for facet operations such as counting.
FacetResultsHandler
Handler for facet results.

Classes in org.apache.lucene.facet.search used by org.apache.lucene.facet.search.params.association
FacetArrays
Provider of arrays used for facet operations such as counting.

Classes in org.apache.lucene.facet.search used by org.apache.lucene.facet.search.sampling
FacetsAccumulator
Driver for Accumulating facets of faceted search requests over given documents.
FloatArrayAllocator
An FloatArrayAllocator is an object which manages float array objects of a certain size.
IntArrayAllocator
An IntArrayAllocator is an object which manages counter array objects of a certain length.
ScoredDocIDs
Document IDs with scores for each, driving facets accumulation.
StandardFacetsAccumulator
Standard implementation for FacetsAccumulator, utilizing partitions to save on memory.

Classes in org.apache.lucene.facet.search used by org.apache.lucene.facet.util
CategoryListIterator
An interface for iterating over a "category list", i.e., the list of categories per document.
Heap
Declares an interface for heap (and heap alike) structures, handling a given type T
ScoredDocIDs
Document IDs with scores for each, driving facets accumulation.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PayloadIntDecodingIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class PayloadIntDecodingIterator

java.lang.Object
    extended by  org.apache.lucene.facet.search.PayloadIntDecodingIterator
All Implemented Interfaces:
CategoryListIterator
public class PayloadIntDecodingIterator
extends Object
implements CategoryListIterator

A payload deserializer comes with its own working space (buffer). One need to define the IndexReader and Term in which the payload resides. The iterator then consumes the payload information of each document and decodes it into categories. A typical use case of this class is:

 IndexReader reader = [open your reader];
 Term t = new Term("field", "where-payload-exists");
 CategoryListIterator cli = new PayloadIntDecodingIterator(reader, t);
 if (!cli.init()) {
   // it means there are no payloads / documents associated with that term.
   // Usually a sanity check. However, init() must be called.
 }
 DocIdSetIterator disi = [you usually iterate on something else, such as a Scorer];
 int doc;
 while ((doc = disi.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
   cli.setdoc(doc);
   long category;
   while ((category = cli.nextCategory()) < Integer.MAX_VALUE) {
   }
 }

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
PayloadIntDecodingIterator(IndexReader indexReader, Term term, IntDecoder decoder)
PayloadIntDecodingIterator(IndexReader indexReader, Term term, IntDecoder decoder, byte[] buffer)
Method Summary
 boolean equals(Object other)
 int hashCode()
 boolean init()
Initializes the iterator.
 long nextCategory()
Returns the next category for the current document that is set through CategoryListIterator.skipTo(int), or a number higher than Integer.MAX_VALUE.
 boolean skipTo(int docId)
Skips forward to document docId.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PayloadIntDecodingIterator

public PayloadIntDecodingIterator(IndexReader indexReader,
                                  Term term,
                                  IntDecoder decoder)
                           throws IOException
Throws:
IOException

PayloadIntDecodingIterator

public PayloadIntDecodingIterator(IndexReader indexReader,
                                  Term term,
                                  IntDecoder decoder,
                                  byte[] buffer)
                           throws IOException
Throws:
IOException
Method Detail

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

init

public boolean init()
             throws IOException
Description copied from interface: CategoryListIterator
Initializes the iterator. This method must be called before any calls to CategoryListIterator.skipTo(int), and its return value indicates whether there are any relevant documents for this iterator. If it returns false, any call to CategoryListIterator.skipTo(int) will return false as well.
NOTE: calling this method twice may result in skipping over documents for some implementations. Also, calling it again after all documents were consumed may yield unexpected behavior.

Specified by:
init in interface CategoryListIterator
Throws:
IOException

nextCategory

public long nextCategory()
                  throws IOException
Description copied from interface: CategoryListIterator
Returns the next category for the current document that is set through CategoryListIterator.skipTo(int), or a number higher than Integer.MAX_VALUE. No assumptions can be made on the order of the categories.

Specified by:
nextCategory in interface CategoryListIterator
Throws:
IOException

skipTo

public boolean skipTo(int docId)
               throws IOException
Description copied from interface: CategoryListIterator
Skips forward to document docId. Returns true iff this document exists and has any categories. This method must be called before calling CategoryListIterator.nextCategory() for a particular document.
NOTE: Users should call this method with increasing docIds, and implementations can assume that this is the case.

Specified by:
skipTo in interface CategoryListIterator
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PayloadIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class PayloadIterator

java.lang.Object
    extended by  org.apache.lucene.facet.search.PayloadIterator
Direct Known Subclasses:
EnhancementsPayloadIterator
public class PayloadIterator
extends Object

A utility class for iterating through a posting list of a given term and retrieving the payload of the first occurrence in every document. Comes with its own working space (buffer).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected byte[] | buffer
protected int | payloadLength
Constructor Summary
PayloadIterator(IndexReader indexReader, Term term)
PayloadIterator(IndexReader indexReader, Term term, byte[] buffer)
Method Summary
byte[] | getBuffer() Get the buffer with the content of the last read payload.
int | getPayloadLength() Get the length of the last read payload.
boolean | init() (re)initialize the iterator.
boolean | setdoc(int docId) Skip forward to document docId.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

buffer

protected byte[] buffer

payloadLength

protected int payloadLength
Constructor Detail

PayloadIterator

public PayloadIterator(IndexReader indexReader,
                       Term term)
                throws IOException
Throws:
IOException

PayloadIterator

public PayloadIterator(IndexReader indexReader,
                       Term term,
                       byte[] buffer)
                throws IOException
Throws:
IOException
Method Detail

init

public boolean init()
             throws IOException
(re)initialize the iterator. Should be done before the first call to setdoc(int). Returns false if there is no category list found (no setdoc() will never return true).

Throws:
IOException

setdoc

public boolean setdoc(int docId)
               throws IOException
Skip forward to document docId. Return true if this document exists and has any payload.

Users should call this method with increasing docIds, and implementations can assume that this is the case.

Throws:
IOException

getBuffer

public byte[] getBuffer()
Get the buffer with the content of the last read payload.

getPayloadLength

public int getPayloadLength()
Get the length of the last read payload.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SamplingWrapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class SamplingWrapper

java.lang.Object
    extended by  org.apache.lucene.facet.search.FacetsAccumulator
        extended by  org.apache.lucene.facet.search.SamplingWrapper

public class SamplingWrapper
extends FacetsAccumulator

Wrap any Facets Accumulator with sampling.

Note: Sampling accumulation (Accumulation over a sampled-set of the results), does not guarantee accurate values for FacetResult.getNumValidDescendants() & FacetResultNode.getResidue().

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.facet.search.FacetsAccumulator
DEFAULT_COMPLEMENT_THRESHOLD, DISABLE_COMPLEMENT, FORCE_COMPLEMENT, indexReader, searchParams, taxonomyReader
Constructor Summary
SamplingWrapper(FacetsAccumulator delegee, Sampler sampler)
Method Summary
List<FacetResult> | accumulate(ScoredDocIDs docids) Accumulate facets over given documents, according to facet requests in effect.
double | getComplementThreshold()
protected boolean | isAllowLabeling() Check if labeling is allowed for this accumulator.
protected void | setAllowLabeling(boolean allowLabeling) Set whether labeling is allowed for this accumulator.
void | setComplementThreshold(double complementThreshold) Set the complement threshold.
Methods inherited from class org.apache.lucene.facet.search.FacetsAccumulator
mayComplement
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SamplingWrapper

public SamplingWrapper(FacetsAccumulator delegee,
                       Sampler sampler)
Method Detail

accumulate

public List<FacetResult> accumulate(ScoredDocIDs docids)
                             throws IOException
Description copied from class: FacetsAccumulator
Accumulate facets over given documents, according to facet requests in effect.

Specified by:
accumulate in class FacetsAccumulator
Parameters:
docids - documents (and their scores) for which facets are Accumulated.
Returns:
Accumulated facets.
Throws:
IOException - on error.

getComplementThreshold

public double getComplementThreshold()
Overrides:
getComplementThreshold in class FacetsAccumulator
Returns:
the complement threshold
See Also:
FacetsAccumulator.getComplementThreshold()

setComplementThreshold

public void setComplementThreshold(double complementThreshold)
Description copied from class: FacetsAccumulator
Set the complement threshold. This threshold will dictate whether the complements optimization is applied. The optimization is to count for less documents. It is useful when the same FacetSearchParams are used for varying sets of documents. The first time complements is used the "total counts" are computed - counting for all the documents in the collection. Then, only the complementing set of documents is considered, and used to decrement from the overall counts, thereby walking through less documents, which is faster.

Note that this optimization is only available when searching an index whose IndexReader implements both IndexReader.directory() and IndexReader.getVersion() otherwise the optimization is silently disabled regardless of the complement threshold settings.

For the default settings see FacetsAccumulator.DEFAULT_COMPLEMENT_THRESHOLD.

To forcing complements in all cases pass FacetsAccumulator.FORCE_COMPLEMENT. This is mostly useful for testing purposes, as forcing complements when only tiny fraction of available documents match the query does not make sense and would incur performance degradations.

To disable complements pass FacetsAccumulator.DISABLE_COMPLEMENT.

Overrides:
setComplementThreshold in class FacetsAccumulator
Parameters:
complementThreshold -
See Also:
FacetsAccumulator.setComplementThreshold(double)

isAllowLabeling

protected boolean isAllowLabeling()
Description copied from class: FacetsAccumulator
Check if labeling is allowed for this accumulator.

By default labeling is allowed. This allows one accumulator to invoke other accumulators for accumulation but keep to itself the responsibility of labeling. This might br handy since labeling is a costly operation.

Overrides:
isAllowLabeling in class FacetsAccumulator
Returns:
true of labeling is allowed for this accumulator
See Also:
FacetsAccumulator.setAllowLabeling(boolean)

setAllowLabeling

protected void setAllowLabeling(boolean allowLabeling)
Description copied from class: FacetsAccumulator
Set whether labeling is allowed for this accumulator.

Overrides:
setAllowLabeling in class FacetsAccumulator
Parameters:
allowLabeling - new setting for allow labeling
See Also:
FacetsAccumulator.isAllowLabeling()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScoredDocIdCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class ScoredDocIdCollector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.facet.search.ScoredDocIdCollector

public abstract class ScoredDocIdCollector
extends Collector

A Collector which stores all docIDs and their scores in a ScoredDocIDs instance. If scoring is not enabled, then the default score as set in setDefaultScore(float) (or ScoredDocIDsIterator.DEFAULT_SCORE) will be set for all documents.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected int | docBase
protected OpenBitSet | docIds
protected int | numDocIds
Method Summary
static ScoredDocIdCollector | create(int maxDoc, boolean enableScoring) Creates a new ScoredDocIdCollector with the given parameters.
abstract float | getDefaultScore() Returns the default score used when scoring is disabled.
ScoredDocIDs | getScoredDocIDs()
abstract ScoredDocIDsIterator | scoredDocIdsIterator()
abstract void | setDefaultScore(float defaultScore) Set the default score.
void | setNextReader(IndexReader reader, int base) Called before collecting from each IndexReader.
Methods inherited from class org.apache.lucene.search.Collector
acceptsDocsOutOfOrder, collect, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

numDocIds

protected int numDocIds

docBase

protected int docBase

docIds

protected final OpenBitSet docIds
Method Detail

create

public static ScoredDocIdCollector create(int maxDoc,
                                          boolean enableScoring)
Creates a new ScoredDocIdCollector with the given parameters.

Parameters:
maxDoc - the number of documents that are expected to be collected. Note that if more documents are collected, unexpected exceptions may be thrown. Usually you should pass IndexReader.maxDoc() of the same IndexReader with which the search is executed.
enableScoring - if scoring is enabled, a score will be computed for every matching document, which might be expensive. Therefore if you do not require scoring, it is better to set it to false.

getDefaultScore

public abstract float getDefaultScore()
Returns the default score used when scoring is disabled.

setDefaultScore

public abstract void setDefaultScore(float defaultScore)
Set the default score. Only applicable if scoring is disabled.

scoredDocIdsIterator

public abstract ScoredDocIDsIterator scoredDocIdsIterator()
                                                   throws IOException
Throws:
IOException

getScoredDocIDs

public ScoredDocIDs getScoredDocIDs()

setNextReader

public void setNextReader(IndexReader reader,
                          int base)
                   throws IOException
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Specified by:
setNextReader in class Collector
Parameters:
reader - next IndexReader
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScoredDocIDs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Interface ScoredDocIDs

public interface ScoredDocIDs

Document IDs with scores for each, driving facets accumulation. Document scores are optionally used in the process of facets scoring.

See Also:
FacetsAccumulator.accumulate(ScoredDocIDs)
WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
DocIdSet | getDocIDs() Returns the set of doc IDs.
ScoredDocIDsIterator | iterator() Returns an iterator over the document IDs and their scores.
int | size() Returns the number of scored documents.

Method Detail

iterator

ScoredDocIDsIterator iterator()
                              throws IOException
Returns an iterator over the document IDs and their scores.

Throws:
IOException

getDocIDs

DocIdSet getDocIDs()
Returns the set of doc IDs.

size

int size()
Returns the number of scored documents.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScoredDocIDsIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Interface ScoredDocIDsIterator

public interface ScoredDocIDsIterator

Iterator over document IDs and their scores. Each next() retrieves the next docID and its score which can be later be retrieved by getDocID() and getScore(). NOTE: you must call next() before getDocID() and/or getScore(), or otherwise the returned values are unexpected.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static float DEFAULT_SCORE
Default score used in case scoring is disabled.
Method Summary
int | getDocID() Returns the ID of the current document.
float | getScore() Returns the score of the current document.
boolean | next() Iterate to the next document/score pair.

Field Detail

DEFAULT_SCORE

static final float DEFAULT_SCORE
Default score used in case scoring is disabled.

See Also:
Constant Field Values
Method Detail

next

boolean next()
Iterate to the next document/score pair. Returns true iff there is such a pair.

getDocID

int getDocID()
Returns the ID of the current document.

getScore

float getScore()
Returns the score of the current document.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardFacetsAccumulator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class StandardFacetsAccumulator

java.lang.Object
    extended by  org.apache.lucene.facet.search.FacetsAccumulator
        extended by  org.apache.lucene.facet.search.StandardFacetsAccumulator
Direct Known Subclasses:
AdaptiveFacetsAccumulator, SamplingAccumulator
public class StandardFacetsAccumulator
extends FacetsAccumulator

Standard implementation for FacetsAccumulator, utilizing partitions to save on memory.

Why partitions? Because if there are say 100M categories out of which only top K are required, we must first compute value for all 100M categories (going over all documents) and only then could we select top K. This is made easier on memory by working in partitions of distinct categories: Once a values for a partition are found, we take the top K for that partition and work on the next partition, them merge the top K of both, and so forth, thereby computing top K with RAM needs for the size of a single partition rather than for the size of all the 100M categories.

Decision on partitions size is done at indexing time, and the facet information for each partition is maintained separately.

Implementation detail: Since facets information of each partition is maintained in a separate "category list", we can be more efficient at search time, because only the facet info for a single partition need to be read while processing that partition.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected FloatArrayAllocator | floatArrayAllocator
protected IntArrayAllocator | intArrayAllocator
protected boolean | isUsingComplements
protected int | maxPartitions
protected int | partitionSize
Fields inherited from class org.apache.lucene.facet.search.FacetsAccumulator
DEFAULT_COMPLEMENT_THRESHOLD, DISABLE_COMPLEMENT, FORCE_COMPLEMENT, indexReader, searchParams, taxonomyReader
Constructor Summary
StandardFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
StandardFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Method Summary
List<FacetResult> | accumulate(ScoredDocIDs docids) Accumulate facets over given documents, according to facet requests in effect.
protected ScoredDocIDs | actualDocsToAccumulate(ScoredDocIDs docids) Set the actual set of documents over which accumulation should take place.
protected HashMap<CategoryListIterator,Aggregator> | getCategoryListMap(FacetArrays facetArrays, int partition) Create an Aggregator and a CategoryListIterator for each and every FacetRequest.
protected double | getTotalCountsFactor() Expert: factor by which counts should be multiplied when initializing the count arrays from total counts.
protected boolean | shouldComplement(ScoredDocIDs docids) Check if it is worth to use complements
Methods inherited from class org.apache.lucene.facet.search.FacetsAccumulator
getComplementThreshold, isAllowLabeling, mayComplement, setAllowLabeling, setComplementThreshold
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

intArrayAllocator

protected final IntArrayAllocator intArrayAllocator

floatArrayAllocator

protected final FloatArrayAllocator floatArrayAllocator

partitionSize

protected int partitionSize

maxPartitions

protected int maxPartitions

isUsingComplements

protected boolean isUsingComplements
Constructor Detail

StandardFacetsAccumulator

public StandardFacetsAccumulator(FacetSearchParams searchParams,
                                 IndexReader indexReader,
                                 TaxonomyReader taxonomyReader,
                                 IntArrayAllocator intArrayAllocator,
                                 FloatArrayAllocator floatArrayAllocator)

StandardFacetsAccumulator

public StandardFacetsAccumulator(FacetSearchParams searchParams,
                                 IndexReader indexReader,
                                 TaxonomyReader taxonomyReader)
Method Detail

accumulate

public List<FacetResult> accumulate(ScoredDocIDs docids)
                             throws IOException
Description copied from class: FacetsAccumulator
Accumulate facets over given documents, according to facet requests in effect.

Specified by:
accumulate in class FacetsAccumulator
Parameters:
docids - documents (and their scores) for which facets are Accumulated.
Returns:
Accumulated facets.
Throws:
IOException - on error.

actualDocsToAccumulate

protected ScoredDocIDs actualDocsToAccumulate(ScoredDocIDs docids)
                                       throws IOException
Set the actual set of documents over which accumulation should take place.

Allows to override the set of documents to accumulate for. Invoked just before actual accumulating starts. From this point that set of documents remains unmodified. Default implementation just returns the input unchanged.

Parameters:
docids - candidate documents to accumulate for
Returns:
actual documents to accumulate for
Throws:
IOException

shouldComplement

protected boolean shouldComplement(ScoredDocIDs docids)
Check if it is worth to use complements

getTotalCountsFactor

protected double getTotalCountsFactor()
Expert: factor by which counts should be multiplied when initializing the count arrays from total counts. Default implementation for this returns 1, which is a no op.

Returns:
a factor by which total counts should be multiplied

getCategoryListMap

protected HashMap<CategoryListIterator,Aggregator> getCategoryListMap(FacetArrays facetArrays,
                                                                      int partition)
                                                               throws IOException
Create an Aggregator and a CategoryListIterator for each and every FacetRequest. Generating a map, matching each categoryListIterator to its matching aggregator.

If two CategoryListIterators are served by the same aggregator, a single aggregator is returned for both. NOTE: If a given category list iterator is needed with two different aggregators (e.g counting and association) - an exception is thrown as this functionality is not supported at this time.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TemporaryObjectAllocator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class TemporaryObjectAllocator<T>

java.lang.Object
    extended by  org.apache.lucene.facet.search.TemporaryObjectAllocator<T>
Direct Known Subclasses:
FloatArrayAllocator, IntArrayAllocator
public abstract class TemporaryObjectAllocator<T>
extends Object

An TemporaryObjectAllocator is an object which manages large, reusable, temporary objects needed during multiple concurrent computations. The idea is to remember some of the previously allocated temporary objects, and reuse them if possible to avoid constant allocation and garbage-collection of these objects.

This technique is useful for temporary counter arrays in faceted search (see FacetsAccumulator), which can be reused across searches instead of being allocated afresh on every search.

A TemporaryObjectAllocator is thread-safe.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
TemporaryObjectAllocator(int maxObjects)
Construct an allocator for objects of a certain type, keeping around a pool of up to maxObjects old objects.
Method Summary
T | allocate() Allocate a new object.
protected abstract void | clear(T object) Subclasses must override this method to clear an existing object of the desired type, to prepare it for reuse.
protected abstract T | create() Subclasses must override this method to actually create a new object of the desired type.
void | free(T object) Return a no-longer-needed object back to the pool.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TemporaryObjectAllocator

public TemporaryObjectAllocator(int maxObjects)
Construct an allocator for objects of a certain type, keeping around a pool of up to maxObjects old objects.

Note that the pool size only restricts the number of objects that hang around when not needed, but not the maximum number of objects that are allocated when actually is use: If a number of concurrent threads ask for an allocation, all of them will get an object, even if their number is greater than maxObjects. If an application wants to limit the number of concurrent threads making allocations, it needs to do so on its own - for example by blocking new threads until the existing ones have finished. If more than maxObjects are freed, only maxObjects of them will be kept in the pool - the rest will not and will eventually be garbage-collected by Java.

In particular, when maxObjects=0, this object behaves as a trivial allocator, always allocating a new array and never reusing an old one.

Method Detail

create

protected abstract T create()
Subclasses must override this method to actually create a new object of the desired type.

clear

protected abstract void clear(T object)
Subclasses must override this method to clear an existing object of the desired type, to prepare it for reuse. Note that objects will be cleared just before reuse (on allocation), not when freed.

allocate

public final T allocate()
Allocate a new object. If there's a previously allocated object in our pool, we return it immediately. Otherwise, a new object is allocated.

Don't forget to call free(Object) when you're done with the object, to return it to the pool. If you don't, memory is not leaked, but the pool will remain empty and a new object will be allocated each time (just like the maxArrays=0 case).

free

public final void free(T object)
Return a no-longer-needed object back to the pool. If we already have enough objects in the pool (maxObjects as specified in the constructor), the array will not be saved, and Java will eventually garbage collect it.

In particular, when maxArrays=0, the given array is never saved and free does nothing.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TopKFacetResultsHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class TopKFacetResultsHandler

java.lang.Object
    extended by  org.apache.lucene.facet.search.FacetResultsHandler
        extended by  org.apache.lucene.facet.search.TopKFacetResultsHandler

public class TopKFacetResultsHandler
extends FacetResultsHandler

Generate Top-K results for a particular FacetRequest.

K is global (among all results) and is defined by FacetRequest.getNumResults().

Note: Values of 0 (Zero) are ignored by this results handler.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.facet.search.FacetResultsHandler
facetRequest, taxonomyReader
Constructor Summary
TopKFacetResultsHandler(TaxonomyReader taxonomyReader, FacetRequest facetRequest)
Construct top-K results handler.
Method Summary
IntermediateFacetResult | fetchPartitionResult(FacetArrays facetArrays, int offset) Fetch results of a single partition, given facet arrays for that partition, and based on the matching documents and faceted search parameters.
void | labelResult(FacetResult facetResult) Label results according to settings in FacetRequest, such as FacetRequest.getNumLabel().
IntermediateFacetResult | mergeResults(IntermediateFacetResult... tmpResults) Merge results of several facet partitions.
FacetResult | rearrangeFacetResult(FacetResult facetResult) Perform any rearrangement as required on a facet result that has changed after it was rendered.
FacetResult | renderFacetResult(IntermediateFacetResult tmpResult) Create a facet result from the temporary result.
Methods inherited from class org.apache.lucene.facet.search.FacetResultsHandler
getFacetRequest, getTaxonomyReader, isSelfPartition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TopKFacetResultsHandler

public TopKFacetResultsHandler(TaxonomyReader taxonomyReader,
                               FacetRequest facetRequest)
Construct top-K results handler.

Parameters:
taxonomyReader - taxonomy reader
facetRequest - facet request being served
Method Detail

fetchPartitionResult

public IntermediateFacetResult fetchPartitionResult(FacetArrays facetArrays,
                                                    int offset)
                                             throws IOException
Description copied from class: FacetResultsHandler
Fetch results of a single partition, given facet arrays for that partition, and based on the matching documents and faceted search parameters.

Specified by:
fetchPartitionResult in class FacetResultsHandler
Parameters:
facetArrays - facet arrays for the certain partition
offset - offset in input arrays where partition starts
Returns:
temporary facet result, potentially, to be passed back to this result handler for merging, or null in case that constructor parameter, facetRequest, requests an illegal FacetResult, like, e.g., a root node category path that does not exist in constructor parameter taxonomyReader .
Throws:
IOException - on error

mergeResults

public IntermediateFacetResult mergeResults(IntermediateFacetResult... tmpResults)
                                     throws IOException
Description copied from class: FacetResultsHandler
Merge results of several facet partitions. Logic of the merge is undefined and open for interpretations. For example, a merge implementation could keep top K results. Passed IntermediateFacetResult must be ones that were created by this handler otherwise a ClassCastException is thrown. In addition, all passed IntermediateFacetResult must have the same FacetRequest otherwise an IllegalArgumentException is thrown.

Specified by:
mergeResults in class FacetResultsHandler
Parameters:
tmpResults - one or more temporary results created by this handler.
Returns:
temporary facet result that represents to union, as specified by this handler, of the input temporary facet results.
Throws:
IOException - on error.
See Also:
IntermediateFacetResult.getFacetRequest()

renderFacetResult

public FacetResult renderFacetResult(IntermediateFacetResult tmpResult)
Description copied from class: FacetResultsHandler
Create a facet result from the temporary result.

Specified by:
renderFacetResult in class FacetResultsHandler
Parameters:
tmpResult - temporary result to be rendered as a FacetResult

rearrangeFacetResult

public FacetResult rearrangeFacetResult(FacetResult facetResult)
Description copied from class: FacetResultsHandler
Perform any rearrangement as required on a facet result that has changed after it was rendered.

Possible use case: a sampling facets accumulator invoked another other facets accumulator on a sample set of documents, obtained rendered facet results, fixed their counts, and now it is needed to sort the results differently according to the fixed counts.

Specified by:
rearrangeFacetResult in class FacetResultsHandler
Parameters:
facetResult - result to be rearranged.
See Also:
FacetResultNode.setValue(double)

labelResult

public void labelResult(FacetResult facetResult)
                 throws IOException
Description copied from class: FacetResultsHandler
Label results according to settings in FacetRequest, such as FacetRequest.getNumLabel(). Usually invoked by FacetsAccumulator.accumulate(ScoredDocIDs)

Specified by:
labelResult in class FacetResultsHandler
Parameters:
facetResult - facet result to be labeled.
Throws:
IOException - on error
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TopKInEachNodeHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class TopKInEachNodeHandler

java.lang.Object
    extended by  org.apache.lucene.facet.search.FacetResultsHandler
        extended by  org.apache.lucene.facet.search.TopKInEachNodeHandler

public class TopKInEachNodeHandler
extends FacetResultsHandler

Generates FacetResult from the count arrays aggregated for a particular FacetRequest. The generated FacetResult is a subtree of the taxonomy tree. Its root node, FacetResult.getFacetResultNode(), is the facet specified by FacetRequest.getCategoryPath(), and the enumerated children, FacetResultNode.getSubResults(), of each node in that FacetResult are the top K ( = FacetRequest.getNumResults()) among its children in the taxonomy. Top in the sense FacetRequest.getSortBy(), which can be by the values aggregated in the count arrays, or by ordinal numbers; also specified is the sort order, FacetRequest.getSortOrder(), ascending or descending, of these values or ordinals before their top K are selected. The depth (number of levels excluding the root) of the FacetResult tree is specified by FacetRequest.getDepth().

Because the number of selected children of each node is restricted, and not the overall number of nodes in the FacetResult, facets not selected into FacetResult might have better values, or ordinals, (typically, higher counts), than facets that are selected into the FacetResult.

The generated FacetResult also provides with FacetResult.getNumValidDescendants(), which returns the total number of facets that are descendants of the root node, no deeper than FacetRequest.getDepth(), and which have valid value. The rootnode itself is not counted here. Valid value is determined by the FacetResultsHandler. TopKInEachNodeHandler defines valid as != 0.

NOTE: this code relies on the assumption that TaxonomyReader.INVALID_ORDINAL == -1, a smaller value than any valid ordinal.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class TopKInEachNodeHandler.IntermediateFacetResultWithHash
Intermediate result to hold counts from one or more partitions processed thus far.
Field Summary
Fields inherited from class org.apache.lucene.facet.search.FacetResultsHandler
facetRequest, taxonomyReader
Constructor Summary
TopKInEachNodeHandler(TaxonomyReader taxonomyReader, FacetRequest facetRequest)
Method Summary
IntermediateFacetResult | fetchPartitionResult(FacetArrays arrays, int offset) Recursively explore all facets that can be potentially included in the FacetResult to be generated, and that belong to the given partition, so that values can be examined and collected.
void | labelResult(FacetResult facetResult) Label results according to settings in FacetRequest, such as FacetRequest.getNumLabel().
IntermediateFacetResult | mergeResults(IntermediateFacetResult... tmpResults) Merge several partitions' IntermediateFacetResult-s into one of the same format
FacetResult | rearrangeFacetResult(FacetResult facetResult) Perform any rearrangement as required on a facet result that has changed after it was rendered.
FacetResult | renderFacetResult(IntermediateFacetResult tmpResult) Create a facet result from the temporary result.
Methods inherited from class org.apache.lucene.facet.search.FacetResultsHandler
getFacetRequest, getTaxonomyReader, isSelfPartition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TopKInEachNodeHandler

public TopKInEachNodeHandler(TaxonomyReader taxonomyReader,
                             FacetRequest facetRequest)
Method Detail

fetchPartitionResult

public IntermediateFacetResult fetchPartitionResult(FacetArrays arrays,
                                                    int offset)
                                             throws IOException
Recursively explore all facets that can be potentially included in the FacetResult to be generated, and that belong to the given partition, so that values can be examined and collected. For each such node, gather its top K (FacetRequest.getNumResults()) children among its children that are encountered in the given particular partition (aka current counting list).

Specified by:
fetchPartitionResult in class FacetResultsHandler
Parameters:
arrays - the already filled in count array, potentially only covering one partition: the ordinals ranging from
offset - to offset + the length of the count arrays within arrays (exclusive)
Returns:
IntermediateFacetResult consisting of IntToObjectMap that maps potential FacetResult nodes to their top K children encountered in the current partition. Note that the mapped potential tree nodes need not belong to the given partition, only the top K children mapped to. The aim is to identify nodes that are certainly excluded from the FacetResult to be eventually (after going through all the partitions) returned by this handler, because they have K better siblings, already identified in this partition. For the identified excluded nodes, we only count number of their descendants in the subtree (to be included in FacetResult.getNumValidDescendants()), but not bother with selecting top K in these generations, which, by definition, are, too, excluded from the FacetResult tree.
Throws:
IOException - in case TaxonomyReader.getOrdinal(org.apache.lucene.facet.taxonomy.CategoryPath) does.
See Also:
FacetResultsHandler.fetchPartitionResult(FacetArrays, int)

mergeResults

public IntermediateFacetResult mergeResults(IntermediateFacetResult... tmpResults)
                                     throws ClassCastException,
                                            IllegalArgumentException
Merge several partitions' IntermediateFacetResult-s into one of the same format

Specified by:
mergeResults in class FacetResultsHandler
Parameters:
tmpResults - one or more temporary results created by this handler.
Returns:
temporary facet result that represents to union, as specified by this handler, of the input temporary facet results.
Throws:
ClassCastException - if the temporary result passed was not created by this handler
IllegalArgumentException - if passed facetResults do not have the same FacetRequest
See Also:
FacetResultsHandler.mergeResults(IntermediateFacetResult...)

labelResult

public void labelResult(FacetResult facetResult)
                 throws IOException
Description copied from class: FacetResultsHandler
Label results according to settings in FacetRequest, such as FacetRequest.getNumLabel(). Usually invoked by FacetsAccumulator.accumulate(ScoredDocIDs)

Specified by:
labelResult in class FacetResultsHandler
Parameters:
facetResult - facet result to be labeled.
Throws:
IOException - on error

rearrangeFacetResult

public FacetResult rearrangeFacetResult(FacetResult facetResult)
Description copied from class: FacetResultsHandler
Perform any rearrangement as required on a facet result that has changed after it was rendered.

Possible use case: a sampling facets accumulator invoked another other facets accumulator on a sample set of documents, obtained rendered facet results, fixed their counts, and now it is needed to sort the results differently according to the fixed counts.

Specified by:
rearrangeFacetResult in class FacetResultsHandler
Parameters:
facetResult - result to be rearranged.
See Also:
FacetResultNode.setValue(double)

renderFacetResult

public FacetResult renderFacetResult(IntermediateFacetResult tmpResult)
                              throws IOException
Description copied from class: FacetResultsHandler
Create a facet result from the temporary result.

Specified by:
renderFacetResult in class FacetResultsHandler
Parameters:
tmpResult - temporary result to be rendered as a FacetResult
Throws:
IOException - on error.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TopKInEachNodeHandler.IntermediateFacetResultWithHash

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class TopKInEachNodeHandler.IntermediateFacetResultWithHash

java.lang.Object
    extended by  org.apache.lucene.facet.search.TopKInEachNodeHandler.IntermediateFacetResultWithHash
All Implemented Interfaces:
IntermediateFacetResult
Enclosing class:
TopKInEachNodeHandler
public static class TopKInEachNodeHandler.IntermediateFacetResultWithHash
extends Object
implements IntermediateFacetResult

Intermediate result to hold counts from one or more partitions processed thus far. Its main field, constructor parameter mapToAACOs, is a map from ordinals to AACOs. The AACOs mapped to contain ordinals and values encountered in the count arrays of the partitions processed thus far. The ordinals mapped from are their parents, and they may be not contained in the partitions processed thus far. All nodes belong to the taxonomy subtree defined at the facet request, constructor parameter facetReq, by its root and depth.

Field Summary
protected  IntToObjectMap<org.apache.lucene.facet.search.TopKInEachNodeHandler.AACO> mapToAACOs
Constructor Summary
TopKInEachNodeHandler.IntermediateFacetResultWithHash(FacetRequest facetReq, IntToObjectMap<org.apache.lucene.facet.search.TopKInEachNodeHandler.AACO> mapToAACOs)
Method Summary
 FacetRequest getFacetRequest()
Facet request for which this temporary result was created.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

mapToAACOs

protected IntToObjectMap<org.apache.lucene.facet.search.TopKInEachNodeHandler.AACO> mapToAACOs
Constructor Detail

TopKInEachNodeHandler.IntermediateFacetResultWithHash

public TopKInEachNodeHandler.IntermediateFacetResultWithHash(FacetRequest facetReq,
                                                             IntToObjectMap<org.apache.lucene.facet.search.TopKInEachNodeHandler.AACO> mapToAACOs)
Method Detail

getFacetRequest

public FacetRequest getFacetRequest()
Description copied from interface: IntermediateFacetResult
Facet request for which this temporary result was created.

Specified by:
getFacetRequest in interface IntermediateFacetResult
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TotalFacetCounts

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class TotalFacetCounts

java.lang.Object
    extended by  org.apache.lucene.facet.search.TotalFacetCounts

public class TotalFacetCounts
extends Object

Maintain Total Facet Counts per partition, for given parameters:

  • Index reader of an index
  • Taxonomy index reader
  • Facet indexing params (and particularly the category list params)
The total facet counts are maintained as an array of arrays of integers, where a separate array is kept for each partition.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
void | fillTotalCountsForPartition(int[] partitionArray, int partition) Fill a partition's array with the TotalCountsArray values.
int | getTotalCount(int ordinal) Return the total count of an input category
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

fillTotalCountsForPartition

public void fillTotalCountsForPartition(int[] partitionArray,
                                        int partition)
Fill a partition's array with the TotalCountsArray values.

Parameters:
partitionArray - array to fill
partition - number of required partition

getTotalCount

public int getTotalCount(int ordinal)
Return the total count of an input category

Parameters:
ordinal - ordinal of category whose total count is required
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TotalFacetCountsCache

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search
Class TotalFacetCountsCache

java.lang.Object
    extended by  org.apache.lucene.facet.search.TotalFacetCountsCache

public final class TotalFacetCountsCache
extends Object

Manage an LRU cache for TotalFacetCounts per index, taxonomy, and facet indexing params.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static int DEFAULT_CACHE_SIZE
Default size of in memory cache for computed total facet counts.
Method Summary
 void clear()
Clear the cache.
 int getCacheSize()
static TotalFacetCountsCache getSingleton()
Get the single instance of this cache
 TotalFacetCounts getTotalCounts(IndexReader indexReader, TaxonomyReader taxonomy, FacetIndexingParams facetIndexingParams, CategoryListCache clCache)
Get the total facet counts for a reader/taxonomy pair and facet indexing parameters.
 void load(File inputFile, IndexReader indexReader, TaxonomyReader taxonomy, FacetIndexingParams facetIndexingParams)
Load TotalFacetCounts matching input parameters from the provided outputFile and add them into the cache for the provided indexReader, taxonomy, and facetIndexingParams.
 void setCacheSize(int size)
Set the number of TotalFacetCounts arrays that will remain in memory cache.
 void store(File outputFile, IndexReader indexReader, TaxonomyReader taxonomy, FacetIndexingParams facetIndexingParams, CategoryListCache clCache)
Store the TotalFacetCounts matching input parameters into the provided outputFile, making them available for a later call to load(File, IndexReader, TaxonomyReader, FacetIndexingParams).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_CACHE_SIZE

public static final int DEFAULT_CACHE_SIZE
Default size of in memory cache for computed total facet counts. Set to 2 for the case when an application reopened a reader and the original one is still in use (Otherwise there will be switching again and again between the two.)

See Also:
Constant Field Values
Method Detail

getSingleton

public static TotalFacetCountsCache getSingleton()
Get the single instance of this cache

getTotalCounts

public TotalFacetCounts getTotalCounts(IndexReader indexReader,
                                       TaxonomyReader taxonomy,
                                       FacetIndexingParams facetIndexingParams,
                                       CategoryListCache clCache)
                                throws IOException
Get the total facet counts for a reader/taxonomy pair and facet indexing parameters. If not in cache, computed here and added to the cache for later use.

Parameters:
indexReader - the documents index
taxonomy - the taxonomy index
facetIndexingParams - facet indexing parameters
clCache - category list cache for faster computation, can be null
Returns:
the total facet counts.
Throws:
IOException

load

public void load(File inputFile,
                 IndexReader indexReader,
                 TaxonomyReader taxonomy,
                 FacetIndexingParams facetIndexingParams)
          throws IOException
Load TotalFacetCounts matching input parameters from the provided outputFile and add them into the cache for the provided indexReader, taxonomy, and facetIndexingParams. If a TotalFacetCounts for these parameters already exists in the cache, it will be replaced by the loaded one.

Parameters:
inputFile - file from which to read the data
indexReader - the documents index
taxonomy - the taxonomy index
facetIndexingParams - the facet indexing parameters
Throws:
IOException - on error
See Also:
store(File, IndexReader, TaxonomyReader, FacetIndexingParams, CategoryListCache)

store

public void store(File outputFile,
                  IndexReader indexReader,
                  TaxonomyReader taxonomy,
                  FacetIndexingParams facetIndexingParams,
                  CategoryListCache clCache)
           throws IOException
Store the TotalFacetCounts matching input parameters into the provided outputFile, making them available for a later call to load(File, IndexReader, TaxonomyReader, FacetIndexingParams). If these TotalFacetCounts are available in the cache, they are used. But if they are not in the cache, this call will first compute them (which will also add them to the cache).

Parameters:
outputFile - file to store in.
indexReader - the documents index
taxonomy - the taxonomy index
facetIndexingParams - the facet indexing parameters
clCache - category list cache for faster computation, can be null
Throws:
IOException - on error
See Also:
load(File, IndexReader, TaxonomyReader, FacetIndexingParams), getTotalCounts(IndexReader, TaxonomyReader, FacetIndexingParams, CategoryListCache)

clear

public void clear()
Clear the cache.

getCacheSize

public int getCacheSize()
Returns:
the maximal cache size

setCacheSize

public void setCacheSize(int size)
Set the number of TotalFacetCounts arrays that will remain in memory cache.

If new size is smaller than current size, the cache is appropriately trimmed.

Minimal size is 1, so passing zero or negative size would result in size of 1.

Parameters:
size - new size to set
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Aggregator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.aggregator
Interface Aggregator

All Known Implementing Classes:
AssociationFloatSumAggregator, AssociationIntSumAggregator, ComplementCountingAggregator, CountingAggregator, ScoringAggregator
public interface Aggregator

An Aggregator is the analogue of Lucene's Collector (see Collector), for processing the categories belonging to a certain document. The Aggregator is responsible for doing whatever it wishes with the categories it is fed, e.g., counting the number of times that each category appears, or performing some computation on their association values.

Much of the function of an Aggregator implementation is not described by this interface. This includes the constructor and getter methods to retrieve the results of the aggregation.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
void | aggregate(int ordinal) Collect (and do whatever an implementation deems appropriate) the category given by its ordinal.
void | setNextDoc(int docid, float score) Specify the document (and its score in the search) that the following aggregate(int) calls will pertain to.

Method Detail

setNextDoc

void setNextDoc(int docid,
                float score)
                throws IOException
Specify the document (and its score in the search) that the following aggregate(int) calls will pertain to.

Throws:
IOException

aggregate

void aggregate(int ordinal)
Collect (and do whatever an implementation deems appropriate) the category given by its ordinal. This category belongs to a document given earlier by setNextDoc(int, float).

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ComplementCountingAggregator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.aggregator
Class ComplementCountingAggregator

java.lang.Object
    extended by  org.apache.lucene.facet.search.aggregator.CountingAggregator
        extended by  org.apache.lucene.facet.search.aggregator.ComplementCountingAggregator
All Implemented Interfaces:
Aggregator
public class ComplementCountingAggregator
extends CountingAggregator

A CountingAggregator used during complement counting.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.facet.search.aggregator.CountingAggregator
counterArray
Constructor Summary
ComplementCountingAggregator(int[] counterArray)
Method Summary
 void aggregate(int ordinal)
Collect (and do whatever an implementation deems appropriate) the category given by its ordinal.
Methods inherited from class org.apache.lucene.facet.search.aggregator.CountingAggregator
equals, hashCode, setNextDoc
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ComplementCountingAggregator

public ComplementCountingAggregator(int[] counterArray)
Method Detail

aggregate

public void aggregate(int ordinal)
Description copied from interface: Aggregator
Collect (and do whatever an implementation deems appropriate) the category given by its ordinal. This category belongs to a document given earlier by Aggregator.setNextDoc(int, float).

Specified by:
aggregate in interface Aggregator
Overrides:
aggregate in class CountingAggregator
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CountingAggregator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.aggregator
Class CountingAggregator

java.lang.Object
    extended by  org.apache.lucene.facet.search.aggregator.CountingAggregator
All Implemented Interfaces:
Aggregator
Direct Known Subclasses:
ComplementCountingAggregator
public class CountingAggregator
extends Object
implements Aggregator

A CountingAggregator updates a counter array with the size of the whole taxonomy, counting the number of times each category appears in the given set of documents.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected  int[] counterArray
Constructor Summary
CountingAggregator(int[] counterArray)
Method Summary
 void aggregate(int ordinal)
Collect (and do whatever an implementation deems appropriate) the category given by its ordinal.
 boolean equals(Object obj)
 int hashCode()
 void setNextDoc(int docid, float score)
Specify the document (and its score in the search) that the following Aggregator.aggregate(int) calls will pertain to.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

counterArray

protected int[] counterArray
Constructor Detail

CountingAggregator

public CountingAggregator(int[] counterArray)
Method Detail

aggregate

public void aggregate(int ordinal)
Description copied from interface: Aggregator
Collect (and do whatever an implementation deems appropriate) the category given by its ordinal. This category belongs to a document given earlier by Aggregator.setNextDoc(int, float).

Specified by:
aggregate in interface Aggregator

setNextDoc

public void setNextDoc(int docid,
                       float score)
Description copied from interface: Aggregator
Specify the document (and its score in the search) that the following Aggregator.aggregate(int) calls will pertain to.

Specified by:
setNextDoc in interface Aggregator

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.search.aggregator
Interfaces
Aggregator
Classes
ComplementCountingAggregator
CountingAggregator
ScoringAggregator


org.apache.lucene.facet.search.aggregator

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.search.aggregator

Aggregating Facets during Faceted Search

See:
Description

Interface Summary
Aggregator An Aggregator is the analogue of Lucene's Collector (see Collector), for processing the categories belonging to a certain document.

Class Summary
ComplementCountingAggregator | A CountingAggregator used during complement counting.
CountingAggregator | A CountingAggregator updates a counter array with the size of the whole taxonomy, counting the number of times each category appears in the given set of documents.
ScoringAggregator | An Aggregator which updates the weight of a category according to the scores of the documents it was found in.

Package org.apache.lucene.facet.search.aggregator Description

Aggregating Facets during Faceted Search

A facets aggregator is the parallel of Lucene's Collector. While Collector collected matching documents, an aggregator aggregates facets of a matching document.


org.apache.lucene.facet.search.aggregator Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.search.aggregator

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.search.aggregator.CountingAggregator (implements org.apache.lucene.facet.search.aggregator.Aggregator)
      • org.apache.lucene.facet.search.aggregator.ComplementCountingAggregator
    • org.apache.lucene.facet.search.aggregator.ScoringAggregator (implements org.apache.lucene.facet.search.aggregator.Aggregator)

Interface Hierarchy

  • org.apache.lucene.facet.search.aggregator.Aggregator


Uses of Package org.apache.lucene.facet.search.aggregator

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.search.aggregator

Packages that use org.apache.lucene.facet.search.aggregator
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.aggregator | Aggregating Facets during Faceted Search
org.apache.lucene.facet.search.aggregator.association | Association-based aggregators.
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.search.params.association | Association-based Parameters for Faceted Search.

Classes in org.apache.lucene.facet.search.aggregator used by org.apache.lucene.facet.search
Aggregator
An Aggregator is the analogue of Lucene's Collector (see Collector), for processing the categories belonging to a certain document.

Classes in org.apache.lucene.facet.search.aggregator used by org.apache.lucene.facet.search.aggregator
Aggregator
An Aggregator is the analogue of Lucene's Collector (see Collector), for processing the categories belonging to a certain document.
CountingAggregator
A CountingAggregator updates a counter array with the size of the whole taxonomy, counting the number of times each category appears in the given set of documents.

Classes in org.apache.lucene.facet.search.aggregator used by org.apache.lucene.facet.search.aggregator.association
Aggregator
An Aggregator is the analogue of Lucene's Collector (see Collector), for processing the categories belonging to a certain document.

Classes in org.apache.lucene.facet.search.aggregator used by org.apache.lucene.facet.search.params
Aggregator
An Aggregator is the analogue of Lucene's Collector (see Collector), for processing the categories belonging to a certain document.

Classes in org.apache.lucene.facet.search.aggregator used by org.apache.lucene.facet.search.params.association
Aggregator
An Aggregator is the analogue of Lucene's Collector (see Collector), for processing the categories belonging to a certain document.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ScoringAggregator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.aggregator
Class ScoringAggregator

java.lang.Object
    extended by  org.apache.lucene.facet.search.aggregator.ScoringAggregator
All Implemented Interfaces:
Aggregator
public class ScoringAggregator
extends Object
implements Aggregator

An Aggregator which updates the weight of a category according to the scores of the documents it was found in.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ScoringAggregator(float[] counterArray)
Method Summary
 void aggregate(int ordinal)
Collect (and do whatever an implementation deems appropriate) the category given by its ordinal.
 boolean equals(Object obj)
 int hashCode()
 void setNextDoc(int docid, float score)
Specify the document (and its score in the search) that the following Aggregator.aggregate(int) calls will pertain to.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ScoringAggregator

public ScoringAggregator(float[] counterArray)
Method Detail

aggregate

public void aggregate(int ordinal)
Description copied from interface: Aggregator
Collect (and do whatever an implementation deems appropriate) the category given by its ordinal. This category belongs to a document given earlier by Aggregator.setNextDoc(int, float).

Specified by:
aggregate in interface Aggregator

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

setNextDoc

public void setNextDoc(int docid,
                       float score)
Description copied from interface: Aggregator
Specify the document (and its score in the search) that the following Aggregator.aggregate(int) calls will pertain to.

Specified by:
setNextDoc in interface Aggregator
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AssociationFloatSumAggregator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.aggregator.association
Class AssociationFloatSumAggregator

java.lang.Object
    extended by  org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator
All Implemented Interfaces:
Aggregator
public class AssociationFloatSumAggregator
extends Object
implements Aggregator

An Aggregator which updates the weight of a category by summing the weights of the float association it finds for every document.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected AssociationsPayloadIterator | associationsPayloadIterator
protected String | field
protected float[] | sumArray
Constructor Summary
AssociationFloatSumAggregator(IndexReader reader, float[] sumArray)
AssociationFloatSumAggregator(String field, IndexReader reader, float[] sumArray)
Method Summary
 void aggregate(int ordinal)
Collect (and do whatever an implementation deems appropriate) the category given by its ordinal.
 boolean equals(Object obj)
 int hashCode()
 void setNextDoc(int docid, float score)
Specify the document (and its score in the search) that the following Aggregator.aggregate(int) calls will pertain to.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

field

protected final String field

sumArray

protected final float[] sumArray

associationsPayloadIterator

protected final AssociationsPayloadIterator associationsPayloadIterator
Constructor Detail

AssociationFloatSumAggregator

public AssociationFloatSumAggregator(IndexReader reader,
                                     float[] sumArray)
                              throws IOException
Throws:
IOException

AssociationFloatSumAggregator

public AssociationFloatSumAggregator(String field,
                                     IndexReader reader,
                                     float[] sumArray)
                              throws IOException
Throws:
IOException
Method Detail

aggregate

public void aggregate(int ordinal)
Description copied from interface: Aggregator
Collect (and do whatever an implementation deems appropriate) the category given by its ordinal. This category belongs to a document given earlier by Aggregator.setNextDoc(int, float).

Specified by:
aggregate in interface Aggregator

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

setNextDoc

public void setNextDoc(int docid,
                       float score)
                throws IOException
Description copied from interface: Aggregator
Specify the document (and its score in the search) that the following Aggregator.aggregate(int) calls will pertain to.

Specified by:
setNextDoc in interface Aggregator
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AssociationIntSumAggregator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.aggregator.association
Class AssociationIntSumAggregator

java.lang.Object
    extended by  org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator
All Implemented Interfaces:
Aggregator
public class AssociationIntSumAggregator
extends Object
implements Aggregator

An Aggregator which updates the weight of a category by summing the weights of the integer association it finds for every document.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected AssociationsPayloadIterator | associationsPayloadIterator
protected String | field
protected int[] | sumArray
Constructor Summary
AssociationIntSumAggregator(IndexReader reader, int[] sumArray)
AssociationIntSumAggregator(String field, IndexReader reader, int[] sumArray)
Method Summary
 void aggregate(int ordinal)
Collect (and do whatever an implementation deems appropriate) the category given by its ordinal.
 boolean equals(Object obj)
 int hashCode()
 void setNextDoc(int docid, float score)
Specify the document (and its score in the search) that the following Aggregator.aggregate(int) calls will pertain to.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

field

protected final String field

sumArray

protected final int[] sumArray

associationsPayloadIterator

protected final AssociationsPayloadIterator associationsPayloadIterator
Constructor Detail

AssociationIntSumAggregator

public AssociationIntSumAggregator(IndexReader reader,
                                   int[] sumArray)
                            throws IOException
Throws:
IOException

AssociationIntSumAggregator

public AssociationIntSumAggregator(String field,
                                   IndexReader reader,
                                   int[] sumArray)
                            throws IOException
Throws:
IOException
Method Detail

aggregate

public void aggregate(int ordinal)
Description copied from interface: Aggregator
Collect (and do whatever an implementation deems appropriate) the category given by its ordinal. This category belongs to a document given earlier by Aggregator.setNextDoc(int, float).

Specified by:
aggregate in interface Aggregator

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

setNextDoc

public void setNextDoc(int docid,
                       float score)
                throws IOException
Description copied from interface: Aggregator
Specify the document (and its score in the search) that the following Aggregator.aggregate(int) calls will pertain to.

Specified by:
setNextDoc in interface Aggregator
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.search.aggregator.association
Classes
AssociationFloatSumAggregator
AssociationIntSumAggregator


org.apache.lucene.facet.search.aggregator.association

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.search.aggregator.association

Association-based aggregators.

See:
Description

Class Summary
AssociationFloatSumAggregator | An Aggregator which updates the weight of a category by summing the weights of the float association it finds for every document.
AssociationIntSumAggregator | An Aggregator which updates the weight of a category by summing the weights of the integer association it finds for every document.

Package org.apache.lucene.facet.search.aggregator.association Description

Association-based aggregators.


org.apache.lucene.facet.search.aggregator.association Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.search.aggregator.association

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator (implements org.apache.lucene.facet.search.aggregator.Aggregator)
    • org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator (implements org.apache.lucene.facet.search.aggregator.Aggregator)


Uses of Package org.apache.lucene.facet.search.aggregator.association

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.search.aggregator.association

No usage of org.apache.lucene.facet.search.aggregator.association

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator

No usage of org.apache.lucene.facet.search.aggregator.association.AssociationFloatSumAggregator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator

No usage of org.apache.lucene.facet.search.aggregator.association.AssociationIntSumAggregator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.search.aggregator.Aggregator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.search.aggregator.Aggregator

Packages that use Aggregator
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.aggregator | Aggregating Facets during Faceted Search
org.apache.lucene.facet.search.aggregator.association | Association-based aggregators.
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.search.params.association | Association-based Parameters for Faceted Search.

Uses of Aggregator in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search that return types with arguments of type Aggregator
protected  HashMap<CategoryListIterator,Aggregator> StandardFacetsAccumulator.getCategoryListMap(FacetArrays facetArrays, int partition)
Create an Aggregator and a CategoryListIterator for each and every FacetRequest.

Uses of Aggregator in org.apache.lucene.facet.search.aggregator

Classes in org.apache.lucene.facet.search.aggregator that implement Aggregator
class | ComplementCountingAggregator A CountingAggregator used during complement counting.
class | CountingAggregator A CountingAggregator updates a counter array with the size of the whole taxonomy, counting the number of times each category appears in the given set of documents.
class | ScoringAggregator An Aggregator which updates the weight of a category according to the scores of the documents it was found in.

Uses of Aggregator in org.apache.lucene.facet.search.aggregator.association

Classes in org.apache.lucene.facet.search.aggregator.association that implement Aggregator
class | AssociationFloatSumAggregator An Aggregator which updates the weight of a category by summing the weights of the float association it finds for every document.
class | AssociationIntSumAggregator An Aggregator which updates the weight of a category by summing the weights of the integer association it finds for every document.

Uses of Aggregator in org.apache.lucene.facet.search.params

Methods in org.apache.lucene.facet.search.params that return Aggregator
Aggregator | CountFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)
abstract Aggregator | FacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader indexReader, TaxonomyReader taxonomy) Create an aggregator for this facet request.
Aggregator | ScoreFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)

Uses of Aggregator in org.apache.lucene.facet.search.params.association

Methods in org.apache.lucene.facet.search.params.association that return Aggregator
Aggregator | AssociationFloatSumFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)
Aggregator | AssociationIntSumFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.aggregator.ComplementCountingAggregator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.aggregator.ComplementCountingAggregator

No usage of org.apache.lucene.facet.search.aggregator.ComplementCountingAggregator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.aggregator.CountingAggregator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.aggregator.CountingAggregator

Packages that use CountingAggregator
org.apache.lucene.facet.search.aggregator Aggregating Facets during Faceted Search

Uses of CountingAggregator in org.apache.lucene.facet.search.aggregator

Subclasses of CountingAggregator in org.apache.lucene.facet.search.aggregator
 class ComplementCountingAggregator
A CountingAggregator used during complement counting.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.aggregator.ScoringAggregator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.aggregator.ScoringAggregator

No usage of org.apache.lucene.facet.search.aggregator.ScoringAggregator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CategoryListCache

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.cache
Class CategoryListCache

java.lang.Object
    extended by  org.apache.lucene.facet.search.cache.CategoryListCache

public class CategoryListCache
extends Object

Cache for CategoryListData, per CategoryListParams.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
CategoryListCache()
Method Summary
CategoryListData | get(CategoryListParams clp) Fetch the cached CategoryListData for a given CategoryListParams.
void | loadAndRegister(CategoryListParams clp, IndexReader reader, TaxonomyReader taxo, FacetIndexingParams iparams) Load and register CategoryListData.
void | register(CategoryListParams clp, CategoryListData clData) Register a pre-computed CategoryListData.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CategoryListCache

public CategoryListCache()
Method Detail

get

public CategoryListData get(CategoryListParams clp)
Fetch the cached CategoryListData for a given CategoryListParams.

register

public void register(CategoryListParams clp,
                     CategoryListData clData)
Register a pre-computed CategoryListData.

loadAndRegister

public void loadAndRegister(CategoryListParams clp,
                            IndexReader reader,
                            TaxonomyReader taxo,
                            FacetIndexingParams iparams)
                     throws IOException
Load and register CategoryListData.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CategoryListData

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.cache
Class CategoryListData

java.lang.Object
    extended by  org.apache.lucene.facet.search.cache.CategoryListData

public class CategoryListData
extends Object

Category list data maintained in RAM.

Speeds up facets accumulation when more RAM is available.

Note that this will consume more memory: one int (4 bytes) for each category of each document.

Note: at the moment this class is insensitive to updates of the index, and, in particular, does not make use of Lucene's ability to refresh a single segment.

See CategoryListCache.register(CategoryListParams, CategoryListData) and CategoryListCache.loadAndRegister(CategoryListParams, IndexReader, TaxonomyReader, FacetIndexingParams).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
protected CategoryListData()
Empty constructor for extensions with modified computation of the data.
Method Summary
 CategoryListIterator iterator(int partition)
Iterate on the category list data for the specified partition.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CategoryListData

protected CategoryListData()
Empty constructor for extensions with modified computation of the data.

Method Detail

iterator

public CategoryListIterator iterator(int partition)
                              throws IOException
Iterate on the category list data for the specified partition.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.search.cache
Classes
CategoryListCache
CategoryListData


org.apache.lucene.facet.search.cache

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.search.cache

Caching to speed up facets accumulation.

See:
Description

Class Summary
CategoryListCache | Cache for CategoryListData, per CategoryListParams.
CategoryListData | Category list data maintained in RAM.

Package org.apache.lucene.facet.search.cache Description

Caching to speed up facets accumulation.


org.apache.lucene.facet.search.cache Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.search.cache

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.search.cache.CategoryListCache
    • org.apache.lucene.facet.search.cache.CategoryListData


Uses of Package org.apache.lucene.facet.search.cache

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.search.cache

Packages that use org.apache.lucene.facet.search.cache
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.cache | Caching to speed up facets accumulation.
org.apache.lucene.facet.search.params | Parameters for Faceted Search

Classes in org.apache.lucene.facet.search.cache used by org.apache.lucene.facet.search
CategoryListCache
Cache for CategoryListData, per CategoryListParams.

Classes in org.apache.lucene.facet.search.cache used by org.apache.lucene.facet.search.cache
CategoryListData
Category list data maintained in RAM.

Classes in org.apache.lucene.facet.search.cache used by org.apache.lucene.facet.search.params
CategoryListCache
Cache for CategoryListData, per CategoryListParams.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.cache.CategoryListCache

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.cache.CategoryListCache

Packages that use CategoryListCache
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.params | Parameters for Faceted Search

Uses of CategoryListCache in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search with parameters of type CategoryListCache
 TotalFacetCounts TotalFacetCountsCache.getTotalCounts(IndexReader indexReader, TaxonomyReader taxonomy, FacetIndexingParams facetIndexingParams, CategoryListCache clCache)
Get the total facet counts for a reader/taxonomy pair and facet indexing parameters.
 void TotalFacetCountsCache.store(File outputFile, IndexReader indexReader, TaxonomyReader taxonomy, FacetIndexingParams facetIndexingParams, CategoryListCache clCache)
Store the TotalFacetCounts matching input parameters into the provided outputFile, making them available for a later call to TotalFacetCountsCache.load(File, IndexReader, TaxonomyReader, FacetIndexingParams).

Uses of CategoryListCache in org.apache.lucene.facet.search.params

Methods in org.apache.lucene.facet.search.params that return CategoryListCache
 CategoryListCache FacetSearchParams.getClCache()

Methods in org.apache.lucene.facet.search.params with parameters of type CategoryListCache
 void FacetSearchParams.setClCache(CategoryListCache clCache)
Set Cached Category Lists data to be used in Faceted search.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.cache.CategoryListData

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.cache.CategoryListData

Packages that use CategoryListData
org.apache.lucene.facet.search.cache Caching to speed up facets accumulation.

Uses of CategoryListData in org.apache.lucene.facet.search.cache

Methods in org.apache.lucene.facet.search.cache that return CategoryListData
 CategoryListData CategoryListCache.get(CategoryListParams clp)
Fetch the cached CategoryListData for a given CategoryListParams.

Methods in org.apache.lucene.facet.search.cache with parameters of type CategoryListData
 void CategoryListCache.register(CategoryListParams clp, CategoryListData clData)
Register a pre-computed CategoryListData.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.AdaptiveFacetsAccumulator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.AdaptiveFacetsAccumulator

No usage of org.apache.lucene.facet.search.AdaptiveFacetsAccumulator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.search.CategoryListIterator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.search.CategoryListIterator

Packages that use CategoryListIterator
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.cache | Caching to speed up facets accumulation.
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.util | Various utilities for faceted search

Uses of CategoryListIterator in org.apache.lucene.facet.index.params

Methods in org.apache.lucene.facet.index.params that return CategoryListIterator
 CategoryListIterator CategoryListParams.createCategoryListIterator(IndexReader reader, int partition)
Create the category list iterator for the specified partition.

Uses of CategoryListIterator in org.apache.lucene.facet.search

Classes in org.apache.lucene.facet.search that implement CategoryListIterator
 class PayloadIntDecodingIterator
A payload deserializer comes with its own working space (buffer).

Methods in org.apache.lucene.facet.search that return types with arguments of type CategoryListIterator
protected  HashMap<CategoryListIterator,Aggregator> StandardFacetsAccumulator.getCategoryListMap(FacetArrays facetArrays, int partition)
Create an Aggregator and a CategoryListIterator for each and every FacetRequest.

Uses of CategoryListIterator in org.apache.lucene.facet.search.cache

Methods in org.apache.lucene.facet.search.cache that return CategoryListIterator
 CategoryListIterator CategoryListData.iterator(int partition)
Iterate on the category list data for the specified partition.

Uses of CategoryListIterator in org.apache.lucene.facet.search.params

Methods in org.apache.lucene.facet.search.params that return CategoryListIterator
 CategoryListIterator FacetRequest.createCategoryListIterator(IndexReader reader, TaxonomyReader taxo, FacetSearchParams sParams, int partition)
Create the category list iterator for the specified partition.

Uses of CategoryListIterator in org.apache.lucene.facet.util

Classes in org.apache.lucene.facet.util that implement CategoryListIterator
 class MultiCategoryListIterator
Iterates over multiple CategoryListIterators, consuming the provided iterators in order.

Constructors in org.apache.lucene.facet.util with parameters of type CategoryListIterator
MultiCategoryListIterator(CategoryListIterator... iterators)
Receives the iterators to iterate on

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.DrillDown

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.DrillDown

No usage of org.apache.lucene.facet.search.DrillDown

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.FacetArrays

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.FacetArrays

Packages that use FacetArrays
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.search.params.association | Association-based Parameters for Faceted Search.

Uses of FacetArrays in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search with parameters of type FacetArrays
IntermediateFacetResult | TopKInEachNodeHandler.fetchPartitionResult(FacetArrays arrays, int offset) Recursively explore all facets that can be potentially included in the FacetResult to be generated, and that belong to the given partition, so that values can be examined and collected.
IntermediateFacetResult | TopKFacetResultsHandler.fetchPartitionResult(FacetArrays facetArrays, int offset)
abstract IntermediateFacetResult | FacetResultsHandler.fetchPartitionResult(FacetArrays arrays, int offset) Fetch results of a single partition, given facet arrays for that partition, and based on the matching documents and faceted search parameters.
protected HashMap<CategoryListIterator,Aggregator> | StandardFacetsAccumulator.getCategoryListMap(FacetArrays facetArrays, int partition) Create an Aggregator and a CategoryListIterator for each and every FacetRequest.
protected boolean | FacetResultsHandler.isSelfPartition(int ordinal, FacetArrays facetArrays, int offset) Check if an array contains the partition which contains ordinal

Uses of FacetArrays in org.apache.lucene.facet.search.params

Methods in org.apache.lucene.facet.search.params with parameters of type FacetArrays
Aggregator | CountFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)
abstract Aggregator | FacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader indexReader, TaxonomyReader taxonomy) Create an aggregator for this facet request.
Aggregator | ScoreFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)
double | CountFacetRequest.getValueOf(FacetArrays arrays, int ordinal)
abstract double | FacetRequest.getValueOf(FacetArrays arrays, int idx) Return the value of a category used for facets computations for this request.
double | ScoreFacetRequest.getValueOf(FacetArrays arrays, int ordinal)

Uses of FacetArrays in org.apache.lucene.facet.search.params.association

Methods in org.apache.lucene.facet.search.params.association with parameters of type FacetArrays
Aggregator | AssociationFloatSumFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)
Aggregator | AssociationIntSumFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)
double | AssociationFloatSumFacetRequest.getValueOf(FacetArrays arrays, int ordinal)
double | AssociationIntSumFacetRequest.getValueOf(FacetArrays arrays, int ordinal)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.FacetResultsHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.FacetResultsHandler

Packages that use FacetResultsHandler
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.params | Parameters for Faceted Search

Uses of FacetResultsHandler in org.apache.lucene.facet.search

Subclasses of FacetResultsHandler in org.apache.lucene.facet.search
class | TopKFacetResultsHandler Generate Top-K results for a particular FacetRequest.
class | TopKInEachNodeHandler Generates FacetResult from the count arrays aggregated for a particular FacetRequest.

Uses of FacetResultsHandler in org.apache.lucene.facet.search.params

Methods in org.apache.lucene.facet.search.params that return FacetResultsHandler
 FacetResultsHandler FacetRequest.createFacetResultsHandler(TaxonomyReader taxonomyReader)
Creates a new FacetResultsHandler that matches the request logic and current settings, such as depth, limits-mode, etc, as well as the passed in TaxonomyReader.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.FacetsAccumulator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.FacetsAccumulator

Packages that use FacetsAccumulator
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation

Uses of FacetsAccumulator in org.apache.lucene.facet.search

Subclasses of FacetsAccumulator in org.apache.lucene.facet.search
class | AdaptiveFacetsAccumulator FacetsAccumulator whose behavior regarding complements, sampling, etc.
class | SamplingWrapper Wrap any Facets Accumulator with sampling.
class | StandardFacetsAccumulator Standard implementation for FacetsAccumulator, utilizing partitions to save on memory.

Fields in org.apache.lucene.facet.search declared as FacetsAccumulator
protected  FacetsAccumulator FacetsCollector.facetsAccumulator

Methods in org.apache.lucene.facet.search that return FacetsAccumulator
protected  FacetsAccumulator FacetsCollector.initFacetsAccumulator(FacetSearchParams facetSearchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Create the FacetsAccumulator to be used.

Constructors in org.apache.lucene.facet.search with parameters of type FacetsAccumulator
SamplingWrapper(FacetsAccumulator delegee, Sampler sampler)

Uses of FacetsAccumulator in org.apache.lucene.facet.search.sampling

Subclasses of FacetsAccumulator in org.apache.lucene.facet.search.sampling
 class SamplingAccumulator
Facets accumulation with sampling.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.FacetsCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.FacetsCollector

No usage of org.apache.lucene.facet.search.FacetsCollector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.FloatArrayAllocator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.FloatArrayAllocator

Packages that use FloatArrayAllocator
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation

Uses of FloatArrayAllocator in org.apache.lucene.facet.search

Fields in org.apache.lucene.facet.search declared as FloatArrayAllocator
protected  FloatArrayAllocator StandardFacetsAccumulator.floatArrayAllocator

Constructors in org.apache.lucene.facet.search with parameters of type FloatArrayAllocator
AdaptiveFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Create an AdaptiveFacetsAccumulator
FacetArrays(IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Create a FacetArrays with certain array allocators.
StandardFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)

Uses of FloatArrayAllocator in org.apache.lucene.facet.search.sampling

Constructors in org.apache.lucene.facet.search.sampling with parameters of type FloatArrayAllocator
SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Constructor...

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.search.Heap

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.search.Heap

Packages that use Heap
org.apache.lucene.facet.util Various utilities for faceted search

Uses of Heap in org.apache.lucene.facet.util

Methods in org.apache.lucene.facet.util that return Heap
static Heap<FacetResultNode> ResultSortUtils.createSuitableHeap(FacetRequest facetRequest)
Create a suitable heap according to facet request being served.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.IntArrayAllocator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.IntArrayAllocator

Packages that use IntArrayAllocator
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation

Uses of IntArrayAllocator in org.apache.lucene.facet.search

Fields in org.apache.lucene.facet.search declared as IntArrayAllocator
protected  IntArrayAllocator StandardFacetsAccumulator.intArrayAllocator

Constructors in org.apache.lucene.facet.search with parameters of type IntArrayAllocator
AdaptiveFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Create an AdaptiveFacetsAccumulator
FacetArrays(IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Create a FacetArrays with certain array allocators.
StandardFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)

Uses of IntArrayAllocator in org.apache.lucene.facet.search.sampling

Constructors in org.apache.lucene.facet.search.sampling with parameters of type IntArrayAllocator
SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Constructor...

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.PayloadIntDecodingIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.PayloadIntDecodingIterator

No usage of org.apache.lucene.facet.search.PayloadIntDecodingIterator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.PayloadIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.PayloadIterator

Packages that use PayloadIterator
org.apache.lucene.facet.enhancements Enhanced category features

Uses of PayloadIterator in org.apache.lucene.facet.enhancements

Subclasses of PayloadIterator in org.apache.lucene.facet.enhancements
 class EnhancementsPayloadIterator
A PayloadIterator for iterating over category posting lists generated using EnhancementsCategoryTokenizer.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.SamplingWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.SamplingWrapper

No usage of org.apache.lucene.facet.search.SamplingWrapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.ScoredDocIdCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.ScoredDocIdCollector

Packages that use ScoredDocIdCollector
org.apache.lucene.facet.search Faceted Search API

Uses of ScoredDocIdCollector in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search that return ScoredDocIdCollector
static ScoredDocIdCollector | ScoredDocIdCollector.create(int maxDoc, boolean enableScoring) Creates a new ScoredDocIdCollector with the given parameters.
protected ScoredDocIdCollector | FacetsCollector.initScoredDocCollector(FacetSearchParams facetSearchParams, IndexReader indexReader, TaxonomyReader taxonomyReader) Create a ScoredDocIdCollector to be used as the first phase of the facet collection.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.search.ScoredDocIDs

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.search.ScoredDocIDs

Packages that use ScoredDocIDs
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation
org.apache.lucene.facet.util | Various utilities for faceted search

Uses of ScoredDocIDs in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search that return ScoredDocIDs
protected ScoredDocIDs | StandardFacetsAccumulator.actualDocsToAccumulate(ScoredDocIDs docids) Set the actual set of documents over which accumulation should take place.
ScoredDocIDs | ScoredDocIdCollector.getScoredDocIDs()

Methods in org.apache.lucene.facet.search with parameters of type ScoredDocIDs
List<FacetResult> | AdaptiveFacetsAccumulator.accumulate(ScoredDocIDs docids)
List<FacetResult> | SamplingWrapper.accumulate(ScoredDocIDs docids)
abstract List<FacetResult> | FacetsAccumulator.accumulate(ScoredDocIDs docids) Accumulate facets over given documents, according to facet requests in effect.
List<FacetResult> | StandardFacetsAccumulator.accumulate(ScoredDocIDs docids)
protected ScoredDocIDs | StandardFacetsAccumulator.actualDocsToAccumulate(ScoredDocIDs docids) Set the actual set of documents over which accumulation should take place.
protected boolean | StandardFacetsAccumulator.shouldComplement(ScoredDocIDs docids) Check if it is worth to use complements

Uses of ScoredDocIDs in org.apache.lucene.facet.search.sampling

Fields in org.apache.lucene.facet.search.sampling declared as ScoredDocIDs
 ScoredDocIDs Sampler.SampleResult.docids

Methods in org.apache.lucene.facet.search.sampling that return ScoredDocIDs
protected  ScoredDocIDs SamplingAccumulator.actualDocsToAccumulate(ScoredDocIDs docids)

Methods in org.apache.lucene.facet.search.sampling with parameters of type ScoredDocIDs
 List<FacetResult> SamplingAccumulator.accumulate(ScoredDocIDs docids)
protected  ScoredDocIDs SamplingAccumulator.actualDocsToAccumulate(ScoredDocIDs docids)
protected  Sampler.SampleResult RandomSampler.createSample(ScoredDocIDs docids, int actualSize, int sampleSetSize)
protected  Sampler.SampleResult RepeatableSampler.createSample(ScoredDocIDs docids, int actualSize, int sampleSetSize)
protected abstract  Sampler.SampleResult Sampler.createSample(ScoredDocIDs docids, int actualSize, int sampleSetSize)
Create and return a sample of the input set
 void SampleFixer.fixResult(ScoredDocIDs origDocIds, FacetResult fres)
Alter the input result, fixing it to account for the sampling.
 Sampler.SampleResult Sampler.getSampleSet(ScoredDocIDs docids)
Compute a sample set out of the input set, based on the SamplingParams.getSampleRatio() in effect.
 boolean Sampler.shouldSample(ScoredDocIDs docIds)
Check if this sampler would complement for the input docIds

Constructors in org.apache.lucene.facet.search.sampling with parameters of type ScoredDocIDs
Sampler.SampleResult(ScoredDocIDs docids, double actualSampleRatio)

Uses of ScoredDocIDs in org.apache.lucene.facet.util

Methods in org.apache.lucene.facet.util that return ScoredDocIDs
static ScoredDocIDs | ScoredDocIdsUtils.createAllDocsScoredDocIDs(IndexReader reader) Creates a ScoredDocIDs which returns document IDs all non-deleted doc ids according to the given reader.
static ScoredDocIDs | ScoredDocIdsUtils.createScoredDocIds(DocIdSet docIdSet, int maxDoc) Create a ScoredDocIDs out of a given docIdSet and the total number of documents in an index
static ScoredDocIDs | ScoredDocIdsUtils.createScoredDocIDsSubset(ScoredDocIDs allDocIds, int[] sampleSet) Create a subset of an existing ScoredDocIDs object.
static ScoredDocIDs | ScoredDocIdsUtils.getComplementSet(ScoredDocIDs docids, IndexReader reader) Create a complement of the input set.

Methods in org.apache.lucene.facet.util with parameters of type ScoredDocIDs
static ScoredDocIDs | ScoredDocIdsUtils.createScoredDocIDsSubset(ScoredDocIDs allDocIds, int[] sampleSet) Create a subset of an existing ScoredDocIDs object.
static ScoredDocIDs | ScoredDocIdsUtils.getComplementSet(ScoredDocIDs docids, IndexReader reader) Create a complement of the input set.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.search.ScoredDocIDsIterator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.search.ScoredDocIDsIterator

Packages that use ScoredDocIDsIterator
org.apache.lucene.facet.search Faceted Search API

Uses of ScoredDocIDsIterator in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search that return ScoredDocIDsIterator
ScoredDocIDsIterator | ScoredDocIDs.iterator() Returns an iterator over the document IDs and their scores.
abstract ScoredDocIDsIterator | ScoredDocIdCollector.scoredDocIdsIterator()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.StandardFacetsAccumulator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.StandardFacetsAccumulator

Packages that use StandardFacetsAccumulator
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation

Uses of StandardFacetsAccumulator in org.apache.lucene.facet.search

Subclasses of StandardFacetsAccumulator in org.apache.lucene.facet.search
 class AdaptiveFacetsAccumulator
FacetsAccumulator whose behavior regarding complements, sampling, etc.

Uses of StandardFacetsAccumulator in org.apache.lucene.facet.search.sampling

Subclasses of StandardFacetsAccumulator in org.apache.lucene.facet.search.sampling
 class SamplingAccumulator
Facets accumulation with sampling.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.TemporaryObjectAllocator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.TemporaryObjectAllocator

Packages that use TemporaryObjectAllocator
org.apache.lucene.facet.search Faceted Search API

Uses of TemporaryObjectAllocator in org.apache.lucene.facet.search

Subclasses of TemporaryObjectAllocator in org.apache.lucene.facet.search
class | FloatArrayAllocator An FloatArrayAllocator is an object which manages float array objects of a certain size.
class | IntArrayAllocator An IntArrayAllocator is an object which manages counter array objects of a certain length.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.TopKFacetResultsHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.TopKFacetResultsHandler

No usage of org.apache.lucene.facet.search.TopKFacetResultsHandler

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.TopKInEachNodeHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.TopKInEachNodeHandler

No usage of org.apache.lucene.facet.search.TopKInEachNodeHandler

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.TopKInEachNodeHandler.IntermediateFacetResultWithHash

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.TopKInEachNodeHandler.IntermediateFacetResultWithHash

No usage of org.apache.lucene.facet.search.TopKInEachNodeHandler.IntermediateFacetResultWithHash

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.TotalFacetCounts

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.TotalFacetCounts

Packages that use TotalFacetCounts
org.apache.lucene.facet.search Faceted Search API

Uses of TotalFacetCounts in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search that return TotalFacetCounts
 TotalFacetCounts TotalFacetCountsCache.getTotalCounts(IndexReader indexReader, TaxonomyReader taxonomy, FacetIndexingParams facetIndexingParams, CategoryListCache clCache)
Get the total facet counts for a reader/taxonomy pair and facet indexing parameters.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.TotalFacetCountsCache

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.TotalFacetCountsCache

Packages that use TotalFacetCountsCache
org.apache.lucene.facet.search Faceted Search API

Uses of TotalFacetCountsCache in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search that return TotalFacetCountsCache
static TotalFacetCountsCache TotalFacetCountsCache.getSingleton()
Get the single instance of this cache

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CountFacetRequest

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.params
Class CountFacetRequest

java.lang.Object
    extended by  org.apache.lucene.facet.search.params.FacetRequest
        extended by  org.apache.lucene.facet.search.params.CountFacetRequest
All Implemented Interfaces:
Cloneable
public class CountFacetRequest
extends FacetRequest

Facet request for counting facets.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.facet.search.params.FacetRequest
FacetRequest.ResultMode, FacetRequest.SortBy, FacetRequest.SortOrder
Field Summary
Fields inherited from class org.apache.lucene.facet.search.params.FacetRequest
DEFAULT_DEPTH, DEFAULT_RESULT_MODE, DEFAULT_SORT_BY
Constructor Summary
CountFacetRequest(CategoryPath path, int num)
Create a count facet request for a given node in the taxonomy.
Method Summary
Aggregator | createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy) Create an aggregator for this facet request.
double | getValueOf(FacetArrays arrays, int ordinal) Return the value of a category used for facets computations for this request.
boolean | requireDocumentScore() Indicates whether the results of this request depends on each result document's score
boolean | supportsComplements() Indicates whether this facet request is eligible for applying the complements optimization.
Methods inherited from class org.apache.lucene.facet.search.params.FacetRequest
clone, createCategoryListIterator, createFacetResultsHandler, equals, getCategoryPath, getDepth, getNumLabel, getNumResults, getResultMode, getSortBy, getSortOrder, hashCode, setDepth, setNumLabel, setResultMode, setSortBy, setSortOrder, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CountFacetRequest

public CountFacetRequest(CategoryPath path,
                         int num)
Create a count facet request for a given node in the taxonomy.

Parameters:
path - category path of the category of interest.
num - number of child categories for which count info is requeted. reqiested. Default implementation will find top categories, - this behavior can be overridden by overriding FacetRequest.createFacetResultsHandler(TaxonomyReader).
Method Detail

createAggregator

public Aggregator createAggregator(boolean useComplements,
                                   FacetArrays arrays,
                                   IndexReader reader,
                                   TaxonomyReader taxonomy)
Description copied from class: FacetRequest
Create an aggregator for this facet request. Aggregator action depends on request definition. For a count request, it will usually increment the count for that facet.

Specified by:
createAggregator in class FacetRequest
Parameters:
useComplements - whether the complements optimization is being used for current computation.
arrays - provider for facet arrays in use for current computation.
reader - index reader in effect.
taxonomy - reader of taxonomy in effect.

getValueOf

public double getValueOf(FacetArrays arrays,
                         int ordinal)
Description copied from class: FacetRequest
Return the value of a category used for facets computations for this request. For a count request this would be the count for that facet, i.e. an integer number. but for other requests this can be the result of a more complex operation, and the result can be any double precision number. Having this method with a general name value which is double precision allows to have more compact API and code for handling counts and perhaps other requests (such as for associations) very similarly, and by the same code and API, avoiding code duplication.

Specified by:
getValueOf in class FacetRequest
Parameters:
arrays - provider for facet arrays in use for current computation.
ordinal - an index into the count arrays now in effect in arrays. E.g., for ordinal number n, with partition, of size partitionSize, now covering n, getValueOf would be invoked with idx being n % partitionSize.

supportsComplements

public boolean supportsComplements()
Description copied from class: FacetRequest
Indicates whether this facet request is eligible for applying the complements optimization.

Overrides:
supportsComplements in class FacetRequest

requireDocumentScore

public boolean requireDocumentScore()
Description copied from class: FacetRequest
Indicates whether the results of this request depends on each result document's score

Specified by:
requireDocumentScore in class FacetRequest
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


FacetRequest

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.params
Class FacetRequest

java.lang.Object
    extended by  org.apache.lucene.facet.search.params.FacetRequest
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
AssociationFloatSumFacetRequest, AssociationIntSumFacetRequest, CountFacetRequest, ScoreFacetRequest
public abstract class FacetRequest
extends Object
implements Cloneable

Request to accumulate facet information for a specified facet and possibly also some of its descendants, upto a specified depth.

The facet request additionally defines what information should be computed within the facet results, if and how should results be ordered, etc.

An example facet request is to look at all sub-categories of "Author", and return the 10 with the highest counts (sorted by decreasing count).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | FacetRequest.ResultMode Result structure manner of applying request's limits such as getNumLabel() and getNumResults().
static class | FacetRequest.SortBy Sort options for facet results.
static class | FacetRequest.SortOrder Requested sort order for the results.
Field Summary
static int | DEFAULT_DEPTH Default depth for facets accumulation.
static FacetRequest.ResultMode | DEFAULT_RESULT_MODE Default result mode
static FacetRequest.SortBy | DEFAULT_SORT_BY Default sort mode.
Constructor Summary
FacetRequest(CategoryPath path, int numResults)
Initialize the request with a given path, and a requested number of facets results.
Method Summary
 Object clone()
abstract  Aggregator createAggregator(boolean useComplements, FacetArrays arrays, IndexReader indexReader, TaxonomyReader taxonomy)
Create an aggregator for this facet request.
 CategoryListIterator createCategoryListIterator(IndexReader reader, TaxonomyReader taxo, FacetSearchParams sParams, int partition)
Create the category list iterator for the specified partition.
 FacetResultsHandler createFacetResultsHandler(TaxonomyReader taxonomyReader)
Creates a new FacetResultsHandler that matches the request logic and current settings, such as depth, limits-mode, etc, as well as the passed in TaxonomyReader.
 boolean equals(Object o)
 CategoryPath getCategoryPath()
The root category of this facet request.
 int getDepth()
How deeply to look under the given category.
 int getNumLabel()
If getNumLabel()
 int getNumResults()
The number of sub-categories to return (at most).
 FacetRequest.ResultMode getResultMode()
Return the requested result mode.
 FacetRequest.SortBy getSortBy()
Specify how should results be sorted.
 FacetRequest.SortOrder getSortOrder()
Return the requested order of results.
abstract  double getValueOf(FacetArrays arrays, int idx)
Return the value of a category used for facets computations for this request.
 int hashCode()
abstract  boolean requireDocumentScore()
Indicates whether the results of this request depends on each result document's score
 void setDepth(int depth)
 void setNumLabel(int numLabel)
 void setResultMode(FacetRequest.ResultMode resultMode)
 void setSortBy(FacetRequest.SortBy sortBy)
 void setSortOrder(FacetRequest.SortOrder sortOrder)
 boolean supportsComplements()
Indicates whether this facet request is eligible for applying the complements optimization.
 String toString()
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_DEPTH

public static final int DEFAULT_DEPTH
Default depth for facets accumulation.

See Also:
getDepth(), Constant Field Values

DEFAULT_SORT_BY

public static final FacetRequest.SortBy DEFAULT_SORT_BY
Default sort mode.

See Also:
getSortBy()

DEFAULT_RESULT_MODE

public static final FacetRequest.ResultMode DEFAULT_RESULT_MODE
Default result mode

See Also:
getResultMode()
Constructor Detail

FacetRequest

public FacetRequest(CategoryPath path,
                    int numResults)
Initialize the request with a given path, and a requested number of facets results. By default, all returned results would be labeled - to alter this default see setNumLabel(int).

NOTE: if numResults is given as Integer.MAX_VALUE than all the facet results would be returned, without any limit.

NOTE: it is assumed that the given CategoryPath is not modified after construction of this object. Otherwise, some things may not function properly, e.g. hashCode().

Throws:
IllegalArgumentException - if numResults is ≤ 0
Method Detail

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

setNumLabel

public void setNumLabel(int numLabel)

setDepth

public void setDepth(int depth)

setSortOrder

public void setSortOrder(FacetRequest.SortOrder sortOrder)

setSortBy

public void setSortBy(FacetRequest.SortBy sortBy)

getCategoryPath

public final CategoryPath getCategoryPath()
The root category of this facet request. The categories that are returned as a result of this request will all be descendants of this root.

NOTE: you should not modify the returned CategoryPath, or otherwise some methonds may not work properly, e.g. hashCode().

getDepth

public final int getDepth()
How deeply to look under the given category. If the depth is 0, only the category itself is counted. If the depth is 1, its immediate children are also counted, and so on. If the depth is Integer.MAX_VALUE, all the category's descendants are counted.
TODO (Facet): add AUTO_EXPAND option

getNumLabel

public final int getNumLabel()
If getNumLabel() If Integer.MAX_VALUE is specified, all results are labled.

The purpose of this parameter is to avoid having to run the whole faceted search again when the user asks for more values for the facet; The application can ask (getNumResults()) for more values than it needs to show, but keep getNumLabel() only the number it wants to immediately show. The slow-down caused by finding more values is negligible, because the slowest part - finding the categories' paths, is avoided.

Depending on the LimitsMode, this limit is applied globally or per results node. In the global mode, if this limit is 3, only 3 top results would be labeled. In the per-node mode, if this limit is 3, 3 top children of the target category would be labeled, as well as 3 top children of each of them, and so forth, until the depth defined by getDepth().

See Also:
getResultMode()

getNumResults

public final int getNumResults()
The number of sub-categories to return (at most). If the sub-categories are returned.

If Integer.MAX_VALUE is specified, all sub-categories are returned.

Depending on the LimitsMode, this limit is applied globally or per results node. In the global mode, if this limit is 3, only 3 top results would be computed. In the per-node mode, if this limit is 3, 3 top children of the target category would be returned, as well as 3 top children of each of them, and so forth, until the depth defined by getDepth().

See Also:
getResultMode()

getSortBy

public final FacetRequest.SortBy getSortBy()
Specify how should results be sorted.

getSortOrder

public final FacetRequest.SortOrder getSortOrder()
Return the requested order of results.

toString

public String toString()
Overrides:
toString in class Object

createFacetResultsHandler

public FacetResultsHandler createFacetResultsHandler(TaxonomyReader taxonomyReader)
Creates a new FacetResultsHandler that matches the request logic and current settings, such as depth, limits-mode, etc, as well as the passed in TaxonomyReader.

Parameters:
taxonomyReader - taxonomy reader is needed e.g. for knowing the taxonomy size.

getResultMode

public final FacetRequest.ResultMode getResultMode()
Return the requested result mode.

setResultMode

public void setResultMode(FacetRequest.ResultMode resultMode)
Parameters:
resultMode - the resultMode to set
See Also:
getResultMode()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

createAggregator

public abstract Aggregator createAggregator(boolean useComplements,
                                            FacetArrays arrays,
                                            IndexReader indexReader,
                                            TaxonomyReader taxonomy)
                                     throws IOException
Create an aggregator for this facet request. Aggregator action depends on request definition. For a count request, it will usually increment the count for that facet.

Parameters:
useComplements - whether the complements optimization is being used for current computation.
arrays - provider for facet arrays in use for current computation.
indexReader - index reader in effect.
taxonomy - reader of taxonomy in effect.
Throws:
IOException

createCategoryListIterator

public CategoryListIterator createCategoryListIterator(IndexReader reader,
                                                       TaxonomyReader taxo,
                                                       FacetSearchParams sParams,
                                                       int partition)
                                                throws IOException
Create the category list iterator for the specified partition. If a non null cache is provided which contains the required data, use it for the iteration.

Throws:
IOException

getValueOf

public abstract double getValueOf(FacetArrays arrays,
                                  int idx)
Return the value of a category used for facets computations for this request. For a count request this would be the count for that facet, i.e. an integer number. but for other requests this can be the result of a more complex operation, and the result can be any double precision number. Having this method with a general name value which is double precision allows to have more compact API and code for handling counts and perhaps other requests (such as for associations) very similarly, and by the same code and API, avoiding code duplication.

Parameters:
arrays - provider for facet arrays in use for current computation.
idx - an index into the count arrays now in effect in arrays. E.g., for ordinal number n, with partition, of size partitionSize, now covering n, getValueOf would be invoked with idx being n % partitionSize.

supportsComplements

public boolean supportsComplements()
Indicates whether this facet request is eligible for applying the complements optimization.

requireDocumentScore

public abstract boolean requireDocumentScore()
Indicates whether the results of this request depends on each result document's score

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FacetRequest.ResultMode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.facet.search.params
Enum FacetRequest.ResultMode

java.lang.Object
    extended by  java.lang.Enum<FacetRequest.ResultMode>
        extended by  org.apache.lucene.facet.search.params.FacetRequest.ResultMode
All Implemented Interfaces:
Serializable, Comparable<FacetRequest.ResultMode>
Enclosing class:
FacetRequest
public static enum FacetRequest.ResultMode
extends Enum<FacetRequest.ResultMode>

Result structure manner of applying request's limits such as FacetRequest.getNumLabel() and FacetRequest.getNumResults().

Enum Constant Summary
GLOBAL_FLAT
Limits are applied globally, on total number of results, and the result has a flat structure.
PER_NODE_IN_TREE
Limits are applied per node, and the result has a full tree structure.
Method Summary
static FacetRequest.ResultMode | valueOf(String name) Returns the enum constant of this type with the specified name.
static FacetRequest.ResultMode[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

PER_NODE_IN_TREE

public static final FacetRequest.ResultMode PER_NODE_IN_TREE
Limits are applied per node, and the result has a full tree structure.

GLOBAL_FLAT

public static final FacetRequest.ResultMode GLOBAL_FLAT
Limits are applied globally, on total number of results, and the result has a flat structure.

Method Detail

values

public static final FacetRequest.ResultMode[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(FacetRequest.ResultMode c : FacetRequest.ResultMode.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static FacetRequest.ResultMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


FacetRequest.SortBy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.facet.search.params
Enum FacetRequest.SortBy

java.lang.Object
    extended by  java.lang.Enum<FacetRequest.SortBy>
        extended by  org.apache.lucene.facet.search.params.FacetRequest.SortBy
All Implemented Interfaces:
Serializable, Comparable<FacetRequest.SortBy>
Enclosing class:
FacetRequest
public static enum FacetRequest.SortBy
extends Enum<FacetRequest.SortBy>

Sort options for facet results.

Enum Constant Summary
ORDINAL
sort by category ordinal with the taxonomy
VALUE
sort by computed category value
Method Summary
static FacetRequest.SortBy | valueOf(String name) Returns the enum constant of this type with the specified name.
static FacetRequest.SortBy[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

ORDINAL

public static final FacetRequest.SortBy ORDINAL
sort by category ordinal with the taxonomy

VALUE

public static final FacetRequest.SortBy VALUE
sort by computed category value

Method Detail

values

public static final FacetRequest.SortBy[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(FacetRequest.SortBy c : FacetRequest.SortBy.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static FacetRequest.SortBy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


FacetRequest.SortOrder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.facet.search.params
Enum FacetRequest.SortOrder

java.lang.Object
    extended by  java.lang.Enum<FacetRequest.SortOrder>
        extended by  org.apache.lucene.facet.search.params.FacetRequest.SortOrder
All Implemented Interfaces:
Serializable, Comparable<FacetRequest.SortOrder>
Enclosing class:
FacetRequest
public static enum FacetRequest.SortOrder
extends Enum<FacetRequest.SortOrder>

Requested sort order for the results.

Enum Constant Summary
ASCENDING
DESCENDING
Method Summary
static FacetRequest.SortOrder | valueOf(String name) Returns the enum constant of this type with the specified name.
static FacetRequest.SortOrder[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

ASCENDING

public static final FacetRequest.SortOrder ASCENDING

DESCENDING

public static final FacetRequest.SortOrder DESCENDING
Method Detail

values

public static final FacetRequest.SortOrder[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(FacetRequest.SortOrder c : FacetRequest.SortOrder.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static FacetRequest.SortOrder valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


FacetSearchParams

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.params
Class FacetSearchParams

java.lang.Object
    extended by  org.apache.lucene.facet.search.params.FacetSearchParams

public class FacetSearchParams
extends Object

Faceted search parameters indicate for which facets should info be gathered.

The contained facet requests define for which facets should info be gathered.

Contained faceted indexing parameters provide required info on how to read and interpret the underlying faceted information in the search index.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected List<FacetRequest> | facetRequests
protected FacetIndexingParams | indexingParams
Constructor Summary
FacetSearchParams()
Construct with default faceted indexing parameters.
FacetSearchParams(FacetIndexingParams indexingParams)
Construct with specific faceted indexing parameters.
Method Summary
void | addFacetRequest(FacetRequest facetRequest) Add a facet request to apply for this faceted search.
CategoryListCache | getClCache()
FacetIndexingParams | getFacetIndexingParams() A list of FacetRequest objects, determining what to count.
List<FacetRequest> | getFacetRequests() Parameters which controlled the indexing of facets, and which are also needed during search.
void | setClCache(CategoryListCache clCache) Set Cached Category Lists data to be used in Faceted search.
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

indexingParams

protected final FacetIndexingParams indexingParams

facetRequests

protected final List<FacetRequest> facetRequests
Constructor Detail

FacetSearchParams

public FacetSearchParams(FacetIndexingParams indexingParams)
Construct with specific faceted indexing parameters. It is important to know the indexing parameters so as to e.g. read facets data correctly from the index. addFacetRequest(FacetRequest) must be called at least once for this faceted search to find any faceted result.

Parameters:
indexingParams - Indexing faceted parameters which were used at indexing time.
See Also:
addFacetRequest(FacetRequest)

FacetSearchParams

public FacetSearchParams()
Construct with default faceted indexing parameters. Usage of this constructor is valid only if also during indexing the default faceted indexing parameters were used. addFacetRequest(FacetRequest) must be called at least once for this faceted search to find any faceted result.

See Also:
addFacetRequest(FacetRequest)
Method Detail

getFacetIndexingParams

public final FacetIndexingParams getFacetIndexingParams()
A list of FacetRequest objects, determining what to count. If the returned collection is empty, the faceted search will return no facet results!

getFacetRequests

public final List<FacetRequest> getFacetRequests()
Parameters which controlled the indexing of facets, and which are also needed during search.

addFacetRequest

public void addFacetRequest(FacetRequest facetRequest)
Add a facet request to apply for this faceted search. This method must be called at least once for faceted search to find any faceted result.
NOTE: The order of addition implies the order of the FacetResults

Parameters:
facetRequest - facet request to be added.

toString

public String toString()
Overrides:
toString in class Object

getClCache

public CategoryListCache getClCache()
Returns:
the cldCache in effect

setClCache

public void setClCache(CategoryListCache clCache)
Set Cached Category Lists data to be used in Faceted search.

Parameters:
clCache - the cldCache to set
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.search.params
Classes
CountFacetRequest
FacetRequest
FacetSearchParams
ScoreFacetRequest
Enums
FacetRequest.ResultMode
FacetRequest.SortBy
FacetRequest.SortOrder


org.apache.lucene.facet.search.params

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.search.params

Parameters for Faceted Search

See:
Description

Class Summary
CountFacetRequest | Facet request for counting facets.
FacetRequest | Request to accumulate facet information for a specified facet and possibly also some of its descendants, upto a specified depth.
FacetSearchParams | Faceted search parameters indicate for which facets should info be gathered.
ScoreFacetRequest | Facet request for weighting facets according to document scores.

Enum Summary
FacetRequest.ResultMode | Result structure manner of applying request's limits such as FacetRequest.getNumLabel() and FacetRequest.getNumResults().
FacetRequest.SortBy | Sort options for facet results.
FacetRequest.SortOrder | Requested sort order for the results.

Package org.apache.lucene.facet.search.params Description

Parameters for Faceted Search

Overview Package Class Use Tree Deprecated Index Help


org.apache.lucene.facet.search.params Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.search.params

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.search.params.FacetRequest (implements java.lang.Cloneable)
      • org.apache.lucene.facet.search.params.CountFacetRequest
      • org.apache.lucene.facet.search.params.ScoreFacetRequest
    • org.apache.lucene.facet.search.params.FacetSearchParams

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.facet.search.params.FacetRequest.SortBy
      • org.apache.lucene.facet.search.params.FacetRequest.SortOrder
      • org.apache.lucene.facet.search.params.FacetRequest.ResultMode


Uses of Package org.apache.lucene.facet.search.params

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.search.params

Packages that use org.apache.lucene.facet.search.params
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.search.params.association | Association-based Parameters for Faceted Search.
org.apache.lucene.facet.search.results | Results of Faceted Search
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation
org.apache.lucene.facet.util | Various utilities for faceted search

Classes in org.apache.lucene.facet.search.params used by org.apache.lucene.facet.search
FacetRequest
Request to accumulate facet information for a specified facet and possibly also some of its descendants, upto a specified depth.
FacetSearchParams
Faceted search parameters indicate for which facets should info be gathered.

Classes in org.apache.lucene.facet.search.params used by org.apache.lucene.facet.search.params
FacetRequest
Request to accumulate facet information for a specified facet and possibly also some of its descendants, upto a specified depth.
FacetRequest.ResultMode
Result structure manner of applying request's limits such as FacetRequest.getNumLabel() and FacetRequest.getNumResults().
FacetRequest.SortBy
Sort options for facet results.
FacetRequest.SortOrder
Requested sort order for the results.
FacetSearchParams
Faceted search parameters indicate for which facets should info be gathered.

Classes in org.apache.lucene.facet.search.params used by org.apache.lucene.facet.search.params.association
FacetRequest
Request to accumulate facet information for a specified facet and possibly also some of its descendants, upto a specified depth.

Classes in org.apache.lucene.facet.search.params used by org.apache.lucene.facet.search.results
FacetRequest
Request to accumulate facet information for a specified facet and possibly also some of its descendants, upto a specified depth.

Classes in org.apache.lucene.facet.search.params used by org.apache.lucene.facet.search.sampling
FacetSearchParams
Faceted search parameters indicate for which facets should info be gathered.

Classes in org.apache.lucene.facet.search.params used by org.apache.lucene.facet.util
FacetRequest
Request to accumulate facet information for a specified facet and possibly also some of its descendants, upto a specified depth.
FacetSearchParams
Faceted search parameters indicate for which facets should info be gathered.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ScoreFacetRequest

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.params
Class ScoreFacetRequest

java.lang.Object
    extended by  org.apache.lucene.facet.search.params.FacetRequest
        extended by  org.apache.lucene.facet.search.params.ScoreFacetRequest
All Implemented Interfaces:
Cloneable
public class ScoreFacetRequest
extends FacetRequest

Facet request for weighting facets according to document scores.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.facet.search.params.FacetRequest
FacetRequest.ResultMode, FacetRequest.SortBy, FacetRequest.SortOrder
Field Summary
Fields inherited from class org.apache.lucene.facet.search.params.FacetRequest
DEFAULT_DEPTH, DEFAULT_RESULT_MODE, DEFAULT_SORT_BY
Constructor Summary
ScoreFacetRequest(CategoryPath path, int num)
Create a score facet request for a given node in the taxonomy.
Method Summary
Aggregator | createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy) Create an aggregator for this facet request.
double | getValueOf(FacetArrays arrays, int ordinal) Return the value of a category used for facets computations for this request.
boolean | requireDocumentScore() Indicates whether the results of this request depends on each result document's score
boolean | supportsComplements() Indicates whether this facet request is eligible for applying the complements optimization.
Methods inherited from class org.apache.lucene.facet.search.params.FacetRequest
clone, createCategoryListIterator, createFacetResultsHandler, equals, getCategoryPath, getDepth, getNumLabel, getNumResults, getResultMode, getSortBy, getSortOrder, hashCode, setDepth, setNumLabel, setResultMode, setSortBy, setSortOrder, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ScoreFacetRequest

public ScoreFacetRequest(CategoryPath path,
                         int num)
Create a score facet request for a given node in the taxonomy.

Method Detail

createAggregator

public Aggregator createAggregator(boolean useComplements,
                                   FacetArrays arrays,
                                   IndexReader reader,
                                   TaxonomyReader taxonomy)
Description copied from class: FacetRequest
Create an aggregator for this facet request. Aggregator action depends on request definition. For a count request, it will usually increment the count for that facet.

Specified by:
createAggregator in class FacetRequest
Parameters:
useComplements - whether the complements optimization is being used for current computation.
arrays - provider for facet arrays in use for current computation.
reader - index reader in effect.
taxonomy - reader of taxonomy in effect.

getValueOf

public double getValueOf(FacetArrays arrays,
                         int ordinal)
Description copied from class: FacetRequest
Return the value of a category used for facets computations for this request. For a count request this would be the count for that facet, i.e. an integer number. but for other requests this can be the result of a more complex operation, and the result can be any double precision number. Having this method with a general name value which is double precision allows to have more compact API and code for handling counts and perhaps other requests (such as for associations) very similarly, and by the same code and API, avoiding code duplication.

Specified by:
getValueOf in class FacetRequest
Parameters:
arrays - provider for facet arrays in use for current computation.
ordinal - an index into the count arrays now in effect in arrays. E.g., for ordinal number n, with partition, of size partitionSize, now covering n, getValueOf would be invoked with idx being n % partitionSize.

supportsComplements

public boolean supportsComplements()
Description copied from class: FacetRequest
Indicates whether this facet request is eligible for applying the complements optimization.

Overrides:
supportsComplements in class FacetRequest

requireDocumentScore

public boolean requireDocumentScore()
Description copied from class: FacetRequest
Indicates whether the results of this request depends on each result document's score

Specified by:
requireDocumentScore in class FacetRequest
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AssociationFloatSumFacetRequest

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.params.association
Class AssociationFloatSumFacetRequest

java.lang.Object
    extended by  org.apache.lucene.facet.search.params.FacetRequest
        extended by  org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest
All Implemented Interfaces:
Cloneable
public class AssociationFloatSumFacetRequest
extends FacetRequest

Facet request for weighting facets according to their float association by summing the association values.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.facet.search.params.FacetRequest
FacetRequest.ResultMode, FacetRequest.SortBy, FacetRequest.SortOrder
Field Summary
Fields inherited from class org.apache.lucene.facet.search.params.FacetRequest
DEFAULT_DEPTH, DEFAULT_RESULT_MODE, DEFAULT_SORT_BY
Constructor Summary
AssociationFloatSumFacetRequest(CategoryPath path, int num)
Create a float association facet request for a given node in the taxonomy.
Method Summary
Aggregator | createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy) Create an aggregator for this facet request.
double | getValueOf(FacetArrays arrays, int ordinal) Return the value of a category used for facets computations for this request.
boolean | requireDocumentScore() Indicates whether the results of this request depends on each result document's score
boolean | supportsComplements() Indicates whether this facet request is eligible for applying the complements optimization.
Methods inherited from class org.apache.lucene.facet.search.params.FacetRequest
clone, createCategoryListIterator, createFacetResultsHandler, equals, getCategoryPath, getDepth, getNumLabel, getNumResults, getResultMode, getSortBy, getSortOrder, hashCode, setDepth, setNumLabel, setResultMode, setSortBy, setSortOrder, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

AssociationFloatSumFacetRequest

public AssociationFloatSumFacetRequest(CategoryPath path,
                                       int num)
Create a float association facet request for a given node in the taxonomy.

Method Detail

createAggregator

public Aggregator createAggregator(boolean useComplements,
                                   FacetArrays arrays,
                                   IndexReader reader,
                                   TaxonomyReader taxonomy)
                            throws IOException
Description copied from class: FacetRequest
Create an aggregator for this facet request. Aggregator action depends on request definition. For a count request, it will usually increment the count for that facet.

Specified by:
createAggregator in class FacetRequest
Parameters:
useComplements - whether the complements optimization is being used for current computation.
arrays - provider for facet arrays in use for current computation.
reader - index reader in effect.
taxonomy - reader of taxonomy in effect.
Throws:
IOException

getValueOf

public double getValueOf(FacetArrays arrays,
                         int ordinal)
Description copied from class: FacetRequest
Return the value of a category used for facets computations for this request. For a count request this would be the count for that facet, i.e. an integer number. but for other requests this can be the result of a more complex operation, and the result can be any double precision number. Having this method with a general name value which is double precision allows to have more compact API and code for handling counts and perhaps other requests (such as for associations) very similarly, and by the same code and API, avoiding code duplication.

Specified by:
getValueOf in class FacetRequest
Parameters:
arrays - provider for facet arrays in use for current computation.
ordinal - an index into the count arrays now in effect in arrays. E.g., for ordinal number n, with partition, of size partitionSize, now covering n, getValueOf would be invoked with idx being n % partitionSize.

supportsComplements

public boolean supportsComplements()
Description copied from class: FacetRequest
Indicates whether this facet request is eligible for applying the complements optimization.

Overrides:
supportsComplements in class FacetRequest

requireDocumentScore

public boolean requireDocumentScore()
Description copied from class: FacetRequest
Indicates whether the results of this request depends on each result document's score

Specified by:
requireDocumentScore in class FacetRequest
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AssociationIntSumFacetRequest

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.params.association
Class AssociationIntSumFacetRequest

java.lang.Object
    extended by  org.apache.lucene.facet.search.params.FacetRequest
        extended by  org.apache.lucene.facet.search.params.association.AssociationIntSumFacetRequest
All Implemented Interfaces:
Cloneable
public class AssociationIntSumFacetRequest
extends FacetRequest

Facet request for weighting facets according to their integer association by summing the association values.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.facet.search.params.FacetRequest
FacetRequest.ResultMode, FacetRequest.SortBy, FacetRequest.SortOrder
Field Summary
Fields inherited from class org.apache.lucene.facet.search.params.FacetRequest
DEFAULT_DEPTH, DEFAULT_RESULT_MODE, DEFAULT_SORT_BY
Constructor Summary
AssociationIntSumFacetRequest(CategoryPath path, int num)
Create an integer association facet request for a given node in the taxonomy.
Method Summary
Aggregator | createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy) Create an aggregator for this facet request.
double | getValueOf(FacetArrays arrays, int ordinal) Return the value of a category used for facets computations for this request.
boolean | requireDocumentScore() Indicates whether the results of this request depends on each result document's score
boolean | supportsComplements() Indicates whether this facet request is eligible for applying the complements optimization.
Methods inherited from class org.apache.lucene.facet.search.params.FacetRequest
clone, createCategoryListIterator, createFacetResultsHandler, equals, getCategoryPath, getDepth, getNumLabel, getNumResults, getResultMode, getSortBy, getSortOrder, hashCode, setDepth, setNumLabel, setResultMode, setSortBy, setSortOrder, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

AssociationIntSumFacetRequest

public AssociationIntSumFacetRequest(CategoryPath path,
                                     int num)
Create an integer association facet request for a given node in the taxonomy.

Method Detail

createAggregator

public Aggregator createAggregator(boolean useComplements,
                                   FacetArrays arrays,
                                   IndexReader reader,
                                   TaxonomyReader taxonomy)
                            throws IOException
Description copied from class: FacetRequest
Create an aggregator for this facet request. Aggregator action depends on request definition. For a count request, it will usually increment the count for that facet.

Specified by:
createAggregator in class FacetRequest
Parameters:
useComplements - whether the complements optimization is being used for current computation.
arrays - provider for facet arrays in use for current computation.
reader - index reader in effect.
taxonomy - reader of taxonomy in effect.
Throws:
IOException

getValueOf

public double getValueOf(FacetArrays arrays,
                         int ordinal)
Description copied from class: FacetRequest
Return the value of a category used for facets computations for this request. For a count request this would be the count for that facet, i.e. an integer number. but for other requests this can be the result of a more complex operation, and the result can be any double precision number. Having this method with a general name value which is double precision allows to have more compact API and code for handling counts and perhaps other requests (such as for associations) very similarly, and by the same code and API, avoiding code duplication.

Specified by:
getValueOf in class FacetRequest
Parameters:
arrays - provider for facet arrays in use for current computation.
ordinal - an index into the count arrays now in effect in arrays. E.g., for ordinal number n, with partition, of size partitionSize, now covering n, getValueOf would be invoked with idx being n % partitionSize.

supportsComplements

public boolean supportsComplements()
Description copied from class: FacetRequest
Indicates whether this facet request is eligible for applying the complements optimization.

Overrides:
supportsComplements in class FacetRequest

requireDocumentScore

public boolean requireDocumentScore()
Description copied from class: FacetRequest
Indicates whether the results of this request depends on each result document's score

Specified by:
requireDocumentScore in class FacetRequest
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.search.params.association
Classes
AssociationFloatSumFacetRequest
AssociationIntSumFacetRequest


org.apache.lucene.facet.search.params.association

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.search.params.association

Association-based Parameters for Faceted Search.

See:
Description

Class Summary
AssociationFloatSumFacetRequest | Facet request for weighting facets according to their float association by summing the association values.
AssociationIntSumFacetRequest | Facet request for weighting facets according to their integer association by summing the association values.

Package org.apache.lucene.facet.search.params.association Description

Association-based Parameters for Faceted Search.


org.apache.lucene.facet.search.params.association Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.search.params.association

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.search.params.FacetRequest (implements java.lang.Cloneable)
      • org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest
      • org.apache.lucene.facet.search.params.association.AssociationIntSumFacetRequest


Uses of Package org.apache.lucene.facet.search.params.association

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.search.params.association

No usage of org.apache.lucene.facet.search.params.association

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest

No usage of org.apache.lucene.facet.search.params.association.AssociationFloatSumFacetRequest

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.params.association.AssociationIntSumFacetRequest

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.params.association.AssociationIntSumFacetRequest

No usage of org.apache.lucene.facet.search.params.association.AssociationIntSumFacetRequest

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.params.CountFacetRequest

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.params.CountFacetRequest

No usage of org.apache.lucene.facet.search.params.CountFacetRequest

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.params.FacetRequest

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.params.FacetRequest

Packages that use FacetRequest
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.search.params.association | Association-based Parameters for Faceted Search.
org.apache.lucene.facet.search.results | Results of Faceted Search
org.apache.lucene.facet.util | Various utilities for faceted search

Uses of FacetRequest in org.apache.lucene.facet.search

Fields in org.apache.lucene.facet.search declared as FacetRequest
protected  FacetRequest FacetResultsHandler.facetRequest
Facet request served by this handler.

Methods in org.apache.lucene.facet.search that return FacetRequest
FacetRequest | TopKInEachNodeHandler.IntermediateFacetResultWithHash.getFacetRequest()
FacetRequest | FacetResultsHandler.getFacetRequest() Return the facet request served by this handler.

Constructors in org.apache.lucene.facet.search with parameters of type FacetRequest
FacetResultsHandler(TaxonomyReader taxonomyReader, FacetRequest facetRequest)
Create a faceted search handler.
TopKFacetResultsHandler(TaxonomyReader taxonomyReader, FacetRequest facetRequest)
Construct top-K results handler.
TopKInEachNodeHandler.IntermediateFacetResultWithHash(FacetRequest facetReq, IntToObjectMap<org.apache.lucene.facet.search.TopKInEachNodeHandler.AACO> mapToAACOs)
TopKInEachNodeHandler(TaxonomyReader taxonomyReader, FacetRequest facetRequest)

Uses of FacetRequest in org.apache.lucene.facet.search.params

Subclasses of FacetRequest in org.apache.lucene.facet.search.params
class | CountFacetRequest Facet request for counting facets.
class | ScoreFacetRequest Facet request for weighting facets according to document scores.

Fields in org.apache.lucene.facet.search.params with type parameters of type FacetRequest
protected  List<FacetRequest> FacetSearchParams.facetRequests

Methods in org.apache.lucene.facet.search.params that return types with arguments of type FacetRequest
 List<FacetRequest> FacetSearchParams.getFacetRequests()
Parameters which controlled the indexing of facets, and which are also needed during search.

Methods in org.apache.lucene.facet.search.params with parameters of type FacetRequest
 void FacetSearchParams.addFacetRequest(FacetRequest facetRequest)
Add a facet request to apply for this faceted search.

Uses of FacetRequest in org.apache.lucene.facet.search.params.association

Subclasses of FacetRequest in org.apache.lucene.facet.search.params.association
class | AssociationFloatSumFacetRequest Facet request for weighting facets according to their float association by summing the association values.
class | AssociationIntSumFacetRequest Facet request for weighting facets according to their integer association by summing the association values.

Uses of FacetRequest in org.apache.lucene.facet.search.results

Methods in org.apache.lucene.facet.search.results that return FacetRequest
FacetRequest | FacetResult.getFacetRequest() Request for which this result was obtained.
FacetRequest | IntermediateFacetResult.getFacetRequest() Facet request for which this temporary result was created.

Constructors in org.apache.lucene.facet.search.results with parameters of type FacetRequest
FacetResult(FacetRequest facetRequest, FacetResultNode rootNode, int numValidDescendants)

Uses of FacetRequest in org.apache.lucene.facet.util

Methods in org.apache.lucene.facet.util with parameters of type FacetRequest
static Heap<FacetResultNode> ResultSortUtils.createSuitableHeap(FacetRequest facetRequest)
Create a suitable heap according to facet request being served.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.params.FacetRequest.ResultMode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.params.FacetRequest.ResultMode

Packages that use FacetRequest.ResultMode
org.apache.lucene.facet.search.params Parameters for Faceted Search

Uses of FacetRequest.ResultMode in org.apache.lucene.facet.search.params

Fields in org.apache.lucene.facet.search.params declared as FacetRequest.ResultMode
static FacetRequest.ResultMode FacetRequest.DEFAULT_RESULT_MODE
Default result mode

Methods in org.apache.lucene.facet.search.params that return FacetRequest.ResultMode
FacetRequest.ResultMode | FacetRequest.getResultMode() Return the requested result mode.
static FacetRequest.ResultMode | FacetRequest.ResultMode.valueOf(String name) Returns the enum constant of this type with the specified name.
static FacetRequest.ResultMode[] | FacetRequest.ResultMode.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.facet.search.params with parameters of type FacetRequest.ResultMode
 void FacetRequest.setResultMode(FacetRequest.ResultMode resultMode)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.params.FacetRequest.SortBy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.params.FacetRequest.SortBy

Packages that use FacetRequest.SortBy
org.apache.lucene.facet.search.params Parameters for Faceted Search

Uses of FacetRequest.SortBy in org.apache.lucene.facet.search.params

Fields in org.apache.lucene.facet.search.params declared as FacetRequest.SortBy
static FacetRequest.SortBy FacetRequest.DEFAULT_SORT_BY
Default sort mode.

Methods in org.apache.lucene.facet.search.params that return FacetRequest.SortBy
FacetRequest.SortBy | FacetRequest.getSortBy() Specify how should results be sorted.
static FacetRequest.SortBy | FacetRequest.SortBy.valueOf(String name) Returns the enum constant of this type with the specified name.
static FacetRequest.SortBy[] | FacetRequest.SortBy.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.facet.search.params with parameters of type FacetRequest.SortBy
 void FacetRequest.setSortBy(FacetRequest.SortBy sortBy)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.params.FacetRequest.SortOrder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.params.FacetRequest.SortOrder

Packages that use FacetRequest.SortOrder
org.apache.lucene.facet.search.params Parameters for Faceted Search

Uses of FacetRequest.SortOrder in org.apache.lucene.facet.search.params

Methods in org.apache.lucene.facet.search.params that return FacetRequest.SortOrder
FacetRequest.SortOrder | FacetRequest.getSortOrder() Return the requested order of results.
static FacetRequest.SortOrder | FacetRequest.SortOrder.valueOf(String name) Returns the enum constant of this type with the specified name.
static FacetRequest.SortOrder[] | FacetRequest.SortOrder.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.facet.search.params with parameters of type FacetRequest.SortOrder
 void FacetRequest.setSortOrder(FacetRequest.SortOrder sortOrder)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.params.FacetSearchParams

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.params.FacetSearchParams

Packages that use FacetSearchParams
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation
org.apache.lucene.facet.util | Various utilities for faceted search

Uses of FacetSearchParams in org.apache.lucene.facet.search

Fields in org.apache.lucene.facet.search declared as FacetSearchParams
protected  FacetSearchParams FacetsAccumulator.searchParams

Methods in org.apache.lucene.facet.search with parameters of type FacetSearchParams
protected FacetsAccumulator | FacetsCollector.initFacetsAccumulator(FacetSearchParams facetSearchParams, IndexReader indexReader, TaxonomyReader taxonomyReader) Create the FacetsAccumulator to be used.
protected ScoredDocIdCollector | FacetsCollector.initScoredDocCollector(FacetSearchParams facetSearchParams, IndexReader indexReader, TaxonomyReader taxonomyReader) Create a ScoredDocIdCollector to be used as the first phase of the facet collection.
static Query | DrillDown.query(FacetSearchParams sParams, CategoryPath... paths) Return a query for drilling down into all given categories (AND).
static Query | DrillDown.query(FacetSearchParams sParams, Query baseQuery, CategoryPath... paths) Turn a base query into a drilling-down query for all given category paths (AND).
static Term | DrillDown.term(FacetSearchParams sParams, CategoryPath path)

Constructors in org.apache.lucene.facet.search with parameters of type FacetSearchParams
AdaptiveFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Create an AdaptiveFacetsAccumulator
AdaptiveFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Create an AdaptiveFacetsAccumulator
FacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
FacetsCollector(FacetSearchParams facetSearchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Create a collector for accumulating facets while collecting documents during search.
StandardFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
StandardFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)

Uses of FacetSearchParams in org.apache.lucene.facet.search.params

Methods in org.apache.lucene.facet.search.params with parameters of type FacetSearchParams
 CategoryListIterator FacetRequest.createCategoryListIterator(IndexReader reader, TaxonomyReader taxo, FacetSearchParams sParams, int partition)
Create the category list iterator for the specified partition.

Uses of FacetSearchParams in org.apache.lucene.facet.search.sampling

Methods in org.apache.lucene.facet.search.sampling that return FacetSearchParams
 FacetSearchParams Sampler.overSampledSearchParams(FacetSearchParams original)
Over-sampled search params, wrapping each request with an over-sampled one.

Methods in org.apache.lucene.facet.search.sampling with parameters of type FacetSearchParams
SampleFixer | Sampler.getSampleFixer(IndexReader indexReader, TaxonomyReader taxonomyReader, FacetSearchParams searchParams) Get a fixer of sample facet accumulation results.
FacetSearchParams | Sampler.overSampledSearchParams(FacetSearchParams original) Over-sampled search params, wrapping each request with an over-sampled one.

Constructors in org.apache.lucene.facet.search.sampling with parameters of type FacetSearchParams
SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Constructor...
SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Constructor...

Uses of FacetSearchParams in org.apache.lucene.facet.util

Methods in org.apache.lucene.facet.util with parameters of type FacetSearchParams
static int | PartitionsUtils.partitionNumber(FacetSearchParams sParams, int ordinal)
static int | PartitionsUtils.partitionOffset(FacetSearchParams sParams, int partitionNumber, TaxonomyReader taxonomyReader)
static int | PartitionsUtils.partitionSize(FacetSearchParams sParams, TaxonomyReader taxonomyReader)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.params.ScoreFacetRequest

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.params.ScoreFacetRequest

No usage of org.apache.lucene.facet.search.params.ScoreFacetRequest

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


FacetResult

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.results
Class FacetResult

java.lang.Object
    extended by  org.apache.lucene.facet.search.results.FacetResult

public class FacetResult
extends Object

Result of faceted search.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
FacetResult(FacetRequest facetRequest, FacetResultNode rootNode, int numValidDescendants)
Method Summary
FacetRequest | getFacetRequest() Request for which this result was obtained.
FacetResultNode | getFacetResultNode() Facet result node matching the root of the facet request.
int | getNumValidDescendants() Number of descendants of root facet result node, up till the requested depth, which are valid by the results handler in effect.
String | toString()
String | toString(String prefix) String representation of this facet result.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FacetResult

public FacetResult(FacetRequest facetRequest,
                   FacetResultNode rootNode,
                   int numValidDescendants)
Method Detail

getFacetResultNode

public final FacetResultNode getFacetResultNode()
Facet result node matching the root of the facet request.

See Also:
getFacetRequest(), FacetRequest.getCategoryPath()

getNumValidDescendants

public final int getNumValidDescendants()
Number of descendants of root facet result node, up till the requested depth, which are valid by the results handler in effect. Typically -- have value != 0. This number does not include the root node.

See Also:
getFacetRequest(), FacetRequest.getDepth()

getFacetRequest

public final FacetRequest getFacetRequest()
Request for which this result was obtained.

toString

public String toString(String prefix)
String representation of this facet result. Use with caution: might return a very long string.

Parameters:
prefix - prefix for each result line
See Also:
toString()

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


FacetResultNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.results
Interface FacetResultNode

All Known Implementing Classes:
MutableFacetResultNode
public interface FacetResultNode

Result of faceted search for a certain taxonomy node.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
CategoryPath | getLabel() Category path of the category of this result, or null if not computed, because the application did not request to compute it.
CategoryPath | getLabel(TaxonomyReader taxonomyReader) Category path of the category of this result.
int | getNumSubResults() Number of sub results
int | getOrdinal() Ordinal of the category of this result.
double | getResidue() Value of screened out sub results.
Iterable<? extends FacetResultNode> | getSubResults() Contained sub results.
double | getValue() Value of this result - usually either count or a value derived from some computing on the association of it.
void | setValue(double value) Expert: Set a new value for this result node.
String | toString(String prefix) String representation of this facet result node.

Method Detail

toString

String toString(String prefix)
String representation of this facet result node. Use with caution: might return a very long string.

Parameters:
prefix - prefix for each result line

getOrdinal

int getOrdinal()
Ordinal of the category of this result.

getLabel

CategoryPath getLabel()
Category path of the category of this result, or null if not computed, because the application did not request to compute it. To force computing the label in case not yet computed use getLabel(TaxonomyReader).

See Also:
FacetRequest.getNumLabel(), getLabel(TaxonomyReader)

getLabel

CategoryPath getLabel(TaxonomyReader taxonomyReader)
                      throws IOException
Category path of the category of this result. If not already computed, will be computed now.

Use with caution: loading a label for results is costly, performance wise. Therefore force labels loading only when really needed.

Parameters:
taxonomyReader - taxonomy reader for forcing (lazy) labeling of this result.
Throws:
IOException - on error
See Also:
FacetRequest.getNumLabel()

getValue

double getValue()
Value of this result - usually either count or a value derived from some computing on the association of it.

getResidue

double getResidue()
Value of screened out sub results.

If only part of valid results are returned, e.g. because top K were requested, provide info on "what else is there under this result node".

getSubResults

Iterable<? extends FacetResultNode> getSubResults()
Contained sub results. These are either child facets, if a tree result was requested, or simply descendants, in case tree result was not requested. In the first case, all returned are both descendants of this node in the taxonomy and siblings of each other in the taxonomy. In the latter case they are only guaranteed to be descendants of this node in the taxonomy.

getNumSubResults

int getNumSubResults()
Number of sub results

setValue

void setValue(double value)
Expert: Set a new value for this result node.

Allows to modify the value of this facet node. Used for example to tune a sampled value, e.g. by SampleFixer.fixResult(org.apache.lucene.facet.search.ScoredDocIDs, FacetResult)

Parameters:
value - the new value to set
See Also:
getValue(), FacetResultsHandler.rearrangeFacetResult(FacetResult)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntermediateFacetResult

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.results
Interface IntermediateFacetResult

All Known Implementing Classes:
TopKInEachNodeHandler.IntermediateFacetResultWithHash
public interface IntermediateFacetResult

Intermediate FacetResult of faceted search.

This is an empty interface on purpose.

It allows FacetResultsHandler to return intermediate result objects that only it knows how to interpret, and so the handler has maximal freedom in defining what an intermediate result is, depending on its specific logic.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 FacetRequest getFacetRequest()
Facet request for which this temporary result was created.

Method Detail

getFacetRequest

FacetRequest getFacetRequest()
Facet request for which this temporary result was created.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MutableFacetResultNode

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.results
Class MutableFacetResultNode

java.lang.Object
    extended by  org.apache.lucene.facet.search.results.MutableFacetResultNode
All Implemented Interfaces:
FacetResultNode
public class MutableFacetResultNode
extends Object
implements FacetResultNode

Mutable implementation for Result of faceted search for a certain taxonomy node.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
MutableFacetResultNode(FacetResultNode other, boolean takeSubResults)
Create a mutable facet result node from another result node
MutableFacetResultNode(int ordinal, double value)
Create a Facet Result Node.
MutableFacetResultNode(int ordinal, double value, double residue, CategoryPath label, List<FacetResultNode> subResults)
Create a Facet Result Node.
Method Summary
void | appendSubResult(FacetResultNode subRes) Append a sub result (as last).
CategoryPath | getLabel() Category path of the category of this result, or null if not computed, because the application did not request to compute it.
CategoryPath | getLabel(TaxonomyReader taxonomyReader) Category path of the category of this result.
int | getNumSubResults() Number of sub results
int | getOrdinal() Ordinal of the category of this result.
double | getResidue() Value of screened out sub results.
Iterable<? extends FacetResultNode> | getSubResults() Contained sub results.
double | getValue() Value of this result - usually either count or a value derived from some computing on the association of it.
void | increaseResidue(double addedResidue) increase the residue for this result.
void | increaseValue(double addedValue) increase the value for this result.
void | insertSubResult(FacetResultNode subRes) Insert sub result (as first).
void | reset(int ordinal, double value) Reset a facet Result Node.
void | setLabel(CategoryPath label) Set the label of the category of this result.
void | setResidue(double residue) Set the residue.
void | setSubResults(List<FacetResultNode> subResults) Set the sub results.
void | setValue(double value) Set the value of this result.
static MutableFacetResultNode | toImpl(FacetResultNode frn) Internal utility: turn a result node into an implementation class with richer API that allows modifying it.
String | toString()
String | toString(String prefix) String representation of this facet result node.
void | trimSubResults(int size) Trim sub results to a given size.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MutableFacetResultNode

public MutableFacetResultNode(int ordinal,
                              double value)
Create a Facet Result Node.

Parameters:
ordinal - ordinal in the taxonomy of the category of this result.
value - value this result.

MutableFacetResultNode

public MutableFacetResultNode(int ordinal,
                              double value,
                              double residue,
                              CategoryPath label,
                              List<FacetResultNode> subResults)
Create a Facet Result Node.

Parameters:
ordinal - ordinal in the taxonomy of the category of this result.
value - value of this result.
residue - Value of screened out sub results.
label - label of the category path of this result.
subResults - - sub results, usually descendants, sometimes child results, of this result - depending on the request.

MutableFacetResultNode

public MutableFacetResultNode(FacetResultNode other,
                              boolean takeSubResults)
Create a mutable facet result node from another result node

Parameters:
other - other result node to copy from
takeSubResults - set to true to take also sub results of other node
Method Detail

reset

public void reset(int ordinal,
                  double value)
Reset a facet Result Node.

Used at the population of facet results, not intended for regular use by applications.

Parameters:
ordinal - ordinal in the taxonomy of the category of this result.
value - value of this result.

toString

public String toString()
Overrides:
toString in class Object

toString

public String toString(String prefix)
Description copied from interface: FacetResultNode
String representation of this facet result node. Use with caution: might return a very long string.

Specified by:
toString in interface FacetResultNode
Parameters:
prefix - prefix for each result line

getOrdinal

public final int getOrdinal()
Description copied from interface: FacetResultNode
Ordinal of the category of this result.

Specified by:
getOrdinal in interface FacetResultNode

getLabel

public final CategoryPath getLabel()
Description copied from interface: FacetResultNode
Category path of the category of this result, or null if not computed, because the application did not request to compute it. To force computing the label in case not yet computed use FacetResultNode.getLabel(TaxonomyReader).

Specified by:
getLabel in interface FacetResultNode
See Also:
FacetRequest.getNumLabel(), FacetResultNode.getLabel(TaxonomyReader)

setLabel

public void setLabel(CategoryPath label)
Set the label of the category of this result.

Parameters:
label - the label to set.
See Also:
getLabel()

getValue

public final double getValue()
Description copied from interface: FacetResultNode
Value of this result - usually either count or a value derived from some computing on the association of it.

Specified by:
getValue in interface FacetResultNode

setValue

public void setValue(double value)
Set the value of this result.

Specified by:
setValue in interface FacetResultNode
Parameters:
value - the value to set
See Also:
getValue()

increaseValue

public void increaseValue(double addedValue)
increase the value for this result.

Parameters:
addedValue - the value to add
See Also:
getValue()

getResidue

public final double getResidue()
Description copied from interface: FacetResultNode
Value of screened out sub results.

If only part of valid results are returned, e.g. because top K were requested, provide info on "what else is there under this result node".

Specified by:
getResidue in interface FacetResultNode

setResidue

public void setResidue(double residue)
Set the residue.

Parameters:
residue - the residue to set
See Also:
getResidue()

increaseResidue

public void increaseResidue(double addedResidue)
increase the residue for this result.

Parameters:
addedResidue - the residue to add
See Also:
getResidue()

getSubResults

public final Iterable<? extends FacetResultNode> getSubResults()
Description copied from interface: FacetResultNode
Contained sub results. These are either child facets, if a tree result was requested, or simply descendants, in case tree result was not requested. In the first case, all returned are both descendants of this node in the taxonomy and siblings of each other in the taxonomy. In the latter case they are only guaranteed to be descendants of this node in the taxonomy.

Specified by:
getSubResults in interface FacetResultNode

trimSubResults

public void trimSubResults(int size)
Trim sub results to a given size.

Note: Although the getResidue() is not guaranteed to be accurate, it is worth fixing it, as possible, by taking under account the trimmed sub-nodes.

setSubResults

public void setSubResults(List<FacetResultNode> subResults)
Set the sub results.

Parameters:
subResults - the sub-results to set

appendSubResult

public void appendSubResult(FacetResultNode subRes)
Append a sub result (as last).

Parameters:
subRes - sub-result to be appended

insertSubResult

public void insertSubResult(FacetResultNode subRes)
Insert sub result (as first).

Parameters:
subRes - sub-result to be inserted

getLabel

public final CategoryPath getLabel(TaxonomyReader taxonomyReader)
                            throws IOException
Description copied from interface: FacetResultNode
Category path of the category of this result. If not already computed, will be computed now.

Use with caution: loading a label for results is costly, performance wise. Therefore force labels loading only when really needed.

Specified by:
getLabel in interface FacetResultNode
Parameters:
taxonomyReader - taxonomy reader for forcing (lazy) labeling of this result.
Throws:
IOException - on error
See Also:
FacetRequest.getNumLabel()

getNumSubResults

public final int getNumSubResults()
Description copied from interface: FacetResultNode
Number of sub results

Specified by:
getNumSubResults in interface FacetResultNode

toImpl

public static MutableFacetResultNode toImpl(FacetResultNode frn)
Internal utility: turn a result node into an implementation class with richer API that allows modifying it.

In case that input result node is already of an implementation class only casting is done, but in any case we pay the price of checking "instance of".

Parameters:
frn - facet result node to be turned into an implementation class object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.search.results
Interfaces
FacetResultNode
IntermediateFacetResult
Classes
FacetResult
MutableFacetResultNode


org.apache.lucene.facet.search.results

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.search.results

Results of Faceted Search

See:
Description

Interface Summary
FacetResultNode | Result of faceted search for a certain taxonomy node.
IntermediateFacetResult | Intermediate FacetResult of faceted search.

Class Summary
FacetResult | Result of faceted search.
MutableFacetResultNode | Mutable implementation for Result of faceted search for a certain taxonomy node.

Package org.apache.lucene.facet.search.results Description

Results of Faceted Search

Overview Package Class Use Tree Deprecated Index Help


org.apache.lucene.facet.search.results Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.search.results

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.search.results.FacetResult
    • org.apache.lucene.facet.search.results.MutableFacetResultNode (implements org.apache.lucene.facet.search.results.FacetResultNode)

Interface Hierarchy

  • org.apache.lucene.facet.search.results.FacetResultNode
  • org.apache.lucene.facet.search.results.IntermediateFacetResult


Uses of Package org.apache.lucene.facet.search.results

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.search.results

Packages that use org.apache.lucene.facet.search.results
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.results | Results of Faceted Search
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation
org.apache.lucene.facet.util | Various utilities for faceted search

Classes in org.apache.lucene.facet.search.results used by org.apache.lucene.facet.search
FacetResult
Result of faceted search.
IntermediateFacetResult
Intermediate FacetResult of faceted search.

Classes in org.apache.lucene.facet.search.results used by org.apache.lucene.facet.search.results
FacetResultNode
Result of faceted search for a certain taxonomy node.
MutableFacetResultNode
Mutable implementation for Result of faceted search for a certain taxonomy node.

Classes in org.apache.lucene.facet.search.results used by org.apache.lucene.facet.search.sampling
FacetResult
Result of faceted search.

Classes in org.apache.lucene.facet.search.results used by org.apache.lucene.facet.util
FacetResultNode
Result of faceted search for a certain taxonomy node.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.results.FacetResult

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.results.FacetResult

Packages that use FacetResult
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation

Uses of FacetResult in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search that return FacetResult
FacetResult | TopKInEachNodeHandler.rearrangeFacetResult(FacetResult facetResult)
FacetResult | TopKFacetResultsHandler.rearrangeFacetResult(FacetResult facetResult)
abstract FacetResult | FacetResultsHandler.rearrangeFacetResult(FacetResult facetResult) Perform any rearrangement as required on a facet result that has changed after it was rendered.
FacetResult | TopKInEachNodeHandler.renderFacetResult(IntermediateFacetResult tmpResult)
FacetResult | TopKFacetResultsHandler.renderFacetResult(IntermediateFacetResult tmpResult)
abstract FacetResult | FacetResultsHandler.renderFacetResult(IntermediateFacetResult tmpResult) Create a facet result from the temporary result.

Methods in org.apache.lucene.facet.search that return types with arguments of type FacetResult
List<FacetResult> | AdaptiveFacetsAccumulator.accumulate(ScoredDocIDs docids)
List<FacetResult> | SamplingWrapper.accumulate(ScoredDocIDs docids)
abstract List<FacetResult> | FacetsAccumulator.accumulate(ScoredDocIDs docids) Accumulate facets over given documents, according to facet requests in effect.
List<FacetResult> | StandardFacetsAccumulator.accumulate(ScoredDocIDs docids)
List<FacetResult> | FacetsCollector.getFacetResults() Return accumulated facets results (according to faceted search parameters) for collected documents.

Methods in org.apache.lucene.facet.search with parameters of type FacetResult
 void TopKInEachNodeHandler.labelResult(FacetResult facetResult)
 void TopKFacetResultsHandler.labelResult(FacetResult facetResult)
abstract  void FacetResultsHandler.labelResult(FacetResult facetResult)
Label results according to settings in FacetRequest, such as FacetRequest.getNumLabel().
 FacetResult TopKInEachNodeHandler.rearrangeFacetResult(FacetResult facetResult)
 FacetResult TopKFacetResultsHandler.rearrangeFacetResult(FacetResult facetResult)
abstract  FacetResult FacetResultsHandler.rearrangeFacetResult(FacetResult facetResult)
Perform any rearrangement as required on a facet result that has changed after it was rendered.

Uses of FacetResult in org.apache.lucene.facet.search.sampling

Methods in org.apache.lucene.facet.search.sampling that return FacetResult
 FacetResult Sampler.trimResult(FacetResult facetResult)
Trim the input facet result.
Note: It is only valid to call this method with result obtained for a facet request created through Sampler.overSampledSearchParams(FacetSearchParams).

Methods in org.apache.lucene.facet.search.sampling that return types with arguments of type FacetResult
 List<FacetResult> SamplingAccumulator.accumulate(ScoredDocIDs docids)

Methods in org.apache.lucene.facet.search.sampling with parameters of type FacetResult
 void SampleFixer.fixResult(ScoredDocIDs origDocIds, FacetResult fres)
Alter the input result, fixing it to account for the sampling.
 FacetResult Sampler.trimResult(FacetResult facetResult)
Trim the input facet result.
Note: It is only valid to call this method with result obtained for a facet request created through Sampler.overSampledSearchParams(FacetSearchParams).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.search.results.FacetResultNode

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.search.results.FacetResultNode

Packages that use FacetResultNode
org.apache.lucene.facet.search.results | Results of Faceted Search
org.apache.lucene.facet.util | Various utilities for faceted search

Uses of FacetResultNode in org.apache.lucene.facet.search.results

Classes in org.apache.lucene.facet.search.results that implement FacetResultNode
 class MutableFacetResultNode
Mutable implementation for Result of faceted search for a certain taxonomy node.

Methods in org.apache.lucene.facet.search.results that return FacetResultNode
 FacetResultNode FacetResult.getFacetResultNode()
Facet result node matching the root of the facet request.

Methods in org.apache.lucene.facet.search.results that return types with arguments of type FacetResultNode
Iterable<? extends FacetResultNode> | FacetResultNode.getSubResults() Contained sub results.
Iterable<? extends FacetResultNode> | MutableFacetResultNode.getSubResults()

Methods in org.apache.lucene.facet.search.results with parameters of type FacetResultNode
void | MutableFacetResultNode.appendSubResult(FacetResultNode subRes) Append a sub result (as last).
void | MutableFacetResultNode.insertSubResult(FacetResultNode subRes) Insert sub result (as first).
static MutableFacetResultNode | MutableFacetResultNode.toImpl(FacetResultNode frn) Internal utility: turn a result node into an implementation class with richer API that allows modifying it.

Method parameters in org.apache.lucene.facet.search.results with type arguments of type FacetResultNode
 void MutableFacetResultNode.setSubResults(List<FacetResultNode> subResults)
Set the sub results.

Constructors in org.apache.lucene.facet.search.results with parameters of type FacetResultNode
FacetResult(FacetRequest facetRequest, FacetResultNode rootNode, int numValidDescendants)
MutableFacetResultNode(FacetResultNode other, boolean takeSubResults)
Create a mutable facet result node from another result node

Constructor parameters in org.apache.lucene.facet.search.results with type arguments of type FacetResultNode
MutableFacetResultNode(int ordinal, double value, double residue, CategoryPath label, List<FacetResultNode> subResults)
Create a Facet Result Node.

Uses of FacetResultNode in org.apache.lucene.facet.util

Methods in org.apache.lucene.facet.util that return types with arguments of type FacetResultNode
static Heap<FacetResultNode> ResultSortUtils.createSuitableHeap(FacetRequest facetRequest)
Create a suitable heap according to facet request being served.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.search.results.IntermediateFacetResult

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.search.results.IntermediateFacetResult

Packages that use IntermediateFacetResult
org.apache.lucene.facet.search Faceted Search API

Uses of IntermediateFacetResult in org.apache.lucene.facet.search

Classes in org.apache.lucene.facet.search that implement IntermediateFacetResult
static class TopKInEachNodeHandler.IntermediateFacetResultWithHash
Intermediate result to hold counts from one or more partitions processed thus far.

Methods in org.apache.lucene.facet.search that return IntermediateFacetResult
IntermediateFacetResult | TopKInEachNodeHandler.fetchPartitionResult(FacetArrays arrays, int offset) Recursively explore all facets that can be potentially included in the FacetResult to be generated, and that belong to the given partition, so that values can be examined and collected.
IntermediateFacetResult | TopKFacetResultsHandler.fetchPartitionResult(FacetArrays facetArrays, int offset)
abstract IntermediateFacetResult | FacetResultsHandler.fetchPartitionResult(FacetArrays arrays, int offset) Fetch results of a single partition, given facet arrays for that partition, and based on the matching documents and faceted search parameters.
IntermediateFacetResult | TopKInEachNodeHandler.mergeResults(IntermediateFacetResult... tmpResults) Merge several partitions' IntermediateFacetResult-s into one of the same format
IntermediateFacetResult | TopKFacetResultsHandler.mergeResults(IntermediateFacetResult... tmpResults)
abstract IntermediateFacetResult | FacetResultsHandler.mergeResults(IntermediateFacetResult... tmpResults) Merge results of several facet partitions.

Methods in org.apache.lucene.facet.search with parameters of type IntermediateFacetResult
IntermediateFacetResult | TopKInEachNodeHandler.mergeResults(IntermediateFacetResult... tmpResults) Merge several partitions' IntermediateFacetResult-s into one of the same format
IntermediateFacetResult | TopKFacetResultsHandler.mergeResults(IntermediateFacetResult... tmpResults)
abstract IntermediateFacetResult | FacetResultsHandler.mergeResults(IntermediateFacetResult... tmpResults) Merge results of several facet partitions.
FacetResult | TopKInEachNodeHandler.renderFacetResult(IntermediateFacetResult tmpResult)
FacetResult | TopKFacetResultsHandler.renderFacetResult(IntermediateFacetResult tmpResult)
abstract FacetResult | FacetResultsHandler.renderFacetResult(IntermediateFacetResult tmpResult) Create a facet result from the temporary result.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.results.MutableFacetResultNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.results.MutableFacetResultNode

Packages that use MutableFacetResultNode
org.apache.lucene.facet.search.results Results of Faceted Search

Uses of MutableFacetResultNode in org.apache.lucene.facet.search.results

Methods in org.apache.lucene.facet.search.results that return MutableFacetResultNode
static MutableFacetResultNode MutableFacetResultNode.toImpl(FacetResultNode frn)
Internal utility: turn a result node into an implementation class with richer API that allows modifying it.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.facet.search.sampling
Interfaces
SampleFixer
Classes
RandomSampler
RepeatableSampler
Sampler
Sampler.SampleResult
SamplingAccumulator
SamplingParams


org.apache.lucene.facet.search.sampling

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.search.sampling

Sampling for facets accumulation

See:
Description

Interface Summary
SampleFixer Fixer of sample facet accumulation results

Class Summary
RandomSampler | Simple random sampler
RepeatableSampler | Take random samples of large collections.
Sampler | Sampling definition for facets accumulation
Sampler.SampleResult | Result of sample computation
SamplingAccumulator | Facets accumulation with sampling.
SamplingParams | Parameters for sampling, dictating whether sampling is to take place and how.

Package org.apache.lucene.facet.search.sampling Description

Sampling for facets accumulation

Overview Package Class Use Tree Deprecated Index Help


org.apache.lucene.facet.search.sampling Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.search.sampling

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.search.FacetsAccumulator
      • org.apache.lucene.facet.search.StandardFacetsAccumulator
        • org.apache.lucene.facet.search.sampling.SamplingAccumulator
    • org.apache.lucene.facet.search.sampling.Sampler
      • org.apache.lucene.facet.search.sampling.RandomSampler
      • org.apache.lucene.facet.search.sampling.RepeatableSampler
    • org.apache.lucene.facet.search.sampling.Sampler.SampleResult
    • org.apache.lucene.facet.search.sampling.SamplingParams

Interface Hierarchy

  • org.apache.lucene.facet.search.sampling.SampleFixer


Uses of Package org.apache.lucene.facet.search.sampling

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.search.sampling

Packages that use org.apache.lucene.facet.search.sampling
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation

Classes in org.apache.lucene.facet.search.sampling used by org.apache.lucene.facet.search
Sampler
Sampling definition for facets accumulation

Classes in org.apache.lucene.facet.search.sampling used by org.apache.lucene.facet.search.sampling
SampleFixer
Fixer of sample facet accumulation results
Sampler
Sampling definition for facets accumulation
Sampler.SampleResult
Result of sample computation
SamplingParams
Parameters for sampling, dictating whether sampling is to take place and how.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


RandomSampler

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.sampling
Class RandomSampler

java.lang.Object
    extended by  org.apache.lucene.facet.search.sampling.Sampler
        extended by  org.apache.lucene.facet.search.sampling.RandomSampler

public class RandomSampler
extends Sampler

Simple random sampler

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.facet.search.sampling.Sampler
Sampler.SampleResult
Field Summary
Fields inherited from class org.apache.lucene.facet.search.sampling.Sampler
samplingParams
Constructor Summary
RandomSampler()
RandomSampler(SamplingParams params, Random random)
Method Summary
protected  Sampler.SampleResult createSample(ScoredDocIDs docids, int actualSize, int sampleSetSize)
Create and return a sample of the input set
Methods inherited from class org.apache.lucene.facet.search.sampling.Sampler
getSampleFixer, getSampleSet, getSamplingParams, overSampledSearchParams, shouldSample, trimResult
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RandomSampler

public RandomSampler()

RandomSampler

public RandomSampler(SamplingParams params,
                     Random random)
              throws IllegalArgumentException
Throws:
IllegalArgumentException
Method Detail

createSample

protected Sampler.SampleResult createSample(ScoredDocIDs docids,
                                            int actualSize,
                                            int sampleSetSize)
                                     throws IOException
Description copied from class: Sampler
Create and return a sample of the input set

Specified by:
createSample in class Sampler
Parameters:
docids - input set out of which a sample is to be created
actualSize - original size of set, prior to sampling
sampleSetSize - required size of sample set
Returns:
sample of the input set in the required size
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


RepeatableSampler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.sampling
Class RepeatableSampler

java.lang.Object
    extended by  org.apache.lucene.facet.search.sampling.Sampler
        extended by  org.apache.lucene.facet.search.sampling.RepeatableSampler

public class RepeatableSampler
extends Sampler

Take random samples of large collections.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.facet.search.sampling.Sampler
Sampler.SampleResult
Field Summary
Fields inherited from class org.apache.lucene.facet.search.sampling.Sampler
samplingParams
Constructor Summary
RepeatableSampler(SamplingParams params)
Method Summary
protected  Sampler.SampleResult createSample(ScoredDocIDs docids, int actualSize, int sampleSetSize)
Create and return a sample of the input set
Methods inherited from class org.apache.lucene.facet.search.sampling.Sampler
getSampleFixer, getSampleSet, getSamplingParams, overSampledSearchParams, shouldSample, trimResult
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RepeatableSampler

public RepeatableSampler(SamplingParams params)
Method Detail

createSample

protected Sampler.SampleResult createSample(ScoredDocIDs docids,
                                            int actualSize,
                                            int sampleSetSize)
                                     throws IOException
Description copied from class: Sampler
Create and return a sample of the input set

Specified by:
createSample in class Sampler
Parameters:
docids - input set out of which a sample is to be created
actualSize - original size of set, prior to sampling
sampleSetSize - required size of sample set
Returns:
sample of the input set in the required size
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SampleFixer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.sampling
Interface SampleFixer

public interface SampleFixer

Fixer of sample facet accumulation results

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 void fixResult(ScoredDocIDs origDocIds, FacetResult fres)
Alter the input result, fixing it to account for the sampling.

Method Detail

fixResult

void fixResult(ScoredDocIDs origDocIds,
               FacetResult fres)
               throws IOException
Alter the input result, fixing it to account for the sampling. This implementation can compute accurate or estimated counts for the sampled facets. For example, a faster correction could just multiply by a compensating factor.

Parameters:
origDocIds - full set of matching documents.
fres - sample result to be fixed.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Sampler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.sampling
Class Sampler

java.lang.Object
    extended by  org.apache.lucene.facet.search.sampling.Sampler
Direct Known Subclasses:
RandomSampler, RepeatableSampler
public abstract class Sampler
extends Object

Sampling definition for facets accumulation

The Sampler uses TAKMI style counting to provide a 'best guess' top-K result set of the facets accumulated.

Note: Sampling accumulation (Accumulation over a sampled-set of the results), does not guarantee accurate values for FacetResult.getNumValidDescendants() & FacetResultNode.getResidue().

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class Sampler.SampleResult
Result of sample computation
Field Summary
protected  SamplingParams samplingParams
Constructor Summary
Sampler()
Construct with SamplingParams
Sampler(SamplingParams params)
Construct with certain SamplingParams
Method Summary
protected abstract Sampler.SampleResult | createSample(ScoredDocIDs docids, int actualSize, int sampleSetSize) Create and return a sample of the input set
SampleFixer | getSampleFixer(IndexReader indexReader, TaxonomyReader taxonomyReader, FacetSearchParams searchParams) Get a fixer of sample facet accumulation results.
Sampler.SampleResult | getSampleSet(ScoredDocIDs docids) Compute a sample set out of the input set, based on the SamplingParams.getSampleRatio() in effect.
SamplingParams | getSamplingParams() Return the sampling params in effect
FacetSearchParams | overSampledSearchParams(FacetSearchParams original) Over-sampled search params, wrapping each request with an over-sampled one.
boolean | shouldSample(ScoredDocIDs docIds) Check if this sampler would complement for the input docIds
FacetResult | trimResult(FacetResult facetResult) Trim the input facet result. Note: It is only valid to call this method with result obtained for a facet request created through overSampledSearchParams(FacetSearchParams).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

samplingParams

protected final SamplingParams samplingParams
Constructor Detail

Sampler

public Sampler()
Construct with SamplingParams

Sampler

public Sampler(SamplingParams params)
        throws IllegalArgumentException
Construct with certain SamplingParams

Parameters:
params - sampling params in effect
Throws:
IllegalArgumentException - if the provided SamplingParams are not valid
Method Detail

shouldSample

public boolean shouldSample(ScoredDocIDs docIds)
Check if this sampler would complement for the input docIds

getSampleSet

public Sampler.SampleResult getSampleSet(ScoredDocIDs docids)
                                  throws IOException
Compute a sample set out of the input set, based on the SamplingParams.getSampleRatio() in effect. Sub classes can override to alter how the sample set is computed.

If the input set is of size smaller than SamplingParams.getMinSampleSize(), the input set is returned (no sampling takes place).

Other than that, the returned set size will not be larger than SamplingParams.getMaxSampleSize() nor smaller than SamplingParams.getMinSampleSize().

Parameters:
docids - full set of matching documents out of which a sample is needed.
Throws:
IOException

createSample

protected abstract Sampler.SampleResult createSample(ScoredDocIDs docids,
                                                     int actualSize,
                                                     int sampleSetSize)
                                              throws IOException
Create and return a sample of the input set

Parameters:
docids - input set out of which a sample is to be created
actualSize - original size of set, prior to sampling
sampleSetSize - required size of sample set
Returns:
sample of the input set in the required size
Throws:
IOException

getSampleFixer

public SampleFixer getSampleFixer(IndexReader indexReader,
                                  TaxonomyReader taxonomyReader,
                                  FacetSearchParams searchParams)
Get a fixer of sample facet accumulation results. Default implementation returns a TakmiSampleFixer which is adequate only for counting. For any other accumulator, provide a different fixer.

getSamplingParams

public final SamplingParams getSamplingParams()
Return the sampling params in effect

trimResult

public FacetResult trimResult(FacetResult facetResult)
                       throws IllegalArgumentException
Trim the input facet result.
Note: It is only valid to call this method with result obtained for a facet request created through overSampledSearchParams(FacetSearchParams).

Throws:
IllegalArgumentException - if called with results not obtained for requests created through overSampledSearchParams(FacetSearchParams)

overSampledSearchParams

public FacetSearchParams overSampledSearchParams(FacetSearchParams original)
Over-sampled search params, wrapping each request with an over-sampled one.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Sampler.SampleResult

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.sampling
Class Sampler.SampleResult

java.lang.Object
    extended by  org.apache.lucene.facet.search.sampling.Sampler.SampleResult
Enclosing class:
Sampler
public static final class Sampler.SampleResult
extends Object

Result of sample computation

Field Summary
double | actualSampleRatio
ScoredDocIDs | docids
Constructor Summary
protected Sampler.SampleResult(ScoredDocIDs docids, double actualSampleRatio)
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

docids

public final ScoredDocIDs docids

actualSampleRatio

public final double actualSampleRatio
Constructor Detail

Sampler.SampleResult

protected Sampler.SampleResult(ScoredDocIDs docids,
                               double actualSampleRatio)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SamplingAccumulator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.sampling
Class SamplingAccumulator

java.lang.Object
    extended by  org.apache.lucene.facet.search.FacetsAccumulator
        extended by  org.apache.lucene.facet.search.StandardFacetsAccumulator
            extended by  org.apache.lucene.facet.search.sampling.SamplingAccumulator

public class SamplingAccumulator
extends StandardFacetsAccumulator

Facets accumulation with sampling.

Note two major differences between this class and SamplingWrapper:

  1. Latter can wrap any other FacetsAccumulator while this class directly extends StandardFacetsAccumulator.
  2. This class can effectively apply sampling on the complement set of matching document, thereby working efficiently with the complement optimization - see FacetsAccumulator.getComplementThreshold().

Note: Sampling accumulation (Accumulation over a sampled-set of the results), does not guarantee accurate values for FacetResult.getNumValidDescendants() & FacetResultNode.getResidue().

See Also:
Sampler
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.facet.search.StandardFacetsAccumulator
floatArrayAllocator, intArrayAllocator, isUsingComplements, maxPartitions, partitionSize
Fields inherited from class org.apache.lucene.facet.search.FacetsAccumulator
DEFAULT_COMPLEMENT_THRESHOLD, DISABLE_COMPLEMENT, FORCE_COMPLEMENT, indexReader, searchParams, taxonomyReader
Constructor Summary
SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Constructor...
SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Constructor...
Method Summary
List<FacetResult> | accumulate(ScoredDocIDs docids) Accumulate facets over given documents, according to facet requests in effect.
protected ScoredDocIDs | actualDocsToAccumulate(ScoredDocIDs docids) Set the actual set of documents over which accumulation should take place.
protected double | getTotalCountsFactor() Expert: factor by which counts should be multiplied when initializing the count arrays from total counts.
Methods inherited from class org.apache.lucene.facet.search.StandardFacetsAccumulator
getCategoryListMap, shouldComplement
Methods inherited from class org.apache.lucene.facet.search.FacetsAccumulator
getComplementThreshold, isAllowLabeling, mayComplement, setAllowLabeling, setComplementThreshold
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SamplingAccumulator

public SamplingAccumulator(Sampler sampler,
                           FacetSearchParams searchParams,
                           IndexReader indexReader,
                           TaxonomyReader taxonomyReader,
                           IntArrayAllocator intArrayAllocator,
                           FloatArrayAllocator floatArrayAllocator)
Constructor...

SamplingAccumulator

public SamplingAccumulator(Sampler sampler,
                           FacetSearchParams searchParams,
                           IndexReader indexReader,
                           TaxonomyReader taxonomyReader)
Constructor...

Method Detail

accumulate

public List<FacetResult> accumulate(ScoredDocIDs docids)
                             throws IOException
Description copied from class: FacetsAccumulator
Accumulate facets over given documents, according to facet requests in effect.

Overrides:
accumulate in class StandardFacetsAccumulator
Parameters:
docids - documents (and their scores) for which facets are Accumulated.
Returns:
Accumulated facets.
Throws:
IOException - on error.

actualDocsToAccumulate

protected ScoredDocIDs actualDocsToAccumulate(ScoredDocIDs docids)
                                       throws IOException
Description copied from class: StandardFacetsAccumulator
Set the actual set of documents over which accumulation should take place.

Allows to override the set of documents to accumulate for. Invoked just before actual accumulating starts. From this point that set of documents remains unmodified. Default implementation just returns the input unchanged.

Overrides:
actualDocsToAccumulate in class StandardFacetsAccumulator
Parameters:
docids - candidate documents to accumulate for
Returns:
actual documents to accumulate for
Throws:
IOException

getTotalCountsFactor

protected double getTotalCountsFactor()
Description copied from class: StandardFacetsAccumulator
Expert: factor by which counts should be multiplied when initializing the count arrays from total counts. Default implementation for this returns 1, which is a no op.

Overrides:
getTotalCountsFactor in class StandardFacetsAccumulator
Returns:
a factor by which total counts should be multiplied
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SamplingParams

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.search.sampling
Class SamplingParams

java.lang.Object
    extended by  org.apache.lucene.facet.search.sampling.SamplingParams

public class SamplingParams
extends Object

Parameters for sampling, dictating whether sampling is to take place and how.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static int | DEFAULT_MAX_SAMPLE_SIZE Default maximum size of sample.
static int | DEFAULT_MIN_SAMPLE_SIZE Default minimum size of sample.
static double | DEFAULT_OVERSAMPLE_FACTOR Default factor by which more results are requested over the sample set.
static double | DEFAULT_SAMPLE_RATIO Default ratio between size of sample to original size of document set.
static int | DEFAULT_SAMPLING_THRESHOLD Default sampling threshold, if number of results is less than this number - no sampling will take place
Constructor Summary
SamplingParams()
Method Summary
int | getMaxSampleSize() Return the maxSampleSize.
int | getMinSampleSize() Return the minSampleSize.
double | getOversampleFactor() Return the oversampleFactor.
double | getSampleRatio()
int | getSamplingThreshold() Return the samplingThreshold.
void | setMaxSampleSize(int maxSampleSize)
void | setMinSampleSize(int minSampleSize)
void | setOversampleFactor(double oversampleFactor)
void | setSampingThreshold(int sampingThreshold) Set a sampling-threshold
void | setSampleRatio(double sampleRatio)
boolean | validate() Check validity of sampling settings, making sure that minSampleSize <= maxSampleSize <= samplingThreshold 0 < samplingRatio <= 1
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_OVERSAMPLE_FACTOR

public static final double DEFAULT_OVERSAMPLE_FACTOR
Default factor by which more results are requested over the sample set.

See Also:
getOversampleFactor(), Constant Field Values

DEFAULT_SAMPLE_RATIO

public static final double DEFAULT_SAMPLE_RATIO
Default ratio between size of sample to original size of document set.

See Also:
Sampler.getSampleSet(org.apache.lucene.facet.search.ScoredDocIDs), Constant Field Values

DEFAULT_MAX_SAMPLE_SIZE

public static final int DEFAULT_MAX_SAMPLE_SIZE
Default maximum size of sample.

See Also:
Sampler.getSampleSet(org.apache.lucene.facet.search.ScoredDocIDs), Constant Field Values

DEFAULT_MIN_SAMPLE_SIZE

public static final int DEFAULT_MIN_SAMPLE_SIZE
Default minimum size of sample.

See Also:
Sampler.getSampleSet(org.apache.lucene.facet.search.ScoredDocIDs), Constant Field Values

DEFAULT_SAMPLING_THRESHOLD

public static final int DEFAULT_SAMPLING_THRESHOLD
Default sampling threshold, if number of results is less than this number - no sampling will take place

See Also:
getSampleRatio(), Constant Field Values
Constructor Detail

SamplingParams

public SamplingParams()
Method Detail

getMaxSampleSize

public final int getMaxSampleSize()
Return the maxSampleSize. In no case should the resulting sample size exceed this value.

See Also:
Sampler.getSampleSet(org.apache.lucene.facet.search.ScoredDocIDs)

getMinSampleSize

public final int getMinSampleSize()
Return the minSampleSize. In no case should the resulting sample size be smaller than this value.

See Also:
Sampler.getSampleSet(org.apache.lucene.facet.search.ScoredDocIDs)

getSampleRatio

public final double getSampleRatio()
Returns:
the sampleRatio
See Also:
Sampler.getSampleSet(org.apache.lucene.facet.search.ScoredDocIDs)

getSamplingThreshold

public final int getSamplingThreshold()
Return the samplingThreshold. Sampling would be performed only for document sets larger than this.

setMaxSampleSize

public void setMaxSampleSize(int maxSampleSize)
Parameters:
maxSampleSize - the maxSampleSize to set
See Also:
getMaxSampleSize()

setMinSampleSize

public void setMinSampleSize(int minSampleSize)
Parameters:
minSampleSize - the minSampleSize to set
See Also:
getMinSampleSize()

setSampleRatio

public void setSampleRatio(double sampleRatio)
Parameters:
sampleRatio - the sampleRatio to set
See Also:
getSampleRatio()

setSampingThreshold

public void setSampingThreshold(int sampingThreshold)
Set a sampling-threshold

See Also:
getSamplingThreshold()

validate

public boolean validate()
Check validity of sampling settings, making sure that
  • minSampleSize <= maxSampleSize <= samplingThreshold
  • 0 < samplingRatio <= 1

Returns:
true if valid, false otherwise

getOversampleFactor

public final double getOversampleFactor()
Return the oversampleFactor. When sampling, we would collect that much more results, so that later, when selecting top out of these, chances are higher to get actual best results. Note that having this value larger than 1 only makes sense when using a SampleFixer which finds accurate results, such as TakmiSampleFixer. When this value is smaller than 1, it is ignored and no oversampling takes place.

setOversampleFactor

public void setOversampleFactor(double oversampleFactor)
Parameters:
oversampleFactor - the oversampleFactor to set
See Also:
getOversampleFactor()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.facet.search.sampling.RandomSampler

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.sampling.RandomSampler

No usage of org.apache.lucene.facet.search.sampling.RandomSampler

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.sampling.RepeatableSampler

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.sampling.RepeatableSampler

No usage of org.apache.lucene.facet.search.sampling.RepeatableSampler

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.search.sampling.SampleFixer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.search.sampling.SampleFixer

Packages that use SampleFixer
org.apache.lucene.facet.search.sampling Sampling for facets accumulation

Uses of SampleFixer in org.apache.lucene.facet.search.sampling

Methods in org.apache.lucene.facet.search.sampling that return SampleFixer
 SampleFixer Sampler.getSampleFixer(IndexReader indexReader, TaxonomyReader taxonomyReader, FacetSearchParams searchParams)
Get a fixer of sample facet accumulation results.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.sampling.Sampler

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.sampling.Sampler

Packages that use Sampler
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation

Uses of Sampler in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search that return Sampler
 Sampler AdaptiveFacetsAccumulator.getSampler()

Methods in org.apache.lucene.facet.search with parameters of type Sampler
 void AdaptiveFacetsAccumulator.setSampler(Sampler sampler)
Set the sampler.

Constructors in org.apache.lucene.facet.search with parameters of type Sampler
SamplingWrapper(FacetsAccumulator delegee, Sampler sampler)

Uses of Sampler in org.apache.lucene.facet.search.sampling

Subclasses of Sampler in org.apache.lucene.facet.search.sampling
class | RandomSampler Simple random sampler
class | RepeatableSampler Take random samples of large collections.

Constructors in org.apache.lucene.facet.search.sampling with parameters of type Sampler
SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Constructor...
SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Constructor...

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.sampling.Sampler.SampleResult

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.sampling.Sampler.SampleResult

Packages that use Sampler.SampleResult
org.apache.lucene.facet.search.sampling Sampling for facets accumulation

Uses of Sampler.SampleResult in org.apache.lucene.facet.search.sampling

Methods in org.apache.lucene.facet.search.sampling that return Sampler.SampleResult
protected  Sampler.SampleResult RandomSampler.createSample(ScoredDocIDs docids, int actualSize, int sampleSetSize)
protected  Sampler.SampleResult RepeatableSampler.createSample(ScoredDocIDs docids, int actualSize, int sampleSetSize)
protected abstract  Sampler.SampleResult Sampler.createSample(ScoredDocIDs docids, int actualSize, int sampleSetSize)
Create and return a sample of the input set
 Sampler.SampleResult Sampler.getSampleSet(ScoredDocIDs docids)
Compute a sample set out of the input set, based on the SamplingParams.getSampleRatio() in effect.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.sampling.SamplingAccumulator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.sampling.SamplingAccumulator

No usage of org.apache.lucene.facet.search.sampling.SamplingAccumulator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.search.sampling.SamplingParams

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.search.sampling.SamplingParams

Packages that use SamplingParams
org.apache.lucene.facet.search.sampling Sampling for facets accumulation

Uses of SamplingParams in org.apache.lucene.facet.search.sampling

Fields in org.apache.lucene.facet.search.sampling declared as SamplingParams
protected  SamplingParams Sampler.samplingParams

Methods in org.apache.lucene.facet.search.sampling that return SamplingParams
 SamplingParams Sampler.getSamplingParams()
Return the sampling params in effect

Constructors in org.apache.lucene.facet.search.sampling with parameters of type SamplingParams
RandomSampler(SamplingParams params, Random random)
RepeatableSampler(SamplingParams params)
Sampler(SamplingParams params)
Construct with certain SamplingParams

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CategoryPath

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy
Class CategoryPath

java.lang.Object
    extended by  org.apache.lucene.facet.taxonomy.CategoryPath
All Implemented Interfaces:
Serializable, Cloneable, Comparable<CategoryPath>
public class CategoryPath
extends Object
implements Serializable, Cloneable, Comparable<CategoryPath>

A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.

CategoryPath is designed to reduce the number of object allocations, in two ways: First, it keeps the components internally in two arrays, rather than keeping individual strings. Second, it allows reusing the same CategoryPath object (which can be clear()ed and new components add()ed again) and of add()'s parameter (which can be a reusable object, not just a string).

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected char[] | chars
protected short[] | ends
protected short | ncomponents
Constructor Summary
CategoryPath()
Create an empty CategoryPath object.
CategoryPath(CategoryPath existing)
Construct a new CategoryPath object, copying the path given in an existing CategoryPath object.
CategoryPath(CategoryPath existing, int prefixLen)
Construct a new CategoryPath object, copying a prefix with the given number of components of the path given in an existing CategoryPath object.
CategoryPath(CharSequence... components)
Construct a new CategoryPath object, copying an existing path given as an array of strings.
CategoryPath(int capacityChars, int capacityComponents)
Construct a new empty CategoryPath object.
CategoryPath(String pathString, char delimiter)
Construct a new CategoryPath object, given a single string with components separated by a given delimiter character.
Method Summary
 void add(CharSequence component)
Add the given component to the end of the path.
 void add(CharSequence pathString, char delimiter)
Add the given components to the end of the path.
 void appendTo(Appendable out, char delimiter)
Build a string representation of the path, with its components separated by the given delimiter character.
 void appendTo(Appendable out, char delimiter, int prefixLen)
like appendTo(Appendable, char), but takes only a prefix of the path, rather than the whole path.
 void appendTo(Appendable out, char delimiter, int start, int end)
like appendTo(Appendable, char), but takes only a part of the path, rather than the whole path.
 int capacityChars()
Returns the current character capacity of the CategoryPath.
 int capacityComponents()
Returns the current component capacity of the CategoryPath.
 int charsNeededForFullPath()
Returns the number of characters required to represent this entire category path, if written using copyToCharArray(char[], int, int, char) or appendTo(Appendable, char).
 void clear()
Empty the CategoryPath object, so that it has zero components.
 Object clone()
 int compareTo(CategoryPath other)
Compares this CategoryPath with the other CategoryPath for lexicographic order.
 int copyToCharArray(char[] outputBuffer, int outputBufferStart, int numberOfComponentsToCopy, char separatorChar)
Copies the specified number of components from this category path to the specified character array, with the components separated by a given delimiter character.
 void deserializeFromStreamReader(InputStreamReader isr)
Serializes the content of this CategoryPath to a byte stream, using UTF-8 encoding to convert characters to bytes, and treating the ends as 16-bit characters.
 boolean equals(Object obj)
Compare the given CategoryPath to another one.
 boolean equalsToSerialized(CharSequence buffer, int offset)
Check whether the current path is identical to the one serialized (with serializeAppendTo(Appendable)) in the given buffer, at the given offset.
 boolean equalsToSerialized(int prefixLen, CharSequence buffer, int offset)
Just like equalsToSerialized(CharSequence, int), but compare to a prefix of the CategoryPath, instead of the whole CategoryPath.
 String getComponent(int i)
Return the i'th component of the path, in a new String object.
 int hashCode()
Calculate a hashCode for this path, used when a CategoryPath serves as a hash-table key.
 int hashCode(int prefixLen)
Like hashCode(), but find the hash function of a prefix with the given number of components, rather than of the entire path.
static int hashCodeOfSerialized(CharSequence buffer, int offset)
This method calculates a hash function of a path that has been written to (using serializeAppendTo(Appendable)) a character buffer.
 boolean isDescendantOf(CategoryPath other)
Test whether this object is a descendant of another CategoryPath.
 String lastComponent()
Return the last component of the path, in a new String object.
 short length()
Return the number of components in the facet path.
 long longHashCode()
Calculate a 64-bit hash function for this path.
 long longHashCode(int prefixLen)
Like longHashCode(), but find the hash function of a prefix with the given number of components, rather than of the entire path.
 void serializeAppendTo(Appendable out)
Write out a serialized (as a character sequence) representation of the path to a given Appendable (e.g., a StringBuilder, CharBuffer, Writer, or something similar.
 void serializeAppendTo(int prefixLen, Appendable out)
Just like serializeAppendTo(Appendable), but writes only a prefix of the CategoryPath.
 void serializeToStreamWriter(OutputStreamWriter osw)
Serializes the content of this CategoryPath to a byte stream, using UTF-8 encoding to convert characters to bytes, and treating the ends as 16-bit characters.
 int setFromSerialized(CharSequence buffer, int offset)
Set a CategoryPath from a character-sequence representation written by serializeAppendTo(Appendable).
 String toString()
This method, an implementation of the Object.toString() interface, is to allow simple printing of a CategoryPath, for debugging purposes.
 String toString(char delimiter)
Build a string representation of the path, with its components separated by the given delimiter character.
 String toString(char delimiter, int prefixLen)
like toString(char), but takes only a prefix with a given number of components, rather than the whole path.
 String toString(char delimiter, int start, int end)
like toString(char), but takes only a part of the path, rather than the whole path.
 void trim(int nTrim)
Trim the last components from the path.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

chars

protected char[] chars

ends

protected short[] ends

ncomponents

protected short ncomponents
Constructor Detail

CategoryPath

public CategoryPath(int capacityChars,
                    int capacityComponents)
Construct a new empty CategoryPath object. CategoryPath objects are meant to be reused, by add()ing components, and later clear()ing, and add()ing components again. The CategoryPath object is created with a buffer pre-allocated for a given number of characters and components, but the buffer will grow as necessary (see capacityChars() and capacityComponents()).

CategoryPath

public CategoryPath()
Create an empty CategoryPath object. Equivalent to the constructor CategoryPath(int, int) with the two initial-capacity arguments set to zero.

CategoryPath

public CategoryPath(String pathString,
                    char delimiter)
Construct a new CategoryPath object, given a single string with components separated by a given delimiter character.

The initial capacity of the constructed object will be exactly what is needed to hold the given path. This fact is convenient when creating a temporary object that will not be reused later.

CategoryPath

public CategoryPath(CharSequence... components)
Construct a new CategoryPath object, copying an existing path given as an array of strings.

The new object occupies exactly the space it needs, without any spare capacity. This is the expected behavior in the typical use case, where this constructor is used to create a temporary object which is never reused.

CategoryPath

public CategoryPath(CategoryPath existing)
Construct a new CategoryPath object, copying the path given in an existing CategoryPath object.

This copy-constructor is handy when you need to save a reference to a CategoryPath (e.g., when it serves as a key to a hash-table), but cannot save a reference to the original object because its contents can be changed later by the user. Copying the contents into a new object is a solution.

This constructor does not copy the capacity (spare buffer size) of the existing CategoryPath. Rather, the new object occupies exactly the space it needs, without any spare. This is the expected behavior in the typical use case outlined in the previous paragraph.

CategoryPath

public CategoryPath(CategoryPath existing,
                    int prefixLen)
Construct a new CategoryPath object, copying a prefix with the given number of components of the path given in an existing CategoryPath object.

If the given length is negative or bigger than the given path's actual length, the full path is taken.

This constructor is often convenient for creating a temporary object with a path's prefix, but this practice is wasteful, and therefore inadvisable. Rather, the application should be written in a way that allows considering only a prefix of a given path, without needing to make a copy of that path.

Method Detail

length

public short length()
Return the number of components in the facet path. Note that this is not the number of characters, but the number of components.

trim

public void trim(int nTrim)
Trim the last components from the path.

Parameters:
nTrim - Number of components to trim. If larger than the number of components this path has, the entire path will be cleared.

capacityChars

public int capacityChars()
Returns the current character capacity of the CategoryPath. The character capacity is the size of the internal buffer used to hold the characters of all the path's components. When a component is added and the capacity is not big enough, the buffer is automatically grown, and capacityChars() increases.

capacityComponents

public int capacityComponents()
Returns the current component capacity of the CategoryPath. The component capacity is the maximum number of components that the internal buffer can currently hold. When a component is added beyond this capacity, the buffer is automatically grown, and capacityComponents() increases.

add

public void add(CharSequence component)
Add the given component to the end of the path.

Note that when a String object is passed to this method, a reference to it is not saved (rather, its content is copied), which will lead to that String object being gc'ed. To reduce the number of garbage objects, you can pass a mutable CharBuffer instead of an immutable String to this method.

clear

public void clear()
Empty the CategoryPath object, so that it has zero components. The capacity of the object (see capacityChars() and capacityComponents()) is not reduced, so that the object can be reused without frequent reallocations.

appendTo

public void appendTo(Appendable out,
                     char delimiter)
              throws IOException
Build a string representation of the path, with its components separated by the given delimiter character. The resulting string is appended to a given Appendable, e.g., a StringBuilder, CharBuffer or Writer.

Note that the two cases of zero components and one component with zero length produce indistinguishable results (both of them append nothing). This is normally not a problem, because components should not normally have zero lengths.

An IOException can be thrown if the given Appendable's append() throws this exception.

Throws:
IOException

appendTo

public void appendTo(Appendable out,
                     char delimiter,
                     int prefixLen)
              throws IOException
like appendTo(Appendable, char), but takes only a prefix of the path, rather than the whole path.

If the given prefix length is negative or bigger than the path's actual length, the whole path is taken.

Throws:
IOException

appendTo

public void appendTo(Appendable out,
                     char delimiter,
                     int start,
                     int end)
              throws IOException
like appendTo(Appendable, char), but takes only a part of the path, rather than the whole path.

start specifies the first component in the subpath, and end is one past the last component. If start is negative, 0 is assumed, and if end is negative or past the end of the path, the path is taken until the end. Otherwise, if end<=start, nothing is appended. Nothing is appended also in the case that the path is empty.

Throws:
IOException

toString

public String toString(char delimiter)
Build a string representation of the path, with its components separated by the given delimiter character. The resulting string is returned as a new String object. To avoid this temporary object creation, consider using appendTo(Appendable, char) instead.

Note that the two cases of zero components and one component with zero length produce indistinguishable results (both of them return an empty string). This is normally not a problem, because components should not normally have zero lengths.

toString

public String toString()
This method, an implementation of the Object.toString() interface, is to allow simple printing of a CategoryPath, for debugging purposes. When possible, it recommended to avoid using it it, and rather, if you want to output the path with its components separated by a delimiter character, specify the delimiter explicitly, with toString(char).

Overrides:
toString in class Object

toString

public String toString(char delimiter,
                       int prefixLen)
like toString(char), but takes only a prefix with a given number of components, rather than the whole path.

If the given length is negative or bigger than the path's actual length, the whole path is taken.

toString

public String toString(char delimiter,
                       int start,
                       int end)
like toString(char), but takes only a part of the path, rather than the whole path.

start specifies the first component in the subpath, and end is one past the last component. If start is negative, 0 is assumed, and if end is negative or past the end of the path, the path is taken until the end. Otherwise, if end<=start, an empty string is returned. An emptry string is returned also in the case that the path is empty.

getComponent

public String getComponent(int i)
Return the i'th component of the path, in a new String object. If there is no i'th component, a null is returned.

lastComponent

public String lastComponent()
Return the last component of the path, in a new String object. If the path is empty, a null is returned.

copyToCharArray

public int copyToCharArray(char[] outputBuffer,
                           int outputBufferStart,
                           int numberOfComponentsToCopy,
                           char separatorChar)
Copies the specified number of components from this category path to the specified character array, with the components separated by a given delimiter character. The array must be large enough to hold the components and separators - the amount of needed space can be calculated with charsNeededForFullPath().

This method returns the number of characters written to the array.

Parameters:
outputBuffer - The destination character array.
outputBufferStart - The first location to write in the output array.
numberOfComponentsToCopy - The number of path components to write to the destination buffer.
separatorChar - The separator inserted between every pair of path components in the output buffer.
See Also:
charsNeededForFullPath()

charsNeededForFullPath

public int charsNeededForFullPath()
Returns the number of characters required to represent this entire category path, if written using copyToCharArray(char[], int, int, char) or appendTo(Appendable, char). This includes the number of characters in all the components, plus the number of separators between them (each one character in the aforementioned methods).

add

public void add(CharSequence pathString,
                char delimiter)
Add the given components to the end of the path. The components are given in a single string, separated by a given delimiter character. If the given string is empty, it is assumed to refer to the root (empty) category, and nothing is added to the path (rather than adding a single empty component).

Note that when a String object is passed to this method, a reference to it is not saved (rather, its content is copied), which will lead to that String object being gc'ed. To reduce the number of garbage objects, you can pass a mutable CharBuffer instead of an immutable String to this method.

clone

public Object clone()
Overrides:
clone in class Object

equals

public boolean equals(Object obj)
Compare the given CategoryPath to another one. For two category paths to be considered equal, only the path they contain needs to be identical The unused capacity of the objects is not considered in the comparison.

Overrides:
equals in class Object

isDescendantOf

public boolean isDescendantOf(CategoryPath other)
Test whether this object is a descendant of another CategoryPath. This is true if the other CategoryPath is the prefix of this.

hashCode

public int hashCode()
Calculate a hashCode for this path, used when a CategoryPath serves as a hash-table key. If two objects are equal(), their hashCodes need to be equal, so like in equal(), hashCode does not consider unused portions of the internal buffers in its calculation.

The hash function used is modeled after Java's String.hashCode() - a simple multiplicative hash function with the multiplier 31. The same hash function also appeared in Kernighan & Ritchie's second edition of "The C Programming Language" (1988).

Overrides:
hashCode in class Object

hashCode

public int hashCode(int prefixLen)
Like hashCode(), but find the hash function of a prefix with the given number of components, rather than of the entire path.

longHashCode

public long longHashCode()
Calculate a 64-bit hash function for this path. Unlike hashCode(), this method is not part of the Java standard, and is only used if explicitly called by the user.

If two objects are equal(), their hash codes need to be equal, so like in equals(Object), longHashCode does not consider unused portions of the internal buffers in its calculation.

The hash function used is a simple multiplicative hash function, with the multiplier 65599. While Java's standard multiplier 31 (used in hashCode()) gives a good distribution for ASCII strings, it turns out that for foreign-language strings (with 16-bit characters) it gives too many collisions, and a bigger multiplier produces fewer collisions in this case.

longHashCode

public long longHashCode(int prefixLen)
Like longHashCode(), but find the hash function of a prefix with the given number of components, rather than of the entire path.

serializeAppendTo

public void serializeAppendTo(Appendable out)
                       throws IOException
Write out a serialized (as a character sequence) representation of the path to a given Appendable (e.g., a StringBuilder, CharBuffer, Writer, or something similar.

This method may throw a IOException if the given Appendable threw this exception while appending.

Throws:
IOException

serializeAppendTo

public void serializeAppendTo(int prefixLen,
                              Appendable out)
                       throws IOException
Just like serializeAppendTo(Appendable), but writes only a prefix of the CategoryPath.

Throws:
IOException

setFromSerialized

public int setFromSerialized(CharSequence buffer,
                             int offset)
Set a CategoryPath from a character-sequence representation written by serializeAppendTo(Appendable).

Reading starts at the given offset into the given character sequence, and the offset right after the end of this path is returned.

equalsToSerialized

public boolean equalsToSerialized(CharSequence buffer,
                                  int offset)
Check whether the current path is identical to the one serialized (with serializeAppendTo(Appendable)) in the given buffer, at the given offset.

equalsToSerialized

public boolean equalsToSerialized(int prefixLen,
                                  CharSequence buffer,
                                  int offset)
Just like equalsToSerialized(CharSequence, int), but compare to a prefix of the CategoryPath, instead of the whole CategoryPath.

hashCodeOfSerialized

public static int hashCodeOfSerialized(CharSequence buffer,
                                       int offset)
This method calculates a hash function of a path that has been written to (using serializeAppendTo(Appendable)) a character buffer. It is guaranteed that the value returned is identical to that which hashCode() would have produced for the original object before it was serialized.

serializeToStreamWriter

public void serializeToStreamWriter(OutputStreamWriter osw)
                             throws IOException
Serializes the content of this CategoryPath to a byte stream, using UTF-8 encoding to convert characters to bytes, and treating the ends as 16-bit characters.

Parameters:
osw - The output byte stream.
Throws:
IOException - If there are encoding errors.

deserializeFromStreamReader

public void deserializeFromStreamReader(InputStreamReader isr)
                                 throws IOException
Serializes the content of this CategoryPath to a byte stream, using UTF-8 encoding to convert characters to bytes, and treating the ends as 16-bit characters.

Parameters:
isr - The input stream.
Throws:
IOException - If there are encoding errors.

compareTo

public int compareTo(CategoryPath other)
Compares this CategoryPath with the other CategoryPath for lexicographic order. Returns a negative integer, zero, or a positive integer as this CategoryPath lexicographically precedes, equals to, or lexicographically follows the other CategoryPath.

Specified by:
compareTo in interface Comparable<CategoryPath>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


InconsistentTaxonomyException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy
Class InconsistentTaxonomyException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  org.apache.lucene.facet.taxonomy.InconsistentTaxonomyException
All Implemented Interfaces:
Serializable
public class InconsistentTaxonomyException
extends Exception

Exception indicating that a certain operation could not be performed on a taxonomy related object because of an inconsistency.

For example, trying to refresh a taxonomy reader might fail in case the underlying taxonomy was meanwhile modified in a manner which does not allow to perform such a refresh. (See TaxonomyReader.refresh().)

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
InconsistentTaxonomyException()
InconsistentTaxonomyException(String message)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InconsistentTaxonomyException

public InconsistentTaxonomyException(String message)

InconsistentTaxonomyException

public InconsistentTaxonomyException()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.taxonomy
Interfaces
TaxonomyReader
TaxonomyReader.ChildrenArrays
TaxonomyWriter
Classes
CategoryPath
Exceptions
InconsistentTaxonomyException


org.apache.lucene.facet.taxonomy

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.taxonomy

Taxonomy of Categories

See:
Description

Interface Summary
TaxonomyReader | TaxonomyReader is the read-only interface with which the faceted-search library uses the taxonomy during search time.
TaxonomyReader.ChildrenArrays | Equivalent representations of the taxonomy's parent info, used internally for efficient computation of facet results: "youngest child" and "oldest sibling"
TaxonomyWriter | TaxonomyWriter is the interface which the faceted-search library uses to dynamically build the taxonomy at indexing time.

Class Summary
CategoryPath A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.

Exception Summary
InconsistentTaxonomyException Exception indicating that a certain operation could not be performed on a taxonomy related object because of an inconsistency.

Package org.apache.lucene.facet.taxonomy Description

Taxonomy of Categories

Facets are defined using a hierarchy of categories, known as a Taxonomy
For example, in a book store application, a Taxonomy could have the following hierarchy:

  • Author
    • Mark Twain
    • J. K. Rowling
  • Date
    • 2010
    • 2009
The Taxonomy translates category-paths into category-ordinal and vice versa.


org.apache.lucene.facet.taxonomy Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.taxonomy

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.taxonomy.CategoryPath (implements java.lang.Cloneable, java.lang.Comparable<T>, java.io.Serializable)
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.apache.lucene.facet.taxonomy.InconsistentTaxonomyException

Interface Hierarchy

  • java.io.Closeable
    • org.apache.lucene.facet.taxonomy.TaxonomyReader
    • org.apache.lucene.facet.taxonomy.TaxonomyWriter (also extends org.apache.lucene.util.TwoPhaseCommit)
  • org.apache.lucene.facet.taxonomy.TaxonomyReader.ChildrenArrays
  • org.apache.lucene.util.TwoPhaseCommit
    • org.apache.lucene.facet.taxonomy.TaxonomyWriter (also extends java.io.Closeable)


Uses of Package org.apache.lucene.facet.taxonomy

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.taxonomy

Packages that use org.apache.lucene.facet.taxonomy
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.attributes | Category attributes and their properties for indexing
org.apache.lucene.facet.index.categorypolicy | Policies for indexing categories
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.cache | Caching to speed up facets accumulation.
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.search.params.association | Association-based Parameters for Faceted Search.
org.apache.lucene.facet.search.results | Results of Faceted Search
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation
org.apache.lucene.facet.taxonomy | Taxonomy of Categories
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.facet.taxonomy.writercache | Improves indexing time by caching a map of CategoryPath to their Ordinal
org.apache.lucene.facet.taxonomy.writercache.cl2o | Category->Ordinal caching implementation using an optimized data-structures
org.apache.lucene.facet.taxonomy.writercache.lru | An LRU cache implementation for the CategoryPath to Ordinal map
org.apache.lucene.facet.util | Various utilities for faceted search

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.benchmark.byTask
TaxonomyReader
TaxonomyReader is the read-only interface with which the faceted-search library uses the taxonomy during search time.
TaxonomyWriter
TaxonomyWriter is the interface which the faceted-search library uses to dynamically build the taxonomy at indexing time.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.enhancements
TaxonomyWriter
TaxonomyWriter is the interface which the faceted-search library uses to dynamically build the taxonomy at indexing time.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.enhancements.association
TaxonomyWriter
TaxonomyWriter is the interface which the faceted-search library uses to dynamically build the taxonomy at indexing time.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.index
CategoryPath
A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.
TaxonomyWriter
TaxonomyWriter is the interface which the faceted-search library uses to dynamically build the taxonomy at indexing time.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.index.attributes
CategoryPath
A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.index.categorypolicy
CategoryPath
A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.
TaxonomyWriter
TaxonomyWriter is the interface which the faceted-search library uses to dynamically build the taxonomy at indexing time.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.index.params
CategoryPath
A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.index.streaming
CategoryPath
A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.
TaxonomyWriter
TaxonomyWriter is the interface which the faceted-search library uses to dynamically build the taxonomy at indexing time.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.search
CategoryPath
A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.
TaxonomyReader
TaxonomyReader is the read-only interface with which the faceted-search library uses the taxonomy during search time.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.search.cache
TaxonomyReader
TaxonomyReader is the read-only interface with which the faceted-search library uses the taxonomy during search time.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.search.params
CategoryPath
A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.
TaxonomyReader
TaxonomyReader is the read-only interface with which the faceted-search library uses the taxonomy during search time.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.search.params.association
CategoryPath
A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.
TaxonomyReader
TaxonomyReader is the read-only interface with which the faceted-search library uses the taxonomy during search time.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.search.results
CategoryPath
A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.
TaxonomyReader
TaxonomyReader is the read-only interface with which the faceted-search library uses the taxonomy during search time.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.search.sampling
TaxonomyReader
TaxonomyReader is the read-only interface with which the faceted-search library uses the taxonomy during search time.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.taxonomy
CategoryPath
A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.
InconsistentTaxonomyException
Exception indicating that a certain operation could not be performed on a taxonomy related object because of an inconsistency.
TaxonomyReader.ChildrenArrays
Equivalent representations of the taxonomy's parent info, used internally for efficient computation of facet results: "youngest child" and "oldest sibling"

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.taxonomy.directory
CategoryPath
A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.
InconsistentTaxonomyException
Exception indicating that a certain operation could not be performed on a taxonomy related object because of an inconsistency.
TaxonomyReader
TaxonomyReader is the read-only interface with which the faceted-search library uses the taxonomy during search time.
TaxonomyReader.ChildrenArrays
Equivalent representations of the taxonomy's parent info, used internally for efficient computation of facet results: "youngest child" and "oldest sibling"
TaxonomyWriter
TaxonomyWriter is the interface which the faceted-search library uses to dynamically build the taxonomy at indexing time.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.taxonomy.writercache
CategoryPath
A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.taxonomy.writercache.cl2o
CategoryPath
A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.taxonomy.writercache.lru
CategoryPath
A CategoryPath holds a sequence of string components, specifying the hierarchical name of a category.

Classes in org.apache.lucene.facet.taxonomy used by org.apache.lucene.facet.util
TaxonomyReader
TaxonomyReader is the read-only interface with which the faceted-search library uses the taxonomy during search time.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


TaxonomyReader.ChildrenArrays

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy
Interface TaxonomyReader.ChildrenArrays

Enclosing interface:
TaxonomyReader
public static interface TaxonomyReader.ChildrenArrays

Equivalent representations of the taxonomy's parent info, used internally for efficient computation of facet results: "youngest child" and "oldest sibling"

Method Summary
 int[] getOlderSiblingArray()
getOlderSiblingArray() returns an int array of size getSize() listing for each category the ordinal of its immediate older sibling (the sibling in the taxonomy tree with the highest ordinal below that of the given ordinal).
 int[] getYoungestChildArray()
getYoungestChildArray() returns an int array of size getSize() listing the ordinal of the youngest (highest numbered) child category of each category in the taxonomy.

Method Detail

getYoungestChildArray

int[] getYoungestChildArray()
getYoungestChildArray() returns an int array of size getSize() listing the ordinal of the youngest (highest numbered) child category of each category in the taxonomy. The value for a leaf category (a category without children) is INVALID_ORDINAL.

getOlderSiblingArray

int[] getOlderSiblingArray()
getOlderSiblingArray() returns an int array of size getSize() listing for each category the ordinal of its immediate older sibling (the sibling in the taxonomy tree with the highest ordinal below that of the given ordinal). The value for a category with no older sibling is INVALID_ORDINAL.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TaxonomyReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy
Interface TaxonomyReader

All Superinterfaces:
Closeable
All Known Implementing Classes:
DirectoryTaxonomyReader
public interface TaxonomyReader
extends Closeable

TaxonomyReader is the read-only interface with which the faceted-search library uses the taxonomy during search time.

A TaxonomyReader holds a list of categories. Each category has a serial number which we call an "ordinal", and a hierarchical "path" name:

  • The ordinal is an integer that starts at 0 for the first category (which is always the root category), and grows contiguously as more categories are added; Note that once a category is added, it can never be deleted.
  • The path is a CategoryPath object specifying the category's position in the hierarchy.
Notes about concurrent access to the taxonomy:

An implementation must allow multiple readers to be active concurrently with a single writer. Readers follow so-called "point in time" semantics, i.e., a TaxonomyReader object will only see taxonomy entries which were available at the time it was created. What the writer writes is only available to (new) readers after the writer's commit() is called.

In faceted search, two separate indices are used: the main Lucene index, and the taxonomy. Because the main index refers to the categories listed in the taxonomy, it is important to open the taxonomy *after* opening the main index, and it is also necessary to reopen() the taxonomy after reopen()ing the main index.

This order is important, otherwise it would be possible for the main index to refer to a category which is not yet visible in the old snapshot of the taxonomy. Note that it is indeed fine for the the taxonomy to be opened after the main index - even a long time after. The reason is that once a category is added to the taxonomy, it can never be changed or deleted, so there is no danger that a "too new" taxonomy not being consistent with an older index.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static interface TaxonomyReader.ChildrenArrays
Equivalent representations of the taxonomy's parent info, used internally for efficient computation of facet results: "youngest child" and "oldest sibling"
Field Summary
static int | INVALID_ORDINAL Ordinals are always non-negative, so a negative ordinal can be used to signify an error.
static int | ROOT_ORDINAL The root category (the category with the empty path) always has the ordinal 0, to which we give a name ROOT_ORDINAL.
Method Summary
 void decRef()
Expert: decreases the refCount of this TaxonomyReader instance.
 TaxonomyReader.ChildrenArrays getChildrenArrays()
getChildrenArrays() returns a TaxonomyReader.ChildrenArrays object which can be used together to efficiently enumerate the children of any category.
 Map<String,String> getCommitUserData()
Retrieve user committed data.
 int getOrdinal(CategoryPath categoryPath)
getOrdinal() returns the ordinal of the category given as a path.
 int getParent(int ordinal)
getParent() returns the ordinal of the parent category of the category with the given ordinal.
 int[] getParentArray()
getParentArray() returns an int array of size getSize() listing the ordinal of the parent category of each category in the taxonomy.
 CategoryPath getPath(int ordinal)
getPath() returns the path name of the category with the given ordinal.
 boolean getPath(int ordinal, CategoryPath result)
getPath() returns the path name of the category with the given ordinal.
 int getRefCount()
Expert: returns the current refCount for this taxonomy reader
 int getSize()
getSize() returns the number of categories in the taxonomy.
 void incRef()
Expert: increments the refCount of this TaxonomyReader instance.
 boolean refresh()
refresh() re-reads the taxonomy information if there were any changes to the taxonomy since this instance was opened or last refreshed.
Methods inherited from interface java.io.Closeable
close

Field Detail

ROOT_ORDINAL

static final int ROOT_ORDINAL
The root category (the category with the empty path) always has the ordinal 0, to which we give a name ROOT_ORDINAL. getOrdinal() of an empty path will always return ROOT_ORDINAL, and getCategory(ROOT_ORDINAL) will return the empty path.

See Also:
Constant Field Values

INVALID_ORDINAL

static final int INVALID_ORDINAL
Ordinals are always non-negative, so a negative ordinal can be used to signify an error. Methods here return INVALID_ORDINAL (-1) in this case.

See Also:
Constant Field Values
Method Detail

getOrdinal

int getOrdinal(CategoryPath categoryPath)
               throws IOException
getOrdinal() returns the ordinal of the category given as a path. The ordinal is the category's serial number, an integer which starts with 0 and grows as more categories are added (note that once a category is added, it can never be deleted).

If the given category wasn't found in the taxonomy, INVALID_ORDINAL is returned.

Throws:
IOException

getPath

CategoryPath getPath(int ordinal)
                     throws IOException
getPath() returns the path name of the category with the given ordinal. The path is returned as a new CategoryPath object - to reuse an existing object, use getPath(int, CategoryPath).

A null is returned if a category with the given ordinal does not exist.

Throws:
IOException

getPath

boolean getPath(int ordinal,
                CategoryPath result)
                throws IOException
getPath() returns the path name of the category with the given ordinal. The path is written to the given CategoryPath object (which is cleared first).

If a category with the given ordinal does not exist, the given CategoryPath object is not modified, and the method returns false. Otherwise, the method returns true.

Throws:
IOException

refresh

boolean refresh()
                throws IOException,
                       InconsistentTaxonomyException
refresh() re-reads the taxonomy information if there were any changes to the taxonomy since this instance was opened or last refreshed. Calling refresh() is more efficient than close()ing the old instance and opening a new one.

If there were no changes since this instance was opened or last refreshed, then this call does nothing. Note, however, that this is still a relatively slow method (as it needs to verify whether there have been any changes on disk to the taxonomy), so it should not be called too often needlessly. In faceted search, the taxonomy reader's refresh() should be called only after a reopen() of the main index.

Refreshing the taxonomy might fail in some cases, for example if the taxonomy was recreated since this instance was opened or last refreshed. In this case an InconsistentTaxonomyException is thrown, suggesting that in order to obtain up-to-date taxonomy data a new TaxonomyReader should be opened. Note: This TaxonomyReader instance remains unchanged and usable in this case, and the application can continue to use it, and should still Closeable.close() when no longer needed.

It should be noted that refresh() is similar in purpose to IndexReader.reopen(), but the two methods behave differently. refresh() refreshes the existing TaxonomyReader object, rather than opening a new one in addition to the old one as reopen() does. The reason is that in a taxonomy, one can only add new categories and cannot modify or delete existing categories; Therefore, there is no reason to keep an old snapshot of the taxonomy open - refreshing the taxonomy to the newest data and using this new snapshots in all threads (whether new or old) is fine. This saves us needing to keep multiple copies of the taxonomy open in memory.

Returns:
true if anything has changed, false otherwise.
Throws:
IOException
InconsistentTaxonomyException

getParent

int getParent(int ordinal)
              throws IOException
getParent() returns the ordinal of the parent category of the category with the given ordinal.

When a category is specified as a path name, finding the path of its parent is as trivial as dropping the last component of the path. getParent() is functionally equivalent to calling getPath() on the given ordinal, dropping the last component of the path, and then calling getOrdinal() to get an ordinal back. However, implementations are expected to provide a much more efficient implementation:

getParent() should be a very quick method, as it is used during the facet aggregation process in faceted search. Implementations will most likely want to serve replies to this method from a pre-filled cache.

If the given ordinal is the ROOT_ORDINAL, an INVALID_ORDINAL is returned. If the given ordinal is a top-level category, the ROOT_ORDINAL is returned. If an invalid ordinal is given (negative or beyond the last available ordinal), an ArrayIndexOutOfBoundsException is thrown. However, it is expected that getParent will only be called for ordinals which are already known to be in the taxonomy.

Throws:
IOException

getParentArray

int[] getParentArray()
                     throws IOException
getParentArray() returns an int array of size getSize() listing the ordinal of the parent category of each category in the taxonomy.

The caller can hold on to the array it got indefinitely - it is guaranteed that no-one else will modify it. The other side of the same coin is that the caller must treat the array it got as read-only and not modify it, because other callers might have gotten the same array too (and getParent() calls might be answered from the same array).

If you use getParentArray() instead of getParent(), remember that the array you got is (naturally) not modified after a refresh(), so you should always call getParentArray() again after a refresh().

This method's function is similar to allocating an array of size getSize() and filling it with getParent() calls, but implementations are encouraged to implement it much more efficiently, with O(1) complexity. This can be done, for example, by the implementation already keeping the parents in an array, and just returning this array (without any allocation or copying) when requested.

Throws:
IOException

getChildrenArrays

TaxonomyReader.ChildrenArrays getChildrenArrays()
getChildrenArrays() returns a TaxonomyReader.ChildrenArrays object which can be used together to efficiently enumerate the children of any category.

The caller can hold on to the object it got indefinitely - it is guaranteed that no-one else will modify it. The other side of the same coin is that the caller must treat the object which it got (and the arrays it contains) as read-only and not modify it, because other callers might have gotten the same object too.

Implementations should have O(getSize()) time for the first call or after a refresh(), but O(1) time for further calls. In neither case there should be a need to read new data from disk. These guarantees are most likely achieved by calculating this object (based on the getParentArray()) when first needed, and later (if the taxonomy was not refreshed) returning the same object (without any allocation or copying) when requested.

The reason we have one method returning one object, rather than two methods returning two arrays, is to avoid race conditions in a multi- threaded application: We want to avoid the possibility of returning one new array and one old array, as those could not be used together.

getCommitUserData

Map<String,String> getCommitUserData()
                                     throws IOException
Retrieve user committed data.

Throws:
IOException
See Also:
TwoPhaseCommit.commit(Map)

incRef

void incRef()
Expert: increments the refCount of this TaxonomyReader instance. RefCounts can be used to determine when a taxonomy reader can be closed safely, i.e. as soon as there are no more references. Be sure to always call a corresponding decRef(), in a finally clause; otherwise the reader may never be closed.

decRef

void decRef()
            throws IOException
Expert: decreases the refCount of this TaxonomyReader instance. If the refCount drops to 0, then pending changes (if any) can be committed to the taxonomy index and this reader can be closed.

Throws:
IOException

getRefCount

int getRefCount()
Expert: returns the current refCount for this taxonomy reader

getSize

int getSize()
getSize() returns the number of categories in the taxonomy.

Because categories are numbered consecutively starting with 0, it means the taxonomy contains ordinals 0 through getSize()-1.

Note that the number returned by getSize() is often slightly higher than the number of categories inserted into the taxonomy; This is because when a category is added to the taxonomy, its ancestors are also added automatically (including the root, which always get ordinal 0).

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TaxonomyWriter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy
Interface TaxonomyWriter

All Superinterfaces:
Closeable, TwoPhaseCommit
All Known Implementing Classes:
DirectoryTaxonomyWriter
public interface TaxonomyWriter
extends Closeable, TwoPhaseCommit

TaxonomyWriter is the interface which the faceted-search library uses to dynamically build the taxonomy at indexing time.

Notes about concurrent access to the taxonomy:

An implementation must allow multiple readers and a single writer to be active concurrently. Readers follow so-called "point in time" semantics, i.e., a reader object will only see taxonomy entries which were available at the time it was created. What the writer writes is only available to (new) readers after the writer's commit() is called.

Faceted search keeps two indices - namely Lucene's main index, and this taxonomy index. When one or more readers are active concurrently with the writer, care must be taken to avoid an inconsistency between the state of these two indices: When writing to the indices, the taxonomy must always be committed to disk *before* the main index, because the main index refers to categories listed in the taxonomy. Such control can best be achieved by turning off the main index's "autocommit" feature, and explicitly calling commit() for both indices (first for the taxonomy, then for the main index). In old versions of Lucene (2.2 or earlier), when autocommit could not be turned off, a more complicated solution needs to be used. E.g., use some sort of (possibly inter-process) locking to ensure that a reader is being opened only right after both indices have been flushed (and before anything else is written to them).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 int addCategory(CategoryPath categoryPath)
addCategory() adds a category with a given path name to the taxonomy, and returns its ordinal.
 int getParent(int ordinal)
getParent() returns the ordinal of the parent category of the category with the given ordinal.
 int getSize()
getSize() returns the number of categories in the taxonomy.
Methods inherited from interface java.io.Closeable
close
Methods inherited from interface org.apache.lucene.util.TwoPhaseCommit
commit, commit, prepareCommit, prepareCommit, rollback

Method Detail

addCategory

int addCategory(CategoryPath categoryPath)
                throws IOException
addCategory() adds a category with a given path name to the taxonomy, and returns its ordinal. If the category was already present in the taxonomy, its existing ordinal is returned.

Before adding a category, addCategory() makes sure that all its ancestor categories exist in the taxonomy as well. As result, the ordinal of a category is guaranteed to be smaller then the ordinal of any of its descendants.

Throws:
IOException

getParent

int getParent(int ordinal)
              throws IOException
getParent() returns the ordinal of the parent category of the category with the given ordinal.

When a category is specified as a path name, finding the path of its parent is as trivial as dropping the last component of the path. getParent() is functionally equivalent to calling getPath() on the given ordinal, dropping the last component of the path, and then calling getOrdinal() to get an ordinal back.

If the given ordinal is the ROOT_ORDINAL, an INVALID_ORDINAL is returned. If the given ordinal is a top-level category, the ROOT_ORDINAL is returned. If an invalid ordinal is given (negative or beyond the last available ordinal), an ArrayIndexOutOfBoundsException is thrown. However, it is expected that getParent will only be called for ordinals which are already known to be in the taxonomy. TODO (Facet): instead of a getParent(ordinal) method, consider having a

getCategory(categorypath, prefixlen) which is similar to addCategory except it doesn't add new categories; This method can be used to get the ordinals of all prefixes of the given category, and it can use exactly the same code and cache used by addCategory() so it means less code.

Throws:
IOException

getSize

int getSize()
getSize() returns the number of categories in the taxonomy.

Because categories are numbered consecutively starting with 0, it means the taxonomy contains ordinals 0 through getSize()-1.

Note that the number returned by getSize() is often slightly higher than the number of categories inserted into the taxonomy; This is because when a category is added to the taxonomy, its ancestors are also added automatically (including the root, which always get ordinal 0).

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.facet.taxonomy.CategoryPath

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.taxonomy.CategoryPath

Packages that use CategoryPath
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.attributes | Category attributes and their properties for indexing
org.apache.lucene.facet.index.categorypolicy | Policies for indexing categories
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.search.params.association | Association-based Parameters for Faceted Search.
org.apache.lucene.facet.search.results | Results of Faceted Search
org.apache.lucene.facet.taxonomy | Taxonomy of Categories
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.facet.taxonomy.writercache | Improves indexing time by caching a map of CategoryPath to their Ordinal
org.apache.lucene.facet.taxonomy.writercache.cl2o | Category->Ordinal caching implementation using an optimized data-structures
org.apache.lucene.facet.taxonomy.writercache.lru | An LRU cache implementation for the CategoryPath to Ordinal map

Uses of CategoryPath in org.apache.lucene.facet.index

Fields in org.apache.lucene.facet.index with type parameters of type CategoryPath
protected  Map<CategoryPath,CategoryAttribute> CategoryContainer.map

Methods in org.apache.lucene.facet.index with parameters of type CategoryPath
CategoryAttribute | CategoryContainer.addCategory(CategoryPath categoryPath) Add a category.
CategoryAttribute | CategoryContainer.addCategory(CategoryPath categoryPath, CategoryProperty... properties) Add a category with multiple properties.
CategoryAttribute | CategoryContainer.addCategory(CategoryPath categoryPath, CategoryProperty property) Add a category with a property.
CategoryAttribute | CategoryContainer.getCategoryAttribute(CategoryPath categoryPath) Get the CategoryAttribute this container has for a certain category, or null if the category is not in the container.

Method parameters in org.apache.lucene.facet.index with type arguments of type CategoryPath
 CategoryDocumentBuilder CategoryDocumentBuilder.setCategoryPaths(Iterable<CategoryPath> categoryPaths)
Set the categories of the document builder from an Iterable of CategoryPath objects.

Uses of CategoryPath in org.apache.lucene.facet.index.attributes

Fields in org.apache.lucene.facet.index.attributes declared as CategoryPath
protected  CategoryPath CategoryAttributeImpl.categoryPath
The category path instance.

Methods in org.apache.lucene.facet.index.attributes that return CategoryPath
CategoryPath | CategoryAttribute.getCategoryPath() Returns the value of this attribute: a category path.
CategoryPath | CategoryAttributeImpl.getCategoryPath() Returns the category path value.

Methods in org.apache.lucene.facet.index.attributes with parameters of type CategoryPath
void | CategoryAttribute.setCategoryPath(CategoryPath cp) Sets the category path value of this attribute.
void | CategoryAttributeImpl.setCategoryPath(CategoryPath cp)

Constructors in org.apache.lucene.facet.index.attributes with parameters of type CategoryPath
CategoryAttributeImpl(CategoryPath categoryPath)
Construct a CategoryAttributeImpl with the given CategoryPath.

Constructor parameters in org.apache.lucene.facet.index.attributes with type arguments of type CategoryPath
CategoryAttributesIterable(Iterable<CategoryPath> inputIterable)

Uses of CategoryPath in org.apache.lucene.facet.index.categorypolicy

Methods in org.apache.lucene.facet.index.categorypolicy with parameters of type CategoryPath
boolean | PathPolicy.shouldAdd(CategoryPath categoryPath) Check whether a given category path should be added to the stream.
boolean | NonTopLevelPathPolicy.shouldAdd(CategoryPath categoryPath) Filters out (returns false) CategoryPaths equal or less than TaxonomyReader.ROOT_ORDINAL.
boolean | DefaultPathPolicy.shouldAdd(CategoryPath categoryPath) Filters out (returns false) CategoryPaths equal or less than TaxonomyReader.ROOT_ORDINAL.

Uses of CategoryPath in org.apache.lucene.facet.index.params

Methods in org.apache.lucene.facet.index.params with parameters of type CategoryPath
void | PerDimensionIndexingParams.addCategoryListParams(CategoryPath category, CategoryListParams clParams) Add a CategoryListParams for a given CategoryPath's dimension or "zero-th" category.
int | DefaultFacetIndexingParams.drillDownTermText(CategoryPath path, char[] buffer)
int | FacetIndexingParams.drillDownTermText(CategoryPath path, char[] buffer) Return the drilldown Term-Text which does not need to do any allocations.
CategoryListParams | DefaultFacetIndexingParams.getCategoryListParams(CategoryPath category)
CategoryListParams | PerDimensionIndexingParams.getCategoryListParams(CategoryPath category) Get the CategoryListParams based on the dimension or "zero-th category" of the specified CategoryPath.
CategoryListParams | FacetIndexingParams.getCategoryListParams(CategoryPath category) The name of the category-list to put this category in, or null if this category should not be aggregatable.

Uses of CategoryPath in org.apache.lucene.facet.index.streaming

Methods in org.apache.lucene.facet.index.streaming with parameters of type CategoryPath
protected  CategoryListPayloadStream CountingListTokenizer.getPayloadStream(CategoryPath categoryPath, int ordinal)

Uses of CategoryPath in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search with parameters of type CategoryPath
static Query | DrillDown.query(FacetIndexingParams iParams, CategoryPath... paths) Return a query for drilling down into all given categories (AND).
static Query | DrillDown.query(FacetIndexingParams iParams, Query baseQuery, CategoryPath... paths) Turn a base query into a drilling-down query for all given category paths (AND).
static Query | DrillDown.query(FacetSearchParams sParams, CategoryPath... paths) Return a query for drilling down into all given categories (AND).
static Query | DrillDown.query(FacetSearchParams sParams, Query baseQuery, CategoryPath... paths) Turn a base query into a drilling-down query for all given category paths (AND).
static Query | DrillDown.query(Query baseQuery, CategoryPath... paths) Turn a base query into a drilling-down query using the default FacetSearchParams
static Term | DrillDown.term(FacetIndexingParams iParams, CategoryPath path) Return a term for drilling down into a category.
static Term | DrillDown.term(FacetSearchParams sParams, CategoryPath path)

Uses of CategoryPath in org.apache.lucene.facet.search.params

Methods in org.apache.lucene.facet.search.params that return CategoryPath
 CategoryPath FacetRequest.getCategoryPath()
The root category of this facet request.

Constructors in org.apache.lucene.facet.search.params with parameters of type CategoryPath
CountFacetRequest(CategoryPath path, int num)
Create a count facet request for a given node in the taxonomy.
FacetRequest(CategoryPath path, int numResults)
Initialize the request with a given path, and a requested number of facets results.
ScoreFacetRequest(CategoryPath path, int num)
Create a score facet request for a given node in the taxonomy.

Uses of CategoryPath in org.apache.lucene.facet.search.params.association

Constructors in org.apache.lucene.facet.search.params.association with parameters of type CategoryPath
AssociationFloatSumFacetRequest(CategoryPath path, int num)
Create a float association facet request for a given node in the taxonomy.
AssociationIntSumFacetRequest(CategoryPath path, int num)
Create an integer association facet request for a given node in the taxonomy.

Uses of CategoryPath in org.apache.lucene.facet.search.results

Methods in org.apache.lucene.facet.search.results that return CategoryPath
CategoryPath | FacetResultNode.getLabel() Category path of the category of this result, or null if not computed, because the application did not request to compute it.
CategoryPath | MutableFacetResultNode.getLabel()
CategoryPath | FacetResultNode.getLabel(TaxonomyReader taxonomyReader) Category path of the category of this result.
CategoryPath | MutableFacetResultNode.getLabel(TaxonomyReader taxonomyReader)

Methods in org.apache.lucene.facet.search.results with parameters of type CategoryPath
 void MutableFacetResultNode.setLabel(CategoryPath label)
Set the label of the category of this result.

Constructors in org.apache.lucene.facet.search.results with parameters of type CategoryPath
MutableFacetResultNode(int ordinal, double value, double residue, CategoryPath label, List<FacetResultNode> subResults)
Create a Facet Result Node.

Uses of CategoryPath in org.apache.lucene.facet.taxonomy

Methods in org.apache.lucene.facet.taxonomy that return CategoryPath
 CategoryPath TaxonomyReader.getPath(int ordinal)
getPath() returns the path name of the category with the given ordinal.

Methods in org.apache.lucene.facet.taxonomy with parameters of type CategoryPath
 int TaxonomyWriter.addCategory(CategoryPath categoryPath)
addCategory() adds a category with a given path name to the taxonomy, and returns its ordinal.
 int CategoryPath.compareTo(CategoryPath other)
Compares this CategoryPath with the other CategoryPath for lexicographic order.
 int TaxonomyReader.getOrdinal(CategoryPath categoryPath)
getOrdinal() returns the ordinal of the category given as a path.
 boolean TaxonomyReader.getPath(int ordinal, CategoryPath result)
getPath() returns the path name of the category with the given ordinal.
 boolean CategoryPath.isDescendantOf(CategoryPath other)
Test whether this object is a descendant of another CategoryPath.

Constructors in org.apache.lucene.facet.taxonomy with parameters of type CategoryPath
CategoryPath(CategoryPath existing)
Construct a new CategoryPath object, copying the path given in an existing CategoryPath object.
CategoryPath(CategoryPath existing, int prefixLen)
Construct a new CategoryPath object, copying a prefix with the given number of components of the path given in an existing CategoryPath object.

Uses of CategoryPath in org.apache.lucene.facet.taxonomy.directory

Methods in org.apache.lucene.facet.taxonomy.directory that return CategoryPath
 CategoryPath DirectoryTaxonomyReader.getPath(int ordinal)

Methods in org.apache.lucene.facet.taxonomy.directory with parameters of type CategoryPath
int | DirectoryTaxonomyWriter.addCategory(CategoryPath categoryPath)
protected int | DirectoryTaxonomyWriter.addCategoryDocument(CategoryPath categoryPath, int length, int parent)
protected int | DirectoryTaxonomyWriter.findCategory(CategoryPath categoryPath) Look up the given category in the cache and/or the on-disk storage, returning the category's ordinal, or a negative number in case the category does not yet exist in the taxonomy.
int | DirectoryTaxonomyReader.getOrdinal(CategoryPath categoryPath)
boolean | DirectoryTaxonomyReader.getPath(int ordinal, CategoryPath result)

Uses of CategoryPath in org.apache.lucene.facet.taxonomy.writercache

Methods in org.apache.lucene.facet.taxonomy.writercache with parameters of type CategoryPath
 int TaxonomyWriterCache.get(CategoryPath categoryPath)
Lookup a category in the cache, returning its ordinal, or a negative number if the category is not in the cache.
 int TaxonomyWriterCache.get(CategoryPath categoryPath, int length)
Like TaxonomyWriterCache.get(CategoryPath), but for a given prefix of the category path.
 boolean TaxonomyWriterCache.put(CategoryPath categoryPath, int ordinal)
Add a category to the cache, with the given ordinal as the value.
 boolean TaxonomyWriterCache.put(CategoryPath categoryPath, int prefixLen, int ordinal)
Like TaxonomyWriterCache.put(CategoryPath, int), but for a given prefix of the category path.

Uses of CategoryPath in org.apache.lucene.facet.taxonomy.writercache.cl2o

Methods in org.apache.lucene.facet.taxonomy.writercache.cl2o with parameters of type CategoryPath
abstract void | LabelToOrdinal.addLabel(CategoryPath label, int ordinal) Adds a new label if its not yet in the table.
void | CompactLabelToOrdinal.addLabel(CategoryPath label, int ordinal)
int | CollisionMap.addLabel(CategoryPath label, int hash, int cid)
abstract void | LabelToOrdinal.addLabel(CategoryPath label, int prefixLen, int ordinal) Adds a new label if its not yet in the table.
void | CompactLabelToOrdinal.addLabel(CategoryPath label, int prefixLen, int ordinal)
int | CollisionMap.addLabel(CategoryPath label, int prefixLen, int hash, int cid)
int | Cl2oTaxonomyWriterCache.get(CategoryPath categoryPath)
int | CollisionMap.get(CategoryPath label, int hash)
int | Cl2oTaxonomyWriterCache.get(CategoryPath categoryPath, int length)
int | CollisionMap.get(CategoryPath label, int prefixLen, int hash)
abstract int | LabelToOrdinal.getOrdinal(CategoryPath label)
int | CompactLabelToOrdinal.getOrdinal(CategoryPath label)
abstract int | LabelToOrdinal.getOrdinal(CategoryPath label, int prefixLen)
int | CompactLabelToOrdinal.getOrdinal(CategoryPath label, int prefixLen)
boolean | Cl2oTaxonomyWriterCache.put(CategoryPath categoryPath, int ordinal)
boolean | Cl2oTaxonomyWriterCache.put(CategoryPath categoryPath, int prefixLen, int ordinal)

Uses of CategoryPath in org.apache.lucene.facet.taxonomy.writercache.lru

Methods in org.apache.lucene.facet.taxonomy.writercache.lru with parameters of type CategoryPath
int | LruTaxonomyWriterCache.get(CategoryPath categoryPath)
int | LruTaxonomyWriterCache.get(CategoryPath categoryPath, int length)
boolean | LruTaxonomyWriterCache.put(CategoryPath categoryPath, int ordinal)
boolean | LruTaxonomyWriterCache.put(CategoryPath categoryPath, int prefixLen, int ordinal)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.taxonomy.InconsistentTaxonomyException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.taxonomy.InconsistentTaxonomyException

Packages that use InconsistentTaxonomyException
org.apache.lucene.facet.taxonomy | Taxonomy of Categories
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index

Uses of InconsistentTaxonomyException in org.apache.lucene.facet.taxonomy

Methods in org.apache.lucene.facet.taxonomy that throw InconsistentTaxonomyException
 boolean TaxonomyReader.refresh()
refresh() re-reads the taxonomy information if there were any changes to the taxonomy since this instance was opened or last refreshed.

Uses of InconsistentTaxonomyException in org.apache.lucene.facet.taxonomy.directory

Methods in org.apache.lucene.facet.taxonomy.directory that throw InconsistentTaxonomyException
 boolean DirectoryTaxonomyReader.refresh()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.taxonomy.TaxonomyReader.ChildrenArrays

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.taxonomy.TaxonomyReader.ChildrenArrays

Packages that use TaxonomyReader.ChildrenArrays
org.apache.lucene.facet.taxonomy | Taxonomy of Categories
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index

Uses of TaxonomyReader.ChildrenArrays in org.apache.lucene.facet.taxonomy

Methods in org.apache.lucene.facet.taxonomy that return TaxonomyReader.ChildrenArrays
 TaxonomyReader.ChildrenArrays TaxonomyReader.getChildrenArrays()
getChildrenArrays() returns a TaxonomyReader.ChildrenArrays object which can be used together to efficiently enumerate the children of any category.

Uses of TaxonomyReader.ChildrenArrays in org.apache.lucene.facet.taxonomy.directory

Methods in org.apache.lucene.facet.taxonomy.directory that return TaxonomyReader.ChildrenArrays
 TaxonomyReader.ChildrenArrays DirectoryTaxonomyReader.getChildrenArrays()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.taxonomy.TaxonomyReader

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.taxonomy.TaxonomyReader

Packages that use TaxonomyReader
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.cache | Caching to speed up facets accumulation.
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.search.params.association | Association-based Parameters for Faceted Search.
org.apache.lucene.facet.search.results | Results of Faceted Search
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.facet.util | Various utilities for faceted search

Uses of TaxonomyReader in org.apache.lucene.benchmark.byTask

Methods in org.apache.lucene.benchmark.byTask that return TaxonomyReader
 TaxonomyReader PerfRunData.getTaxonomyReader()

Methods in org.apache.lucene.benchmark.byTask with parameters of type TaxonomyReader
 void PerfRunData.setTaxonomyReader(TaxonomyReader taxoReader)
Set the taxonomy reader.

Uses of TaxonomyReader in org.apache.lucene.facet.search

Fields in org.apache.lucene.facet.search declared as TaxonomyReader
protected TaxonomyReader | FacetsAccumulator.taxonomyReader
protected TaxonomyReader | FacetResultsHandler.taxonomyReader Taxonomy for which facets are handled

Methods in org.apache.lucene.facet.search that return TaxonomyReader
 TaxonomyReader FacetResultsHandler.getTaxonomyReader()
Return taxonomy reader used for current facets accumulation operation.

Methods in org.apache.lucene.facet.search with parameters of type TaxonomyReader
 TotalFacetCounts TotalFacetCountsCache.getTotalCounts(IndexReader indexReader, TaxonomyReader taxonomy, FacetIndexingParams facetIndexingParams, CategoryListCache clCache)
Get the total facet counts for a reader/taxonomy pair and facet indexing parameters.
protected  FacetsAccumulator FacetsCollector.initFacetsAccumulator(FacetSearchParams facetSearchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Create the FacetsAccumulator to be used.
protected  ScoredDocIdCollector FacetsCollector.initScoredDocCollector(FacetSearchParams facetSearchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Create a ScoredDocIdCollector to be used as the first phase of the facet collection.
 void TotalFacetCountsCache.load(File inputFile, IndexReader indexReader, TaxonomyReader taxonomy, FacetIndexingParams facetIndexingParams)
Load TotalFacetCounts matching input parameters from the provided outputFile and add them into the cache for the provided indexReader, taxonomy, and facetIndexingParams.
 void TotalFacetCountsCache.store(File outputFile, IndexReader indexReader, TaxonomyReader taxonomy, FacetIndexingParams facetIndexingParams, CategoryListCache clCache)
Store the TotalFacetCounts matching input parameters into the provided outputFile, making them available for a later call to TotalFacetCountsCache.load(File, IndexReader, TaxonomyReader, FacetIndexingParams).

Constructors in org.apache.lucene.facet.search with parameters of type TaxonomyReader
AdaptiveFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Create an AdaptiveFacetsAccumulator
AdaptiveFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Create an AdaptiveFacetsAccumulator
FacetResultsHandler(TaxonomyReader taxonomyReader, FacetRequest facetRequest)
Create a faceted search handler.
FacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
FacetsCollector(FacetSearchParams facetSearchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Create a collector for accumulating facets while collecting documents during search.
StandardFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
StandardFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
TopKFacetResultsHandler(TaxonomyReader taxonomyReader, FacetRequest facetRequest)
Construct top-K results handler.
TopKInEachNodeHandler(TaxonomyReader taxonomyReader, FacetRequest facetRequest)

Uses of TaxonomyReader in org.apache.lucene.facet.search.cache

Methods in org.apache.lucene.facet.search.cache with parameters of type TaxonomyReader
 void CategoryListCache.loadAndRegister(CategoryListParams clp, IndexReader reader, TaxonomyReader taxo, FacetIndexingParams iparams)
Load and register CategoryListData.

Uses of TaxonomyReader in org.apache.lucene.facet.search.params

Methods in org.apache.lucene.facet.search.params with parameters of type TaxonomyReader
Aggregator | CountFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)
abstract Aggregator | FacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader indexReader, TaxonomyReader taxonomy) Create an aggregator for this facet request.
Aggregator | ScoreFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)
CategoryListIterator | FacetRequest.createCategoryListIterator(IndexReader reader, TaxonomyReader taxo, FacetSearchParams sParams, int partition) Create the category list iterator for the specified partition.
FacetResultsHandler | FacetRequest.createFacetResultsHandler(TaxonomyReader taxonomyReader) Creates a new FacetResultsHandler that matches the request logic and current settings, such as depth, limits-mode, etc, as well as the passed in TaxonomyReader.

Uses of TaxonomyReader in org.apache.lucene.facet.search.params.association

Methods in org.apache.lucene.facet.search.params.association with parameters of type TaxonomyReader
Aggregator | AssociationFloatSumFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)
Aggregator | AssociationIntSumFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)

Uses of TaxonomyReader in org.apache.lucene.facet.search.results

Methods in org.apache.lucene.facet.search.results with parameters of type TaxonomyReader
CategoryPath | FacetResultNode.getLabel(TaxonomyReader taxonomyReader) Category path of the category of this result.
CategoryPath | MutableFacetResultNode.getLabel(TaxonomyReader taxonomyReader)

Uses of TaxonomyReader in org.apache.lucene.facet.search.sampling

Methods in org.apache.lucene.facet.search.sampling with parameters of type TaxonomyReader
 SampleFixer Sampler.getSampleFixer(IndexReader indexReader, TaxonomyReader taxonomyReader, FacetSearchParams searchParams)
Get a fixer of sample facet accumulation results.

Constructors in org.apache.lucene.facet.search.sampling with parameters of type TaxonomyReader
SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Constructor...
SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Constructor...

Uses of TaxonomyReader in org.apache.lucene.facet.taxonomy.directory

Classes in org.apache.lucene.facet.taxonomy.directory that implement TaxonomyReader
 class DirectoryTaxonomyReader
A TaxonomyReader which retrieves stored taxonomy information from a Directory.

Uses of TaxonomyReader in org.apache.lucene.facet.util

Methods in org.apache.lucene.facet.util with parameters of type TaxonomyReader
static int | PartitionsUtils.partitionOffset(FacetIndexingParams iParams, int partitionNumber, TaxonomyReader taxonomyReader) Get the offset for a given partition.
static int | PartitionsUtils.partitionOffset(FacetSearchParams sParams, int partitionNumber, TaxonomyReader taxonomyReader)
static int | PartitionsUtils.partitionSize(FacetIndexingParams indexingParams, TaxonomyReader taxonomyReader) Get the partition size in this parameter, or return the size of the taxonomy, which is smaller.
static int | PartitionsUtils.partitionSize(FacetSearchParams sParams, TaxonomyReader taxonomyReader)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.taxonomy.TaxonomyWriter

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.taxonomy.TaxonomyWriter

Packages that use TaxonomyWriter
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.categorypolicy | Policies for indexing categories
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index

Uses of TaxonomyWriter in org.apache.lucene.benchmark.byTask

Methods in org.apache.lucene.benchmark.byTask that return TaxonomyWriter
 TaxonomyWriter PerfRunData.getTaxonomyWriter()

Methods in org.apache.lucene.benchmark.byTask with parameters of type TaxonomyWriter
 void PerfRunData.setTaxonomyWriter(TaxonomyWriter taxoWriter)

Uses of TaxonomyWriter in org.apache.lucene.facet.enhancements

Methods in org.apache.lucene.facet.enhancements with parameters of type TaxonomyWriter
 CategoryListTokenizer CategoryEnhancement.getCategoryListTokenizer(TokenStream tokenizer, EnhancementsIndexingParams indexingParams, TaxonomyWriter taxonomyWriter)
Get the CategoryListTokenizer which generates the category list for this enhancement.

Constructors in org.apache.lucene.facet.enhancements with parameters of type TaxonomyWriter
EnhancementsDocumentBuilder(TaxonomyWriter taxonomyWriter, EnhancementsIndexingParams params)

Uses of TaxonomyWriter in org.apache.lucene.facet.enhancements.association

Methods in org.apache.lucene.facet.enhancements.association with parameters of type TaxonomyWriter
 CategoryListTokenizer AssociationEnhancement.getCategoryListTokenizer(TokenStream tokenizer, EnhancementsIndexingParams indexingParams, TaxonomyWriter taxonomyWriter)

Uses of TaxonomyWriter in org.apache.lucene.facet.index

Fields in org.apache.lucene.facet.index declared as TaxonomyWriter
protected  TaxonomyWriter CategoryDocumentBuilder.taxonomyWriter
A TaxonomyWriter for adding categories and retrieving their ordinals.

Constructors in org.apache.lucene.facet.index with parameters of type TaxonomyWriter
CategoryDocumentBuilder(TaxonomyWriter taxonomyWriter)
Creating a facets document builder with default facet indexing parameters.
See: CategoryDocumentBuilder.CategoryDocumentBuilder(TaxonomyWriter, FacetIndexingParams)
CategoryDocumentBuilder(TaxonomyWriter taxonomyWriter, FacetIndexingParams params)
Creating a facets document builder with a given facet indexing parameters object.

Uses of TaxonomyWriter in org.apache.lucene.facet.index.categorypolicy

Methods in org.apache.lucene.facet.index.categorypolicy with parameters of type TaxonomyWriter
void | DefaultOrdinalPolicy.init(TaxonomyWriter taxonomyWriter) Implemented as NO-OP as the default is not taxonomy dependent
void | OrdinalPolicy.init(TaxonomyWriter taxonomyWriter) Initialize the policy with a TaxonomyWriter.
void | NonTopLevelOrdinalPolicy.init(TaxonomyWriter taxonomyWriter)

Uses of TaxonomyWriter in org.apache.lucene.facet.index.streaming

Fields in org.apache.lucene.facet.index.streaming declared as TaxonomyWriter
protected  TaxonomyWriter CategoryParentsStream.taxonomyWriter
A TaxonomyWriter for adding categories and retrieving their ordinals.

Constructors in org.apache.lucene.facet.index.streaming with parameters of type TaxonomyWriter
CategoryParentsStream(CategoryAttributesStream input, TaxonomyWriter taxonomyWriter, FacetIndexingParams indexingParams)
Constructor.

Uses of TaxonomyWriter in org.apache.lucene.facet.taxonomy.directory

Classes in org.apache.lucene.facet.taxonomy.directory that implement TaxonomyWriter
 class DirectoryTaxonomyWriter
TaxonomyWriter which uses a Directory to store the taxonomy information on disk, and keeps an additional in-memory cache of some or all categories.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


DirectoryTaxonomyReader

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy.directory
Class DirectoryTaxonomyReader

java.lang.Object
    extended by  org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader
All Implemented Interfaces:
Closeable, TaxonomyReader
public class DirectoryTaxonomyReader
extends Object
implements TaxonomyReader

A TaxonomyReader which retrieves stored taxonomy information from a Directory.

Reading from the on-disk index on every method call is too slow, so this implementation employs caching: Some methods cache recent requests and their results, while other methods prefetch all the data into memory and then provide answers directly from in-memory tables. See the documentation of individual methods for comments on their performance.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.facet.taxonomy.TaxonomyReader
TaxonomyReader.ChildrenArrays
Field Summary
Fields inherited from interface org.apache.lucene.facet.taxonomy.TaxonomyReader
INVALID_ORDINAL, ROOT_ORDINAL
Constructor Summary
DirectoryTaxonomyReader(Directory directory)
Open for reading a taxonomy stored in a given Directory.
Method Summary
 void close()
 void decRef()
Expert: decreases the refCount of this TaxonomyReader instance.
protected  void ensureOpen()
 TaxonomyReader.ChildrenArrays getChildrenArrays()
getChildrenArrays() returns a TaxonomyReader.ChildrenArrays object which can be used together to efficiently enumerate the children of any category.
 Map<String,String> getCommitUserData()
Retrieve user committed data.
 int getOrdinal(CategoryPath categoryPath)
getOrdinal() returns the ordinal of the category given as a path.
 int getParent(int ordinal)
getParent() returns the ordinal of the parent category of the category with the given ordinal.
 int[] getParentArray()
getParentArray() returns an int array of size getSize() listing the ordinal of the parent category of each category in the taxonomy.
 CategoryPath getPath(int ordinal)
getPath() returns the path name of the category with the given ordinal.
 boolean getPath(int ordinal, CategoryPath result)
getPath() returns the path name of the category with the given ordinal.
 int getRefCount()
Expert: returns the current refCount for this taxonomy reader
 int getSize()
getSize() returns the number of categories in the taxonomy.
 void incRef()
Expert: increments the refCount of this TaxonomyReader instance.
protected  IndexReader openIndexReader(Directory directory)
 boolean refresh()
refresh() re-reads the taxonomy information if there were any changes to the taxonomy since this instance was opened or last refreshed.
 void setCacheSize(int size)
setCacheSize controls the maximum allowed size of each of the caches used by getPath(int) and getOrdinal(CategoryPath).
 void setDelimiter(char delimiter)
setDelimiter changes the character that the taxonomy uses in its internal storage as a delimiter between category components.
 String toString(int max)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DirectoryTaxonomyReader

public DirectoryTaxonomyReader(Directory directory)
                        throws IOException
Open for reading a taxonomy stored in a given Directory.

Parameters:
directory - The Directory in which to the taxonomy lives. Note that the taxonomy is read directly to that directory (not from a subdirectory of it).
Throws:
CorruptIndexException - if the Taxonomy is corrupted.
IOException - if another error occurred.
Method Detail

openIndexReader

protected IndexReader openIndexReader(Directory directory)
                               throws CorruptIndexException,
                                      IOException
Throws:
CorruptIndexException
IOException

ensureOpen

protected final void ensureOpen()
                         throws AlreadyClosedException
Throws:
AlreadyClosedException - if this IndexReader is closed

setCacheSize

public void setCacheSize(int size)
setCacheSize controls the maximum allowed size of each of the caches used by getPath(int) and getOrdinal(CategoryPath).

Currently, if the given size is smaller than the current size of a cache, it will not shrink, and rather we be limited to its current size.

Parameters:
size - the new maximum cache size, in number of entries.

setDelimiter

public void setDelimiter(char delimiter)
setDelimiter changes the character that the taxonomy uses in its internal storage as a delimiter between category components. Do not use this method unless you really know what you are doing.

If you do use this method, make sure you call it before any other methods that actually queries the taxonomy. Moreover, make sure you always pass the same delimiter for all LuceneTaxonomyWriter and LuceneTaxonomyReader objects you create.

getOrdinal

public int getOrdinal(CategoryPath categoryPath)
               throws IOException
Description copied from interface: TaxonomyReader
getOrdinal() returns the ordinal of the category given as a path. The ordinal is the category's serial number, an integer which starts with 0 and grows as more categories are added (note that once a category is added, it can never be deleted).

If the given category wasn't found in the taxonomy, INVALID_ORDINAL is returned.

Specified by:
getOrdinal in interface TaxonomyReader
Throws:
IOException

getPath

public CategoryPath getPath(int ordinal)
                     throws CorruptIndexException,
                            IOException
Description copied from interface: TaxonomyReader
getPath() returns the path name of the category with the given ordinal. The path is returned as a new CategoryPath object - to reuse an existing object, use TaxonomyReader.getPath(int, CategoryPath).

A null is returned if a category with the given ordinal does not exist.

Specified by:
getPath in interface TaxonomyReader
Throws:
CorruptIndexException
IOException

getPath

public boolean getPath(int ordinal,
                       CategoryPath result)
                throws CorruptIndexException,
                       IOException
Description copied from interface: TaxonomyReader
getPath() returns the path name of the category with the given ordinal. The path is written to the given CategoryPath object (which is cleared first).

If a category with the given ordinal does not exist, the given CategoryPath object is not modified, and the method returns false. Otherwise, the method returns true.

Specified by:
getPath in interface TaxonomyReader
Throws:
CorruptIndexException
IOException

getParent

public int getParent(int ordinal)
Description copied from interface: TaxonomyReader
getParent() returns the ordinal of the parent category of the category with the given ordinal.

When a category is specified as a path name, finding the path of its parent is as trivial as dropping the last component of the path. getParent() is functionally equivalent to calling getPath() on the given ordinal, dropping the last component of the path, and then calling getOrdinal() to get an ordinal back. However, implementations are expected to provide a much more efficient implementation:

getParent() should be a very quick method, as it is used during the facet aggregation process in faceted search. Implementations will most likely want to serve replies to this method from a pre-filled cache.

If the given ordinal is the ROOT_ORDINAL, an INVALID_ORDINAL is returned. If the given ordinal is a top-level category, the ROOT_ORDINAL is returned. If an invalid ordinal is given (negative or beyond the last available ordinal), an ArrayIndexOutOfBoundsException is thrown. However, it is expected that getParent will only be called for ordinals which are already known to be in the taxonomy.

Specified by:
getParent in interface TaxonomyReader

getParentArray

public int[] getParentArray()
getParentArray() returns an int array of size getSize() listing the ordinal of the parent category of each category in the taxonomy.

The caller can hold on to the array it got indefinitely - it is guaranteed that no-one else will modify it. The other side of the same coin is that the caller must treat the array it got as read-only and not modify it, because other callers might have gotten the same array too, and getParent() calls are also answered from the same array.

The getParentArray() call is extremely efficient, merely returning a reference to an array that already exists. For a caller that plans to call getParent() for many categories, using getParentArray() and the array it returns is a somewhat faster approach because it avoids the overhead of method calls and volatile dereferencing.

If you use getParentArray() instead of getParent(), remember that the array you got is (naturally) not modified after a refresh(), so you should always call getParentArray() again after a refresh().

Specified by:
getParentArray in interface TaxonomyReader

refresh

public boolean refresh()
                throws IOException,
                       InconsistentTaxonomyException
Description copied from interface: TaxonomyReader
refresh() re-reads the taxonomy information if there were any changes to the taxonomy since this instance was opened or last refreshed. Calling refresh() is more efficient than close()ing the old instance and opening a new one.

If there were no changes since this instance was opened or last refreshed, then this call does nothing. Note, however, that this is still a relatively slow method (as it needs to verify whether there have been any changes on disk to the taxonomy), so it should not be called too often needlessly. In faceted search, the taxonomy reader's refresh() should be called only after a reopen() of the main index.

Refreshing the taxonomy might fail in some cases, for example if the taxonomy was recreated since this instance was opened or last refreshed. In this case an InconsistentTaxonomyException is thrown, suggesting that in order to obtain up-to-date taxonomy data a new TaxonomyReader should be opened. Note: This TaxonomyReader instance remains unchanged and usable in this case, and the application can continue to use it, and should still Closeable.close() when no longer needed.

It should be noted that refresh() is similar in purpose to IndexReader.reopen(), but the two methods behave differently. refresh() refreshes the existing TaxonomyReader object, rather than opening a new one in addition to the old one as reopen() does. The reason is that in a taxonomy, one can only add new categories and cannot modify or delete existing categories; Therefore, there is no reason to keep an old snapshot of the taxonomy open - refreshing the taxonomy to the newest data and using this new snapshots in all threads (whether new or old) is fine. This saves us needing to keep multiple copies of the taxonomy open in memory.

Specified by:
refresh in interface TaxonomyReader
Returns:
true if anything has changed, false otherwise.
Throws:
IOException
InconsistentTaxonomyException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException

getSize

public int getSize()
Description copied from interface: TaxonomyReader
getSize() returns the number of categories in the taxonomy.

Because categories are numbered consecutively starting with 0, it means the taxonomy contains ordinals 0 through getSize()-1.

Note that the number returned by getSize() is often slightly higher than the number of categories inserted into the taxonomy; This is because when a category is added to the taxonomy, its ancestors are also added automatically (including the root, which always get ordinal 0).

Specified by:
getSize in interface TaxonomyReader

getCommitUserData

public Map<String,String> getCommitUserData()
                                     throws IOException
Description copied from interface: TaxonomyReader
Retrieve user committed data.

Specified by:
getCommitUserData in interface TaxonomyReader
Throws:
IOException
See Also:
TwoPhaseCommit.commit(Map)

getChildrenArrays

public TaxonomyReader.ChildrenArrays getChildrenArrays()
Description copied from interface: TaxonomyReader
getChildrenArrays() returns a TaxonomyReader.ChildrenArrays object which can be used together to efficiently enumerate the children of any category.

The caller can hold on to the object it got indefinitely - it is guaranteed that no-one else will modify it. The other side of the same coin is that the caller must treat the object which it got (and the arrays it contains) as read-only and not modify it, because other callers might have gotten the same object too.

Implementations should have O(getSize()) time for the first call or after a refresh(), but O(1) time for further calls. In neither case there should be a need to read new data from disk. These guarantees are most likely achieved by calculating this object (based on the getParentArray()) when first needed, and later (if the taxonomy was not refreshed) returning the same object (without any allocation or copying) when requested.

The reason we have one method returning one object, rather than two methods returning two arrays, is to avoid race conditions in a multi- threaded application: We want to avoid the possibility of returning one new array and one old array, as those could not be used together.

Specified by:
getChildrenArrays in interface TaxonomyReader

toString

public String toString(int max)

decRef

public void decRef()
            throws IOException
Expert: decreases the refCount of this TaxonomyReader instance. If the refCount drops to 0, then this reader is closed.

Specified by:
decRef in interface TaxonomyReader
Throws:
IOException

getRefCount

public int getRefCount()
Expert: returns the current refCount for this taxonomy reader

Specified by:
getRefCount in interface TaxonomyReader

incRef

public void incRef()
Expert: increments the refCount of this TaxonomyReader instance. RefCounts are used to determine when a taxonomy reader can be closed safely, i.e. as soon as there are no more references. Be sure to always call a corresponding decRef(), in a finally clause; otherwise the reader may never be closed.

Specified by:
incRef in interface TaxonomyReader
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DirectoryTaxonomyWriter.DiskOrdinalMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy.directory
Class DirectoryTaxonomyWriter.DiskOrdinalMap

java.lang.Object
    extended by  org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.DiskOrdinalMap
All Implemented Interfaces:
DirectoryTaxonomyWriter.OrdinalMap
Enclosing class:
DirectoryTaxonomyWriter
public static final class DirectoryTaxonomyWriter.DiskOrdinalMap
extends Object
implements DirectoryTaxonomyWriter.OrdinalMap

DirectoryTaxonomyWriter.OrdinalMap maintained on file system

Constructor Summary
DirectoryTaxonomyWriter.DiskOrdinalMap(File tmpfile)
Method Summary
 void addDone()
Call addDone() to say that all addMapping() have been done.
 void addMapping(int origOrdinal, int newOrdinal)
 int[] getMap()
Return the map from the taxonomy's original (consecutive) ordinals to the new taxonomy's ordinals.
 void setSize(int taxonomySize)
Set the size of the map.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DirectoryTaxonomyWriter.DiskOrdinalMap

public DirectoryTaxonomyWriter.DiskOrdinalMap(File tmpfile)
                                       throws FileNotFoundException
Throws:
FileNotFoundException
Method Detail

addMapping

public void addMapping(int origOrdinal,
                       int newOrdinal)
                throws IOException
Specified by:
addMapping in interface DirectoryTaxonomyWriter.OrdinalMap
Throws:
IOException

setSize

public void setSize(int taxonomySize)
             throws IOException
Description copied from interface: DirectoryTaxonomyWriter.OrdinalMap
Set the size of the map. This MUST be called before addMapping(). It is assumed (but not verified) that addMapping() will then be called exactly 'size' times, with different origOrdinals between 0 and size-1.

Specified by:
setSize in interface DirectoryTaxonomyWriter.OrdinalMap
Throws:
IOException

addDone

public void addDone()
             throws IOException
Description copied from interface: DirectoryTaxonomyWriter.OrdinalMap
Call addDone() to say that all addMapping() have been done. In some implementations this might free some resources.

Specified by:
addDone in interface DirectoryTaxonomyWriter.OrdinalMap
Throws:
IOException

getMap

public int[] getMap()
             throws IOException
Description copied from interface: DirectoryTaxonomyWriter.OrdinalMap
Return the map from the taxonomy's original (consecutive) ordinals to the new taxonomy's ordinals. If the map has to be read from disk and ordered appropriately, it is done when getMap() is called. getMap() should only be called once, and only when the map is actually needed. Calling it will also free all resources that the map might be holding (such as temporary disk space), other than the returned int[].

Specified by:
getMap in interface DirectoryTaxonomyWriter.OrdinalMap
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DirectoryTaxonomyWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy.directory
Class DirectoryTaxonomyWriter

java.lang.Object
    extended by  org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter
All Implemented Interfaces:
Closeable, TaxonomyWriter, TwoPhaseCommit
public class DirectoryTaxonomyWriter
extends Object
implements TaxonomyWriter

TaxonomyWriter which uses a Directory to store the taxonomy information on disk, and keeps an additional in-memory cache of some or all categories.

In addition to the permanently-stored information in the Directory, efficiency dictates that we also keep an in-memory cache of recently seen or all categories, so that we do not need to go back to disk for every category addition to see which ordinal this category already has, if any. A TaxonomyWriterCache object determines the specific caching algorithm used.

This class offers some hooks for extending classes to control the IndexWriter instance that is used. See openIndexWriter(org.apache.lucene.store.Directory, org.apache.lucene.index.IndexWriterConfig).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | DirectoryTaxonomyWriter.DiskOrdinalMap DirectoryTaxonomyWriter.OrdinalMap maintained on file system
static class | DirectoryTaxonomyWriter.MemoryOrdinalMap DirectoryTaxonomyWriter.OrdinalMap maintained in memory
static interface | DirectoryTaxonomyWriter.OrdinalMap Mapping from old ordinal to new ordinals, used when merging indexes wit separate taxonomies.
Field Summary
static String INDEX_CREATE_TIME
Property name of user commit data that contains the creation time of a taxonomy index.
Constructor Summary
DirectoryTaxonomyWriter(Directory d)
DirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode)
Creates a new instance with a default cached as defined by defaultTaxonomyWriterCache().
DirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode, TaxonomyWriterCache cache)
Construct a Taxonomy writer.
Method Summary
 int addCategory(CategoryPath categoryPath)
addCategory() adds a category with a given path name to the taxonomy, and returns its ordinal.
protected  int addCategoryDocument(CategoryPath categoryPath, int length, int parent)
 void addTaxonomy(Directory taxoDir, DirectoryTaxonomyWriter.OrdinalMap map)
Takes the categories from the given taxonomy directory, and adds the missing ones to this taxonomy.
 void close()
Frees used resources as well as closes the underlying IndexWriter, which commits whatever changes made to it to the underlying Directory.
protected  void closeResources()
A hook for extending classes to close additional resources that were used.
 void commit()
Calling commit() ensures that all the categories written so far are visible to a reader that is opened (or reopened) after that call.
 void commit(Map<String,String> commitUserData)
Like commit(), but also store properties with the index.
protected  IndexWriterConfig createIndexWriterConfig(IndexWriterConfig.OpenMode openMode)
Create the IndexWriterConfig that would be used for opening the internal index writer.
static TaxonomyWriterCache defaultTaxonomyWriterCache()
Defines the default TaxonomyWriterCache to use in constructors which do not specify one.
protected  void ensureOpen()
Verifies that this instance wasn't closed, or throws AlreadyClosedException if it is.
protected  int findCategory(CategoryPath categoryPath)
Look up the given category in the cache and/or the on-disk storage, returning the category's ordinal, or a negative number in case the category does not yet exist in the taxonomy.
 int getCacheMemoryUsage()
Returns the number of memory bytes used by the cache.
 int getParent(int ordinal)
getParent() returns the ordinal of the parent category of the category with the given ordinal.
 int getSize()
getSize() returns the number of categories in the taxonomy.
protected  IndexWriter openIndexWriter(Directory directory, IndexWriterConfig config)
Open internal index writer, which contains the taxonomy data.
protected  IndexReader openReader()
Open an IndexReader from the internal IndexWriter, by calling IndexReader.open(IndexWriter, boolean).
 void prepareCommit()
prepare most of the work needed for a two-phase commit.
 void prepareCommit(Map<String,String> commitUserData)
Like above, and also prepares to store user data with the index.
 void rollback()
Rollback changes to the taxonomy writer and closes the instance.
 void setCacheMissesUntilFill(int i)
Set the number of cache misses before an attempt is made to read the entire taxonomy into the in-memory cache.
 void setDelimiter(char delimiter)
setDelimiter changes the character that the taxonomy uses in its internal storage as a delimiter between category components.
static void unlock(Directory directory)
Forcibly unlocks the taxonomy in the named directory.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

INDEX_CREATE_TIME

public static final String INDEX_CREATE_TIME
Property name of user commit data that contains the creation time of a taxonomy index.

Applications should not use this property in their commit data because it will be overridden by this taxonomy writer.

See Also:
Constant Field Values
Constructor Detail

DirectoryTaxonomyWriter

public DirectoryTaxonomyWriter(Directory directory,
                               IndexWriterConfig.OpenMode openMode,
                               TaxonomyWriterCache cache)
                        throws IOException
Construct a Taxonomy writer.

Parameters:
directory - The Directory in which to store the taxonomy. Note that the taxonomy is written directly to that directory (not to a subdirectory of it).
openMode - Specifies how to open a taxonomy for writing: APPEND means open an existing index for append (failing if the index does not yet exist). CREATE means create a new index (first deleting the old one if it already existed). APPEND_OR_CREATE appends to an existing index if there is one, otherwise it creates a new index.
cache - A TaxonomyWriterCache implementation which determines the in-memory caching policy. See for example LruTaxonomyWriterCache and Cl2oTaxonomyWriterCache. If null or missing, defaultTaxonomyWriterCache() is used.
Throws:
CorruptIndexException - if the taxonomy is corrupted.
LockObtainFailedException - if the taxonomy is locked by another writer. If it is known that no other concurrent writer is active, the lock might have been left around by an old dead process, and should be removed using unlock(Directory).
IOException - if another error occurred.

DirectoryTaxonomyWriter

public DirectoryTaxonomyWriter(Directory directory,
                               IndexWriterConfig.OpenMode openMode)
                        throws CorruptIndexException,
                               LockObtainFailedException,
                               IOException
Creates a new instance with a default cached as defined by defaultTaxonomyWriterCache().

Throws:
CorruptIndexException
LockObtainFailedException
IOException

DirectoryTaxonomyWriter

public DirectoryTaxonomyWriter(Directory d)
                        throws CorruptIndexException,
                               LockObtainFailedException,
                               IOException
Throws:
CorruptIndexException
LockObtainFailedException
IOException
Method Detail

setDelimiter

public void setDelimiter(char delimiter)
setDelimiter changes the character that the taxonomy uses in its internal storage as a delimiter between category components. Do not use this method unless you really know what you are doing. It has nothing to do with whatever character the application may be using to represent categories for its own use.

If you do use this method, make sure you call it before any other methods that actually queries the taxonomy. Moreover, make sure you always pass the same delimiter for all LuceneTaxonomyWriter and LuceneTaxonomyReader objects you create for the same directory.

unlock

public static void unlock(Directory directory)
                   throws IOException
Forcibly unlocks the taxonomy in the named directory.

Caution: this should only be used by failure recovery code, when it is known that no other process nor thread is in fact currently accessing this taxonomy.

This method is unnecessary if your Directory uses a NativeFSLockFactory instead of the default SimpleFSLockFactory. When the "native" lock is used, a lock does not stay behind forever when the process using it dies.

Throws:
IOException

openIndexWriter

protected IndexWriter openIndexWriter(Directory directory,
                                      IndexWriterConfig config)
                               throws IOException
Open internal index writer, which contains the taxonomy data.

Extensions may provide their own IndexWriter implementation or instance.
NOTE: the instance this method returns will be closed upon calling to close().
NOTE: the merge policy in effect must not merge none adjacent segments. See comment in createIndexWriterConfig(IndexWriterConfig.OpenMode) for the logic behind this.

Parameters:
directory - the Directory on top of which an IndexWriter should be opened.
config - configuration for the internal index writer.
Throws:
IOException
See Also:
createIndexWriterConfig(IndexWriterConfig.OpenMode)

createIndexWriterConfig

protected IndexWriterConfig createIndexWriterConfig(IndexWriterConfig.OpenMode openMode)
Create the IndexWriterConfig that would be used for opening the internal index writer.
Extensions can configure the IndexWriter as they see fit, including setting a merge-scheduler, or deletion-policy, different RAM size etc.

NOTE: internal docids of the configured index must not be altered. For that, categories are never deleted from the taxonomy index. In addition, merge policy in effect must not merge none adjacent segments.

Parameters:
openMode - see IndexWriterConfig.OpenMode
See Also:
openIndexWriter(Directory, IndexWriterConfig)

openReader

protected IndexReader openReader()
                          throws IOException
Open an IndexReader from the internal IndexWriter, by calling IndexReader.open(IndexWriter, boolean). Extending classes can override this method to return their own IndexReader.

Throws:
IOException

defaultTaxonomyWriterCache

public static TaxonomyWriterCache defaultTaxonomyWriterCache()
Defines the default TaxonomyWriterCache to use in constructors which do not specify one.

The current default is Cl2oTaxonomyWriterCache constructed with the parameters (1024, 0.15f, 3), i.e., the entire taxonomy is cached in memory while building it.

close

public void close()
           throws CorruptIndexException,
                  IOException
Frees used resources as well as closes the underlying IndexWriter, which commits whatever changes made to it to the underlying Directory.

Specified by:
close in interface Closeable
Throws:
CorruptIndexException
IOException

getCacheMemoryUsage

public int getCacheMemoryUsage()
Returns the number of memory bytes used by the cache.

Returns:
Number of cache bytes in memory, for CL2O only; zero otherwise.

closeResources

protected void closeResources()
                       throws IOException
A hook for extending classes to close additional resources that were used. The default implementation closes the IndexReader as well as the TaxonomyWriterCache instances that were used.
NOTE: if you override this method, you should include a super.closeResources() call in your implementation.

Throws:
IOException

findCategory

protected int findCategory(CategoryPath categoryPath)
                    throws IOException
Look up the given category in the cache and/or the on-disk storage, returning the category's ordinal, or a negative number in case the category does not yet exist in the taxonomy.

Throws:
IOException

addCategory

public int addCategory(CategoryPath categoryPath)
                throws IOException
Description copied from interface: TaxonomyWriter
addCategory() adds a category with a given path name to the taxonomy, and returns its ordinal. If the category was already present in the taxonomy, its existing ordinal is returned.

Before adding a category, addCategory() makes sure that all its ancestor categories exist in the taxonomy as well. As result, the ordinal of a category is guaranteed to be smaller then the ordinal of any of its descendants.

Specified by:
addCategory in interface TaxonomyWriter
Throws:
IOException

ensureOpen

protected final void ensureOpen()
Verifies that this instance wasn't closed, or throws AlreadyClosedException if it is.

addCategoryDocument

protected int addCategoryDocument(CategoryPath categoryPath,
                                  int length,
                                  int parent)
                           throws CorruptIndexException,
                                  IOException
Throws:
CorruptIndexException
IOException

commit

public void commit()
            throws CorruptIndexException,
                   IOException
Calling commit() ensures that all the categories written so far are visible to a reader that is opened (or reopened) after that call. When the index is closed(), commit() is also implicitly done. See TwoPhaseCommit.commit()

Specified by:
commit in interface TwoPhaseCommit
Throws:
CorruptIndexException
IOException

commit

public void commit(Map<String,String> commitUserData)
            throws CorruptIndexException,
                   IOException
Like commit(), but also store properties with the index. These properties are retrievable by DirectoryTaxonomyReader.getCommitUserData(). See TwoPhaseCommit.commit(Map).

Specified by:
commit in interface TwoPhaseCommit
Throws:
CorruptIndexException
IOException
See Also:
TwoPhaseCommit.commit(), TwoPhaseCommit.prepareCommit(Map)

prepareCommit

public void prepareCommit()
                   throws CorruptIndexException,
                          IOException
prepare most of the work needed for a two-phase commit. See IndexWriter.prepareCommit().

Specified by:
prepareCommit in interface TwoPhaseCommit
Throws:
CorruptIndexException
IOException

prepareCommit

public void prepareCommit(Map<String,String> commitUserData)
                   throws CorruptIndexException,
                          IOException
Like above, and also prepares to store user data with the index. See IndexWriter.prepareCommit(Map)

Specified by:
prepareCommit in interface TwoPhaseCommit
Throws:
CorruptIndexException
IOException
See Also:
TwoPhaseCommit.prepareCommit()

getSize

public int getSize()
getSize() returns the number of categories in the taxonomy.

Because categories are numbered consecutively starting with 0, it means the taxonomy contains ordinals 0 through getSize()-1.

Note that the number returned by getSize() is often slightly higher than the number of categories inserted into the taxonomy; This is because when a category is added to the taxonomy, its ancestors are also added automatically (including the root, which always get ordinal 0).

Specified by:
getSize in interface TaxonomyWriter

setCacheMissesUntilFill

public void setCacheMissesUntilFill(int i)
Set the number of cache misses before an attempt is made to read the entire taxonomy into the in-memory cache.

LuceneTaxonomyWriter holds an in-memory cache of recently seen categories to speed up operation. On each cache-miss, the on-disk index needs to be consulted. When an existing taxonomy is opened, a lot of slow disk reads like that are needed until the cache is filled, so it is more efficient to read the entire taxonomy into memory at once. We do this complete read after a certain number (defined by this method) of cache misses.

If the number is set to 0, the entire taxonomy is read into the cache on first use, without fetching individual categories first.

Note that if the memory cache of choice is limited in size, and cannot hold the entire content of the on-disk taxonomy, then it is never read in its entirety into the cache, regardless of the setting of this method.

getParent

public int getParent(int ordinal)
              throws IOException
Description copied from interface: TaxonomyWriter
getParent() returns the ordinal of the parent category of the category with the given ordinal.

When a category is specified as a path name, finding the path of its parent is as trivial as dropping the last component of the path. getParent() is functionally equivalent to calling getPath() on the given ordinal, dropping the last component of the path, and then calling getOrdinal() to get an ordinal back.

If the given ordinal is the ROOT_ORDINAL, an INVALID_ORDINAL is returned. If the given ordinal is a top-level category, the ROOT_ORDINAL is returned. If an invalid ordinal is given (negative or beyond the last available ordinal), an ArrayIndexOutOfBoundsException is thrown. However, it is expected that getParent will only be called for ordinals which are already known to be in the taxonomy. TODO (Facet): instead of a getParent(ordinal) method, consider having a

getCategory(categorypath, prefixlen) which is similar to addCategory except it doesn't add new categories; This method can be used to get the ordinals of all prefixes of the given category, and it can use exactly the same code and cache used by addCategory() so it means less code.

Specified by:
getParent in interface TaxonomyWriter
Throws:
IOException

addTaxonomy

public void addTaxonomy(Directory taxoDir,
                        DirectoryTaxonomyWriter.OrdinalMap map)
                 throws IOException
Takes the categories from the given taxonomy directory, and adds the missing ones to this taxonomy. Additionally, it fills the given DirectoryTaxonomyWriter.OrdinalMap with a mapping from the original ordinal to the new ordinal.

Throws:
IOException

rollback

public void rollback()
              throws IOException
Rollback changes to the taxonomy writer and closes the instance. Following this method the instance becomes unusable (calling any of its API methods will yield an AlreadyClosedException).

Specified by:
rollback in interface TwoPhaseCommit
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DirectoryTaxonomyWriter.MemoryOrdinalMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy.directory
Class DirectoryTaxonomyWriter.MemoryOrdinalMap

java.lang.Object
    extended by  org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.MemoryOrdinalMap
All Implemented Interfaces:
DirectoryTaxonomyWriter.OrdinalMap
Enclosing class:
DirectoryTaxonomyWriter
public static final class DirectoryTaxonomyWriter.MemoryOrdinalMap
extends Object
implements DirectoryTaxonomyWriter.OrdinalMap

DirectoryTaxonomyWriter.OrdinalMap maintained in memory

Constructor Summary
DirectoryTaxonomyWriter.MemoryOrdinalMap()
Method Summary
 void addDone()
Call addDone() to say that all addMapping() have been done.
 void addMapping(int origOrdinal, int newOrdinal)
 int[] getMap()
Return the map from the taxonomy's original (consecutive) ordinals to the new taxonomy's ordinals.
 void setSize(int taxonomySize)
Set the size of the map.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DirectoryTaxonomyWriter.MemoryOrdinalMap

public DirectoryTaxonomyWriter.MemoryOrdinalMap()
Method Detail

setSize

public void setSize(int taxonomySize)
Description copied from interface: DirectoryTaxonomyWriter.OrdinalMap
Set the size of the map. This MUST be called before addMapping(). It is assumed (but not verified) that addMapping() will then be called exactly 'size' times, with different origOrdinals between 0 and size-1.

Specified by:
setSize in interface DirectoryTaxonomyWriter.OrdinalMap

addMapping

public void addMapping(int origOrdinal,
                       int newOrdinal)
Specified by:
addMapping in interface DirectoryTaxonomyWriter.OrdinalMap

addDone

public void addDone()
Description copied from interface: DirectoryTaxonomyWriter.OrdinalMap
Call addDone() to say that all addMapping() have been done. In some implementations this might free some resources.

Specified by:
addDone in interface DirectoryTaxonomyWriter.OrdinalMap

getMap

public int[] getMap()
Description copied from interface: DirectoryTaxonomyWriter.OrdinalMap
Return the map from the taxonomy's original (consecutive) ordinals to the new taxonomy's ordinals. If the map has to be read from disk and ordered appropriately, it is done when getMap() is called. getMap() should only be called once, and only when the map is actually needed. Calling it will also free all resources that the map might be holding (such as temporary disk space), other than the returned int[].

Specified by:
getMap in interface DirectoryTaxonomyWriter.OrdinalMap
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DirectoryTaxonomyWriter.OrdinalMap

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy.directory
Interface DirectoryTaxonomyWriter.OrdinalMap

All Known Implementing Classes:
DirectoryTaxonomyWriter.DiskOrdinalMap, DirectoryTaxonomyWriter.MemoryOrdinalMap
Enclosing class:
DirectoryTaxonomyWriter
public static interface DirectoryTaxonomyWriter.OrdinalMap

Mapping from old ordinal to new ordinals, used when merging indexes wit separate taxonomies.

addToTaxonomies() merges one or more taxonomies into the given taxonomy (this). An OrdinalMap is filled for each of the added taxonomies, containing the new ordinal (in the merged taxonomy) of each of the categories in the old taxonomy.

There exist two implementations of OrdinalMap: MemoryOrdinalMap and DiskOrdinalMap. As their names suggest, the former keeps the map in memory and the latter in a temporary disk file. Because these maps will later be needed one by one (to remap the counting lists), not all at the same time, it is recommended to put the first taxonomy's map in memory, and all the rest on disk (later to be automatically read into memory one by one, when needed).

Method Summary
 void addDone()
Call addDone() to say that all addMapping() have been done.
 void addMapping(int origOrdinal, int newOrdinal)
 int[] getMap()
Return the map from the taxonomy's original (consecutive) ordinals to the new taxonomy's ordinals.
 void setSize(int size)
Set the size of the map.

Method Detail

setSize

void setSize(int size)
             throws IOException
Set the size of the map. This MUST be called before addMapping(). It is assumed (but not verified) that addMapping() will then be called exactly 'size' times, with different origOrdinals between 0 and size-1.

Throws:
IOException

addMapping

void addMapping(int origOrdinal,
                int newOrdinal)
                throws IOException
Throws:
IOException

addDone

void addDone()
             throws IOException
Call addDone() to say that all addMapping() have been done. In some implementations this might free some resources.

Throws:
IOException

getMap

int[] getMap()
             throws IOException
Return the map from the taxonomy's original (consecutive) ordinals to the new taxonomy's ordinals. If the map has to be read from disk and ordered appropriately, it is done when getMap() is called. getMap() should only be called once, and only when the map is actually needed. Calling it will also free all resources that the map might be holding (such as temporary disk space), other than the returned int[].

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.taxonomy.directory
Interfaces
DirectoryTaxonomyWriter.OrdinalMap
Classes
DirectoryTaxonomyReader
DirectoryTaxonomyWriter
DirectoryTaxonomyWriter.DiskOrdinalMap
DirectoryTaxonomyWriter.MemoryOrdinalMap


org.apache.lucene.facet.taxonomy.directory

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.taxonomy.directory

Taxonomy implemented using a Lucene-Index

See:
Description

Interface Summary
DirectoryTaxonomyWriter.OrdinalMap Mapping from old ordinal to new ordinals, used when merging indexes wit separate taxonomies.

Class Summary
DirectoryTaxonomyReader | A TaxonomyReader which retrieves stored taxonomy information from a Directory.
DirectoryTaxonomyWriter | TaxonomyWriter which uses a Directory to store the taxonomy information on disk, and keeps an additional in-memory cache of some or all categories.
DirectoryTaxonomyWriter.DiskOrdinalMap | DirectoryTaxonomyWriter.OrdinalMap maintained on file system
DirectoryTaxonomyWriter.MemoryOrdinalMap | DirectoryTaxonomyWriter.OrdinalMap maintained in memory

Package org.apache.lucene.facet.taxonomy.directory Description

Taxonomy implemented using a Lucene-Index

Overview Package Class Use Tree Deprecated Index Help


org.apache.lucene.facet.taxonomy.directory Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.taxonomy.directory

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader (implements org.apache.lucene.facet.taxonomy.TaxonomyReader)
    • org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter (implements org.apache.lucene.facet.taxonomy.TaxonomyWriter)
    • org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.DiskOrdinalMap (implements org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.OrdinalMap)
    • org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.MemoryOrdinalMap (implements org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.OrdinalMap)

Interface Hierarchy

  • org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.OrdinalMap


Uses of Package org.apache.lucene.facet.taxonomy.directory

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.taxonomy.directory

Packages that use org.apache.lucene.facet.taxonomy.directory
org.apache.lucene.facet.taxonomy.directory Taxonomy implemented using a Lucene-Index

Classes in org.apache.lucene.facet.taxonomy.directory used by org.apache.lucene.facet.taxonomy.directory
DirectoryTaxonomyWriter.OrdinalMap
Mapping from old ordinal to new ordinals, used when merging indexes wit separate taxonomies.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader

No usage of org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyReader

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.DiskOrdinalMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.DiskOrdinalMap

No usage of org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.DiskOrdinalMap

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter

No usage of org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.MemoryOrdinalMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.MemoryOrdinalMap

No usage of org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.MemoryOrdinalMap

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.OrdinalMap

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.taxonomy.directory.DirectoryTaxonomyWriter.OrdinalMap

Packages that use DirectoryTaxonomyWriter.OrdinalMap
org.apache.lucene.facet.taxonomy.directory Taxonomy implemented using a Lucene-Index

Uses of DirectoryTaxonomyWriter.OrdinalMap in org.apache.lucene.facet.taxonomy.directory

Classes in org.apache.lucene.facet.taxonomy.directory that implement DirectoryTaxonomyWriter.OrdinalMap
static class | DirectoryTaxonomyWriter.DiskOrdinalMap DirectoryTaxonomyWriter.OrdinalMap maintained on file system
static class | DirectoryTaxonomyWriter.MemoryOrdinalMap DirectoryTaxonomyWriter.OrdinalMap maintained in memory

Methods in org.apache.lucene.facet.taxonomy.directory with parameters of type DirectoryTaxonomyWriter.OrdinalMap
 void DirectoryTaxonomyWriter.addTaxonomy(Directory taxoDir, DirectoryTaxonomyWriter.OrdinalMap map)
Takes the categories from the given taxonomy directory, and adds the missing ones to this taxonomy.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.facet.taxonomy.writercache
Interfaces
TaxonomyWriterCache


org.apache.lucene.facet.taxonomy.writercache

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.taxonomy.writercache

Improves indexing time by caching a map of CategoryPath to their Ordinal

See:
Description

Interface Summary
TaxonomyWriterCache TaxonomyWriterCache is a relatively simple interface for a cache of category->ordinal mappings, used in TaxonomyWriter implementations (such as DirectoryTaxonomyWriter).

Package org.apache.lucene.facet.taxonomy.writercache Description

Improves indexing time by caching a map of CategoryPath to their Ordinal

Overview Package Class Use Tree Deprecated Index Help


org.apache.lucene.facet.taxonomy.writercache Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.taxonomy.writercache

Package Hierarchies:
All Packages

Interface Hierarchy

  • org.apache.lucene.facet.taxonomy.writercache.TaxonomyWriterCache


Uses of Package org.apache.lucene.facet.taxonomy.writercache

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.taxonomy.writercache

Packages that use org.apache.lucene.facet.taxonomy.writercache
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.facet.taxonomy.writercache.cl2o | Category->Ordinal caching implementation using an optimized data-structures
org.apache.lucene.facet.taxonomy.writercache.lru | An LRU cache implementation for the CategoryPath to Ordinal map

Classes in org.apache.lucene.facet.taxonomy.writercache used by org.apache.lucene.facet.taxonomy.directory
TaxonomyWriterCache
TaxonomyWriterCache is a relatively simple interface for a cache of category->ordinal mappings, used in TaxonomyWriter implementations (such as DirectoryTaxonomyWriter).

Classes in org.apache.lucene.facet.taxonomy.writercache used by org.apache.lucene.facet.taxonomy.writercache.cl2o
TaxonomyWriterCache
TaxonomyWriterCache is a relatively simple interface for a cache of category->ordinal mappings, used in TaxonomyWriter implementations (such as DirectoryTaxonomyWriter).

Classes in org.apache.lucene.facet.taxonomy.writercache used by org.apache.lucene.facet.taxonomy.writercache.lru
TaxonomyWriterCache
TaxonomyWriterCache is a relatively simple interface for a cache of category->ordinal mappings, used in TaxonomyWriter implementations (such as DirectoryTaxonomyWriter).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


TaxonomyWriterCache

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy.writercache
Interface TaxonomyWriterCache

All Known Implementing Classes:
Cl2oTaxonomyWriterCache, LruTaxonomyWriterCache
public interface TaxonomyWriterCache

TaxonomyWriterCache is a relatively simple interface for a cache of category->ordinal mappings, used in TaxonomyWriter implementations (such as DirectoryTaxonomyWriter).

It basically has put() methods for adding a mapping, and get() for looking a mapping up the cache. The cache does not guarantee to hold everything that has been put into it, and might in fact selectively delete some of the mappings (e.g., the ones least recently used). This means that if get() returns a negative response, it does not necessarily mean that the category doesn't exist - just that it is not in the cache. The caller can only infer that the category doesn't exist if it knows the cache to be complete (because all the categories were loaded into the cache, and since then no put() returned true).

However, if it does so, it should clear out large parts of the cache at once, because the user will typically need to work hard to recover from every cache cleanup (see put(CategoryPath, int)'s return value).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 void close()
Let go of whatever resources the cache is holding.
 int get(CategoryPath categoryPath)
Lookup a category in the cache, returning its ordinal, or a negative number if the category is not in the cache.
 int get(CategoryPath categoryPath, int length)
Like get(CategoryPath), but for a given prefix of the category path.
 boolean hasRoom(int numberOfEntries)
Sometimes the cache is either unlimited in size, or limited by a very big size, and in that case when we add a lot of categories it might make sense to pre-load the cache with all the existing categories.
 boolean put(CategoryPath categoryPath, int ordinal)
Add a category to the cache, with the given ordinal as the value.
 boolean put(CategoryPath categoryPath, int prefixLen, int ordinal)
Like put(CategoryPath, int), but for a given prefix of the category path.

Method Detail

close

void close()
Let go of whatever resources the cache is holding. After a close(), this object can no longer be used.

get

int get(CategoryPath categoryPath)
Lookup a category in the cache, returning its ordinal, or a negative number if the category is not in the cache.

It is up to the caller to remember what a negative response means: If the caller knows the cache is complete (it was initially fed with all the categories, and since then put() never returned true) it means the category does not exist. Otherwise, the category might still exist, but just be missing from the cache.

get

int get(CategoryPath categoryPath,
        int length)
Like get(CategoryPath), but for a given prefix of the category path.

If the given length is negative or bigger than the path's actual length, the full path is taken.

put

boolean put(CategoryPath categoryPath,
            int ordinal)
Add a category to the cache, with the given ordinal as the value.

If the implementation keeps only a partial cache (e.g., an LRU cache) and finds that its cache is full, it should clear up part of the cache and return true. Otherwise, it should return false.

The reason why the caller needs to know if part of the cache was cleared is that in that case it will have to commit its on-disk index (so that all the latest category additions can be searched on disk, if we can't rely on the cache to contain them).

Ordinals should be non-negative. Currently there is no defined way to specify that a cache should remember a category does NOT exist. It doesn't really matter, because normally the next thing we do after finding that a category does not exist is to add it.

put

boolean put(CategoryPath categoryPath,
            int prefixLen,
            int ordinal)
Like put(CategoryPath, int), but for a given prefix of the category path.

If the given length is negative or bigger than the path's actual length, the full path is taken.

hasRoom

boolean hasRoom(int numberOfEntries)
Sometimes the cache is either unlimited in size, or limited by a very big size, and in that case when we add a lot of categories it might make sense to pre-load the cache with all the existing categories. However, this pre-load does not make sense when the allowed cache size is small. The hasRoom() method allows to differentiate between these cases.

After hasRoom(n) returned true, the following n put() should return false (meaning that the cache was not cleared).

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Cl2oTaxonomyWriterCache

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy.writercache.cl2o
Class Cl2oTaxonomyWriterCache

java.lang.Object
    extended by  org.apache.lucene.facet.taxonomy.writercache.cl2o.Cl2oTaxonomyWriterCache
All Implemented Interfaces:
TaxonomyWriterCache
public class Cl2oTaxonomyWriterCache
extends Object
implements TaxonomyWriterCache

TaxonomyWriterCache using CompactLabelToOrdinal. Although called cache, it maintains in memory all the mappings from category to ordinal, relying on that CompactLabelToOrdinal is an efficient mapping for this purpose.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
Cl2oTaxonomyWriterCache(int initialCapcity, float loadFactor, int numHashArrays)
Method Summary
 void close()
Let go of whatever resources the cache is holding.
 int get(CategoryPath categoryPath)
Lookup a category in the cache, returning its ordinal, or a negative number if the category is not in the cache.
 int get(CategoryPath categoryPath, int length)
Like TaxonomyWriterCache.get(CategoryPath), but for a given prefix of the category path.
 int getMemoryUsage()
Returns the number of bytes in memory used by this object.
 boolean hasRoom(int n)
Sometimes the cache is either unlimited in size, or limited by a very big size, and in that case when we add a lot of categories it might make sense to pre-load the cache with all the existing categories.
 boolean put(CategoryPath categoryPath, int ordinal)
Add a category to the cache, with the given ordinal as the value.
 boolean put(CategoryPath categoryPath, int prefixLen, int ordinal)
Like TaxonomyWriterCache.put(CategoryPath, int), but for a given prefix of the category path.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Cl2oTaxonomyWriterCache

public Cl2oTaxonomyWriterCache(int initialCapcity,
                               float loadFactor,
                               int numHashArrays)
Method Detail

close

public void close()
Description copied from interface: TaxonomyWriterCache
Let go of whatever resources the cache is holding. After a close(), this object can no longer be used.

Specified by:
close in interface TaxonomyWriterCache

hasRoom

public boolean hasRoom(int n)
Description copied from interface: TaxonomyWriterCache
Sometimes the cache is either unlimited in size, or limited by a very big size, and in that case when we add a lot of categories it might make sense to pre-load the cache with all the existing categories. However, this pre-load does not make sense when the allowed cache size is small. The hasRoom() method allows to differentiate between these cases.

After hasRoom(n) returned true, the following n put() should return false (meaning that the cache was not cleared).

Specified by:
hasRoom in interface TaxonomyWriterCache

get

public int get(CategoryPath categoryPath)
Description copied from interface: TaxonomyWriterCache
Lookup a category in the cache, returning its ordinal, or a negative number if the category is not in the cache.

It is up to the caller to remember what a negative response means: If the caller knows the cache is complete (it was initially fed with all the categories, and since then put() never returned true) it means the category does not exist. Otherwise, the category might still exist, but just be missing from the cache.

Specified by:
get in interface TaxonomyWriterCache

get

public int get(CategoryPath categoryPath,
               int length)
Description copied from interface: TaxonomyWriterCache
Like TaxonomyWriterCache.get(CategoryPath), but for a given prefix of the category path.

If the given length is negative or bigger than the path's actual length, the full path is taken.

Specified by:
get in interface TaxonomyWriterCache

put

public boolean put(CategoryPath categoryPath,
                   int ordinal)
Description copied from interface: TaxonomyWriterCache
Add a category to the cache, with the given ordinal as the value.

If the implementation keeps only a partial cache (e.g., an LRU cache) and finds that its cache is full, it should clear up part of the cache and return true. Otherwise, it should return false.

The reason why the caller needs to know if part of the cache was cleared is that in that case it will have to commit its on-disk index (so that all the latest category additions can be searched on disk, if we can't rely on the cache to contain them).

Ordinals should be non-negative. Currently there is no defined way to specify that a cache should remember a category does NOT exist. It doesn't really matter, because normally the next thing we do after finding that a category does not exist is to add it.

Specified by:
put in interface TaxonomyWriterCache

put

public boolean put(CategoryPath categoryPath,
                   int prefixLen,
                   int ordinal)
Description copied from interface: TaxonomyWriterCache
Like TaxonomyWriterCache.put(CategoryPath, int), but for a given prefix of the category path.

If the given length is negative or bigger than the path's actual length, the full path is taken.

Specified by:
put in interface TaxonomyWriterCache

getMemoryUsage

public int getMemoryUsage()
Returns the number of bytes in memory used by this object.

Returns:
Number of bytes in memory used by this object.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CollisionMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy.writercache.cl2o
Class CollisionMap

java.lang.Object
    extended by  org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap

public class CollisionMap
extends Object

HashMap to store colliding labels. See CompactLabelToOrdinal for details.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
CollisionMap(org.apache.lucene.facet.taxonomy.writercache.cl2o.CharBlockArray labelRepository)
CollisionMap(int initialCapacity, org.apache.lucene.facet.taxonomy.writercache.cl2o.CharBlockArray labelRepository)
Method Summary
int | addLabel(CategoryPath label, int hash, int cid)
int | addLabel(CategoryPath label, int prefixLen, int hash, int cid)
void | addLabelOffset(int hash, int offset, int cid) This method does not check if the same value is already in the map because we pass in an char-array offset, so so we now that we're in resize-mode here.
int | capacity()
int | get(CategoryPath label, int hash)
int | get(CategoryPath label, int prefixLen, int hash)
int | size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CollisionMap

public CollisionMap(org.apache.lucene.facet.taxonomy.writercache.cl2o.CharBlockArray labelRepository)

CollisionMap

public CollisionMap(int initialCapacity,
                    org.apache.lucene.facet.taxonomy.writercache.cl2o.CharBlockArray labelRepository)
Method Detail

size

public int size()

capacity

public int capacity()

get

public int get(CategoryPath label,
               int hash)

get

public int get(CategoryPath label,
               int prefixLen,
               int hash)

addLabel

public int addLabel(CategoryPath label,
                    int hash,
                    int cid)

addLabel

public int addLabel(CategoryPath label,
                    int prefixLen,
                    int hash,
                    int cid)

addLabelOffset

public void addLabelOffset(int hash,
                           int offset,
                           int cid)
This method does not check if the same value is already in the map because we pass in an char-array offset, so so we now that we're in resize-mode here.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CompactLabelToOrdinal

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy.writercache.cl2o
Class CompactLabelToOrdinal

java.lang.Object
    extended by  org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal
        extended by  org.apache.lucene.facet.taxonomy.writercache.cl2o.CompactLabelToOrdinal

public class CompactLabelToOrdinal
extends LabelToOrdinal

This is a very efficient LabelToOrdinal implementation that uses a CharBlockArray to store all labels and a configurable number of HashArrays to reference the labels.

Since the HashArrays don't handle collisions, a CollisionMap is used to store the colliding labels.

This data structure grows by adding a new HashArray whenever the number of collisions in the CollisionMap exceeds loadFactor * LabelToOrdinal.getMaxOrdinal(). Growing also includes reinserting all colliding labels into the HashArrays to possibly reduce the number of collisions. For setting the loadFactor see CompactLabelToOrdinal(int, float, int).

This data structure has a much lower memory footprint (~30%) compared to a Java HashMap. It also only uses a small fraction of objects a HashMap would use, thus limiting the GC overhead. Ingestion speed was also ~50% faster compared to a HashMap for 3M unique labels.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static float DefaultLoadFactor
Fields inherited from class org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal
counter, InvalidOrdinal
Constructor Summary
CompactLabelToOrdinal(int initialCapacity, float loadFactor, int numHashArrays)
Method Summary
void | addLabel(CategoryPath label, int ordinal) Adds a new label if its not yet in the table.
void | addLabel(CategoryPath label, int prefixLen, int ordinal) Adds a new label if its not yet in the table.
int | getOrdinal(CategoryPath label)
int | getOrdinal(CategoryPath label, int prefixLen)
int | sizeOfMap()
Methods inherited from class org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal
getMaxOrdinal, getNextOrdinal
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DefaultLoadFactor

public static final float DefaultLoadFactor
See Also:
Constant Field Values
Constructor Detail

CompactLabelToOrdinal

public CompactLabelToOrdinal(int initialCapacity,
                             float loadFactor,
                             int numHashArrays)
Method Detail

sizeOfMap

public int sizeOfMap()

addLabel

public void addLabel(CategoryPath label,
                     int ordinal)
Description copied from class: LabelToOrdinal
Adds a new label if its not yet in the table. Throws an IllegalArgumentException if the same label with a different ordinal was previoulsy added to this table.

Specified by:
addLabel in class LabelToOrdinal

addLabel

public void addLabel(CategoryPath label,
                     int prefixLen,
                     int ordinal)
Description copied from class: LabelToOrdinal
Adds a new label if its not yet in the table. Throws an IllegalArgumentException if the same label with a different ordinal was previoulsy added to this table.

Specified by:
addLabel in class LabelToOrdinal

getOrdinal

public int getOrdinal(CategoryPath label)
Specified by:
getOrdinal in class LabelToOrdinal
Returns:
the ordinal assigned to the given label, or LabelToOrdinal.InvalidOrdinal if the label cannot be found in this table.

getOrdinal

public int getOrdinal(CategoryPath label,
                      int prefixLen)
Specified by:
getOrdinal in class LabelToOrdinal
Returns:
the ordinal assigned to the given label, or LabelToOrdinal.InvalidOrdinal if the label cannot be found in this table.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LabelToOrdinal

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy.writercache.cl2o
Class LabelToOrdinal

java.lang.Object
    extended by  org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal
Direct Known Subclasses:
CompactLabelToOrdinal
public abstract class LabelToOrdinal
extends Object

Abstract class for storing Label->Ordinal mappings in a taxonomy.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected int | counter
static int | InvalidOrdinal
Constructor Summary
LabelToOrdinal()
Method Summary
abstract void | addLabel(CategoryPath label, int ordinal) Adds a new label if its not yet in the table.
abstract void | addLabel(CategoryPath label, int prefixLen, int ordinal) Adds a new label if its not yet in the table.
int | getMaxOrdinal() return the maximal Ordinal assigned so far
int | getNextOrdinal() Returns the next unassigned ordinal.
abstract int | getOrdinal(CategoryPath label)
abstract int | getOrdinal(CategoryPath label, int prefixLen)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

counter

protected int counter

InvalidOrdinal

public static final int InvalidOrdinal
See Also:
Constant Field Values
Constructor Detail

LabelToOrdinal

public LabelToOrdinal()
Method Detail

getMaxOrdinal

public int getMaxOrdinal()
return the maximal Ordinal assigned so far

getNextOrdinal

public int getNextOrdinal()
Returns the next unassigned ordinal. The default behavior of this method is to simply increment a counter.

addLabel

public abstract void addLabel(CategoryPath label,
                              int ordinal)
Adds a new label if its not yet in the table. Throws an IllegalArgumentException if the same label with a different ordinal was previoulsy added to this table.

addLabel

public abstract void addLabel(CategoryPath label,
                              int prefixLen,
                              int ordinal)
Adds a new label if its not yet in the table. Throws an IllegalArgumentException if the same label with a different ordinal was previoulsy added to this table.

getOrdinal

public abstract int getOrdinal(CategoryPath label)
Returns:
the ordinal assigned to the given label, or InvalidOrdinal if the label cannot be found in this table.

getOrdinal

public abstract int getOrdinal(CategoryPath label,
                               int prefixLen)
Returns:
the ordinal assigned to the given label, or InvalidOrdinal if the label cannot be found in this table.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.taxonomy.writercache.cl2o
Classes
Cl2oTaxonomyWriterCache
CollisionMap
CompactLabelToOrdinal
LabelToOrdinal


org.apache.lucene.facet.taxonomy.writercache.cl2o

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.taxonomy.writercache.cl2o

Category->Ordinal caching implementation using an optimized data-structures

See:
Description

Class Summary
Cl2oTaxonomyWriterCache | TaxonomyWriterCache using CompactLabelToOrdinal.
CollisionMap | HashMap to store colliding labels.
CompactLabelToOrdinal | This is a very efficient LabelToOrdinal implementation that uses a CharBlockArray to store all labels and a configurable number of HashArrays to reference the labels.
LabelToOrdinal | Abstract class for storing Label->Ordinal mappings in a taxonomy.

Package org.apache.lucene.facet.taxonomy.writercache.cl2o Description

Category->Ordinal caching implementation using an optimized data-structures

The internal map data structure consumes less memory (~30%) and is faster (~50%) compared to a Java HashMap<String, Integer>.


org.apache.lucene.facet.taxonomy.writercache.cl2o Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.taxonomy.writercache.cl2o

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.taxonomy.writercache.cl2o.Cl2oTaxonomyWriterCache (implements org.apache.lucene.facet.taxonomy.writercache.TaxonomyWriterCache)
    • org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap
    • org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal
      • org.apache.lucene.facet.taxonomy.writercache.cl2o.CompactLabelToOrdinal


Uses of Package org.apache.lucene.facet.taxonomy.writercache.cl2o

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.taxonomy.writercache.cl2o

Packages that use org.apache.lucene.facet.taxonomy.writercache.cl2o
org.apache.lucene.facet.taxonomy.writercache.cl2o Category->Ordinal caching implementation using an optimized data-structures

Classes in org.apache.lucene.facet.taxonomy.writercache.cl2o used by org.apache.lucene.facet.taxonomy.writercache.cl2o
LabelToOrdinal
Abstract class for storing Label->Ordinal mappings in a taxonomy.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.taxonomy.writercache.cl2o.Cl2oTaxonomyWriterCache

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.taxonomy.writercache.cl2o.Cl2oTaxonomyWriterCache

No usage of org.apache.lucene.facet.taxonomy.writercache.cl2o.Cl2oTaxonomyWriterCache

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap

No usage of org.apache.lucene.facet.taxonomy.writercache.cl2o.CollisionMap

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.taxonomy.writercache.cl2o.CompactLabelToOrdinal

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.taxonomy.writercache.cl2o.CompactLabelToOrdinal

No usage of org.apache.lucene.facet.taxonomy.writercache.cl2o.CompactLabelToOrdinal

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.taxonomy.writercache.cl2o.LabelToOrdinal

Packages that use LabelToOrdinal
org.apache.lucene.facet.taxonomy.writercache.cl2o Category->Ordinal caching implementation using an optimized data-structures

Uses of LabelToOrdinal in org.apache.lucene.facet.taxonomy.writercache.cl2o

Subclasses of LabelToOrdinal in org.apache.lucene.facet.taxonomy.writercache.cl2o
 class CompactLabelToOrdinal
This is a very efficient LabelToOrdinal implementation that uses a CharBlockArray to store all labels and a configurable number of HashArrays to reference the labels.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.facet.taxonomy.writercache.TaxonomyWriterCache

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.facet.taxonomy.writercache.TaxonomyWriterCache

Packages that use TaxonomyWriterCache
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.facet.taxonomy.writercache.cl2o | Category->Ordinal caching implementation using an optimized data-structures
org.apache.lucene.facet.taxonomy.writercache.lru | An LRU cache implementation for the CategoryPath to Ordinal map

Uses of TaxonomyWriterCache in org.apache.lucene.facet.taxonomy.directory

Methods in org.apache.lucene.facet.taxonomy.directory that return TaxonomyWriterCache
static TaxonomyWriterCache DirectoryTaxonomyWriter.defaultTaxonomyWriterCache()
Defines the default TaxonomyWriterCache to use in constructors which do not specify one.

Constructors in org.apache.lucene.facet.taxonomy.directory with parameters of type TaxonomyWriterCache
DirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode, TaxonomyWriterCache cache)
Construct a Taxonomy writer.

Uses of TaxonomyWriterCache in org.apache.lucene.facet.taxonomy.writercache.cl2o

Classes in org.apache.lucene.facet.taxonomy.writercache.cl2o that implement TaxonomyWriterCache
 class Cl2oTaxonomyWriterCache
TaxonomyWriterCache using CompactLabelToOrdinal.

Uses of TaxonomyWriterCache in org.apache.lucene.facet.taxonomy.writercache.lru

Classes in org.apache.lucene.facet.taxonomy.writercache.lru that implement TaxonomyWriterCache
 class LruTaxonomyWriterCache
LRU TaxonomyWriterCache - good choice for huge taxonomies.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


LruTaxonomyWriterCache

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy.writercache.lru
Class LruTaxonomyWriterCache

java.lang.Object
    extended by  org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache
All Implemented Interfaces:
TaxonomyWriterCache
public class LruTaxonomyWriterCache
extends Object
implements TaxonomyWriterCache

LRU TaxonomyWriterCache - good choice for huge taxonomies.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class LruTaxonomyWriterCache.LRUType
Constructor Summary
LruTaxonomyWriterCache(int cacheSize)
LruTaxonomyWriterCache(int cacheSize, LruTaxonomyWriterCache.LRUType lruType)
Method Summary
 void close()
Let go of whatever resources the cache is holding.
 int get(CategoryPath categoryPath)
Lookup a category in the cache, returning its ordinal, or a negative number if the category is not in the cache.
 int get(CategoryPath categoryPath, int length)
Like TaxonomyWriterCache.get(CategoryPath), but for a given prefix of the category path.
 boolean hasRoom(int n)
Sometimes the cache is either unlimited in size, or limited by a very big size, and in that case when we add a lot of categories it might make sense to pre-load the cache with all the existing categories.
 boolean put(CategoryPath categoryPath, int ordinal)
Add a category to the cache, with the given ordinal as the value.
 boolean put(CategoryPath categoryPath, int prefixLen, int ordinal)
Like TaxonomyWriterCache.put(CategoryPath, int), but for a given prefix of the category path.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LruTaxonomyWriterCache

public LruTaxonomyWriterCache(int cacheSize)

LruTaxonomyWriterCache

public LruTaxonomyWriterCache(int cacheSize,
                              LruTaxonomyWriterCache.LRUType lruType)
Method Detail

hasRoom

public boolean hasRoom(int n)
Description copied from interface: TaxonomyWriterCache
Sometimes the cache is either unlimited in size, or limited by a very big size, and in that case when we add a lot of categories it might make sense to pre-load the cache with all the existing categories. However, this pre-load does not make sense when the allowed cache size is small. The hasRoom() method allows to differentiate between these cases.

After hasRoom(n) returned true, the following n put() should return false (meaning that the cache was not cleared).

Specified by:
hasRoom in interface TaxonomyWriterCache

close

public void close()
Description copied from interface: TaxonomyWriterCache
Let go of whatever resources the cache is holding. After a close(), this object can no longer be used.

Specified by:
close in interface TaxonomyWriterCache

get

public int get(CategoryPath categoryPath)
Description copied from interface: TaxonomyWriterCache
Lookup a category in the cache, returning its ordinal, or a negative number if the category is not in the cache.

It is up to the caller to remember what a negative response means: If the caller knows the cache is complete (it was initially fed with all the categories, and since then put() never returned true) it means the category does not exist. Otherwise, the category might still exist, but just be missing from the cache.

Specified by:
get in interface TaxonomyWriterCache

get

public int get(CategoryPath categoryPath,
               int length)
Description copied from interface: TaxonomyWriterCache
Like TaxonomyWriterCache.get(CategoryPath), but for a given prefix of the category path.

If the given length is negative or bigger than the path's actual length, the full path is taken.

Specified by:
get in interface TaxonomyWriterCache

put

public boolean put(CategoryPath categoryPath,
                   int ordinal)
Description copied from interface: TaxonomyWriterCache
Add a category to the cache, with the given ordinal as the value.

If the implementation keeps only a partial cache (e.g., an LRU cache) and finds that its cache is full, it should clear up part of the cache and return true. Otherwise, it should return false.

The reason why the caller needs to know if part of the cache was cleared is that in that case it will have to commit its on-disk index (so that all the latest category additions can be searched on disk, if we can't rely on the cache to contain them).

Ordinals should be non-negative. Currently there is no defined way to specify that a cache should remember a category does NOT exist. It doesn't really matter, because normally the next thing we do after finding that a category does not exist is to add it.

Specified by:
put in interface TaxonomyWriterCache

put

public boolean put(CategoryPath categoryPath,
                   int prefixLen,
                   int ordinal)
Description copied from interface: TaxonomyWriterCache
Like TaxonomyWriterCache.put(CategoryPath, int), but for a given prefix of the category path.

If the given length is negative or bigger than the path's actual length, the full path is taken.

Specified by:
put in interface TaxonomyWriterCache
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


LruTaxonomyWriterCache.LRUType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.facet.taxonomy.writercache.lru
Enum LruTaxonomyWriterCache.LRUType

java.lang.Object
    extended by  java.lang.Enum<LruTaxonomyWriterCache.LRUType>
        extended by  org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache.LRUType
All Implemented Interfaces:
Serializable, Comparable<LruTaxonomyWriterCache.LRUType>
Enclosing class:
LruTaxonomyWriterCache
public static enum LruTaxonomyWriterCache.LRUType
extends Enum<LruTaxonomyWriterCache.LRUType>

Enum Constant Summary
LRU_HASHED
LRU_STRING
Method Summary
static LruTaxonomyWriterCache.LRUType | valueOf(String name) Returns the enum constant of this type with the specified name.
static LruTaxonomyWriterCache.LRUType[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

LRU_HASHED

public static final LruTaxonomyWriterCache.LRUType LRU_HASHED

LRU_STRING

public static final LruTaxonomyWriterCache.LRUType LRU_STRING
Method Detail

values

public static final LruTaxonomyWriterCache.LRUType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(LruTaxonomyWriterCache.LRUType c : LruTaxonomyWriterCache.LRUType.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static LruTaxonomyWriterCache.LRUType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


NameHashIntCacheLRU

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.taxonomy.writercache.lru
Class NameHashIntCacheLRU

java.lang.Object
    extended by  org.apache.lucene.facet.taxonomy.writercache.lru.NameHashIntCacheLRU

public class NameHashIntCacheLRU
extends Object

An an LRU cache of mapping from name to int. Used to cache Ordinals of category paths. It uses as key, hash of the path instead of the path. This way the cahce takes less RAM, but correctness depends on assuming no collisions.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
int | getMaxSize()
int | getSize()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getMaxSize

public int getMaxSize()

getSize

public int getSize()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.taxonomy.writercache.lru
Classes
LruTaxonomyWriterCache
NameHashIntCacheLRU
Enums
LruTaxonomyWriterCache.LRUType


org.apache.lucene.facet.taxonomy.writercache.lru

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.taxonomy.writercache.lru

An LRU cache implementation for the CategoryPath to Ordinal map

See:
Description

Class Summary
LruTaxonomyWriterCache | LRU TaxonomyWriterCache - good choice for huge taxonomies.
NameHashIntCacheLRU | An an LRU cache of mapping from name to int.

Enum Summary
LruTaxonomyWriterCache.LRUType

Package org.apache.lucene.facet.taxonomy.writercache.lru Description

An LRU cache implementation for the CategoryPath to Ordinal map

Overview Package Class Use Tree Deprecated Index Help


org.apache.lucene.facet.taxonomy.writercache.lru Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.taxonomy.writercache.lru

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache (implements org.apache.lucene.facet.taxonomy.writercache.TaxonomyWriterCache)
    • org.apache.lucene.facet.taxonomy.writercache.lru.NameHashIntCacheLRU

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache.LRUType


Uses of Package org.apache.lucene.facet.taxonomy.writercache.lru

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.taxonomy.writercache.lru

Packages that use org.apache.lucene.facet.taxonomy.writercache.lru
org.apache.lucene.facet.taxonomy.writercache.lru An LRU cache implementation for the CategoryPath to Ordinal map

Classes in org.apache.lucene.facet.taxonomy.writercache.lru used by org.apache.lucene.facet.taxonomy.writercache.lru
LruTaxonomyWriterCache.LRUType

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache

No usage of org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache.LRUType

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.taxonomy.writercache.lru.LruTaxonomyWriterCache.LRUType

Packages that use LruTaxonomyWriterCache.LRUType
org.apache.lucene.facet.taxonomy.writercache.lru An LRU cache implementation for the CategoryPath to Ordinal map

Uses of LruTaxonomyWriterCache.LRUType in org.apache.lucene.facet.taxonomy.writercache.lru

Methods in org.apache.lucene.facet.taxonomy.writercache.lru that return LruTaxonomyWriterCache.LRUType
static LruTaxonomyWriterCache.LRUType | LruTaxonomyWriterCache.LRUType.valueOf(String name) Returns the enum constant of this type with the specified name.
static LruTaxonomyWriterCache.LRUType[] | LruTaxonomyWriterCache.LRUType.values() Returns an array containing the constants of this enum type, in the order they're declared.

Constructors in org.apache.lucene.facet.taxonomy.writercache.lru with parameters of type LruTaxonomyWriterCache.LRUType
LruTaxonomyWriterCache(int cacheSize, LruTaxonomyWriterCache.LRUType lruType)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.taxonomy.writercache.lru.NameHashIntCacheLRU

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.taxonomy.writercache.lru.NameHashIntCacheLRU

No usage of org.apache.lucene.facet.taxonomy.writercache.lru.NameHashIntCacheLRU

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


MultiCategoryListIterator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.util
Class MultiCategoryListIterator

java.lang.Object
    extended by  org.apache.lucene.facet.util.MultiCategoryListIterator
All Implemented Interfaces:
CategoryListIterator
public class MultiCategoryListIterator
extends Object
implements CategoryListIterator

Iterates over multiple CategoryListIterators, consuming the provided iterators in order.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
MultiCategoryListIterator(CategoryListIterator... iterators)
Receives the iterators to iterate on
Method Summary
boolean | init() Fails if all given iterators fail to init
long | nextCategory() Return a value larger than Integer.MAX_VALUE only if all iterators are exhausted
boolean | skipTo(int docId) Fails only if skipTo on all the provided iterators returned false
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MultiCategoryListIterator

public MultiCategoryListIterator(CategoryListIterator... iterators)
Receives the iterators to iterate on

Method Detail

init

public boolean init()
             throws IOException
Fails if all given iterators fail to init

Specified by:
init in interface CategoryListIterator
Throws:
IOException

nextCategory

public long nextCategory()
                  throws IOException
Return a value larger than Integer.MAX_VALUE only if all iterators are exhausted

Specified by:
nextCategory in interface CategoryListIterator
Throws:
IOException

skipTo

public boolean skipTo(int docId)
               throws IOException
Fails only if skipTo on all the provided iterators returned false

Specified by:
skipTo in interface CategoryListIterator
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.facet.util
Classes
MultiCategoryListIterator
PartitionsUtils
ResultSortUtils
ScoredDocIdsUtils


org.apache.lucene.facet.util

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.facet.util

Various utilities for faceted search

See:
Description

Class Summary
MultiCategoryListIterator | Iterates over multiple CategoryListIterators, consuming the provided iterators in order.
PartitionsUtils | Utilities for partitions - sizes and such
ResultSortUtils | Utilities for generating facet results sorted as required
ScoredDocIdsUtils | Utility methods for Scored Doc IDs.

Package org.apache.lucene.facet.util Description

Various utilities for faceted search

Overview Package Class Use Tree Deprecated Index Help


org.apache.lucene.facet.util Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.facet.util

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.facet.util.MultiCategoryListIterator (implements org.apache.lucene.facet.search.CategoryListIterator)
    • org.apache.lucene.facet.util.PartitionsUtils
    • org.apache.lucene.facet.util.ResultSortUtils
    • org.apache.lucene.facet.util.ScoredDocIdsUtils


Uses of Package org.apache.lucene.facet.util

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.facet.util

No usage of org.apache.lucene.facet.util

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PartitionsUtils

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.util
Class PartitionsUtils

java.lang.Object
    extended by  org.apache.lucene.facet.util.PartitionsUtils

public final class PartitionsUtils
extends Object

Utilities for partitions - sizes and such

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
PartitionsUtils()
Method Summary
static String | partitionName(CategoryListParams clParams, int partition) Partition name by its number
static String | partitionNameByOrdinal(FacetIndexingParams iParams, CategoryListParams clParams, int ordinal) Partition name by category ordinal
static int | partitionNumber(FacetIndexingParams iParams, int ordinal) Partition number of an ordinal.
static int | partitionNumber(FacetSearchParams sParams, int ordinal)
static int | partitionOffset(FacetIndexingParams iParams, int partitionNumber, TaxonomyReader taxonomyReader) Get the offset for a given partition.
static int | partitionOffset(FacetSearchParams sParams, int partitionNumber, TaxonomyReader taxonomyReader)
static int | partitionSize(FacetIndexingParams indexingParams, TaxonomyReader taxonomyReader) Get the partition size in this parameter, or return the size of the taxonomy, which is smaller.
static int | partitionSize(FacetSearchParams sParams, TaxonomyReader taxonomyReader)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PartitionsUtils

public PartitionsUtils()
Method Detail

partitionOffset

public static final int partitionOffset(FacetIndexingParams iParams,
                                        int partitionNumber,
                                        TaxonomyReader taxonomyReader)
Get the offset for a given partition. That is, what is the minimum number an ordinal could be for a particular partition.

partitionOffset

public static final int partitionOffset(FacetSearchParams sParams,
                                        int partitionNumber,
                                        TaxonomyReader taxonomyReader)
See Also:
partitionOffset(FacetIndexingParams, int, TaxonomyReader)

partitionSize

public static final int partitionSize(FacetIndexingParams indexingParams,
                                      TaxonomyReader taxonomyReader)
Get the partition size in this parameter, or return the size of the taxonomy, which is smaller. (Guarantees usage of as little memory as possible at search time).

partitionSize

public static final int partitionSize(FacetSearchParams sParams,
                                      TaxonomyReader taxonomyReader)
See Also:
partitionSize(FacetIndexingParams, TaxonomyReader)

partitionNumber

public static final int partitionNumber(FacetIndexingParams iParams,
                                        int ordinal)
Partition number of an ordinal.

This allows to locate the partition containing a certain (facet) ordinal.

See Also:
FacetIndexingParams.getPartitionSize()

partitionNumber

public static final int partitionNumber(FacetSearchParams sParams,
                                        int ordinal)
See Also:
partitionNumber(FacetIndexingParams, int)

partitionNameByOrdinal

public static final String partitionNameByOrdinal(FacetIndexingParams iParams,
                                                  CategoryListParams clParams,
                                                  int ordinal)
Partition name by category ordinal

partitionName

public static final String partitionName(CategoryListParams clParams,
                                         int partition)
Partition name by its number

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ResultSortUtils

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.util
Class ResultSortUtils

java.lang.Object
    extended by  org.apache.lucene.facet.util.ResultSortUtils

public class ResultSortUtils
extends Object

Utilities for generating facet results sorted as required

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ResultSortUtils()
Method Summary
static Heap<FacetResultNode> createSuitableHeap(FacetRequest facetRequest)
Create a suitable heap according to facet request being served.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ResultSortUtils

public ResultSortUtils()
Method Detail

createSuitableHeap

public static Heap<FacetResultNode> createSuitableHeap(FacetRequest facetRequest)
Create a suitable heap according to facet request being served.

Returns:
heap for maintaining results for specified request.
Throws:
IllegalArgumentException - is provided facet request is not supported
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScoredDocIdsUtils

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.facet.util
Class ScoredDocIdsUtils

java.lang.Object
    extended by  org.apache.lucene.facet.util.ScoredDocIdsUtils

public class ScoredDocIdsUtils
extends Object

Utility methods for Scored Doc IDs.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ScoredDocIdsUtils()
Method Summary
static ScoredDocIDs | createAllDocsScoredDocIDs(IndexReader reader) Creates a ScoredDocIDs which returns document IDs all non-deleted doc ids according to the given reader.
static ScoredDocIDs | createScoredDocIds(DocIdSet docIdSet, int maxDoc) Create a ScoredDocIDs out of a given docIdSet and the total number of documents in an index
static ScoredDocIDs | createScoredDocIDsSubset(ScoredDocIDs allDocIds, int[] sampleSet) Create a subset of an existing ScoredDocIDs object.
static ScoredDocIDs | getComplementSet(ScoredDocIDs docids, IndexReader reader) Create a complement of the input set.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ScoredDocIdsUtils

public ScoredDocIdsUtils()
Method Detail

getComplementSet

public static final ScoredDocIDs getComplementSet(ScoredDocIDs docids,
                                                  IndexReader reader)
                                           throws IOException
Create a complement of the input set. The returned ScoredDocIDs does not contain any scores, which makes sense given that the complementing documents were not scored. Note: the complement set does NOT contain doc ids which are noted as deleted by the given reader

Parameters:
docids - to be complemented.
reader - holding the number of documents & information about deletions.
Throws:
IOException

createScoredDocIDsSubset

public static final ScoredDocIDs createScoredDocIDsSubset(ScoredDocIDs allDocIds,
                                                          int[] sampleSet)
                                                   throws IOException
Create a subset of an existing ScoredDocIDs object.

Parameters:
allDocIds - orginal set
sampleSet - Doc Ids of the subset.
Throws:
IOException

createAllDocsScoredDocIDs

public static final ScoredDocIDs createAllDocsScoredDocIDs(IndexReader reader)
Creates a ScoredDocIDs which returns document IDs all non-deleted doc ids according to the given reader. The returned set contains the range of [0 .. reader.maxDoc ) doc ids

createScoredDocIds

public static final ScoredDocIDs createScoredDocIds(DocIdSet docIdSet,
                                                    int maxDoc)
Create a ScoredDocIDs out of a given docIdSet and the total number of documents in an index

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.facet.util.MultiCategoryListIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.util.MultiCategoryListIterator

No usage of org.apache.lucene.facet.util.MultiCategoryListIterator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.util.PartitionsUtils

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.util.PartitionsUtils

No usage of org.apache.lucene.facet.util.PartitionsUtils

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.util.ResultSortUtils

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.util.ResultSortUtils

No usage of org.apache.lucene.facet.util.ResultSortUtils

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.facet.util.ScoredDocIdsUtils

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.facet.util.ScoredDocIdsUtils

No usage of org.apache.lucene.facet.util.ScoredDocIdsUtils

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AbstractAllTermDocs

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class AbstractAllTermDocs

java.lang.Object
    extended by  org.apache.lucene.index.AbstractAllTermDocs
All Implemented Interfaces:
Closeable, TermDocs
public abstract class AbstractAllTermDocs
extends Object
implements TermDocs

Base class for enumerating all but deleted docs.

NOTE: this class is meant only to be used internally by Lucene; it's only public so it can be shared across packages. This means the API is freely subject to change, and, the class could be removed entirely, in any Lucene release. Use directly at your own risk!

Field Summary
protected int | doc
protected int | maxDoc
Constructor Summary
protected AbstractAllTermDocs(int maxDoc)
Method Summary
void | close() Frees associated resources.
int | doc() Returns the current document number.
int | freq() Returns the frequency of the term within the current document.
abstract boolean | isDeleted(int doc)
boolean | next() Moves to the next pair in the enumeration.
int | read(int[] docs, int[] freqs) Attempts to read multiple entries from the enumeration, up to length of docs.
void | seek(Term term) Sets this to the data for a term.
void | seek(TermEnum termEnum) Sets this to the data for the current term in a TermEnum.
boolean | skipTo(int target) Skips entries to the first beyond the current whose document number is greater than or equal to target.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

maxDoc

protected int maxDoc

doc

protected int doc
Constructor Detail

AbstractAllTermDocs

protected AbstractAllTermDocs(int maxDoc)
Method Detail

seek

public void seek(Term term)
          throws IOException
Description copied from interface: TermDocs
Sets this to the data for a term. The enumeration is reset to the start of the data for this term.

Specified by:
seek in interface TermDocs
Throws:
IOException

seek

public void seek(TermEnum termEnum)
          throws IOException
Description copied from interface: TermDocs
Sets this to the data for the current term in a TermEnum. This may be optimized in some implementations.

Specified by:
seek in interface TermDocs
Throws:
IOException

doc

public int doc()
Description copied from interface: TermDocs
Returns the current document number.

This is invalid until TermDocs.next() is called for the first time.

Specified by:
doc in interface TermDocs

freq

public int freq()
Description copied from interface: TermDocs
Returns the frequency of the term within the current document.

This is invalid until TermDocs.next() is called for the first time.

Specified by:
freq in interface TermDocs

next

public boolean next()
             throws IOException
Description copied from interface: TermDocs
Moves to the next pair in the enumeration.

Returns true iff there is such a next pair in the enumeration. Once this returns false you should not call any of the other methods.

Specified by:
next in interface TermDocs
Throws:
IOException

read

public int read(int[] docs,
                int[] freqs)
         throws IOException
Description copied from interface: TermDocs
Attempts to read multiple entries from the enumeration, up to length of docs. Document numbers are stored in docs, and term frequencies are stored in freqs. The freqs array must be as long as the docs array.

Returns the number of entries read. Zero is only returned when the stream has been exhausted.

Specified by:
read in interface TermDocs
Throws:
IOException

skipTo

public boolean skipTo(int target)
               throws IOException
Description copied from interface: TermDocs
Skips entries to the first beyond the current whose document number is greater than or equal to target.

Returns true iff there is such an entry.

Behaves as if written:

   boolean skipTo(int target) {
     do {
       if (!next())
             return false;
     } while (target > doc());
     return true;
   }
Some implementations are considerably more efficient than that.

Specified by:
skipTo in interface TermDocs
Throws:
IOException

close

public void close()
           throws IOException
Description copied from interface: TermDocs
Frees associated resources.

Specified by:
close in interface Closeable
Specified by:
close in interface TermDocs
Throws:
IOException

isDeleted

public abstract boolean isDeleted(int doc)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BalancedSegmentMergePolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class BalancedSegmentMergePolicy

java.lang.Object
    extended by  org.apache.lucene.index.MergePolicy
        extended by  org.apache.lucene.index.LogMergePolicy
            extended by  org.apache.lucene.index.LogByteSizeMergePolicy
                extended by  org.apache.lucene.index.BalancedSegmentMergePolicy
All Implemented Interfaces:
Closeable
public class BalancedSegmentMergePolicy
extends LogByteSizeMergePolicy

Merge policy that tries to balance not doing large segment merges with not accumulating too many segments in the index, to provide for better performance in near real-time setting.

This is based on code from zoie, described in more detail at http://code.google.com/p/zoie/wiki/ZoieMergePolicy.

Nested Class Summary
static class BalancedSegmentMergePolicy.MergePolicyParams
Specifies configuration parameters for BalancedSegmentMergePolicy.
Nested classes/interfaces inherited from class org.apache.lucene.index.MergePolicy
MergePolicy.MergeAbortedException, MergePolicy.MergeException, MergePolicy.MergeSpecification, MergePolicy.OneMerge
Field Summary
static int DEFAULT_NUM_LARGE_SEGMENTS
Fields inherited from class org.apache.lucene.index.LogByteSizeMergePolicy
DEFAULT_MAX_MERGE_MB, DEFAULT_MAX_MERGE_MB_FOR_FORCED_MERGE, DEFAULT_MIN_MERGE_MB
Fields inherited from class org.apache.lucene.index.LogMergePolicy
calibrateSizeByDeletes, DEFAULT_MAX_MERGE_DOCS, DEFAULT_MERGE_FACTOR, DEFAULT_NO_CFS_RATIO, LEVEL_LOG_SPAN, maxMergeDocs, maxMergeSize, maxMergeSizeForForcedMerge, mergeFactor, minMergeSize, noCFSRatio, useCompoundFile
Fields inherited from class org.apache.lucene.index.MergePolicy
writer
Constructor Summary
BalancedSegmentMergePolicy()
Method Summary
MergePolicy.MergeSpecification | findForcedDeletesMerges(SegmentInfos infos) Finds merges necessary to force-merge all deletes from the index.
MergePolicy.MergeSpecification | findForcedMerges(SegmentInfos infos, int maxNumSegments, Map<SegmentInfo,Boolean> segmentsToMerge) Returns the merges necessary to merge the index down to a specified number of segments.
MergePolicy.MergeSpecification | findMerges(SegmentInfos infos) Checks if any merges are now necessary and returns a MergePolicy.MergeSpecification if so.
int | getMaxSmallSegments()
int | getNumLargeSegments()
boolean | getPartialExpunge()
void | setMaxSmallSegments(int maxSmallSegments)
void | setMergeFactor(int mergeFactor) Determines how often segment indices are merged by addDocument().
void | setMergePolicyParams(BalancedSegmentMergePolicy.MergePolicyParams params)
void | setNumLargeSegments(int numLargeSegments)
void | setPartialExpunge(boolean doPartialExpunge)
protected long | size(SegmentInfo info)
Methods inherited from class org.apache.lucene.index.LogByteSizeMergePolicy
getMaxMergeMB, getMaxMergeMBForForcedMerge, getMaxMergeMBForOptimize, getMinMergeMB, setMaxMergeMB, setMaxMergeMBForForcedMerge, setMaxMergeMBForOptimize, setMinMergeMB
Methods inherited from class org.apache.lucene.index.LogMergePolicy
close, getCalibrateSizeByDeletes, getMaxMergeDocs, getMergeFactor, getNoCFSRatio, getUseCompoundFile, isMerged, isMerged, message, setCalibrateSizeByDeletes, setMaxMergeDocs, setNoCFSRatio, setUseCompoundFile, sizeBytes, sizeDocs, toString, useCompoundFile, verbose
Methods inherited from class org.apache.lucene.index.MergePolicy
setIndexWriter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_NUM_LARGE_SEGMENTS

public static final int DEFAULT_NUM_LARGE_SEGMENTS
See Also:
Constant Field Values
Constructor Detail

BalancedSegmentMergePolicy

public BalancedSegmentMergePolicy()
Method Detail

setMergePolicyParams

public void setMergePolicyParams(BalancedSegmentMergePolicy.MergePolicyParams params)

size

protected long size(SegmentInfo info)
             throws IOException
Overrides:
size in class LogByteSizeMergePolicy
Throws:
IOException

setPartialExpunge

public void setPartialExpunge(boolean doPartialExpunge)

getPartialExpunge

public boolean getPartialExpunge()

setNumLargeSegments

public void setNumLargeSegments(int numLargeSegments)

getNumLargeSegments

public int getNumLargeSegments()

setMaxSmallSegments

public void setMaxSmallSegments(int maxSmallSegments)

getMaxSmallSegments

public int getMaxSmallSegments()

setMergeFactor

public void setMergeFactor(int mergeFactor)
Description copied from class: LogMergePolicy
Determines how often segment indices are merged by addDocument(). With smaller values, less RAM is used while indexing, and searches are faster, but indexing speed is slower. With larger values, more RAM is used during indexing, and while searches is slower, indexing is faster. Thus larger values (> 10) are best for batch index creation, and smaller values (< 10) for indices that are interactively maintained.

Overrides:
setMergeFactor in class LogMergePolicy

findForcedMerges

public MergePolicy.MergeSpecification findForcedMerges(SegmentInfos infos,
                                                       int maxNumSegments,
                                                       Map<SegmentInfo,Boolean> segmentsToMerge)
                                                throws IOException
Description copied from class: LogMergePolicy
Returns the merges necessary to merge the index down to a specified number of segments. This respects the LogMergePolicy.maxMergeSizeForForcedMerge setting. By default, and assuming maxNumSegments=1, only one segment will be left in the index, where that segment has no deletions pending nor separate norms, and it is in compound file format if the current useCompoundFile setting is true. This method returns multiple merges (mergeFactor at a time) so the MergeScheduler in use may make use of concurrency.

Overrides:
findForcedMerges in class LogMergePolicy
Parameters:
infos - the total set of segments in the index
maxNumSegments - requested maximum number of segments in the index (currently this is always 1)
segmentsToMerge - contains the specific SegmentInfo instances that must be merged away. This may be a subset of all SegmentInfos. If the value is True for a given SegmentInfo, that means this segment was an original segment present in the to-be-merged index; else, it was a segment produced by a cascaded merge.
Throws:
IOException

findForcedDeletesMerges

public MergePolicy.MergeSpecification findForcedDeletesMerges(SegmentInfos infos)
                                                       throws CorruptIndexException,
                                                              IOException
Description copied from class: LogMergePolicy
Finds merges necessary to force-merge all deletes from the index. We simply merge adjacent segments that have deletes, up to mergeFactor at a time.

Overrides:
findForcedDeletesMerges in class LogMergePolicy
Parameters:
infos - the total set of segments in the index
Throws:
CorruptIndexException
IOException

findMerges

public MergePolicy.MergeSpecification findMerges(SegmentInfos infos)
                                          throws IOException
Description copied from class: LogMergePolicy
Checks if any merges are now necessary and returns a MergePolicy.MergeSpecification if so. A merge is necessary when there are more than LogMergePolicy.setMergeFactor(int) segments at a given level. When multiple levels have too many segments, this method will return multiple merges, allowing the MergeScheduler to use concurrency.

Overrides:
findMerges in class LogMergePolicy
Parameters:
infos - the total set of segments in the index
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BalancedSegmentMergePolicy.MergePolicyParams

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class BalancedSegmentMergePolicy.MergePolicyParams

java.lang.Object
    extended by  org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams
Enclosing class:
BalancedSegmentMergePolicy
public static class BalancedSegmentMergePolicy.MergePolicyParams
extends Object

Specifies configuration parameters for BalancedSegmentMergePolicy.

Constructor Summary
BalancedSegmentMergePolicy.MergePolicyParams()
Method Summary
int | getMaxMergeDocs()
int | getMaxSmallSegments()
int | getMergeFactor()
int | getNumLargeSegments()
boolean | getPartialExpunge()
boolean | isUseCompoundFile()
void | setMaxMergeDocs(int maxMergeDocs)
void | setMaxSmallSegments(int maxSmallSegments)
void | setMergeFactor(int mergeFactor)
void | setNumLargeSegments(int numLargeSegments)
void | setPartialExpunge(boolean doPartialExpunge)
void | setUseCompoundFile(boolean useCompoundFile)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BalancedSegmentMergePolicy.MergePolicyParams

public BalancedSegmentMergePolicy.MergePolicyParams()
Method Detail

setNumLargeSegments

public void setNumLargeSegments(int numLargeSegments)

getNumLargeSegments

public int getNumLargeSegments()

setMaxSmallSegments

public void setMaxSmallSegments(int maxSmallSegments)

getMaxSmallSegments

public int getMaxSmallSegments()

setPartialExpunge

public void setPartialExpunge(boolean doPartialExpunge)

getPartialExpunge

public boolean getPartialExpunge()

setMergeFactor

public void setMergeFactor(int mergeFactor)

getMergeFactor

public int getMergeFactor()

setMaxMergeDocs

public void setMaxMergeDocs(int maxMergeDocs)

getMaxMergeDocs

public int getMaxMergeDocs()

setUseCompoundFile

public void setUseCompoundFile(boolean useCompoundFile)

isUseCompoundFile

public boolean isUseCompoundFile()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CheckIndex

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class CheckIndex

java.lang.Object
    extended by  org.apache.lucene.index.CheckIndex

public class CheckIndex
extends Object

Basic tool and API to check the health of an index and write a new segments file that removes reference to problematic segments.

As this tool checks every byte in the index, on a large index it can take quite a long time to run.

WARNING: This API is experimental and might change in incompatible ways in the next release.
Please make a complete backup of your index before using this to fix your index!

Nested Class Summary
static class CheckIndex.Status
Returned from checkIndex() detailing the health and status of the index.
Constructor Summary
CheckIndex(Directory dir)
Create a new CheckIndex on the directory.
Method Summary
 CheckIndex.Status checkIndex()
Returns a CheckIndex.Status instance detailing the state of the index.
 CheckIndex.Status checkIndex(List<String> onlySegments)
Returns a CheckIndex.Status instance detailing the state of the index.
 void fixIndex(CheckIndex.Status result)
Repairs the index using previously returned result from checkIndex().
static void main(String[] args)
Command-line interface to check and fix an index.
 void setInfoStream(PrintStream out)
Set infoStream where messages should go.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CheckIndex

public CheckIndex(Directory dir)
Create a new CheckIndex on the directory.

Method Detail

setInfoStream

public void setInfoStream(PrintStream out)
Set infoStream where messages should go. If null, no messages are printed

checkIndex

public CheckIndex.Status checkIndex()
                             throws IOException
Returns a CheckIndex.Status instance detailing the state of the index.

As this method checks every byte in the index, on a large index it can take quite a long time to run.

WARNING: make sure you only call this when the index is not opened by any writer.

Throws:
IOException

checkIndex

public CheckIndex.Status checkIndex(List<String> onlySegments)
                             throws IOException
Returns a CheckIndex.Status instance detailing the state of the index.

Parameters:
onlySegments - list of specific segment names to check

As this method checks every byte in the specified segments, on a large index it can take quite a long time to run.

WARNING: make sure you only call this when the index is not opened by any writer.

Throws:
IOException

fixIndex

public void fixIndex(CheckIndex.Status result)
              throws IOException
Repairs the index using previously returned result from checkIndex(). Note that this does not remove any of the unreferenced files after it's done; you must separately open an IndexWriter, which deletes unreferenced files when it's created.

WARNING: this writes a new segments file into the index, effectively removing all documents in broken segments from the index. BE CAREFUL.

WARNING: Make sure you only call this when the index is not opened by any writer.

Throws:
IOException

main

public static void main(String[] args)
                 throws IOException,
                        InterruptedException
Command-line interface to check and fix an index.

Run it like this:

    java -ea:org.apache.lucene... org.apache.lucene.index.CheckIndex pathToIndex [-fix] [-segment X] [-segment Y]
  • -fix: actually write a new segments_N file, removing any problematic segments
  • -segment X: only check the specified segment(s). This can be specified multiple times, to check more than one segment, eg -segment _2 -segment _a. You can't use this with the -fix option.

WARNING: -fix should only be used on an emergency basis as it will cause documents (perhaps many) to be permanently removed from the index. Always make a backup copy of your index before running this! Do not run this tool on an index that is actively being written to. You have been warned!

Run without -fix, this tool will open the index, report version information and report any exceptions it hits and what action it would take if -fix were specified. With -fix, this tool will remove any segments that have issues and write a new segments_N file. This means all documents contained in the affected segments will be removed.

This tool exits with exit code 1 if the index cannot be opened or has any corruption, else 0.

Throws:
IOException
InterruptedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CheckIndex.Status.FieldNormStatus

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class CheckIndex.Status.FieldNormStatus

java.lang.Object
    extended by  org.apache.lucene.index.CheckIndex.Status.FieldNormStatus
Enclosing class:
CheckIndex.Status
public static final class CheckIndex.Status.FieldNormStatus
extends Object

Status from testing field norms.

Field Summary
Throwable | error Exception thrown during term index test (null on success)
long | totFields Number of fields successfully tested
Constructor Summary
CheckIndex.Status.FieldNormStatus()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

totFields

public long totFields
Number of fields successfully tested

error

public Throwable error
Exception thrown during term index test (null on success)

Constructor Detail

CheckIndex.Status.FieldNormStatus

public CheckIndex.Status.FieldNormStatus()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CheckIndex.Status

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class CheckIndex.Status

java.lang.Object
    extended by  org.apache.lucene.index.CheckIndex.Status
Enclosing class:
CheckIndex
public static class CheckIndex.Status
extends Object

Returned from CheckIndex.checkIndex() detailing the health and status of the index.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | CheckIndex.Status.FieldNormStatus Status from testing field norms.
static class | CheckIndex.Status.SegmentInfoStatus Holds the status of each segment in the index.
static class | CheckIndex.Status.StoredFieldStatus Status from testing stored fields.
static class | CheckIndex.Status.TermIndexStatus Status from testing term index.
static class | CheckIndex.Status.TermVectorStatus Status from testing stored fields.
Field Summary
boolean | cantOpenSegments True if we were unable to open the segments_N file.
boolean | clean True if no problems were found with the index.
Directory | dir Directory index is in.
int | maxSegmentName The greatest segment name.
boolean | missingSegments True if we were unable to locate and load the segments_N file.
boolean | missingSegmentVersion True if we were unable to read the version number from segments_N file.
int | numBadSegments How many bad segments were found.
int | numSegments Number of segments in the index.
boolean | partial True if we checked only specific segments (CheckIndex.checkIndex(List)) was called with non-null argument).
String | segmentFormat String description of the version of the index.
List<CheckIndex.Status.SegmentInfoStatus> | segmentInfos List of CheckIndex.Status.SegmentInfoStatus instances, detailing status of each segment.
List<String> | segmentsChecked Empty unless you passed specific segments list to check as optional 3rd argument.
String | segmentsFileName Name of latest segments_N file in the index.
boolean | toolOutOfDate True if the index was created with a newer version of Lucene than the CheckIndex tool.
int | totLoseDocCount How many documents will be lost to bad segments.
Map<String,String> | userData Holds the userData of the last commit in the index
boolean | validCounter Whether the SegmentInfos.counter is greater than any of the segments' names.
Constructor Summary
CheckIndex.Status()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

clean

public boolean clean
True if no problems were found with the index.

missingSegments

public boolean missingSegments
True if we were unable to locate and load the segments_N file.

cantOpenSegments

public boolean cantOpenSegments
True if we were unable to open the segments_N file.

missingSegmentVersion

public boolean missingSegmentVersion
True if we were unable to read the version number from segments_N file.

segmentsFileName

public String segmentsFileName
Name of latest segments_N file in the index.

numSegments

public int numSegments
Number of segments in the index.

segmentFormat

public String segmentFormat
String description of the version of the index.

segmentsChecked

public List<String> segmentsChecked
Empty unless you passed specific segments list to check as optional 3rd argument.

See Also:
CheckIndex.checkIndex(List)

toolOutOfDate

public boolean toolOutOfDate
True if the index was created with a newer version of Lucene than the CheckIndex tool.

segmentInfos

public List<CheckIndex.Status.SegmentInfoStatus> segmentInfos
List of CheckIndex.Status.SegmentInfoStatus instances, detailing status of each segment.

dir

public Directory dir
Directory index is in.

totLoseDocCount

public int totLoseDocCount
How many documents will be lost to bad segments.

numBadSegments

public int numBadSegments
How many bad segments were found.

partial

public boolean partial
True if we checked only specific segments (CheckIndex.checkIndex(List)) was called with non-null argument).

maxSegmentName

public int maxSegmentName
The greatest segment name.

validCounter

public boolean validCounter
Whether the SegmentInfos.counter is greater than any of the segments' names.

userData

public Map<String,String> userData
Holds the userData of the last commit in the index

Constructor Detail

CheckIndex.Status

public CheckIndex.Status()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CheckIndex.Status.SegmentInfoStatus

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class CheckIndex.Status.SegmentInfoStatus

java.lang.Object
    extended by  org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
Enclosing class:
CheckIndex.Status
public static class CheckIndex.Status.SegmentInfoStatus
extends Object

Holds the status of each segment in the index. See CheckIndex.Status.segmentInfos.

WARNING: this API is new and experimental and is subject to suddenly change in the next release.

Field Summary
boolean | compound True if segment is compound file format.
String | deletionsFileName Name of the current deletions file name.
Map<String,String> | diagnostics Map that includes certain debugging details that IndexWriter records into each segment it creates
int | docCount Document count (does not take deletions into account).
boolean | docStoreCompoundFile True if the shared doc store files are compound file format.
int | docStoreOffset Doc store offset, if this segment shares the doc store files (stored fields and term vectors) with other segments.
String | docStoreSegment String of the shared doc store segment, or null if this segment does not share the doc store files.
CheckIndex.Status.FieldNormStatus | fieldNormStatus Status for testing of field norms (null if field norms could not be tested).
boolean | hasDeletions True if this segment has pending deletions.
boolean | hasProx True if at least one of the fields in this segment has position data
String | name Name of the segment.
int | numDeleted Number of deleted documents.
int | numFiles Number of files referenced by this segment.
boolean | openReaderPassed True if we were able to open a SegmentReader on this segment.
double | sizeMB Net size (MB) of the files referenced by this segment.
CheckIndex.Status.StoredFieldStatus | storedFieldStatus Status for testing of stored fields (null if stored fields could not be tested).
CheckIndex.Status.TermIndexStatus | termIndexStatus Status for testing of indexed terms (null if indexed terms could not be tested).
CheckIndex.Status.TermVectorStatus | termVectorStatus Status for testing of term vectors (null if term vectors could not be tested).
Constructor Summary
CheckIndex.Status.SegmentInfoStatus()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

name

public String name
Name of the segment.

docCount

public int docCount
Document count (does not take deletions into account).

compound

public boolean compound
True if segment is compound file format.

numFiles

public int numFiles
Number of files referenced by this segment.

sizeMB

public double sizeMB
Net size (MB) of the files referenced by this segment.

docStoreOffset

public int docStoreOffset
Doc store offset, if this segment shares the doc store files (stored fields and term vectors) with other segments. This is -1 if it does not share.

docStoreSegment

public String docStoreSegment
String of the shared doc store segment, or null if this segment does not share the doc store files.

docStoreCompoundFile

public boolean docStoreCompoundFile
True if the shared doc store files are compound file format.

hasDeletions

public boolean hasDeletions
True if this segment has pending deletions.

deletionsFileName

public String deletionsFileName
Name of the current deletions file name.

numDeleted

public int numDeleted
Number of deleted documents.

openReaderPassed

public boolean openReaderPassed
True if we were able to open a SegmentReader on this segment.

hasProx

public boolean hasProx
True if at least one of the fields in this segment has position data

See Also:
AbstractField.setIndexOptions(org.apache.lucene.index.FieldInfo.IndexOptions)

diagnostics

public Map<String,String> diagnostics
Map that includes certain debugging details that IndexWriter records into each segment it creates

fieldNormStatus

public CheckIndex.Status.FieldNormStatus fieldNormStatus
Status for testing of field norms (null if field norms could not be tested).

termIndexStatus

public CheckIndex.Status.TermIndexStatus termIndexStatus
Status for testing of indexed terms (null if indexed terms could not be tested).

storedFieldStatus

public CheckIndex.Status.StoredFieldStatus storedFieldStatus
Status for testing of stored fields (null if stored fields could not be tested).

termVectorStatus

public CheckIndex.Status.TermVectorStatus termVectorStatus
Status for testing of term vectors (null if term vectors could not be tested).

Constructor Detail

CheckIndex.Status.SegmentInfoStatus

public CheckIndex.Status.SegmentInfoStatus()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CheckIndex.Status.StoredFieldStatus

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class CheckIndex.Status.StoredFieldStatus

java.lang.Object
    extended by  org.apache.lucene.index.CheckIndex.Status.StoredFieldStatus
Enclosing class:
CheckIndex.Status
public static final class CheckIndex.Status.StoredFieldStatus
extends Object

Status from testing stored fields.

Field Summary
int | docCount Number of documents tested.
Throwable | error Exception thrown during stored fields test (null on success)
long | totFields Total number of stored fields tested.
Constructor Summary
CheckIndex.Status.StoredFieldStatus()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

docCount

public int docCount
Number of documents tested.

totFields

public long totFields
Total number of stored fields tested.

error

public Throwable error
Exception thrown during stored fields test (null on success)

Constructor Detail

CheckIndex.Status.StoredFieldStatus

public CheckIndex.Status.StoredFieldStatus()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CheckIndex.Status.TermIndexStatus

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class CheckIndex.Status.TermIndexStatus

java.lang.Object
    extended by  org.apache.lucene.index.CheckIndex.Status.TermIndexStatus
Enclosing class:
CheckIndex.Status
public static final class CheckIndex.Status.TermIndexStatus
extends Object

Status from testing term index.

Field Summary
Throwable | error Exception thrown during term index test (null on success)
long | termCount Total term count
long | totFreq Total frequency across all terms.
long | totPos Total number of positions.
Constructor Summary
CheckIndex.Status.TermIndexStatus()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

termCount

public long termCount
Total term count

totFreq

public long totFreq
Total frequency across all terms.

totPos

public long totPos
Total number of positions.

error

public Throwable error
Exception thrown during term index test (null on success)

Constructor Detail

CheckIndex.Status.TermIndexStatus

public CheckIndex.Status.TermIndexStatus()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CheckIndex.Status.TermVectorStatus

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class CheckIndex.Status.TermVectorStatus

java.lang.Object
    extended by  org.apache.lucene.index.CheckIndex.Status.TermVectorStatus
Enclosing class:
CheckIndex.Status
public static final class CheckIndex.Status.TermVectorStatus
extends Object

Status from testing stored fields.

Field Summary
int | docCount Number of documents tested.
Throwable | error Exception thrown during term vector test (null on success)
long | totVectors Total number of term vectors tested.
Constructor Summary
CheckIndex.Status.TermVectorStatus()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

docCount

public int docCount
Number of documents tested.

totVectors

public long totVectors
Total number of term vectors tested.

error

public Throwable error
Exception thrown during term vector test (null on success)

Constructor Detail

CheckIndex.Status.TermVectorStatus

public CheckIndex.Status.TermVectorStatus()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CompoundFileExtractor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class CompoundFileExtractor

java.lang.Object
    extended by  org.apache.lucene.index.CompoundFileExtractor

public class CompoundFileExtractor
extends Object

Command-line tool for extracting sub-files out of a compound file.

Constructor Summary
CompoundFileExtractor()
Method Summary
static void main(String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CompoundFileExtractor

public CompoundFileExtractor()
Method Detail

main

public static void main(String[] args)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CompoundFileWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class CompoundFileWriter

java.lang.Object
    extended by  org.apache.lucene.index.CompoundFileWriter

public final class CompoundFileWriter
extends Object

Combines multiple files into a single compound file. The file format:

  • VInt fileCount
  • {Directory} fileCount entries with the following structure:
    • long dataOffset
    • String fileName
  • {File Data} fileCount entries with the raw data of the corresponding file
The fileCount integer indicates how many files are contained in this compound file. The {directory} that follows has that many entries. Each directory entry contains a long pointer to the start of this file's data section, and a String with that file's name.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
CompoundFileWriter(Directory dir, String name)
Create the compound stream in the specified file.
Method Summary
void | addFile(String file) Add a source stream.
void | addFile(String file, Directory dir) Same as addFile(String), only for files that are found in an external Directory.
void | close() Merge files with the extensions added up to now.
Directory | getDirectory() Returns the directory of the compound file.
String | getName() Returns the name of the compound file.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CompoundFileWriter

public CompoundFileWriter(Directory dir,
                          String name)
Create the compound stream in the specified file. The file name is the entire name (no extensions are added).

Throws:
NullPointerException - if dir or name is null
Method Detail

getDirectory

public Directory getDirectory()
Returns the directory of the compound file.

getName

public String getName()
Returns the name of the compound file.

addFile

public void addFile(String file)
Add a source stream. file is the string by which the sub-stream will be known in the compound stream.

Throws:
IllegalStateException - if this writer is closed
NullPointerException - if file is null
IllegalArgumentException - if a file with the same name has been added already

addFile

public void addFile(String file,
                    Directory dir)
Same as addFile(String), only for files that are found in an external Directory.

close

public void close()
           throws IOException
Merge files with the extensions added up to now. All files with these extensions are combined sequentially into the compound stream.

Throws:
IllegalStateException - if close() had been called before or if no file has been added to this object
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ConcurrentMergeScheduler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class ConcurrentMergeScheduler

java.lang.Object
    extended by  org.apache.lucene.index.MergeScheduler
        extended by  org.apache.lucene.index.ConcurrentMergeScheduler

public class ConcurrentMergeScheduler
extends MergeScheduler

A MergeScheduler that runs each merge using a separate thread.

Specify the max number of threads that may run at once with setMaxThreadCount(int).

Separately specify the maximum number of simultaneous merges with setMaxMergeCount(int). If the number of merges exceeds the max number of threads then the largest merges are paused until one of the smaller merges completes.

If more than getMaxMergeCount() merges are requested then this class will forcefully throttle the incoming threads by pausing until one more more merges complete.

Nested Class Summary
protected  class ConcurrentMergeScheduler.MergeThread
Field Summary
protected static Comparator<ConcurrentMergeScheduler.MergeThread> | compareByMergeDocCount
protected Directory | dir
protected int | mergeThreadCount
protected List<ConcurrentMergeScheduler.MergeThread> | mergeThreads
protected IndexWriter | writer
Constructor Summary
ConcurrentMergeScheduler()
Method Summary
static boolean anyUnhandledExceptions()
Used for testing
static void clearUnhandledExceptions()
 void close()
Close this MergeScheduler.
protected  void doMerge(MergePolicy.OneMerge merge)
Does the actual merge, by calling IndexWriter.merge(org.apache.lucene.index.MergePolicy.OneMerge)
 int getMaxMergeCount()
See setMaxMergeCount(int).
 int getMaxThreadCount()
protected  ConcurrentMergeScheduler.MergeThread getMergeThread(IndexWriter writer, MergePolicy.OneMerge merge)
Create and return a new MergeThread
 int getMergeThreadPriority()
Return the priority that merge threads run at.
protected  void handleMergeException(Throwable exc)
Called when an exception is hit in a background merge thread
 void merge(IndexWriter writer)
Run the merges provided by IndexWriter.getNextMerge().
protected  int mergeThreadCount()
Returns the number of merge threads that are alive.
protected  void message(String message)
Outputs the given message - this method assumes verbose() was called and returned true.
 void setMaxMergeCount(int count)
Sets the max # simultaneous merges that are allowed.
 void setMaxThreadCount(int count)
Sets the max # simultaneous merge threads that should be running at once.
 void setMergeThreadPriority(int pri)
Set the base priority that merge threads run at.
static void setTestMode()
Deprecated. this test mode code will be removed in a future release
 void sync()
Wait for any running merge threads to finish
protected  void updateMergeThreads()
Called whenever the running merges have changed, to pause & unpause threads.
protected  boolean verbose()
Returns true if verbosing is enabled.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

mergeThreads

protected List<ConcurrentMergeScheduler.MergeThread> mergeThreads

dir

protected Directory dir

writer

protected IndexWriter writer

mergeThreadCount

protected int mergeThreadCount

compareByMergeDocCount

protected static final Comparator<ConcurrentMergeScheduler.MergeThread> compareByMergeDocCount
Constructor Detail

ConcurrentMergeScheduler

public ConcurrentMergeScheduler()
Method Detail

setMaxThreadCount

public void setMaxThreadCount(int count)
Sets the max # simultaneous merge threads that should be running at once. This must be <= setMaxMergeCount(int).

getMaxThreadCount

public int getMaxThreadCount()
See Also:
setMaxThreadCount(int)

setMaxMergeCount

public void setMaxMergeCount(int count)
Sets the max # simultaneous merges that are allowed. If a merge is necessary yet we already have this many threads running, the incoming thread (that is calling add/updateDocument) will block until a merge thread has completed. Note that we will only run the smallest setMaxThreadCount(int) merges at a time.

getMaxMergeCount

public int getMaxMergeCount()
See setMaxMergeCount(int).

getMergeThreadPriority

public int getMergeThreadPriority()
Return the priority that merge threads run at. By default the priority is 1 plus the priority of (ie, slightly higher priority than) the first thread that calls merge.

setMergeThreadPriority

public void setMergeThreadPriority(int pri)
Set the base priority that merge threads run at. Note that CMS may increase priority of some merge threads beyond this base priority. It's best not to set this any higher than Thread.MAX_PRIORITY-maxThreadCount, so that CMS has room to set relative priority among threads.

updateMergeThreads

protected void updateMergeThreads()
Called whenever the running merges have changed, to pause & unpause threads. This method sorts the merge threads by their merge size in descending order and then pauses/unpauses threads from first to last -- that way, smaller merges are guaranteed to run before larger ones.

verbose

protected boolean verbose()
Returns true if verbosing is enabled. This method is usually used in conjunction with message(String), like that:
 if (verbose()) {
   message("your message");
 }

message

protected void message(String message)
Outputs the given message - this method assumes verbose() was called and returned true.

close

public void close()
Description copied from class: MergeScheduler
Close this MergeScheduler.

Specified by:
close in class MergeScheduler

sync

public void sync()
Wait for any running merge threads to finish

mergeThreadCount

protected int mergeThreadCount()
Returns the number of merge threads that are alive. Note that this number is ≤ mergeThreads size.

merge

public void merge(IndexWriter writer)
           throws IOException
Description copied from class: MergeScheduler
Run the merges provided by IndexWriter.getNextMerge().

Specified by:
merge in class MergeScheduler
Throws:
IOException

doMerge

protected void doMerge(MergePolicy.OneMerge merge)
                throws IOException
Does the actual merge, by calling IndexWriter.merge(org.apache.lucene.index.MergePolicy.OneMerge)

Throws:
IOException

getMergeThread

protected ConcurrentMergeScheduler.MergeThread getMergeThread(IndexWriter writer,
                                                              MergePolicy.OneMerge merge)
                                                       throws IOException
Create and return a new MergeThread

Throws:
IOException

handleMergeException

protected void handleMergeException(Throwable exc)
Called when an exception is hit in a background merge thread

anyUnhandledExceptions

public static boolean anyUnhandledExceptions()
Used for testing

clearUnhandledExceptions

public static void clearUnhandledExceptions()

setTestMode

@Deprecated
public static void setTestMode()
Deprecated. this test mode code will be removed in a future release

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ConcurrentMergeScheduler.MergeThread

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class ConcurrentMergeScheduler.MergeThread

java.lang.Object
    extended by  java.lang.Thread
        extended by  org.apache.lucene.index.ConcurrentMergeScheduler.MergeThread
All Implemented Interfaces:
Runnable
Enclosing class:
ConcurrentMergeScheduler
protected class ConcurrentMergeScheduler.MergeThread
extends Thread

Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor Summary
ConcurrentMergeScheduler.MergeThread(IndexWriter writer, MergePolicy.OneMerge startMerge)
Method Summary
MergePolicy.OneMerge | getCurrentMerge()
MergePolicy.OneMerge | getRunningMerge()
void | run()
void | setRunningMerge(MergePolicy.OneMerge merge)
void | setThreadPriority(int pri)
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ConcurrentMergeScheduler.MergeThread

public ConcurrentMergeScheduler.MergeThread(IndexWriter writer,
                                            MergePolicy.OneMerge startMerge)
                                     throws IOException
Throws:
IOException
Method Detail

setRunningMerge

public void setRunningMerge(MergePolicy.OneMerge merge)

getRunningMerge

public MergePolicy.OneMerge getRunningMerge()

getCurrentMerge

public MergePolicy.OneMerge getCurrentMerge()

setThreadPriority

public void setThreadPriority(int pri)

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CorruptIndexException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class CorruptIndexException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.io.IOException
                extended by  org.apache.lucene.index.CorruptIndexException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
IndexFormatTooNewException, IndexFormatTooOldException
public class CorruptIndexException
extends IOException

This exception is thrown when Lucene detects an inconsistency in the index.

See Also:
Serialized Form

Constructor Summary
CorruptIndexException(String message)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CorruptIndexException

public CorruptIndexException(String message)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class FieldInfo

java.lang.Object
    extended by  org.apache.lucene.index.FieldInfo

public final class FieldInfo
extends Object

Access to the Fieldable Info file that describes document fields and whether or not they are indexed. Each segment has a separate Fieldable Info file. Objects of this class are thread-safe for multiple readers, but only one thread can be adding documents at a time, with no other reader or writer threads accessing this object.

Nested Class Summary
static class FieldInfo.IndexOptions
Controls how much information is stored in the postings lists.
Field Summary
FieldInfo.IndexOptions | indexOptions
boolean | isIndexed
String | name
int | number
boolean | omitNorms
boolean | storePayloads
boolean | storeTermVector
Method Summary
 Object clone()
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

name

public final String name

number

public final int number

isIndexed

public boolean isIndexed

storeTermVector

public boolean storeTermVector

omitNorms

public boolean omitNorms

indexOptions

public FieldInfo.IndexOptions indexOptions

storePayloads

public boolean storePayloads
Method Detail

clone

public Object clone()
Overrides:
clone in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldInfo.IndexOptions

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.index
Enum FieldInfo.IndexOptions

java.lang.Object
    extended by  java.lang.Enum<FieldInfo.IndexOptions>
        extended by  org.apache.lucene.index.FieldInfo.IndexOptions
All Implemented Interfaces:
Serializable, Comparable<FieldInfo.IndexOptions>
Enclosing class:
FieldInfo
public static enum FieldInfo.IndexOptions
extends Enum<FieldInfo.IndexOptions>

Controls how much information is stored in the postings lists.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Enum Constant Summary
DOCS_AND_FREQS
only documents and term frequencies are indexed: positions are omitted
DOCS_AND_FREQS_AND_POSITIONS
full postings: documents, frequencies, and positions
DOCS_ONLY
only documents are indexed: term frequencies and positions are omitted
Method Summary
static FieldInfo.IndexOptions | valueOf(String name) Returns the enum constant of this type with the specified name.
static FieldInfo.IndexOptions[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

DOCS_ONLY

public static final FieldInfo.IndexOptions DOCS_ONLY
only documents are indexed: term frequencies and positions are omitted

DOCS_AND_FREQS

public static final FieldInfo.IndexOptions DOCS_AND_FREQS
only documents and term frequencies are indexed: positions are omitted

DOCS_AND_FREQS_AND_POSITIONS

public static final FieldInfo.IndexOptions DOCS_AND_FREQS_AND_POSITIONS
full postings: documents, frequencies, and positions

Method Detail

values

public static final FieldInfo.IndexOptions[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(FieldInfo.IndexOptions c : FieldInfo.IndexOptions.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static FieldInfo.IndexOptions valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


FieldInfos

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class FieldInfos

java.lang.Object
    extended by  org.apache.lucene.index.FieldInfos
All Implemented Interfaces:
Iterable<FieldInfo>
public final class FieldInfos
extends Object
implements Iterable<FieldInfo>

Collection of FieldInfos (accessible by number or by name).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static int | FORMAT_OMIT_POSITIONS
static int | FORMAT_PRE
static int | FORMAT_START
Constructor Summary
FieldInfos()
FieldInfos(Directory d, String name)
Construct a FieldInfos object using the directory and the name of the file IndexInput
Method Summary
void | add(Document doc) Adds field info for a Document.
FieldInfo | add(FieldInfo fi)
void | add(FieldInfos other)
void | add(String name, boolean isIndexed) Calls 5 parameter add with false for all TermVector parameters.
void | add(String name, boolean isIndexed, boolean storeTermVector) Calls 5 parameter add with false for term vector positions and offsets.
void | add(String name, boolean isIndexed, boolean storeTermVector, boolean omitNorms) If the field is not yet known, adds it.
FieldInfo | add(String name, boolean isIndexed, boolean storeTermVector, boolean omitNorms, boolean storePayloads, FieldInfo.IndexOptions indexOptions) If the field is not yet known, adds it.
Object | clone() Returns a deep clone of this FieldInfos instance.
FieldInfo | fieldInfo(int fieldNumber) Return the fieldinfo object referenced by the fieldNumber.
FieldInfo | fieldInfo(String fieldName)
String | fieldName(int fieldNumber) Return the fieldName identified by its number.
int | fieldNumber(String fieldName) lookup the number of a field by name.
boolean | hasProx() Returns true if any fields do not omitTermFreqAndPositions
boolean | hasVectors()
Iterator<FieldInfo> | iterator()
int | size()
void | write(Directory d, String name)
void | write(IndexOutput output)
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

FORMAT_PRE

public static final int FORMAT_PRE
See Also:
Constant Field Values

FORMAT_START

public static final int FORMAT_START
See Also:
Constant Field Values

FORMAT_OMIT_POSITIONS

public static final int FORMAT_OMIT_POSITIONS
See Also:
Constant Field Values
Constructor Detail

FieldInfos

public FieldInfos()

FieldInfos

public FieldInfos(Directory d,
                  String name)
           throws IOException
Construct a FieldInfos object using the directory and the name of the file IndexInput

Parameters:
d - The directory to open the IndexInput from
name - The name of the file to open the IndexInput from in the Directory
Throws:
IOException
Method Detail

add

public void add(FieldInfos other)

clone

public Object clone()
Returns a deep clone of this FieldInfos instance.

Overrides:
clone in class Object

add

public void add(Document doc)
Adds field info for a Document.

hasProx

public boolean hasProx()
Returns true if any fields do not omitTermFreqAndPositions

add

public void add(String name,
                boolean isIndexed)
Calls 5 parameter add with false for all TermVector parameters.

Parameters:
name - The name of the Fieldable
isIndexed - true if the field is indexed
See Also:
add(String, boolean, boolean)

add

public void add(String name,
                boolean isIndexed,
                boolean storeTermVector)
Calls 5 parameter add with false for term vector positions and offsets.

Parameters:
name - The name of the field
isIndexed - true if the field is indexed
storeTermVector - true if the term vector should be stored

add

public void add(String name,
                boolean isIndexed,
                boolean storeTermVector,
                boolean omitNorms)
If the field is not yet known, adds it. If it is known, checks to make sure that the isIndexed flag is the same as was given previously for this field. If not - marks it as being indexed. Same goes for the TermVector parameters.

Parameters:
name - The name of the field
isIndexed - true if the field is indexed
storeTermVector - true if the term vector should be stored
omitNorms - true if the norms for the indexed field should be omitted

add

public FieldInfo add(String name,
                     boolean isIndexed,
                     boolean storeTermVector,
                     boolean omitNorms,
                     boolean storePayloads,
                     FieldInfo.IndexOptions indexOptions)
If the field is not yet known, adds it. If it is known, checks to make sure that the isIndexed flag is the same as was given previously for this field. If not - marks it as being indexed. Same goes for the TermVector parameters.

Parameters:
name - The name of the field
isIndexed - true if the field is indexed
storeTermVector - true if the term vector should be stored
omitNorms - true if the norms for the indexed field should be omitted
storePayloads - true if payloads should be stored for this field
indexOptions - if term freqs should be omitted for this field

add

public FieldInfo add(FieldInfo fi)

fieldNumber

public int fieldNumber(String fieldName)
lookup the number of a field by name.

Parameters:
fieldName - field's name
Returns:
number of field, or -1 if it does not exist.

fieldInfo

public FieldInfo fieldInfo(String fieldName)

fieldName

public String fieldName(int fieldNumber)
Return the fieldName identified by its number.

Parameters:
fieldNumber -
Returns:
the fieldName or an empty string when the field with the given number doesn't exist.

fieldInfo

public FieldInfo fieldInfo(int fieldNumber)
Return the fieldinfo object referenced by the fieldNumber.

Parameters:
fieldNumber -
Returns:
the FieldInfo object or null when the given fieldNumber doesn't exist.

iterator

public Iterator<FieldInfo> iterator()
Specified by:
iterator in interface Iterable<FieldInfo>

size

public int size()
Returns:
number of fields

hasVectors

public boolean hasVectors()
Returns:
true if at least one field has any vectors

write

public void write(Directory d,
                  String name)
           throws IOException
Throws:
IOException

write

public void write(IndexOutput output)
           throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldInvertState

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class FieldInvertState

java.lang.Object
    extended by  org.apache.lucene.index.FieldInvertState

public final class FieldInvertState
extends Object

This class tracks the number and position / offset parameters of terms being added to the index. The information collected in this class is also used to calculate the normalization factor for a field.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
FieldInvertState()
FieldInvertState(int position, int length, int numOverlap, int offset, float boost)
Method Summary
AttributeSource | getAttributeSource()
float | getBoost() Get boost value.
int | getLength() Get total number of terms in this field.
int | getMaxTermFrequency() Get the maximum term-frequency encountered for any term in the field.
int | getNumOverlap() Get the number of terms with positionIncrement == 0.
int | getOffset() Get end offset of the last processed term.
int | getPosition() Get the last processed term position.
int | getUniqueTermCount() Return the number of unique terms encountered in this field.
void | setBoost(float boost)
void | setLength(int length)
void | setNumOverlap(int numOverlap)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldInvertState

public FieldInvertState()

FieldInvertState

public FieldInvertState(int position,
                        int length,
                        int numOverlap,
                        int offset,
                        float boost)
Method Detail

getPosition

public int getPosition()
Get the last processed term position.

Returns:
the position

getLength

public int getLength()
Get total number of terms in this field.

Returns:
the length

setLength

public void setLength(int length)

getNumOverlap

public int getNumOverlap()
Get the number of terms with positionIncrement == 0.

Returns:
the numOverlap

setNumOverlap

public void setNumOverlap(int numOverlap)

getOffset

public int getOffset()
Get end offset of the last processed term.

Returns:
the offset

getBoost

public float getBoost()
Get boost value. This is the cumulative product of document boost and field boost for all field instances sharing the same field name.

Returns:
the boost

setBoost

public void setBoost(float boost)

getMaxTermFrequency

public int getMaxTermFrequency()
Get the maximum term-frequency encountered for any term in the field. A field containing "the quick brown fox jumps over the lazy dog" would have a value of 2, because "the" appears twice.

getUniqueTermCount

public int getUniqueTermCount()
Return the number of unique terms encountered in this field.

getAttributeSource

public AttributeSource getAttributeSource()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldNormModifier

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class FieldNormModifier

java.lang.Object
    extended by  org.apache.lucene.index.FieldNormModifier
Deprecated. This class is broken, as it does not correctly take position overlaps into account.

@Deprecated
public class FieldNormModifier
extends Object

Given a directory and a list of fields, updates the fieldNorms in place for every document. If Similarity class is specified, uses its computeNorm method to set norms. If -n command line argument is used, removed field norms, as if Field.Index.NO_NORMS was used.

NOTE: This will overwrite any length normalization or field/document boosts.

Constructor Summary
FieldNormModifier(Directory d, Similarity s)
Deprecated. Constructor for code that wishes to use this class programmatically If Similarity is null, kill the field norms.
Method Summary
static void | main(String[] args) Deprecated. Command Line Execution method.
void | reSetNorms(String field) Deprecated. Resets the norms for the specified field.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldNormModifier

public FieldNormModifier(Directory d,
                         Similarity s)
Deprecated.
Constructor for code that wishes to use this class programmatically If Similarity is null, kill the field norms.

Parameters:
d - the Directory to modify
s - the Similarity to use (can be null)
Method Detail

main

public static void main(String[] args)
                 throws IOException
Deprecated.
Command Line Execution method.
 Usage: FieldNormModifier /path/index <package.SimilarityClassName | -n> field1 field2 ...

Throws:
IOException

reSetNorms

public void reSetNorms(String field)
                throws IOException
Deprecated.
Resets the norms for the specified field.

Opens a new IndexReader on the Directory given to this instance, modifies the norms (either using the Similarity given to this instance, or by using fake norms, and closes the IndexReader.

Parameters:
field - the field whose norms should be reset
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldReaderException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class FieldReaderException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.lang.RuntimeException
                extended by  org.apache.lucene.index.FieldReaderException
All Implemented Interfaces:
Serializable
public class FieldReaderException
extends RuntimeException

Exception thrown when stored fields have an unexpected format.

See Also:
Serialized Form

Constructor Summary
FieldReaderException()
Constructs a new runtime exception with null as its detail message.
FieldReaderException(String message)
Constructs a new runtime exception with the specified detail message.
FieldReaderException(String message, Throwable cause)
Constructs a new runtime exception with the specified detail message and cause.
FieldReaderException(Throwable cause)
Constructs a new runtime exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FieldReaderException

public FieldReaderException()
Constructs a new runtime exception with null as its detail message. The cause is not initialized, and may subsequently be initialized by a call to Throwable.initCause(java.lang.Throwable).

FieldReaderException

public FieldReaderException(Throwable cause)
Constructs a new runtime exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).

This constructor is useful for runtime exceptions that are little more than wrappers for other throwables.

Parameters:
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Since:
1.4

FieldReaderException

public FieldReaderException(String message)
Constructs a new runtime exception with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call to Throwable.initCause(java.lang.Throwable).

Parameters:
message - the detail message. The detail message is saved for later retrieval by the Throwable.getMessage() method.

FieldReaderException

public FieldReaderException(String message,
                            Throwable cause)
Constructs a new runtime exception with the specified detail message and cause.

Note that the detail message associated with cause is not automatically incorporated in this runtime exception's detail message.

Parameters:
message - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Since:
1.4
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldSortedTermVectorMapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class FieldSortedTermVectorMapper

java.lang.Object
    extended by  org.apache.lucene.index.TermVectorMapper
        extended by  org.apache.lucene.index.FieldSortedTermVectorMapper

public class FieldSortedTermVectorMapper
extends TermVectorMapper

For each Field, store a sorted collection of TermVectorEntrys

This is not thread-safe.

Constructor Summary
FieldSortedTermVectorMapper(boolean ignoringPositions, boolean ignoringOffsets, Comparator<TermVectorEntry> comparator)
FieldSortedTermVectorMapper(Comparator<TermVectorEntry> comparator)
Method Summary
Comparator<TermVectorEntry> | getComparator()
Map<String,SortedSet<TermVectorEntry>> | getFieldToTerms() Get the mapping between fields and terms, sorted by the comparator
void | map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) Map the Term Vector information into your own structure
void | setExpectations(String field, int numTerms, boolean storeOffsets, boolean storePositions) Tell the mapper what to expect in regards to field, number of terms, offset and position storage.
Methods inherited from class org.apache.lucene.index.TermVectorMapper
isIgnoringOffsets, isIgnoringPositions, setDocumentNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldSortedTermVectorMapper

public FieldSortedTermVectorMapper(Comparator<TermVectorEntry> comparator)
Parameters:
comparator - A Comparator for sorting TermVectorEntrys

FieldSortedTermVectorMapper

public FieldSortedTermVectorMapper(boolean ignoringPositions,
                                   boolean ignoringOffsets,
                                   Comparator<TermVectorEntry> comparator)
Method Detail

map

public void map(String term,
                int frequency,
                TermVectorOffsetInfo[] offsets,
                int[] positions)
Description copied from class: TermVectorMapper
Map the Term Vector information into your own structure

Specified by:
map in class TermVectorMapper
Parameters:
term - The term to add to the vector
frequency - The frequency of the term in the document
offsets - null if the offset is not specified, otherwise the offset into the field of the term
positions - null if the position is not specified, otherwise the position in the field of the term

setExpectations

public void setExpectations(String field,
                            int numTerms,
                            boolean storeOffsets,
                            boolean storePositions)
Description copied from class: TermVectorMapper
Tell the mapper what to expect in regards to field, number of terms, offset and position storage. This method will be called once before retrieving the vector for a field. This method will be called before TermVectorMapper.map(String,int,TermVectorOffsetInfo[],int[]).

Specified by:
setExpectations in class TermVectorMapper
Parameters:
field - The field the vector is for
numTerms - The number of terms that need to be mapped
storeOffsets - true if the mapper should expect offset information
storePositions - true if the mapper should expect positions info

getFieldToTerms

public Map<String,SortedSet<TermVectorEntry>> getFieldToTerms()
Get the mapping between fields and terms, sorted by the comparator

Returns:
A map between field names and SortedSets per field. SortedSet entries are TermVectorEntry

getComparator

public Comparator<TermVectorEntry> getComparator()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterIndexReader.FilterTermDocs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class FilterIndexReader.FilterTermDocs

java.lang.Object
    extended by  org.apache.lucene.index.FilterIndexReader.FilterTermDocs
All Implemented Interfaces:
Closeable, TermDocs
Direct Known Subclasses:
FilterIndexReader.FilterTermPositions
Enclosing class:
FilterIndexReader
public static class FilterIndexReader.FilterTermDocs
extends Object
implements TermDocs

Base class for filtering TermDocs implementations.

Field Summary
protected  TermDocs in
Constructor Summary
FilterIndexReader.FilterTermDocs(TermDocs in)
Method Summary
void | close() Frees associated resources.
int | doc() Returns the current document number.
int | freq() Returns the frequency of the term within the current document.
boolean | next() Moves to the next pair in the enumeration.
int | read(int[] docs, int[] freqs) Attempts to read multiple entries from the enumeration, up to length of docs.
void | seek(Term term) Sets this to the data for a term.
void | seek(TermEnum termEnum) Sets this to the data for the current term in a TermEnum.
boolean | skipTo(int i) Skips entries to the first beyond the current whose document number is greater than or equal to target.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

in

protected TermDocs in
Constructor Detail

FilterIndexReader.FilterTermDocs

public FilterIndexReader.FilterTermDocs(TermDocs in)
Method Detail

seek

public void seek(Term term)
          throws IOException
Description copied from interface: TermDocs
Sets this to the data for a term. The enumeration is reset to the start of the data for this term.

Specified by:
seek in interface TermDocs
Throws:
IOException

seek

public void seek(TermEnum termEnum)
          throws IOException
Description copied from interface: TermDocs
Sets this to the data for the current term in a TermEnum. This may be optimized in some implementations.

Specified by:
seek in interface TermDocs
Throws:
IOException

doc

public int doc()
Description copied from interface: TermDocs
Returns the current document number.

This is invalid until TermDocs.next() is called for the first time.

Specified by:
doc in interface TermDocs

freq

public int freq()
Description copied from interface: TermDocs
Returns the frequency of the term within the current document.

This is invalid until TermDocs.next() is called for the first time.

Specified by:
freq in interface TermDocs

next

public boolean next()
             throws IOException
Description copied from interface: TermDocs
Moves to the next pair in the enumeration.

Returns true iff there is such a next pair in the enumeration. Once this returns false you should not call any of the other methods.

Specified by:
next in interface TermDocs
Throws:
IOException

read

public int read(int[] docs,
                int[] freqs)
         throws IOException
Description copied from interface: TermDocs
Attempts to read multiple entries from the enumeration, up to length of docs. Document numbers are stored in docs, and term frequencies are stored in freqs. The freqs array must be as long as the docs array.

Returns the number of entries read. Zero is only returned when the stream has been exhausted.

Specified by:
read in interface TermDocs
Throws:
IOException

skipTo

public boolean skipTo(int i)
               throws IOException
Description copied from interface: TermDocs
Skips entries to the first beyond the current whose document number is greater than or equal to target.

Returns true iff there is such an entry.

Behaves as if written:

   boolean skipTo(int target) {
     do {
       if (!next())
             return false;
     } while (target > doc());
     return true;
   }
Some implementations are considerably more efficient than that.

Specified by:
skipTo in interface TermDocs
Throws:
IOException

close

public void close()
           throws IOException
Description copied from interface: TermDocs
Frees associated resources.

Specified by:
close in interface Closeable
Specified by:
close in interface TermDocs
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterIndexReader.FilterTermEnum

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class FilterIndexReader.FilterTermEnum

java.lang.Object
    extended by  org.apache.lucene.index.TermEnum
        extended by  org.apache.lucene.index.FilterIndexReader.FilterTermEnum
All Implemented Interfaces:
Closeable
Enclosing class:
FilterIndexReader
public static class FilterIndexReader.FilterTermEnum
extends TermEnum

Base class for filtering TermEnum implementations.

Field Summary
protected  TermEnum in
Constructor Summary
FilterIndexReader.FilterTermEnum(TermEnum in)
Method Summary
void | close() Closes the enumeration to further activity, freeing resources.
int | docFreq() Returns the docFreq of the current Term in the enumeration.
boolean | next() Increments the enumeration to the next element.
Term | term() Returns the current Term in the enumeration.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

in

protected TermEnum in
Constructor Detail

FilterIndexReader.FilterTermEnum

public FilterIndexReader.FilterTermEnum(TermEnum in)
Method Detail

next

public boolean next()
             throws IOException
Description copied from class: TermEnum
Increments the enumeration to the next element. True if one exists.

Specified by:
next in class TermEnum
Throws:
IOException

term

public Term term()
Description copied from class: TermEnum
Returns the current Term in the enumeration.

Specified by:
term in class TermEnum

docFreq

public int docFreq()
Description copied from class: TermEnum
Returns the docFreq of the current Term in the enumeration.

Specified by:
docFreq in class TermEnum

close

public void close()
           throws IOException
Description copied from class: TermEnum
Closes the enumeration to further activity, freeing resources.

Specified by:
close in interface Closeable
Specified by:
close in class TermEnum
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterIndexReader.FilterTermPositions

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class FilterIndexReader.FilterTermPositions

java.lang.Object
    extended by  org.apache.lucene.index.FilterIndexReader.FilterTermDocs
        extended by  org.apache.lucene.index.FilterIndexReader.FilterTermPositions
All Implemented Interfaces:
Closeable, TermDocs, TermPositions
Enclosing class:
FilterIndexReader
public static class FilterIndexReader.FilterTermPositions
extends FilterIndexReader.FilterTermDocs
implements TermPositions

Base class for filtering TermPositions implementations.

Field Summary
Fields inherited from class org.apache.lucene.index.FilterIndexReader.FilterTermDocs
in
Constructor Summary
FilterIndexReader.FilterTermPositions(TermPositions in)
Method Summary
byte[] | getPayload(byte[] data, int offset) Returns the payload data at the current term position.
int | getPayloadLength() Returns the length of the payload at the current term position.
boolean | isPayloadAvailable() Checks if a payload can be loaded at this position.
int | nextPosition() Returns next position in the current document.
Methods inherited from class org.apache.lucene.index.FilterIndexReader.FilterTermDocs
close, doc, freq, next, read, seek, seek, skipTo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.index.TermDocs
close, doc, freq, next, read, seek, seek, skipTo

Constructor Detail

FilterIndexReader.FilterTermPositions

public FilterIndexReader.FilterTermPositions(TermPositions in)
Method Detail

nextPosition

public int nextPosition()
                 throws IOException
Description copied from interface: TermPositions
Returns next position in the current document. It is an error to call this more than TermDocs.freq() times without calling TermDocs.next()

This is invalid until TermDocs.next() is called for the first time.

Specified by:
nextPosition in interface TermPositions
Throws:
IOException

getPayloadLength

public int getPayloadLength()
Description copied from interface: TermPositions
Returns the length of the payload at the current term position. This is invalid until TermPositions.nextPosition() is called for the first time.

Specified by:
getPayloadLength in interface TermPositions
Returns:
length of the current payload in number of bytes

getPayload

public byte[] getPayload(byte[] data,
                         int offset)
                  throws IOException
Description copied from interface: TermPositions
Returns the payload data at the current term position. This is invalid until TermPositions.nextPosition() is called for the first time. This method must not be called more than once after each call of TermPositions.nextPosition(). However, payloads are loaded lazily, so if the payload data for the current position is not needed, this method may not be called at all for performance reasons.

Specified by:
getPayload in interface TermPositions
Parameters:
data - the array into which the data of this payload is to be stored, if it is big enough; otherwise, a new byte[] array is allocated for this purpose.
offset - the offset in the array into which the data of this payload is to be stored.
Returns:
a byte[] array containing the data of this payload
Throws:
IOException

isPayloadAvailable

public boolean isPayloadAvailable()
Description copied from interface: TermPositions
Checks if a payload can be loaded at this position.

Payloads can only be loaded once per call to TermPositions.nextPosition().

Specified by:
isPayloadAvailable in interface TermPositions
Returns:
true if there is a payload available at this position that can be loaded
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterIndexReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class FilterIndexReader

java.lang.Object
    extended by  org.apache.lucene.index.IndexReader
        extended by  org.apache.lucene.index.FilterIndexReader
All Implemented Interfaces:
Closeable, Cloneable
Direct Known Subclasses:
PruningReader
public class FilterIndexReader
extends IndexReader

A FilterIndexReader contains another IndexReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality. The class FilterIndexReader itself simply implements all abstract methods of IndexReader with versions that pass all requests to the contained index reader. Subclasses of FilterIndexReader may further override some of these methods and may also provide additional methods and fields.

Note: The default implementation of IndexReader.doOpenIfChanged() throws UnsupportedOperationException (like the base class), so it's not possible to reopen a FilterIndexReader. To reopen, you have to first reopen the underlying reader and wrap it again with the custom filter.

Nested Class Summary
static class | FilterIndexReader.FilterTermDocs Base class for filtering TermDocs implementations.
static class | FilterIndexReader.FilterTermEnum Base class for filtering TermEnum implementations.
static class | FilterIndexReader.FilterTermPositions Base class for filtering TermPositions implementations.
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader
IndexReader.ReaderClosedListener
Field Summary
protected  IndexReader in
Fields inherited from class org.apache.lucene.index.IndexReader
hasChanges
Constructor Summary
FilterIndexReader(IndexReader in)
Construct a FilterIndexReader based on the specified base reader.
Method Summary
Directory | directory() Returns the directory associated with this index.
int | docFreq(Term t) Returns the number of documents containing the term t.
protected void | doClose() Implements close.
protected void | doCommit(Map<String,String> commitUserData) Deprecated.
Document | document(int n, FieldSelector fieldSelector) Get the Document at the n th position.
protected void | doDelete(int n) Deprecated.
protected void | doSetNorm(int d, String f, byte b) Deprecated.
protected void | doUndeleteAll() Deprecated.
Map<String,String> | getCommitUserData() Retrieve the String userData optionally passed to IndexWriter#commit.
Object | getCoreCacheKey() If the subclass of FilteredIndexReader modifies the contents of the FieldCache, you must override this method to provide a different key
Object | getDeletesCacheKey() If the subclass of FilteredIndexReader modifies the deleted docs, you must override this method to provide a different key
FieldInfos | getFieldInfos() Get the FieldInfos describing all fields in this reader.
IndexCommit | getIndexCommit() Expert: return the IndexCommit that this reader has opened.
IndexReader[] | getSequentialSubReaders() Expert: returns the sequential sub readers that this reader is logically composed of.
TermFreqVector | getTermFreqVector(int docNumber, String field) Return a term frequency vector for the specified document and field.
void | getTermFreqVector(int docNumber, String field, TermVectorMapper mapper) Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the TermFreqVector.
void | getTermFreqVector(int docNumber, TermVectorMapper mapper) Map all the term vectors for all fields in a Document
TermFreqVector[] | getTermFreqVectors(int docNumber) Return an array of term frequency vectors for the specified document.
int | getTermInfosIndexDivisor() For IndexReader implementations that use TermInfosReader to read terms, this returns the current indexDivisor as specified when the reader was opened.
long | getUniqueTermCount() Returns the number of unique terms (across all fields) in this reader.
long | getVersion() Version number when this IndexReader was opened.
boolean | hasDeletions() Returns true if any documents have been deleted
boolean | hasNorms(String field) Returns true if there are norms stored for this field.
boolean | isCurrent() Check whether any new changes have occurred to the index since this reader was opened.
boolean | isDeleted(int n) Returns true if document n has been deleted
boolean | isOptimized() Deprecated.
int | maxDoc() Returns one greater than the largest possible document number.
byte[] | norms(String f) Returns the byte-encoded normalization factor for the named field of every document.
void | norms(String f, byte[] bytes, int offset) Reads the byte-encoded normalization factor for the named field of every document.
int | numDocs() Returns the number of documents in this index.
TermDocs | termDocs() Returns an unpositioned TermDocs enumerator.
TermDocs | termDocs(Term term) Returns an enumeration of all the documents which contain term.
TermPositions | termPositions() Returns an unpositioned TermPositions enumerator.
TermEnum | terms() Returns an enumeration of all the terms in the index.
TermEnum | terms(Term t) Returns an enumeration of all terms starting at a given term.
String | toString()
Methods inherited from class org.apache.lucene.index.IndexReader
acquireWriteLock, addReaderClosedListener, clone, clone, close, commit, commit, decRef, deleteDocument, deleteDocuments, document, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, ensureOpen, flush, flush, getCommitUserData, getCurrentVersion, getRefCount, incRef, indexExists, lastModified, listCommits, numDeletedDocs, open, open, open, open, open, open, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChanged, removeReaderClosedListener, reopen, reopen, reopen, reopen, setNorm, setNorm, termPositions, tryIncRef, undeleteAll
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

in

protected IndexReader in
Constructor Detail

FilterIndexReader

public FilterIndexReader(IndexReader in)

Construct a FilterIndexReader based on the specified base reader. Directory locking for delete, undeleteAll, and setNorm operations is left to the base reader.

Note that base reader is closed if this FilterIndexReader is closed.

Parameters:
in - specified base reader.
Method Detail

directory

public Directory directory()
Description copied from class: IndexReader
Returns the directory associated with this index. The Default implementation returns the directory specified by subclasses when delegating to the IndexReader(Directory) constructor, or throws an UnsupportedOperationException if one was not specified.

Overrides:
directory in class IndexReader

getIndexCommit

public IndexCommit getIndexCommit()
                           throws IOException
Description copied from class: IndexReader
Expert: return the IndexCommit that this reader has opened. This method is only implemented by those readers that correspond to a Directory with its own segments_N file.

Overrides:
getIndexCommit in class IndexReader
Throws:
IOException

getFieldInfos

public FieldInfos getFieldInfos()
Description copied from class: IndexReader
Get the FieldInfos describing all fields in this reader. NOTE: do not make any changes to the returned FieldInfos!

Specified by:
getFieldInfos in class IndexReader

getTermInfosIndexDivisor

public int getTermInfosIndexDivisor()
Description copied from class: IndexReader
For IndexReader implementations that use TermInfosReader to read terms, this returns the current indexDivisor as specified when the reader was opened.

Overrides:
getTermInfosIndexDivisor in class IndexReader

getTermFreqVectors

public TermFreqVector[] getTermFreqVectors(int docNumber)
                                    throws IOException
Description copied from class: IndexReader
Return an array of term frequency vectors for the specified document. The array contains a vector for each vectorized field in the document. Each vector contains terms and frequencies for all terms in a given vectorized field. If no such fields existed, the method returns null. The term vectors that are returned may either be of type TermFreqVector or of type TermPositionVector if positions or offsets have been stored.

Specified by:
getTermFreqVectors in class IndexReader
Parameters:
docNumber - document for which term frequency vectors are returned
Returns:
array of term frequency vectors. May be null if no term vectors have been stored for the specified document.
Throws:
IOException - if index cannot be accessed
See Also:
Field.TermVector

getTermFreqVector

public TermFreqVector getTermFreqVector(int docNumber,
                                        String field)
                                 throws IOException
Description copied from class: IndexReader
Return a term frequency vector for the specified document and field. The returned vector contains terms and frequencies for the terms in the specified field of this document, if the field had the storeTermVector flag set. If termvectors had been stored with positions or offsets, a TermPositionVector is returned.

Specified by:
getTermFreqVector in class IndexReader
Parameters:
docNumber - document for which the term frequency vector is returned
field - field for which the term frequency vector is returned.
Returns:
term frequency vector May be null if field does not exist in the specified document or term vector was not stored.
Throws:
IOException - if index cannot be accessed
See Also:
Field.TermVector

getTermFreqVector

public void getTermFreqVector(int docNumber,
                              String field,
                              TermVectorMapper mapper)
                       throws IOException
Description copied from class: IndexReader
Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the TermFreqVector.

Specified by:
getTermFreqVector in class IndexReader
Parameters:
docNumber - The number of the document to load the vector for
field - The name of the field to load
mapper - The TermVectorMapper to process the vector. Must not be null
Throws:
IOException - if term vectors cannot be accessed or if they do not exist on the field and doc. specified.

getTermFreqVector

public void getTermFreqVector(int docNumber,
                              TermVectorMapper mapper)
                       throws IOException
Description copied from class: IndexReader
Map all the term vectors for all fields in a Document

Specified by:
getTermFreqVector in class IndexReader
Parameters:
docNumber - The number of the document to load the vector for
mapper - The TermVectorMapper to process the vector. Must not be null
Throws:
IOException - if term vectors cannot be accessed or if they do not exist on the field and doc. specified.

getUniqueTermCount

public long getUniqueTermCount()
                        throws IOException
Description copied from class: IndexReader
Returns the number of unique terms (across all fields) in this reader. This method returns long, even though internally Lucene cannot handle more than 2^31 unique terms, for a possible future when this limitation is removed.

Overrides:
getUniqueTermCount in class IndexReader
Throws:
IOException

numDocs

public int numDocs()
Description copied from class: IndexReader
Returns the number of documents in this index.

Specified by:
numDocs in class IndexReader

maxDoc

public int maxDoc()
Description copied from class: IndexReader
Returns one greater than the largest possible document number. This may be used to, e.g., determine how big to allocate an array which will have an element for every document number in an index.

Specified by:
maxDoc in class IndexReader

document

public Document document(int n,
                         FieldSelector fieldSelector)
                  throws CorruptIndexException,
                         IOException
Description copied from class: IndexReader
Get the Document at the n th position. The FieldSelector may be used to determine what Fields to load and how they should be loaded. NOTE: If this Reader (more specifically, the underlying FieldsReader) is closed before the lazy Field is loaded an exception may be thrown. If you want the value of a lazy Field to be available after closing you must explicitly load it or fetch the Document again with a new loader.

NOTE: for performance reasons, this method does not check if the requested document is deleted, and therefore asking for a deleted document may yield unspecified results. Usually this is not required, however you can call IndexReader.isDeleted(int) with the requested document ID to verify the document is not deleted.

Specified by:
document in class IndexReader
Parameters:
n - Get the document at the nth position
fieldSelector - The FieldSelector to use to determine what Fields should be loaded on the Document. May be null, in which case all Fields will be loaded.
Returns:
The stored fields of the Document at the nth position
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
Fieldable, FieldSelector, SetBasedFieldSelector, LoadFirstFieldSelector

isDeleted

public boolean isDeleted(int n)
Description copied from class: IndexReader
Returns true if document n has been deleted

Specified by:
isDeleted in class IndexReader

hasDeletions

public boolean hasDeletions()
Description copied from class: IndexReader
Returns true if any documents have been deleted

Specified by:
hasDeletions in class IndexReader

doUndeleteAll

@Deprecated
protected void doUndeleteAll()
                      throws CorruptIndexException,
                             IOException
Deprecated.

Implements actual undeleteAll() in subclass.

Specified by:
doUndeleteAll in class IndexReader
Throws:
CorruptIndexException
IOException

hasNorms

public boolean hasNorms(String field)
                 throws IOException
Description copied from class: IndexReader
Returns true if there are norms stored for this field.

Overrides:
hasNorms in class IndexReader
Throws:
IOException

norms

public byte[] norms(String f)
             throws IOException
Description copied from class: IndexReader
Returns the byte-encoded normalization factor for the named field of every document. This is used by the search code to score documents. Returns null if norms were not indexed for this field.

Specified by:
norms in class IndexReader
Throws:
IOException
See Also:
AbstractField.setBoost(float)

norms

public void norms(String f,
                  byte[] bytes,
                  int offset)
           throws IOException
Description copied from class: IndexReader
Reads the byte-encoded normalization factor for the named field of every document. This is used by the search code to score documents.

Specified by:
norms in class IndexReader
Throws:
IOException
See Also:
AbstractField.setBoost(float)

doSetNorm

@Deprecated
protected void doSetNorm(int d,
                                    String f,
                                    byte b)
                  throws CorruptIndexException,
                         IOException
Deprecated.

Implements setNorm in subclass.

Specified by:
doSetNorm in class IndexReader
Throws:
CorruptIndexException
IOException

terms

public TermEnum terms()
               throws IOException
Description copied from class: IndexReader
Returns an enumeration of all the terms in the index. The enumeration is ordered by Term.compareTo(). Each term is greater than all that precede it in the enumeration. Note that after calling terms(), TermEnum.next() must be called on the resulting enumeration before calling other methods such as TermEnum.term().

Specified by:
terms in class IndexReader
Throws:
IOException - if there is a low-level IO error

terms

public TermEnum terms(Term t)
               throws IOException
Description copied from class: IndexReader
Returns an enumeration of all terms starting at a given term. If the given term does not exist, the enumeration is positioned at the first term greater than the supplied term. The enumeration is ordered by Term.compareTo(). Each term is greater than all that precede it in the enumeration.

Specified by:
terms in class IndexReader
Throws:
IOException - if there is a low-level IO error

docFreq

public int docFreq(Term t)
            throws IOException
Description copied from class: IndexReader
Returns the number of documents containing the term t.

Specified by:
docFreq in class IndexReader
Throws:
IOException - if there is a low-level IO error

termDocs

public TermDocs termDocs()
                  throws IOException
Description copied from class: IndexReader
Returns an unpositioned TermDocs enumerator.

Note: the TermDocs returned is unpositioned. Before using it, ensure that you first position it with TermDocs.seek(Term) or TermDocs.seek(TermEnum).

Specified by:
termDocs in class IndexReader
Throws:
IOException - if there is a low-level IO error

termDocs

public TermDocs termDocs(Term term)
                  throws IOException
Description copied from class: IndexReader
Returns an enumeration of all the documents which contain term. For each document, the document number, the frequency of the term in that document is also provided, for use in search scoring. If term is null, then all non-deleted docs are returned with freq=1. Thus, this method implements the mapping:

    Term => <docNum, freq>*

The enumeration is ordered by document number. Each document number is greater than all that precede it in the enumeration.

Overrides:
termDocs in class IndexReader
Throws:
IOException - if there is a low-level IO error

termPositions

public TermPositions termPositions()
                            throws IOException
Description copied from class: IndexReader
Returns an unpositioned TermPositions enumerator.

Specified by:
termPositions in class IndexReader
Throws:
IOException - if there is a low-level IO error

doDelete

@Deprecated
protected void doDelete(int n)
                 throws CorruptIndexException,
                        IOException
Deprecated.

Implements deletion of the document numbered docNum. Applications should call IndexReader.deleteDocument(int) or IndexReader.deleteDocuments(Term).

Specified by:
doDelete in class IndexReader
Throws:
CorruptIndexException
IOException

doCommit

@Deprecated
protected void doCommit(Map<String,String> commitUserData)
                 throws IOException
Deprecated.

Implements commit.

Specified by:
doCommit in class IndexReader
Throws:
IOException

doClose

protected void doClose()
                throws IOException
Description copied from class: IndexReader
Implements close.

Specified by:
doClose in class IndexReader
Throws:
IOException

getVersion

public long getVersion()
Description copied from class: IndexReader
Version number when this IndexReader was opened. Not implemented in the IndexReader base class.

If this reader is based on a Directory (ie, was created by calling IndexReader.open(org.apache.lucene.store.Directory), or IndexReader.openIfChanged(org.apache.lucene.index.IndexReader) on a reader based on a Directory), then this method returns the version recorded in the commit that the reader opened. This version is advanced every time IndexWriter.commit() is called.

Overrides:
getVersion in class IndexReader

isCurrent

public boolean isCurrent()
                  throws CorruptIndexException,
                         IOException
Description copied from class: IndexReader
Check whether any new changes have occurred to the index since this reader was opened.

If this reader is based on a Directory (ie, was created by calling IndexReader.open(org.apache.lucene.store.Directory), or IndexReader.openIfChanged(org.apache.lucene.index.IndexReader) on a reader based on a Directory), then this method checks if any further commits (see IndexWriter.commit() have occurred in that directory).

If instead this reader is a near real-time reader (ie, obtained by a call to IndexWriter.getReader(), or by calling IndexReader.openIfChanged(org.apache.lucene.index.IndexReader) on a near real-time reader), then this method checks if either a new commmit has occurred, or any new uncommitted changes have taken place via the writer. Note that even if the writer has only performed merging, this method will still return false.

In any event, if this returns false, you should call IndexReader.openIfChanged(org.apache.lucene.index.IndexReader) to get a new reader that sees the changes.

Overrides:
isCurrent in class IndexReader
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

isOptimized

@Deprecated
public boolean isOptimized()
Deprecated.

Overrides:
isOptimized in class IndexReader

getSequentialSubReaders

public IndexReader[] getSequentialSubReaders()
Description copied from class: IndexReader
Expert: returns the sequential sub readers that this reader is logically composed of. For example, IndexSearcher uses this API to drive searching by one sub reader at a time. If this reader is not composed of sequential child readers, it should return null. If this method returns an empty array, that means this reader is a null reader (for example a MultiReader that has no sub readers).

NOTE: You should not try using sub-readers returned by this method to make any changes (setNorm, deleteDocument, etc.). While this might succeed for one composite reader (like MultiReader), it will most likely lead to index corruption for other readers (like DirectoryReader obtained through IndexReader.open(org.apache.lucene.store.Directory). Use the parent reader directly.

Overrides:
getSequentialSubReaders in class IndexReader

getCommitUserData

public Map<String,String> getCommitUserData()
Description copied from class: IndexReader
Retrieve the String userData optionally passed to IndexWriter#commit. This will return null if IndexWriter.commit(Map) has never been called for this index.

Overrides:
getCommitUserData in class IndexReader

getCoreCacheKey

public Object getCoreCacheKey()
If the subclass of FilteredIndexReader modifies the contents of the FieldCache, you must override this method to provide a different key

Overrides:
getCoreCacheKey in class IndexReader

getDeletesCacheKey

public Object getDeletesCacheKey()
If the subclass of FilteredIndexReader modifies the deleted docs, you must override this method to provide a different key

Overrides:
getDeletesCacheKey in class IndexReader

toString

public String toString()

Overrides:
toString in class IndexReader
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexCommit

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class IndexCommit

java.lang.Object
    extended by  org.apache.lucene.index.IndexCommit
All Implemented Interfaces:
Comparable<IndexCommit>
Direct Known Subclasses:
SnapshotDeletionPolicy.SnapshotCommitPoint
public abstract class IndexCommit
extends Object
implements Comparable<IndexCommit>

Expert: represents a single commit into an index as seen by the IndexDeletionPolicy or IndexReader.

Changes to the content of an index are made visible only after the writer who made that change commits by writing a new segments file (segments_N). This point in time, when the action of writing of a new segments file to the directory is completed, is an index commit.

Each index commit point has a unique segments file associated with it. The segments file associated with a later index commit point would have a larger N.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
IndexCommit()
Method Summary
 int compareTo(IndexCommit commit)
abstract  void delete()
Delete this commit point.
 boolean equals(Object other)
Two IndexCommits are equal if both their Directory and versions are equal.
abstract  Directory getDirectory()
Returns the Directory for the index.
abstract  Collection<String> getFileNames()
Returns all index files referenced by this commit point.
abstract  long getGeneration()
Returns the generation (the _N in segments_N) for this IndexCommit
abstract  int getSegmentCount()
Returns number of segments referenced by this commit.
abstract  String getSegmentsFileName()
Get the segments file (segments_N) associated with this commit point.
 long getTimestamp()
Deprecated. If you need to track commit time of an index, you can store it in the commit data (see IndexWriter.commit(Map)
abstract  Map<String,String> getUserData()
Returns userData, previously passed to IndexWriter.commit(Map) for this commit.
abstract  long getVersion()
Deprecated. use getGeneration() instead
 int hashCode()
abstract  boolean isDeleted()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IndexCommit

public IndexCommit()
Method Detail

getSegmentsFileName

public abstract String getSegmentsFileName()
Get the segments file (segments_N) associated with this commit point.

getFileNames

public abstract Collection<String> getFileNames()
                                         throws IOException
Returns all index files referenced by this commit point.

Throws:
IOException

getDirectory

public abstract Directory getDirectory()
Returns the Directory for the index.

delete

public abstract void delete()
Delete this commit point. This only applies when using the commit point in the context of IndexWriter's IndexDeletionPolicy.

Upon calling this, the writer is notified that this commit point should be deleted.

Decision that a commit-point should be deleted is taken by the IndexDeletionPolicy in effect and therefore this should only be called by its onInit() or onCommit() methods.

isDeleted

public abstract boolean isDeleted()

getSegmentCount

public abstract int getSegmentCount()
Returns number of segments referenced by this commit.

equals

public boolean equals(Object other)
Two IndexCommits are equal if both their Directory and versions are equal.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getVersion

@Deprecated
public abstract long getVersion()
Deprecated. use getGeneration() instead

Returns the version for this IndexCommit. This is the same value that IndexReader.getVersion() would return if it were opened on this commit.

getGeneration

public abstract long getGeneration()
Returns the generation (the _N in segments_N) for this IndexCommit

getTimestamp

@Deprecated
public long getTimestamp()
                  throws IOException
Deprecated. If you need to track commit time of an index, you can store it in the commit data (see IndexWriter.commit(Map)

Convenience method that returns the last modified time of the segments_N file corresponding to this index commit, equivalent to getDirectory().fileModified(getSegmentsFileName()).

Throws:
IOException

getUserData

public abstract Map<String,String> getUserData()
                                        throws IOException
Returns userData, previously passed to IndexWriter.commit(Map) for this commit. Map is String -> String.

Throws:
IOException

compareTo

public int compareTo(IndexCommit commit)
Specified by:
compareTo in interface Comparable<IndexCommit>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexDeletionPolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Interface IndexDeletionPolicy

All Known Implementing Classes:
KeepOnlyLastCommitDeletionPolicy, NoDeletionPolicy, PersistentSnapshotDeletionPolicy, SnapshotDeletionPolicy
public interface IndexDeletionPolicy

Expert: policy for deletion of stale index commits.

Implement this interface, and pass it to one of the IndexWriter or IndexReader constructors, to customize when older point-in-time commits are deleted from the index directory. The default deletion policy is KeepOnlyLastCommitDeletionPolicy, which always removes old commits as soon as a new commit is done (this matches the behavior before 2.2).

One expected use case for this (and the reason why it was first created) is to work around problems with an index directory accessed via filesystems like NFS because NFS does not provide the "delete on last close" semantics that Lucene's "point in time" search normally relies on. By implementing a custom deletion policy, such as "a commit is only removed once it has been stale for more than X minutes", you can give your readers time to refresh to the new commit before IndexWriter removes the old commits. Note that doing so will increase the storage requirements of the index. See LUCENE-710 for details.

Method Summary
void | onCommit(List<? extends IndexCommit> commits) This is called each time the writer completed a commit.
void | onInit(List<? extends IndexCommit> commits) This is called once when a writer is first instantiated to give the policy a chance to remove old commit points.

Method Detail

onInit

void onInit(List<? extends IndexCommit> commits)
            throws IOException

This is called once when a writer is first instantiated to give the policy a chance to remove old commit points.

The writer locates all index commits present in the index directory and calls this method. The policy may choose to delete some of the commit points, doing so by calling method delete() of IndexCommit.

Note: the last CommitPoint is the most recent one, i.e. the "front index state". Be careful not to delete it, unless you know for sure what you are doing, and unless you can afford to lose the index content while doing that.

Parameters:
commits - List of current point-in-time commits, sorted by age (the 0th one is the oldest commit).
Throws:
IOException

onCommit

void onCommit(List<? extends IndexCommit> commits)
              throws IOException

This is called each time the writer completed a commit. This gives the policy a chance to remove old commit points with each commit.

The policy may now choose to delete old commit points by calling method delete() of IndexCommit.

This method is only called when IndexWriter.commit() or IndexWriter.close() is called, or possibly not at all if the IndexWriter.rollback() is called.

Note: the last CommitPoint is the most recent one, i.e. the "front index state". Be careful not to delete it, unless you know for sure what you are doing, and unless you can afford to lose the index content while doing that.

Parameters:
commits - List of IndexCommit, sorted by age (the 0th one is the oldest commit).
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexFileNameFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class IndexFileNameFilter

java.lang.Object
    extended by  org.apache.lucene.index.IndexFileNameFilter
All Implemented Interfaces:
FilenameFilter
public class IndexFileNameFilter
extends Object
implements FilenameFilter

Filename filter that accept filenames and extensions only created by Lucene.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Method Summary
boolean | accept(File dir, String name)
static IndexFileNameFilter | getFilter()
boolean | isCFSFile(String name) Returns true if this is a file that would be contained in a CFS file.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

accept

public boolean accept(File dir,
                      String name)
Specified by:
accept in interface FilenameFilter

isCFSFile

public boolean isCFSFile(String name)
Returns true if this is a file that would be contained in a CFS file. This function should only be called on files that pass the above "accept" (ie, are already known to be a Lucene index file).

getFilter

public static IndexFileNameFilter getFilter()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexFileNames

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class IndexFileNames

java.lang.Object
    extended by  org.apache.lucene.index.IndexFileNames

public final class IndexFileNames
extends Object

This class contains useful constants representing filenames and extensions used by lucene, as well as convenience methods for querying whether a file name matches an extension (matchesExtension), as well as generating file names from a segment name, generation and extension ( fileNameFromGeneration, segmentFileName).

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
static String[] | COMPOUND_EXTENSIONS File extensions of old-style index files
static String | COMPOUND_FILE_EXTENSION Extension of compound file
static String | COMPOUND_FILE_STORE_EXTENSION Extension of compound file for doc store files
static String | DELETABLE Name of the index deletable file (only used in pre-lockless indices)
static String | DELETES_EXTENSION Extension of deletes
static String | FIELD_INFOS_EXTENSION Extension of field infos
static String | FIELDS_EXTENSION Extension of stored fields file
static String | FIELDS_INDEX_EXTENSION Extension of stored fields index file
static String | FREQ_EXTENSION Extension of freq postings file
static String | GEN_EXTENSION Extension of gen file
static String[] | INDEX_EXTENSIONS This array contains all filename extensions used by Lucene's index files, with two exceptions, namely the extension made up from .f + a number and from .s + a number.
static String[] | INDEX_EXTENSIONS_IN_COMPOUND_FILE File extensions that are added to a compound file (same as above, minus "del", "gen", "cfs").
static String[] | NON_STORE_INDEX_EXTENSIONS
static String | NORMS_EXTENSION Extension of norms file
static String | PLAIN_NORMS_EXTENSION Extension of plain norms
static String | PROX_EXTENSION Extension of prox postings file
static String | SEGMENTS Name of the index segment file
static String | SEGMENTS_GEN Name of the generation reference file name
static String | SEPARATE_NORMS_EXTENSION Extension of separate norms
static String[] | STORE_INDEX_EXTENSIONS
static String | TERMS_EXTENSION Extension of terms file
static String | TERMS_INDEX_EXTENSION Extension of terms index file
static String[] | VECTOR_EXTENSIONS File extensions for term vector support
static String | VECTORS_DOCUMENTS_EXTENSION Extension of vectors documents file
static String | VECTORS_FIELDS_EXTENSION Extension of vectors fields file
static String | VECTORS_INDEX_EXTENSION Extension of vectors index file
Constructor Summary
IndexFileNames()
Method Summary
static String | fileNameFromGeneration(String base, String ext, long gen) Computes the full file name from base, extension and generation.
static boolean | isDocStoreFile(String fileName) Returns true if the provided filename is one of the doc store files (ends with an extension in STORE_INDEX_EXTENSIONS).
static boolean | isSeparateNormsFile(String filename) Returns true if the given filename ends with the separate norms file pattern: SEPARATE_NORMS_EXTENSION + "[0-9]+".
static boolean | matchesExtension(String filename, String ext) Returns true if the given filename ends with the given extension.
static String | segmentFileName(String segmentName, String ext) Returns the file name that matches the given segment name and extension.
static String | stripSegmentName(String filename) Strips the segment file name out of the given one.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

SEGMENTS

public static final String SEGMENTS
Name of the index segment file

See Also:
Constant Field Values

SEGMENTS_GEN

public static final String SEGMENTS_GEN
Name of the generation reference file name

See Also:
Constant Field Values

DELETABLE

public static final String DELETABLE
Name of the index deletable file (only used in pre-lockless indices)

See Also:
Constant Field Values

NORMS_EXTENSION

public static final String NORMS_EXTENSION
Extension of norms file

See Also:
Constant Field Values

FREQ_EXTENSION

public static final String FREQ_EXTENSION
Extension of freq postings file

See Also:
Constant Field Values

PROX_EXTENSION

public static final String PROX_EXTENSION
Extension of prox postings file

See Also:
Constant Field Values

TERMS_EXTENSION

public static final String TERMS_EXTENSION
Extension of terms file

See Also:
Constant Field Values

TERMS_INDEX_EXTENSION

public static final String TERMS_INDEX_EXTENSION
Extension of terms index file

See Also:
Constant Field Values

FIELDS_INDEX_EXTENSION

public static final String FIELDS_INDEX_EXTENSION
Extension of stored fields index file

See Also:
Constant Field Values

FIELDS_EXTENSION

public static final String FIELDS_EXTENSION
Extension of stored fields file

See Also:
Constant Field Values

VECTORS_FIELDS_EXTENSION

public static final String VECTORS_FIELDS_EXTENSION
Extension of vectors fields file

See Also:
Constant Field Values

VECTORS_DOCUMENTS_EXTENSION

public static final String VECTORS_DOCUMENTS_EXTENSION
Extension of vectors documents file

See Also:
Constant Field Values

VECTORS_INDEX_EXTENSION

public static final String VECTORS_INDEX_EXTENSION
Extension of vectors index file

See Also:
Constant Field Values

COMPOUND_FILE_EXTENSION

public static final String COMPOUND_FILE_EXTENSION
Extension of compound file

See Also:
Constant Field Values

COMPOUND_FILE_STORE_EXTENSION

public static final String COMPOUND_FILE_STORE_EXTENSION
Extension of compound file for doc store files

See Also:
Constant Field Values

DELETES_EXTENSION

public static final String DELETES_EXTENSION
Extension of deletes

See Also:
Constant Field Values

FIELD_INFOS_EXTENSION

public static final String FIELD_INFOS_EXTENSION
Extension of field infos

See Also:
Constant Field Values

PLAIN_NORMS_EXTENSION

public static final String PLAIN_NORMS_EXTENSION
Extension of plain norms

See Also:
Constant Field Values

SEPARATE_NORMS_EXTENSION

public static final String SEPARATE_NORMS_EXTENSION
Extension of separate norms

See Also:
Constant Field Values

GEN_EXTENSION

public static final String GEN_EXTENSION
Extension of gen file

See Also:
Constant Field Values

INDEX_EXTENSIONS

public static final String[] INDEX_EXTENSIONS
This array contains all filename extensions used by Lucene's index files, with two exceptions, namely the extension made up from .f + a number and from .s + a number. Also note that Lucene's segments_N files do not have any filename extension.

INDEX_EXTENSIONS_IN_COMPOUND_FILE

public static final String[] INDEX_EXTENSIONS_IN_COMPOUND_FILE
File extensions that are added to a compound file (same as above, minus "del", "gen", "cfs").

STORE_INDEX_EXTENSIONS

public static final String[] STORE_INDEX_EXTENSIONS

NON_STORE_INDEX_EXTENSIONS

public static final String[] NON_STORE_INDEX_EXTENSIONS

COMPOUND_EXTENSIONS

public static final String[] COMPOUND_EXTENSIONS
File extensions of old-style index files

VECTOR_EXTENSIONS

public static final String[] VECTOR_EXTENSIONS
File extensions for term vector support

Constructor Detail

IndexFileNames

public IndexFileNames()
Method Detail

fileNameFromGeneration

public static final String fileNameFromGeneration(String base,
                                                  String ext,
                                                  long gen)
Computes the full file name from base, extension and generation. If the generation is -1, the file name is null. If it's 0, the file name is <base>.<ext>. If it's > 0, the file name is <base>_<gen>.<ext>.
NOTE: .<ext> is added to the name only if ext is not an empty string.

Parameters:
base - main part of the file name
ext - extension of the filename
gen - generation

isDocStoreFile

public static final boolean isDocStoreFile(String fileName)
Returns true if the provided filename is one of the doc store files (ends with an extension in STORE_INDEX_EXTENSIONS).

segmentFileName

public static final String segmentFileName(String segmentName,
                                           String ext)
Returns the file name that matches the given segment name and extension. This method takes care to return the full file name in the form <segmentName>.<ext>, therefore you don't need to prefix the extension with a '.'.
NOTE: .<ext> is added to the result file name only if ext is not empty.

matchesExtension

public static final boolean matchesExtension(String filename,
                                             String ext)
Returns true if the given filename ends with the given extension. One should provide a pure extension, without '.'.

stripSegmentName

public static final String stripSegmentName(String filename)
Strips the segment file name out of the given one. If you used segmentFileName(java.lang.String, java.lang.String) or fileNameFromGeneration(java.lang.String, java.lang.String, long) to create your files, then this method simply removes whatever comes before the first '.', or the second '_' (excluding both), in case of deleted docs.

Returns:
the filename with the segment name removed, or the given filename if it does not contain a '.' and '_'.

isSeparateNormsFile

public static boolean isSeparateNormsFile(String filename)
Returns true if the given filename ends with the separate norms file pattern: SEPARATE_NORMS_EXTENSION + "[0-9]+".

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexFormatTooNewException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class IndexFormatTooNewException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.io.IOException
                extended by  org.apache.lucene.index.CorruptIndexException
                    extended by  org.apache.lucene.index.IndexFormatTooNewException
All Implemented Interfaces:
Serializable
public class IndexFormatTooNewException
extends CorruptIndexException

This exception is thrown when Lucene detects an index that is newer than this Lucene version.

See Also:
Serialized Form

Constructor Summary
IndexFormatTooNewException(DataInput in, int version, int minVersion, int maxVersion)
IndexFormatTooNewException(String resourceDesc, int version, int minVersion, int maxVersion)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IndexFormatTooNewException

public IndexFormatTooNewException(String resourceDesc,
                                  int version,
                                  int minVersion,
                                  int maxVersion)
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

IndexFormatTooNewException

public IndexFormatTooNewException(DataInput in,
                                  int version,
                                  int minVersion,
                                  int maxVersion)
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexFormatTooOldException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class IndexFormatTooOldException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.io.IOException
                extended by  org.apache.lucene.index.CorruptIndexException
                    extended by  org.apache.lucene.index.IndexFormatTooOldException
All Implemented Interfaces:
Serializable
public class IndexFormatTooOldException
extends CorruptIndexException

This exception is thrown when Lucene detects an index that is too old for this Lucene version

See Also:
Serialized Form

Constructor Summary
IndexFormatTooOldException(DataInput in, int version, int minVersion, int maxVersion)
IndexFormatTooOldException(DataInput in, String version)
IndexFormatTooOldException(String resourceDesc, int version, int minVersion, int maxVersion)
IndexFormatTooOldException(String resourceDesc, String version)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IndexFormatTooOldException

public IndexFormatTooOldException(String resourceDesc,
                                  String version)
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

IndexFormatTooOldException

public IndexFormatTooOldException(DataInput in,
                                  String version)
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

IndexFormatTooOldException

public IndexFormatTooOldException(String resourceDesc,
                                  int version,
                                  int minVersion,
                                  int maxVersion)
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

IndexFormatTooOldException

public IndexFormatTooOldException(DataInput in,
                                  int version,
                                  int minVersion,
                                  int maxVersion)
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexNotFoundException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class IndexNotFoundException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.io.IOException
                extended by  java.io.FileNotFoundException
                    extended by  org.apache.lucene.index.IndexNotFoundException
All Implemented Interfaces:
Serializable
public final class IndexNotFoundException
extends FileNotFoundException

Signals that no index was found in the Directory. Possibly because the directory is empty, however can also indicate an index corruption.

See Also:
Serialized Form

Constructor Summary
IndexNotFoundException(String msg)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IndexNotFoundException

public IndexNotFoundException(String msg)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class IndexReader

java.lang.Object
    extended by  org.apache.lucene.index.IndexReader
All Implemented Interfaces:
Closeable, Cloneable
Direct Known Subclasses:
FilterIndexReader, InstantiatedIndexReader, MultiReader, ParallelReader, SegmentReader
public abstract class IndexReader
extends Object
implements Cloneable, Closeable

IndexReader is an abstract class, providing an interface for accessing an index. Search of an index is done entirely through this abstract interface, so that any subclass which implements it is searchable.

Concrete subclasses of IndexReader are usually constructed with a call to one of the static open() methods, e.g. open(Directory, boolean).

For efficiency, in this API documents are often referred to via document numbers, non-negative integers which each name a unique document in the index. These document numbers are ephemeral--they may change as documents are added to and deleted from an index. Clients should thus not rely on a given document having the same number between sessions.

An IndexReader can be opened on a directory for which an IndexWriter is opened already, but it cannot be used to delete documents from the index then.

NOTE: for backwards API compatibility, several methods are not listed as abstract, but have no useful implementations in this base class and instead always throw UnsupportedOperationException. Subclasses are strongly encouraged to override these methods, but in many cases may not need to.

NOTE: as of 2.4, it's possible to open a read-only IndexReader using the static open methods that accept the boolean readOnly parameter. Such a reader has better concurrency as it's not necessary to synchronize on the isDeleted method. You must specify false if you want to make changes with the resulting IndexReader.

NOTE: IndexReader instances are completely thread safe, meaning multiple threads can call any of its methods, concurrently. If your application requires external synchronization, you should not synchronize on the IndexReader instance; use your own (non-Lucene) objects instead.

Nested Class Summary
static interface IndexReader.ReaderClosedListener
A custom listener that's invoked when the IndexReader is closed.
Field Summary
protected  boolean hasChanges
Constructor Summary
protected IndexReader()
Method Summary
protected  void acquireWriteLock()
Deprecated. Write support will be removed in Lucene 4.0.
 void addReaderClosedListener(IndexReader.ReaderClosedListener listener)
Expert: adds a IndexReader.ReaderClosedListener.
 Object clone()
Efficiently clones the IndexReader (sharing most internal state).
 IndexReader clone(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use clone() instead.
 void close()
Closes files associated with this index.
protected  void commit()
Deprecated. Write support will be removed in Lucene 4.0.
 void commit(Map<String,String> commitUserData)
Deprecated. Write support will be removed in Lucene 4.0.
 void decRef()
Expert: decreases the refCount of this IndexReader instance.
 void deleteDocument(int docNum)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
 int deleteDocuments(Term term)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
 Directory directory()
Returns the directory associated with this index.
abstract  int docFreq(Term t)
Returns the number of documents containing the term t.
protected abstract  void doClose()
Implements close.
protected abstract  void doCommit(Map<String,String> commitUserData)
Deprecated. Write support will be removed in Lucene 4.0.
 Document document(int n)
Returns the stored fields of the nth Document in this index.
abstract  Document document(int n, FieldSelector fieldSelector)
Get the Document at the n th position.
protected abstract  void doDelete(int docNum)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
protected  IndexReader doOpenIfChanged()
If the index has changed since it was opened, open and return a new reader; else, return null.
protected  IndexReader doOpenIfChanged(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use doOpenIfChanged() instead
protected  IndexReader doOpenIfChanged(IndexCommit commit)
If the index has changed since it was opened, open and return a new reader; else, return null.
protected  IndexReader doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes)
If the index has changed since it was opened, open and return a new reader; else, return null.
protected abstract  void doSetNorm(int doc, String field, byte value)
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
protected abstract  void doUndeleteAll()
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
protected  void ensureOpen()
 void flush()
Deprecated. Write support will be removed in Lucene 4.0.
 void flush(Map<String,String> commitUserData)
Deprecated. Write support will be removed in Lucene 4.0.
 Map<String,String> getCommitUserData()
Deprecated. Call getIndexCommit() and then call IndexCommit.getUserData().
static Map<String,String> getCommitUserData(Directory directory)
Deprecated. Call getIndexCommit() on an open IndexReader, and then call IndexCommit.getUserData().
 Object getCoreCacheKey()
Expert
static long getCurrentVersion(Directory directory)
Deprecated. Use getVersion() on an opened IndexReader.
 Object getDeletesCacheKey()
Expert.
abstract  FieldInfos getFieldInfos()
Get the FieldInfos describing all fields in this reader.
 IndexCommit getIndexCommit()
Expert: return the IndexCommit that this reader has opened.
 int getRefCount()
Expert: returns the current refCount for this reader
 IndexReader[] getSequentialSubReaders()
Expert: returns the sequential sub readers that this reader is logically composed of.
abstract  TermFreqVector getTermFreqVector(int docNumber, String field)
Return a term frequency vector for the specified document and field.
abstract  void getTermFreqVector(int docNumber, String field, TermVectorMapper mapper)
Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the TermFreqVector.
abstract  void getTermFreqVector(int docNumber, TermVectorMapper mapper)
Map all the term vectors for all fields in a Document
abstract  TermFreqVector[] getTermFreqVectors(int docNumber)
Return an array of term frequency vectors for the specified document.
 int getTermInfosIndexDivisor()
For IndexReader implementations that use TermInfosReader to read terms, this returns the current indexDivisor as specified when the reader was opened.
 long getUniqueTermCount()
Returns the number of unique terms (across all fields) in this reader.
 long getVersion()
Version number when this IndexReader was opened.
abstract  boolean hasDeletions()
Returns true if any documents have been deleted
 boolean hasNorms(String field)
Returns true if there are norms stored for this field.
 void incRef()
Expert: increments the refCount of this IndexReader instance.
static boolean indexExists(Directory directory)
Returns true if an index exists at the specified directory.
 boolean isCurrent()
Check whether any new changes have occurred to the index since this reader was opened.
abstract  boolean isDeleted(int n)
Returns true if document n has been deleted
 boolean isOptimized()
Deprecated. Check segment count using getSequentialSubReaders() instead.
static long lastModified(Directory directory2)
Deprecated. If you need to track commit time of an index, you can store it in the commit data (see IndexWriter.commit(Map)
static Collection<IndexCommit> listCommits(Directory dir)
Returns all commit points that exist in the Directory.
abstract  int maxDoc()
Returns one greater than the largest possible document number.
abstract  byte[] norms(String field)
Returns the byte-encoded normalization factor for the named field of every document.
abstract  void norms(String field, byte[] bytes, int offset)
Reads the byte-encoded normalization factor for the named field of every document.
 int numDeletedDocs()
Returns the number of deleted documents.
abstract  int numDocs()
Returns the number of documents in this index.
static IndexReader open(Directory directory)
Returns a IndexReader reading the index in the given Directory, with readOnly=true.
static IndexReader open(Directory directory, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use open(Directory) instead
static IndexReader open(Directory directory, IndexDeletionPolicy deletionPolicy, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use open(Directory) instead
static IndexReader open(Directory directory, IndexDeletionPolicy deletionPolicy, boolean readOnly, int termInfosIndexDivisor)
Deprecated. Write support will be removed in Lucene 4.0. Use open(Directory,int) instead
static IndexReader open(Directory directory, int termInfosIndexDivisor)
Expert: Returns a IndexReader reading the index in the given Director and given termInfosIndexDivisor
static IndexReader open(IndexCommit commit)
Expert: returns an IndexReader reading the index in the given IndexCommit.
static IndexReader open(IndexCommit commit, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use open(IndexCommit) instead
static IndexReader open(IndexCommit commit, IndexDeletionPolicy deletionPolicy, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use open(IndexCommit) instead
static IndexReader open(IndexCommit commit, IndexDeletionPolicy deletionPolicy, boolean readOnly, int termInfosIndexDivisor)
Deprecated. Write support will be removed in Lucene 4.0. Use open(IndexCommit,int) instead
static IndexReader open(IndexCommit commit, int termInfosIndexDivisor)
Expert: returns an IndexReader reading the index in the given IndexCommit and termInfosIndexDivisor.
static IndexReader open(IndexWriter writer, boolean applyAllDeletes)
Open a near real time IndexReader from the IndexWriter.
static IndexReader openIfChanged(IndexReader oldReader)
If the index has changed since the provided reader was opened, open and return a new reader; else, return null.
static IndexReader openIfChanged(IndexReader oldReader, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use openIfChanged(IndexReader) instead
static IndexReader openIfChanged(IndexReader oldReader, IndexCommit commit)
If the IndexCommit differs from what the provided reader is searching, or the provided reader is not already read-only, open and return a new readOnly=true reader; else, return null.
static IndexReader openIfChanged(IndexReader oldReader, IndexWriter writer, boolean applyAllDeletes)
Expert: If there changes (committed or not) in the IndexWriter versus what the provided reader is searching, then open and return a new read-only IndexReader searching both committed and uncommitted changes from the writer; else, return null (though, the current implementation never returns null).
 void removeReaderClosedListener(IndexReader.ReaderClosedListener listener)
Expert: remove a previously added IndexReader.ReaderClosedListener.
 IndexReader reopen()
Deprecated. Use openIfChanged(IndexReader) instead
 IndexReader reopen(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use openIfChanged(IndexReader) instead
 IndexReader reopen(IndexCommit commit)
Deprecated. Use openIfChanged(IndexReader,IndexCommit) instead
 IndexReader reopen(IndexWriter writer, boolean applyAllDeletes)
Deprecated. Use openIfChanged(IndexReader,IndexWriter,boolean) instead
 void setNorm(int doc, String field, byte value)
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
 void setNorm(int doc, String field, float value)
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
abstract  TermDocs termDocs()
Returns an unpositioned TermDocs enumerator.
 TermDocs termDocs(Term term)
Returns an enumeration of all the documents which contain term.
abstract  TermPositions termPositions()
Returns an unpositioned TermPositions enumerator.
 TermPositions termPositions(Term term)
Returns an enumeration of all the documents which contain term.
abstract  TermEnum terms()
Returns an enumeration of all the terms in the index.
abstract  TermEnum terms(Term t)
Returns an enumeration of all terms starting at a given term.
 String toString()
 boolean tryIncRef()
Expert: increments the refCount of this IndexReader instance only if the IndexReader has not been closed yet and returns true iff the refCount was successfully incremented, otherwise false.
 void undeleteAll()
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

hasChanges

protected boolean hasChanges
Constructor Detail

IndexReader

protected IndexReader()
Method Detail

addReaderClosedListener

public final void addReaderClosedListener(IndexReader.ReaderClosedListener listener)
Expert: adds a IndexReader.ReaderClosedListener. The provided listener will be invoked when this reader is closed.

WARNING: This API is experimental and might change in incompatible ways in the next release.

removeReaderClosedListener

public final void removeReaderClosedListener(IndexReader.ReaderClosedListener listener)
Expert: remove a previously added IndexReader.ReaderClosedListener.

WARNING: This API is experimental and might change in incompatible ways in the next release.

getRefCount

public final int getRefCount()
Expert: returns the current refCount for this reader

incRef

public final void incRef()
Expert: increments the refCount of this IndexReader instance. RefCounts are used to determine when a reader can be closed safely, i.e. as soon as there are no more references. Be sure to always call a corresponding decRef(), in a finally clause; otherwise the reader may never be closed. Note that close() simply calls decRef(), which means that the IndexReader will not really be closed until decRef() has been called for all outstanding references.

See Also:
decRef(), tryIncRef()

tryIncRef

public final boolean tryIncRef()
Expert: increments the refCount of this IndexReader instance only if the IndexReader has not been closed yet and returns true iff the refCount was successfully incremented, otherwise false. If this method returns false the reader is either already closed or is currently been closed. Either way this reader instance shouldn't be used by an application unless true is returned.

RefCounts are used to determine when a reader can be closed safely, i.e. as soon as there are no more references. Be sure to always call a corresponding decRef(), in a finally clause; otherwise the reader may never be closed. Note that close() simply calls decRef(), which means that the IndexReader will not really be closed until decRef() has been called for all outstanding references.

See Also:
decRef(), incRef()

toString

public String toString()

Overrides:
toString in class Object

decRef

public final void decRef()
                  throws IOException
Expert: decreases the refCount of this IndexReader instance. If the refCount drops to 0, then pending changes (if any) are committed to the index and this reader is closed. If an exception is hit, the refCount is unchanged.

Throws:
IOException - in case an IOException occurs in commit() or doClose()
See Also:
incRef()

ensureOpen

protected final void ensureOpen()
                         throws AlreadyClosedException
Throws:
AlreadyClosedException - if this IndexReader is closed

open

public static IndexReader open(Directory directory)
                        throws CorruptIndexException,
                               IOException
Returns a IndexReader reading the index in the given Directory, with readOnly=true.

Parameters:
directory - the index directory
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

open

@Deprecated
public static IndexReader open(Directory directory,
                                          boolean readOnly)
                        throws CorruptIndexException,
                               IOException
Deprecated. Write support will be removed in Lucene 4.0. Use open(Directory) instead

Returns an IndexReader reading the index in the given Directory. You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the reader.

Parameters:
directory - the index directory
readOnly - true if no changes (deletions, norms) will be made with this IndexReader
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

open

public static IndexReader open(IndexWriter writer,
                               boolean applyAllDeletes)
                        throws CorruptIndexException,
                               IOException
Open a near real time IndexReader from the IndexWriter.

Parameters:
writer - The IndexWriter to open from
applyAllDeletes - If true, all buffered deletes will be applied (made visible) in the returned reader. If false, the deletes are not applied but remain buffered (in IndexWriter) so that they will be applied in the future. Applying deletes can be costly, so if your app can tolerate deleted documents being returned you might gain some performance by passing false.
Returns:
The new IndexReader
Throws:
CorruptIndexException
IOException - if there is a low-level IO error
See Also:
openIfChanged(IndexReader,IndexWriter,boolean)
WARNING: This API is experimental and might change in incompatible ways in the next release.

open

public static IndexReader open(IndexCommit commit)
                        throws CorruptIndexException,
                               IOException
Expert: returns an IndexReader reading the index in the given IndexCommit.

Parameters:
commit - the commit point to open
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

open

@Deprecated
public static IndexReader open(IndexCommit commit,
                                          boolean readOnly)
                        throws CorruptIndexException,
                               IOException
Deprecated. Write support will be removed in Lucene 4.0. Use open(IndexCommit) instead

Expert: returns an IndexReader reading the index in the given IndexCommit. You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the reader.

Parameters:
commit - the commit point to open
readOnly - true if no changes (deletions, norms) will be made with this IndexReader
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

open

@Deprecated
public static IndexReader open(Directory directory,
                                          IndexDeletionPolicy deletionPolicy,
                                          boolean readOnly)
                        throws CorruptIndexException,
                               IOException
Deprecated. Write support will be removed in Lucene 4.0. Use open(Directory) instead

Expert: returns an IndexReader reading the index in the given Directory, with a custom IndexDeletionPolicy. You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the reader.

Parameters:
directory - the index directory
deletionPolicy - a custom deletion policy (only used if you use this reader to perform deletes or to set norms); see IndexWriter for details.
readOnly - true if no changes (deletions, norms) will be made with this IndexReader
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

open

@Deprecated
public static IndexReader open(Directory directory,
                                          IndexDeletionPolicy deletionPolicy,
                                          boolean readOnly,
                                          int termInfosIndexDivisor)
                        throws CorruptIndexException,
                               IOException
Deprecated. Write support will be removed in Lucene 4.0. Use open(Directory,int) instead

Expert: returns an IndexReader reading the index in the given Directory, with a custom IndexDeletionPolicy. You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the reader.

Parameters:
directory - the index directory
deletionPolicy - a custom deletion policy (only used if you use this reader to perform deletes or to set norms); see IndexWriter for details.
readOnly - true if no changes (deletions, norms) will be made with this IndexReader
termInfosIndexDivisor - Subsamples which indexed terms are loaded into RAM. This has the same effect as IndexWriter.setTermIndexInterval(int) except that setting must be done at indexing time while this setting can be set per reader. When set to N, then one in every N*termIndexInterval terms in the index is loaded into memory. By setting this to a value > 1 you can reduce memory usage, at the expense of higher latency when loading a TermInfo. The default value is 1. Set this to -1 to skip loading the terms index entirely.
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

open

@Deprecated
public static IndexReader open(IndexCommit commit,
                                          IndexDeletionPolicy deletionPolicy,
                                          boolean readOnly)
                        throws CorruptIndexException,
                               IOException
Deprecated. Write support will be removed in Lucene 4.0. Use open(IndexCommit) instead

Expert: returns an IndexReader reading the index in the given Directory, using a specific commit and with a custom IndexDeletionPolicy. You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the reader.

Parameters:
commit - the specific IndexCommit to open; see listCommits(org.apache.lucene.store.Directory) to list all commits in a directory
deletionPolicy - a custom deletion policy (only used if you use this reader to perform deletes or to set norms); see IndexWriter for details.
readOnly - true if no changes (deletions, norms) will be made with this IndexReader
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

open

@Deprecated
public static IndexReader open(IndexCommit commit,
                                          IndexDeletionPolicy deletionPolicy,
                                          boolean readOnly,
                                          int termInfosIndexDivisor)
                        throws CorruptIndexException,
                               IOException
Deprecated. Write support will be removed in Lucene 4.0. Use open(IndexCommit,int) instead

Expert: returns an IndexReader reading the index in the given Directory, using a specific commit and with a custom IndexDeletionPolicy. You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the reader.

Parameters:
commit - the specific IndexCommit to open; see listCommits(org.apache.lucene.store.Directory) to list all commits in a directory
deletionPolicy - a custom deletion policy (only used if you use this reader to perform deletes or to set norms); see IndexWriter for details.
readOnly - true if no changes (deletions, norms) will be made with this IndexReader
termInfosIndexDivisor - Subsamples which indexed terms are loaded into RAM. This has the same effect as IndexWriter.setTermIndexInterval(int) except that setting must be done at indexing time while this setting can be set per reader. When set to N, then one in every N*termIndexInterval terms in the index is loaded into memory. By setting this to a value > 1 you can reduce memory usage, at the expense of higher latency when loading a TermInfo. The default value is 1. Set this to -1 to skip loading the terms index entirely. This is only useful in advanced situations when you will only .next() through all terms; attempts to seek will hit an exception.
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

open

public static IndexReader open(Directory directory,
                               int termInfosIndexDivisor)
                        throws CorruptIndexException,
                               IOException
Expert: Returns a IndexReader reading the index in the given Director and given termInfosIndexDivisor

Parameters:
directory - the index directory
termInfosIndexDivisor - Subsamples which indexed terms are loaded into RAM. This has the same effect as IndexWriterConfig.setTermIndexInterval(int) except that setting must be done at indexing time while this setting can be set per reader. When set to N, then one in every N*termIndexInterval terms in the index is loaded into memory. By setting this to a value > 1 you can reduce memory usage, at the expense of higher latency when loading a TermInfo. The default value is 1. Set this to -1 to skip loading the terms index entirely.
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

open

public static IndexReader open(IndexCommit commit,
                               int termInfosIndexDivisor)
                        throws CorruptIndexException,
                               IOException
Expert: returns an IndexReader reading the index in the given IndexCommit and termInfosIndexDivisor.

Parameters:
commit - the commit point to open
termInfosIndexDivisor - Subsamples which indexed terms are loaded into RAM. This has the same effect as IndexWriterConfig.setTermIndexInterval(int) except that setting must be done at indexing time while this setting can be set per reader. When set to N, then one in every N*termIndexInterval terms in the index is loaded into memory. By setting this to a value > 1 you can reduce memory usage, at the expense of higher latency when loading a TermInfo. The default value is 1. Set this to -1 to skip loading the terms index entirely.
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

openIfChanged

public static IndexReader openIfChanged(IndexReader oldReader)
                                 throws IOException
If the index has changed since the provided reader was opened, open and return a new reader; else, return null. The new reader, if not null, will be the same type of reader as the previous one, ie an NRT reader will open a new NRT reader, a MultiReader will open a new MultiReader, etc.

This method is typically far less costly than opening a fully new IndexReader as it shares resources (for example sub-readers) with the provided IndexReader, when possible.

The provided reader is not closed (you are responsible for doing so); if a new reader is returned you also must eventually close it. Be sure to never close a reader while other threads are still using it; see SearcherManager to simplify managing this.

If a new reader is returned, it's safe to make changes (deletions, norms) with it. All shared mutable state with the old reader uses "copy on write" semantics to ensure the changes are not seen by other readers.

Returns:
null if there are no changes; else, a new IndexReader instance which you must eventually close
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

openIfChanged

@Deprecated
public static IndexReader openIfChanged(IndexReader oldReader,
                                                   boolean readOnly)
                                 throws IOException
Deprecated. Write support will be removed in Lucene 4.0. Use openIfChanged(IndexReader) instead

If the index has changed since the provided reader was opened, open and return a new reader, with the specified readOnly; else, return null.

Throws:
IOException
See Also:
openIfChanged(IndexReader)

openIfChanged

public static IndexReader openIfChanged(IndexReader oldReader,
                                        IndexCommit commit)
                                 throws IOException
If the IndexCommit differs from what the provided reader is searching, or the provided reader is not already read-only, open and return a new readOnly=true reader; else, return null.

Throws:
IOException
See Also:
openIfChanged(IndexReader)

openIfChanged

public static IndexReader openIfChanged(IndexReader oldReader,
                                        IndexWriter writer,
                                        boolean applyAllDeletes)
                                 throws IOException
Expert: If there changes (committed or not) in the IndexWriter versus what the provided reader is searching, then open and return a new read-only IndexReader searching both committed and uncommitted changes from the writer; else, return null (though, the current implementation never returns null).

This provides "near real-time" searching, in that changes made during an IndexWriter session can be quickly made available for searching without closing the writer nor calling IndexWriter.commit().

It's near real-time because there is no hard guarantee on how quickly you can get a new reader after making changes with IndexWriter. You'll have to experiment in your situation to determine if it's fast enough. As this is a new and experimental feature, please report back on your findings so we can learn, improve and iterate.

The very first time this method is called, this writer instance will make every effort to pool the readers that it opens for doing merges, applying deletes, etc. This means additional resources (RAM, file descriptors, CPU time) will be consumed.

For lower latency on reopening a reader, you should call IndexWriterConfig.setMergedSegmentWarmer(org.apache.lucene.index.IndexWriter.IndexReaderWarmer) to pre-warm a newly merged segment before it's committed to the index. This is important for minimizing index-to-search delay after a large merge.

If an addIndexes* call is running in another thread, then this reader will only search those segments from the foreign index that have been successfully copied over, so far.

NOTE: Once the writer is closed, any outstanding readers may continue to be used. However, if you attempt to reopen any of those readers, you'll hit an AlreadyClosedException.

Parameters:
writer - The IndexWriter to open from
applyAllDeletes - If true, all buffered deletes will be applied (made visible) in the returned reader. If false, the deletes are not applied but remain buffered (in IndexWriter) so that they will be applied in the future. Applying deletes can be costly, so if your app can tolerate deleted documents being returned you might gain some performance by passing false.
Returns:
IndexReader that covers entire index plus all changes made so far by this IndexWriter instance, or null if there are no new changes
Throws:
IOException
WARNING: This API is experimental and might change in incompatible ways in the next release.

reopen

@Deprecated
public IndexReader reopen()
                   throws CorruptIndexException,
                          IOException
Deprecated. Use openIfChanged(IndexReader) instead

Refreshes an IndexReader if the index has changed since this instance was (re)opened.

Opening an IndexReader is an expensive operation. This method can be used to refresh an existing IndexReader to reduce these costs. This method tries to only load segments that have changed or were created after the IndexReader was (re)opened.

If the index has not changed since this instance was (re)opened, then this call is a NOOP and returns this instance. Otherwise, a new instance is returned. The old instance is not closed and remains usable.

If the reader is reopened, even though they share resources internally, it's safe to make changes (deletions, norms) with the new reader. All shared mutable state obeys "copy on write" semantics to ensure the changes are not seen by other readers.

You can determine whether a reader was actually reopened by comparing the old instance with the instance returned by this method:

 IndexReader reader = ...
 ...
 IndexReader newReader = r.reopen();
 if (newReader != reader) {
 ...     // reader was reopened
   reader.close();
 }
 reader = newReader;
 ...
Be sure to synchronize that code so that other threads, if present, can never use reader after it has been closed and before it's switched to newReader.

NOTE: If this reader is a near real-time reader (obtained from IndexWriter.getReader(), reopen() will simply call writer.getReader() again for you, though this may change in the future.

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

reopen

@Deprecated
public IndexReader reopen(boolean openReadOnly)
                   throws CorruptIndexException,
                          IOException
Deprecated. Write support will be removed in Lucene 4.0. Use openIfChanged(IndexReader) instead

Just like reopen(), except you can change the readOnly of the original reader. If the index is unchanged but readOnly is different then a new reader will be returned.

Throws:
CorruptIndexException
IOException

reopen

@Deprecated
public IndexReader reopen(IndexCommit commit)
                   throws CorruptIndexException,
                          IOException
Deprecated. Use openIfChanged(IndexReader,IndexCommit) instead

Expert: reopen this reader on a specific commit point. This always returns a readOnly reader. If the specified commit point matches what this reader is already on, and this reader is already readOnly, then this same instance is returned; if it is not already readOnly, a readOnly clone is returned.

Throws:
CorruptIndexException
IOException

reopen

@Deprecated
public IndexReader reopen(IndexWriter writer,
                                     boolean applyAllDeletes)
                   throws CorruptIndexException,
                          IOException
Deprecated. Use openIfChanged(IndexReader,IndexWriter,boolean) instead

Expert: returns a readonly reader, covering all committed as well as un-committed changes to the index. This provides "near real-time" searching, in that changes made during an IndexWriter session can be quickly made available for searching without closing the writer nor calling commit().

Note that this is functionally equivalent to calling {#flush} (an internal IndexWriter operation) and then using open(org.apache.lucene.store.Directory) to open a new reader. But the turnaround time of this method should be faster since it avoids the potentially costly commit().

You must close the IndexReader returned by this method once you are done using it.

It's near real-time because there is no hard guarantee on how quickly you can get a new reader after making changes with IndexWriter. You'll have to experiment in your situation to determine if it's fast enough. As this is a new and experimental feature, please report back on your findings so we can learn, improve and iterate.

The resulting reader supports reopen(), but that call will simply forward back to this method (though this may change in the future).

The very first time this method is called, this writer instance will make every effort to pool the readers that it opens for doing merges, applying deletes, etc. This means additional resources (RAM, file descriptors, CPU time) will be consumed.

For lower latency on reopening a reader, you should call IndexWriterConfig.setMergedSegmentWarmer(org.apache.lucene.index.IndexWriter.IndexReaderWarmer) to pre-warm a newly merged segment before it's committed to the index. This is important for minimizing index-to-search delay after a large merge.

If an addIndexes* call is running in another thread, then this reader will only search those segments from the foreign index that have been successfully copied over, so far

.

NOTE: Once the writer is closed, any outstanding readers may continue to be used. However, if you attempt to reopen any of those readers, you'll hit an AlreadyClosedException.

Parameters:
writer - The IndexWriter to open from
applyAllDeletes - If true, all buffered deletes will be applied (made visible) in the returned reader. If false, the deletes are not applied but remain buffered (in IndexWriter) so that they will be applied in the future. Applying deletes can be costly, so if your app can tolerate deleted documents being returned you might gain some performance by passing false.
Returns:
IndexReader that covers entire index plus all changes made so far by this IndexWriter instance
Throws:
IOException
CorruptIndexException
WARNING: This API is experimental and might change in incompatible ways in the next release.

doOpenIfChanged

protected IndexReader doOpenIfChanged()
                               throws CorruptIndexException,
                                      IOException
If the index has changed since it was opened, open and return a new reader; else, return null.

Throws:
CorruptIndexException
IOException
See Also:
openIfChanged(IndexReader)

doOpenIfChanged

@Deprecated
protected IndexReader doOpenIfChanged(boolean openReadOnly)
                               throws CorruptIndexException,
                                      IOException
Deprecated. Write support will be removed in Lucene 4.0. Use doOpenIfChanged() instead

If the index has changed since it was opened, open and return a new reader; else, return null.

Throws:
CorruptIndexException
IOException
See Also:
openIfChanged(IndexReader, boolean)

doOpenIfChanged

protected IndexReader doOpenIfChanged(IndexCommit commit)
                               throws CorruptIndexException,
                                      IOException
If the index has changed since it was opened, open and return a new reader; else, return null.

Throws:
CorruptIndexException
IOException
See Also:
openIfChanged(IndexReader, IndexCommit)

doOpenIfChanged

protected IndexReader doOpenIfChanged(IndexWriter writer,
                                      boolean applyAllDeletes)
                               throws CorruptIndexException,
                                      IOException
If the index has changed since it was opened, open and return a new reader; else, return null.

Throws:
CorruptIndexException
IOException
See Also:
openIfChanged(IndexReader, IndexWriter, boolean)

clone

public Object clone()
Efficiently clones the IndexReader (sharing most internal state).

On cloning a reader with pending changes (deletions, norms), the original reader transfers its write lock to the cloned reader. This means only the cloned reader may make further changes to the index, and commit the changes to the index on close, but the old reader still reflects all changes made up until it was cloned.

Like openIfChanged(IndexReader), it's safe to make changes to either the original or the cloned reader: all shared mutable state obeys "copy on write" semantics to ensure the changes are not seen by other readers.

Overrides:
clone in class Object

clone

@Deprecated
public IndexReader clone(boolean openReadOnly)
                  throws CorruptIndexException,
                         IOException
Deprecated. Write support will be removed in Lucene 4.0. Use clone() instead.

Clones the IndexReader and optionally changes readOnly. A readOnly reader cannot open a writeable reader.

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

directory

public Directory directory()
Returns the directory associated with this index. The Default implementation returns the directory specified by subclasses when delegating to the IndexReader(Directory) constructor, or throws an UnsupportedOperationException if one was not specified.

Throws:
UnsupportedOperationException - if no directory

lastModified

@Deprecated
public static long lastModified(Directory directory2)
                         throws CorruptIndexException,
                                IOException
Deprecated. If you need to track commit time of an index, you can store it in the commit data (see IndexWriter.commit(Map)

Returns the time the index in the named directory was last modified. Do not use this to check whether the reader is still up-to-date, use isCurrent() instead.

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

getCurrentVersion

@Deprecated
public static long getCurrentVersion(Directory directory)
                              throws CorruptIndexException,
                                     IOException
Deprecated. Use getVersion() on an opened IndexReader.

Reads version number from segments files. The version number is initialized with a timestamp and then increased by one for each change of the index.

Parameters:
directory - where the index resides.
Returns:
version number.
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

getCommitUserData

@Deprecated
public static Map<String,String> getCommitUserData(Directory directory)
                                            throws CorruptIndexException,
                                                   IOException
Deprecated. Call getIndexCommit() on an open IndexReader, and then call IndexCommit.getUserData().

Reads commitUserData, previously passed to IndexWriter.commit(Map), from current index segments file. This will return null if IndexWriter.commit(Map) has never been called for this index.

Parameters:
directory - where the index resides.
Returns:
commit userData.
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

getVersion

public long getVersion()
Version number when this IndexReader was opened. Not implemented in the IndexReader base class.

If this reader is based on a Directory (ie, was created by calling open(org.apache.lucene.store.Directory), or openIfChanged(org.apache.lucene.index.IndexReader) on a reader based on a Directory), then this method returns the version recorded in the commit that the reader opened. This version is advanced every time IndexWriter.commit() is called.

Throws:
UnsupportedOperationException - unless overridden in subclass

getCommitUserData

@Deprecated
public Map<String,String> getCommitUserData()
Deprecated. Call getIndexCommit() and then call IndexCommit.getUserData().

Retrieve the String userData optionally passed to IndexWriter#commit. This will return null if IndexWriter.commit(Map) has never been called for this index.

isCurrent

public boolean isCurrent()
                  throws CorruptIndexException,
                         IOException
Check whether any new changes have occurred to the index since this reader was opened.

If this reader is based on a Directory (ie, was created by calling open(org.apache.lucene.store.Directory), or openIfChanged(org.apache.lucene.index.IndexReader) on a reader based on a Directory), then this method checks if any further commits (see IndexWriter.commit() have occurred in that directory).

If instead this reader is a near real-time reader (ie, obtained by a call to IndexWriter.getReader(), or by calling openIfChanged(org.apache.lucene.index.IndexReader) on a near real-time reader), then this method checks if either a new commmit has occurred, or any new uncommitted changes have taken place via the writer. Note that even if the writer has only performed merging, this method will still return false.

In any event, if this returns false, you should call openIfChanged(org.apache.lucene.index.IndexReader) to get a new reader that sees the changes.

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
UnsupportedOperationException - unless overridden in subclass

isOptimized

@Deprecated
public boolean isOptimized()
Deprecated. Check segment count using getSequentialSubReaders() instead.

getTermFreqVectors

public abstract TermFreqVector[] getTermFreqVectors(int docNumber)
                                             throws IOException
Return an array of term frequency vectors for the specified document. The array contains a vector for each vectorized field in the document. Each vector contains terms and frequencies for all terms in a given vectorized field. If no such fields existed, the method returns null. The term vectors that are returned may either be of type TermFreqVector or of type TermPositionVector if positions or offsets have been stored.

Parameters:
docNumber - document for which term frequency vectors are returned
Returns:
array of term frequency vectors. May be null if no term vectors have been stored for the specified document.
Throws:
IOException - if index cannot be accessed
See Also:
Field.TermVector

getTermFreqVector

public abstract TermFreqVector getTermFreqVector(int docNumber,
                                                 String field)
                                          throws IOException
Return a term frequency vector for the specified document and field. The returned vector contains terms and frequencies for the terms in the specified field of this document, if the field had the storeTermVector flag set. If termvectors had been stored with positions or offsets, a TermPositionVector is returned.

Parameters:
docNumber - document for which the term frequency vector is returned
field - field for which the term frequency vector is returned.
Returns:
term frequency vector May be null if field does not exist in the specified document or term vector was not stored.
Throws:
IOException - if index cannot be accessed
See Also:
Field.TermVector

getTermFreqVector

public abstract void getTermFreqVector(int docNumber,
                                       String field,
                                       TermVectorMapper mapper)
                                throws IOException
Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the TermFreqVector.

Parameters:
docNumber - The number of the document to load the vector for
field - The name of the field to load
mapper - The TermVectorMapper to process the vector. Must not be null
Throws:
IOException - if term vectors cannot be accessed or if they do not exist on the field and doc. specified.

getTermFreqVector

public abstract void getTermFreqVector(int docNumber,
                                       TermVectorMapper mapper)
                                throws IOException
Map all the term vectors for all fields in a Document

Parameters:
docNumber - The number of the document to load the vector for
mapper - The TermVectorMapper to process the vector. Must not be null
Throws:
IOException - if term vectors cannot be accessed or if they do not exist on the field and doc. specified.

indexExists

public static boolean indexExists(Directory directory)
                           throws IOException
Returns true if an index exists at the specified directory.

Parameters:
directory - the directory to check for an index
Returns:
true if an index exists; false otherwise
Throws:
IOException - if there is a problem with accessing the index

numDocs

public abstract int numDocs()
Returns the number of documents in this index.

maxDoc

public abstract int maxDoc()
Returns one greater than the largest possible document number. This may be used to, e.g., determine how big to allocate an array which will have an element for every document number in an index.

numDeletedDocs

public final int numDeletedDocs()
Returns the number of deleted documents.

document

public final Document document(int n)
                        throws CorruptIndexException,
                               IOException
Returns the stored fields of the nth Document in this index.

NOTE: for performance reasons, this method does not check if the requested document is deleted, and therefore asking for a deleted document may yield unspecified results. Usually this is not required, however you can call isDeleted(int) with the requested document ID to verify the document is not deleted.

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

document

public abstract Document document(int n,
                                  FieldSelector fieldSelector)
                           throws CorruptIndexException,
                                  IOException
Get the Document at the n th position. The FieldSelector may be used to determine what Fields to load and how they should be loaded. NOTE: If this Reader (more specifically, the underlying FieldsReader) is closed before the lazy Field is loaded an exception may be thrown. If you want the value of a lazy Field to be available after closing you must explicitly load it or fetch the Document again with a new loader.

NOTE: for performance reasons, this method does not check if the requested document is deleted, and therefore asking for a deleted document may yield unspecified results. Usually this is not required, however you can call isDeleted(int) with the requested document ID to verify the document is not deleted.

Parameters:
n - Get the document at the nth position
fieldSelector - The FieldSelector to use to determine what Fields should be loaded on the Document. May be null, in which case all Fields will be loaded.
Returns:
The stored fields of the Document at the nth position
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
Fieldable, FieldSelector, SetBasedFieldSelector, LoadFirstFieldSelector

isDeleted

public abstract boolean isDeleted(int n)
Returns true if document n has been deleted

hasDeletions

public abstract boolean hasDeletions()
Returns true if any documents have been deleted

hasNorms

public boolean hasNorms(String field)
                 throws IOException
Returns true if there are norms stored for this field.

Throws:
IOException

norms

public abstract byte[] norms(String field)
                      throws IOException
Returns the byte-encoded normalization factor for the named field of every document. This is used by the search code to score documents. Returns null if norms were not indexed for this field.

Throws:
IOException
See Also:
AbstractField.setBoost(float)

norms

public abstract void norms(String field,
                           byte[] bytes,
                           int offset)
                    throws IOException
Reads the byte-encoded normalization factor for the named field of every document. This is used by the search code to score documents.

Throws:
IOException
See Also:
AbstractField.setBoost(float)

setNorm

@Deprecated
public final void setNorm(int doc,
                                     String field,
                                     byte value)
                   throws StaleReaderException,
                          CorruptIndexException,
                          LockObtainFailedException,
                          IOException
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.

Expert: Resets the normalization factor for the named field of the named document. The norm represents the product of the field's boost and its length normalization. Thus, to preserve the length normalization values when resetting this, one should base the new value upon the old. NOTE: If this field does not index norms, then this method throws IllegalStateException.

Throws:
StaleReaderException - if the index has changed since this reader was opened
CorruptIndexException - if the index is corrupt
LockObtainFailedException - if another writer has this index open (write.lock could not be obtained)
IOException - if there is a low-level IO error
IllegalStateException - if the field does not index norms
See Also:
norms(String), Similarity.decodeNormValue(byte)

doSetNorm

@Deprecated
protected abstract void doSetNorm(int doc,
                                             String field,
                                             byte value)
                           throws CorruptIndexException,
                                  IOException
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.

Implements setNorm in subclass.

Throws:
CorruptIndexException
IOException

setNorm

@Deprecated
public final void setNorm(int doc,
                                     String field,
                                     float value)
                   throws StaleReaderException,
                          CorruptIndexException,
                          LockObtainFailedException,
                          IOException
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.

Expert: Resets the normalization factor for the named field of the named document.

Throws:
StaleReaderException - if the index has changed since this reader was opened
CorruptIndexException - if the index is corrupt
LockObtainFailedException - if another writer has this index open (write.lock could not be obtained)
IOException - if there is a low-level IO error
See Also:
norms(String), Similarity.decodeNormValue(byte)

terms

public abstract TermEnum terms()
                        throws IOException
Returns an enumeration of all the terms in the index. The enumeration is ordered by Term.compareTo(). Each term is greater than all that precede it in the enumeration. Note that after calling terms(), TermEnum.next() must be called on the resulting enumeration before calling other methods such as TermEnum.term().

Throws:
IOException - if there is a low-level IO error

terms

public abstract TermEnum terms(Term t)
                        throws IOException
Returns an enumeration of all terms starting at a given term. If the given term does not exist, the enumeration is positioned at the first term greater than the supplied term. The enumeration is ordered by Term.compareTo(). Each term is greater than all that precede it in the enumeration.

Throws:
IOException - if there is a low-level IO error

docFreq

public abstract int docFreq(Term t)
                     throws IOException
Returns the number of documents containing the term t.

Throws:
IOException - if there is a low-level IO error

termDocs

public TermDocs termDocs(Term term)
                  throws IOException
Returns an enumeration of all the documents which contain term. For each document, the document number, the frequency of the term in that document is also provided, for use in search scoring. If term is null, then all non-deleted docs are returned with freq=1. Thus, this method implements the mapping:

    Term => <docNum, freq>*

The enumeration is ordered by document number. Each document number is greater than all that precede it in the enumeration.

Throws:
IOException - if there is a low-level IO error

termDocs

public abstract TermDocs termDocs()
                           throws IOException
Returns an unpositioned TermDocs enumerator.

Note: the TermDocs returned is unpositioned. Before using it, ensure that you first position it with TermDocs.seek(Term) or TermDocs.seek(TermEnum).

Throws:
IOException - if there is a low-level IO error

termPositions

public final TermPositions termPositions(Term term)
                                  throws IOException
Returns an enumeration of all the documents which contain term. For each document, in addition to the document number and frequency of the term in that document, a list of all of the ordinal positions of the term in the document is available. Thus, this method implements the mapping:

    Term => <docNum, freq, <pos1, pos2, ... posfreq-1> >*

This positional information facilitates phrase and proximity searching.

The enumeration is ordered by document number. Each document number is greater than all that precede it in the enumeration.

Throws:
IOException - if there is a low-level IO error

termPositions

public abstract TermPositions termPositions()
                                     throws IOException
Returns an unpositioned TermPositions enumerator.

Throws:
IOException - if there is a low-level IO error

deleteDocument

@Deprecated
public final void deleteDocument(int docNum)
                          throws StaleReaderException,
                                 CorruptIndexException,
                                 LockObtainFailedException,
                                 IOException
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead

Deletes the document numbered docNum. Once a document is deleted it will not appear in TermDocs or TermPostitions enumerations. Attempts to read its field with the document(int) method will result in an error. The presence of this document may still be reflected in the docFreq(org.apache.lucene.index.Term) statistic, though this will be corrected eventually as the index is further modified.

Throws:
StaleReaderException - if the index has changed since this reader was opened
CorruptIndexException - if the index is corrupt
LockObtainFailedException - if another writer has this index open (write.lock could not be obtained)
IOException - if there is a low-level IO error

doDelete

@Deprecated
protected abstract void doDelete(int docNum)
                          throws CorruptIndexException,
                                 IOException
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead

Implements deletion of the document numbered docNum. Applications should call deleteDocument(int) or deleteDocuments(Term).

Throws:
CorruptIndexException
IOException

deleteDocuments

@Deprecated
public final int deleteDocuments(Term term)
                          throws StaleReaderException,
                                 CorruptIndexException,
                                 LockObtainFailedException,
                                 IOException
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead

Deletes all documents that have a given term indexed. This is useful if one uses a document field to hold a unique ID string for the document. Then to delete such a document, one merely constructs a term with the appropriate field and the unique ID string as its text and passes it to this method. See deleteDocument(int) for information about when this deletion will become effective.

Returns:
the number of documents deleted
Throws:
StaleReaderException - if the index has changed since this reader was opened
CorruptIndexException - if the index is corrupt
LockObtainFailedException - if another writer has this index open (write.lock could not be obtained)
IOException - if there is a low-level IO error

undeleteAll

@Deprecated
public final void undeleteAll()
                       throws StaleReaderException,
                              CorruptIndexException,
                              LockObtainFailedException,
                              IOException
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.

Undeletes all documents currently marked as deleted in this index.

NOTE: this method can only recover documents marked for deletion but not yet removed from the index; when and how Lucene removes deleted documents is an implementation detail, subject to change from release to release. However, you can use numDeletedDocs() on the current IndexReader instance to see how many documents will be un-deleted.

Throws:
StaleReaderException - if the index has changed since this reader was opened
LockObtainFailedException - if another writer has this index open (write.lock could not be obtained)
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

doUndeleteAll

@Deprecated
protected abstract void doUndeleteAll()
                               throws CorruptIndexException,
                                      IOException
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.

Implements actual undeleteAll() in subclass.

Throws:
CorruptIndexException
IOException

acquireWriteLock

@Deprecated
protected void acquireWriteLock()
                         throws IOException
Deprecated. Write support will be removed in Lucene 4.0.

Does nothing by default. Subclasses that require a write lock for index modifications must implement this method.

Throws:
IOException

flush

@Deprecated
public final void flush()
                 throws IOException
Deprecated. Write support will be removed in Lucene 4.0.

Throws:
IOException

flush

@Deprecated
public final void flush(Map<String,String> commitUserData)
                 throws IOException
Deprecated. Write support will be removed in Lucene 4.0.

Parameters:
commitUserData - Opaque Map (String -> String) that's recorded into the segments file in the index, and retrievable by IndexCommit.getUserData().
Throws:
IOException

commit

@Deprecated
protected final void commit()
                     throws IOException
Deprecated. Write support will be removed in Lucene 4.0.

Commit changes resulting from delete, undeleteAll, or setNorm operations If an exception is hit, then either no changes or all changes will have been committed to the index (transactional semantics).

Throws:
IOException - if there is a low-level IO error

commit

@Deprecated
public final void commit(Map<String,String> commitUserData)
                  throws IOException
Deprecated. Write support will be removed in Lucene 4.0.

Commit changes resulting from delete, undeleteAll, or setNorm operations If an exception is hit, then either no changes or all changes will have been committed to the index (transactional semantics).

Throws:
IOException - if there is a low-level IO error

doCommit

@Deprecated
protected abstract void doCommit(Map<String,String> commitUserData)
                          throws IOException
Deprecated. Write support will be removed in Lucene 4.0.

Implements commit.

Throws:
IOException

close

public final void close()
                 throws IOException
Closes files associated with this index. Also saves any new deletions to disk. No other methods should be called after this has been called.

Specified by:
close in interface Closeable
Throws:
IOException - if there is a low-level IO error

doClose

protected abstract void doClose()
                         throws IOException
Implements close.

Throws:
IOException

getFieldInfos

public abstract FieldInfos getFieldInfos()
Get the FieldInfos describing all fields in this reader. NOTE: do not make any changes to the returned FieldInfos!

WARNING: This API is experimental and might change in incompatible ways in the next release.

getIndexCommit

public IndexCommit getIndexCommit()
                           throws IOException
Expert: return the IndexCommit that this reader has opened. This method is only implemented by those readers that correspond to a Directory with its own segments_N file.

Throws:
IOException
WARNING: This API is experimental and might change in incompatible ways in the next release.

listCommits

public static Collection<IndexCommit> listCommits(Directory dir)
                                           throws IOException
Returns all commit points that exist in the Directory. Normally, because the default is KeepOnlyLastCommitDeletionPolicy, there would be only one commit point. But if you're using a custom IndexDeletionPolicy then there could be many commits. Once you have a given commit, you can open a reader on it by calling open(IndexCommit,boolean) There must be at least one commit in the Directory, else this method throws IndexNotFoundException. Note that if a commit is in progress while this method is running, that commit may or may not be returned.

Returns:
a sorted list of IndexCommits, from oldest to latest.
Throws:
IOException

getSequentialSubReaders

public IndexReader[] getSequentialSubReaders()
Expert: returns the sequential sub readers that this reader is logically composed of. For example, IndexSearcher uses this API to drive searching by one sub reader at a time. If this reader is not composed of sequential child readers, it should return null. If this method returns an empty array, that means this reader is a null reader (for example a MultiReader that has no sub readers).

NOTE: You should not try using sub-readers returned by this method to make any changes (setNorm, deleteDocument, etc.). While this might succeed for one composite reader (like MultiReader), it will most likely lead to index corruption for other readers (like DirectoryReader obtained through open(org.apache.lucene.store.Directory). Use the parent reader directly.

getCoreCacheKey

public Object getCoreCacheKey()
Expert

getDeletesCacheKey

public Object getDeletesCacheKey()
Expert. Warning: this returns null if the reader has no deletions

getUniqueTermCount

public long getUniqueTermCount()
                        throws IOException
Returns the number of unique terms (across all fields) in this reader. This method returns long, even though internally Lucene cannot handle more than 2^31 unique terms, for a possible future when this limitation is removed.

Throws:
UnsupportedOperationException - if this count cannot be easily determined (eg Multi*Readers). Instead, you should call getSequentialSubReaders() and ask each sub reader for its unique term count.
IOException

getTermInfosIndexDivisor

public int getTermInfosIndexDivisor()
For IndexReader implementations that use TermInfosReader to read terms, this returns the current indexDivisor as specified when the reader was opened.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexReader.ReaderClosedListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Interface IndexReader.ReaderClosedListener

Enclosing class:
IndexReader
public static interface IndexReader.ReaderClosedListener

A custom listener that's invoked when the IndexReader is closed.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 void onClose(IndexReader reader)

Method Detail

onClose

void onClose(IndexReader reader)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexSorter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class IndexSorter

java.lang.Object
    extended by  org.apache.lucene.index.IndexSorter

public class IndexSorter
extends Object

Sort an index by document importance factor. Higher scoring documents are assigned smaller document numbers. Document weights are obtained from a specified field, which has to be single-valued and stored, with string value that represents a float number. Stored fields in the output index remain consistent, i.e. both stored fields and postings are renumbered in sync.

NOTE: this tool is unaware of documents added atomically via IndexWriter.addDocuments(java.util.Collection) or IndexWriter.updateDocuments(org.apache.lucene.index.Term, java.util.Collection), which means it can easily break up such document groups.

Constructor Summary
IndexSorter()
Method Summary
static void | main(String[] args)
void | sort(Directory input, Directory output, String field)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IndexSorter

public IndexSorter()
Method Detail

sort

public void sort(Directory input,
                 Directory output,
                 String field)
          throws IOException
Throws:
IOException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexSplitter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class IndexSplitter

java.lang.Object
    extended by  org.apache.lucene.index.IndexSplitter

public class IndexSplitter
extends Object

Command-line tool that enables listing segments in an index, copying specific segments to another index, and deleting segments from an index.

This tool does file-level copying of segments files. This means it's unable to split apart a single segment into multiple segments. For example if your index is a single segment, this tool won't help. Also, it does basic file-level copying (using simple File{In,Out}putStream) so it will not work with non FSDirectory Directory impls.

WARNING: This API is experimental and might change in incompatible ways in the next release.
You can easily accidentally remove segments from your index so be careful!

NOTE: this tool is unaware of documents added atomically via IndexWriter.addDocuments(java.util.Collection) or IndexWriter.updateDocuments(org.apache.lucene.index.Term, java.util.Collection), which means it can easily break up such document groups.

Field Summary
 SegmentInfos infos
Constructor Summary
IndexSplitter(File dir)
Method Summary
void | listSegments()
static void | main(String[] args)
void | remove(String[] segs)
void | split(File destDir, String[] segs)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

infos

public SegmentInfos infos
Constructor Detail

IndexSplitter

public IndexSplitter(File dir)
              throws IOException
Throws:
IOException
Method Detail

main

public static void main(String[] args)
                 throws Exception
Parameters:
args -
Throws:
Exception

listSegments

public void listSegments()
                  throws IOException
Throws:
IOException

remove

public void remove(String[] segs)
            throws IOException
Throws:
IOException

split

public void split(File destDir,
                  String[] segs)
           throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexUpgrader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class IndexUpgrader

java.lang.Object
    extended by  org.apache.lucene.index.IndexUpgrader

public final class IndexUpgrader
extends Object

This is an easy-to-use tool that upgrades all segments of an index from previous Lucene versions to the current segment file format. It can be used from command line:

  java -cp lucene-core.jar org.apache.lucene.index.IndexUpgrader [-delete-prior-commits] [-verbose] indexDir
Alternatively this class can be instantiated and upgrade() invoked. It uses UpgradeIndexMergePolicy and triggers the upgrade via an forceMerge request to IndexWriter.

This tool keeps only the last commit in an index; for this reason, if the incoming index has more than one commit, the tool refuses to run by default. Specify -delete-prior-commits to override this, allowing the tool to delete all but the last commit. From Java code this can be enabled by passing true to IndexUpgrader(Directory,Version,PrintStream,boolean).

Warning: This tool may reorder documents if the index was partially upgraded before execution (e.g., documents were added). If your application relies on "monotonicity" of doc IDs (which means that the order in which the documents were added to the index is preserved), do a full forceMerge instead. The MergePolicy set by IndexWriterConfig may also reorder documents.

Constructor Summary
IndexUpgrader(Directory dir, IndexWriterConfig iwc, PrintStream infoStream, boolean deletePriorCommits)
Creates index upgrader on the given directory, using an IndexWriter using the given config.
IndexUpgrader(Directory dir, Version matchVersion)
Creates index upgrader on the given directory, using an IndexWriter using the given matchVersion.
IndexUpgrader(Directory dir, Version matchVersion, PrintStream infoStream, boolean deletePriorCommits)
Creates index upgrader on the given directory, using an IndexWriter using the given matchVersion.
Method Summary
static void | main(String[] args)
void | upgrade()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IndexUpgrader

public IndexUpgrader(Directory dir,
                     Version matchVersion)
Creates index upgrader on the given directory, using an IndexWriter using the given matchVersion. The tool refuses to upgrade indexes with multiple commit points.

IndexUpgrader

public IndexUpgrader(Directory dir,
                     Version matchVersion,
                     PrintStream infoStream,
                     boolean deletePriorCommits)
Creates index upgrader on the given directory, using an IndexWriter using the given matchVersion. You have the possibility to upgrade indexes with multiple commit points by removing all older ones. If infoStream is not null, all logging output will be sent to this stream.

IndexUpgrader

public IndexUpgrader(Directory dir,
                     IndexWriterConfig iwc,
                     PrintStream infoStream,
                     boolean deletePriorCommits)
Creates index upgrader on the given directory, using an IndexWriter using the given config. You have the possibility to upgrade indexes with multiple commit points by removing all older ones. If infoStream is not null, all logging output will be sent to this stream.

Method Detail

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException

upgrade

public void upgrade()
             throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class IndexWriter

java.lang.Object
    extended by  org.apache.lucene.index.IndexWriter
All Implemented Interfaces:
Closeable, TwoPhaseCommit
public class IndexWriter
extends Object
implements Closeable, TwoPhaseCommit

An IndexWriter creates and maintains an index.

The create argument to the constructor determines whether a new index is created, or whether an existing index is opened. Note that you can open an index with create=true even while readers are using the index. The old readers will continue to search the "point in time" snapshot they had opened, and won't see the newly created index until they re-open. There are also constructors with no create argument which will create a new index if there is not already an index at the provided path and otherwise open the existing index.

In either case, documents are added with addDocument and removed with deleteDocuments(Term) or deleteDocuments(Query). A document can be updated with updateDocument (which just deletes and then adds the entire document). When finished adding, deleting and updating documents, close should be called.

These changes are buffered in memory and periodically flushed to the Directory (during the above method calls). A flush is triggered when there are enough buffered deletes (see setMaxBufferedDeleteTerms(int)) or enough added documents since the last flush, whichever is sooner. For the added documents, flushing is triggered either by RAM usage of the documents (see setRAMBufferSizeMB(double)) or the number of added documents. The default is to flush when RAM usage hits 16 MB. For best indexing speed you should flush by RAM usage with a large RAM buffer. Note that flushing just moves the internal buffered state in IndexWriter into the index, but these changes are not visible to IndexReader until either commit() or close() is called. A flush may also trigger one or more segment merges which by default run with a background thread so as not to block the addDocument calls (see below for changing the MergeScheduler).

Opening an IndexWriter creates a lock file for the directory in use. Trying to open another IndexWriter on the same directory will lead to a LockObtainFailedException. The LockObtainFailedException is also thrown if an IndexReader on the same directory is used to delete documents from the index.

Expert: IndexWriter allows an optional IndexDeletionPolicy implementation to be specified. You can use this to control when prior commits are deleted from the index. The default policy is KeepOnlyLastCommitDeletionPolicy which removes all prior commits as soon as a new commit is done (this matches behavior before 2.2). Creating your own policy can allow you to explicitly keep previous "point in time" commits alive in the index for some time, to allow readers to refresh to the new commit without having the old commit deleted out from under them. This is necessary on filesystems like NFS that do not support "delete on last close" semantics, which Lucene's "point in time" search normally relies on.

Expert: IndexWriter allows you to separately change the MergePolicy and the MergeScheduler. The MergePolicy is invoked whenever there are changes to the segments in the index. Its role is to select which merges to do, if any, and return a MergePolicy.MergeSpecification describing the merges. The default is LogByteSizeMergePolicy. Then, the MergeScheduler is invoked with the requested merges and it decides when and how to run the merges. The default is ConcurrentMergeScheduler.

NOTE: if you hit an OutOfMemoryError then IndexWriter will quietly record this fact and block all future segment commits. This is a defensive measure in case any internal state (buffered documents and deletions) were corrupted. Any subsequent calls to commit() will throw an IllegalStateException. The only course of action is to call close(), which internally will call rollback(), to undo any changes to the index since the last commit. You can also just call rollback() directly.

NOTE: IndexWriter instances are completely thread safe, meaning multiple threads can call any of its methods, concurrently. If your application requires external synchronization, you should not synchronize on the IndexWriter instance as this may cause deadlock; use your own (non-Lucene) objects instead.

NOTE: If you call Thread.interrupt() on a thread that's within IndexWriter, IndexWriter will try to catch this (eg, if it's in a wait() or Thread.sleep()), and will then throw the unchecked exception ThreadInterruptedException and clear the interrupt status on the thread.

Nested Class Summary
static class | IndexWriter.IndexReaderWarmer If getReader() has been called (ie, this writer is in near real-time mode), then after a merge completes, this class can be invoked to warm the reader on the newly merged segment, before the merge commits.
static class | IndexWriter.MaxFieldLength Deprecated. use LimitTokenCountAnalyzer instead.
Field Summary
static int | DEFAULT_MAX_BUFFERED_DELETE_TERMS Deprecated. use IndexWriterConfig.DEFAULT_MAX_BUFFERED_DELETE_TERMS instead
static int | DEFAULT_MAX_BUFFERED_DOCS Deprecated. use IndexWriterConfig.DEFAULT_MAX_BUFFERED_DOCS instead.
static int | DEFAULT_MAX_FIELD_LENGTH Deprecated. see IndexWriterConfig
static double | DEFAULT_RAM_BUFFER_SIZE_MB Deprecated. use IndexWriterConfig.DEFAULT_RAM_BUFFER_SIZE_MB instead.
static int | DEFAULT_TERM_INDEX_INTERVAL Deprecated. use IndexWriterConfig.DEFAULT_TERM_INDEX_INTERVAL instead.
static int | DISABLE_AUTO_FLUSH Deprecated. use IndexWriterConfig.DISABLE_AUTO_FLUSH instead
static int | MAX_TERM_LENGTH Absolute hard maximum length for a term.
static String | WRITE_LOCK_NAME Name of the write lock in the index.
static long | WRITE_LOCK_TIMEOUT Deprecated. use IndexWriterConfig.WRITE_LOCK_TIMEOUT instead
Constructor Summary
IndexWriter(Directory d, Analyzer a, boolean create, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, boolean create, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl, IndexCommit commit)
Deprecated. use IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, IndexWriterConfig conf)
Constructs a new IndexWriter per the settings given in conf.
Method Summary
 void addDocument(Document doc)
Adds a document to this index.
 void addDocument(Document doc, Analyzer analyzer)
Adds a document to this index, using the provided analyzer instead of the value of getAnalyzer().
 void addDocuments(Collection<Document> docs)
Atomically adds a block of documents with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
 void addDocuments(Collection<Document> docs, Analyzer analyzer)
Atomically adds a block of documents, analyzed using the provided analyzer, with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
 void addIndexes(Directory... dirs)
Adds all segments from an array of indexes into this index.
 void addIndexes(IndexReader... readers)
Merges the provided indexes into this index.
 void addIndexesNoOptimize(Directory... dirs)
Deprecated. use addIndexes(Directory...) instead
 void close()
Commits all changes to an index and closes all associated files.
 void close(boolean waitForMerges)
Closes the index with or without waiting for currently running merges to finish.
 void commit()
Commits all pending changes (added & deleted documents, segment merges, added indexes, etc.) to the index, and syncs all referenced index files, such that a reader will see the changes and the index updates will survive an OS or machine crash or power loss.
 void commit(Map<String,String> commitUserData)
Commits all changes to the index, specifying a commitUserData Map (String -> String).
 void deleteAll()
Delete all documents in the index.
 void deleteDocuments(Query... queries)
Deletes the document(s) matching any of the provided queries.
 void deleteDocuments(Query query)
Deletes the document(s) matching the provided query.
 void deleteDocuments(Term... terms)
Deletes the document(s) containing any of the terms.
 void deleteDocuments(Term term)
Deletes the document(s) containing term.
 void deleteUnusedFiles()
Expert: remove any index files that are no longer used.
protected  void doAfterFlush()
A hook for extending classes to execute operations after pending added and deleted documents have been flushed to the Directory but before the change is committed (new segments_N file written).
protected  void doBeforeFlush()
A hook for extending classes to execute operations before pending added and deleted documents are flushed to the Directory.
protected  void ensureOpen()
protected  void ensureOpen(boolean includePendingClose)
Used internally to throw an AlreadyClosedException if this IndexWriter has been closed.
 void expungeDeletes()
Deprecated.
 void expungeDeletes(boolean doWait)
Deprecated.
protected  void flush(boolean triggerMerge, boolean applyAllDeletes)
Flush all in-memory buffered updates (adds and deletes) to the Directory.
protected  void flush(boolean triggerMerge, boolean flushDocStores, boolean flushDeletes)
NOTE: flushDocStores is ignored now (hardwired to true); this method is only here for backwards compatibility
 void forceMerge(int maxNumSegments)
Forces merge policy to merge segments until there's <= maxNumSegments.
 void forceMerge(int maxNumSegments, boolean doWait)
Just like forceMerge(int), except you can specify whether the call should block until all merging completes.
 void forceMergeDeletes()
Forces merging of all segments that have deleted documents.
 void forceMergeDeletes(boolean doWait)
Just like forceMergeDeletes(), except you can specify whether the call should block until the operation completes.
 Analyzer getAnalyzer()
Returns the analyzer used by this index.
 IndexWriterConfig getConfig()
Returns the private IndexWriterConfig, cloned from the IndexWriterConfig passed to IndexWriter(Directory, IndexWriterConfig).
static PrintStream getDefaultInfoStream()
Returns the current default infoStream for newly instantiated IndexWriters.
static long getDefaultWriteLockTimeout()
Deprecated. use IndexWriterConfig.getDefaultWriteLockTimeout() instead
 Directory getDirectory()
Returns the Directory used by this index.
 PrintStream getInfoStream()
Returns the current infoStream in use by this writer.
 int getMaxBufferedDeleteTerms()
Deprecated. use IndexWriterConfig.getMaxBufferedDeleteTerms() instead
 int getMaxBufferedDocs()
Deprecated. use IndexWriterConfig.getMaxBufferedDocs() instead.
 int getMaxFieldLength()
Deprecated. use LimitTokenCountAnalyzer to limit number of tokens.
 int getMaxMergeDocs()
Deprecated. use LogMergePolicy.getMaxMergeDocs() directly.
 IndexWriter.IndexReaderWarmer getMergedSegmentWarmer()
Deprecated. use IndexWriterConfig.getMergedSegmentWarmer() instead.
 int getMergeFactor()
Deprecated. use LogMergePolicy.getMergeFactor() directly.
 MergePolicy getMergePolicy()
Deprecated. use IndexWriterConfig.getMergePolicy() instead
 MergeScheduler getMergeScheduler()
Deprecated. use IndexWriterConfig.getMergeScheduler() instead
 Collection<SegmentInfo> getMergingSegments()
Expert: to be used by a MergePolicy to avoid selecting merges for segments already being merged.
 MergePolicy.OneMerge getNextMerge()
Expert: the MergeScheduler calls this method to retrieve the next merge requested by the MergePolicy
 PayloadProcessorProvider getPayloadProcessorProvider()
Returns the PayloadProcessorProvider that is used during segment merges to process payloads.
 double getRAMBufferSizeMB()
Deprecated. use IndexWriterConfig.getRAMBufferSizeMB() instead.
 IndexReader getReader()
Deprecated. Please use IndexReader.open(IndexWriter,boolean) instead.
 IndexReader getReader(int termInfosIndexDivisor)
Deprecated. Please use IndexReader.open(IndexWriter,boolean) instead. Furthermore, this method cannot guarantee the reader (and its sub-readers) will be opened with the termInfosIndexDivisor setting because some of them may have already been opened according to IndexWriterConfig.setReaderTermsIndexDivisor(int). You should set the requested termInfosIndexDivisor through IndexWriterConfig.setReaderTermsIndexDivisor(int) and use getReader().
 int getReaderTermsIndexDivisor()
Deprecated. use IndexWriterConfig.getReaderTermsIndexDivisor() instead.
 Similarity getSimilarity()
Deprecated. use IndexWriterConfig.getSimilarity() instead
 int getTermIndexInterval()
Deprecated. use IndexWriterConfig.getTermIndexInterval()
 boolean getUseCompoundFile()
Deprecated. use LogMergePolicy.getUseCompoundFile()
 long getWriteLockTimeout()
Deprecated. use IndexWriterConfig.getWriteLockTimeout()
 boolean hasDeletions()
static boolean isLocked(Directory directory)
Returns true iff the index in the named directory is currently locked.
 int maxDoc()
Returns total number of docs in this index, including docs not yet flushed (still in the RAM buffer), not counting deletions.
 void maybeMerge()
Expert: asks the mergePolicy whether any merges are necessary now and if so, runs the requested merges and then iterate (test again if merges are needed) until no more merges are returned by the mergePolicy.
 void merge(MergePolicy.OneMerge merge)
Merges the indicated segments, replacing them in the stack with a single segment.
 void message(String message)
Prints a message to the infoStream (if non-null), prefixed with the identifying information for this writer and the thread that's calling it.
 int numDeletedDocs(SegmentInfo info)
Obtain the number of deleted docs for a pooled reader.
 int numDocs()
Returns total number of docs in this index, including docs not yet flushed (still in the RAM buffer), and including deletions.
 int numRamDocs()
Expert: Return the number of documents currently buffered in RAM.
 void optimize()
Deprecated.
 void optimize(boolean doWait)
Deprecated.
 void optimize(int maxNumSegments)
Deprecated.
 void prepareCommit()
Expert: prepare for commit.
 void prepareCommit(Map<String,String> commitUserData)
Expert: prepare for commit, specifying commitUserData Map (String -> String).
 long ramSizeInBytes()
Expert: Return the total size of all index files currently cached in memory.
 void rollback()
Close the IndexWriter without committing any changes that have occurred since the last commit (or since it was opened, if commit hasn't been called).
 String segString()
 String segString(Iterable<SegmentInfo> infos)
 String segString(SegmentInfo info)
static void setDefaultInfoStream(PrintStream infoStream)
If non-null, this will be the default infoStream used by a newly instantiated IndexWriter.
static void setDefaultWriteLockTimeout(long writeLockTimeout)
Deprecated. use IndexWriterConfig.setDefaultWriteLockTimeout(long) instead
 void setInfoStream(PrintStream infoStream)
If non-null, information about merges, deletes and a message when maxFieldLength is reached will be printed to this.
 void setMaxBufferedDeleteTerms(int maxBufferedDeleteTerms)
Deprecated. use IndexWriterConfig.setMaxBufferedDeleteTerms(int) instead.
 void setMaxBufferedDocs(int maxBufferedDocs)
Deprecated. use IndexWriterConfig.setMaxBufferedDocs(int) instead.
 void setMaxFieldLength(int maxFieldLength)
Deprecated. use LimitTokenCountAnalyzer instead. Note that the behvaior slightly changed - the analyzer limits the number of tokens per token stream created, while this setting limits the total number of tokens to index. This only matters if you index many multi-valued fields though.
 void setMaxMergeDocs(int maxMergeDocs)
Deprecated. use LogMergePolicy.setMaxMergeDocs(int) directly.
 void setMergedSegmentWarmer(IndexWriter.IndexReaderWarmer warmer)
Deprecated. use IndexWriterConfig.setMergedSegmentWarmer(org.apache.lucene.index.IndexWriter.IndexReaderWarmer) instead.
 void setMergeFactor(int mergeFactor)
Deprecated. use LogMergePolicy.setMergeFactor(int) directly.
 void setMergePolicy(MergePolicy mp)
Deprecated. use IndexWriterConfig.setMergePolicy(MergePolicy) instead.
 void setMergeScheduler(MergeScheduler mergeScheduler)
Deprecated. use IndexWriterConfig.setMergeScheduler(MergeScheduler) instead
 void setPayloadProcessorProvider(PayloadProcessorProvider pcp)
Sets the PayloadProcessorProvider to use when merging payloads.
 void setRAMBufferSizeMB(double mb)
Deprecated. use IndexWriterConfig.setRAMBufferSizeMB(double) instead.
 void setReaderTermsIndexDivisor(int divisor)
Deprecated. use IndexWriterConfig.setReaderTermsIndexDivisor(int) instead.
 void setSimilarity(Similarity similarity)
Deprecated. use IndexWriterConfig.setSimilarity(Similarity) instead
 void setTermIndexInterval(int interval)
Deprecated. use IndexWriterConfig.setTermIndexInterval(int)
 void setUseCompoundFile(boolean value)
Deprecated. use LogMergePolicy.setUseCompoundFile(boolean).
 void setWriteLockTimeout(long writeLockTimeout)
Deprecated. use IndexWriterConfig.setWriteLockTimeout(long) instead
static void unlock(Directory directory)
Forcibly unlocks the index in the named directory.
 void updateDocument(Term term, Document doc)
Updates a document by first deleting the document(s) containing term and then adding the new document.
 void updateDocument(Term term, Document doc, Analyzer analyzer)
Updates a document by first deleting the document(s) containing term and then adding the new document.
 void updateDocuments(Term delTerm, Collection<Document> docs)
Atomically deletes documents matching the provided delTerm and adds a block of documents with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
 void updateDocuments(Term delTerm, Collection<Document> docs, Analyzer analyzer)
Atomically deletes documents matching the provided delTerm and adds a block of documents, analyzed using the provided analyzer, with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
 boolean verbose()
Returns true if verbosing is enabled (i.e., infoStream != null).
 void waitForMerges()
Wait for any currently outstanding merges to finish.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

WRITE_LOCK_TIMEOUT

@Deprecated
public static long WRITE_LOCK_TIMEOUT
Deprecated. use IndexWriterConfig.WRITE_LOCK_TIMEOUT instead
Default value for the write lock timeout (1,000).

See Also:
setDefaultWriteLockTimeout(long)

WRITE_LOCK_NAME

public static final String WRITE_LOCK_NAME
Name of the write lock in the index.

See Also:
Constant Field Values

DISABLE_AUTO_FLUSH

@Deprecated
public static final int DISABLE_AUTO_FLUSH
Deprecated. use IndexWriterConfig.DISABLE_AUTO_FLUSH instead
Value to denote a flush trigger is disabled

See Also:
Constant Field Values

DEFAULT_MAX_BUFFERED_DOCS

@Deprecated
public static final int DEFAULT_MAX_BUFFERED_DOCS
Deprecated. use IndexWriterConfig.DEFAULT_MAX_BUFFERED_DOCS instead.
Disabled by default (because IndexWriter flushes by RAM usage by default). Change using setMaxBufferedDocs(int).

See Also:
Constant Field Values

DEFAULT_RAM_BUFFER_SIZE_MB

@Deprecated
public static final double DEFAULT_RAM_BUFFER_SIZE_MB
Deprecated. use IndexWriterConfig.DEFAULT_RAM_BUFFER_SIZE_MB instead.
Default value is 16 MB (which means flush when buffered docs consume 16 MB RAM). Change using setRAMBufferSizeMB(double).

See Also:
Constant Field Values

DEFAULT_MAX_BUFFERED_DELETE_TERMS

@Deprecated
public static final int DEFAULT_MAX_BUFFERED_DELETE_TERMS
Deprecated. use IndexWriterConfig.DEFAULT_MAX_BUFFERED_DELETE_TERMS instead
Disabled by default (because IndexWriter flushes by RAM usage by default). Change using setMaxBufferedDeleteTerms(int).

See Also:
Constant Field Values

DEFAULT_MAX_FIELD_LENGTH

@Deprecated
public static final int DEFAULT_MAX_FIELD_LENGTH
Deprecated. see IndexWriterConfig
Default value is 10,000. Change using setMaxFieldLength(int).

DEFAULT_TERM_INDEX_INTERVAL

@Deprecated
public static final int DEFAULT_TERM_INDEX_INTERVAL
Deprecated. use IndexWriterConfig.DEFAULT_TERM_INDEX_INTERVAL instead.
Default value is 128. Change using setTermIndexInterval(int).

See Also:
Constant Field Values

MAX_TERM_LENGTH

public static final int MAX_TERM_LENGTH
Absolute hard maximum length for a term. If a term arrives from the analyzer longer than this length, it is skipped and a message is printed to infoStream, if set (see setInfoStream(java.io.PrintStream)).

See Also:
Constant Field Values
Constructor Detail

IndexWriter

@Deprecated
public IndexWriter(Directory d,
                              Analyzer a,
                              boolean create,
                              IndexWriter.MaxFieldLength mfl)
            throws CorruptIndexException,
                   LockObtainFailedException,
                   IOException
Deprecated. use IndexWriter(Directory, IndexWriterConfig) instead

Constructs an IndexWriter for the index in d. Text will be analyzed with a. If create is true, then a new, empty index will be created in d, replacing the index already there, if any.

Parameters:
d - the index directory
a - the analyzer to use
create - true to create the index or overwrite the existing one; false to append to the existing index
mfl - Maximum field length in number of terms/tokens: LIMITED, UNLIMITED, or user-specified via the MaxFieldLength constructor.
Throws:
CorruptIndexException - if the index is corrupt
LockObtainFailedException - if another writer has this index open (write.lock could not be obtained)
IOException - if the directory cannot be read/written to, or if it does not exist and create is false or if there is any other low-level IO error

IndexWriter

@Deprecated
public IndexWriter(Directory d,
                              Analyzer a,
                              IndexWriter.MaxFieldLength mfl)
            throws CorruptIndexException,
                   LockObtainFailedException,
                   IOException
Deprecated. use IndexWriter(Directory, IndexWriterConfig) instead

Constructs an IndexWriter for the index in d, first creating it if it does not already exist. Text will be analyzed with a.

Parameters:
d - the index directory
a - the analyzer to use
mfl - Maximum field length in number of terms/tokens: LIMITED, UNLIMITED, or user-specified via the MaxFieldLength constructor.
Throws:
CorruptIndexException - if the index is corrupt
LockObtainFailedException - if another writer has this index open (write.lock could not be obtained)
IOException - if the directory cannot be read/written to or if there is any other low-level IO error

IndexWriter

@Deprecated
public IndexWriter(Directory d,
                              Analyzer a,
                              IndexDeletionPolicy deletionPolicy,
                              IndexWriter.MaxFieldLength mfl)
            throws CorruptIndexException,
                   LockObtainFailedException,
                   IOException
Deprecated. use IndexWriter(Directory, IndexWriterConfig) instead

Expert: constructs an IndexWriter with a custom IndexDeletionPolicy, for the index in d, first creating it if it does not already exist. Text will be analyzed with a.

Parameters:
d - the index directory
a - the analyzer to use
deletionPolicy - see above
mfl - whether or not to limit field lengths
Throws:
CorruptIndexException - if the index is corrupt
LockObtainFailedException - if another writer has this index open (write.lock could not be obtained)
IOException - if the directory cannot be read/written to or if there is any other low-level IO error

IndexWriter

@Deprecated
public IndexWriter(Directory d,
                              Analyzer a,
                              boolean create,
                              IndexDeletionPolicy deletionPolicy,
                              IndexWriter.MaxFieldLength mfl)
            throws CorruptIndexException,
                   LockObtainFailedException,
                   IOException
Deprecated. use IndexWriter(Directory, IndexWriterConfig) instead

Expert: constructs an IndexWriter with a custom IndexDeletionPolicy, for the index in d. Text will be analyzed with a. If create is true, then a new, empty index will be created in d, replacing the index already there, if any.

Parameters:
d - the index directory
a - the analyzer to use
create - true to create the index or overwrite the existing one; false to append to the existing index
deletionPolicy - see above
mfl - IndexWriter.MaxFieldLength, whether or not to limit field lengths. Value is in number of terms/tokens
Throws:
CorruptIndexException - if the index is corrupt
LockObtainFailedException - if another writer has this index open (write.lock could not be obtained)
IOException - if the directory cannot be read/written to, or if it does not exist and create is false or if there is any other low-level IO error

IndexWriter

@Deprecated
public IndexWriter(Directory d,
                              Analyzer a,
                              IndexDeletionPolicy deletionPolicy,
                              IndexWriter.MaxFieldLength mfl,
                              IndexCommit commit)
            throws CorruptIndexException,
                   LockObtainFailedException,
                   IOException
Deprecated. use IndexWriter(Directory, IndexWriterConfig) instead

Expert: constructs an IndexWriter on specific commit point, with a custom IndexDeletionPolicy, for the index in d. Text will be analyzed with a.

This is only meaningful if you've used a IndexDeletionPolicy in that past that keeps more than just the last commit.

This operation is similar to rollback(), except that method can only rollback what's been done with the current instance of IndexWriter since its last commit, whereas this method can rollback to an arbitrary commit point from the past, assuming the IndexDeletionPolicy has preserved past commits.

Parameters:
d - the index directory
a - the analyzer to use
deletionPolicy - see above
mfl - whether or not to limit field lengths, value is in number of terms/tokens. See IndexWriter.MaxFieldLength.
commit - which commit to open
Throws:
CorruptIndexException - if the index is corrupt
LockObtainFailedException - if another writer has this index open (write.lock could not be obtained)
IOException - if the directory cannot be read/written to, or if it does not exist and create is false or if there is any other low-level IO error

IndexWriter

public IndexWriter(Directory d,
                   IndexWriterConfig conf)
            throws CorruptIndexException,
                   LockObtainFailedException,
                   IOException
Constructs a new IndexWriter per the settings given in conf. Note that the passed in IndexWriterConfig is privately cloned; if you need to make subsequent "live" changes to the configuration use getConfig().

Parameters:
d - the index directory. The index is either created or appended according conf.getOpenMode().
conf - the configuration settings according to which IndexWriter should be initialized.
Throws:
CorruptIndexException - if the index is corrupt
LockObtainFailedException - if another writer has this index open (write.lock could not be obtained)
IOException - if the directory cannot be read/written to, or if it does not exist and conf.getOpenMode() is OpenMode.APPEND or if there is any other low-level IO error
Method Detail

getReader

@Deprecated
public IndexReader getReader()
                      throws IOException
Deprecated. Please use IndexReader.open(IndexWriter,boolean) instead.

Expert: returns a readonly reader, covering all committed as well as un-committed changes to the index. This provides "near real-time" searching, in that changes made during an IndexWriter session can be quickly made available for searching without closing the writer nor calling commit().

Note that this is functionally equivalent to calling {#flush} and then using IndexReader.open(org.apache.lucene.store.Directory) to open a new reader. But the turarnound time of this method should be faster since it avoids the potentially costly commit().

You must close the IndexReader returned by this method once you are done using it.

It's near real-time because there is no hard guarantee on how quickly you can get a new reader after making changes with IndexWriter. You'll have to experiment in your situation to determine if it's fast enough. As this is a new and experimental feature, please report back on your findings so we can learn, improve and iterate.

The resulting reader supports IndexReader.reopen(), but that call will simply forward back to this method (though this may change in the future).

The very first time this method is called, this writer instance will make every effort to pool the readers that it opens for doing merges, applying deletes, etc. This means additional resources (RAM, file descriptors, CPU time) will be consumed.

For lower latency on reopening a reader, you should call setMergedSegmentWarmer(org.apache.lucene.index.IndexWriter.IndexReaderWarmer) to pre-warm a newly merged segment before it's committed to the index. This is important for minimizing index-to-search delay after a large merge.

If an addIndexes* call is running in another thread, then this reader will only search those segments from the foreign index that have been successfully copied over, so far

.

NOTE: Once the writer is closed, any outstanding readers may continue to be used. However, if you attempt to reopen any of those readers, you'll hit an AlreadyClosedException.

Returns:
IndexReader that covers entire index plus all changes made so far by this IndexWriter instance
Throws:
IOException
WARNING: This API is experimental and might change in incompatible ways in the next release.

getReader

@Deprecated
public IndexReader getReader(int termInfosIndexDivisor)
                      throws IOException
Deprecated. Please use IndexReader.open(IndexWriter,boolean) instead. Furthermore, this method cannot guarantee the reader (and its sub-readers) will be opened with the termInfosIndexDivisor setting because some of them may have already been opened according to IndexWriterConfig.setReaderTermsIndexDivisor(int). You should set the requested termInfosIndexDivisor through IndexWriterConfig.setReaderTermsIndexDivisor(int) and use getReader().

Expert: like getReader(), except you can specify which termInfosIndexDivisor should be used for any newly opened readers.

Parameters:
termInfosIndexDivisor - Subsamples which indexed terms are loaded into RAM. This has the same effect as setTermIndexInterval(int) except that setting must be done at indexing time while this setting can be set per reader. When set to N, then one in every N*termIndexInterval terms in the index is loaded into memory. By setting this to a value > 1 you can reduce memory usage, at the expense of higher latency when loading a TermInfo. The default value is 1. Set this to -1 to skip loading the terms index entirely.
Throws:
IOException

numDeletedDocs

public int numDeletedDocs(SegmentInfo info)
                   throws IOException
Obtain the number of deleted docs for a pooled reader. If the reader isn't being pooled, the segmentInfo's delCount is returned.

Throws:
IOException

ensureOpen

protected final void ensureOpen(boolean includePendingClose)
                         throws AlreadyClosedException
Used internally to throw an AlreadyClosedException if this IndexWriter has been closed.

Throws:
AlreadyClosedException - if this IndexWriter is closed

ensureOpen

protected final void ensureOpen()
                         throws AlreadyClosedException
Throws:
AlreadyClosedException

message

public void message(String message)
Prints a message to the infoStream (if non-null), prefixed with the identifying information for this writer and the thread that's calling it.

getUseCompoundFile

@Deprecated
public boolean getUseCompoundFile()
Deprecated. use LogMergePolicy.getUseCompoundFile()

Get the current setting of whether newly flushed segments will use the compound file format. Note that this just returns the value previously set with setUseCompoundFile(boolean), or the default value (true). You cannot use this to query the status of previously flushed segments.

Note that this method is a convenience method: it just calls mergePolicy.getUseCompoundFile as long as mergePolicy is an instance of LogMergePolicy. Otherwise an IllegalArgumentException is thrown.

See Also:
setUseCompoundFile(boolean)

setUseCompoundFile

@Deprecated
public void setUseCompoundFile(boolean value)
Deprecated. use LogMergePolicy.setUseCompoundFile(boolean).

Setting to turn on usage of a compound file. When on, multiple files for each segment are merged into a single file when a new segment is flushed.

Note that this method is a convenience method: it just calls mergePolicy.setUseCompoundFile as long as mergePolicy is an instance of LogMergePolicy. Otherwise an IllegalArgumentException is thrown.

setSimilarity

@Deprecated
public void setSimilarity(Similarity similarity)
Deprecated. use IndexWriterConfig.setSimilarity(Similarity) instead

Expert: Set the Similarity implementation used by this IndexWriter.

See Also:
Similarity.setDefault(Similarity)

getSimilarity

@Deprecated
public Similarity getSimilarity()
Deprecated. use IndexWriterConfig.getSimilarity() instead

Expert: Return the Similarity implementation used by this IndexWriter.

This defaults to the current value of Similarity.getDefault().

setTermIndexInterval

@Deprecated
public void setTermIndexInterval(int interval)
Deprecated. use IndexWriterConfig.setTermIndexInterval(int)

Expert: Set the interval between indexed terms. Large values cause less memory to be used by IndexReader, but slow random-access to terms. Small values cause more memory to be used by an IndexReader, and speed random-access to terms. This parameter determines the amount of computation required per query term, regardless of the number of documents that contain that term. In particular, it is the maximum number of other terms that must be scanned before a term is located and its frequency and position information may be processed. In a large index with user-entered query terms, query processing time is likely to be dominated not by term lookup but rather by the processing of frequency and positional data. In a small index or when many uncommon query terms are generated (e.g., by wildcard queries) term lookup may become a dominant cost. In particular, numUniqueTerms/interval terms are read into memory by an IndexReader, and, on average, interval/2 terms must be scanned for each random term access.

See Also:
DEFAULT_TERM_INDEX_INTERVAL

getTermIndexInterval

@Deprecated
public int getTermIndexInterval()
Deprecated. use IndexWriterConfig.getTermIndexInterval()

Expert: Return the interval between indexed terms.

See Also:
setTermIndexInterval(int)

getConfig

public IndexWriterConfig getConfig()
Returns the private IndexWriterConfig, cloned from the IndexWriterConfig passed to IndexWriter(Directory, IndexWriterConfig).

NOTE: some settings may be changed on the returned IndexWriterConfig, and will take effect in the current IndexWriter instance. See the javadocs for the specific setters in IndexWriterConfig for details.

setMergePolicy

@Deprecated
public void setMergePolicy(MergePolicy mp)
Deprecated. use IndexWriterConfig.setMergePolicy(MergePolicy) instead.

Expert: set the merge policy used by this writer.

getMergePolicy

@Deprecated
public MergePolicy getMergePolicy()
Deprecated. use IndexWriterConfig.getMergePolicy() instead

Expert: returns the current MergePolicy in use by this writer.

See Also:
setMergePolicy(org.apache.lucene.index.MergePolicy)

setMergeScheduler

@Deprecated
public void setMergeScheduler(MergeScheduler mergeScheduler)
                       throws CorruptIndexException,
                              IOException
Deprecated. use IndexWriterConfig.setMergeScheduler(MergeScheduler) instead

Expert: set the merge scheduler used by this writer.

Throws:
CorruptIndexException
IOException

getMergeScheduler

@Deprecated
public MergeScheduler getMergeScheduler()
Deprecated. use IndexWriterConfig.getMergeScheduler() instead

Expert: returns the current MergeScheduler in use by this writer.

See Also:
setMergeScheduler(MergeScheduler)

setMaxMergeDocs

@Deprecated
public void setMaxMergeDocs(int maxMergeDocs)
Deprecated. use LogMergePolicy.setMaxMergeDocs(int) directly.

Determines the largest segment (measured by document count) that may be merged with other segments. Small values (e.g., less than 10,000) are best for interactive indexing, as this limits the length of pauses while indexing to a few seconds. Larger values are best for batched indexing and speedier searches.

The default value is Integer.MAX_VALUE.

Note that this method is a convenience method: it just calls mergePolicy.setMaxMergeDocs as long as mergePolicy is an instance of LogMergePolicy. Otherwise an IllegalArgumentException is thrown.

The default merge policy (LogByteSizeMergePolicy) also allows you to set this limit by net size (in MB) of the segment, using LogByteSizeMergePolicy.setMaxMergeMB(double).

getMaxMergeDocs

@Deprecated
public int getMaxMergeDocs()
Deprecated. use LogMergePolicy.getMaxMergeDocs() directly.

Returns the largest segment (measured by document count) that may be merged with other segments.

Note that this method is a convenience method: it just calls mergePolicy.getMaxMergeDocs as long as mergePolicy is an instance of LogMergePolicy. Otherwise an IllegalArgumentException is thrown.

See Also:
setMaxMergeDocs(int)

setMaxFieldLength

@Deprecated
public void setMaxFieldLength(int maxFieldLength)
Deprecated. use LimitTokenCountAnalyzer instead. Note that the behvaior slightly changed - the analyzer limits the number of tokens per token stream created, while this setting limits the total number of tokens to index. This only matters if you index many multi-valued fields though.

The maximum number of terms that will be indexed for a single field in a document. This limits the amount of memory required for indexing, so that collections with very large files will not crash the indexing process by running out of memory. This setting refers to the number of running terms, not to the number of different terms.

Note: this silently truncates large documents, excluding from the index all terms that occur further in the document. If you know your source documents are large, be sure to set this value high enough to accomodate the expected size. If you set it to Integer.MAX_VALUE, then the only limit is your memory, but you should anticipate an OutOfMemoryError.

By default, no more than DEFAULT_MAX_FIELD_LENGTH terms will be indexed for a field.

getMaxFieldLength

@Deprecated
public int getMaxFieldLength()
Deprecated. use LimitTokenCountAnalyzer to limit number of tokens.

Returns the maximum number of terms that will be indexed for a single field in a document.

See Also:
setMaxFieldLength(int)

setReaderTermsIndexDivisor

@Deprecated
public void setReaderTermsIndexDivisor(int divisor)
Deprecated. use IndexWriterConfig.setReaderTermsIndexDivisor(int) instead.

getReaderTermsIndexDivisor

@Deprecated
public int getReaderTermsIndexDivisor()
Deprecated. use IndexWriterConfig.getReaderTermsIndexDivisor() instead.

setMaxBufferedDocs

@Deprecated
public void setMaxBufferedDocs(int maxBufferedDocs)
Deprecated. use IndexWriterConfig.setMaxBufferedDocs(int) instead.

Determines the minimal number of documents required before the buffered in-memory documents are flushed as a new Segment. Large values generally gives faster indexing.

When this is set, the writer will flush every maxBufferedDocs added documents. Pass in DISABLE_AUTO_FLUSH to prevent triggering a flush due to number of buffered documents. Note that if flushing by RAM usage is also enabled, then the flush will be triggered by whichever comes first.

Disabled by default (writer flushes by RAM usage).

Throws:
IllegalArgumentException - if maxBufferedDocs is enabled but smaller than 2, or it disables maxBufferedDocs when ramBufferSize is already disabled
See Also:
setRAMBufferSizeMB(double)

getMaxBufferedDocs

@Deprecated
public int getMaxBufferedDocs()
Deprecated. use IndexWriterConfig.getMaxBufferedDocs() instead.

Returns the number of buffered added documents that will trigger a flush if enabled.

See Also:
setMaxBufferedDocs(int)

setRAMBufferSizeMB

@Deprecated
public void setRAMBufferSizeMB(double mb)
Deprecated. use IndexWriterConfig.setRAMBufferSizeMB(double) instead.

Determines the amount of RAM that may be used for buffering added documents and deletions before they are flushed to the Directory. Generally for faster indexing performance it's best to flush by RAM usage instead of document count and use as large a RAM buffer as you can.

When this is set, the writer will flush whenever buffered documents and deletions use this much RAM. Pass in DISABLE_AUTO_FLUSH to prevent triggering a flush due to RAM usage. Note that if flushing by document count is also enabled, then the flush will be triggered by whichever comes first.

NOTE: the account of RAM usage for pending deletions is only approximate. Specifically, if you delete by Query, Lucene currently has no way to measure the RAM usage if individual Queries so the accounting will under-estimate and you should compensate by either calling commit() periodically yourself, or by using setMaxBufferedDeleteTerms(int) to flush by count instead of RAM usage (each buffered delete Query counts as one).

NOTE: because IndexWriter uses ints when managing its internal storage, the absolute maximum value for this setting is somewhat less than 2048 MB. The precise limit depends on various factors, such as how large your documents are, how many fields have norms, etc., so it's best to set this value comfortably under 2048.

The default value is DEFAULT_RAM_BUFFER_SIZE_MB.

Throws:
IllegalArgumentException - if ramBufferSize is enabled but non-positive, or it disables ramBufferSize when maxBufferedDocs is already disabled

getRAMBufferSizeMB

@Deprecated
public double getRAMBufferSizeMB()
Deprecated. use IndexWriterConfig.getRAMBufferSizeMB() instead.

Returns the value set by setRAMBufferSizeMB(double) if enabled.

setMaxBufferedDeleteTerms

@Deprecated
public void setMaxBufferedDeleteTerms(int maxBufferedDeleteTerms)
Deprecated. use IndexWriterConfig.setMaxBufferedDeleteTerms(int) instead.

Determines the minimal number of delete terms required before the buffered in-memory delete terms are applied and flushed. If there are documents buffered in memory at the time, they are merged and a new segment is created.

Disabled by default (writer flushes by RAM usage).

Throws:
IllegalArgumentException - if maxBufferedDeleteTerms is enabled but smaller than 1
See Also:
setRAMBufferSizeMB(double)

getMaxBufferedDeleteTerms

@Deprecated
public int getMaxBufferedDeleteTerms()
Deprecated. use IndexWriterConfig.getMaxBufferedDeleteTerms() instead

Returns the number of buffered deleted terms that will trigger a flush if enabled.

See Also:
setMaxBufferedDeleteTerms(int)

setMergeFactor

@Deprecated
public void setMergeFactor(int mergeFactor)
Deprecated. use LogMergePolicy.setMergeFactor(int) directly.

Determines how often segment indices are merged by addDocument(). With smaller values, less RAM is used while indexing, and searches on unoptimized indices are faster, but indexing speed is slower. With larger values, more RAM is used during indexing, and while searches on unoptimized indices are slower, indexing is faster. Thus larger values (> 10) are best for batch index creation, and smaller values (< 10) for indices that are interactively maintained.

Note that this method is a convenience method: it just calls mergePolicy.setMergeFactor as long as mergePolicy is an instance of LogMergePolicy. Otherwise an IllegalArgumentException is thrown.

This must never be less than 2. The default value is 10.

getMergeFactor

@Deprecated
public int getMergeFactor()
Deprecated. use LogMergePolicy.getMergeFactor() directly.

Returns the number of segments that are merged at once and also controls the total number of segments allowed to accumulate in the index.

Note that this method is a convenience method: it just calls mergePolicy.getMergeFactor as long as mergePolicy is an instance of LogMergePolicy. Otherwise an IllegalArgumentException is thrown.

See Also:
setMergeFactor(int)

setDefaultInfoStream

public static void setDefaultInfoStream(PrintStream infoStream)
If non-null, this will be the default infoStream used by a newly instantiated IndexWriter.

See Also:
setInfoStream(java.io.PrintStream)

getDefaultInfoStream

public static PrintStream getDefaultInfoStream()
Returns the current default infoStream for newly instantiated IndexWriters.

See Also:
setDefaultInfoStream(java.io.PrintStream)

setInfoStream

public void setInfoStream(PrintStream infoStream)
                   throws IOException
If non-null, information about merges, deletes and a message when maxFieldLength is reached will be printed to this.

Throws:
IOException

getInfoStream

public PrintStream getInfoStream()
Returns the current infoStream in use by this writer.

See Also:
setInfoStream(java.io.PrintStream)

verbose

public boolean verbose()
Returns true if verbosing is enabled (i.e., infoStream != null).

setWriteLockTimeout

@Deprecated
public void setWriteLockTimeout(long writeLockTimeout)
Deprecated. use IndexWriterConfig.setWriteLockTimeout(long) instead

Sets the maximum time to wait for a write lock (in milliseconds) for this instance of IndexWriter. @see

See Also:
to change the default value for all instances of IndexWriter.

getWriteLockTimeout

@Deprecated
public long getWriteLockTimeout()
Deprecated. use IndexWriterConfig.getWriteLockTimeout()

Returns allowed timeout when acquiring the write lock.

See Also:
setWriteLockTimeout(long)

setDefaultWriteLockTimeout

@Deprecated
public static void setDefaultWriteLockTimeout(long writeLockTimeout)
Deprecated. use IndexWriterConfig.setDefaultWriteLockTimeout(long) instead

Sets the default (for any instance of IndexWriter) maximum time to wait for a write lock (in milliseconds).

getDefaultWriteLockTimeout

@Deprecated
public static long getDefaultWriteLockTimeout()
Deprecated. use IndexWriterConfig.getDefaultWriteLockTimeout() instead

Returns default write lock timeout for newly instantiated IndexWriters.

See Also:
setDefaultWriteLockTimeout(long)

close

public void close()
           throws CorruptIndexException,
                  IOException
Commits all changes to an index and closes all associated files. Note that this may be a costly operation, so, try to re-use a single writer instead of closing and opening a new one. See commit() for caveats about write caching done by some IO devices.

If an Exception is hit during close, eg due to disk full or some other reason, then both the on-disk index and the internal state of the IndexWriter instance will be consistent. However, the close will not be complete even though part of it (flushing buffered documents) may have succeeded, so the write lock will still be held.

If you can correct the underlying cause (eg free up some disk space) then you can call close() again. Failing that, if you want to force the write lock to be released (dangerous, because you may then lose buffered docs in the IndexWriter instance) then you can do something like this:

 try {
   writer.close();
 } finally {
   if (IndexWriter.isLocked(directory)) {
     IndexWriter.unlock(directory);
   }
 }
after which, you must be certain not to use the writer instance anymore.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer, again. See above for details.

Specified by:
close in interface Closeable
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

close

public void close(boolean waitForMerges)
           throws CorruptIndexException,
                  IOException
Closes the index with or without waiting for currently running merges to finish. This is only meaningful when using a MergeScheduler that runs merges in background threads.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer, again. See above for details.

NOTE: it is dangerous to always call close(false), especially when IndexWriter is not open for very long, because this can result in "merge starvation" whereby long merges will never have a chance to finish. This will cause too many segments in your index over time.

Parameters:
waitForMerges - if true, this call will block until all merges complete; else, it will ask all running merges to abort, wait until those merges have finished (which should be at most a few seconds), and then return.
Throws:
CorruptIndexException
IOException

getDirectory

public Directory getDirectory()
Returns the Directory used by this index.

getAnalyzer

public Analyzer getAnalyzer()
Returns the analyzer used by this index.

maxDoc

public int maxDoc()
Returns total number of docs in this index, including docs not yet flushed (still in the RAM buffer), not counting deletions.

See Also:
numDocs()

numDocs

public int numDocs()
            throws IOException
Returns total number of docs in this index, including docs not yet flushed (still in the RAM buffer), and including deletions. NOTE: buffered deletions are not counted. If you really need these to be counted you should call commit() first.

Throws:
IOException
See Also:
numDocs()

hasDeletions

public boolean hasDeletions()
                     throws IOException
Throws:
IOException

addDocument

public void addDocument(Document doc)
                 throws CorruptIndexException,
                        IOException
Adds a document to this index. If the document contains more than setMaxFieldLength(int) terms for a given field, the remainder are discarded.

Note that if an Exception is hit (for example disk full) then the index will be consistent, but this document may not have been added. Furthermore, it's possible the index will have one segment in non-compound format even when using compound files (when a merge has partially succeeded).

This method periodically flushes pending documents to the Directory (see above), and also periodically triggers segment merges in the index according to the MergePolicy in use.

Merges temporarily consume space in the directory. The amount of space required is up to 1X the size of all segments being merged, when no readers/searchers are open against the index, and up to 2X the size of all segments being merged when readers/searchers are open against the index (see forceMerge(int) for details). The sequence of primitive merge operations performed is governed by the merge policy.

Note that each term in the document can be no longer than 16383 characters, otherwise an IllegalArgumentException will be thrown.

Note that it's possible to create an invalid Unicode string in java if a UTF16 surrogate pair is malformed. In this case, the invalid characters are silently replaced with the Unicode replacement character U+FFFD.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

addDocument

public void addDocument(Document doc,
                        Analyzer analyzer)
                 throws CorruptIndexException,
                        IOException
Adds a document to this index, using the provided analyzer instead of the value of getAnalyzer(). If the document contains more than setMaxFieldLength(int) terms for a given field, the remainder are discarded.

See addDocument(Document) for details on index and IndexWriter state after an Exception, and flushing/merging temporary free space requirements.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

addDocuments

public void addDocuments(Collection<Document> docs)
                  throws CorruptIndexException,
                         IOException
Atomically adds a block of documents with sequentially assigned document IDs, such that an external reader will see all or none of the documents.

WARNING: the index does not currently record which documents were added as a block. Today this is fine, because merging will preserve a block. The order of documents within a segment will be preserved, even when child documents within a block are deleted. Most search features (like result grouping and block joining) require you to mark documents; when these documents are deleted these search features will not work as expected. Obviously adding documents to an existing block will require you the reindex the entire block.

However it's possible that in the future Lucene may merge more aggressively re-order documents (for example, perhaps to obtain better index compression), in which case you may need to fully re-index your documents at that time.

See addDocument(Document) for details on index and IndexWriter state after an Exception, and flushing/merging temporary free space requirements.

NOTE: tools that do offline splitting of an index (for example, IndexSplitter in contrib) or re-sorting of documents (for example, IndexSorter in contrib) are not aware of these atomically added documents and will likely break them up. Use such tools at your own risk!

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
WARNING: This API is experimental and might change in incompatible ways in the next release.

addDocuments

public void addDocuments(Collection<Document> docs,
                         Analyzer analyzer)
                  throws CorruptIndexException,
                         IOException
Atomically adds a block of documents, analyzed using the provided analyzer, with sequentially assigned document IDs, such that an external reader will see all or none of the documents.

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
WARNING: This API is experimental and might change in incompatible ways in the next release.

updateDocuments

public void updateDocuments(Term delTerm,
                            Collection<Document> docs)
                     throws CorruptIndexException,
                            IOException
Atomically deletes documents matching the provided delTerm and adds a block of documents with sequentially assigned document IDs, such that an external reader will see all or none of the documents. See addDocuments(Collection).

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
WARNING: This API is experimental and might change in incompatible ways in the next release.

updateDocuments

public void updateDocuments(Term delTerm,
                            Collection<Document> docs,
                            Analyzer analyzer)
                     throws CorruptIndexException,
                            IOException
Atomically deletes documents matching the provided delTerm and adds a block of documents, analyzed using the provided analyzer, with sequentially assigned document IDs, such that an external reader will see all or none of the documents. See addDocuments(Collection).

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
WARNING: This API is experimental and might change in incompatible ways in the next release.

deleteDocuments

public void deleteDocuments(Term term)
                     throws CorruptIndexException,
                            IOException
Deletes the document(s) containing term.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Parameters:
term - the term to identify the documents to be deleted
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

deleteDocuments

public void deleteDocuments(Term... terms)
                     throws CorruptIndexException,
                            IOException
Deletes the document(s) containing any of the terms. All deletes are flushed at the same time.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Parameters:
terms - array of terms to identify the documents to be deleted
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

deleteDocuments

public void deleteDocuments(Query query)
                     throws CorruptIndexException,
                            IOException
Deletes the document(s) matching the provided query.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Parameters:
query - the query to identify the documents to be deleted
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

deleteDocuments

public void deleteDocuments(Query... queries)
                     throws CorruptIndexException,
                            IOException
Deletes the document(s) matching any of the provided queries. All deletes are flushed at the same time.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Parameters:
queries - array of queries to identify the documents to be deleted
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

updateDocument

public void updateDocument(Term term,
                           Document doc)
                    throws CorruptIndexException,
                           IOException
Updates a document by first deleting the document(s) containing term and then adding the new document. The delete and then add are atomic as seen by a reader on the same index (flush may happen only after the add).

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Parameters:
term - the term to identify the document(s) to be deleted
doc - the document to be added
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

updateDocument

public void updateDocument(Term term,
                           Document doc,
                           Analyzer analyzer)
                    throws CorruptIndexException,
                           IOException
Updates a document by first deleting the document(s) containing term and then adding the new document. The delete and then add are atomic as seen by a reader on the same index (flush may happen only after the add).

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Parameters:
term - the term to identify the document(s) to be deleted
doc - the document to be added
analyzer - the analyzer to use when analyzing the document
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

optimize

@Deprecated
public void optimize()
              throws CorruptIndexException,
                     IOException
Deprecated.

This method has been deprecated, as it is horribly inefficient and very rarely justified. Lucene's multi-segment search performance has improved over time, and the default TieredMergePolicy now targets segments with deletions.

Throws:
CorruptIndexException
IOException

optimize

@Deprecated
public void optimize(int maxNumSegments)
              throws CorruptIndexException,
                     IOException
Deprecated.

This method has been deprecated, as it is horribly inefficient and very rarely justified. Lucene's multi-segment search performance has improved over time, and the default TieredMergePolicy now targets segments with deletions.

Throws:
CorruptIndexException
IOException

optimize

@Deprecated
public void optimize(boolean doWait)
              throws CorruptIndexException,
                     IOException
Deprecated.

This method has been deprecated, as it is horribly inefficient and very rarely justified. Lucene's multi-segment search performance has improved over time, and the default TieredMergePolicy now targets segments with deletions.

Throws:
CorruptIndexException
IOException

forceMerge

public void forceMerge(int maxNumSegments)
                throws CorruptIndexException,
                       IOException
Forces merge policy to merge segments until there's <= maxNumSegments. The actual merges to be executed are determined by the MergePolicy.

This is a horribly costly operation, especially when you pass a small maxNumSegments; usually you should only call this if the index is static (will no longer be changed).

Note that this requires up to 2X the index size free space in your Directory (3X if you're using compound file format). For example, if your index size is 10 MB then you need up to 20 MB free for this to complete (30 MB if you're using compound file format). Also, it's best to call commit() afterwards, to allow IndexWriter to free up disk space.

If some but not all readers re-open while merging is underway, this will cause > 2X temporary space to be consumed as those new readers will then hold open the temporary segments at that time. It is best not to re-open readers while merging is running.

The actual temporary usage could be much less than these figures (it depends on many factors).

In general, once the this completes, the total size of the index will be less than the size of the starting index. It could be quite a bit smaller (if there were many pending deletes) or just slightly smaller.

If an Exception is hit, for example due to disk full, the index will not be corrupt and no documents will have been lost. However, it may have been partially merged (some segments were merged but not all), and it's possible that one of the segments in the index will be in non-compound format even when using compound file format. This will occur when the Exception is hit during conversion of the segment into compound format.

This call will merge those segments present in the index when the call started. If other threads are still adding documents and flushing segments, those newly created segments will not be merged unless you call forceMerge again.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

NOTE: if you call close(boolean) with false, which aborts all running merges, then any thread still running this method might hit a MergePolicy.MergeAbortedException.

Parameters:
maxNumSegments - maximum number of segments left in the index after merging finishes
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
MergePolicy.findMerges(org.apache.lucene.index.SegmentInfos)

forceMerge

public void forceMerge(int maxNumSegments,
                       boolean doWait)
                throws CorruptIndexException,
                       IOException
Just like forceMerge(int), except you can specify whether the call should block until all merging completes. This is only meaningful with a MergeScheduler that is able to run merges in background threads.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Throws:
CorruptIndexException
IOException

expungeDeletes

@Deprecated
public void expungeDeletes(boolean doWait)
                    throws CorruptIndexException,
                           IOException
Deprecated.

This method has been deprecated, as it is horribly inefficient and very rarely justified. Lucene's multi-segment search performance has improved over time, and the default TieredMergePolicy now targets segments with deletions.

Throws:
CorruptIndexException
IOException

forceMergeDeletes

public void forceMergeDeletes(boolean doWait)
                       throws CorruptIndexException,
                              IOException
Just like forceMergeDeletes(), except you can specify whether the call should block until the operation completes. This is only meaningful with a MergeScheduler that is able to run merges in background threads.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

NOTE: if you call close(boolean) with false, which aborts all running merges, then any thread still running this method might hit a MergePolicy.MergeAbortedException.

Throws:
CorruptIndexException
IOException

expungeDeletes

@Deprecated
public void expungeDeletes()
                    throws CorruptIndexException,
                           IOException
Deprecated.

This method has been deprecated, as it is horribly inefficient and very rarely justified. Lucene's multi-segment search performance has improved over time, and the default TieredMergePolicy now targets segments with deletions.

Throws:
CorruptIndexException
IOException

forceMergeDeletes

public void forceMergeDeletes()
                       throws CorruptIndexException,
                              IOException
Forces merging of all segments that have deleted documents. The actual merges to be executed are determined by the MergePolicy. For example, the default TieredMergePolicy will only pick a segment if the percentage of deleted docs is over 10%.

This is often a horribly costly operation; rarely is it warranted.

To see how many deletions you have pending in your index, call IndexReader.numDeletedDocs().

NOTE: this method first flushes a new segment (if there are indexed documents), and applies all buffered deletes.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Throws:
CorruptIndexException
IOException

maybeMerge

public final void maybeMerge()
                      throws CorruptIndexException,
                             IOException
Expert: asks the mergePolicy whether any merges are necessary now and if so, runs the requested merges and then iterate (test again if merges are needed) until no more merges are returned by the mergePolicy. Explicit calls to maybeMerge() are usually not necessary. The most common case is when merge policy parameters have changed.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Throws:
CorruptIndexException
IOException

getMergingSegments

public Collection<SegmentInfo> getMergingSegments()
Expert: to be used by a MergePolicy to avoid selecting merges for segments already being merged. The returned collection is not cloned, and thus is only safe to access if you hold IndexWriter's lock (which you do when IndexWriter invokes the MergePolicy).

Do not alter the returned collection!

getNextMerge

public MergePolicy.OneMerge getNextMerge()
Expert: the MergeScheduler calls this method to retrieve the next merge requested by the MergePolicy

WARNING: This API is experimental and might change in incompatible ways in the next release.

rollback

public void rollback()
              throws IOException
Close the IndexWriter without committing any changes that have occurred since the last commit (or since it was opened, if commit hasn't been called). This removes any temporary files that had been created, after which the state of the index will be the same as it was when commit() was last called or when this writer was first opened. This also clears a previous call to prepareCommit().

Specified by:
rollback in interface TwoPhaseCommit
Throws:
IOException - if there is a low-level IO error

deleteAll

public void deleteAll()
               throws IOException
Delete all documents in the index.

This method will drop all buffered documents and will remove all segments from the index. This change will not be visible until a commit() has been called. This method can be rolled back using rollback().

NOTE: this method is much faster than using deleteDocuments( new MatchAllDocsQuery() ).

NOTE: this method will forcefully abort all merges in progress. If other threads are running forceMerge(int), addIndexes(IndexReader[]) or forceMergeDeletes(boolean) methods, they may receive MergePolicy.MergeAbortedExceptions.

Throws:
IOException

waitForMerges

public void waitForMerges()
Wait for any currently outstanding merges to finish.

It is guaranteed that any merges started prior to calling this method will have completed once this method completes.

addIndexesNoOptimize

@Deprecated
public void addIndexesNoOptimize(Directory... dirs)
                          throws CorruptIndexException,
                                 IOException
Deprecated. use addIndexes(Directory...) instead

Throws:
CorruptIndexException
IOException

addIndexes

public void addIndexes(Directory... dirs)
                throws CorruptIndexException,
                       IOException
Adds all segments from an array of indexes into this index.

This may be used to parallelize batch indexing. A large document collection can be broken into sub-collections. Each sub-collection can be indexed in parallel, on a different thread, process or machine. The complete index can then be created by merging sub-collection indexes with this method.

NOTE: the index in each Directory must not be changed (opened by a writer) while this method is running. This method does not acquire a write lock in each input Directory, so it is up to the caller to enforce this.

This method is transactional in how Exceptions are handled: it does not commit a new segments_N file until all indexes are added. This means if an Exception occurs (for example disk full), then either no indexes will have been added or they all will have been.

Note that this requires temporary free space in the Directory up to 2X the sum of all input indexes (including the starting index). If readers/searchers are open against the starting index, then temporary free space required will be higher by the size of the starting index (see forceMerge(int) for details).

NOTE: this method only copies the segments of the incomning indexes and does not merge them. Therefore deleted documents are not removed and the new segments are not merged with the existing ones.

This requires this index not be among those to be added.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

addIndexes

public void addIndexes(IndexReader... readers)
                throws CorruptIndexException,
                       IOException
Merges the provided indexes into this index. This method is useful if you use extensions of IndexReader. Otherwise, using addIndexes(Directory...) is highly recommended for performance reasons. It uses the MergeScheduler and MergePolicy set on this writer, which may perform merges in parallel.

The provided IndexReaders are not closed.

NOTE: this method does not merge the current segments, only the incoming ones.

See addIndexes(Directory...) for details on transactional semantics, temporary free space required in the Directory, and non-CFS segments on an Exception.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

NOTE: if you call close(boolean) with false, which aborts all running merges, then any thread still running this method might hit a MergePolicy.MergeAbortedException.

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

doAfterFlush

protected void doAfterFlush()
                     throws IOException
A hook for extending classes to execute operations after pending added and deleted documents have been flushed to the Directory but before the change is committed (new segments_N file written).

Throws:
IOException

doBeforeFlush

protected void doBeforeFlush()
                      throws IOException
A hook for extending classes to execute operations before pending added and deleted documents are flushed to the Directory.

Throws:
IOException

prepareCommit

public final void prepareCommit()
                         throws CorruptIndexException,
                                IOException
Expert: prepare for commit.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Specified by:
prepareCommit in interface TwoPhaseCommit
Throws:
CorruptIndexException
IOException
See Also:
prepareCommit(Map)

prepareCommit

public final void prepareCommit(Map<String,String> commitUserData)
                         throws CorruptIndexException,
                                IOException

Expert: prepare for commit, specifying commitUserData Map (String -> String). This does the first phase of 2-phase commit. This method does all steps necessary to commit changes since this writer was opened: flushes pending added and deleted docs, syncs the index files, writes most of next segments_N file. After calling this you must call either commit() to finish the commit, or rollback() to revert the commit and undo all changes done since the writer was opened.

You can also just call commit(Map) directly without prepareCommit first in which case that method will internally call prepareCommit.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Specified by:
prepareCommit in interface TwoPhaseCommit
Parameters:
commitUserData - Opaque Map (String->String) that's recorded into the segments file in the index, and retrievable by IndexCommit.getUserData(). Note that when IndexWriter commits itself during close(), the commitUserData is unchanged (just carried over from the prior commit). If this is null then the previous commitUserData is kept. Also, the commitUserData will only "stick" if there are actually changes in the index to commit.
Throws:
CorruptIndexException
IOException
See Also:
TwoPhaseCommit.prepareCommit()

commit

public final void commit()
                  throws CorruptIndexException,
                         IOException

Commits all pending changes (added & deleted documents, segment merges, added indexes, etc.) to the index, and syncs all referenced index files, such that a reader will see the changes and the index updates will survive an OS or machine crash or power loss. Note that this does not wait for any running background merges to finish. This may be a costly operation, so you should test the cost in your application and do it only when really necessary.

Note that this operation calls Directory.sync on the index files. That call should not return until the file contents & metadata are on stable storage. For FSDirectory, this calls the OS's fsync. But, beware: some hardware devices may in fact cache writes even during fsync, and return before the bits are actually on stable storage, to give the appearance of faster performance. If you have such a device, and it does not have a battery backup (for example) then on power loss it may still lose data. Lucene cannot guarantee consistency on such devices.

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Specified by:
commit in interface TwoPhaseCommit
Throws:
CorruptIndexException
IOException
See Also:
prepareCommit(), commit(Map)

commit

public final void commit(Map<String,String> commitUserData)
                  throws CorruptIndexException,
                         IOException
Commits all changes to the index, specifying a commitUserData Map (String -> String). This just calls prepareCommit(Map) (if you didn't already call it) and then finishCommit().

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Specified by:
commit in interface TwoPhaseCommit
Throws:
CorruptIndexException
IOException
See Also:
TwoPhaseCommit.commit(), TwoPhaseCommit.prepareCommit(Map)

flush

protected final void flush(boolean triggerMerge,
                           boolean flushDocStores,
                           boolean flushDeletes)
                    throws CorruptIndexException,
                           IOException
NOTE: flushDocStores is ignored now (hardwired to true); this method is only here for backwards compatibility

Throws:
CorruptIndexException
IOException

flush

protected final void flush(boolean triggerMerge,
                           boolean applyAllDeletes)
                    throws CorruptIndexException,
                           IOException
Flush all in-memory buffered updates (adds and deletes) to the Directory.

Parameters:
triggerMerge - if true, we may merge segments (if deletes or docs were flushed) if necessary
applyAllDeletes - whether pending deletes should also
Throws:
CorruptIndexException
IOException

ramSizeInBytes

public final long ramSizeInBytes()
Expert: Return the total size of all index files currently cached in memory. Useful for size management with flushRamDocs()

numRamDocs

public final int numRamDocs()
Expert: Return the number of documents currently buffered in RAM.

merge

public void merge(MergePolicy.OneMerge merge)
           throws CorruptIndexException,
                  IOException
Merges the indicated segments, replacing them in the stack with a single segment.

Throws:
CorruptIndexException
IOException
WARNING: This API is experimental and might change in incompatible ways in the next release.

segString

public String segString()
                 throws IOException
Throws:
IOException
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

segString

public String segString(Iterable<SegmentInfo> infos)
                 throws IOException
Throws:
IOException
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

segString

public String segString(SegmentInfo info)
                 throws IOException
Throws:
IOException
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

isLocked

public static boolean isLocked(Directory directory)
                        throws IOException
Returns true iff the index in the named directory is currently locked.

Parameters:
directory - the directory to check for a lock
Throws:
IOException - if there is a low-level IO error

unlock

public static void unlock(Directory directory)
                   throws IOException
Forcibly unlocks the index in the named directory.

Caution: this should only be used by failure recovery code, when it is known that no other process nor thread is in fact currently accessing this index.

Throws:
IOException

setMergedSegmentWarmer

@Deprecated
public void setMergedSegmentWarmer(IndexWriter.IndexReaderWarmer warmer)
Deprecated. use IndexWriterConfig.setMergedSegmentWarmer(org.apache.lucene.index.IndexWriter.IndexReaderWarmer) instead.

Set the merged segment warmer. See IndexWriter.IndexReaderWarmer.

getMergedSegmentWarmer

@Deprecated
public IndexWriter.IndexReaderWarmer getMergedSegmentWarmer()
Deprecated. use IndexWriterConfig.getMergedSegmentWarmer() instead.

Returns the current merged segment warmer. See IndexWriter.IndexReaderWarmer.

deleteUnusedFiles

public void deleteUnusedFiles()
                       throws IOException
Expert: remove any index files that are no longer used.

IndexWriter normally deletes unused files itself, during indexing. However, on Windows, which disallows deletion of open files, if there is a reader open on the index then those files cannot be deleted. This is fine, because IndexWriter will periodically retry the deletion.

However, IndexWriter doesn't try that often: only on open, close, flushing a new segment, and finishing a merge. If you don't do any of these actions with your IndexWriter, you'll see the unused files linger. If that's a problem, call this method to delete them (once you've closed the open readers that were preventing their deletion).

In addition, you can call this method to delete unreferenced index commits. This might be useful if you are using an IndexDeletionPolicy which holds onto index commits until some criteria are met, but those commits are no longer needed. Otherwise, those commits will be deleted the next time commit() is called.

Throws:
IOException

setPayloadProcessorProvider

public void setPayloadProcessorProvider(PayloadProcessorProvider pcp)
Sets the PayloadProcessorProvider to use when merging payloads. Note that the given pcp will be invoked for every segment that is merged, not only external ones that are given through addIndexes(org.apache.lucene.store.Directory...). If you want only the payloads of the external segments to be processed, you can return null whenever a PayloadProcessorProvider.ReaderPayloadProcessor is requested for the Directory of the IndexWriter.

The default is null which means payloads are processed normally (copied) during segment merges. You can also unset it by passing null.

NOTE: the set PayloadProcessorProvider will be in effect immediately, potentially for already running merges too. If you want to be sure it is used for further operations only, such as addIndexes(org.apache.lucene.store.Directory...) or forceMerge(int), you can call waitForMerges() before.

getPayloadProcessorProvider

public PayloadProcessorProvider getPayloadProcessorProvider()
Returns the PayloadProcessorProvider that is used during segment merges to process payloads.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexWriter.IndexReaderWarmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class IndexWriter.IndexReaderWarmer

java.lang.Object
    extended by  org.apache.lucene.index.IndexWriter.IndexReaderWarmer
Enclosing class:
IndexWriter
public abstract static class IndexWriter.IndexReaderWarmer
extends Object

If IndexWriter.getReader() has been called (ie, this writer is in near real-time mode), then after a merge completes, this class can be invoked to warm the reader on the newly merged segment, before the merge commits. This is not required for near real-time search, but will reduce search latency on opening a new near real-time reader after a merge completes.

WARNING: This API is experimental and might change in incompatible ways in the next release.

NOTE: warm is called before any deletes have been carried over to the merged segment.

Constructor Summary
IndexWriter.IndexReaderWarmer()
Method Summary
abstract  void warm(IndexReader reader)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IndexWriter.IndexReaderWarmer

public IndexWriter.IndexReaderWarmer()
Method Detail

warm

public abstract void warm(IndexReader reader)
                   throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexWriter.MaxFieldLength

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class IndexWriter.MaxFieldLength

java.lang.Object
    extended by  org.apache.lucene.index.IndexWriter.MaxFieldLength
Enclosing class:
IndexWriter
Deprecated. use LimitTokenCountAnalyzer instead.

@Deprecated
public static final class IndexWriter.MaxFieldLength
extends Object

Specifies maximum field length (in number of tokens/terms) in IndexWriter constructors. IndexWriter.setMaxFieldLength(int) overrides the value set by the constructor.

Field Summary
static IndexWriter.MaxFieldLength | LIMITED Deprecated. Sets the maximum field length to IndexWriter.DEFAULT_MAX_FIELD_LENGTH
static IndexWriter.MaxFieldLength | UNLIMITED Deprecated. Sets the maximum field length to Integer.MAX_VALUE.
Constructor Summary
IndexWriter.MaxFieldLength(int limit)
Deprecated. Public constructor to allow users to specify the maximum field size limit.
Method Summary
int | getLimit() Deprecated.
String | toString() Deprecated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

UNLIMITED

public static final IndexWriter.MaxFieldLength UNLIMITED
Deprecated.
Sets the maximum field length to Integer.MAX_VALUE.

LIMITED

public static final IndexWriter.MaxFieldLength LIMITED
Deprecated.
Sets the maximum field length to IndexWriter.DEFAULT_MAX_FIELD_LENGTH

Constructor Detail

IndexWriter.MaxFieldLength

public IndexWriter.MaxFieldLength(int limit)
Deprecated.
Public constructor to allow users to specify the maximum field size limit.

Parameters:
limit - The maximum field length
Method Detail

getLimit

public int getLimit()
Deprecated.

toString

public String toString()
Deprecated.
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexWriterConfig

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class IndexWriterConfig

java.lang.Object
    extended by  org.apache.lucene.index.IndexWriterConfig
All Implemented Interfaces:
Cloneable
public final class IndexWriterConfig
extends Object
implements Cloneable

Holds all the configuration of IndexWriter. You should instantiate this class, call the setters to set your configuration, then pass it to IndexWriter. Note that IndexWriter makes a private clone; if you need to subsequently change settings use IndexWriter.getConfig().

All setter methods return IndexWriterConfig to allow chaining settings conveniently, for example:

 IndexWriterConfig conf = new IndexWriterConfig(analyzer);
 conf.setter1().setter2();

Since:
3.1

Nested Class Summary
static class IndexWriterConfig.OpenMode
Specifies the open mode for IndexWriter: IndexWriterConfig.OpenMode.CREATE - creates a new index or overwrites an existing one.
Field Summary
static int | DEFAULT_MAX_BUFFERED_DELETE_TERMS Disabled by default (because IndexWriter flushes by RAM usage by default).
static int | DEFAULT_MAX_BUFFERED_DOCS Disabled by default (because IndexWriter flushes by RAM usage by default).
static int | DEFAULT_MAX_THREAD_STATES The maximum number of simultaneous threads that may be indexing documents at once in IndexWriter; if more than this many threads arrive they will wait for others to finish.
static double | DEFAULT_RAM_BUFFER_SIZE_MB Default value is 16 MB (which means flush when buffered docs consume approximately 16 MB RAM).
static boolean | DEFAULT_READER_POOLING Default setting for setReaderPooling(boolean).
static int | DEFAULT_READER_TERMS_INDEX_DIVISOR Default value is 1.
static int | DEFAULT_TERM_INDEX_INTERVAL Default value is 128.
static int | DISABLE_AUTO_FLUSH Denotes a flush trigger is disabled.
static long | WRITE_LOCK_TIMEOUT Default value for the write lock timeout (1,000 ms).
Constructor Summary
IndexWriterConfig(Version matchVersion, Analyzer analyzer)
Creates a new config that with defaults that match the specified Version as well as the default Analyzer.
Method Summary
 Object clone()
 Analyzer getAnalyzer()
Returns the default analyzer to use for indexing documents.
static long getDefaultWriteLockTimeout()
Returns the default write lock timeout for newly instantiated IndexWriterConfigs.
 IndexCommit getIndexCommit()
Returns the IndexCommit as specified in setIndexCommit(IndexCommit) or the default, null which specifies to open the latest index commit point.
 IndexDeletionPolicy getIndexDeletionPolicy()
Returns the IndexDeletionPolicy specified in setIndexDeletionPolicy(IndexDeletionPolicy) or the default KeepOnlyLastCommitDeletionPolicy/
 int getMaxBufferedDeleteTerms()
Returns the number of buffered deleted terms that will trigger a flush if enabled.
 int getMaxBufferedDocs()
Returns the number of buffered added documents that will trigger a flush if enabled.
 int getMaxThreadStates()
Returns the max number of simultaneous threads that may be indexing documents at once in IndexWriter.
 IndexWriter.IndexReaderWarmer getMergedSegmentWarmer()
Returns the current merged segment warmer.
 MergePolicy getMergePolicy()
Returns the current MergePolicy in use by this writer.
 MergeScheduler getMergeScheduler()
Returns the MergeScheduler that was set by setMergeScheduler(MergeScheduler)
 IndexWriterConfig.OpenMode getOpenMode()
Returns the IndexWriterConfig.OpenMode set by setOpenMode(OpenMode).
 double getRAMBufferSizeMB()
Returns the value set by setRAMBufferSizeMB(double) if enabled.
 boolean getReaderPooling()
Returns true if IndexWriter should pool readers even if IndexWriter.getReader() has not been called.
 int getReaderTermsIndexDivisor()
 Similarity getSimilarity()
Expert: returns the Similarity implementation used by this IndexWriter.
 int getTermIndexInterval()
Returns the interval between indexed terms.
 long getWriteLockTimeout()
Returns allowed timeout when acquiring the write lock.
static void setDefaultWriteLockTimeout(long writeLockTimeout)
Sets the default (for any instance) maximum time to wait for a write lock (in milliseconds).
 IndexWriterConfig setIndexCommit(IndexCommit commit)
Expert: allows to open a certain commit point.
 IndexWriterConfig setIndexDeletionPolicy(IndexDeletionPolicy delPolicy)
Expert: allows an optional IndexDeletionPolicy implementation to be specified.
 IndexWriterConfig setMaxBufferedDeleteTerms(int maxBufferedDeleteTerms)
Determines the minimal number of delete terms required before the buffered in-memory delete terms are applied and flushed.
 IndexWriterConfig setMaxBufferedDocs(int maxBufferedDocs)
Determines the minimal number of documents required before the buffered in-memory documents are flushed as a new Segment.
 IndexWriterConfig setMaxThreadStates(int maxThreadStates)
Sets the max number of simultaneous threads that may be indexing documents at once in IndexWriter.
 IndexWriterConfig setMergedSegmentWarmer(IndexWriter.IndexReaderWarmer mergeSegmentWarmer)
Set the merged segment warmer.
 IndexWriterConfig setMergePolicy(MergePolicy mergePolicy)
Expert: MergePolicy is invoked whenever there are changes to the segments in the index.
 IndexWriterConfig setMergeScheduler(MergeScheduler mergeScheduler)
Expert: sets the merge scheduler used by this writer.
 IndexWriterConfig setOpenMode(IndexWriterConfig.OpenMode openMode)
Specifies IndexWriterConfig.OpenMode of the index.
 IndexWriterConfig setRAMBufferSizeMB(double ramBufferSizeMB)
Determines the amount of RAM that may be used for buffering added documents and deletions before they are flushed to the Directory.
 IndexWriterConfig setReaderPooling(boolean readerPooling)
By default, IndexWriter does not pool the SegmentReaders it must open for deletions and merging, unless a near-real-time reader has been obtained by calling IndexWriter.getReader().
 IndexWriterConfig setReaderTermsIndexDivisor(int divisor)
Sets the termsIndexDivisor passed to any readers that IndexWriter opens, for example when applying deletes or creating a near-real-time reader in IndexWriter.getReader().
 IndexWriterConfig setSimilarity(Similarity similarity)
Expert: set the Similarity implementation used by this IndexWriter.
 IndexWriterConfig setTermIndexInterval(int interval)
Expert: set the interval between indexed terms.
 IndexWriterConfig setWriteLockTimeout(long writeLockTimeout)
Sets the maximum time to wait for a write lock (in milliseconds) for this instance.
 String toString()
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_TERM_INDEX_INTERVAL

public static final int DEFAULT_TERM_INDEX_INTERVAL
Default value is 128. Change using setTermIndexInterval(int).

See Also:
Constant Field Values

DISABLE_AUTO_FLUSH

public static final int DISABLE_AUTO_FLUSH
Denotes a flush trigger is disabled.

See Also:
Constant Field Values

DEFAULT_MAX_BUFFERED_DELETE_TERMS

public static final int DEFAULT_MAX_BUFFERED_DELETE_TERMS
Disabled by default (because IndexWriter flushes by RAM usage by default).

See Also:
Constant Field Values

DEFAULT_MAX_BUFFERED_DOCS

public static final int DEFAULT_MAX_BUFFERED_DOCS
Disabled by default (because IndexWriter flushes by RAM usage by default).

See Also:
Constant Field Values

DEFAULT_RAM_BUFFER_SIZE_MB

public static final double DEFAULT_RAM_BUFFER_SIZE_MB
Default value is 16 MB (which means flush when buffered docs consume approximately 16 MB RAM).

See Also:
Constant Field Values

WRITE_LOCK_TIMEOUT

public static long WRITE_LOCK_TIMEOUT
Default value for the write lock timeout (1,000 ms).

See Also:
setDefaultWriteLockTimeout(long)

DEFAULT_MAX_THREAD_STATES

public static final int DEFAULT_MAX_THREAD_STATES
The maximum number of simultaneous threads that may be indexing documents at once in IndexWriter; if more than this many threads arrive they will wait for others to finish.

See Also:
Constant Field Values

DEFAULT_READER_POOLING

public static final boolean DEFAULT_READER_POOLING
Default setting for setReaderPooling(boolean).

See Also:
Constant Field Values

DEFAULT_READER_TERMS_INDEX_DIVISOR

public static final int DEFAULT_READER_TERMS_INDEX_DIVISOR
Default value is 1. Change using setReaderTermsIndexDivisor(int).

Constructor Detail

IndexWriterConfig

public IndexWriterConfig(Version matchVersion,
                         Analyzer analyzer)
Creates a new config that with defaults that match the specified Version as well as the default Analyzer. If matchVersion is >= Version.LUCENE_32, TieredMergePolicy is used for merging; else LogByteSizeMergePolicy. Note that TieredMergePolicy is free to select non-contiguous merges, which means docIDs may not remain montonic over time. If this is a problem you should switch to LogByteSizeMergePolicy or LogDocMergePolicy.

Method Detail

setDefaultWriteLockTimeout

public static void setDefaultWriteLockTimeout(long writeLockTimeout)
Sets the default (for any instance) maximum time to wait for a write lock (in milliseconds).

getDefaultWriteLockTimeout

public static long getDefaultWriteLockTimeout()
Returns the default write lock timeout for newly instantiated IndexWriterConfigs.

See Also:
setDefaultWriteLockTimeout(long)

clone

public Object clone()
Overrides:
clone in class Object

getAnalyzer

public Analyzer getAnalyzer()
Returns the default analyzer to use for indexing documents.

setOpenMode

public IndexWriterConfig setOpenMode(IndexWriterConfig.OpenMode openMode)
Specifies IndexWriterConfig.OpenMode of the index.

Only takes effect when IndexWriter is first created.

getOpenMode

public IndexWriterConfig.OpenMode getOpenMode()
Returns the IndexWriterConfig.OpenMode set by setOpenMode(OpenMode).

setIndexDeletionPolicy

public IndexWriterConfig setIndexDeletionPolicy(IndexDeletionPolicy delPolicy)
Expert: allows an optional IndexDeletionPolicy implementation to be specified. You can use this to control when prior commits are deleted from the index. The default policy is KeepOnlyLastCommitDeletionPolicy which removes all prior commits as soon as a new commit is done (this matches behavior before 2.2). Creating your own policy can allow you to explicitly keep previous "point in time" commits alive in the index for some time, to allow readers to refresh to the new commit without having the old commit deleted out from under them. This is necessary on filesystems like NFS that do not support "delete on last close" semantics, which Lucene's "point in time" search normally relies on.

NOTE: the deletion policy cannot be null. If null is passed, the deletion policy will be set to the default.

Only takes effect when IndexWriter is first created.

getIndexDeletionPolicy

public IndexDeletionPolicy getIndexDeletionPolicy()
Returns the IndexDeletionPolicy specified in setIndexDeletionPolicy(IndexDeletionPolicy) or the default KeepOnlyLastCommitDeletionPolicy/

setIndexCommit

public IndexWriterConfig setIndexCommit(IndexCommit commit)
Expert: allows to open a certain commit point. The default is null which opens the latest commit point.

Only takes effect when IndexWriter is first created.

getIndexCommit

public IndexCommit getIndexCommit()
Returns the IndexCommit as specified in setIndexCommit(IndexCommit) or the default, null which specifies to open the latest index commit point.

setSimilarity

public IndexWriterConfig setSimilarity(Similarity similarity)
Expert: set the Similarity implementation used by this IndexWriter.

NOTE: the similarity cannot be null. If null is passed, the similarity will be set to the default.

See Also:

Only takes effect when IndexWriter is first created.

getSimilarity

public Similarity getSimilarity()
Expert: returns the Similarity implementation used by this IndexWriter. This defaults to the current value of Similarity.getDefault().

setTermIndexInterval

public IndexWriterConfig setTermIndexInterval(int interval)
Expert: set the interval between indexed terms. Large values cause less memory to be used by IndexReader, but slow random-access to terms. Small values cause more memory to be used by an IndexReader, and speed random-access to terms.

This parameter determines the amount of computation required per query term, regardless of the number of documents that contain that term. In particular, it is the maximum number of other terms that must be scanned before a term is located and its frequency and position information may be processed. In a large index with user-entered query terms, query processing time is likely to be dominated not by term lookup but rather by the processing of frequency and positional data. In a small index or when many uncommon query terms are generated (e.g., by wildcard queries) term lookup may become a dominant cost.

In particular, numUniqueTerms/interval terms are read into memory by an IndexReader, and, on average, interval/2 terms must be scanned for each random term access.

See Also:

Takes effect immediately, but only applies to newly flushed/merged segments.

getTermIndexInterval

public int getTermIndexInterval()
Returns the interval between indexed terms.

See Also:
setTermIndexInterval(int)

setMergeScheduler

public IndexWriterConfig setMergeScheduler(MergeScheduler mergeScheduler)
Expert: sets the merge scheduler used by this writer. The default is ConcurrentMergeScheduler.

NOTE: the merge scheduler cannot be null. If null is passed, the merge scheduler will be set to the default.

Only takes effect when IndexWriter is first created.

getMergeScheduler

public MergeScheduler getMergeScheduler()
Returns the MergeScheduler that was set by setMergeScheduler(MergeScheduler)

setWriteLockTimeout

public IndexWriterConfig setWriteLockTimeout(long writeLockTimeout)
Sets the maximum time to wait for a write lock (in milliseconds) for this instance. You can change the default value for all instances by calling setDefaultWriteLockTimeout(long).

Only takes effect when IndexWriter is first created.

getWriteLockTimeout

public long getWriteLockTimeout()
Returns allowed timeout when acquiring the write lock.

See Also:
setWriteLockTimeout(long)

setMaxBufferedDeleteTerms

public IndexWriterConfig setMaxBufferedDeleteTerms(int maxBufferedDeleteTerms)
Determines the minimal number of delete terms required before the buffered in-memory delete terms are applied and flushed. If there are documents buffered in memory at the time, they are merged and a new segment is created.

Disabled by default (writer flushes by RAM usage).

Throws:
IllegalArgumentException - if maxBufferedDeleteTerms is enabled but smaller than 1
See Also:

Takes effect immediately, but only the next time a document is added, updated or deleted.

getMaxBufferedDeleteTerms

public int getMaxBufferedDeleteTerms()
Returns the number of buffered deleted terms that will trigger a flush if enabled.

See Also:
setMaxBufferedDeleteTerms(int)

setRAMBufferSizeMB

public IndexWriterConfig setRAMBufferSizeMB(double ramBufferSizeMB)
Determines the amount of RAM that may be used for buffering added documents and deletions before they are flushed to the Directory. Generally for faster indexing performance it's best to flush by RAM usage instead of document count and use as large a RAM buffer as you can.

When this is set, the writer will flush whenever buffered documents and deletions use this much RAM. Pass in DISABLE_AUTO_FLUSH to prevent triggering a flush due to RAM usage. Note that if flushing by document count is also enabled, then the flush will be triggered by whichever comes first.

NOTE: the account of RAM usage for pending deletions is only approximate. Specifically, if you delete by Query, Lucene currently has no way to measure the RAM usage of individual Queries so the accounting will under-estimate and you should compensate by either calling commit() periodically yourself, or by using setMaxBufferedDeleteTerms(int) to flush by count instead of RAM usage (each buffered delete Query counts as one).

NOTE: because IndexWriter uses ints when managing its internal storage, the absolute maximum value for this setting is somewhat less than 2048 MB. The precise limit depends on various factors, such as how large your documents are, how many fields have norms, etc., so it's best to set this value comfortably under 2048.

The default value is DEFAULT_RAM_BUFFER_SIZE_MB.

Takes effect immediately, but only the next time a document is added, updated or deleted.

Throws:
IllegalArgumentException - if ramBufferSize is enabled but non-positive, or it disables ramBufferSize when maxBufferedDocs is already disabled

getRAMBufferSizeMB

public double getRAMBufferSizeMB()
Returns the value set by setRAMBufferSizeMB(double) if enabled.

setMaxBufferedDocs

public IndexWriterConfig setMaxBufferedDocs(int maxBufferedDocs)
Determines the minimal number of documents required before the buffered in-memory documents are flushed as a new Segment. Large values generally give faster indexing.

When this is set, the writer will flush every maxBufferedDocs added documents. Pass in DISABLE_AUTO_FLUSH to prevent triggering a flush due to number of buffered documents. Note that if flushing by RAM usage is also enabled, then the flush will be triggered by whichever comes first.

Disabled by default (writer flushes by RAM usage).

Takes effect immediately, but only the next time a document is added, updated or deleted.

Throws:
IllegalArgumentException - if maxBufferedDocs is enabled but smaller than 2, or it disables maxBufferedDocs when ramBufferSize is already disabled
See Also:
setRAMBufferSizeMB(double)

getMaxBufferedDocs

public int getMaxBufferedDocs()
Returns the number of buffered added documents that will trigger a flush if enabled.

See Also:
setMaxBufferedDocs(int)

setMergedSegmentWarmer

public IndexWriterConfig setMergedSegmentWarmer(IndexWriter.IndexReaderWarmer mergeSegmentWarmer)
Set the merged segment warmer. See IndexWriter.IndexReaderWarmer.

Takes effect on the next merge.

getMergedSegmentWarmer

public IndexWriter.IndexReaderWarmer getMergedSegmentWarmer()
Returns the current merged segment warmer. See IndexWriter.IndexReaderWarmer.

setMergePolicy

public IndexWriterConfig setMergePolicy(MergePolicy mergePolicy)
Expert: MergePolicy is invoked whenever there are changes to the segments in the index. Its role is to select which merges to do, if any, and return a MergePolicy.MergeSpecification describing the merges. It also selects merges to do for forceMerge. (The default is LogByteSizeMergePolicy.

Only takes effect when IndexWriter is first created.

getMergePolicy

public MergePolicy getMergePolicy()
Returns the current MergePolicy in use by this writer.

See Also:
setMergePolicy(MergePolicy)

setMaxThreadStates

public IndexWriterConfig setMaxThreadStates(int maxThreadStates)
Sets the max number of simultaneous threads that may be indexing documents at once in IndexWriter. Values < 1 are invalid and if passed maxThreadStates will be set to DEFAULT_MAX_THREAD_STATES.

Only takes effect when IndexWriter is first created.

getMaxThreadStates

public int getMaxThreadStates()
Returns the max number of simultaneous threads that may be indexing documents at once in IndexWriter.

setReaderPooling

public IndexWriterConfig setReaderPooling(boolean readerPooling)
By default, IndexWriter does not pool the SegmentReaders it must open for deletions and merging, unless a near-real-time reader has been obtained by calling IndexWriter.getReader(). This method lets you enable pooling without getting a near-real-time reader. NOTE: if you set this to false, IndexWriter will still pool readers once IndexWriter.getReader() is called.

Only takes effect when IndexWriter is first created.

getReaderPooling

public boolean getReaderPooling()
Returns true if IndexWriter should pool readers even if IndexWriter.getReader() has not been called.

setReaderTermsIndexDivisor

public IndexWriterConfig setReaderTermsIndexDivisor(int divisor)
Sets the termsIndexDivisor passed to any readers that IndexWriter opens, for example when applying deletes or creating a near-real-time reader in IndexWriter.getReader(). If you pass -1, the terms index won't be loaded by the readers. This is only useful in advanced situations when you will only .next() through all terms; attempts to seek will hit an exception.

Takes effect immediately, but only applies to readers opened after this call

getReaderTermsIndexDivisor

public int getReaderTermsIndexDivisor()
See Also:
setReaderTermsIndexDivisor(int)

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexWriterConfig.OpenMode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.index
Enum IndexWriterConfig.OpenMode

java.lang.Object
    extended by  java.lang.Enum<IndexWriterConfig.OpenMode>
        extended by  org.apache.lucene.index.IndexWriterConfig.OpenMode
All Implemented Interfaces:
Serializable, Comparable<IndexWriterConfig.OpenMode>
Enclosing class:
IndexWriterConfig
public static enum IndexWriterConfig.OpenMode
extends Enum<IndexWriterConfig.OpenMode>

Specifies the open mode for IndexWriter:

    CREATE - creates a new index or overwrites an existing one. CREATE_OR_APPEND - creates a new index if one does not exist, otherwise it opens the index and documents will be appended. APPEND - opens an existing index.

Enum Constant Summary
APPEND
CREATE
CREATE_OR_APPEND
Method Summary
static IndexWriterConfig.OpenMode | valueOf(String name) Returns the enum constant of this type with the specified name.
static IndexWriterConfig.OpenMode[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

CREATE

public static final IndexWriterConfig.OpenMode CREATE

APPEND

public static final IndexWriterConfig.OpenMode APPEND

CREATE_OR_APPEND

public static final IndexWriterConfig.OpenMode CREATE_OR_APPEND
Method Detail

values

public static final IndexWriterConfig.OpenMode[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(IndexWriterConfig.OpenMode c : IndexWriterConfig.OpenMode.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static IndexWriterConfig.OpenMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


KeepOnlyLastCommitDeletionPolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class KeepOnlyLastCommitDeletionPolicy

java.lang.Object
    extended by  org.apache.lucene.index.KeepOnlyLastCommitDeletionPolicy
All Implemented Interfaces:
IndexDeletionPolicy
public final class KeepOnlyLastCommitDeletionPolicy
extends Object
implements IndexDeletionPolicy

This IndexDeletionPolicy implementation that keeps only the most recent commit and immediately removes all prior commits after a new commit is done. This is the default deletion policy.

Constructor Summary
KeepOnlyLastCommitDeletionPolicy()
Method Summary
void | onCommit(List<? extends IndexCommit> commits) Deletes all commits except the most recent one.
void | onInit(List<? extends IndexCommit> commits) Deletes all commits except the most recent one.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

KeepOnlyLastCommitDeletionPolicy

public KeepOnlyLastCommitDeletionPolicy()
Method Detail

onInit

public void onInit(List<? extends IndexCommit> commits)
Deletes all commits except the most recent one.

Specified by:
onInit in interface IndexDeletionPolicy
Parameters:
commits - List of current point-in-time commits, sorted by age (the 0th one is the oldest commit).

onCommit

public void onCommit(List<? extends IndexCommit> commits)
Deletes all commits except the most recent one.

Specified by:
onCommit in interface IndexDeletionPolicy
Parameters:
commits - List of IndexCommit, sorted by age (the 0th one is the oldest commit).
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LogByteSizeMergePolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class LogByteSizeMergePolicy

java.lang.Object
    extended by  org.apache.lucene.index.MergePolicy
        extended by  org.apache.lucene.index.LogMergePolicy
            extended by  org.apache.lucene.index.LogByteSizeMergePolicy
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
BalancedSegmentMergePolicy
public class LogByteSizeMergePolicy
extends LogMergePolicy

This is a LogMergePolicy that measures size of a segment as the total byte size of the segment's files.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.MergePolicy
MergePolicy.MergeAbortedException, MergePolicy.MergeException, MergePolicy.MergeSpecification, MergePolicy.OneMerge
Field Summary
static double | DEFAULT_MAX_MERGE_MB Default maximum segment size.
static double | DEFAULT_MAX_MERGE_MB_FOR_FORCED_MERGE Default maximum segment size.
static double | DEFAULT_MIN_MERGE_MB Default minimum segment size.
Fields inherited from class org.apache.lucene.index.LogMergePolicy
calibrateSizeByDeletes, DEFAULT_MAX_MERGE_DOCS, DEFAULT_MERGE_FACTOR, DEFAULT_NO_CFS_RATIO, LEVEL_LOG_SPAN, maxMergeDocs, maxMergeSize, maxMergeSizeForForcedMerge, mergeFactor, minMergeSize, noCFSRatio, useCompoundFile
Fields inherited from class org.apache.lucene.index.MergePolicy
writer
Constructor Summary
LogByteSizeMergePolicy()
Method Summary
 double getMaxMergeMB()
Returns the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments.
 double getMaxMergeMBForForcedMerge()
Returns the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments during forceMerge.
 double getMaxMergeMBForOptimize()
Deprecated. Renamed to getMaxMergeMBForForcedMerge()
 double getMinMergeMB()
Get the minimum size for a segment to remain un-merged.
 void setMaxMergeMB(double mb)
Determines the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments.
 void setMaxMergeMBForForcedMerge(double mb)
Determines the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments during forceMerge.
 void setMaxMergeMBForOptimize(double mb)
Deprecated. Renamed to setMaxMergeMBForForcedMerge(double)
 void setMinMergeMB(double mb)
Sets the minimum size for the lowest level segments.
protected  long size(SegmentInfo info)
Methods inherited from class org.apache.lucene.index.LogMergePolicy
close, findForcedDeletesMerges, findForcedMerges, findMerges, getCalibrateSizeByDeletes, getMaxMergeDocs, getMergeFactor, getNoCFSRatio, getUseCompoundFile, isMerged, isMerged, message, setCalibrateSizeByDeletes, setMaxMergeDocs, setMergeFactor, setNoCFSRatio, setUseCompoundFile, sizeBytes, sizeDocs, toString, useCompoundFile, verbose
Methods inherited from class org.apache.lucene.index.MergePolicy
setIndexWriter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_MIN_MERGE_MB

public static final double DEFAULT_MIN_MERGE_MB
Default minimum segment size. @see setMinMergeMB

See Also:
Constant Field Values

DEFAULT_MAX_MERGE_MB

public static final double DEFAULT_MAX_MERGE_MB
Default maximum segment size. A segment of this size or larger will never be merged. @see setMaxMergeMB

See Also:
Constant Field Values

DEFAULT_MAX_MERGE_MB_FOR_FORCED_MERGE

public static final double DEFAULT_MAX_MERGE_MB_FOR_FORCED_MERGE
Default maximum segment size. A segment of this size or larger will never be merged during forceMerge. @see setMaxMergeMBForForceMerge

See Also:
Constant Field Values
Constructor Detail

LogByteSizeMergePolicy

public LogByteSizeMergePolicy()
Method Detail

size

protected long size(SegmentInfo info)
             throws IOException
Specified by:
size in class LogMergePolicy
Throws:
IOException

setMaxMergeMB

public void setMaxMergeMB(double mb)

Determines the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments. Small values (e.g., less than 50 MB) are best for interactive indexing, as this limits the length of pauses while indexing to a few seconds. Larger values are best for batched indexing and speedier searches.

Note that LogMergePolicy.setMaxMergeDocs(int) is also used to check whether a segment is too large for merging (it's either or).

getMaxMergeMB

public double getMaxMergeMB()
Returns the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments.

See Also:
setMaxMergeMB(double)

setMaxMergeMBForOptimize

@Deprecated
public void setMaxMergeMBForOptimize(double mb)
Deprecated. Renamed to setMaxMergeMBForForcedMerge(double)

setMaxMergeMBForForcedMerge

public void setMaxMergeMBForForcedMerge(double mb)

Determines the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments during forceMerge. Setting it low will leave the index with more than 1 segment, even if IndexWriter.forceMerge(int) is called.

getMaxMergeMBForOptimize

@Deprecated
public double getMaxMergeMBForOptimize()
Deprecated. Renamed to getMaxMergeMBForForcedMerge()

getMaxMergeMBForForcedMerge

public double getMaxMergeMBForForcedMerge()
Returns the largest segment (measured by total byte size of the segment's files, in MB) that may be merged with other segments during forceMerge.

See Also:
setMaxMergeMBForForcedMerge(double)

setMinMergeMB

public void setMinMergeMB(double mb)
Sets the minimum size for the lowest level segments. Any segments below this size are considered to be on the same level (even if they vary drastically in size) and will be merged whenever there are mergeFactor of them. This effectively truncates the "long tail" of small segments that would otherwise be created into a single level. If you set this too large, it could greatly increase the merging cost during indexing (if you flush many small segments).

getMinMergeMB

public double getMinMergeMB()
Get the minimum size for a segment to remain un-merged.

See Also:
setMinMergeMB(double)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LogDocMergePolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class LogDocMergePolicy

java.lang.Object
    extended by  org.apache.lucene.index.MergePolicy
        extended by  org.apache.lucene.index.LogMergePolicy
            extended by  org.apache.lucene.index.LogDocMergePolicy
All Implemented Interfaces:
Closeable
public class LogDocMergePolicy
extends LogMergePolicy

This is a LogMergePolicy that measures size of a segment as the number of documents (not taking deletions into account).

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.MergePolicy
MergePolicy.MergeAbortedException, MergePolicy.MergeException, MergePolicy.MergeSpecification, MergePolicy.OneMerge
Field Summary
static int DEFAULT_MIN_MERGE_DOCS
Default minimum segment size.
Fields inherited from class org.apache.lucene.index.LogMergePolicy
calibrateSizeByDeletes, DEFAULT_MAX_MERGE_DOCS, DEFAULT_MERGE_FACTOR, DEFAULT_NO_CFS_RATIO, LEVEL_LOG_SPAN, maxMergeDocs, maxMergeSize, maxMergeSizeForForcedMerge, mergeFactor, minMergeSize, noCFSRatio, useCompoundFile
Fields inherited from class org.apache.lucene.index.MergePolicy
writer
Constructor Summary
LogDocMergePolicy()
Method Summary
int | getMinMergeDocs() Get the minimum size for a segment to remain un-merged.
void | setMinMergeDocs(int minMergeDocs) Sets the minimum size for the lowest level segments.
protected long | size(SegmentInfo info)
Methods inherited from class org.apache.lucene.index.LogMergePolicy
close, findForcedDeletesMerges, findForcedMerges, findMerges, getCalibrateSizeByDeletes, getMaxMergeDocs, getMergeFactor, getNoCFSRatio, getUseCompoundFile, isMerged, isMerged, message, setCalibrateSizeByDeletes, setMaxMergeDocs, setMergeFactor, setNoCFSRatio, setUseCompoundFile, sizeBytes, sizeDocs, toString, useCompoundFile, verbose
Methods inherited from class org.apache.lucene.index.MergePolicy
setIndexWriter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_MIN_MERGE_DOCS

public static final int DEFAULT_MIN_MERGE_DOCS
Default minimum segment size. @see setMinMergeDocs

See Also:
Constant Field Values
Constructor Detail

LogDocMergePolicy

public LogDocMergePolicy()
Method Detail

size

protected long size(SegmentInfo info)
             throws IOException
Specified by:
size in class LogMergePolicy
Throws:
IOException

setMinMergeDocs

public void setMinMergeDocs(int minMergeDocs)
Sets the minimum size for the lowest level segments. Any segments below this size are considered to be on the same level (even if they vary drastically in size) and will be merged whenever there are mergeFactor of them. This effectively truncates the "long tail" of small segments that would otherwise be created into a single level. If you set this too large, it could greatly increase the merging cost during indexing (if you flush many small segments).

getMinMergeDocs

public int getMinMergeDocs()
Get the minimum size for a segment to remain un-merged.

See Also:
setMinMergeDocs(int)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LogMergePolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class LogMergePolicy

java.lang.Object
    extended by  org.apache.lucene.index.MergePolicy
        extended by  org.apache.lucene.index.LogMergePolicy
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
LogByteSizeMergePolicy, LogDocMergePolicy
public abstract class LogMergePolicy
extends MergePolicy

This class implements a MergePolicy that tries to merge segments into levels of exponentially increasing size, where each level has fewer segments than the value of the merge factor. Whenever extra segments (beyond the merge factor upper bound) are encountered, all segments within the level are merged. You can get or set the merge factor using getMergeFactor() and setMergeFactor(int) respectively.

This class is abstract and requires a subclass to define the size(org.apache.lucene.index.SegmentInfo) method which specifies how a segment's size is determined. LogDocMergePolicy is one subclass that measures size by document count in the segment. LogByteSizeMergePolicy is another subclass that measures size as the total byte size of the file(s) for the segment.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.MergePolicy
MergePolicy.MergeAbortedException, MergePolicy.MergeException, MergePolicy.MergeSpecification, MergePolicy.OneMerge
Field Summary
protected boolean | calibrateSizeByDeletes
static int | DEFAULT_MAX_MERGE_DOCS Default maximum segment size.
static int | DEFAULT_MERGE_FACTOR Default merge factor, which is how many segments are merged at a time
static double | DEFAULT_NO_CFS_RATIO Default noCFSRatio.
static double | LEVEL_LOG_SPAN Defines the allowed range of log(size) for each level.
protected int | maxMergeDocs
protected long | maxMergeSize
protected long | maxMergeSizeForForcedMerge
protected int | mergeFactor
protected long | minMergeSize
protected double | noCFSRatio
protected boolean | useCompoundFile
Fields inherited from class org.apache.lucene.index.MergePolicy
writer
Constructor Summary
LogMergePolicy()
Method Summary
void | close() Release all resources for the policy.
MergePolicy.MergeSpecification | findForcedDeletesMerges(SegmentInfos segmentInfos) Finds merges necessary to force-merge all deletes from the index.
MergePolicy.MergeSpecification | findForcedMerges(SegmentInfos infos, int maxNumSegments, Map<SegmentInfo,Boolean> segmentsToMerge) Returns the merges necessary to merge the index down to a specified number of segments.
MergePolicy.MergeSpecification | findMerges(SegmentInfos infos) Checks if any merges are now necessary and returns a MergePolicy.MergeSpecification if so.
boolean | getCalibrateSizeByDeletes() Returns true if the segment size should be calibrated by the number of deletes when choosing segments for merge.
int | getMaxMergeDocs() Returns the largest segment (measured by document count) that may be merged with other segments.
int | getMergeFactor() Returns the number of segments that are merged at once and also controls the total number of segments allowed to accumulate in the index.
double | getNoCFSRatio()
boolean | getUseCompoundFile() Returns true if newly flushed and newly merge segments are written in compound file format.
protected boolean | isMerged(SegmentInfo info) Returns true if this single info is already fully merged (has no pending norms or deletes, is in the same dir as the writer, and matches the current compound file setting
protected boolean | isMerged(SegmentInfos infos, int maxNumSegments, Map<SegmentInfo,Boolean> segmentsToMerge)
protected void | message(String message)
void | setCalibrateSizeByDeletes(boolean calibrateSizeByDeletes) Sets whether the segment size should be calibrated by the number of deletes when choosing segments for merge.
void | setMaxMergeDocs(int maxMergeDocs) Determines the largest segment (measured by document count) that may be merged with other segments.
void | setMergeFactor(int mergeFactor) Determines how often segment indices are merged by addDocument().
void | setNoCFSRatio(double noCFSRatio) If a merged segment will be more than this percentage of the total size of the index, leave the segment as non-compound file even if compound file is enabled.
void | setUseCompoundFile(boolean useCompoundFile) Sets whether compound file format should be used for newly flushed and newly merged segments.
protected abstract long | size(SegmentInfo info)
protected long | sizeBytes(SegmentInfo info)
protected long | sizeDocs(SegmentInfo info)
String | toString()
boolean | useCompoundFile(SegmentInfos infos, SegmentInfo mergedInfo) Returns true if a new segment (regardless of its origin) should use the compound file format.
protected boolean | verbose()
Methods inherited from class org.apache.lucene.index.MergePolicy
setIndexWriter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

LEVEL_LOG_SPAN

public static final double LEVEL_LOG_SPAN
Defines the allowed range of log(size) for each level. A level is computed by taking the max segment log size, minus LEVEL_LOG_SPAN, and finding all segments falling within that range.

See Also:
Constant Field Values

DEFAULT_MERGE_FACTOR

public static final int DEFAULT_MERGE_FACTOR
Default merge factor, which is how many segments are merged at a time

See Also:
Constant Field Values

DEFAULT_MAX_MERGE_DOCS

public static final int DEFAULT_MAX_MERGE_DOCS
Default maximum segment size. A segment of this size or larger will never be merged. @see setMaxMergeDocs

See Also:
Constant Field Values

DEFAULT_NO_CFS_RATIO

public static final double DEFAULT_NO_CFS_RATIO
Default noCFSRatio. If a merge's size is >= 10% of the index, then we disable compound file for it.

See Also:
setNoCFSRatio(double), Constant Field Values

mergeFactor

protected int mergeFactor

minMergeSize

protected long minMergeSize

maxMergeSize

protected long maxMergeSize

maxMergeSizeForForcedMerge

protected long maxMergeSizeForForcedMerge

maxMergeDocs

protected int maxMergeDocs

noCFSRatio

protected double noCFSRatio

calibrateSizeByDeletes

protected boolean calibrateSizeByDeletes

useCompoundFile

protected boolean useCompoundFile
Constructor Detail

LogMergePolicy

public LogMergePolicy()
Method Detail

verbose

protected boolean verbose()

getNoCFSRatio

public double getNoCFSRatio()
See Also:
setNoCFSRatio(double)

setNoCFSRatio

public void setNoCFSRatio(double noCFSRatio)
If a merged segment will be more than this percentage of the total size of the index, leave the segment as non-compound file even if compound file is enabled. Set to 1.0 to always use CFS regardless of merge size.

message

protected void message(String message)

getMergeFactor

public int getMergeFactor()

Returns the number of segments that are merged at once and also controls the total number of segments allowed to accumulate in the index.

setMergeFactor

public void setMergeFactor(int mergeFactor)
Determines how often segment indices are merged by addDocument(). With smaller values, less RAM is used while indexing, and searches are faster, but indexing speed is slower. With larger values, more RAM is used during indexing, and while searches is slower, indexing is faster. Thus larger values (> 10) are best for batch index creation, and smaller values (< 10) for indices that are interactively maintained.

useCompoundFile

public boolean useCompoundFile(SegmentInfos infos,
                               SegmentInfo mergedInfo)
                        throws IOException
Description copied from class: MergePolicy
Returns true if a new segment (regardless of its origin) should use the compound file format.

Specified by:
useCompoundFile in class MergePolicy
Throws:
IOException

setUseCompoundFile

public void setUseCompoundFile(boolean useCompoundFile)
Sets whether compound file format should be used for newly flushed and newly merged segments.

getUseCompoundFile

public boolean getUseCompoundFile()
Returns true if newly flushed and newly merge segments are written in compound file format. @see #setUseCompoundFile

setCalibrateSizeByDeletes

public void setCalibrateSizeByDeletes(boolean calibrateSizeByDeletes)
Sets whether the segment size should be calibrated by the number of deletes when choosing segments for merge.

getCalibrateSizeByDeletes

public boolean getCalibrateSizeByDeletes()
Returns true if the segment size should be calibrated by the number of deletes when choosing segments for merge.

close

public void close()
Description copied from class: MergePolicy
Release all resources for the policy.

Specified by:
close in interface Closeable
Specified by:
close in class MergePolicy

size

protected abstract long size(SegmentInfo info)
                      throws IOException
Throws:
IOException

sizeDocs

protected long sizeDocs(SegmentInfo info)
                 throws IOException
Throws:
IOException

sizeBytes

protected long sizeBytes(SegmentInfo info)
                  throws IOException
Throws:
IOException

isMerged

protected boolean isMerged(SegmentInfos infos,
                           int maxNumSegments,
                           Map<SegmentInfo,Boolean> segmentsToMerge)
                    throws IOException
Throws:
IOException

isMerged

protected boolean isMerged(SegmentInfo info)
                    throws IOException
Returns true if this single info is already fully merged (has no pending norms or deletes, is in the same dir as the writer, and matches the current compound file setting

Throws:
IOException

findForcedMerges

public MergePolicy.MergeSpecification findForcedMerges(SegmentInfos infos,
                                                       int maxNumSegments,
                                                       Map<SegmentInfo,Boolean> segmentsToMerge)
                                                throws IOException
Returns the merges necessary to merge the index down to a specified number of segments. This respects the maxMergeSizeForForcedMerge setting. By default, and assuming maxNumSegments=1, only one segment will be left in the index, where that segment has no deletions pending nor separate norms, and it is in compound file format if the current useCompoundFile setting is true. This method returns multiple merges (mergeFactor at a time) so the MergeScheduler in use may make use of concurrency.

Specified by:
findForcedMerges in class MergePolicy
Parameters:
infos - the total set of segments in the index
maxNumSegments - requested maximum number of segments in the index (currently this is always 1)
segmentsToMerge - contains the specific SegmentInfo instances that must be merged away. This may be a subset of all SegmentInfos. If the value is True for a given SegmentInfo, that means this segment was an original segment present in the to-be-merged index; else, it was a segment produced by a cascaded merge.
Throws:
IOException

findForcedDeletesMerges

public MergePolicy.MergeSpecification findForcedDeletesMerges(SegmentInfos segmentInfos)
                                                       throws CorruptIndexException,
                                                              IOException
Finds merges necessary to force-merge all deletes from the index. We simply merge adjacent segments that have deletes, up to mergeFactor at a time.

Specified by:
findForcedDeletesMerges in class MergePolicy
Parameters:
segmentInfos - the total set of segments in the index
Throws:
CorruptIndexException
IOException

findMerges

public MergePolicy.MergeSpecification findMerges(SegmentInfos infos)
                                          throws IOException
Checks if any merges are now necessary and returns a MergePolicy.MergeSpecification if so. A merge is necessary when there are more than setMergeFactor(int) segments at a given level. When multiple levels have too many segments, this method will return multiple merges, allowing the MergeScheduler to use concurrency.

Specified by:
findMerges in class MergePolicy
Parameters:
infos - the total set of segments in the index
Throws:
IOException

setMaxMergeDocs

public void setMaxMergeDocs(int maxMergeDocs)

Determines the largest segment (measured by document count) that may be merged with other segments. Small values (e.g., less than 10,000) are best for interactive indexing, as this limits the length of pauses while indexing to a few seconds. Larger values are best for batched indexing and speedier searches.

The default value is Integer.MAX_VALUE.

The default merge policy (LogByteSizeMergePolicy) also allows you to set this limit by net size (in MB) of the segment, using LogByteSizeMergePolicy.setMaxMergeMB(double).

getMaxMergeDocs

public int getMaxMergeDocs()
Returns the largest segment (measured by document count) that may be merged with other segments.

See Also:
setMaxMergeDocs(int)

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MergePolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class MergePolicy

java.lang.Object
    extended by  org.apache.lucene.index.MergePolicy
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
LogMergePolicy, MockRandomMergePolicy, NoMergePolicy, TieredMergePolicy, UpgradeIndexMergePolicy
public abstract class MergePolicy
extends Object
implements Closeable

Expert: a MergePolicy determines the sequence of primitive merge operations.

Whenever the segments in an index have been altered by IndexWriter, either the addition of a newly flushed segment, addition of many segments from addIndexes* calls, or a previous merge that may now need to cascade, IndexWriter invokes findMerges(org.apache.lucene.index.SegmentInfos) to give the MergePolicy a chance to pick merges that are now required. This method returns a MergePolicy.MergeSpecification instance describing the set of merges that should be done, or null if no merges are necessary. When IndexWriter.forceMerge is called, it calls findForcedMerges(SegmentInfos,int,Map) and the MergePolicy should then return the necessary merges.

Note that the policy can return more than one merge at a time. In this case, if the writer is using SerialMergeScheduler, the merges will be run sequentially but if it is using ConcurrentMergeScheduler they will be run concurrently.

The default MergePolicy is TieredMergePolicy.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | MergePolicy.MergeAbortedException
static class | MergePolicy.MergeException Exception thrown if there are any problems while executing a merge.
static class | MergePolicy.MergeSpecification A MergeSpecification instance provides the information necessary to perform multiple merges.
static class | MergePolicy.OneMerge OneMerge provides the information necessary to perform an individual primitive merge operation, resulting in a single new segment.
Field Summary
protected  SetOnce<IndexWriter> writer
Constructor Summary
MergePolicy()
Creates a new merge policy instance.
Method Summary
abstract void | close() Release all resources for the policy.
abstract MergePolicy.MergeSpecification | findForcedDeletesMerges(SegmentInfos segmentInfos) Determine what set of merge operations is necessary in order to expunge all deletes from the index.
abstract MergePolicy.MergeSpecification | findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge) Determine what set of merge operations is necessary in order to merge to <= the specified segment count.
abstract MergePolicy.MergeSpecification | findMerges(SegmentInfos segmentInfos) Determine what set of merge operations are now necessary on the index.
void | setIndexWriter(IndexWriter writer) Sets the IndexWriter to use by this merge policy.
abstract boolean | useCompoundFile(SegmentInfos segments, SegmentInfo newSegment) Returns true if a new segment (regardless of its origin) should use the compound file format.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

writer

protected final SetOnce<IndexWriter> writer
Constructor Detail

MergePolicy

public MergePolicy()
Creates a new merge policy instance. Note that if you intend to use it without passing it to IndexWriter, you should call setIndexWriter(IndexWriter).

Method Detail

setIndexWriter

public void setIndexWriter(IndexWriter writer)
Sets the IndexWriter to use by this merge policy. This method is allowed to be called only once, and is usually set by IndexWriter. If it is called more than once, SetOnce.AlreadySetException is thrown.

See Also:
SetOnce

findMerges

public abstract MergePolicy.MergeSpecification findMerges(SegmentInfos segmentInfos)
                                                   throws CorruptIndexException,
                                                          IOException
Determine what set of merge operations are now necessary on the index. IndexWriter calls this whenever there is a change to the segments. This call is always synchronized on the IndexWriter instance so only one thread at a time will call this method.

Parameters:
segmentInfos - the total set of segments in the index
Throws:
CorruptIndexException
IOException

findForcedMerges

public abstract MergePolicy.MergeSpecification findForcedMerges(SegmentInfos segmentInfos,
                                                                int maxSegmentCount,
                                                                Map<SegmentInfo,Boolean> segmentsToMerge)
                                                         throws CorruptIndexException,
                                                                IOException
Determine what set of merge operations is necessary in order to merge to <= the specified segment count. IndexWriter calls this when its IndexWriter.forceMerge(int) method is called. This call is always synchronized on the IndexWriter instance so only one thread at a time will call this method.

Parameters:
segmentInfos - the total set of segments in the index
maxSegmentCount - requested maximum number of segments in the index (currently this is always 1)
segmentsToMerge - contains the specific SegmentInfo instances that must be merged away. This may be a subset of all SegmentInfos. If the value is True for a given SegmentInfo, that means this segment was an original segment present in the to-be-merged index; else, it was a segment produced by a cascaded merge.
Throws:
CorruptIndexException
IOException

findForcedDeletesMerges

public abstract MergePolicy.MergeSpecification findForcedDeletesMerges(SegmentInfos segmentInfos)
                                                                throws CorruptIndexException,
                                                                       IOException
Determine what set of merge operations is necessary in order to expunge all deletes from the index.

Parameters:
segmentInfos - the total set of segments in the index
Throws:
CorruptIndexException
IOException

close

public abstract void close()
Release all resources for the policy.

Specified by:
close in interface Closeable

useCompoundFile

public abstract boolean useCompoundFile(SegmentInfos segments,
                                        SegmentInfo newSegment)
                                 throws IOException
Returns true if a new segment (regardless of its origin) should use the compound file format.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MergePolicy.MergeAbortedException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class MergePolicy.MergeAbortedException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.io.IOException
                extended by  org.apache.lucene.index.MergePolicy.MergeAbortedException
All Implemented Interfaces:
Serializable
Enclosing class:
MergePolicy
public static class MergePolicy.MergeAbortedException
extends IOException

See Also:
Serialized Form

Constructor Summary
MergePolicy.MergeAbortedException()
MergePolicy.MergeAbortedException(String message)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MergePolicy.MergeAbortedException

public MergePolicy.MergeAbortedException()

MergePolicy.MergeAbortedException

public MergePolicy.MergeAbortedException(String message)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MergePolicy.MergeException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class MergePolicy.MergeException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.lang.RuntimeException
                extended by  org.apache.lucene.index.MergePolicy.MergeException
All Implemented Interfaces:
Serializable
Enclosing class:
MergePolicy
public static class MergePolicy.MergeException
extends RuntimeException

Exception thrown if there are any problems while executing a merge.

See Also:
Serialized Form

Constructor Summary
MergePolicy.MergeException(String message, Directory dir)
MergePolicy.MergeException(Throwable exc, Directory dir)
Method Summary
 Directory getDirectory()
Returns the Directory of the index that hit the exception.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MergePolicy.MergeException

public MergePolicy.MergeException(String message,
                                  Directory dir)

MergePolicy.MergeException

public MergePolicy.MergeException(Throwable exc,
                                  Directory dir)
Method Detail

getDirectory

public Directory getDirectory()
Returns the Directory of the index that hit the exception.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MergePolicy.MergeSpecification

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class MergePolicy.MergeSpecification

java.lang.Object
    extended by  org.apache.lucene.index.MergePolicy.MergeSpecification
Enclosing class:
MergePolicy
public static class MergePolicy.MergeSpecification
extends Object

A MergeSpecification instance provides the information necessary to perform multiple merges. It simply contains a list of MergePolicy.OneMerge instances.

Field Summary
 List<MergePolicy.OneMerge> merges
The subset of segments to be included in the primitive merge.
Constructor Summary
MergePolicy.MergeSpecification()
Method Summary
void | add(MergePolicy.OneMerge merge)
String | segString(Directory dir)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

merges

public final List<MergePolicy.OneMerge> merges
The subset of segments to be included in the primitive merge.

Constructor Detail

MergePolicy.MergeSpecification

public MergePolicy.MergeSpecification()
Method Detail

add

public void add(MergePolicy.OneMerge merge)

segString

public String segString(Directory dir)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MergePolicy.OneMerge

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class MergePolicy.OneMerge

java.lang.Object
    extended by  org.apache.lucene.index.MergePolicy.OneMerge
Enclosing class:
MergePolicy
public static class MergePolicy.OneMerge
extends Object

OneMerge provides the information necessary to perform an individual primitive merge operation, resulting in a single new segment. The merge spec includes the subset of segments to be merged as well as whether the new segment should use the compound file format.

Field Summary
long | estimatedMergeBytes
List<SegmentInfo> | segments
int | totalDocCount
Constructor Summary
MergePolicy.OneMerge(List<SegmentInfo> segments)
Method Summary
boolean | getPause()
String | segString(Directory dir)
void | setPause(boolean paused)
long | totalBytesSize() Returns the total size in bytes of this merge.
int | totalNumDocs() Returns the total number of documents that are included with this merge.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

estimatedMergeBytes

public long estimatedMergeBytes

segments

public final List<SegmentInfo> segments

totalDocCount

public final int totalDocCount
Constructor Detail

MergePolicy.OneMerge

public MergePolicy.OneMerge(List<SegmentInfo> segments)
Method Detail

setPause

public void setPause(boolean paused)

getPause

public boolean getPause()

segString

public String segString(Directory dir)

totalBytesSize

public long totalBytesSize()
                    throws IOException
Returns the total size in bytes of this merge. Note that this does not indicate the size of the merged segment, but the input total size.

Throws:
IOException

totalNumDocs

public int totalNumDocs()
                 throws IOException
Returns the total number of documents that are included with this merge. Note that this does not indicate the number of documents after the merge.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MergeScheduler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class MergeScheduler

java.lang.Object
    extended by  org.apache.lucene.index.MergeScheduler
Direct Known Subclasses:
ConcurrentMergeScheduler, NoMergeScheduler, SerialMergeScheduler
public abstract class MergeScheduler
extends Object

Expert: IndexWriter uses an instance implementing this interface to execute the merges selected by a MergePolicy. The default MergeScheduler is ConcurrentMergeScheduler.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
MergeScheduler()
Method Summary
abstract void | close() Close this MergeScheduler.
abstract void | merge(IndexWriter writer) Run the merges provided by IndexWriter.getNextMerge().
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MergeScheduler

public MergeScheduler()
Method Detail

merge

public abstract void merge(IndexWriter writer)
                    throws CorruptIndexException,
                           IOException
Run the merges provided by IndexWriter.getNextMerge().

Throws:
CorruptIndexException
IOException

close

public abstract void close()
                    throws CorruptIndexException,
                           IOException
Close this MergeScheduler.

Throws:
CorruptIndexException
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockIndexInput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class MockIndexInput

java.lang.Object
    extended by  org.apache.lucene.store.DataInput
        extended by  org.apache.lucene.store.IndexInput
            extended by  org.apache.lucene.store.BufferedIndexInput
                extended by  org.apache.lucene.index.MockIndexInput
All Implemented Interfaces:
Closeable, Cloneable
public class MockIndexInput
extends BufferedIndexInput

IndexInput backed by a byte[] for testing.

Field Summary
Fields inherited from class org.apache.lucene.store.BufferedIndexInput
BUFFER_SIZE
Constructor Summary
MockIndexInput(byte[] bytes)
Method Summary
void | close() Closes the stream to further operations.
long | length() The number of bytes in the file.
protected void | readInternal(byte[] dest, int destOffset, int len) Expert: implements buffer refill.
protected void | seekInternal(long pos) Expert: implements seek.
Methods inherited from class org.apache.lucene.store.BufferedIndexInput
clone, copyBytes, flushBuffer, getBufferSize, getFilePointer, newBuffer, readByte, readBytes, readBytes, readInt, readLong, readShort, readVInt, readVLong, seek, setBufferSize
Methods inherited from class org.apache.lucene.store.IndexInput
skipChars, toString
Methods inherited from class org.apache.lucene.store.DataInput
readChars, readString, readStringStringMap, setModifiedUTF8StringsMode
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MockIndexInput

public MockIndexInput(byte[] bytes)
Method Detail

readInternal

protected void readInternal(byte[] dest,
                            int destOffset,
                            int len)
Description copied from class: BufferedIndexInput
Expert: implements buffer refill. Reads bytes from the current position in the input.

Specified by:
readInternal in class BufferedIndexInput
Parameters:
dest - the array to read bytes into
destOffset - the offset in the array to start storing bytes
len - the number of bytes to read

close

public void close()
Description copied from class: IndexInput
Closes the stream to further operations.

Specified by:
close in interface Closeable
Specified by:
close in class IndexInput

seekInternal

protected void seekInternal(long pos)
Description copied from class: BufferedIndexInput
Expert: implements seek. Sets current position in this file, where the next BufferedIndexInput.readInternal(byte[],int,int) will occur.

Specified by:
seekInternal in class BufferedIndexInput
See Also:
BufferedIndexInput.readInternal(byte[],int,int)

length

public long length()
Description copied from class: IndexInput
The number of bytes in the file.

Specified by:
length in class IndexInput
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockRandomMergePolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class MockRandomMergePolicy

java.lang.Object
    extended by  org.apache.lucene.index.MergePolicy
        extended by  org.apache.lucene.index.MockRandomMergePolicy
All Implemented Interfaces:
Closeable
public class MockRandomMergePolicy
extends MergePolicy

MergePolicy that makes random decisions for testing.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.MergePolicy
MergePolicy.MergeAbortedException, MergePolicy.MergeException, MergePolicy.MergeSpecification, MergePolicy.OneMerge
Field Summary
Fields inherited from class org.apache.lucene.index.MergePolicy
writer
Constructor Summary
MockRandomMergePolicy(Random random)
Method Summary
void | close() Release all resources for the policy.
MergePolicy.MergeSpecification | findForcedDeletesMerges(SegmentInfos segmentInfos) Determine what set of merge operations is necessary in order to expunge all deletes from the index.
MergePolicy.MergeSpecification | findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge) Determine what set of merge operations is necessary in order to merge to <= the specified segment count.
MergePolicy.MergeSpecification | findMerges(SegmentInfos segmentInfos) Determine what set of merge operations are now necessary on the index.
boolean | useCompoundFile(SegmentInfos infos, SegmentInfo mergedInfo) Returns true if a new segment (regardless of its origin) should use the compound file format.
Methods inherited from class org.apache.lucene.index.MergePolicy
setIndexWriter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MockRandomMergePolicy

public MockRandomMergePolicy(Random random)
Method Detail

findMerges

public MergePolicy.MergeSpecification findMerges(SegmentInfos segmentInfos)
Description copied from class: MergePolicy
Determine what set of merge operations are now necessary on the index. IndexWriter calls this whenever there is a change to the segments. This call is always synchronized on the IndexWriter instance so only one thread at a time will call this method.

Specified by:
findMerges in class MergePolicy
Parameters:
segmentInfos - the total set of segments in the index

findForcedMerges

public MergePolicy.MergeSpecification findForcedMerges(SegmentInfos segmentInfos,
                                                       int maxSegmentCount,
                                                       Map<SegmentInfo,Boolean> segmentsToMerge)
                                                throws CorruptIndexException,
                                                       IOException
Description copied from class: MergePolicy
Determine what set of merge operations is necessary in order to merge to <= the specified segment count. IndexWriter calls this when its IndexWriter.forceMerge(int) method is called. This call is always synchronized on the IndexWriter instance so only one thread at a time will call this method.

Specified by:
findForcedMerges in class MergePolicy
Parameters:
segmentInfos - the total set of segments in the index
maxSegmentCount - requested maximum number of segments in the index (currently this is always 1)
segmentsToMerge - contains the specific SegmentInfo instances that must be merged away. This may be a subset of all SegmentInfos. If the value is True for a given SegmentInfo, that means this segment was an original segment present in the to-be-merged index; else, it was a segment produced by a cascaded merge.
Throws:
CorruptIndexException
IOException

findForcedDeletesMerges

public MergePolicy.MergeSpecification findForcedDeletesMerges(SegmentInfos segmentInfos)
                                                       throws CorruptIndexException,
                                                              IOException
Description copied from class: MergePolicy
Determine what set of merge operations is necessary in order to expunge all deletes from the index.

Specified by:
findForcedDeletesMerges in class MergePolicy
Parameters:
segmentInfos - the total set of segments in the index
Throws:
CorruptIndexException
IOException

close

public void close()
Description copied from class: MergePolicy
Release all resources for the policy.

Specified by:
close in interface Closeable
Specified by:
close in class MergePolicy

useCompoundFile

public boolean useCompoundFile(SegmentInfos infos,
                               SegmentInfo mergedInfo)
                        throws IOException
Description copied from class: MergePolicy
Returns true if a new segment (regardless of its origin) should use the compound file format.

Specified by:
useCompoundFile in class MergePolicy
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiPassIndexSplitter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class MultiPassIndexSplitter

java.lang.Object
    extended by  org.apache.lucene.index.MultiPassIndexSplitter

public class MultiPassIndexSplitter
extends Object

This tool splits input index into multiple equal parts. The method employed here uses IndexWriter.addIndexes(IndexReader...) where the input data comes from the input index with artificially applied deletes to the document id-s that fall outside the selected partition.

Note 1: Deletes are only applied to a buffered list of deleted docs and don't affect the source index - this tool works also with read-only indexes.

Note 2: the disadvantage of this tool is that source index needs to be read as many times as there are parts to be created, hence the name of this tool.

NOTE: this tool is unaware of documents added atomically via IndexWriter.addDocuments(java.util.Collection) or IndexWriter.updateDocuments(org.apache.lucene.index.Term, java.util.Collection), which means it can easily break up such document groups.

Constructor Summary
MultiPassIndexSplitter()
Method Summary
static void main(String[] args)
 void split(IndexReader input, Directory[] outputs, boolean seq)
Deprecated. use split(Version, IndexReader, Directory[], boolean) instead. This method will be removed in Lucene 4.0.
 void split(Version version, IndexReader input, Directory[] outputs, boolean seq)
Split source index into multiple parts.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MultiPassIndexSplitter

public MultiPassIndexSplitter()
Method Detail

split

@Deprecated
public void split(IndexReader input,
                             Directory[] outputs,
                             boolean seq)
           throws IOException
Deprecated. use split(Version, IndexReader, Directory[], boolean) instead. This method will be removed in Lucene 4.0.

Split source index into multiple parts.

Parameters:
input - source index, can be read-only, can have deletions, can have multiple segments (or multiple readers).
outputs - list of directories where the output parts will be stored.
seq - if true, then the source index will be split into equal increasing ranges of document id-s. If false, source document id-s will be assigned in a deterministic round-robin fashion to one of the output splits.
Throws:
IOException

split

public void split(Version version,
                  IndexReader input,
                  Directory[] outputs,
                  boolean seq)
           throws IOException
Split source index into multiple parts.

Parameters:
input - source index, can be read-only, can have deletions, can have multiple segments (or multiple readers).
outputs - list of directories where the output parts will be stored.
seq - if true, then the source index will be split into equal increasing ranges of document id-s. If false, source document id-s will be assigned in a deterministic round-robin fashion to one of the output splits.
Throws:
IOException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultipleTermPositions

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class MultipleTermPositions

java.lang.Object
    extended by  org.apache.lucene.index.MultipleTermPositions
All Implemented Interfaces:
Closeable, TermDocs, TermPositions
public class MultipleTermPositions
extends Object
implements TermPositions

Allows you to iterate over the TermPositions for multiple Terms as a single TermPositions.

Constructor Summary
MultipleTermPositions(IndexReader indexReader, Term[] terms)
Creates a new MultipleTermPositions instance.
Method Summary
void | close() Frees associated resources.
int | doc() Returns the current document number.
int | freq() Returns the frequency of the term within the current document.
byte[] | getPayload(byte[] data, int offset) Not implemented.
int | getPayloadLength() Not implemented.
boolean | isPayloadAvailable() Checks if a payload can be loaded at this position.
boolean | next() Moves to the next pair in the enumeration.
int | nextPosition() Returns next position in the current document.
int | read(int[] arg0, int[] arg1) Not implemented.
void | seek(Term arg0) Not implemented.
void | seek(TermEnum termEnum) Not implemented.
boolean | skipTo(int target) Skips entries to the first beyond the current whose document number is greater than or equal to target.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MultipleTermPositions

public MultipleTermPositions(IndexReader indexReader,
                             Term[] terms)
                      throws IOException
Creates a new MultipleTermPositions instance.

Throws:
IOException
Method Detail

next

public final boolean next()
                   throws IOException
Description copied from interface: TermDocs
Moves to the next pair in the enumeration.

Returns true iff there is such a next pair in the enumeration. Once this returns false you should not call any of the other methods.

Specified by:
next in interface TermDocs
Throws:
IOException

nextPosition

public final int nextPosition()
Description copied from interface: TermPositions
Returns next position in the current document. It is an error to call this more than TermDocs.freq() times without calling TermDocs.next()

This is invalid until TermDocs.next() is called for the first time.

Specified by:
nextPosition in interface TermPositions

skipTo

public final boolean skipTo(int target)
                     throws IOException
Description copied from interface: TermDocs
Skips entries to the first beyond the current whose document number is greater than or equal to target.

Returns true iff there is such an entry.

Behaves as if written:

   boolean skipTo(int target) {
     do {
       if (!next())
             return false;
     } while (target > doc());
     return true;
   }
Some implementations are considerably more efficient than that.

Specified by:
skipTo in interface TermDocs
Throws:
IOException

doc

public final int doc()
Description copied from interface: TermDocs
Returns the current document number.

This is invalid until TermDocs.next() is called for the first time.

Specified by:
doc in interface TermDocs

freq

public final int freq()
Description copied from interface: TermDocs
Returns the frequency of the term within the current document.

This is invalid until TermDocs.next() is called for the first time.

Specified by:
freq in interface TermDocs

close

public final void close()
                 throws IOException
Description copied from interface: TermDocs
Frees associated resources.

Specified by:
close in interface Closeable
Specified by:
close in interface TermDocs
Throws:
IOException

seek

public void seek(Term arg0)
          throws IOException
Not implemented.

Specified by:
seek in interface TermDocs
Throws:
UnsupportedOperationException
IOException

seek

public void seek(TermEnum termEnum)
          throws IOException
Not implemented.

Specified by:
seek in interface TermDocs
Throws:
UnsupportedOperationException
IOException

read

public int read(int[] arg0,
                int[] arg1)
         throws IOException
Not implemented.

Specified by:
read in interface TermDocs
Throws:
UnsupportedOperationException
IOException

getPayloadLength

public int getPayloadLength()
Not implemented.

Specified by:
getPayloadLength in interface TermPositions
Returns:
length of the current payload in number of bytes
Throws:
UnsupportedOperationException

getPayload

public byte[] getPayload(byte[] data,
                         int offset)
                  throws IOException
Not implemented.

Specified by:
getPayload in interface TermPositions
Parameters:
data - the array into which the data of this payload is to be stored, if it is big enough; otherwise, a new byte[] array is allocated for this purpose.
offset - the offset in the array into which the data of this payload is to be stored.
Returns:
a byte[] array containing the data of this payload
Throws:
UnsupportedOperationException
IOException

isPayloadAvailable

public boolean isPayloadAvailable()
Description copied from interface: TermPositions
Checks if a payload can be loaded at this position.

Payloads can only be loaded once per call to TermPositions.nextPosition().

Specified by:
isPayloadAvailable in interface TermPositions
Returns:
false
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class MultiReader

java.lang.Object
    extended by  org.apache.lucene.index.IndexReader
        extended by  org.apache.lucene.index.MultiReader
All Implemented Interfaces:
Closeable, Cloneable
Direct Known Subclasses:
SlowMultiReaderWrapper
public class MultiReader
extends IndexReader
implements Cloneable

An IndexReader which reads multiple indexes, appending their content.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader
IndexReader.ReaderClosedListener
Field Summary
protected int[] | starts
protected IndexReader[] | subReaders
Fields inherited from class org.apache.lucene.index.IndexReader
hasChanges
Constructor Summary
MultiReader(IndexReader... subReaders)
Construct a MultiReader aggregating the named set of (sub)readers.
MultiReader(IndexReader[] subReaders, boolean closeSubReaders)
Construct a MultiReader aggregating the named set of (sub)readers.
Method Summary
Object | clone() Efficiently clones the IndexReader (sharing most internal state).
IndexReader | clone(boolean openReadOnly) Deprecated. Write support will be removed in Lucene 4.0. Use clone() instead.
int | docFreq(Term t) Returns the number of documents containing the term t.
protected void | doClose() Implements close.
protected void | doCommit(Map<String,String> commitUserData) Deprecated.
Document | document(int n, FieldSelector fieldSelector) Get the Document at the n th position.
protected void | doDelete(int n) Deprecated.
protected IndexReader | doOpenIfChanged() If the index has changed since it was opened, open and return a new reader; else, return null.
protected IndexReader | doOpenIfChanged(boolean openReadOnly) Deprecated. Write support will be removed in Lucene 4.0. Use doOpenIfChanged() instead.
protected void | doSetNorm(int n, String field, byte value) Deprecated.
protected void | doUndeleteAll() Deprecated.
FieldInfos | getFieldInfos() Get the FieldInfos describing all fields in this reader.
IndexReader[] | getSequentialSubReaders() Expert: returns the sequential sub readers that this reader is logically composed of.
TermFreqVector | getTermFreqVector(int n, String field) Return a term frequency vector for the specified document and field.
void | getTermFreqVector(int docNumber, String field, TermVectorMapper mapper) Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the TermFreqVector.
void | getTermFreqVector(int docNumber, TermVectorMapper mapper) Map all the term vectors for all fields in a Document
TermFreqVector[] | getTermFreqVectors(int n) Return an array of term frequency vectors for the specified document.
long | getVersion() Not implemented.
boolean | hasDeletions() Returns true if any documents have been deleted
boolean | hasNorms(String field) Returns true if there are norms stored for this field.
boolean | isCurrent() Checks recursively if all subreaders are up to date.
boolean | isDeleted(int n) Returns true if document n has been deleted
boolean | isOptimized() Deprecated.
int | maxDoc() Returns one greater than the largest possible document number.
byte[] | norms(String field) Returns the byte-encoded normalization factor for the named field of every document.
void | norms(String field, byte[] result, int offset) Reads the byte-encoded normalization factor for the named field of every document.
int | numDocs() Returns the number of documents in this index.
protected int | readerIndex(int n)
TermDocs | termDocs() Returns an unpositioned TermDocs enumerator.
TermDocs | termDocs(Term term) Returns an enumeration of all the documents which contain term.
TermPositions | termPositions() Returns an unpositioned TermPositions enumerator.
TermEnum | terms() Returns an enumeration of all the terms in the index.
TermEnum | terms(Term term) Returns an enumeration of all terms starting at a given term.
Methods inherited from class org.apache.lucene.index.IndexReader
acquireWriteLock, addReaderClosedListener, close, commit, commit, decRef, deleteDocument, deleteDocuments, directory, document, doOpenIfChanged, doOpenIfChanged, ensureOpen, flush, flush, getCommitUserData, getCommitUserData, getCoreCacheKey, getCurrentVersion, getDeletesCacheKey, getIndexCommit, getRefCount, getTermInfosIndexDivisor, getUniqueTermCount, incRef, indexExists, lastModified, listCommits, numDeletedDocs, open, open, open, open, open, open, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChanged, removeReaderClosedListener, reopen, reopen, reopen, reopen, setNorm, setNorm, termPositions, toString, tryIncRef, undeleteAll
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

subReaders

protected final IndexReader[] subReaders

starts

protected final int[] starts
Constructor Detail

MultiReader

public MultiReader(IndexReader... subReaders)

Construct a MultiReader aggregating the named set of (sub)readers. Directory locking for delete, undeleteAll, and setNorm operations is left to the subreaders.

Note that all subreaders are closed if this Multireader is closed.

Parameters:
subReaders - set of (sub)readers

MultiReader

public MultiReader(IndexReader[] subReaders,
                   boolean closeSubReaders)

Construct a MultiReader aggregating the named set of (sub)readers. Directory locking for delete, undeleteAll, and setNorm operations is left to the subreaders.

Parameters:
closeSubReaders - indicates whether the subreaders should be closed when this MultiReader is closed
subReaders - set of (sub)readers
Method Detail

getFieldInfos

public FieldInfos getFieldInfos()
Description copied from class: IndexReader
Get the FieldInfos describing all fields in this reader. NOTE: do not make any changes to the returned FieldInfos!

Specified by:
getFieldInfos in class IndexReader

doOpenIfChanged

protected IndexReader doOpenIfChanged()
                               throws CorruptIndexException,
                                      IOException
Description copied from class: IndexReader
If the index has changed since it was opened, open and return a new reader; else, return null.

Overrides:
doOpenIfChanged in class IndexReader
Throws:
CorruptIndexException
IOException
See Also:
IndexReader.openIfChanged(IndexReader)

doOpenIfChanged

@Deprecated
protected IndexReader doOpenIfChanged(boolean openReadOnly)
                               throws CorruptIndexException,
                                      IOException
Deprecated. Write support will be removed in Lucene 4.0. Use doOpenIfChanged() instead.

Description copied from class: IndexReader
If the index has changed since it was opened, open and return a new reader; else, return null.

Overrides:
doOpenIfChanged in class IndexReader
Throws:
UnsupportedOperationException - MultiReaders cannot support changing the readOnly flag
CorruptIndexException
IOException
See Also:
IndexReader.openIfChanged(IndexReader, boolean)

clone

public Object clone()
Description copied from class: IndexReader
Efficiently clones the IndexReader (sharing most internal state).

On cloning a reader with pending changes (deletions, norms), the original reader transfers its write lock to the cloned reader. This means only the cloned reader may make further changes to the index, and commit the changes to the index on close, but the old reader still reflects all changes made up until it was cloned.

Like IndexReader.openIfChanged(IndexReader), it's safe to make changes to either the original or the cloned reader: all shared mutable state obeys "copy on write" semantics to ensure the changes are not seen by other readers.

Overrides:
clone in class IndexReader

clone

@Deprecated
public IndexReader clone(boolean openReadOnly)
                  throws CorruptIndexException,
                         IOException
Deprecated. Write support will be removed in Lucene 4.0. Use clone() instead.

Description copied from class: IndexReader
Clones the IndexReader and optionally changes readOnly. A readOnly reader cannot open a writeable reader.

Overrides:
clone in class IndexReader
Throws:
UnsupportedOperationException - MultiReaders cannot support changing the readOnly flag
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

getTermFreqVectors

public TermFreqVector[] getTermFreqVectors(int n)
                                    throws IOException
Description copied from class: IndexReader
Return an array of term frequency vectors for the specified document. The array contains a vector for each vectorized field in the document. Each vector contains terms and frequencies for all terms in a given vectorized field. If no such fields existed, the method returns null. The term vectors that are returned may either be of type TermFreqVector or of type TermPositionVector if positions or offsets have been stored.

Specified by:
getTermFreqVectors in class IndexReader
Parameters:
n - document for which term frequency vectors are returned
Returns:
array of term frequency vectors. May be null if no term vectors have been stored for the specified document.
Throws:
IOException - if index cannot be accessed
See Also:
Field.TermVector

getTermFreqVector

public TermFreqVector getTermFreqVector(int n,
                                        String field)
                                 throws IOException
Description copied from class: IndexReader
Return a term frequency vector for the specified document and field. The returned vector contains terms and frequencies for the terms in the specified field of this document, if the field had the storeTermVector flag set. If termvectors had been stored with positions or offsets, a TermPositionVector is returned.

Specified by:
getTermFreqVector in class IndexReader
Parameters:
n - document for which the term frequency vector is returned
field - field for which the term frequency vector is returned.
Returns:
term frequency vector May be null if field does not exist in the specified document or term vector was not stored.
Throws:
IOException - if index cannot be accessed
See Also:
Field.TermVector

getTermFreqVector

public void getTermFreqVector(int docNumber,
                              String field,
                              TermVectorMapper mapper)
                       throws IOException
Description copied from class: IndexReader
Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the TermFreqVector.

Specified by:
getTermFreqVector in class IndexReader
Parameters:
docNumber - The number of the document to load the vector for
field - The name of the field to load
mapper - The TermVectorMapper to process the vector. Must not be null
Throws:
IOException - if term vectors cannot be accessed or if they do not exist on the field and doc. specified.

getTermFreqVector

public void getTermFreqVector(int docNumber,
                              TermVectorMapper mapper)
                       throws IOException
Description copied from class: IndexReader
Map all the term vectors for all fields in a Document

Specified by:
getTermFreqVector in class IndexReader
Parameters:
docNumber - The number of the document to load the vector for
mapper - The TermVectorMapper to process the vector. Must not be null
Throws:
IOException - if term vectors cannot be accessed or if they do not exist on the field and doc. specified.

isOptimized

@Deprecated
public boolean isOptimized()
Deprecated.

Overrides:
isOptimized in class IndexReader

numDocs

public int numDocs()
Description copied from class: IndexReader
Returns the number of documents in this index.

Specified by:
numDocs in class IndexReader

maxDoc

public int maxDoc()
Description copied from class: IndexReader
Returns one greater than the largest possible document number. This may be used to, e.g., determine how big to allocate an array which will have an element for every document number in an index.

Specified by:
maxDoc in class IndexReader

document

public Document document(int n,
                         FieldSelector fieldSelector)
                  throws CorruptIndexException,
                         IOException
Description copied from class: IndexReader
Get the Document at the n th position. The FieldSelector may be used to determine what Fields to load and how they should be loaded. NOTE: If this Reader (more specifically, the underlying FieldsReader) is closed before the lazy Field is loaded an exception may be thrown. If you want the value of a lazy Field to be available after closing you must explicitly load it or fetch the Document again with a new loader.

NOTE: for performance reasons, this method does not check if the requested document is deleted, and therefore asking for a deleted document may yield unspecified results. Usually this is not required, however you can call IndexReader.isDeleted(int) with the requested document ID to verify the document is not deleted.

Specified by:
document in class IndexReader
Parameters:
n - Get the document at the nth position
fieldSelector - The FieldSelector to use to determine what Fields should be loaded on the Document. May be null, in which case all Fields will be loaded.
Returns:
The stored fields of the Document at the nth position
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
Fieldable, FieldSelector, SetBasedFieldSelector, LoadFirstFieldSelector

isDeleted

public boolean isDeleted(int n)
Description copied from class: IndexReader
Returns true if document n has been deleted

Specified by:
isDeleted in class IndexReader

hasDeletions

public boolean hasDeletions()
Description copied from class: IndexReader
Returns true if any documents have been deleted

Specified by:
hasDeletions in class IndexReader

doDelete

@Deprecated
protected void doDelete(int n)
                 throws CorruptIndexException,
                        IOException
Deprecated.

Implements deletion of the document numbered docNum. Applications should call IndexReader.deleteDocument(int) or IndexReader.deleteDocuments(Term).

Specified by:
doDelete in class IndexReader
Throws:
CorruptIndexException
IOException

doUndeleteAll

@Deprecated
protected void doUndeleteAll()
                      throws CorruptIndexException,
                             IOException
Deprecated.

Implements actual undeleteAll() in subclass.

Specified by:
doUndeleteAll in class IndexReader
Throws:
CorruptIndexException
IOException

readerIndex

protected int readerIndex(int n)

hasNorms

public boolean hasNorms(String field)
                 throws IOException
Description copied from class: IndexReader
Returns true if there are norms stored for this field.

Overrides:
hasNorms in class IndexReader
Throws:
IOException

norms

public byte[] norms(String field)
             throws IOException
Description copied from class: IndexReader
Returns the byte-encoded normalization factor for the named field of every document. This is used by the search code to score documents. Returns null if norms were not indexed for this field.

Specified by:
norms in class IndexReader
Throws:
IOException
See Also:
AbstractField.setBoost(float)

norms

public void norms(String field,
                  byte[] result,
                  int offset)
           throws IOException
Description copied from class: IndexReader
Reads the byte-encoded normalization factor for the named field of every document. This is used by the search code to score documents.

Specified by:
norms in class IndexReader
Throws:
IOException
See Also:
AbstractField.setBoost(float)

doSetNorm

@Deprecated
protected void doSetNorm(int n,
                                    String field,
                                    byte value)
                  throws CorruptIndexException,
                         IOException
Deprecated.

Implements setNorm in subclass.

Specified by:
doSetNorm in class IndexReader
Throws:
CorruptIndexException
IOException

terms

public TermEnum terms()
               throws IOException
Description copied from class: IndexReader
Returns an enumeration of all the terms in the index. The enumeration is ordered by Term.compareTo(). Each term is greater than all that precede it in the enumeration. Note that after calling terms(), TermEnum.next() must be called on the resulting enumeration before calling other methods such as TermEnum.term().

Specified by:
terms in class IndexReader
Throws:
IOException - if there is a low-level IO error

terms

public TermEnum terms(Term term)
               throws IOException
Description copied from class: IndexReader
Returns an enumeration of all terms starting at a given term. If the given term does not exist, the enumeration is positioned at the first term greater than the supplied term. The enumeration is ordered by Term.compareTo(). Each term is greater than all that precede it in the enumeration.

Specified by:
terms in class IndexReader
Throws:
IOException - if there is a low-level IO error

docFreq

public int docFreq(Term t)
            throws IOException
Description copied from class: IndexReader
Returns the number of documents containing the term t.

Specified by:
docFreq in class IndexReader
Throws:
IOException - if there is a low-level IO error

termDocs

public TermDocs termDocs()
                  throws IOException
Description copied from class: IndexReader
Returns an unpositioned TermDocs enumerator.

Note: the TermDocs returned is unpositioned. Before using it, ensure that you first position it with TermDocs.seek(Term) or TermDocs.seek(TermEnum).

Specified by:
termDocs in class IndexReader
Throws:
IOException - if there is a low-level IO error

termDocs

public TermDocs termDocs(Term term)
                  throws IOException
Description copied from class: IndexReader
Returns an enumeration of all the documents which contain term. For each document, the document number, the frequency of the term in that document is also provided, for use in search scoring. If term is null, then all non-deleted docs are returned with freq=1. Thus, this method implements the mapping:

    Term => <docNum, freq>*

The enumeration is ordered by document number. Each document number is greater than all that precede it in the enumeration.

Overrides:
termDocs in class IndexReader
Throws:
IOException - if there is a low-level IO error

termPositions

public TermPositions termPositions()
                            throws IOException
Description copied from class: IndexReader
Returns an unpositioned TermPositions enumerator.

Specified by:
termPositions in class IndexReader
Throws:
IOException - if there is a low-level IO error

doCommit

@Deprecated
protected void doCommit(Map<String,String> commitUserData)
                 throws IOException
Deprecated.

Implements commit.

Specified by:
doCommit in class IndexReader
Throws:
IOException

doClose

protected void doClose()
                throws IOException
Description copied from class: IndexReader
Implements close.

Specified by:
doClose in class IndexReader
Throws:
IOException

isCurrent

public boolean isCurrent()
                  throws CorruptIndexException,
                         IOException
Checks recursively if all subreaders are up to date.

Overrides:
isCurrent in class IndexReader
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

getVersion

public long getVersion()
Not implemented.

Overrides:
getVersion in class IndexReader
Throws:
UnsupportedOperationException

getSequentialSubReaders

public IndexReader[] getSequentialSubReaders()
Description copied from class: IndexReader
Expert: returns the sequential sub readers that this reader is logically composed of. For example, IndexSearcher uses this API to drive searching by one sub reader at a time. If this reader is not composed of sequential child readers, it should return null. If this method returns an empty array, that means this reader is a null reader (for example a MultiReader that has no sub readers).

NOTE: You should not try using sub-readers returned by this method to make any changes (setNorm, deleteDocument, etc.). While this might succeed for one composite reader (like MultiReader), it will most likely lead to index corruption for other readers (like DirectoryReader obtained through IndexReader.open(org.apache.lucene.store.Directory). Use the parent reader directly.

Overrides:
getSequentialSubReaders in class IndexReader
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoDeletionPolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class NoDeletionPolicy

java.lang.Object
    extended by  org.apache.lucene.index.NoDeletionPolicy
All Implemented Interfaces:
IndexDeletionPolicy
public final class NoDeletionPolicy
extends Object
implements IndexDeletionPolicy

An IndexDeletionPolicy which keeps all index commits around, never deleting them. This class is a singleton and can be accessed by referencing INSTANCE.

Field Summary
static IndexDeletionPolicy INSTANCE
The single instance of this class.
Method Summary
void | onCommit(List<? extends IndexCommit> commits) This is called each time the writer completed a commit.
void | onInit(List<? extends IndexCommit> commits) This is called once when a writer is first instantiated to give the policy a chance to remove old commit points.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

INSTANCE

public static final IndexDeletionPolicy INSTANCE
The single instance of this class.

Method Detail

onCommit

public void onCommit(List<? extends IndexCommit> commits)
              throws IOException
Description copied from interface: IndexDeletionPolicy

This is called each time the writer completed a commit. This gives the policy a chance to remove old commit points with each commit.

The policy may now choose to delete old commit points by calling method delete() of IndexCommit.

This method is only called when IndexWriter.commit() or IndexWriter.close() is called, or possibly not at all if the IndexWriter.rollback() is called.

Note: the last CommitPoint is the most recent one, i.e. the "front index state". Be careful not to delete it, unless you know for sure what you are doing, and unless you can afford to lose the index content while doing that.

Specified by:
onCommit in interface IndexDeletionPolicy
Parameters:
commits - List of IndexCommit, sorted by age (the 0th one is the oldest commit).
Throws:
IOException

onInit

public void onInit(List<? extends IndexCommit> commits)
            throws IOException
Description copied from interface: IndexDeletionPolicy

This is called once when a writer is first instantiated to give the policy a chance to remove old commit points.

The writer locates all index commits present in the index directory and calls this method. The policy may choose to delete some of the commit points, doing so by calling method delete() of IndexCommit.

Note: the last CommitPoint is the most recent one, i.e. the "front index state". Be careful not to delete it, unless you know for sure what you are doing, and unless you can afford to lose the index content while doing that.

Specified by:
onInit in interface IndexDeletionPolicy
Parameters:
commits - List of current point-in-time commits, sorted by age (the 0th one is the oldest commit).
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoMergePolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class NoMergePolicy

java.lang.Object
    extended by  org.apache.lucene.index.MergePolicy
        extended by  org.apache.lucene.index.NoMergePolicy
All Implemented Interfaces:
Closeable
public final class NoMergePolicy
extends MergePolicy

A MergePolicy which never returns merges to execute (hence it's name). It is also a singleton and can be accessed through NO_COMPOUND_FILES if you want to indicate the index does not use compound files, or through COMPOUND_FILES otherwise. Use it if you want to prevent an IndexWriter from ever executing merges, without going through the hassle of tweaking a merge policy's settings to achieve that, such as changing its merge factor.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.MergePolicy
MergePolicy.MergeAbortedException, MergePolicy.MergeException, MergePolicy.MergeSpecification, MergePolicy.OneMerge
Field Summary
static MergePolicy | COMPOUND_FILES A singleton NoMergePolicy which indicates the index uses compound files.
static MergePolicy | NO_COMPOUND_FILES A singleton NoMergePolicy which indicates the index does not use compound files.
Fields inherited from class org.apache.lucene.index.MergePolicy
writer
Method Summary
void | close() Release all resources for the policy.
MergePolicy.MergeSpecification | findForcedDeletesMerges(SegmentInfos segmentInfos) Determine what set of merge operations is necessary in order to expunge all deletes from the index.
MergePolicy.MergeSpecification | findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge) Determine what set of merge operations is necessary in order to merge to <= the specified segment count.
MergePolicy.MergeSpecification | findMerges(SegmentInfos segmentInfos) Determine what set of merge operations are now necessary on the index.
void | setIndexWriter(IndexWriter writer) Sets the IndexWriter to use by this merge policy.
String | toString()
boolean | useCompoundFile(SegmentInfos segments, SegmentInfo newSegment) Returns true if a new segment (regardless of its origin) should use the compound file format.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

NO_COMPOUND_FILES

public static final MergePolicy NO_COMPOUND_FILES
A singleton NoMergePolicy which indicates the index does not use compound files.

COMPOUND_FILES

public static final MergePolicy COMPOUND_FILES
A singleton NoMergePolicy which indicates the index uses compound files.

Method Detail

close

public void close()
Description copied from class: MergePolicy
Release all resources for the policy.

Specified by:
close in interface Closeable
Specified by:
close in class MergePolicy

findMerges

public MergePolicy.MergeSpecification findMerges(SegmentInfos segmentInfos)
                                          throws CorruptIndexException,
                                                 IOException
Description copied from class: MergePolicy
Determine what set of merge operations are now necessary on the index. IndexWriter calls this whenever there is a change to the segments. This call is always synchronized on the IndexWriter instance so only one thread at a time will call this method.

Specified by:
findMerges in class MergePolicy
Parameters:
segmentInfos - the total set of segments in the index
Throws:
CorruptIndexException
IOException

findForcedMerges

public MergePolicy.MergeSpecification findForcedMerges(SegmentInfos segmentInfos,
                                                       int maxSegmentCount,
                                                       Map<SegmentInfo,Boolean> segmentsToMerge)
                                                throws CorruptIndexException,
                                                       IOException
Description copied from class: MergePolicy
Determine what set of merge operations is necessary in order to merge to <= the specified segment count. IndexWriter calls this when its IndexWriter.forceMerge(int) method is called. This call is always synchronized on the IndexWriter instance so only one thread at a time will call this method.

Specified by:
findForcedMerges in class MergePolicy
Parameters:
segmentInfos - the total set of segments in the index
maxSegmentCount - requested maximum number of segments in the index (currently this is always 1)
segmentsToMerge - contains the specific SegmentInfo instances that must be merged away. This may be a subset of all SegmentInfos. If the value is True for a given SegmentInfo, that means this segment was an original segment present in the to-be-merged index; else, it was a segment produced by a cascaded merge.
Throws:
CorruptIndexException
IOException

findForcedDeletesMerges

public MergePolicy.MergeSpecification findForcedDeletesMerges(SegmentInfos segmentInfos)
                                                       throws CorruptIndexException,
                                                              IOException
Description copied from class: MergePolicy
Determine what set of merge operations is necessary in order to expunge all deletes from the index.

Specified by:
findForcedDeletesMerges in class MergePolicy
Parameters:
segmentInfos - the total set of segments in the index
Throws:
CorruptIndexException
IOException

useCompoundFile

public boolean useCompoundFile(SegmentInfos segments,
                               SegmentInfo newSegment)
Description copied from class: MergePolicy
Returns true if a new segment (regardless of its origin) should use the compound file format.

Specified by:
useCompoundFile in class MergePolicy

setIndexWriter

public void setIndexWriter(IndexWriter writer)
Description copied from class: MergePolicy
Sets the IndexWriter to use by this merge policy. This method is allowed to be called only once, and is usually set by IndexWriter. If it is called more than once, SetOnce.AlreadySetException is thrown.

Overrides:
setIndexWriter in class MergePolicy
See Also:
SetOnce

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoMergeScheduler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class NoMergeScheduler

java.lang.Object
    extended by  org.apache.lucene.index.MergeScheduler
        extended by  org.apache.lucene.index.NoMergeScheduler

public final class NoMergeScheduler
extends MergeScheduler

A MergeScheduler which never executes any merges. It is also a singleton and can be accessed through INSTANCE. Use it if you want to prevent an IndexWriter from ever executing merges, irregardless of the MergePolicy used. Note that you can achieve the same thing by using NoMergePolicy, however with NoMergeScheduler you also ensure that no unnecessary code of any MergeScheduler implementation is ever executed. Hence it is recommended to use both if you want to disable merges from ever happening.

Field Summary
static MergeScheduler INSTANCE
The single instance of NoMergeScheduler
Method Summary
void | close() Close this MergeScheduler.
void | merge(IndexWriter writer) Run the merges provided by IndexWriter.getNextMerge().
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

INSTANCE

public static final MergeScheduler INSTANCE
The single instance of NoMergeScheduler

Method Detail

close

public void close()
Description copied from class: MergeScheduler
Close this MergeScheduler.

Specified by:
close in class MergeScheduler

merge

public void merge(IndexWriter writer)
           throws CorruptIndexException,
                  IOException
Description copied from class: MergeScheduler
Run the merges provided by IndexWriter.getNextMerge().

Specified by:
merge in class MergeScheduler
Throws:
CorruptIndexException
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.index
Interfaces
IndexDeletionPolicy
IndexReader.ReaderClosedListener
SegmentReader.CoreClosedListener
TermDocs
TermFreqVector
TermPositions
TermPositionVector
Classes
AbstractAllTermDocs
BalancedSegmentMergePolicy
BalancedSegmentMergePolicy.MergePolicyParams
CheckIndex
CheckIndex.Status
CheckIndex.Status.FieldNormStatus
CheckIndex.Status.SegmentInfoStatus
CheckIndex.Status.StoredFieldStatus
CheckIndex.Status.TermIndexStatus
CheckIndex.Status.TermVectorStatus
CompoundFileExtractor
CompoundFileWriter
ConcurrentMergeScheduler
FieldInfo
FieldInfos
FieldInvertState
FieldNormModifier
FieldSortedTermVectorMapper
FilterIndexReader
FilterIndexReader.FilterTermDocs
FilterIndexReader.FilterTermEnum
FilterIndexReader.FilterTermPositions
IndexCommit
IndexFileNameFilter
IndexFileNames
IndexReader
IndexSorter
IndexSplitter
IndexUpgrader
IndexWriter
IndexWriter.IndexReaderWarmer
IndexWriter.MaxFieldLength
IndexWriterConfig
KeepOnlyLastCommitDeletionPolicy
LogByteSizeMergePolicy
LogDocMergePolicy
LogMergePolicy
MergePolicy
MergePolicy.MergeSpecification
MergePolicy.OneMerge
MergeScheduler
MockIndexInput
MockRandomMergePolicy
MultiPassIndexSplitter
MultipleTermPositions
MultiReader
NoDeletionPolicy
NoMergePolicy
NoMergeScheduler
ParallelReader
Payload
PayloadProcessorProvider
PayloadProcessorProvider.DirPayloadProcessor
PayloadProcessorProvider.PayloadProcessor
PayloadProcessorProvider.ReaderPayloadProcessor
PersistentSnapshotDeletionPolicy
PKIndexSplitter
PositionBasedTermVectorMapper
PositionBasedTermVectorMapper.TVPositionInfo
PruningReader
RandomIndexWriter
SegmentInfo
SegmentInfos
SegmentInfos.FindSegmentsFile
SegmentReader
SegmentWriteState
SerialMergeScheduler
SlowMultiReaderWrapper
SnapshotDeletionPolicy
SortedTermVectorMapper
Term
TermEnum
TermVectorAccessor
TermVectorEntry
TermVectorEntryFreqSortedComparator
TermVectorMapper
TermVectorOffsetInfo
ThreadedIndexingAndSearchingTestCase
TieredMergePolicy
TieredMergePolicy.MergeScore
UpgradeIndexMergePolicy
Enums
FieldInfo.IndexOptions
IndexWriterConfig.OpenMode
Exceptions
CorruptIndexException
FieldReaderException
IndexFormatTooNewException
IndexFormatTooOldException
IndexNotFoundException
MergePolicy.MergeAbortedException
MergePolicy.MergeException
StaleReaderException


org.apache.lucene.index

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.index

Code to maintain and access indices.

See:
Description

Interface Summary
IndexDeletionPolicy | Expert: policy for deletion of stale index commits.
IndexReader.ReaderClosedListener | A custom listener that's invoked when the IndexReader is closed.
SegmentReader.CoreClosedListener | Called when the shared core for this SegmentReader is closed.
TermDocs | TermDocs provides an interface for enumerating <document, frequency> pairs for a term.
TermFreqVector | Provides access to stored term vector of a document field.
TermPositions | TermPositions provides an interface for enumerating the <document, frequency, <position>* > tuples for a term.
TermPositionVector | Extends TermFreqVector to provide additional information about positions in which each of the terms is found.

Class Summary
AbstractAllTermDocs | Base class for enumerating all but deleted docs.
BalancedSegmentMergePolicy | Merge policy that tries to balance not doing large segment merges with not accumulating too many segments in the index, to provide for better performance in near real-time setting.
BalancedSegmentMergePolicy.MergePolicyParams | Specifies configuration parameters for BalancedSegmentMergePolicy.
CheckIndex | Basic tool and API to check the health of an index and write a new segments file that removes reference to problematic segments.
CheckIndex.Status | Returned from CheckIndex.checkIndex() detailing the health and status of the index.
CheckIndex.Status.FieldNormStatus | Status from testing field norms.
CheckIndex.Status.SegmentInfoStatus | Holds the status of each segment in the index.
CheckIndex.Status.StoredFieldStatus | Status from testing stored fields.
CheckIndex.Status.TermIndexStatus | Status from testing term index.
CheckIndex.Status.TermVectorStatus | Status from testing stored fields.
CompoundFileExtractor | Command-line tool for extracting sub-files out of a compound file.
CompoundFileWriter | Combines multiple files into a single compound file.
ConcurrentMergeScheduler | A MergeScheduler that runs each merge using a separate thread.
FieldInfo | Access to the Fieldable Info file that describes document fields and whether or not they are indexed.
FieldInfos | Collection of FieldInfos (accessible by number or by name).
FieldInvertState | This class tracks the number and position / offset parameters of terms being added to the index.
FieldNormModifier | Deprecated. This class is broken, as it does not correctly take position overlaps into account.
FieldSortedTermVectorMapper | For each Field, store a sorted collection of TermVectorEntrys This is not thread-safe.
FilterIndexReader | A FilterIndexReader contains another IndexReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
FilterIndexReader.FilterTermDocs | Base class for filtering TermDocs implementations.
FilterIndexReader.FilterTermEnum | Base class for filtering TermEnum implementations.
FilterIndexReader.FilterTermPositions | Base class for filtering TermPositions implementations.
IndexCommit | Expert: represents a single commit into an index as seen by the IndexDeletionPolicy or IndexReader.
IndexFileNameFilter | Filename filter that accept filenames and extensions only created by Lucene.
IndexFileNames | This class contains useful constants representing filenames and extensions used by lucene, as well as convenience methods for querying whether a file name matches an extension (matchesExtension), as well as generating file names from a segment name, generation and extension ( fileNameFromGeneration, segmentFileName).
IndexReader | IndexReader is an abstract class, providing an interface for accessing an index.
IndexSorter | Sort an index by document importance factor.
IndexSplitter | Command-line tool that enables listing segments in an index, copying specific segments to another index, and deleting segments from an index.
IndexUpgrader | This is an easy-to-use tool that upgrades all segments of an index from previous Lucene versions to the current segment file format.
IndexWriter | An IndexWriter creates and maintains an index.
IndexWriter.IndexReaderWarmer | If IndexWriter.getReader() has been called (ie, this writer is in near real-time mode), then after a merge completes, this class can be invoked to warm the reader on the newly merged segment, before the merge commits.
IndexWriter.MaxFieldLength | Deprecated. use LimitTokenCountAnalyzer instead.
IndexWriterConfig | Holds all the configuration of IndexWriter.
KeepOnlyLastCommitDeletionPolicy | This IndexDeletionPolicy implementation that keeps only the most recent commit and immediately removes all prior commits after a new commit is done.
LogByteSizeMergePolicy | This is a LogMergePolicy that measures size of a segment as the total byte size of the segment's files.
LogDocMergePolicy | This is a LogMergePolicy that measures size of a segment as the number of documents (not taking deletions into account).
LogMergePolicy | This class implements a MergePolicy that tries to merge segments into levels of exponentially increasing size, where each level has fewer segments than the value of the merge factor.
MergePolicy | Expert: a MergePolicy determines the sequence of primitive merge operations.
MergePolicy.MergeSpecification | A MergeSpecification instance provides the information necessary to perform multiple merges.
MergePolicy.OneMerge | OneMerge provides the information necessary to perform an individual primitive merge operation, resulting in a single new segment.
MergeScheduler | Expert: IndexWriter uses an instance implementing this interface to execute the merges selected by a MergePolicy.
MockIndexInput | IndexInput backed by a byte[] for testing.
MockRandomMergePolicy | MergePolicy that makes random decisions for testing.
MultiPassIndexSplitter | This tool splits input index into multiple equal parts.
MultipleTermPositions | Allows you to iterate over the TermPositions for multiple Terms as a single TermPositions.
MultiReader | An IndexReader which reads multiple indexes, appending their content.
NoDeletionPolicy | An IndexDeletionPolicy which keeps all index commits around, never deleting them.
NoMergePolicy | A MergePolicy which never returns merges to execute (hence it's name).
NoMergeScheduler | A MergeScheduler which never executes any merges.
ParallelReader | An IndexReader which reads multiple, parallel indexes.
Payload | A Payload is metadata that can be stored together with each occurrence of a term.
PayloadProcessorProvider | Provides a PayloadProcessorProvider.ReaderPayloadProcessor to be used for a Directory.
PayloadProcessorProvider.DirPayloadProcessor | Deprecated. Use PayloadProcessorProvider.ReaderPayloadProcessor instead.
PayloadProcessorProvider.PayloadProcessor | Processes the given payload.
PayloadProcessorProvider.ReaderPayloadProcessor | Returns a PayloadProcessorProvider.ReaderPayloadProcessor for a given Term which allows processing the payloads of different terms differently.
PersistentSnapshotDeletionPolicy | A SnapshotDeletionPolicy which adds a persistence layer so that snapshots can be maintained across the life of an application.
PKIndexSplitter | Split an index based on a Filter.
PositionBasedTermVectorMapper | For each Field, store position by position information.
PositionBasedTermVectorMapper.TVPositionInfo | Container for a term at a position
PruningReader | This class produces a subset of the input index, by removing some postings data according to rules implemented in a TermPruningPolicy, and optionally it can also remove stored fields of documents according to rules implemented in a StorePruningPolicy.
RandomIndexWriter | Silly class that randomizes the indexing experience.
SegmentInfo | Information about a segment such as it's name, directory, and files related to the segment.
SegmentInfos | A collection of segmentInfo objects with methods for operating on those segments in relation to the file system.
SegmentInfos.FindSegmentsFile | Utility class for executing code that needs to do something with the current segments file.
SegmentReader | IndexReader implementation over a single segment.
SegmentWriteState | Holder class for common parameters used during write.
SerialMergeScheduler | A MergeScheduler that simply does each merge sequentially, using the current thread.
SlowMultiReaderWrapper | Acts like Lucene 4.x's SlowMultiReaderWrapper for testing of top-level MultiTermEnum, MultiTermDocs, ...
SnapshotDeletionPolicy | An IndexDeletionPolicy that wraps around any other IndexDeletionPolicy and adds the ability to hold and later release snapshots of an index.
SortedTermVectorMapper | Store a sorted collection of TermVectorEntrys.
Term | A Term represents a word from text.
TermEnum | Abstract class for enumerating terms.
TermVectorAccessor | Transparent access to the vector space model, either via TermFreqVector or by resolving it from the inverted index.
TermVectorEntry | Convenience class for holding TermVector information.
TermVectorEntryFreqSortedComparator | Compares TermVectorEntrys first by frequency and then by the term (case-sensitive)
TermVectorMapper | The TermVectorMapper can be used to map Term Vectors into your own structure instead of the parallel array structure used by IndexReader.getTermFreqVector(int,String).
TermVectorOffsetInfo | The TermVectorOffsetInfo class holds information pertaining to a Term in a TermPositionVector's offset information.
ThreadedIndexingAndSearchingTestCase | Utility class that spawns multiple indexing and searching threads.
TieredMergePolicy | Merges segments of approximately equal size, subject to an allowed number of segments per tier.
TieredMergePolicy.MergeScore | Holds score and explanation for a single candidate merge.
UpgradeIndexMergePolicy | This MergePolicy is used for upgrading all existing segments of an index when calling IndexWriter.forceMerge(int).

Enum Summary
FieldInfo.IndexOptions | Controls how much information is stored in the postings lists.
IndexWriterConfig.OpenMode | Specifies the open mode for IndexWriter: IndexWriterConfig.OpenMode.CREATE - creates a new index or overwrites an existing one.

Exception Summary
CorruptIndexException | This exception is thrown when Lucene detects an inconsistency in the index.
FieldReaderException | Exception thrown when stored fields have an unexpected format.
IndexFormatTooNewException | This exception is thrown when Lucene detects an index that is newer than this Lucene version.
IndexFormatTooOldException | This exception is thrown when Lucene detects an index that is too old for this Lucene version
IndexNotFoundException | Signals that no index was found in the Directory.
MergePolicy.MergeAbortedException |
MergePolicy.MergeException | Exception thrown if there are any problems while executing a merge.
StaleReaderException | This exception is thrown when an IndexReader tries to make changes to the index (via IndexReader.deleteDocument(int), IndexReader.undeleteAll() or IndexReader.setNorm(int, java.lang.String, byte)) but changes have already been committed to the index since this reader was instantiated.

Package org.apache.lucene.index Description

Code to maintain and access indices.


org.apache.lucene.index Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.index

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.index.AbstractAllTermDocs (implements org.apache.lucene.index.TermDocs)
    • org.junit.Assert
      • org.apache.lucene.util.LuceneTestCase
        • org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase
    • org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams
    • org.apache.lucene.index.CheckIndex
    • org.apache.lucene.index.CheckIndex.Status
    • org.apache.lucene.index.CheckIndex.Status.FieldNormStatus
    • org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus
    • org.apache.lucene.index.CheckIndex.Status.StoredFieldStatus
    • org.apache.lucene.index.CheckIndex.Status.TermIndexStatus
    • org.apache.lucene.index.CheckIndex.Status.TermVectorStatus
    • org.apache.lucene.index.CompoundFileExtractor
    • org.apache.lucene.index.CompoundFileWriter
    • org.apache.lucene.store.DataInput (implements java.lang.Cloneable)
      • org.apache.lucene.store.IndexInput (implements java.lang.Cloneable, java.io.Closeable)
        • org.apache.lucene.store.BufferedIndexInput
          • org.apache.lucene.index.MockIndexInput
    • org.apache.lucene.index.FieldInfo
    • org.apache.lucene.index.FieldInfos (implements java.lang.Iterable<T>)
    • org.apache.lucene.index.FieldInvertState
    • org.apache.lucene.index.FieldNormModifier
    • org.apache.lucene.index.FilterIndexReader.FilterTermDocs (implements org.apache.lucene.index.TermDocs)
      • org.apache.lucene.index.FilterIndexReader.FilterTermPositions (implements org.apache.lucene.index.TermPositions)
    • org.apache.lucene.index.IndexCommit (implements java.lang.Comparable<T>)
      • org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint
    • org.apache.lucene.index.IndexFileNameFilter (implements java.io.FilenameFilter)
    • org.apache.lucene.index.IndexFileNames
    • org.apache.lucene.index.IndexReader (implements java.lang.Cloneable, java.io.Closeable)
      • org.apache.lucene.index.FilterIndexReader
        • org.apache.lucene.index.PruningReader
      • org.apache.lucene.index.MultiReader (implements java.lang.Cloneable)
        • org.apache.lucene.index.SlowMultiReaderWrapper
      • org.apache.lucene.index.ParallelReader
      • org.apache.lucene.index.SegmentReader (implements java.lang.Cloneable)
    • org.apache.lucene.index.IndexSorter
    • org.apache.lucene.index.IndexSplitter
    • org.apache.lucene.index.IndexUpgrader
    • org.apache.lucene.index.IndexWriter (implements java.io.Closeable, org.apache.lucene.util.TwoPhaseCommit)
    • org.apache.lucene.index.IndexWriter.IndexReaderWarmer
    • org.apache.lucene.index.IndexWriter.MaxFieldLength
    • org.apache.lucene.index.IndexWriterConfig (implements java.lang.Cloneable)
    • org.apache.lucene.index.KeepOnlyLastCommitDeletionPolicy (implements org.apache.lucene.index.IndexDeletionPolicy)
    • org.apache.lucene.index.MergePolicy (implements java.io.Closeable)
      • org.apache.lucene.index.LogMergePolicy
        • org.apache.lucene.index.LogByteSizeMergePolicy
          • org.apache.lucene.index.BalancedSegmentMergePolicy
        • org.apache.lucene.index.LogDocMergePolicy
      • org.apache.lucene.index.MockRandomMergePolicy
      • org.apache.lucene.index.NoMergePolicy
      • org.apache.lucene.index.TieredMergePolicy
      • org.apache.lucene.index.UpgradeIndexMergePolicy
    • org.apache.lucene.index.MergePolicy.MergeSpecification
    • org.apache.lucene.index.MergePolicy.OneMerge
    • org.apache.lucene.index.MergeScheduler
      • org.apache.lucene.index.ConcurrentMergeScheduler
      • org.apache.lucene.index.NoMergeScheduler
      • org.apache.lucene.index.SerialMergeScheduler
    • org.apache.lucene.index.MultiPassIndexSplitter
    • org.apache.lucene.index.MultipleTermPositions (implements org.apache.lucene.index.TermPositions)
    • org.apache.lucene.index.NoDeletionPolicy (implements org.apache.lucene.index.IndexDeletionPolicy)
    • org.apache.lucene.index.Payload (implements java.lang.Cloneable, java.io.Serializable)
    • org.apache.lucene.index.PayloadProcessorProvider
    • org.apache.lucene.index.PayloadProcessorProvider.PayloadProcessor
    • org.apache.lucene.index.PayloadProcessorProvider.ReaderPayloadProcessor
      • org.apache.lucene.index.PayloadProcessorProvider.DirPayloadProcessor
    • org.apache.lucene.index.PKIndexSplitter
    • org.apache.lucene.index.PositionBasedTermVectorMapper.TVPositionInfo
    • org.apache.lucene.index.RandomIndexWriter (implements java.io.Closeable)
    • org.apache.lucene.index.SegmentInfo (implements java.lang.Cloneable)
    • org.apache.lucene.index.SegmentInfos (implements java.lang.Cloneable, java.lang.Iterable<T>)
    • org.apache.lucene.index.SegmentInfos.FindSegmentsFile
    • org.apache.lucene.index.SegmentWriteState
    • org.apache.lucene.index.SnapshotDeletionPolicy (implements org.apache.lucene.index.IndexDeletionPolicy)
      • org.apache.lucene.index.PersistentSnapshotDeletionPolicy
    • org.apache.lucene.index.Term (implements java.lang.Comparable<T>, java.io.Serializable)
    • org.apache.lucene.index.TermEnum (implements java.io.Closeable)
      • org.apache.lucene.index.FilterIndexReader.FilterTermEnum
    • org.apache.lucene.index.TermVectorAccessor
    • org.apache.lucene.index.TermVectorEntry
    • org.apache.lucene.index.TermVectorEntryFreqSortedComparator (implements java.util.Comparator<T>)
    • org.apache.lucene.index.TermVectorMapper
      • org.apache.lucene.index.FieldSortedTermVectorMapper
      • org.apache.lucene.index.PositionBasedTermVectorMapper
      • org.apache.lucene.index.SortedTermVectorMapper
    • org.apache.lucene.index.TermVectorOffsetInfo (implements java.io.Serializable)
    • java.lang.Thread (implements java.lang.Runnable)
      • org.apache.lucene.index.ConcurrentMergeScheduler.MergeThread
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.io.IOException
          • org.apache.lucene.index.CorruptIndexException
            • org.apache.lucene.index.IndexFormatTooNewException
            • org.apache.lucene.index.IndexFormatTooOldException
          • java.io.FileNotFoundException
            • org.apache.lucene.index.IndexNotFoundException
          • org.apache.lucene.index.MergePolicy.MergeAbortedException
          • org.apache.lucene.index.StaleReaderException
        • java.lang.RuntimeException
          • org.apache.lucene.index.FieldReaderException
          • org.apache.lucene.index.MergePolicy.MergeException
    • org.apache.lucene.index.TieredMergePolicy.MergeScore

Interface Hierarchy

  • java.io.Closeable
    • org.apache.lucene.index.TermDocs
      • org.apache.lucene.index.TermPositions
  • org.apache.lucene.index.IndexDeletionPolicy
  • org.apache.lucene.index.IndexReader.ReaderClosedListener
  • org.apache.lucene.index.SegmentReader.CoreClosedListener
  • org.apache.lucene.index.TermFreqVector
    • org.apache.lucene.index.TermPositionVector

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.index.FieldInfo.IndexOptions
      • org.apache.lucene.index.IndexWriterConfig.OpenMode


Uses of Package org.apache.lucene.index

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.index

Packages that use org.apache.lucene.index
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.payloads | Provides various convenience classes for creating payloads on Tokens.
org.apache.lucene.analysis.query | Automatically filter high-frequency stopwords.
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.document | The logical representation of a Document for indexing and searching.
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.aggregator.association | Association-based aggregators.
org.apache.lucene.facet.search.cache | Caching to speed up facets accumulation.
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.search.params.association | Association-based Parameters for Faceted Search.
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.facet.util | Various utilities for faceted search
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.pruning | Static Index Pruning Tools
org.apache.lucene.misc | Miscellaneous index tools.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.complexPhrase | QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
org.apache.lucene.queryParser.surround.query | This package contains SrndQuery and its subclasses.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.function | Programmatic control over documents scores.
org.apache.lucene.search.grouping | This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.search.join | This modules support index-time and query-time joins.
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.regex | Regular expression Query.
org.apache.lucene.search.similar | Document similarity query generators.
org.apache.lucene.search.spans | The calculus of spans.
org.apache.lucene.search.spell | Suggest alternate spellings for words.
org.apache.lucene.search.vectorhighlight | This is an another highlighter implementation.
org.apache.lucene.spatial.geohash | Support for Geohash encoding, decoding, and filtering.
org.apache.lucene.spatial.tier | Support for filtering based upon geographic location.
org.apache.lucene.store | Binary i/o API, used for all index data.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.
org.apache.lucene.util | Some utility classes.

Classes in org.apache.lucene.index used by org.apache.lucene.analysis
Payload
A Payload is metadata that can be stored together with each occurrence of a term.

Classes in org.apache.lucene.index used by org.apache.lucene.analysis.payloads
Payload
A Payload is metadata that can be stored together with each occurrence of a term.

Classes in org.apache.lucene.index used by org.apache.lucene.analysis.query
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
Term
A Term represents a word from text.

Classes in org.apache.lucene.index used by org.apache.lucene.analysis.tokenattributes
Payload
A Payload is metadata that can be stored together with each occurrence of a term.

Classes in org.apache.lucene.index used by org.apache.lucene.benchmark.byTask
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
IndexWriter
An IndexWriter creates and maintains an index.

Classes in org.apache.lucene.index used by org.apache.lucene.benchmark.byTask.tasks
CorruptIndexException
This exception is thrown when Lucene detects an inconsistency in the index.
IndexCommit
Expert: represents a single commit into an index as seen by the IndexDeletionPolicy or IndexReader.
IndexDeletionPolicy
Expert: policy for deletion of stale index commits.
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
IndexWriter
An IndexWriter creates and maintains an index.
IndexWriterConfig
Holds all the configuration of IndexWriter.
IndexWriterConfig.OpenMode
Specifies the open mode for IndexWriter: IndexWriterConfig.OpenMode.CREATE - creates a new index or overwrites an existing one.

Classes in org.apache.lucene.index used by org.apache.lucene.document
FieldInfo.IndexOptions
Controls how much information is stored in the postings lists.

Classes in org.apache.lucene.index used by org.apache.lucene.facet.enhancements
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
Term
A Term represents a word from text.

Classes in org.apache.lucene.index used by org.apache.lucene.facet.enhancements.association
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
Term
A Term represents a word from text.

Classes in org.apache.lucene.index used by org.apache.lucene.facet.index
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
PayloadProcessorProvider
Provides a PayloadProcessorProvider.ReaderPayloadProcessor to be used for a Directory.
PayloadProcessorProvider.PayloadProcessor
Processes the given payload.
PayloadProcessorProvider.ReaderPayloadProcessor
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for a given Term which allows processing the payloads of different terms differently.
Term
A Term represents a word from text.

Classes in org.apache.lucene.index used by org.apache.lucene.facet.index.params
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
Term
A Term represents a word from text.

Classes in org.apache.lucene.index used by org.apache.lucene.facet.index.streaming
Payload
A Payload is metadata that can be stored together with each occurrence of a term.

Classes in org.apache.lucene.index used by org.apache.lucene.facet.search
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
Term
A Term represents a word from text.

Classes in org.apache.lucene.index used by org.apache.lucene.facet.search.aggregator.association
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.

Classes in org.apache.lucene.index used by org.apache.lucene.facet.search.cache
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.

Classes in org.apache.lucene.index used by org.apache.lucene.facet.search.params
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.

Classes in org.apache.lucene.index used by org.apache.lucene.facet.search.params.association
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.

Classes in org.apache.lucene.index used by org.apache.lucene.facet.search.sampling
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.

Classes in org.apache.lucene.index used by org.apache.lucene.facet.taxonomy.directory
CorruptIndexException
This exception is thrown when Lucene detects an inconsistency in the index.
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
IndexWriter
An IndexWriter creates and maintains an index.
IndexWriterConfig
Holds all the configuration of IndexWriter.
IndexWriterConfig.OpenMode
Specifies the open mode for IndexWriter: IndexWriterConfig.OpenMode.CREATE - creates a new index or overwrites an existing one.

Classes in org.apache.lucene.index used by org.apache.lucene.facet.util
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.

Classes in org.apache.lucene.index used by org.apache.lucene.index
BalancedSegmentMergePolicy.MergePolicyParams
Specifies configuration parameters for BalancedSegmentMergePolicy.
CheckIndex.Status
Returned from CheckIndex.checkIndex() detailing the health and status of the index.
CheckIndex.Status.FieldNormStatus
Status from testing field norms.
CheckIndex.Status.SegmentInfoStatus
Holds the status of each segment in the index.
CheckIndex.Status.StoredFieldStatus
Status from testing stored fields.
CheckIndex.Status.TermIndexStatus
Status from testing term index.
CheckIndex.Status.TermVectorStatus
Status from testing stored fields.
ConcurrentMergeScheduler.MergeThread
CorruptIndexException
This exception is thrown when Lucene detects an inconsistency in the index.
FieldInfo
Access to the Fieldable Info file that describes document fields and whether or not they are indexed.
FieldInfo.IndexOptions
Controls how much information is stored in the postings lists.
FieldInfos
Collection of FieldInfos (accessible by number or by name).
FilterIndexReader
A FilterIndexReader contains another IndexReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
FilterIndexReader.FilterTermDocs
Base class for filtering TermDocs implementations.
IndexCommit
Expert: represents a single commit into an index as seen by the IndexDeletionPolicy or IndexReader.
IndexDeletionPolicy
Expert: policy for deletion of stale index commits.
IndexFileNameFilter
Filename filter that accept filenames and extensions only created by Lucene.
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
IndexReader.ReaderClosedListener
A custom listener that's invoked when the IndexReader is closed.
IndexWriter
An IndexWriter creates and maintains an index.
IndexWriter.IndexReaderWarmer
If IndexWriter.getReader() has been called (ie, this writer is in near real-time mode), then after a merge completes, this class can be invoked to warm the reader on the newly merged segment, before the merge commits.
IndexWriter.MaxFieldLength
Deprecated. use LimitTokenCountAnalyzer instead.
IndexWriterConfig
Holds all the configuration of IndexWriter.
IndexWriterConfig.OpenMode
Specifies the open mode for IndexWriter: IndexWriterConfig.OpenMode.CREATE - creates a new index or overwrites an existing one.
LogByteSizeMergePolicy
This is a LogMergePolicy that measures size of a segment as the total byte size of the segment's files.
LogMergePolicy
This class implements a MergePolicy that tries to merge segments into levels of exponentially increasing size, where each level has fewer segments than the value of the merge factor.
MergePolicy
Expert: a MergePolicy determines the sequence of primitive merge operations.
MergePolicy.MergeSpecification
A MergeSpecification instance provides the information necessary to perform multiple merges.
MergePolicy.OneMerge
OneMerge provides the information necessary to perform an individual primitive merge operation, resulting in a single new segment.
MergeScheduler
Expert: IndexWriter uses an instance implementing this interface to execute the merges selected by a MergePolicy.
MultiReader
An IndexReader which reads multiple indexes, appending their content.
PayloadProcessorProvider
Provides a PayloadProcessorProvider.ReaderPayloadProcessor to be used for a Directory.
PayloadProcessorProvider.DirPayloadProcessor
Deprecated. Use PayloadProcessorProvider.ReaderPayloadProcessor instead.
PayloadProcessorProvider.PayloadProcessor
Processes the given payload.
PayloadProcessorProvider.ReaderPayloadProcessor
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for a given Term which allows processing the payloads of different terms differently.
PositionBasedTermVectorMapper.TVPositionInfo
Container for a term at a position
SegmentInfo
Information about a segment such as it's name, directory, and files related to the segment.
SegmentInfos
A collection of segmentInfo objects with methods for operating on those segments in relation to the file system.
SegmentReader
IndexReader implementation over a single segment.
SegmentReader.CoreClosedListener
Called when the shared core for this SegmentReader is closed.
SnapshotDeletionPolicy
An IndexDeletionPolicy that wraps around any other IndexDeletionPolicy and adds the ability to hold and later release snapshots of an index.
StaleReaderException
This exception is thrown when an IndexReader tries to make changes to the index (via IndexReader.deleteDocument(int), IndexReader.undeleteAll() or IndexReader.setNorm(int, java.lang.String, byte)) but changes have already been committed to the index since this reader was instantiated.
Term
A Term represents a word from text.
TermDocs
TermDocs provides an interface for enumerating <document, frequency> pairs for a term.
TermEnum
Abstract class for enumerating terms.
TermFreqVector
Provides access to stored term vector of a document field.
TermPositions
TermPositions provides an interface for enumerating the <document, frequency, <position>* > tuples for a term.
TermVectorEntry
Convenience class for holding TermVector information.
TermVectorMapper
The TermVectorMapper can be used to map Term Vectors into your own structure instead of the parallel array structure used by IndexReader.getTermFreqVector(int,String).
TermVectorOffsetInfo
The TermVectorOffsetInfo class holds information pertaining to a Term in a TermPositionVector's offset information.
TieredMergePolicy
Merges segments of approximately equal size, subject to an allowed number of segments per tier.
TieredMergePolicy.MergeScore
Holds score and explanation for a single candidate merge.

Classes in org.apache.lucene.index used by org.apache.lucene.index.pruning
FieldInfos
Collection of FieldInfos (accessible by number or by name).
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
Term
A Term represents a word from text.
TermEnum
Abstract class for enumerating terms.
TermFreqVector
Provides access to stored term vector of a document field.
TermPositions
TermPositions provides an interface for enumerating the <document, frequency, <position>* > tuples for a term.

Classes in org.apache.lucene.index used by org.apache.lucene.misc
FieldInvertState
This class tracks the number and position / offset parameters of terms being added to the index.
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
Term
A Term represents a word from text.

Classes in org.apache.lucene.index used by org.apache.lucene.queryParser
Term
A Term represents a word from text.

Classes in org.apache.lucene.index used by org.apache.lucene.queryParser.complexPhrase
Term
A Term represents a word from text.

Classes in org.apache.lucene.index used by org.apache.lucene.queryParser.surround.query
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
Term
A Term represents a word from text.
TermEnum
Abstract class for enumerating terms.

Classes in org.apache.lucene.index used by org.apache.lucene.search
CorruptIndexException
This exception is thrown when Lucene detects an inconsistency in the index.
FieldInvertState
This class tracks the number and position / offset parameters of terms being added to the index.
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
IndexWriter
An IndexWriter creates and maintains an index.
Term
A Term represents a word from text.
TermEnum
Abstract class for enumerating terms.
TermFreqVector
Provides access to stored term vector of a document field.

Classes in org.apache.lucene.index used by org.apache.lucene.search.function
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
Term
A Term represents a word from text.

Classes in org.apache.lucene.index used by org.apache.lucene.search.grouping
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.

Classes in org.apache.lucene.index used by org.apache.lucene.search.highlight
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
TermPositionVector
Extends TermFreqVector to provide additional information about positions in which each of the terms is found.

Classes in org.apache.lucene.index used by org.apache.lucene.search.join
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
Term
A Term represents a word from text.

Classes in org.apache.lucene.index used by org.apache.lucene.search.payloads
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
Term
A Term represents a word from text.
TermPositions
TermPositions provides an interface for enumerating the <document, frequency, <position>* > tuples for a term.

Classes in org.apache.lucene.index used by org.apache.lucene.search.regex
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
Term
A Term represents a word from text.
TermEnum
Abstract class for enumerating terms.

Classes in org.apache.lucene.index used by org.apache.lucene.search.similar
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.

Classes in org.apache.lucene.index used by org.apache.lucene.search.spans
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
Term
A Term represents a word from text.
TermPositions
TermPositions provides an interface for enumerating the <document, frequency, <position>* > tuples for a term.

Classes in org.apache.lucene.index used by org.apache.lucene.search.spell
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
IndexWriterConfig
Holds all the configuration of IndexWriter.

Classes in org.apache.lucene.index used by org.apache.lucene.search.vectorhighlight
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.

Classes in org.apache.lucene.index used by org.apache.lucene.spatial.geohash
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.

Classes in org.apache.lucene.index used by org.apache.lucene.spatial.tier
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.

Classes in org.apache.lucene.index used by org.apache.lucene.store
MergeScheduler
Expert: IndexWriter uses an instance implementing this interface to execute the merges selected by a MergePolicy.

Classes in org.apache.lucene.index used by org.apache.lucene.store.instantiated
CorruptIndexException
This exception is thrown when Lucene detects an inconsistency in the index.
FieldInfos
Collection of FieldInfos (accessible by number or by name).
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
Term
A Term represents a word from text.
TermDocs
TermDocs provides an interface for enumerating <document, frequency> pairs for a term.
TermEnum
Abstract class for enumerating terms.
TermFreqVector
Provides access to stored term vector of a document field.
TermPositions
TermPositions provides an interface for enumerating the <document, frequency, <position>* > tuples for a term.
TermPositionVector
Extends TermFreqVector to provide additional information about positions in which each of the terms is found.
TermVectorMapper
The TermVectorMapper can be used to map Term Vectors into your own structure instead of the parallel array structure used by IndexReader.getTermFreqVector(int,String).
TermVectorOffsetInfo
The TermVectorOffsetInfo class holds information pertaining to a Term in a TermPositionVector's offset information.

Classes in org.apache.lucene.index used by org.apache.lucene.util
CheckIndex.Status
Returned from CheckIndex.checkIndex() detailing the health and status of the index.
FieldInfos
Collection of FieldInfos (accessible by number or by name).
IndexReader
IndexReader is an abstract class, providing an interface for accessing an index.
IndexWriter
An IndexWriter creates and maintains an index.
IndexWriterConfig
Holds all the configuration of IndexWriter.
LogMergePolicy
This class implements a MergePolicy that tries to merge segments into levels of exponentially increasing size, where each level has fewer segments than the value of the merge factor.
MergePolicy
Expert: a MergePolicy determines the sequence of primitive merge operations.
MergeScheduler
Expert: IndexWriter uses an instance implementing this interface to execute the merges selected by a MergePolicy.
TieredMergePolicy
Merges segments of approximately equal size, subject to an allowed number of segments per tier.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ParallelReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class ParallelReader

java.lang.Object
    extended by  org.apache.lucene.index.IndexReader
        extended by  org.apache.lucene.index.ParallelReader
All Implemented Interfaces:
Closeable, Cloneable
public class ParallelReader
extends IndexReader

An IndexReader which reads multiple, parallel indexes. Each index added must have the same number of documents, but typically each contains different fields. Each document contains the union of the fields of all documents with the same document number. When searching, matches for a query term are from the first index added that has the field.

This is useful, e.g., with collections that have large fields which change rarely and small fields that change more frequently. The smaller fields may be re-indexed in a new index and both indexes may be searched together.

Warning: It is up to you to make sure all indexes are created and modified the same way. For example, if you add documents to one index, you need to add the same documents in the same order to the other indexes. Failure to do so will result in undefined behavior.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader
IndexReader.ReaderClosedListener
Field Summary
Fields inherited from class org.apache.lucene.index.IndexReader
hasChanges
Constructor Summary
ParallelReader()
Construct a ParallelReader.
ParallelReader(boolean closeSubReaders)
Construct a ParallelReader.
Method Summary
void | add(IndexReader reader) Add an IndexReader.
void | add(IndexReader reader, boolean ignoreStoredFields) Add an IndexReader whose stored fields will not be returned.
Object | clone() Efficiently clones the IndexReader (sharing most internal state).
IndexReader | clone(boolean openReadOnly) Deprecated. Write support will be removed in Lucene 4.0. Use clone() instead.
int | docFreq(Term term) Returns the number of documents containing the term t.
protected void | doClose() Implements close.
protected void | doCommit(Map<String,String> commitUserData) Deprecated.
Document | document(int n, FieldSelector fieldSelector) Get the Document at the n th position.
protected void | doDelete(int n) Deprecated.
protected IndexReader | doOpenIfChanged() If the index has changed since it was opened, open and return a new reader; else, return null.
protected IndexReader | doOpenIfChanged(boolean openReadOnly) Deprecated. Write support will be removed in Lucene 4.0. Use doOpenIfChanged() instead.
protected void | doSetNorm(int n, String field, byte value) Deprecated.
protected void | doUndeleteAll() Deprecated.
FieldInfos | getFieldInfos() Get the FieldInfos describing all fields in this reader.
TermFreqVector | getTermFreqVector(int n, String field) Return a term frequency vector for the specified document and field.
void | getTermFreqVector(int docNumber, String field, TermVectorMapper mapper) Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the TermFreqVector.
void | getTermFreqVector(int docNumber, TermVectorMapper mapper) Map all the term vectors for all fields in a Document
TermFreqVector[] | getTermFreqVectors(int n) Return an array of term frequency vectors for the specified document.
long | getVersion() Not implemented.
boolean | hasDeletions() Returns true if any documents have been deleted
boolean | hasNorms(String field) Returns true if there are norms stored for this field.
boolean | isCurrent() Checks recursively if all subreaders are up to date.
boolean | isDeleted(int n) Returns true if document n has been deleted
boolean | isOptimized() Deprecated.
int | maxDoc() Returns one greater than the largest possible document number.
byte[] | norms(String field) Returns the byte-encoded normalization factor for the named field of every document.
void | norms(String field, byte[] result, int offset) Reads the byte-encoded normalization factor for the named field of every document.
int | numDocs() Returns the number of documents in this index.
TermDocs | termDocs() Returns an unpositioned TermDocs enumerator.
TermDocs | termDocs(Term term) Returns an enumeration of all the documents which contain term.
TermPositions | termPositions() Returns an unpositioned TermPositions enumerator.
TermEnum | terms() Returns an enumeration of all the terms in the index.
TermEnum | terms(Term term) Returns an enumeration of all terms starting at a given term.
String | toString()
Methods inherited from class org.apache.lucene.index.IndexReader
acquireWriteLock, addReaderClosedListener, close, commit, commit, decRef, deleteDocument, deleteDocuments, directory, document, doOpenIfChanged, doOpenIfChanged, ensureOpen, flush, flush, getCommitUserData, getCommitUserData, getCoreCacheKey, getCurrentVersion, getDeletesCacheKey, getIndexCommit, getRefCount, getSequentialSubReaders, getTermInfosIndexDivisor, getUniqueTermCount, incRef, indexExists, lastModified, listCommits, numDeletedDocs, open, open, open, open, open, open, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChanged, removeReaderClosedListener, reopen, reopen, reopen, reopen, setNorm, setNorm, termPositions, tryIncRef, undeleteAll
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ParallelReader

public ParallelReader()
               throws IOException
Construct a ParallelReader.

Note that all subreaders are closed if this ParallelReader is closed.

Throws:
IOException

ParallelReader

public ParallelReader(boolean closeSubReaders)
               throws IOException
Construct a ParallelReader.

Parameters:
closeSubReaders - indicates whether the subreaders should be closed when this ParallelReader is closed
Throws:
IOException
Method Detail

toString

public String toString()

Overrides:
toString in class IndexReader

add

public void add(IndexReader reader)
         throws IOException
Add an IndexReader.

Throws:
IOException - if there is a low-level IO error

add

public void add(IndexReader reader,
                boolean ignoreStoredFields)
         throws IOException
Add an IndexReader whose stored fields will not be returned. This can accelerate search when stored fields are only needed from a subset of the IndexReaders.

Throws:
IllegalArgumentException - if not all indexes contain the same number of documents
IllegalArgumentException - if not all indexes have the same value of IndexReader.maxDoc()
IOException - if there is a low-level IO error

getFieldInfos

public FieldInfos getFieldInfos()
Description copied from class: IndexReader
Get the FieldInfos describing all fields in this reader. NOTE: do not make any changes to the returned FieldInfos!

Specified by:
getFieldInfos in class IndexReader

doOpenIfChanged

protected IndexReader doOpenIfChanged()
                               throws CorruptIndexException,
                                      IOException
Description copied from class: IndexReader
If the index has changed since it was opened, open and return a new reader; else, return null.

Overrides:
doOpenIfChanged in class IndexReader
Throws:
CorruptIndexException
IOException
See Also:
IndexReader.openIfChanged(IndexReader)

doOpenIfChanged

@Deprecated
protected IndexReader doOpenIfChanged(boolean openReadOnly)
                               throws CorruptIndexException,
                                      IOException
Deprecated. Write support will be removed in Lucene 4.0. Use doOpenIfChanged() instead.

Description copied from class: IndexReader
If the index has changed since it was opened, open and return a new reader; else, return null.

Overrides:
doOpenIfChanged in class IndexReader
Throws:
UnsupportedOperationException - ParallelReaders cannot support changing the readOnly flag
CorruptIndexException
IOException
See Also:
IndexReader.openIfChanged(IndexReader, boolean)

clone

public Object clone()
Description copied from class: IndexReader
Efficiently clones the IndexReader (sharing most internal state).

On cloning a reader with pending changes (deletions, norms), the original reader transfers its write lock to the cloned reader. This means only the cloned reader may make further changes to the index, and commit the changes to the index on close, but the old reader still reflects all changes made up until it was cloned.

Like IndexReader.openIfChanged(IndexReader), it's safe to make changes to either the original or the cloned reader: all shared mutable state obeys "copy on write" semantics to ensure the changes are not seen by other readers.

Overrides:
clone in class IndexReader

clone

@Deprecated
public IndexReader clone(boolean openReadOnly)
                  throws CorruptIndexException,
                         IOException
Deprecated. Write support will be removed in Lucene 4.0. Use clone() instead.

Description copied from class: IndexReader
Clones the IndexReader and optionally changes readOnly. A readOnly reader cannot open a writeable reader.

Overrides:
clone in class IndexReader
Throws:
UnsupportedOperationException - ParallelReaders cannot support changing the readOnly flag
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

numDocs

public int numDocs()
Description copied from class: IndexReader
Returns the number of documents in this index.

Specified by:
numDocs in class IndexReader

maxDoc

public int maxDoc()
Description copied from class: IndexReader
Returns one greater than the largest possible document number. This may be used to, e.g., determine how big to allocate an array which will have an element for every document number in an index.

Specified by:
maxDoc in class IndexReader

hasDeletions

public boolean hasDeletions()
Description copied from class: IndexReader
Returns true if any documents have been deleted

Specified by:
hasDeletions in class IndexReader

isDeleted

public boolean isDeleted(int n)
Description copied from class: IndexReader
Returns true if document n has been deleted

Specified by:
isDeleted in class IndexReader

doDelete

@Deprecated
protected void doDelete(int n)
                 throws CorruptIndexException,
                        IOException
Deprecated.

Implements deletion of the document numbered docNum. Applications should call IndexReader.deleteDocument(int) or IndexReader.deleteDocuments(Term).

Specified by:
doDelete in class IndexReader
Throws:
CorruptIndexException
IOException

doUndeleteAll

@Deprecated
protected void doUndeleteAll()
                      throws CorruptIndexException,
                             IOException
Deprecated.

Implements actual undeleteAll() in subclass.

Specified by:
doUndeleteAll in class IndexReader
Throws:
CorruptIndexException
IOException

document

public Document document(int n,
                         FieldSelector fieldSelector)
                  throws CorruptIndexException,
                         IOException
Description copied from class: IndexReader
Get the Document at the n th position. The FieldSelector may be used to determine what Fields to load and how they should be loaded. NOTE: If this Reader (more specifically, the underlying FieldsReader) is closed before the lazy Field is loaded an exception may be thrown. If you want the value of a lazy Field to be available after closing you must explicitly load it or fetch the Document again with a new loader.

NOTE: for performance reasons, this method does not check if the requested document is deleted, and therefore asking for a deleted document may yield unspecified results. Usually this is not required, however you can call IndexReader.isDeleted(int) with the requested document ID to verify the document is not deleted.

Specified by:
document in class IndexReader
Parameters:
n - Get the document at the nth position
fieldSelector - The FieldSelector to use to determine what Fields should be loaded on the Document. May be null, in which case all Fields will be loaded.
Returns:
The stored fields of the Document at the nth position
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
Fieldable, FieldSelector, SetBasedFieldSelector, LoadFirstFieldSelector

getTermFreqVectors

public TermFreqVector[] getTermFreqVectors(int n)
                                    throws IOException
Description copied from class: IndexReader
Return an array of term frequency vectors for the specified document. The array contains a vector for each vectorized field in the document. Each vector contains terms and frequencies for all terms in a given vectorized field. If no such fields existed, the method returns null. The term vectors that are returned may either be of type TermFreqVector or of type TermPositionVector if positions or offsets have been stored.

Specified by:
getTermFreqVectors in class IndexReader
Parameters:
n - document for which term frequency vectors are returned
Returns:
array of term frequency vectors. May be null if no term vectors have been stored for the specified document.
Throws:
IOException - if index cannot be accessed
See Also:
Field.TermVector

getTermFreqVector

public TermFreqVector getTermFreqVector(int n,
                                        String field)
                                 throws IOException
Description copied from class: IndexReader
Return a term frequency vector for the specified document and field. The returned vector contains terms and frequencies for the terms in the specified field of this document, if the field had the storeTermVector flag set. If termvectors had been stored with positions or offsets, a TermPositionVector is returned.

Specified by:
getTermFreqVector in class IndexReader
Parameters:
n - document for which the term frequency vector is returned
field - field for which the term frequency vector is returned.
Returns:
term frequency vector May be null if field does not exist in the specified document or term vector was not stored.
Throws:
IOException - if index cannot be accessed
See Also:
Field.TermVector

getTermFreqVector

public void getTermFreqVector(int docNumber,
                              String field,
                              TermVectorMapper mapper)
                       throws IOException
Description copied from class: IndexReader
Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the TermFreqVector.

Specified by:
getTermFreqVector in class IndexReader
Parameters:
docNumber - The number of the document to load the vector for
field - The name of the field to load
mapper - The TermVectorMapper to process the vector. Must not be null
Throws:
IOException - if term vectors cannot be accessed or if they do not exist on the field and doc. specified.

getTermFreqVector

public void getTermFreqVector(int docNumber,
                              TermVectorMapper mapper)
                       throws IOException
Description copied from class: IndexReader
Map all the term vectors for all fields in a Document

Specified by:
getTermFreqVector in class IndexReader
Parameters:
docNumber - The number of the document to load the vector for
mapper - The TermVectorMapper to process the vector. Must not be null
Throws:
IOException - if term vectors cannot be accessed or if they do not exist on the field and doc. specified.

hasNorms

public boolean hasNorms(String field)
                 throws IOException
Description copied from class: IndexReader
Returns true if there are norms stored for this field.

Overrides:
hasNorms in class IndexReader
Throws:
IOException

norms

public byte[] norms(String field)
             throws IOException
Description copied from class: IndexReader
Returns the byte-encoded normalization factor for the named field of every document. This is used by the search code to score documents. Returns null if norms were not indexed for this field.

Specified by:
norms in class IndexReader
Throws:
IOException
See Also:
AbstractField.setBoost(float)

norms

public void norms(String field,
                  byte[] result,
                  int offset)
           throws IOException
Description copied from class: IndexReader
Reads the byte-encoded normalization factor for the named field of every document. This is used by the search code to score documents.

Specified by:
norms in class IndexReader
Throws:
IOException
See Also:
AbstractField.setBoost(float)

doSetNorm

@Deprecated
protected void doSetNorm(int n,
                                    String field,
                                    byte value)
                  throws CorruptIndexException,
                         IOException
Deprecated.

Implements setNorm in subclass.

Specified by:
doSetNorm in class IndexReader
Throws:
CorruptIndexException
IOException

terms

public TermEnum terms()
               throws IOException
Description copied from class: IndexReader
Returns an enumeration of all the terms in the index. The enumeration is ordered by Term.compareTo(). Each term is greater than all that precede it in the enumeration. Note that after calling terms(), TermEnum.next() must be called on the resulting enumeration before calling other methods such as TermEnum.term().

Specified by:
terms in class IndexReader
Throws:
IOException - if there is a low-level IO error

terms

public TermEnum terms(Term term)
               throws IOException
Description copied from class: IndexReader
Returns an enumeration of all terms starting at a given term. If the given term does not exist, the enumeration is positioned at the first term greater than the supplied term. The enumeration is ordered by Term.compareTo(). Each term is greater than all that precede it in the enumeration.

Specified by:
terms in class IndexReader
Throws:
IOException - if there is a low-level IO error

docFreq

public int docFreq(Term term)
            throws IOException
Description copied from class: IndexReader
Returns the number of documents containing the term t.

Specified by:
docFreq in class IndexReader
Throws:
IOException - if there is a low-level IO error

termDocs

public TermDocs termDocs(Term term)
                  throws IOException
Description copied from class: IndexReader
Returns an enumeration of all the documents which contain term. For each document, the document number, the frequency of the term in that document is also provided, for use in search scoring. If term is null, then all non-deleted docs are returned with freq=1. Thus, this method implements the mapping:

    Term => <docNum, freq>*

The enumeration is ordered by document number. Each document number is greater than all that precede it in the enumeration.

Overrides:
termDocs in class IndexReader
Throws:
IOException - if there is a low-level IO error

termDocs

public TermDocs termDocs()
                  throws IOException
Description copied from class: IndexReader
Returns an unpositioned TermDocs enumerator.

Note: the TermDocs returned is unpositioned. Before using it, ensure that you first position it with TermDocs.seek(Term) or TermDocs.seek(TermEnum).

Specified by:
termDocs in class IndexReader
Throws:
IOException - if there is a low-level IO error

termPositions

public TermPositions termPositions()
                            throws IOException
Description copied from class: IndexReader
Returns an unpositioned TermPositions enumerator.

Specified by:
termPositions in class IndexReader
Throws:
IOException - if there is a low-level IO error

isCurrent

public boolean isCurrent()
                  throws CorruptIndexException,
                         IOException
Checks recursively if all subreaders are up to date.

Overrides:
isCurrent in class IndexReader
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

isOptimized

@Deprecated
public boolean isOptimized()
Deprecated.

Overrides:
isOptimized in class IndexReader

getVersion

public long getVersion()
Not implemented.

Overrides:
getVersion in class IndexReader
Throws:
UnsupportedOperationException

doCommit

@Deprecated
protected void doCommit(Map<String,String> commitUserData)
                 throws IOException
Deprecated.

Implements commit.

Specified by:
doCommit in class IndexReader
Throws:
IOException

doClose

protected void doClose()
                throws IOException
Description copied from class: IndexReader
Implements close.

Specified by:
doClose in class IndexReader
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Payload

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class Payload

java.lang.Object
    extended by  org.apache.lucene.index.Payload
All Implemented Interfaces:
Serializable, Cloneable
public class Payload
extends Object
implements Serializable, Cloneable

A Payload is metadata that can be stored together with each occurrence of a term. This metadata is stored inline in the posting list of the specific term.

To store payloads in the index a TokenStream has to be used that produces payload data.

Use TermPositions.getPayloadLength() and TermPositions.getPayload(byte[], int) to retrieve the payloads from the index.

See Also:
Serialized Form

Field Summary
protected byte[] | data the byte array containing the payload data
protected int | length the length of the payload data
protected int | offset the offset within the byte array
Constructor Summary
Payload()
Creates an empty payload and does not allocate a byte array.
Payload(byte[] data)
Creates a new payload with the the given array as data.
Payload(byte[] data, int offset, int length)
Creates a new payload with the the given array as data.
Method Summary
byte | byteAt(int index) Returns the byte at the given index.
Object | clone() Clones this payload by creating a copy of the underlying byte array.
void | copyTo(byte[] target, int targetOffset) Copies the payload data to a byte array.
boolean | equals(Object obj)
byte[] | getData() Returns a reference to the underlying byte array that holds this payloads data.
int | getOffset() Returns the offset in the underlying byte array
int | hashCode()
int | length() Returns the length of the payload data.
void | setData(byte[] data) Sets this payloads data.
void | setData(byte[] data, int offset, int length) Sets this payloads data.
byte[] | toByteArray() Allocates a new byte array, copies the payload data into it and returns it.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

data

protected byte[] data
the byte array containing the payload data

offset

protected int offset
the offset within the byte array

length

protected int length
the length of the payload data

Constructor Detail

Payload

public Payload()
Creates an empty payload and does not allocate a byte array.

Payload

public Payload(byte[] data)
Creates a new payload with the the given array as data. A reference to the passed-in array is held, i. e. no copy is made.

Parameters:
data - the data of this payload

Payload

public Payload(byte[] data,
               int offset,
               int length)
Creates a new payload with the the given array as data. A reference to the passed-in array is held, i. e. no copy is made.

Parameters:
data - the data of this payload
offset - the offset in the data byte array
length - the length of the data
Method Detail

setData

public void setData(byte[] data)
Sets this payloads data. A reference to the passed-in array is held, i. e. no copy is made.

setData

public void setData(byte[] data,
                    int offset,
                    int length)
Sets this payloads data. A reference to the passed-in array is held, i. e. no copy is made.

getData

public byte[] getData()
Returns a reference to the underlying byte array that holds this payloads data.

getOffset

public int getOffset()
Returns the offset in the underlying byte array

length

public int length()
Returns the length of the payload data.

byteAt

public byte byteAt(int index)
Returns the byte at the given index.

toByteArray

public byte[] toByteArray()
Allocates a new byte array, copies the payload data into it and returns it.

copyTo

public void copyTo(byte[] target,
                   int targetOffset)
Copies the payload data to a byte array.

Parameters:
target - the target byte array
targetOffset - the offset in the target byte array

clone

public Object clone()
Clones this payload by creating a copy of the underlying byte array.

Overrides:
clone in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PayloadProcessorProvider.DirPayloadProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class PayloadProcessorProvider.DirPayloadProcessor

java.lang.Object
    extended by  org.apache.lucene.index.PayloadProcessorProvider.ReaderPayloadProcessor
        extended by  org.apache.lucene.index.PayloadProcessorProvider.DirPayloadProcessor
Enclosing class:
PayloadProcessorProvider
Deprecated. Use PayloadProcessorProvider.ReaderPayloadProcessor instead.

@Deprecated
public abstract static class PayloadProcessorProvider.DirPayloadProcessor
extends PayloadProcessorProvider.ReaderPayloadProcessor

Constructor Summary
PayloadProcessorProvider.DirPayloadProcessor()
Deprecated.
Method Summary
Methods inherited from class org.apache.lucene.index.PayloadProcessorProvider.ReaderPayloadProcessor
getProcessor
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PayloadProcessorProvider.DirPayloadProcessor

public PayloadProcessorProvider.DirPayloadProcessor()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PayloadProcessorProvider

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class PayloadProcessorProvider

java.lang.Object
    extended by  org.apache.lucene.index.PayloadProcessorProvider
Direct Known Subclasses:
FacetsPayloadProcessorProvider
public abstract class PayloadProcessorProvider
extends Object

Provides a PayloadProcessorProvider.ReaderPayloadProcessor to be used for a Directory. This allows using different PayloadProcessorProvider.ReaderPayloadProcessors for different source IndexReader, for e.g. to perform different processing of payloads of different directories.

NOTE: to avoid processing payloads of certain directories, you can return null in getReaderProcessor(org.apache.lucene.index.IndexReader).

NOTE: it is possible that the same PayloadProcessorProvider.ReaderPayloadProcessor will be requested for the same Directory concurrently. Therefore, to avoid concurrency issues you should return different instances for different threads. Usually, if your PayloadProcessorProvider.ReaderPayloadProcessor does not maintain state this is not a problem. The merge code ensures that the PayloadProcessorProvider.ReaderPayloadProcessor instance you return will be accessed by one thread to obtain the PayloadProcessorProvider.ReaderPayloadProcessors for different terms.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | PayloadProcessorProvider.DirPayloadProcessor Deprecated. Use PayloadProcessorProvider.ReaderPayloadProcessor instead.
static class | PayloadProcessorProvider.PayloadProcessor Processes the given payload.
static class | PayloadProcessorProvider.ReaderPayloadProcessor Returns a PayloadProcessorProvider.ReaderPayloadProcessor for a given Term which allows processing the payloads of different terms differently.
Constructor Summary
PayloadProcessorProvider()
Method Summary
PayloadProcessorProvider.DirPayloadProcessor | getDirProcessor(Directory dir) Deprecated. Use getReaderProcessor(org.apache.lucene.index.IndexReader) instead. You can still select by Directory, if you retrieve the underlying directory from IndexReader.directory().
PayloadProcessorProvider.ReaderPayloadProcessor | getReaderProcessor(IndexReader reader) Returns a PayloadProcessorProvider.ReaderPayloadProcessor for the given Directory, through which PayloadProcessorProvider.ReaderPayloadProcessors can be obtained for each Term, or null if none should be used.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PayloadProcessorProvider

public PayloadProcessorProvider()
Method Detail

getReaderProcessor

public PayloadProcessorProvider.ReaderPayloadProcessor getReaderProcessor(IndexReader reader)
                                                                   throws IOException
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for the given Directory, through which PayloadProcessorProvider.ReaderPayloadProcessors can be obtained for each Term, or null if none should be used. You should override this method, not getDirProcessor(org.apache.lucene.store.Directory).

Throws:
IOException

getDirProcessor

@Deprecated
public PayloadProcessorProvider.DirPayloadProcessor getDirProcessor(Directory dir)
                                                             throws IOException
Deprecated. Use getReaderProcessor(org.apache.lucene.index.IndexReader) instead. You can still select by Directory, if you retrieve the underlying directory from IndexReader.directory().

Returns a PayloadProcessorProvider.DirPayloadProcessor for the given Directory, through which PayloadProcessorProvider.ReaderPayloadProcessors can be obtained for each Term, or null if none should be used.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PayloadProcessorProvider.PayloadProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class PayloadProcessorProvider.PayloadProcessor

java.lang.Object
    extended by  org.apache.lucene.index.PayloadProcessorProvider.PayloadProcessor
Direct Known Subclasses:
FacetsPayloadProcessorProvider.FacetsPayloadProcessor
Enclosing class:
PayloadProcessorProvider
public abstract static class PayloadProcessorProvider.PayloadProcessor
extends Object

Processes the given payload. One should call payloadLength() to get the length of the processed payload.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
PayloadProcessorProvider.PayloadProcessor()
Method Summary
abstract  int payloadLength()
Returns the length of the payload that was returned by processPayload(byte[], int, int).
abstract  byte[] processPayload(byte[] payload, int start, int length)
Process the incoming payload and returns the resulting byte[].
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PayloadProcessorProvider.PayloadProcessor

public PayloadProcessorProvider.PayloadProcessor()
Method Detail

payloadLength

public abstract int payloadLength()
                           throws IOException
Returns the length of the payload that was returned by processPayload(byte[], int, int).

Throws:
IOException

processPayload

public abstract byte[] processPayload(byte[] payload,
                                      int start,
                                      int length)
                               throws IOException
Process the incoming payload and returns the resulting byte[]. Note that a new array might be allocated if the given array is not big enough. The length of the new payload data can be obtained via payloadLength().

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PayloadProcessorProvider.ReaderPayloadProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class PayloadProcessorProvider.ReaderPayloadProcessor

java.lang.Object
    extended by  org.apache.lucene.index.PayloadProcessorProvider.ReaderPayloadProcessor
Direct Known Subclasses:
FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor, PayloadProcessorProvider.DirPayloadProcessor
Enclosing class:
PayloadProcessorProvider
public abstract static class PayloadProcessorProvider.ReaderPayloadProcessor
extends Object

Returns a PayloadProcessorProvider.ReaderPayloadProcessor for a given Term which allows processing the payloads of different terms differently. If you intent to process all your payloads the same way, then you can ignore the given term.

NOTE: if you protect your PayloadProcessorProvider.ReaderPayloadProcessor from concurrency issues, then you shouldn't worry about any such issues when PayloadProcessorProvider.ReaderPayloadProcessors are requested for different terms.

Constructor Summary
PayloadProcessorProvider.ReaderPayloadProcessor()
Method Summary
abstract  PayloadProcessorProvider.PayloadProcessor getProcessor(Term term)
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for the given term.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PayloadProcessorProvider.ReaderPayloadProcessor

public PayloadProcessorProvider.ReaderPayloadProcessor()
Method Detail

getProcessor

public abstract PayloadProcessorProvider.PayloadProcessor getProcessor(Term term)
                                                                throws IOException
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for the given term.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PersistentSnapshotDeletionPolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class PersistentSnapshotDeletionPolicy

java.lang.Object
    extended by  org.apache.lucene.index.SnapshotDeletionPolicy
        extended by  org.apache.lucene.index.PersistentSnapshotDeletionPolicy
All Implemented Interfaces:
IndexDeletionPolicy
public class PersistentSnapshotDeletionPolicy
extends SnapshotDeletionPolicy

A SnapshotDeletionPolicy which adds a persistence layer so that snapshots can be maintained across the life of an application. The snapshots are persisted in a Directory and are committed as soon as snapshot(String) or release(String) is called.

NOTE: this class receives a Directory to persist the data into a Lucene index. It is highly recommended to use a dedicated directory (and on stable storage as well) for persisting the snapshots' information, and not reuse the content index directory, or otherwise conflicts and index corruptions will occur.

NOTE: you should call close() when you're done using this class for safetyness (it will close the IndexWriter instance used).

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.SnapshotDeletionPolicy
SnapshotDeletionPolicy.SnapshotCommitPoint
Field Summary
Fields inherited from class org.apache.lucene.index.SnapshotDeletionPolicy
lastCommit
Constructor Summary
PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir, IndexWriterConfig.OpenMode mode, Version matchVersion)
PersistentSnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting.
Method Summary
void | close() Closes the index which writes the snapshots to the directory.
void | onInit(List<? extends IndexCommit> commits) This is called once when a writer is first instantiated to give the policy a chance to remove old commit points.
static Map<String,String> | readSnapshotsInfo(Directory dir) Reads the snapshots information from the given Directory.
void | release(String id) Deletes a snapshotted commit by ID.
IndexCommit | snapshot(String id) Snapshots the last commit using the given ID.
Methods inherited from class org.apache.lucene.index.SnapshotDeletionPolicy
checkSnapshotted, getSnapshot, getSnapshots, isSnapshotted, onCommit, registerSnapshotInfo, wrapCommits
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PersistentSnapshotDeletionPolicy

public PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary,
                                        Directory dir,
                                        IndexWriterConfig.OpenMode mode,
                                        Version matchVersion)
                                 throws CorruptIndexException,
                                        LockObtainFailedException,
                                        IOException
PersistentSnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting.

Parameters:
primary - the IndexDeletionPolicy that is used on non-snapshotted commits. Snapshotted commits, by definition, are not deleted until explicitly released via release(String).
dir - the Directory which will be used to persist the snapshots information.
mode - specifies whether a new index should be created, deleting all existing snapshots information (immediately), or open an existing index, initializing the class with the snapshots information.
matchVersion - specifies the Version that should be used when opening the IndexWriter.
Throws:
CorruptIndexException
LockObtainFailedException
IOException
Method Detail

readSnapshotsInfo

public static Map<String,String> readSnapshotsInfo(Directory dir)
                                            throws IOException
Reads the snapshots information from the given Directory. This method can be used if the snapshots information is needed, however you cannot instantiate the deletion policy (because e.g., some other process keeps a lock on the snapshots directory).

Throws:
IOException

onInit

public void onInit(List<? extends IndexCommit> commits)
            throws IOException
Description copied from interface: IndexDeletionPolicy

This is called once when a writer is first instantiated to give the policy a chance to remove old commit points.

The writer locates all index commits present in the index directory and calls this method. The policy may choose to delete some of the commit points, doing so by calling method delete() of IndexCommit.

Note: the last CommitPoint is the most recent one, i.e. the "front index state". Be careful not to delete it, unless you know for sure what you are doing, and unless you can afford to lose the index content while doing that.

Specified by:
onInit in interface IndexDeletionPolicy
Overrides:
onInit in class SnapshotDeletionPolicy
Parameters:
commits - List of current point-in-time commits, sorted by age (the 0th one is the oldest commit).
Throws:
IOException

snapshot

public IndexCommit snapshot(String id)
                     throws IOException
Snapshots the last commit using the given ID. Once this method returns, the snapshot information is persisted in the directory.

Overrides:
snapshot in class SnapshotDeletionPolicy
Parameters:
id - a unique identifier of the commit that is being snapshotted.
Returns:
the IndexCommit that was snapshotted.
Throws:
IOException
See Also:
SnapshotDeletionPolicy.snapshot(String)

release

public void release(String id)
             throws IOException
Deletes a snapshotted commit by ID. Once this method returns, the snapshot information is committed to the directory.

Overrides:
release in class SnapshotDeletionPolicy
Parameters:
id - a unique identifier of the commit that is un-snapshotted.
Throws:
IOException
See Also:
SnapshotDeletionPolicy.release(String)

close

public void close()
           throws CorruptIndexException,
                  IOException
Closes the index which writes the snapshots to the directory.

Throws:
CorruptIndexException
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PKIndexSplitter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class PKIndexSplitter

java.lang.Object
    extended by  org.apache.lucene.index.PKIndexSplitter

public class PKIndexSplitter
extends Object

Split an index based on a Filter.

Constructor Summary
PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Filter docsInFirstIndex)
Deprecated. use PKIndexSplitter(Version, Directory, Directory, Directory, Filter) instead. This constructor will be removed in Lucene 4.0.
PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Filter docsInFirstIndex, IndexWriterConfig config1, IndexWriterConfig config2)
PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Term midTerm)
Deprecated. use PKIndexSplitter(Version, Directory, Directory, Directory, Term) instead. This constructor will be removed in Lucene 4.0.
PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Term midTerm, IndexWriterConfig config1, IndexWriterConfig config2)
PKIndexSplitter(Version version, Directory input, Directory dir1, Directory dir2, Filter docsInFirstIndex)
Split an index based on a Filter.
PKIndexSplitter(Version version, Directory input, Directory dir1, Directory dir2, Term midTerm)
Split an index based on a given primary key term and a 'middle' term.
Method Summary
 void split()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PKIndexSplitter

@Deprecated
public PKIndexSplitter(Directory input,
                                  Directory dir1,
                                  Directory dir2,
                                  Filter docsInFirstIndex)
Deprecated. use PKIndexSplitter(Version, Directory, Directory, Directory, Filter) instead. This constructor will be removed in Lucene 4.0.

Split an index based on a Filter. All documents that match the filter are sent to dir1, remaining ones to dir2.

PKIndexSplitter

@Deprecated
public PKIndexSplitter(Directory input,
                                  Directory dir1,
                                  Directory dir2,
                                  Term midTerm)
Deprecated. use PKIndexSplitter(Version, Directory, Directory, Directory, Term) instead. This constructor will be removed in Lucene 4.0.

Split an index based on a given primary key term and a 'middle' term. If the middle term is present, it's sent to dir2.

PKIndexSplitter

public PKIndexSplitter(Version version,
                       Directory input,
                       Directory dir1,
                       Directory dir2,
                       Filter docsInFirstIndex)
Split an index based on a Filter. All documents that match the filter are sent to dir1, remaining ones to dir2.

PKIndexSplitter

public PKIndexSplitter(Directory input,
                       Directory dir1,
                       Directory dir2,
                       Filter docsInFirstIndex,
                       IndexWriterConfig config1,
                       IndexWriterConfig config2)

PKIndexSplitter

public PKIndexSplitter(Version version,
                       Directory input,
                       Directory dir1,
                       Directory dir2,
                       Term midTerm)
Split an index based on a given primary key term and a 'middle' term. If the middle term is present, it's sent to dir2.

PKIndexSplitter

public PKIndexSplitter(Directory input,
                       Directory dir1,
                       Directory dir2,
                       Term midTerm,
                       IndexWriterConfig config1,
                       IndexWriterConfig config2)
Method Detail

split

public void split()
           throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PositionBasedTermVectorMapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class PositionBasedTermVectorMapper

java.lang.Object
    extended by  org.apache.lucene.index.TermVectorMapper
        extended by  org.apache.lucene.index.PositionBasedTermVectorMapper

public class PositionBasedTermVectorMapper
extends TermVectorMapper

For each Field, store position by position information. It ignores frequency information

This is not thread-safe.

Nested Class Summary
static class PositionBasedTermVectorMapper.TVPositionInfo
Container for a term at a position
Constructor Summary
PositionBasedTermVectorMapper()
PositionBasedTermVectorMapper(boolean ignoringOffsets)
Method Summary
Map<String,Map<Integer,PositionBasedTermVectorMapper.TVPositionInfo>> | getFieldToTerms() Get the mapping between fields and terms, sorted by the comparator
boolean | isIgnoringPositions() Never ignores positions.
void | map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) Callback for the TermVectorReader.
void | setExpectations(String field, int numTerms, boolean storeOffsets, boolean storePositions) Callback mechanism used by the TermVectorReader
Methods inherited from class org.apache.lucene.index.TermVectorMapper
isIgnoringOffsets, setDocumentNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PositionBasedTermVectorMapper

public PositionBasedTermVectorMapper()

PositionBasedTermVectorMapper

public PositionBasedTermVectorMapper(boolean ignoringOffsets)
Method Detail

isIgnoringPositions

public boolean isIgnoringPositions()
Never ignores positions. This mapper doesn't make much sense unless there are positions

Overrides:
isIgnoringPositions in class TermVectorMapper
Returns:
false

map

public void map(String term,
                int frequency,
                TermVectorOffsetInfo[] offsets,
                int[] positions)
Callback for the TermVectorReader.

Specified by:
map in class TermVectorMapper
Parameters:
term -
frequency -
offsets -
positions -

setExpectations

public void setExpectations(String field,
                            int numTerms,
                            boolean storeOffsets,
                            boolean storePositions)
Callback mechanism used by the TermVectorReader

Specified by:
setExpectations in class TermVectorMapper
Parameters:
field - The field being read
numTerms - The number of terms in the vector
storeOffsets - Whether offsets are available
storePositions - Whether positions are available

getFieldToTerms

public Map<String,Map<Integer,PositionBasedTermVectorMapper.TVPositionInfo>> getFieldToTerms()
Get the mapping between fields and terms, sorted by the comparator

Returns:
A map between field names and a Map. The sub-Map key is the position as the integer, the value is PositionBasedTermVectorMapper.TVPositionInfo.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PositionBasedTermVectorMapper.TVPositionInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class PositionBasedTermVectorMapper.TVPositionInfo

java.lang.Object
    extended by  org.apache.lucene.index.PositionBasedTermVectorMapper.TVPositionInfo
Enclosing class:
PositionBasedTermVectorMapper
public static class PositionBasedTermVectorMapper.TVPositionInfo
extends Object

Container for a term at a position

Constructor Summary
PositionBasedTermVectorMapper.TVPositionInfo(int position, boolean storeOffsets)
Method Summary
 List<TermVectorOffsetInfo> getOffsets()
Parallel list (to getTerms()) of TermVectorOffsetInfo objects.
 int getPosition()
 List<String> getTerms()
Note, there may be multiple terms at the same position
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PositionBasedTermVectorMapper.TVPositionInfo

public PositionBasedTermVectorMapper.TVPositionInfo(int position,
                                                    boolean storeOffsets)
Method Detail

getPosition

public int getPosition()
Returns:
The position of the term

getTerms

public List<String> getTerms()
Note, there may be multiple terms at the same position

Returns:
A List of Strings

getOffsets

public List<TermVectorOffsetInfo> getOffsets()
Parallel list (to getTerms()) of TermVectorOffsetInfo objects. There may be multiple entries since there may be multiple terms at a position

Returns:
A List of TermVectorOffsetInfo objects, if offsets are stored.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PruningReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class PruningReader

java.lang.Object
    extended by  org.apache.lucene.index.IndexReader
        extended by  org.apache.lucene.index.FilterIndexReader
            extended by  org.apache.lucene.index.PruningReader
All Implemented Interfaces:
Closeable, Cloneable
public class PruningReader
extends FilterIndexReader

This class produces a subset of the input index, by removing some postings data according to rules implemented in a TermPruningPolicy, and optionally it can also remove stored fields of documents according to rules implemented in a StorePruningPolicy.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.FilterIndexReader
FilterIndexReader.FilterTermDocs, FilterIndexReader.FilterTermEnum, FilterIndexReader.FilterTermPositions
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader
IndexReader.ReaderClosedListener
Field Summary
protected int | delTermCount
protected int | delVecCount
protected int | docCount
protected int | prunedVecCount
protected StorePruningPolicy | storePolicy
protected int | termCount
protected TermPruningPolicy | termPolicy
protected int | vecCount
Fields inherited from class org.apache.lucene.index.FilterIndexReader
in
Fields inherited from class org.apache.lucene.index.IndexReader
hasChanges
Constructor Summary
PruningReader(IndexReader in, StorePruningPolicy storePolicy, TermPruningPolicy termPolicy)
Constructor.
Method Summary
Document | document(int n, FieldSelector fieldSelector) Applies a StorePruningPolicy to stored fields of a document.
FieldInfos | getFieldInfos() Applies a StorePruningPolicy to the list of available field infos.
IndexReader[] | getSequentialSubReaders() Expert: returns the sequential sub readers that this reader is logically composed of.
TermFreqVector[] | getTermFreqVectors(int docNumber) Applies TermPruningPolicy to terms inside term vectors.
TermPositions | termPositions() Applies TermPruningPolicy to term positions.
TermEnum | terms() Applies TermPruningPolicy to term enum.
Methods inherited from class org.apache.lucene.index.FilterIndexReader
directory, docFreq, doClose, doCommit, doDelete, doSetNorm, doUndeleteAll, getCommitUserData, getCoreCacheKey, getDeletesCacheKey, getIndexCommit, getTermFreqVector, getTermFreqVector, getTermFreqVector, getTermInfosIndexDivisor, getUniqueTermCount, getVersion, hasDeletions, hasNorms, isCurrent, isDeleted, isOptimized, maxDoc, norms, norms, numDocs, termDocs, termDocs, terms, toString
Methods inherited from class org.apache.lucene.index.IndexReader
acquireWriteLock, addReaderClosedListener, clone, clone, close, commit, commit, decRef, deleteDocument, deleteDocuments, document, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, ensureOpen, flush, flush, getCommitUserData, getCurrentVersion, getRefCount, incRef, indexExists, lastModified, listCommits, numDeletedDocs, open, open, open, open, open, open, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChanged, removeReaderClosedListener, reopen, reopen, reopen, reopen, setNorm, setNorm, termPositions, tryIncRef, undeleteAll
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

docCount

protected int docCount

vecCount

protected int vecCount

termCount

protected int termCount

delTermCount

protected int delTermCount

prunedVecCount

protected int prunedVecCount

delVecCount

protected int delVecCount

termPolicy

protected TermPruningPolicy termPolicy

storePolicy

protected StorePruningPolicy storePolicy
Constructor Detail

PruningReader

public PruningReader(IndexReader in,
                     StorePruningPolicy storePolicy,
                     TermPruningPolicy termPolicy)
Constructor.

Parameters:
in - input reader
storePolicy - implementation of StorePruningPolicy - if null then stored values will be retained as is.
termPolicy - implementation of TermPruningPolicy, must not be null.
Method Detail

getSequentialSubReaders

public IndexReader[] getSequentialSubReaders()
Description copied from class: IndexReader
Expert: returns the sequential sub readers that this reader is logically composed of. For example, IndexSearcher uses this API to drive searching by one sub reader at a time. If this reader is not composed of sequential child readers, it should return null. If this method returns an empty array, that means this reader is a null reader (for example a MultiReader that has no sub readers).

NOTE: You should not try using sub-readers returned by this method to make any changes (setNorm, deleteDocument, etc.). While this might succeed for one composite reader (like MultiReader), it will most likely lead to index corruption for other readers (like DirectoryReader obtained through IndexReader.open(org.apache.lucene.store.Directory). Use the parent reader directly.

Overrides:
getSequentialSubReaders in class FilterIndexReader

document

public Document document(int n,
                         FieldSelector fieldSelector)
                  throws CorruptIndexException,
                         IOException
Applies a StorePruningPolicy to stored fields of a document.

Overrides:
document in class FilterIndexReader
Parameters:
n - Get the document at the nth position
fieldSelector - The FieldSelector to use to determine what Fields should be loaded on the Document. May be null, in which case all Fields will be loaded.
Returns:
The stored fields of the Document at the nth position
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
Fieldable, FieldSelector, SetBasedFieldSelector, LoadFirstFieldSelector

getFieldInfos

public FieldInfos getFieldInfos()
Applies a StorePruningPolicy to the list of available field infos.

Overrides:
getFieldInfos in class FilterIndexReader

getTermFreqVectors

public TermFreqVector[] getTermFreqVectors(int docNumber)
                                    throws IOException
Applies TermPruningPolicy to terms inside term vectors.

Overrides:
getTermFreqVectors in class FilterIndexReader
Parameters:
docNumber - document for which term frequency vectors are returned
Returns:
array of term frequency vectors. May be null if no term vectors have been stored for the specified document.
Throws:
IOException - if index cannot be accessed
See Also:
Field.TermVector

termPositions

public TermPositions termPositions()
                            throws IOException
Applies TermPruningPolicy to term positions.

Overrides:
termPositions in class FilterIndexReader
Throws:
IOException - if there is a low-level IO error

terms

public TermEnum terms()
               throws IOException
Applies TermPruningPolicy to term enum.

Overrides:
terms in class FilterIndexReader
Throws:
IOException - if there is a low-level IO error
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RandomIndexWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class RandomIndexWriter

java.lang.Object
    extended by  org.apache.lucene.index.RandomIndexWriter
All Implemented Interfaces:
Closeable
public class RandomIndexWriter
extends Object
implements Closeable

Silly class that randomizes the indexing experience. EG it may swap in a different merge policy/scheduler; may commit periodically; may or may not forceMerge in the end, may flush by doc count instead of RAM, etc.

Field Summary
 IndexWriter w
Constructor Summary
RandomIndexWriter(Random r, Directory dir)
create a RandomIndexWriter with a random config: Uses TEST_VERSION_CURRENT and Whitespace+LowercasingAnalyzer
RandomIndexWriter(Random r, Directory dir, Analyzer a)
create a RandomIndexWriter with a random config: Uses TEST_VERSION_CURRENT
RandomIndexWriter(Random r, Directory dir, IndexWriterConfig c)
create a RandomIndexWriter with the provided config
RandomIndexWriter(Random r, Directory dir, Version v, Analyzer a)
create a RandomIndexWriter with a random config
Method Summary
void | addDocument(Document doc) Adds a Document.
void | addDocuments(Collection<Document> docs)
void | addIndexes(Directory... dirs)
void | addIndexes(IndexReader... readers)
void | close() Close this writer.
void | commit()
void | deleteAll()
void | deleteDocuments(Query q)
void | deleteDocuments(Term term)
void | forceMerge(int maxSegmentCount) Forces a forceMerge.
void | forceMergeDeletes()
void | forceMergeDeletes(boolean doWait)
IndexReader | getReader()
IndexReader | getReader(boolean applyDeletions)
int | maxDoc()
int | numDocs()
void | setDoRandomForceMerge(boolean v)
void | setDoRandomForceMergeAssert(boolean v)
void | updateDocument(Term t, Document doc) Updates a document.
void | updateDocuments(Term delTerm, Collection<Document> docs)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

w

public IndexWriter w
Constructor Detail

RandomIndexWriter

public RandomIndexWriter(Random r,
                         Directory dir)
                  throws IOException
create a RandomIndexWriter with a random config: Uses TEST_VERSION_CURRENT and Whitespace+LowercasingAnalyzer

Throws:
IOException

RandomIndexWriter

public RandomIndexWriter(Random r,
                         Directory dir,
                         Analyzer a)
                  throws IOException
create a RandomIndexWriter with a random config: Uses TEST_VERSION_CURRENT

Throws:
IOException

RandomIndexWriter

public RandomIndexWriter(Random r,
                         Directory dir,
                         Version v,
                         Analyzer a)
                  throws IOException
create a RandomIndexWriter with a random config

Throws:
IOException

RandomIndexWriter

public RandomIndexWriter(Random r,
                         Directory dir,
                         IndexWriterConfig c)
                  throws IOException
create a RandomIndexWriter with the provided config

Throws:
IOException
Method Detail

addDocument

public void addDocument(Document doc)
                 throws IOException
Adds a Document.

Throws:
IOException
See Also:
IndexWriter.addDocument(Document)

addDocuments

public void addDocuments(Collection<Document> docs)
                  throws IOException
Throws:
IOException

updateDocuments

public void updateDocuments(Term delTerm,
                            Collection<Document> docs)
                     throws IOException
Throws:
IOException

updateDocument

public void updateDocument(Term t,
                           Document doc)
                    throws IOException
Updates a document.

Throws:
IOException
See Also:
IndexWriter.updateDocument(Term, Document)

addIndexes

public void addIndexes(Directory... dirs)
                throws CorruptIndexException,
                       IOException
Throws:
CorruptIndexException
IOException

addIndexes

public void addIndexes(IndexReader... readers)
                throws CorruptIndexException,
                       IOException
Throws:
CorruptIndexException
IOException

deleteDocuments

public void deleteDocuments(Term term)
                     throws CorruptIndexException,
                            IOException
Throws:
CorruptIndexException
IOException

deleteDocuments

public void deleteDocuments(Query q)
                     throws CorruptIndexException,
                            IOException
Throws:
CorruptIndexException
IOException

commit

public void commit()
            throws CorruptIndexException,
                   IOException
Throws:
CorruptIndexException
IOException

numDocs

public int numDocs()
            throws IOException
Throws:
IOException

maxDoc

public int maxDoc()

deleteAll

public void deleteAll()
               throws IOException
Throws:
IOException

forceMergeDeletes

public void forceMergeDeletes(boolean doWait)
                       throws IOException
Throws:
IOException

forceMergeDeletes

public void forceMergeDeletes()
                       throws IOException
Throws:
IOException

setDoRandomForceMerge

public void setDoRandomForceMerge(boolean v)

setDoRandomForceMergeAssert

public void setDoRandomForceMergeAssert(boolean v)

getReader

public IndexReader getReader()
                      throws IOException
Throws:
IOException

getReader

public IndexReader getReader(boolean applyDeletions)
                      throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Close this writer.

Specified by:
close in interface Closeable
Throws:
IOException
See Also:
IndexWriter.close()

forceMerge

public void forceMerge(int maxSegmentCount)
                throws IOException
Forces a forceMerge.

NOTE: this should be avoided in tests unless absolutely necessary, as it will result in less test coverage.

Throws:
IOException
See Also:
IndexWriter.forceMerge(int)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SegmentInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class SegmentInfo

java.lang.Object
    extended by  org.apache.lucene.index.SegmentInfo
All Implemented Interfaces:
Cloneable
public final class SegmentInfo
extends Object
implements Cloneable

Information about a segment such as it's name, directory, and files related to the segment.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Directory | dir
int | docCount
String | name
Constructor Summary
SegmentInfo(String name, int docCount, Directory dir, boolean isCompoundFile, boolean hasSingleNormFile, boolean hasProx, boolean hasVectors)
Method Summary
Object | clone()
boolean | equals(Object obj) We consider another SegmentInfo instance equal if it has the same dir and same name.
List<String> | files()
int | getDelCount()
String | getDelFileName()
Map<String,String> | getDiagnostics()
boolean | getDocStoreIsCompoundFile()
int | getDocStoreOffset()
String | getDocStoreSegment()
boolean | getHasProx()
boolean | getHasVectors()
String | getNormFileName(int number) Get the file name for the norms file for this field.
boolean | getUseCompoundFile() Returns true if this segment is stored as a compound file; else, false.
String | getVersion() Returns the version of the code which wrote the segment.
boolean | hasDeletions()
int | hashCode()
boolean | hasSeparateNorms() Returns true if any fields in this segment have separate norms.
boolean | hasSeparateNorms(int fieldNumber) Returns true if this field for this segment has saved a separate norms file (__N.sX).
void | setDocStoreSegment(String segment)
void | setHasVectors(boolean v)
long | sizeInBytes(boolean includeDocStores) Returns total size in bytes of all of files used by this segment (if includeDocStores is true), or the size of all files except the store files otherwise.
String | toString()
String | toString(Directory dir, int pendingDelCount) Used for debugging.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

name

public String name

docCount

public int docCount

dir

public Directory dir
Constructor Detail

SegmentInfo

public SegmentInfo(String name,
                   int docCount,
                   Directory dir,
                   boolean isCompoundFile,
                   boolean hasSingleNormFile,
                   boolean hasProx,
                   boolean hasVectors)
Method Detail

getDiagnostics

public Map<String,String> getDiagnostics()

sizeInBytes

public long sizeInBytes(boolean includeDocStores)
                 throws IOException
Returns total size in bytes of all of files used by this segment (if includeDocStores is true), or the size of all files except the store files otherwise.

Throws:
IOException

getHasVectors

public boolean getHasVectors()
                      throws IOException
Throws:
IOException

setHasVectors

public void setHasVectors(boolean v)

hasDeletions

public boolean hasDeletions()
                     throws IOException
Throws:
IOException

clone

public Object clone()
Overrides:
clone in class Object

getDelFileName

public String getDelFileName()

hasSeparateNorms

public boolean hasSeparateNorms(int fieldNumber)
                         throws IOException
Returns true if this field for this segment has saved a separate norms file (__N.sX).

Parameters:
fieldNumber - the field index to check
Throws:
IOException

hasSeparateNorms

public boolean hasSeparateNorms()
                         throws IOException
Returns true if any fields in this segment have separate norms.

Throws:
IOException

getNormFileName

public String getNormFileName(int number)
                       throws IOException
Get the file name for the norms file for this field.

Parameters:
number - field index
Throws:
IOException

getUseCompoundFile

public boolean getUseCompoundFile()
                           throws IOException
Returns true if this segment is stored as a compound file; else, false.

Throws:
IOException

getDelCount

public int getDelCount()
                throws IOException
Throws:
IOException

getDocStoreOffset

public int getDocStoreOffset()

getDocStoreIsCompoundFile

public boolean getDocStoreIsCompoundFile()

getDocStoreSegment

public String getDocStoreSegment()

setDocStoreSegment

public void setDocStoreSegment(String segment)

getHasProx

public boolean getHasProx()

files

public List<String> files()
                   throws IOException
Throws:
IOException

toString

public String toString()

Overrides:
toString in class Object

toString

public String toString(Directory dir,
                       int pendingDelCount)
Used for debugging. Format may suddenly change.

Current format looks like _a(3.1):c45/4->_1, which means the segment's name is _a; it was created with Lucene 3.1 (or '?' if it's unkown); it's using compound file format (would be C if not compound); it has 45 documents; it has 4 deletions (this part is left off when there are no deletions); it's using the shared doc stores named _1 (this part is left off if doc stores are private).

equals

public boolean equals(Object obj)
We consider another SegmentInfo instance equal if it has the same dir and same name.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getVersion

public String getVersion()
Returns the version of the code which wrote the segment.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SegmentInfos.FindSegmentsFile

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class SegmentInfos.FindSegmentsFile

java.lang.Object
    extended by  org.apache.lucene.index.SegmentInfos.FindSegmentsFile
Enclosing class:
SegmentInfos
public abstract static class SegmentInfos.FindSegmentsFile
extends Object

Utility class for executing code that needs to do something with the current segments file. This is necessary with lock-less commits because from the time you locate the current segments file name, until you actually open it, read its contents, or check modified time, etc., it could have been deleted due to a writer commit finishing.

Constructor Summary
SegmentInfos.FindSegmentsFile(Directory directory)
Method Summary
protected abstract Object | doBody(String segmentFileName) Subclass must implement this.
Object | run()
Object | run(IndexCommit commit)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SegmentInfos.FindSegmentsFile

public SegmentInfos.FindSegmentsFile(Directory directory)
Method Detail

run

public Object run()
           throws CorruptIndexException,
                  IOException
Throws:
CorruptIndexException
IOException

run

public Object run(IndexCommit commit)
           throws CorruptIndexException,
                  IOException
Throws:
CorruptIndexException
IOException

doBody

protected abstract Object doBody(String segmentFileName)
                          throws CorruptIndexException,
                                 IOException
Subclass must implement this. The assumption is an IOException will be thrown if something goes wrong during the processing that could have been caused by a writer committing.

Throws:
CorruptIndexException
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SegmentInfos

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class SegmentInfos

java.lang.Object
    extended by  org.apache.lucene.index.SegmentInfos
All Implemented Interfaces:
Cloneable, Iterable<SegmentInfo>
public final class SegmentInfos
extends Object
implements Cloneable, Iterable<SegmentInfo>

A collection of segmentInfo objects with methods for operating on those segments in relation to the file system.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class SegmentInfos.FindSegmentsFile
Utility class for executing code that needs to do something with the current segments file.
Field Summary
int | counter
static int | CURRENT_FORMAT
static int | FORMAT The file format version, a negative number.
static int | FORMAT_3_1 Each segment records the Lucene version that created it.
static int | FORMAT_CHECKSUM This format adds a checksum at the end of the file to ensure all bytes were successfully written.
static int | FORMAT_DEL_COUNT This format adds the deletion count for each segment.
static int | FORMAT_DIAGNOSTICS This format adds optional per-segment String diagnostics storage, and switches userData to Map
static int | FORMAT_HAS_PROX This format adds the boolean hasProx to record if any fields in the segment store prox information (ie, have omitTermFreqAndPositions==false)
static int | FORMAT_HAS_VECTORS Each segment records whether it has term vectors
static int | FORMAT_LOCKLESS This format adds details used for lockless commits.
static int | FORMAT_MAXIMUM
static int | FORMAT_MINIMUM
static int | FORMAT_SHARED_DOC_STORE This format allows multiple segments to share a single vectors and stored fields file.
static int | FORMAT_SINGLE_NORM_FILE This format adds a "hasSingleNormFile" flag into each segment info.
static int | FORMAT_USER_DATA This format adds optional commit userData (String) storage.
Constructor Summary
SegmentInfos()
Method Summary
 void add(SegmentInfo si)
 void addAll(Iterable<SegmentInfo> sis)
 List<SegmentInfo> asList()
Returns all contained segments as an unmodifiable List view.
 Set<SegmentInfo> asSet()
Returns all contained segments as an unmodifiable Set view.
 void changed()
Call this before committing if changes have been made to the segments.
 void clear()
 Object clone()
Returns a copy of this instance, also copying each SegmentInfo.
 boolean contains(SegmentInfo si)
 Collection<String> files(Directory dir, boolean includeSegmentsFile)
Returns all file names referenced by SegmentInfo instances matching the provided Directory (ie files associated with any "external" segments are skipped).
static long generationFromSegmentsFileName(String fileName)
Parse the generation off the segments file name and return it.
static int getDefaultGenLookahedCount()
 int getFormat()
 long getGeneration()
static PrintStream getInfoStream()
static long getLastCommitGeneration(Directory directory)
Get the generation of the most recent commit to the index in this directory (N in the segments_N file).
static long getLastCommitGeneration(String[] files)
Get the generation of the most recent commit to the list of index files (N in the segments_N file).
static String getLastCommitSegmentsFileName(Directory directory)
Get the filename of the segments_N file for the most recent commit to the index in this Directory.
static String getLastCommitSegmentsFileName(String[] files)
Get the filename of the segments_N file for the most recent commit in the list of index files.
 long getLastGeneration()
 String getNextSegmentFileName()
Get the next segments_N filename that will be written.
 String getSegmentsFileName()
Get the segments_N filename in use by this segment infos.
 Map<String,String> getUserData()
 long getVersion()
version number when this SegmentInfos was generated.
 int indexOf(SegmentInfo si)
 SegmentInfo info(int i)
 Iterator<SegmentInfo> iterator()
Returns an unmodifiable Iterator of contained segments in order.
 void pruneDeletedSegments()
Prunes any segment whose docs are all deleted.
 SegmentInfos range(int first, int last)
Deprecated. use asList().subList(first, last) instead.
 void read(Directory directory)
This version of read uses the retry logic (for lock-less commits) to find the right segments file to load.
 void read(Directory directory, String segmentFileName)
Read a particular segmentFileName.
static long readCurrentVersion(Directory directory)
Deprecated. Load the SegmentInfos and then call getVersion().
 void remove(int index)
 void remove(SegmentInfo si)
static void setDefaultGenLookaheadCount(int count)
Advanced: set how many times to try incrementing the gen when loading the segments file.
 void setFormat(int format)
static void setInfoStream(PrintStream infoStream)
If non-null, information about retries when loading the segments file will be printed to this.
 int size()
 String toString(Directory directory)
 int totalDocCount()
Returns sum of all segment's docCounts.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

FORMAT

public static final int FORMAT
The file format version, a negative number.

See Also:
Constant Field Values

FORMAT_LOCKLESS

public static final int FORMAT_LOCKLESS
This format adds details used for lockless commits. It differs slightly from the previous format in that file names are never re-used (write once). Instead, each file is written to the next generation. For example, segments_1, segments_2, etc. This allows us to not use a commit lock. See file formats for details.

See Also:
Constant Field Values

FORMAT_SINGLE_NORM_FILE

public static final int FORMAT_SINGLE_NORM_FILE
This format adds a "hasSingleNormFile" flag into each segment info. See LUCENE-756 for details.

See Also:
Constant Field Values

FORMAT_SHARED_DOC_STORE

public static final int FORMAT_SHARED_DOC_STORE
This format allows multiple segments to share a single vectors and stored fields file.

See Also:
Constant Field Values

FORMAT_CHECKSUM

public static final int FORMAT_CHECKSUM
This format adds a checksum at the end of the file to ensure all bytes were successfully written.

See Also:
Constant Field Values

FORMAT_DEL_COUNT

public static final int FORMAT_DEL_COUNT
This format adds the deletion count for each segment. This way IndexWriter can efficiently report numDocs().

See Also:
Constant Field Values

FORMAT_HAS_PROX

public static final int FORMAT_HAS_PROX
This format adds the boolean hasProx to record if any fields in the segment store prox information (ie, have omitTermFreqAndPositions==false)

See Also:
Constant Field Values

FORMAT_USER_DATA

public static final int FORMAT_USER_DATA
This format adds optional commit userData (String) storage.

See Also:
Constant Field Values

FORMAT_DIAGNOSTICS

public static final int FORMAT_DIAGNOSTICS
This format adds optional per-segment String diagnostics storage, and switches userData to Map

See Also:
Constant Field Values

FORMAT_HAS_VECTORS

public static final int FORMAT_HAS_VECTORS
Each segment records whether it has term vectors

See Also:
Constant Field Values

FORMAT_3_1

public static final int FORMAT_3_1
Each segment records the Lucene version that created it.

See Also:
Constant Field Values

CURRENT_FORMAT

public static final int CURRENT_FORMAT
See Also:
Constant Field Values

FORMAT_MINIMUM

public static final int FORMAT_MINIMUM
See Also:
Constant Field Values

FORMAT_MAXIMUM

public static final int FORMAT_MAXIMUM
See Also:
Constant Field Values

counter

public int counter
Constructor Detail

SegmentInfos

public SegmentInfos()
Method Detail

setFormat

public void setFormat(int format)

getFormat

public int getFormat()

info

public SegmentInfo info(int i)

getLastCommitGeneration

public static long getLastCommitGeneration(String[] files)
Get the generation of the most recent commit to the list of index files (N in the segments_N file).

Parameters:
files - -- array of file names to check

getLastCommitGeneration

public static long getLastCommitGeneration(Directory directory)
                                    throws IOException
Get the generation of the most recent commit to the index in this directory (N in the segments_N file).

Parameters:
directory - -- directory to search for the latest segments_N file
Throws:
IOException

getLastCommitSegmentsFileName

public static String getLastCommitSegmentsFileName(String[] files)
                                            throws IOException
Get the filename of the segments_N file for the most recent commit in the list of index files.

Parameters:
files - -- array of file names to check
Throws:
IOException

getLastCommitSegmentsFileName

public static String getLastCommitSegmentsFileName(Directory directory)
                                            throws IOException
Get the filename of the segments_N file for the most recent commit to the index in this Directory.

Parameters:
directory - -- directory to search for the latest segments_N file
Throws:
IOException

getSegmentsFileName

public String getSegmentsFileName()
Get the segments_N filename in use by this segment infos.

generationFromSegmentsFileName

public static long generationFromSegmentsFileName(String fileName)
Parse the generation off the segments file name and return it.

getNextSegmentFileName

public String getNextSegmentFileName()
Get the next segments_N filename that will be written.

read

public final void read(Directory directory,
                       String segmentFileName)
                throws CorruptIndexException,
                       IOException
Read a particular segmentFileName. Note that this may throw an IOException if a commit is in process.

Parameters:
directory - -- directory containing the segments file
segmentFileName - -- segment file to load
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

read

public final void read(Directory directory)
                throws CorruptIndexException,
                       IOException
This version of read uses the retry logic (for lock-less commits) to find the right segments file to load.

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

pruneDeletedSegments

public void pruneDeletedSegments()
                          throws IOException
Prunes any segment whose docs are all deleted.

Throws:
IOException

clone

public Object clone()
Returns a copy of this instance, also copying each SegmentInfo.

Overrides:
clone in class Object

getVersion

public long getVersion()
version number when this SegmentInfos was generated.

getGeneration

public long getGeneration()

getLastGeneration

public long getLastGeneration()

readCurrentVersion

@Deprecated
public static long readCurrentVersion(Directory directory)
                               throws CorruptIndexException,
                                      IOException
Deprecated. Load the SegmentInfos and then call getVersion().

Current version number from segments file.

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

setInfoStream

public static void setInfoStream(PrintStream infoStream)
If non-null, information about retries when loading the segments file will be printed to this.

setDefaultGenLookaheadCount

public static void setDefaultGenLookaheadCount(int count)
Advanced: set how many times to try incrementing the gen when loading the segments file. This only runs if the primary (listing directory) and secondary (opening segments.gen file) methods fail to find the segments file.

WARNING: This API is experimental and might change in incompatible ways in the next release.

getDefaultGenLookahedCount

public static int getDefaultGenLookahedCount()
See Also:
setDefaultGenLookaheadCount(int)
WARNING: This API is experimental and might change in incompatible ways in the next release.

getInfoStream

public static PrintStream getInfoStream()
See Also:
setInfoStream(java.io.PrintStream)

range

@Deprecated
public SegmentInfos range(int first,
                                     int last)
Deprecated. use asList().subList(first, last) instead.

Returns a new SegmentInfos containing the SegmentInfo instances in the specified range first (inclusive) to last (exclusive), so total number of segments returned is last-first.

files

public Collection<String> files(Directory dir,
                                boolean includeSegmentsFile)
                         throws IOException
Returns all file names referenced by SegmentInfo instances matching the provided Directory (ie files associated with any "external" segments are skipped). The returned collection is recomputed on each invocation.

Throws:
IOException

toString

public String toString(Directory directory)

getUserData

public Map<String,String> getUserData()

totalDocCount

public int totalDocCount()
Returns sum of all segment's docCounts. Note that this does not include deletions

changed

public void changed()
Call this before committing if changes have been made to the segments.

iterator

public Iterator<SegmentInfo> iterator()
Returns an unmodifiable Iterator of contained segments in order.

Specified by:
iterator in interface Iterable<SegmentInfo>

asList

public List<SegmentInfo> asList()
Returns all contained segments as an unmodifiable List view.

asSet

public Set<SegmentInfo> asSet()
Returns all contained segments as an unmodifiable Set view. The iterator is not sorted, use List view or iterator() to get all segments in order.

size

public int size()

add

public void add(SegmentInfo si)

addAll

public void addAll(Iterable<SegmentInfo> sis)

clear

public void clear()

remove

public void remove(SegmentInfo si)

remove

public void remove(int index)

contains

public boolean contains(SegmentInfo si)

indexOf

public int indexOf(SegmentInfo si)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SegmentReader.CoreClosedListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Interface SegmentReader.CoreClosedListener

Enclosing class:
SegmentReader
public static interface SegmentReader.CoreClosedListener

Called when the shared core for this SegmentReader is closed.

This listener is called only once all SegmentReaders sharing the same core are closed. At this point it is safe for apps to evict this reader from any caches keyed on SegmentReader.getCoreCacheKey(). This is the same interface that FieldCache uses, internally, to evict entries.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 void onClose(SegmentReader owner)

Method Detail

onClose

void onClose(SegmentReader owner)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SegmentReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class SegmentReader

java.lang.Object
    extended by  org.apache.lucene.index.IndexReader
        extended by  org.apache.lucene.index.SegmentReader
All Implemented Interfaces:
Closeable, Cloneable
public class SegmentReader
extends IndexReader
implements Cloneable

IndexReader implementation over a single segment.

Instances pointing to the same segment (but with different deletes, etc) may share the same core data.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static interface SegmentReader.CoreClosedListener
Called when the shared core for this SegmentReader is closed.
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader
IndexReader.ReaderClosedListener
Field Summary
protected  boolean readOnly
Deprecated.
Fields inherited from class org.apache.lucene.index.IndexReader
hasChanges
Constructor Summary
SegmentReader()
Method Summary
void | addCoreClosedListener(SegmentReader.CoreClosedListener listener) Expert: adds a CoreClosedListener to this reader's shared core
Object | clone() Efficiently clones the IndexReader (sharing most internal state).
IndexReader | clone(boolean openReadOnly) Deprecated.
protected BitVector | cloneDeletedDocs(BitVector bv) Deprecated.
protected byte[] | cloneNormBytes(byte[] bytes) Deprecated.
Directory | directory() Returns the directory this index resides in.
int | docFreq(Term t) Returns the number of documents containing the term t.
protected void | doClose() Implements close.
protected void | doCommit(Map<String,String> commitUserData) Deprecated.
Document | document(int n, FieldSelector fieldSelector) Get the Document at the n th position.
protected void | doDelete(int docNum) Deprecated.
protected IndexReader | doOpenIfChanged() If the index has changed since it was opened, open and return a new reader; else, return null.
protected IndexReader | doOpenIfChanged(boolean openReadOnly) Deprecated.
protected void | doSetNorm(int doc, String field, byte value) Deprecated.
protected void | doUndeleteAll() Deprecated.
static SegmentReader | get(boolean readOnly, Directory dir, SegmentInfo si, int readBufferSize, boolean doOpenStores, int termInfosIndexDivisor)
static SegmentReader | get(boolean readOnly, SegmentInfo si, int termInfosIndexDivisor)
Object | getCoreCacheKey() Expert
Object | getDeletesCacheKey() Expert.
FieldInfos | getFieldInfos() Get the FieldInfos describing all fields in this reader.
String | getSegmentName() Return the name of the segment this reader is reading.
TermFreqVector | getTermFreqVector(int docNumber, String field) Return a term frequency vector for the specified document and field.
void | getTermFreqVector(int docNumber, String field, TermVectorMapper mapper) Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the TermFreqVector.
void | getTermFreqVector(int docNumber, TermVectorMapper mapper) Map all the term vectors for all fields in a Document
TermFreqVector[] | getTermFreqVectors(int docNumber) Return an array of term frequency vectors for the specified document.
int | getTermInfosIndexDivisor() For IndexReader implementations that use TermInfosReader to read terms, this returns the current indexDivisor as specified when the reader was opened.
long | getUniqueTermCount() Returns the number of unique terms (across all fields) in this reader.
boolean | hasDeletions() Returns true if any documents have been deleted
boolean | hasNorms(String field) Returns true if there are norms stored for this field.
boolean | isDeleted(int n) Returns true if document n has been deleted
int | maxDoc() Returns one greater than the largest possible document number.
byte[] | norms(String field) Returns the byte-encoded normalization factor for the named field of every document.
void | norms(String field, byte[] bytes, int offset) Read norms into a pre-allocated array.
int | numDocs() Returns the number of documents in this index.
TermDocs | rawTermDocs(Term term) Expert: returns an enumeration of the documents that contain term, including deleted documents (which are normally filtered out).
void | removeCoreClosedListener(SegmentReader.CoreClosedListener listener) Expert: removes a CoreClosedListener from this reader's shared core
TermDocs | termDocs() Returns an unpositioned TermDocs enumerator.
TermDocs | termDocs(Term term) Returns an enumeration of all the documents which contain term.
TermPositions | termPositions() Returns an unpositioned TermPositions enumerator.
TermEnum | terms() Returns an enumeration of all the terms in the index.
TermEnum | terms(Term t) Returns an enumeration of all terms starting at a given term.
String | toString()
Methods inherited from class org.apache.lucene.index.IndexReader
acquireWriteLock, addReaderClosedListener, close, commit, commit, decRef, deleteDocument, deleteDocuments, document, doOpenIfChanged, doOpenIfChanged, ensureOpen, flush, flush, getCommitUserData, getCommitUserData, getCurrentVersion, getIndexCommit, getRefCount, getSequentialSubReaders, getVersion, incRef, indexExists, isCurrent, isOptimized, lastModified, listCommits, numDeletedDocs, open, open, open, open, open, open, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChanged, removeReaderClosedListener, reopen, reopen, reopen, reopen, setNorm, setNorm, termPositions, tryIncRef, undeleteAll
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

readOnly

@Deprecated
protected boolean readOnly
Deprecated.
Constructor Detail

SegmentReader

public SegmentReader()
Method Detail

get

public static SegmentReader get(boolean readOnly,
                                SegmentInfo si,
                                int termInfosIndexDivisor)
                         throws CorruptIndexException,
                                IOException
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

get

public static SegmentReader get(boolean readOnly,
                                Directory dir,
                                SegmentInfo si,
                                int readBufferSize,
                                boolean doOpenStores,
                                int termInfosIndexDivisor)
                         throws CorruptIndexException,
                                IOException
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

cloneNormBytes

@Deprecated
protected byte[] cloneNormBytes(byte[] bytes)
Deprecated.

Clones the norm bytes. May be overridden by subclasses. New and experimental.

Parameters:
bytes - Byte array to clone
Returns:
New BitVector

cloneDeletedDocs

@Deprecated
protected BitVector cloneDeletedDocs(BitVector bv)
Deprecated.

Clones the deleteDocs BitVector. May be overridden by subclasses. New and experimental.

Parameters:
bv - BitVector to clone
Returns:
New BitVector

clone

public final Object clone()
Description copied from class: IndexReader
Efficiently clones the IndexReader (sharing most internal state).

On cloning a reader with pending changes (deletions, norms), the original reader transfers its write lock to the cloned reader. This means only the cloned reader may make further changes to the index, and commit the changes to the index on close, but the old reader still reflects all changes made up until it was cloned.

Like IndexReader.openIfChanged(IndexReader), it's safe to make changes to either the original or the cloned reader: all shared mutable state obeys "copy on write" semantics to ensure the changes are not seen by other readers.

Overrides:
clone in class IndexReader

clone

@Deprecated
public final IndexReader clone(boolean openReadOnly)
                        throws CorruptIndexException,
                               IOException
Deprecated.

Clones the IndexReader and optionally changes readOnly. A readOnly reader cannot open a writeable reader.

Overrides:
clone in class IndexReader
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

doOpenIfChanged

protected IndexReader doOpenIfChanged()
                               throws CorruptIndexException,
                                      IOException
Description copied from class: IndexReader
If the index has changed since it was opened, open and return a new reader; else, return null.

Overrides:
doOpenIfChanged in class IndexReader
Throws:
CorruptIndexException
IOException
See Also:
IndexReader.openIfChanged(IndexReader)

doOpenIfChanged

@Deprecated
protected IndexReader doOpenIfChanged(boolean openReadOnly)
                               throws CorruptIndexException,
                                      IOException
Deprecated.

If the index has changed since it was opened, open and return a new reader; else, return null.

Overrides:
doOpenIfChanged in class IndexReader
Throws:
CorruptIndexException
IOException
See Also:
IndexReader.openIfChanged(IndexReader, boolean)

doCommit

@Deprecated
protected void doCommit(Map<String,String> commitUserData)
                 throws IOException
Deprecated.

Implements commit.

Specified by:
doCommit in class IndexReader
Throws:
IOException

doClose

protected void doClose()
                throws IOException
Description copied from class: IndexReader
Implements close.

Specified by:
doClose in class IndexReader
Throws:
IOException

hasDeletions

public boolean hasDeletions()
Description copied from class: IndexReader
Returns true if any documents have been deleted

Specified by:
hasDeletions in class IndexReader

doDelete

@Deprecated
protected void doDelete(int docNum)
Deprecated.

Implements deletion of the document numbered docNum. Applications should call IndexReader.deleteDocument(int) or IndexReader.deleteDocuments(Term).

Specified by:
doDelete in class IndexReader

doUndeleteAll

@Deprecated
protected void doUndeleteAll()
Deprecated.

Implements actual undeleteAll() in subclass.

Specified by:
doUndeleteAll in class IndexReader

terms

public TermEnum terms()
Description copied from class: IndexReader
Returns an enumeration of all the terms in the index. The enumeration is ordered by Term.compareTo(). Each term is greater than all that precede it in the enumeration. Note that after calling terms(), TermEnum.next() must be called on the resulting enumeration before calling other methods such as TermEnum.term().

Specified by:
terms in class IndexReader

terms

public TermEnum terms(Term t)
               throws IOException
Description copied from class: IndexReader
Returns an enumeration of all terms starting at a given term. If the given term does not exist, the enumeration is positioned at the first term greater than the supplied term. The enumeration is ordered by Term.compareTo(). Each term is greater than all that precede it in the enumeration.

Specified by:
terms in class IndexReader
Throws:
IOException - if there is a low-level IO error

getFieldInfos

public FieldInfos getFieldInfos()
Description copied from class: IndexReader
Get the FieldInfos describing all fields in this reader. NOTE: do not make any changes to the returned FieldInfos!

Specified by:
getFieldInfos in class IndexReader

document

public Document document(int n,
                         FieldSelector fieldSelector)
                  throws CorruptIndexException,
                         IOException
Description copied from class: IndexReader
Get the Document at the n th position. The FieldSelector may be used to determine what Fields to load and how they should be loaded. NOTE: If this Reader (more specifically, the underlying FieldsReader) is closed before the lazy Field is loaded an exception may be thrown. If you want the value of a lazy Field to be available after closing you must explicitly load it or fetch the Document again with a new loader.

NOTE: for performance reasons, this method does not check if the requested document is deleted, and therefore asking for a deleted document may yield unspecified results. Usually this is not required, however you can call IndexReader.isDeleted(int) with the requested document ID to verify the document is not deleted.

Specified by:
document in class IndexReader
Parameters:
n - Get the document at the nth position
fieldSelector - The FieldSelector to use to determine what Fields should be loaded on the Document. May be null, in which case all Fields will be loaded.
Returns:
The stored fields of the Document at the nth position
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
Fieldable, FieldSelector, SetBasedFieldSelector, LoadFirstFieldSelector

isDeleted

public boolean isDeleted(int n)
Description copied from class: IndexReader
Returns true if document n has been deleted

Specified by:
isDeleted in class IndexReader

termDocs

public TermDocs termDocs(Term term)
                  throws IOException
Description copied from class: IndexReader
Returns an enumeration of all the documents which contain term. For each document, the document number, the frequency of the term in that document is also provided, for use in search scoring. If term is null, then all non-deleted docs are returned with freq=1. Thus, this method implements the mapping:

    Term => <docNum, freq>*

The enumeration is ordered by document number. Each document number is greater than all that precede it in the enumeration.

Overrides:
termDocs in class IndexReader
Throws:
IOException - if there is a low-level IO error

rawTermDocs

public TermDocs rawTermDocs(Term term)
                     throws IOException
Expert: returns an enumeration of the documents that contain term, including deleted documents (which are normally filtered out).

Throws:
IOException
WARNING: This API is experimental and might change in incompatible ways in the next release.

termDocs

public TermDocs termDocs()
                  throws IOException
Description copied from class: IndexReader
Returns an unpositioned TermDocs enumerator.

Note: the TermDocs returned is unpositioned. Before using it, ensure that you first position it with TermDocs.seek(Term) or TermDocs.seek(TermEnum).

Specified by:
termDocs in class IndexReader
Throws:
IOException - if there is a low-level IO error

termPositions

public TermPositions termPositions()
                            throws IOException
Description copied from class: IndexReader
Returns an unpositioned TermPositions enumerator.

Specified by:
termPositions in class IndexReader
Throws:
IOException - if there is a low-level IO error

docFreq

public int docFreq(Term t)
            throws IOException
Description copied from class: IndexReader
Returns the number of documents containing the term t.

Specified by:
docFreq in class IndexReader
Throws:
IOException - if there is a low-level IO error

numDocs

public int numDocs()
Description copied from class: IndexReader
Returns the number of documents in this index.

Specified by:
numDocs in class IndexReader

maxDoc

public int maxDoc()
Description copied from class: IndexReader
Returns one greater than the largest possible document number. This may be used to, e.g., determine how big to allocate an array which will have an element for every document number in an index.

Specified by:
maxDoc in class IndexReader

hasNorms

public boolean hasNorms(String field)
Description copied from class: IndexReader
Returns true if there are norms stored for this field.

Overrides:
hasNorms in class IndexReader

norms

public byte[] norms(String field)
             throws IOException
Description copied from class: IndexReader
Returns the byte-encoded normalization factor for the named field of every document. This is used by the search code to score documents. Returns null if norms were not indexed for this field.

Specified by:
norms in class IndexReader
Throws:
IOException
See Also:
AbstractField.setBoost(float)

doSetNorm

@Deprecated
protected void doSetNorm(int doc,
                                    String field,
                                    byte value)
                  throws IOException
Deprecated.

Implements setNorm in subclass.

Specified by:
doSetNorm in class IndexReader
Throws:
IOException

norms

public void norms(String field,
                  byte[] bytes,
                  int offset)
           throws IOException
Read norms into a pre-allocated array.

Specified by:
norms in class IndexReader
Throws:
IOException
See Also:
AbstractField.setBoost(float)

getTermFreqVector

public TermFreqVector getTermFreqVector(int docNumber,
                                        String field)
                                 throws IOException
Return a term frequency vector for the specified document and field. The vector returned contains term numbers and frequencies for all terms in the specified field of this document, if the field had storeTermVector flag set. If the flag was not set, the method returns null.

Specified by:
getTermFreqVector in class IndexReader
Parameters:
docNumber - document for which the term frequency vector is returned
field - field for which the term frequency vector is returned.
Returns:
term frequency vector May be null if field does not exist in the specified document or term vector was not stored.
Throws:
IOException
See Also:
Field.TermVector

getTermFreqVector

public void getTermFreqVector(int docNumber,
                              String field,
                              TermVectorMapper mapper)
                       throws IOException
Description copied from class: IndexReader
Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the TermFreqVector.

Specified by:
getTermFreqVector in class IndexReader
Parameters:
docNumber - The number of the document to load the vector for
field - The name of the field to load
mapper - The TermVectorMapper to process the vector. Must not be null
Throws:
IOException - if term vectors cannot be accessed or if they do not exist on the field and doc. specified.

getTermFreqVector

public void getTermFreqVector(int docNumber,
                              TermVectorMapper mapper)
                       throws IOException
Description copied from class: IndexReader
Map all the term vectors for all fields in a Document

Specified by:
getTermFreqVector in class IndexReader
Parameters:
docNumber - The number of the document to load the vector for
mapper - The TermVectorMapper to process the vector. Must not be null
Throws:
IOException - if term vectors cannot be accessed or if they do not exist on the field and doc. specified.

getTermFreqVectors

public TermFreqVector[] getTermFreqVectors(int docNumber)
                                    throws IOException
Return an array of term frequency vectors for the specified document. The array contains a vector for each vectorized field in the document. Each vector vector contains term numbers and frequencies for all terms in a given vectorized field. If no such fields existed, the method returns null.

Specified by:
getTermFreqVectors in class IndexReader
Parameters:
docNumber - document for which term frequency vectors are returned
Returns:
array of term frequency vectors. May be null if no term vectors have been stored for the specified document.
Throws:
IOException
See Also:
Field.TermVector

toString

public String toString()

Overrides:
toString in class IndexReader

getSegmentName

public String getSegmentName()
Return the name of the segment this reader is reading.

directory

public Directory directory()
Returns the directory this index resides in.

Overrides:
directory in class IndexReader

getCoreCacheKey

public final Object getCoreCacheKey()
Description copied from class: IndexReader
Expert

Overrides:
getCoreCacheKey in class IndexReader

getDeletesCacheKey

public Object getDeletesCacheKey()
Description copied from class: IndexReader
Expert. Warning: this returns null if the reader has no deletions

Overrides:
getDeletesCacheKey in class IndexReader

getUniqueTermCount

public long getUniqueTermCount()
Description copied from class: IndexReader
Returns the number of unique terms (across all fields) in this reader. This method returns long, even though internally Lucene cannot handle more than 2^31 unique terms, for a possible future when this limitation is removed.

Overrides:
getUniqueTermCount in class IndexReader

getTermInfosIndexDivisor

public int getTermInfosIndexDivisor()
Description copied from class: IndexReader
For IndexReader implementations that use TermInfosReader to read terms, this returns the current indexDivisor as specified when the reader was opened.

Overrides:
getTermInfosIndexDivisor in class IndexReader

addCoreClosedListener

public void addCoreClosedListener(SegmentReader.CoreClosedListener listener)
Expert: adds a CoreClosedListener to this reader's shared core

removeCoreClosedListener

public void removeCoreClosedListener(SegmentReader.CoreClosedListener listener)
Expert: removes a CoreClosedListener from this reader's shared core

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SegmentWriteState

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class SegmentWriteState

java.lang.Object
    extended by  org.apache.lucene.index.SegmentWriteState

public class SegmentWriteState
extends Object

Holder class for common parameters used during write.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
BitVector | deletedDocs
Directory | directory
FieldInfos | fieldInfos
boolean | hasVectors
PrintStream | infoStream
int | maxSkipLevels Expert: The maximum number of skip levels.
int | numDocs
org.apache.lucene.index.BufferedDeletes | segDeletes
String | segmentName
int | skipInterval Expert: The fraction of TermDocs entries stored in skip tables, used to accelerate TermDocs.skipTo(int).
int | termIndexInterval Expert: The fraction of terms in the "dictionary" which should be stored in RAM.
Constructor Summary
SegmentWriteState(PrintStream infoStream, Directory directory, String segmentName, FieldInfos fieldInfos, int numDocs, int termIndexInterval, org.apache.lucene.index.BufferedDeletes segDeletes)
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

infoStream

public final PrintStream infoStream

directory

public final Directory directory

segmentName

public final String segmentName

fieldInfos

public final FieldInfos fieldInfos

numDocs

public final int numDocs

hasVectors

public boolean hasVectors

segDeletes

public final org.apache.lucene.index.BufferedDeletes segDeletes

deletedDocs

public BitVector deletedDocs

termIndexInterval

public final int termIndexInterval
Expert: The fraction of terms in the "dictionary" which should be stored in RAM. Smaller values use more memory, but make searching slightly faster, while larger values use less memory and make searching slightly slower. Searching is typically not dominated by dictionary lookup, so tweaking this is rarely useful.

skipInterval

public final int skipInterval
Expert: The fraction of TermDocs entries stored in skip tables, used to accelerate TermDocs.skipTo(int). Larger values result in smaller indexes, greater acceleration, but fewer accelerable cases, while smaller values result in bigger indexes, less acceleration and more accelerable cases. More detailed experiments would be useful here.

See Also:
Constant Field Values

maxSkipLevels

public final int maxSkipLevels
Expert: The maximum number of skip levels. Smaller values result in slightly smaller indexes, but slower skipping in big posting lists.

See Also:
Constant Field Values
Constructor Detail

SegmentWriteState

public SegmentWriteState(PrintStream infoStream,
                         Directory directory,
                         String segmentName,
                         FieldInfos fieldInfos,
                         int numDocs,
                         int termIndexInterval,
                         org.apache.lucene.index.BufferedDeletes segDeletes)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SerialMergeScheduler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class SerialMergeScheduler

java.lang.Object
    extended by  org.apache.lucene.index.MergeScheduler
        extended by  org.apache.lucene.index.SerialMergeScheduler

public class SerialMergeScheduler
extends MergeScheduler

A MergeScheduler that simply does each merge sequentially, using the current thread.

Constructor Summary
SerialMergeScheduler()
Method Summary
void | close() Close this MergeScheduler.
void | merge(IndexWriter writer) Just do the merges in sequence.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SerialMergeScheduler

public SerialMergeScheduler()
Method Detail

merge

public void merge(IndexWriter writer)
           throws CorruptIndexException,
                  IOException
Just do the merges in sequence. We do this "synchronized" so that even if the application is using multiple threads, only one merge may run at a time.

Specified by:
merge in class MergeScheduler
Throws:
CorruptIndexException
IOException

close

public void close()
Description copied from class: MergeScheduler
Close this MergeScheduler.

Specified by:
close in class MergeScheduler
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SlowMultiReaderWrapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class SlowMultiReaderWrapper

java.lang.Object
    extended by  org.apache.lucene.index.IndexReader
        extended by  org.apache.lucene.index.MultiReader
            extended by  org.apache.lucene.index.SlowMultiReaderWrapper
All Implemented Interfaces:
Closeable, Cloneable
public class SlowMultiReaderWrapper
extends MultiReader

Acts like Lucene 4.x's SlowMultiReaderWrapper for testing of top-level MultiTermEnum, MultiTermDocs, ...

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader
IndexReader.ReaderClosedListener
Field Summary
Fields inherited from class org.apache.lucene.index.MultiReader
starts, subReaders
Fields inherited from class org.apache.lucene.index.IndexReader
hasChanges
Constructor Summary
SlowMultiReaderWrapper(IndexReader reader)
Method Summary
FieldInfos | getFieldInfos() Get the FieldInfos describing all fields in this reader.
IndexReader[] | getSequentialSubReaders() Expert: returns the sequential sub readers that this reader is logically composed of.
String | toString()
Methods inherited from class org.apache.lucene.index.MultiReader
clone, clone, docFreq, doClose, doCommit, document, doDelete, doOpenIfChanged, doOpenIfChanged, doSetNorm, doUndeleteAll, getTermFreqVector, getTermFreqVector, getTermFreqVector, getTermFreqVectors, getVersion, hasDeletions, hasNorms, isCurrent, isDeleted, isOptimized, maxDoc, norms, norms, numDocs, readerIndex, termDocs, termDocs, termPositions, terms, terms
Methods inherited from class org.apache.lucene.index.IndexReader
acquireWriteLock, addReaderClosedListener, close, commit, commit, decRef, deleteDocument, deleteDocuments, directory, document, doOpenIfChanged, doOpenIfChanged, ensureOpen, flush, flush, getCommitUserData, getCommitUserData, getCoreCacheKey, getCurrentVersion, getDeletesCacheKey, getIndexCommit, getRefCount, getTermInfosIndexDivisor, getUniqueTermCount, incRef, indexExists, lastModified, listCommits, numDeletedDocs, open, open, open, open, open, open, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChanged, removeReaderClosedListener, reopen, reopen, reopen, reopen, setNorm, setNorm, termPositions, tryIncRef, undeleteAll
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SlowMultiReaderWrapper

public SlowMultiReaderWrapper(IndexReader reader)
Method Detail

getSequentialSubReaders

public IndexReader[] getSequentialSubReaders()
Description copied from class: IndexReader
Expert: returns the sequential sub readers that this reader is logically composed of. For example, IndexSearcher uses this API to drive searching by one sub reader at a time. If this reader is not composed of sequential child readers, it should return null. If this method returns an empty array, that means this reader is a null reader (for example a MultiReader that has no sub readers).

NOTE: You should not try using sub-readers returned by this method to make any changes (setNorm, deleteDocument, etc.). While this might succeed for one composite reader (like MultiReader), it will most likely lead to index corruption for other readers (like DirectoryReader obtained through IndexReader.open(org.apache.lucene.store.Directory). Use the parent reader directly.

Overrides:
getSequentialSubReaders in class MultiReader

toString

public String toString()
Description copied from class: IndexReader

Overrides:
toString in class IndexReader

getFieldInfos

public FieldInfos getFieldInfos()
Description copied from class: IndexReader
Get the FieldInfos describing all fields in this reader. NOTE: do not make any changes to the returned FieldInfos!

Overrides:
getFieldInfos in class MultiReader
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SnapshotDeletionPolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class SnapshotDeletionPolicy

java.lang.Object
    extended by  org.apache.lucene.index.SnapshotDeletionPolicy
All Implemented Interfaces:
IndexDeletionPolicy
Direct Known Subclasses:
PersistentSnapshotDeletionPolicy
public class SnapshotDeletionPolicy
extends Object
implements IndexDeletionPolicy

An IndexDeletionPolicy that wraps around any other IndexDeletionPolicy and adds the ability to hold and later release snapshots of an index. While a snapshot is held, the IndexWriter will not remove any files associated with it even if the index is otherwise being actively, arbitrarily changed. Because we wrap another arbitrary IndexDeletionPolicy, this gives you the freedom to continue using whatever IndexDeletionPolicy you would normally want to use with your index.

This class maintains all snapshots in-memory, and so the information is not persisted and not protected against system failures. If persistency is important, you can use PersistentSnapshotDeletionPolicy (or your own extension) and when creating a new instance of this deletion policy, pass the persistent snapshots information to SnapshotDeletionPolicy(IndexDeletionPolicy, Map).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
protected  class SnapshotDeletionPolicy.SnapshotCommitPoint
Field Summary
protected  IndexCommit lastCommit
Constructor Summary
SnapshotDeletionPolicy(IndexDeletionPolicy primary)
SnapshotDeletionPolicy(IndexDeletionPolicy primary, Map<String,String> snapshotsInfo)
SnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting.
Method Summary
protected  void checkSnapshotted(String id)
Checks if the given id is already used by another snapshot, and throws IllegalStateException if it is.
 IndexCommit getSnapshot(String id)
Get a snapshotted IndexCommit by ID.
 Map<String,String> getSnapshots()
Get all the snapshots in a map of snapshot IDs to the segments they 'cover.' This can be passed to SnapshotDeletionPolicy(IndexDeletionPolicy, Map) in order to initialize snapshots at construction.
 boolean isSnapshotted(String id)
Returns true if the given ID is already used by a snapshot.
 void onCommit(List<? extends IndexCommit> commits)
This is called each time the writer completed a commit.
 void onInit(List<? extends IndexCommit> commits)
This is called once when a writer is first instantiated to give the policy a chance to remove old commit points.
protected  void registerSnapshotInfo(String id, String segment, IndexCommit commit)
Registers the given snapshot information.
 void release(String id)
Release a snapshotted commit by ID.
 IndexCommit snapshot(String id)
Snapshots the last commit.
protected  List<IndexCommit> wrapCommits(List<? extends IndexCommit> commits)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

lastCommit

protected IndexCommit lastCommit
Constructor Detail

SnapshotDeletionPolicy

public SnapshotDeletionPolicy(IndexDeletionPolicy primary)

SnapshotDeletionPolicy

public SnapshotDeletionPolicy(IndexDeletionPolicy primary,
                              Map<String,String> snapshotsInfo)
SnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting.

Parameters:
primary - the IndexDeletionPolicy that is used on non-snapshotted commits. Snapshotted commits, are not deleted until explicitly released via release(String)
snapshotsInfo - A mapping of snapshot ID to the segments filename that is being snapshotted. The expected input would be the output of getSnapshots(). A null value signals that there are no initial snapshots to maintain.
Method Detail

checkSnapshotted

protected void checkSnapshotted(String id)
Checks if the given id is already used by another snapshot, and throws IllegalStateException if it is.

registerSnapshotInfo

protected void registerSnapshotInfo(String id,
                                    String segment,
                                    IndexCommit commit)
Registers the given snapshot information.

wrapCommits

protected List<IndexCommit> wrapCommits(List<? extends IndexCommit> commits)

getSnapshot

public IndexCommit getSnapshot(String id)
Get a snapshotted IndexCommit by ID. The IndexCommit can then be used to open an IndexReader on a specific commit point, or rollback the index by opening an IndexWriter with the IndexCommit specified in its IndexWriterConfig.

Parameters:
id - a unique identifier of the commit that was snapshotted.
Returns:
The IndexCommit for this particular snapshot.
Throws:
IllegalStateException - if no snapshot exists by the specified ID.

getSnapshots

public Map<String,String> getSnapshots()
Get all the snapshots in a map of snapshot IDs to the segments they 'cover.' This can be passed to SnapshotDeletionPolicy(IndexDeletionPolicy, Map) in order to initialize snapshots at construction.

isSnapshotted

public boolean isSnapshotted(String id)
Returns true if the given ID is already used by a snapshot. You can call this method before snapshot(String) if you are not sure whether the ID is already used or not.

onCommit

public void onCommit(List<? extends IndexCommit> commits)
              throws IOException
Description copied from interface: IndexDeletionPolicy

This is called each time the writer completed a commit. This gives the policy a chance to remove old commit points with each commit.

The policy may now choose to delete old commit points by calling method delete() of IndexCommit.

This method is only called when IndexWriter.commit() or IndexWriter.close() is called, or possibly not at all if the IndexWriter.rollback() is called.

Note: the last CommitPoint is the most recent one, i.e. the "front index state". Be careful not to delete it, unless you know for sure what you are doing, and unless you can afford to lose the index content while doing that.

Specified by:
onCommit in interface IndexDeletionPolicy
Parameters:
commits - List of IndexCommit, sorted by age (the 0th one is the oldest commit).
Throws:
IOException

onInit

public void onInit(List<? extends IndexCommit> commits)
            throws IOException
Description copied from interface: IndexDeletionPolicy

This is called once when a writer is first instantiated to give the policy a chance to remove old commit points.

The writer locates all index commits present in the index directory and calls this method. The policy may choose to delete some of the commit points, doing so by calling method delete() of IndexCommit.

Note: the last CommitPoint is the most recent one, i.e. the "front index state". Be careful not to delete it, unless you know for sure what you are doing, and unless you can afford to lose the index content while doing that.

Specified by:
onInit in interface IndexDeletionPolicy
Parameters:
commits - List of current point-in-time commits, sorted by age (the 0th one is the oldest commit).
Throws:
IOException

release

public void release(String id)
             throws IOException
Release a snapshotted commit by ID.

Parameters:
id - a unique identifier of the commit that is un-snapshotted.
Throws:
IllegalStateException - if no snapshot exists by this ID.
IOException

snapshot

public IndexCommit snapshot(String id)
                     throws IOException
Snapshots the last commit. Once a commit is 'snapshotted,' it is protected from deletion (as long as this IndexDeletionPolicy is used). The commit can be removed by calling release(String) using the same ID parameter followed by a call to IndexWriter.deleteUnusedFiles().

NOTE: ID must be unique in the system. If the same ID is used twice, an IllegalStateException is thrown.

NOTE: while the snapshot is held, the files it references will not be deleted, which will consume additional disk space in your index. If you take a snapshot at a particularly bad time (say just before you call forceMerge) then in the worst case this could consume an extra 1X of your total index size, until you release the snapshot.

Parameters:
id - a unique identifier of the commit that is being snapshotted.
Returns:
the IndexCommit that was snapshotted.
Throws:
IllegalStateException - if either there is no 'last commit' to snapshot, or if the parameter 'ID' refers to an already snapshotted commit.
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SnapshotDeletionPolicy.SnapshotCommitPoint

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class SnapshotDeletionPolicy.SnapshotCommitPoint

java.lang.Object
    extended by  org.apache.lucene.index.IndexCommit
        extended by  org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint
All Implemented Interfaces:
Comparable<IndexCommit>
Enclosing class:
SnapshotDeletionPolicy
protected class SnapshotDeletionPolicy.SnapshotCommitPoint
extends IndexCommit

Field Summary
protected  IndexCommit cp
Constructor Summary
protected SnapshotDeletionPolicy.SnapshotCommitPoint(IndexCommit cp)
Method Summary
 void delete()
Delete this commit point.
 Directory getDirectory()
Returns the Directory for the index.
 Collection<String> getFileNames()
Returns all index files referenced by this commit point.
 long getGeneration()
Returns the generation (the _N in segments_N) for this IndexCommit
 int getSegmentCount()
Returns number of segments referenced by this commit.
 String getSegmentsFileName()
Get the segments file (segments_N) associated with this commit point.
 Map<String,String> getUserData()
Returns userData, previously passed to IndexWriter.commit(Map) for this commit.
 long getVersion()
Returns the version for this IndexCommit.
 boolean isDeleted()
protected  boolean shouldDelete(String segmentsFileName)
Returns true if this segment can be deleted.
 String toString()
Methods inherited from class org.apache.lucene.index.IndexCommit
compareTo, equals, getTimestamp, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

cp

protected IndexCommit cp
Constructor Detail

SnapshotDeletionPolicy.SnapshotCommitPoint

protected SnapshotDeletionPolicy.SnapshotCommitPoint(IndexCommit cp)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

shouldDelete

protected boolean shouldDelete(String segmentsFileName)
Returns true if this segment can be deleted. The default implementation returns false if this segment is currently held as snapshot.

delete

public void delete()
Description copied from class: IndexCommit
Delete this commit point. This only applies when using the commit point in the context of IndexWriter's IndexDeletionPolicy.

Upon calling this, the writer is notified that this commit point should be deleted.

Decision that a commit-point should be deleted is taken by the IndexDeletionPolicy in effect and therefore this should only be called by its onInit() or onCommit() methods.

Specified by:
delete in class IndexCommit

getDirectory

public Directory getDirectory()
Description copied from class: IndexCommit
Returns the Directory for the index.

Specified by:
getDirectory in class IndexCommit

getFileNames

public Collection<String> getFileNames()
                                throws IOException
Description copied from class: IndexCommit
Returns all index files referenced by this commit point.

Specified by:
getFileNames in class IndexCommit
Throws:
IOException

getGeneration

public long getGeneration()
Description copied from class: IndexCommit
Returns the generation (the _N in segments_N) for this IndexCommit

Specified by:
getGeneration in class IndexCommit

getSegmentsFileName

public String getSegmentsFileName()
Description copied from class: IndexCommit
Get the segments file (segments_N) associated with this commit point.

Specified by:
getSegmentsFileName in class IndexCommit

getUserData

public Map<String,String> getUserData()
                               throws IOException
Description copied from class: IndexCommit
Returns userData, previously passed to IndexWriter.commit(Map) for this commit. Map is String -> String.

Specified by:
getUserData in class IndexCommit
Throws:
IOException

getVersion

public long getVersion()
Description copied from class: IndexCommit
Returns the version for this IndexCommit. This is the same value that IndexReader.getVersion() would return if it were opened on this commit.

Specified by:
getVersion in class IndexCommit

isDeleted

public boolean isDeleted()
Specified by:
isDeleted in class IndexCommit

getSegmentCount

public int getSegmentCount()
Description copied from class: IndexCommit
Returns number of segments referenced by this commit.

Specified by:
getSegmentCount in class IndexCommit
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SortedTermVectorMapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class SortedTermVectorMapper

java.lang.Object
    extended by  org.apache.lucene.index.TermVectorMapper
        extended by  org.apache.lucene.index.SortedTermVectorMapper

public class SortedTermVectorMapper
extends TermVectorMapper

Store a sorted collection of TermVectorEntrys. Collects all term information into a single, SortedSet.
NOTE: This Mapper ignores all Field information for the Document. This means that if you are using offset/positions you will not know what Fields they correlate with.
This is not thread-safe

Field Summary
static String ALL
Stand-in name for the field in TermVectorEntry.
Constructor Summary
SortedTermVectorMapper(boolean ignoringPositions, boolean ignoringOffsets, Comparator<TermVectorEntry> comparator)
SortedTermVectorMapper(Comparator<TermVectorEntry> comparator)
Method Summary
SortedSet<TermVectorEntry> | getTermVectorEntrySet() The TermVectorEntrySet.
void | map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) Map the Term Vector information into your own structure
void | setExpectations(String field, int numTerms, boolean storeOffsets, boolean storePositions) Tell the mapper what to expect in regards to field, number of terms, offset and position storage.
Methods inherited from class org.apache.lucene.index.TermVectorMapper
isIgnoringOffsets, isIgnoringPositions, setDocumentNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

ALL

public static final String ALL
Stand-in name for the field in TermVectorEntry.

See Also:
Constant Field Values
Constructor Detail

SortedTermVectorMapper

public SortedTermVectorMapper(Comparator<TermVectorEntry> comparator)
Parameters:
comparator - A Comparator for sorting TermVectorEntrys

SortedTermVectorMapper

public SortedTermVectorMapper(boolean ignoringPositions,
                              boolean ignoringOffsets,
                              Comparator<TermVectorEntry> comparator)
Method Detail

map

public void map(String term,
                int frequency,
                TermVectorOffsetInfo[] offsets,
                int[] positions)
Description copied from class: TermVectorMapper
Map the Term Vector information into your own structure

Specified by:
map in class TermVectorMapper
Parameters:
term - The term to map
frequency - The frequency of the term
offsets - Offset information, may be null
positions - Position information, may be null

setExpectations

public void setExpectations(String field,
                            int numTerms,
                            boolean storeOffsets,
                            boolean storePositions)
Description copied from class: TermVectorMapper
Tell the mapper what to expect in regards to field, number of terms, offset and position storage. This method will be called once before retrieving the vector for a field. This method will be called before TermVectorMapper.map(String,int,TermVectorOffsetInfo[],int[]).

Specified by:
setExpectations in class TermVectorMapper
Parameters:
field - The field the vector is for
numTerms - The number of terms that need to be mapped
storeOffsets - true if the mapper should expect offset information
storePositions - true if the mapper should expect positions info

getTermVectorEntrySet

public SortedSet<TermVectorEntry> getTermVectorEntrySet()
The TermVectorEntrySet. A SortedSet of TermVectorEntry objects. Sort is by the comparator passed into the constructor.
This set will be empty until after the mapping process takes place.

Returns:
The SortedSet of TermVectorEntry.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StaleReaderException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class StaleReaderException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.io.IOException
                extended by  org.apache.lucene.index.StaleReaderException
All Implemented Interfaces:
Serializable
public class StaleReaderException
extends IOException

This exception is thrown when an IndexReader tries to make changes to the index (via IndexReader.deleteDocument(int), IndexReader.undeleteAll() or IndexReader.setNorm(int, java.lang.String, byte)) but changes have already been committed to the index since this reader was instantiated. When this happens you must open a new reader on the current index to make the changes.

See Also:
Serialized Form

Constructor Summary
StaleReaderException(String message)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

StaleReaderException

public StaleReaderException(String message)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Term

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class Term

java.lang.Object
    extended by  org.apache.lucene.index.Term
All Implemented Interfaces:
Serializable, Comparable<Term>
public final class Term
extends Object
implements Comparable<Term>, Serializable

A Term represents a word from text. This is the unit of search. It is composed of two elements, the text of the word, as a string, and the name of the field that the text occurred in, an interned string. Note that terms may represent more than words from text fields, but also things like dates, email addresses, urls, etc.

See Also:
Serialized Form

Constructor Summary
Term(String fld)
Constructs a Term with the given field and empty text.
Term(String fld, String txt)
Constructs a Term with the given field and text.
Method Summary
int | compareTo(Term other) Compares two terms, returning a negative integer if this term belongs before the argument, zero if this term is equal to the argument, and a positive integer if this term belongs after the argument.
Term | createTerm(String text) Optimized construction of new Terms by reusing same field as this Term - avoids field.intern() overhead
boolean | equals(Object obj)
String | field() Returns the field of this term, an interned string.
int | hashCode()
String | text() Returns the text of this term.
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Term

public Term(String fld,
            String txt)
Constructs a Term with the given field and text.

Note that a null field or null text value results in undefined behavior for most Lucene APIs that accept a Term parameter.

Term

public Term(String fld)
Constructs a Term with the given field and empty text. This serves two purposes: 1) reuse of a Term with the same field. 2) pattern for a query.

Parameters:
fld -
Method Detail

field

public final String field()
Returns the field of this term, an interned string. The field indicates the part of a document which this term came from.

text

public final String text()
Returns the text of this term. In the case of words, this is simply the text of the word. In the case of dates and other types, this is an encoding of the object as a string.

createTerm

public Term createTerm(String text)
Optimized construction of new Terms by reusing same field as this Term - avoids field.intern() overhead

Parameters:
text - The text of the new term (field is implicitly same as this Term instance)
Returns:
A new Term

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public final int compareTo(Term other)
Compares two terms, returning a negative integer if this term belongs before the argument, zero if this term is equal to the argument, and a positive integer if this term belongs after the argument. The ordering of terms is first by field, then by text.

Specified by:
compareTo in interface Comparable<Term>

toString

public final String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermDocs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Interface TermDocs

All Superinterfaces:
Closeable
All Known Subinterfaces:
TermPositions
All Known Implementing Classes:
AbstractAllTermDocs, FilterIndexReader.FilterTermDocs, FilterIndexReader.FilterTermPositions, InstantiatedTermDocs, InstantiatedTermPositions, MultipleTermPositions
public interface TermDocs
extends Closeable

TermDocs provides an interface for enumerating <document, frequency> pairs for a term.

The document portion names each document containing the term. Documents are indicated by number. The frequency portion gives the number of times the term occurred in each document.

The pairs are ordered by document number.

See Also:
IndexReader.termDocs()

Method Summary
void | close() Frees associated resources.
int | doc() Returns the current document number.
int | freq() Returns the frequency of the term within the current document.
boolean | next() Moves to the next pair in the enumeration.
int | read(int[] docs, int[] freqs) Attempts to read multiple entries from the enumeration, up to length of docs.
void | seek(Term term) Sets this to the data for a term.
void | seek(TermEnum termEnum) Sets this to the data for the current term in a TermEnum.
boolean | skipTo(int target) Skips entries to the first beyond the current whose document number is greater than or equal to target.

Method Detail

seek

void seek(Term term)
          throws IOException
Sets this to the data for a term. The enumeration is reset to the start of the data for this term.

Throws:
IOException

seek

void seek(TermEnum termEnum)
          throws IOException
Sets this to the data for the current term in a TermEnum. This may be optimized in some implementations.

Throws:
IOException

doc

int doc()
Returns the current document number.

This is invalid until next() is called for the first time.

freq

int freq()
Returns the frequency of the term within the current document.

This is invalid until next() is called for the first time.

next

boolean next()
             throws IOException
Moves to the next pair in the enumeration.

Returns true iff there is such a next pair in the enumeration. Once this returns false you should not call any of the other methods.

Throws:
IOException

read

int read(int[] docs,
         int[] freqs)
         throws IOException
Attempts to read multiple entries from the enumeration, up to length of docs. Document numbers are stored in docs, and term frequencies are stored in freqs. The freqs array must be as long as the docs array.

Returns the number of entries read. Zero is only returned when the stream has been exhausted.

Throws:
IOException

skipTo

boolean skipTo(int target)
               throws IOException
Skips entries to the first beyond the current whose document number is greater than or equal to target.

Returns true iff there is such an entry.

Behaves as if written:

   boolean skipTo(int target) {
     do {
       if (!next())
             return false;
     } while (target > doc());
     return true;
   }
Some implementations are considerably more efficient than that.

Throws:
IOException

close

void close()
           throws IOException
Frees associated resources.

Specified by:
close in interface Closeable
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermEnum

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class TermEnum

java.lang.Object
    extended by  org.apache.lucene.index.TermEnum
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
FilteredTermEnum, FilterIndexReader.FilterTermEnum, InstantiatedTermEnum
public abstract class TermEnum
extends Object
implements Closeable

Abstract class for enumerating terms.

Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.

Constructor Summary
TermEnum()
Method Summary
abstract void | close() Closes the enumeration to further activity, freeing resources.
abstract int | docFreq() Returns the docFreq of the current Term in the enumeration.
abstract boolean | next() Increments the enumeration to the next element.
abstract Term | term() Returns the current Term in the enumeration.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TermEnum

public TermEnum()
Method Detail

next

public abstract boolean next()
                      throws IOException
Increments the enumeration to the next element. True if one exists.

Throws:
IOException

term

public abstract Term term()
Returns the current Term in the enumeration.

docFreq

public abstract int docFreq()
Returns the docFreq of the current Term in the enumeration.

close

public abstract void close()
                    throws IOException
Closes the enumeration to further activity, freeing resources.

Specified by:
close in interface Closeable
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermFreqVector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Interface TermFreqVector

All Known Subinterfaces:
TermPositionVector
All Known Implementing Classes:
InstantiatedTermFreqVector, InstantiatedTermPositionVector, QueryTermVector
public interface TermFreqVector

Provides access to stored term vector of a document field. The vector consists of the name of the field, an array of the terms that occur in the field of the Document and a parallel array of frequencies. Thus, getTermFrequencies()[5] corresponds with the frequency of getTerms()[5], assuming there are at least 5 terms in the Document.

Method Summary
String | getField() The Fieldable name.
int[] | getTermFrequencies() Array of term frequencies.
String[] | getTerms()
int[] | indexesOf(String[] terms, int start, int len) Just like indexOf(int) but searches for a number of terms at the same time.
int | indexOf(String term) Return an index in the term numbers array returned from getTerms at which the term with the specified term appears.
int | size()

Method Detail

getField

String getField()
The Fieldable name.

Returns:
The name of the field this vector is associated with.

size

int size()
Returns:
The number of terms in the term vector.

getTerms

String[] getTerms()
Returns:
An Array of term texts in ascending order.

getTermFrequencies

int[] getTermFrequencies()
Array of term frequencies. Locations of the array correspond one to one to the terms in the array obtained from getTerms method. Each location in the array contains the number of times this term occurs in the document or the document field.

indexOf

int indexOf(String term)
Return an index in the term numbers array returned from getTerms at which the term with the specified term appears. If this term does not appear in the array, return -1.

indexesOf

int[] indexesOf(String[] terms,
                int start,
                int len)
Just like indexOf(int) but searches for a number of terms at the same time. Returns an array that has the same size as the number of terms searched for, each slot containing the result of searching for that term number.

Parameters:
terms - array containing terms to look for
start - index in the array where the list of terms starts
len - the number of terms in the list
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermPositions

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Interface TermPositions

All Superinterfaces:
Closeable, TermDocs
All Known Implementing Classes:
FilterIndexReader.FilterTermPositions, InstantiatedTermPositions, MultipleTermPositions
public interface TermPositions
extends TermDocs

TermPositions provides an interface for enumerating the <document, frequency, <position>* > tuples for a term.

The document and frequency are the same as for a TermDocs. The positions portion lists the ordinal positions of each occurrence of a term in a document.

See Also:
IndexReader.termPositions()

Method Summary
byte[] | getPayload(byte[] data, int offset) Returns the payload data at the current term position.
int | getPayloadLength() Returns the length of the payload at the current term position.
boolean | isPayloadAvailable() Checks if a payload can be loaded at this position.
int | nextPosition() Returns next position in the current document.
Methods inherited from interface org.apache.lucene.index.TermDocs
close, doc, freq, next, read, seek, seek, skipTo

Method Detail

nextPosition

int nextPosition()
                 throws IOException
Returns next position in the current document. It is an error to call this more than TermDocs.freq() times without calling TermDocs.next()

This is invalid until TermDocs.next() is called for the first time.

Throws:
IOException

getPayloadLength

int getPayloadLength()
Returns the length of the payload at the current term position. This is invalid until nextPosition() is called for the first time.

Returns:
length of the current payload in number of bytes

getPayload

byte[] getPayload(byte[] data,
                  int offset)
                  throws IOException
Returns the payload data at the current term position. This is invalid until nextPosition() is called for the first time. This method must not be called more than once after each call of nextPosition(). However, payloads are loaded lazily, so if the payload data for the current position is not needed, this method may not be called at all for performance reasons.

Parameters:
data - the array into which the data of this payload is to be stored, if it is big enough; otherwise, a new byte[] array is allocated for this purpose.
offset - the offset in the array into which the data of this payload is to be stored.
Returns:
a byte[] array containing the data of this payload
Throws:
IOException

isPayloadAvailable

boolean isPayloadAvailable()
Checks if a payload can be loaded at this position.

Payloads can only be loaded once per call to nextPosition().

Returns:
true if there is a payload available at this position that can be loaded
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermPositionVector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Interface TermPositionVector

All Superinterfaces:
TermFreqVector
All Known Implementing Classes:
InstantiatedTermPositionVector
public interface TermPositionVector
extends TermFreqVector

Extends TermFreqVector to provide additional information about positions in which each of the terms is found. A TermPositionVector not necessarily contains both positions and offsets, but at least one of these arrays exists.

Method Summary
TermVectorOffsetInfo[] | getOffsets(int index) Returns an array of TermVectorOffsetInfo in which the term is found.
int[] | getTermPositions(int index) Returns an array of positions in which the term is found.
Methods inherited from interface org.apache.lucene.index.TermFreqVector
getField, getTermFrequencies, getTerms, indexesOf, indexOf, size

Method Detail

getTermPositions

int[] getTermPositions(int index)
Returns an array of positions in which the term is found. Terms are identified by the index at which its number appears in the term String array obtained from the indexOf method. May return null if positions have not been stored.

getOffsets

TermVectorOffsetInfo[] getOffsets(int index)
Returns an array of TermVectorOffsetInfo in which the term is found. May return null if offsets have not been stored.

Parameters:
index - The position in the array to get the offsets from
Returns:
An array of TermVectorOffsetInfo objects or the empty list
See Also:
Token
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermVectorAccessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class TermVectorAccessor

java.lang.Object
    extended by  org.apache.lucene.index.TermVectorAccessor

public class TermVectorAccessor
extends Object

Transparent access to the vector space model, either via TermFreqVector or by resolving it from the inverted index.

Resolving a term vector from a large index can be a time consuming process.

Warning! This class is not thread safe!

Constructor Summary
TermVectorAccessor()
Method Summary
 void accept(IndexReader indexReader, int documentNumber, String fieldName, TermVectorMapper mapper)
Visits the TermVectorMapper and populates it with terms available for a given document, either via a vector created at index time or by resolving them from the inverted index.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TermVectorAccessor

public TermVectorAccessor()
Method Detail

accept

public void accept(IndexReader indexReader,
                   int documentNumber,
                   String fieldName,
                   TermVectorMapper mapper)
            throws IOException
Visits the TermVectorMapper and populates it with terms available for a given document, either via a vector created at index time or by resolving them from the inverted index.

Parameters:
indexReader - Index source
documentNumber - Source document to access
fieldName - Field to resolve
mapper - Mapper to be mapped with data
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermVectorEntry

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class TermVectorEntry

java.lang.Object
    extended by  org.apache.lucene.index.TermVectorEntry

public class TermVectorEntry
extends Object

Convenience class for holding TermVector information.

Constructor Summary
TermVectorEntry()
TermVectorEntry(String field, String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions)
Method Summary
boolean | equals(Object o)
String | getField()
int | getFrequency()
TermVectorOffsetInfo[] | getOffsets()
int[] | getPositions()
String | getTerm()
int | hashCode()
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

TermVectorEntry

public TermVectorEntry()

TermVectorEntry

public TermVectorEntry(String field,
                       String term,
                       int frequency,
                       TermVectorOffsetInfo[] offsets,
                       int[] positions)
Method Detail

getField

public String getField()

getFrequency

public int getFrequency()

getOffsets

public TermVectorOffsetInfo[] getOffsets()

getPositions

public int[] getPositions()

getTerm

public String getTerm()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermVectorEntryFreqSortedComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class TermVectorEntryFreqSortedComparator

java.lang.Object
    extended by  org.apache.lucene.index.TermVectorEntryFreqSortedComparator
All Implemented Interfaces:
Comparator<TermVectorEntry>
public class TermVectorEntryFreqSortedComparator
extends Object
implements Comparator<TermVectorEntry>

Compares TermVectorEntrys first by frequency and then by the term (case-sensitive)

Constructor Summary
TermVectorEntryFreqSortedComparator()
Method Summary
 int compare(TermVectorEntry entry, TermVectorEntry entry1)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals

Constructor Detail

TermVectorEntryFreqSortedComparator

public TermVectorEntryFreqSortedComparator()
Method Detail

compare

public int compare(TermVectorEntry entry,
                   TermVectorEntry entry1)
Specified by:
compare in interface Comparator<TermVectorEntry>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermVectorMapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class TermVectorMapper

java.lang.Object
    extended by  org.apache.lucene.index.TermVectorMapper
Direct Known Subclasses:
FieldSortedTermVectorMapper, PositionBasedTermVectorMapper, SortedTermVectorMapper
public abstract class TermVectorMapper
extends Object

The TermVectorMapper can be used to map Term Vectors into your own structure instead of the parallel array structure used by IndexReader.getTermFreqVector(int,String).

It is up to the implementation to make sure it is thread-safe.

Constructor Summary
protected | TermVectorMapper()
protected | TermVectorMapper(boolean ignoringPositions, boolean ignoringOffsets)
Method Summary
boolean | isIgnoringOffsets()
boolean | isIgnoringPositions() Indicate to Lucene that even if there are positions stored, this mapper is not interested in them and they can be skipped over.
abstract void | map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) Map the Term Vector information into your own structure
void | setDocumentNumber(int documentNumber) Passes down the index of the document whose term vector is currently being mapped, once for each top level call to a term vector reader.
abstract void | setExpectations(String field, int numTerms, boolean storeOffsets, boolean storePositions) Tell the mapper what to expect in regards to field, number of terms, offset and position storage.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TermVectorMapper

protected TermVectorMapper()

TermVectorMapper

protected TermVectorMapper(boolean ignoringPositions,
                           boolean ignoringOffsets)
Parameters:
ignoringPositions - true if this mapper should tell Lucene to ignore positions even if they are stored
ignoringOffsets - similar to ignoringPositions
Method Detail

setExpectations

public abstract void setExpectations(String field,
                                     int numTerms,
                                     boolean storeOffsets,
                                     boolean storePositions)
Tell the mapper what to expect in regards to field, number of terms, offset and position storage. This method will be called once before retrieving the vector for a field. This method will be called before map(String,int,TermVectorOffsetInfo[],int[]).

Parameters:
field - The field the vector is for
numTerms - The number of terms that need to be mapped
storeOffsets - true if the mapper should expect offset information
storePositions - true if the mapper should expect positions info

map

public abstract void map(String term,
                         int frequency,
                         TermVectorOffsetInfo[] offsets,
                         int[] positions)
Map the Term Vector information into your own structure

Parameters:
term - The term to add to the vector
frequency - The frequency of the term in the document
offsets - null if the offset is not specified, otherwise the offset into the field of the term
positions - null if the position is not specified, otherwise the position in the field of the term

isIgnoringPositions

public boolean isIgnoringPositions()
Indicate to Lucene that even if there are positions stored, this mapper is not interested in them and they can be skipped over. Derived classes should set this to true if they want to ignore positions. The default is false, meaning positions will be loaded if they are stored.

Returns:
false

isIgnoringOffsets

public boolean isIgnoringOffsets()
Returns:
false
See Also:
Same principal as {@link #isIgnoringPositions()}, but applied to offsets. false by default.

setDocumentNumber

public void setDocumentNumber(int documentNumber)
Passes down the index of the document whose term vector is currently being mapped, once for each top level call to a term vector reader.

Default implementation IGNORES the document number. Override if your implementation needs the document number.

NOTE: Document numbers are internal to Lucene and subject to change depending on indexing operations.

Parameters:
documentNumber - index of document currently being mapped
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermVectorOffsetInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class TermVectorOffsetInfo

java.lang.Object
    extended by  org.apache.lucene.index.TermVectorOffsetInfo
All Implemented Interfaces:
Serializable
public class TermVectorOffsetInfo
extends Object
implements Serializable

The TermVectorOffsetInfo class holds information pertaining to a Term in a TermPositionVector's offset information. This offset information is the character offset as set during the Analysis phase (and thus may not be the actual offset in the original content).

See Also:
Serialized Form

Field Summary
static TermVectorOffsetInfo[] EMPTY_OFFSET_INFO
Convenience declaration when creating a TermPositionVector that stores only position information.
Constructor Summary
TermVectorOffsetInfo()
TermVectorOffsetInfo(int startOffset, int endOffset)
Method Summary
boolean | equals(Object o) Two TermVectorOffsetInfos are equals if both the start and end offsets are the same
int | getEndOffset() The accessor for the ending offset for the term
int | getStartOffset() The accessor for the starting offset of the term.
int | hashCode()
void | setEndOffset(int endOffset)
void | setStartOffset(int startOffset)
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

EMPTY_OFFSET_INFO

public static final transient TermVectorOffsetInfo[] EMPTY_OFFSET_INFO
Convenience declaration when creating a TermPositionVector that stores only position information.

Constructor Detail

TermVectorOffsetInfo

public TermVectorOffsetInfo()

TermVectorOffsetInfo

public TermVectorOffsetInfo(int startOffset,
                            int endOffset)
Method Detail

getEndOffset

public int getEndOffset()
The accessor for the ending offset for the term

Returns:
The offset

setEndOffset

public void setEndOffset(int endOffset)

getStartOffset

public int getStartOffset()
The accessor for the starting offset of the term.

Returns:
The offset

setStartOffset

public void setStartOffset(int startOffset)

equals

public boolean equals(Object o)
Two TermVectorOffsetInfos are equals if both the start and end offsets are the same

Overrides:
equals in class Object
Parameters:
o - The comparison Object
Returns:
true if both getStartOffset() and getEndOffset() are the same for both objects.

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ThreadedIndexingAndSearchingTestCase

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class ThreadedIndexingAndSearchingTestCase

java.lang.Object
    extended by  org.junit.Assert
        extended by  org.apache.lucene.util.LuceneTestCase
            extended by  org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

public abstract class ThreadedIndexingAndSearchingTestCase
extends LuceneTestCase

Utility class that spawns multiple indexing and searching threads.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.LuceneTestCase
LuceneTestCase.Nightly
Field Summary
protected AtomicInteger | addCount
protected AtomicInteger | delCount
protected Directory | dir
protected AtomicBoolean | failed
protected AtomicInteger | packCount
protected IndexWriter | writer
Fields inherited from class org.apache.lucene.util.LuceneTestCase
classRules, random, RANDOM_MULTIPLIER, ruleChain, stores, TEMP_DIR, TEST_CLEAN_THREADS, TEST_DIRECTORY, TEST_ITER, TEST_ITER_MIN, TEST_LINE_DOCS_FILE, TEST_LOCALE, TEST_NIGHTLY, TEST_SEED, TEST_TIMEZONE, TEST_VERSION_CURRENT, testsFailed, VERBOSE
Constructor Summary
ThreadedIndexingAndSearchingTestCase()
Method Summary
protected void | addDocument(Term id, Document doc)
protected void | addDocuments(Term id, Collection<Document> docs)
protected void | deleteDocuments(Term term)
protected void | doAfterIndexingThreadDone()
protected void | doAfterWriter(ExecutorService es)
protected void | doClose()
protected abstract void | doSearching(ExecutorService es, long stopTime)
protected abstract IndexSearcher | getCurrentSearcher()
protected Directory | getDirectory(Directory in)
protected abstract IndexSearcher | getFinalSearcher()
protected void | releaseSearcher(IndexSearcher s)
protected void | runSearchThreads(long stopTimeMS)
void | runTest(String testName)
protected void | smokeTestSearcher(IndexSearcher s)
protected void | updateDocument(Term term, Document doc)
protected void | updateDocuments(Term id, Collection<Document> docs)
Methods inherited from class org.apache.lucene.util.LuceneTestCase
afterClassLuceneTestCaseJ4, alwaysIgnoredTestMethod, assertEquals, assertEquals, assertEquals, assertEquals, assertSaneFieldCaches, asSet, assumeFalse, assumeNoException, assumeTrue, atLeast, atLeast, beforeClassLuceneTestCaseJ4, dumpArray, dumpIterator, getDataFile, getName, getTestClass, getTestLabel, isTestThread, localeForName, newDirectory, newDirectory, newDirectory, newDirectory, newField, newField, newField, newField, newField, newField, newFSDirectory, newFSDirectory, newIndexWriterConfig, newIndexWriterConfig, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newSearcher, newSearcher, newTieredMergePolicy, newTieredMergePolicy, purgeFieldCache, randomDirectory, randomLocale, randomTimeZone, rarely, rarely, reportAdditionalFailureInfo, reportPartialFailureInfo, setMergeFactor, setUp, setUseCompoundFile, tearDown, usually, usually
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

failed

protected final AtomicBoolean failed

addCount

protected final AtomicInteger addCount

delCount

protected final AtomicInteger delCount

packCount

protected final AtomicInteger packCount

dir

protected Directory dir

writer

protected IndexWriter writer
Constructor Detail

ThreadedIndexingAndSearchingTestCase

public ThreadedIndexingAndSearchingTestCase()
Method Detail

getCurrentSearcher

protected abstract IndexSearcher getCurrentSearcher()
                                             throws Exception
Throws:
Exception

getFinalSearcher

protected abstract IndexSearcher getFinalSearcher()
                                           throws Exception
Throws:
Exception

releaseSearcher

protected void releaseSearcher(IndexSearcher s)
                        throws Exception
Throws:
Exception

doSearching

protected abstract void doSearching(ExecutorService es,
                                    long stopTime)
                             throws Exception
Throws:
Exception

getDirectory

protected Directory getDirectory(Directory in)

updateDocuments

protected void updateDocuments(Term id,
                               Collection<Document> docs)
                        throws Exception
Throws:
Exception

addDocuments

protected void addDocuments(Term id,
                            Collection<Document> docs)
                     throws Exception
Throws:
Exception

addDocument

protected void addDocument(Term id,
                           Document doc)
                    throws Exception
Throws:
Exception

updateDocument

protected void updateDocument(Term term,
                              Document doc)
                       throws Exception
Throws:
Exception

deleteDocuments

protected void deleteDocuments(Term term)
                        throws Exception
Throws:
Exception

doAfterIndexingThreadDone

protected void doAfterIndexingThreadDone()

runSearchThreads

protected void runSearchThreads(long stopTimeMS)
                         throws Exception
Throws:
Exception

doAfterWriter

protected void doAfterWriter(ExecutorService es)
                      throws Exception
Throws:
Exception

doClose

protected void doClose()
                throws Exception
Throws:
Exception

runTest

public void runTest(String testName)
             throws Exception
Throws:
Exception

smokeTestSearcher

protected void smokeTestSearcher(IndexSearcher s)
                          throws Exception
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TieredMergePolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class TieredMergePolicy

java.lang.Object
    extended by  org.apache.lucene.index.MergePolicy
        extended by  org.apache.lucene.index.TieredMergePolicy
All Implemented Interfaces:
Closeable
public class TieredMergePolicy
extends MergePolicy

Merges segments of approximately equal size, subject to an allowed number of segments per tier. This is similar to LogByteSizeMergePolicy, except this merge policy is able to merge non-adjacent segment, and separates how many segments are merged at once (setMaxMergeAtOnce(int)) from how many segments are allowed per tier (setSegmentsPerTier(double)). This merge policy also does not over-merge (i.e. cascade merges).

For normal merging, this policy first computes a "budget" of how many segments are allowed by be in the index. If the index is over-budget, then the policy sorts segments by decreasing size (pro-rating by percent deletes), and then finds the least-cost merge. Merge cost is measured by a combination of the "skew" of the merge (size of largest segment divided by smallest segment), total merge size and percent deletes reclaimed, so that merges with lower skew, smaller size and those reclaiming more deletes, are favored.

If a merge will produce a segment that's larger than setMaxMergedSegmentMB(double), then the policy will merge fewer segments (down to 1 at once, if that one has deletions) to keep the segment size under budget. NOTE: this policy freely merges non-adjacent segments; if this is a problem, use LogMergePolicy.

NOTE: This policy always merges by byte size of the segments, always pro-rates by percent deletes, and does not apply any maximum segment size during forceMerge (unlike LogByteSizeMergePolicy).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
protected static class TieredMergePolicy.MergeScore
Holds score and explanation for a single candidate merge.
Nested classes/interfaces inherited from class org.apache.lucene.index.MergePolicy
MergePolicy.MergeAbortedException, MergePolicy.MergeException, MergePolicy.MergeSpecification, MergePolicy.OneMerge
Field Summary
Fields inherited from class org.apache.lucene.index.MergePolicy
writer
Constructor Summary
TieredMergePolicy()
Method Summary
void | close() Release all resources for the policy.
MergePolicy.MergeSpecification | findForcedDeletesMerges(SegmentInfos infos) Determine what set of merge operations is necessary in order to expunge all deletes from the index.
MergePolicy.MergeSpecification | findForcedMerges(SegmentInfos infos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge) Determine what set of merge operations is necessary in order to merge to <= the specified segment count.
MergePolicy.MergeSpecification | findMerges(SegmentInfos infos) Determine what set of merge operations are now necessary on the index.
double | getFloorSegmentMB()
double | getForceMergeDeletesPctAllowed()
int | getMaxMergeAtOnce()
int | getMaxMergeAtOnceExplicit()
double | getMaxMergedSegmentMB()
double | getNoCFSRatio()
double | getReclaimDeletesWeight() See setReclaimDeletesWeight(double).
double | getSegmentsPerTier()
boolean | getUseCompoundFile()
protected TieredMergePolicy.MergeScore | score(List<SegmentInfo> candidate, boolean hitTooLarge, long mergingBytes) Expert: scores one merge; subclasses can override.
TieredMergePolicy | setFloorSegmentMB(double v) Segments smaller than this are "rounded up" to this size, ie treated as equal (floor) size for merge selection.
TieredMergePolicy | setForceMergeDeletesPctAllowed(double v) When forceMergeDeletes is called, we only merge away a segment if its delete percentage is over this threshold.
TieredMergePolicy | setMaxMergeAtOnce(int v) Maximum number of segments to be merged at a time during "normal" merging.
TieredMergePolicy | setMaxMergeAtOnceExplicit(int v) Maximum number of segments to be merged at a time, during forceMerge or forceMergeDeletes.
TieredMergePolicy | setMaxMergedSegmentMB(double v) Maximum sized segment to produce during normal merging.
TieredMergePolicy | setNoCFSRatio(double noCFSRatio) If a merged segment will be more than this percentage of the total size of the index, leave the segment as non-compound file even if compound file is enabled.
TieredMergePolicy | setReclaimDeletesWeight(double v) Controls how aggressively merges that reclaim more deletions are favored.
TieredMergePolicy | setSegmentsPerTier(double v) Sets the allowed number of segments per tier.
TieredMergePolicy | setUseCompoundFile(boolean useCompoundFile) Sets whether compound file format should be used for newly flushed and newly merged segments.
String | toString()
boolean | useCompoundFile(SegmentInfos infos, SegmentInfo mergedInfo) Returns true if a new segment (regardless of its origin) should use the compound file format.
Methods inherited from class org.apache.lucene.index.MergePolicy
setIndexWriter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TieredMergePolicy

public TieredMergePolicy()
Method Detail

setMaxMergeAtOnce

public TieredMergePolicy setMaxMergeAtOnce(int v)
Maximum number of segments to be merged at a time during "normal" merging. For explicit merging (eg, forceMerge or forceMergeDeletes was called), see setMaxMergeAtOnceExplicit(int). Default is 10.

getMaxMergeAtOnce

public int getMaxMergeAtOnce()
See Also:
setMaxMergeAtOnce(int)

setMaxMergeAtOnceExplicit

public TieredMergePolicy setMaxMergeAtOnceExplicit(int v)
Maximum number of segments to be merged at a time, during forceMerge or forceMergeDeletes. Default is 30.

getMaxMergeAtOnceExplicit

public int getMaxMergeAtOnceExplicit()
See Also:
setMaxMergeAtOnceExplicit(int)

setMaxMergedSegmentMB

public TieredMergePolicy setMaxMergedSegmentMB(double v)
Maximum sized segment to produce during normal merging. This setting is approximate: the estimate of the merged segment size is made by summing sizes of to-be-merged segments (compensating for percent deleted docs). Default is 5 GB.

getMaxMergedSegmentMB

public double getMaxMergedSegmentMB()
See Also:
getMaxMergedSegmentMB()

setReclaimDeletesWeight

public TieredMergePolicy setReclaimDeletesWeight(double v)
Controls how aggressively merges that reclaim more deletions are favored. Higher values favor selecting merges that reclaim deletions. A value of 0.0 means deletions don't impact merge selection.

getReclaimDeletesWeight

public double getReclaimDeletesWeight()
See setReclaimDeletesWeight(double).

setFloorSegmentMB

public TieredMergePolicy setFloorSegmentMB(double v)
Segments smaller than this are "rounded up" to this size, ie treated as equal (floor) size for merge selection. This is to prevent frequent flushing of tiny segments from allowing a long tail in the index. Default is 2 MB.

getFloorSegmentMB

public double getFloorSegmentMB()
See Also:
setFloorSegmentMB(double)

setForceMergeDeletesPctAllowed

public TieredMergePolicy setForceMergeDeletesPctAllowed(double v)
When forceMergeDeletes is called, we only merge away a segment if its delete percentage is over this threshold. Default is 10%.

getForceMergeDeletesPctAllowed

public double getForceMergeDeletesPctAllowed()
See Also:
setForceMergeDeletesPctAllowed(double)

setSegmentsPerTier

public TieredMergePolicy setSegmentsPerTier(double v)
Sets the allowed number of segments per tier. Smaller values mean more merging but fewer segments.

NOTE: this value should be >= the setMaxMergeAtOnce(int) otherwise you'll force too much merging to occur.

Default is 10.0.

getSegmentsPerTier

public double getSegmentsPerTier()
See Also:
setSegmentsPerTier(double)

setUseCompoundFile

public TieredMergePolicy setUseCompoundFile(boolean useCompoundFile)
Sets whether compound file format should be used for newly flushed and newly merged segments. Default true.

getUseCompoundFile

public boolean getUseCompoundFile()
See Also:
setUseCompoundFile(boolean)

setNoCFSRatio

public TieredMergePolicy setNoCFSRatio(double noCFSRatio)
If a merged segment will be more than this percentage of the total size of the index, leave the segment as non-compound file even if compound file is enabled. Set to 1.0 to always use CFS regardless of merge size. Default is 0.1.

getNoCFSRatio

public double getNoCFSRatio()
See Also:
setNoCFSRatio(double)

findMerges

public MergePolicy.MergeSpecification findMerges(SegmentInfos infos)
                                          throws IOException
Description copied from class: MergePolicy
Determine what set of merge operations are now necessary on the index. IndexWriter calls this whenever there is a change to the segments. This call is always synchronized on the IndexWriter instance so only one thread at a time will call this method.

Specified by:
findMerges in class MergePolicy
Parameters:
infos - the total set of segments in the index
Throws:
IOException

score

protected TieredMergePolicy.MergeScore score(List<SegmentInfo> candidate,
                                             boolean hitTooLarge,
                                             long mergingBytes)
                                      throws IOException
Expert: scores one merge; subclasses can override.

Throws:
IOException

findForcedMerges

public MergePolicy.MergeSpecification findForcedMerges(SegmentInfos infos,
                                                       int maxSegmentCount,
                                                       Map<SegmentInfo,Boolean> segmentsToMerge)
                                                throws IOException
Description copied from class: MergePolicy
Determine what set of merge operations is necessary in order to merge to <= the specified segment count. IndexWriter calls this when its IndexWriter.forceMerge(int) method is called. This call is always synchronized on the IndexWriter instance so only one thread at a time will call this method.

Specified by:
findForcedMerges in class MergePolicy
Parameters:
infos - the total set of segments in the index
maxSegmentCount - requested maximum number of segments in the index (currently this is always 1)
segmentsToMerge - contains the specific SegmentInfo instances that must be merged away. This may be a subset of all SegmentInfos. If the value is True for a given SegmentInfo, that means this segment was an original segment present in the to-be-merged index; else, it was a segment produced by a cascaded merge.
Throws:
IOException

findForcedDeletesMerges

public MergePolicy.MergeSpecification findForcedDeletesMerges(SegmentInfos infos)
                                                       throws CorruptIndexException,
                                                              IOException
Description copied from class: MergePolicy
Determine what set of merge operations is necessary in order to expunge all deletes from the index.

Specified by:
findForcedDeletesMerges in class MergePolicy
Parameters:
infos - the total set of segments in the index
Throws:
CorruptIndexException
IOException

useCompoundFile

public boolean useCompoundFile(SegmentInfos infos,
                               SegmentInfo mergedInfo)
                        throws IOException
Description copied from class: MergePolicy
Returns true if a new segment (regardless of its origin) should use the compound file format.

Specified by:
useCompoundFile in class MergePolicy
Throws:
IOException

close

public void close()
Description copied from class: MergePolicy
Release all resources for the policy.

Specified by:
close in interface Closeable
Specified by:
close in class MergePolicy

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TieredMergePolicy.MergeScore

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class TieredMergePolicy.MergeScore

java.lang.Object
    extended by  org.apache.lucene.index.TieredMergePolicy.MergeScore
Enclosing class:
TieredMergePolicy
protected abstract static class TieredMergePolicy.MergeScore
extends Object

Holds score and explanation for a single candidate merge.

Constructor Summary
protected TieredMergePolicy.MergeScore()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TieredMergePolicy.MergeScore

protected TieredMergePolicy.MergeScore()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UpgradeIndexMergePolicy

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index
Class UpgradeIndexMergePolicy

java.lang.Object
    extended by  org.apache.lucene.index.MergePolicy
        extended by  org.apache.lucene.index.UpgradeIndexMergePolicy
All Implemented Interfaces:
Closeable
public class UpgradeIndexMergePolicy
extends MergePolicy

This MergePolicy is used for upgrading all existing segments of an index when calling IndexWriter.forceMerge(int). All other methods delegate to the base MergePolicy given to the constructor. This allows for an as-cheap-as possible upgrade of an older index by only upgrading segments that are created by previous Lucene versions. forceMerge does no longer really merge; it is just used to "forceMerge" older segment versions away.

In general one would use IndexUpgrader, but for a fully customizeable upgrade, you can use this like any other MergePolicy and call IndexWriter.forceMerge(int):

  IndexWriterConfig iwc = new IndexWriterConfig(Version.LUCENE_XX, new KeywordAnalyzer());
  iwc.setMergePolicy(new UpgradeIndexMergePolicy(iwc.getMergePolicy()));
  IndexWriter w = new IndexWriter(dir, iwc);
  w.forceMerge(1);
  w.close();

Warning: This merge policy may reorder documents if the index was partially upgraded before calling forceMerge (e.g., documents were added). If your application relies on "monotonicity" of doc IDs (which means that the order in which the documents were added to the index is preserved), do a forceMerge(1) instead. Please note, the delegate MergePolicy may also reorder documents.

See Also:
IndexUpgrader
WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.MergePolicy
MergePolicy.MergeAbortedException, MergePolicy.MergeException, MergePolicy.MergeSpecification, MergePolicy.OneMerge
Field Summary
protected  MergePolicy base
Fields inherited from class org.apache.lucene.index.MergePolicy
writer
Constructor Summary
UpgradeIndexMergePolicy(MergePolicy base)
Wrap the given MergePolicy and intercept forceMerge requests to only upgrade segments written with previous Lucene versions.
Method Summary
void | close() Release all resources for the policy.
MergePolicy.MergeSpecification | findForcedDeletesMerges(SegmentInfos segmentInfos) Determine what set of merge operations is necessary in order to expunge all deletes from the index.
MergePolicy.MergeSpecification | findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge) Determine what set of merge operations is necessary in order to merge to <= the specified segment count.
MergePolicy.MergeSpecification | findMerges(SegmentInfos segmentInfos) Determine what set of merge operations are now necessary on the index.
void | setIndexWriter(IndexWriter writer) Sets the IndexWriter to use by this merge policy.
protected boolean | shouldUpgradeSegment(SegmentInfo si) Returns if the given segment should be upgraded.
String | toString()
boolean | useCompoundFile(SegmentInfos segments, SegmentInfo newSegment) Returns true if a new segment (regardless of its origin) should use the compound file format.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

base

protected final MergePolicy base
Constructor Detail

UpgradeIndexMergePolicy

public UpgradeIndexMergePolicy(MergePolicy base)
Wrap the given MergePolicy and intercept forceMerge requests to only upgrade segments written with previous Lucene versions.

Method Detail

shouldUpgradeSegment

protected boolean shouldUpgradeSegment(SegmentInfo si)
Returns if the given segment should be upgraded. The default implementation will return !Constants.LUCENE_MAIN_VERSION.equals(si.getVersion()), so all segments created with a different version number than this Lucene version will get upgraded.

setIndexWriter

public void setIndexWriter(IndexWriter writer)
Description copied from class: MergePolicy
Sets the IndexWriter to use by this merge policy. This method is allowed to be called only once, and is usually set by IndexWriter. If it is called more than once, SetOnce.AlreadySetException is thrown.

Overrides:
setIndexWriter in class MergePolicy
See Also:
SetOnce

findMerges

public MergePolicy.MergeSpecification findMerges(SegmentInfos segmentInfos)
                                          throws CorruptIndexException,
                                                 IOException
Description copied from class: MergePolicy
Determine what set of merge operations are now necessary on the index. IndexWriter calls this whenever there is a change to the segments. This call is always synchronized on the IndexWriter instance so only one thread at a time will call this method.

Specified by:
findMerges in class MergePolicy
Parameters:
segmentInfos - the total set of segments in the index
Throws:
CorruptIndexException
IOException

findForcedMerges

public MergePolicy.MergeSpecification findForcedMerges(SegmentInfos segmentInfos,
                                                       int maxSegmentCount,
                                                       Map<SegmentInfo,Boolean> segmentsToMerge)
                                                throws CorruptIndexException,
                                                       IOException
Description copied from class: MergePolicy
Determine what set of merge operations is necessary in order to merge to <= the specified segment count. IndexWriter calls this when its IndexWriter.forceMerge(int) method is called. This call is always synchronized on the IndexWriter instance so only one thread at a time will call this method.

Specified by:
findForcedMerges in class MergePolicy
Parameters:
segmentInfos - the total set of segments in the index
maxSegmentCount - requested maximum number of segments in the index (currently this is always 1)
segmentsToMerge - contains the specific SegmentInfo instances that must be merged away. This may be a subset of all SegmentInfos. If the value is True for a given SegmentInfo, that means this segment was an original segment present in the to-be-merged index; else, it was a segment produced by a cascaded merge.
Throws:
CorruptIndexException
IOException

findForcedDeletesMerges

public MergePolicy.MergeSpecification findForcedDeletesMerges(SegmentInfos segmentInfos)
                                                       throws CorruptIndexException,
                                                              IOException
Description copied from class: MergePolicy
Determine what set of merge operations is necessary in order to expunge all deletes from the index.

Specified by:
findForcedDeletesMerges in class MergePolicy
Parameters:
segmentInfos - the total set of segments in the index
Throws:
CorruptIndexException
IOException

useCompoundFile

public boolean useCompoundFile(SegmentInfos segments,
                               SegmentInfo newSegment)
                        throws IOException
Description copied from class: MergePolicy
Returns true if a new segment (regardless of its origin) should use the compound file format.

Specified by:
useCompoundFile in class MergePolicy
Throws:
IOException

close

public void close()
Description copied from class: MergePolicy
Release all resources for the policy.

Specified by:
close in interface Closeable
Specified by:
close in class MergePolicy

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.index.AbstractAllTermDocs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.AbstractAllTermDocs

No usage of org.apache.lucene.index.AbstractAllTermDocs

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.BalancedSegmentMergePolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.BalancedSegmentMergePolicy

No usage of org.apache.lucene.index.BalancedSegmentMergePolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.BalancedSegmentMergePolicy.MergePolicyParams

Packages that use BalancedSegmentMergePolicy.MergePolicyParams
org.apache.lucene.index Code to maintain and access indices.

Uses of BalancedSegmentMergePolicy.MergePolicyParams in org.apache.lucene.index

Methods in org.apache.lucene.index with parameters of type BalancedSegmentMergePolicy.MergePolicyParams
 void BalancedSegmentMergePolicy.setMergePolicyParams(BalancedSegmentMergePolicy.MergePolicyParams params)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.CheckIndex

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.CheckIndex

No usage of org.apache.lucene.index.CheckIndex

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.CheckIndex.Status.FieldNormStatus

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.CheckIndex.Status.FieldNormStatus

Packages that use CheckIndex.Status.FieldNormStatus
org.apache.lucene.index Code to maintain and access indices.

Uses of CheckIndex.Status.FieldNormStatus in org.apache.lucene.index

Fields in org.apache.lucene.index declared as CheckIndex.Status.FieldNormStatus
 CheckIndex.Status.FieldNormStatus CheckIndex.Status.SegmentInfoStatus.fieldNormStatus
Status for testing of field norms (null if field norms could not be tested).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.CheckIndex.Status

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.CheckIndex.Status

Packages that use CheckIndex.Status
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.util | Some utility classes.

Uses of CheckIndex.Status in org.apache.lucene.index

Methods in org.apache.lucene.index that return CheckIndex.Status
CheckIndex.Status | CheckIndex.checkIndex() Returns a CheckIndex.Status instance detailing the state of the index.
CheckIndex.Status | CheckIndex.checkIndex(List<String> onlySegments) Returns a CheckIndex.Status instance detailing the state of the index.

Methods in org.apache.lucene.index with parameters of type CheckIndex.Status
 void CheckIndex.fixIndex(CheckIndex.Status result)
Repairs the index using previously returned result from CheckIndex.checkIndex().

Uses of CheckIndex.Status in org.apache.lucene.util

Methods in org.apache.lucene.util that return CheckIndex.Status
static CheckIndex.Status _TestUtil.checkIndex(Directory dir)
This runs the CheckIndex tool on the index in.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.CheckIndex.Status.SegmentInfoStatus

Packages that use CheckIndex.Status.SegmentInfoStatus
org.apache.lucene.index Code to maintain and access indices.

Uses of CheckIndex.Status.SegmentInfoStatus in org.apache.lucene.index

Fields in org.apache.lucene.index with type parameters of type CheckIndex.Status.SegmentInfoStatus
 List<CheckIndex.Status.SegmentInfoStatus> CheckIndex.Status.segmentInfos
List of CheckIndex.Status.SegmentInfoStatus instances, detailing status of each segment.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.CheckIndex.Status.StoredFieldStatus

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.CheckIndex.Status.StoredFieldStatus

Packages that use CheckIndex.Status.StoredFieldStatus
org.apache.lucene.index Code to maintain and access indices.

Uses of CheckIndex.Status.StoredFieldStatus in org.apache.lucene.index

Fields in org.apache.lucene.index declared as CheckIndex.Status.StoredFieldStatus
 CheckIndex.Status.StoredFieldStatus CheckIndex.Status.SegmentInfoStatus.storedFieldStatus
Status for testing of stored fields (null if stored fields could not be tested).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.CheckIndex.Status.TermIndexStatus

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.CheckIndex.Status.TermIndexStatus

Packages that use CheckIndex.Status.TermIndexStatus
org.apache.lucene.index Code to maintain and access indices.

Uses of CheckIndex.Status.TermIndexStatus in org.apache.lucene.index

Fields in org.apache.lucene.index declared as CheckIndex.Status.TermIndexStatus
 CheckIndex.Status.TermIndexStatus CheckIndex.Status.SegmentInfoStatus.termIndexStatus
Status for testing of indexed terms (null if indexed terms could not be tested).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.CheckIndex.Status.TermVectorStatus

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.CheckIndex.Status.TermVectorStatus

Packages that use CheckIndex.Status.TermVectorStatus
org.apache.lucene.index Code to maintain and access indices.

Uses of CheckIndex.Status.TermVectorStatus in org.apache.lucene.index

Fields in org.apache.lucene.index declared as CheckIndex.Status.TermVectorStatus
 CheckIndex.Status.TermVectorStatus CheckIndex.Status.SegmentInfoStatus.termVectorStatus
Status for testing of term vectors (null if term vectors could not be tested).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.CompoundFileExtractor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.CompoundFileExtractor

No usage of org.apache.lucene.index.CompoundFileExtractor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.CompoundFileWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.CompoundFileWriter

No usage of org.apache.lucene.index.CompoundFileWriter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.ConcurrentMergeScheduler

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.ConcurrentMergeScheduler

No usage of org.apache.lucene.index.ConcurrentMergeScheduler

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.ConcurrentMergeScheduler.MergeThread

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.ConcurrentMergeScheduler.MergeThread

Packages that use ConcurrentMergeScheduler.MergeThread
org.apache.lucene.index Code to maintain and access indices.

Uses of ConcurrentMergeScheduler.MergeThread in org.apache.lucene.index

Fields in org.apache.lucene.index with type parameters of type ConcurrentMergeScheduler.MergeThread
protected static Comparator<ConcurrentMergeScheduler.MergeThread> | ConcurrentMergeScheduler.compareByMergeDocCount
protected List<ConcurrentMergeScheduler.MergeThread> | ConcurrentMergeScheduler.mergeThreads

Methods in org.apache.lucene.index that return ConcurrentMergeScheduler.MergeThread
protected  ConcurrentMergeScheduler.MergeThread ConcurrentMergeScheduler.getMergeThread(IndexWriter writer, MergePolicy.OneMerge merge)
Create and return a new MergeThread

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.CorruptIndexException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.CorruptIndexException

Packages that use CorruptIndexException
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.

Uses of CorruptIndexException in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks that throw CorruptIndexException
static IndexWriter CreateIndexTask.configureWriter(Config config, PerfRunData runData, IndexWriterConfig.OpenMode mode, IndexCommit commit)

Uses of CorruptIndexException in org.apache.lucene.facet.taxonomy.directory

Methods in org.apache.lucene.facet.taxonomy.directory that throw CorruptIndexException
protected  int DirectoryTaxonomyWriter.addCategoryDocument(CategoryPath categoryPath, int length, int parent)
 void DirectoryTaxonomyWriter.close()
Frees used resources as well as closes the underlying IndexWriter, which commits whatever changes made to it to the underlying Directory.
 void DirectoryTaxonomyWriter.commit()
Calling commit() ensures that all the categories written so far are visible to a reader that is opened (or reopened) after that call.
 void DirectoryTaxonomyWriter.commit(Map<String,String> commitUserData)
Like commit(), but also store properties with the index.
 CategoryPath DirectoryTaxonomyReader.getPath(int ordinal)
 boolean DirectoryTaxonomyReader.getPath(int ordinal, CategoryPath result)
protected  IndexReader DirectoryTaxonomyReader.openIndexReader(Directory directory)
 void DirectoryTaxonomyWriter.prepareCommit()
prepare most of the work needed for a two-phase commit.
 void DirectoryTaxonomyWriter.prepareCommit(Map<String,String> commitUserData)
Like above, and also prepares to store user data with the index.

Constructors in org.apache.lucene.facet.taxonomy.directory that throw CorruptIndexException
DirectoryTaxonomyWriter(Directory d)
DirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode)
Creates a new instance with a default cached as defined by DirectoryTaxonomyWriter.defaultTaxonomyWriterCache().

Uses of CorruptIndexException in org.apache.lucene.index

Subclasses of CorruptIndexException in org.apache.lucene.index
class | IndexFormatTooNewException This exception is thrown when Lucene detects an index that is newer than this Lucene version.
class | IndexFormatTooOldException This exception is thrown when Lucene detects an index that is too old for this Lucene version

Methods in org.apache.lucene.index that throw CorruptIndexException
 void IndexWriter.addDocument(Document doc)
Adds a document to this index.
 void IndexWriter.addDocument(Document doc, Analyzer analyzer)
Adds a document to this index, using the provided analyzer instead of the value of IndexWriter.getAnalyzer().
 void IndexWriter.addDocuments(Collection<Document> docs)
Atomically adds a block of documents with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
 void IndexWriter.addDocuments(Collection<Document> docs, Analyzer analyzer)
Atomically adds a block of documents, analyzed using the provided analyzer, with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
 void RandomIndexWriter.addIndexes(Directory... dirs)
 void IndexWriter.addIndexes(Directory... dirs)
Adds all segments from an array of indexes into this index.
 void RandomIndexWriter.addIndexes(IndexReader... readers)
 void IndexWriter.addIndexes(IndexReader... readers)
Merges the provided indexes into this index.
 void IndexWriter.addIndexesNoOptimize(Directory... dirs)
Deprecated. use IndexWriter.addIndexes(Directory...) instead
 IndexReader IndexReader.clone(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.clone() instead.
 IndexReader MultiReader.clone(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use MultiReader.clone() instead.
 IndexReader SegmentReader.clone(boolean openReadOnly)
Deprecated.
 IndexReader ParallelReader.clone(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use ParallelReader.clone() instead.
abstract  void MergeScheduler.close()
Close this MergeScheduler.
 void IndexWriter.close()
Commits all changes to an index and closes all associated files.
 void PersistentSnapshotDeletionPolicy.close()
Closes the index which writes the snapshots to the directory.
 void IndexWriter.close(boolean waitForMerges)
Closes the index with or without waiting for currently running merges to finish.
 void RandomIndexWriter.commit()
 void IndexWriter.commit()
Commits all pending changes (added & deleted documents, segment merges, added indexes, etc.) to the index, and syncs all referenced index files, such that a reader will see the changes and the index updates will survive an OS or machine crash or power loss.
 void IndexWriter.commit(Map<String,String> commitUserData)
Commits all changes to the index, specifying a commitUserData Map (String -> String).
 void IndexReader.deleteDocument(int docNum)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
 void IndexWriter.deleteDocuments(Query... queries)
Deletes the document(s) matching any of the provided queries.
 void RandomIndexWriter.deleteDocuments(Query q)
 void IndexWriter.deleteDocuments(Query query)
Deletes the document(s) matching the provided query.
 void IndexWriter.deleteDocuments(Term... terms)
Deletes the document(s) containing any of the terms.
 void RandomIndexWriter.deleteDocuments(Term term)
 int IndexReader.deleteDocuments(Term term)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
 void IndexWriter.deleteDocuments(Term term)
Deletes the document(s) containing term.
protected abstract  Object SegmentInfos.FindSegmentsFile.doBody(String segmentFileName)
Subclass must implement this.
 Document IndexReader.document(int n)
Returns the stored fields of the nth Document in this index.
 Document PruningReader.document(int n, FieldSelector fieldSelector)
Applies a StorePruningPolicy to stored fields of a document.
abstract  Document IndexReader.document(int n, FieldSelector fieldSelector)
Get the Document at the n th position.
 Document MultiReader.document(int n, FieldSelector fieldSelector)
 Document SegmentReader.document(int n, FieldSelector fieldSelector)
 Document ParallelReader.document(int n, FieldSelector fieldSelector)
 Document FilterIndexReader.document(int n, FieldSelector fieldSelector)
protected abstract  void IndexReader.doDelete(int docNum)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
protected  void MultiReader.doDelete(int n)
Deprecated.
protected  void ParallelReader.doDelete(int n)
Deprecated.
protected  void FilterIndexReader.doDelete(int n)
Deprecated.
protected  IndexReader IndexReader.doOpenIfChanged()
If the index has changed since it was opened, open and return a new reader; else, return null.
protected  IndexReader MultiReader.doOpenIfChanged()
protected  IndexReader SegmentReader.doOpenIfChanged()
protected  IndexReader ParallelReader.doOpenIfChanged()
protected  IndexReader IndexReader.doOpenIfChanged(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.doOpenIfChanged() instead
protected  IndexReader MultiReader.doOpenIfChanged(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use MultiReader.doOpenIfChanged() instead.
protected  IndexReader SegmentReader.doOpenIfChanged(boolean openReadOnly)
Deprecated.
protected  IndexReader ParallelReader.doOpenIfChanged(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use ParallelReader.doOpenIfChanged() instead.
protected  IndexReader IndexReader.doOpenIfChanged(IndexCommit commit)
If the index has changed since it was opened, open and return a new reader; else, return null.
protected  IndexReader IndexReader.doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes)
If the index has changed since it was opened, open and return a new reader; else, return null.
protected abstract  void IndexReader.doSetNorm(int doc, String field, byte value)
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
protected  void MultiReader.doSetNorm(int n, String field, byte value)
Deprecated.
protected  void ParallelReader.doSetNorm(int n, String field, byte value)
Deprecated.
protected  void FilterIndexReader.doSetNorm(int d, String f, byte b)
Deprecated.
protected abstract  void IndexReader.doUndeleteAll()
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
protected  void MultiReader.doUndeleteAll()
Deprecated.
protected  void ParallelReader.doUndeleteAll()
Deprecated.
protected  void FilterIndexReader.doUndeleteAll()
Deprecated.
 void IndexWriter.expungeDeletes()
Deprecated.
 void IndexWriter.expungeDeletes(boolean doWait)
Deprecated.
 MergePolicy.MergeSpecification BalancedSegmentMergePolicy.findForcedDeletesMerges(SegmentInfos infos)
 MergePolicy.MergeSpecification MockRandomMergePolicy.findForcedDeletesMerges(SegmentInfos segmentInfos)
 MergePolicy.MergeSpecification NoMergePolicy.findForcedDeletesMerges(SegmentInfos segmentInfos)
 MergePolicy.MergeSpecification TieredMergePolicy.findForcedDeletesMerges(SegmentInfos infos)
 MergePolicy.MergeSpecification LogMergePolicy.findForcedDeletesMerges(SegmentInfos segmentInfos)
Finds merges necessary to force-merge all deletes from the index.
 MergePolicy.MergeSpecification UpgradeIndexMergePolicy.findForcedDeletesMerges(SegmentInfos segmentInfos)
abstract  MergePolicy.MergeSpecification MergePolicy.findForcedDeletesMerges(SegmentInfos segmentInfos)
Determine what set of merge operations is necessary in order to expunge all deletes from the index.
 MergePolicy.MergeSpecification MockRandomMergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
 MergePolicy.MergeSpecification NoMergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
 MergePolicy.MergeSpecification UpgradeIndexMergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
abstract  MergePolicy.MergeSpecification MergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
Determine what set of merge operations is necessary in order to merge to <= the specified segment count.
 MergePolicy.MergeSpecification NoMergePolicy.findMerges(SegmentInfos segmentInfos)
 MergePolicy.MergeSpecification UpgradeIndexMergePolicy.findMerges(SegmentInfos segmentInfos)
abstract  MergePolicy.MergeSpecification MergePolicy.findMerges(SegmentInfos segmentInfos)
Determine what set of merge operations are now necessary on the index.
protected  void IndexWriter.flush(boolean triggerMerge, boolean applyAllDeletes)
Flush all in-memory buffered updates (adds and deletes) to the Directory.
protected  void IndexWriter.flush(boolean triggerMerge, boolean flushDocStores, boolean flushDeletes)
NOTE: flushDocStores is ignored now (hardwired to true); this method is only here for backwards compatibility
 void IndexWriter.forceMerge(int maxNumSegments)
Forces merge policy to merge segments until there's <= maxNumSegments.
 void IndexWriter.forceMerge(int maxNumSegments, boolean doWait)
Just like IndexWriter.forceMerge(int), except you can specify whether the call should block until all merging completes.
 void IndexWriter.forceMergeDeletes()
Forces merging of all segments that have deleted documents.
 void IndexWriter.forceMergeDeletes(boolean doWait)
Just like IndexWriter.forceMergeDeletes(), except you can specify whether the call should block until the operation completes.
static SegmentReader SegmentReader.get(boolean readOnly, Directory dir, SegmentInfo si, int readBufferSize, boolean doOpenStores, int termInfosIndexDivisor)
static SegmentReader SegmentReader.get(boolean readOnly, SegmentInfo si, int termInfosIndexDivisor)
static Map<String,String> IndexReader.getCommitUserData(Directory directory)
Deprecated. Call IndexReader.getIndexCommit() on an open IndexReader, and then call IndexCommit.getUserData().
static long IndexReader.getCurrentVersion(Directory directory)
Deprecated. Use IndexReader.getVersion() on an opened IndexReader.
 boolean IndexReader.isCurrent()
Check whether any new changes have occurred to the index since this reader was opened.
 boolean MultiReader.isCurrent()
Checks recursively if all subreaders are up to date.
 boolean ParallelReader.isCurrent()
Checks recursively if all subreaders are up to date.
 boolean FilterIndexReader.isCurrent()
static long IndexReader.lastModified(Directory directory2)
Deprecated. If you need to track commit time of an index, you can store it in the commit data (see IndexWriter.commit(Map)
 void IndexWriter.maybeMerge()
Expert: asks the mergePolicy whether any merges are necessary now and if so, runs the requested merges and then iterate (test again if merges are needed) until no more merges are returned by the mergePolicy.
abstract  void MergeScheduler.merge(IndexWriter writer)
Run the merges provided by IndexWriter.getNextMerge().
 void SerialMergeScheduler.merge(IndexWriter writer)
Just do the merges in sequence.
 void NoMergeScheduler.merge(IndexWriter writer)
 void IndexWriter.merge(MergePolicy.OneMerge merge)
Merges the indicated segments, replacing them in the stack with a single segment.
static IndexReader IndexReader.open(Directory directory)
Returns a IndexReader reading the index in the given Directory, with readOnly=true.
static IndexReader IndexReader.open(Directory directory, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(Directory) instead
static IndexReader IndexReader.open(Directory directory, IndexDeletionPolicy deletionPolicy, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(Directory) instead
static IndexReader IndexReader.open(Directory directory, IndexDeletionPolicy deletionPolicy, boolean readOnly, int termInfosIndexDivisor)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(Directory,int) instead
static IndexReader IndexReader.open(Directory directory, int termInfosIndexDivisor)
Expert: Returns a IndexReader reading the index in the given Director and given termInfosIndexDivisor
static IndexReader IndexReader.open(IndexCommit commit)
Expert: returns an IndexReader reading the index in the given IndexCommit.
static IndexReader IndexReader.open(IndexCommit commit, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(IndexCommit) instead
static IndexReader IndexReader.open(IndexCommit commit, IndexDeletionPolicy deletionPolicy, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(IndexCommit) instead
static IndexReader IndexReader.open(IndexCommit commit, IndexDeletionPolicy deletionPolicy, boolean readOnly, int termInfosIndexDivisor)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(IndexCommit,int) instead
static IndexReader IndexReader.open(IndexCommit commit, int termInfosIndexDivisor)
Expert: returns an IndexReader reading the index in the given IndexCommit and termInfosIndexDivisor.
static IndexReader IndexReader.open(IndexWriter writer, boolean applyAllDeletes)
Open a near real time IndexReader from the IndexWriter.
 void IndexWriter.optimize()
Deprecated.
 void IndexWriter.optimize(boolean doWait)
Deprecated.
 void IndexWriter.optimize(int maxNumSegments)
Deprecated.
 void IndexWriter.prepareCommit()
Expert: prepare for commit.
 void IndexWriter.prepareCommit(Map<String,String> commitUserData)
Expert: prepare for commit, specifying commitUserData Map (String -> String).
 void SegmentInfos.read(Directory directory)
This version of read uses the retry logic (for lock-less commits) to find the right segments file to load.
 void SegmentInfos.read(Directory directory, String segmentFileName)
Read a particular segmentFileName.
static long SegmentInfos.readCurrentVersion(Directory directory)
Deprecated. Load the SegmentInfos and then call SegmentInfos.getVersion().
 IndexReader IndexReader.reopen()
Deprecated. Use IndexReader.openIfChanged(IndexReader) instead
 IndexReader IndexReader.reopen(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.openIfChanged(IndexReader) instead
 IndexReader IndexReader.reopen(IndexCommit commit)
Deprecated. Use IndexReader.openIfChanged(IndexReader,IndexCommit) instead
 IndexReader IndexReader.reopen(IndexWriter writer, boolean applyAllDeletes)
Deprecated. Use IndexReader.openIfChanged(IndexReader,IndexWriter,boolean) instead
 Object SegmentInfos.FindSegmentsFile.run()
 Object SegmentInfos.FindSegmentsFile.run(IndexCommit commit)
 void IndexWriter.setMergeScheduler(MergeScheduler mergeScheduler)
Deprecated. use IndexWriterConfig.setMergeScheduler(MergeScheduler) instead
 void IndexReader.setNorm(int doc, String field, byte value)
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
 void IndexReader.setNorm(int doc, String field, float value)
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
 void IndexReader.undeleteAll()
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
 void IndexWriter.updateDocument(Term term, Document doc)
Updates a document by first deleting the document(s) containing term and then adding the new document.
 void IndexWriter.updateDocument(Term term, Document doc, Analyzer analyzer)
Updates a document by first deleting the document(s) containing term and then adding the new document.
 void IndexWriter.updateDocuments(Term delTerm, Collection<Document> docs)
Atomically deletes documents matching the provided delTerm and adds a block of documents with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
 void IndexWriter.updateDocuments(Term delTerm, Collection<Document> docs, Analyzer analyzer)
Atomically deletes documents matching the provided delTerm and adds a block of documents, analyzed using the provided analyzer, with sequentially assigned document IDs, such that an external reader will see all or none of the documents.

Constructors in org.apache.lucene.index that throw CorruptIndexException
IndexWriter(Directory d, Analyzer a, boolean create, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, boolean create, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl, IndexCommit commit)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, IndexWriterConfig conf)
Constructs a new IndexWriter per the settings given in conf.
PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir, IndexWriterConfig.OpenMode mode, Version matchVersion)
PersistentSnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting.

Uses of CorruptIndexException in org.apache.lucene.search

Methods in org.apache.lucene.search that throw CorruptIndexException
long | NRTManager.TrackingIndexWriter.addIndexes(Directory... dirs)
long | NRTManager.TrackingIndexWriter.addIndexes(IndexReader... readers)
Document | RemoteSearchable.doc(int i) Deprecated.
Document | IndexSearcher.doc(int docID)
abstract Document | Searcher.doc(int i) Deprecated.
Document | Searchable.doc(int i) Deprecated. Returns the stored fields of document i.
Document | MultiSearcher.doc(int n) Deprecated.
Document | RemoteSearchable.doc(int i, FieldSelector fieldSelector) Deprecated.
Document | IndexSearcher.doc(int docID, FieldSelector fieldSelector)
abstract Document | Searcher.doc(int docid, FieldSelector fieldSelector) Deprecated.
Document | Searchable.doc(int n, FieldSelector fieldSelector) Deprecated. Get the Document at the nth position.
Document | MultiSearcher.doc(int n, FieldSelector fieldSelector) Deprecated.

Constructors in org.apache.lucene.search that throw CorruptIndexException
IndexSearcher(Directory path)
Deprecated. use IndexSearcher.IndexSearcher(IndexReader) instead.
IndexSearcher(Directory path, boolean readOnly)
Deprecated. Use IndexSearcher.IndexSearcher(IndexReader) instead.

Uses of CorruptIndexException in org.apache.lucene.store.instantiated

Methods in org.apache.lucene.store.instantiated that throw CorruptIndexException
 Document InstantiatedIndexReader.document(int n, FieldSelector fieldSelector)
Deprecated. Return the Document at the nth position.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.FieldInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.FieldInfo

Packages that use FieldInfo
org.apache.lucene.index Code to maintain and access indices.

Uses of FieldInfo in org.apache.lucene.index

Methods in org.apache.lucene.index that return FieldInfo
FieldInfo | FieldInfos.add(FieldInfo fi)
FieldInfo | FieldInfos.add(String name, boolean isIndexed, boolean storeTermVector, boolean omitNorms, boolean storePayloads, FieldInfo.IndexOptions indexOptions) If the field is not yet known, adds it.
FieldInfo | FieldInfos.fieldInfo(int fieldNumber) Return the fieldinfo object referenced by the fieldNumber.
FieldInfo | FieldInfos.fieldInfo(String fieldName)

Methods in org.apache.lucene.index that return types with arguments of type FieldInfo
 Iterator<FieldInfo> FieldInfos.iterator()

Methods in org.apache.lucene.index with parameters of type FieldInfo
 FieldInfo FieldInfos.add(FieldInfo fi)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.FieldInfo.IndexOptions

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.FieldInfo.IndexOptions

Packages that use FieldInfo.IndexOptions
org.apache.lucene.document | The logical representation of a Document for indexing and searching.
org.apache.lucene.index | Code to maintain and access indices.

Uses of FieldInfo.IndexOptions in org.apache.lucene.document

Fields in org.apache.lucene.document declared as FieldInfo.IndexOptions
protected  FieldInfo.IndexOptions AbstractField.indexOptions

Methods in org.apache.lucene.document that return FieldInfo.IndexOptions
FieldInfo.IndexOptions | AbstractField.getIndexOptions()
FieldInfo.IndexOptions | Fieldable.getIndexOptions()

Methods in org.apache.lucene.document with parameters of type FieldInfo.IndexOptions
void | AbstractField.setIndexOptions(FieldInfo.IndexOptions indexOptions) Expert: If set, omit term freq, and optionally also positions and payloads from postings for this field.
void | Fieldable.setIndexOptions(FieldInfo.IndexOptions indexOptions) Expert: If set, omit term freq, and optionally positions and payloads from postings for this field.

Uses of FieldInfo.IndexOptions in org.apache.lucene.index

Fields in org.apache.lucene.index declared as FieldInfo.IndexOptions
 FieldInfo.IndexOptions FieldInfo.indexOptions

Methods in org.apache.lucene.index that return FieldInfo.IndexOptions
static FieldInfo.IndexOptions | FieldInfo.IndexOptions.valueOf(String name) Returns the enum constant of this type with the specified name.
static FieldInfo.IndexOptions[] | FieldInfo.IndexOptions.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.index with parameters of type FieldInfo.IndexOptions
 FieldInfo FieldInfos.add(String name, boolean isIndexed, boolean storeTermVector, boolean omitNorms, boolean storePayloads, FieldInfo.IndexOptions indexOptions)
If the field is not yet known, adds it.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.FieldInfos

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.FieldInfos

Packages that use FieldInfos
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.pruning | Static Index Pruning Tools
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.
org.apache.lucene.util | Some utility classes.

Uses of FieldInfos in org.apache.lucene.index

Fields in org.apache.lucene.index declared as FieldInfos
 FieldInfos SegmentWriteState.fieldInfos

Methods in org.apache.lucene.index that return FieldInfos
FieldInfos | PruningReader.getFieldInfos() Applies a StorePruningPolicy to the list of available field infos.
FieldInfos | SlowMultiReaderWrapper.getFieldInfos()
abstract FieldInfos | IndexReader.getFieldInfos() Get the FieldInfos describing all fields in this reader.
FieldInfos | MultiReader.getFieldInfos()
FieldInfos | SegmentReader.getFieldInfos()
FieldInfos | ParallelReader.getFieldInfos()
FieldInfos | FilterIndexReader.getFieldInfos()

Methods in org.apache.lucene.index with parameters of type FieldInfos
 void FieldInfos.add(FieldInfos other)

Constructors in org.apache.lucene.index with parameters of type FieldInfos
SegmentWriteState(PrintStream infoStream, Directory directory, String segmentName, FieldInfos fieldInfos, int numDocs, int termIndexInterval, org.apache.lucene.index.BufferedDeletes segDeletes)

Uses of FieldInfos in org.apache.lucene.index.pruning

Methods in org.apache.lucene.index.pruning that return FieldInfos
 FieldInfos StorePruningPolicy.getFieldInfos(FieldInfos allInfos)
Compute field infos that should be retained

Methods in org.apache.lucene.index.pruning with parameters of type FieldInfos
 FieldInfos StorePruningPolicy.getFieldInfos(FieldInfos allInfos)
Compute field infos that should be retained

Uses of FieldInfos in org.apache.lucene.store.instantiated

Methods in org.apache.lucene.store.instantiated that return FieldInfos
FieldInfos | InstantiatedIndex.getFieldInfos() Deprecated.
FieldInfos | InstantiatedIndexReader.getFieldInfos() Deprecated.

Uses of FieldInfos in org.apache.lucene.util

Methods in org.apache.lucene.util that return FieldInfos
static FieldInfos ReaderUtil.getMergedFieldInfos(IndexReader reader)
Call this to get the (merged) FieldInfos for a composite reader

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.FieldInvertState

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.FieldInvertState

Packages that use FieldInvertState
org.apache.lucene.misc | Miscellaneous index tools.
org.apache.lucene.search | Code to search indices.

Uses of FieldInvertState in org.apache.lucene.misc

Methods in org.apache.lucene.misc with parameters of type FieldInvertState
 float SweetSpotSimilarity.computeNorm(String fieldName, FieldInvertState state)
Implemented as state.getBoost() * lengthNorm(fieldName, numTokens) where numTokens does not count overlap tokens if discountOverlaps is true by default or true for this specific field.

Uses of FieldInvertState in org.apache.lucene.search

Methods in org.apache.lucene.search with parameters of type FieldInvertState
abstract  float Similarity.computeNorm(String field, FieldInvertState state)
Computes the normalization value for a field, given the accumulated state of term processing for this field (see FieldInvertState).
 float SimilarityDelegator.computeNorm(String fieldName, FieldInvertState state)
Deprecated.
 float DefaultSimilarity.computeNorm(String field, FieldInvertState state)
Implemented as state.getBoost()*lengthNorm(numTerms), where numTerms is getLength() if DefaultSimilarity.setDiscountOverlaps(boolean) is false, else it's getLength() - getNumOverlap().

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.FieldNormModifier

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.FieldNormModifier

No usage of org.apache.lucene.index.FieldNormModifier

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.FieldReaderException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.FieldReaderException

No usage of org.apache.lucene.index.FieldReaderException

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.FieldSortedTermVectorMapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.FieldSortedTermVectorMapper

No usage of org.apache.lucene.index.FieldSortedTermVectorMapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.FilterIndexReader.FilterTermDocs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.FilterIndexReader.FilterTermDocs

Packages that use FilterIndexReader.FilterTermDocs
org.apache.lucene.index Code to maintain and access indices.

Uses of FilterIndexReader.FilterTermDocs in org.apache.lucene.index

Subclasses of FilterIndexReader.FilterTermDocs in org.apache.lucene.index
static class FilterIndexReader.FilterTermPositions
Base class for filtering TermPositions implementations.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.FilterIndexReader.FilterTermEnum

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.FilterIndexReader.FilterTermEnum

No usage of org.apache.lucene.index.FilterIndexReader.FilterTermEnum

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.FilterIndexReader.FilterTermPositions

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.FilterIndexReader.FilterTermPositions

No usage of org.apache.lucene.index.FilterIndexReader.FilterTermPositions

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.FilterIndexReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.FilterIndexReader

Packages that use FilterIndexReader
org.apache.lucene.index Code to maintain and access indices.

Uses of FilterIndexReader in org.apache.lucene.index

Subclasses of FilterIndexReader in org.apache.lucene.index
 class PruningReader
This class produces a subset of the input index, by removing some postings data according to rules implemented in a TermPruningPolicy, and optionally it can also remove stored fields of documents according to rules implemented in a StorePruningPolicy.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.IndexCommit

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.IndexCommit

Packages that use IndexCommit
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.index | Code to maintain and access indices.

Uses of IndexCommit in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks that return IndexCommit
static IndexCommit OpenReaderTask.findIndexCommit(Directory dir, String userData)

Methods in org.apache.lucene.benchmark.byTask.tasks with parameters of type IndexCommit
static IndexWriter | CreateIndexTask.configureWriter(Config config, PerfRunData runData, IndexWriterConfig.OpenMode mode, IndexCommit commit)
static IndexWriterConfig | CreateIndexTask.createWriterConfig(Config config, PerfRunData runData, IndexWriterConfig.OpenMode mode, IndexCommit commit)

Uses of IndexCommit in org.apache.lucene.index

Subclasses of IndexCommit in org.apache.lucene.index
protected  class SnapshotDeletionPolicy.SnapshotCommitPoint

Fields in org.apache.lucene.index declared as IndexCommit
protected IndexCommit | SnapshotDeletionPolicy.SnapshotCommitPoint.cp
protected IndexCommit | SnapshotDeletionPolicy.lastCommit

Methods in org.apache.lucene.index that return IndexCommit
 IndexCommit IndexReader.getIndexCommit()
Expert: return the IndexCommit that this reader has opened.
 IndexCommit IndexWriterConfig.getIndexCommit()
Returns the IndexCommit as specified in IndexWriterConfig.setIndexCommit(IndexCommit) or the default, null which specifies to open the latest index commit point.
 IndexCommit FilterIndexReader.getIndexCommit()
 IndexCommit SnapshotDeletionPolicy.getSnapshot(String id)
Get a snapshotted IndexCommit by ID.
 IndexCommit SnapshotDeletionPolicy.snapshot(String id)
Snapshots the last commit.
 IndexCommit PersistentSnapshotDeletionPolicy.snapshot(String id)
Snapshots the last commit using the given ID.

Methods in org.apache.lucene.index that return types with arguments of type IndexCommit
static Collection<IndexCommit> | IndexReader.listCommits(Directory dir) Returns all commit points that exist in the Directory.
protected List<IndexCommit> | SnapshotDeletionPolicy.wrapCommits(List<? extends IndexCommit> commits)

Methods in org.apache.lucene.index with parameters of type IndexCommit
 int IndexCommit.compareTo(IndexCommit commit)
protected  IndexReader IndexReader.doOpenIfChanged(IndexCommit commit)
If the index has changed since it was opened, open and return a new reader; else, return null.
static IndexReader IndexReader.open(IndexCommit commit)
Expert: returns an IndexReader reading the index in the given IndexCommit.
static IndexReader IndexReader.open(IndexCommit commit, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(IndexCommit) instead
static IndexReader IndexReader.open(IndexCommit commit, IndexDeletionPolicy deletionPolicy, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(IndexCommit) instead
static IndexReader IndexReader.open(IndexCommit commit, IndexDeletionPolicy deletionPolicy, boolean readOnly, int termInfosIndexDivisor)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(IndexCommit,int) instead
static IndexReader IndexReader.open(IndexCommit commit, int termInfosIndexDivisor)
Expert: returns an IndexReader reading the index in the given IndexCommit and termInfosIndexDivisor.
static IndexReader IndexReader.openIfChanged(IndexReader oldReader, IndexCommit commit)
If the IndexCommit differs from what the provided reader is searching, or the provided reader is not already read-only, open and return a new readOnly=true reader; else, return null.
protected  void SnapshotDeletionPolicy.registerSnapshotInfo(String id, String segment, IndexCommit commit)
Registers the given snapshot information.
 IndexReader IndexReader.reopen(IndexCommit commit)
Deprecated. Use IndexReader.openIfChanged(IndexReader,IndexCommit) instead
 Object SegmentInfos.FindSegmentsFile.run(IndexCommit commit)
 IndexWriterConfig IndexWriterConfig.setIndexCommit(IndexCommit commit)
Expert: allows to open a certain commit point.

Method parameters in org.apache.lucene.index with type arguments of type IndexCommit
void | IndexDeletionPolicy.onCommit(List<? extends IndexCommit> commits) This is called each time the writer completed a commit.
void | SnapshotDeletionPolicy.onCommit(List<? extends IndexCommit> commits)
void | KeepOnlyLastCommitDeletionPolicy.onCommit(List<? extends IndexCommit> commits) Deletes all commits except the most recent one.
void | NoDeletionPolicy.onCommit(List<? extends IndexCommit> commits)
void | IndexDeletionPolicy.onInit(List<? extends IndexCommit> commits) This is called once when a writer is first instantiated to give the policy a chance to remove old commit points.
void | SnapshotDeletionPolicy.onInit(List<? extends IndexCommit> commits)
void | PersistentSnapshotDeletionPolicy.onInit(List<? extends IndexCommit> commits)
void | KeepOnlyLastCommitDeletionPolicy.onInit(List<? extends IndexCommit> commits) Deletes all commits except the most recent one.
void | NoDeletionPolicy.onInit(List<? extends IndexCommit> commits)
protected List<IndexCommit> | SnapshotDeletionPolicy.wrapCommits(List<? extends IndexCommit> commits)

Constructors in org.apache.lucene.index with parameters of type IndexCommit
IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl, IndexCommit commit)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
SnapshotDeletionPolicy.SnapshotCommitPoint(IndexCommit cp)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.index.IndexDeletionPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.index.IndexDeletionPolicy

Packages that use IndexDeletionPolicy
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.index | Code to maintain and access indices.

Uses of IndexDeletionPolicy in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks that return IndexDeletionPolicy
static IndexDeletionPolicy CreateIndexTask.getIndexDeletionPolicy(Config config)

Uses of IndexDeletionPolicy in org.apache.lucene.index

Classes in org.apache.lucene.index that implement IndexDeletionPolicy
class | KeepOnlyLastCommitDeletionPolicy This IndexDeletionPolicy implementation that keeps only the most recent commit and immediately removes all prior commits after a new commit is done.
class | NoDeletionPolicy An IndexDeletionPolicy which keeps all index commits around, never deleting them.
class | PersistentSnapshotDeletionPolicy A SnapshotDeletionPolicy which adds a persistence layer so that snapshots can be maintained across the life of an application.
class | SnapshotDeletionPolicy An IndexDeletionPolicy that wraps around any other IndexDeletionPolicy and adds the ability to hold and later release snapshots of an index.

Fields in org.apache.lucene.index declared as IndexDeletionPolicy
static IndexDeletionPolicy NoDeletionPolicy.INSTANCE
The single instance of this class.

Methods in org.apache.lucene.index that return IndexDeletionPolicy
 IndexDeletionPolicy IndexWriterConfig.getIndexDeletionPolicy()
Returns the IndexDeletionPolicy specified in IndexWriterConfig.setIndexDeletionPolicy(IndexDeletionPolicy) or the default KeepOnlyLastCommitDeletionPolicy/

Methods in org.apache.lucene.index with parameters of type IndexDeletionPolicy
static IndexReader IndexReader.open(Directory directory, IndexDeletionPolicy deletionPolicy, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(Directory) instead
static IndexReader IndexReader.open(Directory directory, IndexDeletionPolicy deletionPolicy, boolean readOnly, int termInfosIndexDivisor)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(Directory,int) instead
static IndexReader IndexReader.open(IndexCommit commit, IndexDeletionPolicy deletionPolicy, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(IndexCommit) instead
static IndexReader IndexReader.open(IndexCommit commit, IndexDeletionPolicy deletionPolicy, boolean readOnly, int termInfosIndexDivisor)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(IndexCommit,int) instead
 IndexWriterConfig IndexWriterConfig.setIndexDeletionPolicy(IndexDeletionPolicy delPolicy)
Expert: allows an optional IndexDeletionPolicy implementation to be specified.

Constructors in org.apache.lucene.index with parameters of type IndexDeletionPolicy
IndexWriter(Directory d, Analyzer a, boolean create, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl, IndexCommit commit)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir, IndexWriterConfig.OpenMode mode, Version matchVersion)
PersistentSnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting.
SnapshotDeletionPolicy(IndexDeletionPolicy primary)
SnapshotDeletionPolicy(IndexDeletionPolicy primary, Map<String,String> snapshotsInfo)
SnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.IndexFileNameFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.IndexFileNameFilter

Packages that use IndexFileNameFilter
org.apache.lucene.index Code to maintain and access indices.

Uses of IndexFileNameFilter in org.apache.lucene.index

Methods in org.apache.lucene.index that return IndexFileNameFilter
static IndexFileNameFilter IndexFileNameFilter.getFilter()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.IndexFileNames

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.IndexFileNames

No usage of org.apache.lucene.index.IndexFileNames

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.IndexFormatTooNewException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.IndexFormatTooNewException

No usage of org.apache.lucene.index.IndexFormatTooNewException

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.IndexFormatTooOldException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.IndexFormatTooOldException

No usage of org.apache.lucene.index.IndexFormatTooOldException

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.IndexNotFoundException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.IndexNotFoundException

No usage of org.apache.lucene.index.IndexNotFoundException

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.IndexReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.IndexReader

Packages that use IndexReader
org.apache.lucene.analysis.query | Automatically filter high-frequency stopwords.
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.search.aggregator.association | Association-based aggregators.
org.apache.lucene.facet.search.cache | Caching to speed up facets accumulation.
org.apache.lucene.facet.search.params | Parameters for Faceted Search
org.apache.lucene.facet.search.params.association | Association-based Parameters for Faceted Search.
org.apache.lucene.facet.search.sampling | Sampling for facets accumulation
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.facet.util | Various utilities for faceted search
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.pruning | Static Index Pruning Tools
org.apache.lucene.misc | Miscellaneous index tools.
org.apache.lucene.queryParser.surround.query | This package contains SrndQuery and its subclasses.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.function | Programmatic control over documents scores.
org.apache.lucene.search.grouping | This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.search.join | This modules support index-time and query-time joins.
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.regex | Regular expression Query.
org.apache.lucene.search.similar | Document similarity query generators.
org.apache.lucene.search.spans | The calculus of spans.
org.apache.lucene.search.spell | Suggest alternate spellings for words.
org.apache.lucene.search.vectorhighlight | This is an another highlighter implementation.
org.apache.lucene.spatial.geohash | Support for Geohash encoding, decoding, and filtering.
org.apache.lucene.spatial.tier | Support for filtering based upon geographic location.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.
org.apache.lucene.util | Some utility classes.

Uses of IndexReader in org.apache.lucene.analysis.query

Methods in org.apache.lucene.analysis.query with parameters of type IndexReader
 int QueryAutoStopWordAnalyzer.addStopWords(IndexReader reader)
Deprecated. Stopwords should be calculated at instantiation using QueryAutoStopWordAnalyzer.QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader)
 int QueryAutoStopWordAnalyzer.addStopWords(IndexReader reader, float maxPercentDocs)
Deprecated. Stowords should be calculated at instantiation using QueryAutoStopWordAnalyzer.QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, float)
 int QueryAutoStopWordAnalyzer.addStopWords(IndexReader reader, int maxDocFreq)
Deprecated. Stopwords should be calculated at instantiation using QueryAutoStopWordAnalyzer.QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, int)
 int QueryAutoStopWordAnalyzer.addStopWords(IndexReader reader, String fieldName, float maxPercentDocs)
Deprecated. Stowords should be calculated at instantiation using QueryAutoStopWordAnalyzer.QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, Collection, float)
 int QueryAutoStopWordAnalyzer.addStopWords(IndexReader reader, String fieldName, int maxDocFreq)
Deprecated. Stowords should be calculated at instantiation using QueryAutoStopWordAnalyzer.QueryAutoStopWordAnalyzer(Version, Analyzer, IndexReader, Collection, int)

Constructors in org.apache.lucene.analysis.query with parameters of type IndexReader
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency percentage greater than QueryAutoStopWordAnalyzer.defaultMaxDocFreqPercent
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, Collection<String> fields, float maxPercentDocs)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for the given selection of fields from terms with a document frequency percentage greater than the given maxPercentDocs
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, Collection<String> fields, int maxDocFreq)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for the given selection of fields from terms with a document frequency greater than the given maxDocFreq
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, float maxPercentDocs)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency percentage greater than the given maxPercentDocs
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, int maxDocFreq)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency greater than the given maxDocFreq

Uses of IndexReader in org.apache.lucene.benchmark.byTask

Methods in org.apache.lucene.benchmark.byTask that return IndexReader
 IndexReader PerfRunData.getIndexReader()

Methods in org.apache.lucene.benchmark.byTask with parameters of type IndexReader
 void PerfRunData.setIndexReader(IndexReader indexReader)
Set the index reader.

Uses of IndexReader in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks with parameters of type IndexReader
abstract int | BenchmarkHighlighter.doHighlight(IndexReader reader, int doc, String field, Document document, Analyzer analyzer, String text)
protected Document | SearchTravRetLoadFieldSelectorTask.retrieveDoc(IndexReader ir, int id)
protected Document | ReadTask.retrieveDoc(IndexReader ir, int id)

Uses of IndexReader in org.apache.lucene.facet.enhancements

Constructors in org.apache.lucene.facet.enhancements with parameters of type IndexReader
EnhancementsPayloadIterator(List<CategoryEnhancement> enhancementsList, IndexReader indexReader, Term term)
Constructor.

Uses of IndexReader in org.apache.lucene.facet.enhancements.association

Constructors in org.apache.lucene.facet.enhancements.association with parameters of type IndexReader
AssociationsPayloadIterator(IndexReader reader, String field)
Construct a new association-iterator, initializing the inner payload iterator, with the supplied term and checking whether there are any associations within the given index

Uses of IndexReader in org.apache.lucene.facet.index

Methods in org.apache.lucene.facet.index with parameters of type IndexReader
 PayloadProcessorProvider.ReaderPayloadProcessor FacetsPayloadProcessorProvider.getReaderProcessor(IndexReader reader)

Uses of IndexReader in org.apache.lucene.facet.index.params

Methods in org.apache.lucene.facet.index.params with parameters of type IndexReader
 CategoryListIterator CategoryListParams.createCategoryListIterator(IndexReader reader, int partition)
Create the category list iterator for the specified partition.

Uses of IndexReader in org.apache.lucene.facet.search

Fields in org.apache.lucene.facet.search declared as IndexReader
protected  IndexReader FacetsAccumulator.indexReader

Methods in org.apache.lucene.facet.search with parameters of type IndexReader
 TotalFacetCounts TotalFacetCountsCache.getTotalCounts(IndexReader indexReader, TaxonomyReader taxonomy, FacetIndexingParams facetIndexingParams, CategoryListCache clCache)
Get the total facet counts for a reader/taxonomy pair and facet indexing parameters.
protected  FacetsAccumulator FacetsCollector.initFacetsAccumulator(FacetSearchParams facetSearchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Create the FacetsAccumulator to be used.
protected  ScoredDocIdCollector FacetsCollector.initScoredDocCollector(FacetSearchParams facetSearchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Create a ScoredDocIdCollector to be used as the first phase of the facet collection.
 void TotalFacetCountsCache.load(File inputFile, IndexReader indexReader, TaxonomyReader taxonomy, FacetIndexingParams facetIndexingParams)
Load TotalFacetCounts matching input parameters from the provided outputFile and add them into the cache for the provided indexReader, taxonomy, and facetIndexingParams.
 void FacetsCollector.setNextReader(IndexReader reader, int docBase)
 void ScoredDocIdCollector.setNextReader(IndexReader reader, int base)
 void TotalFacetCountsCache.store(File outputFile, IndexReader indexReader, TaxonomyReader taxonomy, FacetIndexingParams facetIndexingParams, CategoryListCache clCache)
Store the TotalFacetCounts matching input parameters into the provided outputFile, making them available for a later call to TotalFacetCountsCache.load(File, IndexReader, TaxonomyReader, FacetIndexingParams).

Constructors in org.apache.lucene.facet.search with parameters of type IndexReader
AdaptiveFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Create an AdaptiveFacetsAccumulator
AdaptiveFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Create an AdaptiveFacetsAccumulator
FacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
FacetsCollector(FacetSearchParams facetSearchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Create a collector for accumulating facets while collecting documents during search.
PayloadIntDecodingIterator(IndexReader indexReader, Term term, IntDecoder decoder)
PayloadIntDecodingIterator(IndexReader indexReader, Term term, IntDecoder decoder, byte[] buffer)
PayloadIterator(IndexReader indexReader, Term term)
PayloadIterator(IndexReader indexReader, Term term, byte[] buffer)
StandardFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
StandardFacetsAccumulator(FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)

Uses of IndexReader in org.apache.lucene.facet.search.aggregator.association

Constructors in org.apache.lucene.facet.search.aggregator.association with parameters of type IndexReader
AssociationFloatSumAggregator(IndexReader reader, float[] sumArray)
AssociationFloatSumAggregator(String field, IndexReader reader, float[] sumArray)
AssociationIntSumAggregator(IndexReader reader, int[] sumArray)
AssociationIntSumAggregator(String field, IndexReader reader, int[] sumArray)

Uses of IndexReader in org.apache.lucene.facet.search.cache

Methods in org.apache.lucene.facet.search.cache with parameters of type IndexReader
 void CategoryListCache.loadAndRegister(CategoryListParams clp, IndexReader reader, TaxonomyReader taxo, FacetIndexingParams iparams)
Load and register CategoryListData.

Uses of IndexReader in org.apache.lucene.facet.search.params

Methods in org.apache.lucene.facet.search.params with parameters of type IndexReader
Aggregator | CountFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)
abstract Aggregator | FacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader indexReader, TaxonomyReader taxonomy) Create an aggregator for this facet request.
Aggregator | ScoreFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)
CategoryListIterator | FacetRequest.createCategoryListIterator(IndexReader reader, TaxonomyReader taxo, FacetSearchParams sParams, int partition) Create the category list iterator for the specified partition.

Uses of IndexReader in org.apache.lucene.facet.search.params.association

Methods in org.apache.lucene.facet.search.params.association with parameters of type IndexReader
Aggregator | AssociationFloatSumFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)
Aggregator | AssociationIntSumFacetRequest.createAggregator(boolean useComplements, FacetArrays arrays, IndexReader reader, TaxonomyReader taxonomy)

Uses of IndexReader in org.apache.lucene.facet.search.sampling

Methods in org.apache.lucene.facet.search.sampling with parameters of type IndexReader
 SampleFixer Sampler.getSampleFixer(IndexReader indexReader, TaxonomyReader taxonomyReader, FacetSearchParams searchParams)
Get a fixer of sample facet accumulation results.

Constructors in org.apache.lucene.facet.search.sampling with parameters of type IndexReader
SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader)
Constructor...
SamplingAccumulator(Sampler sampler, FacetSearchParams searchParams, IndexReader indexReader, TaxonomyReader taxonomyReader, IntArrayAllocator intArrayAllocator, FloatArrayAllocator floatArrayAllocator)
Constructor...

Uses of IndexReader in org.apache.lucene.facet.taxonomy.directory

Methods in org.apache.lucene.facet.taxonomy.directory that return IndexReader
protected  IndexReader DirectoryTaxonomyReader.openIndexReader(Directory directory)
protected  IndexReader DirectoryTaxonomyWriter.openReader()
Open an IndexReader from the internal IndexWriter, by calling open(IndexWriter, boolean).

Uses of IndexReader in org.apache.lucene.facet.util

Methods in org.apache.lucene.facet.util with parameters of type IndexReader
static ScoredDocIDs | ScoredDocIdsUtils.createAllDocsScoredDocIDs(IndexReader reader) Creates a ScoredDocIDs which returns document IDs all non-deleted doc ids according to the given reader.
static ScoredDocIDs | ScoredDocIdsUtils.getComplementSet(ScoredDocIDs docids, IndexReader reader) Create a complement of the input set.

Uses of IndexReader in org.apache.lucene.index

Subclasses of IndexReader in org.apache.lucene.index
class | FilterIndexReader A FilterIndexReader contains another IndexReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.
class | MultiReader An IndexReader which reads multiple indexes, appending their content.
class | ParallelReader An IndexReader which reads multiple, parallel indexes.
class | PruningReader This class produces a subset of the input index, by removing some postings data according to rules implemented in a TermPruningPolicy, and optionally it can also remove stored fields of documents according to rules implemented in a StorePruningPolicy.
class | SegmentReader IndexReader implementation over a single segment.
class | SlowMultiReaderWrapper Acts like Lucene 4.x's SlowMultiReaderWrapper for testing of top-level MultiTermEnum, MultiTermDocs, ...

Fields in org.apache.lucene.index declared as IndexReader
protected IndexReader | FilterIndexReader.in
protected IndexReader[] | MultiReader.subReaders

Methods in org.apache.lucene.index that return IndexReader
 IndexReader IndexReader.clone(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use clone() instead.
 IndexReader MultiReader.clone(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use MultiReader.clone() instead.
 IndexReader SegmentReader.clone(boolean openReadOnly)
Deprecated.
 IndexReader ParallelReader.clone(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use ParallelReader.clone() instead.
protected  IndexReader IndexReader.doOpenIfChanged()
If the index has changed since it was opened, open and return a new reader; else, return null.
protected  IndexReader MultiReader.doOpenIfChanged()
protected  IndexReader SegmentReader.doOpenIfChanged()
protected  IndexReader ParallelReader.doOpenIfChanged()
protected  IndexReader IndexReader.doOpenIfChanged(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use doOpenIfChanged() instead
protected  IndexReader MultiReader.doOpenIfChanged(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use MultiReader.doOpenIfChanged() instead.
protected  IndexReader SegmentReader.doOpenIfChanged(boolean openReadOnly)
Deprecated.
protected  IndexReader ParallelReader.doOpenIfChanged(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use ParallelReader.doOpenIfChanged() instead.
protected  IndexReader IndexReader.doOpenIfChanged(IndexCommit commit)
If the index has changed since it was opened, open and return a new reader; else, return null.
protected  IndexReader IndexReader.doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes)
If the index has changed since it was opened, open and return a new reader; else, return null.
 IndexReader RandomIndexWriter.getReader()
 IndexReader IndexWriter.getReader()
Deprecated. Please use open(IndexWriter,boolean) instead.
 IndexReader RandomIndexWriter.getReader(boolean applyDeletions)
 IndexReader IndexWriter.getReader(int termInfosIndexDivisor)
Deprecated. Please use open(IndexWriter,boolean) instead. Furthermore, this method cannot guarantee the reader (and its sub-readers) will be opened with the termInfosIndexDivisor setting because some of them may have already been opened according to IndexWriterConfig.setReaderTermsIndexDivisor(int). You should set the requested termInfosIndexDivisor through IndexWriterConfig.setReaderTermsIndexDivisor(int) and use IndexWriter.getReader().
 IndexReader[] PruningReader.getSequentialSubReaders()
 IndexReader[] SlowMultiReaderWrapper.getSequentialSubReaders()
 IndexReader[] IndexReader.getSequentialSubReaders()
Expert: returns the sequential sub readers that this reader is logically composed of.
 IndexReader[] MultiReader.getSequentialSubReaders()
 IndexReader[] FilterIndexReader.getSequentialSubReaders()
static IndexReader IndexReader.open(Directory directory)
Returns a IndexReader reading the index in the given Directory, with readOnly=true.
static IndexReader IndexReader.open(Directory directory, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use open(Directory) instead
static IndexReader IndexReader.open(Directory directory, IndexDeletionPolicy deletionPolicy, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use open(Directory) instead
static IndexReader IndexReader.open(Directory directory, IndexDeletionPolicy deletionPolicy, boolean readOnly, int termInfosIndexDivisor)
Deprecated. Write support will be removed in Lucene 4.0. Use open(Directory,int) instead
static IndexReader IndexReader.open(Directory directory, int termInfosIndexDivisor)
Expert: Returns a IndexReader reading the index in the given Director and given termInfosIndexDivisor
static IndexReader IndexReader.open(IndexCommit commit)
Expert: returns an IndexReader reading the index in the given IndexCommit.
static IndexReader IndexReader.open(IndexCommit commit, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use open(IndexCommit) instead
static IndexReader IndexReader.open(IndexCommit commit, IndexDeletionPolicy deletionPolicy, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use open(IndexCommit) instead
static IndexReader IndexReader.open(IndexCommit commit, IndexDeletionPolicy deletionPolicy, boolean readOnly, int termInfosIndexDivisor)
Deprecated. Write support will be removed in Lucene 4.0. Use open(IndexCommit,int) instead
static IndexReader IndexReader.open(IndexCommit commit, int termInfosIndexDivisor)
Expert: returns an IndexReader reading the index in the given IndexCommit and termInfosIndexDivisor.
static IndexReader IndexReader.open(IndexWriter writer, boolean applyAllDeletes)
Open a near real time IndexReader from the IndexWriter.
static IndexReader IndexReader.openIfChanged(IndexReader oldReader)
If the index has changed since the provided reader was opened, open and return a new reader; else, return null.
static IndexReader IndexReader.openIfChanged(IndexReader oldReader, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use openIfChanged(IndexReader) instead
static IndexReader IndexReader.openIfChanged(IndexReader oldReader, IndexCommit commit)
If the IndexCommit differs from what the provided reader is searching, or the provided reader is not already read-only, open and return a new readOnly=true reader; else, return null.
static IndexReader IndexReader.openIfChanged(IndexReader oldReader, IndexWriter writer, boolean applyAllDeletes)
Expert: If there changes (committed or not) in the IndexWriter versus what the provided reader is searching, then open and return a new read-only IndexReader searching both committed and uncommitted changes from the writer; else, return null (though, the current implementation never returns null).
 IndexReader IndexReader.reopen()
Deprecated. Use openIfChanged(IndexReader) instead
 IndexReader IndexReader.reopen(boolean openReadOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use openIfChanged(IndexReader) instead
 IndexReader IndexReader.reopen(IndexCommit commit)
Deprecated. Use openIfChanged(IndexReader,IndexCommit) instead
 IndexReader IndexReader.reopen(IndexWriter writer, boolean applyAllDeletes)
Deprecated. Use openIfChanged(IndexReader,IndexWriter,boolean) instead

Methods in org.apache.lucene.index with parameters of type IndexReader
 void TermVectorAccessor.accept(IndexReader indexReader, int documentNumber, String fieldName, TermVectorMapper mapper)
Visits the TermVectorMapper and populates it with terms available for a given document, either via a vector created at index time or by resolving them from the inverted index.
 void ParallelReader.add(IndexReader reader)
Add an IndexReader.
 void ParallelReader.add(IndexReader reader, boolean ignoreStoredFields)
Add an IndexReader whose stored fields will not be returned.
 void RandomIndexWriter.addIndexes(IndexReader... readers)
 void IndexWriter.addIndexes(IndexReader... readers)
Merges the provided indexes into this index.
 PayloadProcessorProvider.ReaderPayloadProcessor PayloadProcessorProvider.getReaderProcessor(IndexReader reader)
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for the given Directory, through which PayloadProcessorProvider.ReaderPayloadProcessors can be obtained for each Term, or null if none should be used.
 void IndexReader.ReaderClosedListener.onClose(IndexReader reader)
static IndexReader IndexReader.openIfChanged(IndexReader oldReader)
If the index has changed since the provided reader was opened, open and return a new reader; else, return null.
static IndexReader IndexReader.openIfChanged(IndexReader oldReader, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use openIfChanged(IndexReader) instead
static IndexReader IndexReader.openIfChanged(IndexReader oldReader, IndexCommit commit)
If the IndexCommit differs from what the provided reader is searching, or the provided reader is not already read-only, open and return a new readOnly=true reader; else, return null.
static IndexReader IndexReader.openIfChanged(IndexReader oldReader, IndexWriter writer, boolean applyAllDeletes)
Expert: If there changes (committed or not) in the IndexWriter versus what the provided reader is searching, then open and return a new read-only IndexReader searching both committed and uncommitted changes from the writer; else, return null (though, the current implementation never returns null).
 void MultiPassIndexSplitter.split(IndexReader input, Directory[] outputs, boolean seq)
Deprecated. use MultiPassIndexSplitter.split(Version, IndexReader, Directory[], boolean) instead. This method will be removed in Lucene 4.0.
 void MultiPassIndexSplitter.split(Version version, IndexReader input, Directory[] outputs, boolean seq)
Split source index into multiple parts.
abstract  void IndexWriter.IndexReaderWarmer.warm(IndexReader reader)

Constructors in org.apache.lucene.index with parameters of type IndexReader
FilterIndexReader(IndexReader in)
Construct a FilterIndexReader based on the specified base reader.
MultipleTermPositions(IndexReader indexReader, Term[] terms)
Creates a new MultipleTermPositions instance.
MultiReader(IndexReader... subReaders)
Construct a MultiReader aggregating the named set of (sub)readers.
MultiReader(IndexReader[] subReaders, boolean closeSubReaders)
Construct a MultiReader aggregating the named set of (sub)readers.
PruningReader(IndexReader in, StorePruningPolicy storePolicy, TermPruningPolicy termPolicy)
Constructor.
SlowMultiReaderWrapper(IndexReader reader)

Uses of IndexReader in org.apache.lucene.index.pruning

Fields in org.apache.lucene.index.pruning declared as IndexReader
protected IndexReader | StorePruningPolicy.in
protected IndexReader | TermPruningPolicy.in

Constructors in org.apache.lucene.index.pruning with parameters of type IndexReader
CarmelTopKTermPruningPolicy(IndexReader in, Map<String,Integer> fieldFlags)
Constructor with default parameters
CarmelTopKTermPruningPolicy(IndexReader in, Map<String,Integer> fieldFlags, int k, float epsilon, int r, Similarity sim)
Constructor with specific settings
CarmelUniformTermPruningPolicy(IndexReader in, Map<String,Integer> fieldFlags, Map<String,Float> thresholds, float defThreshold, Similarity sim)
RIDFTermPruningPolicy(IndexReader in, Map<String,Integer> fieldFlags, Map<String,Double> thresholds, double defThreshold)
StorePruningPolicy(IndexReader in, Map<String,Integer> fieldFlags)
Constructs a policy.
TermPruningPolicy(IndexReader in, Map<String,Integer> fieldFlags)
Construct a policy.
TFTermPruningPolicy(IndexReader in, Map<String,Integer> fieldFlags, Map<String,Integer> thresholds, int defThreshold)

Uses of IndexReader in org.apache.lucene.misc

Methods in org.apache.lucene.misc with parameters of type IndexReader
static org.apache.lucene.misc.TermStats[] | HighFreqTerms.getHighFreqTerms(IndexReader reader, int numTerms, String field)
static long | HighFreqTerms.getTotalTermFreq(IndexReader reader, Term term)
static org.apache.lucene.misc.TermStats[] | HighFreqTerms.sortByTotalTermFreq(IndexReader reader, org.apache.lucene.misc.TermStats[] terms) Takes array of TermStats.

Uses of IndexReader in org.apache.lucene.queryParser.surround.query

Methods in org.apache.lucene.queryParser.surround.query that return IndexReader
 IndexReader SpanNearClauseFactory.getIndexReader()

Methods in org.apache.lucene.queryParser.surround.query with parameters of type IndexReader
Query | DistanceQuery.getSpanNearQuery(IndexReader reader, String fieldName, float boost, BasicQueryFactory qf)
void | SrndTermQuery.visitMatchingTerms(IndexReader reader, String fieldName, SimpleTerm.MatchingTermVisitor mtv)
void | SrndPrefixQuery.visitMatchingTerms(IndexReader reader, String fieldName, SimpleTerm.MatchingTermVisitor mtv)
abstract void | SimpleTerm.visitMatchingTerms(IndexReader reader, String fieldName, SimpleTerm.MatchingTermVisitor mtv)
void | SrndTruncQuery.visitMatchingTerms(IndexReader reader, String fieldName, SimpleTerm.MatchingTermVisitor mtv)

Constructors in org.apache.lucene.queryParser.surround.query with parameters of type IndexReader
SpanNearClauseFactory(IndexReader reader, String fieldName, BasicQueryFactory qf)

Uses of IndexReader in org.apache.lucene.search

Fields in org.apache.lucene.search declared as IndexReader
protected static IndexReader | SearchEquivalenceTestBase.reader
protected IndexReader | FieldCacheDocIdSet.reader
protected IndexReader[] | IndexSearcher.subReaders

Methods in org.apache.lucene.search that return IndexReader
IndexReader | IndexSearcher.getIndexReader() Return the IndexReader this searches.
IndexReader[] | IndexSearcher.getSubReaders() Returns the atomic subReaders used by this searcher.

Methods in org.apache.lucene.search with parameters of type IndexReader
 long NRTManager.TrackingIndexWriter.addIndexes(IndexReader... readers)
 SpanFilterResult SpanQueryFilter.bitSpans(IndexReader reader)
 SpanFilterResult CachingSpanFilter.bitSpans(IndexReader reader)
abstract  SpanFilterResult SpanFilter.bitSpans(IndexReader reader)
Returns a SpanFilterResult with true for documents which should be permitted in search results, and false for those that should not and Spans for where the true docs match.
protected  DocIdSet CachingWrapperFilter.docIdSetToCache(DocIdSet docIdSet, IndexReader reader)
Provide the DocIdSet to be cached, using the DocIdSet provided by the wrapped Filter.
 Explanation DisjunctionMaxQuery.DisjunctionMaxWeight.explain(IndexReader reader, int doc)
Explain the score we computed for doc
abstract  Explanation Weight.explain(IndexReader reader, int doc)
An explanation of the score computation for the named document.
 Explanation ConstantScoreQuery.ConstantWeight.explain(IndexReader reader, int doc)
 Explanation BooleanQuery.BooleanWeight.explain(IndexReader reader, int doc)
protected  void IndexSearcher.gatherSubReaders(List<IndexReader> allSubReaders, IndexReader r)
 byte[] FieldCache.getBytes(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as a single byte and returns an array of size reader.maxDoc() of the value each document has in the given field.
 byte[] FieldCache.getBytes(IndexReader reader, String field, FieldCache.ByteParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as bytes and returns an array of size reader.maxDoc() of the value each document has in the given field.
 byte[] FieldCache.getBytes(IndexReader reader, String field, FieldCache.ByteParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as bytes and returns an array of size reader.maxDoc() of the value each document has in the given field.
 DocIdSet RemoteCachingWrapperFilter.getDocIdSet(IndexReader reader)
Deprecated. Uses the FilterManager to keep the cache for a filter on the searcher side of a remote connection.
 DocIdSet ChainedFilter.getDocIdSet(IndexReader reader)
Filter.getDocIdSet(org.apache.lucene.index.IndexReader).
 DocIdSet BooleanFilter.getDocIdSet(IndexReader reader)
Returns the a DocIdSetIterator representing the Boolean composition of the filters that have been added.
 DocIdSet TermsFilter.getDocIdSet(IndexReader reader)
 DocIdSet DuplicateFilter.getDocIdSet(IndexReader reader)
 DocIdSet CachingWrapperFilterHelper.getDocIdSet(IndexReader reader)
 DocIdSet SpanQueryFilter.getDocIdSet(IndexReader reader)
 DocIdSet FieldCacheTermsFilter.getDocIdSet(IndexReader reader)
abstract  DocIdSet FieldCacheRangeFilter.getDocIdSet(IndexReader reader)
This method is implemented for each data type
 DocIdSet CachingWrapperFilter.getDocIdSet(IndexReader reader)
 DocIdSet CachingSpanFilter.getDocIdSet(IndexReader reader)
 DocIdSet MultiTermQueryWrapperFilter.getDocIdSet(IndexReader reader)
Returns a DocIdSet with documents that should be permitted in search results.
 DocIdSet FieldValueFilter.getDocIdSet(IndexReader reader)
abstract  DocIdSet Filter.getDocIdSet(IndexReader reader)
Creates a DocIdSet enumerating the documents that should be permitted in search results.
 DocIdSet QueryWrapperFilter.getDocIdSet(IndexReader reader)
 Bits FieldCache.getDocsWithField(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field and returns a bit set at the size of reader.maxDoc(), with turned on bits for each docid that does have a value for this field.
 double[] FieldCache.getDoubles(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
 double[] FieldCache.getDoubles(IndexReader reader, String field, FieldCache.DoubleParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as doubles and returns an array of size reader.maxDoc() of the value each document has in the given field.
 double[] FieldCache.getDoubles(IndexReader reader, String field, FieldCache.DoubleParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as doubles and returns an array of size reader.maxDoc() of the value each document has in the given field.
protected  FilteredTermEnum WildcardQuery.getEnum(IndexReader reader)
protected  FilteredTermEnum TermRangeQuery.getEnum(IndexReader reader)
protected abstract  FilteredTermEnum MultiTermQuery.getEnum(IndexReader reader)
Construct the enumeration to be used, expanding the pattern term.
protected  FilteredTermEnum FuzzyQuery.getEnum(IndexReader reader)
protected  FilteredTermEnum PrefixQuery.getEnum(IndexReader reader)
protected  FilteredTermEnum NumericRangeQuery.getEnum(IndexReader reader)
 float[] FieldCache.getFloats(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.
 float[] FieldCache.getFloats(IndexReader reader, String field, FieldCache.FloatParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.
 float[] FieldCache.getFloats(IndexReader reader, String field, FieldCache.FloatParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.
 int[] FieldCache.getInts(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
 int[] FieldCache.getInts(IndexReader reader, String field, FieldCache.IntParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
 int[] FieldCache.getInts(IndexReader reader, String field, FieldCache.IntParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
 long[] FieldCache.getLongs(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.
 long[] FieldCache.getLongs(IndexReader reader, String field, FieldCache.LongParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.
 long[] FieldCache.getLongs(IndexReader reader, String field, FieldCache.LongParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.
 short[] FieldCache.getShorts(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.
 short[] FieldCache.getShorts(IndexReader reader, String field, FieldCache.ShortParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.
 short[] FieldCache.getShorts(IndexReader reader, String field, FieldCache.ShortParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.
 FieldCache.StringIndex FieldCache.getStringIndex(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found reads the term values in field and returns an array of them in natural order, along with an array telling which element in the term array each document uses.
 String[] FieldCache.getStrings(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the term values in field and returns an array of size reader.maxDoc() containing the value each document has in the given field.
protected  FilteredTermEnum MultiTermQuery.RewriteMethod.getTermsEnum(IndexReader reader, MultiTermQuery query)
Returns the MultiTermQuerys FilteredTermEnum
 IndexSearcher SearcherFactory.newSearcher(IndexReader reader)
Returns a new IndexSearcher over the given reader.
 void FieldCache.purge(IndexReader r)
Expert: drops all cache entries associated with this reader.
 Query BoostingQuery.rewrite(IndexReader reader)
 Query FuzzyLikeThisQuery.rewrite(IndexReader reader)
 Query PhraseQuery.rewrite(IndexReader reader)
 Query DisjunctionMaxQuery.rewrite(IndexReader reader)
Optimize our representation and our subqueries representations
 Query NGramPhraseQuery.rewrite(IndexReader reader)
 Query ConstantScoreQuery.rewrite(IndexReader reader)
 Query MultiPhraseQuery.rewrite(IndexReader reader)
 Query MultiTermQuery.rewrite(IndexReader reader)
To rewrite to a simpler form, instead return a simpler enum from MultiTermQuery.getEnum(IndexReader).
 Query BooleanQuery.rewrite(IndexReader reader)
 Query FilteredQuery.rewrite(IndexReader reader)
Rewrites the wrapped query.
 Query Query.rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.
 Q TopTermsRewrite.rewrite(IndexReader reader, MultiTermQuery query)
abstract  Query MultiTermQuery.RewriteMethod.rewrite(IndexReader reader, MultiTermQuery query)
 Q ScoringRewrite.rewrite(IndexReader reader, MultiTermQuery query)
 Scorer DisjunctionMaxQuery.DisjunctionMaxWeight.scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)
Create the scorer used to score our associated DisjunctionMaxQuery
abstract  Scorer Weight.scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)
Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.
 Scorer ConstantScoreQuery.ConstantWeight.scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)
 Scorer BooleanQuery.BooleanWeight.scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)
 void CheckHits.SetCollector.setNextReader(IndexReader reader, int docBase)
 void CheckHits.ExplanationAsserter.setNextReader(IndexReader reader, int docBase)
 void PositiveScoresOnlyCollector.setNextReader(IndexReader reader, int docBase)
abstract  void FieldComparator.setNextReader(IndexReader reader, int docBase)
Set a new Reader.
 void FieldComparator.NumericComparator.setNextReader(IndexReader reader, int docBase)
 void FieldComparator.ByteComparator.setNextReader(IndexReader reader, int docBase)
 void FieldComparator.DocComparator.setNextReader(IndexReader reader, int docBase)
 void FieldComparator.DoubleComparator.setNextReader(IndexReader reader, int docBase)
 void FieldComparator.FloatComparator.setNextReader(IndexReader reader, int docBase)
 void FieldComparator.IntComparator.setNextReader(IndexReader reader, int docBase)
 void FieldComparator.LongComparator.setNextReader(IndexReader reader, int docBase)
 void FieldComparator.RelevanceComparator.setNextReader(IndexReader reader, int docBase)
 void FieldComparator.ShortComparator.setNextReader(IndexReader reader, int docBase)
 void FieldComparator.StringComparatorLocale.setNextReader(IndexReader reader, int docBase)
 void FieldComparator.StringOrdValComparator.setNextReader(IndexReader reader, int docBase)
 void FieldComparator.StringValComparator.setNextReader(IndexReader reader, int docBase)
 void CachingCollector.setNextReader(IndexReader reader, int docBase)
 void MultiCollector.setNextReader(IndexReader reader, int o)
 void TimeLimitingCollector.setNextReader(IndexReader reader, int base)
abstract  void Collector.setNextReader(IndexReader reader, int docBase)
Called before collecting from each IndexReader.
 void TopScoreDocCollector.setNextReader(IndexReader reader, int base)
 void TotalHitCountCollector.setNextReader(IndexReader reader, int docBase)

Method parameters in org.apache.lucene.search with type arguments of type IndexReader
protected  void IndexSearcher.gatherSubReaders(List<IndexReader> allSubReaders, IndexReader r)

Constructors in org.apache.lucene.search with parameters of type IndexReader
AssertingIndexSearcher(IndexReader r)
AssertingIndexSearcher(IndexReader r, ExecutorService ex)
CheckHits.ExplanationAssertingSearcher(IndexReader r)
FieldCacheDocIdSet(IndexReader reader)
FuzzyTermEnum(IndexReader reader, Term term)
Creates a FuzzyTermEnum with an empty prefix and a minSimilarity of 0.5f.
FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity)
Creates a FuzzyTermEnum with an empty prefix.
FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity, int prefixLength)
Constructor for enumeration of all terms from specified reader which share a prefix of length prefixLength with term and which have a fuzzy similarity > minSimilarity.
IndexSearcher(IndexReader r)
Creates a searcher searching the provided index.
IndexSearcher(IndexReader r, ExecutorService executor)
Runs searches for each segment separately, using the provided ExecutorService.
IndexSearcher(IndexReader reader, IndexReader[] subReaders, int[] docStarts)
Expert: directly specify the reader, subReaders and their docID starts.
IndexSearcher(IndexReader reader, IndexReader[] subReaders, int[] docStarts)
Expert: directly specify the reader, subReaders and their docID starts.
IndexSearcher(IndexReader reader, IndexReader[] subReaders, int[] docStarts, ExecutorService executor)
Expert: directly specify the reader, subReaders and their docID starts, and an ExecutorService.
IndexSearcher(IndexReader reader, IndexReader[] subReaders, int[] docStarts, ExecutorService executor)
Expert: directly specify the reader, subReaders and their docID starts, and an ExecutorService.
PrefixTermEnum(IndexReader reader, Term prefix)
SingleTermEnum(IndexReader reader, Term singleTerm)
Creates a new SingleTermEnum.
TermRangeTermEnum(IndexReader reader, String field, String lowerTermText, String upperTermText, boolean includeLower, boolean includeUpper, Collator collator)
Enumerates all terms greater/equal than lowerTerm but less/equal than upperTerm.
WildcardTermEnum(IndexReader reader, Term term)
Creates a new WildcardTermEnum.

Uses of IndexReader in org.apache.lucene.search.function

Fields in org.apache.lucene.search.function declared as IndexReader
protected  IndexReader CustomScoreProvider.reader

Methods in org.apache.lucene.search.function with parameters of type IndexReader
DocValues | ByteFieldSource.getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
abstract DocValues | FieldCacheSource.getCachedFieldValues(FieldCache cache, String field, IndexReader reader) Return cached DocValues for input field and reader.
DocValues | ShortFieldSource.getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
DocValues | IntFieldSource.getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
DocValues | FloatFieldSource.getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
protected CustomScoreProvider | CustomScoreQuery.getCustomScoreProvider(IndexReader reader) Returns a CustomScoreProvider that calculates the custom scores for the given IndexReader.
DocValues | FieldCacheSource.getValues(IndexReader reader)
abstract DocValues | ValueSource.getValues(IndexReader reader) Return the DocValues used by the function query.
DocValues | OrdFieldSource.getValues(IndexReader reader)
DocValues | ReverseOrdFieldSource.getValues(IndexReader reader)
Query | ValueSourceQuery.rewrite(IndexReader reader)
Query | CustomScoreQuery.rewrite(IndexReader reader)

Constructors in org.apache.lucene.search.function with parameters of type IndexReader
CustomScoreProvider(IndexReader reader)
Creates a new instance of the provider class for the given IndexReader.

Uses of IndexReader in org.apache.lucene.search.grouping

Methods in org.apache.lucene.search.grouping with parameters of type IndexReader
void | AbstractSecondPassGroupingCollector.setNextReader(IndexReader reader, int docBase)
void | AbstractFirstPassGroupingCollector.setNextReader(IndexReader reader, int docBase)
void | BlockGroupingCollector.setNextReader(IndexReader reader, int docBase)
void | TermAllGroupsCollector.setNextReader(IndexReader reader, int docBase)
void | TermSecondPassGroupingCollector.setNextReader(IndexReader reader, int docBase)
void | TermFirstPassGroupingCollector.setNextReader(IndexReader reader, int docBase)

Uses of IndexReader in org.apache.lucene.search.highlight

Methods in org.apache.lucene.search.highlight that return IndexReader
protected  IndexReader WeightedSpanTermExtractor.getReaderForField(String field)

Methods in org.apache.lucene.search.highlight with parameters of type IndexReader
static TokenStream | TokenSources.getAnyTokenStream(IndexReader reader, int docId, String field, Analyzer analyzer) A convenience method that tries a number of approaches to getting a token stream.
static TokenStream | TokenSources.getAnyTokenStream(IndexReader reader, int docId, String field, Document doc, Analyzer analyzer) A convenience method that tries to first get a TermPositionVector for the specified docId, then, falls back to using the passed in Document to retrieve the TokenStream.
static WeightedTerm[] | QueryTermExtractor.getIdfWeightedTerms(Query query, IndexReader reader, String fieldName) Extracts all terms texts of a given Query into an array of WeightedTerms
static TokenStream | TokenSources.getTokenStream(IndexReader reader, int docId, String field)
static TokenStream | TokenSources.getTokenStream(IndexReader reader, int docId, String field, Analyzer analyzer)
Map<String,WeightedSpanTerm> | WeightedSpanTermExtractor.getWeightedSpanTermsWithScores(Query query, TokenStream tokenStream, String fieldName, IndexReader reader) Creates a Map of WeightedSpanTerms from the given Query and TokenStream.

Constructors in org.apache.lucene.search.highlight with parameters of type IndexReader
QueryScorer(Query query, IndexReader reader, String field)
QueryScorer(Query query, IndexReader reader, String field, String defaultField)
QueryTermScorer(Query query, IndexReader reader, String fieldName)

Uses of IndexReader in org.apache.lucene.search.join

Methods in org.apache.lucene.search.join with parameters of type IndexReader
DocIdSet | RawTermFilter.getDocIdSet(IndexReader reader)
Query | ToChildBlockJoinQuery.rewrite(IndexReader reader)
Query | ToParentBlockJoinQuery.rewrite(IndexReader reader)
void | ToParentBlockJoinCollector.setNextReader(IndexReader reader, int docBase)

Uses of IndexReader in org.apache.lucene.search.payloads

Methods in org.apache.lucene.search.payloads with parameters of type IndexReader
Explanation | PayloadTermQuery.PayloadTermWeight.explain(IndexReader reader, int doc)
Scorer | PayloadNearQuery.PayloadNearSpanWeight.scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)
Scorer | PayloadTermQuery.PayloadTermWeight.scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)

Constructors in org.apache.lucene.search.payloads with parameters of type IndexReader
PayloadSpanUtil(IndexReader reader)

Uses of IndexReader in org.apache.lucene.search.regex

Methods in org.apache.lucene.search.regex with parameters of type IndexReader
protected  FilteredTermEnum RegexQuery.getEnum(IndexReader reader)

Constructors in org.apache.lucene.search.regex with parameters of type IndexReader
RegexTermEnum(IndexReader reader, Term term, RegexCapabilities regexImpl)

Uses of IndexReader in org.apache.lucene.search.similar

Methods in org.apache.lucene.search.similar with parameters of type IndexReader
 Query MoreLikeThisQuery.rewrite(IndexReader reader)

Constructors in org.apache.lucene.search.similar with parameters of type IndexReader
MoreLikeThis(IndexReader ir)
Constructor requiring an IndexReader.
MoreLikeThis(IndexReader ir, Similarity sim)

Uses of IndexReader in org.apache.lucene.search.spans

Methods in org.apache.lucene.search.spans with parameters of type IndexReader
Explanation | SpanWeight.explain(IndexReader reader, int doc)
Spans | SpanOrQuery.getSpans(IndexReader reader)
Spans | SpanNearQuery.getSpans(IndexReader reader)
Spans | SpanPositionCheckQuery.getSpans(IndexReader reader)
Spans | SpanMultiTermQueryWrapper.getSpans(IndexReader reader)
Spans | SpanNotQuery.getSpans(IndexReader reader)
Spans | SpanTermQuery.getSpans(IndexReader reader)
abstract Spans | SpanQuery.getSpans(IndexReader reader) Expert: Returns the matches for this query in an index.
Spans | FieldMaskingSpanQuery.getSpans(IndexReader reader)
Query | SpanOrQuery.rewrite(IndexReader reader)
Query | SpanNearQuery.rewrite(IndexReader reader)
Query | SpanPositionCheckQuery.rewrite(IndexReader reader)
Query | SpanMultiTermQueryWrapper.rewrite(IndexReader reader)
Query | SpanNotQuery.rewrite(IndexReader reader)
Query | FieldMaskingSpanQuery.rewrite(IndexReader reader)
abstract SpanQuery | SpanMultiTermQueryWrapper.SpanRewriteMethod.rewrite(IndexReader reader, MultiTermQuery query)
SpanQuery | SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite.rewrite(IndexReader reader, MultiTermQuery query)
Scorer | SpanWeight.scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)

Constructors in org.apache.lucene.search.spans with parameters of type IndexReader
NearSpansOrdered(SpanNearQuery spanNearQuery, IndexReader reader)
NearSpansOrdered(SpanNearQuery spanNearQuery, IndexReader reader, boolean collectPayloads)
NearSpansUnordered(SpanNearQuery query, IndexReader reader)
SpanPositionCheckQuery.PositionCheckSpan(IndexReader reader)

Uses of IndexReader in org.apache.lucene.search.spell

Methods in org.apache.lucene.search.spell with parameters of type IndexReader
 String[] SpellChecker.suggestSimilar(String word, int numSug, IndexReader ir, String field, boolean morePopular)
Deprecated. use suggestSimilar(String, int, IndexReader, String, SuggestMode)
  • SuggestMode.SUGGEST_WHEN_NOT_IN_INDEX instead of morePopular=false
  • SuggestMode.SuGGEST_MORE_POPULAR instead of morePopular=true
 String[] SpellChecker.suggestSimilar(String word, int numSug, IndexReader ir, String field, boolean morePopular, float accuracy)
Deprecated. use suggestSimilar(String, int, IndexReader, String, SuggestMode, float)
  • SuggestMode.SUGGEST_WHEN_NOT_IN_INDEX instead of morePopular=false
  • SuggestMode.SuGGEST_MORE_POPULAR instead of morePopular=true
 String[] SpellChecker.suggestSimilar(String word, int numSug, IndexReader ir, String field, SuggestMode suggestMode)
Calls suggestSimilar(word, numSug, ir, suggestMode, field, this.accuracy)
 String[] SpellChecker.suggestSimilar(String word, int numSug, IndexReader ir, String field, SuggestMode suggestMode, float accuracy)
Suggest similar words (optionally restricted to a field of an index).

Constructors in org.apache.lucene.search.spell with parameters of type IndexReader
HighFrequencyDictionary(IndexReader reader, String field, float thresh)
LuceneDictionary(IndexReader reader, String field)

Uses of IndexReader in org.apache.lucene.search.vectorhighlight

Methods in org.apache.lucene.search.vectorhighlight with parameters of type IndexReader
String | FragmentsBuilder.createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList) create a fragment.
String | BaseFragmentsBuilder.createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList)
String | FragmentsBuilder.createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, String[] preTags, String[] postTags, Encoder encoder) create a fragment.
String | BaseFragmentsBuilder.createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, String[] preTags, String[] postTags, Encoder encoder)
String[] | FragmentsBuilder.createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments) create multiple fragments.
String[] | BaseFragmentsBuilder.createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments)
String[] | FragmentsBuilder.createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments, String[] preTags, String[] postTags, Encoder encoder) create multiple fragments.
String[] | BaseFragmentsBuilder.createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments, String[] preTags, String[] postTags, Encoder encoder)
String | FastVectorHighlighter.getBestFragment(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize) return the best fragment.
String | FastVectorHighlighter.getBestFragment(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder, String[] preTags, String[] postTags, Encoder encoder) return the best fragment.
String[] | FastVectorHighlighter.getBestFragments(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, int maxNumFragments) return the best fragments.
String[] | FastVectorHighlighter.getBestFragments(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, int maxNumFragments, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder, String[] preTags, String[] postTags, Encoder encoder) return the best fragments.
FieldQuery | FastVectorHighlighter.getFieldQuery(Query query, IndexReader reader) create a FieldQuery object.
protected Field[] | BaseFragmentsBuilder.getFields(IndexReader reader, int docId, String fieldName)
protected String[] | BaseFragmentsBuilder.getFieldValues(IndexReader reader, int docId, String fieldName) Deprecated.

Constructors in org.apache.lucene.search.vectorhighlight with parameters of type IndexReader
FieldTermStack(IndexReader reader, int docId, String fieldName, FieldQuery fieldQuery)
a constructor.

Uses of IndexReader in org.apache.lucene.spatial.geohash

Methods in org.apache.lucene.spatial.geohash with parameters of type IndexReader
 DocIdSet GeoHashDistanceFilter.getDocIdSet(IndexReader reader)
Deprecated.

Uses of IndexReader in org.apache.lucene.spatial.tier

Methods in org.apache.lucene.spatial.tier with parameters of type IndexReader
DocIdSet | CartesianShapeFilter.getDocIdSet(IndexReader reader) Deprecated.
DocIdSet | LatLongDistanceFilter.getDocIdSet(IndexReader reader) Deprecated.

Uses of IndexReader in org.apache.lucene.store.instantiated

Subclasses of IndexReader in org.apache.lucene.store.instantiated
 class InstantiatedIndexReader
Deprecated. contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM

Methods in org.apache.lucene.store.instantiated with parameters of type IndexReader
 void InstantiatedIndexWriter.addIndexes(IndexReader[] readers)
Deprecated.

Constructors in org.apache.lucene.store.instantiated with parameters of type IndexReader
InstantiatedIndex(IndexReader sourceIndexReader)
Deprecated. Creates a new instantiated index that looks just like the index in a specific state as represented by a reader.
InstantiatedIndex(IndexReader sourceIndexReader, Set<String> fields)
Deprecated. Creates a new instantiated index that looks just like the index in a specific state as represented by a reader.

Uses of IndexReader in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type IndexReader
protected abstract void | ReaderUtil.Gather.add(int base, IndexReader r)
static void | ReaderUtil.gatherSubReaders(List<IndexReader> allSubReaders, IndexReader reader) Gathers sub-readers from reader into a List.
static Collection<String> | ReaderUtil.getIndexedFields(IndexReader reader)
static FieldInfos | ReaderUtil.getMergedFieldInfos(IndexReader reader) Call this to get the (merged) FieldInfos for a composite reader
static IndexSearcher | LuceneTestCase.newSearcher(IndexReader r) create a new searcher over the reader.
static IndexSearcher | LuceneTestCase.newSearcher(IndexReader r, boolean maybeWrap) create a new searcher over the reader.

Method parameters in org.apache.lucene.util with type arguments of type IndexReader
static void ReaderUtil.gatherSubReaders(List<IndexReader> allSubReaders, IndexReader reader)
Gathers sub-readers from reader into a List.

Constructors in org.apache.lucene.util with parameters of type IndexReader
ReaderUtil.Gather(IndexReader r)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.index.IndexReader.ReaderClosedListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.index.IndexReader.ReaderClosedListener

Packages that use IndexReader.ReaderClosedListener
org.apache.lucene.index Code to maintain and access indices.

Uses of IndexReader.ReaderClosedListener in org.apache.lucene.index

Methods in org.apache.lucene.index with parameters of type IndexReader.ReaderClosedListener
void | IndexReader.addReaderClosedListener(IndexReader.ReaderClosedListener listener) Expert: adds a IndexReader.ReaderClosedListener.
void | IndexReader.removeReaderClosedListener(IndexReader.ReaderClosedListener listener) Expert: remove a previously added IndexReader.ReaderClosedListener.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.IndexSorter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.IndexSorter

No usage of org.apache.lucene.index.IndexSorter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.IndexSplitter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.IndexSplitter

No usage of org.apache.lucene.index.IndexSplitter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.IndexUpgrader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.IndexUpgrader

No usage of org.apache.lucene.index.IndexUpgrader

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.IndexWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.IndexWriter

Packages that use IndexWriter
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.util | Some utility classes.

Uses of IndexWriter in org.apache.lucene.benchmark.byTask

Methods in org.apache.lucene.benchmark.byTask that return IndexWriter
 IndexWriter PerfRunData.getIndexWriter()

Methods in org.apache.lucene.benchmark.byTask with parameters of type IndexWriter
 void PerfRunData.setIndexWriter(IndexWriter indexWriter)

Uses of IndexWriter in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks that return IndexWriter
static IndexWriter CreateIndexTask.configureWriter(Config config, PerfRunData runData, IndexWriterConfig.OpenMode mode, IndexCommit commit)

Uses of IndexWriter in org.apache.lucene.facet.taxonomy.directory

Methods in org.apache.lucene.facet.taxonomy.directory that return IndexWriter
protected  IndexWriter DirectoryTaxonomyWriter.openIndexWriter(Directory directory, IndexWriterConfig config)
Open internal index writer, which contains the taxonomy data.

Uses of IndexWriter in org.apache.lucene.index

Fields in org.apache.lucene.index declared as IndexWriter
IndexWriter | RandomIndexWriter.w
protected IndexWriter | ThreadedIndexingAndSearchingTestCase.writer
protected IndexWriter | ConcurrentMergeScheduler.writer

Fields in org.apache.lucene.index with type parameters of type IndexWriter
protected  SetOnce<IndexWriter> MergePolicy.writer

Methods in org.apache.lucene.index with parameters of type IndexWriter
protected  IndexReader IndexReader.doOpenIfChanged(IndexWriter writer, boolean applyAllDeletes)
If the index has changed since it was opened, open and return a new reader; else, return null.
protected  ConcurrentMergeScheduler.MergeThread ConcurrentMergeScheduler.getMergeThread(IndexWriter writer, MergePolicy.OneMerge merge)
Create and return a new MergeThread
abstract  void MergeScheduler.merge(IndexWriter writer)
Run the merges provided by getNextMerge().
 void SerialMergeScheduler.merge(IndexWriter writer)
Just do the merges in sequence.
 void NoMergeScheduler.merge(IndexWriter writer)
 void ConcurrentMergeScheduler.merge(IndexWriter writer)
static IndexReader IndexReader.open(IndexWriter writer, boolean applyAllDeletes)
Open a near real time IndexReader from the IndexWriter.
static IndexReader IndexReader.openIfChanged(IndexReader oldReader, IndexWriter writer, boolean applyAllDeletes)
Expert: If there changes (committed or not) in the IndexWriter versus what the provided reader is searching, then open and return a new read-only IndexReader searching both committed and uncommitted changes from the writer; else, return null (though, the current implementation never returns null).
 IndexReader IndexReader.reopen(IndexWriter writer, boolean applyAllDeletes)
Deprecated. Use IndexReader.openIfChanged(IndexReader,IndexWriter,boolean) instead
 void NoMergePolicy.setIndexWriter(IndexWriter writer)
 void UpgradeIndexMergePolicy.setIndexWriter(IndexWriter writer)
 void MergePolicy.setIndexWriter(IndexWriter writer)
Sets the IndexWriter to use by this merge policy.

Constructors in org.apache.lucene.index with parameters of type IndexWriter
ConcurrentMergeScheduler.MergeThread(IndexWriter writer, MergePolicy.OneMerge startMerge)

Uses of IndexWriter in org.apache.lucene.search

Methods in org.apache.lucene.search that return IndexWriter
 IndexWriter NRTManager.TrackingIndexWriter.getIndexWriter()

Constructors in org.apache.lucene.search with parameters of type IndexWriter
NRTManager.TrackingIndexWriter(IndexWriter writer)
SearcherManager(IndexWriter writer, boolean applyAllDeletes, SearcherFactory searcherFactory)
Creates and returns a new SearcherManager from the given IndexWriter.

Uses of IndexWriter in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type IndexWriter
static void | _TestUtil.keepFullyDeletedSegments(IndexWriter w)
static void | _TestUtil.reduceOpenFiles(IndexWriter w) just tries to configure things to keep the open file count lowish
static void | _TestUtil.syncConcurrentMerges(IndexWriter writer)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.IndexWriter.IndexReaderWarmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.IndexWriter.IndexReaderWarmer

Packages that use IndexWriter.IndexReaderWarmer
org.apache.lucene.index Code to maintain and access indices.

Uses of IndexWriter.IndexReaderWarmer in org.apache.lucene.index

Methods in org.apache.lucene.index that return IndexWriter.IndexReaderWarmer
 IndexWriter.IndexReaderWarmer IndexWriter.getMergedSegmentWarmer()
Deprecated. use IndexWriterConfig.getMergedSegmentWarmer() instead.
 IndexWriter.IndexReaderWarmer IndexWriterConfig.getMergedSegmentWarmer()
Returns the current merged segment warmer.

Methods in org.apache.lucene.index with parameters of type IndexWriter.IndexReaderWarmer
 void IndexWriter.setMergedSegmentWarmer(IndexWriter.IndexReaderWarmer warmer)
Deprecated. use IndexWriterConfig.setMergedSegmentWarmer(org.apache.lucene.index.IndexWriter.IndexReaderWarmer) instead.
 IndexWriterConfig IndexWriterConfig.setMergedSegmentWarmer(IndexWriter.IndexReaderWarmer mergeSegmentWarmer)
Set the merged segment warmer.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.IndexWriter.MaxFieldLength

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.IndexWriter.MaxFieldLength

Packages that use IndexWriter.MaxFieldLength
org.apache.lucene.index Code to maintain and access indices.

Uses of IndexWriter.MaxFieldLength in org.apache.lucene.index

Fields in org.apache.lucene.index declared as IndexWriter.MaxFieldLength
static IndexWriter.MaxFieldLength | IndexWriter.MaxFieldLength.LIMITED Deprecated. Sets the maximum field length to IndexWriter.DEFAULT_MAX_FIELD_LENGTH
static IndexWriter.MaxFieldLength | IndexWriter.MaxFieldLength.UNLIMITED Deprecated. Sets the maximum field length to Integer.MAX_VALUE.

Constructors in org.apache.lucene.index with parameters of type IndexWriter.MaxFieldLength
IndexWriter(Directory d, Analyzer a, boolean create, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, boolean create, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl, IndexCommit commit)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.IndexWriterConfig

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.IndexWriterConfig

Packages that use IndexWriterConfig
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.search.spell | Suggest alternate spellings for words.
org.apache.lucene.util | Some utility classes.

Uses of IndexWriterConfig in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks that return IndexWriterConfig
static IndexWriterConfig CreateIndexTask.createWriterConfig(Config config, PerfRunData runData, IndexWriterConfig.OpenMode mode, IndexCommit commit)

Uses of IndexWriterConfig in org.apache.lucene.facet.taxonomy.directory

Methods in org.apache.lucene.facet.taxonomy.directory that return IndexWriterConfig
protected  IndexWriterConfig DirectoryTaxonomyWriter.createIndexWriterConfig(IndexWriterConfig.OpenMode openMode)
Create the IndexWriterConfig that would be used for opening the internal index writer.

Methods in org.apache.lucene.facet.taxonomy.directory with parameters of type IndexWriterConfig
protected  IndexWriter DirectoryTaxonomyWriter.openIndexWriter(Directory directory, IndexWriterConfig config)
Open internal index writer, which contains the taxonomy data.

Uses of IndexWriterConfig in org.apache.lucene.index

Methods in org.apache.lucene.index that return IndexWriterConfig
 IndexWriterConfig IndexWriter.getConfig()
Returns the private IndexWriterConfig, cloned from the IndexWriterConfig passed to IndexWriter.IndexWriter(Directory, IndexWriterConfig).
 IndexWriterConfig IndexWriterConfig.setIndexCommit(IndexCommit commit)
Expert: allows to open a certain commit point.
 IndexWriterConfig IndexWriterConfig.setIndexDeletionPolicy(IndexDeletionPolicy delPolicy)
Expert: allows an optional IndexDeletionPolicy implementation to be specified.
 IndexWriterConfig IndexWriterConfig.setMaxBufferedDeleteTerms(int maxBufferedDeleteTerms)
Determines the minimal number of delete terms required before the buffered in-memory delete terms are applied and flushed.
 IndexWriterConfig IndexWriterConfig.setMaxBufferedDocs(int maxBufferedDocs)
Determines the minimal number of documents required before the buffered in-memory documents are flushed as a new Segment.
 IndexWriterConfig IndexWriterConfig.setMaxThreadStates(int maxThreadStates)
Sets the max number of simultaneous threads that may be indexing documents at once in IndexWriter.
 IndexWriterConfig IndexWriterConfig.setMergedSegmentWarmer(IndexWriter.IndexReaderWarmer mergeSegmentWarmer)
Set the merged segment warmer.
 IndexWriterConfig IndexWriterConfig.setMergePolicy(MergePolicy mergePolicy)
Expert: MergePolicy is invoked whenever there are changes to the segments in the index.
 IndexWriterConfig IndexWriterConfig.setMergeScheduler(MergeScheduler mergeScheduler)
Expert: sets the merge scheduler used by this writer.
 IndexWriterConfig IndexWriterConfig.setOpenMode(IndexWriterConfig.OpenMode openMode)
Specifies IndexWriterConfig.OpenMode of the index.
 IndexWriterConfig IndexWriterConfig.setRAMBufferSizeMB(double ramBufferSizeMB)
Determines the amount of RAM that may be used for buffering added documents and deletions before they are flushed to the Directory.
 IndexWriterConfig IndexWriterConfig.setReaderPooling(boolean readerPooling)
By default, IndexWriter does not pool the SegmentReaders it must open for deletions and merging, unless a near-real-time reader has been obtained by calling IndexWriter.getReader().
 IndexWriterConfig IndexWriterConfig.setReaderTermsIndexDivisor(int divisor)
Sets the termsIndexDivisor passed to any readers that IndexWriter opens, for example when applying deletes or creating a near-real-time reader in IndexWriter.getReader().
 IndexWriterConfig IndexWriterConfig.setSimilarity(Similarity similarity)
Expert: set the Similarity implementation used by this IndexWriter.
 IndexWriterConfig IndexWriterConfig.setTermIndexInterval(int interval)
Expert: set the interval between indexed terms.
 IndexWriterConfig IndexWriterConfig.setWriteLockTimeout(long writeLockTimeout)
Sets the maximum time to wait for a write lock (in milliseconds) for this instance.

Constructors in org.apache.lucene.index with parameters of type IndexWriterConfig
IndexUpgrader(Directory dir, IndexWriterConfig iwc, PrintStream infoStream, boolean deletePriorCommits)
Creates index upgrader on the given directory, using an IndexWriter using the given config.
IndexWriter(Directory d, IndexWriterConfig conf)
Constructs a new IndexWriter per the settings given in conf.
PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Filter docsInFirstIndex, IndexWriterConfig config1, IndexWriterConfig config2)
PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Term midTerm, IndexWriterConfig config1, IndexWriterConfig config2)
RandomIndexWriter(Random r, Directory dir, IndexWriterConfig c)
create a RandomIndexWriter with the provided config

Uses of IndexWriterConfig in org.apache.lucene.search.spell

Methods in org.apache.lucene.search.spell with parameters of type IndexWriterConfig
 void SpellChecker.indexDictionary(Dictionary dict, IndexWriterConfig config, boolean fullMerge)
Indexes the data from the given Dictionary.

Uses of IndexWriterConfig in org.apache.lucene.util

Methods in org.apache.lucene.util that return IndexWriterConfig
static IndexWriterConfig | LuceneTestCase.newIndexWriterConfig(Random r, Version v, Analyzer a) create a new index writer config with random defaults using the specified random
static IndexWriterConfig | LuceneTestCase.newIndexWriterConfig(Version v, Analyzer a) create a new index writer config with random defaults

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.IndexWriterConfig.OpenMode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.IndexWriterConfig.OpenMode

Packages that use IndexWriterConfig.OpenMode
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.index | Code to maintain and access indices.

Uses of IndexWriterConfig.OpenMode in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks with parameters of type IndexWriterConfig.OpenMode
static IndexWriter | CreateIndexTask.configureWriter(Config config, PerfRunData runData, IndexWriterConfig.OpenMode mode, IndexCommit commit)
static IndexWriterConfig | CreateIndexTask.createWriterConfig(Config config, PerfRunData runData, IndexWriterConfig.OpenMode mode, IndexCommit commit)

Uses of IndexWriterConfig.OpenMode in org.apache.lucene.facet.taxonomy.directory

Methods in org.apache.lucene.facet.taxonomy.directory with parameters of type IndexWriterConfig.OpenMode
protected  IndexWriterConfig DirectoryTaxonomyWriter.createIndexWriterConfig(IndexWriterConfig.OpenMode openMode)
Create the IndexWriterConfig that would be used for opening the internal index writer.

Constructors in org.apache.lucene.facet.taxonomy.directory with parameters of type IndexWriterConfig.OpenMode
DirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode)
Creates a new instance with a default cached as defined by DirectoryTaxonomyWriter.defaultTaxonomyWriterCache().
DirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode, TaxonomyWriterCache cache)
Construct a Taxonomy writer.

Uses of IndexWriterConfig.OpenMode in org.apache.lucene.index

Methods in org.apache.lucene.index that return IndexWriterConfig.OpenMode
 IndexWriterConfig.OpenMode IndexWriterConfig.getOpenMode()
Returns the IndexWriterConfig.OpenMode set by IndexWriterConfig.setOpenMode(OpenMode).
static IndexWriterConfig.OpenMode IndexWriterConfig.OpenMode.valueOf(String name)
Returns the enum constant of this type with the specified name.
static IndexWriterConfig.OpenMode[] IndexWriterConfig.OpenMode.values()
Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.index with parameters of type IndexWriterConfig.OpenMode
 IndexWriterConfig IndexWriterConfig.setOpenMode(IndexWriterConfig.OpenMode openMode)
Specifies IndexWriterConfig.OpenMode of the index.

Constructors in org.apache.lucene.index with parameters of type IndexWriterConfig.OpenMode
PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir, IndexWriterConfig.OpenMode mode, Version matchVersion)
PersistentSnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.KeepOnlyLastCommitDeletionPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.KeepOnlyLastCommitDeletionPolicy

No usage of org.apache.lucene.index.KeepOnlyLastCommitDeletionPolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.LogByteSizeMergePolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.LogByteSizeMergePolicy

Packages that use LogByteSizeMergePolicy
org.apache.lucene.index Code to maintain and access indices.

Uses of LogByteSizeMergePolicy in org.apache.lucene.index

Subclasses of LogByteSizeMergePolicy in org.apache.lucene.index
 class BalancedSegmentMergePolicy
Merge policy that tries to balance not doing large segment merges with not accumulating too many segments in the index, to provide for better performance in near real-time setting.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.LogDocMergePolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.LogDocMergePolicy

No usage of org.apache.lucene.index.LogDocMergePolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.LogMergePolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.LogMergePolicy

Packages that use LogMergePolicy
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.util | Some utility classes.

Uses of LogMergePolicy in org.apache.lucene.index

Subclasses of LogMergePolicy in org.apache.lucene.index
class | BalancedSegmentMergePolicy Merge policy that tries to balance not doing large segment merges with not accumulating too many segments in the index, to provide for better performance in near real-time setting.
class | LogByteSizeMergePolicy This is a LogMergePolicy that measures size of a segment as the total byte size of the segment's files.
class | LogDocMergePolicy This is a LogMergePolicy that measures size of a segment as the number of documents (not taking deletions into account).

Uses of LogMergePolicy in org.apache.lucene.util

Methods in org.apache.lucene.util that return LogMergePolicy
static LogMergePolicy | LuceneTestCase.newLogMergePolicy()
static LogMergePolicy | LuceneTestCase.newLogMergePolicy(boolean useCFS)
static LogMergePolicy | LuceneTestCase.newLogMergePolicy(boolean useCFS, int mergeFactor)
static LogMergePolicy | LuceneTestCase.newLogMergePolicy(int mergeFactor)
static LogMergePolicy | LuceneTestCase.newLogMergePolicy(Random r)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.MergePolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.MergePolicy

Packages that use MergePolicy
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.util | Some utility classes.

Uses of MergePolicy in org.apache.lucene.index

Subclasses of MergePolicy in org.apache.lucene.index
class | BalancedSegmentMergePolicy Merge policy that tries to balance not doing large segment merges with not accumulating too many segments in the index, to provide for better performance in near real-time setting.
class | LogByteSizeMergePolicy This is a LogMergePolicy that measures size of a segment as the total byte size of the segment's files.
class | LogDocMergePolicy This is a LogMergePolicy that measures size of a segment as the number of documents (not taking deletions into account).
class | LogMergePolicy This class implements a MergePolicy that tries to merge segments into levels of exponentially increasing size, where each level has fewer segments than the value of the merge factor.
class | MockRandomMergePolicy MergePolicy that makes random decisions for testing.
class | NoMergePolicy A MergePolicy which never returns merges to execute (hence it's name).
class | TieredMergePolicy Merges segments of approximately equal size, subject to an allowed number of segments per tier.
class | UpgradeIndexMergePolicy This MergePolicy is used for upgrading all existing segments of an index when calling IndexWriter.forceMerge(int).

Fields in org.apache.lucene.index declared as MergePolicy
protected MergePolicy | UpgradeIndexMergePolicy.base
static MergePolicy | NoMergePolicy.COMPOUND_FILES A singleton NoMergePolicy which indicates the index uses compound files.
static MergePolicy | NoMergePolicy.NO_COMPOUND_FILES A singleton NoMergePolicy which indicates the index does not use compound files.

Methods in org.apache.lucene.index that return MergePolicy
 MergePolicy IndexWriter.getMergePolicy()
Deprecated. use IndexWriterConfig.getMergePolicy() instead
 MergePolicy IndexWriterConfig.getMergePolicy()
Returns the current MergePolicy in use by this writer.

Methods in org.apache.lucene.index with parameters of type MergePolicy
 void IndexWriter.setMergePolicy(MergePolicy mp)
Deprecated. use IndexWriterConfig.setMergePolicy(MergePolicy) instead.
 IndexWriterConfig IndexWriterConfig.setMergePolicy(MergePolicy mergePolicy)
Expert: MergePolicy is invoked whenever there are changes to the segments in the index.

Constructors in org.apache.lucene.index with parameters of type MergePolicy
UpgradeIndexMergePolicy(MergePolicy base)
Wrap the given MergePolicy and intercept forceMerge requests to only upgrade segments written with previous Lucene versions.

Uses of MergePolicy in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type MergePolicy
static void | LuceneTestCase.setMergeFactor(MergePolicy mp, int mergeFactor)
static void | LuceneTestCase.setUseCompoundFile(MergePolicy mp, boolean useCompound)
static void | _TestUtil.setUseCompoundFile(MergePolicy mp, boolean v)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.MergePolicy.MergeAbortedException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.MergePolicy.MergeAbortedException

No usage of org.apache.lucene.index.MergePolicy.MergeAbortedException

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.MergePolicy.MergeException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.MergePolicy.MergeException

No usage of org.apache.lucene.index.MergePolicy.MergeException

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.MergePolicy.MergeSpecification

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.MergePolicy.MergeSpecification

Packages that use MergePolicy.MergeSpecification
org.apache.lucene.index Code to maintain and access indices.

Uses of MergePolicy.MergeSpecification in org.apache.lucene.index

Methods in org.apache.lucene.index that return MergePolicy.MergeSpecification
MergePolicy.MergeSpecification | BalancedSegmentMergePolicy.findForcedDeletesMerges(SegmentInfos infos)
MergePolicy.MergeSpecification | MockRandomMergePolicy.findForcedDeletesMerges(SegmentInfos segmentInfos)
MergePolicy.MergeSpecification | NoMergePolicy.findForcedDeletesMerges(SegmentInfos segmentInfos)
MergePolicy.MergeSpecification | TieredMergePolicy.findForcedDeletesMerges(SegmentInfos infos)
MergePolicy.MergeSpecification | LogMergePolicy.findForcedDeletesMerges(SegmentInfos segmentInfos) Finds merges necessary to force-merge all deletes from the index.
MergePolicy.MergeSpecification | UpgradeIndexMergePolicy.findForcedDeletesMerges(SegmentInfos segmentInfos)
abstract MergePolicy.MergeSpecification | MergePolicy.findForcedDeletesMerges(SegmentInfos segmentInfos) Determine what set of merge operations is necessary in order to expunge all deletes from the index.
MergePolicy.MergeSpecification | BalancedSegmentMergePolicy.findForcedMerges(SegmentInfos infos, int maxNumSegments, Map<SegmentInfo,Boolean> segmentsToMerge)
MergePolicy.MergeSpecification | MockRandomMergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
MergePolicy.MergeSpecification | NoMergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
MergePolicy.MergeSpecification | TieredMergePolicy.findForcedMerges(SegmentInfos infos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
MergePolicy.MergeSpecification | LogMergePolicy.findForcedMerges(SegmentInfos infos, int maxNumSegments, Map<SegmentInfo,Boolean> segmentsToMerge) Returns the merges necessary to merge the index down to a specified number of segments.
MergePolicy.MergeSpecification | UpgradeIndexMergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
abstract MergePolicy.MergeSpecification | MergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge) Determine what set of merge operations is necessary in order to merge to <= the specified segment count.
MergePolicy.MergeSpecification | BalancedSegmentMergePolicy.findMerges(SegmentInfos infos)
MergePolicy.MergeSpecification | MockRandomMergePolicy.findMerges(SegmentInfos segmentInfos)
MergePolicy.MergeSpecification | NoMergePolicy.findMerges(SegmentInfos segmentInfos)
MergePolicy.MergeSpecification | TieredMergePolicy.findMerges(SegmentInfos infos)
MergePolicy.MergeSpecification | LogMergePolicy.findMerges(SegmentInfos infos) Checks if any merges are now necessary and returns a MergePolicy.MergeSpecification if so.
MergePolicy.MergeSpecification | UpgradeIndexMergePolicy.findMerges(SegmentInfos segmentInfos)
abstract MergePolicy.MergeSpecification | MergePolicy.findMerges(SegmentInfos segmentInfos) Determine what set of merge operations are now necessary on the index.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.MergePolicy.OneMerge

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.MergePolicy.OneMerge

Packages that use MergePolicy.OneMerge
org.apache.lucene.index Code to maintain and access indices.

Uses of MergePolicy.OneMerge in org.apache.lucene.index

Fields in org.apache.lucene.index with type parameters of type MergePolicy.OneMerge
 List<MergePolicy.OneMerge> MergePolicy.MergeSpecification.merges
The subset of segments to be included in the primitive merge.

Methods in org.apache.lucene.index that return MergePolicy.OneMerge
MergePolicy.OneMerge | ConcurrentMergeScheduler.MergeThread.getCurrentMerge()
MergePolicy.OneMerge | IndexWriter.getNextMerge() Expert: the MergeScheduler calls this method to retrieve the next merge requested by the MergePolicy
MergePolicy.OneMerge | ConcurrentMergeScheduler.MergeThread.getRunningMerge()

Methods in org.apache.lucene.index with parameters of type MergePolicy.OneMerge
 void MergePolicy.MergeSpecification.add(MergePolicy.OneMerge merge)
protected  void ConcurrentMergeScheduler.doMerge(MergePolicy.OneMerge merge)
Does the actual merge, by calling IndexWriter.merge(org.apache.lucene.index.MergePolicy.OneMerge)
protected  ConcurrentMergeScheduler.MergeThread ConcurrentMergeScheduler.getMergeThread(IndexWriter writer, MergePolicy.OneMerge merge)
Create and return a new MergeThread
 void IndexWriter.merge(MergePolicy.OneMerge merge)
Merges the indicated segments, replacing them in the stack with a single segment.
 void ConcurrentMergeScheduler.MergeThread.setRunningMerge(MergePolicy.OneMerge merge)

Constructors in org.apache.lucene.index with parameters of type MergePolicy.OneMerge
ConcurrentMergeScheduler.MergeThread(IndexWriter writer, MergePolicy.OneMerge startMerge)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.MergeScheduler

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.MergeScheduler

Packages that use MergeScheduler
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.store | Binary i/o API, used for all index data.
org.apache.lucene.util | Some utility classes.

Uses of MergeScheduler in org.apache.lucene.index

Subclasses of MergeScheduler in org.apache.lucene.index
class | ConcurrentMergeScheduler A MergeScheduler that runs each merge using a separate thread.
class | NoMergeScheduler A MergeScheduler which never executes any merges.
class | SerialMergeScheduler A MergeScheduler that simply does each merge sequentially, using the current thread.

Fields in org.apache.lucene.index declared as MergeScheduler
static MergeScheduler NoMergeScheduler.INSTANCE
The single instance of NoMergeScheduler

Methods in org.apache.lucene.index that return MergeScheduler
 MergeScheduler IndexWriter.getMergeScheduler()
Deprecated. use IndexWriterConfig.getMergeScheduler() instead
 MergeScheduler IndexWriterConfig.getMergeScheduler()
Returns the MergeScheduler that was set by IndexWriterConfig.setMergeScheduler(MergeScheduler)

Methods in org.apache.lucene.index with parameters of type MergeScheduler
 void IndexWriter.setMergeScheduler(MergeScheduler mergeScheduler)
Deprecated. use IndexWriterConfig.setMergeScheduler(MergeScheduler) instead
 IndexWriterConfig IndexWriterConfig.setMergeScheduler(MergeScheduler mergeScheduler)
Expert: sets the merge scheduler used by this writer.

Uses of MergeScheduler in org.apache.lucene.store

Methods in org.apache.lucene.store that return MergeScheduler
 MergeScheduler NRTCachingDirectory.getMergeScheduler()

Uses of MergeScheduler in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type MergeScheduler
static void _TestUtil.syncConcurrentMerges(MergeScheduler ms)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.MockIndexInput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.MockIndexInput

No usage of org.apache.lucene.index.MockIndexInput

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.MockRandomMergePolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.MockRandomMergePolicy

No usage of org.apache.lucene.index.MockRandomMergePolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.MultiPassIndexSplitter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.MultiPassIndexSplitter

No usage of org.apache.lucene.index.MultiPassIndexSplitter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.MultipleTermPositions

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.MultipleTermPositions

No usage of org.apache.lucene.index.MultipleTermPositions

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.MultiReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.MultiReader

Packages that use MultiReader
org.apache.lucene.index Code to maintain and access indices.

Uses of MultiReader in org.apache.lucene.index

Subclasses of MultiReader in org.apache.lucene.index
 class SlowMultiReaderWrapper
Acts like Lucene 4.x's SlowMultiReaderWrapper for testing of top-level MultiTermEnum, MultiTermDocs, ...

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.NoDeletionPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.NoDeletionPolicy

No usage of org.apache.lucene.index.NoDeletionPolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.NoMergePolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.NoMergePolicy

No usage of org.apache.lucene.index.NoMergePolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.NoMergeScheduler

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.NoMergeScheduler

No usage of org.apache.lucene.index.NoMergeScheduler

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.ParallelReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.ParallelReader

No usage of org.apache.lucene.index.ParallelReader

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.Payload

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.Payload

Packages that use Payload
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.payloads | Provides various convenience classes for creating payloads on Tokens.
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets

Uses of Payload in org.apache.lucene.analysis

Methods in org.apache.lucene.analysis that return Payload
 Payload Token.getPayload()
Returns this Token's payload.

Methods in org.apache.lucene.analysis with parameters of type Payload
 void Token.setPayload(Payload payload)
Sets this Token's payload.

Uses of Payload in org.apache.lucene.analysis.payloads

Methods in org.apache.lucene.analysis.payloads that return Payload
Payload | PayloadEncoder.encode(char[] buffer)
Payload | AbstractEncoder.encode(char[] buffer)
Payload | PayloadEncoder.encode(char[] buffer, int offset, int length) Convert a char array to a Payload
Payload | IntegerEncoder.encode(char[] buffer, int offset, int length)
Payload | FloatEncoder.encode(char[] buffer, int offset, int length)
Payload | IdentityEncoder.encode(char[] buffer, int offset, int length)

Uses of Payload in org.apache.lucene.analysis.tokenattributes

Methods in org.apache.lucene.analysis.tokenattributes that return Payload
Payload | PayloadAttribute.getPayload() Returns this Token's payload.
Payload | PayloadAttributeImpl.getPayload() Returns this Token's payload.

Methods in org.apache.lucene.analysis.tokenattributes with parameters of type Payload
void | PayloadAttribute.setPayload(Payload payload) Sets this Token's payload.
void | PayloadAttributeImpl.setPayload(Payload payload) Sets this Token's payload.

Constructors in org.apache.lucene.analysis.tokenattributes with parameters of type Payload
PayloadAttributeImpl(Payload payload)
Initialize this attribute with the given payload.

Uses of Payload in org.apache.lucene.facet.index.streaming

Fields in org.apache.lucene.facet.index.streaming declared as Payload
protected  Payload CategoryTokenizerBase.payload
The object used for constructing payloads.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.PayloadProcessorProvider.DirPayloadProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.PayloadProcessorProvider.DirPayloadProcessor

Packages that use PayloadProcessorProvider.DirPayloadProcessor
org.apache.lucene.index Code to maintain and access indices.

Uses of PayloadProcessorProvider.DirPayloadProcessor in org.apache.lucene.index

Methods in org.apache.lucene.index that return PayloadProcessorProvider.DirPayloadProcessor
 PayloadProcessorProvider.DirPayloadProcessor PayloadProcessorProvider.getDirProcessor(Directory dir)
Deprecated. Use PayloadProcessorProvider.getReaderProcessor(org.apache.lucene.index.IndexReader) instead. You can still select by Directory, if you retrieve the underlying directory from IndexReader.directory().

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.PayloadProcessorProvider

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.PayloadProcessorProvider

Packages that use PayloadProcessorProvider
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.index | Code to maintain and access indices.

Uses of PayloadProcessorProvider in org.apache.lucene.facet.index

Subclasses of PayloadProcessorProvider in org.apache.lucene.facet.index
 class FacetsPayloadProcessorProvider
A PayloadProcessorProvider for updating facets ordinal references, based on an ordinal map.

Uses of PayloadProcessorProvider in org.apache.lucene.index

Methods in org.apache.lucene.index that return PayloadProcessorProvider
 PayloadProcessorProvider IndexWriter.getPayloadProcessorProvider()
Returns the PayloadProcessorProvider that is used during segment merges to process payloads.

Methods in org.apache.lucene.index with parameters of type PayloadProcessorProvider
 void IndexWriter.setPayloadProcessorProvider(PayloadProcessorProvider pcp)
Sets the PayloadProcessorProvider to use when merging payloads.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.PayloadProcessorProvider.PayloadProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.PayloadProcessorProvider.PayloadProcessor

Packages that use PayloadProcessorProvider.PayloadProcessor
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.index | Code to maintain and access indices.

Uses of PayloadProcessorProvider.PayloadProcessor in org.apache.lucene.facet.index

Subclasses of PayloadProcessorProvider.PayloadProcessor in org.apache.lucene.facet.index
static class FacetsPayloadProcessorProvider.FacetsPayloadProcessor
A PayloadProcessor for updating facets ordinal references, based on an ordinal map

Methods in org.apache.lucene.facet.index that return PayloadProcessorProvider.PayloadProcessor
 PayloadProcessorProvider.PayloadProcessor FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor.getProcessor(Term term)

Uses of PayloadProcessorProvider.PayloadProcessor in org.apache.lucene.index

Methods in org.apache.lucene.index that return PayloadProcessorProvider.PayloadProcessor
abstract  PayloadProcessorProvider.PayloadProcessor PayloadProcessorProvider.ReaderPayloadProcessor.getProcessor(Term term)
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for the given term.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.PayloadProcessorProvider.ReaderPayloadProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.PayloadProcessorProvider.ReaderPayloadProcessor

Packages that use PayloadProcessorProvider.ReaderPayloadProcessor
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.index | Code to maintain and access indices.

Uses of PayloadProcessorProvider.ReaderPayloadProcessor in org.apache.lucene.facet.index

Subclasses of PayloadProcessorProvider.ReaderPayloadProcessor in org.apache.lucene.facet.index
static class FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor

Methods in org.apache.lucene.facet.index that return PayloadProcessorProvider.ReaderPayloadProcessor
 PayloadProcessorProvider.ReaderPayloadProcessor FacetsPayloadProcessorProvider.getReaderProcessor(IndexReader reader)

Uses of PayloadProcessorProvider.ReaderPayloadProcessor in org.apache.lucene.index

Subclasses of PayloadProcessorProvider.ReaderPayloadProcessor in org.apache.lucene.index
static class PayloadProcessorProvider.DirPayloadProcessor
Deprecated. Use PayloadProcessorProvider.ReaderPayloadProcessor instead.

Methods in org.apache.lucene.index that return PayloadProcessorProvider.ReaderPayloadProcessor
 PayloadProcessorProvider.ReaderPayloadProcessor PayloadProcessorProvider.getReaderProcessor(IndexReader reader)
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for the given Directory, through which PayloadProcessorProvider.ReaderPayloadProcessors can be obtained for each Term, or null if none should be used.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.PersistentSnapshotDeletionPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.PersistentSnapshotDeletionPolicy

No usage of org.apache.lucene.index.PersistentSnapshotDeletionPolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.PKIndexSplitter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.PKIndexSplitter

No usage of org.apache.lucene.index.PKIndexSplitter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.PositionBasedTermVectorMapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.PositionBasedTermVectorMapper

No usage of org.apache.lucene.index.PositionBasedTermVectorMapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.PositionBasedTermVectorMapper.TVPositionInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.PositionBasedTermVectorMapper.TVPositionInfo

Packages that use PositionBasedTermVectorMapper.TVPositionInfo
org.apache.lucene.index Code to maintain and access indices.

Uses of PositionBasedTermVectorMapper.TVPositionInfo in org.apache.lucene.index

Methods in org.apache.lucene.index that return types with arguments of type PositionBasedTermVectorMapper.TVPositionInfo
 Map<String,Map<Integer,PositionBasedTermVectorMapper.TVPositionInfo>> PositionBasedTermVectorMapper.getFieldToTerms()
Get the mapping between fields and terms, sorted by the comparator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.PruningReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.PruningReader

No usage of org.apache.lucene.index.PruningReader

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.RandomIndexWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.RandomIndexWriter

No usage of org.apache.lucene.index.RandomIndexWriter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.SegmentInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.SegmentInfo

Packages that use SegmentInfo
org.apache.lucene.index Code to maintain and access indices.

Uses of SegmentInfo in org.apache.lucene.index

Fields in org.apache.lucene.index with type parameters of type SegmentInfo
 List<SegmentInfo> MergePolicy.OneMerge.segments

Methods in org.apache.lucene.index that return SegmentInfo
 SegmentInfo SegmentInfos.info(int i)

Methods in org.apache.lucene.index that return types with arguments of type SegmentInfo
List<SegmentInfo> | SegmentInfos.asList() Returns all contained segments as an unmodifiable List view.
Set<SegmentInfo> | SegmentInfos.asSet() Returns all contained segments as an unmodifiable Set view.
Collection<SegmentInfo> | IndexWriter.getMergingSegments() Expert: to be used by a MergePolicy to avoid selecting merges for segments already being merged.
Iterator<SegmentInfo> | SegmentInfos.iterator() Returns an unmodifiable Iterator of contained segments in order.

Methods in org.apache.lucene.index with parameters of type SegmentInfo
void | SegmentInfos.add(SegmentInfo si)
boolean | SegmentInfos.contains(SegmentInfo si)
static SegmentReader | SegmentReader.get(boolean readOnly, Directory dir, SegmentInfo si, int readBufferSize, boolean doOpenStores, int termInfosIndexDivisor)
static SegmentReader | SegmentReader.get(boolean readOnly, SegmentInfo si, int termInfosIndexDivisor)
int | SegmentInfos.indexOf(SegmentInfo si)
protected boolean | LogMergePolicy.isMerged(SegmentInfo info) Returns true if this single info is already fully merged (has no pending norms or deletes, is in the same dir as the writer, and matches the current compound file setting
int | IndexWriter.numDeletedDocs(SegmentInfo info) Obtain the number of deleted docs for a pooled reader.
void | SegmentInfos.remove(SegmentInfo si)
String | IndexWriter.segString(SegmentInfo info)
protected boolean | UpgradeIndexMergePolicy.shouldUpgradeSegment(SegmentInfo si) Returns if the given segment should be upgraded.
protected long | BalancedSegmentMergePolicy.size(SegmentInfo info)
protected abstract long | LogMergePolicy.size(SegmentInfo info)
protected long | LogByteSizeMergePolicy.size(SegmentInfo info)
protected long | LogDocMergePolicy.size(SegmentInfo info)
protected long | LogMergePolicy.sizeBytes(SegmentInfo info)
protected long | LogMergePolicy.sizeDocs(SegmentInfo info)
boolean | MockRandomMergePolicy.useCompoundFile(SegmentInfos infos, SegmentInfo mergedInfo)
boolean | NoMergePolicy.useCompoundFile(SegmentInfos segments, SegmentInfo newSegment)
boolean | TieredMergePolicy.useCompoundFile(SegmentInfos infos, SegmentInfo mergedInfo)
boolean | LogMergePolicy.useCompoundFile(SegmentInfos infos, SegmentInfo mergedInfo)
boolean | UpgradeIndexMergePolicy.useCompoundFile(SegmentInfos segments, SegmentInfo newSegment)
abstract boolean | MergePolicy.useCompoundFile(SegmentInfos segments, SegmentInfo newSegment) Returns true if a new segment (regardless of its origin) should use the compound file format.

Method parameters in org.apache.lucene.index with type arguments of type SegmentInfo
void | SegmentInfos.addAll(Iterable<SegmentInfo> sis)
MergePolicy.MergeSpecification | BalancedSegmentMergePolicy.findForcedMerges(SegmentInfos infos, int maxNumSegments, Map<SegmentInfo,Boolean> segmentsToMerge)
MergePolicy.MergeSpecification | MockRandomMergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
MergePolicy.MergeSpecification | NoMergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
MergePolicy.MergeSpecification | TieredMergePolicy.findForcedMerges(SegmentInfos infos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
MergePolicy.MergeSpecification | LogMergePolicy.findForcedMerges(SegmentInfos infos, int maxNumSegments, Map<SegmentInfo,Boolean> segmentsToMerge) Returns the merges necessary to merge the index down to a specified number of segments.
MergePolicy.MergeSpecification | UpgradeIndexMergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
abstract MergePolicy.MergeSpecification | MergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge) Determine what set of merge operations is necessary in order to merge to <= the specified segment count.
protected boolean | LogMergePolicy.isMerged(SegmentInfos infos, int maxNumSegments, Map<SegmentInfo,Boolean> segmentsToMerge)
protected TieredMergePolicy.MergeScore | TieredMergePolicy.score(List<SegmentInfo> candidate, boolean hitTooLarge, long mergingBytes) Expert: scores one merge; subclasses can override.
String | IndexWriter.segString(Iterable<SegmentInfo> infos)

Constructor parameters in org.apache.lucene.index with type arguments of type SegmentInfo
MergePolicy.OneMerge(List<SegmentInfo> segments)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.SegmentInfos.FindSegmentsFile

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.SegmentInfos.FindSegmentsFile

No usage of org.apache.lucene.index.SegmentInfos.FindSegmentsFile

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.SegmentInfos

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.SegmentInfos

Packages that use SegmentInfos
org.apache.lucene.index Code to maintain and access indices.

Uses of SegmentInfos in org.apache.lucene.index

Fields in org.apache.lucene.index declared as SegmentInfos
 SegmentInfos IndexSplitter.infos

Methods in org.apache.lucene.index that return SegmentInfos
 SegmentInfos SegmentInfos.range(int first, int last)
Deprecated. use asList().subList(first, last) instead.

Methods in org.apache.lucene.index with parameters of type SegmentInfos
MergePolicy.MergeSpecification | BalancedSegmentMergePolicy.findForcedDeletesMerges(SegmentInfos infos)
MergePolicy.MergeSpecification | MockRandomMergePolicy.findForcedDeletesMerges(SegmentInfos segmentInfos)
MergePolicy.MergeSpecification | NoMergePolicy.findForcedDeletesMerges(SegmentInfos segmentInfos)
MergePolicy.MergeSpecification | TieredMergePolicy.findForcedDeletesMerges(SegmentInfos infos)
MergePolicy.MergeSpecification | LogMergePolicy.findForcedDeletesMerges(SegmentInfos segmentInfos) Finds merges necessary to force-merge all deletes from the index.
MergePolicy.MergeSpecification | UpgradeIndexMergePolicy.findForcedDeletesMerges(SegmentInfos segmentInfos)
abstract MergePolicy.MergeSpecification | MergePolicy.findForcedDeletesMerges(SegmentInfos segmentInfos) Determine what set of merge operations is necessary in order to expunge all deletes from the index.
MergePolicy.MergeSpecification | BalancedSegmentMergePolicy.findForcedMerges(SegmentInfos infos, int maxNumSegments, Map<SegmentInfo,Boolean> segmentsToMerge)
MergePolicy.MergeSpecification | MockRandomMergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
MergePolicy.MergeSpecification | NoMergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
MergePolicy.MergeSpecification | TieredMergePolicy.findForcedMerges(SegmentInfos infos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
MergePolicy.MergeSpecification | LogMergePolicy.findForcedMerges(SegmentInfos infos, int maxNumSegments, Map<SegmentInfo,Boolean> segmentsToMerge) Returns the merges necessary to merge the index down to a specified number of segments.
MergePolicy.MergeSpecification | UpgradeIndexMergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge)
abstract MergePolicy.MergeSpecification | MergePolicy.findForcedMerges(SegmentInfos segmentInfos, int maxSegmentCount, Map<SegmentInfo,Boolean> segmentsToMerge) Determine what set of merge operations is necessary in order to merge to <= the specified segment count.
MergePolicy.MergeSpecification | BalancedSegmentMergePolicy.findMerges(SegmentInfos infos)
MergePolicy.MergeSpecification | MockRandomMergePolicy.findMerges(SegmentInfos segmentInfos)
MergePolicy.MergeSpecification | NoMergePolicy.findMerges(SegmentInfos segmentInfos)
MergePolicy.MergeSpecification | TieredMergePolicy.findMerges(SegmentInfos infos)
MergePolicy.MergeSpecification | LogMergePolicy.findMerges(SegmentInfos infos) Checks if any merges are now necessary and returns a MergePolicy.MergeSpecification if so.
MergePolicy.MergeSpecification | UpgradeIndexMergePolicy.findMerges(SegmentInfos segmentInfos)
abstract MergePolicy.MergeSpecification | MergePolicy.findMerges(SegmentInfos segmentInfos) Determine what set of merge operations are now necessary on the index.
protected boolean | LogMergePolicy.isMerged(SegmentInfos infos, int maxNumSegments, Map<SegmentInfo,Boolean> segmentsToMerge)
boolean | MockRandomMergePolicy.useCompoundFile(SegmentInfos infos, SegmentInfo mergedInfo)
boolean | NoMergePolicy.useCompoundFile(SegmentInfos segments, SegmentInfo newSegment)
boolean | TieredMergePolicy.useCompoundFile(SegmentInfos infos, SegmentInfo mergedInfo)
boolean | LogMergePolicy.useCompoundFile(SegmentInfos infos, SegmentInfo mergedInfo)
boolean | UpgradeIndexMergePolicy.useCompoundFile(SegmentInfos segments, SegmentInfo newSegment)
abstract boolean | MergePolicy.useCompoundFile(SegmentInfos segments, SegmentInfo newSegment) Returns true if a new segment (regardless of its origin) should use the compound file format.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.index.SegmentReader.CoreClosedListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.index.SegmentReader.CoreClosedListener

Packages that use SegmentReader.CoreClosedListener
org.apache.lucene.index Code to maintain and access indices.

Uses of SegmentReader.CoreClosedListener in org.apache.lucene.index

Methods in org.apache.lucene.index with parameters of type SegmentReader.CoreClosedListener
void | SegmentReader.addCoreClosedListener(SegmentReader.CoreClosedListener listener) Expert: adds a CoreClosedListener to this reader's shared core
void | SegmentReader.removeCoreClosedListener(SegmentReader.CoreClosedListener listener) Expert: removes a CoreClosedListener from this reader's shared core

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.SegmentReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.SegmentReader

Packages that use SegmentReader
org.apache.lucene.index Code to maintain and access indices.

Uses of SegmentReader in org.apache.lucene.index

Methods in org.apache.lucene.index that return SegmentReader
static SegmentReader | SegmentReader.get(boolean readOnly, Directory dir, SegmentInfo si, int readBufferSize, boolean doOpenStores, int termInfosIndexDivisor)
static SegmentReader | SegmentReader.get(boolean readOnly, SegmentInfo si, int termInfosIndexDivisor)

Methods in org.apache.lucene.index with parameters of type SegmentReader
 void SegmentReader.CoreClosedListener.onClose(SegmentReader owner)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.SegmentWriteState

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.SegmentWriteState

No usage of org.apache.lucene.index.SegmentWriteState

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.SerialMergeScheduler

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.SerialMergeScheduler

No usage of org.apache.lucene.index.SerialMergeScheduler

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.SlowMultiReaderWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.SlowMultiReaderWrapper

No usage of org.apache.lucene.index.SlowMultiReaderWrapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.SnapshotDeletionPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.SnapshotDeletionPolicy

Packages that use SnapshotDeletionPolicy
org.apache.lucene.index Code to maintain and access indices.

Uses of SnapshotDeletionPolicy in org.apache.lucene.index

Subclasses of SnapshotDeletionPolicy in org.apache.lucene.index
 class PersistentSnapshotDeletionPolicy
A SnapshotDeletionPolicy which adds a persistence layer so that snapshots can be maintained across the life of an application.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint

No usage of org.apache.lucene.index.SnapshotDeletionPolicy.SnapshotCommitPoint

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.SortedTermVectorMapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.SortedTermVectorMapper

No usage of org.apache.lucene.index.SortedTermVectorMapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.StaleReaderException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.StaleReaderException

Packages that use StaleReaderException
org.apache.lucene.index Code to maintain and access indices.

Uses of StaleReaderException in org.apache.lucene.index

Methods in org.apache.lucene.index that throw StaleReaderException
 void IndexReader.deleteDocument(int docNum)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
 int IndexReader.deleteDocuments(Term term)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
 void IndexReader.setNorm(int doc, String field, byte value)
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
 void IndexReader.setNorm(int doc, String field, float value)
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
 void IndexReader.undeleteAll()
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.Term

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.Term

Packages that use Term
org.apache.lucene.analysis.query | Automatically filter high-frequency stopwords.
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.pruning | Static Index Pruning Tools
org.apache.lucene.misc | Miscellaneous index tools.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.complexPhrase | QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
org.apache.lucene.queryParser.surround.query | This package contains SrndQuery and its subclasses.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.function | Programmatic control over documents scores.
org.apache.lucene.search.join | This modules support index-time and query-time joins.
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.regex | Regular expression Query.
org.apache.lucene.search.spans | The calculus of spans.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.

Uses of Term in org.apache.lucene.analysis.query

Methods in org.apache.lucene.analysis.query that return Term
 Term[] QueryAutoStopWordAnalyzer.getStopWords()
Provides information on which stop words have been identified for all fields

Uses of Term in org.apache.lucene.facet.enhancements

Constructors in org.apache.lucene.facet.enhancements with parameters of type Term
EnhancementsPayloadIterator(List<CategoryEnhancement> enhancementsList, IndexReader indexReader, Term term)
Constructor.

Uses of Term in org.apache.lucene.facet.enhancements.association

Fields in org.apache.lucene.facet.enhancements.association declared as Term
static Term AssociationsPayloadIterator.ASSOCIATION_POSTING_TERM
Default Term for associations

Uses of Term in org.apache.lucene.facet.index

Methods in org.apache.lucene.facet.index with parameters of type Term
 PayloadProcessorProvider.PayloadProcessor FacetsPayloadProcessorProvider.FacetsDirPayloadProcessor.getProcessor(Term term)

Uses of Term in org.apache.lucene.facet.index.params

Fields in org.apache.lucene.facet.index.params declared as Term
static Term CategoryListParams.DEFAULT_TERM
The default term used to store the facets information.

Methods in org.apache.lucene.facet.index.params that return Term
 Term CategoryListParams.getTerm()
A Term who's payload holds the category-list.

Constructors in org.apache.lucene.facet.index.params with parameters of type Term
CategoryListParams(Term term)
Constructs a category list parameters object, using the given Term.

Uses of Term in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search that return Term
static Term | DrillDown.term(FacetIndexingParams iParams, CategoryPath path) Return a term for drilling down into a category.
static Term | DrillDown.term(FacetSearchParams sParams, CategoryPath path)

Constructors in org.apache.lucene.facet.search with parameters of type Term
PayloadIntDecodingIterator(IndexReader indexReader, Term term, IntDecoder decoder)
PayloadIntDecodingIterator(IndexReader indexReader, Term term, IntDecoder decoder, byte[] buffer)
PayloadIterator(IndexReader indexReader, Term term)
PayloadIterator(IndexReader indexReader, Term term, byte[] buffer)

Uses of Term in org.apache.lucene.index

Methods in org.apache.lucene.index that return Term
 Term Term.createTerm(String text)
Optimized construction of new Terms by reusing same field as this Term - avoids field.intern() overhead
abstract  Term TermEnum.term()
Returns the current Term in the enumeration.
 Term FilterIndexReader.FilterTermEnum.term()

Methods in org.apache.lucene.index with parameters of type Term
protected  void ThreadedIndexingAndSearchingTestCase.addDocument(Term id, Document doc)
protected  void ThreadedIndexingAndSearchingTestCase.addDocuments(Term id, Collection<Document> docs)
 int Term.compareTo(Term other)
Compares two terms, returning a negative integer if this term belongs before the argument, zero if this term is equal to the argument, and a positive integer if this term belongs after the argument.
 void IndexWriter.deleteDocuments(Term... terms)
Deletes the document(s) containing any of the terms.
 void RandomIndexWriter.deleteDocuments(Term term)
protected  void ThreadedIndexingAndSearchingTestCase.deleteDocuments(Term term)
 int IndexReader.deleteDocuments(Term term)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
 void IndexWriter.deleteDocuments(Term term)
Deletes the document(s) containing term.
abstract  int IndexReader.docFreq(Term t)
Returns the number of documents containing the term t.
 int MultiReader.docFreq(Term t)
 int SegmentReader.docFreq(Term t)
 int ParallelReader.docFreq(Term term)
 int FilterIndexReader.docFreq(Term t)
abstract  PayloadProcessorProvider.PayloadProcessor PayloadProcessorProvider.ReaderPayloadProcessor.getProcessor(Term term)
Returns a PayloadProcessorProvider.ReaderPayloadProcessor for the given term.
 TermDocs SegmentReader.rawTermDocs(Term term)
Expert: returns an enumeration of the documents that contain term, including deleted documents (which are normally filtered out).
 void MultipleTermPositions.seek(Term arg0)
Not implemented.
 void AbstractAllTermDocs.seek(Term term)
 void TermDocs.seek(Term term)
Sets this to the data for a term.
 void FilterIndexReader.FilterTermDocs.seek(Term term)
 TermDocs IndexReader.termDocs(Term term)
Returns an enumeration of all the documents which contain term.
 TermDocs MultiReader.termDocs(Term term)
 TermDocs SegmentReader.termDocs(Term term)
 TermDocs ParallelReader.termDocs(Term term)
 TermDocs FilterIndexReader.termDocs(Term term)
 TermPositions IndexReader.termPositions(Term term)
Returns an enumeration of all the documents which contain term.
abstract  TermEnum IndexReader.terms(Term t)
Returns an enumeration of all terms starting at a given term.
 TermEnum MultiReader.terms(Term term)
 TermEnum SegmentReader.terms(Term t)
 TermEnum ParallelReader.terms(Term term)
 TermEnum FilterIndexReader.terms(Term t)
 void RandomIndexWriter.updateDocument(Term t, Document doc)
Updates a document.
protected  void ThreadedIndexingAndSearchingTestCase.updateDocument(Term term, Document doc)
 void IndexWriter.updateDocument(Term term, Document doc)
Updates a document by first deleting the document(s) containing term and then adding the new document.
 void IndexWriter.updateDocument(Term term, Document doc, Analyzer analyzer)
Updates a document by first deleting the document(s) containing term and then adding the new document.
 void RandomIndexWriter.updateDocuments(Term delTerm, Collection<Document> docs)
protected  void ThreadedIndexingAndSearchingTestCase.updateDocuments(Term id, Collection<Document> docs)
 void IndexWriter.updateDocuments(Term delTerm, Collection<Document> docs)
Atomically deletes documents matching the provided delTerm and adds a block of documents with sequentially assigned document IDs, such that an external reader will see all or none of the documents.
 void IndexWriter.updateDocuments(Term delTerm, Collection<Document> docs, Analyzer analyzer)
Atomically deletes documents matching the provided delTerm and adds a block of documents, analyzed using the provided analyzer, with sequentially assigned document IDs, such that an external reader will see all or none of the documents.

Constructors in org.apache.lucene.index with parameters of type Term
MultipleTermPositions(IndexReader indexReader, Term[] terms)
Creates a new MultipleTermPositions instance.
PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Term midTerm)
Deprecated. use PKIndexSplitter.PKIndexSplitter(Version, Directory, Directory, Directory, Term) instead. This constructor will be removed in Lucene 4.0.
PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Term midTerm, IndexWriterConfig config1, IndexWriterConfig config2)
PKIndexSplitter(Version version, Directory input, Directory dir1, Directory dir2, Term midTerm)
Split an index based on a given primary key term and a 'middle' term.

Uses of Term in org.apache.lucene.index.pruning

Methods in org.apache.lucene.index.pruning with parameters of type Term
void | CarmelUniformTermPruningPolicy.initPositionsTerm(TermPositions tp, Term t)
void | RIDFTermPruningPolicy.initPositionsTerm(TermPositions tp, Term t)
void | TFTermPruningPolicy.initPositionsTerm(TermPositions in, Term t)
abstract void | TermPruningPolicy.initPositionsTerm(TermPositions in, Term t) Called when moving TermPositions to a new Term.
void | CarmelTopKTermPruningPolicy.initPositionsTerm(TermPositions tp, Term t)
boolean | CarmelUniformTermPruningPolicy.pruneAllPositions(TermPositions termPositions, Term t)
boolean | RIDFTermPruningPolicy.pruneAllPositions(TermPositions termPositions, Term t)
boolean | TFTermPruningPolicy.pruneAllPositions(TermPositions termPositions, Term t)
abstract boolean | TermPruningPolicy.pruneAllPositions(TermPositions termPositions, Term t) Prune all postings per term (invoked once per term per doc)
boolean | CarmelTopKTermPruningPolicy.pruneAllPositions(TermPositions termPositions, Term t)
boolean | TermPruningPolicy.prunePayload(TermPositions in, Term curTerm) Called when checking for the presence of payload for the current term at a current position
int | CarmelUniformTermPruningPolicy.pruneSomePositions(int docNum, int[] positions, Term curTerm)
int | RIDFTermPruningPolicy.pruneSomePositions(int docNum, int[] positions, Term curTerm)
int | TFTermPruningPolicy.pruneSomePositions(int docNum, int[] positions, Term curTerm)
abstract int | TermPruningPolicy.pruneSomePositions(int docNum, int[] positions, Term curTerm) Prune some postings per term (invoked once per term per doc).
int | CarmelTopKTermPruningPolicy.pruneSomePositions(int docNum, int[] positions, Term curTerm)

Uses of Term in org.apache.lucene.misc

Methods in org.apache.lucene.misc with parameters of type Term
static void | GetTermInfo.getTermInfo(Directory dir, Term term)
static long | HighFreqTerms.getTotalTermFreq(IndexReader reader, Term term)

Uses of Term in org.apache.lucene.queryParser

Methods in org.apache.lucene.queryParser with parameters of type Term
protected Query | QueryParser.newFuzzyQuery(Term term, float minimumSimilarity, int prefixLength) Builds a new FuzzyQuery instance
protected Query | QueryParser.newPrefixQuery(Term prefix) Builds a new PrefixQuery instance
protected Query | QueryParser.newTermQuery(Term term) Builds a new TermQuery instance
protected Query | QueryParser.newWildcardQuery(Term t) Builds a new WildcardQuery instance

Uses of Term in org.apache.lucene.queryParser.complexPhrase

Methods in org.apache.lucene.queryParser.complexPhrase with parameters of type Term
protected  Query ComplexPhraseQueryParser.newTermQuery(Term term)

Uses of Term in org.apache.lucene.queryParser.surround.query

Methods in org.apache.lucene.queryParser.surround.query that return Term
Term | SrndPrefixQuery.getLucenePrefixTerm(String fieldName)
Term | SrndTermQuery.getLuceneTerm(String fieldName)

Methods in org.apache.lucene.queryParser.surround.query with parameters of type Term
void | SpanNearClauseFactory.addTermWeighted(Term t, float weight)
SpanTermQuery | BasicQueryFactory.newSpanTermQuery(Term term)
TermQuery | BasicQueryFactory.newTermQuery(Term term)
void | SimpleTerm.MatchingTermVisitor.visitMatchingTerm(Term t)

Uses of Term in org.apache.lucene.search

Fields in org.apache.lucene.search declared as Term
protected Term | FilteredTermEnum.currentTerm the current term
protected Term | WildcardQuery.term
protected Term | FuzzyQuery.term

Methods in org.apache.lucene.search that return Term
Term | PrefixFilter.getPrefix()
Term | PrefixQuery.getPrefix() Returns the prefix of this query.
protected Term | PrefixTermEnum.getPrefixTerm()
Term | WildcardQuery.getTerm() Returns the pattern term.
Term | TermQuery.getTerm() Returns the term of this query.
Term | FuzzyQuery.getTerm() Returns the pattern term.
Term[] | PhraseQuery.getTerms() Returns the set of terms in this phrase.
protected Term | SearchEquivalenceTestBase.randomTerm() returns a term suitable for searching.
Term | FilteredTermEnum.term() Returns the current Term in the enumeration.

Methods in org.apache.lucene.search with parameters of type Term
 void PhraseQuery.add(Term term)
Adds a term to the end of the query phrase.
 void MultiPhraseQuery.add(Term term)
Add a single term at the next position in the phrase.
 void MultiPhraseQuery.add(Term[] terms)
Add multiple terms at the next position in the phrase.
 void MultiPhraseQuery.add(Term[] terms, int position)
Allows to specify the relative position of terms within the phrase.
 void PhraseQuery.add(Term term, int position)
Adds a term to the end of the query phrase.
protected  void MultiTermQuery.TopTermsScoringBooleanQueryRewrite.addClause(BooleanQuery topLevel, Term term, float boost)
protected  void MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite.addClause(BooleanQuery topLevel, Term term, float boost)
 void TermsFilter.addTerm(Term term)
Adds a term to the list of acceptable terms
 long NRTManager.TrackingIndexWriter.deleteDocuments(Term... terms)
 long NRTManager.TrackingIndexWriter.deleteDocuments(Term t)
 int RemoteSearchable.docFreq(Term term)
Deprecated.
 int IndexSearcher.docFreq(Term term)
Returns total docFreq for this term.
abstract  int Searcher.docFreq(Term term)
Deprecated.
 int Searchable.docFreq(Term term)
Deprecated. Expert: Returns the number of documents containing term.
 int ParallelMultiSearcher.docFreq(Term term)
Deprecated. Executes each Searchable's docFreq() in its own thread and waits for each search to complete and merge the results back together.
 int MultiSearcher.docFreq(Term term)
Deprecated.
 int[] RemoteSearchable.docFreqs(Term[] terms)
Deprecated.
 int[] Searcher.docFreqs(Term[] terms)
Deprecated.
 int[] Searchable.docFreqs(Term[] terms)
Deprecated. Expert: For each term in the terms array, calculates the number of documents containing term.
 Explanation.IDFExplanation Similarity.idfExplain(Term term, Searcher searcher)
This method forwards to Similarity.idfExplain(Term,Searcher,int) by passing searcher.docFreq(term) as the docFreq.
 Explanation.IDFExplanation Similarity.idfExplain(Term term, Searcher searcher, int docFreq)
Computes a score factor for a simple term and returns an explanation for that score factor.
protected  boolean WildcardTermEnum.termCompare(Term term)
protected abstract  boolean FilteredTermEnum.termCompare(Term term)
Equality compare on the term
protected  boolean FuzzyTermEnum.termCompare(Term term)
The termCompare method in FuzzyTermEnum uses Levenshtein distance to calculate the distance between the given term and the comparing term.
protected  boolean PrefixTermEnum.termCompare(Term term)
protected  boolean SingleTermEnum.termCompare(Term term)
protected  boolean TermRangeTermEnum.termCompare(Term term)
 long NRTManager.TrackingIndexWriter.updateDocument(Term t, Document d)
 long NRTManager.TrackingIndexWriter.updateDocument(Term t, Document d, Analyzer a)
 long NRTManager.TrackingIndexWriter.updateDocuments(Term t, Collection<Document> docs)
 long NRTManager.TrackingIndexWriter.updateDocuments(Term t, Collection<Document> docs, Analyzer a)

Method parameters in org.apache.lucene.search with type arguments of type Term
void | PhraseQuery.extractTerms(Set<Term> queryTerms)
void | DisjunctionMaxQuery.extractTerms(Set<Term> terms)
void | ConstantScoreQuery.extractTerms(Set<Term> terms)
void | MultiPhraseQuery.extractTerms(Set<Term> terms)
void | TermQuery.extractTerms(Set<Term> terms)
void | BooleanQuery.extractTerms(Set<Term> terms)
void | MatchAllDocsQuery.extractTerms(Set<Term> terms)
void | FilteredQuery.extractTerms(Set<Term> terms)
void | Query.extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
Explanation.IDFExplanation | Similarity.idfExplain(Collection<Term> terms, Searcher searcher) Computes a score factor for a phrase.

Constructors in org.apache.lucene.search with parameters of type Term
FuzzyQuery(Term term)
Calls FuzzyQuery(term, 0.5f, 0, Integer.MAX_VALUE).
FuzzyQuery(Term term, float minimumSimilarity)
Calls FuzzyQuery(term, minimumSimilarity, 0, Integer.MAX_VALUE).
FuzzyQuery(Term term, float minimumSimilarity, int prefixLength)
Calls FuzzyQuery(term, minimumSimilarity, prefixLength, Integer.MAX_VALUE).
FuzzyQuery(Term term, float minimumSimilarity, int prefixLength, int maxExpansions)
Create a new FuzzyQuery that will match terms with a similarity of at least minimumSimilarity to term.
FuzzyTermEnum(IndexReader reader, Term term)
Creates a FuzzyTermEnum with an empty prefix and a minSimilarity of 0.5f.
FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity)
Creates a FuzzyTermEnum with an empty prefix.
FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity, int prefixLength)
Constructor for enumeration of all terms from specified reader which share a prefix of length prefixLength with term and which have a fuzzy similarity > minSimilarity.
PrefixFilter(Term prefix)
PrefixQuery(Term prefix)
Constructs a query for terms starting with prefix.
PrefixTermEnum(IndexReader reader, Term prefix)
SingleTermEnum(IndexReader reader, Term singleTerm)
Creates a new SingleTermEnum.
TermQuery(Term t)
Constructs a query for the term t.
WildcardQuery(Term term)
WildcardTermEnum(IndexReader reader, Term term)
Creates a new WildcardTermEnum.

Uses of Term in org.apache.lucene.search.function

Method parameters in org.apache.lucene.search.function with type arguments of type Term
void | ValueSourceQuery.extractTerms(Set<Term> terms)
void | CustomScoreQuery.extractTerms(Set<Term> terms)

Uses of Term in org.apache.lucene.search.join

Method parameters in org.apache.lucene.search.join with type arguments of type Term
void | ToChildBlockJoinQuery.extractTerms(Set<Term> terms)
void | ToParentBlockJoinQuery.extractTerms(Set<Term> terms)

Constructors in org.apache.lucene.search.join with parameters of type Term
RawTermFilter(Term term)

Uses of Term in org.apache.lucene.search.payloads

Constructors in org.apache.lucene.search.payloads with parameters of type Term
PayloadTermQuery(Term term, PayloadFunction function)
PayloadTermQuery(Term term, PayloadFunction function, boolean includeSpanScore)

Uses of Term in org.apache.lucene.search.regex

Methods in org.apache.lucene.search.regex that return Term
Term | RegexQuery.getTerm()
Term | SpanRegexQuery.getTerm() Deprecated.

Methods in org.apache.lucene.search.regex with parameters of type Term
protected  boolean RegexTermEnum.termCompare(Term term)

Constructors in org.apache.lucene.search.regex with parameters of type Term
RegexQuery(Term term)
Constructs a query for terms matching term.
RegexTermEnum(IndexReader reader, Term term, RegexCapabilities regexImpl)
SpanRegexQuery(Term term)
Deprecated.

Uses of Term in org.apache.lucene.search.spans

Fields in org.apache.lucene.search.spans declared as Term
protected Term | SpanTermQuery.term
protected Term | TermSpans.term

Fields in org.apache.lucene.search.spans with type parameters of type Term
protected  Set<Term> SpanWeight.terms

Methods in org.apache.lucene.search.spans that return Term
 Term SpanTermQuery.getTerm()
Return the term whose spans are matched.

Method parameters in org.apache.lucene.search.spans with type arguments of type Term
void | SpanOrQuery.extractTerms(Set<Term> terms)
void | SpanNearQuery.extractTerms(Set<Term> terms)
void | SpanPositionCheckQuery.extractTerms(Set<Term> terms)
void | SpanNotQuery.extractTerms(Set<Term> terms)
void | SpanTermQuery.extractTerms(Set<Term> terms)
void | FieldMaskingSpanQuery.extractTerms(Set<Term> terms)

Constructors in org.apache.lucene.search.spans with parameters of type Term
SpanTermQuery(Term term)
Construct a SpanTermQuery matching the named term's spans.
TermSpans(TermPositions positions, Term term)

Uses of Term in org.apache.lucene.store.instantiated

Methods in org.apache.lucene.store.instantiated that return Term
Term | InstantiatedTerm.getTerm()
Term | InstantiatedTermEnum.term() Returns the current Term in the enumeration.

Methods in org.apache.lucene.store.instantiated with parameters of type Term
void | InstantiatedIndexWriter.deleteDocuments(Term term) Deprecated.
void | InstantiatedIndexWriter.deleteDocuments(Term[] terms) Deprecated.
int | InstantiatedIndexReader.docFreq(Term t) Deprecated.
void | InstantiatedTermDocs.seek(Term term)
TermDocs | InstantiatedIndexReader.termDocs(Term term) Deprecated.
TermEnum | InstantiatedIndexReader.terms(Term t) Deprecated.
void | InstantiatedIndexWriter.updateDocument(Term term, Document doc) Deprecated.
void | InstantiatedIndexWriter.updateDocument(Term term, Document doc, Analyzer analyzer) Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.index.TermDocs

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.index.TermDocs

Packages that use TermDocs
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.

Uses of TermDocs in org.apache.lucene.index

Subinterfaces of TermDocs in org.apache.lucene.index
 interface TermPositions
TermPositions provides an interface for enumerating the <document, frequency, <position>* > tuples for a term.

Classes in org.apache.lucene.index that implement TermDocs
class | AbstractAllTermDocs Base class for enumerating all but deleted docs.
static class | FilterIndexReader.FilterTermDocs Base class for filtering TermDocs implementations.
static class | FilterIndexReader.FilterTermPositions Base class for filtering TermPositions implementations.
class | MultipleTermPositions Allows you to iterate over the TermPositions for multiple Terms as a single TermPositions.

Fields in org.apache.lucene.index declared as TermDocs
protected  TermDocs FilterIndexReader.FilterTermDocs.in

Methods in org.apache.lucene.index that return TermDocs
TermDocs | SegmentReader.rawTermDocs(Term term) Expert: returns an enumeration of the documents that contain term, including deleted documents (which are normally filtered out).
abstract TermDocs | IndexReader.termDocs() Returns an unpositioned TermDocs enumerator.
TermDocs | MultiReader.termDocs()
TermDocs | SegmentReader.termDocs()
TermDocs | ParallelReader.termDocs()
TermDocs | FilterIndexReader.termDocs()
TermDocs | IndexReader.termDocs(Term term) Returns an enumeration of all the documents which contain term.
TermDocs | MultiReader.termDocs(Term term)
TermDocs | SegmentReader.termDocs(Term term)
TermDocs | ParallelReader.termDocs(Term term)
TermDocs | FilterIndexReader.termDocs(Term term)

Constructors in org.apache.lucene.index with parameters of type TermDocs
FilterIndexReader.FilterTermDocs(TermDocs in)

Uses of TermDocs in org.apache.lucene.store.instantiated

Classes in org.apache.lucene.store.instantiated that implement TermDocs
class | InstantiatedTermDocs A TermDocs navigating an InstantiatedIndexReader.
class | InstantiatedTermPositions A TermPositions navigating an InstantiatedIndexReader.

Methods in org.apache.lucene.store.instantiated that return TermDocs
TermDocs | InstantiatedIndexReader.termDocs() Deprecated.
TermDocs | InstantiatedIndexReader.termDocs(Term term) Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.TermEnum

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.TermEnum

Packages that use TermEnum
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.pruning | Static Index Pruning Tools
org.apache.lucene.queryParser.surround.query | This package contains SrndQuery and its subclasses.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.regex | Regular expression Query.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.

Uses of TermEnum in org.apache.lucene.index

Subclasses of TermEnum in org.apache.lucene.index
static class FilterIndexReader.FilterTermEnum
Base class for filtering TermEnum implementations.

Fields in org.apache.lucene.index declared as TermEnum
protected  TermEnum FilterIndexReader.FilterTermEnum.in

Methods in org.apache.lucene.index that return TermEnum
TermEnum | PruningReader.terms() Applies TermPruningPolicy to term enum.
abstract TermEnum | IndexReader.terms() Returns an enumeration of all the terms in the index.
TermEnum | MultiReader.terms()
TermEnum | SegmentReader.terms()
TermEnum | ParallelReader.terms()
TermEnum | FilterIndexReader.terms()
abstract TermEnum | IndexReader.terms(Term t) Returns an enumeration of all terms starting at a given term.
TermEnum | MultiReader.terms(Term term)
TermEnum | SegmentReader.terms(Term t)
TermEnum | ParallelReader.terms(Term term)
TermEnum | FilterIndexReader.terms(Term t)

Methods in org.apache.lucene.index with parameters of type TermEnum
void | MultipleTermPositions.seek(TermEnum termEnum) Not implemented.
void | AbstractAllTermDocs.seek(TermEnum termEnum)
void | TermDocs.seek(TermEnum termEnum) Sets this to the data for the current term in a TermEnum.
void | FilterIndexReader.FilterTermDocs.seek(TermEnum termEnum)

Constructors in org.apache.lucene.index with parameters of type TermEnum
FilterIndexReader.FilterTermEnum(TermEnum in)

Uses of TermEnum in org.apache.lucene.index.pruning

Methods in org.apache.lucene.index.pruning with parameters of type TermEnum
boolean | CarmelUniformTermPruningPolicy.pruneTermEnum(TermEnum te)
boolean | RIDFTermPruningPolicy.pruneTermEnum(TermEnum te)
boolean | TFTermPruningPolicy.pruneTermEnum(TermEnum te)
abstract boolean | TermPruningPolicy.pruneTermEnum(TermEnum te) Pruning of all postings for a term (invoked once per term).
boolean | CarmelTopKTermPruningPolicy.pruneTermEnum(TermEnum te)

Uses of TermEnum in org.apache.lucene.queryParser.surround.query

Methods in org.apache.lucene.queryParser.surround.query that return TermEnum
 TermEnum SpanNearClauseFactory.getTermEnum(String termText)

Uses of TermEnum in org.apache.lucene.search

Subclasses of TermEnum in org.apache.lucene.search
class | FilteredTermEnum Abstract class for enumerating a subset of all terms.
class | FuzzyTermEnum Subclass of FilteredTermEnum for enumerating all terms that are similar to the specified filter term.
class | PrefixTermEnum Subclass of FilteredTermEnum for enumerating all terms that match the specified prefix filter term.
class | SingleTermEnum Subclass of FilteredTermEnum for enumerating a single term.
class | TermRangeTermEnum Subclass of FilteredTermEnum for enumerating all terms that match the specified range parameters.
class | WildcardTermEnum Subclass of FilteredTermEnum for enumerating all terms that match the specified wildcard filter term.

Fields in org.apache.lucene.search declared as TermEnum
protected  TermEnum FilteredTermEnum.actualEnum
the delegate enum - to set this member use FilteredTermEnum.setEnum(org.apache.lucene.index.TermEnum)

Methods in org.apache.lucene.search with parameters of type TermEnum
protected  void FilteredTermEnum.setEnum(TermEnum actualEnum)
use this method to set the actual TermEnum (e.g.

Uses of TermEnum in org.apache.lucene.search.regex

Subclasses of TermEnum in org.apache.lucene.search.regex
 class RegexTermEnum
Subclass of FilteredTermEnum for enumerating all terms that match the specified regular expression term using the specified regular expression implementation.

Uses of TermEnum in org.apache.lucene.store.instantiated

Subclasses of TermEnum in org.apache.lucene.store.instantiated
 class InstantiatedTermEnum
A TermEnum navigating an InstantiatedIndexReader.

Methods in org.apache.lucene.store.instantiated that return TermEnum
TermEnum | InstantiatedIndexReader.terms() Deprecated.
TermEnum | InstantiatedIndexReader.terms(Term t) Deprecated.

Methods in org.apache.lucene.store.instantiated with parameters of type TermEnum
 void InstantiatedTermDocs.seek(TermEnum termEnum)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.index.TermFreqVector

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.index.TermFreqVector

Packages that use TermFreqVector
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.pruning | Static Index Pruning Tools
org.apache.lucene.search | Code to search indices.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.

Uses of TermFreqVector in org.apache.lucene.index

Subinterfaces of TermFreqVector in org.apache.lucene.index
 interface TermPositionVector
Extends TermFreqVector to provide additional information about positions in which each of the terms is found.

Methods in org.apache.lucene.index that return TermFreqVector
abstract TermFreqVector | IndexReader.getTermFreqVector(int docNumber, String field) Return a term frequency vector for the specified document and field.
TermFreqVector | MultiReader.getTermFreqVector(int n, String field)
TermFreqVector | SegmentReader.getTermFreqVector(int docNumber, String field) Return a term frequency vector for the specified document and field.
TermFreqVector | ParallelReader.getTermFreqVector(int n, String field)
TermFreqVector | FilterIndexReader.getTermFreqVector(int docNumber, String field)
TermFreqVector[] | PruningReader.getTermFreqVectors(int docNumber) Applies TermPruningPolicy to terms inside term vectors.
abstract TermFreqVector[] | IndexReader.getTermFreqVectors(int docNumber) Return an array of term frequency vectors for the specified document.
TermFreqVector[] | MultiReader.getTermFreqVectors(int n)
TermFreqVector[] | SegmentReader.getTermFreqVectors(int docNumber) Return an array of term frequency vectors for the specified document.
TermFreqVector[] | ParallelReader.getTermFreqVectors(int n)
TermFreqVector[] | FilterIndexReader.getTermFreqVectors(int docNumber)

Uses of TermFreqVector in org.apache.lucene.index.pruning

Methods in org.apache.lucene.index.pruning with parameters of type TermFreqVector
int | CarmelUniformTermPruningPolicy.pruneTermVectorTerms(int docNumber, String field, String[] terms, int[] freqs, TermFreqVector tfv)
int | RIDFTermPruningPolicy.pruneTermVectorTerms(int docNumber, String field, String[] terms, int[] freqs, TermFreqVector v)
int | TFTermPruningPolicy.pruneTermVectorTerms(int docNumber, String field, String[] terms, int[] freqs, TermFreqVector tfv)
abstract int | TermPruningPolicy.pruneTermVectorTerms(int docNumber, String field, String[] terms, int[] freqs, TermFreqVector v) Pruning of individual terms in term vectors.
int | CarmelTopKTermPruningPolicy.pruneTermVectorTerms(int docNumber, String field, String[] terms, int[] freqs, TermFreqVector tfv)

Uses of TermFreqVector in org.apache.lucene.search

Classes in org.apache.lucene.search that implement TermFreqVector
 class QueryTermVector

Uses of TermFreqVector in org.apache.lucene.store.instantiated

Classes in org.apache.lucene.store.instantiated that implement TermFreqVector
class | InstantiatedTermFreqVector Vector space view of a document in an InstantiatedIndexReader.
class | InstantiatedTermPositionVector Extended vector space view of a document in an InstantiatedIndexReader.

Methods in org.apache.lucene.store.instantiated that return TermFreqVector
TermFreqVector | InstantiatedIndexReader.getTermFreqVector(int docNumber, String field) Deprecated.
TermFreqVector[] | InstantiatedIndexReader.getTermFreqVectors(int docNumber) Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.index.TermPositions

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.index.TermPositions

Packages that use TermPositions
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.pruning | Static Index Pruning Tools
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.spans | The calculus of spans.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.

Uses of TermPositions in org.apache.lucene.index

Classes in org.apache.lucene.index that implement TermPositions
static class | FilterIndexReader.FilterTermPositions Base class for filtering TermPositions implementations.
class | MultipleTermPositions Allows you to iterate over the TermPositions for multiple Terms as a single TermPositions.

Methods in org.apache.lucene.index that return TermPositions
TermPositions | PruningReader.termPositions() Applies TermPruningPolicy to term positions.
abstract TermPositions | IndexReader.termPositions() Returns an unpositioned TermPositions enumerator.
TermPositions | MultiReader.termPositions()
TermPositions | SegmentReader.termPositions()
TermPositions | ParallelReader.termPositions()
TermPositions | FilterIndexReader.termPositions()
TermPositions | IndexReader.termPositions(Term term) Returns an enumeration of all the documents which contain term.

Constructors in org.apache.lucene.index with parameters of type TermPositions
FilterIndexReader.FilterTermPositions(TermPositions in)

Uses of TermPositions in org.apache.lucene.index.pruning

Methods in org.apache.lucene.index.pruning with parameters of type TermPositions
void | CarmelUniformTermPruningPolicy.initPositionsTerm(TermPositions tp, Term t)
void | RIDFTermPruningPolicy.initPositionsTerm(TermPositions tp, Term t)
void | TFTermPruningPolicy.initPositionsTerm(TermPositions in, Term t)
abstract void | TermPruningPolicy.initPositionsTerm(TermPositions in, Term t) Called when moving TermPositions to a new Term.
void | CarmelTopKTermPruningPolicy.initPositionsTerm(TermPositions tp, Term t)
boolean | CarmelUniformTermPruningPolicy.pruneAllPositions(TermPositions termPositions, Term t)
boolean | RIDFTermPruningPolicy.pruneAllPositions(TermPositions termPositions, Term t)
boolean | TFTermPruningPolicy.pruneAllPositions(TermPositions termPositions, Term t)
abstract boolean | TermPruningPolicy.pruneAllPositions(TermPositions termPositions, Term t) Prune all postings per term (invoked once per term per doc)
boolean | CarmelTopKTermPruningPolicy.pruneAllPositions(TermPositions termPositions, Term t)
boolean | TermPruningPolicy.prunePayload(TermPositions in, Term curTerm) Called when checking for the presence of payload for the current term at a current position

Uses of TermPositions in org.apache.lucene.search.payloads

Fields in org.apache.lucene.search.payloads declared as TermPositions
protected  TermPositions PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer.positions

Uses of TermPositions in org.apache.lucene.search.spans

Fields in org.apache.lucene.search.spans declared as TermPositions
protected  TermPositions TermSpans.positions

Methods in org.apache.lucene.search.spans that return TermPositions
 TermPositions TermSpans.getPositions()

Constructors in org.apache.lucene.search.spans with parameters of type TermPositions
TermSpans(TermPositions positions, Term term)

Uses of TermPositions in org.apache.lucene.store.instantiated

Classes in org.apache.lucene.store.instantiated that implement TermPositions
 class InstantiatedTermPositions
A TermPositions navigating an InstantiatedIndexReader.

Methods in org.apache.lucene.store.instantiated that return TermPositions
 TermPositions InstantiatedIndexReader.termPositions()
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.index.TermPositionVector

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.index.TermPositionVector

Packages that use TermPositionVector
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.

Uses of TermPositionVector in org.apache.lucene.search.highlight

Methods in org.apache.lucene.search.highlight with parameters of type TermPositionVector
static TokenStream | TokenSources.getTokenStream(TermPositionVector tpv)
static TokenStream | TokenSources.getTokenStream(TermPositionVector tpv, boolean tokenPositionsGuaranteedContiguous) Low level api.

Constructors in org.apache.lucene.search.highlight with parameters of type TermPositionVector
TokenStreamFromTermPositionVector(TermPositionVector termPositionVector)
Constructor.

Uses of TermPositionVector in org.apache.lucene.store.instantiated

Classes in org.apache.lucene.store.instantiated that implement TermPositionVector
 class InstantiatedTermPositionVector
Extended vector space view of a document in an InstantiatedIndexReader.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.TermVectorAccessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.TermVectorAccessor

No usage of org.apache.lucene.index.TermVectorAccessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.TermVectorEntry

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.TermVectorEntry

Packages that use TermVectorEntry
org.apache.lucene.index Code to maintain and access indices.

Uses of TermVectorEntry in org.apache.lucene.index

Methods in org.apache.lucene.index that return types with arguments of type TermVectorEntry
Comparator<TermVectorEntry> | FieldSortedTermVectorMapper.getComparator()
Map<String,SortedSet<TermVectorEntry>> | FieldSortedTermVectorMapper.getFieldToTerms() Get the mapping between fields and terms, sorted by the comparator
SortedSet<TermVectorEntry> | SortedTermVectorMapper.getTermVectorEntrySet() The TermVectorEntrySet.

Methods in org.apache.lucene.index with parameters of type TermVectorEntry
 int TermVectorEntryFreqSortedComparator.compare(TermVectorEntry entry, TermVectorEntry entry1)

Constructor parameters in org.apache.lucene.index with type arguments of type TermVectorEntry
FieldSortedTermVectorMapper(boolean ignoringPositions, boolean ignoringOffsets, Comparator<TermVectorEntry> comparator)
FieldSortedTermVectorMapper(Comparator<TermVectorEntry> comparator)
SortedTermVectorMapper(boolean ignoringPositions, boolean ignoringOffsets, Comparator<TermVectorEntry> comparator)
SortedTermVectorMapper(Comparator<TermVectorEntry> comparator)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.TermVectorEntryFreqSortedComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.TermVectorEntryFreqSortedComparator

No usage of org.apache.lucene.index.TermVectorEntryFreqSortedComparator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.TermVectorMapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.TermVectorMapper

Packages that use TermVectorMapper
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.

Uses of TermVectorMapper in org.apache.lucene.index

Subclasses of TermVectorMapper in org.apache.lucene.index
class | FieldSortedTermVectorMapper For each Field, store a sorted collection of TermVectorEntrys This is not thread-safe.
class | PositionBasedTermVectorMapper For each Field, store position by position information.
class | SortedTermVectorMapper Store a sorted collection of TermVectorEntrys.

Methods in org.apache.lucene.index with parameters of type TermVectorMapper
void | TermVectorAccessor.accept(IndexReader indexReader, int documentNumber, String fieldName, TermVectorMapper mapper) Visits the TermVectorMapper and populates it with terms available for a given document, either via a vector created at index time or by resolving them from the inverted index.
abstract void | IndexReader.getTermFreqVector(int docNumber, String field, TermVectorMapper mapper) Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the TermFreqVector.
void | MultiReader.getTermFreqVector(int docNumber, String field, TermVectorMapper mapper)
void | SegmentReader.getTermFreqVector(int docNumber, String field, TermVectorMapper mapper)
void | ParallelReader.getTermFreqVector(int docNumber, String field, TermVectorMapper mapper)
void | FilterIndexReader.getTermFreqVector(int docNumber, String field, TermVectorMapper mapper)
abstract void | IndexReader.getTermFreqVector(int docNumber, TermVectorMapper mapper) Map all the term vectors for all fields in a Document
void | MultiReader.getTermFreqVector(int docNumber, TermVectorMapper mapper)
void | SegmentReader.getTermFreqVector(int docNumber, TermVectorMapper mapper)
void | ParallelReader.getTermFreqVector(int docNumber, TermVectorMapper mapper)
void | FilterIndexReader.getTermFreqVector(int docNumber, TermVectorMapper mapper)

Uses of TermVectorMapper in org.apache.lucene.store.instantiated

Methods in org.apache.lucene.store.instantiated with parameters of type TermVectorMapper
void | InstantiatedIndexReader.getTermFreqVector(int docNumber, String field, TermVectorMapper mapper) Deprecated.
void | InstantiatedIndexReader.getTermFreqVector(int docNumber, TermVectorMapper mapper) Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.TermVectorOffsetInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.TermVectorOffsetInfo

Packages that use TermVectorOffsetInfo
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.

Uses of TermVectorOffsetInfo in org.apache.lucene.index

Fields in org.apache.lucene.index declared as TermVectorOffsetInfo
static TermVectorOffsetInfo[] TermVectorOffsetInfo.EMPTY_OFFSET_INFO
Convenience declaration when creating a TermPositionVector that stores only position information.

Methods in org.apache.lucene.index that return TermVectorOffsetInfo
TermVectorOffsetInfo[] | TermVectorEntry.getOffsets()
TermVectorOffsetInfo[] | TermPositionVector.getOffsets(int index) Returns an array of TermVectorOffsetInfo in which the term is found.

Methods in org.apache.lucene.index that return types with arguments of type TermVectorOffsetInfo
 List<TermVectorOffsetInfo> PositionBasedTermVectorMapper.TVPositionInfo.getOffsets()
Parallel list (to PositionBasedTermVectorMapper.TVPositionInfo.getTerms()) of TermVectorOffsetInfo objects.

Methods in org.apache.lucene.index with parameters of type TermVectorOffsetInfo
void | PositionBasedTermVectorMapper.map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) Callback for the TermVectorReader.
void | FieldSortedTermVectorMapper.map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions)
abstract void | TermVectorMapper.map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) Map the Term Vector information into your own structure
void | SortedTermVectorMapper.map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions)

Constructors in org.apache.lucene.index with parameters of type TermVectorOffsetInfo
TermVectorEntry(String field, String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions)

Uses of TermVectorOffsetInfo in org.apache.lucene.store.instantiated

Methods in org.apache.lucene.store.instantiated that return TermVectorOffsetInfo
TermVectorOffsetInfo[] | InstantiatedTermPositionVector.getOffsets(int index)
TermVectorOffsetInfo[] | InstantiatedTermDocumentInformation.getTermOffsets()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

No usage of org.apache.lucene.index.ThreadedIndexingAndSearchingTestCase

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.TieredMergePolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.TieredMergePolicy

Packages that use TieredMergePolicy
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.util | Some utility classes.

Uses of TieredMergePolicy in org.apache.lucene.index

Methods in org.apache.lucene.index that return TieredMergePolicy
TieredMergePolicy | TieredMergePolicy.setFloorSegmentMB(double v) Segments smaller than this are "rounded up" to this size, ie treated as equal (floor) size for merge selection.
TieredMergePolicy | TieredMergePolicy.setForceMergeDeletesPctAllowed(double v) When forceMergeDeletes is called, we only merge away a segment if its delete percentage is over this threshold.
TieredMergePolicy | TieredMergePolicy.setMaxMergeAtOnce(int v) Maximum number of segments to be merged at a time during "normal" merging.
TieredMergePolicy | TieredMergePolicy.setMaxMergeAtOnceExplicit(int v) Maximum number of segments to be merged at a time, during forceMerge or forceMergeDeletes.
TieredMergePolicy | TieredMergePolicy.setMaxMergedSegmentMB(double v) Maximum sized segment to produce during normal merging.
TieredMergePolicy | TieredMergePolicy.setNoCFSRatio(double noCFSRatio) If a merged segment will be more than this percentage of the total size of the index, leave the segment as non-compound file even if compound file is enabled.
TieredMergePolicy | TieredMergePolicy.setReclaimDeletesWeight(double v) Controls how aggressively merges that reclaim more deletions are favored.
TieredMergePolicy | TieredMergePolicy.setSegmentsPerTier(double v) Sets the allowed number of segments per tier.
TieredMergePolicy | TieredMergePolicy.setUseCompoundFile(boolean useCompoundFile) Sets whether compound file format should be used for newly flushed and newly merged segments.

Uses of TieredMergePolicy in org.apache.lucene.util

Methods in org.apache.lucene.util that return TieredMergePolicy
static TieredMergePolicy | LuceneTestCase.newTieredMergePolicy()
static TieredMergePolicy | LuceneTestCase.newTieredMergePolicy(Random r)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.TieredMergePolicy.MergeScore

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.TieredMergePolicy.MergeScore

Packages that use TieredMergePolicy.MergeScore
org.apache.lucene.index Code to maintain and access indices.

Uses of TieredMergePolicy.MergeScore in org.apache.lucene.index

Methods in org.apache.lucene.index that return TieredMergePolicy.MergeScore
protected  TieredMergePolicy.MergeScore TieredMergePolicy.score(List<SegmentInfo> candidate, boolean hitTooLarge, long mergingBytes)
Expert: scores one merge; subclasses can override.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.UpgradeIndexMergePolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.UpgradeIndexMergePolicy

No usage of org.apache.lucene.index.UpgradeIndexMergePolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


MemoryIndex

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index.memory
Class MemoryIndex

java.lang.Object
    extended by  org.apache.lucene.index.memory.MemoryIndex
All Implemented Interfaces:
Serializable
public class MemoryIndex
extends Object
implements Serializable

High-performance single-document main memory Apache Lucene fulltext search index.

Overview

This class is a replacement/substitute for a large subset of RAMDirectory functionality. It is designed to enable maximum efficiency for on-the-fly matchmaking combining structured and fuzzy fulltext search in realtime streaming applications such as Nux XQuery based XML message queues, publish-subscribe systems for Blogs/newsfeeds, text chat, data acquisition and distribution systems, application level routers, firewalls, classifiers, etc. Rather than targeting fulltext search of infrequent queries over huge persistent data archives (historic search), this class targets fulltext search of huge numbers of queries over comparatively small transient realtime data (prospective search). For example as in
 float score = search(String text, Query query)

Each instance can hold at most one Lucene "document", with a document containing zero or more "fields", each field having a name and a fulltext value. The fulltext value is tokenized (split and transformed) into zero or more index terms (aka words) on addField(), according to the policy implemented by an Analyzer. For example, Lucene analyzers can split on whitespace, normalize to lower case for case insensitivity, ignore common terms with little discriminatory value such as "he", "in", "and" (stop words), reduce the terms to their natural linguistic root form such as "fishing" being reduced to "fish" (stemming), resolve synonyms/inflexions/thesauri (upon indexing and/or querying), etc. For details, see Lucene Analyzer Intro.

Arbitrary Lucene queries can be run against this class - see Lucene Query Syntax as well as Query Parser Rules. Note that a Lucene query selects on the field names and associated (indexed) tokenized terms, not on the original fulltext(s) - the latter are not stored but rather thrown away immediately after tokenization.

For some interesting background information on search technology, see Bob Wyman's Prospective Search, Jim Gray's A Call to Arms - Custom subscriptions, and Tim Bray's On Search, the Series.

Example Usage

 Analyzer analyzer = PatternAnalyzer.DEFAULT_ANALYZER;
 //Analyzer analyzer = new SimpleAnalyzer();
 MemoryIndex index = new MemoryIndex();
 index.addField("content", "Readings about Salmons and other select Alaska fishing Manuals", analyzer);
 index.addField("author", "Tales of James", analyzer);
 QueryParser parser = new QueryParser("content", analyzer);
 float score = index.search(parser.parse("+author:james +salmon~ +fish* manual~"));
 if (score > 0.0f) {
     System.out.println("it's a match");
 } else {
     System.out.println("no match found");
 }
 System.out.println("indexData=" + index.toString());

Example XQuery Usage

 (: An XQuery that finds all books authored by James that have something to do with "salmon fishing manuals", sorted by relevance :)
 declare namespace lucene = "java:nux.xom.pool.FullTextUtil";
 declare variable $query := "+salmon~ +fish* manual~"; (: any arbitrary Lucene query can go here :)

 for $book in /books/book[author="James" and lucene:match(abstract, $query) > 0.0]
 let $score := lucene:match($book/abstract, $query)
 order by $score descending
 return $book

No thread safety guarantees

An instance can be queried multiple times with the same or different queries, but an instance is not thread-safe. If desired use idioms such as:
 MemoryIndex index = ...
 synchronized (index) {
    // read and/or write index (i.e. add fields and/or query)
 }

Performance Notes

Internally there's a new data structure geared towards efficient indexing and searching, plus the necessary support code to seamlessly plug into the Lucene framework.

This class performs very well for very small texts (e.g. 10 chars) as well as for large texts (e.g. 10 MB) and everything in between. Typically, it is about 10-100 times faster than RAMDirectory. Note that RAMDirectory has particularly large efficiency overheads for small to medium sized texts, both in time and space. Indexing a field with N tokens takes O(N) in the best case, and O(N logN) in the worst case. Memory consumption is probably larger than for RAMDirectory.

Example throughput of many simple term queries over a single MemoryIndex: ~500000 queries/sec on a MacBook Pro, jdk 1.5.0_06, server VM. As always, your mileage may vary.

If you're curious about the whereabouts of bottlenecks, run java 1.5 with the non-perturbing '-server -agentlib:hprof=cpu=samples,depth=10' flags, then study the trace log and correlate its hotspot trailer with its call stack headers (see hprof tracing ).

See Also:
Serialized Form

Constructor Summary
MemoryIndex()
Constructs an empty instance.
Method Summary
 void addField(String fieldName, String text, Analyzer analyzer)
Convenience method; Tokenizes the given field text and adds the resulting terms to the index; Equivalent to adding an indexed non-keyword Lucene Field that is tokenized, not stored, termVectorStored with positions (or termVectorStored with positions and offsets),
 void addField(String fieldName, TokenStream stream)
Equivalent to addField(fieldName, stream, 1.0f).
 void addField(String fieldName, TokenStream stream, float boost)
Iterates over the given token stream and adds the resulting terms to the index; Equivalent to adding a tokenized, indexed, termVectorStored, unstored, Lucene Field.
 IndexSearcher createSearcher()
Creates and returns a searcher that can be used to execute arbitrary Lucene queries and to collect the resulting query results as hits.
 long getMemorySize()
Returns a reasonable approximation of the main memory [bytes] consumed by this instance.
<T> TokenStream
keywordTokenStream(Collection<T> keywords)
Convenience method; Creates and returns a token stream that generates a token for each keyword in the given collection, "as is", without any transforming text analysis.
 float search(Query query)
Convenience method that efficiently returns the relevance score by matching this index against the given Lucene query expression.
 String toString()
Returns a String representation of the index data for debugging purposes.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MemoryIndex

public MemoryIndex()
Constructs an empty instance.

Method Detail

addField

public void addField(String fieldName,
                     String text,
                     Analyzer analyzer)
Convenience method; Tokenizes the given field text and adds the resulting terms to the index; Equivalent to adding an indexed non-keyword Lucene Field that is tokenized, not stored, termVectorStored with positions (or termVectorStored with positions and offsets),

Parameters:
fieldName - a name to be associated with the text
text - the text to tokenize and index.
analyzer - the analyzer to use for tokenization

keywordTokenStream

public <T> TokenStream keywordTokenStream(Collection<T> keywords)
Convenience method; Creates and returns a token stream that generates a token for each keyword in the given collection, "as is", without any transforming text analysis. The resulting token stream can be fed into addField(String, TokenStream), perhaps wrapped into another TokenFilter, as desired.

Parameters:
keywords - the keywords to generate tokens for
Returns:
the corresponding token stream

addField

public void addField(String fieldName,
                     TokenStream stream)
Equivalent to addField(fieldName, stream, 1.0f).

Parameters:
fieldName - a name to be associated with the text
stream - the token stream to retrieve tokens from

addField

public void addField(String fieldName,
                     TokenStream stream,
                     float boost)
Iterates over the given token stream and adds the resulting terms to the index; Equivalent to adding a tokenized, indexed, termVectorStored, unstored, Lucene Field. Finally closes the token stream. Note that untokenized keywords can be added with this method via keywordTokenStream(Collection), the Lucene contrib KeywordTokenizer or similar utilities.

Parameters:
fieldName - a name to be associated with the text
stream - the token stream to retrieve tokens from.
boost - the boost factor for hits for this field
See Also:
AbstractField.setBoost(float)

createSearcher

public IndexSearcher createSearcher()
Creates and returns a searcher that can be used to execute arbitrary Lucene queries and to collect the resulting query results as hits.

Returns:
a searcher

search

public float search(Query query)
Convenience method that efficiently returns the relevance score by matching this index against the given Lucene query expression.

Parameters:
query - an arbitrary Lucene query to run against this index
Returns:
the relevance score of the matchmaking; A number in the range [0.0 .. 1.0], with 0.0 indicating no match. The higher the number the better the match.

getMemorySize

public long getMemorySize()
Returns a reasonable approximation of the main memory [bytes] consumed by this instance. Useful for smart memory sensititive caches/pools.

Returns:
the main memory consumption

toString

public String toString()
Returns a String representation of the index data for debugging purposes.

Overrides:
toString in class Object
Returns:
the string representation
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.index.memory
Classes
MemoryIndex


org.apache.lucene.index.memory

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.index.memory

High-performance single-document main memory Apache Lucene fulltext search index.

See:
Description

Class Summary
MemoryIndex High-performance single-document main memory Apache Lucene fulltext search index.

Package org.apache.lucene.index.memory Description

High-performance single-document main memory Apache Lucene fulltext search index.


org.apache.lucene.index.memory Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.index.memory

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.index.memory.MemoryIndex (implements java.io.Serializable)


Uses of Package org.apache.lucene.index.memory

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.index.memory

No usage of org.apache.lucene.index.memory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.memory.MemoryIndex

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.memory.MemoryIndex

No usage of org.apache.lucene.index.memory.MemoryIndex

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CarmelTopKTermPruningPolicy.ByDocComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index.pruning
Class CarmelTopKTermPruningPolicy.ByDocComparator

java.lang.Object
    extended by  org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy.ByDocComparator
All Implemented Interfaces:
Comparator<ScoreDoc>
Enclosing class:
CarmelTopKTermPruningPolicy
public static class CarmelTopKTermPruningPolicy.ByDocComparator
extends Object
implements Comparator<ScoreDoc>

Field Summary
static CarmelTopKTermPruningPolicy.ByDocComparator INSTANCE
Constructor Summary
CarmelTopKTermPruningPolicy.ByDocComparator()
Method Summary
 int compare(ScoreDoc o1, ScoreDoc o2)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals

Field Detail

INSTANCE

public static final CarmelTopKTermPruningPolicy.ByDocComparator INSTANCE
Constructor Detail

CarmelTopKTermPruningPolicy.ByDocComparator

public CarmelTopKTermPruningPolicy.ByDocComparator()
Method Detail

compare

public int compare(ScoreDoc o1,
                   ScoreDoc o2)
Specified by:
compare in interface Comparator<ScoreDoc>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CarmelTopKTermPruningPolicy

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index.pruning
Class CarmelTopKTermPruningPolicy

java.lang.Object
    extended by  org.apache.lucene.index.pruning.PruningPolicy
        extended by  org.apache.lucene.index.pruning.TermPruningPolicy
            extended by  org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy

public class CarmelTopKTermPruningPolicy
extends TermPruningPolicy

Pruning policy with a search quality parameterized guarantee - configuration of this policy allows to specify two parameters: k and ε such that:

For any OR query with r terms, the score of each of the top k results in the original index, should be "practically the same" as the score that document in the pruned index: the scores difference should not exceed r * ε.

See the following paper for more details about this method: Static index pruning for information retrieval systems, D. Carmel at al, ACM SIGIR 2001 .

The claim of this pruning technique is, quoting from the above paper:

Prune the index in such a way that a human "cannot distinguish the difference" between the results of a search engine whose index is pruned and one whose index is not pruned.

For indexes with a large number of terms this policy might be too slow. In such situations, the uniform pruning approach in CarmelUniformTermPruningPolicy will be faster, though it might produce inferior search quality, as that policy does not pose a theoretical guarantee on resulted search quality.

TODO implement also CarmelTermPruningDeltaTopPolicy

Nested Class Summary
static class CarmelTopKTermPruningPolicy.ByDocComparator
Field Summary
static float | DEFAULT_EPSILON Default largest meaningless score difference
static int | DEFAULT_R Default number of query terms
static int | DEFAULT_TOP_K Default number of guaranteed top K scores
Fields inherited from class org.apache.lucene.index.pruning.TermPruningPolicy
fieldFlags, in
Fields inherited from class org.apache.lucene.index.pruning.PruningPolicy
DEL_ALL, DEL_PAYLOADS, DEL_POSTINGS, DEL_STORED, DEL_VECTOR
Constructor Summary
CarmelTopKTermPruningPolicy(IndexReader in, Map<String,Integer> fieldFlags)
Constructor with default parameters
CarmelTopKTermPruningPolicy(IndexReader in, Map<String,Integer> fieldFlags, int k, float epsilon, int r, Similarity sim)
Constructor with specific settings
Method Summary
void | initPositionsTerm(TermPositions tp, Term t) Called when moving TermPositions to a new Term.
boolean | pruneAllPositions(TermPositions termPositions, Term t) Prune all postings per term (invoked once per term per doc)
int | pruneSomePositions(int docNum, int[] positions, Term curTerm) Prune some postings per term (invoked once per term per doc).
boolean | pruneTermEnum(TermEnum te) Pruning of all postings for a term (invoked once per term).
int | pruneTermVectorTerms(int docNumber, String field, String[] terms, int[] freqs, TermFreqVector tfv) Pruning of individual terms in term vectors.
Methods inherited from class org.apache.lucene.index.pruning.TermPruningPolicy
pruneAllFieldPostings, prunePayload, pruneWholeTermVector
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_TOP_K

public static final int DEFAULT_TOP_K
Default number of guaranteed top K scores

See Also:
Constant Field Values

DEFAULT_R

public static final int DEFAULT_R
Default number of query terms

See Also:
Constant Field Values

DEFAULT_EPSILON

public static final float DEFAULT_EPSILON
Default largest meaningless score difference

See Also:
Constant Field Values
Constructor Detail

CarmelTopKTermPruningPolicy

public CarmelTopKTermPruningPolicy(IndexReader in,
                                   Map<String,Integer> fieldFlags)
Constructor with default parameters

See Also:
DEFAULT_TOP_K, DEFAULT_EPSILON, DEFAULT_R, DefaultSimilarity, CarmelTopKTermPruningPolicy(IndexReader, Map, int, float, int, Similarity)

CarmelTopKTermPruningPolicy

public CarmelTopKTermPruningPolicy(IndexReader in,
                                   Map<String,Integer> fieldFlags,
                                   int k,
                                   float epsilon,
                                   int r,
                                   Similarity sim)
Constructor with specific settings

Parameters:
in - reader for original index
k - number of guaranteed top scores. Each top K results in the pruned index is either also an original top K result or its original score is indistinguishable from some original top K result.
epsilon - largest meaningless score difference Results whose scores difference is smaller or equal to epsilon are considered indistinguishable.
r - maximal number of terms in a query for which search quaility in pruned index is guaranteed
sim - similarity to use when selecting top docs fir each index term. When null, DefaultSimilarity is used.
Method Detail

pruneTermEnum

public boolean pruneTermEnum(TermEnum te)
                      throws IOException
Description copied from class: TermPruningPolicy
Pruning of all postings for a term (invoked once per term).

Specified by:
pruneTermEnum in class TermPruningPolicy
Parameters:
te - positioned term enum.
Returns:
true if all postings for this term should be removed, false otherwise.
Throws:
IOException

initPositionsTerm

public void initPositionsTerm(TermPositions tp,
                              Term t)
                       throws IOException
Description copied from class: TermPruningPolicy
Called when moving TermPositions to a new Term.

Specified by:
initPositionsTerm in class TermPruningPolicy
Parameters:
tp - input term positions
t - current term
Throws:
IOException

pruneAllPositions

public boolean pruneAllPositions(TermPositions termPositions,
                                 Term t)
                          throws IOException
Description copied from class: TermPruningPolicy
Prune all postings per term (invoked once per term per doc)

Specified by:
pruneAllPositions in class TermPruningPolicy
Parameters:
termPositions - positioned term positions. Implementations MUST NOT advance this by calling TermPositions methods that advance either the position pointer (next, skipTo) or term pointer (seek).
t - current term
Returns:
true if the current posting should be removed, false otherwise.
Throws:
IOException

pruneTermVectorTerms

public int pruneTermVectorTerms(int docNumber,
                                String field,
                                String[] terms,
                                int[] freqs,
                                TermFreqVector tfv)
                         throws IOException
Description copied from class: TermPruningPolicy
Pruning of individual terms in term vectors.

Specified by:
pruneTermVectorTerms in class TermPruningPolicy
Parameters:
docNumber - document number
field - field name
terms - array of terms
freqs - array of term frequencies
tfv - the original term frequency vector
Returns:
0 if no terms are to be removed, positive number to indicate how many terms need to be removed. The same number of entries in the terms array must be set to null to indicate which terms to remove.
Throws:
IOException

pruneSomePositions

public int pruneSomePositions(int docNum,
                              int[] positions,
                              Term curTerm)
Description copied from class: TermPruningPolicy
Prune some postings per term (invoked once per term per doc).

Specified by:
pruneSomePositions in class TermPruningPolicy
Parameters:
docNum - current document number
positions - original term positions in the document (and indirectly term frequency)
curTerm - current term
Returns:
0 if no postings are to be removed, or positive number to indicate how many postings need to be removed. The same number of entries in the positions array must be set to -1 to indicate which positions to remove.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CarmelUniformTermPruningPolicy.ByDocComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index.pruning
Class CarmelUniformTermPruningPolicy.ByDocComparator

java.lang.Object
    extended by  org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy.ByDocComparator
All Implemented Interfaces:
Comparator<ScoreDoc>
Enclosing class:
CarmelUniformTermPruningPolicy
public static class CarmelUniformTermPruningPolicy.ByDocComparator
extends Object
implements Comparator<ScoreDoc>

Field Summary
static CarmelUniformTermPruningPolicy.ByDocComparator INSTANCE
Constructor Summary
CarmelUniformTermPruningPolicy.ByDocComparator()
Method Summary
 int compare(ScoreDoc o1, ScoreDoc o2)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals

Field Detail

INSTANCE

public static final CarmelUniformTermPruningPolicy.ByDocComparator INSTANCE
Constructor Detail

CarmelUniformTermPruningPolicy.ByDocComparator

public CarmelUniformTermPruningPolicy.ByDocComparator()
Method Detail

compare

public int compare(ScoreDoc o1,
                   ScoreDoc o2)
Specified by:
compare in interface Comparator<ScoreDoc>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CarmelUniformTermPruningPolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index.pruning
Class CarmelUniformTermPruningPolicy

java.lang.Object
    extended by  org.apache.lucene.index.pruning.PruningPolicy
        extended by  org.apache.lucene.index.pruning.TermPruningPolicy
            extended by  org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy

public class CarmelUniformTermPruningPolicy
extends TermPruningPolicy

Enhanced implementation of Carmel Uniform Pruning,

TermPositions whose in-document frequency is below a specified threshold

See CarmelTopKTermPruningPolicy for link to the paper describing this policy. are pruned.

Conclusions of that paper indicate that it's best to compute per-term thresholds, as we do in CarmelTopKTermPruningPolicy. However for large indexes with a large number of terms that method might be too slow, and the (enhanced) uniform approach implemented here may will be faster, although it might produce inferior search quality.

This implementation enhances the Carmel uniform pruning approach, as it allows to specify three levels of thresholds:

  • one default threshold - globally (for terms in all fields)
  • threshold per field
  • threshold per term

These thresholds are applied so that always the most specific one takes precedence: first a per-term threshold is used if present, then per-field threshold if present, and finally the default threshold.

Threshold are maintained in a map, keyed by either field names or terms in field:text format. precedence of these values is the following:

Thresholds in this method of pruning are expressed as the percentage of the top-N scoring documents per term that are retained. The list of top-N documents is established by using a regular IndexSearcher and Similarity to run a simple TermQuery.

Smaller threshold value will produce a smaller index. See TermPruningPolicy for size vs performance considerations.

For indexes with a large number of terms this policy might be still too slow, since it issues a term query for each term in the index. In such situations, the term frequency pruning approach in TFTermPruningPolicy will be faster, though it might produce inferior search quality.

Nested Class Summary
static class CarmelUniformTermPruningPolicy.ByDocComparator
Field Summary
Fields inherited from class org.apache.lucene.index.pruning.TermPruningPolicy
fieldFlags, in
Fields inherited from class org.apache.lucene.index.pruning.PruningPolicy
DEL_ALL, DEL_PAYLOADS, DEL_POSTINGS, DEL_STORED, DEL_VECTOR
Constructor Summary
CarmelUniformTermPruningPolicy(IndexReader in, Map<String,Integer> fieldFlags, Map<String,Float> thresholds, float defThreshold, Similarity sim)
Method Summary
void | initPositionsTerm(TermPositions tp, Term t) Called when moving TermPositions to a new Term.
boolean | pruneAllPositions(TermPositions termPositions, Term t) Prune all postings per term (invoked once per term per doc)
int | pruneSomePositions(int docNum, int[] positions, Term curTerm) Prune some postings per term (invoked once per term per doc).
boolean | pruneTermEnum(TermEnum te) Pruning of all postings for a term (invoked once per term).
int | pruneTermVectorTerms(int docNumber, String field, String[] terms, int[] freqs, TermFreqVector tfv) Pruning of individual terms in term vectors.
Methods inherited from class org.apache.lucene.index.pruning.TermPruningPolicy
pruneAllFieldPostings, prunePayload, pruneWholeTermVector
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CarmelUniformTermPruningPolicy

public CarmelUniformTermPruningPolicy(IndexReader in,
                                      Map<String,Integer> fieldFlags,
                                      Map<String,Float> thresholds,
                                      float defThreshold,
                                      Similarity sim)
Method Detail

pruneTermEnum

public boolean pruneTermEnum(TermEnum te)
                      throws IOException
Description copied from class: TermPruningPolicy
Pruning of all postings for a term (invoked once per term).

Specified by:
pruneTermEnum in class TermPruningPolicy
Parameters:
te - positioned term enum.
Returns:
true if all postings for this term should be removed, false otherwise.
Throws:
IOException

initPositionsTerm

public void initPositionsTerm(TermPositions tp,
                              Term t)
                       throws IOException
Description copied from class: TermPruningPolicy
Called when moving TermPositions to a new Term.

Specified by:
initPositionsTerm in class TermPruningPolicy
Parameters:
tp - input term positions
t - current term
Throws:
IOException

pruneAllPositions

public boolean pruneAllPositions(TermPositions termPositions,
                                 Term t)
                          throws IOException
Description copied from class: TermPruningPolicy
Prune all postings per term (invoked once per term per doc)

Specified by:
pruneAllPositions in class TermPruningPolicy
Parameters:
termPositions - positioned term positions. Implementations MUST NOT advance this by calling TermPositions methods that advance either the position pointer (next, skipTo) or term pointer (seek).
t - current term
Returns:
true if the current posting should be removed, false otherwise.
Throws:
IOException

pruneTermVectorTerms

public int pruneTermVectorTerms(int docNumber,
                                String field,
                                String[] terms,
                                int[] freqs,
                                TermFreqVector tfv)
                         throws IOException
Description copied from class: TermPruningPolicy
Pruning of individual terms in term vectors.

Specified by:
pruneTermVectorTerms in class TermPruningPolicy
Parameters:
docNumber - document number
field - field name
terms - array of terms
freqs - array of term frequencies
tfv - the original term frequency vector
Returns:
0 if no terms are to be removed, positive number to indicate how many terms need to be removed. The same number of entries in the terms array must be set to null to indicate which terms to remove.
Throws:
IOException

pruneSomePositions

public int pruneSomePositions(int docNum,
                              int[] positions,
                              Term curTerm)
Description copied from class: TermPruningPolicy
Prune some postings per term (invoked once per term per doc).

Specified by:
pruneSomePositions in class TermPruningPolicy
Parameters:
docNum - current document number
positions - original term positions in the document (and indirectly term frequency)
curTerm - current term
Returns:
0 if no postings are to be removed, or positive number to indicate how many postings need to be removed. The same number of entries in the positions array must be set to -1 to indicate which positions to remove.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.index.pruning
Classes
CarmelTopKTermPruningPolicy
CarmelTopKTermPruningPolicy.ByDocComparator
CarmelUniformTermPruningPolicy
CarmelUniformTermPruningPolicy.ByDocComparator
PruningPolicy
PruningTool
RIDFTermPruningPolicy
StorePruningPolicy
TermPruningPolicy
TFTermPruningPolicy


org.apache.lucene.index.pruning

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.index.pruning

Static Index Pruning Tools

See:
Description

Class Summary
CarmelTopKTermPruningPolicy | Pruning policy with a search quality parameterized guarantee - configuration of this policy allows to specify two parameters: k and ε such that:
CarmelTopKTermPruningPolicy.ByDocComparator |
CarmelUniformTermPruningPolicy | Enhanced implementation of Carmel Uniform Pruning,
CarmelUniformTermPruningPolicy.ByDocComparator |
PruningPolicy | General Definitions for Index Pruning, such as operations to be performed on field data.
PruningTool | A command-line tool to configure and run a PruningReader on an input index and produce a pruned output index using IndexWriter.addIndexes(IndexReader...).
RIDFTermPruningPolicy | Implementation of TermPruningPolicy that uses "residual IDF" metric to determine the postings of terms to keep/remove, as defined in http://www.dc.fi.udc.es/~barreiro/publications/blanco_barreiro_ecir2007.pdf.
StorePruningPolicy | Pruning policy for removing stored fields from documents.
TermPruningPolicy | Policy for producing smaller index out of an input index, by examining its terms and removing from the index some or all of their data as follows: all terms of a certain field - see TermPruningPolicy.pruneAllFieldPostings(String) all data of a certain term - see TermPruningPolicy.pruneTermEnum(TermEnum) all positions of a certain term in a certain document - see #pruneAllPositions(TermPositions, Term) some positions of a certain term in a certain document - see #pruneSomePositions(int, int[], Term)
TFTermPruningPolicy | Policy for producing smaller index out of an input index, by removing postings data for those terms where their in-document frequency is below a specified threshold.

Package org.apache.lucene.index.pruning Description

Static Index Pruning Tools

This package provides a framework for pruning an existing index into a smaller index while retaining visible search quality as much as possible.

An index can be pruned in several levels:

  1. Remove stored data: see StorePruningPolicy
  2. Remove terms data: see TermPruningPolicy
Pruning can be applied programmatically via a PruningReader or with the static tool PruningTool.


org.apache.lucene.index.pruning Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.index.pruning

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy.ByDocComparator (implements java.util.Comparator<T>)
    • org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy.ByDocComparator (implements java.util.Comparator<T>)
    • org.apache.lucene.index.pruning.PruningPolicy
      • org.apache.lucene.index.pruning.StorePruningPolicy
      • org.apache.lucene.index.pruning.TermPruningPolicy
        • org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy
        • org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy
        • org.apache.lucene.index.pruning.RIDFTermPruningPolicy
        • org.apache.lucene.index.pruning.TFTermPruningPolicy
    • org.apache.lucene.index.pruning.PruningTool


Uses of Package org.apache.lucene.index.pruning

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.index.pruning

Packages that use org.apache.lucene.index.pruning
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.pruning | Static Index Pruning Tools

Classes in org.apache.lucene.index.pruning used by org.apache.lucene.index
StorePruningPolicy
Pruning policy for removing stored fields from documents.
TermPruningPolicy
Policy for producing smaller index out of an input index, by examining its terms and removing from the index some or all of their data as follows: all terms of a certain field - see TermPruningPolicy.pruneAllFieldPostings(String) all data of a certain term - see TermPruningPolicy.pruneTermEnum(TermEnum) all positions of a certain term in a certain document - see #pruneAllPositions(TermPositions, Term) some positions of a certain term in a certain document - see #pruneSomePositions(int, int[], Term)

Classes in org.apache.lucene.index.pruning used by org.apache.lucene.index.pruning
CarmelTopKTermPruningPolicy.ByDocComparator
CarmelUniformTermPruningPolicy.ByDocComparator
PruningPolicy
General Definitions for Index Pruning, such as operations to be performed on field data.
TermPruningPolicy
Policy for producing smaller index out of an input index, by examining its terms and removing from the index some or all of their data as follows: all terms of a certain field - see TermPruningPolicy.pruneAllFieldPostings(String) all data of a certain term - see TermPruningPolicy.pruneTermEnum(TermEnum) all positions of a certain term in a certain document - see #pruneAllPositions(TermPositions, Term) some positions of a certain term in a certain document - see #pruneSomePositions(int, int[], Term)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PruningPolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index.pruning
Class PruningPolicy

java.lang.Object
    extended by  org.apache.lucene.index.pruning.PruningPolicy
Direct Known Subclasses:
StorePruningPolicy, TermPruningPolicy
public class PruningPolicy
extends Object

General Definitions for Index Pruning, such as operations to be performed on field data.

Field Summary
static int | DEL_ALL Delete all data for this field.
static int | DEL_PAYLOADS Delete (some or all) payloads in these fields.
static int | DEL_POSTINGS Delete (some or all) postings for this field.
static int | DEL_STORED Delete (some or all) stored values for this field.
static int | DEL_VECTOR Delete term frequency vectors for this field (whole vectors or individual terms).
Constructor Summary
PruningPolicy()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEL_POSTINGS

public static final int DEL_POSTINGS
Delete (some or all) postings for this field.

See Also:
Constant Field Values

DEL_STORED

public static final int DEL_STORED
Delete (some or all) stored values for this field.

See Also:
Constant Field Values

DEL_VECTOR

public static final int DEL_VECTOR
Delete term frequency vectors for this field (whole vectors or individual terms).

See Also:
Constant Field Values

DEL_PAYLOADS

public static final int DEL_PAYLOADS
Delete (some or all) payloads in these fields.

See Also:
Constant Field Values

DEL_ALL

public static final int DEL_ALL
Delete all data for this field.

See Also:
Constant Field Values
Constructor Detail

PruningPolicy

public PruningPolicy()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PruningTool

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index.pruning
Class PruningTool

java.lang.Object
    extended by  org.apache.lucene.index.pruning.PruningTool

public class PruningTool
extends Object

A command-line tool to configure and run a PruningReader on an input index and produce a pruned output index using IndexWriter.addIndexes(IndexReader...).

Constructor Summary
PruningTool()
Method Summary
static void | main(String[] args)
static int | run(String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PruningTool

public PruningTool()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

run

public static int run(String[] args)
               throws Exception
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RIDFTermPruningPolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index.pruning
Class RIDFTermPruningPolicy

java.lang.Object
    extended by  org.apache.lucene.index.pruning.PruningPolicy
        extended by  org.apache.lucene.index.pruning.TermPruningPolicy
            extended by  org.apache.lucene.index.pruning.RIDFTermPruningPolicy

public class RIDFTermPruningPolicy
extends TermPruningPolicy

Implementation of TermPruningPolicy that uses "residual IDF" metric to determine the postings of terms to keep/remove, as defined in http://www.dc.fi.udc.es/~barreiro/publications/blanco_barreiro_ecir2007.pdf.

Residual IDF measures a difference between a collection-wide IDF of a term (which assumes a uniform distribution of occurrences) and the actual observed total number of occurrences of a term in all documents. Positive values indicate that a term is informative (e.g. for rare terms), negative values indicate that a term is not informative (e.g. too popular to offer good selectivity).

This metric produces small values close to [-1, 1], so useful ranges for thresholds under this metrics are somewhere between [0, 1]. The higher the threshold the more informative (and more rare) terms will be retained. For filtering of common words a value of close to or slightly below 0 (e.g. -0.1) should be a good starting point.

Field Summary
Fields inherited from class org.apache.lucene.index.pruning.TermPruningPolicy
fieldFlags, in
Fields inherited from class org.apache.lucene.index.pruning.PruningPolicy
DEL_ALL, DEL_PAYLOADS, DEL_POSTINGS, DEL_STORED, DEL_VECTOR
Constructor Summary
RIDFTermPruningPolicy(IndexReader in, Map<String,Integer> fieldFlags, Map<String,Double> thresholds, double defThreshold)
Method Summary
void | initPositionsTerm(TermPositions tp, Term t) Called when moving TermPositions to a new Term.
boolean | pruneAllPositions(TermPositions termPositions, Term t) Prune all postings per term (invoked once per term per doc)
int | pruneSomePositions(int docNum, int[] positions, Term curTerm) Prune some postings per term (invoked once per term per doc).
boolean | pruneTermEnum(TermEnum te) Pruning of all postings for a term (invoked once per term).
int | pruneTermVectorTerms(int docNumber, String field, String[] terms, int[] freqs, TermFreqVector v) Pruning of individual terms in term vectors.
Methods inherited from class org.apache.lucene.index.pruning.TermPruningPolicy
pruneAllFieldPostings, prunePayload, pruneWholeTermVector
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RIDFTermPruningPolicy

public RIDFTermPruningPolicy(IndexReader in,
                             Map<String,Integer> fieldFlags,
                             Map<String,Double> thresholds,
                             double defThreshold)
Method Detail

initPositionsTerm

public void initPositionsTerm(TermPositions tp,
                              Term t)
                       throws IOException
Description copied from class: TermPruningPolicy
Called when moving TermPositions to a new Term.

Specified by:
initPositionsTerm in class TermPruningPolicy
Parameters:
tp - input term positions
t - current term
Throws:
IOException

pruneTermEnum

public boolean pruneTermEnum(TermEnum te)
                      throws IOException
Description copied from class: TermPruningPolicy
Pruning of all postings for a term (invoked once per term).

Specified by:
pruneTermEnum in class TermPruningPolicy
Parameters:
te - positioned term enum.
Returns:
true if all postings for this term should be removed, false otherwise.
Throws:
IOException

pruneAllPositions

public boolean pruneAllPositions(TermPositions termPositions,
                                 Term t)
                          throws IOException
Description copied from class: TermPruningPolicy
Prune all postings per term (invoked once per term per doc)

Specified by:
pruneAllPositions in class TermPruningPolicy
Parameters:
termPositions - positioned term positions. Implementations MUST NOT advance this by calling TermPositions methods that advance either the position pointer (next, skipTo) or term pointer (seek).
t - current term
Returns:
true if the current posting should be removed, false otherwise.
Throws:
IOException

pruneTermVectorTerms

public int pruneTermVectorTerms(int docNumber,
                                String field,
                                String[] terms,
                                int[] freqs,
                                TermFreqVector v)
                         throws IOException
Description copied from class: TermPruningPolicy
Pruning of individual terms in term vectors.

Specified by:
pruneTermVectorTerms in class TermPruningPolicy
Parameters:
docNumber - document number
field - field name
terms - array of terms
freqs - array of term frequencies
v - the original term frequency vector
Returns:
0 if no terms are to be removed, positive number to indicate how many terms need to be removed. The same number of entries in the terms array must be set to null to indicate which terms to remove.
Throws:
IOException

pruneSomePositions

public int pruneSomePositions(int docNum,
                              int[] positions,
                              Term curTerm)
Description copied from class: TermPruningPolicy
Prune some postings per term (invoked once per term per doc).

Specified by:
pruneSomePositions in class TermPruningPolicy
Parameters:
docNum - current document number
positions - original term positions in the document (and indirectly term frequency)
curTerm - current term
Returns:
0 if no postings are to be removed, or positive number to indicate how many postings need to be removed. The same number of entries in the positions array must be set to -1 to indicate which positions to remove.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StorePruningPolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index.pruning
Class StorePruningPolicy

java.lang.Object
    extended by  org.apache.lucene.index.pruning.PruningPolicy
        extended by  org.apache.lucene.index.pruning.StorePruningPolicy

public class StorePruningPolicy
extends PruningPolicy

Pruning policy for removing stored fields from documents.

Field Summary
protected Set<String> | deleteAll Fields to be completely deleted
protected int | delFields
protected Map<String,Integer> | fieldFlags Pruning in effect for each field
protected org.apache.lucene.index.pruning.StorePruningPolicy.DelFieldSelector | fs
protected IndexReader | in
Fields inherited from class org.apache.lucene.index.pruning.PruningPolicy
DEL_ALL, DEL_PAYLOADS, DEL_POSTINGS, DEL_STORED, DEL_VECTOR
Constructor Summary
StorePruningPolicy(IndexReader in, Map<String,Integer> fieldFlags)
Constructs a policy.
Method Summary
FieldInfos | getFieldInfos(FieldInfos allInfos) Compute field infos that should be retained
Document | pruneDocument(int doc, FieldSelector parent) Prune stored fields of a document.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

fieldFlags

protected Map<String,Integer> fieldFlags
Pruning in effect for each field

deleteAll

protected Set<String> deleteAll
Fields to be completely deleted

fs

protected org.apache.lucene.index.pruning.StorePruningPolicy.DelFieldSelector fs

in

protected IndexReader in

delFields

protected int delFields
Constructor Detail

StorePruningPolicy

public StorePruningPolicy(IndexReader in,
                          Map<String,Integer> fieldFlags)
Constructs a policy.

Parameters:
in - input reader.
fieldFlags - a map where keys are field names, and flags are bitwise-OR values of flags defined in PruningPolicy.
Method Detail

getFieldInfos

public FieldInfos getFieldInfos(FieldInfos allInfos)
Compute field infos that should be retained

Parameters:
allInfos - original field infos
Returns:
those of the original field infos which should not be removed.

pruneDocument

public Document pruneDocument(int doc,
                              FieldSelector parent)
                       throws IOException
Prune stored fields of a document. Note that you can also arbitrarily change values of the retrieved fields, so long as the field names belong to a list of fields returned from getFieldInfos(FieldInfos).

Parameters:
doc - document number
parent - original field selector that limits what fields will be retrieved.
Returns:
a pruned instance of a Document.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermPruningPolicy

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index.pruning
Class TermPruningPolicy

java.lang.Object
    extended by  org.apache.lucene.index.pruning.PruningPolicy
        extended by  org.apache.lucene.index.pruning.TermPruningPolicy
Direct Known Subclasses:
CarmelTopKTermPruningPolicy, CarmelUniformTermPruningPolicy, RIDFTermPruningPolicy, TFTermPruningPolicy
public abstract class TermPruningPolicy
extends PruningPolicy

Policy for producing smaller index out of an input index, by examining its terms and removing from the index some or all of their data as follows:

  • all terms of a certain field - see pruneAllFieldPostings(String)
  • all data of a certain term - see pruneTermEnum(TermEnum)
  • all positions of a certain term in a certain document - see #pruneAllPositions(TermPositions, Term)
  • some positions of a certain term in a certain document - see #pruneSomePositions(int, int[], Term)

The pruned, smaller index would, for many types of queries return nearly identical top-N results as compared with the original index, but with increased performance.

Pruning of indexes is handy for producing small first-tier indexes that fit completely in RAM, and store these indexes using IndexWriter.addIndexes(IndexReader...)

Interestingly, if the input index is optimized (i.e. doesn't contain deletions), then the index produced via IndexWriter.addIndexes(IndexReader[]) will preserve internal document id-s so that they are in sync with the original index. This means that all other auxiliary information not necessary for first-tier processing, such as some stored fields, can also be removed, to be quickly retrieved on-demand from the original index using the same internal document id. See StorePruningPolicy for information about removing stored fields.

Please note that while this family of policies method produces good results for term queries it often leads to poor results for phrase queries (because postings are removed without considering whether they belong to an important phrase).

Aggressive pruning policies produce smaller indexes - search performance increases, and recall decreases (i.e. search quality deteriorates).

See the following papers for a discussion of this problem and the proposed solutions to improve the quality of a pruned index (not implemented here):

  • Pruned query evaluation using pre-computed impacts, V. Anh et al, ACM SIGIR 2006
  • A document-centric approach to static index pruning in text retrieval systems, S. Buettcher et al, ACM SIGIR 2006
  • Pruning Policies for Two-Tiered Inverted Index with Correctness Guarantee, A. Ntoulas et al, ACM SIGIR 2007.

Field Summary
protected Map<String,Integer> | fieldFlags Pruning operations to be conducted on fields.
protected IndexReader | in
Fields inherited from class org.apache.lucene.index.pruning.PruningPolicy
DEL_ALL, DEL_PAYLOADS, DEL_POSTINGS, DEL_STORED, DEL_VECTOR
Constructor Summary
protected TermPruningPolicy(IndexReader in, Map<String,Integer> fieldFlags)
Construct a policy.
Method Summary
abstract void | initPositionsTerm(TermPositions in, Term t) Called when moving TermPositions to a new Term.
boolean | pruneAllFieldPostings(String field) Pruning of all postings for a field
abstract boolean | pruneAllPositions(TermPositions termPositions, Term t) Prune all postings per term (invoked once per term per doc)
boolean | prunePayload(TermPositions in, Term curTerm) Called when checking for the presence of payload for the current term at a current position
abstract int | pruneSomePositions(int docNum, int[] positions, Term curTerm) Prune some postings per term (invoked once per term per doc).
abstract boolean | pruneTermEnum(TermEnum te) Pruning of all postings for a term (invoked once per term).
abstract int | pruneTermVectorTerms(int docNumber, String field, String[] terms, int[] freqs, TermFreqVector v) Pruning of individual terms in term vectors.
boolean | pruneWholeTermVector(int docNumber, String field) Term vector pruning.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

fieldFlags

protected Map<String,Integer> fieldFlags
Pruning operations to be conducted on fields.

in

protected IndexReader in
Constructor Detail

TermPruningPolicy

protected TermPruningPolicy(IndexReader in,
                            Map<String,Integer> fieldFlags)
Construct a policy.

Parameters:
in - input reader
fieldFlags - a map, where keys are field names and values are bitwise-OR flags of operations to be performed (see PruningPolicy for more details).
Method Detail

pruneWholeTermVector

public boolean pruneWholeTermVector(int docNumber,
                                    String field)
                             throws IOException
Term vector pruning.

Parameters:
docNumber - document number
field - field name
Returns:
true if the complete term vector for this field should be removed (as specified by PruningPolicy.DEL_VECTOR flag).
Throws:
IOException

pruneAllFieldPostings

public boolean pruneAllFieldPostings(String field)
                              throws IOException
Pruning of all postings for a field

Parameters:
field - field name
Returns:
true if all postings for all terms in this field should be removed (as specified by PruningPolicy.DEL_POSTINGS).
Throws:
IOException

initPositionsTerm

public abstract void initPositionsTerm(TermPositions in,
                                       Term t)
                                throws IOException
Called when moving TermPositions to a new Term.

Parameters:
in - input term positions
t - current term
Throws:
IOException

prunePayload

public boolean prunePayload(TermPositions in,
                            Term curTerm)
Called when checking for the presence of payload for the current term at a current position

Parameters:
in - positioned term positions
curTerm - current term associated with these positions
Returns:
true if the payload should be removed, false otherwise.

pruneTermVectorTerms

public abstract int pruneTermVectorTerms(int docNumber,
                                         String field,
                                         String[] terms,
                                         int[] freqs,
                                         TermFreqVector v)
                                  throws IOException
Pruning of individual terms in term vectors.

Parameters:
docNumber - document number
field - field name
terms - array of terms
freqs - array of term frequencies
v - the original term frequency vector
Returns:
0 if no terms are to be removed, positive number to indicate how many terms need to be removed. The same number of entries in the terms array must be set to null to indicate which terms to remove.
Throws:
IOException

pruneTermEnum

public abstract boolean pruneTermEnum(TermEnum te)
                               throws IOException
Pruning of all postings for a term (invoked once per term).

Parameters:
te - positioned term enum.
Returns:
true if all postings for this term should be removed, false otherwise.
Throws:
IOException

pruneAllPositions

public abstract boolean pruneAllPositions(TermPositions termPositions,
                                          Term t)
                                   throws IOException
Prune all postings per term (invoked once per term per doc)

Parameters:
termPositions - positioned term positions. Implementations MUST NOT advance this by calling TermPositions methods that advance either the position pointer (next, skipTo) or term pointer (seek).
t - current term
Returns:
true if the current posting should be removed, false otherwise.
Throws:
IOException

pruneSomePositions

public abstract int pruneSomePositions(int docNum,
                                       int[] positions,
                                       Term curTerm)
Prune some postings per term (invoked once per term per doc).

Parameters:
docNum - current document number
positions - original term positions in the document (and indirectly term frequency)
curTerm - current term
Returns:
0 if no postings are to be removed, or positive number to indicate how many postings need to be removed. The same number of entries in the positions array must be set to -1 to indicate which positions to remove.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TFTermPruningPolicy

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.index.pruning
Class TFTermPruningPolicy

java.lang.Object
    extended by  org.apache.lucene.index.pruning.PruningPolicy
        extended by  org.apache.lucene.index.pruning.TermPruningPolicy
            extended by  org.apache.lucene.index.pruning.TFTermPruningPolicy

public class TFTermPruningPolicy
extends TermPruningPolicy

Policy for producing smaller index out of an input index, by removing postings data for those terms where their in-document frequency is below a specified threshold.

Larger threshold value will produce a smaller index. See TermPruningPolicy for size vs performance considerations.

This implementation uses simple term frequency thresholds to remove all postings from documents where a given term occurs rarely (i.e. its TF in a document is smaller than the threshold).

Threshold values in this method are expressed as absolute term frequencies.

Field Summary
protected int | curThr
protected int | defThreshold
protected Map<String,Integer> | thresholds
Fields inherited from class org.apache.lucene.index.pruning.TermPruningPolicy
fieldFlags, in
Fields inherited from class org.apache.lucene.index.pruning.PruningPolicy
DEL_ALL, DEL_PAYLOADS, DEL_POSTINGS, DEL_STORED, DEL_VECTOR
Constructor Summary
TFTermPruningPolicy(IndexReader in, Map<String,Integer> fieldFlags, Map<String,Integer> thresholds, int defThreshold)
Method Summary
void | initPositionsTerm(TermPositions in, Term t) Called when moving TermPositions to a new Term.
boolean | pruneAllPositions(TermPositions termPositions, Term t) Prune all postings per term (invoked once per term per doc)
int | pruneSomePositions(int docNum, int[] positions, Term curTerm) Prune some postings per term (invoked once per term per doc).
boolean | pruneTermEnum(TermEnum te) Pruning of all postings for a term (invoked once per term).
int | pruneTermVectorTerms(int docNumber, String field, String[] terms, int[] freqs, TermFreqVector tfv) Pruning of individual terms in term vectors.
Methods inherited from class org.apache.lucene.index.pruning.TermPruningPolicy
pruneAllFieldPostings, prunePayload, pruneWholeTermVector
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

thresholds

protected Map<String,Integer> thresholds

defThreshold

protected int defThreshold

curThr

protected int curThr
Constructor Detail

TFTermPruningPolicy

public TFTermPruningPolicy(IndexReader in,
                           Map<String,Integer> fieldFlags,
                           Map<String,Integer> thresholds,
                           int defThreshold)
Method Detail

pruneTermEnum

public boolean pruneTermEnum(TermEnum te)
                      throws IOException
Description copied from class: TermPruningPolicy
Pruning of all postings for a term (invoked once per term).

Specified by:
pruneTermEnum in class TermPruningPolicy
Parameters:
te - positioned term enum.
Returns:
true if all postings for this term should be removed, false otherwise.
Throws:
IOException

initPositionsTerm

public void initPositionsTerm(TermPositions in,
                              Term t)
                       throws IOException
Description copied from class: TermPruningPolicy
Called when moving TermPositions to a new Term.

Specified by:
initPositionsTerm in class TermPruningPolicy
Parameters:
in - input term positions
t - current term
Throws:
IOException

pruneAllPositions

public boolean pruneAllPositions(TermPositions termPositions,
                                 Term t)
                          throws IOException
Description copied from class: TermPruningPolicy
Prune all postings per term (invoked once per term per doc)

Specified by:
pruneAllPositions in class TermPruningPolicy
Parameters:
termPositions - positioned term positions. Implementations MUST NOT advance this by calling TermPositions methods that advance either the position pointer (next, skipTo) or term pointer (seek).
t - current term
Returns:
true if the current posting should be removed, false otherwise.
Throws:
IOException

pruneTermVectorTerms

public int pruneTermVectorTerms(int docNumber,
                                String field,
                                String[] terms,
                                int[] freqs,
                                TermFreqVector tfv)
                         throws IOException
Description copied from class: TermPruningPolicy
Pruning of individual terms in term vectors.

Specified by:
pruneTermVectorTerms in class TermPruningPolicy
Parameters:
docNumber - document number
field - field name
terms - array of terms
freqs - array of term frequencies
tfv - the original term frequency vector
Returns:
0 if no terms are to be removed, positive number to indicate how many terms need to be removed. The same number of entries in the terms array must be set to null to indicate which terms to remove.
Throws:
IOException

pruneSomePositions

public int pruneSomePositions(int docNum,
                              int[] positions,
                              Term curTerm)
Description copied from class: TermPruningPolicy
Prune some postings per term (invoked once per term per doc).

Specified by:
pruneSomePositions in class TermPruningPolicy
Parameters:
docNum - current document number
positions - original term positions in the document (and indirectly term frequency)
curTerm - current term
Returns:
0 if no postings are to be removed, or positive number to indicate how many postings need to be removed. The same number of entries in the positions array must be set to -1 to indicate which positions to remove.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy.ByDocComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy.ByDocComparator

Packages that use CarmelTopKTermPruningPolicy.ByDocComparator
org.apache.lucene.index.pruning
Static Index Pruning Tools

Uses of CarmelTopKTermPruningPolicy.ByDocComparator in org.apache.lucene.index.pruning

Fields in org.apache.lucene.index.pruning declared as CarmelTopKTermPruningPolicy.ByDocComparator
static CarmelTopKTermPruningPolicy.ByDocComparator CarmelTopKTermPruningPolicy.ByDocComparator.INSTANCE

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy

No usage of org.apache.lucene.index.pruning.CarmelTopKTermPruningPolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy.ByDocComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy.ByDocComparator

Packages that use CarmelUniformTermPruningPolicy.ByDocComparator
org.apache.lucene.index.pruning
Static Index Pruning Tools

Uses of CarmelUniformTermPruningPolicy.ByDocComparator in org.apache.lucene.index.pruning

Fields in org.apache.lucene.index.pruning declared as CarmelUniformTermPruningPolicy.ByDocComparator
static CarmelUniformTermPruningPolicy.ByDocComparator CarmelUniformTermPruningPolicy.ByDocComparator.INSTANCE

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy

No usage of org.apache.lucene.index.pruning.CarmelUniformTermPruningPolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.pruning.PruningPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.pruning.PruningPolicy

Packages that use PruningPolicy
org.apache.lucene.index.pruning
Static Index Pruning Tools

Uses of PruningPolicy in org.apache.lucene.index.pruning

Subclasses of PruningPolicy in org.apache.lucene.index.pruning
class | CarmelTopKTermPruningPolicy Pruning policy with a search quality parameterized guarantee - configuration of this policy allows to specify two parameters: k and ε such that:
class | CarmelUniformTermPruningPolicy Enhanced implementation of Carmel Uniform Pruning,
class | RIDFTermPruningPolicy Implementation of TermPruningPolicy that uses "residual IDF" metric to determine the postings of terms to keep/remove, as defined in http://www.dc.fi.udc.es/~barreiro/publications/blanco_barreiro_ecir2007.pdf.
class | StorePruningPolicy Pruning policy for removing stored fields from documents.
class | TermPruningPolicy Policy for producing smaller index out of an input index, by examining its terms and removing from the index some or all of their data as follows: all terms of a certain field - see TermPruningPolicy.pruneAllFieldPostings(String) all data of a certain term - see TermPruningPolicy.pruneTermEnum(TermEnum) all positions of a certain term in a certain document - see #pruneAllPositions(TermPositions, Term) some positions of a certain term in a certain document - see #pruneSomePositions(int, int[], Term)
class | TFTermPruningPolicy Policy for producing smaller index out of an input index, by removing postings data for those terms where their in-document frequency is below a specified threshold.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.pruning.PruningTool

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.pruning.PruningTool

No usage of org.apache.lucene.index.pruning.PruningTool

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.pruning.RIDFTermPruningPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.pruning.RIDFTermPruningPolicy

No usage of org.apache.lucene.index.pruning.RIDFTermPruningPolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.pruning.StorePruningPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.pruning.StorePruningPolicy

Packages that use StorePruningPolicy
org.apache.lucene.index Code to maintain and access indices.

Uses of StorePruningPolicy in org.apache.lucene.index

Fields in org.apache.lucene.index declared as StorePruningPolicy
protected  StorePruningPolicy PruningReader.storePolicy

Constructors in org.apache.lucene.index with parameters of type StorePruningPolicy
PruningReader(IndexReader in, StorePruningPolicy storePolicy, TermPruningPolicy termPolicy)
Constructor.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.pruning.TermPruningPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.pruning.TermPruningPolicy

Packages that use TermPruningPolicy
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.pruning | Static Index Pruning Tools

Uses of TermPruningPolicy in org.apache.lucene.index

Fields in org.apache.lucene.index declared as TermPruningPolicy
protected  TermPruningPolicy PruningReader.termPolicy

Constructors in org.apache.lucene.index with parameters of type TermPruningPolicy
PruningReader(IndexReader in, StorePruningPolicy storePolicy, TermPruningPolicy termPolicy)
Constructor.

Uses of TermPruningPolicy in org.apache.lucene.index.pruning

Subclasses of TermPruningPolicy in org.apache.lucene.index.pruning
class | CarmelTopKTermPruningPolicy Pruning policy with a search quality parameterized guarantee - configuration of this policy allows to specify two parameters: k and ε such that:
class | CarmelUniformTermPruningPolicy Enhanced implementation of Carmel Uniform Pruning,
class | RIDFTermPruningPolicy Implementation of TermPruningPolicy that uses "residual IDF" metric to determine the postings of terms to keep/remove, as defined in http://www.dc.fi.udc.es/~barreiro/publications/blanco_barreiro_ecir2007.pdf.
class | TFTermPruningPolicy Policy for producing smaller index out of an input index, by removing postings data for those terms where their in-document frequency is below a specified threshold.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.index.pruning.TFTermPruningPolicy

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.index.pruning.TFTermPruningPolicy

No usage of org.apache.lucene.index.pruning.TFTermPruningPolicy

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Message

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.messages
Interface Message

All Superinterfaces:
Serializable
All Known Implementing Classes:
MessageImpl
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).

@Deprecated
public interface Message
extends Serializable

Message Interface for a lazy loading. For Native Language Support (NLS), system of software internationalization.

Method Summary
Object[] | getArguments() Deprecated.
String | getKey() Deprecated.
String | getLocalizedMessage() Deprecated.
String | getLocalizedMessage(Locale locale) Deprecated.

Method Detail

getKey

String getKey()
Deprecated.

getArguments

Object[] getArguments()
Deprecated.

getLocalizedMessage

String getLocalizedMessage()
Deprecated.

getLocalizedMessage

String getLocalizedMessage(Locale locale)
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


MessageImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.messages
Class MessageImpl

java.lang.Object
    extended by  org.apache.lucene.messages.MessageImpl
All Implemented Interfaces:
Serializable, Message
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).

@Deprecated
public class MessageImpl
extends Object
implements Message

Default implementation of Message interface. For Native Language Support (NLS), system of software internationalization.

See Also:
Serialized Form

Constructor Summary
MessageImpl(String key)
Deprecated.
MessageImpl(String key, Object... args)
Deprecated.
Method Summary
Object[] | getArguments() Deprecated.
String | getKey() Deprecated.
String | getLocalizedMessage() Deprecated.
String | getLocalizedMessage(Locale locale) Deprecated.
String | toString() Deprecated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MessageImpl

public MessageImpl(String key)
Deprecated.

MessageImpl

public MessageImpl(String key,
                   Object... args)
Deprecated.
Method Detail

getArguments

public Object[] getArguments()
Deprecated.
Specified by:
getArguments in interface Message

getKey

public String getKey()
Deprecated.
Specified by:
getKey in interface Message

getLocalizedMessage

public String getLocalizedMessage()
Deprecated.
Specified by:
getLocalizedMessage in interface Message

getLocalizedMessage

public String getLocalizedMessage(Locale locale)
Deprecated.
Specified by:
getLocalizedMessage in interface Message

toString

public String toString()
Deprecated.
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NLS

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.messages
Class NLS

java.lang.Object
    extended by  org.apache.lucene.messages.NLS
Direct Known Subclasses:
QueryParserMessages
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).

@Deprecated
public class NLS
extends Object

MessageBundles classes extend this class, to implement a bundle. For Native Language Support (NLS), system of software internationalization. This interface is similar to the NLS class in eclipse.osgi.util.NLS class - initializeMessages() method resets the values of all static strings, should only be called by classes that extend from NLS (see TestMessages.java for reference) - performs validation of all message in a bundle, at class load time - performs per message validation at runtime - see NLSTest.java for usage reference MessageBundle classes may subclass this type.

Constructor Summary
protected NLS()
Deprecated.
Method Summary
static String | getLocalizedMessage(String key) Deprecated.
static String | getLocalizedMessage(String key, Locale locale) Deprecated.
static String | getLocalizedMessage(String key, Locale locale, Object... args) Deprecated.
static String | getLocalizedMessage(String key, Object... args) Deprecated.
protected static void | initializeMessages(String bundleName, Class<? extends NLS> clazz) Deprecated. Initialize a given class with the message bundle Keys Should be called from a class that extends NLS in a static block at class load time.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NLS

protected NLS()
Deprecated.
Method Detail

getLocalizedMessage

public static String getLocalizedMessage(String key)
Deprecated.

getLocalizedMessage

public static String getLocalizedMessage(String key,
                                         Locale locale)
Deprecated.

getLocalizedMessage

public static String getLocalizedMessage(String key,
                                         Locale locale,
                                         Object... args)
Deprecated.

getLocalizedMessage

public static String getLocalizedMessage(String key,
                                         Object... args)
Deprecated.

initializeMessages

protected static void initializeMessages(String bundleName,
                                         Class<? extends NLS> clazz)
Deprecated.
Initialize a given class with the message bundle Keys Should be called from a class that extends NLS in a static block at class load time.

Parameters:
bundleName - Property file with that contains the message bundle
clazz - where constants will reside
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NLSException

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.messages
Interface NLSException

All Known Implementing Classes:
ParseException, QueryNodeError, QueryNodeException, QueryNodeParseException
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).

@Deprecated
public interface NLSException

Interface that exceptions should implement to support lazy loading of messages. For Native Language Support (NLS), system of software internationalization. This Interface should be implemented by all exceptions that require translation

Method Summary
 Message getMessageObject()
Deprecated.

Method Detail

getMessageObject

Message getMessageObject()
Deprecated.
Returns:
a instance of a class that implements the Message interface
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.messages
Interfaces
Message
NLSException
Classes
MessageImpl
NLS


org.apache.lucene.messages

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.messages

For Native Language Support (NLS), system of software internationalization.

See:
Description

Interface Summary
Message | Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).
NLSException | Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).

Class Summary
MessageImpl | Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).
NLS | Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).

Package org.apache.lucene.messages Description

For Native Language Support (NLS), system of software internationalization.

NLS message API

This utility API, adds support for NLS messages in the apache code. It is currently used by the lucene "New Flexible Query PArser".

Features:

  1. Message reference in the code, using static Strings
  2. Message resource validation at class load time, for easier debugging
  3. Allows for message IDs to be re-factored using eclipse or other code re-factor tools
  4. Allows for reference count on messages, just like code
  5. Lazy loading of Message Strings
  6. Normal loading Message Strings

Lazy loading of Message Strings

        public class MessagesTestBundle extends NLS {

          private static final String BUNDLE_NAME = MessagesTestBundle.class.getName();

          private MessagesTestBundle() {
            // should never be instantiated
          }

          static {
            // register all string ids with NLS class and initialize static string
            // values
            NLS.initializeMessages(BUNDLE_NAME, MessagesTestBundle.class);
          }

          // static string must match the strings in the property files.
          public static String Q0001E_INVALID_SYNTAX;
          public static String Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION;

          // this message is missing from the properties file
          public static String Q0005E_MESSAGE_NOT_IN_BUNDLE;
        }

    // Create a message reference
    Message invalidSyntax = new MessageImpl(MessagesTestBundle.Q0001E_INVALID_SYNTAX, "XXX");

    // Do other stuff in the code...
    // when is time to display the message to the user or log the message on a file
    // the message is loaded from the correct bundle

    String message1 = invalidSyntax.getLocalizedMessage();
    String message2 = invalidSyntax.getLocalizedMessage(Locale.JAPANESE);

Normal loading of Message Strings

        String message1 = NLS.getLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION);
        String message2 = NLS.getLocalizedMessage(MessagesTestBundle.Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION, Locale.JAPANESE);

The org.apache.lucene.messages.TestNLS junit contains several other examples. The TestNLS java code is available from the Apache Lucene code repository.


org.apache.lucene.messages Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.messages

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.messages.MessageImpl (implements org.apache.lucene.messages.Message)
    • org.apache.lucene.messages.NLS

Interface Hierarchy

  • org.apache.lucene.messages.NLSException
  • java.io.Serializable
    • org.apache.lucene.messages.Message


Uses of Package org.apache.lucene.messages

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.messages

Packages that use org.apache.lucene.messages
org.apache.lucene.messages | For Native Language Support (NLS), system of software internationalization.
org.apache.lucene.queryParser.core | Contains the core classes of the flexible query parser framework
org.apache.lucene.queryParser.core.messages | Contains messages usually used by query parser implementations
org.apache.lucene.queryParser.standard.parser | Lucene Query Parser

Classes in org.apache.lucene.messages used by org.apache.lucene.messages
Message
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).
NLS
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).

Classes in org.apache.lucene.messages used by org.apache.lucene.queryParser.core
Message
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).
NLSException
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).

Classes in org.apache.lucene.messages used by org.apache.lucene.queryParser.core.messages
NLS
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).

Classes in org.apache.lucene.messages used by org.apache.lucene.queryParser.standard.parser
Message
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).
NLSException
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.messages.Message

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.messages.Message

Packages that use Message
org.apache.lucene.messages | For Native Language Support (NLS), system of software internationalization.
org.apache.lucene.queryParser.core | Contains the core classes of the flexible query parser framework
org.apache.lucene.queryParser.standard.parser | Lucene Query Parser

Uses of Message in org.apache.lucene.messages

Classes in org.apache.lucene.messages that implement Message
 class MessageImpl
Deprecated. Will be moved to a private package inside flexible query parser (Lucene 4.0).

Methods in org.apache.lucene.messages that return Message
 Message NLSException.getMessageObject()
Deprecated.

Uses of Message in org.apache.lucene.queryParser.core

Fields in org.apache.lucene.queryParser.core declared as Message
protected  Message QueryNodeException.message

Methods in org.apache.lucene.queryParser.core that return Message
Message | QueryNodeException.getMessageObject()
Message | QueryNodeError.getMessageObject()

Methods in org.apache.lucene.queryParser.core with parameters of type Message
 void QueryNodeParseException.setNonLocalizedMessage(Message message)

Constructors in org.apache.lucene.queryParser.core with parameters of type Message
QueryNodeError(Message message)
QueryNodeError(Message message, Throwable throwable)
QueryNodeException(Message message)
QueryNodeException(Message message, Throwable throwable)
QueryNodeParseException(Message message)
QueryNodeParseException(Message message, Throwable throwable)

Uses of Message in org.apache.lucene.queryParser.standard.parser

Constructors in org.apache.lucene.queryParser.standard.parser with parameters of type Message
ParseException(Message message)
Constructor with message.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.messages.MessageImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.messages.MessageImpl

No usage of org.apache.lucene.messages.MessageImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.messages.NLS

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.messages.NLS

Packages that use NLS
org.apache.lucene.messages | For Native Language Support (NLS), system of software internationalization.
org.apache.lucene.queryParser.core.messages | Contains messages usually used by query parser implementations

Uses of NLS in org.apache.lucene.messages

Method parameters in org.apache.lucene.messages with type arguments of type NLS
protected static void NLS.initializeMessages(String bundleName, Class<? extends NLS> clazz)
Deprecated. Initialize a given class with the message bundle Keys Should be called from a class that extends NLS in a static block at class load time.

Uses of NLS in org.apache.lucene.queryParser.core.messages

Subclasses of NLS in org.apache.lucene.queryParser.core.messages
 class QueryParserMessages
Flexible Query Parser message bundle class

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.messages.NLSException

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.messages.NLSException

Packages that use NLSException
org.apache.lucene.queryParser.core | Contains the core classes of the flexible query parser framework
org.apache.lucene.queryParser.standard.parser | Lucene Query Parser

Uses of NLSException in org.apache.lucene.queryParser.core

Classes in org.apache.lucene.queryParser.core that implement NLSException
class | QueryNodeError Error class with NLS support
class | QueryNodeException This exception should be thrown if something wrong happens when dealing with QueryNodes.
class | QueryNodeParseException This should be thrown when an exception happens during the query parsing from string to the query node tree.

Uses of NLSException in org.apache.lucene.queryParser.standard.parser

Classes in org.apache.lucene.queryParser.standard.parser that implement NLSException
 class ParseException
This exception is thrown when parse errors are encountered.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


GetTermInfo

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.misc
Class GetTermInfo

java.lang.Object
    extended by  org.apache.lucene.misc.GetTermInfo

public class GetTermInfo
extends Object

Utility to get document frequency and total number of occurrences (sum of the tf for each doc) of a term.

Constructor Summary
GetTermInfo()
Method Summary
static void | getTermInfo(Directory dir, Term term)
static void | main(String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GetTermInfo

public GetTermInfo()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

getTermInfo

public static void getTermInfo(Directory dir,
                               Term term)
                        throws Exception
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


HighFreqTerms

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.misc
Class HighFreqTerms

java.lang.Object
    extended by  org.apache.lucene.misc.HighFreqTerms

public class HighFreqTerms
extends Object

HighFreqTerms class extracts the top n most frequent terms (by document frequency ) from an existing Lucene index and reports their document frequency. If used with the -t flag it also reports their total tf (total number of occurences) in order of highest total tf

Field Summary
static int | DEFAULTnumTerms
static int | numTerms
Constructor Summary
HighFreqTerms()
Method Summary
static org.apache.lucene.misc.TermStats[] | getHighFreqTerms(IndexReader reader, int numTerms, String field)
static long | getTotalTermFreq(IndexReader reader, Term term)
static void | main(String[] args)
static org.apache.lucene.misc.TermStats[] | sortByTotalTermFreq(IndexReader reader, org.apache.lucene.misc.TermStats[] terms) Takes array of TermStats.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULTnumTerms

public static final int DEFAULTnumTerms
See Also:
Constant Field Values

numTerms

public static int numTerms
Constructor Detail

HighFreqTerms

public HighFreqTerms()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

getHighFreqTerms

public static org.apache.lucene.misc.TermStats[] getHighFreqTerms(IndexReader reader,
                                                                  int numTerms,
                                                                  String field)
                                                           throws Exception
Parameters:
reader -
numTerms -
field -
Returns:
TermStats[] ordered by terms with highest docFreq first.
Throws:
Exception

sortByTotalTermFreq

public static org.apache.lucene.misc.TermStats[] sortByTotalTermFreq(IndexReader reader,
                                                                     org.apache.lucene.misc.TermStats[] terms)
                                                              throws Exception
Takes array of TermStats. For each term looks up the tf for each doc containing the term and stores the total in the output array of TermStats. Output array is sorted by highest total tf.

Parameters:
reader -
terms - TermStats[]
Returns:
TermStats[]
Throws:
Exception

getTotalTermFreq

public static long getTotalTermFreq(IndexReader reader,
                                    Term term)
                             throws Exception
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexMergeTool

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.misc
Class IndexMergeTool

java.lang.Object
    extended by  org.apache.lucene.misc.IndexMergeTool

public class IndexMergeTool
extends Object

Merges indices specified on the command line into the index specified as the first command line argument.

Constructor Summary
IndexMergeTool()
Method Summary
static void main(String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IndexMergeTool

public IndexMergeTool()
Method Detail

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.misc
Classes
GetTermInfo
HighFreqTerms
IndexMergeTool
SweetSpotSimilarity


org.apache.lucene.misc

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.misc

Miscellaneous index tools.

See:
Description

Class Summary
GetTermInfo | Utility to get document frequency and total number of occurrences (sum of the tf for each doc) of a term.
HighFreqTerms | HighFreqTerms class extracts the top n most frequent terms (by document frequency ) from an existing Lucene index and reports their document frequency.
IndexMergeTool | Merges indices specified on the command line into the index specified as the first command line argument.
SweetSpotSimilarity | A similarity with a lengthNorm that provides for a "plateau" of equally good lengths, and tf helper functions.

Package org.apache.lucene.misc Description

Miscellaneous index tools.


org.apache.lucene.misc Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.misc

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.misc.GetTermInfo
    • org.apache.lucene.misc.HighFreqTerms
    • org.apache.lucene.misc.IndexMergeTool
    • org.apache.lucene.search.Similarity (implements java.io.Serializable)
      • org.apache.lucene.search.DefaultSimilarity
        • org.apache.lucene.misc.SweetSpotSimilarity


Uses of Package org.apache.lucene.misc

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.misc

No usage of org.apache.lucene.misc

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SweetSpotSimilarity

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.misc
Class SweetSpotSimilarity

java.lang.Object
    extended by  org.apache.lucene.search.Similarity
        extended by  org.apache.lucene.search.DefaultSimilarity
            extended by  org.apache.lucene.misc.SweetSpotSimilarity
All Implemented Interfaces:
Serializable
public class SweetSpotSimilarity
extends DefaultSimilarity

A similarity with a lengthNorm that provides for a "plateau" of equally good lengths, and tf helper functions.

For lengthNorm, A global min/max can be specified to define the plateau of lengths that should all have a norm of 1.0. Below the min, and above the max the lengthNorm drops off in a sqrt function.

A per field min/max can be specified if different fields have different sweet spots.

For tf, baselineTf and hyperbolicTf functions are provided, which subclasses can choose between.

See Also:
A Gnuplot file used to generate some of the visualizations refrenced from each function., Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.search.DefaultSimilarity
discountOverlaps
Fields inherited from class org.apache.lucene.search.Similarity
NO_DOC_ID_PROVIDED
Constructor Summary
SweetSpotSimilarity()
Method Summary
 float baselineTf(float freq)
Implemented as: (x <= min) ? base : sqrt(x+(base**2)-min) ...but with a special case check for 0.
 float computeLengthNorm(String fieldName, int numTerms)
Implemented as: 1/sqrt( steepness * (abs(x-min) + abs(x-max) - (max-min)) + 1 ) .
 float computeNorm(String fieldName, FieldInvertState state)
Implemented as state.getBoost() * lengthNorm(fieldName, numTokens) where numTokens does not count overlap tokens if discountOverlaps is true by default or true for this specific field.
 float hyperbolicTf(float freq)
Uses a hyperbolic tangent function that allows for a hard max...
 void setBaselineTfFactors(float base, float min)
Sets the baseline and minimum function variables for baselineTf
 void setHyperbolicTfFactors(float min, float max, double base, float xoffset)
Sets the function variables for the hyperbolicTf functions
 void setLengthNormFactors(int min, int max, float steepness)
Sets the default function variables used by lengthNorm when no field specific variables have been set.
 void setLengthNormFactors(String field, int min, int max, float steepness, boolean discountOverlaps)
Sets the function variables used by lengthNorm for a specific named field.
 float tf(int freq)
Delegates to baselineTf
Methods inherited from class org.apache.lucene.search.DefaultSimilarity
coord, getDiscountOverlaps, idf, queryNorm, setDiscountOverlaps, sloppyFreq, tf
Methods inherited from class org.apache.lucene.search.Similarity
decodeNorm, decodeNormValue, encodeNorm, encodeNormValue, getDefault, getNormDecoder, idfExplain, idfExplain, idfExplain, lengthNorm, scorePayload, setDefault
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SweetSpotSimilarity

public SweetSpotSimilarity()
Method Detail

setBaselineTfFactors

public void setBaselineTfFactors(float base,
                                 float min)
Sets the baseline and minimum function variables for baselineTf

See Also:
baselineTf(float)

setHyperbolicTfFactors

public void setHyperbolicTfFactors(float min,
                                   float max,
                                   double base,
                                   float xoffset)
Sets the function variables for the hyperbolicTf functions

Parameters:
min - the minimum tf value to ever be returned (default: 0.0)
max - the maximum tf value to ever be returned (default: 2.0)
base - the base value to be used in the exponential for the hyperbolic function (default: 1.3)
xoffset - the midpoint of the hyperbolic function (default: 10.0)
See Also:
hyperbolicTf(float)

setLengthNormFactors

public void setLengthNormFactors(int min,
                                 int max,
                                 float steepness)
Sets the default function variables used by lengthNorm when no field specific variables have been set.

See Also:
Similarity.lengthNorm(java.lang.String, int)

setLengthNormFactors

public void setLengthNormFactors(String field,
                                 int min,
                                 int max,
                                 float steepness,
                                 boolean discountOverlaps)
Sets the function variables used by lengthNorm for a specific named field.

Parameters:
field - field name
min - minimum value
max - maximum value
steepness - steepness of the curve
discountOverlaps - if true, numOverlapTokens will be subtracted from numTokens; if false then numOverlapTokens will be assumed to be 0 (see DefaultSimilarity.computeNorm(String, FieldInvertState) for details).
See Also:
Similarity.lengthNorm(java.lang.String, int)

computeNorm

public float computeNorm(String fieldName,
                         FieldInvertState state)
Implemented as state.getBoost() * lengthNorm(fieldName, numTokens) where numTokens does not count overlap tokens if discountOverlaps is true by default or true for this specific field.

Overrides:
computeNorm in class DefaultSimilarity
Parameters:
fieldName - field name
state - current processing state for this field
Returns:
the calculated float norm

computeLengthNorm

public float computeLengthNorm(String fieldName,
                               int numTerms)
Implemented as: 1/sqrt( steepness * (abs(x-min) + abs(x-max) - (max-min)) + 1 ) .

This degrades to 1/sqrt(x) when min and max are both 1 and steepness is 0.5

:TODO: potential optimization is to just flat out return 1.0f if numTerms is between min and max.

See Also:
setLengthNormFactors(int, int, float), An SVG visualization of this function

tf

public float tf(int freq)
Delegates to baselineTf

Overrides:
tf in class Similarity
Parameters:
freq - the frequency of a term within a document
Returns:
a score factor based on a term's within-document frequency
See Also:
baselineTf(float)

baselineTf

public float baselineTf(float freq)
Implemented as: (x <= min) ? base : sqrt(x+(base**2)-min) ...but with a special case check for 0.

This degrates to sqrt(x) when min and base are both 0

See Also:
setBaselineTfFactors(float, float), An SVG visualization of this function

hyperbolicTf

public float hyperbolicTf(float freq)
Uses a hyperbolic tangent function that allows for a hard max... tf(x)=min+(max-min)/2*(((base**(x-xoffset)-base**-(x-xoffset))/(base**(x-xoffset)+base**-(x-xoffset)))+1)

This code is provided as a convenience for subclasses that want to use a hyperbolic tf function.

See Also:
setHyperbolicTfFactors(float, float, double, float), An SVG visualization of this function
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.misc.GetTermInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.misc.GetTermInfo

No usage of org.apache.lucene.misc.GetTermInfo

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.misc.HighFreqTerms

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.misc.HighFreqTerms

No usage of org.apache.lucene.misc.HighFreqTerms

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.misc.IndexMergeTool

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.misc.IndexMergeTool

No usage of org.apache.lucene.misc.IndexMergeTool

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.misc.SweetSpotSimilarity

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.misc.SweetSpotSimilarity

No usage of org.apache.lucene.misc.SweetSpotSimilarity

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CharStream

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser
Interface CharStream

All Known Implementing Classes:
FastCharStream
public interface CharStream

This interface describes a character stream that maintains line and column number positions of the characters. It also has the capability to backup the stream to some extent. An implementation of this interface is used in the TokenManager implementation generated by JavaCCParser. All the methods except backup can be implemented in any fashion. backup needs to be implemented correctly for the correct operation of the lexer. Rest of the methods are all used to get information like line number, column number and the String that constitutes a token and are not used by the lexer. Hence their implementation won't affect the generated lexer's operation.

Method Summary
void | backup(int amount) Backs up the input stream by amount steps.
char | BeginToken() Returns the next character that marks the beginning of the next token.
void | Done() The lexer calls this function to indicate that it is done with the stream and hence implementations can free any resources held by this class.
int | getBeginColumn() Returns the column number of the first character for current token (being matched after the last call to BeginTOken).
int | getBeginLine() Returns the line number of the first character for current token (being matched after the last call to BeginTOken).
int | getColumn() Deprecated.
int | getEndColumn() Returns the column number of the last character for current token (being matched after the last call to BeginTOken).
int | getEndLine() Returns the line number of the last character for current token (being matched after the last call to BeginTOken).
String | GetImage() Returns a string made up of characters from the marked token beginning to the current buffer position.
int | getLine() Deprecated.
char[] | GetSuffix(int len) Returns an array of characters that make up the suffix of length 'len' for the currently matched token.
char | readChar() Returns the next character from the selected input.

Method Detail

readChar

char readChar()
              throws IOException
Returns the next character from the selected input. The method of selecting the input is the responsibility of the class implementing this interface. Can throw any java.io.IOException.

Throws:
IOException

getColumn

@Deprecated
int getColumn()
Deprecated.

getLine

@Deprecated
int getLine()
Deprecated.

getEndColumn

int getEndColumn()
Returns the column number of the last character for current token (being matched after the last call to BeginTOken).

getEndLine

int getEndLine()
Returns the line number of the last character for current token (being matched after the last call to BeginTOken).

getBeginColumn

int getBeginColumn()
Returns the column number of the first character for current token (being matched after the last call to BeginTOken).

getBeginLine

int getBeginLine()
Returns the line number of the first character for current token (being matched after the last call to BeginTOken).

backup

void backup(int amount)
Backs up the input stream by amount steps. Lexer calls this method if it had already read some characters, but could not use them to match a (longer) token. So, they will be used again as the prefix of the next token and it is the implemetation's responsibility to do this right.

BeginToken

char BeginToken()
                throws IOException
Returns the next character that marks the beginning of the next token. All characters must remain in the buffer between two successive calls to this method to implement backup correctly.

Throws:
IOException

GetImage

String GetImage()
Returns a string made up of characters from the marked token beginning to the current buffer position. Implementations have the choice of returning anything that they want to. For example, for efficiency, one might decide to just return null, which is a valid implementation.

GetSuffix

char[] GetSuffix(int len)
Returns an array of characters that make up the suffix of length 'len' for the currently matched token. This is used to build up the matched string for use in actions in the case of MORE. A simple and inefficient implementation of this is as follows : { String t = GetImage(); return t.substring(t.length() - len, t.length()).toCharArray(); }

Done

void Done()
The lexer calls this function to indicate that it is done with the stream and hence implementations can free any resources held by this class. Again, the body of this function can be just empty and it will not affect the lexer's operation.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


FastCharStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser
Class FastCharStream

java.lang.Object
    extended by  org.apache.lucene.queryParser.FastCharStream
All Implemented Interfaces:
CharStream
public final class FastCharStream
extends Object
implements CharStream

An efficient implementation of JavaCC's CharStream interface.

Note that this does not do line-number counting, but instead keeps track of the character position of the token in the input, as required by Lucene's Token API.

Constructor Summary
FastCharStream(Reader r)
Constructs from a Reader.
Method Summary
void | backup(int amount) Backs up the input stream by amount steps.
char | BeginToken() Returns the next character that marks the beginning of the next token.
void | Done() The lexer calls this function to indicate that it is done with the stream and hence implementations can free any resources held by this class.
int | getBeginColumn() Returns the column number of the first character for current token (being matched after the last call to BeginTOken).
int | getBeginLine() Returns the line number of the first character for current token (being matched after the last call to BeginTOken).
int | getColumn()
int | getEndColumn() Returns the column number of the last character for current token (being matched after the last call to BeginTOken).
int | getEndLine() Returns the line number of the last character for current token (being matched after the last call to BeginTOken).
String | GetImage() Returns a string made up of characters from the marked token beginning to the current buffer position.
int | getLine()
char[] | GetSuffix(int len) Returns an array of characters that make up the suffix of length 'len' for the currently matched token.
char | readChar() Returns the next character from the selected input.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FastCharStream

public FastCharStream(Reader r)
Constructs from a Reader.

Method Detail

readChar

public final char readChar()
                    throws IOException
Description copied from interface: CharStream
Returns the next character from the selected input. The method of selecting the input is the responsibility of the class implementing this interface. Can throw any java.io.IOException.

Specified by:
readChar in interface CharStream
Throws:
IOException

BeginToken

public final char BeginToken()
                      throws IOException
Description copied from interface: CharStream
Returns the next character that marks the beginning of the next token. All characters must remain in the buffer between two successive calls to this method to implement backup correctly.

Specified by:
BeginToken in interface CharStream
Throws:
IOException

backup

public final void backup(int amount)
Description copied from interface: CharStream
Backs up the input stream by amount steps. Lexer calls this method if it had already read some characters, but could not use them to match a (longer) token. So, they will be used again as the prefix of the next token and it is the implemetation's responsibility to do this right.

Specified by:
backup in interface CharStream

GetImage

public final String GetImage()
Description copied from interface: CharStream
Returns a string made up of characters from the marked token beginning to the current buffer position. Implementations have the choice of returning anything that they want to. For example, for efficiency, one might decide to just return null, which is a valid implementation.

Specified by:
GetImage in interface CharStream

GetSuffix

public final char[] GetSuffix(int len)
Description copied from interface: CharStream
Returns an array of characters that make up the suffix of length 'len' for the currently matched token. This is used to build up the matched string for use in actions in the case of MORE. A simple and inefficient implementation of this is as follows : { String t = GetImage(); return t.substring(t.length() - len, t.length()).toCharArray(); }

Specified by:
GetSuffix in interface CharStream

Done

public final void Done()
Description copied from interface: CharStream
The lexer calls this function to indicate that it is done with the stream and hence implementations can free any resources held by this class. Again, the body of this function can be just empty and it will not affect the lexer's operation.

Specified by:
Done in interface CharStream

getColumn

public final int getColumn()
Specified by:
getColumn in interface CharStream

getLine

public final int getLine()
Specified by:
getLine in interface CharStream

getEndColumn

public final int getEndColumn()
Description copied from interface: CharStream
Returns the column number of the last character for current token (being matched after the last call to BeginTOken).

Specified by:
getEndColumn in interface CharStream

getEndLine

public final int getEndLine()
Description copied from interface: CharStream
Returns the line number of the last character for current token (being matched after the last call to BeginTOken).

Specified by:
getEndLine in interface CharStream

getBeginColumn

public final int getBeginColumn()
Description copied from interface: CharStream
Returns the column number of the first character for current token (being matched after the last call to BeginTOken).

Specified by:
getBeginColumn in interface CharStream

getBeginLine

public final int getBeginLine()
Description copied from interface: CharStream
Returns the line number of the first character for current token (being matched after the last call to BeginTOken).

Specified by:
getBeginLine in interface CharStream
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiFieldQueryParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser
Class MultiFieldQueryParser

java.lang.Object
    extended by  org.apache.lucene.queryParser.QueryParser
        extended by  org.apache.lucene.queryParser.MultiFieldQueryParser
All Implemented Interfaces:
QueryParserConstants
public class MultiFieldQueryParser
extends QueryParser

A QueryParser which constructs queries to search multiple fields.

Version:
$Revision: 965592 $

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.queryParser.QueryParser
QueryParser.Operator
Field Summary
protected Map<String,Float> | boosts
protected String[] | fields
Fields inherited from class org.apache.lucene.queryParser.QueryParser
AND_OPERATOR, jj_nt, OR_OPERATOR, token, token_source
Fields inherited from interface org.apache.lucene.queryParser.QueryParserConstants
_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, BAREOPER, Boost, CARAT, COLON, DEFAULT, EOF, FUZZY_SLOP, LPAREN, MINUS, NOT, NUMBER, OR, PLUS, PREFIXTERM, QUOTED, RangeEx, RANGEEX_END, RANGEEX_GOOP, RANGEEX_QUOTED, RANGEEX_START, RANGEEX_TO, RangeIn, RANGEIN_END, RANGEIN_GOOP, RANGEIN_QUOTED, RANGEIN_START, RANGEIN_TO, RPAREN, STAR, TERM, tokenImage, WILDTERM
Constructor Summary
MultiFieldQueryParser(Version matchVersion, String[] fields, Analyzer analyzer)
Creates a MultiFieldQueryParser.
MultiFieldQueryParser(Version matchVersion, String[] fields, Analyzer analyzer, Map<String,Float> boosts)
Creates a MultiFieldQueryParser.
Method Summary
protected  Query getFieldQuery(String field, String queryText, boolean quoted)
protected  Query getFieldQuery(String field, String queryText, int slop)
Base implementation delegates to QueryParser.getFieldQuery(String,String,boolean).
protected  Query getFuzzyQuery(String field, String termStr, float minSimilarity)
Factory method for generating a query (similar to QueryParser.getWildcardQuery(java.lang.String, java.lang.String)).
protected  Query getPrefixQuery(String field, String termStr)
Factory method for generating a query (similar to QueryParser.getWildcardQuery(java.lang.String, java.lang.String)).
protected  Query getRangeQuery(String field, String part1, String part2, boolean inclusive)
protected  Query getWildcardQuery(String field, String termStr)
Factory method for generating a query.
static Query parse(Version matchVersion, String[] queries, String[] fields, Analyzer analyzer)
Parses a query which searches on the fields specified.
static Query parse(Version matchVersion, String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Parses a query, searching on the fields specified.
static Query parse(Version matchVersion, String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Parses a query, searching on the fields specified.
Methods inherited from class org.apache.lucene.queryParser.QueryParser
addClause, Clause, Conjunction, disable_tracing, enable_tracing, escape, generateParseException, getAllowLeadingWildcard, getAnalyzer, getAutoGeneratePhraseQueries, getBooleanQuery, getBooleanQuery, getDateResolution, getDefaultOperator, getEnablePositionIncrements, getField, getFieldQuery, getFuzzyMinSim, getFuzzyPrefixLength, getLocale, getLowercaseExpandedTerms, getMultiTermRewriteMethod, getNextToken, getPhraseSlop, getRangeCollator, getToken, main, Modifiers, newBooleanClause, newBooleanQuery, newFuzzyQuery, newMatchAllDocsQuery, newMultiPhraseQuery, newPhraseQuery, newPrefixQuery, newRangeQuery, newTermQuery, newWildcardQuery, parse, Query, ReInit, ReInit, setAllowLeadingWildcard, setAutoGeneratePhraseQueries, setDateResolution, setDateResolution, setDefaultOperator, setEnablePositionIncrements, setFuzzyMinSim, setFuzzyPrefixLength, setLocale, setLowercaseExpandedTerms, setMultiTermRewriteMethod, setPhraseSlop, setRangeCollator, Term, TopLevelQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

fields

protected String[] fields

boosts

protected Map<String,Float> boosts
Constructor Detail

MultiFieldQueryParser

public MultiFieldQueryParser(Version matchVersion,
                             String[] fields,
                             Analyzer analyzer,
                             Map<String,Float> boosts)
Creates a MultiFieldQueryParser. Allows passing of a map with term to Boost, and the boost to apply to each term.

It will, when parse(String query) is called, construct a query like this (assuming the query consists of two terms and you specify the two fields title and body):

(title:term1 body:term1) (title:term2 body:term2)

When setDefaultOperator(AND_OPERATOR) is set, the result will be:

+(title:term1 body:term1) +(title:term2 body:term2)

When you pass a boost (title=>5 body=>10) you can get

+(title:term1^5.0 body:term1^10.0) +(title:term2^5.0 body:term2^10.0)

In other words, all the query's terms must appear, but it doesn't matter in what fields they appear.

MultiFieldQueryParser

public MultiFieldQueryParser(Version matchVersion,
                             String[] fields,
                             Analyzer analyzer)
Creates a MultiFieldQueryParser.

It will, when parse(String query) is called, construct a query like this (assuming the query consists of two terms and you specify the two fields title and body):

(title:term1 body:term1) (title:term2 body:term2)

When setDefaultOperator(AND_OPERATOR) is set, the result will be:

+(title:term1 body:term1) +(title:term2 body:term2)

In other words, all the query's terms must appear, but it doesn't matter in what fields they appear.

Method Detail

getFieldQuery

protected Query getFieldQuery(String field,
                              String queryText,
                              int slop)
                       throws ParseException
Description copied from class: QueryParser
Base implementation delegates to QueryParser.getFieldQuery(String,String,boolean). This method may be overridden, for example, to return a SpanNearQuery instead of a PhraseQuery.

Overrides:
getFieldQuery in class QueryParser
Throws:
ParseException - throw in overridden method to disallow

getFieldQuery

protected Query getFieldQuery(String field,
                              String queryText,
                              boolean quoted)
                       throws ParseException
Overrides:
getFieldQuery in class QueryParser
Throws:
ParseException - throw in overridden method to disallow

getFuzzyQuery

protected Query getFuzzyQuery(String field,
                              String termStr,
                              float minSimilarity)
                       throws ParseException
Description copied from class: QueryParser
Factory method for generating a query (similar to QueryParser.getWildcardQuery(java.lang.String, java.lang.String)). Called when parser parses an input term token that has the fuzzy suffix (~) appended.

Overrides:
getFuzzyQuery in class QueryParser
Parameters:
field - Name of the field query will use.
termStr - Term token to use for building term for the query
Returns:
Resulting Query built for the term
Throws:
ParseException - throw in overridden method to disallow

getPrefixQuery

protected Query getPrefixQuery(String field,
                               String termStr)
                        throws ParseException
Description copied from class: QueryParser
Factory method for generating a query (similar to QueryParser.getWildcardQuery(java.lang.String, java.lang.String)). Called when parser parses an input term token that uses prefix notation; that is, contains a single '*' wildcard character as its last character. Since this is a special case of generic wildcard term, and such a query can be optimized easily, this usually results in a different query object.

Depending on settings, a prefix term may be lower-cased automatically. It will not go through the default Analyzer, however, since normal Analyzers are unlikely to work properly with wildcard templates.

Can be overridden by extending classes, to provide custom handling for wild card queries, which may be necessary due to missing analyzer calls.

Overrides:
getPrefixQuery in class QueryParser
Parameters:
field - Name of the field query will use.
termStr - Term token to use for building term for the query (without trailing '*' character!)
Returns:
Resulting Query built for the term
Throws:
ParseException - throw in overridden method to disallow

getWildcardQuery

protected Query getWildcardQuery(String field,
                                 String termStr)
                          throws ParseException
Description copied from class: QueryParser
Factory method for generating a query. Called when parser parses an input term token that contains one or more wildcard characters (? and *), but is not a prefix term token (one that has just a single * character at the end)

Depending on settings, prefix term may be lower-cased automatically. It will not go through the default Analyzer, however, since normal Analyzers are unlikely to work properly with wildcard templates.

Can be overridden by extending classes, to provide custom handling for wildcard queries, which may be necessary due to missing analyzer calls.

Overrides:
getWildcardQuery in class QueryParser
Parameters:
field - Name of the field query will use.
termStr - Term token that contains one or more wild card characters (? or *), but is not simple prefix term
Returns:
Resulting Query built for the term
Throws:
ParseException - throw in overridden method to disallow

getRangeQuery

protected Query getRangeQuery(String field,
                              String part1,
                              String part2,
                              boolean inclusive)
                       throws ParseException
Overrides:
getRangeQuery in class QueryParser
Throws:
ParseException - throw in overridden method to disallow

parse

public static Query parse(Version matchVersion,
                          String[] queries,
                          String[] fields,
                          Analyzer analyzer)
                   throws ParseException
Parses a query which searches on the fields specified.

If x fields are specified, this effectively constructs:

 (field1:query1) (field2:query2) (field3:query3)...(fieldx:queryx)

Parameters:
matchVersion - Lucene version to match; this is passed through to QueryParser.
queries - Queries strings to parse
fields - Fields to search on
analyzer - Analyzer to use
Throws:
ParseException - if query parsing fails
IllegalArgumentException - if the length of the queries array differs from the length of the fields array

parse

public static Query parse(Version matchVersion,
                          String query,
                          String[] fields,
                          BooleanClause.Occur[] flags,
                          Analyzer analyzer)
                   throws ParseException
Parses a query, searching on the fields specified. Use this if you need to specify certain fields as required, and others as prohibited.

 Usage:

 String[] fields = {"filename", "contents", "description"};
 BooleanClause.Occur[] flags = {BooleanClause.Occur.SHOULD,
                BooleanClause.Occur.MUST,
                BooleanClause.Occur.MUST_NOT};
 MultiFieldQueryParser.parse("query", fields, flags, analyzer);

The code above would construct a query:

 (filename:query) +(contents:query) -(description:query)

Parameters:
matchVersion - Lucene version to match; this is passed through to QueryParser.
query - Query string to parse
fields - Fields to search on
flags - Flags describing the fields
analyzer - Analyzer to use
Throws:
ParseException - if query parsing fails
IllegalArgumentException - if the length of the fields array differs from the length of the flags array

parse

public static Query parse(Version matchVersion,
                          String[] queries,
                          String[] fields,
                          BooleanClause.Occur[] flags,
                          Analyzer analyzer)
                   throws ParseException
Parses a query, searching on the fields specified. Use this if you need to specify certain fields as required, and others as prohibited.

 Usage:

 String[] query = {"query1", "query2", "query3"};
 String[] fields = {"filename", "contents", "description"};
 BooleanClause.Occur[] flags = {BooleanClause.Occur.SHOULD,
                BooleanClause.Occur.MUST,
                BooleanClause.Occur.MUST_NOT};
 MultiFieldQueryParser.parse(query, fields, flags, analyzer);

The code above would construct a query:

 (filename:query1) +(contents:query2) -(description:query3)

Parameters:
matchVersion - Lucene version to match; this is passed through to QueryParser.
queries - Queries string to parse
fields - Fields to search on
flags - Flags describing the fields
analyzer - Analyzer to use
Throws:
ParseException - if query parsing fails
IllegalArgumentException - if the length of the queries, fields, and flags array differ
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser
Interfaces
CharStream
QueryParserConstants
Classes
FastCharStream
MultiFieldQueryParser
QueryParser
QueryParserTestBase
QueryParserTestBase.QPTestAnalyzer
QueryParserTestBase.QPTestFilter
QueryParserTestBase.QPTestParser
QueryParserTokenManager
Token
Enums
QueryParser.Operator
Exceptions
ParseException
Errors
TokenMgrError


org.apache.lucene.queryParser

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser

A simple query parser implemented with JavaCC.

See:
Description

Interface Summary
CharStream | This interface describes a character stream that maintains line and column number positions of the characters.
QueryParserConstants | Token literal values and constants.

Class Summary
FastCharStream | An efficient implementation of JavaCC's CharStream interface.
MultiFieldQueryParser | A QueryParser which constructs queries to search multiple fields.
QueryParser | This class is generated by JavaCC.
QueryParserTestBase | Base Test class for QueryParser subclasses
QueryParserTestBase.QPTestAnalyzer | Filters LowerCaseTokenizer with QPTestFilter.
QueryParserTestBase.QPTestFilter | Filter which discards the token 'stop' and which expands the token 'phrase' into 'phrase1 phrase2'
QueryParserTestBase.QPTestParser | Test QueryParser that does not allow fuzzy or wildcard queries.
QueryParserTokenManager | Token Manager.
Token | Describes the input token stream.

Enum Summary
QueryParser.Operator The default operator for parsing queries.

Exception Summary
ParseException This exception is thrown when parse errors are encountered.

Error Summary
TokenMgrError Token Manager Error.

Package org.apache.lucene.queryParser Description

A simple query parser implemented with JavaCC.

Note that JavaCC defines lots of public classes, methods and fields that do not need to be public. These clutter the documentation. Sorry.

Note that because JavaCC defines a class named Token, org.apache.lucene.analysis.Token must always be fully qualified in source code in this package.

NOTE: contrib/queryparser has an alternative queryparser that matches the syntax of this one, but is more modular, enabling substantial customization to how a query is created.


org.apache.lucene.queryParser Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.analysis.Analyzer (implements java.io.Closeable)
      • org.apache.lucene.queryParser.QueryParserTestBase.QPTestAnalyzer
    • org.junit.Assert
      • org.apache.lucene.util.LuceneTestCase
        • org.apache.lucene.queryParser.QueryParserTestBase
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.queryParser.QueryParserTestBase.QPTestFilter
    • org.apache.lucene.queryParser.FastCharStream (implements org.apache.lucene.queryParser.CharStream)
    • org.apache.lucene.queryParser.QueryParser (implements org.apache.lucene.queryParser.QueryParserConstants)
      • org.apache.lucene.queryParser.MultiFieldQueryParser
      • org.apache.lucene.queryParser.QueryParserTestBase.QPTestParser
    • org.apache.lucene.queryParser.QueryParserTokenManager (implements org.apache.lucene.queryParser.QueryParserConstants)
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Error
        • org.apache.lucene.queryParser.TokenMgrError
      • java.lang.Exception
        • org.apache.lucene.queryParser.ParseException
    • org.apache.lucene.queryParser.Token (implements java.io.Serializable)

Interface Hierarchy

  • org.apache.lucene.queryParser.CharStream
  • org.apache.lucene.queryParser.QueryParserConstants

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.queryParser.QueryParser.Operator


Uses of Package org.apache.lucene.queryParser

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser

Packages that use org.apache.lucene.queryParser
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.benchmark.quality | Search Quality Benchmarking.
org.apache.lucene.benchmark.quality.utils | Miscellaneous utilities for search quality benchmarking: query parsing, submission reports.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.analyzing | QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.
org.apache.lucene.queryParser.complexPhrase | QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
org.apache.lucene.queryParser.ext | Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.xmlparser | Parser that produces Lucene Query objects from XML streams.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Classes in org.apache.lucene.queryParser used by org.apache.lucene.benchmark.byTask.feeds
QueryParser
This class is generated by JavaCC.

Classes in org.apache.lucene.queryParser used by org.apache.lucene.benchmark.quality
ParseException
This exception is thrown when parse errors are encountered.

Classes in org.apache.lucene.queryParser used by org.apache.lucene.benchmark.quality.utils
ParseException
This exception is thrown when parse errors are encountered.

Classes in org.apache.lucene.queryParser used by org.apache.lucene.queryParser
CharStream
This interface describes a character stream that maintains line and column number positions of the characters.
ParseException
This exception is thrown when parse errors are encountered.
QueryParser
This class is generated by JavaCC.
QueryParser.Operator
The default operator for parsing queries.
QueryParserConstants
Token literal values and constants.
QueryParserTokenManager
Token Manager.
Token
Describes the input token stream.

Classes in org.apache.lucene.queryParser used by org.apache.lucene.queryParser.analyzing
ParseException
This exception is thrown when parse errors are encountered.
QueryParser
This class is generated by JavaCC.
QueryParserConstants
Token literal values and constants.

Classes in org.apache.lucene.queryParser used by org.apache.lucene.queryParser.complexPhrase
ParseException
This exception is thrown when parse errors are encountered.
QueryParser
This class is generated by JavaCC.
QueryParserConstants
Token literal values and constants.

Classes in org.apache.lucene.queryParser used by org.apache.lucene.queryParser.ext
ParseException
This exception is thrown when parse errors are encountered.
QueryParser
This class is generated by JavaCC.
QueryParserConstants
Token literal values and constants.

Classes in org.apache.lucene.queryParser used by org.apache.lucene.queryParser.standard
ParseException
This exception is thrown when parse errors are encountered.

Classes in org.apache.lucene.queryParser used by org.apache.lucene.xmlparser
QueryParser
This class is generated by JavaCC.

Classes in org.apache.lucene.queryParser used by org.apache.lucene.xmlparser.builders
QueryParser
This class is generated by JavaCC.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ParseException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser
Class ParseException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  org.apache.lucene.queryParser.ParseException
All Implemented Interfaces:
Serializable
public class ParseException
extends Exception

This exception is thrown when parse errors are encountered. You can explicitly create objects of this exception type by calling the method generateParseException in the generated parser. You can modify this class to customize your error reporting mechanisms so long as you retain the public fields.

See Also:
Serialized Form

Field Summary
Token | currentToken This is the last token that has been consumed successfully.
protected String | eol The end of line string for this machine.
int[][] | expectedTokenSequences Each entry in this array is an array of integers.
String[] | tokenImage This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred.
Constructor Summary
ParseException()
The following constructors are for use by you for whatever purpose you can think of.
ParseException(String message)
Constructor with message.
ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal)
This constructor is used by the method "generateParseException" in the generated parser.
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

currentToken

public Token currentToken
This is the last token that has been consumed successfully. If this object has been created due to a parse error, the token followng this token will (therefore) be the first error token.

expectedTokenSequences

public int[][] expectedTokenSequences
Each entry in this array is an array of integers. Each array of integers represents a sequence of tokens (by their ordinal values) that is expected at this point of the parse.

tokenImage

public String[] tokenImage
This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred. This array is defined in the generated ...Constants interface.

eol

protected String eol
The end of line string for this machine.

Constructor Detail

ParseException

public ParseException(Token currentTokenVal,
                      int[][] expectedTokenSequencesVal,
                      String[] tokenImageVal)
This constructor is used by the method "generateParseException" in the generated parser. Calling this constructor generates a new object of this type with the fields "currentToken", "expectedTokenSequences", and "tokenImage" set.

ParseException

public ParseException()
The following constructors are for use by you for whatever purpose you can think of. Constructing the exception in this manner makes the exception behave in the normal way - i.e., as documented in the class "Throwable". The fields "errorToken", "expectedTokenSequences", and "tokenImage" do not contain relevant information. The JavaCC generated code does not use these constructors.

ParseException

public ParseException(String message)
Constructor with message.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser
Class QueryParser

java.lang.Object
    extended by  org.apache.lucene.queryParser.QueryParser
All Implemented Interfaces:
QueryParserConstants
Direct Known Subclasses:
AnalyzingQueryParser, ComplexPhraseQueryParser, ExtendableQueryParser, MultiFieldQueryParser, QueryParserTestBase.QPTestParser
public class QueryParser
extends Object
implements QueryParserConstants

This class is generated by JavaCC. The most important method is parse(String). The syntax for query strings is as follows: A Query is a series of clauses. A clause may be prefixed by:

  • a plus (+) or a minus (-) sign, indicating that the clause is required or prohibited respectively; or
  • a term followed by a colon, indicating the field to be searched. This enables one to construct queries which search multiple fields.
A clause may be either:
  • a term, indicating all the documents that contain this term; or
  • a nested query, enclosed in parentheses. Note that this may be used with a +/- prefix to require any of a set of terms.
Thus, in BNF, the query grammar is:
   Query  ::= ( Clause )*
   Clause ::= ["+", "-"] [<TERM> ":"] ( <TERM> | "(" Query ")" )

Examples of appropriately formatted queries can be found in the query syntax documentation.

In TermRangeQuerys, QueryParser tries to detect date values, e.g. date:[6/1/2005 TO 6/4/2005] produces a range query that searches for "date" fields between 2005-06-01 and 2005-06-04. Note that the format of the accepted input depends on the locale. By default a date is converted into a search term using the deprecated DateField for compatibility reasons. To use the new DateTools to convert dates, a DateTools.Resolution has to be set.

The date resolution that shall be used for RangeQueries can be set using setDateResolution(DateTools.Resolution) or setDateResolution(String, DateTools.Resolution). The former sets the default date resolution for all fields, whereas the latter can be used to set field specific date resolutions. Field specific date resolutions take, if set, precedence over the default date resolution.

If you use neither DateField nor DateTools in your index, you can create your own query parser that inherits QueryParser and overwrites getRangeQuery(String, String, String, boolean) to use a different method for date conversion.

Note that QueryParser is not thread-safe.

NOTE: there is a new QueryParser in contrib, which matches the same syntax as this class, but is more modular, enabling substantial customization to how a query is created.

NOTE: You must specify the required Version compatibility when creating QueryParser:

  • As of 2.9, setEnablePositionIncrements(boolean) is true by default.
  • As of 3.1, setAutoGeneratePhraseQueries(boolean) is false by default.

Nested Class Summary
static class QueryParser.Operator
The default operator for parsing queries.
Field Summary
static QueryParser.Operator | AND_OPERATOR Alternative form of QueryParser.Operator.AND
Token | jj_nt Next token.
static QueryParser.Operator | OR_OPERATOR Alternative form of QueryParser.Operator.OR
Token | token Current token.
QueryParserTokenManager | token_source Generated Token Manager.
Fields inherited from interface org.apache.lucene.queryParser.QueryParserConstants
_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, BAREOPER, Boost, CARAT, COLON, DEFAULT, EOF, FUZZY_SLOP, LPAREN, MINUS, NOT, NUMBER, OR, PLUS, PREFIXTERM, QUOTED, RangeEx, RANGEEX_END, RANGEEX_GOOP, RANGEEX_QUOTED, RANGEEX_START, RANGEEX_TO, RangeIn, RANGEIN_END, RANGEIN_GOOP, RANGEIN_QUOTED, RANGEIN_START, RANGEIN_TO, RPAREN, STAR, TERM, tokenImage, WILDTERM
Constructor Summary
protected | QueryParser(CharStream stream) Constructor with user supplied CharStream.
protected | QueryParser(QueryParserTokenManager tm) Constructor with generated Token Manager.
 | QueryParser(Version matchVersion, String f, Analyzer a) Constructs a query parser.
Method Summary
protected  void addClause(List<BooleanClause> clauses, int conj, int mods, Query q)
 Query Clause(String field)
 int Conjunction()
 void disable_tracing()
Disable tracing.
 void enable_tracing()
Enable tracing.
static String escape(String s)
Returns a String where those characters that QueryParser expects to be escaped are escaped by a preceding \.
 ParseException generateParseException()
Generate ParseException.
 boolean getAllowLeadingWildcard()
 Analyzer getAnalyzer()
 boolean getAutoGeneratePhraseQueries()
protected  Query getBooleanQuery(List<BooleanClause> clauses)
Factory method for generating query, given a set of clauses.
protected  Query getBooleanQuery(List<BooleanClause> clauses, boolean disableCoord)
Factory method for generating query, given a set of clauses.
 DateTools.Resolution getDateResolution(String fieldName)
Returns the date resolution that is used by RangeQueries for the given field.
 QueryParser.Operator getDefaultOperator()
Gets implicit operator setting, which will be either AND_OPERATOR or OR_OPERATOR.
 boolean getEnablePositionIncrements()
 String getField()
protected  Query getFieldQuery(String field, String queryText)
Deprecated. Use getFieldQuery(String,String,boolean) instead.
protected  Query getFieldQuery(String field, String queryText, boolean quoted)
protected  Query getFieldQuery(String field, String queryText, int slop)
Base implementation delegates to getFieldQuery(String,String,boolean).
 float getFuzzyMinSim()
Get the minimal similarity for fuzzy queries.
 int getFuzzyPrefixLength()
Get the prefix length for fuzzy queries.
protected  Query getFuzzyQuery(String field, String termStr, float minSimilarity)
Factory method for generating a query (similar to getWildcardQuery(java.lang.String, java.lang.String)).
 Locale getLocale()
Returns current locale, allowing access by subclasses.
 boolean getLowercaseExpandedTerms()
 MultiTermQuery.RewriteMethod getMultiTermRewriteMethod()
 Token getNextToken()
Get the next Token.
 int getPhraseSlop()
Gets the default slop for phrases.
protected  Query getPrefixQuery(String field, String termStr)
Factory method for generating a query (similar to getWildcardQuery(java.lang.String, java.lang.String)).
 Collator getRangeCollator()
protected  Query getRangeQuery(String field, String part1, String part2, boolean inclusive)
 Token getToken(int index)
Get the specific Token.
protected  Query getWildcardQuery(String field, String termStr)
Factory method for generating a query.
static void main(String[] args)
Command line tool to test QueryParser, using SimpleAnalyzer.
 int Modifiers()
protected  BooleanClause newBooleanClause(Query q, BooleanClause.Occur occur)
Builds a new BooleanClause instance
protected  BooleanQuery newBooleanQuery(boolean disableCoord)
Builds a new BooleanQuery instance
protected  Query newFuzzyQuery(Term term, float minimumSimilarity, int prefixLength)
Builds a new FuzzyQuery instance
protected  Query newMatchAllDocsQuery()
Builds a new MatchAllDocsQuery instance
protected  MultiPhraseQuery newMultiPhraseQuery()
Builds a new MultiPhraseQuery instance
protected  PhraseQuery newPhraseQuery()
Builds a new PhraseQuery instance
protected  Query newPrefixQuery(Term prefix)
Builds a new PrefixQuery instance
protected  Query newRangeQuery(String field, String part1, String part2, boolean inclusive)
Builds a new TermRangeQuery instance
protected  Query newTermQuery(Term term)
Builds a new TermQuery instance
protected  Query newWildcardQuery(Term t)
Builds a new WildcardQuery instance
 Query parse(String query)
Parses a query string, returning a Query.
 Query Query(String field)
 void ReInit(CharStream stream)
Reinitialise.
 void ReInit(QueryParserTokenManager tm)
Reinitialise.
 void setAllowLeadingWildcard(boolean allowLeadingWildcard)
Set to true to allow leading wildcard characters.
 void setAutoGeneratePhraseQueries(boolean value)
Set to true if phrase queries will be automatically generated when the analyzer returns more than one term from whitespace delimited text.
 void setDateResolution(DateTools.Resolution dateResolution)
Sets the default date resolution used by RangeQueries for fields for which no specific date resolutions has been set.
 void setDateResolution(String fieldName, DateTools.Resolution dateResolution)
Sets the date resolution used by RangeQueries for a specific field.
 void setDefaultOperator(QueryParser.Operator op)
Sets the boolean operator of the QueryParser.
 void setEnablePositionIncrements(boolean enable)
Set to true to enable position increments in result query.
 void setFuzzyMinSim(float fuzzyMinSim)
Set the minimum similarity for fuzzy queries.
 void setFuzzyPrefixLength(int fuzzyPrefixLength)
Set the prefix length for fuzzy queries.
 void setLocale(Locale locale)
Set locale used by date range parsing.
 void setLowercaseExpandedTerms(boolean lowercaseExpandedTerms)
Whether terms of wildcard, prefix, fuzzy and range queries are to be automatically lower-cased or not.
 void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method)
By default QueryParser uses MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT when creating a PrefixQuery, WildcardQuery or RangeQuery.
 void setPhraseSlop(int phraseSlop)
Sets the default slop for phrases.
 void setRangeCollator(Collator rc)
Sets the collator used to determine index term inclusion in ranges for RangeQuerys.
 Query Term(String field)
 Query TopLevelQuery(String field)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

AND_OPERATOR

public static final QueryParser.Operator AND_OPERATOR
Alternative form of QueryParser.Operator.AND

OR_OPERATOR

public static final QueryParser.Operator OR_OPERATOR
Alternative form of QueryParser.Operator.OR

token_source

public QueryParserTokenManager token_source
Generated Token Manager.

token

public Token token
Current token.

jj_nt

public Token jj_nt
Next token.

Constructor Detail

QueryParser

public QueryParser(Version matchVersion,
                   String f,
                   Analyzer a)
Constructs a query parser.

Parameters:
matchVersion - Lucene version to match. See above.
f - the default field for query terms.
a - used to find terms in the query text.

QueryParser

protected QueryParser(CharStream stream)
Constructor with user supplied CharStream.

QueryParser

protected QueryParser(QueryParserTokenManager tm)
Constructor with generated Token Manager.

Method Detail

parse

public Query parse(String query)
            throws ParseException
Parses a query string, returning a Query.

Parameters:
query - the query string to be parsed.
Throws:
ParseException - if the parsing fails

getAnalyzer

public Analyzer getAnalyzer()
Returns:
Returns the analyzer.

getField

public String getField()
Returns:
Returns the field.

getAutoGeneratePhraseQueries

public final boolean getAutoGeneratePhraseQueries()
See Also:
setAutoGeneratePhraseQueries(boolean)

setAutoGeneratePhraseQueries

public final void setAutoGeneratePhraseQueries(boolean value)
Set to true if phrase queries will be automatically generated when the analyzer returns more than one term from whitespace delimited text. NOTE: this behavior may not be suitable for all languages.

Set to false if phrase queries should only be generated when surrounded by double quotes.

getFuzzyMinSim

public float getFuzzyMinSim()
Get the minimal similarity for fuzzy queries.

setFuzzyMinSim

public void setFuzzyMinSim(float fuzzyMinSim)
Set the minimum similarity for fuzzy queries. Default is 0.5f.

getFuzzyPrefixLength

public int getFuzzyPrefixLength()
Get the prefix length for fuzzy queries.

Returns:
Returns the fuzzyPrefixLength.

setFuzzyPrefixLength

public void setFuzzyPrefixLength(int fuzzyPrefixLength)
Set the prefix length for fuzzy queries. Default is 0.

Parameters:
fuzzyPrefixLength - The fuzzyPrefixLength to set.

setPhraseSlop

public void setPhraseSlop(int phraseSlop)
Sets the default slop for phrases. If zero, then exact phrase matches are required. Default value is zero.

getPhraseSlop

public int getPhraseSlop()
Gets the default slop for phrases.

setAllowLeadingWildcard

public void setAllowLeadingWildcard(boolean allowLeadingWildcard)
Set to true to allow leading wildcard characters.

When set, * or ? are allowed as the first character of a PrefixQuery and WildcardQuery. Note that this can produce very slow queries on big indexes.

Default: false.

getAllowLeadingWildcard

public boolean getAllowLeadingWildcard()
See Also:
setAllowLeadingWildcard(boolean)

setEnablePositionIncrements

public void setEnablePositionIncrements(boolean enable)
Set to true to enable position increments in result query.

When set, result phrase and multi-phrase queries will be aware of position increments. Useful when e.g. a StopFilter increases the position increment of the token that follows an omitted token.

Default: false.

getEnablePositionIncrements

public boolean getEnablePositionIncrements()
See Also:
setEnablePositionIncrements(boolean)

setDefaultOperator

public void setDefaultOperator(QueryParser.Operator op)
Sets the boolean operator of the QueryParser. In default mode (OR_OPERATOR) terms without any modifiers are considered optional: for example capital of Hungary is equal to capital OR of OR Hungary.
In AND_OPERATOR mode terms are considered to be in conjunction: the above mentioned query is parsed as capital AND of AND Hungary

getDefaultOperator

public QueryParser.Operator getDefaultOperator()
Gets implicit operator setting, which will be either AND_OPERATOR or OR_OPERATOR.

setLowercaseExpandedTerms

public void setLowercaseExpandedTerms(boolean lowercaseExpandedTerms)
Whether terms of wildcard, prefix, fuzzy and range queries are to be automatically lower-cased or not. Default is true.

getLowercaseExpandedTerms

public boolean getLowercaseExpandedTerms()
See Also:
setLowercaseExpandedTerms(boolean)

setMultiTermRewriteMethod

public void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method)
By default QueryParser uses MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT when creating a PrefixQuery, WildcardQuery or RangeQuery. This implementation is generally preferable because it a) Runs faster b) Does not have the scarcity of terms unduly influence score c) avoids any "TooManyBooleanClauses" exception. However, if your application really needs to use the old-fashioned BooleanQuery expansion rewriting and the above points are not relevant then use this to change the rewrite method.

getMultiTermRewriteMethod

public MultiTermQuery.RewriteMethod getMultiTermRewriteMethod()
See Also:
setMultiTermRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod)

setLocale

public void setLocale(Locale locale)
Set locale used by date range parsing.

getLocale

public Locale getLocale()
Returns current locale, allowing access by subclasses.

setDateResolution

public void setDateResolution(DateTools.Resolution dateResolution)
Sets the default date resolution used by RangeQueries for fields for which no specific date resolutions has been set. Field specific resolutions can be set with setDateResolution(String, DateTools.Resolution).

Parameters:
dateResolution - the default date resolution to set

setDateResolution

public void setDateResolution(String fieldName,
                              DateTools.Resolution dateResolution)
Sets the date resolution used by RangeQueries for a specific field.

Parameters:
fieldName - field for which the date resolution is to be set
dateResolution - date resolution to set

getDateResolution

public DateTools.Resolution getDateResolution(String fieldName)
Returns the date resolution that is used by RangeQueries for the given field. Returns null, if no default or field specific date resolution has been set for the given field.

setRangeCollator

public void setRangeCollator(Collator rc)
Sets the collator used to determine index term inclusion in ranges for RangeQuerys.

WARNING: Setting the rangeCollator to a non-null collator using this method will cause every single index Term in the Field referenced by lowerTerm and/or upperTerm to be examined. Depending on the number of index Terms in this Field, the operation could be very slow.

Parameters:
rc - the collator to use when constructing RangeQuerys

getRangeCollator

public Collator getRangeCollator()
Returns:
the collator used to determine index term inclusion in ranges for RangeQuerys.

addClause

protected void addClause(List<BooleanClause> clauses,
                         int conj,
                         int mods,
                         Query q)

getFieldQuery

@Deprecated
protected Query getFieldQuery(String field,
                                         String queryText)
                       throws ParseException
Deprecated. Use getFieldQuery(String,String,boolean) instead.

Throws:
ParseException

getFieldQuery

protected Query getFieldQuery(String field,
                              String queryText,
                              boolean quoted)
                       throws ParseException
Throws:
ParseException - throw in overridden method to disallow

getFieldQuery

protected Query getFieldQuery(String field,
                              String queryText,
                              int slop)
                       throws ParseException
Base implementation delegates to getFieldQuery(String,String,boolean). This method may be overridden, for example, to return a SpanNearQuery instead of a PhraseQuery.

Throws:
ParseException - throw in overridden method to disallow

getRangeQuery

protected Query getRangeQuery(String field,
                              String part1,
                              String part2,
                              boolean inclusive)
                       throws ParseException
Throws:
ParseException - throw in overridden method to disallow

newBooleanQuery

protected BooleanQuery newBooleanQuery(boolean disableCoord)
Builds a new BooleanQuery instance

Parameters:
disableCoord - disable coord
Returns:
new BooleanQuery instance

newBooleanClause

protected BooleanClause newBooleanClause(Query q,
                                         BooleanClause.Occur occur)
Builds a new BooleanClause instance

Parameters:
q - sub query
occur - how this clause should occur when matching documents
Returns:
new BooleanClause instance

newTermQuery

protected Query newTermQuery(Term term)
Builds a new TermQuery instance

Parameters:
term - term
Returns:
new TermQuery instance

newPhraseQuery

protected PhraseQuery newPhraseQuery()
Builds a new PhraseQuery instance

Returns:
new PhraseQuery instance

newMultiPhraseQuery

protected MultiPhraseQuery newMultiPhraseQuery()
Builds a new MultiPhraseQuery instance

Returns:
new MultiPhraseQuery instance

newPrefixQuery

protected Query newPrefixQuery(Term prefix)
Builds a new PrefixQuery instance

Parameters:
prefix - Prefix term
Returns:
new PrefixQuery instance

newFuzzyQuery

protected Query newFuzzyQuery(Term term,
                              float minimumSimilarity,
                              int prefixLength)
Builds a new FuzzyQuery instance

Parameters:
term - Term
minimumSimilarity - minimum similarity
prefixLength - prefix length
Returns:
new FuzzyQuery Instance

newRangeQuery

protected Query newRangeQuery(String field,
                              String part1,
                              String part2,
                              boolean inclusive)
Builds a new TermRangeQuery instance

Parameters:
field - Field
part1 - min
part2 - max
inclusive - true if range is inclusive
Returns:
new TermRangeQuery instance

newMatchAllDocsQuery

protected Query newMatchAllDocsQuery()
Builds a new MatchAllDocsQuery instance

Returns:
new MatchAllDocsQuery instance

newWildcardQuery

protected Query newWildcardQuery(Term t)
Builds a new WildcardQuery instance

Parameters:
t - wildcard term
Returns:
new WildcardQuery instance

getBooleanQuery

protected Query getBooleanQuery(List<BooleanClause> clauses)
                         throws ParseException
Factory method for generating query, given a set of clauses. By default creates a boolean query composed of clauses passed in. Can be overridden by extending classes, to modify query being returned.

Parameters:
clauses - List that contains BooleanClause instances to join.
Returns:
Resulting Query object.
Throws:
ParseException - throw in overridden method to disallow

getBooleanQuery

protected Query getBooleanQuery(List<BooleanClause> clauses,
                                boolean disableCoord)
                         throws ParseException
Factory method for generating query, given a set of clauses. By default creates a boolean query composed of clauses passed in. Can be overridden by extending classes, to modify query being returned.

Parameters:
clauses - List that contains BooleanClause instances to join.
disableCoord - true if coord scoring should be disabled.
Returns:
Resulting Query object.
Throws:
ParseException - throw in overridden method to disallow

getWildcardQuery

protected Query getWildcardQuery(String field,
                                 String termStr)
                          throws ParseException
Factory method for generating a query. Called when parser parses an input term token that contains one or more wildcard characters (? and *), but is not a prefix term token (one that has just a single * character at the end)

Depending on settings, prefix term may be lower-cased automatically. It will not go through the default Analyzer, however, since normal Analyzers are unlikely to work properly with wildcard templates.

Can be overridden by extending classes, to provide custom handling for wildcard queries, which may be necessary due to missing analyzer calls.

Parameters:
field - Name of the field query will use.
termStr - Term token that contains one or more wild card characters (? or *), but is not simple prefix term
Returns:
Resulting Query built for the term
Throws:
ParseException - throw in overridden method to disallow

getPrefixQuery

protected Query getPrefixQuery(String field,
                               String termStr)
                        throws ParseException
Factory method for generating a query (similar to getWildcardQuery(java.lang.String, java.lang.String)). Called when parser parses an input term token that uses prefix notation; that is, contains a single '*' wildcard character as its last character. Since this is a special case of generic wildcard term, and such a query can be optimized easily, this usually results in a different query object.

Depending on settings, a prefix term may be lower-cased automatically. It will not go through the default Analyzer, however, since normal Analyzers are unlikely to work properly with wildcard templates.

Can be overridden by extending classes, to provide custom handling for wild card queries, which may be necessary due to missing analyzer calls.

Parameters:
field - Name of the field query will use.
termStr - Term token to use for building term for the query (without trailing '*' character!)
Returns:
Resulting Query built for the term
Throws:
ParseException - throw in overridden method to disallow

getFuzzyQuery

protected Query getFuzzyQuery(String field,
                              String termStr,
                              float minSimilarity)
                       throws ParseException
Factory method for generating a query (similar to getWildcardQuery(java.lang.String, java.lang.String)). Called when parser parses an input term token that has the fuzzy suffix (~) appended.

Parameters:
field - Name of the field query will use.
termStr - Term token to use for building term for the query
Returns:
Resulting Query built for the term
Throws:
ParseException - throw in overridden method to disallow

escape

public static String escape(String s)
Returns a String where those characters that QueryParser expects to be escaped are escaped by a preceding \.

main

public static void main(String[] args)
                 throws Exception
Command line tool to test QueryParser, using SimpleAnalyzer. Usage:
java org.apache.lucene.queryParser.QueryParser <input>

Throws:
Exception

Conjunction

public final int Conjunction()
                      throws ParseException
Throws:
ParseException

Modifiers

public final int Modifiers()
                    throws ParseException
Throws:
ParseException

TopLevelQuery

public final Query TopLevelQuery(String field)
                          throws ParseException
Throws:
ParseException

Query

public final Query Query(String field)
                  throws ParseException
Throws:
ParseException

Clause

public final Query Clause(String field)
                   throws ParseException
Throws:
ParseException

Term

public final Query Term(String field)
                 throws ParseException
Throws:
ParseException

ReInit

public void ReInit(CharStream stream)
Reinitialise.

ReInit

public void ReInit(QueryParserTokenManager tm)
Reinitialise.

getNextToken

public final Token getNextToken()
Get the next Token.

getToken

public final Token getToken(int index)
Get the specific Token.

generateParseException

public ParseException generateParseException()
Generate ParseException.

enable_tracing

public final void enable_tracing()
Enable tracing.

disable_tracing

public final void disable_tracing()
Disable tracing.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryParser.Operator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.queryParser
Enum QueryParser.Operator

java.lang.Object
    extended by  java.lang.Enum<QueryParser.Operator>
        extended by  org.apache.lucene.queryParser.QueryParser.Operator
All Implemented Interfaces:
Serializable, Comparable<QueryParser.Operator>
Enclosing class:
QueryParser
public static enum QueryParser.Operator
extends Enum<QueryParser.Operator>

The default operator for parsing queries. Use QueryParser.setDefaultOperator(org.apache.lucene.queryParser.QueryParser.Operator) to change it.

Enum Constant Summary
AND
OR
Method Summary
static QueryParser.Operator | valueOf(String name) Returns the enum constant of this type with the specified name.
static QueryParser.Operator[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

OR

public static final QueryParser.Operator OR

AND

public static final QueryParser.Operator AND
Method Detail

values

public static final QueryParser.Operator[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(QueryParser.Operator c : QueryParser.Operator.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static QueryParser.Operator valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


QueryParserConstants

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser
Interface QueryParserConstants

All Known Implementing Classes:
AnalyzingQueryParser, ComplexPhraseQueryParser, ExtendableQueryParser, MultiFieldQueryParser, QueryParser, QueryParserTestBase.QPTestParser, QueryParserTokenManager
public interface QueryParserConstants

Token literal values and constants. Generated by org.javacc.parser.OtherFilesGen#start()

Field Summary
static int | _ESCAPED_CHAR RegularExpression Id.
static int | _NUM_CHAR RegularExpression Id.
static int | _QUOTED_CHAR RegularExpression Id.
static int | _TERM_CHAR RegularExpression Id.
static int | _TERM_START_CHAR RegularExpression Id.
static int | _WHITESPACE RegularExpression Id.
static int | AND RegularExpression Id.
static int | BAREOPER RegularExpression Id.
static int | Boost Lexical state.
static int | CARAT RegularExpression Id.
static int | COLON RegularExpression Id.
static int | DEFAULT Lexical state.
static int | EOF End of File.
static int | FUZZY_SLOP RegularExpression Id.
static int | LPAREN RegularExpression Id.
static int | MINUS RegularExpression Id.
static int | NOT RegularExpression Id.
static int | NUMBER RegularExpression Id.
static int | OR RegularExpression Id.
static int | PLUS RegularExpression Id.
static int | PREFIXTERM RegularExpression Id.
static int | QUOTED RegularExpression Id.
static int | RangeEx Lexical state.
static int | RANGEEX_END RegularExpression Id.
static int | RANGEEX_GOOP RegularExpression Id.
static int | RANGEEX_QUOTED RegularExpression Id.
static int | RANGEEX_START RegularExpression Id.
static int | RANGEEX_TO RegularExpression Id.
static int | RangeIn Lexical state.
static int | RANGEIN_END RegularExpression Id.
static int | RANGEIN_GOOP RegularExpression Id.
static int | RANGEIN_QUOTED RegularExpression Id.
static int | RANGEIN_START RegularExpression Id.
static int | RANGEIN_TO RegularExpression Id.
static int | RPAREN RegularExpression Id.
static int | STAR RegularExpression Id.
static int | TERM RegularExpression Id.
static String[] | tokenImage Literal token values.
static int | WILDTERM RegularExpression Id.

Field Detail

EOF

static final int EOF
End of File.

See Also:
Constant Field Values

_NUM_CHAR

static final int _NUM_CHAR
RegularExpression Id.

See Also:
Constant Field Values

_ESCAPED_CHAR

static final int _ESCAPED_CHAR
RegularExpression Id.

See Also:
Constant Field Values

_TERM_START_CHAR

static final int _TERM_START_CHAR
RegularExpression Id.

See Also:
Constant Field Values

_TERM_CHAR

static final int _TERM_CHAR
RegularExpression Id.

See Also:
Constant Field Values

_WHITESPACE

static final int _WHITESPACE
RegularExpression Id.

See Also:
Constant Field Values

_QUOTED_CHAR

static final int _QUOTED_CHAR
RegularExpression Id.

See Also:
Constant Field Values

AND

static final int AND
RegularExpression Id.

See Also:
Constant Field Values

OR

static final int OR
RegularExpression Id.

See Also:
Constant Field Values

NOT

static final int NOT
RegularExpression Id.

See Also:
Constant Field Values

PLUS

static final int PLUS
RegularExpression Id.

See Also:
Constant Field Values

MINUS

static final int MINUS
RegularExpression Id.

See Also:
Constant Field Values

BAREOPER

static final int BAREOPER
RegularExpression Id.

See Also:
Constant Field Values

LPAREN

static final int LPAREN
RegularExpression Id.

See Also:
Constant Field Values

RPAREN

static final int RPAREN
RegularExpression Id.

See Also:
Constant Field Values

COLON

static final int COLON
RegularExpression Id.

See Also:
Constant Field Values

STAR

static final int STAR
RegularExpression Id.

See Also:
Constant Field Values

CARAT

static final int CARAT
RegularExpression Id.

See Also:
Constant Field Values

QUOTED

static final int QUOTED
RegularExpression Id.

See Also:
Constant Field Values

TERM

static final int TERM
RegularExpression Id.

See Also:
Constant Field Values

FUZZY_SLOP

static final int FUZZY_SLOP
RegularExpression Id.

See Also:
Constant Field Values

PREFIXTERM

static final int PREFIXTERM
RegularExpression Id.

See Also:
Constant Field Values

WILDTERM

static final int WILDTERM
RegularExpression Id.

See Also:
Constant Field Values

RANGEIN_START

static final int RANGEIN_START
RegularExpression Id.

See Also:
Constant Field Values

RANGEEX_START

static final int RANGEEX_START
RegularExpression Id.

See Also:
Constant Field Values

NUMBER

static final int NUMBER
RegularExpression Id.

See Also:
Constant Field Values

RANGEIN_TO

static final int RANGEIN_TO
RegularExpression Id.

See Also:
Constant Field Values

RANGEIN_END

static final int RANGEIN_END
RegularExpression Id.

See Also:
Constant Field Values

RANGEIN_QUOTED

static final int RANGEIN_QUOTED
RegularExpression Id.

See Also:
Constant Field Values

RANGEIN_GOOP

static final int RANGEIN_GOOP
RegularExpression Id.

See Also:
Constant Field Values

RANGEEX_TO

static final int RANGEEX_TO
RegularExpression Id.

See Also:
Constant Field Values

RANGEEX_END

static final int RANGEEX_END
RegularExpression Id.

See Also:
Constant Field Values

RANGEEX_QUOTED

static final int RANGEEX_QUOTED
RegularExpression Id.

See Also:
Constant Field Values

RANGEEX_GOOP

static final int RANGEEX_GOOP
RegularExpression Id.

See Also:
Constant Field Values

Boost

static final int Boost
Lexical state.

See Also:
Constant Field Values

RangeEx

static final int RangeEx
Lexical state.

See Also:
Constant Field Values

RangeIn

static final int RangeIn
Lexical state.

See Also:
Constant Field Values

DEFAULT

static final int DEFAULT
Lexical state.

See Also:
Constant Field Values

tokenImage

static final String[] tokenImage
Literal token values.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryParserTestBase

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser
Class QueryParserTestBase

java.lang.Object
    extended by  org.junit.Assert
        extended by  org.apache.lucene.util.LuceneTestCase
            extended by  org.apache.lucene.queryParser.QueryParserTestBase

public abstract class QueryParserTestBase
extends LuceneTestCase

Base Test class for QueryParser subclasses

Nested Class Summary
static class | QueryParserTestBase.QPTestAnalyzer Filters LowerCaseTokenizer with QPTestFilter.
static class | QueryParserTestBase.QPTestFilter Filter which discards the token 'stop' and which expands the token 'phrase' into 'phrase1 phrase2'
static class | QueryParserTestBase.QPTestParser Test QueryParser that does not allow fuzzy or wildcard queries.
Nested classes/interfaces inherited from class org.apache.lucene.util.LuceneTestCase
LuceneTestCase.Nightly
Field Summary
static Analyzer qpAnalyzer
Fields inherited from class org.apache.lucene.util.LuceneTestCase
classRules, random, RANDOM_MULTIPLIER, ruleChain, stores, TEMP_DIR, TEST_CLEAN_THREADS, TEST_DIRECTORY, TEST_ITER, TEST_ITER_MIN, TEST_LINE_DOCS_FILE, TEST_LOCALE, TEST_NIGHTLY, TEST_SEED, TEST_TIMEZONE, TEST_VERSION_CURRENT, testsFailed, VERBOSE
Constructor Summary
QueryParserTestBase()
Method Summary
void | assertDateRangeQueryEquals(QueryParser qp, String field, String startDate, String endDate, Date endDateInclusive, DateTools.Resolution resolution)
void | assertEscapedQueryEquals(String query, Analyzer a, String result)
void | assertParseException(String queryString)
void | assertQueryEquals(QueryParser qp, String field, String query, String result)
void | assertQueryEquals(String query, Analyzer a, String result)
void | assertQueryEqualsDOA(String query, Analyzer a, String result)
void | assertWildcardQueryEquals(String query, boolean lowercase, String result)
void | assertWildcardQueryEquals(String query, boolean lowercase, String result, boolean allowLeadingWildcard)
void | assertWildcardQueryEquals(String query, String result)
abstract QueryParser | getParser(Analyzer a)
Query | getQuery(String query, Analyzer a)
Query | getQueryDOA(String query, Analyzer a)
void | setUp() For subclassing only.
void | tearDown() For subclassing only.
void | testAutoGeneratePhraseQueriesOn()
void | testBooleanQuery()
void | testBoost()
void | testCJK()
void | testCJKBoostedPhrase()
void | testCJKBoostedTerm()
void | testCJKPhrase()
void | testCJKSloppyPhrase()
void | testCJKTerm()
void | testCustomQueryParserFuzzy()
void | testCustomQueryParserWildcard()
void | testDateRange()
void | testEscaped()
void | testException()
void | testFarsiRangeCollating()
void | testLeadingWildcardType()
void | testLegacyDateRange() for testing legacy DateField support
void | testLocalDateFormat()
void | testMatchAllDocs()
void | testNumber()
void | testPositionIncrement()
void | testPositionIncrements()
void | testPrecedence() This test differs from TestPrecedenceQueryParser
void | testProtectedCtors()
void | testPunct()
void | testQPA()
void | testQueryStringEscaping()
void | testRange()
void | testSimple()
void | testSimpleDAO()
void | testSlop()
void | testStarParsing()
void | testStopwords()
void | testTabNewlineCarriageReturn()
void | testWildcard()
Methods inherited from class org.apache.lucene.util.LuceneTestCase
afterClassLuceneTestCaseJ4, alwaysIgnoredTestMethod, assertEquals, assertEquals, assertEquals, assertEquals, assertSaneFieldCaches, asSet, assumeFalse, assumeNoException, assumeTrue, atLeast, atLeast, beforeClassLuceneTestCaseJ4, dumpArray, dumpIterator, getDataFile, getName, getTestClass, getTestLabel, isTestThread, localeForName, newDirectory, newDirectory, newDirectory, newDirectory, newField, newField, newField, newField, newField, newField, newFSDirectory, newFSDirectory, newIndexWriterConfig, newIndexWriterConfig, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newSearcher, newSearcher, newTieredMergePolicy, newTieredMergePolicy, purgeFieldCache, randomDirectory, randomLocale, randomTimeZone, rarely, rarely, reportAdditionalFailureInfo, reportPartialFailureInfo, setMergeFactor, setUseCompoundFile, usually, usually
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

qpAnalyzer

public static Analyzer qpAnalyzer
Constructor Detail

QueryParserTestBase

public QueryParserTestBase()
Method Detail

setUp

public void setUp()
           throws Exception
Description copied from class: LuceneTestCase
For subclassing only. Overrides must call super.setUp().

Overrides:
setUp in class LuceneTestCase
Throws:
Exception

getParser

public abstract QueryParser getParser(Analyzer a)
                               throws Exception
Throws:
Exception

getQuery

public Query getQuery(String query,
                      Analyzer a)
               throws Exception
Throws:
Exception

assertQueryEquals

public void assertQueryEquals(String query,
                              Analyzer a,
                              String result)
                       throws Exception
Throws:
Exception

assertQueryEquals

public void assertQueryEquals(QueryParser qp,
                              String field,
                              String query,
                              String result)
                       throws Exception
Throws:
Exception

assertEscapedQueryEquals

public void assertEscapedQueryEquals(String query,
                                     Analyzer a,
                                     String result)
                              throws Exception
Throws:
Exception

assertWildcardQueryEquals

public void assertWildcardQueryEquals(String query,
                                      boolean lowercase,
                                      String result,
                                      boolean allowLeadingWildcard)
                               throws Exception
Throws:
Exception

assertWildcardQueryEquals

public void assertWildcardQueryEquals(String query,
                                      boolean lowercase,
                                      String result)
                               throws Exception
Throws:
Exception

assertWildcardQueryEquals

public void assertWildcardQueryEquals(String query,
                                      String result)
                               throws Exception
Throws:
Exception

getQueryDOA

public Query getQueryDOA(String query,
                         Analyzer a)
                  throws Exception
Throws:
Exception

assertQueryEqualsDOA

public void assertQueryEqualsDOA(String query,
                                 Analyzer a,
                                 String result)
                          throws Exception
Throws:
Exception

testCJK

public void testCJK()
             throws Exception
Throws:
Exception

testCJKTerm

public void testCJKTerm()
                 throws Exception
Throws:
Exception

testCJKBoostedTerm

public void testCJKBoostedTerm()
                        throws Exception
Throws:
Exception

testCJKPhrase

public void testCJKPhrase()
                   throws Exception
Throws:
Exception

testCJKBoostedPhrase

public void testCJKBoostedPhrase()
                          throws Exception
Throws:
Exception

testCJKSloppyPhrase

public void testCJKSloppyPhrase()
                         throws Exception
Throws:
Exception

testAutoGeneratePhraseQueriesOn

public void testAutoGeneratePhraseQueriesOn()
                                     throws Exception
Throws:
Exception

testSimple

public void testSimple()
                throws Exception
Throws:
Exception

testPunct

public void testPunct()
               throws Exception
Throws:
Exception

testSlop

public void testSlop()
              throws Exception
Throws:
Exception

testNumber

public void testNumber()
                throws Exception
Throws:
Exception

testWildcard

public void testWildcard()
                  throws Exception
Throws:
Exception

testLeadingWildcardType

public void testLeadingWildcardType()
                             throws Exception
Throws:
Exception

testQPA

public void testQPA()
             throws Exception
Throws:
Exception

testRange

public void testRange()
               throws Exception
Throws:
Exception

testFarsiRangeCollating

public void testFarsiRangeCollating()
                             throws Exception
Throws:
Exception

testLegacyDateRange

public void testLegacyDateRange()
                         throws Exception
for testing legacy DateField support

Throws:
Exception

testDateRange

public void testDateRange()
                   throws Exception
Throws:
Exception

assertDateRangeQueryEquals

public void assertDateRangeQueryEquals(QueryParser qp,
                                       String field,
                                       String startDate,
                                       String endDate,
                                       Date endDateInclusive,
                                       DateTools.Resolution resolution)
                                throws Exception
Throws:
Exception

testEscaped

public void testEscaped()
                 throws Exception
Throws:
Exception

testQueryStringEscaping

public void testQueryStringEscaping()
                             throws Exception
Throws:
Exception

testTabNewlineCarriageReturn

public void testTabNewlineCarriageReturn()
                                  throws Exception
Throws:
Exception

testSimpleDAO

public void testSimpleDAO()
                   throws Exception
Throws:
Exception

testBoost

public void testBoost()
               throws Exception
Throws:
Exception

assertParseException

public void assertParseException(String queryString)
                          throws Exception
Throws:
Exception

testException

public void testException()
                   throws Exception
Throws:
Exception

testCustomQueryParserWildcard

public void testCustomQueryParserWildcard()

testCustomQueryParserFuzzy

public void testCustomQueryParserFuzzy()
                                throws Exception
Throws:
Exception

testBooleanQuery

public void testBooleanQuery()
                      throws Exception
Throws:
Exception

testPrecedence

public void testPrecedence()
                    throws Exception
This test differs from TestPrecedenceQueryParser

Throws:
Exception

testLocalDateFormat

public void testLocalDateFormat()
                         throws IOException,
                                ParseException
Throws:
IOException
ParseException

testStarParsing

public void testStarParsing()
                     throws Exception
Throws:
Exception

testStopwords

public void testStopwords()
                   throws Exception
Throws:
Exception

testPositionIncrement

public void testPositionIncrement()
                           throws Exception
Throws:
Exception

testMatchAllDocs

public void testMatchAllDocs()
                      throws Exception
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Description copied from class: LuceneTestCase
For subclassing only. Overrides must call super.tearDown().

Overrides:
tearDown in class LuceneTestCase
Throws:
Exception

testPositionIncrements

public void testPositionIncrements()
                            throws Exception
Throws:
Exception

testProtectedCtors

public void testProtectedCtors()
                        throws Exception
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryParserTestBase.QPTestAnalyzer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser
Class QueryParserTestBase.QPTestAnalyzer

java.lang.Object
    extended by  org.apache.lucene.analysis.Analyzer
        extended by  org.apache.lucene.queryParser.QueryParserTestBase.QPTestAnalyzer
All Implemented Interfaces:
Closeable
Enclosing class:
QueryParserTestBase
public static final class QueryParserTestBase.QPTestAnalyzer
extends Analyzer

Filters LowerCaseTokenizer with QPTestFilter.

Constructor Summary
QueryParserTestBase.QPTestAnalyzer()
Method Summary
 TokenStream tokenStream(String fieldName, Reader reader)
Creates a TokenStream which tokenizes all the text in the provided Reader.
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, reusableTokenStream, setPreviousTokenStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

QueryParserTestBase.QPTestAnalyzer

public QueryParserTestBase.QPTestAnalyzer()
Method Detail

tokenStream

public final TokenStream tokenStream(String fieldName,
                                     Reader reader)
Description copied from class: Analyzer
Creates a TokenStream which tokenizes all the text in the provided Reader. Must be able to handle null field name for backward compatibility.

Specified by:
tokenStream in class Analyzer
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryParserTestBase.QPTestFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser
Class QueryParserTestBase.QPTestFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.queryParser.QueryParserTestBase.QPTestFilter
All Implemented Interfaces:
Closeable
Enclosing class:
QueryParserTestBase
public static final class QueryParserTestBase.QPTestFilter
extends TokenFilter

Filter which discards the token 'stop' and which expands the token 'phrase' into 'phrase1 phrase2'

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
QueryParserTestBase.QPTestFilter(TokenStream in)
Method Summary
 boolean incrementToken()
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end, reset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

QueryParserTestBase.QPTestFilter

public QueryParserTestBase.QPTestFilter(TokenStream in)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryParserTestBase.QPTestParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser
Class QueryParserTestBase.QPTestParser

java.lang.Object
    extended by  org.apache.lucene.queryParser.QueryParser
        extended by  org.apache.lucene.queryParser.QueryParserTestBase.QPTestParser
All Implemented Interfaces:
QueryParserConstants
Enclosing class:
QueryParserTestBase
public static class QueryParserTestBase.QPTestParser
extends QueryParser

Test QueryParser that does not allow fuzzy or wildcard queries.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.queryParser.QueryParser
QueryParser.Operator
Field Summary
Fields inherited from class org.apache.lucene.queryParser.QueryParser
AND_OPERATOR, jj_nt, OR_OPERATOR, token, token_source
Fields inherited from interface org.apache.lucene.queryParser.QueryParserConstants
_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, BAREOPER, Boost, CARAT, COLON, DEFAULT, EOF, FUZZY_SLOP, LPAREN, MINUS, NOT, NUMBER, OR, PLUS, PREFIXTERM, QUOTED, RangeEx, RANGEEX_END, RANGEEX_GOOP, RANGEEX_QUOTED, RANGEEX_START, RANGEEX_TO, RangeIn, RANGEIN_END, RANGEIN_GOOP, RANGEIN_QUOTED, RANGEIN_START, RANGEIN_TO, RPAREN, STAR, TERM, tokenImage, WILDTERM
Constructor Summary
QueryParserTestBase.QPTestParser(String f, Analyzer a)
Method Summary
protected  Query getFuzzyQuery(String field, String termStr, float minSimilarity)
Factory method for generating a query (similar to QueryParser.getWildcardQuery(java.lang.String, java.lang.String)).
protected  Query getWildcardQuery(String field, String termStr)
Factory method for generating a query.
Methods inherited from class org.apache.lucene.queryParser.QueryParser
addClause, Clause, Conjunction, disable_tracing, enable_tracing, escape, generateParseException, getAllowLeadingWildcard, getAnalyzer, getAutoGeneratePhraseQueries, getBooleanQuery, getBooleanQuery, getDateResolution, getDefaultOperator, getEnablePositionIncrements, getField, getFieldQuery, getFieldQuery, getFieldQuery, getFuzzyMinSim, getFuzzyPrefixLength, getLocale, getLowercaseExpandedTerms, getMultiTermRewriteMethod, getNextToken, getPhraseSlop, getPrefixQuery, getRangeCollator, getRangeQuery, getToken, main, Modifiers, newBooleanClause, newBooleanQuery, newFuzzyQuery, newMatchAllDocsQuery, newMultiPhraseQuery, newPhraseQuery, newPrefixQuery, newRangeQuery, newTermQuery, newWildcardQuery, parse, Query, ReInit, ReInit, setAllowLeadingWildcard, setAutoGeneratePhraseQueries, setDateResolution, setDateResolution, setDefaultOperator, setEnablePositionIncrements, setFuzzyMinSim, setFuzzyPrefixLength, setLocale, setLowercaseExpandedTerms, setMultiTermRewriteMethod, setPhraseSlop, setRangeCollator, Term, TopLevelQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

QueryParserTestBase.QPTestParser

public QueryParserTestBase.QPTestParser(String f,
                                        Analyzer a)
Method Detail

getFuzzyQuery

protected Query getFuzzyQuery(String field,
                              String termStr,
                              float minSimilarity)
                       throws ParseException
Description copied from class: QueryParser
Factory method for generating a query (similar to QueryParser.getWildcardQuery(java.lang.String, java.lang.String)). Called when parser parses an input term token that has the fuzzy suffix (~) appended.

Overrides:
getFuzzyQuery in class QueryParser
Parameters:
field - Name of the field query will use.
termStr - Term token to use for building term for the query
Returns:
Resulting Query built for the term
Throws:
ParseException - throw in overridden method to disallow

getWildcardQuery

protected Query getWildcardQuery(String field,
                                 String termStr)
                          throws ParseException
Description copied from class: QueryParser
Factory method for generating a query. Called when parser parses an input term token that contains one or more wildcard characters (? and *), but is not a prefix term token (one that has just a single * character at the end)

Depending on settings, prefix term may be lower-cased automatically. It will not go through the default Analyzer, however, since normal Analyzers are unlikely to work properly with wildcard templates.

Can be overridden by extending classes, to provide custom handling for wildcard queries, which may be necessary due to missing analyzer calls.

Overrides:
getWildcardQuery in class QueryParser
Parameters:
field - Name of the field query will use.
termStr - Term token that contains one or more wild card characters (? or *), but is not simple prefix term
Returns:
Resulting Query built for the term
Throws:
ParseException - throw in overridden method to disallow
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryParserTokenManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser
Class QueryParserTokenManager

java.lang.Object
    extended by  org.apache.lucene.queryParser.QueryParserTokenManager
All Implemented Interfaces:
QueryParserConstants
public class QueryParserTokenManager
extends Object
implements QueryParserConstants

Token Manager.

Field Summary
protected char | curChar
PrintStream | debugStream Debug output.
protected CharStream | input_stream
static int[] | jjnewLexState Lex State array.
static String[] | jjstrLiteralImages Token literal values.
static String[] | lexStateNames Lexer state names.
Fields inherited from interface org.apache.lucene.queryParser.QueryParserConstants
_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, BAREOPER, Boost, CARAT, COLON, DEFAULT, EOF, FUZZY_SLOP, LPAREN, MINUS, NOT, NUMBER, OR, PLUS, PREFIXTERM, QUOTED, RangeEx, RANGEEX_END, RANGEEX_GOOP, RANGEEX_QUOTED, RANGEEX_START, RANGEEX_TO, RangeIn, RANGEIN_END, RANGEIN_GOOP, RANGEIN_QUOTED, RANGEIN_START, RANGEIN_TO, RPAREN, STAR, TERM, tokenImage, WILDTERM
Constructor Summary
QueryParserTokenManager(CharStream stream)
Constructor.
QueryParserTokenManager(CharStream stream, int lexState)
Constructor.
Method Summary
Token | getNextToken() Get the next Token.
protected Token | jjFillToken()
void | ReInit(CharStream stream) Reinitialise parser.
void | ReInit(CharStream stream, int lexState) Reinitialise parser.
void | setDebugStream(PrintStream ds) Set debug output.
void | SwitchTo(int lexState) Switch to specified lex state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

debugStream

public PrintStream debugStream
Debug output.

jjstrLiteralImages

public static final String[] jjstrLiteralImages
Token literal values.

lexStateNames

public static final String[] lexStateNames
Lexer state names.

jjnewLexState

public static final int[] jjnewLexState
Lex State array.

input_stream

protected CharStream input_stream

curChar

protected char curChar
Constructor Detail

QueryParserTokenManager

public QueryParserTokenManager(CharStream stream)
Constructor.

QueryParserTokenManager

public QueryParserTokenManager(CharStream stream,
                               int lexState)
Constructor.

Method Detail

setDebugStream

public void setDebugStream(PrintStream ds)
Set debug output.

ReInit

public void ReInit(CharStream stream)
Reinitialise parser.

ReInit

public void ReInit(CharStream stream,
                   int lexState)
Reinitialise parser.

SwitchTo

public void SwitchTo(int lexState)
Switch to specified lex state.

jjFillToken

protected Token jjFillToken()

getNextToken

public Token getNextToken()
Get the next Token.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Token

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser
Class Token

java.lang.Object
    extended by  org.apache.lucene.queryParser.Token
All Implemented Interfaces:
Serializable
public class Token
extends Object
implements Serializable

Describes the input token stream.

See Also:
Serialized Form

Field Summary
int | beginColumn The column number of the first character of this Token.
int | beginLine The line number of the first character of this Token.
int | endColumn The column number of the last character of this Token.
int | endLine The line number of the last character of this Token.
String | image The string image of the token.
int | kind An integer that describes the kind of this token.
Token | next A reference to the next regular (non-special) token from the input stream.
Token | specialToken This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token.
Constructor Summary
Token()
No-argument constructor
Token(int kind)
Constructs a new token for the specified Image.
Token(int kind, String image)
Constructs a new token for the specified Image and Kind.
Method Summary
Object | getValue() An optional attribute value of the Token.
static Token | newToken(int ofKind)
static Token | newToken(int ofKind, String image) Returns a new Token object, by default.
String | toString() Returns the image.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

kind

public int kind
An integer that describes the kind of this token. This numbering system is determined by JavaCCParser, and a table of these numbers is stored in the file ...Constants.java.

beginLine

public int beginLine
The line number of the first character of this Token.

beginColumn

public int beginColumn
The column number of the first character of this Token.

endLine

public int endLine
The line number of the last character of this Token.

endColumn

public int endColumn
The column number of the last character of this Token.

image

public String image
The string image of the token.

next

public Token next
A reference to the next regular (non-special) token from the input stream. If this is the last token from the input stream, or if the token manager has not read tokens beyond this one, this field is set to null. This is true only if this token is also a regular token. Otherwise, see below for a description of the contents of this field.

specialToken

public Token specialToken
This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token. If there are no such special tokens, this field is set to null. When there are more than one such special token, this field refers to the last of these special tokens, which in turn refers to the next previous special token through its specialToken field, and so on until the first special token (whose specialToken field is null). The next fields of special tokens refer to other special tokens that immediately follow it (without an intervening regular token). If there is no such token, this field is null.

Constructor Detail

Token

public Token()
No-argument constructor

Token

public Token(int kind)
Constructs a new token for the specified Image.

Token

public Token(int kind,
             String image)
Constructs a new token for the specified Image and Kind.

Method Detail

getValue

public Object getValue()
An optional attribute value of the Token. Tokens which are not used as syntactic sugar will often contain meaningful values that will be used later on by the compiler or interpreter. This attribute value is often different from the image. Any subclass of Token that actually wants to return a non-null value can override this method as appropriate.

toString

public String toString()
Returns the image.

Overrides:
toString in class Object

newToken

public static Token newToken(int ofKind,
                             String image)
Returns a new Token object, by default. However, if you want, you can create and return subclass objects based on the value of ofKind. Simply add the cases to the switch for all those special cases. For example, if you have a subclass of Token called IDToken that you want to create if ofKind is ID, simply add something like : case MyParserConstants.ID : return new IDToken(ofKind, image); to the following switch statement. Then you can cast matchedToken variable to the appropriate type and use sit in your lexical actions.

newToken

public static Token newToken(int ofKind)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TokenMgrError

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser
Class TokenMgrError

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Error
            extended by  org.apache.lucene.queryParser.TokenMgrError
All Implemented Interfaces:
Serializable
public class TokenMgrError
extends Error

Token Manager Error.

See Also:
Serialized Form

Constructor Summary
TokenMgrError()
No arg constructor.
TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason)
Full Constructor.
TokenMgrError(String message, int reason)
Constructor with message and reason.
Method Summary
protected static String | addEscapes(String str) Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string
String | getMessage() You can also modify the body of this method to customize your error messages.
protected static String | LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TokenMgrError

public TokenMgrError()
No arg constructor.

TokenMgrError

public TokenMgrError(String message,
                     int reason)
Constructor with message and reason.

TokenMgrError

public TokenMgrError(boolean EOFSeen,
                     int lexState,
                     int errorLine,
                     int errorColumn,
                     String errorAfter,
                     char curChar,
                     int reason)
Full Constructor.

Method Detail

addEscapes

protected static final String addEscapes(String str)
Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string

LexicalError

protected static String LexicalError(boolean EOFSeen,
                                     int lexState,
                                     int errorLine,
                                     int errorColumn,
                                     String errorAfter,
                                     char curChar)
Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error. Parameters : EOFSeen : indicates if EOF caused the lexical error curLexState : lexical state in which this error occurred errorLine : line number when the error occurred errorColumn : column number when the error occurred errorAfter : prefix that was seen before this error occurred curchar : the offending character Note: You can customize the lexical error message by modifying this method.

getMessage

public String getMessage()
You can also modify the body of this method to customize your error messages. For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not of end-users concern, so you can return something like : "Internal Error : Please file a bug report .... " from this method for such cases in the release version of your parser.

Overrides:
getMessage in class Throwable
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AnalyzingQueryParser

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.analyzing
Class AnalyzingQueryParser

java.lang.Object
    extended by  org.apache.lucene.queryParser.QueryParser
        extended by  org.apache.lucene.queryParser.analyzing.AnalyzingQueryParser
All Implemented Interfaces:
QueryParserConstants
public class AnalyzingQueryParser
extends QueryParser

Overrides Lucene's default QueryParser so that Fuzzy-, Prefix-, Range-, and WildcardQuerys are also passed through the given analyzer, but wild card characters (like *) don't get removed from the search terms.

Warning: This class should only be used with analyzers that do not use stopwords or that add tokens. Also, several stemming analyzers are inappropriate: for example, GermanAnalyzer will turn Häuser into hau, but H?user will become h?user when using this parser and thus no match would be found (i.e. using this parser will be no improvement over QueryParser in such cases).

Version:
$Revision$, $Date$

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.queryParser.QueryParser
QueryParser.Operator
Field Summary
Fields inherited from class org.apache.lucene.queryParser.QueryParser
AND_OPERATOR, jj_nt, OR_OPERATOR, token, token_source
Fields inherited from interface org.apache.lucene.queryParser.QueryParserConstants
_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, BAREOPER, Boost, CARAT, COLON, DEFAULT, EOF, FUZZY_SLOP, LPAREN, MINUS, NOT, NUMBER, OR, PLUS, PREFIXTERM, QUOTED, RangeEx, RANGEEX_END, RANGEEX_GOOP, RANGEEX_QUOTED, RANGEEX_START, RANGEEX_TO, RangeIn, RANGEIN_END, RANGEIN_GOOP, RANGEIN_QUOTED, RANGEIN_START, RANGEIN_TO, RPAREN, STAR, TERM, tokenImage, WILDTERM
Constructor Summary
AnalyzingQueryParser(Version matchVersion, String field, Analyzer analyzer)
Constructs a query parser.
Method Summary
protected Query | getFuzzyQuery(String field, String termStr, float minSimilarity) Called when parser parses an input term token that has the fuzzy suffix (~) appended.
protected Query | getPrefixQuery(String field, String termStr) Called when parser parses an input term token that uses prefix notation; that is, contains a single '*' wildcard character as its last character.
protected Query | getRangeQuery(String field, String part1, String part2, boolean inclusive) Overrides super class, by passing terms through analyzer.
protected Query | getWildcardQuery(String field, String termStr) Called when parser parses an input term token that contains one or more wildcard characters (like *), but is not a prefix term token (one that has just a single * character at the end).
Methods inherited from class org.apache.lucene.queryParser.QueryParser
addClause, Clause, Conjunction, disable_tracing, enable_tracing, escape, generateParseException, getAllowLeadingWildcard, getAnalyzer, getAutoGeneratePhraseQueries, getBooleanQuery, getBooleanQuery, getDateResolution, getDefaultOperator, getEnablePositionIncrements, getField, getFieldQuery, getFieldQuery, getFieldQuery, getFuzzyMinSim, getFuzzyPrefixLength, getLocale, getLowercaseExpandedTerms, getMultiTermRewriteMethod, getNextToken, getPhraseSlop, getRangeCollator, getToken, main, Modifiers, newBooleanClause, newBooleanQuery, newFuzzyQuery, newMatchAllDocsQuery, newMultiPhraseQuery, newPhraseQuery, newPrefixQuery, newRangeQuery, newTermQuery, newWildcardQuery, parse, Query, ReInit, ReInit, setAllowLeadingWildcard, setAutoGeneratePhraseQueries, setDateResolution, setDateResolution, setDefaultOperator, setEnablePositionIncrements, setFuzzyMinSim, setFuzzyPrefixLength, setLocale, setLowercaseExpandedTerms, setMultiTermRewriteMethod, setPhraseSlop, setRangeCollator, Term, TopLevelQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AnalyzingQueryParser

public AnalyzingQueryParser(Version matchVersion,
                            String field,
                            Analyzer analyzer)
Constructs a query parser.

Parameters:
field - the default field for query terms.
analyzer - used to find terms in the query text.
Method Detail

getWildcardQuery

protected Query getWildcardQuery(String field,
                                 String termStr)
                          throws ParseException
Called when parser parses an input term token that contains one or more wildcard characters (like *), but is not a prefix term token (one that has just a single * character at the end).

Example: will be called for H?user or for H*user but not for *user.

Depending on analyzer and settings, a wildcard term may (most probably will) be lower-cased automatically. It will go through the default Analyzer.

Overrides super class, by passing terms through analyzer.

Overrides:
getWildcardQuery in class QueryParser
Parameters:
field - Name of the field query will use.
termStr - Term token that contains one or more wild card characters (? or *), but is not simple prefix term
Returns:
Resulting Query built for the term
Throws:
ParseException

getPrefixQuery

protected Query getPrefixQuery(String field,
                               String termStr)
                        throws ParseException
Called when parser parses an input term token that uses prefix notation; that is, contains a single '*' wildcard character as its last character. Since this is a special case of generic wildcard term, and such a query can be optimized easily, this usually results in a different query object.

Depending on analyzer and settings, a prefix term may (most probably will) be lower-cased automatically. It will go through the default Analyzer.

Overrides super class, by passing terms through analyzer.

Overrides:
getPrefixQuery in class QueryParser
Parameters:
field - Name of the field query will use.
termStr - Term token to use for building term for the query (without trailing '*' character!)
Returns:
Resulting Query built for the term
Throws:
ParseException

getFuzzyQuery

protected Query getFuzzyQuery(String field,
                              String termStr,
                              float minSimilarity)
                       throws ParseException
Called when parser parses an input term token that has the fuzzy suffix (~) appended.

Depending on analyzer and settings, a fuzzy term may (most probably will) be lower-cased automatically. It will go through the default Analyzer.

Overrides super class, by passing terms through analyzer.

Overrides:
getFuzzyQuery in class QueryParser
Parameters:
field - Name of the field query will use.
termStr - Term token to use for building term for the query
Returns:
Resulting Query built for the term
Throws:
ParseException

getRangeQuery

protected Query getRangeQuery(String field,
                              String part1,
                              String part2,
                              boolean inclusive)
                       throws ParseException
Overrides super class, by passing terms through analyzer.

Overrides:
getRangeQuery in class QueryParser
Throws:
ParseException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.analyzing
Classes
AnalyzingQueryParser


org.apache.lucene.queryParser.analyzing

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.analyzing

QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.

See:
Description

Class Summary
AnalyzingQueryParser Overrides Lucene's default QueryParser so that Fuzzy-, Prefix-, Range-, and WildcardQuerys are also passed through the given analyzer, but wild card characters (like *) don't get removed from the search terms.

Package org.apache.lucene.queryParser.analyzing Description

QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.


org.apache.lucene.queryParser.analyzing Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.analyzing

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.QueryParser (implements org.apache.lucene.queryParser.QueryParserConstants)
      • org.apache.lucene.queryParser.analyzing.AnalyzingQueryParser


Uses of Package org.apache.lucene.queryParser.analyzing

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.analyzing

No usage of org.apache.lucene.queryParser.analyzing

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.analyzing.AnalyzingQueryParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.analyzing.AnalyzingQueryParser

No usage of org.apache.lucene.queryParser.analyzing.AnalyzingQueryParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.CharStream

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.CharStream

Packages that use CharStream
org.apache.lucene.queryParser A simple query parser implemented with JavaCC.

Uses of CharStream in org.apache.lucene.queryParser

Classes in org.apache.lucene.queryParser that implement CharStream
 class FastCharStream
An efficient implementation of JavaCC's CharStream interface.

Fields in org.apache.lucene.queryParser declared as CharStream
protected  CharStream QueryParserTokenManager.input_stream

Methods in org.apache.lucene.queryParser with parameters of type CharStream
void | QueryParserTokenManager.ReInit(CharStream stream) Reinitialise parser.
void | QueryParser.ReInit(CharStream stream) Reinitialise.
void | QueryParserTokenManager.ReInit(CharStream stream, int lexState) Reinitialise parser.

Constructors in org.apache.lucene.queryParser with parameters of type CharStream
QueryParser(CharStream stream)
Constructor with user supplied CharStream.
QueryParserTokenManager(CharStream stream)
Constructor.
QueryParserTokenManager(CharStream stream, int lexState)
Constructor.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.FastCharStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.FastCharStream

No usage of org.apache.lucene.queryParser.FastCharStream

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.MultiFieldQueryParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.MultiFieldQueryParser

No usage of org.apache.lucene.queryParser.MultiFieldQueryParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.ParseException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.ParseException

Packages that use ParseException
org.apache.lucene.benchmark.quality | Search Quality Benchmarking.
org.apache.lucene.benchmark.quality.utils | Miscellaneous utilities for search quality benchmarking: query parsing, submission reports.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.analyzing | QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.
org.apache.lucene.queryParser.complexPhrase | QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
org.apache.lucene.queryParser.ext | Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks

Uses of ParseException in org.apache.lucene.benchmark.quality

Methods in org.apache.lucene.benchmark.quality that throw ParseException
 Query QualityQueryParser.parse(QualityQuery qq)
Parse a given QualityQuery into a Lucene query.

Uses of ParseException in org.apache.lucene.benchmark.quality.utils

Methods in org.apache.lucene.benchmark.quality.utils that throw ParseException
 Query SimpleQQParser.parse(QualityQuery qq)

Uses of ParseException in org.apache.lucene.queryParser

Methods in org.apache.lucene.queryParser that return ParseException
 ParseException QueryParser.generateParseException()
Generate ParseException.

Methods in org.apache.lucene.queryParser that throw ParseException
 Query QueryParser.Clause(String field)
 int QueryParser.Conjunction()
protected  Query QueryParser.getBooleanQuery(List<BooleanClause> clauses)
Factory method for generating query, given a set of clauses.
protected  Query QueryParser.getBooleanQuery(List<BooleanClause> clauses, boolean disableCoord)
Factory method for generating query, given a set of clauses.
protected  Query QueryParser.getFieldQuery(String field, String queryText)
Deprecated. Use QueryParser.getFieldQuery(String,String,boolean) instead.
protected  Query QueryParser.getFieldQuery(String field, String queryText, boolean quoted)
protected  Query MultiFieldQueryParser.getFieldQuery(String field, String queryText, boolean quoted)
protected  Query QueryParser.getFieldQuery(String field, String queryText, int slop)
Base implementation delegates to QueryParser.getFieldQuery(String,String,boolean).
protected  Query MultiFieldQueryParser.getFieldQuery(String field, String queryText, int slop)
protected  Query QueryParserTestBase.QPTestParser.getFuzzyQuery(String field, String termStr, float minSimilarity)
protected  Query QueryParser.getFuzzyQuery(String field, String termStr, float minSimilarity)
Factory method for generating a query (similar to QueryParser.getWildcardQuery(java.lang.String, java.lang.String)).
protected  Query MultiFieldQueryParser.getFuzzyQuery(String field, String termStr, float minSimilarity)
protected  Query QueryParser.getPrefixQuery(String field, String termStr)
Factory method for generating a query (similar to QueryParser.getWildcardQuery(java.lang.String, java.lang.String)).
protected  Query MultiFieldQueryParser.getPrefixQuery(String field, String termStr)
protected  Query QueryParser.getRangeQuery(String field, String part1, String part2, boolean inclusive)
protected  Query MultiFieldQueryParser.getRangeQuery(String field, String part1, String part2, boolean inclusive)
protected  Query QueryParserTestBase.QPTestParser.getWildcardQuery(String field, String termStr)
protected  Query QueryParser.getWildcardQuery(String field, String termStr)
Factory method for generating a query.
protected  Query MultiFieldQueryParser.getWildcardQuery(String field, String termStr)
 int QueryParser.Modifiers()
 Query QueryParser.parse(String query)
Parses a query string, returning a Query.
static Query MultiFieldQueryParser.parse(Version matchVersion, String[] queries, String[] fields, Analyzer analyzer)
Parses a query which searches on the fields specified.
static Query MultiFieldQueryParser.parse(Version matchVersion, String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Parses a query, searching on the fields specified.
static Query MultiFieldQueryParser.parse(Version matchVersion, String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Parses a query, searching on the fields specified.
 Query QueryParser.Query(String field)
 Query QueryParser.Term(String field)
 void QueryParserTestBase.testLocalDateFormat()
 Query QueryParser.TopLevelQuery(String field)

Uses of ParseException in org.apache.lucene.queryParser.analyzing

Methods in org.apache.lucene.queryParser.analyzing that throw ParseException
protected Query | AnalyzingQueryParser.getFuzzyQuery(String field, String termStr, float minSimilarity) Called when parser parses an input term token that has the fuzzy suffix (~) appended.
protected Query | AnalyzingQueryParser.getPrefixQuery(String field, String termStr) Called when parser parses an input term token that uses prefix notation; that is, contains a single '*' wildcard character as its last character.
protected Query | AnalyzingQueryParser.getRangeQuery(String field, String part1, String part2, boolean inclusive) Overrides super class, by passing terms through analyzer.
protected Query | AnalyzingQueryParser.getWildcardQuery(String field, String termStr) Called when parser parses an input term token that contains one or more wildcard characters (like *), but is not a prefix term token (one that has just a single * character at the end).

Uses of ParseException in org.apache.lucene.queryParser.complexPhrase

Methods in org.apache.lucene.queryParser.complexPhrase that throw ParseException
protected Query | ComplexPhraseQueryParser.getFuzzyQuery(String field, String termStr, float minSimilarity)
protected Query | ComplexPhraseQueryParser.getRangeQuery(String field, String part1, String part2, boolean inclusive)
protected Query | ComplexPhraseQueryParser.getWildcardQuery(String field, String termStr)
Query | ComplexPhraseQueryParser.parse(String query)

Uses of ParseException in org.apache.lucene.queryParser.ext

Methods in org.apache.lucene.queryParser.ext that throw ParseException
protected Query | ExtendableQueryParser.getFieldQuery(String field, String queryText, boolean quoted)
abstract Query | ParserExtension.parse(ExtensionQuery query) Processes the given ExtensionQuery and returns a corresponding Query instance.

Uses of ParseException in org.apache.lucene.queryParser.standard

Methods in org.apache.lucene.queryParser.standard that return ParseException
 ParseException QueryParserWrapper.generateParseException()
Deprecated.

Methods in org.apache.lucene.queryParser.standard that throw ParseException
protected  Query QueryParserWrapper.getBooleanQuery(List<BooleanClause> clauses, boolean disableCoord)
Deprecated.
protected  Query QueryParserWrapper.getFieldQuery(String field, String queryText)
Deprecated. Use QueryParserWrapper.getFieldQuery(String, String, boolean) instead
protected  Query QueryParserWrapper.getFieldQuery(String field, String queryText, boolean quoted)
Deprecated.
protected  Query QueryParserWrapper.getFieldQuery(String field, String queryText, int slop)
Deprecated. Base implementation delegates to QueryParserWrapper.getFieldQuery(String,String).
protected  Query QueryParserWrapper.getFuzzyQuery(String field, String termStr, float minSimilarity)
Deprecated.
protected  Query QueryParserWrapper.getPrefixQuery(String field, String termStr)
Deprecated.
protected  Query QueryParserWrapper.getRangeQuery(String field, String part1, String part2, boolean inclusive)
Deprecated.
protected  Query QueryParserWrapper.getWildcardQuery(String field, String termStr)
Deprecated.
 Query QueryParserWrapper.parse(String query)
Deprecated.
static Query MultiFieldQueryParserWrapper.parse(String[] queries, String[] fields, Analyzer analyzer)
Deprecated. Parses a query which searches on the fields specified.
static Query MultiFieldQueryParserWrapper.parse(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Deprecated. Parses a query, searching on the fields specified.
static Query MultiFieldQueryParserWrapper.parse(String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Deprecated. Parses a query, searching on the fields specified.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.QueryParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.QueryParser

Packages that use QueryParser
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.analyzing | QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.
org.apache.lucene.queryParser.complexPhrase | QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
org.apache.lucene.queryParser.ext | Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.
org.apache.lucene.xmlparser | Parser that produces Lucene Query objects from XML streams.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Uses of QueryParser in org.apache.lucene.benchmark.byTask.feeds

Fields in org.apache.lucene.benchmark.byTask.feeds declared as QueryParser
protected  QueryParser LongToEnglishQueryMaker.parser

Uses of QueryParser in org.apache.lucene.queryParser

Subclasses of QueryParser in org.apache.lucene.queryParser
class | MultiFieldQueryParser A QueryParser which constructs queries to search multiple fields.
static class | QueryParserTestBase.QPTestParser Test QueryParser that does not allow fuzzy or wildcard queries.

Methods in org.apache.lucene.queryParser that return QueryParser
abstract  QueryParser QueryParserTestBase.getParser(Analyzer a)

Methods in org.apache.lucene.queryParser with parameters of type QueryParser
void | QueryParserTestBase.assertDateRangeQueryEquals(QueryParser qp, String field, String startDate, String endDate, Date endDateInclusive, DateTools.Resolution resolution)
void | QueryParserTestBase.assertQueryEquals(QueryParser qp, String field, String query, String result)

Uses of QueryParser in org.apache.lucene.queryParser.analyzing

Subclasses of QueryParser in org.apache.lucene.queryParser.analyzing
 class AnalyzingQueryParser
Overrides Lucene's default QueryParser so that Fuzzy-, Prefix-, Range-, and WildcardQuerys are also passed through the given analyzer, but wild card characters (like *) don't get removed from the search terms.

Uses of QueryParser in org.apache.lucene.queryParser.complexPhrase

Subclasses of QueryParser in org.apache.lucene.queryParser.complexPhrase
 class ComplexPhraseQueryParser
QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*".

Uses of QueryParser in org.apache.lucene.queryParser.ext

Subclasses of QueryParser in org.apache.lucene.queryParser.ext
 class ExtendableQueryParser
The ExtendableQueryParser enables arbitrary query parser extension based on a customizable field naming scheme.

Methods in org.apache.lucene.queryParser.ext that return QueryParser
 QueryParser ExtensionQuery.getTopLevelParser()
Returns the top level parser which created this ExtensionQuery

Constructors in org.apache.lucene.queryParser.ext with parameters of type QueryParser
ExtensionQuery(QueryParser topLevelParser, String field, String rawQueryString)
Creates a new ExtensionQuery

Uses of QueryParser in org.apache.lucene.xmlparser

Fields in org.apache.lucene.xmlparser declared as QueryParser
protected  QueryParser CoreParser.parser

Constructors in org.apache.lucene.xmlparser with parameters of type QueryParser
CoreParser(Analyzer analyzer, QueryParser parser)
Construct an XML parser that uses a single instance QueryParser for handling UserQuery tags - all parse operations are synchronised on this parser
CoreParser(String defaultField, Analyzer analyzer, QueryParser parser)
CorePlusExtensionsParser(Analyzer analyzer, QueryParser parser)
Construct an XML parser that uses a single instance QueryParser for handling UserQuery tags - all parse operations are synchronized on this parser

Uses of QueryParser in org.apache.lucene.xmlparser.builders

Methods in org.apache.lucene.xmlparser.builders that return QueryParser
protected  QueryParser UserInputQueryBuilder.createQueryParser(String fieldName, Analyzer analyzer)
Method to create a QueryParser - designed to be overridden

Constructors in org.apache.lucene.xmlparser.builders with parameters of type QueryParser
UserInputQueryBuilder(QueryParser parser)
This constructor has the disadvantage of not being able to change choice of default field name

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.QueryParser.Operator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.QueryParser.Operator

Packages that use QueryParser.Operator
org.apache.lucene.queryParser A simple query parser implemented with JavaCC.

Uses of QueryParser.Operator in org.apache.lucene.queryParser

Fields in org.apache.lucene.queryParser declared as QueryParser.Operator
static QueryParser.Operator | QueryParser.AND_OPERATOR Alternative form of QueryParser.Operator.AND
static QueryParser.Operator | QueryParser.OR_OPERATOR Alternative form of QueryParser.Operator.OR

Methods in org.apache.lucene.queryParser that return QueryParser.Operator
QueryParser.Operator | QueryParser.getDefaultOperator() Gets implicit operator setting, which will be either AND_OPERATOR or OR_OPERATOR.
static QueryParser.Operator | QueryParser.Operator.valueOf(String name) Returns the enum constant of this type with the specified name.
static QueryParser.Operator[] | QueryParser.Operator.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.queryParser with parameters of type QueryParser.Operator
 void QueryParser.setDefaultOperator(QueryParser.Operator op)
Sets the boolean operator of the QueryParser.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.QueryParserConstants

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.QueryParserConstants

Packages that use QueryParserConstants
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.analyzing | QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.
org.apache.lucene.queryParser.complexPhrase | QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
org.apache.lucene.queryParser.ext | Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.

Uses of QueryParserConstants in org.apache.lucene.queryParser

Classes in org.apache.lucene.queryParser that implement QueryParserConstants
class | MultiFieldQueryParser A QueryParser which constructs queries to search multiple fields.
class | QueryParser This class is generated by JavaCC.
static class | QueryParserTestBase.QPTestParser Test QueryParser that does not allow fuzzy or wildcard queries.
class | QueryParserTokenManager Token Manager.

Uses of QueryParserConstants in org.apache.lucene.queryParser.analyzing

Classes in org.apache.lucene.queryParser.analyzing that implement QueryParserConstants
 class AnalyzingQueryParser
Overrides Lucene's default QueryParser so that Fuzzy-, Prefix-, Range-, and WildcardQuerys are also passed through the given analyzer, but wild card characters (like *) don't get removed from the search terms.

Uses of QueryParserConstants in org.apache.lucene.queryParser.complexPhrase

Classes in org.apache.lucene.queryParser.complexPhrase that implement QueryParserConstants
 class ComplexPhraseQueryParser
QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*".

Uses of QueryParserConstants in org.apache.lucene.queryParser.ext

Classes in org.apache.lucene.queryParser.ext that implement QueryParserConstants
 class ExtendableQueryParser
The ExtendableQueryParser enables arbitrary query parser extension based on a customizable field naming scheme.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.QueryParserTestBase

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.QueryParserTestBase

No usage of org.apache.lucene.queryParser.QueryParserTestBase

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.QueryParserTestBase.QPTestAnalyzer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.QueryParserTestBase.QPTestAnalyzer

No usage of org.apache.lucene.queryParser.QueryParserTestBase.QPTestAnalyzer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.QueryParserTestBase.QPTestFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.QueryParserTestBase.QPTestFilter

No usage of org.apache.lucene.queryParser.QueryParserTestBase.QPTestFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.QueryParserTestBase.QPTestParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.QueryParserTestBase.QPTestParser

No usage of org.apache.lucene.queryParser.QueryParserTestBase.QPTestParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.QueryParserTokenManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.QueryParserTokenManager

Packages that use QueryParserTokenManager
org.apache.lucene.queryParser A simple query parser implemented with JavaCC.

Uses of QueryParserTokenManager in org.apache.lucene.queryParser

Fields in org.apache.lucene.queryParser declared as QueryParserTokenManager
 QueryParserTokenManager QueryParser.token_source
Generated Token Manager.

Methods in org.apache.lucene.queryParser with parameters of type QueryParserTokenManager
 void QueryParser.ReInit(QueryParserTokenManager tm)
Reinitialise.

Constructors in org.apache.lucene.queryParser with parameters of type QueryParserTokenManager
QueryParser(QueryParserTokenManager tm)
Constructor with generated Token Manager.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.Token

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.Token

Packages that use Token
org.apache.lucene.queryParser A simple query parser implemented with JavaCC.

Uses of Token in org.apache.lucene.queryParser

Fields in org.apache.lucene.queryParser declared as Token
Token | ParseException.currentToken This is the last token that has been consumed successfully.
Token | QueryParser.jj_nt Next token.
Token | Token.next A reference to the next regular (non-special) token from the input stream.
Token | Token.specialToken This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token.
Token | QueryParser.token Current token.

Methods in org.apache.lucene.queryParser that return Token
Token | QueryParserTokenManager.getNextToken() Get the next Token.
Token | QueryParser.getNextToken() Get the next Token.
Token | QueryParser.getToken(int index) Get the specific Token.
protected Token | QueryParserTokenManager.jjFillToken()
static Token | Token.newToken(int ofKind)
static Token | Token.newToken(int ofKind, String image) Returns a new Token object, by default.

Constructors in org.apache.lucene.queryParser with parameters of type Token
ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal)
This constructor is used by the method "generateParseException" in the generated parser.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.TokenMgrError

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.TokenMgrError

No usage of org.apache.lucene.queryParser.TokenMgrError

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ComplexPhraseQueryParser

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.complexPhrase
Class ComplexPhraseQueryParser

java.lang.Object
    extended by  org.apache.lucene.queryParser.QueryParser
        extended by  org.apache.lucene.queryParser.complexPhrase.ComplexPhraseQueryParser
All Implemented Interfaces:
QueryParserConstants
public class ComplexPhraseQueryParser
extends QueryParser

QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*".

Performs potentially multiple passes over Query text to parse any nested logic in PhraseQueries. - First pass takes any PhraseQuery content between quotes and stores for subsequent pass. All other query content is parsed as normal - Second pass parses any stored PhraseQuery content, checking all embedded clauses are referring to the same field and therefore can be rewritten as Span queries. All PhraseQuery clauses are expressed as ComplexPhraseQuery objects

This could arguably be done in one pass using a new QueryParser but here I am working within the constraints of the existing parser as a base class. This currently simply feeds all phrase content through an analyzer to select phrase terms - any "special" syntax such as * ~ * etc are not given special status

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.queryParser.QueryParser
QueryParser.Operator
Field Summary
Fields inherited from class org.apache.lucene.queryParser.QueryParser
AND_OPERATOR, jj_nt, OR_OPERATOR, token, token_source
Fields inherited from interface org.apache.lucene.queryParser.QueryParserConstants
_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, BAREOPER, Boost, CARAT, COLON, DEFAULT, EOF, FUZZY_SLOP, LPAREN, MINUS, NOT, NUMBER, OR, PLUS, PREFIXTERM, QUOTED, RangeEx, RANGEEX_END, RANGEEX_GOOP, RANGEEX_QUOTED, RANGEEX_START, RANGEEX_TO, RangeIn, RANGEIN_END, RANGEIN_GOOP, RANGEIN_QUOTED, RANGEIN_START, RANGEIN_TO, RPAREN, STAR, TERM, tokenImage, WILDTERM
Constructor Summary
ComplexPhraseQueryParser(Version matchVersion, String f, Analyzer a)
Method Summary
protected  Query getFieldQuery(String field, String queryText, int slop)
Base implementation delegates to QueryParser.getFieldQuery(String,String,boolean).
protected  Query getFuzzyQuery(String field, String termStr, float minSimilarity)
Factory method for generating a query (similar to QueryParser.getWildcardQuery(java.lang.String, java.lang.String)).
protected  Query getRangeQuery(String field, String part1, String part2, boolean inclusive)
protected  Query getWildcardQuery(String field, String termStr)
Factory method for generating a query.
protected  Query newRangeQuery(String field, String part1, String part2, boolean inclusive)
Builds a new TermRangeQuery instance
protected  Query newTermQuery(Term term)
Builds a new TermQuery instance
 Query parse(String query)
Parses a query string, returning a Query.
Methods inherited from class org.apache.lucene.queryParser.QueryParser
addClause, Clause, Conjunction, disable_tracing, enable_tracing, escape, generateParseException, getAllowLeadingWildcard, getAnalyzer, getAutoGeneratePhraseQueries, getBooleanQuery, getBooleanQuery, getDateResolution, getDefaultOperator, getEnablePositionIncrements, getField, getFieldQuery, getFieldQuery, getFuzzyMinSim, getFuzzyPrefixLength, getLocale, getLowercaseExpandedTerms, getMultiTermRewriteMethod, getNextToken, getPhraseSlop, getPrefixQuery, getRangeCollator, getToken, main, Modifiers, newBooleanClause, newBooleanQuery, newFuzzyQuery, newMatchAllDocsQuery, newMultiPhraseQuery, newPhraseQuery, newPrefixQuery, newWildcardQuery, Query, ReInit, ReInit, setAllowLeadingWildcard, setAutoGeneratePhraseQueries, setDateResolution, setDateResolution, setDefaultOperator, setEnablePositionIncrements, setFuzzyMinSim, setFuzzyPrefixLength, setLocale, setLowercaseExpandedTerms, setMultiTermRewriteMethod, setPhraseSlop, setRangeCollator, Term, TopLevelQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ComplexPhraseQueryParser

public ComplexPhraseQueryParser(Version matchVersion,
                                String f,
                                Analyzer a)
Method Detail

getFieldQuery

protected Query getFieldQuery(String field,
                              String queryText,
                              int slop)
Description copied from class: QueryParser
Base implementation delegates to QueryParser.getFieldQuery(String,String,boolean). This method may be overridden, for example, to return a SpanNearQuery instead of a PhraseQuery.

Overrides:
getFieldQuery in class QueryParser

parse

public Query parse(String query)
            throws ParseException
Description copied from class: QueryParser
Parses a query string, returning a Query.

Overrides:
parse in class QueryParser
Parameters:
query - the query string to be parsed.
Throws:
ParseException - if the parsing fails

newTermQuery

protected Query newTermQuery(Term term)
Description copied from class: QueryParser
Builds a new TermQuery instance

Overrides:
newTermQuery in class QueryParser
Parameters:
term - term
Returns:
new TermQuery instance

getWildcardQuery

protected Query getWildcardQuery(String field,
                                 String termStr)
                          throws ParseException
Description copied from class: QueryParser
Factory method for generating a query. Called when parser parses an input term token that contains one or more wildcard characters (? and *), but is not a prefix term token (one that has just a single * character at the end)

Depending on settings, prefix term may be lower-cased automatically. It will not go through the default Analyzer, however, since normal Analyzers are unlikely to work properly with wildcard templates.

Can be overridden by extending classes, to provide custom handling for wildcard queries, which may be necessary due to missing analyzer calls.

Overrides:
getWildcardQuery in class QueryParser
Parameters:
field - Name of the field query will use.
termStr - Term token that contains one or more wild card characters (? or *), but is not simple prefix term
Returns:
Resulting Query built for the term
Throws:
ParseException - throw in overridden method to disallow

getRangeQuery

protected Query getRangeQuery(String field,
                              String part1,
                              String part2,
                              boolean inclusive)
                       throws ParseException
Overrides:
getRangeQuery in class QueryParser
Throws:
ParseException - throw in overridden method to disallow

newRangeQuery

protected Query newRangeQuery(String field,
                              String part1,
                              String part2,
                              boolean inclusive)
Description copied from class: QueryParser
Builds a new TermRangeQuery instance

Overrides:
newRangeQuery in class QueryParser
Parameters:
field - Field
part1 - min
part2 - max
inclusive - true if range is inclusive
Returns:
new TermRangeQuery instance

getFuzzyQuery

protected Query getFuzzyQuery(String field,
                              String termStr,
                              float minSimilarity)
                       throws ParseException
Description copied from class: QueryParser
Factory method for generating a query (similar to QueryParser.getWildcardQuery(java.lang.String, java.lang.String)). Called when parser parses an input term token that has the fuzzy suffix (~) appended.

Overrides:
getFuzzyQuery in class QueryParser
Parameters:
field - Name of the field query will use.
termStr - Term token to use for building term for the query
Returns:
Resulting Query built for the term
Throws:
ParseException - throw in overridden method to disallow
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.complexPhrase
Classes
ComplexPhraseQueryParser


org.apache.lucene.queryParser.complexPhrase

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.complexPhrase

QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"

See:
Description

Class Summary
ComplexPhraseQueryParser QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*".

Package org.apache.lucene.queryParser.complexPhrase Description

QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"


org.apache.lucene.queryParser.complexPhrase Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.complexPhrase

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.QueryParser (implements org.apache.lucene.queryParser.QueryParserConstants)
      • org.apache.lucene.queryParser.complexPhrase.ComplexPhraseQueryParser


Uses of Package org.apache.lucene.queryParser.complexPhrase

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.complexPhrase

No usage of org.apache.lucene.queryParser.complexPhrase

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.complexPhrase.ComplexPhraseQueryParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.complexPhrase.ComplexPhraseQueryParser

No usage of org.apache.lucene.queryParser.complexPhrase.ComplexPhraseQueryParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.queryParser.core
Classes
QueryParserHelper
Exceptions
QueryNodeException
QueryNodeParseException
Errors
QueryNodeError


org.apache.lucene.queryParser.core

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.core

Contains the core classes of the flexible query parser framework

See:
Description

Class Summary
QueryParserHelper This class is a helper for the query parser framework, it does all the three query parser phrases at once: text parsing, query processing and query building.

Exception Summary
QueryNodeException | This exception should be thrown if something wrong happens when dealing with QueryNodes.
QueryNodeParseException | This should be thrown when an exception happens during the query parsing from string to the query node tree.

Error Summary
QueryNodeError Error class with NLS support

Package org.apache.lucene.queryParser.core Description

Contains the core classes of the flexible query parser framework

Flexible Query Parser

This package contains the necessary classes to implement a query parser.

A query parser is divided in at least 2 phases, text parsing and query building, and one optional phase called query processing.

First Phase: Text Parsing

The text parsing phase is performed by a text parser, which implements SyntaxParser interface. A text parser is responsible to get a query string and convert it to a QueryNode tree, which is an object structure that represents the elements defined in the query string.

Second (optional) Phase: Query Processing

The query processing phase is performed by a query processor, which implements QueryNodeProcessor. A query processor is responsible to perform any processing on a QueryNode tree. This phase is optional and is used only if an extra processing, validation, query expansion, etc needs to be performed in a QueryNode tree. The QueryNode tree can be either be generated by a text parser or programmatically created.

Third Phase: Query Building

The query building phase is performed by a query builder, which implements QueryBuilder. A query builder is responsible to convert a QueryNode tree into an arbitrary object, which is usually used to be executed against a search index.


org.apache.lucene.queryParser.core Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.core

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.core.QueryParserHelper
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Error
        • org.apache.lucene.queryParser.core.QueryNodeError (implements org.apache.lucene.messages.NLSException)
      • java.lang.Exception
        • org.apache.lucene.queryParser.core.QueryNodeException (implements org.apache.lucene.messages.NLSException)
          • org.apache.lucene.queryParser.core.QueryNodeParseException


Uses of Package org.apache.lucene.queryParser.core

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.core

Packages that use org.apache.lucene.queryParser.core
org.apache.lucene.queryParser.core | Contains the core classes of the flexible query parser framework
org.apache.lucene.queryParser.core.builders | Contains the necessary classes to implement query builders
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.core.parser | Contains the necessary interfaces to implement text parsers
org.apache.lucene.queryParser.core.processors | Interfaces and implementations used by query node processors
org.apache.lucene.queryParser.precedence | This package contains the Precedence Query Parser Implementation
org.apache.lucene.queryParser.precedence.processors | This package contains the processors used by Precedence Query Parser
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes
org.apache.lucene.queryParser.standard.parser | Lucene Query Parser
org.apache.lucene.queryParser.standard.processors | Lucene Query Node Processors

Classes in org.apache.lucene.queryParser.core used by org.apache.lucene.queryParser.core
QueryNodeException
This exception should be thrown if something wrong happens when dealing with QueryNodes.

Classes in org.apache.lucene.queryParser.core used by org.apache.lucene.queryParser.core.builders
QueryNodeException
This exception should be thrown if something wrong happens when dealing with QueryNodes.

Classes in org.apache.lucene.queryParser.core used by org.apache.lucene.queryParser.core.nodes
QueryNodeException
This exception should be thrown if something wrong happens when dealing with QueryNodes.

Classes in org.apache.lucene.queryParser.core used by org.apache.lucene.queryParser.core.parser
QueryNodeParseException
This should be thrown when an exception happens during the query parsing from string to the query node tree.

Classes in org.apache.lucene.queryParser.core used by org.apache.lucene.queryParser.core.processors
QueryNodeException
This exception should be thrown if something wrong happens when dealing with QueryNodes.

Classes in org.apache.lucene.queryParser.core used by org.apache.lucene.queryParser.precedence
QueryParserHelper
This class is a helper for the query parser framework, it does all the three query parser phrases at once: text parsing, query processing and query building.

Classes in org.apache.lucene.queryParser.core used by org.apache.lucene.queryParser.precedence.processors
QueryNodeException
This exception should be thrown if something wrong happens when dealing with QueryNodes.

Classes in org.apache.lucene.queryParser.core used by org.apache.lucene.queryParser.standard
QueryNodeException
This exception should be thrown if something wrong happens when dealing with QueryNodes.
QueryParserHelper
This class is a helper for the query parser framework, it does all the three query parser phrases at once: text parsing, query processing and query building.

Classes in org.apache.lucene.queryParser.core used by org.apache.lucene.queryParser.standard.builders
QueryNodeException
This exception should be thrown if something wrong happens when dealing with QueryNodes.

Classes in org.apache.lucene.queryParser.core used by org.apache.lucene.queryParser.standard.nodes
QueryNodeException
This exception should be thrown if something wrong happens when dealing with QueryNodes.

Classes in org.apache.lucene.queryParser.core used by org.apache.lucene.queryParser.standard.parser
QueryNodeException
This exception should be thrown if something wrong happens when dealing with QueryNodes.
QueryNodeParseException
This should be thrown when an exception happens during the query parsing from string to the query node tree.

Classes in org.apache.lucene.queryParser.core used by org.apache.lucene.queryParser.standard.processors
QueryNodeException
This exception should be thrown if something wrong happens when dealing with QueryNodes.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


QueryNodeError

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core
Class QueryNodeError

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Error
            extended by  org.apache.lucene.queryParser.core.QueryNodeError
All Implemented Interfaces:
Serializable, NLSException
public class QueryNodeError
extends Error
implements NLSException

Error class with NLS support

See Also:
NLS, Message, Serialized Form

Constructor Summary
QueryNodeError(Message message)
QueryNodeError(Message message, Throwable throwable)
QueryNodeError(Throwable throwable)
Method Summary
 Message getMessageObject()
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

QueryNodeError

public QueryNodeError(Message message)
Parameters:
message - - NLS Message Object

QueryNodeError

public QueryNodeError(Throwable throwable)
Parameters:
throwable - - @see java.lang.Error

QueryNodeError

public QueryNodeError(Message message,
                      Throwable throwable)
Parameters:
message - - NLS Message Object
throwable - - @see java.lang.Error
Method Detail

getMessageObject

public Message getMessageObject()
Specified by:
getMessageObject in interface NLSException
Returns:
a instance of a class that implements the Message interface
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


QueryNodeException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core
Class QueryNodeException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  org.apache.lucene.queryParser.core.QueryNodeException
All Implemented Interfaces:
Serializable, NLSException
Direct Known Subclasses:
QueryNodeParseException
public class QueryNodeException
extends Exception
implements NLSException

This exception should be thrown if something wrong happens when dealing with QueryNodes.

It also supports NLS messages.

See Also:
Message, NLS, NLSException, QueryNode, Serialized Form

Field Summary
protected  Message message
Constructor Summary
QueryNodeException(Message message)
QueryNodeException(Message message, Throwable throwable)
QueryNodeException(Throwable throwable)
Method Summary
String | getLocalizedMessage()
String | getLocalizedMessage(Locale locale)
String | getMessage()
Message | getMessageObject()
String | toString()
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

message

protected Message message
Constructor Detail

QueryNodeException

public QueryNodeException(Message message)

QueryNodeException

public QueryNodeException(Throwable throwable)

QueryNodeException

public QueryNodeException(Message message,
                          Throwable throwable)
Method Detail

getMessageObject

public Message getMessageObject()
Specified by:
getMessageObject in interface NLSException
Returns:
a instance of a class that implements the Message interface

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable

getLocalizedMessage

public String getLocalizedMessage()
Overrides:
getLocalizedMessage in class Throwable

getLocalizedMessage

public String getLocalizedMessage(Locale locale)

toString

public String toString()
Overrides:
toString in class Throwable
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryNodeParseException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core
Class QueryNodeParseException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  org.apache.lucene.queryParser.core.QueryNodeException
                extended by  org.apache.lucene.queryParser.core.QueryNodeParseException
All Implemented Interfaces:
Serializable, NLSException
Direct Known Subclasses:
ParseException
public class QueryNodeParseException
extends QueryNodeException

This should be thrown when an exception happens during the query parsing from string to the query node tree.

See Also:
QueryNodeException, SyntaxParser, QueryNode, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.QueryNodeException
message
Constructor Summary
QueryNodeParseException(Message message)
QueryNodeParseException(Message message, Throwable throwable)
QueryNodeParseException(Throwable throwable)
Method Summary
int | getBeginColumn() For EndOfLine and EndOfFile ("") parsing problems the last char in the string is returned For the case where the parser is not able to figure out the line and column number -1 will be returned
int | getBeginLine() For EndOfLine and EndOfFile ("") parsing problems the last char in the string is returned For the case where the parser is not able to figure out the line and column number -1 will be returned
String | getErrorToken()
CharSequence | getQuery()
protected void | setBeginColumn(int beginColumn)
protected void | setBeginLine(int beginLine)
protected void | setErrorToken(String errorToken)
void | setNonLocalizedMessage(Message message)
void | setQuery(CharSequence query)
Methods inherited from class org.apache.lucene.queryParser.core.QueryNodeException
getLocalizedMessage, getLocalizedMessage, getMessage, getMessageObject, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

QueryNodeParseException

public QueryNodeParseException(Message message)

QueryNodeParseException

public QueryNodeParseException(Throwable throwable)

QueryNodeParseException

public QueryNodeParseException(Message message,
                               Throwable throwable)
Method Detail

setQuery

public void setQuery(CharSequence query)

getQuery

public CharSequence getQuery()

setErrorToken

protected void setErrorToken(String errorToken)
Parameters:
errorToken - the errorToken in the query

getErrorToken

public String getErrorToken()

setNonLocalizedMessage

public void setNonLocalizedMessage(Message message)

getBeginLine

public int getBeginLine()
For EndOfLine and EndOfFile ("") parsing problems the last char in the string is returned For the case where the parser is not able to figure out the line and column number -1 will be returned

Returns:
line where the problem was found

getBeginColumn

public int getBeginColumn()
For EndOfLine and EndOfFile ("") parsing problems the last char in the string is returned For the case where the parser is not able to figure out the line and column number -1 will be returned

Returns:
column of the first char where the problem was found

setBeginLine

protected void setBeginLine(int beginLine)
Parameters:
beginLine - the beginLine to set

setBeginColumn

protected void setBeginColumn(int beginColumn)
Parameters:
beginColumn - the beginColumn to set
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryParserHelper

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core
Class QueryParserHelper

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.QueryParserHelper
Direct Known Subclasses:
StandardQueryParser
public class QueryParserHelper
extends Object

This class is a helper for the query parser framework, it does all the three query parser phrases at once: text parsing, query processing and query building.

It contains methods that allows the user to change the implementation used on the three phases.

See Also:
QueryNodeProcessor, SyntaxParser, QueryBuilder, QueryConfigHandler

Constructor Summary
QueryParserHelper(QueryConfigHandler queryConfigHandler, SyntaxParser syntaxParser, QueryNodeProcessor processor, QueryBuilder builder)
Creates a query parser helper object using the specified configuration, text parser, processor and builder.
Method Summary
QueryBuilder | getQueryBuilder() Returns the query builder used to build a object from the query node tree.
QueryConfigHandler | getQueryConfigHandler() Returns the query configuration handler, which is used during the query node tree processing.
QueryNodeProcessor | getQueryNodeProcessor() Returns the processor object used to process the query node tree, it returns null if no processor is used.
SyntaxParser | getSyntaxParser() Returns the text parser used to build a query node tree from a query string.
Object | parse(String query, String defaultField) Parses a query string to an object, usually some query object.
void | setQueryBuilder(QueryBuilder queryBuilder) The query builder that will be used to build an object from the query node tree.
void | setQueryConfigHandler(QueryConfigHandler config) Sets the query configuration handler that will be used during query processing.
void | setQueryNodeProcessor(QueryNodeProcessor processor) Sets the processor that will be used to process the query node tree.
void | setSyntaxParser(SyntaxParser syntaxParser) Sets the text parser that will be used to parse the query string, it cannot be null.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

QueryParserHelper

public QueryParserHelper(QueryConfigHandler queryConfigHandler,
                         SyntaxParser syntaxParser,
                         QueryNodeProcessor processor,
                         QueryBuilder builder)
Creates a query parser helper object using the specified configuration, text parser, processor and builder.

Parameters:
queryConfigHandler - the query configuration handler that will be initially set to this helper
syntaxParser - the text parser that will be initially set to this helper
processor - the query processor that will be initially set to this helper
builder - the query builder that will be initially set to this helper
See Also:
QueryNodeProcessor, SyntaxParser, QueryBuilder, QueryConfigHandler
Method Detail

getQueryNodeProcessor

public QueryNodeProcessor getQueryNodeProcessor()
Returns the processor object used to process the query node tree, it returns null if no processor is used.

Returns:
the actual processor used to process the query node tree, null if no processor is used
See Also:
QueryNodeProcessor, setQueryNodeProcessor(QueryNodeProcessor)

setQueryNodeProcessor

public void setQueryNodeProcessor(QueryNodeProcessor processor)
Sets the processor that will be used to process the query node tree. If there is any QueryConfigHandler returned by getQueryConfigHandler(), it will be set on the processor. The argument can be null, which means that no processor will be used to process the query node tree.

Parameters:
processor - the processor that will be used to process the query node tree, this argument can be null
See Also:
getQueryNodeProcessor(), QueryNodeProcessor

setSyntaxParser

public void setSyntaxParser(SyntaxParser syntaxParser)
Sets the text parser that will be used to parse the query string, it cannot be null.

Parameters:
syntaxParser - the text parser that will be used to parse the query string
See Also:
getSyntaxParser(), SyntaxParser

setQueryBuilder

public void setQueryBuilder(QueryBuilder queryBuilder)
The query builder that will be used to build an object from the query node tree. It cannot be null.

Parameters:
queryBuilder - the query builder used to build something from the query node tree
See Also:
getQueryBuilder(), QueryBuilder

getQueryConfigHandler

public QueryConfigHandler getQueryConfigHandler()
Returns the query configuration handler, which is used during the query node tree processing. It can be null.

Returns:
the query configuration handler used on the query processing, null if not query configuration handler is defined
See Also:
QueryConfigHandler, setQueryConfigHandler(QueryConfigHandler)

getQueryBuilder

public QueryBuilder getQueryBuilder()
Returns the query builder used to build a object from the query node tree. The object produced by this builder is returned by parse(String, String).

Returns:
the query builder
See Also:
setQueryBuilder(QueryBuilder), QueryBuilder

getSyntaxParser

public SyntaxParser getSyntaxParser()
Returns the text parser used to build a query node tree from a query string. The default text parser instance returned by this method is a SyntaxParser.

Returns:
the text parse used to build query node trees.
See Also:
SyntaxParser, setSyntaxParser(SyntaxParser)

setQueryConfigHandler

public void setQueryConfigHandler(QueryConfigHandler config)
Sets the query configuration handler that will be used during query processing. It can be null. It's also set to the processor returned by getQueryNodeProcessor().

Parameters:
config - the query configuration handler used during query processing, it can be null
See Also:
getQueryConfigHandler(), QueryConfigHandler

parse

public Object parse(String query,
                    String defaultField)
             throws QueryNodeException
Parses a query string to an object, usually some query object.

In this method the three phases are executed:

1st - the query string is parsed using the text parser returned by getSyntaxParser(), the result is a query node tree

2nd - the query node tree is processed by the processor returned by getQueryNodeProcessor()

3th - a object is built from the query node tree using the builder returned by getQueryBuilder()

Parameters:
query - the query string
defaultField - the default field used by the text parser
Returns:
the object built from the query
Throws:
QueryNodeException - if something wrong happens along the three phases
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.core.builders
Interfaces
QueryBuilder
Classes
QueryTreeBuilder


org.apache.lucene.queryParser.core.builders

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.core.builders

Contains the necessary classes to implement query builders

See:
Description

Interface Summary
QueryBuilder This interface is used by implementors classes that builds some kind of object from a query tree.

Class Summary
QueryTreeBuilder This class should be used when there is a builder for each type of node.

Package org.apache.lucene.queryParser.core.builders Description

Contains the necessary classes to implement query builders

Query Parser Builders

The package org.apache.lucene.queryParser.builders contains the interface that builders must implement, it also contain a utility QueryTreeBuilder, which walks the tree and call the Builder for each node in the tree. Builder normally convert QueryNode Object into a Lucene Query Object, and normally it's a one-to-one mapping class. But other builders implementations can by written to convert QueryNode objects to other non lucene objects.


org.apache.lucene.queryParser.core.builders Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.core.builders

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.core.builders.QueryTreeBuilder (implements org.apache.lucene.queryParser.core.builders.QueryBuilder)

Interface Hierarchy

  • org.apache.lucene.queryParser.core.builders.QueryBuilder


Uses of Package org.apache.lucene.queryParser.core.builders

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.core.builders

Packages that use org.apache.lucene.queryParser.core.builders
org.apache.lucene.queryParser.core | Contains the core classes of the flexible query parser framework
org.apache.lucene.queryParser.core.builders | Contains the necessary classes to implement query builders
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders

Classes in org.apache.lucene.queryParser.core.builders used by org.apache.lucene.queryParser.core
QueryBuilder
This interface is used by implementors classes that builds some kind of object from a query tree.

Classes in org.apache.lucene.queryParser.core.builders used by org.apache.lucene.queryParser.core.builders
QueryBuilder
This interface is used by implementors classes that builds some kind of object from a query tree.

Classes in org.apache.lucene.queryParser.core.builders used by org.apache.lucene.queryParser.standard.builders
QueryBuilder
This interface is used by implementors classes that builds some kind of object from a query tree.
QueryTreeBuilder
This class should be used when there is a builder for each type of node.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


QueryBuilder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.builders
Interface QueryBuilder

All Known Subinterfaces:
StandardQueryBuilder
All Known Implementing Classes:
AnyQueryNodeBuilder, BooleanQueryNodeBuilder, BoostQueryNodeBuilder, DummyQueryNodeBuilder, FieldQueryNodeBuilder, FuzzyQueryNodeBuilder, GroupQueryNodeBuilder, MatchAllDocsQueryNodeBuilder, MatchNoDocsQueryNodeBuilder, ModifierQueryNodeBuilder, MultiPhraseQueryNodeBuilder, NumericRangeQueryNodeBuilder, PhraseQueryNodeBuilder, PrefixWildcardQueryNodeBuilder, QueryTreeBuilder, RangeQueryNodeBuilder, SlopQueryNodeBuilder, StandardBooleanQueryNodeBuilder, StandardQueryTreeBuilder, TermRangeQueryNodeBuilder, WildcardQueryNodeBuilder
public interface QueryBuilder

This interface is used by implementors classes that builds some kind of object from a query tree.

See Also:
QueryTreeBuilder

Method Summary
 Object build(QueryNode queryNode)
Builds some kind of object from a query tree.

Method Detail

build

Object build(QueryNode queryNode)
             throws QueryNodeException
Builds some kind of object from a query tree.

Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


QueryTreeBuilder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.builders
Class QueryTreeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.builders.QueryTreeBuilder
All Implemented Interfaces:
QueryBuilder
Direct Known Subclasses:
StandardQueryTreeBuilder
public class QueryTreeBuilder
extends Object
implements QueryBuilder

This class should be used when there is a builder for each type of node. The type of node may be defined in 2 different ways: - by the field name, when the node implements the FieldableNode interface - by its class, it keeps checking the class and all the interfaces and classes this class implements/extends until it finds a builder for that class/interface This class always check if there is a builder for the field name before it checks for the node class. So, field name builders have precedence over class builders. When a builder is found for a node, it's called and the node is passed to the builder. If the returned built object is not null, it's tagged on the node using the tag QUERY_TREE_BUILDER_TAGID. The children are usually built before the parent node. However, if a builder associated to a node is an instance of QueryTreeBuilder, the node is delegated to this builder and it's responsible to build the node and its children.

See Also:
QueryBuilder

Field Summary
static String QUERY_TREE_BUILDER_TAGID
This tag is used to tag the nodes in a query tree with the built objects produced from their own associated builder.
Constructor Summary
QueryTreeBuilder()
QueryTreeBuilder constructor.
Method Summary
 Object build(QueryNode queryNode)
Builds some kind of object from a query tree.
 void setBuilder(CharSequence fieldName, QueryBuilder builder)
Deprecated. use setBuilder(String, QueryBuilder) instead
 void setBuilder(Class<? extends QueryNode> queryNodeClass, QueryBuilder builder)
Associates a class with a builder
 void setBuilder(String fieldName, QueryBuilder builder)
Associates a field name with a builder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

QUERY_TREE_BUILDER_TAGID

public static final String QUERY_TREE_BUILDER_TAGID
This tag is used to tag the nodes in a query tree with the built objects produced from their own associated builder.

Constructor Detail

QueryTreeBuilder

public QueryTreeBuilder()
QueryTreeBuilder constructor.

Method Detail

setBuilder

public void setBuilder(String fieldName,
                       QueryBuilder builder)
Associates a field name with a builder.

Parameters:
fieldName - the field name
builder - the builder to be associated

setBuilder

@Deprecated
public void setBuilder(CharSequence fieldName,
                                  QueryBuilder builder)
Deprecated. use setBuilder(String, QueryBuilder) instead

Associates a field name with a builder.

Parameters:
fieldName - the field name
builder - the builder to be associated

setBuilder

public void setBuilder(Class<? extends QueryNode> queryNodeClass,
                       QueryBuilder builder)
Associates a class with a builder

Parameters:
queryNodeClass - the class
builder - the builder to be associated

build

public Object build(QueryNode queryNode)
             throws QueryNodeException
Builds some kind of object from a query tree. Each node in the query tree is built using an specific builder associated to it.

Specified by:
build in interface QueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
the built object
Throws:
QueryNodeException - if some node builder throws a QueryNodeException or if there is a node which had no builder associated to it
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Interface org.apache.lucene.queryParser.core.builders.QueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.core.builders.QueryBuilder

Packages that use QueryBuilder
org.apache.lucene.queryParser.core | Contains the core classes of the flexible query parser framework
org.apache.lucene.queryParser.core.builders | Contains the necessary classes to implement query builders
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders

Uses of QueryBuilder in org.apache.lucene.queryParser.core

Methods in org.apache.lucene.queryParser.core that return QueryBuilder
 QueryBuilder QueryParserHelper.getQueryBuilder()
Returns the query builder used to build a object from the query node tree.

Methods in org.apache.lucene.queryParser.core with parameters of type QueryBuilder
 void QueryParserHelper.setQueryBuilder(QueryBuilder queryBuilder)
The query builder that will be used to build an object from the query node tree.

Constructors in org.apache.lucene.queryParser.core with parameters of type QueryBuilder
QueryParserHelper(QueryConfigHandler queryConfigHandler, SyntaxParser syntaxParser, QueryNodeProcessor processor, QueryBuilder builder)
Creates a query parser helper object using the specified configuration, text parser, processor and builder.

Uses of QueryBuilder in org.apache.lucene.queryParser.core.builders

Classes in org.apache.lucene.queryParser.core.builders that implement QueryBuilder
 class QueryTreeBuilder
This class should be used when there is a builder for each type of node.

Methods in org.apache.lucene.queryParser.core.builders with parameters of type QueryBuilder
 void QueryTreeBuilder.setBuilder(CharSequence fieldName, QueryBuilder builder)
Deprecated. use QueryTreeBuilder.setBuilder(String, QueryBuilder) instead
 void QueryTreeBuilder.setBuilder(Class<? extends QueryNode> queryNodeClass, QueryBuilder builder)
Associates a class with a builder
 void QueryTreeBuilder.setBuilder(String fieldName, QueryBuilder builder)
Associates a field name with a builder.

Uses of QueryBuilder in org.apache.lucene.queryParser.standard.builders

Subinterfaces of QueryBuilder in org.apache.lucene.queryParser.standard.builders
 interface StandardQueryBuilder
This interface should be implemented by every class that wants to build Query objects from QueryNode objects.

Classes in org.apache.lucene.queryParser.standard.builders that implement QueryBuilder
class | AnyQueryNodeBuilder
class | BooleanQueryNodeBuilder Builds a BooleanQuery object from a BooleanQueryNode object.
class | BoostQueryNodeBuilder This builder basically reads the Query object set on the BoostQueryNode child using QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID and applies the boost value defined in the BoostQueryNode.
class | DummyQueryNodeBuilder This builder does nothing.
class | FieldQueryNodeBuilder Builds a TermQuery object from a FieldQueryNode object.
class | FuzzyQueryNodeBuilder Builds a FuzzyQuery object from a FuzzyQueryNode object.
class | GroupQueryNodeBuilder Builds no object, it only returns the Query object set on the GroupQueryNode object using a QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID tag.
class | MatchAllDocsQueryNodeBuilder Builds a MatchAllDocsQuery object from a MatchAllDocsQueryNode object.
class | MatchNoDocsQueryNodeBuilder Builds an empty BooleanQuery object from a MatchNoDocsQueryNode object.
class | ModifierQueryNodeBuilder Builds no object, it only returns the Query object set on the ModifierQueryNode object using a QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID tag.
class | MultiPhraseQueryNodeBuilder Builds a MultiPhraseQuery object from a MultiPhraseQueryNode object.
class | NumericRangeQueryNodeBuilder Builds NumericRangeQuerys out of NumericRangeQueryNodes.
class | PhraseQueryNodeBuilder Builds a PhraseQuery object from a TokenizedPhraseQueryNode object.
class | PrefixWildcardQueryNodeBuilder Builds a PrefixQuery object from a PrefixWildcardQueryNode object.
class | RangeQueryNodeBuilder Deprecated. this builder will be removed in future together with RangeQueryNode
class | SlopQueryNodeBuilder This builder basically reads the Query object set on the SlopQueryNode child using QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID and applies the slop value defined in the SlopQueryNode.
class | StandardBooleanQueryNodeBuilder This builder does the same as the BooleanQueryNodeBuilder, but this considers if the built BooleanQuery should have its coord disabled or not.
class | StandardQueryTreeBuilder This query tree builder only defines the necessary map to build a Query tree object.
class | TermRangeQueryNodeBuilder Builds a TermRangeQuery object from a TermRangeQueryNode object.
class | WildcardQueryNodeBuilder Builds a WildcardQuery object from a WildcardQueryNode object.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.builders.QueryTreeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.builders.QueryTreeBuilder

Packages that use QueryTreeBuilder
org.apache.lucene.queryParser.standard.builders Standard Lucene Query Node Builders

Uses of QueryTreeBuilder in org.apache.lucene.queryParser.standard.builders

Subclasses of QueryTreeBuilder in org.apache.lucene.queryParser.standard.builders
 class StandardQueryTreeBuilder
This query tree builder only defines the necessary map to build a Query tree object.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.QueryNodeError

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.QueryNodeError

No usage of org.apache.lucene.queryParser.core.QueryNodeError

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.QueryNodeException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.QueryNodeException

Packages that use QueryNodeException
org.apache.lucene.queryParser.core | Contains the core classes of the flexible query parser framework
org.apache.lucene.queryParser.core.builders | Contains the necessary classes to implement query builders
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.core.processors | Interfaces and implementations used by query node processors
org.apache.lucene.queryParser.precedence.processors | This package contains the processors used by Precedence Query Parser
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes
org.apache.lucene.queryParser.standard.parser | Lucene Query Parser
org.apache.lucene.queryParser.standard.processors | Lucene Query Node Processors

Uses of QueryNodeException in org.apache.lucene.queryParser.core

Subclasses of QueryNodeException in org.apache.lucene.queryParser.core
 class QueryNodeParseException
This should be thrown when an exception happens during the query parsing from string to the query node tree.

Methods in org.apache.lucene.queryParser.core that throw QueryNodeException
 Object QueryParserHelper.parse(String query, String defaultField)
Parses a query string to an object, usually some query object.

Uses of QueryNodeException in org.apache.lucene.queryParser.core.builders

Methods in org.apache.lucene.queryParser.core.builders that throw QueryNodeException
Object | QueryBuilder.build(QueryNode queryNode) Builds some kind of object from a query tree.
Object | QueryTreeBuilder.build(QueryNode queryNode) Builds some kind of object from a query tree.

Uses of QueryNodeException in org.apache.lucene.queryParser.core.nodes

Constructors in org.apache.lucene.queryParser.core.nodes that throw QueryNodeException
BoostQueryNode(QueryNode query, float value)
Constructs a boost node
PhraseSlopQueryNode(QueryNode query, int value)

Uses of QueryNodeException in org.apache.lucene.queryParser.core.processors

Methods in org.apache.lucene.queryParser.core.processors that throw QueryNodeException
protected  QueryNode NoChildOptimizationQueryNodeProcessor.postProcessNode(QueryNode node)
protected abstract  QueryNode QueryNodeProcessorImpl.postProcessNode(QueryNode node)
This method is invoked for every node when walking up the tree.
protected  QueryNode RemoveDeletedQueryNodesProcessor.postProcessNode(QueryNode node)
protected  QueryNode NoChildOptimizationQueryNodeProcessor.preProcessNode(QueryNode node)
protected abstract  QueryNode QueryNodeProcessorImpl.preProcessNode(QueryNode node)
This method is invoked for every node when walking down the tree.
protected  QueryNode RemoveDeletedQueryNodesProcessor.preProcessNode(QueryNode node)
 QueryNode QueryNodeProcessor.process(QueryNode queryTree)
Processes a query node tree.
 QueryNode QueryNodeProcessorImpl.process(QueryNode queryTree)
 QueryNode RemoveDeletedQueryNodesProcessor.process(QueryNode queryTree)
 QueryNode QueryNodeProcessorPipeline.process(QueryNode queryTree)
For reference about this method check: QueryNodeProcessor.process(QueryNode).
protected  void QueryNodeProcessorImpl.processChildren(QueryNode queryTree)
This method is called every time a child is processed.
protected  List<QueryNode> NoChildOptimizationQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected abstract  List<QueryNode> QueryNodeProcessorImpl.setChildrenOrder(List<QueryNode> children)
This method is invoked for every node that has at least on child.
protected  List<QueryNode> RemoveDeletedQueryNodesProcessor.setChildrenOrder(List<QueryNode> children)

Uses of QueryNodeException in org.apache.lucene.queryParser.precedence.processors

Methods in org.apache.lucene.queryParser.precedence.processors that throw QueryNodeException
protected QueryNode | BooleanModifiersQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | BooleanModifiersQueryNodeProcessor.preProcessNode(QueryNode node)
QueryNode | BooleanModifiersQueryNodeProcessor.process(QueryNode queryTree)
protected List<QueryNode> | BooleanModifiersQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)

Uses of QueryNodeException in org.apache.lucene.queryParser.standard

Methods in org.apache.lucene.queryParser.standard that throw QueryNodeException
static Query QueryParserUtil.parse(String[] queries, String[] fields, Analyzer analyzer)
Parses a query which searches on the fields specified.
static Query QueryParserUtil.parse(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Parses a query, searching on the fields specified.
 Query StandardQueryParser.parse(String query, String defaultField)
Overrides QueryParserHelper.parse(String, String) so it casts the return object to Query.
static Query QueryParserUtil.parse(String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Parses a query, searching on the fields specified.

Uses of QueryNodeException in org.apache.lucene.queryParser.standard.builders

Methods in org.apache.lucene.queryParser.standard.builders that throw QueryNodeException
Query | StandardQueryTreeBuilder.build(QueryNode queryNode)
TermRangeQuery | TermRangeQueryNodeBuilder.build(QueryNode queryNode)
Query | StandardQueryBuilder.build(QueryNode queryNode)
TermQuery | FieldQueryNodeBuilder.build(QueryNode queryNode)
TermQuery | DummyQueryNodeBuilder.build(QueryNode queryNode) Always return null.
BooleanQuery | StandardBooleanQueryNodeBuilder.build(QueryNode queryNode)
Query | GroupQueryNodeBuilder.build(QueryNode queryNode)
PrefixQuery | PrefixWildcardQueryNodeBuilder.build(QueryNode queryNode)
MultiPhraseQuery | MultiPhraseQueryNodeBuilder.build(QueryNode queryNode)
BooleanQuery | BooleanQueryNodeBuilder.build(QueryNode queryNode)
PhraseQuery | PhraseQueryNodeBuilder.build(QueryNode queryNode)
Query | BoostQueryNodeBuilder.build(QueryNode queryNode)
Query | ModifierQueryNodeBuilder.build(QueryNode queryNode)
NumericRangeQuery<? extends Number> | NumericRangeQueryNodeBuilder.build(QueryNode queryNode)
BooleanQuery | MatchNoDocsQueryNodeBuilder.build(QueryNode queryNode)
FuzzyQuery | FuzzyQueryNodeBuilder.build(QueryNode queryNode)
MatchAllDocsQuery | MatchAllDocsQueryNodeBuilder.build(QueryNode queryNode)
TermRangeQuery | RangeQueryNodeBuilder.build(QueryNode queryNode) Deprecated.
WildcardQuery | WildcardQueryNodeBuilder.build(QueryNode queryNode)
BooleanQuery | AnyQueryNodeBuilder.build(QueryNode queryNode)
Query | SlopQueryNodeBuilder.build(QueryNode queryNode)

Uses of QueryNodeException in org.apache.lucene.queryParser.standard.nodes

Methods in org.apache.lucene.queryParser.standard.nodes that throw QueryNodeException
 void NumericRangeQueryNode.setBounds(NumericQueryNode lower, NumericQueryNode upper, boolean lowerInclusive, boolean upperInclusive, NumericConfig numericConfig)
Sets the upper and lower bounds of this range query node and the NumericConfig associated with these bounds.

Constructors in org.apache.lucene.queryParser.standard.nodes that throw QueryNodeException
NumericRangeQueryNode(NumericQueryNode lower, NumericQueryNode upper, boolean lowerInclusive, boolean upperInclusive, NumericConfig numericConfig)
Constructs a NumericRangeQueryNode object using the given NumericQueryNode as its bounds and NumericConfig.

Uses of QueryNodeException in org.apache.lucene.queryParser.standard.parser

Subclasses of QueryNodeException in org.apache.lucene.queryParser.standard.parser
 class ParseException
This exception is thrown when parse errors are encountered.

Uses of QueryNodeException in org.apache.lucene.queryParser.standard.processors

Methods in org.apache.lucene.queryParser.standard.processors that throw QueryNodeException
protected QueryNode | ParametricRangeQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | BoostQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | AnalyzerQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | PhraseSlopQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | RemoveEmptyNonLeafQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | MultiFieldQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | WildcardQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | NumericQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | LowercaseExpandedTermsQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | DefaultPhraseSlopQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | AllowLeadingWildcardProcessor.postProcessNode(QueryNode node)
protected QueryNode | NumericRangeQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | BooleanSingleChildOptimizationQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | FuzzyQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | MatchAllDocsQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | ParametricRangeQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | BoostQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | AnalyzerQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | PhraseSlopQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | RemoveEmptyNonLeafQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | MultiFieldQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | WildcardQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | NumericQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | LowercaseExpandedTermsQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | DefaultPhraseSlopQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | AllowLeadingWildcardProcessor.preProcessNode(QueryNode node)
protected QueryNode | NumericRangeQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | BooleanSingleChildOptimizationQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | FuzzyQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | MatchAllDocsQueryNodeProcessor.preProcessNode(QueryNode node)
QueryNode | AnalyzerQueryNodeProcessor.process(QueryNode queryTree)
QueryNode | RemoveEmptyNonLeafQueryNodeProcessor.process(QueryNode queryTree)
QueryNode | GroupQueryNodeProcessor.process(QueryNode queryTree)
QueryNode | LowercaseExpandedTermsQueryNodeProcessor.process(QueryNode queryTree)
QueryNode | DefaultPhraseSlopQueryNodeProcessor.process(QueryNode queryTree)
QueryNode | AllowLeadingWildcardProcessor.process(QueryNode queryTree)
protected void | MultiFieldQueryNodeProcessor.processChildren(QueryNode queryTree)
protected void | DefaultPhraseSlopQueryNodeProcessor.processChildren(QueryNode queryTree)
protected List<QueryNode> | ParametricRangeQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | BoostQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | AnalyzerQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | PhraseSlopQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | RemoveEmptyNonLeafQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | MultiFieldQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | WildcardQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | NumericQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | LowercaseExpandedTermsQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | DefaultPhraseSlopQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | AllowLeadingWildcardProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | NumericRangeQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | BooleanSingleChildOptimizationQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | FuzzyQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | MatchAllDocsQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.QueryNodeParseException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.QueryNodeParseException

Packages that use QueryNodeParseException
org.apache.lucene.queryParser.core.parser | Contains the necessary interfaces to implement text parsers
org.apache.lucene.queryParser.standard.parser | Lucene Query Parser

Uses of QueryNodeParseException in org.apache.lucene.queryParser.core.parser

Methods in org.apache.lucene.queryParser.core.parser that throw QueryNodeParseException
 QueryNode SyntaxParser.parse(CharSequence query, CharSequence field)

Uses of QueryNodeParseException in org.apache.lucene.queryParser.standard.parser

Subclasses of QueryNodeParseException in org.apache.lucene.queryParser.standard.parser
 class ParseException
This exception is thrown when parse errors are encountered.

Methods in org.apache.lucene.queryParser.standard.parser that throw QueryNodeParseException
 QueryNode StandardSyntaxParser.parse(CharSequence query, CharSequence field)
Parses a query string, returning a QueryNode.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.QueryParserHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.QueryParserHelper

Packages that use QueryParserHelper
org.apache.lucene.queryParser.precedence | This package contains the Precedence Query Parser Implementation
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks

Uses of QueryParserHelper in org.apache.lucene.queryParser.precedence

Subclasses of QueryParserHelper in org.apache.lucene.queryParser.precedence
 class PrecedenceQueryParser
This query parser works exactly as the standard query parser ( StandardQueryParser ), except that it respect the boolean precedence, so <a AND b OR c AND d> is parsed to <(+a +b) (+c +d)> instead of <+a +b +c +d>.

Uses of QueryParserHelper in org.apache.lucene.queryParser.standard

Subclasses of QueryParserHelper in org.apache.lucene.queryParser.standard
 class StandardQueryParser
This class is a helper that enables users to easily use the Lucene query parser.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AbstractQueryConfig

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.config
Class AbstractQueryConfig

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.queryParser.core.config.AbstractQueryConfig
Direct Known Subclasses:
FieldConfig, QueryConfigHandler
public abstract class AbstractQueryConfig
extends AttributeSource

This class is the base of QueryConfigHandler and FieldConfig. It has operations to set, unset and get configuration values.

Each configuration is is a key->value pair. The key should be an unique ConfigurationKey instance and it also holds the value's type.

NOTE: in future this class will no longer extend AttributeSource

See Also:
ConfigurationKey

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Method Summary
<A extends Attribute>
A
addAttribute(Class<A> attClass)
The caller must pass in a Class<? extends Attribute> value.
<T> T
get(ConfigurationKey<T> key)
Returns the value held by the given key.
<T> T
get(ConfigurationKey<T> key, T defaultValue)
Returns the value held by the given key or the given default value if the key is not found.
<T> boolean
has(ConfigurationKey<T> key)
Returns true if there is a value set with the given key, otherwise false.
<T> void
set(ConfigurationKey<T> key, T value)
Sets a key and its value.
<T> boolean
unset(ConfigurationKey<T> key)
Unsets the given key and its value.
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail

get

public <T> T get(ConfigurationKey<T> key)
Returns the value held by the given key.

Type Parameters:
T - the value's type
Parameters:
key - the key, cannot be null
Returns:
the value held by the given key

get

public <T> T get(ConfigurationKey<T> key,
                 T defaultValue)
Returns the value held by the given key or the given default value if the key is not found.

Type Parameters:
T - the value's type
Parameters:
key - the key, cannot be null
defaultValue - the default value
Returns:
the value held by the given key or the default value

has

public <T> boolean has(ConfigurationKey<T> key)
Returns true if there is a value set with the given key, otherwise false.

Type Parameters:
T - @param the value's type
Parameters:
key - the key, cannot be null
Returns:
true if there is a value set with the given key, otherwise false

set

public <T> void set(ConfigurationKey<T> key,
                    T value)
Sets a key and its value.

Type Parameters:
T - the value's type
Parameters:
key - the key, cannot be null
value -

addAttribute

public <A extends Attribute> A addAttribute(Class<A> attClass)
Description copied from class: AttributeSource
The caller must pass in a Class<? extends Attribute> value. This method first checks if an instance of that class is already in this AttributeSource and returns it. Otherwise a new instance is created, added to this AttributeSource and returned.

Overrides:
addAttribute in class AttributeSource

unset

public <T> boolean unset(ConfigurationKey<T> key)
Unsets the given key and its value.

Type Parameters:
T - the value's type
Parameters:
key - the key
Returns:
true if the key and value was set and removed, otherwise false
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ConfigAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.config
Interface ConfigAttribute

All Known Implementing Classes:
AllowLeadingWildcardAttributeImpl, AnalyzerAttributeImpl, BoostAttributeImpl, DateResolutionAttributeImpl, DefaultOperatorAttributeImpl, DefaultPhraseSlopAttributeImpl, FieldBoostMapAttributeImpl, FieldDateResolutionMapAttributeImpl, FuzzyAttributeImpl, LocaleAttributeImpl, LowercaseExpandedTermsAttributeImpl, MultiFieldAttributeImpl, MultiTermRewriteMethodAttributeImpl, PositionIncrementsAttributeImpl, RangeCollatorAttributeImpl
Deprecated.

@Deprecated
public interface ConfigAttribute

This class should be used by every class that extends Attribute to configure a QueryConfigHandler. It will be removed soon, it is only used during the transition from old configuration API to new configuration API.

Method Summary
 void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.

Method Detail

setQueryConfigHandler

void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ConfigurationKey

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.config
Class ConfigurationKey<T>

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.config.ConfigurationKey<T>

public final class ConfigurationKey<T>
extends Object

An instance of this class represents a key that is used to retrieve a value from AbstractQueryConfig. It also holds the value's type, which is defined in the generic argument.

See Also:
AbstractQueryConfig

Method Summary
static
<T> ConfigurationKey<T>
newInstance()
Creates a new instance.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

newInstance

public static <T> ConfigurationKey<T> newInstance()
Creates a new instance.

Type Parameters:
T - the value's type
Returns:
a new instance
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldConfig

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.config
Class FieldConfig

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.queryParser.core.config.AbstractQueryConfig
            extended by  org.apache.lucene.queryParser.core.config.FieldConfig

public class FieldConfig
extends AbstractQueryConfig

This class represents a field configuration. Every configuration should be set using the methods inherited from AttributeSource.

See Also:
QueryConfigHandler, Attribute

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Constructor Summary
FieldConfig(CharSequence fieldName)
Deprecated. use FieldConfig(String) instead
FieldConfig(String fieldName)
Constructs a FieldConfig
Method Summary
 String getField()
Returns the field name this configuration represents.
 CharSequence getFieldName()
Deprecated. use getField() instead
 String toString()
Returns a string representation of the object.
Methods inherited from class org.apache.lucene.queryParser.core.config.AbstractQueryConfig
addAttribute, get, get, has, set, unset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FieldConfig

@Deprecated
public FieldConfig(CharSequence fieldName)
Deprecated. use FieldConfig(String) instead

Constructs a FieldConfig

Parameters:
fieldName - the field name, it cannot be null
Throws:
IllegalArgumentException - if the field name is null

FieldConfig

public FieldConfig(String fieldName)
Constructs a FieldConfig

Parameters:
fieldName - the field name, it cannot be null
Throws:
IllegalArgumentException - if the field name is null
Method Detail

getFieldName

@Deprecated
public CharSequence getFieldName()
Deprecated. use getField() instead

Returns the field name this configuration represents.

Returns:
the field name

getField

public String getField()
Returns the field name this configuration represents.

Returns:
the field name

toString

public String toString()
Description copied from class: AttributeSource
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as in Lucene 2.9/3.0. In Lucene 4.0 this default implementation will be removed.

It is recommeneded to use AttributeSource.reflectAsString(boolean) or AttributeSource.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeSource's internals.

Overrides:
toString in class AttributeSource
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldConfigListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.config
Interface FieldConfigListener

All Known Implementing Classes:
FieldBoostMapFCListener, FieldDateResolutionFCListener, NumericFieldConfigListener
public interface FieldConfigListener

This interface should be implemented by classes that wants to listen for field configuration requests. The implementation receives a FieldConfig object and may add/change its configuration.

See Also:
FieldConfig, QueryConfigHandler

Method Summary
 void buildFieldConfig(FieldConfig fieldConfig)
This method is called ever time a field configuration is requested.

Method Detail

buildFieldConfig

void buildFieldConfig(FieldConfig fieldConfig)
This method is called ever time a field configuration is requested.

Parameters:
fieldConfig - the field configuration requested, should never be null
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.core.config
Interfaces
ConfigAttribute
FieldConfigListener
Classes
AbstractQueryConfig
ConfigurationKey
FieldConfig
QueryConfigHandler


org.apache.lucene.queryParser.core.config

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.core.config

Contains the base classes used to configure the query processing

See:
Description

Interface Summary
ConfigAttribute | Deprecated.
FieldConfigListener | This interface should be implemented by classes that wants to listen for field configuration requests.

Class Summary
AbstractQueryConfig | This class is the base of QueryConfigHandler and FieldConfig.
ConfigurationKey<T> | An instance of this class represents a key that is used to retrieve a value from AbstractQueryConfig.
FieldConfig | This class represents a field configuration.
QueryConfigHandler | This class can be used to hold any query configuration and no field configuration.

Package org.apache.lucene.queryParser.core.config Description

Contains the base classes used to configure the query processing

Query Configuration Interfaces

The package org.apache.lucene.queryParser.core.config contains query configuration handler abstract class that all config handlers should extend.

See StandardQueryConfigHandler for a reference implementation.

The QueryConfigHandler and FieldConfig are used in the processors to access config information in a flexible and independent way. See ParametricRangeQueryNodeProcessor for a reference implementation.

Since version 3.4, the configuration API has changed. It no longer uses Attribute objects to configure a query parser. Instead, it uses ConfigurationKey objects to set any configuration to a QueryConfigHandler. For now, both configuration APIs are working, however, they cannot be used at the same time. So if you start moving your code to the new API, move it completely or keep using the old API.

Here is an example about how the new configuration API works:

...
// this constant will be the key to get and set your configuration. This should be unique in your application.
final public static ConfigurationKey<NumberFormat> MY_CONFIG = ConfigurationKey.newInstance();
...
// make sure to use your unique key instance to set and get your configuration
queryConfigHandler.set(MY_CONFIG, NumberFormat.getInstance());
NumberFormat numberFormat = queryConfigHandler.get(MY_CONFIG);
...


org.apache.lucene.queryParser.core.config Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.core.config

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.queryParser.core.config.AbstractQueryConfig
        • org.apache.lucene.queryParser.core.config.FieldConfig
        • org.apache.lucene.queryParser.core.config.QueryConfigHandler
    • org.apache.lucene.queryParser.core.config.ConfigurationKey<T>

Interface Hierarchy

  • org.apache.lucene.queryParser.core.config.ConfigAttribute
  • org.apache.lucene.queryParser.core.config.FieldConfigListener


Uses of Package org.apache.lucene.queryParser.core.config

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.core.config

Packages that use org.apache.lucene.queryParser.core.config
org.apache.lucene.queryParser.core | Contains the core classes of the flexible query parser framework
org.apache.lucene.queryParser.core.config | Contains the base classes used to configure the query processing
org.apache.lucene.queryParser.core.processors | Interfaces and implementations used by query node processors
org.apache.lucene.queryParser.precedence.processors | This package contains the processors used by Precedence Query Parser
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration
org.apache.lucene.queryParser.standard.processors | Lucene Query Node Processors

Classes in org.apache.lucene.queryParser.core.config used by org.apache.lucene.queryParser.core
QueryConfigHandler
This class can be used to hold any query configuration and no field configuration.

Classes in org.apache.lucene.queryParser.core.config used by org.apache.lucene.queryParser.core.config
AbstractQueryConfig
This class is the base of QueryConfigHandler and FieldConfig.
ConfigurationKey
An instance of this class represents a key that is used to retrieve a value from AbstractQueryConfig.
FieldConfig
This class represents a field configuration.
FieldConfigListener
This interface should be implemented by classes that wants to listen for field configuration requests.

Classes in org.apache.lucene.queryParser.core.config used by org.apache.lucene.queryParser.core.processors
QueryConfigHandler
This class can be used to hold any query configuration and no field configuration.

Classes in org.apache.lucene.queryParser.core.config used by org.apache.lucene.queryParser.precedence.processors
QueryConfigHandler
This class can be used to hold any query configuration and no field configuration.

Classes in org.apache.lucene.queryParser.core.config used by org.apache.lucene.queryParser.standard
QueryConfigHandler
This class can be used to hold any query configuration and no field configuration.

Classes in org.apache.lucene.queryParser.core.config used by org.apache.lucene.queryParser.standard.config
AbstractQueryConfig
This class is the base of QueryConfigHandler and FieldConfig.
ConfigAttribute
Deprecated.
ConfigurationKey
An instance of this class represents a key that is used to retrieve a value from AbstractQueryConfig.
FieldConfig
This class represents a field configuration.
FieldConfigListener
This interface should be implemented by classes that wants to listen for field configuration requests.
QueryConfigHandler
This class can be used to hold any query configuration and no field configuration.

Classes in org.apache.lucene.queryParser.core.config used by org.apache.lucene.queryParser.standard.processors
QueryConfigHandler
This class can be used to hold any query configuration and no field configuration.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


QueryConfigHandler

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.config
Class QueryConfigHandler

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.queryParser.core.config.AbstractQueryConfig
            extended by  org.apache.lucene.queryParser.core.config.QueryConfigHandler
Direct Known Subclasses:
StandardQueryConfigHandler
public abstract class QueryConfigHandler
extends AbstractQueryConfig

This class can be used to hold any query configuration and no field configuration. For field configuration, it creates a empty FieldConfig object and delegate it to field config listeners, these are responsible for setting up all the field configuration. QueryConfigHandler should be extended by classes that intends to provide configuration to QueryNodeProcessor objects. This class extends AttributeSource, so Attributes can be attached to it. The class that extends QueryConfigHandler should also provide FieldConfig objects for each collection field.

See Also:
Attribute, FieldConfig, FieldConfigListener, QueryConfigHandler

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Constructor Summary
QueryConfigHandler()
Method Summary
void | addFieldConfigListener(FieldConfigListener listener) Adds a listener.
FieldConfig | getFieldConfig(CharSequence fieldName) Deprecated. use getFieldConfig(String) instead
FieldConfig | getFieldConfig(String fieldName) Returns an implementation of FieldConfig for a specific field name.
Methods inherited from class org.apache.lucene.queryParser.core.config.AbstractQueryConfig
addAttribute, get, get, has, set, unset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

QueryConfigHandler

public QueryConfigHandler()
Method Detail

getFieldConfig

@Deprecated
public FieldConfig getFieldConfig(CharSequence fieldName)
Deprecated. use getFieldConfig(String) instead

Returns an implementation of FieldConfig for a specific field name. If the implemented QueryConfigHandler does not know a specific field name, it may return null, indicating there is no configuration for that field.

Parameters:
fieldName - the field name
Returns:
a FieldConfig object containing the field name configuration or null, if the implemented QueryConfigHandler has no configuration for that field

getFieldConfig

public FieldConfig getFieldConfig(String fieldName)
Returns an implementation of FieldConfig for a specific field name. If the implemented QueryConfigHandler does not know a specific field name, it may return null, indicating there is no configuration for that field.

Parameters:
fieldName - the field name
Returns:
a FieldConfig object containing the field name configuration or null, if the implemented QueryConfigHandler has no configuration for that field

addFieldConfigListener

public void addFieldConfigListener(FieldConfigListener listener)
Adds a listener. The added listeners are called in the order they are added.

Parameters:
listener - the listener to be added
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.queryParser.core.config.AbstractQueryConfig

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.config.AbstractQueryConfig

Packages that use AbstractQueryConfig
org.apache.lucene.queryParser.core.config | Contains the base classes used to configure the query processing
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration

Uses of AbstractQueryConfig in org.apache.lucene.queryParser.core.config

Subclasses of AbstractQueryConfig in org.apache.lucene.queryParser.core.config
class | FieldConfig This class represents a field configuration.
class | QueryConfigHandler This class can be used to hold any query configuration and no field configuration.

Methods in org.apache.lucene.queryParser.core.config with parameters of type AbstractQueryConfig
 void ConfigAttribute.setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.

Uses of AbstractQueryConfig in org.apache.lucene.queryParser.standard.config

Subclasses of AbstractQueryConfig in org.apache.lucene.queryParser.standard.config
 class StandardQueryConfigHandler
This query configuration handler is used for almost every processor defined in the StandardQueryNodeProcessorPipeline processor pipeline.

Methods in org.apache.lucene.queryParser.standard.config with parameters of type AbstractQueryConfig
void | DefaultOperatorAttributeImpl.setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
void | AnalyzerAttributeImpl.setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
void | FieldBoostMapAttributeImpl.setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
void | PositionIncrementsAttributeImpl.setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
void | BoostAttributeImpl.setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
void | FuzzyAttributeImpl.setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
void | AllowLeadingWildcardAttributeImpl.setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
void | MultiFieldAttributeImpl.setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
void | LocaleAttributeImpl.setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
void | DateResolutionAttributeImpl.setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
void | DefaultPhraseSlopAttributeImpl.setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
void | LowercaseExpandedTermsAttributeImpl.setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
void | FieldDateResolutionMapAttributeImpl.setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
void | RangeCollatorAttributeImpl.setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
void | MultiTermRewriteMethodAttributeImpl.setQueryConfigHandler(AbstractQueryConfig config) Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.core.config.ConfigAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.core.config.ConfigAttribute

Packages that use ConfigAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of ConfigAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement ConfigAttribute
class | AllowLeadingWildcardAttributeImpl Deprecated.
class | AnalyzerAttributeImpl Deprecated.
class | BoostAttributeImpl Deprecated.
class | DateResolutionAttributeImpl Deprecated.
class | DefaultOperatorAttributeImpl Deprecated.
class | DefaultPhraseSlopAttributeImpl Deprecated.
class | FieldBoostMapAttributeImpl Deprecated.
class | FieldDateResolutionMapAttributeImpl Deprecated.
class | FuzzyAttributeImpl Deprecated.
class | LocaleAttributeImpl Deprecated.
class | LowercaseExpandedTermsAttributeImpl Deprecated.
class | MultiFieldAttributeImpl Deprecated.
class | MultiTermRewriteMethodAttributeImpl Deprecated.
class | PositionIncrementsAttributeImpl Deprecated.
class | RangeCollatorAttributeImpl Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.config.ConfigurationKey

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.config.ConfigurationKey

Packages that use ConfigurationKey
org.apache.lucene.queryParser.core.config | Contains the base classes used to configure the query processing
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration

Uses of ConfigurationKey in org.apache.lucene.queryParser.core.config

Methods in org.apache.lucene.queryParser.core.config that return ConfigurationKey
static
<T> ConfigurationKey<T>
ConfigurationKey.newInstance()
Creates a new instance.

Methods in org.apache.lucene.queryParser.core.config with parameters of type ConfigurationKey
<T> T
AbstractQueryConfig.get(ConfigurationKey<T> key)
Returns the value held by the given key.
<T> T
AbstractQueryConfig.get(ConfigurationKey<T> key, T defaultValue)
Returns the value held by the given key or the given default value if the key is not found.
<T> boolean
AbstractQueryConfig.has(ConfigurationKey<T> key)
Returns true if there is a value set with the given key, otherwise false.
<T> void
AbstractQueryConfig.set(ConfigurationKey<T> key, T value)
Sets a key and its value.
<T> boolean
AbstractQueryConfig.unset(ConfigurationKey<T> key)
Unsets the given key and its value.

Uses of ConfigurationKey in org.apache.lucene.queryParser.standard.config

Fields in org.apache.lucene.queryParser.standard.config declared as ConfigurationKey
static ConfigurationKey<Boolean> | StandardQueryConfigHandler.ConfigurationKeys.ALLOW_LEADING_WILDCARD Key used to set whether leading wildcards are supported
static ConfigurationKey<Analyzer> | StandardQueryConfigHandler.ConfigurationKeys.ANALYZER Key used to set the Analyzer used for terms found in the query
static ConfigurationKey<Float> | StandardQueryConfigHandler.ConfigurationKeys.BOOST Key used to set the boost value in FieldConfig objects.
static ConfigurationKey<DateTools.Resolution> | StandardQueryConfigHandler.ConfigurationKeys.DATE_RESOLUTION Key used to set default DateTools.Resolution.
static ConfigurationKey<StandardQueryConfigHandler.Operator> | StandardQueryConfigHandler.ConfigurationKeys.DEFAULT_OPERATOR Key used to set the default boolean operator
static ConfigurationKey<Boolean> | StandardQueryConfigHandler.ConfigurationKeys.ENABLE_POSITION_INCREMENTS Key used to set whether position increments is enabled
static ConfigurationKey<Map<String,Float>> | StandardQueryConfigHandler.ConfigurationKeys.FIELD_BOOST_MAP Key used to set a field to boost map that is used to set the boost for each field
static ConfigurationKey<Map<CharSequence,DateTools.Resolution>> | StandardQueryConfigHandler.ConfigurationKeys.FIELD_DATE_RESOLUTION_MAP Key used to set a field to DateTools.Resolution map that is used to normalize each date field value.
static ConfigurationKey<FuzzyConfig> | StandardQueryConfigHandler.ConfigurationKeys.FUZZY_CONFIG Key used to set the FuzzyConfig used to create fuzzy queries.
static ConfigurationKey<Locale> | StandardQueryConfigHandler.ConfigurationKeys.LOCALE Key used to set the Locale used when parsing the query
static ConfigurationKey<Boolean> | StandardQueryConfigHandler.ConfigurationKeys.LOWERCASE_EXPANDED_TERMS Key used to set whether expanded terms should be expanded
static ConfigurationKey<CharSequence[]> | StandardQueryConfigHandler.ConfigurationKeys.MULTI_FIELDS Key used to set the fields a query should be expanded to when the field is null
static ConfigurationKey<MultiTermQuery.RewriteMethod> | StandardQueryConfigHandler.ConfigurationKeys.MULTI_TERM_REWRITE_METHOD Key used to set the MultiTermQuery.RewriteMethod used when creating queries
static ConfigurationKey<NumericConfig> | StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG Key used to set a field to its NumericConfig.
static ConfigurationKey<Map<String,NumericConfig>> | StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG_MAP Key used to set the NumericConfig in FieldConfig for numeric fields.
static ConfigurationKey<Integer> | StandardQueryConfigHandler.ConfigurationKeys.PHRASE_SLOP Key used to set the default phrase slop
static ConfigurationKey<Collator> | StandardQueryConfigHandler.ConfigurationKeys.RANGE_COLLATOR Key used to set the Collator used when creating TermRangeQuerys.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.config.FieldConfig

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.config.FieldConfig

Packages that use FieldConfig
org.apache.lucene.queryParser.core.config | Contains the base classes used to configure the query processing
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration

Uses of FieldConfig in org.apache.lucene.queryParser.core.config

Methods in org.apache.lucene.queryParser.core.config that return FieldConfig
 FieldConfig QueryConfigHandler.getFieldConfig(CharSequence fieldName)
Deprecated. use QueryConfigHandler.getFieldConfig(String) instead
 FieldConfig QueryConfigHandler.getFieldConfig(String fieldName)
Returns an implementation of FieldConfig for a specific field name.

Methods in org.apache.lucene.queryParser.core.config with parameters of type FieldConfig
 void FieldConfigListener.buildFieldConfig(FieldConfig fieldConfig)
This method is called ever time a field configuration is requested.

Uses of FieldConfig in org.apache.lucene.queryParser.standard.config

Methods in org.apache.lucene.queryParser.standard.config with parameters of type FieldConfig
void | NumericFieldConfigListener.buildFieldConfig(FieldConfig fieldConfig)
void | FieldBoostMapFCListener.buildFieldConfig(FieldConfig fieldConfig)
void | FieldDateResolutionFCListener.buildFieldConfig(FieldConfig fieldConfig)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.core.config.FieldConfigListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.core.config.FieldConfigListener

Packages that use FieldConfigListener
org.apache.lucene.queryParser.core.config | Contains the base classes used to configure the query processing
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration

Uses of FieldConfigListener in org.apache.lucene.queryParser.core.config

Methods in org.apache.lucene.queryParser.core.config with parameters of type FieldConfigListener
 void QueryConfigHandler.addFieldConfigListener(FieldConfigListener listener)
Adds a listener.

Uses of FieldConfigListener in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement FieldConfigListener
class | FieldBoostMapFCListener This listener listens for every field configuration request and assign a StandardQueryConfigHandler.ConfigurationKeys.BOOST to the equivalent FieldConfig based on a defined map: fieldName -> boostValue stored in StandardQueryConfigHandler.ConfigurationKeys.FIELD_BOOST_MAP.
class | FieldDateResolutionFCListener This listener listens for every field configuration request and assign a DateResolutionAttribute to the equivalent FieldConfig based on a defined map: fieldName -> DateTools.Resolution stored in FieldDateResolutionMapAttribute in the DateResolutionAttribute.
class | NumericFieldConfigListener This listener is used to listen to FieldConfig requests in QueryConfigHandler and add StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG based on the StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG_MAP set in the QueryConfigHandler.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.config.QueryConfigHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.config.QueryConfigHandler

Packages that use QueryConfigHandler
org.apache.lucene.queryParser.core | Contains the core classes of the flexible query parser framework
org.apache.lucene.queryParser.core.processors | Interfaces and implementations used by query node processors
org.apache.lucene.queryParser.precedence.processors | This package contains the processors used by Precedence Query Parser
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration
org.apache.lucene.queryParser.standard.processors | Lucene Query Node Processors

Uses of QueryConfigHandler in org.apache.lucene.queryParser.core

Methods in org.apache.lucene.queryParser.core that return QueryConfigHandler
 QueryConfigHandler QueryParserHelper.getQueryConfigHandler()
Returns the query configuration handler, which is used during the query node tree processing.

Methods in org.apache.lucene.queryParser.core with parameters of type QueryConfigHandler
 void QueryParserHelper.setQueryConfigHandler(QueryConfigHandler config)
Sets the query configuration handler that will be used during query processing.

Constructors in org.apache.lucene.queryParser.core with parameters of type QueryConfigHandler
QueryParserHelper(QueryConfigHandler queryConfigHandler, SyntaxParser syntaxParser, QueryNodeProcessor processor, QueryBuilder builder)
Creates a query parser helper object using the specified configuration, text parser, processor and builder.

Uses of QueryConfigHandler in org.apache.lucene.queryParser.core.processors

Methods in org.apache.lucene.queryParser.core.processors that return QueryConfigHandler
 QueryConfigHandler QueryNodeProcessor.getQueryConfigHandler()
Returns the QueryConfigHandler associated to the query tree if any, otherwise it returns null
 QueryConfigHandler QueryNodeProcessorImpl.getQueryConfigHandler()
For reference about this method check: QueryNodeProcessor.getQueryConfigHandler().
 QueryConfigHandler QueryNodeProcessorPipeline.getQueryConfigHandler()
For reference about this method check: QueryNodeProcessor.getQueryConfigHandler().

Methods in org.apache.lucene.queryParser.core.processors with parameters of type QueryConfigHandler
 void QueryNodeProcessor.setQueryConfigHandler(QueryConfigHandler queryConfigHandler)
Sets the QueryConfigHandler associated to the query tree.
 void QueryNodeProcessorImpl.setQueryConfigHandler(QueryConfigHandler queryConfigHandler)
For reference about this method check: QueryNodeProcessor.setQueryConfigHandler(QueryConfigHandler).
 void QueryNodeProcessorPipeline.setQueryConfigHandler(QueryConfigHandler queryConfigHandler)
For reference about this method check: QueryNodeProcessor.setQueryConfigHandler(QueryConfigHandler).

Constructors in org.apache.lucene.queryParser.core.processors with parameters of type QueryConfigHandler
QueryNodeProcessorImpl(QueryConfigHandler queryConfigHandler)
QueryNodeProcessorPipeline(QueryConfigHandler queryConfigHandler)
Constructs with a QueryConfigHandler object.

Uses of QueryConfigHandler in org.apache.lucene.queryParser.precedence.processors

Constructors in org.apache.lucene.queryParser.precedence.processors with parameters of type QueryConfigHandler
PrecedenceQueryNodeProcessorPipeline(QueryConfigHandler queryConfig)

Uses of QueryConfigHandler in org.apache.lucene.queryParser.standard

Methods in org.apache.lucene.queryParser.standard that return QueryConfigHandler
 QueryConfigHandler QueryParserWrapper.getQueryConfigHandler()
Deprecated. Returns the query config handler used by this query parser

Uses of QueryConfigHandler in org.apache.lucene.queryParser.standard.config

Subclasses of QueryConfigHandler in org.apache.lucene.queryParser.standard.config
 class StandardQueryConfigHandler
This query configuration handler is used for almost every processor defined in the StandardQueryNodeProcessorPipeline processor pipeline.

Constructors in org.apache.lucene.queryParser.standard.config with parameters of type QueryConfigHandler
FieldBoostMapFCListener(QueryConfigHandler config)
FieldDateResolutionFCListener(QueryConfigHandler config)
NumericFieldConfigListener(QueryConfigHandler config)
Construcs a NumericFieldConfigListener object using the given QueryConfigHandler.

Uses of QueryConfigHandler in org.apache.lucene.queryParser.standard.processors

Methods in org.apache.lucene.queryParser.standard.processors that return QueryConfigHandler
 QueryConfigHandler GroupQueryNodeProcessor.getQueryConfigHandler()

Methods in org.apache.lucene.queryParser.standard.processors with parameters of type QueryConfigHandler
 void GroupQueryNodeProcessor.setQueryConfigHandler(QueryConfigHandler queryConfigHandler)

Constructors in org.apache.lucene.queryParser.standard.processors with parameters of type QueryConfigHandler
StandardQueryNodeProcessorPipeline(QueryConfigHandler queryConfig)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.queryParser.core.messages
Classes
QueryParserMessages


org.apache.lucene.queryParser.core.messages

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.core.messages

Contains messages usually used by query parser implementations

See:
Description

Class Summary
QueryParserMessages Flexible Query Parser message bundle class

Package org.apache.lucene.queryParser.core.messages Description

Contains messages usually used by query parser implementations

Query Parser Messages

Messages for the Flexible Query Parser, they use org.apache.lucene.messages.NLS API.


org.apache.lucene.queryParser.core.messages Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.core.messages

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.messages.NLS
      • org.apache.lucene.queryParser.core.messages.QueryParserMessages


Uses of Package org.apache.lucene.queryParser.core.messages

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.core.messages

No usage of org.apache.lucene.queryParser.core.messages

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


QueryParserMessages

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.messages
Class QueryParserMessages

java.lang.Object
    extended by  org.apache.lucene.messages.NLS
        extended by  org.apache.lucene.queryParser.core.messages.QueryParserMessages

public class QueryParserMessages
extends NLS

Flexible Query Parser message bundle class

Field Summary
static String | COULD_NOT_PARSE_NUMBER
static String | EMPTY_MESSAGE
static String | INVALID_SYNTAX
static String | INVALID_SYNTAX_CANNOT_PARSE
static String | INVALID_SYNTAX_ESCAPE_CHARACTER
static String | INVALID_SYNTAX_ESCAPE_NONE_HEX_UNICODE
static String | INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION
static String | INVALID_SYNTAX_FUZZY_LIMITS
static String | LEADING_WILDCARD_NOT_ALLOWED
static String | LUCENE_QUERY_CONVERSION_ERROR
static String | NODE_ACTION_NOT_SUPPORTED
static String | NUMBER_CLASS_NOT_SUPPORTED_BY_NUMERIC_RANGE_QUERY
static String | PARAMETER_VALUE_NOT_SUPPORTED
static String | TOO_MANY_BOOLEAN_CLAUSES
static String | UNSUPPORTED_NUMERIC_DATA_TYPE
static String | WILDCARD_NOT_SUPPORTED
Method Summary
Methods inherited from class org.apache.lucene.messages.NLS
getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, getLocalizedMessage, initializeMessages
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

INVALID_SYNTAX

public static String INVALID_SYNTAX

INVALID_SYNTAX_CANNOT_PARSE

public static String INVALID_SYNTAX_CANNOT_PARSE

INVALID_SYNTAX_FUZZY_LIMITS

public static String INVALID_SYNTAX_FUZZY_LIMITS

INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION

public static String INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION

INVALID_SYNTAX_ESCAPE_CHARACTER

public static String INVALID_SYNTAX_ESCAPE_CHARACTER

INVALID_SYNTAX_ESCAPE_NONE_HEX_UNICODE

public static String INVALID_SYNTAX_ESCAPE_NONE_HEX_UNICODE

NODE_ACTION_NOT_SUPPORTED

public static String NODE_ACTION_NOT_SUPPORTED

PARAMETER_VALUE_NOT_SUPPORTED

public static String PARAMETER_VALUE_NOT_SUPPORTED

LUCENE_QUERY_CONVERSION_ERROR

public static String LUCENE_QUERY_CONVERSION_ERROR

EMPTY_MESSAGE

public static String EMPTY_MESSAGE

WILDCARD_NOT_SUPPORTED

public static String WILDCARD_NOT_SUPPORTED

TOO_MANY_BOOLEAN_CLAUSES

public static String TOO_MANY_BOOLEAN_CLAUSES

LEADING_WILDCARD_NOT_ALLOWED

public static String LEADING_WILDCARD_NOT_ALLOWED

COULD_NOT_PARSE_NUMBER

public static String COULD_NOT_PARSE_NUMBER

NUMBER_CLASS_NOT_SUPPORTED_BY_NUMERIC_RANGE_QUERY

public static String NUMBER_CLASS_NOT_SUPPORTED_BY_NUMERIC_RANGE_QUERY

UNSUPPORTED_NUMERIC_DATA_TYPE

public static String UNSUPPORTED_NUMERIC_DATA_TYPE
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.queryParser.core.messages.QueryParserMessages

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.messages.QueryParserMessages

No usage of org.apache.lucene.queryParser.core.messages.QueryParserMessages

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AndQueryNode

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class AndQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.BooleanQueryNode
            extended by  org.apache.lucene.queryParser.core.nodes.AndQueryNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
Direct Known Subclasses:
AnyQueryNode
public class AndQueryNode
extends BooleanQueryNode

A AndQueryNode represents an AND boolean operation performed on a list of nodes.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
AndQueryNode(List<QueryNode> clauses)
Method Summary
CharSequence | toQueryString(EscapeQuerySyntax escapeSyntaxParser) convert to a query string understood by the query parser
String | toString() Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.BooleanQueryNode
cloneTree
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AndQueryNode

public AndQueryNode(List<QueryNode> clauses)
Parameters:
clauses - - the query nodes to be and'ed
Method Detail

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class BooleanQueryNode
See Also:
QueryNode.toString()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode
Overrides:
toQueryString in class BooleanQueryNode
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AnyQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class AnyQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.BooleanQueryNode
            extended by  org.apache.lucene.queryParser.core.nodes.AndQueryNode
                extended by  org.apache.lucene.queryParser.core.nodes.AnyQueryNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
public class AnyQueryNode
extends AndQueryNode

A AnyQueryNode represents an ANY operator performed on a list of nodes.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
AnyQueryNode(List<QueryNode> clauses, CharSequence field, int minimumMatchingElements)
Method Summary
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 CharSequence getField()
returns null if the field was not specified
 String getFieldAsString()
returns - null if the field was not specified
 int getMinimumMatchingElements()
 void setField(CharSequence field)
 CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AnyQueryNode

public AnyQueryNode(List<QueryNode> clauses,
                    CharSequence field,
                    int minimumMatchingElements)
Parameters:
clauses - - the query nodes to be or'ed
Method Detail

getMinimumMatchingElements

public int getMinimumMatchingElements()

getField

public CharSequence getField()
returns null if the field was not specified

Returns:
the field

getFieldAsString

public String getFieldAsString()
returns - null if the field was not specified

Returns:
the field as a String

setField

public void setField(CharSequence field)
Parameters:
field - - the field to set

cloneTree

public QueryNode cloneTree()
                    throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class BooleanQueryNode
Returns:
the cloned tree
Throws:
CloneNotSupportedException

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class AndQueryNode
See Also:
QueryNode.toString()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode
Overrides:
toQueryString in class AndQueryNode
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BooleanQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class BooleanQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.BooleanQueryNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
Direct Known Subclasses:
AndQueryNode, OrQueryNode, ProximityQueryNode, StandardBooleanQueryNode
public class BooleanQueryNode
extends QueryNodeImpl

A BooleanQueryNode represents a list of elements which do not have an explicit boolean operator defined between them. It can be used to express a boolean query that intends to use the default boolean operator.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
BooleanQueryNode(List<QueryNode> clauses)
Method Summary
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BooleanQueryNode

public BooleanQueryNode(List<QueryNode> clauses)
Parameters:
clauses - - the query nodes to be and'ed
Method Detail

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

cloneTree

public QueryNode cloneTree()
                    throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class QueryNodeImpl
Returns:
the cloned tree
Throws:
CloneNotSupportedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BoostQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class BoostQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.BoostQueryNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
public class BoostQueryNode
extends QueryNodeImpl

A BoostQueryNode boosts the QueryNode tree which is under this node. So, it must only and always have one child. The boost value may vary from 0.0 to 1.0.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
BoostQueryNode(QueryNode query, float value)
Constructs a boost node
Method Summary
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 QueryNode getChild()
Returns the single child which this node boosts.
 float getValue()
Returns the boost value.
 CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BoostQueryNode

public BoostQueryNode(QueryNode query,
                      float value)
               throws QueryNodeException
Constructs a boost node

Parameters:
query - the query to be boosted
value - the boost value, it may vary from 0.0 to 1.0
Throws:
QueryNodeException
Method Detail

getChild

public QueryNode getChild()
Returns the single child which this node boosts.

Returns:
the single child which this node boosts

getValue

public float getValue()
Returns the boost value. It may vary from 0.0 to 1.0.

Returns:
the boost value

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

cloneTree

public QueryNode cloneTree()
                    throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class QueryNodeImpl
Returns:
the cloned tree
Throws:
CloneNotSupportedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DeletedQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class DeletedQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.DeletedQueryNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
Direct Known Subclasses:
MatchNoDocsQueryNode, NoTokenFoundQueryNode
public class DeletedQueryNode
extends QueryNodeImpl

A DeletedQueryNode represents a node that was deleted from the query node tree. It can be removed from the tree using the RemoveDeletedQueryNodesProcessor processor.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
DeletedQueryNode()
Method Summary
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 CharSequence toQueryString(EscapeQuerySyntax escaper)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DeletedQueryNode

public DeletedQueryNode()
Method Detail

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escaper)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()

cloneTree

public QueryNode cloneTree()
                    throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class QueryNodeImpl
Returns:
the cloned tree
Throws:
CloneNotSupportedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldableNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Interface FieldableNode

All Superinterfaces:
QueryNode, Serializable
All Known Subinterfaces:
FieldValuePairQueryNode<T>, RangeQueryNode<T>
All Known Implementing Classes:
AbstractRangeQueryNode, FieldQueryNode, FuzzyQueryNode, MultiPhraseQueryNode, NumericQueryNode, NumericRangeQueryNode, ParametricQueryNode, ParametricRangeQueryNode, PhraseSlopQueryNode, PrefixWildcardQueryNode, QuotedFieldQueryNode, RangeQueryNode, SlopQueryNode, TermRangeQueryNode, TokenizedPhraseQueryNode, WildcardQueryNode
public interface FieldableNode
extends QueryNode

A query node implements FieldableNode interface to indicate that its children and itself are associated to a specific field. If it has any children which also implements this interface, it must ensure the children are associated to the same field.

Method Summary
CharSequence | getField() Returns the field associated to the node and every node under it.
void | setField(CharSequence fieldName) Associates the node to a field.
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, toQueryString, toString, unsetTag, unsetTag

Method Detail

getField

CharSequence getField()
Returns the field associated to the node and every node under it.

Returns:
the field name

setField

void setField(CharSequence fieldName)
Associates the node to a field.

Parameters:
fieldName - the field name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class FieldQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.FieldQueryNode
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, FieldValuePairQueryNode<CharSequence>, QueryNode, TextableQueryNode, ValueQueryNode<CharSequence>
Direct Known Subclasses:
FuzzyQueryNode, ParametricQueryNode, QuotedFieldQueryNode, WildcardQueryNode
public class FieldQueryNode
extends QueryNodeImpl
implements FieldValuePairQueryNode<CharSequence>, TextableQueryNode

A FieldQueryNode represents a element that contains field/text tuple

See Also:
Serialized Form

Field Summary
protected int | begin The term's begin position.
protected int | end The term's end position.
protected CharSequence | field The term's field
protected int | positionIncrement The term's position increment.
protected CharSequence | text The term's text.
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
FieldQueryNode(CharSequence field, CharSequence text, int begin, int end)
Method Summary
 FieldQueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 int getBegin()
 int getEnd()
 CharSequence getField()
Returns the field associated to the node and every node under it.
 String getFieldAsString()
returns null if the field was not specified in the query string
 int getPositionIncrement()
protected  CharSequence getTermEscaped(EscapeQuerySyntax escaper)
protected  CharSequence getTermEscapeQuoted(EscapeQuerySyntax escaper)
 CharSequence getText()
Returns the term.
 String getTextAsString()
 CharSequence getValue()
 void setBegin(int begin)
 void setEnd(int end)
 void setField(CharSequence field)
Associates the node to a field.
 void setPositionIncrement(int pi)
 void setText(CharSequence text)
 void setValue(CharSequence value)
 CharSequence toQueryString(EscapeQuerySyntax escaper)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag

Field Detail

field

protected CharSequence field
The term's field

text

protected CharSequence text
The term's text.

begin

protected int begin
The term's begin position.

end

protected int end
The term's end position.

positionIncrement

protected int positionIncrement
The term's position increment.

Constructor Detail

FieldQueryNode

public FieldQueryNode(CharSequence field,
                      CharSequence text,
                      int begin,
                      int end)
Parameters:
field - - field name
text - - value
begin - - position in the query string
end - - position in the query string
Method Detail

getTermEscaped

protected CharSequence getTermEscaped(EscapeQuerySyntax escaper)

getTermEscapeQuoted

protected CharSequence getTermEscapeQuoted(EscapeQuerySyntax escaper)

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escaper)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()

getTextAsString

public String getTextAsString()
Returns:
the term

getFieldAsString

public String getFieldAsString()
returns null if the field was not specified in the query string

Returns:
the field

getBegin

public int getBegin()

setBegin

public void setBegin(int begin)

getEnd

public int getEnd()

setEnd

public void setEnd(int end)

getField

public CharSequence getField()
Description copied from interface: FieldableNode
Returns the field associated to the node and every node under it.

Specified by:
getField in interface FieldableNode
Returns:
the field name

setField

public void setField(CharSequence field)
Description copied from interface: FieldableNode
Associates the node to a field.

Specified by:
setField in interface FieldableNode
Parameters:
field - the field name

getPositionIncrement

public int getPositionIncrement()

setPositionIncrement

public void setPositionIncrement(int pi)

getText

public CharSequence getText()
Returns the term.

Specified by:
getText in interface TextableQueryNode
Returns:
The "original" form of the term.

setText

public void setText(CharSequence text)
Specified by:
setText in interface TextableQueryNode
Parameters:
text - the text to set

cloneTree

public FieldQueryNode cloneTree()
                         throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class QueryNodeImpl
Returns:
the cloned tree
Throws:
CloneNotSupportedException

getValue

public CharSequence getValue()
Specified by:
getValue in interface ValueQueryNode<CharSequence>

setValue

public void setValue(CharSequence value)
Specified by:
setValue in interface ValueQueryNode<CharSequence>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldValuePairQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Interface FieldValuePairQueryNode<T>

All Superinterfaces:
FieldableNode, QueryNode, Serializable, ValueQueryNode<T>
All Known Implementing Classes:
FieldQueryNode, FuzzyQueryNode, NumericQueryNode, ParametricQueryNode, PrefixWildcardQueryNode, QuotedFieldQueryNode, WildcardQueryNode
public interface FieldValuePairQueryNode<T>
extends FieldableNode, ValueQueryNode<T>

This interface should be implemented by QueryNode that holds a field and an arbitrary value.

See Also:
FieldableNode, ValueQueryNode

Method Summary
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.FieldableNode
getField, setField
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, toQueryString, toString, unsetTag, unsetTag
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.ValueQueryNode
getValue, setValue
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, toQueryString, toString, unsetTag, unsetTag

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FuzzyQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class FuzzyQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.FieldQueryNode
            extended by  org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, FieldValuePairQueryNode<CharSequence>, QueryNode, TextableQueryNode, ValueQueryNode<CharSequence>
public class FuzzyQueryNode
extends FieldQueryNode

A FuzzyQueryNode represents a element that contains field/text/similarity tuple

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
begin, end, field, positionIncrement, text
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
FuzzyQueryNode(CharSequence field, CharSequence term, float minSimilarity, int begin, int end)
Method Summary
 FuzzyQueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 int getPrefixLength()
 float getSimilarity()
 void setPrefixLength(int prefixLength)
 void setSimilarity(float similarity)
 CharSequence toQueryString(EscapeQuerySyntax escaper)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
getBegin, getEnd, getField, getFieldAsString, getPositionIncrement, getTermEscaped, getTermEscapeQuoted, getText, getTextAsString, getValue, setBegin, setEnd, setField, setPositionIncrement, setText, setValue
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag

Constructor Detail

FuzzyQueryNode

public FuzzyQueryNode(CharSequence field,
                      CharSequence term,
                      float minSimilarity,
                      int begin,
                      int end)
Parameters:
field - - Field name
term - - Value
minSimilarity - - similarity value
begin - - position in the query string
end - - position in the query string
Method Detail

setPrefixLength

public void setPrefixLength(int prefixLength)

getPrefixLength

public int getPrefixLength()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escaper)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode
Overrides:
toQueryString in class FieldQueryNode

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class FieldQueryNode
See Also:
QueryNode.toString()

setSimilarity

public void setSimilarity(float similarity)

cloneTree

public FuzzyQueryNode cloneTree()
                         throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class FieldQueryNode
Returns:
the cloned tree
Throws:
CloneNotSupportedException

getSimilarity

public float getSimilarity()
Returns:
the similarity
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GroupQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class GroupQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.GroupQueryNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
public class GroupQueryNode
extends QueryNodeImpl

A GroupQueryNode represents a location where the original user typed real parenthesis on the query string. This class is useful for queries like: a) a AND b OR c b) ( a AND b) OR c Parenthesis might be used to define the boolean operation precedence.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
GroupQueryNode(QueryNode query)
This QueryNode is used to identify parenthesis on the original query string
Method Summary
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 QueryNode getChild()
 void setChild(QueryNode child)
 CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

GroupQueryNode

public GroupQueryNode(QueryNode query)
This QueryNode is used to identify parenthesis on the original query string

Method Detail

getChild

public QueryNode getChild()

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

cloneTree

public QueryNode cloneTree()
                    throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class QueryNodeImpl
Returns:
the cloned tree
Throws:
CloneNotSupportedException

setChild

public void setChild(QueryNode child)
Parameters:
child -
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MatchAllDocsQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class MatchAllDocsQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.MatchAllDocsQueryNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
public class MatchAllDocsQueryNode
extends QueryNodeImpl

A MatchAllDocsQueryNode indicates that a query node tree or subtree will match all documents if executed in the index.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
MatchAllDocsQueryNode()
Method Summary
 MatchAllDocsQueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MatchAllDocsQueryNode

public MatchAllDocsQueryNode()
Method Detail

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

cloneTree

public MatchAllDocsQueryNode cloneTree()
                                throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class QueryNodeImpl
Returns:
the cloned tree
Throws:
CloneNotSupportedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MatchNoDocsQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class MatchNoDocsQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.DeletedQueryNode
            extended by  org.apache.lucene.queryParser.core.nodes.MatchNoDocsQueryNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
public class MatchNoDocsQueryNode
extends DeletedQueryNode

A MatchNoDocsQueryNode indicates that a query node tree or subtree will not match any documents if executed in the index.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
MatchNoDocsQueryNode()
Method Summary
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.DeletedQueryNode
cloneTree, toQueryString
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MatchNoDocsQueryNode

public MatchNoDocsQueryNode()
Method Detail

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class DeletedQueryNode
See Also:
QueryNode.toString()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ModifierQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class ModifierQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.ModifierQueryNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
Direct Known Subclasses:
BooleanModifierNode
public class ModifierQueryNode
extends QueryNodeImpl

A ModifierQueryNode indicates the modifier value (+,-,?,NONE) for each term on the query string. For example "+t1 -t2 t3" will have a tree of:

<BooleanQueryNode> <ModifierQueryNode modifier="MOD_REQ"> <t1/> </ModifierQueryNode> <ModifierQueryNode modifier="MOD_NOT"> <t2/> </ModifierQueryNode> <t3/> </BooleanQueryNode>

See Also:
Serialized Form

Nested Class Summary
static class ModifierQueryNode.Modifier
Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
ModifierQueryNode(QueryNode query, ModifierQueryNode.Modifier mod)
Used to store the modifier value on the original query string
Method Summary
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 QueryNode getChild()
 ModifierQueryNode.Modifier getModifier()
 void setChild(QueryNode child)
 CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ModifierQueryNode

public ModifierQueryNode(QueryNode query,
                         ModifierQueryNode.Modifier mod)
Used to store the modifier value on the original query string

Parameters:
query - - QueryNode subtree
mod - - Modifier Value
Method Detail

getChild

public QueryNode getChild()

getModifier

public ModifierQueryNode.Modifier getModifier()

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

cloneTree

public QueryNode cloneTree()
                    throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class QueryNodeImpl
Returns:
the cloned tree
Throws:
CloneNotSupportedException

setChild

public void setChild(QueryNode child)
Parameters:
child -
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ModifierQueryNode.Modifier

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.queryParser.core.nodes
Enum ModifierQueryNode.Modifier

java.lang.Object
    extended by  java.lang.Enum<ModifierQueryNode.Modifier>
        extended by  org.apache.lucene.queryParser.core.nodes.ModifierQueryNode.Modifier
All Implemented Interfaces:
Serializable, Comparable<ModifierQueryNode.Modifier>
Enclosing class:
ModifierQueryNode
public static enum ModifierQueryNode.Modifier
extends Enum<ModifierQueryNode.Modifier>

Enum Constant Summary
MOD_NONE
MOD_NOT
MOD_REQ
Method Summary
String | toDigitString()
String | toLargeString()
String | toString()
static ModifierQueryNode.Modifier | valueOf(String name) Returns the enum constant of this type with the specified name.
static ModifierQueryNode.Modifier[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

MOD_NONE

public static final ModifierQueryNode.Modifier MOD_NONE

MOD_NOT

public static final ModifierQueryNode.Modifier MOD_NOT

MOD_REQ

public static final ModifierQueryNode.Modifier MOD_REQ
Method Detail

values

public static final ModifierQueryNode.Modifier[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(ModifierQueryNode.Modifier c : ModifierQueryNode.Modifier.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static ModifierQueryNode.Modifier valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

toString

public String toString()
Overrides:
toString in class Enum<ModifierQueryNode.Modifier>

toDigitString

public String toDigitString()

toLargeString

public String toLargeString()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


NoTokenFoundQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class NoTokenFoundQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.DeletedQueryNode
            extended by  org.apache.lucene.queryParser.core.nodes.NoTokenFoundQueryNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
public class NoTokenFoundQueryNode
extends DeletedQueryNode

A NoTokenFoundQueryNode is used if a term is convert into no tokens by the tokenizer/lemmatizer/analyzer (null).

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
NoTokenFoundQueryNode()
Method Summary
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 CharSequence toQueryString(EscapeQuerySyntax escaper)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoTokenFoundQueryNode

public NoTokenFoundQueryNode()
Method Detail

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escaper)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode
Overrides:
toQueryString in class DeletedQueryNode

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class DeletedQueryNode
See Also:
QueryNode.toString()

cloneTree

public QueryNode cloneTree()
                    throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class DeletedQueryNode
Returns:
the cloned tree
Throws:
CloneNotSupportedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OpaqueQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class OpaqueQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
public class OpaqueQueryNode
extends QueryNodeImpl

A OpaqueQueryNode is used for specify values that are not supposed to be parsed by the parser. For example: and XPATH query in the middle of a query string a b @xpath:'/bookstore/book[1]/title' c d

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
OpaqueQueryNode(CharSequence schema, CharSequence value)
Method Summary
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 CharSequence getSchema()
 CharSequence getValue()
 CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

OpaqueQueryNode

public OpaqueQueryNode(CharSequence schema,
                       CharSequence value)
Parameters:
schema - - schema identifier
value - - value that was not parsed
Method Detail

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

cloneTree

public QueryNode cloneTree()
                    throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class QueryNodeImpl
Returns:
the cloned tree
Throws:
CloneNotSupportedException

getSchema

public CharSequence getSchema()
Returns:
the schema

getValue

public CharSequence getValue()
Returns:
the value
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OrQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class OrQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.BooleanQueryNode
            extended by  org.apache.lucene.queryParser.core.nodes.OrQueryNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
public class OrQueryNode
extends BooleanQueryNode

A OrQueryNode represents an OR boolean operation performed on a list of nodes.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
OrQueryNode(List<QueryNode> clauses)
Method Summary
CharSequence | toQueryString(EscapeQuerySyntax escapeSyntaxParser) convert to a query string understood by the query parser
String | toString() Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.BooleanQueryNode
cloneTree
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

OrQueryNode

public OrQueryNode(List<QueryNode> clauses)
Parameters:
clauses - - the query nodes to be or'ed
Method Detail

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class BooleanQueryNode
See Also:
QueryNode.toString()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode
Overrides:
toQueryString in class BooleanQueryNode
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.core.nodes
Interfaces
FieldableNode
FieldValuePairQueryNode
QueryNode
RangeQueryNode
TextableQueryNode
ValueQueryNode
Classes
AndQueryNode
AnyQueryNode
BooleanQueryNode
BoostQueryNode
DeletedQueryNode
FieldQueryNode
FuzzyQueryNode
GroupQueryNode
MatchAllDocsQueryNode
MatchNoDocsQueryNode
ModifierQueryNode
NoTokenFoundQueryNode
OpaqueQueryNode
OrQueryNode
ParametricQueryNode
ParametricRangeQueryNode
PathQueryNode
PathQueryNode.QueryText
PhraseSlopQueryNode
ProximityQueryNode
ProximityQueryNode.ProximityType
QueryNodeImpl
QuotedFieldQueryNode
SlopQueryNode
TokenizedPhraseQueryNode
Enums
ModifierQueryNode.Modifier
ParametricQueryNode.CompareOperator
ProximityQueryNode.Type


org.apache.lucene.queryParser.core.nodes

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.core.nodes

Contains query nodes that are commonly used by query parser implementations

See:
Description

Interface Summary
FieldableNode | A query node implements FieldableNode interface to indicate that its children and itself are associated to a specific field.
FieldValuePairQueryNode<T> | This interface should be implemented by QueryNode that holds a field and an arbitrary value.
QueryNode | A QueryNode is a interface implemented by all nodes on a QueryNode tree.
RangeQueryNode<T extends FieldValuePairQueryNode<?>> | This interface should be implemented by a QueryNode that represents some kind of range query.
TextableQueryNode |
ValueQueryNode<T> | This interface should be implemented by a QueryNode that holds an arbitrary value.

Class Summary
AndQueryNode | A AndQueryNode represents an AND boolean operation performed on a list of nodes.
AnyQueryNode | A AnyQueryNode represents an ANY operator performed on a list of nodes.
BooleanQueryNode | A BooleanQueryNode represents a list of elements which do not have an explicit boolean operator defined between them.
BoostQueryNode | A BoostQueryNode boosts the QueryNode tree which is under this node.
DeletedQueryNode | A DeletedQueryNode represents a node that was deleted from the query node tree.
FieldQueryNode | A FieldQueryNode represents a element that contains field/text tuple
FuzzyQueryNode | A FuzzyQueryNode represents a element that contains field/text/similarity tuple
GroupQueryNode | A GroupQueryNode represents a location where the original user typed real parenthesis on the query string.
MatchAllDocsQueryNode | A MatchAllDocsQueryNode indicates that a query node tree or subtree will match all documents if executed in the index.
MatchNoDocsQueryNode | A MatchNoDocsQueryNode indicates that a query node tree or subtree will not match any documents if executed in the index.
ModifierQueryNode | A ModifierQueryNode indicates the modifier value (+,-,?,NONE) for each term on the query string.
NoTokenFoundQueryNode | A NoTokenFoundQueryNode is used if a term is convert into no tokens by the tokenizer/lemmatizer/analyzer (null).
OpaqueQueryNode | A OpaqueQueryNode is used for specify values that are not supposed to be parsed by the parser.
OrQueryNode | A OrQueryNode represents an OR boolean operation performed on a list of nodes.
ParametricQueryNode | Deprecated. this class will be removed in future.
ParametricRangeQueryNode | A ParametricRangeQueryNode represents LE, LT, GE, GT, EQ, NE query.
PathQueryNode | A PathQueryNode is used to store queries like /company/USA/California /product/shoes/brown.
PathQueryNode.QueryText |
PhraseSlopQueryNode |
ProximityQueryNode | A ProximityQueryNode represents a query where the terms should meet specific distance conditions.
ProximityQueryNode.ProximityType |
QueryNodeImpl | A QueryNodeImpl is the default implementation of the interface QueryNode
QuotedFieldQueryNode | A QuotedFieldQueryNode represents phrase query.
SlopQueryNode | A SlopQueryNode represents phrase query with a slop.
TokenizedPhraseQueryNode | A TokenizedPhraseQueryNode represents a node created by a code that tokenizes/lemmatizes/analyzes.

Enum Summary
ModifierQueryNode.Modifier
ParametricQueryNode.CompareOperator
ProximityQueryNode.Type

Package org.apache.lucene.queryParser.core.nodes Description

Contains query nodes that are commonly used by query parser implementations

Query Nodes

The package org.apache.lucene.queryParser.nodes contains all the basic query nodes. The interface that represents a query node is QueryNode. Every query node must be serializable.

QueryNodes are used by the text parser to create a syntax tree. These nodes are designed to be used by UI or other text parsers. The default Lucene text parser is StandardSyntaxParser, it implements Lucene's standard syntax.

QueryNode interface should be implemented by all query nodes, the class QueryNodeImpl implements QueryNode and is extended by all current query node implementations.

A query node tree can be printed to the a stream, and it generates a pseudo XML representation with all the nodes.

A query node tree can also generate a query string that can be parsed back by the original text parser, at this point only the standard lucene syntax is supported.

Grouping nodes:

  • AndQueryNode - used for AND operator
  • AnyQueryNode - used for ANY operator
  • OrQueryNode - used for OR operator
  • BooleanQueryNode - used when no operator is specified
  • ModifierQueryNode - used for modifier operator
  • GroupQueryNode - used for parenthesis
  • BoostQueryNode - used for boost operator
  • SlopQueryNode - phrase slop
  • FuzzyQueryNode - fuzzy node
  • ParametricRangeQueryNode - used for parametric field:[low_value TO high_value]
  • ProximityQueryNode - used for proximity search
  • NumericRangeQueryNode - used for numeric range search
  • TokenizedPhraseQueryNode - used by tokenizers/lemmatizers/analyzers for phrases/autophrases

Leaf Nodes:

  • FieldQueryNode - field/value node
  • NumericQueryNode - used for numeric search
  • PathQueryNode - QueryNode object used with path-like queries
  • OpaqueQueryNode - Used as for part of the query that can be parsed by other parsers. schema/value
  • ParametricQueryNode - used for parametric field [>=|<=|=|<|>] value
  • PrefixWildcardQueryNode - non-phrase wildcard query
  • QuotedFieldQUeryNode - regular phrase node
  • WildcardQueryNode - non-phrase wildcard query

Utility Nodes:

  • DeletedQueryNode - used by processors on optimizations
  • MatchAllDocsQueryNode - used by processors on optimizations
  • MatchNoDocsQueryNode - used by processors on optimizations
  • NoTokenFoundQueryNode - used by tokenizers/lemmatizers/analyzers


org.apache.lucene.queryParser.core.nodes Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.core.nodes

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.core.nodes.PathQueryNode.QueryText (implements java.lang.Cloneable)
    • org.apache.lucene.queryParser.core.nodes.ProximityQueryNode.ProximityType
    • org.apache.lucene.queryParser.core.nodes.QueryNodeImpl (implements java.lang.Cloneable, org.apache.lucene.queryParser.core.nodes.QueryNode)
      • org.apache.lucene.queryParser.core.nodes.BooleanQueryNode
        • org.apache.lucene.queryParser.core.nodes.AndQueryNode
          • org.apache.lucene.queryParser.core.nodes.AnyQueryNode
        • org.apache.lucene.queryParser.core.nodes.OrQueryNode
        • org.apache.lucene.queryParser.core.nodes.ProximityQueryNode
      • org.apache.lucene.queryParser.core.nodes.BoostQueryNode
      • org.apache.lucene.queryParser.core.nodes.DeletedQueryNode
        • org.apache.lucene.queryParser.core.nodes.MatchNoDocsQueryNode
        • org.apache.lucene.queryParser.core.nodes.NoTokenFoundQueryNode
      • org.apache.lucene.queryParser.core.nodes.FieldQueryNode (implements org.apache.lucene.queryParser.core.nodes.FieldValuePairQueryNode<T>, org.apache.lucene.queryParser.core.nodes.TextableQueryNode)
        • org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode
        • org.apache.lucene.queryParser.core.nodes.ParametricQueryNode
        • org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode
      • org.apache.lucene.queryParser.core.nodes.GroupQueryNode
      • org.apache.lucene.queryParser.core.nodes.MatchAllDocsQueryNode
      • org.apache.lucene.queryParser.core.nodes.ModifierQueryNode
      • org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode
      • org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode (implements org.apache.lucene.queryParser.core.nodes.RangeQueryNode<T>)
      • org.apache.lucene.queryParser.core.nodes.PathQueryNode
      • org.apache.lucene.queryParser.core.nodes.PhraseSlopQueryNode (implements org.apache.lucene.queryParser.core.nodes.FieldableNode)
      • org.apache.lucene.queryParser.core.nodes.SlopQueryNode (implements org.apache.lucene.queryParser.core.nodes.FieldableNode)
      • org.apache.lucene.queryParser.core.nodes.TokenizedPhraseQueryNode (implements org.apache.lucene.queryParser.core.nodes.FieldableNode)

Interface Hierarchy

  • java.io.Serializable
    • org.apache.lucene.queryParser.core.nodes.QueryNode
      • org.apache.lucene.queryParser.core.nodes.FieldableNode
        • org.apache.lucene.queryParser.core.nodes.FieldValuePairQueryNode<T> (also extends org.apache.lucene.queryParser.core.nodes.ValueQueryNode<T>)
        • org.apache.lucene.queryParser.core.nodes.RangeQueryNode<T>
      • org.apache.lucene.queryParser.core.nodes.ValueQueryNode<T>
        • org.apache.lucene.queryParser.core.nodes.FieldValuePairQueryNode<T> (also extends org.apache.lucene.queryParser.core.nodes.FieldableNode)
  • org.apache.lucene.queryParser.core.nodes.TextableQueryNode

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.queryParser.core.nodes.ParametricQueryNode.CompareOperator
      • org.apache.lucene.queryParser.core.nodes.ProximityQueryNode.Type
      • org.apache.lucene.queryParser.core.nodes.ModifierQueryNode.Modifier


Uses of Package org.apache.lucene.queryParser.core.nodes

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.core.nodes

Packages that use org.apache.lucene.queryParser.core.nodes
org.apache.lucene.queryParser.core.builders | Contains the necessary classes to implement query builders
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.core.parser | Contains the necessary interfaces to implement text parsers
org.apache.lucene.queryParser.core.processors | Interfaces and implementations used by query node processors
org.apache.lucene.queryParser.core.util | Utility classes to used with the Query Parser
org.apache.lucene.queryParser.precedence.processors | This package contains the processors used by Precedence Query Parser
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes
org.apache.lucene.queryParser.standard.parser | Lucene Query Parser
org.apache.lucene.queryParser.standard.processors | Lucene Query Node Processors

Classes in org.apache.lucene.queryParser.core.nodes used by org.apache.lucene.queryParser.core.builders
QueryNode
A QueryNode is a interface implemented by all nodes on a QueryNode tree.

Classes in org.apache.lucene.queryParser.core.nodes used by org.apache.lucene.queryParser.core.nodes
AndQueryNode
A AndQueryNode represents an AND boolean operation performed on a list of nodes.
BooleanQueryNode
A BooleanQueryNode represents a list of elements which do not have an explicit boolean operator defined between them.
DeletedQueryNode
A DeletedQueryNode represents a node that was deleted from the query node tree.
FieldableNode
A query node implements FieldableNode interface to indicate that its children and itself are associated to a specific field.
FieldQueryNode
A FieldQueryNode represents a element that contains field/text tuple
FieldValuePairQueryNode
This interface should be implemented by QueryNode that holds a field and an arbitrary value.
FuzzyQueryNode
A FuzzyQueryNode represents a element that contains field/text/similarity tuple
MatchAllDocsQueryNode
A MatchAllDocsQueryNode indicates that a query node tree or subtree will match all documents if executed in the index.
ModifierQueryNode.Modifier
ParametricQueryNode
Deprecated. this class will be removed in future. FieldQueryNode should be used instead.
ParametricQueryNode.CompareOperator
Deprecated.
ParametricRangeQueryNode
A ParametricRangeQueryNode represents LE, LT, GE, GT, EQ, NE query.
PathQueryNode.QueryText
ProximityQueryNode.Type
QueryNode
A QueryNode is a interface implemented by all nodes on a QueryNode tree.
QueryNodeImpl
A QueryNodeImpl is the default implementation of the interface QueryNode
QuotedFieldQueryNode
A QuotedFieldQueryNode represents phrase query.
RangeQueryNode
This interface should be implemented by a QueryNode that represents some kind of range query.
TextableQueryNode
ValueQueryNode
This interface should be implemented by a QueryNode that holds an arbitrary value.

Classes in org.apache.lucene.queryParser.core.nodes used by org.apache.lucene.queryParser.core.parser
QueryNode
A QueryNode is a interface implemented by all nodes on a QueryNode tree.

Classes in org.apache.lucene.queryParser.core.nodes used by org.apache.lucene.queryParser.core.processors
QueryNode
A QueryNode is a interface implemented by all nodes on a QueryNode tree.

Classes in org.apache.lucene.queryParser.core.nodes used by org.apache.lucene.queryParser.core.util
QueryNode
A QueryNode is a interface implemented by all nodes on a QueryNode tree.

Classes in org.apache.lucene.queryParser.core.nodes used by org.apache.lucene.queryParser.precedence.processors
QueryNode
A QueryNode is a interface implemented by all nodes on a QueryNode tree.

Classes in org.apache.lucene.queryParser.core.nodes used by org.apache.lucene.queryParser.standard.builders
QueryNode
A QueryNode is a interface implemented by all nodes on a QueryNode tree.

Classes in org.apache.lucene.queryParser.core.nodes used by org.apache.lucene.queryParser.standard.nodes
BooleanQueryNode
A BooleanQueryNode represents a list of elements which do not have an explicit boolean operator defined between them.
FieldableNode
A query node implements FieldableNode interface to indicate that its children and itself are associated to a specific field.
FieldQueryNode
A FieldQueryNode represents a element that contains field/text tuple
FieldValuePairQueryNode
This interface should be implemented by QueryNode that holds a field and an arbitrary value.
ModifierQueryNode
A ModifierQueryNode indicates the modifier value (+,-,?,NONE) for each term on the query string.
ModifierQueryNode.Modifier
ParametricQueryNode
Deprecated. this class will be removed in future. FieldQueryNode should be used instead.
QueryNode
A QueryNode is a interface implemented by all nodes on a QueryNode tree.
QueryNodeImpl
A QueryNodeImpl is the default implementation of the interface QueryNode
RangeQueryNode
This interface should be implemented by a QueryNode that represents some kind of range query.
TextableQueryNode
ValueQueryNode
This interface should be implemented by a QueryNode that holds an arbitrary value.

Classes in org.apache.lucene.queryParser.core.nodes used by org.apache.lucene.queryParser.standard.parser
ModifierQueryNode.Modifier
QueryNode
A QueryNode is a interface implemented by all nodes on a QueryNode tree.

Classes in org.apache.lucene.queryParser.core.nodes used by org.apache.lucene.queryParser.standard.processors
QueryNode
A QueryNode is a interface implemented by all nodes on a QueryNode tree.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ParametricQueryNode.CompareOperator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.queryParser.core.nodes
Enum ParametricQueryNode.CompareOperator

java.lang.Object
    extended by  java.lang.Enum<ParametricQueryNode.CompareOperator>
        extended by  org.apache.lucene.queryParser.core.nodes.ParametricQueryNode.CompareOperator
All Implemented Interfaces:
Serializable, Comparable<ParametricQueryNode.CompareOperator>
Enclosing class:
ParametricQueryNode
public static enum ParametricQueryNode.CompareOperator
extends Enum<ParametricQueryNode.CompareOperator>

Enum Constant Summary
EQ
GE
GT
LE
LT
NE
Method Summary
static ParametricQueryNode.CompareOperator | valueOf(String name) Returns the enum constant of this type with the specified name.
static ParametricQueryNode.CompareOperator[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

LE

public static final ParametricQueryNode.CompareOperator LE

LT

public static final ParametricQueryNode.CompareOperator LT

GE

public static final ParametricQueryNode.CompareOperator GE

GT

public static final ParametricQueryNode.CompareOperator GT

EQ

public static final ParametricQueryNode.CompareOperator EQ

NE

public static final ParametricQueryNode.CompareOperator NE
Method Detail

values

public static final ParametricQueryNode.CompareOperator[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(ParametricQueryNode.CompareOperator c : ParametricQueryNode.CompareOperator.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static ParametricQueryNode.CompareOperator valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


ParametricQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class ParametricQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.FieldQueryNode
            extended by  org.apache.lucene.queryParser.core.nodes.ParametricQueryNode
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, FieldValuePairQueryNode<CharSequence>, QueryNode, TextableQueryNode, ValueQueryNode<CharSequence>
Deprecated. this class will be removed in future. FieldQueryNode should be used instead.

@Deprecated
public class ParametricQueryNode
extends FieldQueryNode

A ParametricQueryNode represents LE, LT, GE, GT, EQ, NE query. Example: date >= "2009-10-10" OR price = 200

See Also:
Serialized Form

Nested Class Summary
static class ParametricQueryNode.CompareOperator
Deprecated.
Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
begin, end, field, positionIncrement, text
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
ParametricQueryNode(CharSequence field, ParametricQueryNode.CompareOperator comp, CharSequence value, int begin, int end)
Deprecated.
Method Summary
 ParametricQueryNode cloneTree()
Deprecated. Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 CharSequence getOperand()
Deprecated.
 ParametricQueryNode.CompareOperator getOperator()
Deprecated.
 CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Deprecated. convert to a query string understood by the query parser
 String toString()
Deprecated. Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
getBegin, getEnd, getField, getFieldAsString, getPositionIncrement, getTermEscaped, getTermEscapeQuoted, getText, getTextAsString, getValue, setBegin, setEnd, setField, setPositionIncrement, setText, setValue
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag

Constructor Detail

ParametricQueryNode

public ParametricQueryNode(CharSequence field,
                           ParametricQueryNode.CompareOperator comp,
                           CharSequence value,
                           int begin,
                           int end)
Deprecated.
Parameters:
field - - field name
comp - - CompareOperator
value - - text value
begin - - position in the query string
end - - position in the query string
Method Detail

getOperand

public CharSequence getOperand()
Deprecated.

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Deprecated.
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode
Overrides:
toQueryString in class FieldQueryNode

toString

public String toString()
Deprecated.
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class FieldQueryNode
See Also:
QueryNode.toString()

cloneTree

public ParametricQueryNode cloneTree()
                              throws CloneNotSupportedException
Deprecated.
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class FieldQueryNode
Returns:
the cloned tree
Throws:
CloneNotSupportedException

getOperator

public ParametricQueryNode.CompareOperator getOperator()
Deprecated.
Returns:
the operator
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ParametricRangeQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class ParametricRangeQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, QueryNode, RangeQueryNode<ParametricQueryNode>
public class ParametricRangeQueryNode
extends QueryNodeImpl
implements RangeQueryNode<ParametricQueryNode>

A ParametricRangeQueryNode represents LE, LT, GE, GT, EQ, NE query. Example: date >= "2009-10-10" OR price = 200

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
ParametricRangeQueryNode(ParametricQueryNode lowerBound, ParametricQueryNode upperBound)
Method Summary
 ParametricRangeQueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 CharSequence getField()
Returns the field associated to the node and every node under it.
 ParametricQueryNode getLowerBound()
 ParametricQueryNode getUpperBound()
 boolean isLowerInclusive()
 boolean isUpperInclusive()
 void setField(CharSequence fieldName)
Associates the node to a field.
 CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag

Constructor Detail

ParametricRangeQueryNode

public ParametricRangeQueryNode(ParametricQueryNode lowerBound,
                                ParametricQueryNode upperBound)
Method Detail

getUpperBound

public ParametricQueryNode getUpperBound()
Specified by:
getUpperBound in interface RangeQueryNode<ParametricQueryNode>

getLowerBound

public ParametricQueryNode getLowerBound()
Specified by:
getLowerBound in interface RangeQueryNode<ParametricQueryNode>

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode

getField

public CharSequence getField()
Description copied from interface: FieldableNode
Returns the field associated to the node and every node under it.

Specified by:
getField in interface FieldableNode
Returns:
the field name

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()

cloneTree

public ParametricRangeQueryNode cloneTree()
                                   throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class QueryNodeImpl
Returns:
the cloned tree
Throws:
CloneNotSupportedException

setField

public void setField(CharSequence fieldName)
Description copied from interface: FieldableNode
Associates the node to a field.

Specified by:
setField in interface FieldableNode
Parameters:
fieldName - the field name

isLowerInclusive

public boolean isLowerInclusive()
Specified by:
isLowerInclusive in interface RangeQueryNode<ParametricQueryNode>

isUpperInclusive

public boolean isUpperInclusive()
Specified by:
isUpperInclusive in interface RangeQueryNode<ParametricQueryNode>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PathQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class PathQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.PathQueryNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
public class PathQueryNode
extends QueryNodeImpl

A PathQueryNode is used to store queries like /company/USA/California /product/shoes/brown. QueryText are objects that contain the text, begin position and end position in the query.

Example how the text parser creates these objects:

 List values = ArrayList();
 values.add(new PathQueryNode.QueryText("company", 1, 7));
 values.add(new PathQueryNode.QueryText("USA", 9, 12));
 values.add(new PathQueryNode.QueryText("California", 14, 23));
 QueryNode q = new PathQueryNode(values);

See Also:
Serialized Form

Nested Class Summary
static class PathQueryNode.QueryText
Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
PathQueryNode(List<PathQueryNode.QueryText> pathElements)
Method Summary
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 CharSequence getFirstPathElement()
Returns the CharSequence value of a specific QueryText element
 PathQueryNode.QueryText getPathElement(int index)
Returns the a specific QueryText element
 List<PathQueryNode.QueryText> getPathElements()
Returns the a List with all QueryText elements
 List<PathQueryNode.QueryText> getPathElements(int startIndex)
Returns a List QueryText element from position startIndex
 void setPathElements(List<PathQueryNode.QueryText> elements)
Returns the a List with all QueryText elements
 CharSequence toQueryString(EscapeQuerySyntax escaper)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PathQueryNode

public PathQueryNode(List<PathQueryNode.QueryText> pathElements)
Parameters:
pathElements - - List of QueryText objects
Method Detail

getPathElements

public List<PathQueryNode.QueryText> getPathElements()
Returns the a List with all QueryText elements

Returns:
QueryText List size

setPathElements

public void setPathElements(List<PathQueryNode.QueryText> elements)
Returns the a List with all QueryText elements

getPathElement

public PathQueryNode.QueryText getPathElement(int index)
Returns the a specific QueryText element

Returns:
QueryText List size

getFirstPathElement

public CharSequence getFirstPathElement()
Returns the CharSequence value of a specific QueryText element

Returns:
the CharSequence for a specific QueryText element

getPathElements

public List<PathQueryNode.QueryText> getPathElements(int startIndex)
Returns a List QueryText element from position startIndex

Returns:
a List QueryText element from position startIndex

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escaper)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()

cloneTree

public QueryNode cloneTree()
                    throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class QueryNodeImpl
Returns:
the cloned tree
Throws:
CloneNotSupportedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PathQueryNode.QueryText

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class PathQueryNode.QueryText

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.PathQueryNode.QueryText
All Implemented Interfaces:
Cloneable
Enclosing class:
PathQueryNode
public static class PathQueryNode.QueryText
extends Object
implements Cloneable

Constructor Summary
PathQueryNode.QueryText(CharSequence value, int begin, int end)
Method Summary
PathQueryNode.QueryText | clone()
int | getBegin()
int | getEnd()
CharSequence | getValue()
String | toString()
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PathQueryNode.QueryText

public PathQueryNode.QueryText(CharSequence value,
                               int begin,
                               int end)
Parameters:
value - - text value
begin - - position in the query string
end - - position in the query string
Method Detail

clone

public PathQueryNode.QueryText clone()
                              throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

getValue

public CharSequence getValue()
Returns:
the value

getBegin

public int getBegin()
Returns:
the begin

getEnd

public int getEnd()
Returns:
the end

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PhraseSlopQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class PhraseSlopQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.PhraseSlopQueryNode
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, QueryNode
public class PhraseSlopQueryNode
extends QueryNodeImpl
implements FieldableNode

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
PhraseSlopQueryNode(QueryNode query, int value)
Method Summary
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 QueryNode getChild()
 CharSequence getField()
Returns the field associated to the node and every node under it.
 int getValue()
 void setField(CharSequence fieldName)
Associates the node to a field.
 CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag

Constructor Detail

PhraseSlopQueryNode

public PhraseSlopQueryNode(QueryNode query,
                           int value)
                    throws QueryNodeException
Throws:
QueryNodeException
QueryNodeParseException
QueryNodeParseException - throw in overridden method to disallow
Method Detail

getChild

public QueryNode getChild()

getValue

public int getValue()

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode

cloneTree

public QueryNode cloneTree()
                    throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class QueryNodeImpl
Returns:
the cloned tree
Throws:
CloneNotSupportedException

getField

public CharSequence getField()
Description copied from interface: FieldableNode
Returns the field associated to the node and every node under it.

Specified by:
getField in interface FieldableNode
Returns:
the field name

setField

public void setField(CharSequence fieldName)
Description copied from interface: FieldableNode
Associates the node to a field.

Specified by:
setField in interface FieldableNode
Parameters:
fieldName - the field name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ProximityQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class ProximityQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.BooleanQueryNode
            extended by  org.apache.lucene.queryParser.core.nodes.ProximityQueryNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
public class ProximityQueryNode
extends BooleanQueryNode

A ProximityQueryNode represents a query where the terms should meet specific distance conditions. (a b c) WITHIN [SENTENCE|PARAGRAPH|NUMBER] [INORDER] ("a" "b" "c") WITHIN [SENTENCE|PARAGRAPH|NUMBER] [INORDER] TODO: Add this to the future standard Lucene parser/processor/builder

See Also:
Serialized Form

Nested Class Summary
static class | ProximityQueryNode.ProximityType
static class | ProximityQueryNode.Type
Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
ProximityQueryNode(List<QueryNode> clauses, CharSequence field, ProximityQueryNode.Type type, boolean inorder)
ProximityQueryNode(List<QueryNode> clauses, CharSequence field, ProximityQueryNode.Type type, int distance, boolean inorder)
Method Summary
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 int getDistance()
 CharSequence getField()
returns null if the field was not specified in the query string
 String getFieldAsString()
returns null if the field was not specified in the query string
 ProximityQueryNode.Type getProximityType()
 boolean isInOrder()
 void setField(CharSequence field)
 CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ProximityQueryNode

public ProximityQueryNode(List<QueryNode> clauses,
                          CharSequence field,
                          ProximityQueryNode.Type type,
                          int distance,
                          boolean inorder)
Parameters:
clauses - - QueryNode children
field - - field name
type - - type of proximity query
distance - - positive integer that specifies the distance
inorder - - true, if the tokens should be matched in the order of the clauses

ProximityQueryNode

public ProximityQueryNode(List<QueryNode> clauses,
                          CharSequence field,
                          ProximityQueryNode.Type type,
                          boolean inorder)
Parameters:
clauses - - QueryNode children
field - - field name
type - - type of proximity query
inorder - - true, if the tokens should be matched in the order of the clauses
Method Detail

getProximityType

public ProximityQueryNode.Type getProximityType()

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class BooleanQueryNode
See Also:
QueryNode.toString()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode
Overrides:
toQueryString in class BooleanQueryNode

cloneTree

public QueryNode cloneTree()
                    throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class BooleanQueryNode
Returns:
the cloned tree
Throws:
CloneNotSupportedException

getDistance

public int getDistance()
Returns:
the distance

getField

public CharSequence getField()
returns null if the field was not specified in the query string

Returns:
the field

getFieldAsString

public String getFieldAsString()
returns null if the field was not specified in the query string

Returns:
the field

setField

public void setField(CharSequence field)
Parameters:
field - the field to set

isInOrder

public boolean isInOrder()
Returns:
terms must be matched in the specified order
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ProximityQueryNode.ProximityType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class ProximityQueryNode.ProximityType

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.ProximityQueryNode.ProximityType
Enclosing class:
ProximityQueryNode
public static class ProximityQueryNode.ProximityType
extends Object

Constructor Summary
ProximityQueryNode.ProximityType(ProximityQueryNode.Type type)
ProximityQueryNode.ProximityType(ProximityQueryNode.Type type, int distance)
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ProximityQueryNode.ProximityType

public ProximityQueryNode.ProximityType(ProximityQueryNode.Type type)

ProximityQueryNode.ProximityType

public ProximityQueryNode.ProximityType(ProximityQueryNode.Type type,
                                        int distance)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ProximityQueryNode.Type

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.queryParser.core.nodes
Enum ProximityQueryNode.Type

java.lang.Object
    extended by  java.lang.Enum<ProximityQueryNode.Type>
        extended by  org.apache.lucene.queryParser.core.nodes.ProximityQueryNode.Type
All Implemented Interfaces:
Serializable, Comparable<ProximityQueryNode.Type>
Enclosing class:
ProximityQueryNode
public static enum ProximityQueryNode.Type
extends Enum<ProximityQueryNode.Type>

Enum Constant Summary
NUMBER
PARAGRAPH
SENTENCE
Method Summary
static ProximityQueryNode.Type | valueOf(String name) Returns the enum constant of this type with the specified name.
static ProximityQueryNode.Type[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

PARAGRAPH

public static final ProximityQueryNode.Type PARAGRAPH

SENTENCE

public static final ProximityQueryNode.Type SENTENCE

NUMBER

public static final ProximityQueryNode.Type NUMBER
Method Detail

values

public static final ProximityQueryNode.Type[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(ProximityQueryNode.Type c : ProximityQueryNode.Type.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static ProximityQueryNode.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


QueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Interface QueryNode

All Superinterfaces:
Serializable
All Known Subinterfaces:
FieldableNode, FieldValuePairQueryNode<T>, RangeQueryNode<T>, ValueQueryNode<T>
All Known Implementing Classes:
AbstractRangeQueryNode, AndQueryNode, AnyQueryNode, BooleanModifierNode, BooleanQueryNode, BoostQueryNode, DeletedQueryNode, FieldQueryNode, FuzzyQueryNode, GroupQueryNode, MatchAllDocsQueryNode, MatchNoDocsQueryNode, ModifierQueryNode, MultiPhraseQueryNode, NoTokenFoundQueryNode, NumericQueryNode, NumericRangeQueryNode, OpaqueQueryNode, OrQueryNode, ParametricQueryNode, ParametricRangeQueryNode, PathQueryNode, PhraseSlopQueryNode, PrefixWildcardQueryNode, ProximityQueryNode, QueryNodeImpl, QuotedFieldQueryNode, RangeQueryNode, SlopQueryNode, StandardBooleanQueryNode, TermRangeQueryNode, TokenizedPhraseQueryNode, WildcardQueryNode
public interface QueryNode
extends Serializable

A QueryNode is a interface implemented by all nodes on a QueryNode tree.

Method Summary
 void add(List<QueryNode> children)
 void add(QueryNode child)
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 boolean containsTag(CharSequence tagName)
Deprecated. use containsTag(String) instead
 boolean containsTag(String tagName)
verify if a node contains a tag
 List<QueryNode> getChildren()
get Children nodes
 QueryNode getParent()
 Object getTag(CharSequence tagName)
Deprecated. use getTag(String) instead
 Object getTag(String tagName)
 Map<String,Object> getTagMap()
Returns a map containing all tags attached to this query node.
 Map<CharSequence,Object> getTags()
Deprecated. use getTagMap()
 boolean isLeaf()
verify if a node is a Leaf node
 void set(List<QueryNode> children)
 void setTag(CharSequence tagName, Object value)
Deprecated. use setTag(String, Object) instead
 void setTag(String tagName, Object value)
Associate the specified value with the specified tagName.
 CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
 String toString()
for printing
 void unsetTag(CharSequence tagName)
Deprecated. use unsetTag(String) instead
 void unsetTag(String tagName)
Unset a tag.

Method Detail

toQueryString

CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser

toString

String toString()
for printing

Overrides:
toString in class Object

getChildren

List<QueryNode> getChildren()
get Children nodes

isLeaf

boolean isLeaf()
verify if a node is a Leaf node

containsTag

boolean containsTag(String tagName)
verify if a node contains a tag

containsTag

@Deprecated
boolean containsTag(CharSequence tagName)
Deprecated. use containsTag(String) instead

verify if a node contains a tag

getTag

Object getTag(String tagName)
Parameters:
tagName -
Returns:
of stored on under that tag name

getTag

@Deprecated
Object getTag(CharSequence tagName)
Deprecated. use getTag(String) instead

Parameters:
tagName -
Returns:
of stored on under that tag name

getParent

QueryNode getParent()

cloneTree

QueryNode cloneTree()
                    throws CloneNotSupportedException
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Returns:
the cloned tree
Throws:
CloneNotSupportedException

add

void add(QueryNode child)

add

void add(List<QueryNode> children)

set

void set(List<QueryNode> children)

setTag

void setTag(String tagName,
            Object value)
Associate the specified value with the specified tagName. If the tagName already exists, the old value is replaced. The tagName and value cannot be null. tagName will be converted to lowercase.

Parameters:
tagName -
value -

setTag

@Deprecated
void setTag(CharSequence tagName,
                       Object value)
Deprecated. use setTag(String, Object) instead

Associate the specified value with the specified tagName. If the tagName already exists, the old value is replaced. The tagName and value cannot be null. tagName will be converted to lowercase.

Parameters:
tagName -
value -

unsetTag

void unsetTag(String tagName)
Unset a tag. tagName will be converted to lowercase.

Parameters:
tagName -

unsetTag

@Deprecated
void unsetTag(CharSequence tagName)
Deprecated. use unsetTag(String) instead

Unset a tag. tagName will be converted to lowercase.

Parameters:
tagName -

getTags

@Deprecated
Map<CharSequence,Object> getTags()
Deprecated. use getTagMap()

Returns a map containing all tags attached to this query node.

Returns:
a map containing all tags attached to this query node

getTagMap

Map<String,Object> getTagMap()
Returns a map containing all tags attached to this query node.

Returns:
a map containing all tags attached to this query node
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryNodeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class QueryNodeImpl

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
Direct Known Subclasses:
AbstractRangeQueryNode, BooleanQueryNode, BoostQueryNode, DeletedQueryNode, FieldQueryNode, GroupQueryNode, MatchAllDocsQueryNode, ModifierQueryNode, MultiPhraseQueryNode, NumericQueryNode, OpaqueQueryNode, ParametricRangeQueryNode, PathQueryNode, PhraseSlopQueryNode, SlopQueryNode, TokenizedPhraseQueryNode
public abstract class QueryNodeImpl
extends Object
implements QueryNode, Cloneable

A QueryNodeImpl is the default implementation of the interface QueryNode

See Also:
Serialized Form

Field Summary
static String | PLAINTEXT_FIELD_NAME
protected boolean | toQueryStringIgnoreFields If set to true the the method toQueryString will not write field names
Constructor Summary
QueryNodeImpl()
Method Summary
 void add(List<QueryNode> children)
 void add(QueryNode child)
protected  void allocate()
 Object clone()
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 boolean containsTag(CharSequence tagName)
Deprecated. use containsTag(String) instead
 boolean containsTag(String tagName)
verify if a node contains a tag
 List<QueryNode> getChildren()
get Children nodes
 QueryNode getParent()
 Object getTag(CharSequence tagName)
Deprecated. use getTag(String) instead
 Object getTag(String tagName)
 Map<String,Object> getTagMap()
Returns a map containing all tags attached to this query node.
 Map<CharSequence,Object> getTags()
Deprecated. use getTagMap() instead
protected  boolean isDefaultField(CharSequence fld)
This method is use toQueryString to detect if fld is the default field
 boolean isLeaf()
verify if a node is a Leaf node
protected  boolean isRoot()
 void set(List<QueryNode> children)
protected  void setLeaf(boolean isLeaf)
 void setTag(CharSequence tagName, Object value)
Deprecated. use setTag(String, Object) instead
 void setTag(String tagName, Object value)
Associate the specified value with the specified tagName.
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
 void unsetTag(CharSequence tagName)
Deprecated. use unsetTag(String)
 void unsetTag(String tagName)
Unset a tag.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
toQueryString

Field Detail

PLAINTEXT_FIELD_NAME

public static final String PLAINTEXT_FIELD_NAME
See Also:
Constant Field Values

toQueryStringIgnoreFields

protected boolean toQueryStringIgnoreFields
If set to true the the method toQueryString will not write field names

Constructor Detail

QueryNodeImpl

public QueryNodeImpl()
Method Detail

allocate

protected void allocate()

add

public final void add(QueryNode child)
Specified by:
add in interface QueryNode

add

public final void add(List<QueryNode> children)
Specified by:
add in interface QueryNode

isLeaf

public boolean isLeaf()
Description copied from interface: QueryNode
verify if a node is a Leaf node

Specified by:
isLeaf in interface QueryNode

set

public final void set(List<QueryNode> children)
Specified by:
set in interface QueryNode

cloneTree

public QueryNode cloneTree()
                    throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Returns:
the cloned tree
Throws:
CloneNotSupportedException

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

setLeaf

protected void setLeaf(boolean isLeaf)

getChildren

public final List<QueryNode> getChildren()
Description copied from interface: QueryNode
get Children nodes

Specified by:
getChildren in interface QueryNode
Returns:
a List for QueryNode object. Returns null, for nodes that do not contain children. All leaf Nodes return null.

setTag

@Deprecated
public void setTag(CharSequence tagName,
                              Object value)
Deprecated. use setTag(String, Object) instead

Description copied from interface: QueryNode
Associate the specified value with the specified tagName. If the tagName already exists, the old value is replaced. The tagName and value cannot be null. tagName will be converted to lowercase.

Specified by:
setTag in interface QueryNode

setTag

public void setTag(String tagName,
                   Object value)
Description copied from interface: QueryNode
Associate the specified value with the specified tagName. If the tagName already exists, the old value is replaced. The tagName and value cannot be null. tagName will be converted to lowercase.

Specified by:
setTag in interface QueryNode

unsetTag

public void unsetTag(String tagName)
Description copied from interface: QueryNode
Unset a tag. tagName will be converted to lowercase.

Specified by:
unsetTag in interface QueryNode

unsetTag

@Deprecated
public void unsetTag(CharSequence tagName)
Deprecated. use unsetTag(String)

Description copied from interface: QueryNode
Unset a tag. tagName will be converted to lowercase.

Specified by:
unsetTag in interface QueryNode

containsTag

@Deprecated
public boolean containsTag(CharSequence tagName)
Deprecated. use containsTag(String) instead

verify if a node contains a tag

Specified by:
containsTag in interface QueryNode

containsTag

public boolean containsTag(String tagName)
verify if a node contains a tag

Specified by:
containsTag in interface QueryNode

getTag

@Deprecated
public Object getTag(CharSequence tagName)
Deprecated. use getTag(String) instead

Specified by:
getTag in interface QueryNode
Returns:
of stored on under that tag name

getTag

public Object getTag(String tagName)
Specified by:
getTag in interface QueryNode
Returns:
of stored on under that tag name

getParent

public QueryNode getParent()
Specified by:
getParent in interface QueryNode

isRoot

protected boolean isRoot()

isDefaultField

protected boolean isDefaultField(CharSequence fld)
This method is use toQueryString to detect if fld is the default field

Parameters:
fld - - field name
Returns:
true if fld is the default field

toString

public String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class Object
See Also:
QueryNode.toString()

getTags

@Deprecated
public Map<CharSequence,Object> getTags()
Deprecated. use getTagMap() instead

Description copied from interface: QueryNode
Returns a map containing all tags attached to this query node.

Specified by:
getTags in interface QueryNode
Returns:
a Map with all tags for this QueryNode
See Also:
QueryNode.getTag(String)

getTagMap

public Map<String,Object> getTagMap()
Returns a map containing all tags attached to this query node.

Specified by:
getTagMap in interface QueryNode
Returns:
a map containing all tags attached to this query node
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QuotedFieldQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class QuotedFieldQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.FieldQueryNode
            extended by  org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, FieldValuePairQueryNode<CharSequence>, QueryNode, TextableQueryNode, ValueQueryNode<CharSequence>
public class QuotedFieldQueryNode
extends FieldQueryNode

A QuotedFieldQueryNode represents phrase query. Example: "life is great"

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
begin, end, field, positionIncrement, text
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
QuotedFieldQueryNode(CharSequence field, CharSequence text, int begin, int end)
Method Summary
 QuotedFieldQueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 CharSequence toQueryString(EscapeQuerySyntax escaper)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
getBegin, getEnd, getField, getFieldAsString, getPositionIncrement, getTermEscaped, getTermEscapeQuoted, getText, getTextAsString, getValue, setBegin, setEnd, setField, setPositionIncrement, setText, setValue
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag

Constructor Detail

QuotedFieldQueryNode

public QuotedFieldQueryNode(CharSequence field,
                            CharSequence text,
                            int begin,
                            int end)
Parameters:
field - - field name
text - - value
begin - - position in the query string
end - - position in the query string
Method Detail

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escaper)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode
Overrides:
toQueryString in class FieldQueryNode

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class FieldQueryNode
See Also:
QueryNode.toString()

cloneTree

public QuotedFieldQueryNode cloneTree()
                               throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class FieldQueryNode
Returns:
the cloned tree
Throws:
CloneNotSupportedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RangeQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Interface RangeQueryNode<T extends FieldValuePairQueryNode<?>>

All Superinterfaces:
FieldableNode, QueryNode, Serializable
All Known Implementing Classes:
AbstractRangeQueryNode, NumericRangeQueryNode, ParametricRangeQueryNode, RangeQueryNode, TermRangeQueryNode
public interface RangeQueryNode<T extends FieldValuePairQueryNode<?>>
extends FieldableNode

This interface should be implemented by a QueryNode that represents some kind of range query.

Method Summary
T | getLowerBound()
T | getUpperBound()
boolean | isLowerInclusive()
boolean | isUpperInclusive()
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.FieldableNode
getField, setField
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, toQueryString, toString, unsetTag, unsetTag

Method Detail

getLowerBound

T getLowerBound()

getUpperBound

T getUpperBound()

isLowerInclusive

boolean isLowerInclusive()

isUpperInclusive

boolean isUpperInclusive()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SlopQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class SlopQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.SlopQueryNode
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, QueryNode
public class SlopQueryNode
extends QueryNodeImpl
implements FieldableNode

A SlopQueryNode represents phrase query with a slop. From Lucene FAQ: Is there a way to use a proximity operator (like near or within) with Lucene? There is a variable called slop that allows you to perform NEAR/WITHIN-like queries. By default, slop is set to 0 so that only exact phrases will match. When using TextParser you can use this syntax to specify the slop: "doug cutting"~2 will find documents that contain "doug cutting" as well as ones that contain "cutting doug".

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
SlopQueryNode(QueryNode query, int value)
Method Summary
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 QueryNode getChild()
 CharSequence getField()
Returns the field associated to the node and every node under it.
 int getValue()
 void setField(CharSequence fieldName)
Associates the node to a field.
 CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag

Constructor Detail

SlopQueryNode

public SlopQueryNode(QueryNode query,
                     int value)
Parameters:
query - - QueryNode Tree with the phrase
value - - slop value
Method Detail

getChild

public QueryNode getChild()

getValue

public int getValue()

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode

cloneTree

public QueryNode cloneTree()
                    throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class QueryNodeImpl
Returns:
the cloned tree
Throws:
CloneNotSupportedException

getField

public CharSequence getField()
Description copied from interface: FieldableNode
Returns the field associated to the node and every node under it.

Specified by:
getField in interface FieldableNode
Returns:
the field name

setField

public void setField(CharSequence fieldName)
Description copied from interface: FieldableNode
Associates the node to a field.

Specified by:
setField in interface FieldableNode
Parameters:
fieldName - the field name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TextableQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Interface TextableQueryNode

All Known Implementing Classes:
FieldQueryNode, FuzzyQueryNode, ParametricQueryNode, PrefixWildcardQueryNode, QuotedFieldQueryNode, WildcardQueryNode
public interface TextableQueryNode

Method Summary
CharSequence | getText()
void | setText(CharSequence text)

Method Detail

getText

CharSequence getText()

setText

void setText(CharSequence text)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TokenizedPhraseQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Class TokenizedPhraseQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.TokenizedPhraseQueryNode
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, QueryNode
public class TokenizedPhraseQueryNode
extends QueryNodeImpl
implements FieldableNode

A TokenizedPhraseQueryNode represents a node created by a code that tokenizes/lemmatizes/analyzes.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
TokenizedPhraseQueryNode()
Method Summary
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 CharSequence getField()
Returns the field associated to the node and every node under it.
 void setField(CharSequence fieldName)
Associates the node to a field.
 CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag

Constructor Detail

TokenizedPhraseQueryNode

public TokenizedPhraseQueryNode()
Method Detail

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode

cloneTree

public QueryNode cloneTree()
                    throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class QueryNodeImpl
Returns:
the cloned tree
Throws:
CloneNotSupportedException

getField

public CharSequence getField()
Description copied from interface: FieldableNode
Returns the field associated to the node and every node under it.

Specified by:
getField in interface FieldableNode
Returns:
the field name

setField

public void setField(CharSequence fieldName)
Description copied from interface: FieldableNode
Associates the node to a field.

Specified by:
setField in interface FieldableNode
Parameters:
fieldName - the field name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ValueQueryNode

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.nodes
Interface ValueQueryNode<T>

All Superinterfaces:
QueryNode, Serializable
All Known Subinterfaces:
FieldValuePairQueryNode<T>
All Known Implementing Classes:
FieldQueryNode, FuzzyQueryNode, NumericQueryNode, ParametricQueryNode, PrefixWildcardQueryNode, QuotedFieldQueryNode, WildcardQueryNode
public interface ValueQueryNode<T>
extends QueryNode

This interface should be implemented by a QueryNode that holds an arbitrary value.

Method Summary
T | getValue()
void | setValue(T value)
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, toQueryString, toString, unsetTag, unsetTag

Method Detail

setValue

void setValue(T value)

getValue

T getValue()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.queryParser.core.nodes.AndQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.AndQueryNode

Packages that use AndQueryNode
org.apache.lucene.queryParser.core.nodes Contains query nodes that are commonly used by query parser implementations

Uses of AndQueryNode in org.apache.lucene.queryParser.core.nodes

Subclasses of AndQueryNode in org.apache.lucene.queryParser.core.nodes
 class AnyQueryNode
A AnyQueryNode represents an ANY operator performed on a list of nodes.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.AnyQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.AnyQueryNode

No usage of org.apache.lucene.queryParser.core.nodes.AnyQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.BooleanQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.BooleanQueryNode

Packages that use BooleanQueryNode
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes

Uses of BooleanQueryNode in org.apache.lucene.queryParser.core.nodes

Subclasses of BooleanQueryNode in org.apache.lucene.queryParser.core.nodes
class | AndQueryNode A AndQueryNode represents an AND boolean operation performed on a list of nodes.
class | AnyQueryNode A AnyQueryNode represents an ANY operator performed on a list of nodes.
class | OrQueryNode A OrQueryNode represents an OR boolean operation performed on a list of nodes.
class | ProximityQueryNode A ProximityQueryNode represents a query where the terms should meet specific distance conditions.

Uses of BooleanQueryNode in org.apache.lucene.queryParser.standard.nodes

Subclasses of BooleanQueryNode in org.apache.lucene.queryParser.standard.nodes
 class StandardBooleanQueryNode
A StandardBooleanQueryNode has the same behavior as BooleanQueryNode.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.BoostQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.BoostQueryNode

No usage of org.apache.lucene.queryParser.core.nodes.BoostQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.DeletedQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.DeletedQueryNode

Packages that use DeletedQueryNode
org.apache.lucene.queryParser.core.nodes Contains query nodes that are commonly used by query parser implementations

Uses of DeletedQueryNode in org.apache.lucene.queryParser.core.nodes

Subclasses of DeletedQueryNode in org.apache.lucene.queryParser.core.nodes
class | MatchNoDocsQueryNode A MatchNoDocsQueryNode indicates that a query node tree or subtree will not match any documents if executed in the index.
class | NoTokenFoundQueryNode A NoTokenFoundQueryNode is used if a term is convert into no tokens by the tokenizer/lemmatizer/analyzer (null).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.core.nodes.FieldableNode

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.core.nodes.FieldableNode

Packages that use FieldableNode
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes

Uses of FieldableNode in org.apache.lucene.queryParser.core.nodes

Subinterfaces of FieldableNode in org.apache.lucene.queryParser.core.nodes
interface | FieldValuePairQueryNode<T> This interface should be implemented by QueryNode that holds a field and an arbitrary value.
interface | RangeQueryNode<T extends FieldValuePairQueryNode<?>> This interface should be implemented by a QueryNode that represents some kind of range query.

Classes in org.apache.lucene.queryParser.core.nodes that implement FieldableNode
class | FieldQueryNode A FieldQueryNode represents a element that contains field/text tuple
class | FuzzyQueryNode A FuzzyQueryNode represents a element that contains field/text/similarity tuple
class | ParametricQueryNode Deprecated. this class will be removed in future. FieldQueryNode should be used instead.
class | ParametricRangeQueryNode A ParametricRangeQueryNode represents LE, LT, GE, GT, EQ, NE query.
class | PhraseSlopQueryNode
class | QuotedFieldQueryNode A QuotedFieldQueryNode represents phrase query.
class | SlopQueryNode A SlopQueryNode represents phrase query with a slop.
class | TokenizedPhraseQueryNode A TokenizedPhraseQueryNode represents a node created by a code that tokenizes/lemmatizes/analyzes.

Uses of FieldableNode in org.apache.lucene.queryParser.standard.nodes

Classes in org.apache.lucene.queryParser.standard.nodes that implement FieldableNode
class | AbstractRangeQueryNode<T extends FieldValuePairQueryNode<?>> This class should be extended by nodes intending to represent range queries.
class | MultiPhraseQueryNode A MultiPhraseQueryNode indicates that its children should be used to build a MultiPhraseQuery instead of PhraseQuery.
class | NumericQueryNode This query node represents a field query that holds a numeric value.
class | NumericRangeQueryNode This query node represents a range query composed by NumericQueryNode bounds, which means the bound values are Numbers.
class | PrefixWildcardQueryNode A PrefixWildcardQueryNode represents wildcardquery that matches abc* or *.
class | RangeQueryNode Deprecated. this class will be removed in future, TermRangeQueryNode should be used instead
class | TermRangeQueryNode This query node represents a range query composed by FieldQueryNode bounds, which means the bound values are strings.
class | WildcardQueryNode A WildcardQueryNode represents wildcard query This does not apply to phrases.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.FieldQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.FieldQueryNode

Packages that use FieldQueryNode
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes

Uses of FieldQueryNode in org.apache.lucene.queryParser.core.nodes

Subclasses of FieldQueryNode in org.apache.lucene.queryParser.core.nodes
class | FuzzyQueryNode A FuzzyQueryNode represents a element that contains field/text/similarity tuple
class | ParametricQueryNode Deprecated. this class will be removed in future. FieldQueryNode should be used instead.
class | QuotedFieldQueryNode A QuotedFieldQueryNode represents phrase query.

Methods in org.apache.lucene.queryParser.core.nodes that return FieldQueryNode
 FieldQueryNode FieldQueryNode.cloneTree()

Uses of FieldQueryNode in org.apache.lucene.queryParser.standard.nodes

Subclasses of FieldQueryNode in org.apache.lucene.queryParser.standard.nodes
class | PrefixWildcardQueryNode A PrefixWildcardQueryNode represents wildcardquery that matches abc* or *.
class | WildcardQueryNode A WildcardQueryNode represents wildcard query This does not apply to phrases.

Methods in org.apache.lucene.queryParser.standard.nodes with parameters of type FieldQueryNode
 void RangeQueryNode.setBounds(FieldQueryNode lower, FieldQueryNode upper, boolean lowerInclusive, boolean upperInclusive)
Deprecated. Sets lower and upper bounds.

Constructors in org.apache.lucene.queryParser.standard.nodes with parameters of type FieldQueryNode
PrefixWildcardQueryNode(FieldQueryNode fqn)
TermRangeQueryNode(FieldQueryNode lower, FieldQueryNode upper, boolean lowerInclusive, boolean upperInclusive)
Constructs a TermRangeQueryNode object using the given FieldQueryNode as its bounds.
WildcardQueryNode(FieldQueryNode fqn)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.core.nodes.FieldValuePairQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.core.nodes.FieldValuePairQueryNode

Packages that use FieldValuePairQueryNode
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes

Uses of FieldValuePairQueryNode in org.apache.lucene.queryParser.core.nodes

Classes in org.apache.lucene.queryParser.core.nodes with type parameters of type FieldValuePairQueryNode
 interface RangeQueryNode<T extends FieldValuePairQueryNode<?>>
This interface should be implemented by a QueryNode that represents some kind of range query.

Classes in org.apache.lucene.queryParser.core.nodes that implement FieldValuePairQueryNode
class | FieldQueryNode A FieldQueryNode represents a element that contains field/text tuple
class | FuzzyQueryNode A FuzzyQueryNode represents a element that contains field/text/similarity tuple
class | ParametricQueryNode Deprecated. this class will be removed in future. FieldQueryNode should be used instead.
class | QuotedFieldQueryNode A QuotedFieldQueryNode represents phrase query.

Uses of FieldValuePairQueryNode in org.apache.lucene.queryParser.standard.nodes

Classes in org.apache.lucene.queryParser.standard.nodes with type parameters of type FieldValuePairQueryNode
 class AbstractRangeQueryNode<T extends FieldValuePairQueryNode<?>>
This class should be extended by nodes intending to represent range queries.

Classes in org.apache.lucene.queryParser.standard.nodes that implement FieldValuePairQueryNode
class | NumericQueryNode This query node represents a field query that holds a numeric value.
class | PrefixWildcardQueryNode A PrefixWildcardQueryNode represents wildcardquery that matches abc* or *.
class | WildcardQueryNode A WildcardQueryNode represents wildcard query This does not apply to phrases.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.FuzzyQueryNode

Packages that use FuzzyQueryNode
org.apache.lucene.queryParser.core.nodes Contains query nodes that are commonly used by query parser implementations

Uses of FuzzyQueryNode in org.apache.lucene.queryParser.core.nodes

Methods in org.apache.lucene.queryParser.core.nodes that return FuzzyQueryNode
 FuzzyQueryNode FuzzyQueryNode.cloneTree()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.GroupQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.GroupQueryNode

No usage of org.apache.lucene.queryParser.core.nodes.GroupQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.MatchAllDocsQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.MatchAllDocsQueryNode

Packages that use MatchAllDocsQueryNode
org.apache.lucene.queryParser.core.nodes Contains query nodes that are commonly used by query parser implementations

Uses of MatchAllDocsQueryNode in org.apache.lucene.queryParser.core.nodes

Methods in org.apache.lucene.queryParser.core.nodes that return MatchAllDocsQueryNode
 MatchAllDocsQueryNode MatchAllDocsQueryNode.cloneTree()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.MatchNoDocsQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.MatchNoDocsQueryNode

No usage of org.apache.lucene.queryParser.core.nodes.MatchNoDocsQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.ModifierQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.ModifierQueryNode

Packages that use ModifierQueryNode
org.apache.lucene.queryParser.standard.nodes Standard Lucene Query Nodes

Uses of ModifierQueryNode in org.apache.lucene.queryParser.standard.nodes

Subclasses of ModifierQueryNode in org.apache.lucene.queryParser.standard.nodes
 class BooleanModifierNode
A BooleanModifierNode has the same behaviour as ModifierQueryNode, it only indicates that this modifier was added by GroupQueryNodeProcessor and not by the user.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.ModifierQueryNode.Modifier

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.ModifierQueryNode.Modifier

Packages that use ModifierQueryNode.Modifier
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes
org.apache.lucene.queryParser.standard.parser | Lucene Query Parser

Uses of ModifierQueryNode.Modifier in org.apache.lucene.queryParser.core.nodes

Methods in org.apache.lucene.queryParser.core.nodes that return ModifierQueryNode.Modifier
ModifierQueryNode.Modifier | ModifierQueryNode.getModifier()
static ModifierQueryNode.Modifier | ModifierQueryNode.Modifier.valueOf(String name) Returns the enum constant of this type with the specified name.
static ModifierQueryNode.Modifier[] | ModifierQueryNode.Modifier.values() Returns an array containing the constants of this enum type, in the order they're declared.

Constructors in org.apache.lucene.queryParser.core.nodes with parameters of type ModifierQueryNode.Modifier
ModifierQueryNode(QueryNode query, ModifierQueryNode.Modifier mod)
Used to store the modifier value on the original query string

Uses of ModifierQueryNode.Modifier in org.apache.lucene.queryParser.standard.nodes

Constructors in org.apache.lucene.queryParser.standard.nodes with parameters of type ModifierQueryNode.Modifier
BooleanModifierNode(QueryNode node, ModifierQueryNode.Modifier mod)

Uses of ModifierQueryNode.Modifier in org.apache.lucene.queryParser.standard.parser

Methods in org.apache.lucene.queryParser.standard.parser that return ModifierQueryNode.Modifier
 ModifierQueryNode.Modifier StandardSyntaxParser.Modifiers()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.NoTokenFoundQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.NoTokenFoundQueryNode

No usage of org.apache.lucene.queryParser.core.nodes.NoTokenFoundQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode

No usage of org.apache.lucene.queryParser.core.nodes.OpaqueQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.OrQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.OrQueryNode

No usage of org.apache.lucene.queryParser.core.nodes.OrQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.ParametricQueryNode.CompareOperator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.ParametricQueryNode.CompareOperator

Packages that use ParametricQueryNode.CompareOperator
org.apache.lucene.queryParser.core.nodes Contains query nodes that are commonly used by query parser implementations

Uses of ParametricQueryNode.CompareOperator in org.apache.lucene.queryParser.core.nodes

Methods in org.apache.lucene.queryParser.core.nodes that return ParametricQueryNode.CompareOperator
ParametricQueryNode.CompareOperator | ParametricQueryNode.getOperator() Deprecated.
static ParametricQueryNode.CompareOperator | ParametricQueryNode.CompareOperator.valueOf(String name) Returns the enum constant of this type with the specified name.
static ParametricQueryNode.CompareOperator[] | ParametricQueryNode.CompareOperator.values() Returns an array containing the constants of this enum type, in the order they're declared.

Constructors in org.apache.lucene.queryParser.core.nodes with parameters of type ParametricQueryNode.CompareOperator
ParametricQueryNode(CharSequence field, ParametricQueryNode.CompareOperator comp, CharSequence value, int begin, int end)
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.ParametricQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.ParametricQueryNode

Packages that use ParametricQueryNode
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes

Uses of ParametricQueryNode in org.apache.lucene.queryParser.core.nodes

Methods in org.apache.lucene.queryParser.core.nodes that return ParametricQueryNode
ParametricQueryNode | ParametricQueryNode.cloneTree() Deprecated.
ParametricQueryNode | ParametricRangeQueryNode.getLowerBound()
ParametricQueryNode | ParametricRangeQueryNode.getUpperBound()

Constructors in org.apache.lucene.queryParser.core.nodes with parameters of type ParametricQueryNode
ParametricRangeQueryNode(ParametricQueryNode lowerBound, ParametricQueryNode upperBound)

Uses of ParametricQueryNode in org.apache.lucene.queryParser.standard.nodes

Methods in org.apache.lucene.queryParser.standard.nodes that return ParametricQueryNode
ParametricQueryNode | RangeQueryNode.getLowerBound() Deprecated.
ParametricQueryNode | RangeQueryNode.getUpperBound() Deprecated.

Constructors in org.apache.lucene.queryParser.standard.nodes with parameters of type ParametricQueryNode
RangeQueryNode(ParametricQueryNode lower, ParametricQueryNode upper, Collator collator)
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.ParametricRangeQueryNode

Packages that use ParametricRangeQueryNode
org.apache.lucene.queryParser.core.nodes Contains query nodes that are commonly used by query parser implementations

Uses of ParametricRangeQueryNode in org.apache.lucene.queryParser.core.nodes

Methods in org.apache.lucene.queryParser.core.nodes that return ParametricRangeQueryNode
 ParametricRangeQueryNode ParametricRangeQueryNode.cloneTree()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.PathQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.PathQueryNode

No usage of org.apache.lucene.queryParser.core.nodes.PathQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.PathQueryNode.QueryText

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.PathQueryNode.QueryText

Packages that use PathQueryNode.QueryText
org.apache.lucene.queryParser.core.nodes Contains query nodes that are commonly used by query parser implementations

Uses of PathQueryNode.QueryText in org.apache.lucene.queryParser.core.nodes

Methods in org.apache.lucene.queryParser.core.nodes that return PathQueryNode.QueryText
PathQueryNode.QueryText | PathQueryNode.QueryText.clone()
PathQueryNode.QueryText | PathQueryNode.getPathElement(int index) Returns the a specific QueryText element

Methods in org.apache.lucene.queryParser.core.nodes that return types with arguments of type PathQueryNode.QueryText
List<PathQueryNode.QueryText> | PathQueryNode.getPathElements() Returns the a List with all QueryText elements
List<PathQueryNode.QueryText> | PathQueryNode.getPathElements(int startIndex) Returns a List QueryText element from position startIndex

Method parameters in org.apache.lucene.queryParser.core.nodes with type arguments of type PathQueryNode.QueryText
 void PathQueryNode.setPathElements(List<PathQueryNode.QueryText> elements)
Returns the a List with all QueryText elements

Constructor parameters in org.apache.lucene.queryParser.core.nodes with type arguments of type PathQueryNode.QueryText
PathQueryNode(List<PathQueryNode.QueryText> pathElements)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.PhraseSlopQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.PhraseSlopQueryNode

No usage of org.apache.lucene.queryParser.core.nodes.PhraseSlopQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.ProximityQueryNode

No usage of org.apache.lucene.queryParser.core.nodes.ProximityQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode.ProximityType

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.ProximityQueryNode.ProximityType

No usage of org.apache.lucene.queryParser.core.nodes.ProximityQueryNode.ProximityType

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.ProximityQueryNode.Type

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.ProximityQueryNode.Type

Packages that use ProximityQueryNode.Type
org.apache.lucene.queryParser.core.nodes Contains query nodes that are commonly used by query parser implementations

Uses of ProximityQueryNode.Type in org.apache.lucene.queryParser.core.nodes

Methods in org.apache.lucene.queryParser.core.nodes that return ProximityQueryNode.Type
ProximityQueryNode.Type | ProximityQueryNode.getProximityType()
static ProximityQueryNode.Type | ProximityQueryNode.Type.valueOf(String name) Returns the enum constant of this type with the specified name.
static ProximityQueryNode.Type[] | ProximityQueryNode.Type.values() Returns an array containing the constants of this enum type, in the order they're declared.

Constructors in org.apache.lucene.queryParser.core.nodes with parameters of type ProximityQueryNode.Type
ProximityQueryNode.ProximityType(ProximityQueryNode.Type type)
ProximityQueryNode.ProximityType(ProximityQueryNode.Type type, int distance)
ProximityQueryNode(List<QueryNode> clauses, CharSequence field, ProximityQueryNode.Type type, boolean inorder)
ProximityQueryNode(List<QueryNode> clauses, CharSequence field, ProximityQueryNode.Type type, int distance, boolean inorder)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.core.nodes.QueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.core.nodes.QueryNode

Packages that use QueryNode
org.apache.lucene.queryParser.core.builders | Contains the necessary classes to implement query builders
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.core.parser | Contains the necessary interfaces to implement text parsers
org.apache.lucene.queryParser.core.processors | Interfaces and implementations used by query node processors
org.apache.lucene.queryParser.core.util | Utility classes to used with the Query Parser
org.apache.lucene.queryParser.precedence.processors | This package contains the processors used by Precedence Query Parser
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes
org.apache.lucene.queryParser.standard.parser | Lucene Query Parser
org.apache.lucene.queryParser.standard.processors | Lucene Query Node Processors

Uses of QueryNode in org.apache.lucene.queryParser.core.builders

Methods in org.apache.lucene.queryParser.core.builders with parameters of type QueryNode
Object | QueryBuilder.build(QueryNode queryNode) Builds some kind of object from a query tree.
Object | QueryTreeBuilder.build(QueryNode queryNode) Builds some kind of object from a query tree.

Method parameters in org.apache.lucene.queryParser.core.builders with type arguments of type QueryNode
 void QueryTreeBuilder.setBuilder(Class<? extends QueryNode> queryNodeClass, QueryBuilder builder)
Associates a class with a builder

Uses of QueryNode in org.apache.lucene.queryParser.core.nodes

Subinterfaces of QueryNode in org.apache.lucene.queryParser.core.nodes
interface | FieldableNode A query node implements FieldableNode interface to indicate that its children and itself are associated to a specific field.
interface | FieldValuePairQueryNode<T> This interface should be implemented by QueryNode that holds a field and an arbitrary value.
interface | RangeQueryNode<T extends FieldValuePairQueryNode<?>> This interface should be implemented by a QueryNode that represents some kind of range query.
interface | ValueQueryNode<T> This interface should be implemented by a QueryNode that holds an arbitrary value.

Classes in org.apache.lucene.queryParser.core.nodes that implement QueryNode
class | AndQueryNode A AndQueryNode represents an AND boolean operation performed on a list of nodes.
class | AnyQueryNode A AnyQueryNode represents an ANY operator performed on a list of nodes.
class | BooleanQueryNode A BooleanQueryNode represents a list of elements which do not have an explicit boolean operator defined between them.
class | BoostQueryNode A BoostQueryNode boosts the QueryNode tree which is under this node.
class | DeletedQueryNode A DeletedQueryNode represents a node that was deleted from the query node tree.
class | FieldQueryNode A FieldQueryNode represents a element that contains field/text tuple
class | FuzzyQueryNode A FuzzyQueryNode represents a element that contains field/text/similarity tuple
class | GroupQueryNode A GroupQueryNode represents a location where the original user typed real parenthesis on the query string.
class | MatchAllDocsQueryNode A MatchAllDocsQueryNode indicates that a query node tree or subtree will match all documents if executed in the index.
class | MatchNoDocsQueryNode A MatchNoDocsQueryNode indicates that a query node tree or subtree will not match any documents if executed in the index.
class | ModifierQueryNode A ModifierQueryNode indicates the modifier value (+,-,?,NONE) for each term on the query string.
class | NoTokenFoundQueryNode A NoTokenFoundQueryNode is used if a term is convert into no tokens by the tokenizer/lemmatizer/analyzer (null).
class | OpaqueQueryNode A OpaqueQueryNode is used for specify values that are not supposed to be parsed by the parser.
class | OrQueryNode A OrQueryNode represents an OR boolean operation performed on a list of nodes.
class | ParametricQueryNode Deprecated. this class will be removed in future. FieldQueryNode should be used instead.
class | ParametricRangeQueryNode A ParametricRangeQueryNode represents LE, LT, GE, GT, EQ, NE query.
class | PathQueryNode A PathQueryNode is used to store queries like /company/USA/California /product/shoes/brown.
class | PhraseSlopQueryNode
class | ProximityQueryNode A ProximityQueryNode represents a query where the terms should meet specific distance conditions.
class | QueryNodeImpl A QueryNodeImpl is the default implementation of the interface QueryNode
class | QuotedFieldQueryNode A QuotedFieldQueryNode represents phrase query.
class | SlopQueryNode A SlopQueryNode represents phrase query with a slop.
class | TokenizedPhraseQueryNode A TokenizedPhraseQueryNode represents a node created by a code that tokenizes/lemmatizes/analyzes.

Methods in org.apache.lucene.queryParser.core.nodes that return QueryNode
 QueryNode SlopQueryNode.cloneTree()
 QueryNode DeletedQueryNode.cloneTree()
 QueryNode QueryNode.cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 QueryNode NoTokenFoundQueryNode.cloneTree()
 QueryNode OpaqueQueryNode.cloneTree()
 QueryNode AnyQueryNode.cloneTree()
 QueryNode PathQueryNode.cloneTree()
 QueryNode QueryNodeImpl.cloneTree()
 QueryNode GroupQueryNode.cloneTree()
 QueryNode TokenizedPhraseQueryNode.cloneTree()
 QueryNode PhraseSlopQueryNode.cloneTree()
 QueryNode ProximityQueryNode.cloneTree()
 QueryNode ModifierQueryNode.cloneTree()
 QueryNode BooleanQueryNode.cloneTree()
 QueryNode BoostQueryNode.cloneTree()
 QueryNode SlopQueryNode.getChild()
 QueryNode GroupQueryNode.getChild()
 QueryNode PhraseSlopQueryNode.getChild()
 QueryNode ModifierQueryNode.getChild()
 QueryNode BoostQueryNode.getChild()
Returns the single child which this node boosts.
 QueryNode QueryNode.getParent()
 QueryNode QueryNodeImpl.getParent()

Methods in org.apache.lucene.queryParser.core.nodes that return types with arguments of type QueryNode
List<QueryNode> | QueryNode.getChildren() get Children nodes
List<QueryNode> | QueryNodeImpl.getChildren()

Methods in org.apache.lucene.queryParser.core.nodes with parameters of type QueryNode
void | QueryNode.add(QueryNode child)
void | QueryNodeImpl.add(QueryNode child)
void | GroupQueryNode.setChild(QueryNode child)
void | ModifierQueryNode.setChild(QueryNode child)

Method parameters in org.apache.lucene.queryParser.core.nodes with type arguments of type QueryNode
void | QueryNode.add(List<QueryNode> children)
void | QueryNodeImpl.add(List<QueryNode> children)
void | QueryNode.set(List<QueryNode> children)
void | QueryNodeImpl.set(List<QueryNode> children)

Constructors in org.apache.lucene.queryParser.core.nodes with parameters of type QueryNode
BoostQueryNode(QueryNode query, float value)
Constructs a boost node
GroupQueryNode(QueryNode query)
This QueryNode is used to identify parenthesis on the original query string
ModifierQueryNode(QueryNode query, ModifierQueryNode.Modifier mod)
Used to store the modifier value on the original query string
PhraseSlopQueryNode(QueryNode query, int value)
SlopQueryNode(QueryNode query, int value)

Constructor parameters in org.apache.lucene.queryParser.core.nodes with type arguments of type QueryNode
AndQueryNode(List<QueryNode> clauses)
AnyQueryNode(List<QueryNode> clauses, CharSequence field, int minimumMatchingElements)
BooleanQueryNode(List<QueryNode> clauses)
OrQueryNode(List<QueryNode> clauses)
ProximityQueryNode(List<QueryNode> clauses, CharSequence field, ProximityQueryNode.Type type, boolean inorder)
ProximityQueryNode(List<QueryNode> clauses, CharSequence field, ProximityQueryNode.Type type, int distance, boolean inorder)

Uses of QueryNode in org.apache.lucene.queryParser.core.parser

Methods in org.apache.lucene.queryParser.core.parser that return QueryNode
 QueryNode SyntaxParser.parse(CharSequence query, CharSequence field)

Uses of QueryNode in org.apache.lucene.queryParser.core.processors

Methods in org.apache.lucene.queryParser.core.processors that return QueryNode
protected  QueryNode NoChildOptimizationQueryNodeProcessor.postProcessNode(QueryNode node)
protected abstract  QueryNode QueryNodeProcessorImpl.postProcessNode(QueryNode node)
This method is invoked for every node when walking up the tree.
protected  QueryNode RemoveDeletedQueryNodesProcessor.postProcessNode(QueryNode node)
protected  QueryNode NoChildOptimizationQueryNodeProcessor.preProcessNode(QueryNode node)
protected abstract  QueryNode QueryNodeProcessorImpl.preProcessNode(QueryNode node)
This method is invoked for every node when walking down the tree.
protected  QueryNode RemoveDeletedQueryNodesProcessor.preProcessNode(QueryNode node)
 QueryNode QueryNodeProcessor.process(QueryNode queryTree)
Processes a query node tree.
 QueryNode QueryNodeProcessorImpl.process(QueryNode queryTree)
 QueryNode RemoveDeletedQueryNodesProcessor.process(QueryNode queryTree)
 QueryNode QueryNodeProcessorPipeline.process(QueryNode queryTree)
For reference about this method check: QueryNodeProcessor.process(QueryNode).

Methods in org.apache.lucene.queryParser.core.processors that return types with arguments of type QueryNode
protected List<QueryNode> | NoChildOptimizationQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected abstract List<QueryNode> | QueryNodeProcessorImpl.setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
protected List<QueryNode> | RemoveDeletedQueryNodesProcessor.setChildrenOrder(List<QueryNode> children)

Methods in org.apache.lucene.queryParser.core.processors with parameters of type QueryNode
protected  QueryNode NoChildOptimizationQueryNodeProcessor.postProcessNode(QueryNode node)
protected abstract  QueryNode QueryNodeProcessorImpl.postProcessNode(QueryNode node)
This method is invoked for every node when walking up the tree.
protected  QueryNode RemoveDeletedQueryNodesProcessor.postProcessNode(QueryNode node)
protected  QueryNode NoChildOptimizationQueryNodeProcessor.preProcessNode(QueryNode node)
protected abstract  QueryNode QueryNodeProcessorImpl.preProcessNode(QueryNode node)
This method is invoked for every node when walking down the tree.
protected  QueryNode RemoveDeletedQueryNodesProcessor.preProcessNode(QueryNode node)
 QueryNode QueryNodeProcessor.process(QueryNode queryTree)
Processes a query node tree.
 QueryNode QueryNodeProcessorImpl.process(QueryNode queryTree)
 QueryNode RemoveDeletedQueryNodesProcessor.process(QueryNode queryTree)
 QueryNode QueryNodeProcessorPipeline.process(QueryNode queryTree)
For reference about this method check: QueryNodeProcessor.process(QueryNode).
protected  void QueryNodeProcessorImpl.processChildren(QueryNode queryTree)
This method is called every time a child is processed.

Method parameters in org.apache.lucene.queryParser.core.processors with type arguments of type QueryNode
protected List<QueryNode> | NoChildOptimizationQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected abstract List<QueryNode> | QueryNodeProcessorImpl.setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
protected List<QueryNode> | RemoveDeletedQueryNodesProcessor.setChildrenOrder(List<QueryNode> children)

Uses of QueryNode in org.apache.lucene.queryParser.core.util

Methods in org.apache.lucene.queryParser.core.util that return QueryNode
static QueryNode QueryNodeOperation.logicalAnd(QueryNode q1, QueryNode q2)
perform a logical and of 2 QueryNode trees.

Methods in org.apache.lucene.queryParser.core.util with parameters of type QueryNode
static QueryNode QueryNodeOperation.logicalAnd(QueryNode q1, QueryNode q2)
perform a logical and of 2 QueryNode trees.

Uses of QueryNode in org.apache.lucene.queryParser.precedence.processors

Methods in org.apache.lucene.queryParser.precedence.processors that return QueryNode
protected QueryNode | BooleanModifiersQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | BooleanModifiersQueryNodeProcessor.preProcessNode(QueryNode node)
QueryNode | BooleanModifiersQueryNodeProcessor.process(QueryNode queryTree)

Methods in org.apache.lucene.queryParser.precedence.processors that return types with arguments of type QueryNode
protected  List<QueryNode> BooleanModifiersQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)

Methods in org.apache.lucene.queryParser.precedence.processors with parameters of type QueryNode
protected QueryNode | BooleanModifiersQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | BooleanModifiersQueryNodeProcessor.preProcessNode(QueryNode node)
QueryNode | BooleanModifiersQueryNodeProcessor.process(QueryNode queryTree)

Method parameters in org.apache.lucene.queryParser.precedence.processors with type arguments of type QueryNode
protected  List<QueryNode> BooleanModifiersQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)

Uses of QueryNode in org.apache.lucene.queryParser.standard.builders

Methods in org.apache.lucene.queryParser.standard.builders with parameters of type QueryNode
Query | StandardQueryTreeBuilder.build(QueryNode queryNode)
TermRangeQuery | TermRangeQueryNodeBuilder.build(QueryNode queryNode)
Query | StandardQueryBuilder.build(QueryNode queryNode)
TermQuery | FieldQueryNodeBuilder.build(QueryNode queryNode)
TermQuery | DummyQueryNodeBuilder.build(QueryNode queryNode) Always return null.
BooleanQuery | StandardBooleanQueryNodeBuilder.build(QueryNode queryNode)
Query | GroupQueryNodeBuilder.build(QueryNode queryNode)
PrefixQuery | PrefixWildcardQueryNodeBuilder.build(QueryNode queryNode)
MultiPhraseQuery | MultiPhraseQueryNodeBuilder.build(QueryNode queryNode)
BooleanQuery | BooleanQueryNodeBuilder.build(QueryNode queryNode)
PhraseQuery | PhraseQueryNodeBuilder.build(QueryNode queryNode)
Query | BoostQueryNodeBuilder.build(QueryNode queryNode)
Query | ModifierQueryNodeBuilder.build(QueryNode queryNode)
NumericRangeQuery<? extends Number> | NumericRangeQueryNodeBuilder.build(QueryNode queryNode)
BooleanQuery | MatchNoDocsQueryNodeBuilder.build(QueryNode queryNode)
FuzzyQuery | FuzzyQueryNodeBuilder.build(QueryNode queryNode)
MatchAllDocsQuery | MatchAllDocsQueryNodeBuilder.build(QueryNode queryNode)
TermRangeQuery | RangeQueryNodeBuilder.build(QueryNode queryNode) Deprecated.
WildcardQuery | WildcardQueryNodeBuilder.build(QueryNode queryNode)
BooleanQuery | AnyQueryNodeBuilder.build(QueryNode queryNode)
Query | SlopQueryNodeBuilder.build(QueryNode queryNode)

Uses of QueryNode in org.apache.lucene.queryParser.standard.nodes

Classes in org.apache.lucene.queryParser.standard.nodes that implement QueryNode
class | AbstractRangeQueryNode<T extends FieldValuePairQueryNode<?>> This class should be extended by nodes intending to represent range queries.
class | BooleanModifierNode A BooleanModifierNode has the same behaviour as ModifierQueryNode, it only indicates that this modifier was added by GroupQueryNodeProcessor and not by the user.
class | MultiPhraseQueryNode A MultiPhraseQueryNode indicates that its children should be used to build a MultiPhraseQuery instead of PhraseQuery.
class | NumericQueryNode This query node represents a field query that holds a numeric value.
class | NumericRangeQueryNode This query node represents a range query composed by NumericQueryNode bounds, which means the bound values are Numbers.
class | PrefixWildcardQueryNode A PrefixWildcardQueryNode represents wildcardquery that matches abc* or *.
class | RangeQueryNode Deprecated. this class will be removed in future, TermRangeQueryNode should be used instead
class | StandardBooleanQueryNode A StandardBooleanQueryNode has the same behavior as BooleanQueryNode.
class | TermRangeQueryNode This query node represents a range query composed by FieldQueryNode bounds, which means the bound values are strings.
class | WildcardQueryNode A WildcardQueryNode represents wildcard query This does not apply to phrases.

Methods in org.apache.lucene.queryParser.standard.nodes that return QueryNode
 QueryNode MultiPhraseQueryNode.cloneTree()

Constructors in org.apache.lucene.queryParser.standard.nodes with parameters of type QueryNode
BooleanModifierNode(QueryNode node, ModifierQueryNode.Modifier mod)

Constructor parameters in org.apache.lucene.queryParser.standard.nodes with type arguments of type QueryNode
StandardBooleanQueryNode(List<QueryNode> clauses, boolean disableCoord)

Uses of QueryNode in org.apache.lucene.queryParser.standard.parser

Methods in org.apache.lucene.queryParser.standard.parser that return QueryNode
QueryNode | StandardSyntaxParser.Clause(CharSequence field)
QueryNode | StandardSyntaxParser.ConjQuery(CharSequence field)
QueryNode | StandardSyntaxParser.DisjQuery(CharSequence field)
QueryNode | StandardSyntaxParser.ModClause(CharSequence field)
QueryNode | StandardSyntaxParser.parse(CharSequence query, CharSequence field) Parses a query string, returning a QueryNode.
QueryNode | StandardSyntaxParser.Query(CharSequence field)
QueryNode | StandardSyntaxParser.Term(CharSequence field)
QueryNode | StandardSyntaxParser.TopLevelQuery(CharSequence field)

Uses of QueryNode in org.apache.lucene.queryParser.standard.processors

Methods in org.apache.lucene.queryParser.standard.processors that return QueryNode
protected QueryNode | ParametricRangeQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | BoostQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | AnalyzerQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | PhraseSlopQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | MultiTermRewriteMethodProcessor.postProcessNode(QueryNode node)
protected QueryNode | RemoveEmptyNonLeafQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | MultiFieldQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | WildcardQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | NumericQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | LowercaseExpandedTermsQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | DefaultPhraseSlopQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | AllowLeadingWildcardProcessor.postProcessNode(QueryNode node)
protected QueryNode | NumericRangeQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | BooleanSingleChildOptimizationQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | FuzzyQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | MatchAllDocsQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | ParametricRangeQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | BoostQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | AnalyzerQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | PhraseSlopQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | MultiTermRewriteMethodProcessor.preProcessNode(QueryNode node)
protected QueryNode | RemoveEmptyNonLeafQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | MultiFieldQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | WildcardQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | NumericQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | LowercaseExpandedTermsQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | DefaultPhraseSlopQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | AllowLeadingWildcardProcessor.preProcessNode(QueryNode node)
protected QueryNode | NumericRangeQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | BooleanSingleChildOptimizationQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | FuzzyQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | MatchAllDocsQueryNodeProcessor.preProcessNode(QueryNode node)
QueryNode | AnalyzerQueryNodeProcessor.process(QueryNode queryTree)
QueryNode | RemoveEmptyNonLeafQueryNodeProcessor.process(QueryNode queryTree)
QueryNode | GroupQueryNodeProcessor.process(QueryNode queryTree)
QueryNode | LowercaseExpandedTermsQueryNodeProcessor.process(QueryNode queryTree)
QueryNode | DefaultPhraseSlopQueryNodeProcessor.process(QueryNode queryTree)
QueryNode | AllowLeadingWildcardProcessor.process(QueryNode queryTree)

Methods in org.apache.lucene.queryParser.standard.processors that return types with arguments of type QueryNode
protected List<QueryNode> | ParametricRangeQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | BoostQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | AnalyzerQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | PhraseSlopQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | MultiTermRewriteMethodProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | RemoveEmptyNonLeafQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | MultiFieldQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | WildcardQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | NumericQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | LowercaseExpandedTermsQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | DefaultPhraseSlopQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | AllowLeadingWildcardProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | NumericRangeQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | BooleanSingleChildOptimizationQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | FuzzyQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | MatchAllDocsQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)

Methods in org.apache.lucene.queryParser.standard.processors with parameters of type QueryNode
protected QueryNode | ParametricRangeQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | BoostQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | AnalyzerQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | PhraseSlopQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | MultiTermRewriteMethodProcessor.postProcessNode(QueryNode node)
protected QueryNode | RemoveEmptyNonLeafQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | MultiFieldQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | WildcardQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | NumericQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | LowercaseExpandedTermsQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | DefaultPhraseSlopQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | AllowLeadingWildcardProcessor.postProcessNode(QueryNode node)
protected QueryNode | NumericRangeQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | BooleanSingleChildOptimizationQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | FuzzyQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | MatchAllDocsQueryNodeProcessor.postProcessNode(QueryNode node)
protected QueryNode | ParametricRangeQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | BoostQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | AnalyzerQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | PhraseSlopQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | MultiTermRewriteMethodProcessor.preProcessNode(QueryNode node)
protected QueryNode | RemoveEmptyNonLeafQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | MultiFieldQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | WildcardQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | NumericQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | LowercaseExpandedTermsQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | DefaultPhraseSlopQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | AllowLeadingWildcardProcessor.preProcessNode(QueryNode node)
protected QueryNode | NumericRangeQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | BooleanSingleChildOptimizationQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | FuzzyQueryNodeProcessor.preProcessNode(QueryNode node)
protected QueryNode | MatchAllDocsQueryNodeProcessor.preProcessNode(QueryNode node)
QueryNode | AnalyzerQueryNodeProcessor.process(QueryNode queryTree)
QueryNode | RemoveEmptyNonLeafQueryNodeProcessor.process(QueryNode queryTree)
QueryNode | GroupQueryNodeProcessor.process(QueryNode queryTree)
QueryNode | LowercaseExpandedTermsQueryNodeProcessor.process(QueryNode queryTree)
QueryNode | DefaultPhraseSlopQueryNodeProcessor.process(QueryNode queryTree)
QueryNode | AllowLeadingWildcardProcessor.process(QueryNode queryTree)
protected void | MultiFieldQueryNodeProcessor.processChildren(QueryNode queryTree)
protected void | DefaultPhraseSlopQueryNodeProcessor.processChildren(QueryNode queryTree)

Method parameters in org.apache.lucene.queryParser.standard.processors with type arguments of type QueryNode
protected List<QueryNode> | ParametricRangeQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | BoostQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | AnalyzerQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | PhraseSlopQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | MultiTermRewriteMethodProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | RemoveEmptyNonLeafQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | MultiFieldQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | WildcardQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | NumericQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | LowercaseExpandedTermsQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | DefaultPhraseSlopQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | AllowLeadingWildcardProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | NumericRangeQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | BooleanSingleChildOptimizationQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | FuzzyQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)
protected List<QueryNode> | MatchAllDocsQueryNodeProcessor.setChildrenOrder(List<QueryNode> children)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.QueryNodeImpl

Packages that use QueryNodeImpl
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes

Uses of QueryNodeImpl in org.apache.lucene.queryParser.core.nodes

Subclasses of QueryNodeImpl in org.apache.lucene.queryParser.core.nodes
class | AndQueryNode A AndQueryNode represents an AND boolean operation performed on a list of nodes.
class | AnyQueryNode A AnyQueryNode represents an ANY operator performed on a list of nodes.
class | BooleanQueryNode A BooleanQueryNode represents a list of elements which do not have an explicit boolean operator defined between them.
class | BoostQueryNode A BoostQueryNode boosts the QueryNode tree which is under this node.
class | DeletedQueryNode A DeletedQueryNode represents a node that was deleted from the query node tree.
class | FieldQueryNode A FieldQueryNode represents a element that contains field/text tuple
class | FuzzyQueryNode A FuzzyQueryNode represents a element that contains field/text/similarity tuple
class | GroupQueryNode A GroupQueryNode represents a location where the original user typed real parenthesis on the query string.
class | MatchAllDocsQueryNode A MatchAllDocsQueryNode indicates that a query node tree or subtree will match all documents if executed in the index.
class | MatchNoDocsQueryNode A MatchNoDocsQueryNode indicates that a query node tree or subtree will not match any documents if executed in the index.
class | ModifierQueryNode A ModifierQueryNode indicates the modifier value (+,-,?,NONE) for each term on the query string.
class | NoTokenFoundQueryNode A NoTokenFoundQueryNode is used if a term is convert into no tokens by the tokenizer/lemmatizer/analyzer (null).
class | OpaqueQueryNode A OpaqueQueryNode is used for specify values that are not supposed to be parsed by the parser.
class | OrQueryNode A OrQueryNode represents an OR boolean operation performed on a list of nodes.
class | ParametricQueryNode Deprecated. this class will be removed in future. FieldQueryNode should be used instead.
class | ParametricRangeQueryNode A ParametricRangeQueryNode represents LE, LT, GE, GT, EQ, NE query.
class | PathQueryNode A PathQueryNode is used to store queries like /company/USA/California /product/shoes/brown.
class | PhraseSlopQueryNode
class | ProximityQueryNode A ProximityQueryNode represents a query where the terms should meet specific distance conditions.
class | QuotedFieldQueryNode A QuotedFieldQueryNode represents phrase query.
class | SlopQueryNode A SlopQueryNode represents phrase query with a slop.
class | TokenizedPhraseQueryNode A TokenizedPhraseQueryNode represents a node created by a code that tokenizes/lemmatizes/analyzes.

Uses of QueryNodeImpl in org.apache.lucene.queryParser.standard.nodes

Subclasses of QueryNodeImpl in org.apache.lucene.queryParser.standard.nodes
class | AbstractRangeQueryNode<T extends FieldValuePairQueryNode<?>> This class should be extended by nodes intending to represent range queries.
class | BooleanModifierNode A BooleanModifierNode has the same behaviour as ModifierQueryNode, it only indicates that this modifier was added by GroupQueryNodeProcessor and not by the user.
class | MultiPhraseQueryNode A MultiPhraseQueryNode indicates that its children should be used to build a MultiPhraseQuery instead of PhraseQuery.
class | NumericQueryNode This query node represents a field query that holds a numeric value.
class | NumericRangeQueryNode This query node represents a range query composed by NumericQueryNode bounds, which means the bound values are Numbers.
class | PrefixWildcardQueryNode A PrefixWildcardQueryNode represents wildcardquery that matches abc* or *.
class | RangeQueryNode Deprecated. this class will be removed in future, TermRangeQueryNode should be used instead
class | StandardBooleanQueryNode A StandardBooleanQueryNode has the same behavior as BooleanQueryNode.
class | TermRangeQueryNode This query node represents a range query composed by FieldQueryNode bounds, which means the bound values are strings.
class | WildcardQueryNode A WildcardQueryNode represents wildcard query This does not apply to phrases.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.QuotedFieldQueryNode

Packages that use QuotedFieldQueryNode
org.apache.lucene.queryParser.core.nodes Contains query nodes that are commonly used by query parser implementations

Uses of QuotedFieldQueryNode in org.apache.lucene.queryParser.core.nodes

Methods in org.apache.lucene.queryParser.core.nodes that return QuotedFieldQueryNode
 QuotedFieldQueryNode QuotedFieldQueryNode.cloneTree()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.core.nodes.RangeQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.core.nodes.RangeQueryNode

Packages that use RangeQueryNode
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes

Uses of RangeQueryNode in org.apache.lucene.queryParser.core.nodes

Classes in org.apache.lucene.queryParser.core.nodes that implement RangeQueryNode
 class ParametricRangeQueryNode
A ParametricRangeQueryNode represents LE, LT, GE, GT, EQ, NE query.

Uses of RangeQueryNode in org.apache.lucene.queryParser.standard.nodes

Classes in org.apache.lucene.queryParser.standard.nodes that implement RangeQueryNode
class | AbstractRangeQueryNode<T extends FieldValuePairQueryNode<?>> This class should be extended by nodes intending to represent range queries.
class | NumericRangeQueryNode This query node represents a range query composed by NumericQueryNode bounds, which means the bound values are Numbers.
class | RangeQueryNode Deprecated. this class will be removed in future, TermRangeQueryNode should be used instead
class | TermRangeQueryNode This query node represents a range query composed by FieldQueryNode bounds, which means the bound values are strings.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.SlopQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.SlopQueryNode

No usage of org.apache.lucene.queryParser.core.nodes.SlopQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.core.nodes.TextableQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.core.nodes.TextableQueryNode

Packages that use TextableQueryNode
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes

Uses of TextableQueryNode in org.apache.lucene.queryParser.core.nodes

Classes in org.apache.lucene.queryParser.core.nodes that implement TextableQueryNode
class | FieldQueryNode A FieldQueryNode represents a element that contains field/text tuple
class | FuzzyQueryNode A FuzzyQueryNode represents a element that contains field/text/similarity tuple
class | ParametricQueryNode Deprecated. this class will be removed in future. FieldQueryNode should be used instead.
class | QuotedFieldQueryNode A QuotedFieldQueryNode represents phrase query.

Uses of TextableQueryNode in org.apache.lucene.queryParser.standard.nodes

Classes in org.apache.lucene.queryParser.standard.nodes that implement TextableQueryNode
class | PrefixWildcardQueryNode A PrefixWildcardQueryNode represents wildcardquery that matches abc* or *.
class | WildcardQueryNode A WildcardQueryNode represents wildcard query This does not apply to phrases.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.nodes.TokenizedPhraseQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.nodes.TokenizedPhraseQueryNode

No usage of org.apache.lucene.queryParser.core.nodes.TokenizedPhraseQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.core.nodes.ValueQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.core.nodes.ValueQueryNode

Packages that use ValueQueryNode
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes

Uses of ValueQueryNode in org.apache.lucene.queryParser.core.nodes

Subinterfaces of ValueQueryNode in org.apache.lucene.queryParser.core.nodes
 interface FieldValuePairQueryNode<T>
This interface should be implemented by QueryNode that holds a field and an arbitrary value.

Classes in org.apache.lucene.queryParser.core.nodes that implement ValueQueryNode
class | FieldQueryNode A FieldQueryNode represents a element that contains field/text tuple
class | FuzzyQueryNode A FuzzyQueryNode represents a element that contains field/text/similarity tuple
class | ParametricQueryNode Deprecated. this class will be removed in future. FieldQueryNode should be used instead.
class | QuotedFieldQueryNode A QuotedFieldQueryNode represents phrase query.

Uses of ValueQueryNode in org.apache.lucene.queryParser.standard.nodes

Classes in org.apache.lucene.queryParser.standard.nodes that implement ValueQueryNode
class | NumericQueryNode This query node represents a field query that holds a numeric value.
class | PrefixWildcardQueryNode A PrefixWildcardQueryNode represents wildcardquery that matches abc* or *.
class | WildcardQueryNode A WildcardQueryNode represents wildcard query This does not apply to phrases.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


EscapeQuerySyntax

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.parser
Interface EscapeQuerySyntax

All Known Implementing Classes:
EscapeQuerySyntaxImpl
public interface EscapeQuerySyntax

A parser needs to implement EscapeQuerySyntax to allow the QueryNode to escape the queries, when the toQueryString method is called.

Nested Class Summary
static class EscapeQuerySyntax.Type
Method Summary
 CharSequence escape(CharSequence text, Locale locale, EscapeQuerySyntax.Type type)

Method Detail

escape

CharSequence escape(CharSequence text,
                    Locale locale,
                    EscapeQuerySyntax.Type type)
Parameters:
text - - text to be escaped
locale - - locale for the current query
type - - select the type of escape operation to use
Returns:
escaped text
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


EscapeQuerySyntax.Type

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.queryParser.core.parser
Enum EscapeQuerySyntax.Type

java.lang.Object
    extended by  java.lang.Enum<EscapeQuerySyntax.Type>
        extended by  org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax.Type
All Implemented Interfaces:
Serializable, Comparable<EscapeQuerySyntax.Type>
Enclosing interface:
EscapeQuerySyntax
public static enum EscapeQuerySyntax.Type
extends Enum<EscapeQuerySyntax.Type>

Enum Constant Summary
NORMAL
STRING
Method Summary
static EscapeQuerySyntax.Type | valueOf(String name) Returns the enum constant of this type with the specified name.
static EscapeQuerySyntax.Type[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

STRING

public static final EscapeQuerySyntax.Type STRING

NORMAL

public static final EscapeQuerySyntax.Type NORMAL
Method Detail

values

public static final EscapeQuerySyntax.Type[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(EscapeQuerySyntax.Type c : EscapeQuerySyntax.Type.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static EscapeQuerySyntax.Type valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


 org.apache.lucene.queryParser.core.parser
Interfaces
EscapeQuerySyntax
SyntaxParser
Enums
EscapeQuerySyntax.Type


org.apache.lucene.queryParser.core.parser

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.core.parser

Contains the necessary interfaces to implement text parsers

See:
Description

Interface Summary
EscapeQuerySyntax | A parser needs to implement EscapeQuerySyntax to allow the QueryNode to escape the queries, when the toQueryString method is called.
SyntaxParser | A parser needs to implement SyntaxParser interface

Enum Summary
EscapeQuerySyntax.Type

Package org.apache.lucene.queryParser.core.parser Description

Contains the necessary interfaces to implement text parsers

Parser

The package org.apache.lucene.queryParser.parser contains interfaces that should be implemented by the parsers. Parsers produce QueryNode Trees from a string object. These package still needs some work to add support to for multiple parsers. Features that should be supported for the future, related with the parser: - QueryNode tree should be able convertible to any parser syntax. - The query syntax should support calling other parsers. - QueryNode tree created by multiple parsers.


org.apache.lucene.queryParser.core.parser Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.core.parser

Package Hierarchies:
All Packages

Interface Hierarchy

  • org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax
  • org.apache.lucene.queryParser.core.parser.SyntaxParser

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax.Type


Uses of Package org.apache.lucene.queryParser.core.parser

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.core.parser

Packages that use org.apache.lucene.queryParser.core.parser
org.apache.lucene.queryParser.core | Contains the core classes of the flexible query parser framework
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.core.parser | Contains the necessary interfaces to implement text parsers
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes
org.apache.lucene.queryParser.standard.parser | Lucene Query Parser

Classes in org.apache.lucene.queryParser.core.parser used by org.apache.lucene.queryParser.core
SyntaxParser
A parser needs to implement SyntaxParser interface

Classes in org.apache.lucene.queryParser.core.parser used by org.apache.lucene.queryParser.core.nodes
EscapeQuerySyntax
A parser needs to implement EscapeQuerySyntax to allow the QueryNode to escape the queries, when the toQueryString method is called.

Classes in org.apache.lucene.queryParser.core.parser used by org.apache.lucene.queryParser.core.parser
EscapeQuerySyntax.Type

Classes in org.apache.lucene.queryParser.core.parser used by org.apache.lucene.queryParser.standard.nodes
EscapeQuerySyntax
A parser needs to implement EscapeQuerySyntax to allow the QueryNode to escape the queries, when the toQueryString method is called.

Classes in org.apache.lucene.queryParser.core.parser used by org.apache.lucene.queryParser.standard.parser
EscapeQuerySyntax
A parser needs to implement EscapeQuerySyntax to allow the QueryNode to escape the queries, when the toQueryString method is called.
EscapeQuerySyntax.Type
SyntaxParser
A parser needs to implement SyntaxParser interface

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SyntaxParser

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.parser
Interface SyntaxParser

All Known Implementing Classes:
StandardSyntaxParser
public interface SyntaxParser

A parser needs to implement SyntaxParser interface

Method Summary
 QueryNode parse(CharSequence query, CharSequence field)

Method Detail

parse

QueryNode parse(CharSequence query,
                CharSequence field)
                throws QueryNodeParseException
Parameters:
query - - query data to be parsed
field - - default field name
Returns:
QueryNode tree
Throws:
QueryNodeParseException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Interface org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax

Packages that use EscapeQuerySyntax
org.apache.lucene.queryParser.core.nodes | Contains query nodes that are commonly used by query parser implementations
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes
org.apache.lucene.queryParser.standard.parser | Lucene Query Parser

Uses of EscapeQuerySyntax in org.apache.lucene.queryParser.core.nodes

Methods in org.apache.lucene.queryParser.core.nodes with parameters of type EscapeQuerySyntax
protected CharSequence | FieldQueryNode.getTermEscaped(EscapeQuerySyntax escaper)
protected CharSequence | FieldQueryNode.getTermEscapeQuoted(EscapeQuerySyntax escaper)
CharSequence | SlopQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)
CharSequence | DeletedQueryNode.toQueryString(EscapeQuerySyntax escaper)
CharSequence | QueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser) convert to a query string understood by the query parser
CharSequence | NoTokenFoundQueryNode.toQueryString(EscapeQuerySyntax escaper)
CharSequence | OpaqueQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)
CharSequence | MatchAllDocsQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)
CharSequence | AnyQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)
CharSequence | QuotedFieldQueryNode.toQueryString(EscapeQuerySyntax escaper)
CharSequence | PathQueryNode.toQueryString(EscapeQuerySyntax escaper)
CharSequence | ParametricQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser) Deprecated.
CharSequence | FieldQueryNode.toQueryString(EscapeQuerySyntax escaper)
CharSequence | GroupQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)
CharSequence | TokenizedPhraseQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)
CharSequence | FuzzyQueryNode.toQueryString(EscapeQuerySyntax escaper)
CharSequence | PhraseSlopQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)
CharSequence | ProximityQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)
CharSequence | ModifierQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)
CharSequence | OrQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)
CharSequence | ParametricRangeQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)
CharSequence | AndQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)
CharSequence | BooleanQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)
CharSequence | BoostQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)

Uses of EscapeQuerySyntax in org.apache.lucene.queryParser.standard.nodes

Methods in org.apache.lucene.queryParser.standard.nodes with parameters of type EscapeQuerySyntax
protected CharSequence | NumericQueryNode.getTermEscaped(EscapeQuerySyntax escaper) This method is used to get the value converted to String and escaped using the given EscapeQuerySyntax.
CharSequence | MultiPhraseQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)
CharSequence | WildcardQueryNode.toQueryString(EscapeQuerySyntax escaper)
CharSequence | NumericQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)
CharSequence | AbstractRangeQueryNode.toQueryString(EscapeQuerySyntax escapeSyntaxParser)

Uses of EscapeQuerySyntax in org.apache.lucene.queryParser.standard.parser

Classes in org.apache.lucene.queryParser.standard.parser that implement EscapeQuerySyntax
 class EscapeQuerySyntaxImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax.Type

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax.Type

Packages that use EscapeQuerySyntax.Type
org.apache.lucene.queryParser.core.parser | Contains the necessary interfaces to implement text parsers
org.apache.lucene.queryParser.standard.parser | Lucene Query Parser

Uses of EscapeQuerySyntax.Type in org.apache.lucene.queryParser.core.parser

Methods in org.apache.lucene.queryParser.core.parser that return EscapeQuerySyntax.Type
static EscapeQuerySyntax.Type | EscapeQuerySyntax.Type.valueOf(String name) Returns the enum constant of this type with the specified name.
static EscapeQuerySyntax.Type[] | EscapeQuerySyntax.Type.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.queryParser.core.parser with parameters of type EscapeQuerySyntax.Type
 CharSequence EscapeQuerySyntax.escape(CharSequence text, Locale locale, EscapeQuerySyntax.Type type)

Uses of EscapeQuerySyntax.Type in org.apache.lucene.queryParser.standard.parser

Methods in org.apache.lucene.queryParser.standard.parser with parameters of type EscapeQuerySyntax.Type
 CharSequence EscapeQuerySyntaxImpl.escape(CharSequence text, Locale locale, EscapeQuerySyntax.Type type)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.core.parser.SyntaxParser

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.core.parser.SyntaxParser

Packages that use SyntaxParser
org.apache.lucene.queryParser.core | Contains the core classes of the flexible query parser framework
org.apache.lucene.queryParser.standard.parser | Lucene Query Parser

Uses of SyntaxParser in org.apache.lucene.queryParser.core

Methods in org.apache.lucene.queryParser.core that return SyntaxParser
 SyntaxParser QueryParserHelper.getSyntaxParser()
Returns the text parser used to build a query node tree from a query string.

Methods in org.apache.lucene.queryParser.core with parameters of type SyntaxParser
 void QueryParserHelper.setSyntaxParser(SyntaxParser syntaxParser)
Sets the text parser that will be used to parse the query string, it cannot be null.

Constructors in org.apache.lucene.queryParser.core with parameters of type SyntaxParser
QueryParserHelper(QueryConfigHandler queryConfigHandler, SyntaxParser syntaxParser, QueryNodeProcessor processor, QueryBuilder builder)
Creates a query parser helper object using the specified configuration, text parser, processor and builder.

Uses of SyntaxParser in org.apache.lucene.queryParser.standard.parser

Classes in org.apache.lucene.queryParser.standard.parser that implement SyntaxParser
 class StandardSyntaxParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


NoChildOptimizationQueryNodeProcessor

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.processors
Class NoChildOptimizationQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.core.processors.NoChildOptimizationQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class NoChildOptimizationQueryNodeProcessor
extends QueryNodeProcessorImpl

A NoChildOptimizationQueryNodeProcessor removes every BooleanQueryNode, BoostQueryNode, TokenizedPhraseQueryNode or ModifierQueryNode that do not have a valid children.

Example: When the children of these nodes are removed for any reason then the nodes may become invalid.

Constructor Summary
NoChildOptimizationQueryNodeProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, process, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NoChildOptimizationQueryNodeProcessor

public NoChildOptimizationQueryNodeProcessor()
Method Detail

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.core.processors
Interfaces
QueryNodeProcessor
Classes
NoChildOptimizationQueryNodeProcessor
QueryNodeProcessorImpl
QueryNodeProcessorPipeline
RemoveDeletedQueryNodesProcessor


org.apache.lucene.queryParser.core.processors

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.core.processors

Interfaces and implementations used by query node processors

See:
Description

Interface Summary
QueryNodeProcessor A QueryNodeProcessor is an interface for classes that process a QueryNode tree.

Class Summary
NoChildOptimizationQueryNodeProcessor | A NoChildOptimizationQueryNodeProcessor removes every BooleanQueryNode, BoostQueryNode, TokenizedPhraseQueryNode or ModifierQueryNode that do not have a valid children.
QueryNodeProcessorImpl | This is a default implementation for the QueryNodeProcessor interface, it's an abstract class, so it should be extended by classes that want to process a QueryNode tree.
QueryNodeProcessorPipeline | A QueryNodeProcessorPipeline class should be used to build a query node processor pipeline.
RemoveDeletedQueryNodesProcessor | A QueryNodeProcessorPipeline class removes every instance of DeletedQueryNode from a query node tree.

Package org.apache.lucene.queryParser.core.processors Description

Interfaces and implementations used by query node processors

Query Node Processors

The package org.apache.lucene.queryParser.processors contains interfaces that should be implemented by every query node processor.

The interface that every query node processor should implement is QueryNodeProcessor.

A query node processor should be used to process a QueryNode tree. QueryNode trees can be programmatically created or generated by a text parser. See org.apache.lucene.queryParser.core.parser for more details about text parsers.

A query node processor should be used to process a QueryNode tree. QueryNode trees can be programmatically created or generated by a text parser. See org.apache.lucene.queryParser.core.parser for more details about text parsers.

A pipeline of processors can be assembled using QueryNodeProcessorPipeline.

Implementors may want to extend QueryNodeProcessorImpl, which simplifies the implementation, because it walks automatically the QueryNode. See QueryNodeProcessorImpl for more details.


org.apache.lucene.queryParser.core.processors Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.core.processors

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl (implements org.apache.lucene.queryParser.core.processors.QueryNodeProcessor)
      • org.apache.lucene.queryParser.core.processors.NoChildOptimizationQueryNodeProcessor
      • org.apache.lucene.queryParser.core.processors.RemoveDeletedQueryNodesProcessor
    • org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline (implements java.util.List<E>, org.apache.lucene.queryParser.core.processors.QueryNodeProcessor)

Interface Hierarchy

  • org.apache.lucene.queryParser.core.processors.QueryNodeProcessor


Uses of Package org.apache.lucene.queryParser.core.processors

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.core.processors

Packages that use org.apache.lucene.queryParser.core.processors
org.apache.lucene.queryParser.core | Contains the core classes of the flexible query parser framework
org.apache.lucene.queryParser.core.processors | Interfaces and implementations used by query node processors
org.apache.lucene.queryParser.precedence.processors | This package contains the processors used by Precedence Query Parser
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.processors | Lucene Query Node Processors

Classes in org.apache.lucene.queryParser.core.processors used by org.apache.lucene.queryParser.core
QueryNodeProcessor
A QueryNodeProcessor is an interface for classes that process a QueryNode tree.

Classes in org.apache.lucene.queryParser.core.processors used by org.apache.lucene.queryParser.core.processors
QueryNodeProcessor
A QueryNodeProcessor is an interface for classes that process a QueryNode tree.
QueryNodeProcessorImpl
This is a default implementation for the QueryNodeProcessor interface, it's an abstract class, so it should be extended by classes that want to process a QueryNode tree.

Classes in org.apache.lucene.queryParser.core.processors used by org.apache.lucene.queryParser.precedence.processors
QueryNodeProcessor
A QueryNodeProcessor is an interface for classes that process a QueryNode tree.
QueryNodeProcessorImpl
This is a default implementation for the QueryNodeProcessor interface, it's an abstract class, so it should be extended by classes that want to process a QueryNode tree.
QueryNodeProcessorPipeline
A QueryNodeProcessorPipeline class should be used to build a query node processor pipeline.

Classes in org.apache.lucene.queryParser.core.processors used by org.apache.lucene.queryParser.standard
QueryNodeProcessor
A QueryNodeProcessor is an interface for classes that process a QueryNode tree.

Classes in org.apache.lucene.queryParser.core.processors used by org.apache.lucene.queryParser.standard.processors
QueryNodeProcessor
A QueryNodeProcessor is an interface for classes that process a QueryNode tree.
QueryNodeProcessorImpl
This is a default implementation for the QueryNodeProcessor interface, it's an abstract class, so it should be extended by classes that want to process a QueryNode tree.
QueryNodeProcessorPipeline
A QueryNodeProcessorPipeline class should be used to build a query node processor pipeline.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


QueryNodeProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.processors
Interface QueryNodeProcessor

All Known Implementing Classes:
AllowLeadingWildcardProcessor, AnalyzerQueryNodeProcessor, BooleanModifiersQueryNodeProcessor, BooleanSingleChildOptimizationQueryNodeProcessor, BoostQueryNodeProcessor, DefaultPhraseSlopQueryNodeProcessor, FuzzyQueryNodeProcessor, GroupQueryNodeProcessor, LowercaseExpandedTermsQueryNodeProcessor, MatchAllDocsQueryNodeProcessor, MultiFieldQueryNodeProcessor, MultiTermRewriteMethodProcessor, NoChildOptimizationQueryNodeProcessor, NumericQueryNodeProcessor, NumericRangeQueryNodeProcessor, ParametricRangeQueryNodeProcessor, PhraseSlopQueryNodeProcessor, PrecedenceQueryNodeProcessorPipeline, QueryNodeProcessorImpl, QueryNodeProcessorPipeline, RemoveDeletedQueryNodesProcessor, RemoveEmptyNonLeafQueryNodeProcessor, StandardQueryNodeProcessorPipeline, WildcardQueryNodeProcessor
public interface QueryNodeProcessor

A QueryNodeProcessor is an interface for classes that process a QueryNode tree.

The implementor of this class should perform some operation on a query node tree and return the same or another query node tree.

It also may carry a QueryConfigHandler object that contains configuration about the query represented by the query tree or the collection/index where it's intended to be executed.

In case there is any QueryConfigHandler associated to the query tree to be processed, it should be set using setQueryConfigHandler(QueryConfigHandler) before process(QueryNode) is invoked.

See Also:
QueryNode, QueryNodeProcessor, QueryConfigHandler

Method Summary
QueryConfigHandler | getQueryConfigHandler() Returns the QueryConfigHandler associated to the query tree if any, otherwise it returns null
QueryNode | process(QueryNode queryTree) Processes a query node tree.
void | setQueryConfigHandler(QueryConfigHandler queryConfigHandler) Sets the QueryConfigHandler associated to the query tree.

Method Detail

process

QueryNode process(QueryNode queryTree)
                  throws QueryNodeException
Processes a query node tree. It may return the same or another query tree. I should never return null.

Parameters:
queryTree - tree root node
Returns:
the processed query tree
Throws:
QueryNodeException

setQueryConfigHandler

void setQueryConfigHandler(QueryConfigHandler queryConfigHandler)
Sets the QueryConfigHandler associated to the query tree.

Parameters:
queryConfigHandler -

getQueryConfigHandler

QueryConfigHandler getQueryConfigHandler()
Returns the QueryConfigHandler associated to the query tree if any, otherwise it returns null

Returns:
the QueryConfigHandler associated to the query tree if any, otherwise it returns null
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryNodeProcessorImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.processors
Class QueryNodeProcessorImpl

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
All Implemented Interfaces:
QueryNodeProcessor
Direct Known Subclasses:
AllowLeadingWildcardProcessor, AnalyzerQueryNodeProcessor, BooleanModifiersQueryNodeProcessor, BooleanSingleChildOptimizationQueryNodeProcessor, BoostQueryNodeProcessor, DefaultPhraseSlopQueryNodeProcessor, FuzzyQueryNodeProcessor, LowercaseExpandedTermsQueryNodeProcessor, MatchAllDocsQueryNodeProcessor, MultiFieldQueryNodeProcessor, MultiTermRewriteMethodProcessor, NoChildOptimizationQueryNodeProcessor, NumericQueryNodeProcessor, NumericRangeQueryNodeProcessor, ParametricRangeQueryNodeProcessor, PhraseSlopQueryNodeProcessor, RemoveDeletedQueryNodesProcessor, RemoveEmptyNonLeafQueryNodeProcessor, WildcardQueryNodeProcessor
public abstract class QueryNodeProcessorImpl
extends Object
implements QueryNodeProcessor

This is a default implementation for the QueryNodeProcessor interface, it's an abstract class, so it should be extended by classes that want to process a QueryNode tree.

This class process QueryNodes from left to right in the tree. While it's walking down the tree, for every node, preProcessNode(QueryNode) is invoked. After a node's children are processed, postProcessNode(QueryNode) is invoked for that node. setChildrenOrder(List) is invoked before postProcessNode(QueryNode) only if the node has at least one child, in setChildrenOrder(List) the implementor might redefine the children order or remove any children from the children list.

Here is an example about how it process the nodes:

      a
     / \
    b   e
   / \
  c   d
Here is the order the methods would be invoked for the tree described above:
      preProcessNode( a );
      preProcessNode( b );
      preProcessNode( c );
      postProcessNode( c );
      preProcessNode( d );
      postProcessNode( d );
      setChildrenOrder( bChildrenList );
      postProcessNode( b );
      preProcessNode( e );
      postProcessNode( e );
      setChildrenOrder( aChildrenList );
      postProcessNode( a )

See Also:
QueryNodeProcessor

Constructor Summary
QueryNodeProcessorImpl()
QueryNodeProcessorImpl(QueryConfigHandler queryConfigHandler)
Method Summary
 QueryConfigHandler getQueryConfigHandler()
For reference about this method check: QueryNodeProcessor.getQueryConfigHandler().
protected abstract  QueryNode postProcessNode(QueryNode node)
This method is invoked for every node when walking up the tree.
protected abstract  QueryNode preProcessNode(QueryNode node)
This method is invoked for every node when walking down the tree.
 QueryNode process(QueryNode queryTree)
Processes a query node tree.
protected  void processChildren(QueryNode queryTree)
This method is called every time a child is processed.
protected abstract  List<QueryNode> setChildrenOrder(List<QueryNode> children)
This method is invoked for every node that has at least on child.
 void setQueryConfigHandler(QueryConfigHandler queryConfigHandler)
For reference about this method check: QueryNodeProcessor.setQueryConfigHandler(QueryConfigHandler).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

QueryNodeProcessorImpl

public QueryNodeProcessorImpl()

QueryNodeProcessorImpl

public QueryNodeProcessorImpl(QueryConfigHandler queryConfigHandler)
Method Detail

process

public QueryNode process(QueryNode queryTree)
                  throws QueryNodeException
Description copied from interface: QueryNodeProcessor
Processes a query node tree. It may return the same or another query tree. I should never return null.

Specified by:
process in interface QueryNodeProcessor
Parameters:
queryTree - tree root node
Returns:
the processed query tree
Throws:
QueryNodeException

processChildren

protected void processChildren(QueryNode queryTree)
                        throws QueryNodeException
This method is called every time a child is processed.

Parameters:
queryTree - the query node child to be processed
Throws:
QueryNodeException - if something goes wrong during the query node processing

setQueryConfigHandler

public void setQueryConfigHandler(QueryConfigHandler queryConfigHandler)
For reference about this method check: QueryNodeProcessor.setQueryConfigHandler(QueryConfigHandler).

Specified by:
setQueryConfigHandler in interface QueryNodeProcessor
Parameters:
queryConfigHandler - the query configuration handler to be set.
See Also:
QueryNodeProcessor.getQueryConfigHandler(), QueryConfigHandler

getQueryConfigHandler

public QueryConfigHandler getQueryConfigHandler()
For reference about this method check: QueryNodeProcessor.getQueryConfigHandler().

Specified by:
getQueryConfigHandler in interface QueryNodeProcessor
Returns:
QueryConfigHandler the query configuration handler to be set.
See Also:
QueryNodeProcessor.setQueryConfigHandler(QueryConfigHandler), QueryConfigHandler

preProcessNode

protected abstract QueryNode preProcessNode(QueryNode node)
                                     throws QueryNodeException
This method is invoked for every node when walking down the tree.

Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

postProcessNode

protected abstract QueryNode postProcessNode(QueryNode node)
                                      throws QueryNodeException
This method is invoked for every node when walking up the tree.

Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected abstract List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                             throws QueryNodeException
This method is invoked for every node that has at least on child. It's invoked right before postProcessNode(QueryNode) is invoked.

Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryNodeProcessorPipeline

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.processors
Class QueryNodeProcessorPipeline

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline
All Implemented Interfaces:
Iterable<QueryNodeProcessor>, Collection<QueryNodeProcessor>, List<QueryNodeProcessor>, QueryNodeProcessor
Direct Known Subclasses:
StandardQueryNodeProcessorPipeline
public class QueryNodeProcessorPipeline
extends Object
implements QueryNodeProcessor, List<QueryNodeProcessor>

A QueryNodeProcessorPipeline class should be used to build a query node processor pipeline. When a query node tree is processed using this class, it passes the query node tree to each processor on the pipeline and the result from each processor is passed to the next one, always following the order the processors were on the pipeline. When a QueryConfigHandler object is set on a QueryNodeProcessorPipeline, it also takes care of setting this QueryConfigHandler on all processor on pipeline.

Constructor Summary
QueryNodeProcessorPipeline()
Constructs an empty query node processor pipeline.
QueryNodeProcessorPipeline(QueryConfigHandler queryConfigHandler)
Constructs with a QueryConfigHandler object.
Method Summary
 void add(int index, QueryNodeProcessor processor)
 boolean add(QueryNodeProcessor processor)
 boolean addAll(Collection<? extends QueryNodeProcessor> c)
 boolean addAll(int index, Collection<? extends QueryNodeProcessor> c)
 void addProcessor(QueryNodeProcessor processor)
Deprecated. this class now conforms to List interface, so use add(QueryNodeProcessor) instead
 void clear()
 boolean contains(Object o)
 boolean containsAll(Collection<?> c)
 QueryNodeProcessor get(int index)
 QueryConfigHandler getQueryConfigHandler()
For reference about this method check: QueryNodeProcessor.getQueryConfigHandler().
 int indexOf(Object o)
 boolean isEmpty()
 Iterator<QueryNodeProcessor> iterator()
 int lastIndexOf(Object o)
 ListIterator<QueryNodeProcessor> listIterator()
 ListIterator<QueryNodeProcessor> listIterator(int index)
 QueryNode process(QueryNode queryTree)
For reference about this method check: QueryNodeProcessor.process(QueryNode).
 QueryNodeProcessor remove(int index)
 boolean remove(Object o)
 boolean removeAll(Collection<?> c)
 boolean retainAll(Collection<?> c)
 QueryNodeProcessor set(int index, QueryNodeProcessor processor)
 void setQueryConfigHandler(QueryConfigHandler queryConfigHandler)
For reference about this method check: QueryNodeProcessor.setQueryConfigHandler(QueryConfigHandler).
 int size()
 List<QueryNodeProcessor> subList(int fromIndex, int toIndex)
 Object[] toArray()
<T> T[]
toArray(T[] array)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.List
equals, hashCode

Constructor Detail

QueryNodeProcessorPipeline

public QueryNodeProcessorPipeline()
Constructs an empty query node processor pipeline.

QueryNodeProcessorPipeline

public QueryNodeProcessorPipeline(QueryConfigHandler queryConfigHandler)
Constructs with a QueryConfigHandler object.

Method Detail

getQueryConfigHandler

public QueryConfigHandler getQueryConfigHandler()
For reference about this method check: QueryNodeProcessor.getQueryConfigHandler().

Specified by:
getQueryConfigHandler in interface QueryNodeProcessor
Returns:
QueryConfigHandler the query configuration handler to be set.
See Also:
QueryNodeProcessor.setQueryConfigHandler(QueryConfigHandler), QueryConfigHandler

process

public QueryNode process(QueryNode queryTree)
                  throws QueryNodeException
For reference about this method check: QueryNodeProcessor.process(QueryNode).

Specified by:
process in interface QueryNodeProcessor
Parameters:
queryTree - the query node tree to be processed
Returns:
the processed query tree
Throws:
QueryNodeException - if something goes wrong during the query node processing
See Also:
QueryNode

addProcessor

@Deprecated
public void addProcessor(QueryNodeProcessor processor)
Deprecated. this class now conforms to List interface, so use add(QueryNodeProcessor) instead

Adds a processor to the pipeline, it's always added to the end of the pipeline.

Parameters:
processor - the processor to be added

setQueryConfigHandler

public void setQueryConfigHandler(QueryConfigHandler queryConfigHandler)
For reference about this method check: QueryNodeProcessor.setQueryConfigHandler(QueryConfigHandler).

Specified by:
setQueryConfigHandler in interface QueryNodeProcessor
Parameters:
queryConfigHandler - the query configuration handler to be set.
See Also:
QueryNodeProcessor.getQueryConfigHandler(), QueryConfigHandler

add

public boolean add(QueryNodeProcessor processor)
Specified by:
add in interface Collection<QueryNodeProcessor>
Specified by:
add in interface List<QueryNodeProcessor>
See Also:
List.add(Object)

add

public void add(int index,
                QueryNodeProcessor processor)
Specified by:
add in interface List<QueryNodeProcessor>
See Also:
List.add(int, Object)

addAll

public boolean addAll(Collection<? extends QueryNodeProcessor> c)
Specified by:
addAll in interface Collection<QueryNodeProcessor>
Specified by:
addAll in interface List<QueryNodeProcessor>
See Also:
List.addAll(Collection)

addAll

public boolean addAll(int index,
                      Collection<? extends QueryNodeProcessor> c)
Specified by:
addAll in interface List<QueryNodeProcessor>
See Also:
List.addAll(int, Collection)

clear

public void clear()
Specified by:
clear in interface Collection<QueryNodeProcessor>
Specified by:
clear in interface List<QueryNodeProcessor>
See Also:
List.clear()

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<QueryNodeProcessor>
Specified by:
contains in interface List<QueryNodeProcessor>
See Also:
List.contains(Object)

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<QueryNodeProcessor>
Specified by:
containsAll in interface List<QueryNodeProcessor>
See Also:
List.containsAll(Collection)

get

public QueryNodeProcessor get(int index)
Specified by:
get in interface List<QueryNodeProcessor>
See Also:
List.get(int)

indexOf

public int indexOf(Object o)
Specified by:
indexOf in interface List<QueryNodeProcessor>
See Also:
List.indexOf(Object)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<QueryNodeProcessor>
Specified by:
isEmpty in interface List<QueryNodeProcessor>
See Also:
List.isEmpty()

iterator

public Iterator<QueryNodeProcessor> iterator()
Specified by:
iterator in interface Iterable<QueryNodeProcessor>
Specified by:
iterator in interface Collection<QueryNodeProcessor>
Specified by:
iterator in interface List<QueryNodeProcessor>
See Also:
List.iterator()

lastIndexOf

public int lastIndexOf(Object o)
Specified by:
lastIndexOf in interface List<QueryNodeProcessor>
See Also:
List.lastIndexOf(Object)

listIterator

public ListIterator<QueryNodeProcessor> listIterator()
Specified by:
listIterator in interface List<QueryNodeProcessor>
See Also:
List.listIterator()

listIterator

public ListIterator<QueryNodeProcessor> listIterator(int index)
Specified by:
listIterator in interface List<QueryNodeProcessor>
See Also:
List.listIterator(int)

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<QueryNodeProcessor>
Specified by:
remove in interface List<QueryNodeProcessor>
See Also:
List.remove(Object)

remove

public QueryNodeProcessor remove(int index)
Specified by:
remove in interface List<QueryNodeProcessor>
See Also:
List.remove(int)

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<QueryNodeProcessor>
Specified by:
removeAll in interface List<QueryNodeProcessor>
See Also:
List.removeAll(Collection)

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<QueryNodeProcessor>
Specified by:
retainAll in interface List<QueryNodeProcessor>
See Also:
List.retainAll(Collection)

set

public QueryNodeProcessor set(int index,
                              QueryNodeProcessor processor)
Specified by:
set in interface List<QueryNodeProcessor>
See Also:
List.set(int, Object)

size

public int size()
Specified by:
size in interface Collection<QueryNodeProcessor>
Specified by:
size in interface List<QueryNodeProcessor>
See Also:
List.size()

subList

public List<QueryNodeProcessor> subList(int fromIndex,
                                        int toIndex)
Specified by:
subList in interface List<QueryNodeProcessor>
See Also:
List.subList(int, int)

toArray

public <T> T[] toArray(T[] array)
Specified by:
toArray in interface Collection<QueryNodeProcessor>
Specified by:
toArray in interface List<QueryNodeProcessor>
See Also:
List.toArray(Object[])

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<QueryNodeProcessor>
Specified by:
toArray in interface List<QueryNodeProcessor>
See Also:
List.toArray()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RemoveDeletedQueryNodesProcessor

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.processors
Class RemoveDeletedQueryNodesProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.core.processors.RemoveDeletedQueryNodesProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class RemoveDeletedQueryNodesProcessor
extends QueryNodeProcessorImpl

A QueryNodeProcessorPipeline class removes every instance of DeletedQueryNode from a query node tree. If the resulting root node is a DeletedQueryNode, MatchNoDocsQueryNode is returned.

Constructor Summary
RemoveDeletedQueryNodesProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
QueryNode | process(QueryNode queryTree) Processes a query node tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RemoveDeletedQueryNodesProcessor

public RemoveDeletedQueryNodesProcessor()
Method Detail

process

public QueryNode process(QueryNode queryTree)
                  throws QueryNodeException
Description copied from interface: QueryNodeProcessor
Processes a query node tree. It may return the same or another query tree. I should never return null.

Specified by:
process in interface QueryNodeProcessor
Overrides:
process in class QueryNodeProcessorImpl
Parameters:
queryTree - tree root node
Returns:
the processed query tree
Throws:
QueryNodeException

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.queryParser.core.processors.NoChildOptimizationQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.processors.NoChildOptimizationQueryNodeProcessor

No usage of org.apache.lucene.queryParser.core.processors.NoChildOptimizationQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.core.processors.QueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.core.processors.QueryNodeProcessor

Packages that use QueryNodeProcessor
org.apache.lucene.queryParser.core | Contains the core classes of the flexible query parser framework
org.apache.lucene.queryParser.core.processors | Interfaces and implementations used by query node processors
org.apache.lucene.queryParser.precedence.processors | This package contains the processors used by Precedence Query Parser
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.processors | Lucene Query Node Processors

Uses of QueryNodeProcessor in org.apache.lucene.queryParser.core

Methods in org.apache.lucene.queryParser.core that return QueryNodeProcessor
 QueryNodeProcessor QueryParserHelper.getQueryNodeProcessor()
Returns the processor object used to process the query node tree, it returns null if no processor is used.

Methods in org.apache.lucene.queryParser.core with parameters of type QueryNodeProcessor
 void QueryParserHelper.setQueryNodeProcessor(QueryNodeProcessor processor)
Sets the processor that will be used to process the query node tree.

Constructors in org.apache.lucene.queryParser.core with parameters of type QueryNodeProcessor
QueryParserHelper(QueryConfigHandler queryConfigHandler, SyntaxParser syntaxParser, QueryNodeProcessor processor, QueryBuilder builder)
Creates a query parser helper object using the specified configuration, text parser, processor and builder.

Uses of QueryNodeProcessor in org.apache.lucene.queryParser.core.processors

Classes in org.apache.lucene.queryParser.core.processors that implement QueryNodeProcessor
class | NoChildOptimizationQueryNodeProcessor A NoChildOptimizationQueryNodeProcessor removes every BooleanQueryNode, BoostQueryNode, TokenizedPhraseQueryNode or ModifierQueryNode that do not have a valid children.
class | QueryNodeProcessorImpl This is a default implementation for the QueryNodeProcessor interface, it's an abstract class, so it should be extended by classes that want to process a QueryNode tree.
class | QueryNodeProcessorPipeline A QueryNodeProcessorPipeline class should be used to build a query node processor pipeline.
class | RemoveDeletedQueryNodesProcessor A QueryNodeProcessorPipeline class removes every instance of DeletedQueryNode from a query node tree.

Methods in org.apache.lucene.queryParser.core.processors that return QueryNodeProcessor
QueryNodeProcessor | QueryNodeProcessorPipeline.get(int index)
QueryNodeProcessor | QueryNodeProcessorPipeline.remove(int index)
QueryNodeProcessor | QueryNodeProcessorPipeline.set(int index, QueryNodeProcessor processor)

Methods in org.apache.lucene.queryParser.core.processors that return types with arguments of type QueryNodeProcessor
Iterator<QueryNodeProcessor> | QueryNodeProcessorPipeline.iterator()
ListIterator<QueryNodeProcessor> | QueryNodeProcessorPipeline.listIterator()
ListIterator<QueryNodeProcessor> | QueryNodeProcessorPipeline.listIterator(int index)
List<QueryNodeProcessor> | QueryNodeProcessorPipeline.subList(int fromIndex, int toIndex)

Methods in org.apache.lucene.queryParser.core.processors with parameters of type QueryNodeProcessor
 void QueryNodeProcessorPipeline.add(int index, QueryNodeProcessor processor)
 boolean QueryNodeProcessorPipeline.add(QueryNodeProcessor processor)
 void QueryNodeProcessorPipeline.addProcessor(QueryNodeProcessor processor)
Deprecated. this class now conforms to List interface, so use QueryNodeProcessorPipeline.add(QueryNodeProcessor) instead
 QueryNodeProcessor QueryNodeProcessorPipeline.set(int index, QueryNodeProcessor processor)

Method parameters in org.apache.lucene.queryParser.core.processors with type arguments of type QueryNodeProcessor
boolean | QueryNodeProcessorPipeline.addAll(Collection<? extends QueryNodeProcessor> c)
boolean | QueryNodeProcessorPipeline.addAll(int index, Collection<? extends QueryNodeProcessor> c)

Uses of QueryNodeProcessor in org.apache.lucene.queryParser.precedence.processors

Classes in org.apache.lucene.queryParser.precedence.processors that implement QueryNodeProcessor
class | BooleanModifiersQueryNodeProcessor This processor is used to apply the correct ModifierQueryNode to BooleanQueryNodes children.
class | PrecedenceQueryNodeProcessorPipeline This processor pipeline extends StandardQueryNodeProcessorPipeline and enables boolean precedence on it.

Uses of QueryNodeProcessor in org.apache.lucene.queryParser.standard

Methods in org.apache.lucene.queryParser.standard that return QueryNodeProcessor
 QueryNodeProcessor QueryParserWrapper.getQueryProcessor()
Deprecated. Returns QueryNodeProcessor used to process the query node tree generated by the StandardSyntaxParser.

Methods in org.apache.lucene.queryParser.standard with parameters of type QueryNodeProcessor
 void QueryParserWrapper.setQueryProcessor(QueryNodeProcessor processor)
Deprecated. Sets the QueryNodeProcessor used to process the query node tree generated by the StandardSyntaxParser.

Uses of QueryNodeProcessor in org.apache.lucene.queryParser.standard.processors

Classes in org.apache.lucene.queryParser.standard.processors that implement QueryNodeProcessor
class | AllowLeadingWildcardProcessor This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.ALLOW_LEADING_WILDCARD is defined in the QueryConfigHandler.
class | AnalyzerQueryNodeProcessor This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.ANALYZER is defined in the QueryConfigHandler.
class | BooleanSingleChildOptimizationQueryNodeProcessor This processor removes every BooleanQueryNode that contains only one child and returns this child.
class | BoostQueryNodeProcessor This processor iterates the query node tree looking for every FieldableNode that has StandardQueryConfigHandler.ConfigurationKeys.BOOST in its config.
class | DefaultPhraseSlopQueryNodeProcessor This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.PHRASE_SLOP is defined in the QueryConfigHandler.
class | FuzzyQueryNodeProcessor This processor iterates the query node tree looking for every FuzzyQueryNode, when this kind of node is found, it checks on the query configuration for StandardQueryConfigHandler.ConfigurationKeys.FUZZY_CONFIG, gets the fuzzy prefix length and default similarity from it and set to the fuzzy node.
class | GroupQueryNodeProcessor The SyntaxParser generates query node trees that consider the boolean operator precedence, but Lucene current syntax does not support boolean precedence, so this processor remove all the precedence and apply the equivalent modifier according to the boolean operation defined on an specific query node.
class | LowercaseExpandedTermsQueryNodeProcessor This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.LOWERCASE_EXPANDED_TERMS is defined in the QueryConfigHandler.
class | MatchAllDocsQueryNodeProcessor This processor converts every WildcardQueryNode that is "*:*" to MatchAllDocsQueryNode.
class | MultiFieldQueryNodeProcessor This processor is used to expand terms so the query looks for the same term in different fields.
class | MultiTermRewriteMethodProcessor This processor instates the default MultiTermQuery.RewriteMethod, MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT, for multi-term query nodes.
class | NumericQueryNodeProcessor This processor is used to convert FieldQueryNodes to NumericRangeQueryNodes.
class | NumericRangeQueryNodeProcessor This processor is used to convert ParametricRangeQueryNodes to NumericRangeQueryNodes.
class | ParametricRangeQueryNodeProcessor This processor converts ParametricRangeQueryNode objects to RangeQueryNode objects.
class | PhraseSlopQueryNodeProcessor This processor removes invalid SlopQueryNode objects in the query node tree.
class | RemoveEmptyNonLeafQueryNodeProcessor This processor removes every QueryNode that is not a leaf and has not children.
class | StandardQueryNodeProcessorPipeline This pipeline has all the processors needed to process a query node tree, generated by StandardSyntaxParser, already assembled.
class | WildcardQueryNodeProcessor The StandardSyntaxParser creates PrefixWildcardQueryNode nodes which have values containing the prefixed wildcard.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl

Packages that use QueryNodeProcessorImpl
org.apache.lucene.queryParser.core.processors | Interfaces and implementations used by query node processors
org.apache.lucene.queryParser.precedence.processors | This package contains the processors used by Precedence Query Parser
org.apache.lucene.queryParser.standard.processors | Lucene Query Node Processors

Uses of QueryNodeProcessorImpl in org.apache.lucene.queryParser.core.processors

Subclasses of QueryNodeProcessorImpl in org.apache.lucene.queryParser.core.processors
class | NoChildOptimizationQueryNodeProcessor A NoChildOptimizationQueryNodeProcessor removes every BooleanQueryNode, BoostQueryNode, TokenizedPhraseQueryNode or ModifierQueryNode that do not have a valid children.
class | RemoveDeletedQueryNodesProcessor A QueryNodeProcessorPipeline class removes every instance of DeletedQueryNode from a query node tree.

Uses of QueryNodeProcessorImpl in org.apache.lucene.queryParser.precedence.processors

Subclasses of QueryNodeProcessorImpl in org.apache.lucene.queryParser.precedence.processors
 class BooleanModifiersQueryNodeProcessor
This processor is used to apply the correct ModifierQueryNode to BooleanQueryNodes children.

Uses of QueryNodeProcessorImpl in org.apache.lucene.queryParser.standard.processors

Subclasses of QueryNodeProcessorImpl in org.apache.lucene.queryParser.standard.processors
class | AllowLeadingWildcardProcessor This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.ALLOW_LEADING_WILDCARD is defined in the QueryConfigHandler.
class | AnalyzerQueryNodeProcessor This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.ANALYZER is defined in the QueryConfigHandler.
class | BooleanSingleChildOptimizationQueryNodeProcessor This processor removes every BooleanQueryNode that contains only one child and returns this child.
class | BoostQueryNodeProcessor This processor iterates the query node tree looking for every FieldableNode that has StandardQueryConfigHandler.ConfigurationKeys.BOOST in its config.
class | DefaultPhraseSlopQueryNodeProcessor This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.PHRASE_SLOP is defined in the QueryConfigHandler.
class | FuzzyQueryNodeProcessor This processor iterates the query node tree looking for every FuzzyQueryNode, when this kind of node is found, it checks on the query configuration for StandardQueryConfigHandler.ConfigurationKeys.FUZZY_CONFIG, gets the fuzzy prefix length and default similarity from it and set to the fuzzy node.
class | LowercaseExpandedTermsQueryNodeProcessor This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.LOWERCASE_EXPANDED_TERMS is defined in the QueryConfigHandler.
class | MatchAllDocsQueryNodeProcessor This processor converts every WildcardQueryNode that is "*:*" to MatchAllDocsQueryNode.
class | MultiFieldQueryNodeProcessor This processor is used to expand terms so the query looks for the same term in different fields.
class | MultiTermRewriteMethodProcessor This processor instates the default MultiTermQuery.RewriteMethod, MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT, for multi-term query nodes.
class | NumericQueryNodeProcessor This processor is used to convert FieldQueryNodes to NumericRangeQueryNodes.
class | NumericRangeQueryNodeProcessor This processor is used to convert ParametricRangeQueryNodes to NumericRangeQueryNodes.
class | ParametricRangeQueryNodeProcessor This processor converts ParametricRangeQueryNode objects to RangeQueryNode objects.
class | PhraseSlopQueryNodeProcessor This processor removes invalid SlopQueryNode objects in the query node tree.
class | RemoveEmptyNonLeafQueryNodeProcessor This processor removes every QueryNode that is not a leaf and has not children.
class | WildcardQueryNodeProcessor The StandardSyntaxParser creates PrefixWildcardQueryNode nodes which have values containing the prefixed wildcard.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline

Packages that use QueryNodeProcessorPipeline
org.apache.lucene.queryParser.precedence.processors | This package contains the processors used by Precedence Query Parser
org.apache.lucene.queryParser.standard.processors | Lucene Query Node Processors

Uses of QueryNodeProcessorPipeline in org.apache.lucene.queryParser.precedence.processors

Subclasses of QueryNodeProcessorPipeline in org.apache.lucene.queryParser.precedence.processors
 class PrecedenceQueryNodeProcessorPipeline
This processor pipeline extends StandardQueryNodeProcessorPipeline and enables boolean precedence on it.

Uses of QueryNodeProcessorPipeline in org.apache.lucene.queryParser.standard.processors

Subclasses of QueryNodeProcessorPipeline in org.apache.lucene.queryParser.standard.processors
 class StandardQueryNodeProcessorPipeline
This pipeline has all the processors needed to process a query node tree, generated by StandardSyntaxParser, already assembled.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.processors.RemoveDeletedQueryNodesProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.processors.RemoveDeletedQueryNodesProcessor

No usage of org.apache.lucene.queryParser.core.processors.RemoveDeletedQueryNodesProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.queryParser.core.util
Classes
QueryNodeOperation
StringUtils
UnescapedCharSequence


org.apache.lucene.queryParser.core.util

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.core.util

Utility classes to used with the Query Parser

See:
Description

Class Summary
QueryNodeOperation | Allow joining 2 QueryNode Trees, into one.
StringUtils | Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
UnescapedCharSequence | CharsSequence with escaped chars information.

Package org.apache.lucene.queryParser.core.util Description

Utility classes to used with the Query Parser

Utility classes to used with the Query Parser

This package contains utility classes used with the query parsers.


org.apache.lucene.queryParser.core.util Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.core.util

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.core.util.QueryNodeOperation
    • org.apache.lucene.queryParser.core.util.StringUtils
    • org.apache.lucene.queryParser.core.util.UnescapedCharSequence (implements java.lang.CharSequence)


Uses of Package org.apache.lucene.queryParser.core.util

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.core.util

Packages that use org.apache.lucene.queryParser.core.util
org.apache.lucene.queryParser.standard.parser Lucene Query Parser

Classes in org.apache.lucene.queryParser.core.util used by org.apache.lucene.queryParser.standard.parser
UnescapedCharSequence
CharsSequence with escaped chars information.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


QueryNodeOperation

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.util
Class QueryNodeOperation

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.util.QueryNodeOperation

public final class QueryNodeOperation
extends Object

Allow joining 2 QueryNode Trees, into one.

Method Summary
static QueryNode logicalAnd(QueryNode q1, QueryNode q2)
perform a logical and of 2 QueryNode trees.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

logicalAnd

public static final QueryNode logicalAnd(QueryNode q1,
                                         QueryNode q2)
perform a logical and of 2 QueryNode trees. if q1 and q2 are ANDQueryNode nodes it uses head Node from q1 and adds the children of q2 to q1 if q1 is a AND node and q2 is not, add q2 as a child of the head node of q1 if q2 is a AND node and q1 is not, add q1 as a child of the head node of q2 if q1 and q2 are not ANDQueryNode nodes, create a AND node and make q1 and q2 children of that node if q1 or q2 is null it returns the not null node if q1 = q2 = null it returns null

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


StringUtils

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.util
Class StringUtils

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.util.StringUtils

public final class StringUtils
extends Object

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Constructor Summary
StringUtils()
Method Summary
static String toString(Object obj)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StringUtils

public StringUtils()
Method Detail

toString

public static String toString(Object obj)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnescapedCharSequence

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.core.util
Class UnescapedCharSequence

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.util.UnescapedCharSequence
All Implemented Interfaces:
CharSequence
public final class UnescapedCharSequence
extends Object
implements CharSequence

CharsSequence with escaped chars information.

Constructor Summary
UnescapedCharSequence(char[] chars, boolean[] wasEscaped, int offset, int length)
Create a escaped CharSequence
UnescapedCharSequence(CharSequence text)
Create a non-escaped CharSequence
Method Summary
char | charAt(int index)
int | length()
CharSequence | subSequence(int start, int end)
static CharSequence | toLowerCase(CharSequence text)
String | toString()
String | toStringEscaped() Return a escaped String
String | toStringEscaped(char[] enabledChars) Return a escaped String
static boolean | wasEscaped(CharSequence text, int index)
boolean | wasEscaped(int index)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnescapedCharSequence

public UnescapedCharSequence(char[] chars,
                             boolean[] wasEscaped,
                             int offset,
                             int length)
Create a escaped CharSequence

Parameters:
chars -
wasEscaped -
offset -
length -

UnescapedCharSequence

public UnescapedCharSequence(CharSequence text)
Create a non-escaped CharSequence

Parameters:
text -
Method Detail

charAt

public char charAt(int index)
Specified by:
charAt in interface CharSequence

length

public int length()
Specified by:
length in interface CharSequence

subSequence

public CharSequence subSequence(int start,
                                int end)
Specified by:
subSequence in interface CharSequence

toString

public String toString()
Specified by:
toString in interface CharSequence
Overrides:
toString in class Object

toStringEscaped

public String toStringEscaped()
Return a escaped String

Returns:
a escaped String

toStringEscaped

public String toStringEscaped(char[] enabledChars)
Return a escaped String

Parameters:
enabledChars - - array of chars to be escaped
Returns:
a escaped String

wasEscaped

public boolean wasEscaped(int index)

wasEscaped

public static final boolean wasEscaped(CharSequence text,
                                       int index)

toLowerCase

public static CharSequence toLowerCase(CharSequence text)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.queryParser.core.util.QueryNodeOperation

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.util.QueryNodeOperation

No usage of org.apache.lucene.queryParser.core.util.QueryNodeOperation

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.util.StringUtils

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.util.StringUtils

No usage of org.apache.lucene.queryParser.core.util.StringUtils

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.core.util.UnescapedCharSequence

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.core.util.UnescapedCharSequence

Packages that use UnescapedCharSequence
org.apache.lucene.queryParser.standard.parser Lucene Query Parser

Uses of UnescapedCharSequence in org.apache.lucene.queryParser.standard.parser

Methods in org.apache.lucene.queryParser.standard.parser that return UnescapedCharSequence
static UnescapedCharSequence EscapeQuerySyntaxImpl.discardEscapeChar(CharSequence input)
Returns a String where the escape char has been removed, or kept only once if there was a double escape.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ExtendableQueryParser

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.ext
Class ExtendableQueryParser

java.lang.Object
    extended by  org.apache.lucene.queryParser.QueryParser
        extended by  org.apache.lucene.queryParser.ext.ExtendableQueryParser
All Implemented Interfaces:
QueryParserConstants
public class ExtendableQueryParser
extends QueryParser

The ExtendableQueryParser enables arbitrary query parser extension based on a customizable field naming scheme. The lucene query syntax allows implicit and explicit field definitions as query prefix followed by a colon (':') character. The ExtendableQueryParser allows to encode extension keys into the field symbol associated with a registered instance of ParserExtension. A customizable separation character separates the extension key from the actual field symbol. The ExtendableQueryParser splits (@see Extensions.splitExtensionField(String, String)) the extension key from the field symbol and tries to resolve the associated ParserExtension. If the parser can't resolve the key or the field token does not contain a separation character, ExtendableQueryParser yields the same behavior as its super class QueryParser. Otherwise, if the key is associated with a ParserExtension instance, the parser builds an instance of ExtensionQuery to be processed by ParserExtension.parse(ExtensionQuery).If a extension field does not contain a field part the default field for the query will be used.

To guarantee that an extension field is processed with its associated extension, the extension query part must escape any special characters like '*' or '['. If the extension query contains any whitespace characters, the extension query part must be enclosed in quotes. Example ('_' used as separation character):

   title_customExt:"Apache Lucene\?" OR content_customExt:prefix\*
Search on the default field:
   _customExt:"Apache Lucene\?" OR _customExt:prefix\*

The ExtendableQueryParser itself does not implement the logic how field and extension key are separated or ordered. All logic regarding the extension key and field symbol parsing is located in Extensions. Customized extension schemes should be implemented by sub-classing Extensions.

For details about the default encoding scheme see Extensions.

See Also:
Extensions, ParserExtension, ExtensionQuery

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.queryParser.QueryParser
QueryParser.Operator
Field Summary
Fields inherited from class org.apache.lucene.queryParser.QueryParser
AND_OPERATOR, jj_nt, OR_OPERATOR, token, token_source
Fields inherited from interface org.apache.lucene.queryParser.QueryParserConstants
_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, BAREOPER, Boost, CARAT, COLON, DEFAULT, EOF, FUZZY_SLOP, LPAREN, MINUS, NOT, NUMBER, OR, PLUS, PREFIXTERM, QUOTED, RangeEx, RANGEEX_END, RANGEEX_GOOP, RANGEEX_QUOTED, RANGEEX_START, RANGEEX_TO, RangeIn, RANGEIN_END, RANGEIN_GOOP, RANGEIN_QUOTED, RANGEIN_START, RANGEIN_TO, RPAREN, STAR, TERM, tokenImage, WILDTERM
Constructor Summary
ExtendableQueryParser(Version matchVersion, String f, Analyzer a)
Creates a new ExtendableQueryParser instance
ExtendableQueryParser(Version matchVersion, String f, Analyzer a, Extensions ext)
Creates a new ExtendableQueryParser instance
Method Summary
char | getExtensionFieldDelimiter() Returns the extension field delimiter character.
protected Query | getFieldQuery(String field, String queryText, boolean quoted)
Methods inherited from class org.apache.lucene.queryParser.QueryParser
addClause, Clause, Conjunction, disable_tracing, enable_tracing, escape, generateParseException, getAllowLeadingWildcard, getAnalyzer, getAutoGeneratePhraseQueries, getBooleanQuery, getBooleanQuery, getDateResolution, getDefaultOperator, getEnablePositionIncrements, getField, getFieldQuery, getFieldQuery, getFuzzyMinSim, getFuzzyPrefixLength, getFuzzyQuery, getLocale, getLowercaseExpandedTerms, getMultiTermRewriteMethod, getNextToken, getPhraseSlop, getPrefixQuery, getRangeCollator, getRangeQuery, getToken, getWildcardQuery, main, Modifiers, newBooleanClause, newBooleanQuery, newFuzzyQuery, newMatchAllDocsQuery, newMultiPhraseQuery, newPhraseQuery, newPrefixQuery, newRangeQuery, newTermQuery, newWildcardQuery, parse, Query, ReInit, ReInit, setAllowLeadingWildcard, setAutoGeneratePhraseQueries, setDateResolution, setDateResolution, setDefaultOperator, setEnablePositionIncrements, setFuzzyMinSim, setFuzzyPrefixLength, setLocale, setLowercaseExpandedTerms, setMultiTermRewriteMethod, setPhraseSlop, setRangeCollator, Term, TopLevelQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ExtendableQueryParser

public ExtendableQueryParser(Version matchVersion,
                             String f,
                             Analyzer a)
Creates a new ExtendableQueryParser instance

Parameters:
matchVersion - the lucene version to use.
f - the default query field
a - the analyzer used to find terms in a query string

ExtendableQueryParser

public ExtendableQueryParser(Version matchVersion,
                             String f,
                             Analyzer a,
                             Extensions ext)
Creates a new ExtendableQueryParser instance

Parameters:
matchVersion - the lucene version to use.
f - the default query field
a - the analyzer used to find terms in a query string
ext - the query parser extensions
Method Detail

getExtensionFieldDelimiter

public char getExtensionFieldDelimiter()
Returns the extension field delimiter character.

Returns:
the extension field delimiter character.

getFieldQuery

protected Query getFieldQuery(String field,
                              String queryText,
                              boolean quoted)
                       throws ParseException
Overrides:
getFieldQuery in class QueryParser
Throws:
ParseException - throw in overridden method to disallow
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ExtensionQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.ext
Class ExtensionQuery

java.lang.Object
    extended by  org.apache.lucene.queryParser.ext.ExtensionQuery

public class ExtensionQuery
extends Object

ExtensionQuery holds all query components extracted from the original query string like the query field and the extension query string.

See Also:
Extensions, ExtendableQueryParser, ParserExtension

Constructor Summary
ExtensionQuery(QueryParser topLevelParser, String field, String rawQueryString)
Creates a new ExtensionQuery
Method Summary
String | getField() Returns the query field
String | getRawQueryString() Returns the raw extension query string
QueryParser | getTopLevelParser() Returns the top level parser which created this ExtensionQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ExtensionQuery

public ExtensionQuery(QueryParser topLevelParser,
                      String field,
                      String rawQueryString)
Creates a new ExtensionQuery

Parameters:
field - the query field
rawQueryString - the raw extension query string
Method Detail

getField

public String getField()
Returns the query field

Returns:
the query field

getRawQueryString

public String getRawQueryString()
Returns the raw extension query string

Returns:
the raw extension query string

getTopLevelParser

public QueryParser getTopLevelParser()
Returns the top level parser which created this ExtensionQuery

Returns:
the top level parser which created this ExtensionQuery
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Extensions

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.ext
Class Extensions

java.lang.Object
    extended by  org.apache.lucene.queryParser.ext.Extensions

public class Extensions
extends Object

The Extensions class represents an extension mapping to associate ParserExtension instances with extension keys. An extension key is a string encoded into a Lucene standard query parser field symbol recognized by ExtendableQueryParser. The query parser passes each extension field token to splitExtensionField(String, String) to separate the extension key from the field identifier.

In addition to the key to extension mapping this class also defines the field name overloading scheme. ExtendableQueryParser uses the given extension to split the actual field name and extension key by calling splitExtensionField(String, String). To change the order or the key / field name encoding scheme users can subclass Extensions to implement their own.

See Also:
ExtendableQueryParser, ParserExtension

Nested Class Summary
static class Extensions.Pair<Cur,Cud>
This class represents a generic pair.
Field Summary
static char DEFAULT_EXTENSION_FIELD_DELIMITER
The default extension field delimiter character.
Constructor Summary
Extensions()
Creates a new Extensions instance with the DEFAULT_EXTENSION_FIELD_DELIMITER as a delimiter character.
Extensions(char extensionFieldDelimiter)
Creates a new Extensions instance
Method Summary
void | add(String key, ParserExtension extension) Adds a new ParserExtension instance associated with the given key.
String | buildExtensionField(String extensionKey) Builds an extension field string from a given extension key and the default query field.
String | buildExtensionField(String extensionKey, String field) Builds an extension field string from a given extension key and the extensions field.
String | escapeExtensionField(String extfield) Escapes an extension field.
ParserExtension | getExtension(String key) Returns the ParserExtension instance for the given key or null if no extension can be found for the key.
char | getExtensionFieldDelimiter() Returns the extension field delimiter
Extensions.Pair<String,String> | splitExtensionField(String defaultField, String field) Splits a extension field and returns the field / extension part as a Extensions.Pair.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_EXTENSION_FIELD_DELIMITER

public static final char DEFAULT_EXTENSION_FIELD_DELIMITER
The default extension field delimiter character. This constant is set to ':'

See Also:
Constant Field Values
Constructor Detail

Extensions

public Extensions()
Creates a new Extensions instance with the DEFAULT_EXTENSION_FIELD_DELIMITER as a delimiter character.

Extensions

public Extensions(char extensionFieldDelimiter)
Creates a new Extensions instance

Parameters:
extensionFieldDelimiter - the extensions field delimiter character
Method Detail

add

public void add(String key,
                ParserExtension extension)
Adds a new ParserExtension instance associated with the given key.

Parameters:
key - the parser extension key
extension - the parser extension

getExtension

public final ParserExtension getExtension(String key)
Returns the ParserExtension instance for the given key or null if no extension can be found for the key.

Parameters:
key - the extension key
Returns:
the ParserExtension instance for the given key or null if no extension can be found for the key.

getExtensionFieldDelimiter

public char getExtensionFieldDelimiter()
Returns the extension field delimiter

Returns:
the extension field delimiter

splitExtensionField

public Extensions.Pair<String,String> splitExtensionField(String defaultField,
                                                          String field)
Splits a extension field and returns the field / extension part as a Extensions.Pair. This method tries to split on the first occurrence of the extension field delimiter, if the delimiter is not present in the string the result will contain a null value for the extension key and the given field string as the field value. If the given extension field string contains no field identifier the result pair will carry the given default field as the field value.

Parameters:
defaultField - the default query field
field - the extension field string
Returns:
a Extensions.Pair with the field name as the Extensions.Pair.cur and the extension key as the Extensions.Pair.cud

escapeExtensionField

public String escapeExtensionField(String extfield)
Escapes an extension field. The default implementation is equivalent to QueryParser.escape(String).

Parameters:
extfield - the extension field identifier
Returns:
the extension field identifier with all special chars escaped with a backslash character.

buildExtensionField

public String buildExtensionField(String extensionKey)
Builds an extension field string from a given extension key and the default query field. The default field and the key are delimited with the extension field delimiter character. This method makes no assumption about the order of the extension key and the field. By default the extension key is appended to the end of the returned string while the field is added to the beginning. Special Query characters are escaped in the result.

Note: Extensions subclasses must maintain the contract between buildExtensionField(String) and splitExtensionField(String, String) where the latter inverts the former.

buildExtensionField

public String buildExtensionField(String extensionKey,
                                  String field)
Builds an extension field string from a given extension key and the extensions field. The field and the key are delimited with the extension field delimiter character. This method makes no assumption about the order of the extension key and the field. By default the extension key is appended to the end of the returned string while the field is added to the beginning. Special Query characters are escaped in the result.

Note: Extensions subclasses must maintain the contract between buildExtensionField(String, String) and splitExtensionField(String, String) where the latter inverts the former.

Parameters:
extensionKey - the extension key
field - the field to apply the extension on.
Returns:
escaped extension field identifier
See Also:
to use the default query field
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Extensions.Pair

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.ext
Class Extensions.Pair<Cur,Cud>

java.lang.Object
    extended by  org.apache.lucene.queryParser.ext.Extensions.Pair<Cur,Cud>
Type Parameters:
Cur - the pairs first element
Cud - the pairs last element of the pair.
Enclosing class:
Extensions
public static class Extensions.Pair<Cur,Cud>
extends Object

This class represents a generic pair.

Field Summary
Cud | cud
Cur | cur
Constructor Summary
Extensions.Pair(Cur cur, Cud cud)
Creates a new Pair
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

cur

public final Cur cur

cud

public final Cud cud
Constructor Detail

Extensions.Pair

public Extensions.Pair(Cur cur,
                       Cud cud)
Creates a new Pair

Parameters:
cur - the pairs first element
cud - the pairs last element
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.ext
Classes
ExtendableQueryParser
ExtensionQuery
Extensions
Extensions.Pair
ParserExtension


org.apache.lucene.queryParser.ext

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.ext

Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.

See:
Description

Class Summary
ExtendableQueryParser | The ExtendableQueryParser enables arbitrary query parser extension based on a customizable field naming scheme.
ExtensionQuery | ExtensionQuery holds all query components extracted from the original query string like the query field and the extension query string.
Extensions | The Extensions class represents an extension mapping to associate ParserExtension instances with extension keys.
Extensions.Pair<Cur,Cud> | This class represents a generic pair.
ParserExtension | This class represents an extension base class to the Lucene standard QueryParser.

Package org.apache.lucene.queryParser.ext Description

Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.


org.apache.lucene.queryParser.ext Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.ext

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.ext.ExtensionQuery
    • org.apache.lucene.queryParser.ext.Extensions
    • org.apache.lucene.queryParser.ext.Extensions.Pair<Cur,Cud>
    • org.apache.lucene.queryParser.ext.ParserExtension
    • org.apache.lucene.queryParser.QueryParser (implements org.apache.lucene.queryParser.QueryParserConstants)
      • org.apache.lucene.queryParser.ext.ExtendableQueryParser


Uses of Package org.apache.lucene.queryParser.ext

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.ext

Packages that use org.apache.lucene.queryParser.ext
org.apache.lucene.queryParser.ext Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.

Classes in org.apache.lucene.queryParser.ext used by org.apache.lucene.queryParser.ext
ExtensionQuery
ExtensionQuery holds all query components extracted from the original query string like the query field and the extension query string.
Extensions
The Extensions class represents an extension mapping to associate ParserExtension instances with extension keys.
Extensions.Pair
This class represents a generic pair.
ParserExtension
This class represents an extension base class to the Lucene standard QueryParser.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ParserExtension

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.ext
Class ParserExtension

java.lang.Object
    extended by  org.apache.lucene.queryParser.ext.ParserExtension

public abstract class ParserExtension
extends Object

This class represents an extension base class to the Lucene standard QueryParser. The QueryParser is generated by the JavaCC parser generator. Changing or adding functionality or syntax in the standard query parser requires changes to the JavaCC source file. To enable extending the standard query parser without changing the JavaCC sources and re-generate the parser the ParserExtension can be customized and plugged into an instance of ExtendableQueryParser, a direct subclass of QueryParser.

See Also:
Extensions, ExtendableQueryParser

Constructor Summary
ParserExtension()
Method Summary
abstract  Query parse(ExtensionQuery query)
Processes the given ExtensionQuery and returns a corresponding Query instance.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ParserExtension

public ParserExtension()
Method Detail

parse

public abstract Query parse(ExtensionQuery query)
                     throws ParseException
Processes the given ExtensionQuery and returns a corresponding Query instance. Subclasses must either return a Query instance or raise a ParseException. This method must not return null.

Parameters:
query - the extension query
Returns:
a new query instance
Throws:
ParseException - if the query can not be parsed.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.queryParser.ext.ExtendableQueryParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.ext.ExtendableQueryParser

No usage of org.apache.lucene.queryParser.ext.ExtendableQueryParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.ext.ExtensionQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.ext.ExtensionQuery

Packages that use ExtensionQuery
org.apache.lucene.queryParser.ext Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.

Uses of ExtensionQuery in org.apache.lucene.queryParser.ext

Methods in org.apache.lucene.queryParser.ext with parameters of type ExtensionQuery
abstract  Query ParserExtension.parse(ExtensionQuery query)
Processes the given ExtensionQuery and returns a corresponding Query instance.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.ext.Extensions

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.ext.Extensions

Packages that use Extensions
org.apache.lucene.queryParser.ext Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.

Uses of Extensions in org.apache.lucene.queryParser.ext

Constructors in org.apache.lucene.queryParser.ext with parameters of type Extensions
ExtendableQueryParser(Version matchVersion, String f, Analyzer a, Extensions ext)
Creates a new ExtendableQueryParser instance

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.ext.Extensions.Pair

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.ext.Extensions.Pair

Packages that use Extensions.Pair
org.apache.lucene.queryParser.ext Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.

Uses of Extensions.Pair in org.apache.lucene.queryParser.ext

Methods in org.apache.lucene.queryParser.ext that return Extensions.Pair
 Extensions.Pair<String,String> Extensions.splitExtensionField(String defaultField, String field)
Splits a extension field and returns the field / extension part as a Extensions.Pair.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.ext.ParserExtension

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.ext.ParserExtension

Packages that use ParserExtension
org.apache.lucene.queryParser.ext Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.

Uses of ParserExtension in org.apache.lucene.queryParser.ext

Methods in org.apache.lucene.queryParser.ext that return ParserExtension
 ParserExtension Extensions.getExtension(String key)
Returns the ParserExtension instance for the given key or null if no extension can be found for the key.

Methods in org.apache.lucene.queryParser.ext with parameters of type ParserExtension
 void Extensions.add(String key, ParserExtension extension)
Adds a new ParserExtension instance associated with the given key.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.queryParser.precedence
Classes
PrecedenceQueryParser


org.apache.lucene.queryParser.precedence

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.precedence

This package contains the Precedence Query Parser Implementation

See:
Description

Class Summary
PrecedenceQueryParser This query parser works exactly as the standard query parser ( StandardQueryParser ), except that it respect the boolean precedence, so <a AND b OR c AND d> is parsed to <(+a +b) (+c +d)> instead of <+a +b +c +d>.

Package org.apache.lucene.queryParser.precedence Description

This package contains the Precedence Query Parser Implementation

Lucene Precedence Query Parser

The Precedence Query Parser extends the Standard Query Parser and enables the boolean precedence. So, the query <a AND b OR c AND d> is parsed to <(+a +b) (+c +d)> instead of <+a +b +c +d>.

Check StandardQueryParser for more details about the supported syntax and query parser functionalities.


org.apache.lucene.queryParser.precedence Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.precedence

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.core.QueryParserHelper
      • org.apache.lucene.queryParser.standard.StandardQueryParser
        • org.apache.lucene.queryParser.precedence.PrecedenceQueryParser


Uses of Package org.apache.lucene.queryParser.precedence

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.precedence

No usage of org.apache.lucene.queryParser.precedence

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PrecedenceQueryParser

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.precedence
Class PrecedenceQueryParser

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.QueryParserHelper
        extended by  org.apache.lucene.queryParser.standard.StandardQueryParser
            extended by  org.apache.lucene.queryParser.precedence.PrecedenceQueryParser

public class PrecedenceQueryParser
extends StandardQueryParser

This query parser works exactly as the standard query parser ( StandardQueryParser ), except that it respect the boolean precedence, so <a AND b OR c AND d> is parsed to <(+a +b) (+c +d)> instead of <+a +b +c +d>.

EXPERT: This class extends StandardQueryParser, but uses PrecedenceQueryNodeProcessorPipeline instead of StandardQueryNodeProcessorPipeline to process the query tree.

See Also:
StandardQueryParser

Constructor Summary
PrecedenceQueryParser()
PrecedenceQueryParser(Analyzer analyer)
Method Summary
Methods inherited from class org.apache.lucene.queryParser.standard.StandardQueryParser
getAllowLeadingWildcard, getAnalyzer, getDateResolution, getDateResolutionMap, getDefaultOperator, getEnablePositionIncrements, getFieldsBoost, getFuzzyMinSim, getFuzzyPrefixLength, getLocale, getLowercaseExpandedTerms, getMultiFields, getMultiTermRewriteMethod, getNumericConfigMap, getPhraseSlop, getRangeCollator, parse, setAllowLeadingWildcard, setAnalyzer, setDateResolution, setDateResolution, setDateResolutionMap, setDefaultOperator, setDefaultOperator, setDefaultPhraseSlop, setEnablePositionIncrements, setFieldsBoost, setFuzzyMinSim, setFuzzyPrefixLength, setLocale, setLowercaseExpandedTerms, setMultiFields, setMultiTermRewriteMethod, setNumericConfigMap, setPhraseSlop, setRangeCollator, toString
Methods inherited from class org.apache.lucene.queryParser.core.QueryParserHelper
getQueryBuilder, getQueryConfigHandler, getQueryNodeProcessor, getSyntaxParser, setQueryBuilder, setQueryConfigHandler, setQueryNodeProcessor, setSyntaxParser
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PrecedenceQueryParser

public PrecedenceQueryParser()
See Also:
StandardQueryParser.StandardQueryParser()

PrecedenceQueryParser

public PrecedenceQueryParser(Analyzer analyer)
See Also:
StandardQueryParser.StandardQueryParser(Analyzer)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.queryParser.precedence.PrecedenceQueryParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.precedence.PrecedenceQueryParser

No usage of org.apache.lucene.queryParser.precedence.PrecedenceQueryParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


BooleanModifiersQueryNodeProcessor

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.precedence.processors
Class BooleanModifiersQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.precedence.processors.BooleanModifiersQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class BooleanModifiersQueryNodeProcessor
extends QueryNodeProcessorImpl

This processor is used to apply the correct ModifierQueryNode to BooleanQueryNodes children.

It walks through the query node tree looking for BooleanQueryNodes. If an AndQueryNode is found, every child, which is not a ModifierQueryNode or the ModifierQueryNode is ModifierQueryNode.Modifier.MOD_NONE, becomes a ModifierQueryNode.Modifier.MOD_REQ. For any other BooleanQueryNode which is not an OrQueryNode, it checks the default operator is StandardQueryConfigHandler.Operator.AND, if it is, the same operation when an AndQueryNode is found is applied to it.

See Also:
StandardQueryConfigHandler.ConfigurationKeys.DEFAULT_OPERATOR, StandardQueryParser.setDefaultOperator(org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute.Operator)

Constructor Summary
BooleanModifiersQueryNodeProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
QueryNode | process(QueryNode queryTree) Processes a query node tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BooleanModifiersQueryNodeProcessor

public BooleanModifiersQueryNodeProcessor()
Method Detail

process

public QueryNode process(QueryNode queryTree)
                  throws QueryNodeException
Description copied from interface: QueryNodeProcessor
Processes a query node tree. It may return the same or another query tree. I should never return null.

Specified by:
process in interface QueryNodeProcessor
Overrides:
process in class QueryNodeProcessorImpl
Parameters:
queryTree - tree root node
Returns:
the processed query tree
Throws:
QueryNodeException

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.precedence.processors
Classes
BooleanModifiersQueryNodeProcessor
PrecedenceQueryNodeProcessorPipeline


org.apache.lucene.queryParser.precedence.processors

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.precedence.processors

This package contains the processors used by Precedence Query Parser

See:
Description

Class Summary
BooleanModifiersQueryNodeProcessor | This processor is used to apply the correct ModifierQueryNode to BooleanQueryNodes children.
PrecedenceQueryNodeProcessorPipeline | This processor pipeline extends StandardQueryNodeProcessorPipeline and enables boolean precedence on it.

Package org.apache.lucene.queryParser.precedence.processors Description

This package contains the processors used by Precedence Query Parser

Lucene Precedence Query Parser Processors

This package contains the 2 QueryNodeProcessors used by PrecedenceQueryParser.

BooleanModifiersQueryNodeProcessor: this processor is used to apply ModifierQueryNodes on BooleanQueryNode children according to the boolean type or the default operator.

PrecedenceQueryNodeProcessorPipeline: this processor pipeline is used by PrecedenceQueryParser. It extends StandardQueryNodeProcessorPipeline and rearrange the pipeline so the boolean precedence is processed correctly. Check PrecedenceQueryNodeProcessorPipeline for more details.


org.apache.lucene.queryParser.precedence.processors Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.precedence.processors

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl (implements org.apache.lucene.queryParser.core.processors.QueryNodeProcessor)
      • org.apache.lucene.queryParser.precedence.processors.BooleanModifiersQueryNodeProcessor
    • org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline (implements java.util.List<E>, org.apache.lucene.queryParser.core.processors.QueryNodeProcessor)
      • org.apache.lucene.queryParser.standard.processors.StandardQueryNodeProcessorPipeline
        • org.apache.lucene.queryParser.precedence.processors.PrecedenceQueryNodeProcessorPipeline


Uses of Package org.apache.lucene.queryParser.precedence.processors

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.precedence.processors

No usage of org.apache.lucene.queryParser.precedence.processors

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PrecedenceQueryNodeProcessorPipeline

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.precedence.processors
Class PrecedenceQueryNodeProcessorPipeline

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline
        extended by  org.apache.lucene.queryParser.standard.processors.StandardQueryNodeProcessorPipeline
            extended by  org.apache.lucene.queryParser.precedence.processors.PrecedenceQueryNodeProcessorPipeline
All Implemented Interfaces:
Iterable<QueryNodeProcessor>, Collection<QueryNodeProcessor>, List<QueryNodeProcessor>, QueryNodeProcessor
public class PrecedenceQueryNodeProcessorPipeline
extends StandardQueryNodeProcessorPipeline

This processor pipeline extends StandardQueryNodeProcessorPipeline and enables boolean precedence on it.

EXPERT: the precedence is enabled by removing GroupQueryNodeProcessor from the StandardQueryNodeProcessorPipeline and appending BooleanModifiersQueryNodeProcessor to the pipeline.

See Also:
PrecedenceQueryParser, StandardQueryNodeProcessorPipeline

Constructor Summary
PrecedenceQueryNodeProcessorPipeline(QueryConfigHandler queryConfig)
Method Summary
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline
add, add, addAll, addAll, addProcessor, clear, contains, containsAll, get, getQueryConfigHandler, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, process, remove, remove, removeAll, retainAll, set, setQueryConfigHandler, size, subList, toArray, toArray
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.List
equals, hashCode

Constructor Detail

PrecedenceQueryNodeProcessorPipeline

public PrecedenceQueryNodeProcessorPipeline(QueryConfigHandler queryConfig)
See Also:
StandardQueryNodeProcessorPipeline.StandardQueryNodeProcessorPipeline(QueryConfigHandler)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.queryParser.precedence.processors.BooleanModifiersQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.precedence.processors.BooleanModifiersQueryNodeProcessor

No usage of org.apache.lucene.queryParser.precedence.processors.BooleanModifiersQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.precedence.processors.PrecedenceQueryNodeProcessorPipeline

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.precedence.processors.PrecedenceQueryNodeProcessorPipeline

No usage of org.apache.lucene.queryParser.precedence.processors.PrecedenceQueryNodeProcessorPipeline

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


MultiFieldQueryParserWrapper

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard
Class MultiFieldQueryParserWrapper

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.QueryParserWrapper
        extended by  org.apache.lucene.queryParser.standard.MultiFieldQueryParserWrapper
Deprecated. this class will be removed soon, it's a temporary class to be used along the transition from the old query parser to the new one

@Deprecated
public class MultiFieldQueryParserWrapper
extends QueryParserWrapper

This class behaves as the as the lucene 2.4 MultiFieldQueryParser class, but uses the new query parser interface instead of the old one.

This class should be used when the new query parser features are needed and also keep at the same time the old query parser interface.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.queryParser.standard.QueryParserWrapper
QueryParserWrapper.Operator
Field Summary
Fields inherited from class org.apache.lucene.queryParser.standard.QueryParserWrapper
AND_OPERATOR, OR_OPERATOR
Constructor Summary
MultiFieldQueryParserWrapper(String[] fields, Analyzer analyzer)
Deprecated. Creates a MultiFieldQueryParser.
MultiFieldQueryParserWrapper(String[] fields, Analyzer analyzer, Map<String,Float> boosts)
Deprecated. Creates a MultiFieldQueryParser.
Method Summary
static Query | parse(String[] queries, String[] fields, Analyzer analyzer) Deprecated. Parses a query which searches on the fields specified.
static Query | parse(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Deprecated. Parses a query, searching on the fields specified.
static Query | parse(String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Deprecated. Parses a query, searching on the fields specified.
Methods inherited from class org.apache.lucene.queryParser.standard.QueryParserWrapper
escape, generateParseException, getAllowLeadingWildcard, getAnalyzer, getBooleanQuery, getDateResolution, getDefaultOperator, getEnablePositionIncrements, getField, getFieldQuery, getFieldQuery, getFieldQuery, getFuzzyMinSim, getFuzzyPrefixLength, getFuzzyQuery, getLocale, getLowercaseExpandedTerms, getMultiTermRewriteMethod, getPhraseSlop, getPrefixQuery, getQueryConfigHandler, getQueryProcessor, getRangeCollator, getRangeQuery, getUseOldRangeQuery, getWildcardQuery, parse, setAllowLeadingWildcard, setDateResolution, setDateResolution, setDefaultOperator, setEnablePositionIncrements, setFuzzyMinSim, setFuzzyPrefixLength, setLocale, setLowercaseExpandedTerms, setMultiTermRewriteMethod, setPhraseSlop, setQueryBuilder, setQueryConfig, setQueryProcessor, setRangeCollator, setUseOldRangeQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MultiFieldQueryParserWrapper

public MultiFieldQueryParserWrapper(String[] fields,
                                    Analyzer analyzer,
                                    Map<String,Float> boosts)
Deprecated.
Creates a MultiFieldQueryParser. Allows passing of a map with term to Boost, and the boost to apply to each term.

It will, when parse(String query) is called, construct a query like this (assuming the query consists of two terms and you specify the two fields title and body):

(title:term1 body:term1) (title:term2 body:term2)

When setDefaultOperator(AND_OPERATOR) is set, the result will be:

+(title:term1 body:term1) +(title:term2 body:term2)

When you pass a boost (title=>5 body=>10) you can get

+(title:term1^5.0 body:term1^10.0) +(title:term2^5.0 body:term2^10.0)

In other words, all the query's terms must appear, but it doesn't matter in what fields they appear.

MultiFieldQueryParserWrapper

public MultiFieldQueryParserWrapper(String[] fields,
                                    Analyzer analyzer)
Deprecated.
Creates a MultiFieldQueryParser.

It will, when parse(String query) is called, construct a query like this (assuming the query consists of two terms and you specify the two fields title and body):

(title:term1 body:term1) (title:term2 body:term2)

When setDefaultOperator(AND_OPERATOR) is set, the result will be:

+(title:term1 body:term1) +(title:term2 body:term2)

In other words, all the query's terms must appear, but it doesn't matter in what fields they appear.

Method Detail

parse

public static Query parse(String[] queries,
                          String[] fields,
                          Analyzer analyzer)
                   throws ParseException
Deprecated.
Parses a query which searches on the fields specified.

If x fields are specified, this effectively constructs:

 <code>
 (field1:query1) (field2:query2) (field3:query3)...(fieldx:queryx)
 </code>

Parameters:
queries - Queries strings to parse
fields - Fields to search on
analyzer - Analyzer to use
Throws:
ParseException - if query parsing fails
IllegalArgumentException - if the length of the queries array differs from the length of the fields array

parse

public static Query parse(String query,
                          String[] fields,
                          BooleanClause.Occur[] flags,
                          Analyzer analyzer)
                   throws ParseException
Deprecated.
Parses a query, searching on the fields specified. Use this if you need to specify certain fields as required, and others as prohibited.

 Usage:
 <code>
 String[] fields = {"filename", "contents", "description"};
 BooleanClause.Occur[] flags = {BooleanClause.Occur.SHOULD,
                BooleanClause.Occur.MUST,
                BooleanClause.Occur.MUST_NOT};
 MultiFieldQueryParser.parse("query", fields, flags, analyzer);
 </code>

The code above would construct a query:

 <code>
 (filename:query) +(contents:query) -(description:query)
 </code>

Parameters:
query - Query string to parse
fields - Fields to search on
flags - Flags describing the fields
analyzer - Analyzer to use
Throws:
ParseException - if query parsing fails
IllegalArgumentException - if the length of the fields array differs from the length of the flags array

parse

public static Query parse(String[] queries,
                          String[] fields,
                          BooleanClause.Occur[] flags,
                          Analyzer analyzer)
                   throws ParseException
Deprecated.
Parses a query, searching on the fields specified. Use this if you need to specify certain fields as required, and others as prohibited.

 Usage:
 <code>
 String[] query = {"query1", "query2", "query3"};
 String[] fields = {"filename", "contents", "description"};
 BooleanClause.Occur[] flags = {BooleanClause.Occur.SHOULD,
                BooleanClause.Occur.MUST,
                BooleanClause.Occur.MUST_NOT};
 MultiFieldQueryParser.parse(query, fields, flags, analyzer);
 </code>

The code above would construct a query:

 <code>
 (filename:query1) +(contents:query2) -(description:query3)
 </code>

Parameters:
queries - Queries string to parse
fields - Fields to search on
flags - Flags describing the fields
analyzer - Analyzer to use
Throws:
ParseException - if query parsing fails
IllegalArgumentException - if the length of the queries, fields, and flags array differ
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.standard
Classes
MultiFieldQueryParserWrapper
QueryParserUtil
QueryParserWrapper
StandardQueryParser
Enums
QueryParserWrapper.Operator


org.apache.lucene.queryParser.standard

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.standard

Contains the implementation of the Lucene query parser using the flexible query parser frameworks

See:
Description

Class Summary
MultiFieldQueryParserWrapper | Deprecated. this class will be removed soon, it's a temporary class to be used along the transition from the old query parser to the new one
QueryParserUtil | This class defines utility methods to (help) parse query strings into Query objects.
QueryParserWrapper | Deprecated. this class will be removed soon, it's a temporary class to be used along the transition from the old query parser to the new one
StandardQueryParser | This class is a helper that enables users to easily use the Lucene query parser.

Enum Summary
QueryParserWrapper.Operator The default operator for parsing queries.

Package org.apache.lucene.queryParser.standard Description

Contains the implementation of the Lucene query parser using the flexible query parser frameworks

Lucene Flexible Query Parser Implementation

The old Lucene query parser used to have only one class that performed all the parsing operations. In the new query parser structure, the parsing was divided in 3 steps: parsing (syntax), processing (semantic) and building.

The classes contained in the package org.apache.lucene.queryParser.standard are used to reproduce the same behavior as the old query parser.

Check org.apache.lucene.queryParser.standard.StandardQueryParser to quick start using the Lucene query parser.

There are 2 wrapper classes that extends QueryParser and MultiFieldQueryParser. The classes implement internally the new query parser structure. These 2 classes are deprecated and should only be used when there is a need to use the old query parser interface.


org.apache.lucene.queryParser.standard Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.standard

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.core.QueryParserHelper
      • org.apache.lucene.queryParser.standard.StandardQueryParser
    • org.apache.lucene.queryParser.standard.QueryParserUtil
    • org.apache.lucene.queryParser.standard.QueryParserWrapper
      • org.apache.lucene.queryParser.standard.MultiFieldQueryParserWrapper

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.queryParser.standard.QueryParserWrapper.Operator


Uses of Package org.apache.lucene.queryParser.standard

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.standard

Packages that use org.apache.lucene.queryParser.standard
org.apache.lucene.queryParser.precedence | This package contains the Precedence Query Parser Implementation
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks

Classes in org.apache.lucene.queryParser.standard used by org.apache.lucene.queryParser.precedence
StandardQueryParser
This class is a helper that enables users to easily use the Lucene query parser.

Classes in org.apache.lucene.queryParser.standard used by org.apache.lucene.queryParser.standard
QueryParserWrapper
Deprecated. this class will be removed soon, it's a temporary class to be used along the transition from the old query parser to the new one
QueryParserWrapper.Operator
Deprecated. The default operator for parsing queries.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


QueryParserUtil

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard
Class QueryParserUtil

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.QueryParserUtil

public final class QueryParserUtil
extends Object

This class defines utility methods to (help) parse query strings into Query objects.

Constructor Summary
QueryParserUtil()
Method Summary
static String | escape(String s) Returns a String where those characters that TextParser expects to be escaped are escaped by a preceding \.
static Query | parse(String[] queries, String[] fields, Analyzer analyzer) Parses a query which searches on the fields specified.
static Query | parse(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.
static Query | parse(String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

QueryParserUtil

public QueryParserUtil()
Method Detail

parse

public static Query parse(String[] queries,
                          String[] fields,
                          Analyzer analyzer)
                   throws QueryNodeException
Parses a query which searches on the fields specified.

If x fields are specified, this effectively constructs:

 <code>
 (field1:query1) (field2:query2) (field3:query3)...(fieldx:queryx)
 </code>

Parameters:
queries - Queries strings to parse
fields - Fields to search on
analyzer - Analyzer to use
Throws:
IllegalArgumentException - if the length of the queries array differs from the length of the fields array
QueryNodeException

parse

public static Query parse(String query,
                          String[] fields,
                          BooleanClause.Occur[] flags,
                          Analyzer analyzer)
                   throws QueryNodeException
Parses a query, searching on the fields specified. Use this if you need to specify certain fields as required, and others as prohibited.

 Usage:
 <code>
 String[] fields = {"filename", "contents", "description"};
 BooleanClause.Occur[] flags = {BooleanClause.Occur.SHOULD,
                BooleanClause.Occur.MUST,
                BooleanClause.Occur.MUST_NOT};
 MultiFieldQueryParser.parse("query", fields, flags, analyzer);
 </code>

The code above would construct a query:

 <code>
 (filename:query) +(contents:query) -(description:query)
 </code>

Parameters:
query - Query string to parse
fields - Fields to search on
flags - Flags describing the fields
analyzer - Analyzer to use
Throws:
IllegalArgumentException - if the length of the fields array differs from the length of the flags array
QueryNodeException

parse

public static Query parse(String[] queries,
                          String[] fields,
                          BooleanClause.Occur[] flags,
                          Analyzer analyzer)
                   throws QueryNodeException
Parses a query, searching on the fields specified. Use this if you need to specify certain fields as required, and others as prohibited.

 Usage:
 <code>
 String[] query = {"query1", "query2", "query3"};
 String[] fields = {"filename", "contents", "description"};
 BooleanClause.Occur[] flags = {BooleanClause.Occur.SHOULD,
                BooleanClause.Occur.MUST,
                BooleanClause.Occur.MUST_NOT};
 MultiFieldQueryParser.parse(query, fields, flags, analyzer);
 </code>

The code above would construct a query:

 <code>
 (filename:query1) +(contents:query2) -(description:query3)
 </code>

Parameters:
queries - Queries string to parse
fields - Fields to search on
flags - Flags describing the fields
analyzer - Analyzer to use
Throws:
IllegalArgumentException - if the length of the queries, fields, and flags array differ
QueryNodeException

escape

public static String escape(String s)
Returns a String where those characters that TextParser expects to be escaped are escaped by a preceding \.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryParserWrapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard
Class QueryParserWrapper

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.QueryParserWrapper
Direct Known Subclasses:
MultiFieldQueryParserWrapper
Deprecated. this class will be removed soon, it's a temporary class to be used along the transition from the old query parser to the new one

@Deprecated
public class QueryParserWrapper
extends Object

This class performs the query parsing using the new query parser implementation, but keeps the old QueryParser API.

This class should be used when the new query parser features are and the old QueryParser API are needed at the same time.

Nested Class Summary
static class QueryParserWrapper.Operator
Deprecated. The default operator for parsing queries.
Field Summary
static QueryParserWrapper.Operator | AND_OPERATOR Deprecated. Alternative form of QueryParser.Operator.AND
static QueryParserWrapper.Operator | OR_OPERATOR Deprecated. Alternative form of QueryParser.Operator.OR
Constructor Summary
QueryParserWrapper(String defaultField, Analyzer analyzer)
Deprecated.
Method Summary
static String escape(String s)
Deprecated. Returns a String where those characters that QueryParser expects to be escaped are escaped by a preceding \.
 ParseException generateParseException()
Deprecated.
 boolean getAllowLeadingWildcard()
Deprecated.
 Analyzer getAnalyzer()
Deprecated.
protected  Query getBooleanQuery(List<BooleanClause> clauses, boolean disableCoord)
Deprecated.
 DateTools.Resolution getDateResolution(String fieldName)
Deprecated.
 QueryParserWrapper.Operator getDefaultOperator()
Deprecated.
 boolean getEnablePositionIncrements()
Deprecated.
 String getField()
Deprecated.
protected  Query getFieldQuery(String field, String queryText)
Deprecated. Use getFieldQuery(String, String, boolean) instead
protected  Query getFieldQuery(String field, String queryText, boolean quoted)
Deprecated.
protected  Query getFieldQuery(String field, String queryText, int slop)
Deprecated. Base implementation delegates to getFieldQuery(String,String).
 float getFuzzyMinSim()
Deprecated.
 int getFuzzyPrefixLength()
Deprecated.
protected  Query getFuzzyQuery(String field, String termStr, float minSimilarity)
Deprecated.
 Locale getLocale()
Deprecated.
 boolean getLowercaseExpandedTerms()
Deprecated.
 MultiTermQuery.RewriteMethod getMultiTermRewriteMethod()
Deprecated.
 int getPhraseSlop()
Deprecated.
protected  Query getPrefixQuery(String field, String termStr)
Deprecated.
 QueryConfigHandler getQueryConfigHandler()
Deprecated. Returns the query config handler used by this query parser
 QueryNodeProcessor getQueryProcessor()
Deprecated. Returns QueryNodeProcessor used to process the query node tree generated by the StandardSyntaxParser.
 Collator getRangeCollator()
Deprecated.
protected  Query getRangeQuery(String field, String part1, String part2, boolean inclusive)
Deprecated.
 boolean getUseOldRangeQuery()
Deprecated.
protected  Query getWildcardQuery(String field, String termStr)
Deprecated.
 Query parse(String query)
Deprecated.
 void setAllowLeadingWildcard(boolean allowLeadingWildcard)
Deprecated.
 void setDateResolution(DateTools.Resolution dateResolution)
Deprecated.
 void setDateResolution(String fieldName, DateTools.Resolution dateResolution)
Deprecated.
 void setDefaultOperator(QueryParserWrapper.Operator op)
Deprecated.
 void setEnablePositionIncrements(boolean enable)
Deprecated.
 void setFuzzyMinSim(float fuzzyMinSim)
Deprecated.
 void setFuzzyPrefixLength(int fuzzyPrefixLength)
Deprecated.
 void setLocale(Locale locale)
Deprecated.
 void setLowercaseExpandedTerms(boolean lowercaseExpandedTerms)
Deprecated.
 void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method)
Deprecated.
 void setPhraseSlop(int phraseSlop)
Deprecated.
 void setQueryBuilder(StandardQueryBuilder builder)
Deprecated. Sets the StandardQueryBuilder used to generate a Query object from the parsed and processed query node tree.
 void setQueryConfig(StandardQueryConfigHandler queryConfig)
Deprecated. Sets the QueryConfigHandler used by the QueryNodeProcessor set to this object.
 void setQueryProcessor(QueryNodeProcessor processor)
Deprecated. Sets the QueryNodeProcessor used to process the query node tree generated by the StandardSyntaxParser.
 void setRangeCollator(Collator rc)
Deprecated.
 void setUseOldRangeQuery(boolean useOldRangeQuery)
Deprecated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

AND_OPERATOR

public static final QueryParserWrapper.Operator AND_OPERATOR
Deprecated.
Alternative form of QueryParser.Operator.AND

OR_OPERATOR

public static final QueryParserWrapper.Operator OR_OPERATOR
Deprecated.
Alternative form of QueryParser.Operator.OR

Constructor Detail

QueryParserWrapper

public QueryParserWrapper(String defaultField,
                          Analyzer analyzer)
Deprecated.
Method Detail

escape

public static String escape(String s)
Deprecated.
Returns a String where those characters that QueryParser expects to be escaped are escaped by a preceding \.

getField

public String getField()
Deprecated.

getAnalyzer

public Analyzer getAnalyzer()
Deprecated.

setQueryBuilder

public void setQueryBuilder(StandardQueryBuilder builder)
Deprecated.
Sets the StandardQueryBuilder used to generate a Query object from the parsed and processed query node tree.

Parameters:
builder - the builder

setQueryProcessor

public void setQueryProcessor(QueryNodeProcessor processor)
Deprecated.
Sets the QueryNodeProcessor used to process the query node tree generated by the StandardSyntaxParser.

Parameters:
processor - the processor

setQueryConfig

public void setQueryConfig(StandardQueryConfigHandler queryConfig)
Deprecated.
Sets the QueryConfigHandler used by the QueryNodeProcessor set to this object.

Parameters:
queryConfig - the query config handler

getQueryConfigHandler

public QueryConfigHandler getQueryConfigHandler()
Deprecated.
Returns the query config handler used by this query parser

Returns:
the query config handler

getQueryProcessor

public QueryNodeProcessor getQueryProcessor()
Deprecated.
Returns QueryNodeProcessor used to process the query node tree generated by the StandardSyntaxParser.

Returns:
the query processor

generateParseException

public ParseException generateParseException()
Deprecated.

getAllowLeadingWildcard

public boolean getAllowLeadingWildcard()
Deprecated.

getMultiTermRewriteMethod

public MultiTermQuery.RewriteMethod getMultiTermRewriteMethod()
Deprecated.

getDateResolution

public DateTools.Resolution getDateResolution(String fieldName)
Deprecated.

getEnablePositionIncrements

public boolean getEnablePositionIncrements()
Deprecated.

getFuzzyMinSim

public float getFuzzyMinSim()
Deprecated.

getFuzzyPrefixLength

public int getFuzzyPrefixLength()
Deprecated.

getLocale

public Locale getLocale()
Deprecated.

getLowercaseExpandedTerms

public boolean getLowercaseExpandedTerms()
Deprecated.

getPhraseSlop

public int getPhraseSlop()
Deprecated.

getRangeCollator

public Collator getRangeCollator()
Deprecated.

getUseOldRangeQuery

public boolean getUseOldRangeQuery()
Deprecated.

parse

public Query parse(String query)
            throws ParseException
Deprecated.
Throws:
ParseException

setAllowLeadingWildcard

public void setAllowLeadingWildcard(boolean allowLeadingWildcard)
Deprecated.

setMultiTermRewriteMethod

public void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method)
Deprecated.

setDateResolution

public void setDateResolution(DateTools.Resolution dateResolution)
Deprecated.

setDateResolution

public void setDateResolution(String fieldName,
                              DateTools.Resolution dateResolution)
Deprecated.

setDefaultOperator

public void setDefaultOperator(QueryParserWrapper.Operator op)
Deprecated.

getDefaultOperator

public QueryParserWrapper.Operator getDefaultOperator()
Deprecated.

setEnablePositionIncrements

public void setEnablePositionIncrements(boolean enable)
Deprecated.

setFuzzyMinSim

public void setFuzzyMinSim(float fuzzyMinSim)
Deprecated.

setFuzzyPrefixLength

public void setFuzzyPrefixLength(int fuzzyPrefixLength)
Deprecated.

setLocale

public void setLocale(Locale locale)
Deprecated.

setLowercaseExpandedTerms

public void setLowercaseExpandedTerms(boolean lowercaseExpandedTerms)
Deprecated.

setPhraseSlop

public void setPhraseSlop(int phraseSlop)
Deprecated.

setRangeCollator

public void setRangeCollator(Collator rc)
Deprecated.

setUseOldRangeQuery

public void setUseOldRangeQuery(boolean useOldRangeQuery)
Deprecated.

getPrefixQuery

protected Query getPrefixQuery(String field,
                               String termStr)
                        throws ParseException
Deprecated.
Throws:
ParseException

getWildcardQuery

protected Query getWildcardQuery(String field,
                                 String termStr)
                          throws ParseException
Deprecated.
Throws:
ParseException

getFuzzyQuery

protected Query getFuzzyQuery(String field,
                              String termStr,
                              float minSimilarity)
                       throws ParseException
Deprecated.
Throws:
ParseException

getFieldQuery

@Deprecated
protected Query getFieldQuery(String field,
                                         String queryText)
                       throws ParseException
Deprecated. Use getFieldQuery(String, String, boolean) instead

Throws:
ParseException

getFieldQuery

protected Query getFieldQuery(String field,
                              String queryText,
                              boolean quoted)
                       throws ParseException
Deprecated.
Throws:
ParseException - throw in overridden method to disallow

getBooleanQuery

protected Query getBooleanQuery(List<BooleanClause> clauses,
                                boolean disableCoord)
                         throws ParseException
Deprecated.
Throws:
ParseException

getFieldQuery

protected Query getFieldQuery(String field,
                              String queryText,
                              int slop)
                       throws ParseException
Deprecated.
Base implementation delegates to getFieldQuery(String,String). This method may be overridden, for example, to return a SpanNearQuery instead of a PhraseQuery.

Throws:
ParseException - throw in overridden method to disallow

getRangeQuery

protected Query getRangeQuery(String field,
                              String part1,
                              String part2,
                              boolean inclusive)
                       throws ParseException
Deprecated.
Throws:
ParseException - throw in overridden method to disallow
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryParserWrapper.Operator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.queryParser.standard
Enum QueryParserWrapper.Operator

java.lang.Object
    extended by  java.lang.Enum<QueryParserWrapper.Operator>
        extended by  org.apache.lucene.queryParser.standard.QueryParserWrapper.Operator
All Implemented Interfaces:
Serializable, Comparable<QueryParserWrapper.Operator>
Enclosing class:
QueryParserWrapper
public static enum QueryParserWrapper.Operator
extends Enum<QueryParserWrapper.Operator>

The default operator for parsing queries. Use QueryParserWrapper.setDefaultOperator(org.apache.lucene.queryParser.standard.QueryParserWrapper.Operator) to change it.

Enum Constant Summary
AND
OR
Method Summary
static QueryParserWrapper.Operator | valueOf(String name) Returns the enum constant of this type with the specified name.
static QueryParserWrapper.Operator[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

OR

public static final QueryParserWrapper.Operator OR

AND

public static final QueryParserWrapper.Operator AND
Method Detail

values

public static final QueryParserWrapper.Operator[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(QueryParserWrapper.Operator c : QueryParserWrapper.Operator.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static QueryParserWrapper.Operator valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


StandardQueryParser

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard
Class StandardQueryParser

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.QueryParserHelper
        extended by  org.apache.lucene.queryParser.standard.StandardQueryParser
Direct Known Subclasses:
PrecedenceQueryParser
public class StandardQueryParser
extends QueryParserHelper

This class is a helper that enables users to easily use the Lucene query parser.

To construct a Query object from a query string, use the parse(String, String) method:

    StandardQueryParser queryParserHelper = new StandardQueryParser();
    Query query = queryParserHelper.parse("a AND b", "defaultField");

To change any configuration before parsing the query string do, for example:

    // the query config handler returned by StandardQueryParser is a StandardQueryConfigHandler
    queryParserHelper.getQueryConfigHandler().setAnalyzer(new WhitespaceAnalyzer());

The syntax for query strings is as follows (copied from the old QueryParser javadoc):

    A Query is a series of clauses. A clause may be prefixed by:
    • a plus (+) or a minus (-) sign, indicating that the clause is required or prohibited respectively; or
    • a term followed by a colon, indicating the field to be searched. This enables one to construct queries which search multiple fields.
    A clause may be either:
    • a term, indicating all the documents that contain this term; or
    • a nested query, enclosed in parentheses. Note that this may be used with a +/- prefix to require any of a set of terms.
    Thus, in BNF, the query grammar is:
       Query  ::= ( Clause )*
   Clause ::= ["+", "-"] [<TERM> ":"] ( <TERM> | "(" Query ")" )

    Examples of appropriately formatted queries can be found in the query syntax documentation.

The text parser used by this helper is a StandardSyntaxParser.

The query node processor used by this helper is a StandardQueryNodeProcessorPipeline.

The builder used by this helper is a StandardQueryTreeBuilder.

See Also:
StandardQueryParser, StandardQueryConfigHandler, StandardSyntaxParser, StandardQueryNodeProcessorPipeline, StandardQueryTreeBuilder

Constructor Summary
StandardQueryParser()
Constructs a StandardQueryParser object.
StandardQueryParser(Analyzer analyzer)
Constructs a StandardQueryParser object and sets an Analyzer to it.
Method Summary
 boolean getAllowLeadingWildcard()
 Analyzer getAnalyzer()
 DateTools.Resolution getDateResolution()
Returns the default DateTools.Resolution used for certain field when no DateTools.Resolution is defined for this field.
 Map<CharSequence,DateTools.Resolution> getDateResolutionMap()
Returns the field to DateTools.Resolution map used to normalize each date field.
 StandardQueryConfigHandler.Operator getDefaultOperator()
Gets implicit operator setting, which will be either StandardQueryConfigHandler.Operator.AND or StandardQueryConfigHandler.Operator.OR.
 boolean getEnablePositionIncrements()
 Map<String,Float> getFieldsBoost()
Returns the field to boost map used to set boost for each field.
 float getFuzzyMinSim()
Get the minimal similarity for fuzzy queries.
 int getFuzzyPrefixLength()
Get the prefix length for fuzzy queries.
 Locale getLocale()
Returns current locale, allowing access by subclasses.
 boolean getLowercaseExpandedTerms()
 void getMultiFields(CharSequence[] fields)
Returns the fields used to expand the query when the field for a certain query is null
 MultiTermQuery.RewriteMethod getMultiTermRewriteMethod()
 Map<String,NumericConfig> getNumericConfigMap()
 int getPhraseSlop()
Gets the default slop for phrases.
 Collator getRangeCollator()
 Query parse(String query, String defaultField)
Overrides QueryParserHelper.parse(String, String) so it casts the return object to Query.
 void setAllowLeadingWildcard(boolean allowLeadingWildcard)
Set to true to allow leading wildcard characters.
 void setAnalyzer(Analyzer analyzer)
 void setDateResolution(DateTools.Resolution dateResolution)
Sets the default DateTools.Resolution used for certain field when no DateTools.Resolution is defined for this field.
 void setDateResolution(Map<CharSequence,DateTools.Resolution> dateRes)
Deprecated. this method was renamed to setDateResolutionMap(Map)
 void setDateResolutionMap(Map<CharSequence,DateTools.Resolution> dateRes)
Sets the DateTools.Resolution used for each field
 void setDefaultOperator(DefaultOperatorAttribute.Operator operator)
Deprecated.
 void setDefaultOperator(StandardQueryConfigHandler.Operator operator)
Sets the boolean operator of the QueryParser.
 void setDefaultPhraseSlop(int defaultPhraseSlop)
Deprecated. renamed to setPhraseSlop(int)
 void setEnablePositionIncrements(boolean enabled)
Set to true to enable position increments in result query.
 void setFieldsBoost(Map<String,Float> boosts)
Sets the boost used for each field.
 void setFuzzyMinSim(float fuzzyMinSim)
Set the minimum similarity for fuzzy queries.
 void setFuzzyPrefixLength(int fuzzyPrefixLength)
Set the prefix length for fuzzy queries.
 void setLocale(Locale locale)
Set locale used by date range parsing.
 void setLowercaseExpandedTerms(boolean lowercaseExpandedTerms)
Set to true to allow leading wildcard characters.
 void setMultiFields(CharSequence[] fields)
Set the fields a query should be expanded to when the field is null
 void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method)
By default, it uses MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT when creating a prefix, wildcard and range queries.
 void setNumericConfigMap(Map<String,NumericConfig> numericConfigMap)
 void setPhraseSlop(int defaultPhraseSlop)
Sets the default slop for phrases.
 void setRangeCollator(Collator collator)
Sets the collator used to determine index term inclusion in ranges for RangeQuerys.
 String toString()
Methods inherited from class org.apache.lucene.queryParser.core.QueryParserHelper
getQueryBuilder, getQueryConfigHandler, getQueryNodeProcessor, getSyntaxParser, setQueryBuilder, setQueryConfigHandler, setQueryNodeProcessor, setSyntaxParser
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

StandardQueryParser

public StandardQueryParser()
Constructs a StandardQueryParser object.

StandardQueryParser

public StandardQueryParser(Analyzer analyzer)
Constructs a StandardQueryParser object and sets an Analyzer to it. The same as:
    StandardQueryParser qp = new StandardQueryParser(); qp.getQueryConfigHandler().setAnalyzer(analyzer);

Parameters:
analyzer - the analyzer to be used by this query parser helper
Method Detail

toString

public String toString()
Overrides:
toString in class Object

parse

public Query parse(String query,
                   String defaultField)
            throws QueryNodeException
Overrides QueryParserHelper.parse(String, String) so it casts the return object to Query. For more reference about this method, check QueryParserHelper.parse(String, String).

Overrides:
parse in class QueryParserHelper
Parameters:
query - the query string
defaultField - the default field used by the text parser
Returns:
the object built from the query
Throws:
QueryNodeException - if something wrong happens along the three phases

getDefaultOperator

public StandardQueryConfigHandler.Operator getDefaultOperator()
Gets implicit operator setting, which will be either StandardQueryConfigHandler.Operator.AND or StandardQueryConfigHandler.Operator.OR.

setRangeCollator

public void setRangeCollator(Collator collator)
Sets the collator used to determine index term inclusion in ranges for RangeQuerys.

WARNING: Setting the rangeCollator to a non-null collator using this method will cause every single index Term in the Field referenced by lowerTerm and/or upperTerm to be examined. Depending on the number of index Terms in this Field, the operation could be very slow.

Parameters:
collator - the collator to use when constructing RangeQueryNodes

getRangeCollator

public Collator getRangeCollator()
Returns:
the collator used to determine index term inclusion in ranges for RangeQuerys.

setDefaultOperator

@Deprecated
public void setDefaultOperator(DefaultOperatorAttribute.Operator operator)
Deprecated.

Sets the boolean operator of the QueryParser. In default mode ( StandardQueryConfigHandler.Operator.OR) terms without any modifiers are considered optional: for example capital of Hungary is equal to capital OR of OR Hungary.
In StandardQueryConfigHandler.Operator.AND mode terms are considered to be in conjunction: the above mentioned query is parsed as capital AND of AND Hungary

setDefaultOperator

public void setDefaultOperator(StandardQueryConfigHandler.Operator operator)
Sets the boolean operator of the QueryParser. In default mode ( StandardQueryConfigHandler.Operator.OR) terms without any modifiers are considered optional: for example capital of Hungary is equal to capital OR of OR Hungary.
In StandardQueryConfigHandler.Operator.AND mode terms are considered to be in conjunction: the above mentioned query is parsed as capital AND of AND Hungary

setLowercaseExpandedTerms

public void setLowercaseExpandedTerms(boolean lowercaseExpandedTerms)
Set to true to allow leading wildcard characters.

When set, * or ? are allowed as the first character of a PrefixQuery and WildcardQuery. Note that this can produce very slow queries on big indexes.

Default: false.

getLowercaseExpandedTerms

public boolean getLowercaseExpandedTerms()
See Also:
setLowercaseExpandedTerms(boolean)

setAllowLeadingWildcard

public void setAllowLeadingWildcard(boolean allowLeadingWildcard)
Set to true to allow leading wildcard characters.

When set, * or ? are allowed as the first character of a PrefixQuery and WildcardQuery. Note that this can produce very slow queries on big indexes.

Default: false.

setEnablePositionIncrements

public void setEnablePositionIncrements(boolean enabled)
Set to true to enable position increments in result query.

When set, result phrase and multi-phrase queries will be aware of position increments. Useful when e.g. a StopFilter increases the position increment of the token that follows an omitted token.

Default: false.

getEnablePositionIncrements

public boolean getEnablePositionIncrements()
See Also:
setEnablePositionIncrements(boolean)

setMultiTermRewriteMethod

public void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method)
By default, it uses MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT when creating a prefix, wildcard and range queries. This implementation is generally preferable because it a) Runs faster b) Does not have the scarcity of terms unduly influence score c) avoids any TooManyListenersException exception. However, if your application really needs to use the old-fashioned boolean queries expansion rewriting and the above points are not relevant then use this change the rewrite method.

getMultiTermRewriteMethod

public MultiTermQuery.RewriteMethod getMultiTermRewriteMethod()
See Also:
setMultiTermRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod)

setMultiFields

public void setMultiFields(CharSequence[] fields)
Set the fields a query should be expanded to when the field is null

Parameters:
fields - the fields used to expand the query

getMultiFields

public void getMultiFields(CharSequence[] fields)
Returns the fields used to expand the query when the field for a certain query is null

Parameters:
fields - the fields used to expand the query

setFuzzyPrefixLength

public void setFuzzyPrefixLength(int fuzzyPrefixLength)
Set the prefix length for fuzzy queries. Default is 0.

Parameters:
fuzzyPrefixLength - The fuzzyPrefixLength to set.

setNumericConfigMap

public void setNumericConfigMap(Map<String,NumericConfig> numericConfigMap)

getNumericConfigMap

public Map<String,NumericConfig> getNumericConfigMap()

setLocale

public void setLocale(Locale locale)
Set locale used by date range parsing.

getLocale

public Locale getLocale()
Returns current locale, allowing access by subclasses.

setDefaultPhraseSlop

@Deprecated
public void setDefaultPhraseSlop(int defaultPhraseSlop)
Deprecated. renamed to setPhraseSlop(int)

Sets the default slop for phrases. If zero, then exact phrase matches are required. Default value is zero.

setPhraseSlop

public void setPhraseSlop(int defaultPhraseSlop)
Sets the default slop for phrases. If zero, then exact phrase matches are required. Default value is zero.

setAnalyzer

public void setAnalyzer(Analyzer analyzer)

getAnalyzer

public Analyzer getAnalyzer()

getAllowLeadingWildcard

public boolean getAllowLeadingWildcard()
See Also:
setAllowLeadingWildcard(boolean)

getFuzzyMinSim

public float getFuzzyMinSim()
Get the minimal similarity for fuzzy queries.

getFuzzyPrefixLength

public int getFuzzyPrefixLength()
Get the prefix length for fuzzy queries.

Returns:
Returns the fuzzyPrefixLength.

getPhraseSlop

public int getPhraseSlop()
Gets the default slop for phrases.

setFuzzyMinSim

public void setFuzzyMinSim(float fuzzyMinSim)
Set the minimum similarity for fuzzy queries. Default is defined on FuzzyQuery.defaultMinSimilarity.

setFieldsBoost

public void setFieldsBoost(Map<String,Float> boosts)
Sets the boost used for each field.

Parameters:
boosts - a collection that maps a field to its boost

getFieldsBoost

public Map<String,Float> getFieldsBoost()
Returns the field to boost map used to set boost for each field.

Returns:
the field to boost map

setDateResolution

public void setDateResolution(DateTools.Resolution dateResolution)
Sets the default DateTools.Resolution used for certain field when no DateTools.Resolution is defined for this field.

Parameters:
dateResolution - the default DateTools.Resolution

getDateResolution

public DateTools.Resolution getDateResolution()
Returns the default DateTools.Resolution used for certain field when no DateTools.Resolution is defined for this field.

Returns:
the default DateTools.Resolution

setDateResolution

@Deprecated
public void setDateResolution(Map<CharSequence,DateTools.Resolution> dateRes)
Deprecated. this method was renamed to setDateResolutionMap(Map)

Sets the DateTools.Resolution used for each field

Parameters:
dateRes - a collection that maps a field to its DateTools.Resolution

getDateResolutionMap

public Map<CharSequence,DateTools.Resolution> getDateResolutionMap()
Returns the field to DateTools.Resolution map used to normalize each date field.

Returns:
the field to DateTools.Resolution map

setDateResolutionMap

public void setDateResolutionMap(Map<CharSequence,DateTools.Resolution> dateRes)
Sets the DateTools.Resolution used for each field

Parameters:
dateRes - a collection that maps a field to its DateTools.Resolution
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AnyQueryNodeBuilder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class AnyQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.AnyQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class AnyQueryNodeBuilder
extends Object
implements StandardQueryBuilder

Constructor Summary
AnyQueryNodeBuilder()
Method Summary
 BooleanQuery build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AnyQueryNodeBuilder

public AnyQueryNodeBuilder()
Method Detail

build

public BooleanQuery build(QueryNode queryNode)
                   throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BooleanQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class BooleanQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.BooleanQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class BooleanQueryNodeBuilder
extends Object
implements StandardQueryBuilder

Builds a BooleanQuery object from a BooleanQueryNode object. Every children in the BooleanQueryNode object must be already tagged using QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID with a Query object.

It takes in consideration if the children is a ModifierQueryNode to define the BooleanClause.

Constructor Summary
BooleanQueryNodeBuilder()
Method Summary
 BooleanQuery build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BooleanQueryNodeBuilder

public BooleanQueryNodeBuilder()
Method Detail

build

public BooleanQuery build(QueryNode queryNode)
                   throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BoostQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class BoostQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.BoostQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class BoostQueryNodeBuilder
extends Object
implements StandardQueryBuilder

This builder basically reads the Query object set on the BoostQueryNode child using QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID and applies the boost value defined in the BoostQueryNode.

Constructor Summary
BoostQueryNodeBuilder()
Method Summary
 Query build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BoostQueryNodeBuilder

public BoostQueryNodeBuilder()
Method Detail

build

public Query build(QueryNode queryNode)
            throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DummyQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class DummyQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.DummyQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class DummyQueryNodeBuilder
extends Object
implements StandardQueryBuilder

This builder does nothing. Commonly used for QueryNode objects that are built by its parent's builder.

Constructor Summary
DummyQueryNodeBuilder()
Constructs a DummyQueryNodeBuilder object.
Method Summary
 TermQuery build(QueryNode queryNode)
Always return null.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DummyQueryNodeBuilder

public DummyQueryNodeBuilder()
Constructs a DummyQueryNodeBuilder object.

Method Detail

build

public TermQuery build(QueryNode queryNode)
                throws QueryNodeException
Always return null. return null

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class FieldQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.FieldQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class FieldQueryNodeBuilder
extends Object
implements StandardQueryBuilder

Builds a TermQuery object from a FieldQueryNode object.

Constructor Summary
FieldQueryNodeBuilder()
Method Summary
 TermQuery build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldQueryNodeBuilder

public FieldQueryNodeBuilder()
Method Detail

build

public TermQuery build(QueryNode queryNode)
                throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FuzzyQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class FuzzyQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.FuzzyQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class FuzzyQueryNodeBuilder
extends Object
implements StandardQueryBuilder

Builds a FuzzyQuery object from a FuzzyQueryNode object.

Constructor Summary
FuzzyQueryNodeBuilder()
Method Summary
 FuzzyQuery build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FuzzyQueryNodeBuilder

public FuzzyQueryNodeBuilder()
Method Detail

build

public FuzzyQuery build(QueryNode queryNode)
                 throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GroupQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class GroupQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.GroupQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class GroupQueryNodeBuilder
extends Object
implements StandardQueryBuilder

Builds no object, it only returns the Query object set on the GroupQueryNode object using a QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID tag.

Constructor Summary
GroupQueryNodeBuilder()
Method Summary
 Query build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GroupQueryNodeBuilder

public GroupQueryNodeBuilder()
Method Detail

build

public Query build(QueryNode queryNode)
            throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MatchAllDocsQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class MatchAllDocsQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.MatchAllDocsQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class MatchAllDocsQueryNodeBuilder
extends Object
implements StandardQueryBuilder

Builds a MatchAllDocsQuery object from a MatchAllDocsQueryNode object.

Constructor Summary
MatchAllDocsQueryNodeBuilder()
Method Summary
 MatchAllDocsQuery build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MatchAllDocsQueryNodeBuilder

public MatchAllDocsQueryNodeBuilder()
Method Detail

build

public MatchAllDocsQuery build(QueryNode queryNode)
                        throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MatchNoDocsQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class MatchNoDocsQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.MatchNoDocsQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class MatchNoDocsQueryNodeBuilder
extends Object
implements StandardQueryBuilder

Builds an empty BooleanQuery object from a MatchNoDocsQueryNode object.

Constructor Summary
MatchNoDocsQueryNodeBuilder()
Method Summary
 BooleanQuery build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MatchNoDocsQueryNodeBuilder

public MatchNoDocsQueryNodeBuilder()
Method Detail

build

public BooleanQuery build(QueryNode queryNode)
                   throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ModifierQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class ModifierQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.ModifierQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class ModifierQueryNodeBuilder
extends Object
implements StandardQueryBuilder

Builds no object, it only returns the Query object set on the ModifierQueryNode object using a QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID tag.

Constructor Summary
ModifierQueryNodeBuilder()
Method Summary
 Query build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ModifierQueryNodeBuilder

public ModifierQueryNodeBuilder()
Method Detail

build

public Query build(QueryNode queryNode)
            throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiPhraseQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class MultiPhraseQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.MultiPhraseQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class MultiPhraseQueryNodeBuilder
extends Object
implements StandardQueryBuilder

Builds a MultiPhraseQuery object from a MultiPhraseQueryNode object.

Constructor Summary
MultiPhraseQueryNodeBuilder()
Method Summary
 MultiPhraseQuery build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MultiPhraseQueryNodeBuilder

public MultiPhraseQueryNodeBuilder()
Method Detail

build

public MultiPhraseQuery build(QueryNode queryNode)
                       throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericRangeQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class NumericRangeQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.NumericRangeQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class NumericRangeQueryNodeBuilder
extends Object
implements StandardQueryBuilder

Builds NumericRangeQuerys out of NumericRangeQueryNodes.

See Also:
NumericRangeQuery, NumericRangeQueryNode

Constructor Summary
NumericRangeQueryNodeBuilder()
Constructs a NumericRangeQueryNodeBuilder object.
Method Summary
 NumericRangeQuery<? extends Number> build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NumericRangeQueryNodeBuilder

public NumericRangeQueryNodeBuilder()
Constructs a NumericRangeQueryNodeBuilder object.

Method Detail

build

public NumericRangeQuery<? extends Number> build(QueryNode queryNode)
                                          throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.standard.builders
Interfaces
StandardQueryBuilder
Classes
AnyQueryNodeBuilder
BooleanQueryNodeBuilder
BoostQueryNodeBuilder
DummyQueryNodeBuilder
FieldQueryNodeBuilder
FuzzyQueryNodeBuilder
GroupQueryNodeBuilder
MatchAllDocsQueryNodeBuilder
MatchNoDocsQueryNodeBuilder
ModifierQueryNodeBuilder
MultiPhraseQueryNodeBuilder
NumericRangeQueryNodeBuilder
PhraseQueryNodeBuilder
PrefixWildcardQueryNodeBuilder
RangeQueryNodeBuilder
SlopQueryNodeBuilder
StandardBooleanQueryNodeBuilder
StandardQueryTreeBuilder
TermRangeQueryNodeBuilder
WildcardQueryNodeBuilder


org.apache.lucene.queryParser.standard.builders

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.standard.builders

Standard Lucene Query Node Builders

See:
Description

Interface Summary
StandardQueryBuilder This interface should be implemented by every class that wants to build Query objects from QueryNode objects.

Class Summary
AnyQueryNodeBuilder |
BooleanQueryNodeBuilder | Builds a BooleanQuery object from a BooleanQueryNode object.
BoostQueryNodeBuilder | This builder basically reads the Query object set on the BoostQueryNode child using QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID and applies the boost value defined in the BoostQueryNode.
DummyQueryNodeBuilder | This builder does nothing.
FieldQueryNodeBuilder | Builds a TermQuery object from a FieldQueryNode object.
FuzzyQueryNodeBuilder | Builds a FuzzyQuery object from a FuzzyQueryNode object.
GroupQueryNodeBuilder | Builds no object, it only returns the Query object set on the GroupQueryNode object using a QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID tag.
MatchAllDocsQueryNodeBuilder | Builds a MatchAllDocsQuery object from a MatchAllDocsQueryNode object.
MatchNoDocsQueryNodeBuilder | Builds an empty BooleanQuery object from a MatchNoDocsQueryNode object.
ModifierQueryNodeBuilder | Builds no object, it only returns the Query object set on the ModifierQueryNode object using a QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID tag.
MultiPhraseQueryNodeBuilder | Builds a MultiPhraseQuery object from a MultiPhraseQueryNode object.
NumericRangeQueryNodeBuilder | Builds NumericRangeQuerys out of NumericRangeQueryNodes.
PhraseQueryNodeBuilder | Builds a PhraseQuery object from a TokenizedPhraseQueryNode object.
PrefixWildcardQueryNodeBuilder | Builds a PrefixQuery object from a PrefixWildcardQueryNode object.
RangeQueryNodeBuilder | Deprecated. this builder will be removed in future together with RangeQueryNode
SlopQueryNodeBuilder | This builder basically reads the Query object set on the SlopQueryNode child using QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID and applies the slop value defined in the SlopQueryNode.
StandardBooleanQueryNodeBuilder | This builder does the same as the BooleanQueryNodeBuilder, but this considers if the built BooleanQuery should have its coord disabled or not.
StandardQueryTreeBuilder | This query tree builder only defines the necessary map to build a Query tree object.
TermRangeQueryNodeBuilder | Builds a TermRangeQuery object from a TermRangeQueryNode object.
WildcardQueryNodeBuilder | Builds a WildcardQuery object from a WildcardQueryNode object.

Package org.apache.lucene.queryParser.standard.builders Description

Standard Lucene Query Node Builders

The package org.apache.lucene.queryParser.standard.builders contains all the builders needed to build a Lucene Query object from a query node tree. These builders expect the query node tree was already processed by the StandardQueryNodeProcessorPipeline.

StandardQueryTreeBuilder is a builder that already contains a defined map that maps each QueryNode object with its respective builder.


org.apache.lucene.queryParser.standard.builders Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.standard.builders

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.standard.builders.AnyQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.BooleanQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.BoostQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.DummyQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.FieldQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.FuzzyQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.GroupQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.MatchAllDocsQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.MatchNoDocsQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.ModifierQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.MultiPhraseQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.NumericRangeQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.PhraseQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.PrefixWildcardQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.core.builders.QueryTreeBuilder (implements org.apache.lucene.queryParser.core.builders.QueryBuilder)
      • org.apache.lucene.queryParser.standard.builders.StandardQueryTreeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.RangeQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.SlopQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.StandardBooleanQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.TermRangeQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)
    • org.apache.lucene.queryParser.standard.builders.WildcardQueryNodeBuilder (implements org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder)

Interface Hierarchy

  • org.apache.lucene.queryParser.core.builders.QueryBuilder
    • org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder


Uses of Package org.apache.lucene.queryParser.standard.builders

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.standard.builders

Packages that use org.apache.lucene.queryParser.standard.builders
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders

Classes in org.apache.lucene.queryParser.standard.builders used by org.apache.lucene.queryParser.standard
StandardQueryBuilder
This interface should be implemented by every class that wants to build Query objects from QueryNode objects.

Classes in org.apache.lucene.queryParser.standard.builders used by org.apache.lucene.queryParser.standard.builders
StandardQueryBuilder
This interface should be implemented by every class that wants to build Query objects from QueryNode objects.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PhraseQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class PhraseQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.PhraseQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class PhraseQueryNodeBuilder
extends Object
implements StandardQueryBuilder

Builds a PhraseQuery object from a TokenizedPhraseQueryNode object.

Constructor Summary
PhraseQueryNodeBuilder()
Method Summary
 PhraseQuery build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PhraseQueryNodeBuilder

public PhraseQueryNodeBuilder()
Method Detail

build

public PhraseQuery build(QueryNode queryNode)
                  throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrefixWildcardQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class PrefixWildcardQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.PrefixWildcardQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class PrefixWildcardQueryNodeBuilder
extends Object
implements StandardQueryBuilder

Builds a PrefixQuery object from a PrefixWildcardQueryNode object.

Constructor Summary
PrefixWildcardQueryNodeBuilder()
Method Summary
 PrefixQuery build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PrefixWildcardQueryNodeBuilder

public PrefixWildcardQueryNodeBuilder()
Method Detail

build

public PrefixQuery build(QueryNode queryNode)
                  throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RangeQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class RangeQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.RangeQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
Deprecated. this builder will be removed in future together with RangeQueryNode

@Deprecated
public class RangeQueryNodeBuilder
extends Object
implements StandardQueryBuilder

Builds a TermRangeQuery object from a RangeQueryNode object.

Constructor Summary
RangeQueryNodeBuilder()
Deprecated.
Method Summary
 TermRangeQuery build(QueryNode queryNode)
Deprecated. Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RangeQueryNodeBuilder

public RangeQueryNodeBuilder()
Deprecated.
Method Detail

build

public TermRangeQuery build(QueryNode queryNode)
                     throws QueryNodeException
Deprecated.
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SlopQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class SlopQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.SlopQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class SlopQueryNodeBuilder
extends Object
implements StandardQueryBuilder

This builder basically reads the Query object set on the SlopQueryNode child using QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID and applies the slop value defined in the SlopQueryNode.

Constructor Summary
SlopQueryNodeBuilder()
Method Summary
 Query build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SlopQueryNodeBuilder

public SlopQueryNodeBuilder()
Method Detail

build

public Query build(QueryNode queryNode)
            throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardBooleanQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class StandardBooleanQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.StandardBooleanQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class StandardBooleanQueryNodeBuilder
extends Object
implements StandardQueryBuilder

This builder does the same as the BooleanQueryNodeBuilder, but this considers if the built BooleanQuery should have its coord disabled or not.

See Also:
BooleanQueryNodeBuilder, BooleanQuery, Similarity.coord(int, int)

Constructor Summary
StandardBooleanQueryNodeBuilder()
Method Summary
 BooleanQuery build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StandardBooleanQueryNodeBuilder

public StandardBooleanQueryNodeBuilder()
Method Detail

build

public BooleanQuery build(QueryNode queryNode)
                   throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardQueryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Interface StandardQueryBuilder

All Superinterfaces:
QueryBuilder
All Known Implementing Classes:
AnyQueryNodeBuilder, BooleanQueryNodeBuilder, BoostQueryNodeBuilder, DummyQueryNodeBuilder, FieldQueryNodeBuilder, FuzzyQueryNodeBuilder, GroupQueryNodeBuilder, MatchAllDocsQueryNodeBuilder, MatchNoDocsQueryNodeBuilder, ModifierQueryNodeBuilder, MultiPhraseQueryNodeBuilder, NumericRangeQueryNodeBuilder, PhraseQueryNodeBuilder, PrefixWildcardQueryNodeBuilder, RangeQueryNodeBuilder, SlopQueryNodeBuilder, StandardBooleanQueryNodeBuilder, StandardQueryTreeBuilder, TermRangeQueryNodeBuilder, WildcardQueryNodeBuilder
public interface StandardQueryBuilder
extends QueryBuilder

This interface should be implemented by every class that wants to build Query objects from QueryNode objects.

See Also:
QueryBuilder, QueryTreeBuilder

Method Summary
 Query build(QueryNode queryNode)
Builds some kind of object from a query tree.

Method Detail

build

Query build(QueryNode queryNode)
            throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardQueryTreeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class StandardQueryTreeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.builders.QueryTreeBuilder
        extended by  org.apache.lucene.queryParser.standard.builders.StandardQueryTreeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class StandardQueryTreeBuilder
extends QueryTreeBuilder
implements StandardQueryBuilder

This query tree builder only defines the necessary map to build a Query tree object. It should be used to generate a Query tree object from a query node tree processed by a StandardQueryNodeProcessorPipeline.

See Also:
QueryTreeBuilder, StandardQueryNodeProcessorPipeline

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.builders.QueryTreeBuilder
QUERY_TREE_BUILDER_TAGID
Constructor Summary
StandardQueryTreeBuilder()
Method Summary
 Query build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class org.apache.lucene.queryParser.core.builders.QueryTreeBuilder
setBuilder, setBuilder, setBuilder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StandardQueryTreeBuilder

public StandardQueryTreeBuilder()
Method Detail

build

public Query build(QueryNode queryNode)
            throws QueryNodeException
Description copied from class: QueryTreeBuilder
Builds some kind of object from a query tree. Each node in the query tree is built using an specific builder associated to it.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Overrides:
build in class QueryTreeBuilder
Parameters:
queryNode - the query tree root node
Returns:
the built object
Throws:
QueryNodeException - if some node builder throws a QueryNodeException or if there is a node which had no builder associated to it
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermRangeQueryNodeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class TermRangeQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.TermRangeQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class TermRangeQueryNodeBuilder
extends Object
implements StandardQueryBuilder

Builds a TermRangeQuery object from a TermRangeQueryNode object.

Constructor Summary
TermRangeQueryNodeBuilder()
Method Summary
 TermRangeQuery build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TermRangeQueryNodeBuilder

public TermRangeQueryNodeBuilder()
Method Detail

build

public TermRangeQuery build(QueryNode queryNode)
                     throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WildcardQueryNodeBuilder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.builders
Class WildcardQueryNodeBuilder

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.builders.WildcardQueryNodeBuilder
All Implemented Interfaces:
QueryBuilder, StandardQueryBuilder
public class WildcardQueryNodeBuilder
extends Object
implements StandardQueryBuilder

Builds a WildcardQuery object from a WildcardQueryNode object.

Constructor Summary
WildcardQueryNodeBuilder()
Method Summary
 WildcardQuery build(QueryNode queryNode)
Builds some kind of object from a query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WildcardQueryNodeBuilder

public WildcardQueryNodeBuilder()
Method Detail

build

public WildcardQuery build(QueryNode queryNode)
                    throws QueryNodeException
Description copied from interface: QueryBuilder
Builds some kind of object from a query tree.

Specified by:
build in interface QueryBuilder
Specified by:
build in interface StandardQueryBuilder
Parameters:
queryNode - the query tree root node
Returns:
some object generated from the query tree
Throws:
QueryNodeException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.queryParser.standard.builders.AnyQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.AnyQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.AnyQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.BooleanQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.BooleanQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.BooleanQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.BoostQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.BoostQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.BoostQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.DummyQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.DummyQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.DummyQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.FieldQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.FieldQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.FieldQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.FuzzyQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.FuzzyQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.FuzzyQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.GroupQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.GroupQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.GroupQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.MatchAllDocsQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.MatchAllDocsQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.MatchAllDocsQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.MatchNoDocsQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.MatchNoDocsQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.MatchNoDocsQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.ModifierQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.ModifierQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.ModifierQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.MultiPhraseQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.MultiPhraseQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.MultiPhraseQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.NumericRangeQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.NumericRangeQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.NumericRangeQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.PhraseQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.PhraseQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.PhraseQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.PrefixWildcardQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.PrefixWildcardQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.PrefixWildcardQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.RangeQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.RangeQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.RangeQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.SlopQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.SlopQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.SlopQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.StandardBooleanQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.StandardBooleanQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.StandardBooleanQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.builders.StandardQueryBuilder

Packages that use StandardQueryBuilder
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders

Uses of StandardQueryBuilder in org.apache.lucene.queryParser.standard

Methods in org.apache.lucene.queryParser.standard with parameters of type StandardQueryBuilder
 void QueryParserWrapper.setQueryBuilder(StandardQueryBuilder builder)
Deprecated. Sets the StandardQueryBuilder used to generate a Query object from the parsed and processed query node tree.

Uses of StandardQueryBuilder in org.apache.lucene.queryParser.standard.builders

Classes in org.apache.lucene.queryParser.standard.builders that implement StandardQueryBuilder
class | AnyQueryNodeBuilder
class | BooleanQueryNodeBuilder Builds a BooleanQuery object from a BooleanQueryNode object.
class | BoostQueryNodeBuilder This builder basically reads the Query object set on the BoostQueryNode child using QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID and applies the boost value defined in the BoostQueryNode.
class | DummyQueryNodeBuilder This builder does nothing.
class | FieldQueryNodeBuilder Builds a TermQuery object from a FieldQueryNode object.
class | FuzzyQueryNodeBuilder Builds a FuzzyQuery object from a FuzzyQueryNode object.
class | GroupQueryNodeBuilder Builds no object, it only returns the Query object set on the GroupQueryNode object using a QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID tag.
class | MatchAllDocsQueryNodeBuilder Builds a MatchAllDocsQuery object from a MatchAllDocsQueryNode object.
class | MatchNoDocsQueryNodeBuilder Builds an empty BooleanQuery object from a MatchNoDocsQueryNode object.
class | ModifierQueryNodeBuilder Builds no object, it only returns the Query object set on the ModifierQueryNode object using a QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID tag.
class | MultiPhraseQueryNodeBuilder Builds a MultiPhraseQuery object from a MultiPhraseQueryNode object.
class | NumericRangeQueryNodeBuilder Builds NumericRangeQuerys out of NumericRangeQueryNodes.
class | PhraseQueryNodeBuilder Builds a PhraseQuery object from a TokenizedPhraseQueryNode object.
class | PrefixWildcardQueryNodeBuilder Builds a PrefixQuery object from a PrefixWildcardQueryNode object.
class | RangeQueryNodeBuilder Deprecated. this builder will be removed in future together with RangeQueryNode
class | SlopQueryNodeBuilder This builder basically reads the Query object set on the SlopQueryNode child using QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID and applies the slop value defined in the SlopQueryNode.
class | StandardBooleanQueryNodeBuilder This builder does the same as the BooleanQueryNodeBuilder, but this considers if the built BooleanQuery should have its coord disabled or not.
class | StandardQueryTreeBuilder This query tree builder only defines the necessary map to build a Query tree object.
class | TermRangeQueryNodeBuilder Builds a TermRangeQuery object from a TermRangeQueryNode object.
class | WildcardQueryNodeBuilder Builds a WildcardQuery object from a WildcardQueryNode object.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.StandardQueryTreeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.StandardQueryTreeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.StandardQueryTreeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.TermRangeQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.TermRangeQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.TermRangeQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.builders.WildcardQueryNodeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.builders.WildcardQueryNodeBuilder

No usage of org.apache.lucene.queryParser.standard.builders.WildcardQueryNodeBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.MultiFieldQueryParserWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.MultiFieldQueryParserWrapper

No usage of org.apache.lucene.queryParser.standard.MultiFieldQueryParserWrapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.QueryParserUtil

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.QueryParserUtil

No usage of org.apache.lucene.queryParser.standard.QueryParserUtil

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.QueryParserWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.QueryParserWrapper

Packages that use QueryParserWrapper
org.apache.lucene.queryParser.standard Contains the implementation of the Lucene query parser using the flexible query parser frameworks

Uses of QueryParserWrapper in org.apache.lucene.queryParser.standard

Subclasses of QueryParserWrapper in org.apache.lucene.queryParser.standard
 class MultiFieldQueryParserWrapper
Deprecated. this class will be removed soon, it's a temporary class to be used along the transition from the old query parser to the new one

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.QueryParserWrapper.Operator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.QueryParserWrapper.Operator

Packages that use QueryParserWrapper.Operator
org.apache.lucene.queryParser.standard Contains the implementation of the Lucene query parser using the flexible query parser frameworks

Uses of QueryParserWrapper.Operator in org.apache.lucene.queryParser.standard

Fields in org.apache.lucene.queryParser.standard declared as QueryParserWrapper.Operator
static QueryParserWrapper.Operator | QueryParserWrapper.AND_OPERATOR Deprecated. Alternative form of QueryParser.Operator.AND
static QueryParserWrapper.Operator | QueryParserWrapper.OR_OPERATOR Deprecated. Alternative form of QueryParser.Operator.OR

Methods in org.apache.lucene.queryParser.standard that return QueryParserWrapper.Operator
QueryParserWrapper.Operator | QueryParserWrapper.getDefaultOperator() Deprecated.
static QueryParserWrapper.Operator | QueryParserWrapper.Operator.valueOf(String name) Returns the enum constant of this type with the specified name.
static QueryParserWrapper.Operator[] | QueryParserWrapper.Operator.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.queryParser.standard with parameters of type QueryParserWrapper.Operator
 void QueryParserWrapper.setDefaultOperator(QueryParserWrapper.Operator op)
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.StandardQueryParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.StandardQueryParser

Packages that use StandardQueryParser
org.apache.lucene.queryParser.precedence This package contains the Precedence Query Parser Implementation

Uses of StandardQueryParser in org.apache.lucene.queryParser.precedence

Subclasses of StandardQueryParser in org.apache.lucene.queryParser.precedence
 class PrecedenceQueryParser
This query parser works exactly as the standard query parser ( StandardQueryParser ), except that it respect the boolean precedence, so <a AND b OR c AND d> is parsed to <(+a +b) (+c +d)> instead of <+a +b +c +d>.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AllowLeadingWildcardAttribute

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Interface AllowLeadingWildcardAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
AllowLeadingWildcardAttributeImpl
Deprecated.

@Deprecated
public interface AllowLeadingWildcardAttribute
extends Attribute

This attribute is used by AllowLeadingWildcardProcessor processor and must be defined in the QueryConfigHandler. It basically tells the processor if it should allow leading wildcard.

Method Summary
boolean | isAllowLeadingWildcard() Deprecated.
void | setAllowLeadingWildcard(boolean allowLeadingWildcard) Deprecated.

Method Detail

setAllowLeadingWildcard

void setAllowLeadingWildcard(boolean allowLeadingWildcard)
Deprecated.

isAllowLeadingWildcard

boolean isAllowLeadingWildcard()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AllowLeadingWildcardAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class AllowLeadingWildcardAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ConfigAttribute, AllowLeadingWildcardAttribute, Attribute
Deprecated.

@Deprecated
public class AllowLeadingWildcardAttributeImpl
extends AttributeImpl
implements AllowLeadingWildcardAttribute, ConfigAttribute

This attribute is used by AllowLeadingWildcardProcessor processor and must be defined in the QueryConfigHandler. It basically tells the processor if it should allow leading wildcard.

See Also:
AllowLeadingWildcardAttribute, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
AllowLeadingWildcardAttributeImpl()
Deprecated.
Method Summary
void | clear() Deprecated. Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Deprecated. Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other) Deprecated.
int | hashCode() Deprecated.
boolean | isAllowLeadingWildcard() Deprecated.
void | setAllowLeadingWildcard(boolean allowLeadingWildcard) Deprecated.
void | setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
String | toString() Deprecated. Returns a string representation of the object.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

AllowLeadingWildcardAttributeImpl

public AllowLeadingWildcardAttributeImpl()
Deprecated.
Method Detail

setAllowLeadingWildcard

public void setAllowLeadingWildcard(boolean allowLeadingWildcard)
Deprecated.
Specified by:
setAllowLeadingWildcard in interface AllowLeadingWildcardAttribute

isAllowLeadingWildcard

public boolean isAllowLeadingWildcard()
Deprecated.
Specified by:
isAllowLeadingWildcard in interface AllowLeadingWildcardAttribute

clear

public void clear()
Deprecated.
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Deprecated.
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Deprecated.
Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

toString

public String toString()
Deprecated.
Description copied from class: AttributeImpl
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use AttributeImpl.reflectAsString(boolean) or AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class AttributeImpl

setQueryConfigHandler

public void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Specified by:
setQueryConfigHandler in interface ConfigAttribute
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AnalyzerAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Interface AnalyzerAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
AnalyzerAttributeImpl
Deprecated.

@Deprecated
public interface AnalyzerAttribute
extends Attribute

This attribute is used by AnalyzerQueryNodeProcessor processor and must be defined in the QueryConfigHandler. It provides to this processor the Analyzer, if there is one, which will be used to analyze the query terms.

Method Summary
Analyzer | getAnalyzer() Deprecated.
void | setAnalyzer(Analyzer analyzer) Deprecated.

Method Detail

setAnalyzer

void setAnalyzer(Analyzer analyzer)
Deprecated.

getAnalyzer

Analyzer getAnalyzer()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AnalyzerAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class AnalyzerAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ConfigAttribute, AnalyzerAttribute, Attribute
Deprecated.

@Deprecated
public class AnalyzerAttributeImpl
extends AttributeImpl
implements AnalyzerAttribute, ConfigAttribute

This attribute is used by AnalyzerQueryNodeProcessor processor and must be defined in the QueryConfigHandler. It provides to this processor the Analyzer, if there is one, which will be used to analyze the query terms.

See Also:
AnalyzerAttribute, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
AnalyzerAttributeImpl()
Deprecated.
Method Summary
void | clear() Deprecated. Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Deprecated. Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other) Deprecated.
Analyzer | getAnalyzer() Deprecated.
int | hashCode() Deprecated.
void | setAnalyzer(Analyzer analyzer) Deprecated.
void | setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
String | toString() Deprecated. Returns a string representation of the object.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

AnalyzerAttributeImpl

public AnalyzerAttributeImpl()
Deprecated.
Method Detail

setAnalyzer

public void setAnalyzer(Analyzer analyzer)
Deprecated.
Specified by:
setAnalyzer in interface AnalyzerAttribute

getAnalyzer

public Analyzer getAnalyzer()
Deprecated.
Specified by:
getAnalyzer in interface AnalyzerAttribute

clear

public void clear()
Deprecated.
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Deprecated.
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Deprecated.
Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

setQueryConfigHandler

public void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Specified by:
setQueryConfigHandler in interface ConfigAttribute

toString

public String toString()
Deprecated.
Description copied from class: AttributeImpl
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use AttributeImpl.reflectAsString(boolean) or AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class AttributeImpl
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BoostAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Interface BoostAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
BoostAttributeImpl
Deprecated.

@Deprecated
public interface BoostAttribute
extends Attribute

This attribute is used by MultiFieldQueryNodeProcessor processor and it should be defined in a FieldConfig. This processor uses this attribute to define which boost a specific field should have when none is defined to it.

Method Summary
float | getBoost() Deprecated.
void | setBoost(float boost) Deprecated.

Method Detail

setBoost

void setBoost(float boost)
Deprecated.

getBoost

float getBoost()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BoostAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class BoostAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.queryParser.standard.config.BoostAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ConfigAttribute, BoostAttribute, Attribute
Deprecated.

@Deprecated
public class BoostAttributeImpl
extends AttributeImpl
implements BoostAttribute, ConfigAttribute

This attribute is used by MultiFieldQueryNodeProcessor processor and it should be defined in a FieldConfig. This processor uses this attribute to define which boost a specific field should have when none is defined to it.

See Also:
BoostAttribute, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
BoostAttributeImpl()
Deprecated.
Method Summary
void | clear() Deprecated. Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Deprecated. Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other) Deprecated.
float | getBoost() Deprecated.
int | hashCode() Deprecated.
void | setBoost(float boost) Deprecated.
void | setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
String | toString() Deprecated. Returns a string representation of the object.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

BoostAttributeImpl

public BoostAttributeImpl()
Deprecated.
Method Detail

setBoost

public void setBoost(float boost)
Deprecated.
Specified by:
setBoost in interface BoostAttribute

getBoost

public float getBoost()
Deprecated.
Specified by:
getBoost in interface BoostAttribute

clear

public void clear()
Deprecated.
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Deprecated.
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Deprecated.
Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

toString

public String toString()
Deprecated.
Description copied from class: AttributeImpl
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use AttributeImpl.reflectAsString(boolean) or AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class AttributeImpl

setQueryConfigHandler

public void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Specified by:
setQueryConfigHandler in interface ConfigAttribute
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DateResolutionAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Interface DateResolutionAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
DateResolutionAttributeImpl
Deprecated.

@Deprecated
public interface DateResolutionAttribute
extends Attribute

This attribute is used by ParametricRangeQueryNodeProcessor processor and must be defined in the QueryConfigHandler. This attribute tells the processor which DateTools.Resolution to use when parsing the date.

Method Summary
DateTools.Resolution | getDateResolution() Deprecated.
void | setDateResolution(DateTools.Resolution dateResolution) Deprecated. Sets the default date resolution used by RangeQueryNodes for fields for which no specific date resolutions has been set.

Method Detail

setDateResolution

void setDateResolution(DateTools.Resolution dateResolution)
Deprecated.
Sets the default date resolution used by RangeQueryNodes for fields for which no specific date resolutions has been set. Field specific resolutions can be set with

Parameters:
dateResolution - the default date resolution to set

getDateResolution

DateTools.Resolution getDateResolution()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DateResolutionAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class DateResolutionAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ConfigAttribute, DateResolutionAttribute, Attribute
Deprecated.

@Deprecated
public class DateResolutionAttributeImpl
extends AttributeImpl
implements DateResolutionAttribute, ConfigAttribute

This attribute is used by ParametricRangeQueryNodeProcessor processor and must be defined in the QueryConfigHandler. This attribute tells the processor which DateTools.Resolution to use when parsing the date.

See Also:
DateResolutionAttribute, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
DateResolutionAttributeImpl()
Deprecated.
Method Summary
void | clear() Deprecated. Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Deprecated. Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other) Deprecated.
DateTools.Resolution | getDateResolution() Deprecated.
int | hashCode() Deprecated.
void | setDateResolution(DateTools.Resolution dateResolution) Deprecated. Sets the default date resolution used by RangeQueryNodes for fields for which no specific date resolutions has been set.
void | setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
String | toString() Deprecated. Returns a string representation of the object.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

DateResolutionAttributeImpl

public DateResolutionAttributeImpl()
Deprecated.
Method Detail

setDateResolution

public void setDateResolution(DateTools.Resolution dateResolution)
Deprecated.
Description copied from interface: DateResolutionAttribute
Sets the default date resolution used by RangeQueryNodes for fields for which no specific date resolutions has been set. Field specific resolutions can be set with

Specified by:
setDateResolution in interface DateResolutionAttribute
Parameters:
dateResolution - the default date resolution to set

getDateResolution

public DateTools.Resolution getDateResolution()
Deprecated.
Specified by:
getDateResolution in interface DateResolutionAttribute

clear

public void clear()
Deprecated.
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Deprecated.
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Deprecated.
Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

toString

public String toString()
Deprecated.
Description copied from class: AttributeImpl
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use AttributeImpl.reflectAsString(boolean) or AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class AttributeImpl

setQueryConfigHandler

public void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Specified by:
setQueryConfigHandler in interface ConfigAttribute
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultOperatorAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Interface DefaultOperatorAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
DefaultOperatorAttributeImpl
Deprecated.

@Deprecated
public interface DefaultOperatorAttribute
extends Attribute

This attribute is used by GroupQueryNodeProcessor processor and must be defined in the QueryConfigHandler. This attribute tells the processor which is the default boolean operator when no operator is defined between terms.

Nested Class Summary
static class DefaultOperatorAttribute.Operator
Deprecated.
Method Summary
DefaultOperatorAttribute.Operator | getOperator() Deprecated.
void | setOperator(DefaultOperatorAttribute.Operator operator) Deprecated.

Method Detail

setOperator

void setOperator(DefaultOperatorAttribute.Operator operator)
Deprecated.

getOperator

DefaultOperatorAttribute.Operator getOperator()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultOperatorAttribute.Operator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.queryParser.standard.config
Enum DefaultOperatorAttribute.Operator

java.lang.Object
    extended by  java.lang.Enum<DefaultOperatorAttribute.Operator>
        extended by  org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute.Operator
All Implemented Interfaces:
Serializable, Comparable<DefaultOperatorAttribute.Operator>
Enclosing interface:
DefaultOperatorAttribute
public static enum DefaultOperatorAttribute.Operator
extends Enum<DefaultOperatorAttribute.Operator>

Enum Constant Summary
AND
OR
Method Summary
static DefaultOperatorAttribute.Operator | valueOf(String name) Returns the enum constant of this type with the specified name.
static DefaultOperatorAttribute.Operator[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

AND

public static final DefaultOperatorAttribute.Operator AND

OR

public static final DefaultOperatorAttribute.Operator OR
Method Detail

values

public static final DefaultOperatorAttribute.Operator[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(DefaultOperatorAttribute.Operator c : DefaultOperatorAttribute.Operator.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static DefaultOperatorAttribute.Operator valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


DefaultOperatorAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class DefaultOperatorAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ConfigAttribute, DefaultOperatorAttribute, Attribute
Deprecated.

@Deprecated
public class DefaultOperatorAttributeImpl
extends AttributeImpl
implements DefaultOperatorAttribute, ConfigAttribute

This attribute is used by GroupQueryNodeProcessor processor and must be defined in the QueryConfigHandler. This attribute tells the processor which is the default boolean operator when no operator is defined between terms.

See Also:
DefaultOperatorAttribute, Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute
DefaultOperatorAttribute.Operator
Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
DefaultOperatorAttributeImpl()
Deprecated.
Method Summary
void | clear() Deprecated. Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Deprecated. Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other) Deprecated.
DefaultOperatorAttribute.Operator | getOperator() Deprecated.
int | hashCode() Deprecated.
void | setOperator(DefaultOperatorAttribute.Operator operator) Deprecated.
void | setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
String | toString() Deprecated. Returns a string representation of the object.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

DefaultOperatorAttributeImpl

public DefaultOperatorAttributeImpl()
Deprecated.
Method Detail

setOperator

public void setOperator(DefaultOperatorAttribute.Operator operator)
Deprecated.
Specified by:
setOperator in interface DefaultOperatorAttribute

getOperator

public DefaultOperatorAttribute.Operator getOperator()
Deprecated.
Specified by:
getOperator in interface DefaultOperatorAttribute

clear

public void clear()
Deprecated.
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Deprecated.
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Deprecated.
Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

toString

public String toString()
Deprecated.
Description copied from class: AttributeImpl
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use AttributeImpl.reflectAsString(boolean) or AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class AttributeImpl

setQueryConfigHandler

public void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Specified by:
setQueryConfigHandler in interface ConfigAttribute
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultPhraseSlopAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Interface DefaultPhraseSlopAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
DefaultPhraseSlopAttributeImpl
Deprecated.

@Deprecated
public interface DefaultPhraseSlopAttribute
extends Attribute

This attribute is used by PhraseSlopQueryNodeProcessor processor and must be defined in the QueryConfigHandler. This attribute tells the processor what is the default phrase slop when no slop is defined in a phrase.

Method Summary
int | getDefaultPhraseSlop() Deprecated.
void | setDefaultPhraseSlop(int defaultPhraseSlop) Deprecated.

Method Detail

setDefaultPhraseSlop

void setDefaultPhraseSlop(int defaultPhraseSlop)
Deprecated.

getDefaultPhraseSlop

int getDefaultPhraseSlop()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultPhraseSlopAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class DefaultPhraseSlopAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ConfigAttribute, DefaultPhraseSlopAttribute, Attribute
Deprecated.

@Deprecated
public class DefaultPhraseSlopAttributeImpl
extends AttributeImpl
implements DefaultPhraseSlopAttribute, ConfigAttribute

This attribute is used by PhraseSlopQueryNodeProcessor processor and must be defined in the QueryConfigHandler. This attribute tells the processor what is the default phrase slop when no slop is defined in a phrase.

See Also:
DefaultOperatorAttribute, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
DefaultPhraseSlopAttributeImpl()
Deprecated.
Method Summary
void | clear() Deprecated. Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Deprecated. Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other) Deprecated.
int | getDefaultPhraseSlop() Deprecated.
int | hashCode() Deprecated.
void | setDefaultPhraseSlop(int defaultPhraseSlop) Deprecated.
void | setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
String | toString() Deprecated. Returns a string representation of the object.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

DefaultPhraseSlopAttributeImpl

public DefaultPhraseSlopAttributeImpl()
Deprecated.
Method Detail

setDefaultPhraseSlop

public void setDefaultPhraseSlop(int defaultPhraseSlop)
Deprecated.
Specified by:
setDefaultPhraseSlop in interface DefaultPhraseSlopAttribute

getDefaultPhraseSlop

public int getDefaultPhraseSlop()
Deprecated.
Specified by:
getDefaultPhraseSlop in interface DefaultPhraseSlopAttribute

clear

public void clear()
Deprecated.
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Deprecated.
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Deprecated.
Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

toString

public String toString()
Deprecated.
Description copied from class: AttributeImpl
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use AttributeImpl.reflectAsString(boolean) or AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class AttributeImpl

setQueryConfigHandler

public void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Specified by:
setQueryConfigHandler in interface ConfigAttribute
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldBoostMapAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Interface FieldBoostMapAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
FieldBoostMapAttributeImpl
Deprecated.

@Deprecated
public interface FieldBoostMapAttribute
extends Attribute

This attribute enables the user to define a default boost per field. it's used by FieldBoostMapFCListener.buildFieldConfig(FieldConfig)

Method Summary
Map<String,Float> | getFieldBoostMap() Deprecated.
void | setFieldBoostMap(Map<String,Float> boosts) Deprecated.

Method Detail

setFieldBoostMap

void setFieldBoostMap(Map<String,Float> boosts)
Deprecated.
Parameters:
boosts - a mapping from field name to its default boost

getFieldBoostMap

Map<String,Float> getFieldBoostMap()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldBoostMapAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class FieldBoostMapAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ConfigAttribute, FieldBoostMapAttribute, Attribute
Deprecated.

@Deprecated
public class FieldBoostMapAttributeImpl
extends AttributeImpl
implements FieldBoostMapAttribute, ConfigAttribute

This attribute is used by MultiFieldQueryNodeProcessor processor and it should be defined in a FieldConfig. This processor uses this attribute to define which boost a specific field should have when none is defined to it.

See Also:
BoostAttribute, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
FieldBoostMapAttributeImpl()
Deprecated.
Method Summary
void | clear() Deprecated. Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Deprecated. Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other) Deprecated.
Map<String,Float> | getFieldBoostMap() Deprecated.
int | hashCode() Deprecated.
void | setFieldBoostMap(Map<String,Float> boosts) Deprecated.
void | setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
String | toString() Deprecated. Returns a string representation of the object.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FieldBoostMapAttributeImpl

public FieldBoostMapAttributeImpl()
Deprecated.
Method Detail

setFieldBoostMap

public void setFieldBoostMap(Map<String,Float> boosts)
Deprecated.
Specified by:
setFieldBoostMap in interface FieldBoostMapAttribute
Parameters:
boosts - a mapping from field name to its default boost

getFieldBoostMap

public Map<String,Float> getFieldBoostMap()
Deprecated.
Specified by:
getFieldBoostMap in interface FieldBoostMapAttribute

clear

public void clear()
Deprecated.
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Deprecated.
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Deprecated.
Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

toString

public String toString()
Deprecated.
Description copied from class: AttributeImpl
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use AttributeImpl.reflectAsString(boolean) or AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class AttributeImpl

setQueryConfigHandler

public void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Specified by:
setQueryConfigHandler in interface ConfigAttribute
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldBoostMapFCListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class FieldBoostMapFCListener

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.config.FieldBoostMapFCListener
All Implemented Interfaces:
FieldConfigListener
public class FieldBoostMapFCListener
extends Object
implements FieldConfigListener

This listener listens for every field configuration request and assign a StandardQueryConfigHandler.ConfigurationKeys.BOOST to the equivalent FieldConfig based on a defined map: fieldName -> boostValue stored in StandardQueryConfigHandler.ConfigurationKeys.FIELD_BOOST_MAP.

See Also:
StandardQueryConfigHandler.ConfigurationKeys.FIELD_BOOST_MAP, StandardQueryConfigHandler.ConfigurationKeys.BOOST, FieldConfig, FieldConfigListener

Constructor Summary
FieldBoostMapFCListener(QueryConfigHandler config)
Method Summary
 void buildFieldConfig(FieldConfig fieldConfig)
This method is called ever time a field configuration is requested.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldBoostMapFCListener

public FieldBoostMapFCListener(QueryConfigHandler config)
Method Detail

buildFieldConfig

public void buildFieldConfig(FieldConfig fieldConfig)
Description copied from interface: FieldConfigListener
This method is called ever time a field configuration is requested.

Specified by:
buildFieldConfig in interface FieldConfigListener
Parameters:
fieldConfig - the field configuration requested, should never be null
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldDateResolutionFCListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class FieldDateResolutionFCListener

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.config.FieldDateResolutionFCListener
All Implemented Interfaces:
FieldConfigListener
public class FieldDateResolutionFCListener
extends Object
implements FieldConfigListener

This listener listens for every field configuration request and assign a DateResolutionAttribute to the equivalent FieldConfig based on a defined map: fieldName -> DateTools.Resolution stored in FieldDateResolutionMapAttribute in the DateResolutionAttribute.

See Also:
DateResolutionAttribute, FieldDateResolutionMapAttribute, FieldConfig, FieldConfigListener

Constructor Summary
FieldDateResolutionFCListener(QueryConfigHandler config)
Method Summary
 void buildFieldConfig(FieldConfig fieldConfig)
This method is called ever time a field configuration is requested.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldDateResolutionFCListener

public FieldDateResolutionFCListener(QueryConfigHandler config)
Method Detail

buildFieldConfig

public void buildFieldConfig(FieldConfig fieldConfig)
Description copied from interface: FieldConfigListener
This method is called ever time a field configuration is requested.

Specified by:
buildFieldConfig in interface FieldConfigListener
Parameters:
fieldConfig - the field configuration requested, should never be null
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldDateResolutionMapAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Interface FieldDateResolutionMapAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
FieldDateResolutionMapAttributeImpl
Deprecated.

@Deprecated
public interface FieldDateResolutionMapAttribute
extends Attribute

This attribute enables the user to define a default DateResolution per field. it's used by FieldDateResolutionFCListener.buildFieldConfig(org.apache.lucene.queryParser.core.config.FieldConfig)

Method Summary
Map<CharSequence,DateTools.Resolution> | getFieldDateResolutionMap() Deprecated.
void | setFieldDateResolutionMap(Map<CharSequence,DateTools.Resolution> dateRes) Deprecated.

Method Detail

setFieldDateResolutionMap

void setFieldDateResolutionMap(Map<CharSequence,DateTools.Resolution> dateRes)
Deprecated.
Parameters:
dateRes - a mapping from field name to its default boost

getFieldDateResolutionMap

Map<CharSequence,DateTools.Resolution> getFieldDateResolutionMap()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldDateResolutionMapAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class FieldDateResolutionMapAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ConfigAttribute, FieldDateResolutionMapAttribute, Attribute
Deprecated.

@Deprecated
public class FieldDateResolutionMapAttributeImpl
extends AttributeImpl
implements FieldDateResolutionMapAttribute, ConfigAttribute

This attribute enables the user to define a default DateResolution per field. it's used by FieldDateResolutionFCListener.buildFieldConfig(org.apache.lucene.queryParser.core.config.FieldConfig)

See Also:
FieldDateResolutionMapAttribute, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
FieldDateResolutionMapAttributeImpl()
Deprecated.
Method Summary
void | clear() Deprecated. Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Deprecated. Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other) Deprecated.
Map<CharSequence,DateTools.Resolution> | getFieldDateResolutionMap() Deprecated.
int | hashCode() Deprecated.
void | setFieldDateResolutionMap(Map<CharSequence,DateTools.Resolution> dateRes) Deprecated.
void | setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
String | toString() Deprecated. Returns a string representation of the object.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FieldDateResolutionMapAttributeImpl

public FieldDateResolutionMapAttributeImpl()
Deprecated.
Method Detail

setFieldDateResolutionMap

public void setFieldDateResolutionMap(Map<CharSequence,DateTools.Resolution> dateRes)
Deprecated.
Specified by:
setFieldDateResolutionMap in interface FieldDateResolutionMapAttribute
Parameters:
dateRes - a mapping from field name to its default boost

getFieldDateResolutionMap

public Map<CharSequence,DateTools.Resolution> getFieldDateResolutionMap()
Deprecated.
Specified by:
getFieldDateResolutionMap in interface FieldDateResolutionMapAttribute

clear

public void clear()
Deprecated.
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Deprecated.
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Deprecated.
Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

toString

public String toString()
Deprecated.
Description copied from class: AttributeImpl
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use AttributeImpl.reflectAsString(boolean) or AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class AttributeImpl

setQueryConfigHandler

public void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Specified by:
setQueryConfigHandler in interface ConfigAttribute
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FuzzyAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Interface FuzzyAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
FuzzyAttributeImpl
Deprecated.

@Deprecated
public interface FuzzyAttribute
extends Attribute

This attribute is used by PhraseSlopQueryNodeProcessor processor and must be defined in the QueryConfigHandler. This attribute tells the processor what is the default phrase slop when no slop is defined in a phrase.

Method Summary
float | getFuzzyMinSimilarity() Deprecated.
int | getPrefixLength() Deprecated.
void | setFuzzyMinSimilarity(float minSimilarity) Deprecated.
void | setPrefixLength(int prefixLength) Deprecated.

Method Detail

setPrefixLength

void setPrefixLength(int prefixLength)
Deprecated.

getPrefixLength

int getPrefixLength()
Deprecated.

setFuzzyMinSimilarity

void setFuzzyMinSimilarity(float minSimilarity)
Deprecated.

getFuzzyMinSimilarity

float getFuzzyMinSimilarity()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FuzzyAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class FuzzyAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ConfigAttribute, FuzzyAttribute, Attribute
Deprecated.

@Deprecated
public class FuzzyAttributeImpl
extends AttributeImpl
implements FuzzyAttribute, ConfigAttribute

This attribute is used by PhraseSlopQueryNodeProcessor processor and must be defined in the QueryConfigHandler. This attribute tells the processor what is the default phrase slop when no slop is defined in a phrase.

See Also:
FuzzyAttribute, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
FuzzyAttributeImpl()
Deprecated.
Method Summary
void | clear() Deprecated. Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Deprecated. Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other) Deprecated.
float | getFuzzyMinSimilarity() Deprecated.
int | getPrefixLength() Deprecated.
int | hashCode() Deprecated.
void | setFuzzyMinSimilarity(float minSimilarity) Deprecated.
void | setPrefixLength(int prefixLength) Deprecated.
void | setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
String | toString() Deprecated. Returns a string representation of the object.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FuzzyAttributeImpl

public FuzzyAttributeImpl()
Deprecated.
Method Detail

setPrefixLength

public void setPrefixLength(int prefixLength)
Deprecated.
Specified by:
setPrefixLength in interface FuzzyAttribute

getPrefixLength

public int getPrefixLength()
Deprecated.
Specified by:
getPrefixLength in interface FuzzyAttribute

setFuzzyMinSimilarity

public void setFuzzyMinSimilarity(float minSimilarity)
Deprecated.
Specified by:
setFuzzyMinSimilarity in interface FuzzyAttribute

getFuzzyMinSimilarity

public float getFuzzyMinSimilarity()
Deprecated.
Specified by:
getFuzzyMinSimilarity in interface FuzzyAttribute

clear

public void clear()
Deprecated.
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Deprecated.
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Deprecated.
Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

toString

public String toString()
Deprecated.
Description copied from class: AttributeImpl
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use AttributeImpl.reflectAsString(boolean) or AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class AttributeImpl

setQueryConfigHandler

public void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Specified by:
setQueryConfigHandler in interface ConfigAttribute
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FuzzyConfig

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class FuzzyConfig

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.config.FuzzyConfig

public class FuzzyConfig
extends Object

Constructor Summary
FuzzyConfig()
Method Summary
float | getMinSimilarity()
int | getPrefixLength()
void | setMinSimilarity(float minSimilarity)
void | setPrefixLength(int prefixLength)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FuzzyConfig

public FuzzyConfig()
Method Detail

getPrefixLength

public int getPrefixLength()

setPrefixLength

public void setPrefixLength(int prefixLength)

getMinSimilarity

public float getMinSimilarity()

setMinSimilarity

public void setMinSimilarity(float minSimilarity)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LocaleAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Interface LocaleAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
LocaleAttributeImpl
Deprecated.

@Deprecated
public interface LocaleAttribute
extends Attribute

This attribute is used by processor ParametricRangeQueryNodeProcessor and must be defined in the QueryConfigHandler. This attribute tells the processor what is the default Locale used to parse a date.

Method Summary
Locale | getLocale() Deprecated.
void | setLocale(Locale locale) Deprecated.

Method Detail

setLocale

void setLocale(Locale locale)
Deprecated.

getLocale

Locale getLocale()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LocaleAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class LocaleAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ConfigAttribute, LocaleAttribute, Attribute
Deprecated.

@Deprecated
public class LocaleAttributeImpl
extends AttributeImpl
implements LocaleAttribute, ConfigAttribute

This attribute is used by processor ParametricRangeQueryNodeProcessor and must be defined in the QueryConfigHandler. This attribute tells the processor what is the default Locale used to parse a date.

See Also:
LocaleAttribute, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
LocaleAttributeImpl()
Deprecated.
Method Summary
void | clear() Deprecated. Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Deprecated. Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other) Deprecated.
Locale | getLocale() Deprecated.
int | hashCode() Deprecated.
void | setLocale(Locale locale) Deprecated.
void | setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
String | toString() Deprecated. Returns a string representation of the object.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

LocaleAttributeImpl

public LocaleAttributeImpl()
Deprecated.
Method Detail

setLocale

public void setLocale(Locale locale)
Deprecated.
Specified by:
setLocale in interface LocaleAttribute

getLocale

public Locale getLocale()
Deprecated.
Specified by:
getLocale in interface LocaleAttribute

clear

public void clear()
Deprecated.
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Deprecated.
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Deprecated.
Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

toString

public String toString()
Deprecated.
Description copied from class: AttributeImpl
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use AttributeImpl.reflectAsString(boolean) or AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class AttributeImpl

setQueryConfigHandler

public void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Specified by:
setQueryConfigHandler in interface ConfigAttribute
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LowercaseExpandedTermsAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Interface LowercaseExpandedTermsAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
LowercaseExpandedTermsAttributeImpl
Deprecated.

@Deprecated
public interface LowercaseExpandedTermsAttribute
extends Attribute

This attribute is used by processor ParametricRangeQueryNodeProcessor and must be defined in the QueryConfigHandler. This attribute tells the processor what is the default Locale used to parse a date.

Method Summary
boolean | isLowercaseExpandedTerms() Deprecated.
void | setLowercaseExpandedTerms(boolean lowercaseExpandedTerms) Deprecated.

Method Detail

setLowercaseExpandedTerms

void setLowercaseExpandedTerms(boolean lowercaseExpandedTerms)
Deprecated.

isLowercaseExpandedTerms

boolean isLowercaseExpandedTerms()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LowercaseExpandedTermsAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class LowercaseExpandedTermsAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ConfigAttribute, LowercaseExpandedTermsAttribute, Attribute
Deprecated.

@Deprecated
public class LowercaseExpandedTermsAttributeImpl
extends AttributeImpl
implements LowercaseExpandedTermsAttribute, ConfigAttribute

This attribute is used by processor ParametricRangeQueryNodeProcessor and must be defined in the QueryConfigHandler. This attribute tells the processor what is the default Locale used to parse a date.

See Also:
LowercaseExpandedTermsAttribute, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
LowercaseExpandedTermsAttributeImpl()
Deprecated.
Method Summary
void | clear() Deprecated. Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Deprecated. Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other) Deprecated.
int | hashCode() Deprecated.
boolean | isLowercaseExpandedTerms() Deprecated.
void | setLowercaseExpandedTerms(boolean lowercaseExpandedTerms) Deprecated.
void | setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
String | toString() Deprecated. Returns a string representation of the object.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

LowercaseExpandedTermsAttributeImpl

public LowercaseExpandedTermsAttributeImpl()
Deprecated.
Method Detail

setLowercaseExpandedTerms

public void setLowercaseExpandedTerms(boolean lowercaseExpandedTerms)
Deprecated.
Specified by:
setLowercaseExpandedTerms in interface LowercaseExpandedTermsAttribute

isLowercaseExpandedTerms

public boolean isLowercaseExpandedTerms()
Deprecated.
Specified by:
isLowercaseExpandedTerms in interface LowercaseExpandedTermsAttribute

clear

public void clear()
Deprecated.
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Deprecated.
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Deprecated.
Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

toString

public String toString()
Deprecated.
Description copied from class: AttributeImpl
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use AttributeImpl.reflectAsString(boolean) or AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class AttributeImpl

setQueryConfigHandler

public void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Specified by:
setQueryConfigHandler in interface ConfigAttribute
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiFieldAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Interface MultiFieldAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
MultiFieldAttributeImpl
Deprecated.

@Deprecated
public interface MultiFieldAttribute
extends Attribute

This attribute is used by MultiFieldQueryNodeProcessor processor and must be defined in the QueryConfigHandler. This attribute tells the processor to which fields the terms in the query should be expanded.

Method Summary
CharSequence[] | getFields() Deprecated.
void | setFields(CharSequence[] fields) Deprecated.

Method Detail

setFields

void setFields(CharSequence[] fields)
Deprecated.

getFields

CharSequence[] getFields()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiFieldAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class MultiFieldAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ConfigAttribute, MultiFieldAttribute, Attribute
Deprecated.

@Deprecated
public class MultiFieldAttributeImpl
extends AttributeImpl
implements MultiFieldAttribute, ConfigAttribute

This attribute is used by MultiFieldQueryNodeProcessor processor and must be defined in the QueryConfigHandler. This attribute tells the processor to which fields the terms in the query should be expanded.

See Also:
MultiFieldAttribute, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
MultiFieldAttributeImpl()
Deprecated.
Method Summary
void | clear() Deprecated. Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Deprecated. Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other) Deprecated.
CharSequence[] | getFields() Deprecated.
int | hashCode() Deprecated.
void | setFields(CharSequence[] fields) Deprecated.
void | setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
String | toString() Deprecated. Returns a string representation of the object.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

MultiFieldAttributeImpl

public MultiFieldAttributeImpl()
Deprecated.
Method Detail

setFields

public void setFields(CharSequence[] fields)
Deprecated.
Specified by:
setFields in interface MultiFieldAttribute

getFields

public CharSequence[] getFields()
Deprecated.
Specified by:
getFields in interface MultiFieldAttribute

clear

public void clear()
Deprecated.
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Deprecated.
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Deprecated.
Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

toString

public String toString()
Deprecated.
Description copied from class: AttributeImpl
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use AttributeImpl.reflectAsString(boolean) or AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class AttributeImpl

setQueryConfigHandler

public void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Specified by:
setQueryConfigHandler in interface ConfigAttribute
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTermRewriteMethodAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Interface MultiTermRewriteMethodAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
MultiTermRewriteMethodAttributeImpl
Deprecated.

@Deprecated
public interface MultiTermRewriteMethodAttribute
extends Attribute

This attribute is used by ParametricRangeQueryNodeProcessor processor and should be defined in the QueryConfigHandler used by this processor. It basically tells the processor which MultiTermQuery.RewriteMethod to use.

Field Summary
static String TAG_ID
Deprecated.
Method Summary
MultiTermQuery.RewriteMethod | getMultiTermRewriteMethod() Deprecated.
void | setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method) Deprecated.

Field Detail

TAG_ID

static final String TAG_ID
Deprecated.
See Also:
Constant Field Values
Method Detail

setMultiTermRewriteMethod

void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method)
Deprecated.

getMultiTermRewriteMethod

MultiTermQuery.RewriteMethod getMultiTermRewriteMethod()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTermRewriteMethodAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class MultiTermRewriteMethodAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ConfigAttribute, MultiTermRewriteMethodAttribute, Attribute
Deprecated.

@Deprecated
public class MultiTermRewriteMethodAttributeImpl
extends AttributeImpl
implements MultiTermRewriteMethodAttribute, ConfigAttribute

This attribute is used by ParametricRangeQueryNodeProcessor processor and should be defined in the QueryConfigHandler used by this processor. It basically tells the processor which MultiTermQuery.RewriteMethod to use.

See Also:
MultiTermRewriteMethodAttribute, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Fields inherited from interface org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute
TAG_ID
Constructor Summary
MultiTermRewriteMethodAttributeImpl()
Deprecated.
Method Summary
void | clear() Deprecated. Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Deprecated. Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other) Deprecated.
MultiTermQuery.RewriteMethod | getMultiTermRewriteMethod() Deprecated.
int | hashCode() Deprecated.
void | setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method) Deprecated.
void | setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
String | toString() Deprecated. Returns a string representation of the object.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

MultiTermRewriteMethodAttributeImpl

public MultiTermRewriteMethodAttributeImpl()
Deprecated.
Method Detail

setMultiTermRewriteMethod

public void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method)
Deprecated.
Specified by:
setMultiTermRewriteMethod in interface MultiTermRewriteMethodAttribute

getMultiTermRewriteMethod

public MultiTermQuery.RewriteMethod getMultiTermRewriteMethod()
Deprecated.
Specified by:
getMultiTermRewriteMethod in interface MultiTermRewriteMethodAttribute

clear

public void clear()
Deprecated.
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Deprecated.
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Deprecated.
Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

toString

public String toString()
Deprecated.
Description copied from class: AttributeImpl
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use AttributeImpl.reflectAsString(boolean) or AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class AttributeImpl

setQueryConfigHandler

public void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Specified by:
setQueryConfigHandler in interface ConfigAttribute
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumberDateFormat

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class NumberDateFormat

java.lang.Object
    extended by  java.text.Format
        extended by  java.text.NumberFormat
            extended by  org.apache.lucene.queryParser.standard.config.NumberDateFormat
All Implemented Interfaces:
Serializable, Cloneable
public class NumberDateFormat
extends NumberFormat

This Format parses Long into date strings and vice-versa. It uses the given DateFormat to parse and format dates, but before, it converts Long to Date objects or vice-versa.

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class java.text.NumberFormat
NumberFormat.Field
Field Summary
Fields inherited from class java.text.NumberFormat
FRACTION_FIELD, INTEGER_FIELD
Constructor Summary
NumberDateFormat(DateFormat dateFormat)
Constructs a NumberDateFormat object using the given DateFormat.
Method Summary
StringBuffer | format(double number, StringBuffer toAppendTo, FieldPosition pos)
StringBuffer | format(long number, StringBuffer toAppendTo, FieldPosition pos)
StringBuffer | format(Object number, StringBuffer toAppendTo, FieldPosition pos)
Number | parse(String source, ParsePosition parsePosition)
Methods inherited from class java.text.NumberFormat
clone, equals, format, format, getAvailableLocales, getCurrency, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, hashCode, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setCurrency, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setParseIntegerOnly
Methods inherited from class java.text.Format
format, formatToCharacterIterator, parseObject
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NumberDateFormat

public NumberDateFormat(DateFormat dateFormat)
Constructs a NumberDateFormat object using the given DateFormat.

Parameters:
dateFormat - DateFormat used to parse and format dates
Method Detail

format

public StringBuffer format(double number,
                           StringBuffer toAppendTo,
                           FieldPosition pos)
Specified by:
format in class NumberFormat

format

public StringBuffer format(long number,
                           StringBuffer toAppendTo,
                           FieldPosition pos)
Specified by:
format in class NumberFormat

parse

public Number parse(String source,
                    ParsePosition parsePosition)
Specified by:
parse in class NumberFormat

format

public StringBuffer format(Object number,
                           StringBuffer toAppendTo,
                           FieldPosition pos)
Overrides:
format in class NumberFormat
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericConfig

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class NumericConfig

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.config.NumericConfig

public class NumericConfig
extends Object

This class holds the configuration used to parse numeric queries and create NumericRangeQuerys.

See Also:
NumericRangeQuery, NumberFormat

Constructor Summary
NumericConfig(int precisionStep, NumberFormat format, NumericField.DataType type)
Constructs a NumericConfig object.
Method Summary
boolean | equals(Object obj)
NumberFormat | getNumberFormat() Returns the NumberFormat used to parse a String to Number
int | getPrecisionStep() Returns the precision used to index the numeric values
NumericField.DataType | getType() Returns the numeric type used to index the numeric values
void | setNumberFormat(NumberFormat format) Sets the NumberFormat used to parse a String to Number
void | setPrecisionStep(int precisionStep) Sets the precision used to index the numeric values
void | setType(NumericField.DataType type) Sets the numeric type used to index the numeric values
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NumericConfig

public NumericConfig(int precisionStep,
                     NumberFormat format,
                     NumericField.DataType type)
Constructs a NumericConfig object.

Parameters:
precisionStep - the precision used to index the numeric values
format - the NumberFormat used to parse a String to Number
type - the numeric type used to index the numeric values
See Also:
setPrecisionStep(int), setNumberFormat(NumberFormat), setType(org.apache.lucene.document.NumericField.DataType)
Method Detail

getPrecisionStep

public int getPrecisionStep()
Returns the precision used to index the numeric values

Returns:
the precision used to index the numeric values
See Also:
NumericRangeQuery.getPrecisionStep()

setPrecisionStep

public void setPrecisionStep(int precisionStep)
Sets the precision used to index the numeric values

Parameters:
precisionStep - the precision used to index the numeric values
See Also:
NumericRangeQuery.getPrecisionStep()

getNumberFormat

public NumberFormat getNumberFormat()
Returns the NumberFormat used to parse a String to Number

Returns:
the NumberFormat used to parse a String to Number

getType

public NumericField.DataType getType()
Returns the numeric type used to index the numeric values

Returns:
the numeric type used to index the numeric values

setType

public void setType(NumericField.DataType type)
Sets the numeric type used to index the numeric values

Parameters:
type - the numeric type used to index the numeric values

setNumberFormat

public void setNumberFormat(NumberFormat format)
Sets the NumberFormat used to parse a String to Number

Parameters:
format - the NumberFormat used to parse a String to Number, cannot be null

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericFieldConfigListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class NumericFieldConfigListener

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.config.NumericFieldConfigListener
All Implemented Interfaces:
FieldConfigListener
public class NumericFieldConfigListener
extends Object
implements FieldConfigListener

This listener is used to listen to FieldConfig requests in QueryConfigHandler and add StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG based on the StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG_MAP set in the QueryConfigHandler.

See Also:
NumericConfig, QueryConfigHandler, StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG, StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG_MAP

Constructor Summary
NumericFieldConfigListener(QueryConfigHandler config)
Construcs a NumericFieldConfigListener object using the given QueryConfigHandler.
Method Summary
 void buildFieldConfig(FieldConfig fieldConfig)
This method is called ever time a field configuration is requested.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NumericFieldConfigListener

public NumericFieldConfigListener(QueryConfigHandler config)
Construcs a NumericFieldConfigListener object using the given QueryConfigHandler.

Parameters:
config - the QueryConfigHandler it will listen too
Method Detail

buildFieldConfig

public void buildFieldConfig(FieldConfig fieldConfig)
Description copied from interface: FieldConfigListener
This method is called ever time a field configuration is requested.

Specified by:
buildFieldConfig in interface FieldConfigListener
Parameters:
fieldConfig - the field configuration requested, should never be null
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.standard.config
Interfaces
AllowLeadingWildcardAttribute
AnalyzerAttribute
BoostAttribute
DateResolutionAttribute
DefaultOperatorAttribute
DefaultPhraseSlopAttribute
FieldBoostMapAttribute
FieldDateResolutionMapAttribute
FuzzyAttribute
LocaleAttribute
LowercaseExpandedTermsAttribute
MultiFieldAttribute
MultiTermRewriteMethodAttribute
PositionIncrementsAttribute
RangeCollatorAttribute
Classes
AllowLeadingWildcardAttributeImpl
AnalyzerAttributeImpl
BoostAttributeImpl
DateResolutionAttributeImpl
DefaultOperatorAttributeImpl
DefaultPhraseSlopAttributeImpl
FieldBoostMapAttributeImpl
FieldBoostMapFCListener
FieldDateResolutionFCListener
FieldDateResolutionMapAttributeImpl
FuzzyAttributeImpl
FuzzyConfig
LocaleAttributeImpl
LowercaseExpandedTermsAttributeImpl
MultiFieldAttributeImpl
MultiTermRewriteMethodAttributeImpl
NumberDateFormat
NumericConfig
NumericFieldConfigListener
PositionIncrementsAttributeImpl
RangeCollatorAttributeImpl
StandardQueryConfigHandler
StandardQueryConfigHandler.ConfigurationKeys
Enums
DefaultOperatorAttribute.Operator
StandardQueryConfigHandler.Operator


org.apache.lucene.queryParser.standard.config

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.standard.config

Standard Lucene Query Configuration

See:
Description

Interface Summary
AllowLeadingWildcardAttribute | Deprecated.
AnalyzerAttribute | Deprecated.
BoostAttribute | Deprecated.
DateResolutionAttribute | Deprecated.
DefaultOperatorAttribute | Deprecated.
DefaultPhraseSlopAttribute | Deprecated.
FieldBoostMapAttribute | Deprecated.
FieldDateResolutionMapAttribute | Deprecated.
FuzzyAttribute | Deprecated.
LocaleAttribute | Deprecated.
LowercaseExpandedTermsAttribute | Deprecated.
MultiFieldAttribute | Deprecated.
MultiTermRewriteMethodAttribute | Deprecated.
PositionIncrementsAttribute | Deprecated.
RangeCollatorAttribute | Deprecated.

Class Summary
AllowLeadingWildcardAttributeImpl | Deprecated.
AnalyzerAttributeImpl | Deprecated.
BoostAttributeImpl | Deprecated.
DateResolutionAttributeImpl | Deprecated.
DefaultOperatorAttributeImpl | Deprecated.
DefaultPhraseSlopAttributeImpl | Deprecated.
FieldBoostMapAttributeImpl | Deprecated.
FieldBoostMapFCListener | This listener listens for every field configuration request and assign a StandardQueryConfigHandler.ConfigurationKeys.BOOST to the equivalent FieldConfig based on a defined map: fieldName -> boostValue stored in StandardQueryConfigHandler.ConfigurationKeys.FIELD_BOOST_MAP.
FieldDateResolutionFCListener | This listener listens for every field configuration request and assign a DateResolutionAttribute to the equivalent FieldConfig based on a defined map: fieldName -> DateTools.Resolution stored in FieldDateResolutionMapAttribute in the DateResolutionAttribute.
FieldDateResolutionMapAttributeImpl | Deprecated.
FuzzyAttributeImpl | Deprecated.
FuzzyConfig |
LocaleAttributeImpl | Deprecated.
LowercaseExpandedTermsAttributeImpl | Deprecated.
MultiFieldAttributeImpl | Deprecated.
MultiTermRewriteMethodAttributeImpl | Deprecated.
NumberDateFormat | This Format parses Long into date strings and vice-versa.
NumericConfig | This class holds the configuration used to parse numeric queries and create NumericRangeQuerys.
NumericFieldConfigListener | This listener is used to listen to FieldConfig requests in QueryConfigHandler and add StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG based on the StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG_MAP set in the QueryConfigHandler.
PositionIncrementsAttributeImpl | Deprecated.
RangeCollatorAttributeImpl | Deprecated.
StandardQueryConfigHandler | This query configuration handler is used for almost every processor defined in the StandardQueryNodeProcessorPipeline processor pipeline.
StandardQueryConfigHandler.ConfigurationKeys |

Enum Summary
DefaultOperatorAttribute.Operator
StandardQueryConfigHandler.Operator

Package org.apache.lucene.queryParser.standard.config Description

Standard Lucene Query Configuration

The package org.apache.lucene.queryParser.standard.config contains the Lucene query configuration handler (StandardQueryConfigHandler). This configuration handler reproduces almost everything that could be set on the old query parser.

StandardQueryConfigHandler is the class that should be used to configure the StandardQueryNodeProcessorPipeline.


org.apache.lucene.queryParser.standard.config Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.standard.config

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.AttributeImpl (implements org.apache.lucene.util.Attribute, java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl (implements org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttribute, org.apache.lucene.queryParser.core.config.ConfigAttribute)
      • org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl (implements org.apache.lucene.queryParser.standard.config.AnalyzerAttribute, org.apache.lucene.queryParser.core.config.ConfigAttribute)
      • org.apache.lucene.queryParser.standard.config.BoostAttributeImpl (implements org.apache.lucene.queryParser.standard.config.BoostAttribute, org.apache.lucene.queryParser.core.config.ConfigAttribute)
      • org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.DateResolutionAttribute)
      • org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute)
      • org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttribute)
      • org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.FieldBoostMapAttribute)
      • org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttribute)
      • org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.FuzzyAttribute)
      • org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.LocaleAttribute)
      • org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttribute)
      • org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.MultiFieldAttribute)
      • org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute)
      • org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.PositionIncrementsAttribute)
      • org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl (implements org.apache.lucene.queryParser.core.config.ConfigAttribute, org.apache.lucene.queryParser.standard.config.RangeCollatorAttribute)
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.queryParser.core.config.AbstractQueryConfig
        • org.apache.lucene.queryParser.core.config.QueryConfigHandler
          • org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler
    • org.apache.lucene.queryParser.standard.config.FieldBoostMapFCListener (implements org.apache.lucene.queryParser.core.config.FieldConfigListener)
    • org.apache.lucene.queryParser.standard.config.FieldDateResolutionFCListener (implements org.apache.lucene.queryParser.core.config.FieldConfigListener)
    • java.text.Format (implements java.lang.Cloneable, java.io.Serializable)
      • java.text.NumberFormat
        • org.apache.lucene.queryParser.standard.config.NumberDateFormat
    • org.apache.lucene.queryParser.standard.config.FuzzyConfig
    • org.apache.lucene.queryParser.standard.config.NumericConfig
    • org.apache.lucene.queryParser.standard.config.NumericFieldConfigListener (implements org.apache.lucene.queryParser.core.config.FieldConfigListener)
    • org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys

Interface Hierarchy

  • org.apache.lucene.util.Attribute
    • org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttribute
    • org.apache.lucene.queryParser.standard.config.AnalyzerAttribute
    • org.apache.lucene.queryParser.standard.config.BoostAttribute
    • org.apache.lucene.queryParser.standard.config.DateResolutionAttribute
    • org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute
    • org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttribute
    • org.apache.lucene.queryParser.standard.config.FieldBoostMapAttribute
    • org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttribute
    • org.apache.lucene.queryParser.standard.config.FuzzyAttribute
    • org.apache.lucene.queryParser.standard.config.LocaleAttribute
    • org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttribute
    • org.apache.lucene.queryParser.standard.config.MultiFieldAttribute
    • org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute
    • org.apache.lucene.queryParser.standard.config.PositionIncrementsAttribute
    • org.apache.lucene.queryParser.standard.config.RangeCollatorAttribute

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute.Operator
      • org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.Operator


Uses of Package org.apache.lucene.queryParser.standard.config

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.standard.config

Packages that use org.apache.lucene.queryParser.standard.config
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes

Classes in org.apache.lucene.queryParser.standard.config used by org.apache.lucene.queryParser.standard
DefaultOperatorAttribute.Operator
Deprecated.
NumericConfig
This class holds the configuration used to parse numeric queries and create NumericRangeQuerys.
StandardQueryConfigHandler
This query configuration handler is used for almost every processor defined in the StandardQueryNodeProcessorPipeline processor pipeline.
StandardQueryConfigHandler.Operator

Classes in org.apache.lucene.queryParser.standard.config used by org.apache.lucene.queryParser.standard.config
AllowLeadingWildcardAttribute
Deprecated.
AnalyzerAttribute
Deprecated.
BoostAttribute
Deprecated.
DateResolutionAttribute
Deprecated.
DefaultOperatorAttribute
Deprecated.
DefaultOperatorAttribute.Operator
Deprecated.
DefaultPhraseSlopAttribute
Deprecated.
FieldBoostMapAttribute
Deprecated.
FieldDateResolutionMapAttribute
Deprecated.
FuzzyAttribute
Deprecated.
FuzzyConfig
LocaleAttribute
Deprecated.
LowercaseExpandedTermsAttribute
Deprecated.
MultiFieldAttribute
Deprecated.
MultiTermRewriteMethodAttribute
Deprecated.
NumericConfig
This class holds the configuration used to parse numeric queries and create NumericRangeQuerys.
PositionIncrementsAttribute
Deprecated.
RangeCollatorAttribute
Deprecated.
StandardQueryConfigHandler.Operator

Classes in org.apache.lucene.queryParser.standard.config used by org.apache.lucene.queryParser.standard.nodes
NumericConfig
This class holds the configuration used to parse numeric queries and create NumericRangeQuerys.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PositionIncrementsAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Interface PositionIncrementsAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
PositionIncrementsAttributeImpl
Deprecated.

@Deprecated
public interface PositionIncrementsAttribute
extends Attribute

This attribute is used by AnalyzerQueryNodeProcessor processor and must be defined in the QueryConfigHandler. This attribute tells the processor if the position increment is enabled.

Method Summary
boolean | isPositionIncrementsEnabled() Deprecated.
void | setPositionIncrementsEnabled(boolean positionIncrementsEnabled) Deprecated.

Method Detail

setPositionIncrementsEnabled

void setPositionIncrementsEnabled(boolean positionIncrementsEnabled)
Deprecated.

isPositionIncrementsEnabled

boolean isPositionIncrementsEnabled()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PositionIncrementsAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class PositionIncrementsAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ConfigAttribute, PositionIncrementsAttribute, Attribute
Deprecated.

@Deprecated
public class PositionIncrementsAttributeImpl
extends AttributeImpl
implements PositionIncrementsAttribute, ConfigAttribute

This attribute is used by AnalyzerQueryNodeProcessor processor and must be defined in the QueryConfigHandler. This attribute tells the processor if the position increment is enabled.

See Also:
PositionIncrementsAttribute, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
PositionIncrementsAttributeImpl()
Deprecated.
Method Summary
void | clear() Deprecated. Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Deprecated. Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other) Deprecated.
int | hashCode() Deprecated.
boolean | isPositionIncrementsEnabled() Deprecated.
void | setPositionIncrementsEnabled(boolean positionIncrementsEnabled) Deprecated.
void | setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
String | toString() Deprecated. Returns a string representation of the object.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PositionIncrementsAttributeImpl

public PositionIncrementsAttributeImpl()
Deprecated.
Method Detail

setPositionIncrementsEnabled

public void setPositionIncrementsEnabled(boolean positionIncrementsEnabled)
Deprecated.
Specified by:
setPositionIncrementsEnabled in interface PositionIncrementsAttribute

isPositionIncrementsEnabled

public boolean isPositionIncrementsEnabled()
Deprecated.
Specified by:
isPositionIncrementsEnabled in interface PositionIncrementsAttribute

clear

public void clear()
Deprecated.
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Deprecated.
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Deprecated.
Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

toString

public String toString()
Deprecated.
Description copied from class: AttributeImpl
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use AttributeImpl.reflectAsString(boolean) or AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class AttributeImpl

setQueryConfigHandler

public void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Specified by:
setQueryConfigHandler in interface ConfigAttribute
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RangeCollatorAttribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Interface RangeCollatorAttribute

All Superinterfaces:
Attribute
All Known Implementing Classes:
RangeCollatorAttributeImpl
Deprecated.

@Deprecated
public interface RangeCollatorAttribute
extends Attribute

This attribute is used by ParametricRangeQueryNodeProcessor processor and must be defined in the QueryConfigHandler. This attribute tells the processor which Collator should be used for a TermRangeQuery

Method Summary
Collator | getRangeCollator() Deprecated.
void | setDateResolution(Collator rangeCollator) Deprecated.

Method Detail

setDateResolution

void setDateResolution(Collator rangeCollator)
Deprecated.

getRangeCollator

Collator getRangeCollator()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RangeCollatorAttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class RangeCollatorAttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
        extended by  org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, ConfigAttribute, RangeCollatorAttribute, Attribute
Deprecated.

@Deprecated
public class RangeCollatorAttributeImpl
extends AttributeImpl
implements RangeCollatorAttribute, ConfigAttribute

This attribute is used by ParametricRangeQueryNodeProcessor processor and must be defined in the QueryConfigHandler. This attribute tells the processor which Collator should be used for a TermRangeQuery

See Also:
RangeCollatorAttribute, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.util.AttributeImpl
enableBackwards
Constructor Summary
RangeCollatorAttributeImpl()
Deprecated.
Method Summary
void | clear() Deprecated. Clears the values in this AttributeImpl and resets it to its default value.
void | copyTo(AttributeImpl target) Deprecated. Copies the values from this Attribute into the passed-in target attribute.
boolean | equals(Object other) Deprecated.
Collator | getRangeCollator() Deprecated.
int | hashCode() Deprecated.
void | setDateResolution(Collator rangeCollator) Deprecated.
void | setQueryConfigHandler(AbstractQueryConfig config) Deprecated.
String | toString() Deprecated. Returns a string representation of the object.
Methods inherited from class org.apache.lucene.util.AttributeImpl
clone, reflectAsString, reflectWith
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

RangeCollatorAttributeImpl

public RangeCollatorAttributeImpl()
Deprecated.
Method Detail

setDateResolution

public void setDateResolution(Collator rangeCollator)
Deprecated.
Specified by:
setDateResolution in interface RangeCollatorAttribute

getRangeCollator

public Collator getRangeCollator()
Deprecated.
Specified by:
getRangeCollator in interface RangeCollatorAttribute

clear

public void clear()
Deprecated.
Description copied from class: AttributeImpl
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

Specified by:
clear in class AttributeImpl

copyTo

public void copyTo(AttributeImpl target)
Deprecated.
Description copied from class: AttributeImpl
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

Specified by:
copyTo in class AttributeImpl

equals

public boolean equals(Object other)
Deprecated.
Overrides:
equals in class Object

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

toString

public String toString()
Deprecated.
Description copied from class: AttributeImpl
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use AttributeImpl.reflectAsString(boolean) or AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class AttributeImpl

setQueryConfigHandler

public void setQueryConfigHandler(AbstractQueryConfig config)
Deprecated.
Specified by:
setQueryConfigHandler in interface ConfigAttribute
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardQueryConfigHandler.ConfigurationKeys

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class StandardQueryConfigHandler.ConfigurationKeys

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys
Enclosing class:
StandardQueryConfigHandler
public static final class StandardQueryConfigHandler.ConfigurationKeys
extends Object

Field Summary
static ConfigurationKey<Boolean> | ALLOW_LEADING_WILDCARD Key used to set whether leading wildcards are supported
static ConfigurationKey<Analyzer> | ANALYZER Key used to set the Analyzer used for terms found in the query
static ConfigurationKey<Float> | BOOST Key used to set the boost value in FieldConfig objects.
static ConfigurationKey<DateTools.Resolution> | DATE_RESOLUTION Key used to set default DateTools.Resolution.
static ConfigurationKey<StandardQueryConfigHandler.Operator> | DEFAULT_OPERATOR Key used to set the default boolean operator
static ConfigurationKey<Boolean> | ENABLE_POSITION_INCREMENTS Key used to set whether position increments is enabled
static ConfigurationKey<Map<String,Float>> | FIELD_BOOST_MAP Key used to set a field to boost map that is used to set the boost for each field
static ConfigurationKey<Map<CharSequence,DateTools.Resolution>> | FIELD_DATE_RESOLUTION_MAP Key used to set a field to DateTools.Resolution map that is used to normalize each date field value.
static ConfigurationKey<FuzzyConfig> | FUZZY_CONFIG Key used to set the FuzzyConfig used to create fuzzy queries.
static ConfigurationKey<Locale> | LOCALE Key used to set the Locale used when parsing the query
static ConfigurationKey<Boolean> | LOWERCASE_EXPANDED_TERMS Key used to set whether expanded terms should be expanded
static ConfigurationKey<CharSequence[]> | MULTI_FIELDS Key used to set the fields a query should be expanded to when the field is null
static ConfigurationKey<MultiTermQuery.RewriteMethod> | MULTI_TERM_REWRITE_METHOD Key used to set the MultiTermQuery.RewriteMethod used when creating queries
static ConfigurationKey<NumericConfig> | NUMERIC_CONFIG Key used to set a field to its NumericConfig.
static ConfigurationKey<Map<String,NumericConfig>> | NUMERIC_CONFIG_MAP Key used to set the NumericConfig in FieldConfig for numeric fields.
static ConfigurationKey<Integer> | PHRASE_SLOP Key used to set the default phrase slop
static ConfigurationKey<Collator> | RANGE_COLLATOR Key used to set the Collator used when creating TermRangeQuerys.
Constructor Summary
StandardQueryConfigHandler.ConfigurationKeys()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

ENABLE_POSITION_INCREMENTS

public static final ConfigurationKey<Boolean> ENABLE_POSITION_INCREMENTS
Key used to set whether position increments is enabled

See Also:
StandardQueryParser.setEnablePositionIncrements(boolean), StandardQueryParser.getEnablePositionIncrements()

LOWERCASE_EXPANDED_TERMS

public static final ConfigurationKey<Boolean> LOWERCASE_EXPANDED_TERMS
Key used to set whether expanded terms should be expanded

See Also:
StandardQueryParser.setLowercaseExpandedTerms(boolean), StandardQueryParser.getLowercaseExpandedTerms()

ALLOW_LEADING_WILDCARD

public static final ConfigurationKey<Boolean> ALLOW_LEADING_WILDCARD
Key used to set whether leading wildcards are supported

See Also:
StandardQueryParser.setAllowLeadingWildcard(boolean), StandardQueryParser.getAllowLeadingWildcard()

ANALYZER

public static final ConfigurationKey<Analyzer> ANALYZER
Key used to set the Analyzer used for terms found in the query

See Also:
StandardQueryParser.setAnalyzer(Analyzer), StandardQueryParser.getAnalyzer()

DEFAULT_OPERATOR

public static final ConfigurationKey<StandardQueryConfigHandler.Operator> DEFAULT_OPERATOR
Key used to set the default boolean operator

See Also:
StandardQueryParser.setDefaultOperator(org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.Operator), StandardQueryParser.getDefaultOperator()

PHRASE_SLOP

public static final ConfigurationKey<Integer> PHRASE_SLOP
Key used to set the default phrase slop

See Also:
StandardQueryParser.setPhraseSlop(int), StandardQueryParser.getPhraseSlop()

LOCALE

public static final ConfigurationKey<Locale> LOCALE
Key used to set the Locale used when parsing the query

See Also:
StandardQueryParser.setLocale(Locale), StandardQueryParser.getLocale()

MULTI_TERM_REWRITE_METHOD

public static final ConfigurationKey<MultiTermQuery.RewriteMethod> MULTI_TERM_REWRITE_METHOD
Key used to set the MultiTermQuery.RewriteMethod used when creating queries

See Also:
StandardQueryParser.setMultiTermRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod), StandardQueryParser.getMultiTermRewriteMethod()

MULTI_FIELDS

public static final ConfigurationKey<CharSequence[]> MULTI_FIELDS
Key used to set the fields a query should be expanded to when the field is null

See Also:
StandardQueryParser.setMultiFields(CharSequence[]), StandardQueryParser.getMultiFields(CharSequence[])

FIELD_BOOST_MAP

public static final ConfigurationKey<Map<String,Float>> FIELD_BOOST_MAP
Key used to set a field to boost map that is used to set the boost for each field

See Also:
StandardQueryParser.setFieldsBoost(Map), StandardQueryParser.getFieldsBoost()

FIELD_DATE_RESOLUTION_MAP

public static final ConfigurationKey<Map<CharSequence,DateTools.Resolution>> FIELD_DATE_RESOLUTION_MAP
Key used to set a field to DateTools.Resolution map that is used to normalize each date field value.

See Also:
StandardQueryParser.setDateResolutionMap(Map), StandardQueryParser.getDateResolutionMap()

FUZZY_CONFIG

public static final ConfigurationKey<FuzzyConfig> FUZZY_CONFIG
Key used to set the FuzzyConfig used to create fuzzy queries.

See Also:
StandardQueryParser.setFuzzyMinSim(float),
StandardQueryParser.setFuzzyPrefixLength(int),
StandardQueryParser.getFuzzyMinSim(),
StandardQueryParser.getFuzzyPrefixLength()

DATE_RESOLUTION

public static final ConfigurationKey<DateTools.Resolution> DATE_RESOLUTION
Key used to set default DateTools.Resolution.

See Also:
StandardQueryParser.setDateResolution(org.apache.lucene.document.DateTools.Resolution), StandardQueryParser.getDateResolution()

BOOST

public static final ConfigurationKey<Float> BOOST
Key used to set the boost value in FieldConfig objects.

See Also:
StandardQueryParser.setFieldsBoost(Map), StandardQueryParser.getFieldsBoost()

NUMERIC_CONFIG

public static final ConfigurationKey<NumericConfig> NUMERIC_CONFIG
Key used to set a field to its NumericConfig.

See Also:
StandardQueryParser.setNumericConfigMap(Map), StandardQueryParser.getNumericConfigMap()

NUMERIC_CONFIG_MAP

public static final ConfigurationKey<Map<String,NumericConfig>> NUMERIC_CONFIG_MAP
Key used to set the NumericConfig in FieldConfig for numeric fields.

See Also:
StandardQueryParser.setNumericConfigMap(Map), StandardQueryParser.getNumericConfigMap()

RANGE_COLLATOR

public static final ConfigurationKey<Collator> RANGE_COLLATOR
Key used to set the Collator used when creating TermRangeQuerys.

See Also:
StandardQueryParser.setRangeCollator(Collator), StandardQueryParser.getRangeCollator()
Constructor Detail

StandardQueryConfigHandler.ConfigurationKeys

public StandardQueryConfigHandler.ConfigurationKeys()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardQueryConfigHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.config
Class StandardQueryConfigHandler

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.queryParser.core.config.AbstractQueryConfig
            extended by  org.apache.lucene.queryParser.core.config.QueryConfigHandler
                extended by  org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler

public class StandardQueryConfigHandler
extends QueryConfigHandler

This query configuration handler is used for almost every processor defined in the StandardQueryNodeProcessorPipeline processor pipeline. It holds attributes that reproduces the configuration that could be set on the old lucene 2.4 QueryParser class.

See Also:
StandardQueryNodeProcessorPipeline

Nested Class Summary
static class | StandardQueryConfigHandler.ConfigurationKeys
static class | StandardQueryConfigHandler.Operator
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Constructor Summary
StandardQueryConfigHandler()
Method Summary
Methods inherited from class org.apache.lucene.queryParser.core.config.QueryConfigHandler
addFieldConfigListener, getFieldConfig, getFieldConfig
Methods inherited from class org.apache.lucene.queryParser.core.config.AbstractQueryConfig
addAttribute, get, get, has, set, unset
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

StandardQueryConfigHandler

public StandardQueryConfigHandler()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardQueryConfigHandler.Operator

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.queryParser.standard.config
Enum StandardQueryConfigHandler.Operator

java.lang.Object
    extended by  java.lang.Enum<StandardQueryConfigHandler.Operator>
        extended by  org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.Operator
All Implemented Interfaces:
Serializable, Comparable<StandardQueryConfigHandler.Operator>
Enclosing class:
StandardQueryConfigHandler
public static enum StandardQueryConfigHandler.Operator
extends Enum<StandardQueryConfigHandler.Operator>

Enum Constant Summary
AND
OR
Method Summary
static StandardQueryConfigHandler.Operator | valueOf(String name) Returns the enum constant of this type with the specified name.
static StandardQueryConfigHandler.Operator[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

AND

public static final StandardQueryConfigHandler.Operator AND

OR

public static final StandardQueryConfigHandler.Operator OR
Method Detail

values

public static final StandardQueryConfigHandler.Operator[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(StandardQueryConfigHandler.Operator c : StandardQueryConfigHandler.Operator.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static StandardQueryConfigHandler.Operator valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD


Uses of Interface org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttribute

Packages that use AllowLeadingWildcardAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of AllowLeadingWildcardAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement AllowLeadingWildcardAttribute
 class AllowLeadingWildcardAttributeImpl
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl

No usage of org.apache.lucene.queryParser.standard.config.AllowLeadingWildcardAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.config.AnalyzerAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.config.AnalyzerAttribute

Packages that use AnalyzerAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of AnalyzerAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement AnalyzerAttribute
 class AnalyzerAttributeImpl
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl

No usage of org.apache.lucene.queryParser.standard.config.AnalyzerAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.config.BoostAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.config.BoostAttribute

Packages that use BoostAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of BoostAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement BoostAttribute
 class BoostAttributeImpl
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.BoostAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.BoostAttributeImpl

No usage of org.apache.lucene.queryParser.standard.config.BoostAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.config.DateResolutionAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.config.DateResolutionAttribute

Packages that use DateResolutionAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of DateResolutionAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement DateResolutionAttribute
 class DateResolutionAttributeImpl
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl

No usage of org.apache.lucene.queryParser.standard.config.DateResolutionAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute

Packages that use DefaultOperatorAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of DefaultOperatorAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement DefaultOperatorAttribute
 class DefaultOperatorAttributeImpl
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute.Operator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.DefaultOperatorAttribute.Operator

Packages that use DefaultOperatorAttribute.Operator
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration

Uses of DefaultOperatorAttribute.Operator in org.apache.lucene.queryParser.standard

Methods in org.apache.lucene.queryParser.standard with parameters of type DefaultOperatorAttribute.Operator
 void StandardQueryParser.setDefaultOperator(DefaultOperatorAttribute.Operator operator)
Deprecated.

Uses of DefaultOperatorAttribute.Operator in org.apache.lucene.queryParser.standard.config

Methods in org.apache.lucene.queryParser.standard.config that return DefaultOperatorAttribute.Operator
DefaultOperatorAttribute.Operator | DefaultOperatorAttributeImpl.getOperator() Deprecated.
DefaultOperatorAttribute.Operator | DefaultOperatorAttribute.getOperator() Deprecated.
static DefaultOperatorAttribute.Operator | DefaultOperatorAttribute.Operator.valueOf(String name) Returns the enum constant of this type with the specified name.
static DefaultOperatorAttribute.Operator[] | DefaultOperatorAttribute.Operator.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.queryParser.standard.config with parameters of type DefaultOperatorAttribute.Operator
void | DefaultOperatorAttributeImpl.setOperator(DefaultOperatorAttribute.Operator operator) Deprecated.
void | DefaultOperatorAttribute.setOperator(DefaultOperatorAttribute.Operator operator) Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl

No usage of org.apache.lucene.queryParser.standard.config.DefaultOperatorAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttribute

Packages that use DefaultPhraseSlopAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of DefaultPhraseSlopAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement DefaultPhraseSlopAttribute
 class DefaultPhraseSlopAttributeImpl
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl

No usage of org.apache.lucene.queryParser.standard.config.DefaultPhraseSlopAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.config.FieldBoostMapAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.config.FieldBoostMapAttribute

Packages that use FieldBoostMapAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of FieldBoostMapAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement FieldBoostMapAttribute
 class FieldBoostMapAttributeImpl
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl

No usage of org.apache.lucene.queryParser.standard.config.FieldBoostMapAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.FieldBoostMapFCListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.FieldBoostMapFCListener

No usage of org.apache.lucene.queryParser.standard.config.FieldBoostMapFCListener

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.FieldDateResolutionFCListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.FieldDateResolutionFCListener

No usage of org.apache.lucene.queryParser.standard.config.FieldDateResolutionFCListener

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttribute

Packages that use FieldDateResolutionMapAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of FieldDateResolutionMapAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement FieldDateResolutionMapAttribute
 class FieldDateResolutionMapAttributeImpl
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl

No usage of org.apache.lucene.queryParser.standard.config.FieldDateResolutionMapAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.config.FuzzyAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.config.FuzzyAttribute

Packages that use FuzzyAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of FuzzyAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement FuzzyAttribute
 class FuzzyAttributeImpl
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl

No usage of org.apache.lucene.queryParser.standard.config.FuzzyAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.FuzzyConfig

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.FuzzyConfig

Packages that use FuzzyConfig
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of FuzzyConfig in org.apache.lucene.queryParser.standard.config

Fields in org.apache.lucene.queryParser.standard.config with type parameters of type FuzzyConfig
static ConfigurationKey<FuzzyConfig> StandardQueryConfigHandler.ConfigurationKeys.FUZZY_CONFIG
Key used to set the FuzzyConfig used to create fuzzy queries.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.config.LocaleAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.config.LocaleAttribute

Packages that use LocaleAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of LocaleAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement LocaleAttribute
 class LocaleAttributeImpl
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl

No usage of org.apache.lucene.queryParser.standard.config.LocaleAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttribute

Packages that use LowercaseExpandedTermsAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of LowercaseExpandedTermsAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement LowercaseExpandedTermsAttribute
 class LowercaseExpandedTermsAttributeImpl
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl

No usage of org.apache.lucene.queryParser.standard.config.LowercaseExpandedTermsAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.config.MultiFieldAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.config.MultiFieldAttribute

Packages that use MultiFieldAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of MultiFieldAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement MultiFieldAttribute
 class MultiFieldAttributeImpl
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl

No usage of org.apache.lucene.queryParser.standard.config.MultiFieldAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttribute

Packages that use MultiTermRewriteMethodAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of MultiTermRewriteMethodAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement MultiTermRewriteMethodAttribute
 class MultiTermRewriteMethodAttributeImpl
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl

No usage of org.apache.lucene.queryParser.standard.config.MultiTermRewriteMethodAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.NumberDateFormat

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.NumberDateFormat

No usage of org.apache.lucene.queryParser.standard.config.NumberDateFormat

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.NumericConfig

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.NumericConfig

Packages that use NumericConfig
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration
org.apache.lucene.queryParser.standard.nodes | Standard Lucene Query Nodes

Uses of NumericConfig in org.apache.lucene.queryParser.standard

Methods in org.apache.lucene.queryParser.standard that return types with arguments of type NumericConfig
 Map<String,NumericConfig> StandardQueryParser.getNumericConfigMap()

Method parameters in org.apache.lucene.queryParser.standard with type arguments of type NumericConfig
 void StandardQueryParser.setNumericConfigMap(Map<String,NumericConfig> numericConfigMap)

Uses of NumericConfig in org.apache.lucene.queryParser.standard.config

Fields in org.apache.lucene.queryParser.standard.config with type parameters of type NumericConfig
static ConfigurationKey<NumericConfig> | StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG Key used to set a field to its NumericConfig.
static ConfigurationKey<Map<String,NumericConfig>> | StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG_MAP Key used to set the NumericConfig in FieldConfig for numeric fields.

Uses of NumericConfig in org.apache.lucene.queryParser.standard.nodes

Fields in org.apache.lucene.queryParser.standard.nodes declared as NumericConfig
 NumericConfig NumericRangeQueryNode.numericConfig

Methods in org.apache.lucene.queryParser.standard.nodes that return NumericConfig
 NumericConfig NumericRangeQueryNode.getNumericConfig()
Returns the NumericConfig associated with the lower and upper bounds.

Methods in org.apache.lucene.queryParser.standard.nodes with parameters of type NumericConfig
 void NumericRangeQueryNode.setBounds(NumericQueryNode lower, NumericQueryNode upper, boolean lowerInclusive, boolean upperInclusive, NumericConfig numericConfig)
Sets the upper and lower bounds of this range query node and the NumericConfig associated with these bounds.

Constructors in org.apache.lucene.queryParser.standard.nodes with parameters of type NumericConfig
NumericRangeQueryNode(NumericQueryNode lower, NumericQueryNode upper, boolean lowerInclusive, boolean upperInclusive, NumericConfig numericConfig)
Constructs a NumericRangeQueryNode object using the given NumericQueryNode as its bounds and NumericConfig.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.NumericFieldConfigListener

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.NumericFieldConfigListener

No usage of org.apache.lucene.queryParser.standard.config.NumericFieldConfigListener

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.config.PositionIncrementsAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.config.PositionIncrementsAttribute

Packages that use PositionIncrementsAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of PositionIncrementsAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement PositionIncrementsAttribute
 class PositionIncrementsAttributeImpl
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl

No usage of org.apache.lucene.queryParser.standard.config.PositionIncrementsAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.config.RangeCollatorAttribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.config.RangeCollatorAttribute

Packages that use RangeCollatorAttribute
org.apache.lucene.queryParser.standard.config Standard Lucene Query Configuration

Uses of RangeCollatorAttribute in org.apache.lucene.queryParser.standard.config

Classes in org.apache.lucene.queryParser.standard.config that implement RangeCollatorAttribute
 class RangeCollatorAttributeImpl
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl

No usage of org.apache.lucene.queryParser.standard.config.RangeCollatorAttributeImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys

No usage of org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.ConfigurationKeys

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler

Packages that use StandardQueryConfigHandler
org.apache.lucene.queryParser.standard Contains the implementation of the Lucene query parser using the flexible query parser frameworks

Uses of StandardQueryConfigHandler in org.apache.lucene.queryParser.standard

Methods in org.apache.lucene.queryParser.standard with parameters of type StandardQueryConfigHandler
 void QueryParserWrapper.setQueryConfig(StandardQueryConfigHandler queryConfig)
Deprecated. Sets the QueryConfigHandler used by the QueryNodeProcessor set to this object.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.Operator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.config.StandardQueryConfigHandler.Operator

Packages that use StandardQueryConfigHandler.Operator
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration

Uses of StandardQueryConfigHandler.Operator in org.apache.lucene.queryParser.standard

Methods in org.apache.lucene.queryParser.standard that return StandardQueryConfigHandler.Operator
 StandardQueryConfigHandler.Operator StandardQueryParser.getDefaultOperator()
Gets implicit operator setting, which will be either AND or OR.

Methods in org.apache.lucene.queryParser.standard with parameters of type StandardQueryConfigHandler.Operator
 void StandardQueryParser.setDefaultOperator(StandardQueryConfigHandler.Operator operator)
Sets the boolean operator of the QueryParser.

Uses of StandardQueryConfigHandler.Operator in org.apache.lucene.queryParser.standard.config

Fields in org.apache.lucene.queryParser.standard.config with type parameters of type StandardQueryConfigHandler.Operator
static ConfigurationKey<StandardQueryConfigHandler.Operator> StandardQueryConfigHandler.ConfigurationKeys.DEFAULT_OPERATOR
Key used to set the default boolean operator

Methods in org.apache.lucene.queryParser.standard.config that return StandardQueryConfigHandler.Operator
static StandardQueryConfigHandler.Operator | StandardQueryConfigHandler.Operator.valueOf(String name) Returns the enum constant of this type with the specified name.
static StandardQueryConfigHandler.Operator[] | StandardQueryConfigHandler.Operator.values() Returns an array containing the constants of this enum type, in the order they're declared.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AbstractRangeQueryNode

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.nodes
Class AbstractRangeQueryNode<T extends FieldValuePairQueryNode<?>>

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode<T>
Type Parameters:
T - the type of the range query bounds (lower and upper)
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, QueryNode, RangeQueryNode<FieldValuePairQueryNode<?>>
Direct Known Subclasses:
NumericRangeQueryNode, TermRangeQueryNode
public abstract class AbstractRangeQueryNode<T extends FieldValuePairQueryNode<?>>
extends QueryNodeImpl
implements RangeQueryNode<FieldValuePairQueryNode<?>>

This class should be extended by nodes intending to represent range queries.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
protected AbstractRangeQueryNode()
Constructs an AbstractRangeQueryNode, it should be invoked only by its extenders.
Method Summary
CharSequence | getField() Returns the field associated with this node.
T | getLowerBound() Returns the lower bound node.
T | getUpperBound() Returns the upper bound node.
boolean | isLowerInclusive() Returns whether the lower bound is inclusive or exclusive.
boolean | isUpperInclusive() Returns whether the upper bound is inclusive or exclusive.
void | setBounds(T lower, T upper, boolean lowerInclusive, boolean upperInclusive) Sets the lower and upper bounds.
void | setField(CharSequence fieldName) Sets the field associated with this node.
CharSequence | toQueryString(EscapeQuerySyntax escapeSyntaxParser) convert to a query string understood by the query parser
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, toString, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, toString, unsetTag, unsetTag

Constructor Detail

AbstractRangeQueryNode

protected AbstractRangeQueryNode()
Constructs an AbstractRangeQueryNode, it should be invoked only by its extenders.

Method Detail

getField

public CharSequence getField()
Returns the field associated with this node.

Specified by:
getField in interface FieldableNode
Returns:
the field associated with this node
See Also:
FieldableNode

setField

public void setField(CharSequence fieldName)
Sets the field associated with this node.

Specified by:
setField in interface FieldableNode
Parameters:
fieldName - the field associated with this node

getLowerBound

public T getLowerBound()
Returns the lower bound node.

Specified by:
getLowerBound in interface RangeQueryNode<FieldValuePairQueryNode<?>>
Returns:
the lower bound node.

getUpperBound

public T getUpperBound()
Returns the upper bound node.

Specified by:
getUpperBound in interface RangeQueryNode<FieldValuePairQueryNode<?>>
Returns:
the upper bound node.

isLowerInclusive

public boolean isLowerInclusive()
Returns whether the lower bound is inclusive or exclusive.

Specified by:
isLowerInclusive in interface RangeQueryNode<FieldValuePairQueryNode<?>>
Returns:
true if the lower bound is inclusive, otherwise, false

isUpperInclusive

public boolean isUpperInclusive()
Returns whether the upper bound is inclusive or exclusive.

Specified by:
isUpperInclusive in interface RangeQueryNode<FieldValuePairQueryNode<?>>
Returns:
true if the upper bound is inclusive, otherwise, false

setBounds

public void setBounds(T lower,
                      T upper,
                      boolean lowerInclusive,
                      boolean upperInclusive)
Sets the lower and upper bounds.

Parameters:
lower - the lower bound, null if lower bound is open
upper - the upper bound, null if upper bound is open
lowerInclusive - true if the lower bound is inclusive, otherwise, false
upperInclusive - true if the upper bound is inclusive, otherwise, false
See Also:
getLowerBound(),
getUpperBound(),
isLowerInclusive(),
isUpperInclusive()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BooleanModifierNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.nodes
Class BooleanModifierNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.ModifierQueryNode
            extended by  org.apache.lucene.queryParser.standard.nodes.BooleanModifierNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
public class BooleanModifierNode
extends ModifierQueryNode

A BooleanModifierNode has the same behaviour as ModifierQueryNode, it only indicates that this modifier was added by GroupQueryNodeProcessor and not by the user.

See Also:
ModifierQueryNode, Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.queryParser.core.nodes.ModifierQueryNode
ModifierQueryNode.Modifier
Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
BooleanModifierNode(QueryNode node, ModifierQueryNode.Modifier mod)
Method Summary
Methods inherited from class org.apache.lucene.queryParser.core.nodes.ModifierQueryNode
cloneTree, getChild, getModifier, setChild, toQueryString, toString
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BooleanModifierNode

public BooleanModifierNode(QueryNode node,
                           ModifierQueryNode.Modifier mod)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiPhraseQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.nodes
Class MultiPhraseQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.standard.nodes.MultiPhraseQueryNode
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, QueryNode
public class MultiPhraseQueryNode
extends QueryNodeImpl
implements FieldableNode

A MultiPhraseQueryNode indicates that its children should be used to build a MultiPhraseQuery instead of PhraseQuery.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
MultiPhraseQueryNode()
Method Summary
 QueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 CharSequence getField()
Returns the field associated to the node and every node under it.
 void setField(CharSequence fieldName)
Associates the node to a field.
 CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag

Constructor Detail

MultiPhraseQueryNode

public MultiPhraseQueryNode()
Method Detail

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode

cloneTree

public QueryNode cloneTree()
                    throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class QueryNodeImpl
Returns:
the cloned tree
Throws:
CloneNotSupportedException

getField

public CharSequence getField()
Description copied from interface: FieldableNode
Returns the field associated to the node and every node under it.

Specified by:
getField in interface FieldableNode
Returns:
the field name

setField

public void setField(CharSequence fieldName)
Description copied from interface: FieldableNode
Associates the node to a field.

Specified by:
setField in interface FieldableNode
Parameters:
fieldName - the field name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.nodes
Class NumericQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.standard.nodes.NumericQueryNode
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, FieldValuePairQueryNode<Number>, QueryNode, ValueQueryNode<Number>
public class NumericQueryNode
extends QueryNodeImpl
implements FieldValuePairQueryNode<Number>

This query node represents a field query that holds a numeric value. It is similar to FieldQueryNode, however the getValue() returns a Number.

See Also:
NumericConfig, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
NumericQueryNode(CharSequence field, Number value, NumberFormat numberFormat)
Creates a NumericQueryNode object using the given field, Number value and NumberFormat used to convert the value to String.
Method Summary
CharSequence | getField() Returns the field associated with this node.
NumberFormat | getNumberFormat() Returns the NumberFormat used to convert the value to String.
protected CharSequence | getTermEscaped(EscapeQuerySyntax escaper) This method is used to get the value converted to String and escaped using the given EscapeQuerySyntax.
Number | getValue() Returns the numeric value as Number.
void | setField(CharSequence fieldName) Sets the field associated with this node.
void | setNumberFormat(NumberFormat format) Sets the NumberFormat used to convert the value to String.
void | setValue(Number value) Sets the numeric value.
CharSequence | toQueryString(EscapeQuerySyntax escapeSyntaxParser) convert to a query string understood by the query parser
String | toString() Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag

Constructor Detail

NumericQueryNode

public NumericQueryNode(CharSequence field,
                        Number value,
                        NumberFormat numberFormat)
Creates a NumericQueryNode object using the given field, Number value and NumberFormat used to convert the value to String.

Parameters:
field - the field associated with this query node
value - the value hold by this node
numberFormat - the NumberFormat used to convert the value to String
Method Detail

getField

public CharSequence getField()
Returns the field associated with this node.

Specified by:
getField in interface FieldableNode
Returns:
the field associated with this node

setField

public void setField(CharSequence fieldName)
Sets the field associated with this node.

Specified by:
setField in interface FieldableNode
Parameters:
fieldName - the field associated with this node

getTermEscaped

protected CharSequence getTermEscaped(EscapeQuerySyntax escaper)
This method is used to get the value converted to String and escaped using the given EscapeQuerySyntax.

Parameters:
escaper - the EscapeQuerySyntax used to escape the value String
Returns:
the value converte to String and escaped

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode

setNumberFormat

public void setNumberFormat(NumberFormat format)
Sets the NumberFormat used to convert the value to String.

Parameters:
format - the NumberFormat used to convert the value to String

getNumberFormat

public NumberFormat getNumberFormat()
Returns the NumberFormat used to convert the value to String.

Returns:
the NumberFormat used to convert the value to String

getValue

public Number getValue()
Returns the numeric value as Number.

Specified by:
getValue in interface ValueQueryNode<Number>
Returns:
the numeric value

setValue

public void setValue(Number value)
Sets the numeric value.

Specified by:
setValue in interface ValueQueryNode<Number>
Parameters:
value - the numeric value

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericRangeQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.nodes
Class NumericRangeQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode<NumericQueryNode>
            extended by  org.apache.lucene.queryParser.standard.nodes.NumericRangeQueryNode
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, QueryNode, RangeQueryNode<FieldValuePairQueryNode<?>>
public class NumericRangeQueryNode
extends AbstractRangeQueryNode<NumericQueryNode>

This query node represents a range query composed by NumericQueryNode bounds, which means the bound values are Numbers.

See Also:
NumericQueryNode, AbstractRangeQueryNode, Serialized Form

Field Summary
 NumericConfig numericConfig
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
NumericRangeQueryNode(NumericQueryNode lower, NumericQueryNode upper, boolean lowerInclusive, boolean upperInclusive, NumericConfig numericConfig)
Constructs a NumericRangeQueryNode object using the given NumericQueryNode as its bounds and NumericConfig.
Method Summary
NumericConfig | getNumericConfig() Returns the NumericConfig associated with the lower and upper bounds.
void | setBounds(NumericQueryNode lower, NumericQueryNode upper, boolean lowerInclusive, boolean upperInclusive, NumericConfig numericConfig) Sets the upper and lower bounds of this range query node and the NumericConfig associated with these bounds.
String | toString() Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode
getField, getLowerBound, getUpperBound, isLowerInclusive, isUpperInclusive, setBounds, setField, toQueryString
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag

Field Detail

numericConfig

public NumericConfig numericConfig
Constructor Detail

NumericRangeQueryNode

public NumericRangeQueryNode(NumericQueryNode lower,
                             NumericQueryNode upper,
                             boolean lowerInclusive,
                             boolean upperInclusive,
                             NumericConfig numericConfig)
                      throws QueryNodeException
Constructs a NumericRangeQueryNode object using the given NumericQueryNode as its bounds and NumericConfig.

Parameters:
lower - the lower bound
upper - the upper bound
lowerInclusive - true if the lower bound is inclusive, otherwise, false
upperInclusive - true if the upper bound is inclusive, otherwise, false
numericConfig - the NumericConfig that represents associated with the upper and lower bounds
Throws:
QueryNodeException
See Also:
setBounds(NumericQueryNode, NumericQueryNode, boolean, boolean, NumericConfig)
Method Detail

setBounds

public void setBounds(NumericQueryNode lower,
                      NumericQueryNode upper,
                      boolean lowerInclusive,
                      boolean upperInclusive,
                      NumericConfig numericConfig)
               throws QueryNodeException
Sets the upper and lower bounds of this range query node and the NumericConfig associated with these bounds.

Parameters:
lower - the lower bound
upper - the upper bound
lowerInclusive - true if the lower bound is inclusive, otherwise, false
upperInclusive - true if the upper bound is inclusive, otherwise, false
numericConfig - the NumericConfig that represents associated with the upper and lower bounds
Throws:
QueryNodeException

getNumericConfig

public NumericConfig getNumericConfig()
Returns the NumericConfig associated with the lower and upper bounds.

Returns:
the NumericConfig associated with the lower and upper bounds

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.standard.nodes
Classes
AbstractRangeQueryNode
BooleanModifierNode
MultiPhraseQueryNode
NumericQueryNode
NumericRangeQueryNode
PrefixWildcardQueryNode
RangeQueryNode
StandardBooleanQueryNode
TermRangeQueryNode
WildcardQueryNode


org.apache.lucene.queryParser.standard.nodes

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.standard.nodes

Standard Lucene Query Nodes

See:
Description

Class Summary
AbstractRangeQueryNode<T extends FieldValuePairQueryNode<?>> | This class should be extended by nodes intending to represent range queries.
BooleanModifierNode | A BooleanModifierNode has the same behaviour as ModifierQueryNode, it only indicates that this modifier was added by GroupQueryNodeProcessor and not by the user.
MultiPhraseQueryNode | A MultiPhraseQueryNode indicates that its children should be used to build a MultiPhraseQuery instead of PhraseQuery.
NumericQueryNode | This query node represents a field query that holds a numeric value.
NumericRangeQueryNode | This query node represents a range query composed by NumericQueryNode bounds, which means the bound values are Numbers.
PrefixWildcardQueryNode | A PrefixWildcardQueryNode represents wildcardquery that matches abc* or *.
RangeQueryNode | Deprecated. this class will be removed in future, TermRangeQueryNode should be used instead
StandardBooleanQueryNode | A StandardBooleanQueryNode has the same behavior as BooleanQueryNode.
TermRangeQueryNode | This query node represents a range query composed by FieldQueryNode bounds, which means the bound values are strings.
WildcardQueryNode | A WildcardQueryNode represents wildcard query This does not apply to phrases.

Package org.apache.lucene.queryParser.standard.nodes Description

Standard Lucene Query Nodes

The package org.apache.lucene.queryParser.standard.nodes contains QueryNode classes that are used specifically for Lucene query node tree. Any other generic QueryNode is defined under org.apache.lucene.queryParser.nodes.


org.apache.lucene.queryParser.standard.nodes Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.standard.nodes

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.core.nodes.QueryNodeImpl (implements java.lang.Cloneable, org.apache.lucene.queryParser.core.nodes.QueryNode)
      • org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode<T> (implements org.apache.lucene.queryParser.core.nodes.RangeQueryNode<T>)
        • org.apache.lucene.queryParser.standard.nodes.NumericRangeQueryNode
        • org.apache.lucene.queryParser.standard.nodes.TermRangeQueryNode
          • org.apache.lucene.queryParser.standard.nodes.RangeQueryNode
      • org.apache.lucene.queryParser.core.nodes.BooleanQueryNode
        • org.apache.lucene.queryParser.standard.nodes.StandardBooleanQueryNode
      • org.apache.lucene.queryParser.core.nodes.FieldQueryNode (implements org.apache.lucene.queryParser.core.nodes.FieldValuePairQueryNode<T>, org.apache.lucene.queryParser.core.nodes.TextableQueryNode)
        • org.apache.lucene.queryParser.standard.nodes.WildcardQueryNode
          • org.apache.lucene.queryParser.standard.nodes.PrefixWildcardQueryNode
      • org.apache.lucene.queryParser.core.nodes.ModifierQueryNode
        • org.apache.lucene.queryParser.standard.nodes.BooleanModifierNode
      • org.apache.lucene.queryParser.standard.nodes.MultiPhraseQueryNode (implements org.apache.lucene.queryParser.core.nodes.FieldableNode)
      • org.apache.lucene.queryParser.standard.nodes.NumericQueryNode (implements org.apache.lucene.queryParser.core.nodes.FieldValuePairQueryNode<T>)


Uses of Package org.apache.lucene.queryParser.standard.nodes

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.standard.nodes

Packages that use org.apache.lucene.queryParser.standard.nodes
org.apache.lucene.queryParser.standard.nodes Standard Lucene Query Nodes

Classes in org.apache.lucene.queryParser.standard.nodes used by org.apache.lucene.queryParser.standard.nodes
AbstractRangeQueryNode
This class should be extended by nodes intending to represent range queries.
NumericQueryNode
This query node represents a field query that holds a numeric value.
PrefixWildcardQueryNode
A PrefixWildcardQueryNode represents wildcardquery that matches abc* or *.
TermRangeQueryNode
This query node represents a range query composed by FieldQueryNode bounds, which means the bound values are strings.
WildcardQueryNode
A WildcardQueryNode represents wildcard query This does not apply to phrases.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PrefixWildcardQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.nodes
Class PrefixWildcardQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.FieldQueryNode
            extended by  org.apache.lucene.queryParser.standard.nodes.WildcardQueryNode
                extended by  org.apache.lucene.queryParser.standard.nodes.PrefixWildcardQueryNode
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, FieldValuePairQueryNode<CharSequence>, QueryNode, TextableQueryNode, ValueQueryNode<CharSequence>
public class PrefixWildcardQueryNode
extends WildcardQueryNode

A PrefixWildcardQueryNode represents wildcardquery that matches abc* or *. This does not apply to phrases, this is a special case on the original lucene parser. TODO: refactor the code to remove this special case from the parser. and probably do it on a Processor

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
begin, end, field, positionIncrement, text
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
PrefixWildcardQueryNode(CharSequence field, CharSequence text, int begin, int end)
PrefixWildcardQueryNode(FieldQueryNode fqn)
Method Summary
 PrefixWildcardQueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.standard.nodes.WildcardQueryNode
toQueryString
Methods inherited from class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
getBegin, getEnd, getField, getFieldAsString, getPositionIncrement, getTermEscaped, getTermEscapeQuoted, getText, getTextAsString, getValue, setBegin, setEnd, setField, setPositionIncrement, setText, setValue
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag

Constructor Detail

PrefixWildcardQueryNode

public PrefixWildcardQueryNode(CharSequence field,
                               CharSequence text,
                               int begin,
                               int end)
Parameters:
field - - field name
text - - value including the wildcard
begin - - position in the query string
end - - position in the query string

PrefixWildcardQueryNode

public PrefixWildcardQueryNode(FieldQueryNode fqn)
Method Detail

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class WildcardQueryNode
See Also:
QueryNode.toString()

cloneTree

public PrefixWildcardQueryNode cloneTree()
                                  throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class WildcardQueryNode
Returns:
the cloned tree
Throws:
CloneNotSupportedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RangeQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.nodes
Class RangeQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode<FieldQueryNode>
            extended by  org.apache.lucene.queryParser.standard.nodes.TermRangeQueryNode
                extended by  org.apache.lucene.queryParser.standard.nodes.RangeQueryNode
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, QueryNode, RangeQueryNode<FieldValuePairQueryNode<?>>
Deprecated. this class will be removed in future, TermRangeQueryNode should be used instead

@Deprecated
public class RangeQueryNode
extends TermRangeQueryNode

This query node represents a range query. It also holds which collator will be used by the range query and if the constant score rewrite is enabled.

See Also:
ParametricRangeQueryNodeProcessor, StandardQueryConfigHandler.ConfigurationKeys.RANGE_COLLATOR, TermRangeQuery, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
RangeQueryNode(ParametricQueryNode lower, ParametricQueryNode upper, Collator collator)
Deprecated.
Method Summary
Collator | getCollator() Deprecated.
ParametricQueryNode | getLowerBound() Deprecated. Returns the lower bound node.
ParametricQueryNode | getUpperBound() Deprecated. Returns the upper bound node.
void | setBounds(FieldQueryNode lower, FieldQueryNode upper, boolean lowerInclusive, boolean upperInclusive) Deprecated. Sets lower and upper bounds.
String | toString() Deprecated. Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode
getField, isLowerInclusive, isUpperInclusive, setField, toQueryString
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag

Constructor Detail

RangeQueryNode

public RangeQueryNode(ParametricQueryNode lower,
                      ParametricQueryNode upper,
                      Collator collator)
Deprecated.
Parameters:
lower -
upper -
Method Detail

getLowerBound

public ParametricQueryNode getLowerBound()
Deprecated.
Description copied from class: AbstractRangeQueryNode
Returns the lower bound node.

Specified by:
getLowerBound in interface RangeQueryNode<FieldValuePairQueryNode<?>>
Overrides:
getLowerBound in class AbstractRangeQueryNode<FieldQueryNode>
Returns:
the lower bound node.

getUpperBound

public ParametricQueryNode getUpperBound()
Deprecated.
Description copied from class: AbstractRangeQueryNode
Returns the upper bound node.

Specified by:
getUpperBound in interface RangeQueryNode<FieldValuePairQueryNode<?>>
Overrides:
getUpperBound in class AbstractRangeQueryNode<FieldQueryNode>
Returns:
the upper bound node.

setBounds

public void setBounds(FieldQueryNode lower,
                      FieldQueryNode upper,
                      boolean lowerInclusive,
                      boolean upperInclusive)
Deprecated.
Sets lower and upper bounds. The method signature expects FieldQueryNode objects as lower and upper, however, an IllegalArgumentException will be thrown at runtime if a non ParametricQueryNode is passed as lower and upper.

Overrides:
setBounds in class AbstractRangeQueryNode<FieldQueryNode>
Parameters:
lower - a ParametricQueryNode object
upper - a ParametricQueryNode object
lowerInclusive - true if lower bound is inclusive, otherwise, false
upperInclusive - true if upper bound is inclusive, otherwise, false
Throws:
IllegalArgumentException - if lower or upper are not instance of ParametricQueryNode
See Also:
AbstractRangeQueryNode.setBounds(T, T, boolean, boolean)

toString

public String toString()
Deprecated.
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class QueryNodeImpl
See Also:
QueryNode.toString()

getCollator

public Collator getCollator()
Deprecated.
Returns:
the collator
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardBooleanQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.nodes
Class StandardBooleanQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.BooleanQueryNode
            extended by  org.apache.lucene.queryParser.standard.nodes.StandardBooleanQueryNode
All Implemented Interfaces:
Serializable, Cloneable, QueryNode
public class StandardBooleanQueryNode
extends BooleanQueryNode

A StandardBooleanQueryNode has the same behavior as BooleanQueryNode. It only indicates if the coord should be enabled or not for this boolean query.

See Also:
Similarity.coord(int, int), BooleanQuery, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
StandardBooleanQueryNode(List<QueryNode> clauses, boolean disableCoord)
Method Summary
 boolean isDisableCoord()
Methods inherited from class org.apache.lucene.queryParser.core.nodes.BooleanQueryNode
cloneTree, toQueryString, toString
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

StandardBooleanQueryNode

public StandardBooleanQueryNode(List<QueryNode> clauses,
                                boolean disableCoord)
Parameters:
clauses -
Method Detail

isDisableCoord

public boolean isDisableCoord()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermRangeQueryNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.nodes
Class TermRangeQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode<FieldQueryNode>
            extended by  org.apache.lucene.queryParser.standard.nodes.TermRangeQueryNode
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, QueryNode, RangeQueryNode<FieldValuePairQueryNode<?>>
Direct Known Subclasses:
RangeQueryNode
public class TermRangeQueryNode
extends AbstractRangeQueryNode<FieldQueryNode>

This query node represents a range query composed by FieldQueryNode bounds, which means the bound values are strings.

See Also:
FieldQueryNode, AbstractRangeQueryNode, Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
TermRangeQueryNode(FieldQueryNode lower, FieldQueryNode upper, boolean lowerInclusive, boolean upperInclusive)
Constructs a TermRangeQueryNode object using the given FieldQueryNode as its bounds.
Method Summary
Methods inherited from class org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode
getField, getLowerBound, getUpperBound, isLowerInclusive, isUpperInclusive, setBounds, setField, toQueryString
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, toString, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, toString, unsetTag, unsetTag

Constructor Detail

TermRangeQueryNode

public TermRangeQueryNode(FieldQueryNode lower,
                          FieldQueryNode upper,
                          boolean lowerInclusive,
                          boolean upperInclusive)
Constructs a TermRangeQueryNode object using the given FieldQueryNode as its bounds.

Parameters:
lower - the lower bound
upper - the upper bound
lowerInclusive - true if the lower bound is inclusive, otherwise, false
upperInclusive - true if the upper bound is inclusive, otherwise, false
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WildcardQueryNode

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.nodes
Class WildcardQueryNode

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
        extended by  org.apache.lucene.queryParser.core.nodes.FieldQueryNode
            extended by  org.apache.lucene.queryParser.standard.nodes.WildcardQueryNode
All Implemented Interfaces:
Serializable, Cloneable, FieldableNode, FieldValuePairQueryNode<CharSequence>, QueryNode, TextableQueryNode, ValueQueryNode<CharSequence>
Direct Known Subclasses:
PrefixWildcardQueryNode
public class WildcardQueryNode
extends FieldQueryNode

A WildcardQueryNode represents wildcard query This does not apply to phrases. Examples: a*b*c Fl?w? m?ke*g

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
begin, end, field, positionIncrement, text
Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields
Constructor Summary
WildcardQueryNode(CharSequence field, CharSequence text, int begin, int end)
WildcardQueryNode(FieldQueryNode fqn)
Method Summary
 WildcardQueryNode cloneTree()
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method
 CharSequence toQueryString(EscapeQuerySyntax escaper)
convert to a query string understood by the query parser
 String toString()
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:
Methods inherited from class org.apache.lucene.queryParser.core.nodes.FieldQueryNode
getBegin, getEnd, getField, getFieldAsString, getPositionIncrement, getTermEscaped, getTermEscapeQuoted, getText, getTextAsString, getValue, setBegin, setEnd, setField, setPositionIncrement, setText, setValue
Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
add, add, allocate, clone, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, unsetTag, unsetTag
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag
Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
add, add, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, unsetTag, unsetTag

Constructor Detail

WildcardQueryNode

public WildcardQueryNode(CharSequence field,
                         CharSequence text,
                         int begin,
                         int end)
Parameters:
field - - field name
text - - value that contains one or more wild card characters (? or *)
begin - - position in the query string
end - - position in the query string

WildcardQueryNode

public WildcardQueryNode(FieldQueryNode fqn)
Method Detail

toQueryString

public CharSequence toQueryString(EscapeQuerySyntax escaper)
Description copied from interface: QueryNode
convert to a query string understood by the query parser

Specified by:
toQueryString in interface QueryNode
Overrides:
toQueryString in class FieldQueryNode

toString

public String toString()
Description copied from class: QueryNodeImpl
Every implementation of this class should return pseudo xml like this: For FieldQueryNode:

Specified by:
toString in interface QueryNode
Overrides:
toString in class FieldQueryNode
See Also:
QueryNode.toString()

cloneTree

public WildcardQueryNode cloneTree()
                            throws CloneNotSupportedException
Description copied from interface: QueryNode
Recursive clone the QueryNode tree The tags are not copied to the new tree when you call the cloneTree() method

Specified by:
cloneTree in interface QueryNode
Overrides:
cloneTree in class FieldQueryNode
Returns:
the cloned tree
Throws:
CloneNotSupportedException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode

Packages that use AbstractRangeQueryNode
org.apache.lucene.queryParser.standard.nodes Standard Lucene Query Nodes

Uses of AbstractRangeQueryNode in org.apache.lucene.queryParser.standard.nodes

Subclasses of AbstractRangeQueryNode in org.apache.lucene.queryParser.standard.nodes
class | NumericRangeQueryNode This query node represents a range query composed by NumericQueryNode bounds, which means the bound values are Numbers.
class | RangeQueryNode Deprecated. this class will be removed in future, TermRangeQueryNode should be used instead
class | TermRangeQueryNode This query node represents a range query composed by FieldQueryNode bounds, which means the bound values are strings.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.nodes.BooleanModifierNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.nodes.BooleanModifierNode

No usage of org.apache.lucene.queryParser.standard.nodes.BooleanModifierNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.nodes.MultiPhraseQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.nodes.MultiPhraseQueryNode

No usage of org.apache.lucene.queryParser.standard.nodes.MultiPhraseQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.nodes.NumericQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.nodes.NumericQueryNode

Packages that use NumericQueryNode
org.apache.lucene.queryParser.standard.nodes Standard Lucene Query Nodes

Uses of NumericQueryNode in org.apache.lucene.queryParser.standard.nodes

Methods in org.apache.lucene.queryParser.standard.nodes with parameters of type NumericQueryNode
 void NumericRangeQueryNode.setBounds(NumericQueryNode lower, NumericQueryNode upper, boolean lowerInclusive, boolean upperInclusive, NumericConfig numericConfig)
Sets the upper and lower bounds of this range query node and the NumericConfig associated with these bounds.

Constructors in org.apache.lucene.queryParser.standard.nodes with parameters of type NumericQueryNode
NumericRangeQueryNode(NumericQueryNode lower, NumericQueryNode upper, boolean lowerInclusive, boolean upperInclusive, NumericConfig numericConfig)
Constructs a NumericRangeQueryNode object using the given NumericQueryNode as its bounds and NumericConfig.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.nodes.NumericRangeQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.nodes.NumericRangeQueryNode

No usage of org.apache.lucene.queryParser.standard.nodes.NumericRangeQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.nodes.PrefixWildcardQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.nodes.PrefixWildcardQueryNode

Packages that use PrefixWildcardQueryNode
org.apache.lucene.queryParser.standard.nodes Standard Lucene Query Nodes

Uses of PrefixWildcardQueryNode in org.apache.lucene.queryParser.standard.nodes

Methods in org.apache.lucene.queryParser.standard.nodes that return PrefixWildcardQueryNode
 PrefixWildcardQueryNode PrefixWildcardQueryNode.cloneTree()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.nodes.RangeQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.nodes.RangeQueryNode

No usage of org.apache.lucene.queryParser.standard.nodes.RangeQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.nodes.StandardBooleanQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.nodes.StandardBooleanQueryNode

No usage of org.apache.lucene.queryParser.standard.nodes.StandardBooleanQueryNode

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.nodes.TermRangeQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.nodes.TermRangeQueryNode

Packages that use TermRangeQueryNode
org.apache.lucene.queryParser.standard.nodes Standard Lucene Query Nodes

Uses of TermRangeQueryNode in org.apache.lucene.queryParser.standard.nodes

Subclasses of TermRangeQueryNode in org.apache.lucene.queryParser.standard.nodes
 class RangeQueryNode
Deprecated. this class will be removed in future, TermRangeQueryNode should be used instead

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.nodes.WildcardQueryNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.nodes.WildcardQueryNode

Packages that use WildcardQueryNode
org.apache.lucene.queryParser.standard.nodes Standard Lucene Query Nodes

Uses of WildcardQueryNode in org.apache.lucene.queryParser.standard.nodes

Subclasses of WildcardQueryNode in org.apache.lucene.queryParser.standard.nodes
 class PrefixWildcardQueryNode
A PrefixWildcardQueryNode represents wildcardquery that matches abc* or *.

Methods in org.apache.lucene.queryParser.standard.nodes that return WildcardQueryNode
 WildcardQueryNode WildcardQueryNode.cloneTree()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


EscapeQuerySyntaxImpl

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.parser
Class EscapeQuerySyntaxImpl

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.parser.EscapeQuerySyntaxImpl
All Implemented Interfaces:
EscapeQuerySyntax
public class EscapeQuerySyntaxImpl
extends Object
implements EscapeQuerySyntax

Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax
EscapeQuerySyntax.Type
Constructor Summary
EscapeQuerySyntaxImpl()
Method Summary
static UnescapedCharSequence | discardEscapeChar(CharSequence input) Returns a String where the escape char has been removed, or kept only once if there was a double escape.
CharSequence | escape(CharSequence text, Locale locale, EscapeQuerySyntax.Type type)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EscapeQuerySyntaxImpl

public EscapeQuerySyntaxImpl()
Method Detail

escape

public CharSequence escape(CharSequence text,
                           Locale locale,
                           EscapeQuerySyntax.Type type)
Specified by:
escape in interface EscapeQuerySyntax
Parameters:
text - - text to be escaped
locale - - locale for the current query
type - - select the type of escape operation to use
Returns:
escaped text

discardEscapeChar

public static UnescapedCharSequence discardEscapeChar(CharSequence input)
                                               throws ParseException
Returns a String where the escape char has been removed, or kept only once if there was a double escape. Supports escaped unicode characters, e. g. translates A to A.

Throws:
ParseException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


JavaCharStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.parser
Class JavaCharStream

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.parser.JavaCharStream

public class JavaCharStream
extends Object

An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (with java-like unicode escape processing).

Field Summary
protected int[] | bufcolumn
protected char[] | buffer
protected int[] | bufline
int | bufpos Position in buffer.
protected int | column
protected int | inBuf
protected Reader | inputStream
protected int | line
protected int | maxNextCharInd
protected char[] | nextCharBuf
protected int | nextCharInd
protected boolean | prevCharIsCR
protected boolean | prevCharIsLF
static boolean | staticFlag Whether parser is static.
protected int | tabSize
Constructor Summary
JavaCharStream(InputStream dstream)
Constructor.
JavaCharStream(InputStream dstream, int startline, int startcolumn)
Constructor.
JavaCharStream(InputStream dstream, int startline, int startcolumn, int buffersize)
Constructor.
JavaCharStream(InputStream dstream, String encoding)
Constructor.
JavaCharStream(InputStream dstream, String encoding, int startline, int startcolumn)
Constructor.
JavaCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize)
Constructor.
JavaCharStream(Reader dstream)
Constructor.
JavaCharStream(Reader dstream, int startline, int startcolumn)
Constructor.
JavaCharStream(Reader dstream, int startline, int startcolumn, int buffersize)
Constructor.
Method Summary
void | adjustBeginLineColumn(int newLine, int newCol) Method to adjust line and column numbers for the start of a token.
protected void | AdjustBuffSize()
void | backup(int amount) Retreat.
char | BeginToken()
void | Done() Set buffers back to null when finished.
protected void | ExpandBuff(boolean wrapAround)
protected void | FillBuff()
int | getBeginColumn()
int | getBeginLine()
int | getColumn() Deprecated.
int | getEndColumn() Get end column.
int | getEndLine() Get end line.
String | GetImage()
int | getLine() Deprecated.
char[] | GetSuffix(int len)
protected int | getTabSize(int i)
protected char | ReadByte()
char | readChar() Read a character.
void | ReInit(InputStream dstream) Reinitialise.
void | ReInit(InputStream dstream, int startline, int startcolumn) Reinitialise.
void | ReInit(InputStream dstream, int startline, int startcolumn, int buffersize) Reinitialise.
void | ReInit(InputStream dstream, String encoding) Reinitialise.
void | ReInit(InputStream dstream, String encoding, int startline, int startcolumn) Reinitialise.
void | ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) Reinitialise.
void | ReInit(Reader dstream) Reinitialise.
void | ReInit(Reader dstream, int startline, int startcolumn) Reinitialise.
void | ReInit(Reader dstream, int startline, int startcolumn, int buffersize) Reinitialise.
protected void | setTabSize(int i)
protected void | UpdateLineColumn(char c)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

staticFlag

public static final boolean staticFlag
Whether parser is static.

See Also:
Constant Field Values

bufpos

public int bufpos
Position in buffer.

bufline

protected int[] bufline

bufcolumn

protected int[] bufcolumn

column

protected int column

line

protected int line

prevCharIsCR

protected boolean prevCharIsCR

prevCharIsLF

protected boolean prevCharIsLF

inputStream

protected Reader inputStream

nextCharBuf

protected char[] nextCharBuf

buffer

protected char[] buffer

maxNextCharInd

protected int maxNextCharInd

nextCharInd

protected int nextCharInd

inBuf

protected int inBuf

tabSize

protected int tabSize
Constructor Detail

JavaCharStream

public JavaCharStream(Reader dstream,
                      int startline,
                      int startcolumn,
                      int buffersize)
Constructor.

JavaCharStream

public JavaCharStream(Reader dstream,
                      int startline,
                      int startcolumn)
Constructor.

JavaCharStream

public JavaCharStream(Reader dstream)
Constructor.

JavaCharStream

public JavaCharStream(InputStream dstream,
                      String encoding,
                      int startline,
                      int startcolumn,
                      int buffersize)
               throws UnsupportedEncodingException
Constructor.

Throws:
UnsupportedEncodingException

JavaCharStream

public JavaCharStream(InputStream dstream,
                      int startline,
                      int startcolumn,
                      int buffersize)
Constructor.

JavaCharStream

public JavaCharStream(InputStream dstream,
                      String encoding,
                      int startline,
                      int startcolumn)
               throws UnsupportedEncodingException
Constructor.

Throws:
UnsupportedEncodingException

JavaCharStream

public JavaCharStream(InputStream dstream,
                      int startline,
                      int startcolumn)
Constructor.

JavaCharStream

public JavaCharStream(InputStream dstream,
                      String encoding)
               throws UnsupportedEncodingException
Constructor.

Throws:
UnsupportedEncodingException

JavaCharStream

public JavaCharStream(InputStream dstream)
Constructor.

Method Detail

setTabSize

protected void setTabSize(int i)

getTabSize

protected int getTabSize(int i)

ExpandBuff

protected void ExpandBuff(boolean wrapAround)

FillBuff

protected void FillBuff()
                 throws IOException
Throws:
IOException

ReadByte

protected char ReadByte()
                 throws IOException
Throws:
IOException

BeginToken

public char BeginToken()
                throws IOException
Returns:
starting character for token.
Throws:
IOException

AdjustBuffSize

protected void AdjustBuffSize()

UpdateLineColumn

protected void UpdateLineColumn(char c)

readChar

public char readChar()
              throws IOException
Read a character.

Throws:
IOException

getColumn

@Deprecated
public int getColumn()
Deprecated.

getLine

@Deprecated
public int getLine()
Deprecated.

getEndColumn

public int getEndColumn()
Get end column.

getEndLine

public int getEndLine()
Get end line.

getBeginColumn

public int getBeginColumn()
Returns:
column of token start

getBeginLine

public int getBeginLine()
Returns:
line number of token start

backup

public void backup(int amount)
Retreat.

ReInit

public void ReInit(Reader dstream,
                   int startline,
                   int startcolumn,
                   int buffersize)
Reinitialise.

ReInit

public void ReInit(Reader dstream,
                   int startline,
                   int startcolumn)
Reinitialise.

ReInit

public void ReInit(Reader dstream)
Reinitialise.

ReInit

public void ReInit(InputStream dstream,
                   String encoding,
                   int startline,
                   int startcolumn,
                   int buffersize)
            throws UnsupportedEncodingException
Reinitialise.

Throws:
UnsupportedEncodingException

ReInit

public void ReInit(InputStream dstream,
                   int startline,
                   int startcolumn,
                   int buffersize)
Reinitialise.

ReInit

public void ReInit(InputStream dstream,
                   String encoding,
                   int startline,
                   int startcolumn)
            throws UnsupportedEncodingException
Reinitialise.

Throws:
UnsupportedEncodingException

ReInit

public void ReInit(InputStream dstream,
                   int startline,
                   int startcolumn)
Reinitialise.

ReInit

public void ReInit(InputStream dstream,
                   String encoding)
            throws UnsupportedEncodingException
Reinitialise.

Throws:
UnsupportedEncodingException

ReInit

public void ReInit(InputStream dstream)
Reinitialise.

GetImage

public String GetImage()
Returns:
token image as String

GetSuffix

public char[] GetSuffix(int len)
Returns:
suffix

Done

public void Done()
Set buffers back to null when finished.

adjustBeginLineColumn

public void adjustBeginLineColumn(int newLine,
                                  int newCol)
Method to adjust line and column numbers for the start of a token.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.standard.parser
Interfaces
StandardSyntaxParserConstants
Classes
EscapeQuerySyntaxImpl
JavaCharStream
StandardSyntaxParser
StandardSyntaxParserTokenManager
Token
Exceptions
ParseException
Errors
TokenMgrError


org.apache.lucene.queryParser.standard.parser

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.standard.parser

Lucene Query Parser

See:
Description

Interface Summary
StandardSyntaxParserConstants Token literal values and constants.

Class Summary
EscapeQuerySyntaxImpl |
JavaCharStream | An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (with java-like unicode escape processing).
StandardSyntaxParser |
StandardSyntaxParserTokenManager | Token Manager.
Token | Describes the input token stream.

Exception Summary
ParseException This exception is thrown when parse errors are encountered.

Error Summary
TokenMgrError Token Manager Error.

Package org.apache.lucene.queryParser.standard.parser Description

Lucene Query Parser

The package org.apache.lucene.queryParser.standard.parser contains the query parser.

This text parser only performs the syntax validation and creates an QueryNode tree from a query string.


org.apache.lucene.queryParser.standard.parser Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.standard.parser

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.standard.parser.EscapeQuerySyntaxImpl (implements org.apache.lucene.queryParser.core.parser.EscapeQuerySyntax)
    • org.apache.lucene.queryParser.standard.parser.JavaCharStream
    • org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser (implements org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants, org.apache.lucene.queryParser.core.parser.SyntaxParser)
    • org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager (implements org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants)
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Error
        • org.apache.lucene.queryParser.standard.parser.TokenMgrError
      • java.lang.Exception
        • org.apache.lucene.queryParser.core.QueryNodeException (implements org.apache.lucene.messages.NLSException)
          • org.apache.lucene.queryParser.core.QueryNodeParseException
            • org.apache.lucene.queryParser.standard.parser.ParseException
    • org.apache.lucene.queryParser.standard.parser.Token

Interface Hierarchy

  • org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants


Uses of Package org.apache.lucene.queryParser.standard.parser

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.standard.parser

Packages that use org.apache.lucene.queryParser.standard.parser
org.apache.lucene.queryParser.standard.parser Lucene Query Parser

Classes in org.apache.lucene.queryParser.standard.parser used by org.apache.lucene.queryParser.standard.parser
JavaCharStream
An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (with java-like unicode escape processing).
ParseException
This exception is thrown when parse errors are encountered.
StandardSyntaxParserConstants
Token literal values and constants.
StandardSyntaxParserTokenManager
Token Manager.
Token
Describes the input token stream.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ParseException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.parser
Class ParseException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  org.apache.lucene.queryParser.core.QueryNodeException
                extended by  org.apache.lucene.queryParser.core.QueryNodeParseException
                    extended by  org.apache.lucene.queryParser.standard.parser.ParseException
All Implemented Interfaces:
Serializable, NLSException
public class ParseException
extends QueryNodeParseException

This exception is thrown when parse errors are encountered. You can explicitly create objects of this exception type by calling the method generateParseException in the generated parser. You can modify this class to customize your error reporting mechanisms so long as you retain the public fields.

See Also:
Serialized Form

Field Summary
Token | currentToken This is the last token that has been consumed successfully.
protected String | eol The end of line string for this machine.
int[][] | expectedTokenSequences Each entry in this array is an array of integers.
protected boolean | specialConstructor This variable determines which constructor was used to create this object and thereby affects the semantics of the "getMessage" method (see below).
String[] | tokenImage This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred.
Fields inherited from class org.apache.lucene.queryParser.core.QueryNodeException
message
Constructor Summary
ParseException()
The following constructors are for use by you for whatever purpose you can think of.
ParseException(Message message)
Constructor with message.
ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal)
This constructor is used by the method "generateParseException" in the generated parser.
Method Summary
Methods inherited from class org.apache.lucene.queryParser.core.QueryNodeParseException
getBeginColumn, getBeginLine, getErrorToken, getQuery, setBeginColumn, setBeginLine, setErrorToken, setNonLocalizedMessage, setQuery
Methods inherited from class org.apache.lucene.queryParser.core.QueryNodeException
getLocalizedMessage, getLocalizedMessage, getMessage, getMessageObject, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

specialConstructor

protected boolean specialConstructor
This variable determines which constructor was used to create this object and thereby affects the semantics of the "getMessage" method (see below).

currentToken

public Token currentToken
This is the last token that has been consumed successfully. If this object has been created due to a parse error, the token followng this token will (therefore) be the first error token.

expectedTokenSequences

public int[][] expectedTokenSequences
Each entry in this array is an array of integers. Each array of integers represents a sequence of tokens (by their ordinal values) that is expected at this point of the parse.

tokenImage

public String[] tokenImage
This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred. This array is defined in the generated ...Constants interface.

eol

protected String eol
The end of line string for this machine.

Constructor Detail

ParseException

public ParseException(Token currentTokenVal,
                      int[][] expectedTokenSequencesVal,
                      String[] tokenImageVal)
This constructor is used by the method "generateParseException" in the generated parser. Calling this constructor generates a new object of this type with the fields "currentToken", "expectedTokenSequences", and "tokenImage" set. The boolean flag "specialConstructor" is also set to true to indicate that this constructor was used to create this object. This constructor calls its super class with the empty string to force the "toString" method of parent class "Throwable" to print the error message in the form: ParseException:

ParseException

public ParseException()
The following constructors are for use by you for whatever purpose you can think of. Constructing the exception in this manner makes the exception behave in the normal way - i.e., as documented in the class "Throwable". The fields "errorToken", "expectedTokenSequences", and "tokenImage" do not contain relevant information. The JavaCC generated code does not use these constructors.

ParseException

public ParseException(Message message)
Constructor with message.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardSyntaxParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.parser
Class StandardSyntaxParser

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser
All Implemented Interfaces:
SyntaxParser, StandardSyntaxParserConstants
public class StandardSyntaxParser
extends Object
implements SyntaxParser, StandardSyntaxParserConstants

Field Summary
Token | jj_nt Next token.
Token | token Current token.
StandardSyntaxParserTokenManager | token_source Generated Token Manager.
Fields inherited from interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, Boost, CARAT, COLON, DEFAULT, EOF, FUZZY_SLOP, LPAREN, MINUS, NOT, NUMBER, OR, PLUS, QUOTED, RangeEx, RANGEEX_END, RANGEEX_GOOP, RANGEEX_QUOTED, RANGEEX_START, RANGEEX_TO, RangeIn, RANGEIN_END, RANGEIN_GOOP, RANGEIN_QUOTED, RANGEIN_START, RANGEIN_TO, RPAREN, TERM, tokenImage
Constructor Summary
StandardSyntaxParser()
StandardSyntaxParser(InputStream stream)
Constructor with InputStream.
StandardSyntaxParser(InputStream stream, String encoding)
Constructor with InputStream and supplied encoding
StandardSyntaxParser(Reader stream)
Constructor.
StandardSyntaxParser(StandardSyntaxParserTokenManager tm)
Constructor with generated Token Manager.
Method Summary
QueryNode | Clause(CharSequence field)
QueryNode | ConjQuery(CharSequence field)
int | Conjunction()
void | disable_tracing() Disable tracing.
QueryNode | DisjQuery(CharSequence field)
void | enable_tracing() Enable tracing.
ParseException | generateParseException() Generate ParseException.
Token | getNextToken() Get the next Token.
Token | getToken(int index) Get the specific Token.
QueryNode | ModClause(CharSequence field)
ModifierQueryNode.Modifier | Modifiers()
QueryNode | parse(CharSequence query, CharSequence field) Parses a query string, returning a QueryNode.
QueryNode | Query(CharSequence field)
void | ReInit(InputStream stream) Reinitialise.
void | ReInit(InputStream stream, String encoding) Reinitialise.
void | ReInit(Reader stream) Reinitialise.
void | ReInit(StandardSyntaxParserTokenManager tm) Reinitialise.
QueryNode | Term(CharSequence field)
QueryNode | TopLevelQuery(CharSequence field)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

token_source

public StandardSyntaxParserTokenManager token_source
Generated Token Manager.

token

public Token token
Current token.

jj_nt

public Token jj_nt
Next token.

Constructor Detail

StandardSyntaxParser

public StandardSyntaxParser()

StandardSyntaxParser

public StandardSyntaxParser(InputStream stream)
Constructor with InputStream.

StandardSyntaxParser

public StandardSyntaxParser(InputStream stream,
                            String encoding)
Constructor with InputStream and supplied encoding

StandardSyntaxParser

public StandardSyntaxParser(Reader stream)
Constructor.

StandardSyntaxParser

public StandardSyntaxParser(StandardSyntaxParserTokenManager tm)
Constructor with generated Token Manager.

Method Detail

parse

public QueryNode parse(CharSequence query,
                       CharSequence field)
                throws QueryNodeParseException
Parses a query string, returning a QueryNode.

Specified by:
parse in interface SyntaxParser
Parameters:
query - the query string to be parsed.
field - - default field name
Returns:
QueryNode tree
Throws:
ParseException - if the parsing fails
QueryNodeParseException

Conjunction

public final int Conjunction()
                      throws ParseException
Throws:
ParseException

Modifiers

public final ModifierQueryNode.Modifier Modifiers()
                                           throws ParseException
Throws:
ParseException

TopLevelQuery

public final QueryNode TopLevelQuery(CharSequence field)
                              throws ParseException
Throws:
ParseException

Query

public final QueryNode Query(CharSequence field)
                      throws ParseException
Throws:
ParseException

DisjQuery

public final QueryNode DisjQuery(CharSequence field)
                          throws ParseException
Throws:
ParseException

ConjQuery

public final QueryNode ConjQuery(CharSequence field)
                          throws ParseException
Throws:
ParseException

ModClause

public final QueryNode ModClause(CharSequence field)
                          throws ParseException
Throws:
ParseException

Clause

public final QueryNode Clause(CharSequence field)
                       throws ParseException
Throws:
ParseException

Term

public final QueryNode Term(CharSequence field)
                     throws ParseException
Throws:
ParseException

ReInit

public void ReInit(InputStream stream)
Reinitialise.

ReInit

public void ReInit(InputStream stream,
                   String encoding)
Reinitialise.

ReInit

public void ReInit(Reader stream)
Reinitialise.

ReInit

public void ReInit(StandardSyntaxParserTokenManager tm)
Reinitialise.

getNextToken

public final Token getNextToken()
Get the next Token.

getToken

public final Token getToken(int index)
Get the specific Token.

generateParseException

public ParseException generateParseException()
Generate ParseException.

enable_tracing

public final void enable_tracing()
Enable tracing.

disable_tracing

public final void disable_tracing()
Disable tracing.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardSyntaxParserConstants

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.parser
Interface StandardSyntaxParserConstants

All Known Implementing Classes:
StandardSyntaxParser, StandardSyntaxParserTokenManager
public interface StandardSyntaxParserConstants

Token literal values and constants. Generated by org.javacc.parser.OtherFilesGen#start()

Field Summary
static int | _ESCAPED_CHAR RegularExpression Id.
static int | _NUM_CHAR RegularExpression Id.
static int | _QUOTED_CHAR RegularExpression Id.
static int | _TERM_CHAR RegularExpression Id.
static int | _TERM_START_CHAR RegularExpression Id.
static int | _WHITESPACE RegularExpression Id.
static int | AND RegularExpression Id.
static int | Boost Lexical state.
static int | CARAT RegularExpression Id.
static int | COLON RegularExpression Id.
static int | DEFAULT Lexical state.
static int | EOF End of File.
static int | FUZZY_SLOP RegularExpression Id.
static int | LPAREN RegularExpression Id.
static int | MINUS RegularExpression Id.
static int | NOT RegularExpression Id.
static int | NUMBER RegularExpression Id.
static int | OR RegularExpression Id.
static int | PLUS RegularExpression Id.
static int | QUOTED RegularExpression Id.
static int | RangeEx Lexical state.
static int | RANGEEX_END RegularExpression Id.
static int | RANGEEX_GOOP RegularExpression Id.
static int | RANGEEX_QUOTED RegularExpression Id.
static int | RANGEEX_START RegularExpression Id.
static int | RANGEEX_TO RegularExpression Id.
static int | RangeIn Lexical state.
static int | RANGEIN_END RegularExpression Id.
static int | RANGEIN_GOOP RegularExpression Id.
static int | RANGEIN_QUOTED RegularExpression Id.
static int | RANGEIN_START RegularExpression Id.
static int | RANGEIN_TO RegularExpression Id.
static int | RPAREN RegularExpression Id.
static int | TERM RegularExpression Id.
static String[] | tokenImage Literal token values.

Field Detail

EOF

static final int EOF
End of File.

See Also:
Constant Field Values

_NUM_CHAR

static final int _NUM_CHAR
RegularExpression Id.

See Also:
Constant Field Values

_ESCAPED_CHAR

static final int _ESCAPED_CHAR
RegularExpression Id.

See Also:
Constant Field Values

_TERM_START_CHAR

static final int _TERM_START_CHAR
RegularExpression Id.

See Also:
Constant Field Values

_TERM_CHAR

static final int _TERM_CHAR
RegularExpression Id.

See Also:
Constant Field Values

_WHITESPACE

static final int _WHITESPACE
RegularExpression Id.

See Also:
Constant Field Values

_QUOTED_CHAR

static final int _QUOTED_CHAR
RegularExpression Id.

See Also:
Constant Field Values

AND

static final int AND
RegularExpression Id.

See Also:
Constant Field Values

OR

static final int OR
RegularExpression Id.

See Also:
Constant Field Values

NOT

static final int NOT
RegularExpression Id.

See Also:
Constant Field Values

PLUS

static final int PLUS
RegularExpression Id.

See Also:
Constant Field Values

MINUS

static final int MINUS
RegularExpression Id.

See Also:
Constant Field Values

LPAREN

static final int LPAREN
RegularExpression Id.

See Also:
Constant Field Values

RPAREN

static final int RPAREN
RegularExpression Id.

See Also:
Constant Field Values

COLON

static final int COLON
RegularExpression Id.

See Also:
Constant Field Values

CARAT

static final int CARAT
RegularExpression Id.

See Also:
Constant Field Values

QUOTED

static final int QUOTED
RegularExpression Id.

See Also:
Constant Field Values

TERM

static final int TERM
RegularExpression Id.

See Also:
Constant Field Values

FUZZY_SLOP

static final int FUZZY_SLOP
RegularExpression Id.

See Also:
Constant Field Values

RANGEIN_START

static final int RANGEIN_START
RegularExpression Id.

See Also:
Constant Field Values

RANGEEX_START

static final int RANGEEX_START
RegularExpression Id.

See Also:
Constant Field Values

NUMBER

static final int NUMBER
RegularExpression Id.

See Also:
Constant Field Values

RANGEIN_TO

static final int RANGEIN_TO
RegularExpression Id.

See Also:
Constant Field Values

RANGEIN_END

static final int RANGEIN_END
RegularExpression Id.

See Also:
Constant Field Values

RANGEIN_QUOTED

static final int RANGEIN_QUOTED
RegularExpression Id.

See Also:
Constant Field Values

RANGEIN_GOOP

static final int RANGEIN_GOOP
RegularExpression Id.

See Also:
Constant Field Values

RANGEEX_TO

static final int RANGEEX_TO
RegularExpression Id.

See Also:
Constant Field Values

RANGEEX_END

static final int RANGEEX_END
RegularExpression Id.

See Also:
Constant Field Values

RANGEEX_QUOTED

static final int RANGEEX_QUOTED
RegularExpression Id.

See Also:
Constant Field Values

RANGEEX_GOOP

static final int RANGEEX_GOOP
RegularExpression Id.

See Also:
Constant Field Values

Boost

static final int Boost
Lexical state.

See Also:
Constant Field Values

RangeEx

static final int RangeEx
Lexical state.

See Also:
Constant Field Values

RangeIn

static final int RangeIn
Lexical state.

See Also:
Constant Field Values

DEFAULT

static final int DEFAULT
Lexical state.

See Also:
Constant Field Values

tokenImage

static final String[] tokenImage
Literal token values.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardSyntaxParserTokenManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.parser
Class StandardSyntaxParserTokenManager

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager
All Implemented Interfaces:
StandardSyntaxParserConstants
public class StandardSyntaxParserTokenManager
extends Object
implements StandardSyntaxParserConstants

Token Manager.

Field Summary
protected char | curChar
PrintStream | debugStream Debug output.
protected JavaCharStream | input_stream
static int[] | jjnewLexState Lex State array.
static String[] | jjstrLiteralImages Token literal values.
static String[] | lexStateNames Lexer state names.
Fields inherited from interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants
_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, Boost, CARAT, COLON, DEFAULT, EOF, FUZZY_SLOP, LPAREN, MINUS, NOT, NUMBER, OR, PLUS, QUOTED, RangeEx, RANGEEX_END, RANGEEX_GOOP, RANGEEX_QUOTED, RANGEEX_START, RANGEEX_TO, RangeIn, RANGEIN_END, RANGEIN_GOOP, RANGEIN_QUOTED, RANGEIN_START, RANGEIN_TO, RPAREN, TERM, tokenImage
Constructor Summary
StandardSyntaxParserTokenManager(JavaCharStream stream)
Constructor.
StandardSyntaxParserTokenManager(JavaCharStream stream, int lexState)
Constructor.
Method Summary
Token | getNextToken() Get the next Token.
protected Token | jjFillToken()
void | ReInit(JavaCharStream stream) Reinitialise parser.
void | ReInit(JavaCharStream stream, int lexState) Reinitialise parser.
void | setDebugStream(PrintStream ds) Set debug output.
void | SwitchTo(int lexState) Switch to specified lex state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

debugStream

public PrintStream debugStream
Debug output.

jjstrLiteralImages

public static final String[] jjstrLiteralImages
Token literal values.

lexStateNames

public static final String[] lexStateNames
Lexer state names.

jjnewLexState

public static final int[] jjnewLexState
Lex State array.

input_stream

protected JavaCharStream input_stream

curChar

protected char curChar
Constructor Detail

StandardSyntaxParserTokenManager

public StandardSyntaxParserTokenManager(JavaCharStream stream)
Constructor.

StandardSyntaxParserTokenManager

public StandardSyntaxParserTokenManager(JavaCharStream stream,
                                        int lexState)
Constructor.

Method Detail

setDebugStream

public void setDebugStream(PrintStream ds)
Set debug output.

ReInit

public void ReInit(JavaCharStream stream)
Reinitialise parser.

ReInit

public void ReInit(JavaCharStream stream,
                   int lexState)
Reinitialise parser.

SwitchTo

public void SwitchTo(int lexState)
Switch to specified lex state.

jjFillToken

protected Token jjFillToken()

getNextToken

public Token getNextToken()
Get the next Token.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Token

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.parser
Class Token

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.parser.Token

public class Token
extends Object

Describes the input token stream.

Field Summary
int | beginColumn The column number of the first character of this Token.
int | beginLine The line number of the first character of this Token.
int | endColumn The column number of the last character of this Token.
int | endLine The line number of the last character of this Token.
String | image The string image of the token.
int | kind An integer that describes the kind of this token.
Token | next A reference to the next regular (non-special) token from the input stream.
Token | specialToken This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token.
Constructor Summary
Token()
No-argument constructor
Token(int kind)
Constructs a new token for the specified Image.
Token(int kind, String image)
Constructs a new token for the specified Image and Kind.
Method Summary
Object | getValue() An optional attribute value of the Token.
static Token | newToken(int ofKind)
static Token | newToken(int ofKind, String image) Returns a new Token object, by default.
String | toString() Returns the image.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

kind

public int kind
An integer that describes the kind of this token. This numbering system is determined by JavaCCParser, and a table of these numbers is stored in the file ...Constants.java.

beginLine

public int beginLine
The line number of the first character of this Token.

beginColumn

public int beginColumn
The column number of the first character of this Token.

endLine

public int endLine
The line number of the last character of this Token.

endColumn

public int endColumn
The column number of the last character of this Token.

image

public String image
The string image of the token.

next

public Token next
A reference to the next regular (non-special) token from the input stream. If this is the last token from the input stream, or if the token manager has not read tokens beyond this one, this field is set to null. This is true only if this token is also a regular token. Otherwise, see below for a description of the contents of this field.

specialToken

public Token specialToken
This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token. If there are no such special tokens, this field is set to null. When there are more than one such special token, this field refers to the last of these special tokens, which in turn refers to the next previous special token through its specialToken field, and so on until the first special token (whose specialToken field is null). The next fields of special tokens refer to other special tokens that immediately follow it (without an intervening regular token). If there is no such token, this field is null.

Constructor Detail

Token

public Token()
No-argument constructor

Token

public Token(int kind)
Constructs a new token for the specified Image.

Token

public Token(int kind,
             String image)
Constructs a new token for the specified Image and Kind.

Method Detail

getValue

public Object getValue()
An optional attribute value of the Token. Tokens which are not used as syntactic sugar will often contain meaningful values that will be used later on by the compiler or interpreter. This attribute value is often different from the image. Any subclass of Token that actually wants to return a non-null value can override this method as appropriate.

toString

public String toString()
Returns the image.

Overrides:
toString in class Object

newToken

public static Token newToken(int ofKind,
                             String image)
Returns a new Token object, by default. However, if you want, you can create and return subclass objects based on the value of ofKind. Simply add the cases to the switch for all those special cases. For example, if you have a subclass of Token called IDToken that you want to create if ofKind is ID, simply add something like : case MyParserConstants.ID : return new IDToken(ofKind, image); to the following switch statement. Then you can cast matchedToken variable to the appropriate type and use sit in your lexical actions.

newToken

public static Token newToken(int ofKind)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TokenMgrError

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.parser
Class TokenMgrError

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Error
            extended by  org.apache.lucene.queryParser.standard.parser.TokenMgrError
All Implemented Interfaces:
Serializable
public class TokenMgrError
extends Error

Token Manager Error.

See Also:
Serialized Form

Constructor Summary
TokenMgrError()
No arg constructor.
TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason)
Full Constructor.
TokenMgrError(String message, int reason)
Constructor with message and reason.
Method Summary
protected static String | addEscapes(String str) Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string
String | getMessage() You can also modify the body of this method to customize your error messages.
protected static String | LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TokenMgrError

public TokenMgrError()
No arg constructor.

TokenMgrError

public TokenMgrError(String message,
                     int reason)
Constructor with message and reason.

TokenMgrError

public TokenMgrError(boolean EOFSeen,
                     int lexState,
                     int errorLine,
                     int errorColumn,
                     String errorAfter,
                     char curChar,
                     int reason)
Full Constructor.

Method Detail

addEscapes

protected static final String addEscapes(String str)
Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string

LexicalError

protected static String LexicalError(boolean EOFSeen,
                                     int lexState,
                                     int errorLine,
                                     int errorColumn,
                                     String errorAfter,
                                     char curChar)
Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error. Parameters : EOFSeen : indicates if EOF caused the lexical error curLexState : lexical state in which this error occurred errorLine : line number when the error occurred errorColumn : column number when the error occurred errorAfter : prefix that was seen before this error occurred curchar : the offending character Note: You can customize the lexical error message by modifying this method.

getMessage

public String getMessage()
You can also modify the body of this method to customize your error messages. For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not of end-users concern, so you can return something like : "Internal Error : Please file a bug report .... " from this method for such cases in the release version of your parser.

Overrides:
getMessage in class Throwable
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.queryParser.standard.parser.EscapeQuerySyntaxImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.parser.EscapeQuerySyntaxImpl

No usage of org.apache.lucene.queryParser.standard.parser.EscapeQuerySyntaxImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.parser.JavaCharStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.parser.JavaCharStream

Packages that use JavaCharStream
org.apache.lucene.queryParser.standard.parser Lucene Query Parser

Uses of JavaCharStream in org.apache.lucene.queryParser.standard.parser

Fields in org.apache.lucene.queryParser.standard.parser declared as JavaCharStream
protected  JavaCharStream StandardSyntaxParserTokenManager.input_stream

Methods in org.apache.lucene.queryParser.standard.parser with parameters of type JavaCharStream
void | StandardSyntaxParserTokenManager.ReInit(JavaCharStream stream) Reinitialise parser.
void | StandardSyntaxParserTokenManager.ReInit(JavaCharStream stream, int lexState) Reinitialise parser.

Constructors in org.apache.lucene.queryParser.standard.parser with parameters of type JavaCharStream
StandardSyntaxParserTokenManager(JavaCharStream stream)
Constructor.
StandardSyntaxParserTokenManager(JavaCharStream stream, int lexState)
Constructor.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.parser.ParseException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.parser.ParseException

Packages that use ParseException
org.apache.lucene.queryParser.standard.parser Lucene Query Parser

Uses of ParseException in org.apache.lucene.queryParser.standard.parser

Methods in org.apache.lucene.queryParser.standard.parser that return ParseException
 ParseException StandardSyntaxParser.generateParseException()
Generate ParseException.

Methods in org.apache.lucene.queryParser.standard.parser that throw ParseException
QueryNode | StandardSyntaxParser.Clause(CharSequence field)
QueryNode | StandardSyntaxParser.ConjQuery(CharSequence field)
int | StandardSyntaxParser.Conjunction()
static UnescapedCharSequence | EscapeQuerySyntaxImpl.discardEscapeChar(CharSequence input) Returns a String where the escape char has been removed, or kept only once if there was a double escape.
QueryNode | StandardSyntaxParser.DisjQuery(CharSequence field)
QueryNode | StandardSyntaxParser.ModClause(CharSequence field)
ModifierQueryNode.Modifier | StandardSyntaxParser.Modifiers()
QueryNode | StandardSyntaxParser.Query(CharSequence field)
QueryNode | StandardSyntaxParser.Term(CharSequence field)
QueryNode | StandardSyntaxParser.TopLevelQuery(CharSequence field)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser

No usage of org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants

Packages that use StandardSyntaxParserConstants
org.apache.lucene.queryParser.standard.parser Lucene Query Parser

Uses of StandardSyntaxParserConstants in org.apache.lucene.queryParser.standard.parser

Classes in org.apache.lucene.queryParser.standard.parser that implement StandardSyntaxParserConstants
class | StandardSyntaxParser
class | StandardSyntaxParserTokenManager Token Manager.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserTokenManager

Packages that use StandardSyntaxParserTokenManager
org.apache.lucene.queryParser.standard.parser Lucene Query Parser

Uses of StandardSyntaxParserTokenManager in org.apache.lucene.queryParser.standard.parser

Fields in org.apache.lucene.queryParser.standard.parser declared as StandardSyntaxParserTokenManager
 StandardSyntaxParserTokenManager StandardSyntaxParser.token_source
Generated Token Manager.

Methods in org.apache.lucene.queryParser.standard.parser with parameters of type StandardSyntaxParserTokenManager
 void StandardSyntaxParser.ReInit(StandardSyntaxParserTokenManager tm)
Reinitialise.

Constructors in org.apache.lucene.queryParser.standard.parser with parameters of type StandardSyntaxParserTokenManager
StandardSyntaxParser(StandardSyntaxParserTokenManager tm)
Constructor with generated Token Manager.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.parser.Token

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.parser.Token

Packages that use Token
org.apache.lucene.queryParser.standard.parser Lucene Query Parser

Uses of Token in org.apache.lucene.queryParser.standard.parser

Fields in org.apache.lucene.queryParser.standard.parser declared as Token
Token | ParseException.currentToken This is the last token that has been consumed successfully.
Token | StandardSyntaxParser.jj_nt Next token.
Token | Token.next A reference to the next regular (non-special) token from the input stream.
Token | Token.specialToken This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token.
Token | StandardSyntaxParser.token Current token.

Methods in org.apache.lucene.queryParser.standard.parser that return Token
Token | StandardSyntaxParser.getNextToken() Get the next Token.
Token | StandardSyntaxParserTokenManager.getNextToken() Get the next Token.
Token | StandardSyntaxParser.getToken(int index) Get the specific Token.
protected Token | StandardSyntaxParserTokenManager.jjFillToken()
static Token | Token.newToken(int ofKind)
static Token | Token.newToken(int ofKind, String image) Returns a new Token object, by default.

Constructors in org.apache.lucene.queryParser.standard.parser with parameters of type Token
ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal)
This constructor is used by the method "generateParseException" in the generated parser.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.parser.TokenMgrError

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.parser.TokenMgrError

No usage of org.apache.lucene.queryParser.standard.parser.TokenMgrError

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AllowLeadingWildcardProcessor

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class AllowLeadingWildcardProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.AllowLeadingWildcardProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class AllowLeadingWildcardProcessor
extends QueryNodeProcessorImpl

This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.ALLOW_LEADING_WILDCARD is defined in the QueryConfigHandler. If it is and leading wildcard is not allowed, it looks for every WildcardQueryNode contained in the query node tree and throws an exception if any of them has a leading wildcard ('*' or '?').

See Also:
StandardQueryConfigHandler.ConfigurationKeys.ALLOW_LEADING_WILDCARD

Constructor Summary
AllowLeadingWildcardProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
QueryNode | process(QueryNode queryTree) Processes a query node tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AllowLeadingWildcardProcessor

public AllowLeadingWildcardProcessor()
Method Detail

process

public QueryNode process(QueryNode queryTree)
                  throws QueryNodeException
Description copied from interface: QueryNodeProcessor
Processes a query node tree. It may return the same or another query tree. I should never return null.

Specified by:
process in interface QueryNodeProcessor
Overrides:
process in class QueryNodeProcessorImpl
Parameters:
queryTree - tree root node
Returns:
the processed query tree
Throws:
QueryNodeException

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AnalyzerQueryNodeProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class AnalyzerQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.AnalyzerQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class AnalyzerQueryNodeProcessor
extends QueryNodeProcessorImpl

This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.ANALYZER is defined in the QueryConfigHandler. If it is and the analyzer is not null, it looks for every FieldQueryNode that is not WildcardQueryNode, FuzzyQueryNode or ParametricQueryNode contained in the query node tree, then it applies the analyzer to that FieldQueryNode object.

If the analyzer return only one term, the returned term is set to the FieldQueryNode and it's returned.

If the analyzer return more than one term, a TokenizedPhraseQueryNode or MultiPhraseQueryNode is created, whether there is one or more terms at the same position, and it's returned.

If no term is returned by the analyzer a NoTokenFoundQueryNode object is returned.

See Also:
StandardQueryConfigHandler.ConfigurationKeys.ANALYZER, Analyzer, TokenStream

Constructor Summary
AnalyzerQueryNodeProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
QueryNode | process(QueryNode queryTree) Processes a query node tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AnalyzerQueryNodeProcessor

public AnalyzerQueryNodeProcessor()
Method Detail

process

public QueryNode process(QueryNode queryTree)
                  throws QueryNodeException
Description copied from interface: QueryNodeProcessor
Processes a query node tree. It may return the same or another query tree. I should never return null.

Specified by:
process in interface QueryNodeProcessor
Overrides:
process in class QueryNodeProcessorImpl
Parameters:
queryTree - tree root node
Returns:
the processed query tree
Throws:
QueryNodeException

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BooleanSingleChildOptimizationQueryNodeProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class BooleanSingleChildOptimizationQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.BooleanSingleChildOptimizationQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class BooleanSingleChildOptimizationQueryNodeProcessor
extends QueryNodeProcessorImpl

This processor removes every BooleanQueryNode that contains only one child and returns this child. If this child is ModifierQueryNode that was defined by the user. A modifier is not defined by the user when it's a BooleanModifierNode

See Also:
ModifierQueryNode

Constructor Summary
BooleanSingleChildOptimizationQueryNodeProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, process, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BooleanSingleChildOptimizationQueryNodeProcessor

public BooleanSingleChildOptimizationQueryNodeProcessor()
Method Detail

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BoostQueryNodeProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class BoostQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.BoostQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class BoostQueryNodeProcessor
extends QueryNodeProcessorImpl

This processor iterates the query node tree looking for every FieldableNode that has StandardQueryConfigHandler.ConfigurationKeys.BOOST in its config. If there is, the boost is applied to that FieldableNode.

See Also:
StandardQueryConfigHandler.ConfigurationKeys.BOOST, QueryConfigHandler, FieldableNode

Constructor Summary
BoostQueryNodeProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, process, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BoostQueryNodeProcessor

public BoostQueryNodeProcessor()
Method Detail

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultPhraseSlopQueryNodeProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class DefaultPhraseSlopQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.DefaultPhraseSlopQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class DefaultPhraseSlopQueryNodeProcessor
extends QueryNodeProcessorImpl

This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.PHRASE_SLOP is defined in the QueryConfigHandler. If it is, it looks for every TokenizedPhraseQueryNode and MultiPhraseQueryNode that does not have any SlopQueryNode applied to it and creates an SlopQueryNode and apply to it. The new SlopQueryNode has the same slop value defined in the configuration.

See Also:
SlopQueryNode, StandardQueryConfigHandler.ConfigurationKeys.PHRASE_SLOP

Constructor Summary
DefaultPhraseSlopQueryNodeProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
QueryNode | process(QueryNode queryTree) Processes a query node tree.
protected void | processChildren(QueryNode queryTree) This method is called every time a child is processed.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultPhraseSlopQueryNodeProcessor

public DefaultPhraseSlopQueryNodeProcessor()
Method Detail

process

public QueryNode process(QueryNode queryTree)
                  throws QueryNodeException
Description copied from interface: QueryNodeProcessor
Processes a query node tree. It may return the same or another query tree. I should never return null.

Specified by:
process in interface QueryNodeProcessor
Overrides:
process in class QueryNodeProcessorImpl
Parameters:
queryTree - tree root node
Returns:
the processed query tree
Throws:
QueryNodeException

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

processChildren

protected void processChildren(QueryNode queryTree)
                        throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is called every time a child is processed.

Overrides:
processChildren in class QueryNodeProcessorImpl
Parameters:
queryTree - the query node child to be processed
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FuzzyQueryNodeProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class FuzzyQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.FuzzyQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class FuzzyQueryNodeProcessor
extends QueryNodeProcessorImpl

This processor iterates the query node tree looking for every FuzzyQueryNode, when this kind of node is found, it checks on the query configuration for StandardQueryConfigHandler.ConfigurationKeys.FUZZY_CONFIG, gets the fuzzy prefix length and default similarity from it and set to the fuzzy node. For more information about fuzzy prefix length check: FuzzyQuery.

See Also:
StandardQueryConfigHandler.ConfigurationKeys.FUZZY_CONFIG, FuzzyQuery, FuzzyQueryNode

Constructor Summary
FuzzyQueryNodeProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, process, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FuzzyQueryNodeProcessor

public FuzzyQueryNodeProcessor()
Method Detail

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GroupQueryNodeProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class GroupQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.standard.processors.GroupQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class GroupQueryNodeProcessor
extends Object
implements QueryNodeProcessor

The SyntaxParser generates query node trees that consider the boolean operator precedence, but Lucene current syntax does not support boolean precedence, so this processor remove all the precedence and apply the equivalent modifier according to the boolean operation defined on an specific query node.

If there is a GroupQueryNode in the query node tree, the query node tree is not merged with the one above it. Example: TODO: describe a good example to show how this processor works

See Also:
StandardQueryConfigHandler

Constructor Summary
GroupQueryNodeProcessor()
Method Summary
QueryConfigHandler | getQueryConfigHandler() Returns the QueryConfigHandler associated to the query tree if any, otherwise it returns null
QueryNode | process(QueryNode queryTree) Processes a query node tree.
void | setQueryConfigHandler(QueryConfigHandler queryConfigHandler) Sets the QueryConfigHandler associated to the query tree.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GroupQueryNodeProcessor

public GroupQueryNodeProcessor()
Method Detail

process

public QueryNode process(QueryNode queryTree)
                  throws QueryNodeException
Description copied from interface: QueryNodeProcessor
Processes a query node tree. It may return the same or another query tree. I should never return null.

Specified by:
process in interface QueryNodeProcessor
Parameters:
queryTree - tree root node
Returns:
the processed query tree
Throws:
QueryNodeException

getQueryConfigHandler

public QueryConfigHandler getQueryConfigHandler()
Description copied from interface: QueryNodeProcessor
Returns the QueryConfigHandler associated to the query tree if any, otherwise it returns null

Specified by:
getQueryConfigHandler in interface QueryNodeProcessor
Returns:
the QueryConfigHandler associated to the query tree if any, otherwise it returns null

setQueryConfigHandler

public void setQueryConfigHandler(QueryConfigHandler queryConfigHandler)
Description copied from interface: QueryNodeProcessor
Sets the QueryConfigHandler associated to the query tree.

Specified by:
setQueryConfigHandler in interface QueryNodeProcessor
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LowercaseExpandedTermsQueryNodeProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class LowercaseExpandedTermsQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.LowercaseExpandedTermsQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class LowercaseExpandedTermsQueryNodeProcessor
extends QueryNodeProcessorImpl

This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.LOWERCASE_EXPANDED_TERMS is defined in the QueryConfigHandler. If it is and the expanded terms should be lower-cased, it looks for every WildcardQueryNode, FuzzyQueryNode and ParametricQueryNode and lower-case its term.

See Also:
StandardQueryConfigHandler.ConfigurationKeys.LOWERCASE_EXPANDED_TERMS

Constructor Summary
LowercaseExpandedTermsQueryNodeProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
QueryNode | process(QueryNode queryTree) Processes a query node tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LowercaseExpandedTermsQueryNodeProcessor

public LowercaseExpandedTermsQueryNodeProcessor()
Method Detail

process

public QueryNode process(QueryNode queryTree)
                  throws QueryNodeException
Description copied from interface: QueryNodeProcessor
Processes a query node tree. It may return the same or another query tree. I should never return null.

Specified by:
process in interface QueryNodeProcessor
Overrides:
process in class QueryNodeProcessorImpl
Parameters:
queryTree - tree root node
Returns:
the processed query tree
Throws:
QueryNodeException

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MatchAllDocsQueryNodeProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class MatchAllDocsQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.MatchAllDocsQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class MatchAllDocsQueryNodeProcessor
extends QueryNodeProcessorImpl

This processor converts every WildcardQueryNode that is "*:*" to MatchAllDocsQueryNode.

See Also:
MatchAllDocsQueryNode, MatchAllDocsQuery

Constructor Summary
MatchAllDocsQueryNodeProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, process, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MatchAllDocsQueryNodeProcessor

public MatchAllDocsQueryNodeProcessor()
Method Detail

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiFieldQueryNodeProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class MultiFieldQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.MultiFieldQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class MultiFieldQueryNodeProcessor
extends QueryNodeProcessorImpl

This processor is used to expand terms so the query looks for the same term in different fields. It also boosts a query based on its field.

This processor looks for every FieldableNode contained in the query node tree. If a FieldableNode is found, it checks if there is a StandardQueryConfigHandler.ConfigurationKeys.MULTI_FIELDS defined in the QueryConfigHandler. If there is, the FieldableNode is cloned N times and the clones are added to a BooleanQueryNode together with the original node. N is defined by the number of fields that it will be expanded to. The BooleanQueryNode is returned.

See Also:
StandardQueryConfigHandler.ConfigurationKeys.MULTI_FIELDS

Constructor Summary
MultiFieldQueryNodeProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
protected void | processChildren(QueryNode queryTree) This method is called every time a child is processed.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, process, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MultiFieldQueryNodeProcessor

public MultiFieldQueryNodeProcessor()
Method Detail

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

processChildren

protected void processChildren(QueryNode queryTree)
                        throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is called every time a child is processed.

Overrides:
processChildren in class QueryNodeProcessorImpl
Parameters:
queryTree - the query node child to be processed
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTermRewriteMethodProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class MultiTermRewriteMethodProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.MultiTermRewriteMethodProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class MultiTermRewriteMethodProcessor
extends QueryNodeProcessorImpl

This processor instates the default MultiTermQuery.RewriteMethod, MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT, for multi-term query nodes.

Field Summary
static String TAG_ID
Constructor Summary
MultiTermRewriteMethodProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, process, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

TAG_ID

public static final String TAG_ID
See Also:
Constant Field Values
Constructor Detail

MultiTermRewriteMethodProcessor

public MultiTermRewriteMethodProcessor()
Method Detail

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericQueryNodeProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class NumericQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.NumericQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class NumericQueryNodeProcessor
extends QueryNodeProcessorImpl

This processor is used to convert FieldQueryNodes to NumericRangeQueryNodes. It looks for StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG set in the FieldConfig of every FieldQueryNode found. If StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG is found, it considers that FieldQueryNode to be a numeric query and convert it to NumericRangeQueryNode with upper and lower inclusive and lower and upper equals to the value represented by the FieldQueryNode converted to Number. It means that field:1 is converted to field:[1 TO 1].

Note that ParametricQueryNodes are ignored, even being a FieldQueryNode.

See Also:
StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG, FieldQueryNode, NumericConfig, NumericQueryNode

Constructor Summary
NumericQueryNodeProcessor()
Constructs a NumericQueryNodeProcessor object.
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, process, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NumericQueryNodeProcessor

public NumericQueryNodeProcessor()
Constructs a NumericQueryNodeProcessor object.

Method Detail

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericRangeQueryNodeProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class NumericRangeQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.NumericRangeQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class NumericRangeQueryNodeProcessor
extends QueryNodeProcessorImpl

This processor is used to convert ParametricRangeQueryNodes to NumericRangeQueryNodes. It looks for StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG set in the FieldConfig of every ParametricRangeQueryNode found. If StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG is found, it considers that ParametricRangeQueryNode to be a numeric range query and convert it to NumericRangeQueryNode.

See Also:
StandardQueryConfigHandler.ConfigurationKeys.NUMERIC_CONFIG, ParametricRangeQueryNode, NumericConfig, NumericRangeQueryNode

Constructor Summary
NumericRangeQueryNodeProcessor()
Constructs an empty NumericRangeQueryNode object.
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, process, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NumericRangeQueryNodeProcessor

public NumericRangeQueryNodeProcessor()
Constructs an empty NumericRangeQueryNode object.

Method Detail

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.standard.processors
Classes
AllowLeadingWildcardProcessor
AnalyzerQueryNodeProcessor
BooleanSingleChildOptimizationQueryNodeProcessor
BoostQueryNodeProcessor
DefaultPhraseSlopQueryNodeProcessor
FuzzyQueryNodeProcessor
GroupQueryNodeProcessor
LowercaseExpandedTermsQueryNodeProcessor
MatchAllDocsQueryNodeProcessor
MultiFieldQueryNodeProcessor
MultiTermRewriteMethodProcessor
NumericQueryNodeProcessor
NumericRangeQueryNodeProcessor
ParametricRangeQueryNodeProcessor
PhraseSlopQueryNodeProcessor
RemoveEmptyNonLeafQueryNodeProcessor
StandardQueryNodeProcessorPipeline
WildcardQueryNodeProcessor


org.apache.lucene.queryParser.standard.processors

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.standard.processors

Lucene Query Node Processors

See:
Description

Class Summary
AllowLeadingWildcardProcessor | This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.ALLOW_LEADING_WILDCARD is defined in the QueryConfigHandler.
AnalyzerQueryNodeProcessor | This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.ANALYZER is defined in the QueryConfigHandler.
BooleanSingleChildOptimizationQueryNodeProcessor | This processor removes every BooleanQueryNode that contains only one child and returns this child.
BoostQueryNodeProcessor | This processor iterates the query node tree looking for every FieldableNode that has StandardQueryConfigHandler.ConfigurationKeys.BOOST in its config.
DefaultPhraseSlopQueryNodeProcessor | This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.PHRASE_SLOP is defined in the QueryConfigHandler.
FuzzyQueryNodeProcessor | This processor iterates the query node tree looking for every FuzzyQueryNode, when this kind of node is found, it checks on the query configuration for StandardQueryConfigHandler.ConfigurationKeys.FUZZY_CONFIG, gets the fuzzy prefix length and default similarity from it and set to the fuzzy node.
GroupQueryNodeProcessor | The SyntaxParser generates query node trees that consider the boolean operator precedence, but Lucene current syntax does not support boolean precedence, so this processor remove all the precedence and apply the equivalent modifier according to the boolean operation defined on an specific query node.
LowercaseExpandedTermsQueryNodeProcessor | This processor verifies if StandardQueryConfigHandler.ConfigurationKeys.LOWERCASE_EXPANDED_TERMS is defined in the QueryConfigHandler.
MatchAllDocsQueryNodeProcessor | This processor converts every WildcardQueryNode that is "*:*" to MatchAllDocsQueryNode.
MultiFieldQueryNodeProcessor | This processor is used to expand terms so the query looks for the same term in different fields.
MultiTermRewriteMethodProcessor | This processor instates the default MultiTermQuery.RewriteMethod, MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT, for multi-term query nodes.
NumericQueryNodeProcessor | This processor is used to convert FieldQueryNodes to NumericRangeQueryNodes.
NumericRangeQueryNodeProcessor | This processor is used to convert ParametricRangeQueryNodes to NumericRangeQueryNodes.
ParametricRangeQueryNodeProcessor | This processor converts ParametricRangeQueryNode objects to RangeQueryNode objects.
PhraseSlopQueryNodeProcessor | This processor removes invalid SlopQueryNode objects in the query node tree.
RemoveEmptyNonLeafQueryNodeProcessor | This processor removes every QueryNode that is not a leaf and has not children.
StandardQueryNodeProcessorPipeline | This pipeline has all the processors needed to process a query node tree, generated by StandardSyntaxParser, already assembled.
WildcardQueryNodeProcessor | The StandardSyntaxParser creates PrefixWildcardQueryNode nodes which have values containing the prefixed wildcard.

Package org.apache.lucene.queryParser.standard.processors Description

Lucene Query Node Processors

The package org.apache.lucene.queryParser.standard.processors contains every processor needed to assembly a pipeline that modifies the query node tree according to the actual Lucene queries.

These processors are already assembled correctly in the StandardQueryNodeProcessorPipeline.


org.apache.lucene.queryParser.standard.processors Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.standard.processors

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.standard.processors.GroupQueryNodeProcessor (implements org.apache.lucene.queryParser.core.processors.QueryNodeProcessor)
    • org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl (implements org.apache.lucene.queryParser.core.processors.QueryNodeProcessor)
      • org.apache.lucene.queryParser.standard.processors.AllowLeadingWildcardProcessor
      • org.apache.lucene.queryParser.standard.processors.AnalyzerQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.BooleanSingleChildOptimizationQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.BoostQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.DefaultPhraseSlopQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.FuzzyQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.LowercaseExpandedTermsQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.MatchAllDocsQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.MultiFieldQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.MultiTermRewriteMethodProcessor
      • org.apache.lucene.queryParser.standard.processors.NumericQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.NumericRangeQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.ParametricRangeQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.PhraseSlopQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.RemoveEmptyNonLeafQueryNodeProcessor
      • org.apache.lucene.queryParser.standard.processors.WildcardQueryNodeProcessor
    • org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline (implements java.util.List<E>, org.apache.lucene.queryParser.core.processors.QueryNodeProcessor)
      • org.apache.lucene.queryParser.standard.processors.StandardQueryNodeProcessorPipeline


Uses of Package org.apache.lucene.queryParser.standard.processors

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.standard.processors

Packages that use org.apache.lucene.queryParser.standard.processors
org.apache.lucene.queryParser.precedence.processors This package contains the processors used by Precedence Query Parser

Classes in org.apache.lucene.queryParser.standard.processors used by org.apache.lucene.queryParser.precedence.processors
StandardQueryNodeProcessorPipeline
This pipeline has all the processors needed to process a query node tree, generated by StandardSyntaxParser, already assembled.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ParametricRangeQueryNodeProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class ParametricRangeQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.ParametricRangeQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class ParametricRangeQueryNodeProcessor
extends QueryNodeProcessorImpl

This processor converts ParametricRangeQueryNode objects to RangeQueryNode objects. It reads the lower and upper bounds value from the ParametricRangeQueryNode object and try to parse their values using a DateFormat. If the values cannot be parsed to a date value, it will only create the RangeQueryNode using the non-parsed values.

If a StandardQueryConfigHandler.ConfigurationKeys.LOCALE is defined in the QueryConfigHandler it will be used to parse the date, otherwise Locale.getDefault() will be used.

If a StandardQueryConfigHandler.ConfigurationKeys.DATE_RESOLUTION is defined and the DateTools.Resolution is not null it will also be used to parse the date value.

See Also:
StandardQueryConfigHandler.ConfigurationKeys.DATE_RESOLUTION, StandardQueryConfigHandler.ConfigurationKeys.LOCALE, TermRangeQueryNode, ParametricRangeQueryNode

Constructor Summary
ParametricRangeQueryNodeProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, process, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ParametricRangeQueryNodeProcessor

public ParametricRangeQueryNodeProcessor()
Method Detail

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PhraseSlopQueryNodeProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class PhraseSlopQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.PhraseSlopQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class PhraseSlopQueryNodeProcessor
extends QueryNodeProcessorImpl

This processor removes invalid SlopQueryNode objects in the query node tree. A SlopQueryNode is invalid if its child is neither a TokenizedPhraseQueryNode nor a MultiPhraseQueryNode.

See Also:
SlopQueryNode

Constructor Summary
PhraseSlopQueryNodeProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, process, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PhraseSlopQueryNodeProcessor

public PhraseSlopQueryNodeProcessor()
Method Detail

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RemoveEmptyNonLeafQueryNodeProcessor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class RemoveEmptyNonLeafQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.RemoveEmptyNonLeafQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class RemoveEmptyNonLeafQueryNodeProcessor
extends QueryNodeProcessorImpl

This processor removes every QueryNode that is not a leaf and has not children. If after processing the entire tree the root node is not a leaf and has no children, a MatchNoDocsQueryNode object is returned.

This processor is used at the end of a pipeline to avoid invalid query node tree structures like a GroupQueryNode or ModifierQueryNode with no children.

See Also:
QueryNode, MatchNoDocsQueryNode

Constructor Summary
RemoveEmptyNonLeafQueryNodeProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
QueryNode | process(QueryNode queryTree) Processes a query node tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RemoveEmptyNonLeafQueryNodeProcessor

public RemoveEmptyNonLeafQueryNodeProcessor()
Method Detail

process

public QueryNode process(QueryNode queryTree)
                  throws QueryNodeException
Description copied from interface: QueryNodeProcessor
Processes a query node tree. It may return the same or another query tree. I should never return null.

Specified by:
process in interface QueryNodeProcessor
Overrides:
process in class QueryNodeProcessorImpl
Parameters:
queryTree - tree root node
Returns:
the processed query tree
Throws:
QueryNodeException

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StandardQueryNodeProcessorPipeline

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class StandardQueryNodeProcessorPipeline

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline
        extended by  org.apache.lucene.queryParser.standard.processors.StandardQueryNodeProcessorPipeline
All Implemented Interfaces:
Iterable<QueryNodeProcessor>, Collection<QueryNodeProcessor>, List<QueryNodeProcessor>, QueryNodeProcessor
Direct Known Subclasses:
PrecedenceQueryNodeProcessorPipeline
public class StandardQueryNodeProcessorPipeline
extends QueryNodeProcessorPipeline

This pipeline has all the processors needed to process a query node tree, generated by StandardSyntaxParser, already assembled.

The order they are assembled affects the results.

This processor pipeline was designed to work with StandardQueryConfigHandler.

The result query node tree can be used to build a Query object using StandardQueryTreeBuilder.

See Also:
StandardQueryTreeBuilder, StandardQueryConfigHandler, StandardSyntaxParser

Constructor Summary
StandardQueryNodeProcessorPipeline(QueryConfigHandler queryConfig)
Method Summary
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorPipeline
add, add, addAll, addAll, addProcessor, clear, contains, containsAll, get, getQueryConfigHandler, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, process, remove, remove, removeAll, retainAll, set, setQueryConfigHandler, size, subList, toArray, toArray
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.List
equals, hashCode

Constructor Detail

StandardQueryNodeProcessorPipeline

public StandardQueryNodeProcessorPipeline(QueryConfigHandler queryConfig)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WildcardQueryNodeProcessor

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.standard.processors
Class WildcardQueryNodeProcessor

java.lang.Object
    extended by  org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
        extended by  org.apache.lucene.queryParser.standard.processors.WildcardQueryNodeProcessor
All Implemented Interfaces:
QueryNodeProcessor
public class WildcardQueryNodeProcessor
extends QueryNodeProcessorImpl

The StandardSyntaxParser creates PrefixWildcardQueryNode nodes which have values containing the prefixed wildcard. However, Lucene PrefixQuery cannot contain the prefixed wildcard. So, this processor basically removed the prefixed wildcard from the PrefixWildcardQueryNode value.

See Also:
PrefixQuery, PrefixWildcardQueryNode

Constructor Summary
WildcardQueryNodeProcessor()
Method Summary
protected QueryNode | postProcessNode(QueryNode node) This method is invoked for every node when walking up the tree.
protected QueryNode | preProcessNode(QueryNode node) This method is invoked for every node when walking down the tree.
protected List<QueryNode> | setChildrenOrder(List<QueryNode> children) This method is invoked for every node that has at least on child.
Methods inherited from class org.apache.lucene.queryParser.core.processors.QueryNodeProcessorImpl
getQueryConfigHandler, process, processChildren, setQueryConfigHandler
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WildcardQueryNodeProcessor

public WildcardQueryNodeProcessor()
Method Detail

postProcessNode

protected QueryNode postProcessNode(QueryNode node)
                             throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking up the tree.

Specified by:
postProcessNode in class QueryNodeProcessorImpl
Parameters:
node - node the query node to be post-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

preProcessNode

protected QueryNode preProcessNode(QueryNode node)
                            throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node when walking down the tree.

Specified by:
preProcessNode in class QueryNodeProcessorImpl
Parameters:
node - the query node to be pre-processed
Returns:
a query node
Throws:
QueryNodeException - if something goes wrong during the query node processing

setChildrenOrder

protected List<QueryNode> setChildrenOrder(List<QueryNode> children)
                                    throws QueryNodeException
Description copied from class: QueryNodeProcessorImpl
This method is invoked for every node that has at least on child. It's invoked right before QueryNodeProcessorImpl.postProcessNode(QueryNode) is invoked.

Specified by:
setChildrenOrder in class QueryNodeProcessorImpl
Parameters:
children - the list containing all current node's children
Returns:
a new list containing all children that should be set to the current node
Throws:
QueryNodeException - if something goes wrong during the query node processing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.queryParser.standard.processors.AllowLeadingWildcardProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.AllowLeadingWildcardProcessor

No usage of org.apache.lucene.queryParser.standard.processors.AllowLeadingWildcardProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.AnalyzerQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.AnalyzerQueryNodeProcessor

No usage of org.apache.lucene.queryParser.standard.processors.AnalyzerQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.BooleanSingleChildOptimizationQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.BooleanSingleChildOptimizationQueryNodeProcessor

No usage of org.apache.lucene.queryParser.standard.processors.BooleanSingleChildOptimizationQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.BoostQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.BoostQueryNodeProcessor

No usage of org.apache.lucene.queryParser.standard.processors.BoostQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.DefaultPhraseSlopQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.DefaultPhraseSlopQueryNodeProcessor

No usage of org.apache.lucene.queryParser.standard.processors.DefaultPhraseSlopQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.FuzzyQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.FuzzyQueryNodeProcessor

No usage of org.apache.lucene.queryParser.standard.processors.FuzzyQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.GroupQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.GroupQueryNodeProcessor

No usage of org.apache.lucene.queryParser.standard.processors.GroupQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.LowercaseExpandedTermsQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.LowercaseExpandedTermsQueryNodeProcessor

No usage of org.apache.lucene.queryParser.standard.processors.LowercaseExpandedTermsQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.MatchAllDocsQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.MatchAllDocsQueryNodeProcessor

No usage of org.apache.lucene.queryParser.standard.processors.MatchAllDocsQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.MultiFieldQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.MultiFieldQueryNodeProcessor

No usage of org.apache.lucene.queryParser.standard.processors.MultiFieldQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.MultiTermRewriteMethodProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.MultiTermRewriteMethodProcessor

No usage of org.apache.lucene.queryParser.standard.processors.MultiTermRewriteMethodProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.NumericQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.NumericQueryNodeProcessor

No usage of org.apache.lucene.queryParser.standard.processors.NumericQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.NumericRangeQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.NumericRangeQueryNodeProcessor

No usage of org.apache.lucene.queryParser.standard.processors.NumericRangeQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.ParametricRangeQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.ParametricRangeQueryNodeProcessor

No usage of org.apache.lucene.queryParser.standard.processors.ParametricRangeQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.PhraseSlopQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.PhraseSlopQueryNodeProcessor

No usage of org.apache.lucene.queryParser.standard.processors.PhraseSlopQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.RemoveEmptyNonLeafQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.RemoveEmptyNonLeafQueryNodeProcessor

No usage of org.apache.lucene.queryParser.standard.processors.RemoveEmptyNonLeafQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.StandardQueryNodeProcessorPipeline

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.StandardQueryNodeProcessorPipeline

Packages that use StandardQueryNodeProcessorPipeline
org.apache.lucene.queryParser.precedence.processors This package contains the processors used by Precedence Query Parser

Uses of StandardQueryNodeProcessorPipeline in org.apache.lucene.queryParser.precedence.processors

Subclasses of StandardQueryNodeProcessorPipeline in org.apache.lucene.queryParser.precedence.processors
 class PrecedenceQueryNodeProcessorPipeline
This processor pipeline extends StandardQueryNodeProcessorPipeline and enables boolean precedence on it.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.standard.processors.WildcardQueryNodeProcessor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.standard.processors.WildcardQueryNodeProcessor

No usage of org.apache.lucene.queryParser.standard.processors.WildcardQueryNodeProcessor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CharStream

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.parser
Interface CharStream

All Known Implementing Classes:
FastCharStream
public interface CharStream

This interface describes a character stream that maintains line and column number positions of the characters. It also has the capability to backup the stream to some extent. An implementation of this interface is used in the TokenManager implementation generated by JavaCCParser. All the methods except backup can be implemented in any fashion. backup needs to be implemented correctly for the correct operation of the lexer. Rest of the methods are all used to get information like line number, column number and the String that constitutes a token and are not used by the lexer. Hence their implementation won't affect the generated lexer's operation.

Method Summary
void | backup(int amount) Backs up the input stream by amount steps.
char | BeginToken() Returns the next character that marks the beginning of the next token.
void | Done() The lexer calls this function to indicate that it is done with the stream and hence implementations can free any resources held by this class.
int | getBeginColumn() Returns the column number of the first character for current token (being matched after the last call to BeginTOken).
int | getBeginLine() Returns the line number of the first character for current token (being matched after the last call to BeginTOken).
int | getColumn() Deprecated.
int | getEndColumn() Returns the column number of the last character for current token (being matched after the last call to BeginTOken).
int | getEndLine() Returns the line number of the last character for current token (being matched after the last call to BeginTOken).
String | GetImage() Returns a string made up of characters from the marked token beginning to the current buffer position.
int | getLine() Deprecated.
char[] | GetSuffix(int len) Returns an array of characters that make up the suffix of length 'len' for the currently matched token.
char | readChar() Returns the next character from the selected input.

Method Detail

readChar

char readChar()
              throws IOException
Returns the next character from the selected input. The method of selecting the input is the responsibility of the class implementing this interface. Can throw any java.io.IOException.

Throws:
IOException

getColumn

int getColumn()
Deprecated.

Returns the column position of the character last read.

See Also:
getEndColumn()

getLine

int getLine()
Deprecated.

Returns the line number of the character last read.

See Also:
getEndLine()

getEndColumn

int getEndColumn()
Returns the column number of the last character for current token (being matched after the last call to BeginTOken).

getEndLine

int getEndLine()
Returns the line number of the last character for current token (being matched after the last call to BeginTOken).

getBeginColumn

int getBeginColumn()
Returns the column number of the first character for current token (being matched after the last call to BeginTOken).

getBeginLine

int getBeginLine()
Returns the line number of the first character for current token (being matched after the last call to BeginTOken).

backup

void backup(int amount)
Backs up the input stream by amount steps. Lexer calls this method if it had already read some characters, but could not use them to match a (longer) token. So, they will be used again as the prefix of the next token and it is the implemetation's responsibility to do this right.

BeginToken

char BeginToken()
                throws IOException
Returns the next character that marks the beginning of the next token. All characters must remain in the buffer between two successive calls to this method to implement backup correctly.

Throws:
IOException

GetImage

String GetImage()
Returns a string made up of characters from the marked token beginning to the current buffer position. Implementations have the choice of returning anything that they want to. For example, for efficiency, one might decide to just return null, which is a valid implementation.

GetSuffix

char[] GetSuffix(int len)
Returns an array of characters that make up the suffix of length 'len' for the currently matched token. This is used to build up the matched string for use in actions in the case of MORE. A simple and inefficient implementation of this is as follows : { String t = GetImage(); return t.substring(t.length() - len, t.length()).toCharArray(); }

Done

void Done()
The lexer calls this function to indicate that it is done with the stream and hence implementations can free any resources held by this class. Again, the body of this function can be just empty and it will not affect the lexer's operation.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


FastCharStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.parser
Class FastCharStream

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.parser.FastCharStream
All Implemented Interfaces:
CharStream
public final class FastCharStream
extends Object
implements CharStream

An efficient implementation of JavaCC's CharStream interface.

Note that this does not do line-number counting, but instead keeps track of the character position of the token in the input, as required by Lucene's Token API.

Constructor Summary
FastCharStream(Reader r)
Constructs from a Reader.
Method Summary
void | backup(int amount) Backs up the input stream by amount steps.
char | BeginToken() Returns the next character that marks the beginning of the next token.
void | Done() The lexer calls this function to indicate that it is done with the stream and hence implementations can free any resources held by this class.
int | getBeginColumn() Returns the column number of the first character for current token (being matched after the last call to BeginTOken).
int | getBeginLine() Returns the line number of the first character for current token (being matched after the last call to BeginTOken).
int | getColumn() Returns the column position of the character last read.
int | getEndColumn() Returns the column number of the last character for current token (being matched after the last call to BeginTOken).
int | getEndLine() Returns the line number of the last character for current token (being matched after the last call to BeginTOken).
String | GetImage() Returns a string made up of characters from the marked token beginning to the current buffer position.
int | getLine() Returns the line number of the character last read.
char[] | GetSuffix(int len) Returns an array of characters that make up the suffix of length 'len' for the currently matched token.
char | readChar() Returns the next character from the selected input.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FastCharStream

public FastCharStream(Reader r)
Constructs from a Reader.

Method Detail

readChar

public final char readChar()
                    throws IOException
Description copied from interface: CharStream
Returns the next character from the selected input. The method of selecting the input is the responsibility of the class implementing this interface. Can throw any java.io.IOException.

Specified by:
readChar in interface CharStream
Throws:
IOException

BeginToken

public final char BeginToken()
                      throws IOException
Description copied from interface: CharStream
Returns the next character that marks the beginning of the next token. All characters must remain in the buffer between two successive calls to this method to implement backup correctly.

Specified by:
BeginToken in interface CharStream
Throws:
IOException

backup

public final void backup(int amount)
Description copied from interface: CharStream
Backs up the input stream by amount steps. Lexer calls this method if it had already read some characters, but could not use them to match a (longer) token. So, they will be used again as the prefix of the next token and it is the implemetation's responsibility to do this right.

Specified by:
backup in interface CharStream

GetImage

public final String GetImage()
Description copied from interface: CharStream
Returns a string made up of characters from the marked token beginning to the current buffer position. Implementations have the choice of returning anything that they want to. For example, for efficiency, one might decide to just return null, which is a valid implementation.

Specified by:
GetImage in interface CharStream

GetSuffix

public final char[] GetSuffix(int len)
Description copied from interface: CharStream
Returns an array of characters that make up the suffix of length 'len' for the currently matched token. This is used to build up the matched string for use in actions in the case of MORE. A simple and inefficient implementation of this is as follows : { String t = GetImage(); return t.substring(t.length() - len, t.length()).toCharArray(); }

Specified by:
GetSuffix in interface CharStream

Done

public final void Done()
Description copied from interface: CharStream
The lexer calls this function to indicate that it is done with the stream and hence implementations can free any resources held by this class. Again, the body of this function can be just empty and it will not affect the lexer's operation.

Specified by:
Done in interface CharStream

getColumn

public final int getColumn()
Description copied from interface: CharStream
Returns the column position of the character last read.

Specified by:
getColumn in interface CharStream
See Also:
CharStream.getEndColumn()

getLine

public final int getLine()
Description copied from interface: CharStream
Returns the line number of the character last read.

Specified by:
getLine in interface CharStream
See Also:
CharStream.getEndLine()

getEndColumn

public final int getEndColumn()
Description copied from interface: CharStream
Returns the column number of the last character for current token (being matched after the last call to BeginTOken).

Specified by:
getEndColumn in interface CharStream

getEndLine

public final int getEndLine()
Description copied from interface: CharStream
Returns the line number of the last character for current token (being matched after the last call to BeginTOken).

Specified by:
getEndLine in interface CharStream

getBeginColumn

public final int getBeginColumn()
Description copied from interface: CharStream
Returns the column number of the first character for current token (being matched after the last call to BeginTOken).

Specified by:
getBeginColumn in interface CharStream

getBeginLine

public final int getBeginLine()
Description copied from interface: CharStream
Returns the line number of the first character for current token (being matched after the last call to BeginTOken).

Specified by:
getBeginLine in interface CharStream
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.surround.parser
Interfaces
CharStream
QueryParserConstants
Classes
FastCharStream
QueryParser
QueryParserTokenManager
Token
Exceptions
ParseException
Errors
TokenMgrError


org.apache.lucene.queryParser.surround.parser

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.surround.parser

This package contains the QueryParser.jj source file for the Surround parser.

See:
Description

Interface Summary
CharStream | This interface describes a character stream that maintains line and column number positions of the characters.
QueryParserConstants | Token literal values and constants.

Class Summary
FastCharStream | An efficient implementation of JavaCC's CharStream interface.
QueryParser | This class is generated by JavaCC.
QueryParserTokenManager | Token Manager.
Token | Describes the input token stream.

Exception Summary
ParseException This exception is thrown when parse errors are encountered.

Error Summary
TokenMgrError Token Manager Error.

Package org.apache.lucene.queryParser.surround.parser Description

This package contains the QueryParser.jj source file for the Surround parser.

Parsing the text of a query results in a SrndQuery in the org.apache.lucene.queryParser.surround.query package.


org.apache.lucene.queryParser.surround.parser Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.surround.parser

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.surround.parser.FastCharStream (implements org.apache.lucene.queryParser.surround.parser.CharStream)
    • org.apache.lucene.queryParser.surround.parser.QueryParser (implements org.apache.lucene.queryParser.surround.parser.QueryParserConstants)
    • org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager (implements org.apache.lucene.queryParser.surround.parser.QueryParserConstants)
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Error
        • org.apache.lucene.queryParser.surround.parser.TokenMgrError
      • java.lang.Exception
        • org.apache.lucene.queryParser.surround.parser.ParseException
    • org.apache.lucene.queryParser.surround.parser.Token

Interface Hierarchy

  • org.apache.lucene.queryParser.surround.parser.CharStream
  • org.apache.lucene.queryParser.surround.parser.QueryParserConstants


Uses of Package org.apache.lucene.queryParser.surround.parser

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.surround.parser

Packages that use org.apache.lucene.queryParser.surround.parser
org.apache.lucene.queryParser.surround.parser This package contains the QueryParser.jj source file for the Surround parser.

Classes in org.apache.lucene.queryParser.surround.parser used by org.apache.lucene.queryParser.surround.parser
CharStream
This interface describes a character stream that maintains line and column number positions of the characters.
ParseException
This exception is thrown when parse errors are encountered.
QueryParserConstants
Token literal values and constants.
QueryParserTokenManager
Token Manager.
Token
Describes the input token stream.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ParseException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.parser
Class ParseException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  org.apache.lucene.queryParser.surround.parser.ParseException
All Implemented Interfaces:
Serializable
public class ParseException
extends Exception

This exception is thrown when parse errors are encountered. You can explicitly create objects of this exception type by calling the method generateParseException in the generated parser. You can modify this class to customize your error reporting mechanisms so long as you retain the public fields.

See Also:
Serialized Form

Field Summary
Token | currentToken This is the last token that has been consumed successfully.
protected String | eol The end of line string for this machine.
int[][] | expectedTokenSequences Each entry in this array is an array of integers.
protected boolean | specialConstructor This variable determines which constructor was used to create this object and thereby affects the semantics of the "getMessage" method (see below).
String[] | tokenImage This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred.
Constructor Summary
ParseException()
The following constructors are for use by you for whatever purpose you can think of.
ParseException(String message)
Constructor with message.
ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal)
This constructor is used by the method "generateParseException" in the generated parser.
Method Summary
protected String | add_escapes(String str) Used to convert raw characters to their escaped version when these raw version cannot be used as part of an ASCII string literal.
String | getMessage() This method has the standard behavior when this object has been created using the standard constructors.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

specialConstructor

protected boolean specialConstructor
This variable determines which constructor was used to create this object and thereby affects the semantics of the "getMessage" method (see below).

currentToken

public Token currentToken
This is the last token that has been consumed successfully. If this object has been created due to a parse error, the token followng this token will (therefore) be the first error token.

expectedTokenSequences

public int[][] expectedTokenSequences
Each entry in this array is an array of integers. Each array of integers represents a sequence of tokens (by their ordinal values) that is expected at this point of the parse.

tokenImage

public String[] tokenImage
This is a reference to the "tokenImage" array of the generated parser within which the parse error occurred. This array is defined in the generated ...Constants interface.

eol

protected String eol
The end of line string for this machine.

Constructor Detail

ParseException

public ParseException(Token currentTokenVal,
                      int[][] expectedTokenSequencesVal,
                      String[] tokenImageVal)
This constructor is used by the method "generateParseException" in the generated parser. Calling this constructor generates a new object of this type with the fields "currentToken", "expectedTokenSequences", and "tokenImage" set. The boolean flag "specialConstructor" is also set to true to indicate that this constructor was used to create this object. This constructor calls its super class with the empty string to force the "toString" method of parent class "Throwable" to print the error message in the form: ParseException:

ParseException

public ParseException()
The following constructors are for use by you for whatever purpose you can think of. Constructing the exception in this manner makes the exception behave in the normal way - i.e., as documented in the class "Throwable". The fields "errorToken", "expectedTokenSequences", and "tokenImage" do not contain relevant information. The JavaCC generated code does not use these constructors.

ParseException

public ParseException(String message)
Constructor with message.

Method Detail

getMessage

public String getMessage()
This method has the standard behavior when this object has been created using the standard constructors. Otherwise, it uses "currentToken" and "expectedTokenSequences" to generate a parse error message and returns it. If this object has been created due to a parse error, and you do not catch it (it gets thrown from the parser), then this method is called during the printing of the final stack trace, and hence the correct error message gets displayed.

Overrides:
getMessage in class Throwable

add_escapes

protected String add_escapes(String str)
Used to convert raw characters to their escaped version when these raw version cannot be used as part of an ASCII string literal.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.parser
Class QueryParser

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.parser.QueryParser
All Implemented Interfaces:
QueryParserConstants
public class QueryParser
extends Object
implements QueryParserConstants

This class is generated by JavaCC. The only method that clients should need to call is parse().

Field Summary
Token | jj_nt Next token.
Token | token Current token.
QueryParserTokenManager | token_source Generated Token Manager.
Fields inherited from interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
_DISTOP_NUM, _NUM_CHAR, _ONE_CHAR, _STAR, _TERM_CHAR, _WHITESPACE, AND, Boost, CARAT, COLON, COMMA, DEFAULT, EOF, LPAREN, N, NOT, NUMBER, OR, QUOTED, RPAREN, SUFFIXTERM, TERM, tokenImage, TRUNCQUOTED, TRUNCTERM, W
Constructor Summary
QueryParser()
QueryParser(CharStream stream)
Constructor with user supplied CharStream.
QueryParser(QueryParserTokenManager tm)
Constructor with generated Token Manager.
Method Summary
protected boolean | allowedSuffix(String suffixed)
protected boolean | allowedTruncation(String truncated)
SrndQuery | AndQuery()
protected static void | checkDistanceSubQueries(DistanceQuery distq, String opName)
void | disable_tracing() Disable tracing.
void | enable_tracing() Enable tracing.
SrndQuery | FieldsQuery()
List<SrndQuery> | FieldsQueryList()
ParseException | generateParseException() Generate ParseException.
protected SrndQuery | getAndQuery(List<SrndQuery> queries, boolean infix, Token andToken)
protected SrndQuery | getDistanceQuery(List<SrndQuery> queries, boolean infix, Token dToken, boolean ordered)
protected SrndQuery | getFieldsQuery(SrndQuery q, ArrayList<String> fieldNames)
Token | getNextToken() Get the next Token.
protected SrndQuery | getNotQuery(List<SrndQuery> queries, Token notToken)
protected static int | getOpDistance(String distanceOp)
protected SrndQuery | getOrQuery(List<SrndQuery> queries, boolean infix, Token orToken)
protected SrndQuery | getPrefixQuery(String prefix, boolean quoted)
protected SrndQuery | getTermQuery(String term, boolean quoted)
Token | getToken(int index) Get the specific Token.
protected SrndQuery | getTruncQuery(String truncated)
SrndQuery | NotQuery()
SrndQuery | NQuery()
ArrayList<String> | OptionalFields()
void | OptionalWeights(SrndQuery q)
SrndQuery | OrQuery()
static SrndQuery | parse(String query)
SrndQuery | parse2(String query)
SrndQuery | PrefixOperatorQuery()
SrndQuery | PrimaryQuery()
void | ReInit(CharStream stream) Reinitialise.
void | ReInit(QueryParserTokenManager tm) Reinitialise.
SrndQuery | SimpleTerm()
SrndQuery | TopSrndQuery()
SrndQuery | WQuery()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

token_source

public QueryParserTokenManager token_source
Generated Token Manager.

token

public Token token
Current token.

jj_nt

public Token jj_nt
Next token.

Constructor Detail

QueryParser

public QueryParser()

QueryParser

public QueryParser(CharStream stream)
Constructor with user supplied CharStream.

QueryParser

public QueryParser(QueryParserTokenManager tm)
Constructor with generated Token Manager.

Method Detail

parse

public static SrndQuery parse(String query)
                       throws ParseException
Throws:
ParseException

parse2

public SrndQuery parse2(String query)
                 throws ParseException
Throws:
ParseException

getFieldsQuery

protected SrndQuery getFieldsQuery(SrndQuery q,
                                   ArrayList<String> fieldNames)

getOrQuery

protected SrndQuery getOrQuery(List<SrndQuery> queries,
                               boolean infix,
                               Token orToken)

getAndQuery

protected SrndQuery getAndQuery(List<SrndQuery> queries,
                                boolean infix,
                                Token andToken)

getNotQuery

protected SrndQuery getNotQuery(List<SrndQuery> queries,
                                Token notToken)

getOpDistance

protected static int getOpDistance(String distanceOp)

checkDistanceSubQueries

protected static void checkDistanceSubQueries(DistanceQuery distq,
                                              String opName)
                                       throws ParseException
Throws:
ParseException

getDistanceQuery

protected SrndQuery getDistanceQuery(List<SrndQuery> queries,
                                     boolean infix,
                                     Token dToken,
                                     boolean ordered)
                              throws ParseException
Throws:
ParseException

getTermQuery

protected SrndQuery getTermQuery(String term,
                                 boolean quoted)

allowedSuffix

protected boolean allowedSuffix(String suffixed)

getPrefixQuery

protected SrndQuery getPrefixQuery(String prefix,
                                   boolean quoted)

allowedTruncation

protected boolean allowedTruncation(String truncated)

getTruncQuery

protected SrndQuery getTruncQuery(String truncated)

TopSrndQuery

public final SrndQuery TopSrndQuery()
                             throws ParseException
Throws:
ParseException

FieldsQuery

public final SrndQuery FieldsQuery()
                            throws ParseException
Throws:
ParseException

OptionalFields

public final ArrayList<String> OptionalFields()
                                       throws ParseException
Throws:
ParseException

OrQuery

public final SrndQuery OrQuery()
                        throws ParseException
Throws:
ParseException

AndQuery

public final SrndQuery AndQuery()
                         throws ParseException
Throws:
ParseException

NotQuery

public final SrndQuery NotQuery()
                         throws ParseException
Throws:
ParseException

NQuery

public final SrndQuery NQuery()
                       throws ParseException
Throws:
ParseException

WQuery

public final SrndQuery WQuery()
                       throws ParseException
Throws:
ParseException

PrimaryQuery

public final SrndQuery PrimaryQuery()
                             throws ParseException
Throws:
ParseException

PrefixOperatorQuery

public final SrndQuery PrefixOperatorQuery()
                                    throws ParseException
Throws:
ParseException

FieldsQueryList

public final List<SrndQuery> FieldsQueryList()
                                      throws ParseException
Throws:
ParseException

SimpleTerm

public final SrndQuery SimpleTerm()
                           throws ParseException
Throws:
ParseException

OptionalWeights

public final void OptionalWeights(SrndQuery q)
                           throws ParseException
Throws:
ParseException

ReInit

public void ReInit(CharStream stream)
Reinitialise.

ReInit

public void ReInit(QueryParserTokenManager tm)
Reinitialise.

getNextToken

public final Token getNextToken()
Get the next Token.

getToken

public final Token getToken(int index)
Get the specific Token.

generateParseException

public ParseException generateParseException()
Generate ParseException.

enable_tracing

public final void enable_tracing()
Enable tracing.

disable_tracing

public final void disable_tracing()
Disable tracing.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryParserConstants

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.parser
Interface QueryParserConstants

All Known Implementing Classes:
QueryParser, QueryParserTokenManager
public interface QueryParserConstants

Token literal values and constants. Generated by org.javacc.parser.OtherFilesGen#start()

Field Summary
static int | _DISTOP_NUM RegularExpression Id.
static int | _NUM_CHAR RegularExpression Id.
static int | _ONE_CHAR RegularExpression Id.
static int | _STAR RegularExpression Id.
static int | _TERM_CHAR RegularExpression Id.
static int | _WHITESPACE RegularExpression Id.
static int | AND RegularExpression Id.
static int | Boost Lexical state.
static int | CARAT RegularExpression Id.
static int | COLON RegularExpression Id.
static int | COMMA RegularExpression Id.
static int | DEFAULT Lexical state.
static int | EOF End of File.
static int | LPAREN RegularExpression Id.
static int | N RegularExpression Id.
static int | NOT RegularExpression Id.
static int | NUMBER RegularExpression Id.
static int | OR RegularExpression Id.
static int | QUOTED RegularExpression Id.
static int | RPAREN RegularExpression Id.
static int | SUFFIXTERM RegularExpression Id.
static int | TERM RegularExpression Id.
static String[] | tokenImage Literal token values.
static int | TRUNCQUOTED RegularExpression Id.
static int | TRUNCTERM RegularExpression Id.
static int | W RegularExpression Id.

Field Detail

EOF

static final int EOF
End of File.

See Also:
Constant Field Values

_NUM_CHAR

static final int _NUM_CHAR
RegularExpression Id.

See Also:
Constant Field Values

_TERM_CHAR

static final int _TERM_CHAR
RegularExpression Id.

See Also:
Constant Field Values

_WHITESPACE

static final int _WHITESPACE
RegularExpression Id.

See Also:
Constant Field Values

_STAR

static final int _STAR
RegularExpression Id.

See Also:
Constant Field Values

_ONE_CHAR

static final int _ONE_CHAR
RegularExpression Id.

See Also:
Constant Field Values

_DISTOP_NUM

static final int _DISTOP_NUM
RegularExpression Id.

See Also:
Constant Field Values

OR

static final int OR
RegularExpression Id.

See Also:
Constant Field Values

AND

static final int AND
RegularExpression Id.

See Also:
Constant Field Values

NOT

static final int NOT
RegularExpression Id.

See Also:
Constant Field Values

W

static final int W
RegularExpression Id.

See Also:
Constant Field Values

N

static final int N
RegularExpression Id.

See Also:
Constant Field Values

LPAREN

static final int LPAREN
RegularExpression Id.

See Also:
Constant Field Values

RPAREN

static final int RPAREN
RegularExpression Id.

See Also:
Constant Field Values

COMMA

static final int COMMA
RegularExpression Id.

See Also:
Constant Field Values

COLON

static final int COLON
RegularExpression Id.

See Also:
Constant Field Values

CARAT

static final int CARAT
RegularExpression Id.

See Also:
Constant Field Values

TRUNCQUOTED

static final int TRUNCQUOTED
RegularExpression Id.

See Also:
Constant Field Values

QUOTED

static final int QUOTED
RegularExpression Id.

See Also:
Constant Field Values

SUFFIXTERM

static final int SUFFIXTERM
RegularExpression Id.

See Also:
Constant Field Values

TRUNCTERM

static final int TRUNCTERM
RegularExpression Id.

See Also:
Constant Field Values

TERM

static final int TERM
RegularExpression Id.

See Also:
Constant Field Values

NUMBER

static final int NUMBER
RegularExpression Id.

See Also:
Constant Field Values

Boost

static final int Boost
Lexical state.

See Also:
Constant Field Values

DEFAULT

static final int DEFAULT
Lexical state.

See Also:
Constant Field Values

tokenImage

static final String[] tokenImage
Literal token values.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryParserTokenManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.parser
Class QueryParserTokenManager

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager
All Implemented Interfaces:
QueryParserConstants
public class QueryParserTokenManager
extends Object
implements QueryParserConstants

Token Manager.

Field Summary
protected char | curChar
PrintStream | debugStream Debug output.
protected CharStream | input_stream
static int[] | jjnewLexState Lex State array.
static String[] | jjstrLiteralImages Token literal values.
static String[] | lexStateNames Lexer state names.
Fields inherited from interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants
_DISTOP_NUM, _NUM_CHAR, _ONE_CHAR, _STAR, _TERM_CHAR, _WHITESPACE, AND, Boost, CARAT, COLON, COMMA, DEFAULT, EOF, LPAREN, N, NOT, NUMBER, OR, QUOTED, RPAREN, SUFFIXTERM, TERM, tokenImage, TRUNCQUOTED, TRUNCTERM, W
Constructor Summary
QueryParserTokenManager(CharStream stream)
Constructor.
QueryParserTokenManager(CharStream stream, int lexState)
Constructor.
Method Summary
Token | getNextToken() Get the next Token.
protected Token | jjFillToken()
void | ReInit(CharStream stream) Reinitialise parser.
void | ReInit(CharStream stream, int lexState) Reinitialise parser.
void | setDebugStream(PrintStream ds) Set debug output.
void | SwitchTo(int lexState) Switch to specified lex state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

debugStream

public PrintStream debugStream
Debug output.

jjstrLiteralImages

public static final String[] jjstrLiteralImages
Token literal values.

lexStateNames

public static final String[] lexStateNames
Lexer state names.

jjnewLexState

public static final int[] jjnewLexState
Lex State array.

input_stream

protected CharStream input_stream

curChar

protected char curChar
Constructor Detail

QueryParserTokenManager

public QueryParserTokenManager(CharStream stream)
Constructor.

QueryParserTokenManager

public QueryParserTokenManager(CharStream stream,
                               int lexState)
Constructor.

Method Detail

setDebugStream

public void setDebugStream(PrintStream ds)
Set debug output.

ReInit

public void ReInit(CharStream stream)
Reinitialise parser.

ReInit

public void ReInit(CharStream stream,
                   int lexState)
Reinitialise parser.

SwitchTo

public void SwitchTo(int lexState)
Switch to specified lex state.

jjFillToken

protected Token jjFillToken()

getNextToken

public Token getNextToken()
Get the next Token.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Token

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.parser
Class Token

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.parser.Token

public class Token
extends Object

Describes the input token stream.

Field Summary
int | beginColumn The column number of the first character of this Token.
int | beginLine The line number of the first character of this Token.
int | endColumn The column number of the last character of this Token.
int | endLine The line number of the last character of this Token.
String | image The string image of the token.
int | kind An integer that describes the kind of this token.
Token | next A reference to the next regular (non-special) token from the input stream.
Token | specialToken This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token.
Constructor Summary
Token()
No-argument constructor
Token(int kind)
Constructs a new token for the specified Image.
Token(int kind, String image)
Constructs a new token for the specified Image and Kind.
Method Summary
Object | getValue() An optional attribute value of the Token.
static Token | newToken(int ofKind)
static Token | newToken(int ofKind, String image) Returns a new Token object, by default.
String | toString() Returns the image.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

kind

public int kind
An integer that describes the kind of this token. This numbering system is determined by JavaCCParser, and a table of these numbers is stored in the file ...Constants.java.

beginLine

public int beginLine
The line number of the first character of this Token.

beginColumn

public int beginColumn
The column number of the first character of this Token.

endLine

public int endLine
The line number of the last character of this Token.

endColumn

public int endColumn
The column number of the last character of this Token.

image

public String image
The string image of the token.

next

public Token next
A reference to the next regular (non-special) token from the input stream. If this is the last token from the input stream, or if the token manager has not read tokens beyond this one, this field is set to null. This is true only if this token is also a regular token. Otherwise, see below for a description of the contents of this field.

specialToken

public Token specialToken
This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token. If there are no such special tokens, this field is set to null. When there are more than one such special token, this field refers to the last of these special tokens, which in turn refers to the next previous special token through its specialToken field, and so on until the first special token (whose specialToken field is null). The next fields of special tokens refer to other special tokens that immediately follow it (without an intervening regular token). If there is no such token, this field is null.

Constructor Detail

Token

public Token()
No-argument constructor

Token

public Token(int kind)
Constructs a new token for the specified Image.

Token

public Token(int kind,
             String image)
Constructs a new token for the specified Image and Kind.

Method Detail

getValue

public Object getValue()
An optional attribute value of the Token. Tokens which are not used as syntactic sugar will often contain meaningful values that will be used later on by the compiler or interpreter. This attribute value is often different from the image. Any subclass of Token that actually wants to return a non-null value can override this method as appropriate.

toString

public String toString()
Returns the image.

Overrides:
toString in class Object

newToken

public static Token newToken(int ofKind,
                             String image)
Returns a new Token object, by default. However, if you want, you can create and return subclass objects based on the value of ofKind. Simply add the cases to the switch for all those special cases. For example, if you have a subclass of Token called IDToken that you want to create if ofKind is ID, simply add something like : case MyParserConstants.ID : return new IDToken(ofKind, image); to the following switch statement. Then you can cast matchedToken variable to the appropriate type and use sit in your lexical actions.

newToken

public static Token newToken(int ofKind)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TokenMgrError

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.parser
Class TokenMgrError

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Error
            extended by  org.apache.lucene.queryParser.surround.parser.TokenMgrError
All Implemented Interfaces:
Serializable
public class TokenMgrError
extends Error

Token Manager Error.

See Also:
Serialized Form

Constructor Summary
TokenMgrError()
No arg constructor.
TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason)
Full Constructor.
TokenMgrError(String message, int reason)
Constructor with message and reason.
Method Summary
protected static String | addEscapes(String str) Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string
String | getMessage() You can also modify the body of this method to customize your error messages.
protected static String | LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TokenMgrError

public TokenMgrError()
No arg constructor.

TokenMgrError

public TokenMgrError(String message,
                     int reason)
Constructor with message and reason.

TokenMgrError

public TokenMgrError(boolean EOFSeen,
                     int lexState,
                     int errorLine,
                     int errorColumn,
                     String errorAfter,
                     char curChar,
                     int reason)
Full Constructor.

Method Detail

addEscapes

protected static final String addEscapes(String str)
Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string

LexicalError

protected static String LexicalError(boolean EOFSeen,
                                     int lexState,
                                     int errorLine,
                                     int errorColumn,
                                     String errorAfter,
                                     char curChar)
Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error. Parameters : EOFSeen : indicates if EOF caused the lexical error curLexState : lexical state in which this error occurred errorLine : line number when the error occurred errorColumn : column number when the error occurred errorAfter : prefix that was seen before this error occurred curchar : the offending character Note: You can customize the lexical error message by modifying this method.

getMessage

public String getMessage()
You can also modify the body of this method to customize your error messages. For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not of end-users concern, so you can return something like : "Internal Error : Please file a bug report .... " from this method for such cases in the release version of your parser.

Overrides:
getMessage in class Throwable
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Interface org.apache.lucene.queryParser.surround.parser.CharStream

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.surround.parser.CharStream

Packages that use CharStream
org.apache.lucene.queryParser.surround.parser This package contains the QueryParser.jj source file for the Surround parser.

Uses of CharStream in org.apache.lucene.queryParser.surround.parser

Classes in org.apache.lucene.queryParser.surround.parser that implement CharStream
 class FastCharStream
An efficient implementation of JavaCC's CharStream interface.

Fields in org.apache.lucene.queryParser.surround.parser declared as CharStream
protected  CharStream QueryParserTokenManager.input_stream

Methods in org.apache.lucene.queryParser.surround.parser with parameters of type CharStream
void | QueryParserTokenManager.ReInit(CharStream stream) Reinitialise parser.
void | QueryParser.ReInit(CharStream stream) Reinitialise.
void | QueryParserTokenManager.ReInit(CharStream stream, int lexState) Reinitialise parser.

Constructors in org.apache.lucene.queryParser.surround.parser with parameters of type CharStream
QueryParser(CharStream stream)
Constructor with user supplied CharStream.
QueryParserTokenManager(CharStream stream)
Constructor.
QueryParserTokenManager(CharStream stream, int lexState)
Constructor.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.parser.FastCharStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.parser.FastCharStream

No usage of org.apache.lucene.queryParser.surround.parser.FastCharStream

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.parser.ParseException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.parser.ParseException

Packages that use ParseException
org.apache.lucene.queryParser.surround.parser This package contains the QueryParser.jj source file for the Surround parser.

Uses of ParseException in org.apache.lucene.queryParser.surround.parser

Methods in org.apache.lucene.queryParser.surround.parser that return ParseException
 ParseException QueryParser.generateParseException()
Generate ParseException.

Methods in org.apache.lucene.queryParser.surround.parser that throw ParseException
SrndQuery | QueryParser.AndQuery()
protected static void | QueryParser.checkDistanceSubQueries(DistanceQuery distq, String opName)
SrndQuery | QueryParser.FieldsQuery()
List<SrndQuery> | QueryParser.FieldsQueryList()
protected SrndQuery | QueryParser.getDistanceQuery(List<SrndQuery> queries, boolean infix, Token dToken, boolean ordered)
SrndQuery | QueryParser.NotQuery()
SrndQuery | QueryParser.NQuery()
ArrayList<String> | QueryParser.OptionalFields()
void | QueryParser.OptionalWeights(SrndQuery q)
SrndQuery | QueryParser.OrQuery()
static SrndQuery | QueryParser.parse(String query)
SrndQuery | QueryParser.parse2(String query)
SrndQuery | QueryParser.PrefixOperatorQuery()
SrndQuery | QueryParser.PrimaryQuery()
SrndQuery | QueryParser.SimpleTerm()
SrndQuery | QueryParser.TopSrndQuery()
SrndQuery | QueryParser.WQuery()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.parser.QueryParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.parser.QueryParser

No usage of org.apache.lucene.queryParser.surround.parser.QueryParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.surround.parser.QueryParserConstants

Packages that use QueryParserConstants
org.apache.lucene.queryParser.surround.parser This package contains the QueryParser.jj source file for the Surround parser.

Uses of QueryParserConstants in org.apache.lucene.queryParser.surround.parser

Classes in org.apache.lucene.queryParser.surround.parser that implement QueryParserConstants
class | QueryParser This class is generated by JavaCC.
class | QueryParserTokenManager Token Manager.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.parser.QueryParserTokenManager

Packages that use QueryParserTokenManager
org.apache.lucene.queryParser.surround.parser This package contains the QueryParser.jj source file for the Surround parser.

Uses of QueryParserTokenManager in org.apache.lucene.queryParser.surround.parser

Fields in org.apache.lucene.queryParser.surround.parser declared as QueryParserTokenManager
 QueryParserTokenManager QueryParser.token_source
Generated Token Manager.

Methods in org.apache.lucene.queryParser.surround.parser with parameters of type QueryParserTokenManager
 void QueryParser.ReInit(QueryParserTokenManager tm)
Reinitialise.

Constructors in org.apache.lucene.queryParser.surround.parser with parameters of type QueryParserTokenManager
QueryParser(QueryParserTokenManager tm)
Constructor with generated Token Manager.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.parser.Token

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.parser.Token

Packages that use Token
org.apache.lucene.queryParser.surround.parser This package contains the QueryParser.jj source file for the Surround parser.

Uses of Token in org.apache.lucene.queryParser.surround.parser

Fields in org.apache.lucene.queryParser.surround.parser declared as Token
Token | ParseException.currentToken This is the last token that has been consumed successfully.
Token | QueryParser.jj_nt Next token.
Token | Token.next A reference to the next regular (non-special) token from the input stream.
Token | Token.specialToken This field is used to access special tokens that occur prior to this token, but after the immediately preceding regular (non-special) token.
Token | QueryParser.token Current token.

Methods in org.apache.lucene.queryParser.surround.parser that return Token
Token | QueryParserTokenManager.getNextToken() Get the next Token.
Token | QueryParser.getNextToken() Get the next Token.
Token | QueryParser.getToken(int index) Get the specific Token.
protected Token | QueryParserTokenManager.jjFillToken()
static Token | Token.newToken(int ofKind)
static Token | Token.newToken(int ofKind, String image) Returns a new Token object, by default.

Methods in org.apache.lucene.queryParser.surround.parser with parameters of type Token
protected SrndQuery | QueryParser.getAndQuery(List<SrndQuery> queries, boolean infix, Token andToken)
protected SrndQuery | QueryParser.getDistanceQuery(List<SrndQuery> queries, boolean infix, Token dToken, boolean ordered)
protected SrndQuery | QueryParser.getNotQuery(List<SrndQuery> queries, Token notToken)
protected SrndQuery | QueryParser.getOrQuery(List<SrndQuery> queries, boolean infix, Token orToken)

Constructors in org.apache.lucene.queryParser.surround.parser with parameters of type Token
ParseException(Token currentTokenVal, int[][] expectedTokenSequencesVal, String[] tokenImageVal)
This constructor is used by the method "generateParseException" in the generated parser.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.parser.TokenMgrError

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.parser.TokenMgrError

No usage of org.apache.lucene.queryParser.surround.parser.TokenMgrError

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AndQuery

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Class AndQuery

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.query.SrndQuery
        extended by  org.apache.lucene.queryParser.surround.query.ComposedQuery
            extended by  org.apache.lucene.queryParser.surround.query.AndQuery
All Implemented Interfaces:
Cloneable
public class AndQuery
extends ComposedQuery

Field Summary
Fields inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
theEmptyLcnQuery
Constructor Summary
AndQuery(List<SrndQuery> queries, boolean inf, String opName)
Method Summary
 Query makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Methods inherited from class org.apache.lucene.queryParser.surround.query.ComposedQuery
getBracketClose, getBracketOpen, getNrSubQueries, getOperatorName, getPrefixSeparator, getSubQueriesIterator, getSubQuery, infixToString, isFieldsSubQueryAcceptable, isOperatorInfix, makeLuceneSubQueriesField, prefixToString, recompose, toString
Methods inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
clone, getWeight, getWeightOperator, getWeightString, isWeighted, makeLuceneQueryField, setWeight, weightToString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AndQuery

public AndQuery(List<SrndQuery> queries,
                boolean inf,
                String opName)
Method Detail

makeLuceneQueryFieldNoBoost

public Query makeLuceneQueryFieldNoBoost(String fieldName,
                                         BasicQueryFactory qf)
Specified by:
makeLuceneQueryFieldNoBoost in class SrndQuery
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BasicQueryFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Class BasicQueryFactory

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.query.BasicQueryFactory

public class BasicQueryFactory
extends Object

Constructor Summary
BasicQueryFactory()
BasicQueryFactory(int maxBasicQueries)
Method Summary
int | getMaxBasicQueries()
int | getNrQueriesMade()
SpanTermQuery | newSpanTermQuery(Term term)
TermQuery | newTermQuery(Term term)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasicQueryFactory

public BasicQueryFactory(int maxBasicQueries)

BasicQueryFactory

public BasicQueryFactory()
Method Detail

getNrQueriesMade

public int getNrQueriesMade()

getMaxBasicQueries

public int getMaxBasicQueries()

newTermQuery

public TermQuery newTermQuery(Term term)
                       throws TooManyBasicQueries
Throws:
TooManyBasicQueries

newSpanTermQuery

public SpanTermQuery newSpanTermQuery(Term term)
                               throws TooManyBasicQueries
Throws:
TooManyBasicQueries
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComposedQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Class ComposedQuery

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.query.SrndQuery
        extended by  org.apache.lucene.queryParser.surround.query.ComposedQuery
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
AndQuery, DistanceQuery, NotQuery, OrQuery
public abstract class ComposedQuery
extends SrndQuery

Field Summary
Fields inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
theEmptyLcnQuery
Constructor Summary
ComposedQuery(List qs, boolean operatorInfix, String opName)
Method Summary
protected String | getBracketClose()
protected String | getBracketOpen()
int | getNrSubQueries()
String | getOperatorName()
protected String | getPrefixSeparator()
Iterator | getSubQueriesIterator()
SrndQuery | getSubQuery(int qn)
protected void | infixToString(StringBuilder r)
boolean | isFieldsSubQueryAcceptable()
boolean | isOperatorInfix()
List<Query> | makeLuceneSubQueriesField(String fn, BasicQueryFactory qf)
protected void | prefixToString(StringBuilder r)
protected void | recompose(List queries)
String | toString()
Methods inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
clone, getWeight, getWeightOperator, getWeightString, isWeighted, makeLuceneQueryField, makeLuceneQueryFieldNoBoost, setWeight, weightToString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ComposedQuery

public ComposedQuery(List qs,
                     boolean operatorInfix,
                     String opName)
Method Detail

recompose

protected void recompose(List queries)

getOperatorName

public String getOperatorName()

getSubQueriesIterator

public Iterator getSubQueriesIterator()

getNrSubQueries

public int getNrSubQueries()

getSubQuery

public SrndQuery getSubQuery(int qn)

isOperatorInfix

public boolean isOperatorInfix()

makeLuceneSubQueriesField

public List<Query> makeLuceneSubQueriesField(String fn,
                                             BasicQueryFactory qf)

toString

public String toString()
Specified by:
toString in class SrndQuery

getPrefixSeparator

protected String getPrefixSeparator()

getBracketOpen

protected String getBracketOpen()

getBracketClose

protected String getBracketClose()

infixToString

protected void infixToString(StringBuilder r)

prefixToString

protected void prefixToString(StringBuilder r)

isFieldsSubQueryAcceptable

public boolean isFieldsSubQueryAcceptable()
Overrides:
isFieldsSubQueryAcceptable in class SrndQuery
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DistanceQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Class DistanceQuery

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.query.SrndQuery
        extended by  org.apache.lucene.queryParser.surround.query.ComposedQuery
            extended by  org.apache.lucene.queryParser.surround.query.DistanceQuery
All Implemented Interfaces:
Cloneable, DistanceSubQuery
public class DistanceQuery
extends ComposedQuery
implements DistanceSubQuery

Field Summary
Fields inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
theEmptyLcnQuery
Constructor Summary
DistanceQuery(List<SrndQuery> queries, boolean infix, int opDistance, String opName, boolean ordered)
Method Summary
 void addSpanQueries(SpanNearClauseFactory sncf)
 String distanceSubQueryNotAllowed()
When distanceSubQueryNotAllowed() returns non null, the reason why the subquery is not allowed as a distance subquery is returned.
 int getOpDistance()
 Query getSpanNearQuery(IndexReader reader, String fieldName, float boost, BasicQueryFactory qf)
 Query makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
 boolean subQueriesOrdered()
Methods inherited from class org.apache.lucene.queryParser.surround.query.ComposedQuery
getBracketClose, getBracketOpen, getNrSubQueries, getOperatorName, getPrefixSeparator, getSubQueriesIterator, getSubQuery, infixToString, isFieldsSubQueryAcceptable, isOperatorInfix, makeLuceneSubQueriesField, prefixToString, recompose, toString
Methods inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
clone, getWeight, getWeightOperator, getWeightString, isWeighted, makeLuceneQueryField, setWeight, weightToString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DistanceQuery

public DistanceQuery(List<SrndQuery> queries,
                     boolean infix,
                     int opDistance,
                     String opName,
                     boolean ordered)
Method Detail

getOpDistance

public int getOpDistance()

subQueriesOrdered

public boolean subQueriesOrdered()

distanceSubQueryNotAllowed

public String distanceSubQueryNotAllowed()
Description copied from interface: DistanceSubQuery
When distanceSubQueryNotAllowed() returns non null, the reason why the subquery is not allowed as a distance subquery is returned.
When distanceSubQueryNotAllowed() returns null addSpanNearQueries() can be used in the creation of the span near clause for the subquery.

Specified by:
distanceSubQueryNotAllowed in interface DistanceSubQuery

addSpanQueries

public void addSpanQueries(SpanNearClauseFactory sncf)
                    throws IOException
Specified by:
addSpanQueries in interface DistanceSubQuery
Throws:
IOException

makeLuceneQueryFieldNoBoost

public Query makeLuceneQueryFieldNoBoost(String fieldName,
                                         BasicQueryFactory qf)
Specified by:
makeLuceneQueryFieldNoBoost in class SrndQuery

getSpanNearQuery

public Query getSpanNearQuery(IndexReader reader,
                              String fieldName,
                              float boost,
                              BasicQueryFactory qf)
                       throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DistanceSubQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Interface DistanceSubQuery

All Known Implementing Classes:
DistanceQuery, OrQuery, SimpleTerm, SrndPrefixQuery, SrndTermQuery, SrndTruncQuery
public interface DistanceSubQuery

Method Summary
 void addSpanQueries(SpanNearClauseFactory sncf)
 String distanceSubQueryNotAllowed()
When distanceSubQueryNotAllowed() returns non null, the reason why the subquery is not allowed as a distance subquery is returned.

Method Detail

distanceSubQueryNotAllowed

String distanceSubQueryNotAllowed()
When distanceSubQueryNotAllowed() returns non null, the reason why the subquery is not allowed as a distance subquery is returned.
When distanceSubQueryNotAllowed() returns null addSpanNearQueries() can be used in the creation of the span near clause for the subquery.

addSpanQueries

void addSpanQueries(SpanNearClauseFactory sncf)
                    throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldsQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Class FieldsQuery

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.query.SrndQuery
        extended by  org.apache.lucene.queryParser.surround.query.FieldsQuery
All Implemented Interfaces:
Cloneable
public class FieldsQuery
extends SrndQuery

Field Summary
Fields inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
theEmptyLcnQuery
Constructor Summary
FieldsQuery(SrndQuery q, List<String> fieldNames, char fieldOp)
FieldsQuery(SrndQuery q, String fieldName, char fieldOp)
Method Summary
protected void | fieldNamesToString(StringBuilder r)
List<String> | getFieldNames()
char | getFieldOperator()
boolean | isFieldsSubQueryAcceptable()
Query | makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Query | makeLuceneQueryNoBoost(BasicQueryFactory qf)
String | toString()
Methods inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
clone, getWeight, getWeightOperator, getWeightString, isWeighted, makeLuceneQueryField, setWeight, weightToString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FieldsQuery

public FieldsQuery(SrndQuery q,
                   List<String> fieldNames,
                   char fieldOp)

FieldsQuery

public FieldsQuery(SrndQuery q,
                   String fieldName,
                   char fieldOp)
Method Detail

isFieldsSubQueryAcceptable

public boolean isFieldsSubQueryAcceptable()
Overrides:
isFieldsSubQueryAcceptable in class SrndQuery

makeLuceneQueryNoBoost

public Query makeLuceneQueryNoBoost(BasicQueryFactory qf)

makeLuceneQueryFieldNoBoost

public Query makeLuceneQueryFieldNoBoost(String fieldName,
                                         BasicQueryFactory qf)
Specified by:
makeLuceneQueryFieldNoBoost in class SrndQuery

getFieldNames

public List<String> getFieldNames()

getFieldOperator

public char getFieldOperator()

toString

public String toString()
Specified by:
toString in class SrndQuery

fieldNamesToString

protected void fieldNamesToString(StringBuilder r)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NotQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Class NotQuery

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.query.SrndQuery
        extended by  org.apache.lucene.queryParser.surround.query.ComposedQuery
            extended by  org.apache.lucene.queryParser.surround.query.NotQuery
All Implemented Interfaces:
Cloneable
public class NotQuery
extends ComposedQuery

Field Summary
Fields inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
theEmptyLcnQuery
Constructor Summary
NotQuery(List<SrndQuery> queries, String opName)
Method Summary
 Query makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Methods inherited from class org.apache.lucene.queryParser.surround.query.ComposedQuery
getBracketClose, getBracketOpen, getNrSubQueries, getOperatorName, getPrefixSeparator, getSubQueriesIterator, getSubQuery, infixToString, isFieldsSubQueryAcceptable, isOperatorInfix, makeLuceneSubQueriesField, prefixToString, recompose, toString
Methods inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
clone, getWeight, getWeightOperator, getWeightString, isWeighted, makeLuceneQueryField, setWeight, weightToString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NotQuery

public NotQuery(List<SrndQuery> queries,
                String opName)
Method Detail

makeLuceneQueryFieldNoBoost

public Query makeLuceneQueryFieldNoBoost(String fieldName,
                                         BasicQueryFactory qf)
Specified by:
makeLuceneQueryFieldNoBoost in class SrndQuery
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OrQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Class OrQuery

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.query.SrndQuery
        extended by  org.apache.lucene.queryParser.surround.query.ComposedQuery
            extended by  org.apache.lucene.queryParser.surround.query.OrQuery
All Implemented Interfaces:
Cloneable, DistanceSubQuery
public class OrQuery
extends ComposedQuery
implements DistanceSubQuery

Field Summary
Fields inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
theEmptyLcnQuery
Constructor Summary
OrQuery(List<SrndQuery> queries, boolean infix, String opName)
Method Summary
 void addSpanQueries(SpanNearClauseFactory sncf)
 String distanceSubQueryNotAllowed()
When distanceSubQueryNotAllowed() returns non null, the reason why the subquery is not allowed as a distance subquery is returned.
 Query makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Methods inherited from class org.apache.lucene.queryParser.surround.query.ComposedQuery
getBracketClose, getBracketOpen, getNrSubQueries, getOperatorName, getPrefixSeparator, getSubQueriesIterator, getSubQuery, infixToString, isFieldsSubQueryAcceptable, isOperatorInfix, makeLuceneSubQueriesField, prefixToString, recompose, toString
Methods inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
clone, getWeight, getWeightOperator, getWeightString, isWeighted, makeLuceneQueryField, setWeight, weightToString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

OrQuery

public OrQuery(List<SrndQuery> queries,
               boolean infix,
               String opName)
Method Detail

makeLuceneQueryFieldNoBoost

public Query makeLuceneQueryFieldNoBoost(String fieldName,
                                         BasicQueryFactory qf)
Specified by:
makeLuceneQueryFieldNoBoost in class SrndQuery

distanceSubQueryNotAllowed

public String distanceSubQueryNotAllowed()
Description copied from interface: DistanceSubQuery
When distanceSubQueryNotAllowed() returns non null, the reason why the subquery is not allowed as a distance subquery is returned.
When distanceSubQueryNotAllowed() returns null addSpanNearQueries() can be used in the creation of the span near clause for the subquery.

Specified by:
distanceSubQueryNotAllowed in interface DistanceSubQuery

addSpanQueries

public void addSpanQueries(SpanNearClauseFactory sncf)
                    throws IOException
Specified by:
addSpanQueries in interface DistanceSubQuery
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.queryParser.surround.query
Interfaces
DistanceSubQuery
SimpleTerm.MatchingTermVisitor
Classes
AndQuery
BasicQueryFactory
ComposedQuery
DistanceQuery
FieldsQuery
NotQuery
OrQuery
SimpleTerm
SpanNearClauseFactory
SrndPrefixQuery
SrndQuery
SrndTermQuery
SrndTruncQuery
Exceptions
TooManyBasicQueries


org.apache.lucene.queryParser.surround.query

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.queryParser.surround.query

This package contains SrndQuery and its subclasses.

See:
Description

Interface Summary
DistanceSubQuery
SimpleTerm.MatchingTermVisitor

Class Summary
AndQuery
BasicQueryFactory
ComposedQuery
DistanceQuery
FieldsQuery
NotQuery
OrQuery
SimpleTerm
SpanNearClauseFactory
SrndPrefixQuery
SrndQuery
SrndTermQuery
SrndTruncQuery

Exception Summary
TooManyBasicQueries

Package org.apache.lucene.queryParser.surround.query Description

This package contains SrndQuery and its subclasses.

The parser in the org.apache.lucene.queryParser.surround.parser package normally generates a SrndQuery.

For searching an org.apache.lucene.search.Query is provided by the SrndQuery.makeLuceneQueryField method. For this, TermQuery, BooleanQuery and SpanQuery are used from Lucene.


org.apache.lucene.queryParser.surround.query Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.queryParser.surround.query

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.queryParser.surround.query.BasicQueryFactory
    • org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory
    • org.apache.lucene.queryParser.surround.query.SrndQuery (implements java.lang.Cloneable)
      • org.apache.lucene.queryParser.surround.query.ComposedQuery
        • org.apache.lucene.queryParser.surround.query.AndQuery
        • org.apache.lucene.queryParser.surround.query.DistanceQuery (implements org.apache.lucene.queryParser.surround.query.DistanceSubQuery)
        • org.apache.lucene.queryParser.surround.query.NotQuery
        • org.apache.lucene.queryParser.surround.query.OrQuery (implements org.apache.lucene.queryParser.surround.query.DistanceSubQuery)
      • org.apache.lucene.queryParser.surround.query.FieldsQuery
      • org.apache.lucene.queryParser.surround.query.SimpleTerm (implements java.lang.Comparable<T>, org.apache.lucene.queryParser.surround.query.DistanceSubQuery)
        • org.apache.lucene.queryParser.surround.query.SrndPrefixQuery
        • org.apache.lucene.queryParser.surround.query.SrndTermQuery
        • org.apache.lucene.queryParser.surround.query.SrndTruncQuery
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.io.IOException
          • org.apache.lucene.queryParser.surround.query.TooManyBasicQueries

Interface Hierarchy

  • org.apache.lucene.queryParser.surround.query.DistanceSubQuery
  • org.apache.lucene.queryParser.surround.query.SimpleTerm.MatchingTermVisitor


Uses of Package org.apache.lucene.queryParser.surround.query

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.queryParser.surround.query

Packages that use org.apache.lucene.queryParser.surround.query
org.apache.lucene.queryParser.surround.parser | This package contains the QueryParser.jj source file for the Surround parser.
org.apache.lucene.queryParser.surround.query | This package contains SrndQuery and its subclasses.

Classes in org.apache.lucene.queryParser.surround.query used by org.apache.lucene.queryParser.surround.parser
DistanceQuery
SrndQuery

Classes in org.apache.lucene.queryParser.surround.query used by org.apache.lucene.queryParser.surround.query
BasicQueryFactory
ComposedQuery
DistanceSubQuery
SimpleTerm
SimpleTerm.MatchingTermVisitor
SpanNearClauseFactory
SrndQuery
TooManyBasicQueries

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SimpleTerm

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Class SimpleTerm

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.query.SrndQuery
        extended by  org.apache.lucene.queryParser.surround.query.SimpleTerm
All Implemented Interfaces:
Cloneable, Comparable<SimpleTerm>, DistanceSubQuery
Direct Known Subclasses:
SrndPrefixQuery, SrndTermQuery, SrndTruncQuery
public abstract class SimpleTerm
extends SrndQuery
implements DistanceSubQuery, Comparable<SimpleTerm>

Nested Class Summary
static interface SimpleTerm.MatchingTermVisitor
Field Summary
Fields inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
theEmptyLcnQuery
Constructor Summary
SimpleTerm(boolean q)
Method Summary
 void addSpanQueries(SpanNearClauseFactory sncf)
 int compareTo(SimpleTerm ost)
 String distanceSubQueryNotAllowed()
When distanceSubQueryNotAllowed() returns non null, the reason why the subquery is not allowed as a distance subquery is returned.
 String getFieldOperator()
 String getQuote()
 Query makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
protected  void suffixToString(StringBuilder r)
 String toString()
abstract  String toStringUnquoted()
abstract  void visitMatchingTerms(IndexReader reader, String fieldName, SimpleTerm.MatchingTermVisitor mtv)
Methods inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
clone, getWeight, getWeightOperator, getWeightString, isFieldsSubQueryAcceptable, isWeighted, makeLuceneQueryField, setWeight, weightToString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SimpleTerm

public SimpleTerm(boolean q)
Method Detail

getQuote

public String getQuote()

getFieldOperator

public String getFieldOperator()

toStringUnquoted

public abstract String toStringUnquoted()

compareTo

public int compareTo(SimpleTerm ost)
Specified by:
compareTo in interface Comparable<SimpleTerm>

suffixToString

protected void suffixToString(StringBuilder r)

toString

public String toString()
Specified by:
toString in class SrndQuery

visitMatchingTerms

public abstract void visitMatchingTerms(IndexReader reader,
                                        String fieldName,
                                        SimpleTerm.MatchingTermVisitor mtv)
                                 throws IOException
Throws:
IOException

distanceSubQueryNotAllowed

public String distanceSubQueryNotAllowed()
Description copied from interface: DistanceSubQuery
When distanceSubQueryNotAllowed() returns non null, the reason why the subquery is not allowed as a distance subquery is returned.
When distanceSubQueryNotAllowed() returns null addSpanNearQueries() can be used in the creation of the span near clause for the subquery.

Specified by:
distanceSubQueryNotAllowed in interface DistanceSubQuery

makeLuceneQueryFieldNoBoost

public Query makeLuceneQueryFieldNoBoost(String fieldName,
                                         BasicQueryFactory qf)
Specified by:
makeLuceneQueryFieldNoBoost in class SrndQuery

addSpanQueries

public void addSpanQueries(SpanNearClauseFactory sncf)
                    throws IOException
Specified by:
addSpanQueries in interface DistanceSubQuery
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleTerm.MatchingTermVisitor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Interface SimpleTerm.MatchingTermVisitor

Enclosing class:
SimpleTerm
public static interface SimpleTerm.MatchingTermVisitor

Method Summary
 void visitMatchingTerm(Term t)

Method Detail

visitMatchingTerm

void visitMatchingTerm(Term t)
                       throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanNearClauseFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Class SpanNearClauseFactory

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory

public class SpanNearClauseFactory
extends Object

Constructor Summary
SpanNearClauseFactory(IndexReader reader, String fieldName, BasicQueryFactory qf)
Method Summary
void | addSpanNearQuery(Query q)
protected void | addSpanQueryWeighted(SpanQuery sq, float weight)
void | addTermWeighted(Term t, float weight)
void | clear()
BasicQueryFactory | getBasicQueryFactory()
String | getFieldName()
IndexReader | getIndexReader()
TermEnum | getTermEnum(String termText)
SpanQuery | makeSpanNearClause()
int | size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanNearClauseFactory

public SpanNearClauseFactory(IndexReader reader,
                             String fieldName,
                             BasicQueryFactory qf)
Method Detail

getIndexReader

public IndexReader getIndexReader()

getFieldName

public String getFieldName()

getBasicQueryFactory

public BasicQueryFactory getBasicQueryFactory()

getTermEnum

public TermEnum getTermEnum(String termText)
                     throws IOException
Throws:
IOException

size

public int size()

clear

public void clear()

addSpanQueryWeighted

protected void addSpanQueryWeighted(SpanQuery sq,
                                    float weight)

addTermWeighted

public void addTermWeighted(Term t,
                            float weight)
                     throws IOException
Throws:
IOException

addSpanNearQuery

public void addSpanNearQuery(Query q)

makeSpanNearClause

public SpanQuery makeSpanNearClause()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SrndPrefixQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Class SrndPrefixQuery

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.query.SrndQuery
        extended by  org.apache.lucene.queryParser.surround.query.SimpleTerm
            extended by  org.apache.lucene.queryParser.surround.query.SrndPrefixQuery
All Implemented Interfaces:
Cloneable, Comparable<SimpleTerm>, DistanceSubQuery
public class SrndPrefixQuery
extends SimpleTerm

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.queryParser.surround.query.SimpleTerm
SimpleTerm.MatchingTermVisitor
Field Summary
Fields inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
theEmptyLcnQuery
Constructor Summary
SrndPrefixQuery(String prefix, boolean quoted, char truncator)
Method Summary
Term | getLucenePrefixTerm(String fieldName)
String | getPrefix()
char | getSuffixOperator()
protected void | suffixToString(StringBuilder r)
String | toStringUnquoted()
void | visitMatchingTerms(IndexReader reader, String fieldName, SimpleTerm.MatchingTermVisitor mtv)
Methods inherited from class org.apache.lucene.queryParser.surround.query.SimpleTerm
addSpanQueries, compareTo, distanceSubQueryNotAllowed, getFieldOperator, getQuote, makeLuceneQueryFieldNoBoost, toString
Methods inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
clone, getWeight, getWeightOperator, getWeightString, isFieldsSubQueryAcceptable, isWeighted, makeLuceneQueryField, setWeight, weightToString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SrndPrefixQuery

public SrndPrefixQuery(String prefix,
                       boolean quoted,
                       char truncator)
Method Detail

getPrefix

public String getPrefix()

getSuffixOperator

public char getSuffixOperator()

getLucenePrefixTerm

public Term getLucenePrefixTerm(String fieldName)

toStringUnquoted

public String toStringUnquoted()
Specified by:
toStringUnquoted in class SimpleTerm

suffixToString

protected void suffixToString(StringBuilder r)
Overrides:
suffixToString in class SimpleTerm

visitMatchingTerms

public void visitMatchingTerms(IndexReader reader,
                               String fieldName,
                               SimpleTerm.MatchingTermVisitor mtv)
                        throws IOException
Specified by:
visitMatchingTerms in class SimpleTerm
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SrndQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Class SrndQuery

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.query.SrndQuery
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ComposedQuery, FieldsQuery, SimpleTerm
public abstract class SrndQuery
extends Object
implements Cloneable

Field Summary
static Query theEmptyLcnQuery
Constructor Summary
SrndQuery()
Method Summary
Object | clone()
float | getWeight()
String | getWeightOperator()
String | getWeightString()
boolean | isFieldsSubQueryAcceptable()
boolean | isWeighted()
Query | makeLuceneQueryField(String fieldName, BasicQueryFactory qf)
abstract Query | makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
void | setWeight(float w)
abstract String | toString()
protected void | weightToString(StringBuilder r)
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

theEmptyLcnQuery

public static final Query theEmptyLcnQuery
Constructor Detail

SrndQuery

public SrndQuery()
Method Detail

setWeight

public void setWeight(float w)

isWeighted

public boolean isWeighted()

getWeight

public float getWeight()

getWeightString

public String getWeightString()

getWeightOperator

public String getWeightOperator()

weightToString

protected void weightToString(StringBuilder r)

makeLuceneQueryField

public Query makeLuceneQueryField(String fieldName,
                                  BasicQueryFactory qf)

makeLuceneQueryFieldNoBoost

public abstract Query makeLuceneQueryFieldNoBoost(String fieldName,
                                                  BasicQueryFactory qf)

toString

public abstract String toString()
Overrides:
toString in class Object

isFieldsSubQueryAcceptable

public boolean isFieldsSubQueryAcceptable()

clone

public Object clone()
Overrides:
clone in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SrndTermQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Class SrndTermQuery

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.query.SrndQuery
        extended by  org.apache.lucene.queryParser.surround.query.SimpleTerm
            extended by  org.apache.lucene.queryParser.surround.query.SrndTermQuery
All Implemented Interfaces:
Cloneable, Comparable<SimpleTerm>, DistanceSubQuery
public class SrndTermQuery
extends SimpleTerm

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.queryParser.surround.query.SimpleTerm
SimpleTerm.MatchingTermVisitor
Field Summary
Fields inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
theEmptyLcnQuery
Constructor Summary
SrndTermQuery(String termText, boolean quoted)
Method Summary
Term | getLuceneTerm(String fieldName)
String | getTermText()
String | toStringUnquoted()
void | visitMatchingTerms(IndexReader reader, String fieldName, SimpleTerm.MatchingTermVisitor mtv)
Methods inherited from class org.apache.lucene.queryParser.surround.query.SimpleTerm
addSpanQueries, compareTo, distanceSubQueryNotAllowed, getFieldOperator, getQuote, makeLuceneQueryFieldNoBoost, suffixToString, toString
Methods inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
clone, getWeight, getWeightOperator, getWeightString, isFieldsSubQueryAcceptable, isWeighted, makeLuceneQueryField, setWeight, weightToString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SrndTermQuery

public SrndTermQuery(String termText,
                     boolean quoted)
Method Detail

getTermText

public String getTermText()

getLuceneTerm

public Term getLuceneTerm(String fieldName)

toStringUnquoted

public String toStringUnquoted()
Specified by:
toStringUnquoted in class SimpleTerm

visitMatchingTerms

public void visitMatchingTerms(IndexReader reader,
                               String fieldName,
                               SimpleTerm.MatchingTermVisitor mtv)
                        throws IOException
Specified by:
visitMatchingTerms in class SimpleTerm
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SrndTruncQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Class SrndTruncQuery

java.lang.Object
    extended by  org.apache.lucene.queryParser.surround.query.SrndQuery
        extended by  org.apache.lucene.queryParser.surround.query.SimpleTerm
            extended by  org.apache.lucene.queryParser.surround.query.SrndTruncQuery
All Implemented Interfaces:
Cloneable, Comparable<SimpleTerm>, DistanceSubQuery
public class SrndTruncQuery
extends SimpleTerm

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.queryParser.surround.query.SimpleTerm
SimpleTerm.MatchingTermVisitor
Field Summary
Fields inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
theEmptyLcnQuery
Constructor Summary
SrndTruncQuery(String truncated, char unlimited, char mask)
Method Summary
protected void | appendRegExpForChar(char c, StringBuilder re)
String | getTruncated()
protected boolean | matchingChar(char c)
String | toStringUnquoted()
protected void | truncatedToPrefixAndPattern()
void | visitMatchingTerms(IndexReader reader, String fieldName, SimpleTerm.MatchingTermVisitor mtv)
Methods inherited from class org.apache.lucene.queryParser.surround.query.SimpleTerm
addSpanQueries, compareTo, distanceSubQueryNotAllowed, getFieldOperator, getQuote, makeLuceneQueryFieldNoBoost, suffixToString, toString
Methods inherited from class org.apache.lucene.queryParser.surround.query.SrndQuery
clone, getWeight, getWeightOperator, getWeightString, isFieldsSubQueryAcceptable, isWeighted, makeLuceneQueryField, setWeight, weightToString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SrndTruncQuery

public SrndTruncQuery(String truncated,
                      char unlimited,
                      char mask)
Method Detail

getTruncated

public String getTruncated()

toStringUnquoted

public String toStringUnquoted()
Specified by:
toStringUnquoted in class SimpleTerm

matchingChar

protected boolean matchingChar(char c)

appendRegExpForChar

protected void appendRegExpForChar(char c,
                                   StringBuilder re)

truncatedToPrefixAndPattern

protected void truncatedToPrefixAndPattern()

visitMatchingTerms

public void visitMatchingTerms(IndexReader reader,
                               String fieldName,
                               SimpleTerm.MatchingTermVisitor mtv)
                        throws IOException
Specified by:
visitMatchingTerms in class SimpleTerm
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TooManyBasicQueries

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.queryParser.surround.query
Class TooManyBasicQueries

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.io.IOException
                extended by  org.apache.lucene.queryParser.surround.query.TooManyBasicQueries
All Implemented Interfaces:
Serializable
public class TooManyBasicQueries
extends IOException

See Also:
Serialized Form

Constructor Summary
TooManyBasicQueries(int maxBasicQueries)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TooManyBasicQueries

public TooManyBasicQueries(int maxBasicQueries)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.queryParser.surround.query.AndQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.query.AndQuery

No usage of org.apache.lucene.queryParser.surround.query.AndQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.query.BasicQueryFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.query.BasicQueryFactory

Packages that use BasicQueryFactory
org.apache.lucene.queryParser.surround.query This package contains SrndQuery and its subclasses.

Uses of BasicQueryFactory in org.apache.lucene.queryParser.surround.query

Methods in org.apache.lucene.queryParser.surround.query that return BasicQueryFactory
 BasicQueryFactory SpanNearClauseFactory.getBasicQueryFactory()

Methods in org.apache.lucene.queryParser.surround.query with parameters of type BasicQueryFactory
Query | DistanceQuery.getSpanNearQuery(IndexReader reader, String fieldName, float boost, BasicQueryFactory qf)
Query | SrndQuery.makeLuceneQueryField(String fieldName, BasicQueryFactory qf)
Query | NotQuery.makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Query | OrQuery.makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
abstract Query | SrndQuery.makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Query | SimpleTerm.makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Query | FieldsQuery.makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Query | AndQuery.makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Query | DistanceQuery.makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Query | FieldsQuery.makeLuceneQueryNoBoost(BasicQueryFactory qf)
List<Query> | ComposedQuery.makeLuceneSubQueriesField(String fn, BasicQueryFactory qf)

Constructors in org.apache.lucene.queryParser.surround.query with parameters of type BasicQueryFactory
SpanNearClauseFactory(IndexReader reader, String fieldName, BasicQueryFactory qf)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.query.ComposedQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.query.ComposedQuery

Packages that use ComposedQuery
org.apache.lucene.queryParser.surround.query This package contains SrndQuery and its subclasses.

Uses of ComposedQuery in org.apache.lucene.queryParser.surround.query

Subclasses of ComposedQuery in org.apache.lucene.queryParser.surround.query
class | AndQuery
class | DistanceQuery
class | NotQuery
class | OrQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.query.DistanceQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.query.DistanceQuery

Packages that use DistanceQuery
org.apache.lucene.queryParser.surround.parser This package contains the QueryParser.jj source file for the Surround parser.

Uses of DistanceQuery in org.apache.lucene.queryParser.surround.parser

Methods in org.apache.lucene.queryParser.surround.parser with parameters of type DistanceQuery
protected static void QueryParser.checkDistanceSubQueries(DistanceQuery distq, String opName)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.surround.query.DistanceSubQuery

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.surround.query.DistanceSubQuery

Packages that use DistanceSubQuery
org.apache.lucene.queryParser.surround.query This package contains SrndQuery and its subclasses.

Uses of DistanceSubQuery in org.apache.lucene.queryParser.surround.query

Classes in org.apache.lucene.queryParser.surround.query that implement DistanceSubQuery
class | DistanceQuery
class | OrQuery
class | SimpleTerm
class | SrndPrefixQuery
class | SrndTermQuery
class | SrndTruncQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.query.FieldsQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.query.FieldsQuery

No usage of org.apache.lucene.queryParser.surround.query.FieldsQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.query.NotQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.query.NotQuery

No usage of org.apache.lucene.queryParser.surround.query.NotQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.query.OrQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.query.OrQuery

No usage of org.apache.lucene.queryParser.surround.query.OrQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.query.SimpleTerm

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.query.SimpleTerm

Packages that use SimpleTerm
org.apache.lucene.queryParser.surround.query This package contains SrndQuery and its subclasses.

Uses of SimpleTerm in org.apache.lucene.queryParser.surround.query

Subclasses of SimpleTerm in org.apache.lucene.queryParser.surround.query
class | SrndPrefixQuery
class | SrndTermQuery
class | SrndTruncQuery

Methods in org.apache.lucene.queryParser.surround.query with parameters of type SimpleTerm
 int SimpleTerm.compareTo(SimpleTerm ost)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.queryParser.surround.query.SimpleTerm.MatchingTermVisitor

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.queryParser.surround.query.SimpleTerm.MatchingTermVisitor

Packages that use SimpleTerm.MatchingTermVisitor
org.apache.lucene.queryParser.surround.query This package contains SrndQuery and its subclasses.

Uses of SimpleTerm.MatchingTermVisitor in org.apache.lucene.queryParser.surround.query

Methods in org.apache.lucene.queryParser.surround.query with parameters of type SimpleTerm.MatchingTermVisitor
void | SrndTermQuery.visitMatchingTerms(IndexReader reader, String fieldName, SimpleTerm.MatchingTermVisitor mtv)
void | SrndPrefixQuery.visitMatchingTerms(IndexReader reader, String fieldName, SimpleTerm.MatchingTermVisitor mtv)
abstract void | SimpleTerm.visitMatchingTerms(IndexReader reader, String fieldName, SimpleTerm.MatchingTermVisitor mtv)
void | SrndTruncQuery.visitMatchingTerms(IndexReader reader, String fieldName, SimpleTerm.MatchingTermVisitor mtv)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.query.SpanNearClauseFactory

Packages that use SpanNearClauseFactory
org.apache.lucene.queryParser.surround.query This package contains SrndQuery and its subclasses.

Uses of SpanNearClauseFactory in org.apache.lucene.queryParser.surround.query

Methods in org.apache.lucene.queryParser.surround.query with parameters of type SpanNearClauseFactory
void | OrQuery.addSpanQueries(SpanNearClauseFactory sncf)
void | SimpleTerm.addSpanQueries(SpanNearClauseFactory sncf)
void | DistanceQuery.addSpanQueries(SpanNearClauseFactory sncf)
void | DistanceSubQuery.addSpanQueries(SpanNearClauseFactory sncf)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.query.SrndPrefixQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.query.SrndPrefixQuery

No usage of org.apache.lucene.queryParser.surround.query.SrndPrefixQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.query.SrndQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.query.SrndQuery

Packages that use SrndQuery
org.apache.lucene.queryParser.surround.parser | This package contains the QueryParser.jj source file for the Surround parser.
org.apache.lucene.queryParser.surround.query | This package contains SrndQuery and its subclasses.

Uses of SrndQuery in org.apache.lucene.queryParser.surround.parser

Methods in org.apache.lucene.queryParser.surround.parser that return SrndQuery
SrndQuery | QueryParser.AndQuery()
SrndQuery | QueryParser.FieldsQuery()
protected SrndQuery | QueryParser.getAndQuery(List<SrndQuery> queries, boolean infix, Token andToken)
protected SrndQuery | QueryParser.getDistanceQuery(List<SrndQuery> queries, boolean infix, Token dToken, boolean ordered)
protected SrndQuery | QueryParser.getFieldsQuery(SrndQuery q, ArrayList<String> fieldNames)
protected SrndQuery | QueryParser.getNotQuery(List<SrndQuery> queries, Token notToken)
protected SrndQuery | QueryParser.getOrQuery(List<SrndQuery> queries, boolean infix, Token orToken)
protected SrndQuery | QueryParser.getPrefixQuery(String prefix, boolean quoted)
protected SrndQuery | QueryParser.getTermQuery(String term, boolean quoted)
protected SrndQuery | QueryParser.getTruncQuery(String truncated)
SrndQuery | QueryParser.NotQuery()
SrndQuery | QueryParser.NQuery()
SrndQuery | QueryParser.OrQuery()
static SrndQuery | QueryParser.parse(String query)
SrndQuery | QueryParser.parse2(String query)
SrndQuery | QueryParser.PrefixOperatorQuery()
SrndQuery | QueryParser.PrimaryQuery()
SrndQuery | QueryParser.SimpleTerm()
SrndQuery | QueryParser.TopSrndQuery()
SrndQuery | QueryParser.WQuery()

Methods in org.apache.lucene.queryParser.surround.parser that return types with arguments of type SrndQuery
 List<SrndQuery> QueryParser.FieldsQueryList()

Methods in org.apache.lucene.queryParser.surround.parser with parameters of type SrndQuery
protected SrndQuery | QueryParser.getFieldsQuery(SrndQuery q, ArrayList<String> fieldNames)
void | QueryParser.OptionalWeights(SrndQuery q)

Method parameters in org.apache.lucene.queryParser.surround.parser with type arguments of type SrndQuery
protected SrndQuery | QueryParser.getAndQuery(List<SrndQuery> queries, boolean infix, Token andToken)
protected SrndQuery | QueryParser.getDistanceQuery(List<SrndQuery> queries, boolean infix, Token dToken, boolean ordered)
protected SrndQuery | QueryParser.getNotQuery(List<SrndQuery> queries, Token notToken)
protected SrndQuery | QueryParser.getOrQuery(List<SrndQuery> queries, boolean infix, Token orToken)

Uses of SrndQuery in org.apache.lucene.queryParser.surround.query

Subclasses of SrndQuery in org.apache.lucene.queryParser.surround.query
class | AndQuery
class | ComposedQuery
class | DistanceQuery
class | FieldsQuery
class | NotQuery
class | OrQuery
class | SimpleTerm
class | SrndPrefixQuery
class | SrndTermQuery
class | SrndTruncQuery

Methods in org.apache.lucene.queryParser.surround.query that return SrndQuery
 SrndQuery ComposedQuery.getSubQuery(int qn)

Constructors in org.apache.lucene.queryParser.surround.query with parameters of type SrndQuery
FieldsQuery(SrndQuery q, List<String> fieldNames, char fieldOp)
FieldsQuery(SrndQuery q, String fieldName, char fieldOp)

Constructor parameters in org.apache.lucene.queryParser.surround.query with type arguments of type SrndQuery
AndQuery(List<SrndQuery> queries, boolean inf, String opName)
DistanceQuery(List<SrndQuery> queries, boolean infix, int opDistance, String opName, boolean ordered)
NotQuery(List<SrndQuery> queries, String opName)
OrQuery(List<SrndQuery> queries, boolean infix, String opName)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.query.SrndTermQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.query.SrndTermQuery

No usage of org.apache.lucene.queryParser.surround.query.SrndTermQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.query.SrndTruncQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.query.SrndTruncQuery

No usage of org.apache.lucene.queryParser.surround.query.SrndTruncQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.queryParser.surround.query.TooManyBasicQueries

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.queryParser.surround.query.TooManyBasicQueries

Packages that use TooManyBasicQueries
org.apache.lucene.queryParser.surround.query This package contains SrndQuery and its subclasses.

Uses of TooManyBasicQueries in org.apache.lucene.queryParser.surround.query

Methods in org.apache.lucene.queryParser.surround.query that throw TooManyBasicQueries
SpanTermQuery | BasicQueryFactory.newSpanTermQuery(Term term)
TermQuery | BasicQueryFactory.newTermQuery(Term term)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AssertingIndexSearcher

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class AssertingIndexSearcher

java.lang.Object
    extended by  org.apache.lucene.search.Searcher
        extended by  org.apache.lucene.search.IndexSearcher
            extended by  org.apache.lucene.search.AssertingIndexSearcher
All Implemented Interfaces:
Closeable, Searchable
public class AssertingIndexSearcher
extends IndexSearcher

Helper class that adds some extra checks to ensure correct usage of IndexSearcher and Weight. TODO: Extend this by more checks, that's just a start.

Field Summary
Fields inherited from class org.apache.lucene.search.IndexSearcher
docStarts, subReaders, subSearchers
Constructor Summary
AssertingIndexSearcher(IndexReader r)
AssertingIndexSearcher(IndexReader r, ExecutorService ex)
Method Summary
 Weight createNormalizedWeight(Query query)
Ensures, that the returned Weight is not normalized again, which may produce wrong scores.
Methods inherited from class org.apache.lucene.search.IndexSearcher
close, doc, doc, docFreq, explain, explain, gatherSubReaders, getIndexReader, getSimilarity, getSubReaders, maxDoc, rewrite, search, search, search, search, search, search, search, search, search, search, search, searchAfter, searchAfter, setDefaultFieldSortScoring, setSimilarity, toString
Methods inherited from class org.apache.lucene.search.Searcher
createWeight, docFreqs
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AssertingIndexSearcher

public AssertingIndexSearcher(IndexReader r)

AssertingIndexSearcher

public AssertingIndexSearcher(IndexReader r,
                              ExecutorService ex)
Method Detail

createNormalizedWeight

public Weight createNormalizedWeight(Query query)
                              throws IOException
Ensures, that the returned Weight is not normalized again, which may produce wrong scores.

Overrides:
createNormalizedWeight in class IndexSearcher
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BooleanClause

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class BooleanClause

java.lang.Object
    extended by  org.apache.lucene.search.BooleanClause
All Implemented Interfaces:
Serializable
public class BooleanClause
extends Object
implements Serializable

A clause in a BooleanQuery.

See Also:
Serialized Form

Nested Class Summary
static class BooleanClause.Occur
Specifies how clauses are to occur in matching documents.
Constructor Summary
BooleanClause(Query query, BooleanClause.Occur occur)
Constructs a BooleanClause.
Method Summary
boolean | equals(Object o) Returns true if o is equal to this.
BooleanClause.Occur | getOccur()
Query | getQuery()
int | hashCode() Returns a hash code value for this object.
boolean | isProhibited()
boolean | isRequired()
void | setOccur(BooleanClause.Occur occur)
void | setQuery(Query query)
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

BooleanClause

public BooleanClause(Query query,
                     BooleanClause.Occur occur)
Constructs a BooleanClause.

Method Detail

getOccur

public BooleanClause.Occur getOccur()

setOccur

public void setOccur(BooleanClause.Occur occur)

getQuery

public Query getQuery()

setQuery

public void setQuery(Query query)

isProhibited

public boolean isProhibited()

isRequired

public boolean isRequired()

equals

public boolean equals(Object o)
Returns true if o is equal to this.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BooleanClause.Occur

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.search
Enum BooleanClause.Occur

java.lang.Object
    extended by  java.lang.Enum<BooleanClause.Occur>
        extended by  org.apache.lucene.search.BooleanClause.Occur
All Implemented Interfaces:
Serializable, Comparable<BooleanClause.Occur>
Enclosing class:
BooleanClause
public static enum BooleanClause.Occur
extends Enum<BooleanClause.Occur>

Specifies how clauses are to occur in matching documents.

Enum Constant Summary
MUST
Use this operator for clauses that must appear in the matching documents.
MUST_NOT
Use this operator for clauses that must not appear in the matching documents.
SHOULD
Use this operator for clauses that should appear in the matching documents.
Method Summary
static BooleanClause.Occur | valueOf(String name) Returns the enum constant of this type with the specified name.
static BooleanClause.Occur[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

MUST

public static final BooleanClause.Occur MUST
Use this operator for clauses that must appear in the matching documents.

SHOULD

public static final BooleanClause.Occur SHOULD
Use this operator for clauses that should appear in the matching documents. For a BooleanQuery with no MUST clauses one or more SHOULD clauses must match a document for the BooleanQuery to match.

See Also:
BooleanQuery.setMinimumNumberShouldMatch(int)

MUST_NOT

public static final BooleanClause.Occur MUST_NOT
Use this operator for clauses that must not appear in the matching documents. Note that it is not possible to search for queries that only consist of a MUST_NOT clause.

Method Detail

values

public static final BooleanClause.Occur[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(BooleanClause.Occur c : BooleanClause.Occur.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static BooleanClause.Occur valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


BooleanFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class BooleanFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.BooleanFilter
All Implemented Interfaces:
Serializable, Iterable<FilterClause>
public class BooleanFilter
extends Filter
implements Iterable<FilterClause>

A container Filter that allows Boolean composition of Filters. Filters are allocated into one of three logical constructs; SHOULD, MUST NOT, MUST The results Filter BitSet is constructed as follows: SHOULD Filters are OR'd together The resulting Filter is NOT'd with the NOT Filters The resulting Filter is AND'd with the MUST Filters

See Also:
Serialized Form

Constructor Summary
BooleanFilter()
Method Summary
void | add(Filter filter, BooleanClause.Occur occur)
void | add(FilterClause filterClause) Adds a new FilterClause to the Boolean Filter container
List<FilterClause> | clauses() Returns the list of clauses
boolean | equals(Object obj)
DocIdSet | getDocIdSet(IndexReader reader) Returns the a DocIdSetIterator representing the Boolean composition of the filters that have been added.
int | hashCode()
Iterator<FilterClause> | iterator() Returns an iterator on the clauses in this query.
String | toString() Prints a user-readable version of this Filter.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

BooleanFilter

public BooleanFilter()
Method Detail

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Returns the a DocIdSetIterator representing the Boolean composition of the filters that have been added.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet

add

public void add(FilterClause filterClause)
Adds a new FilterClause to the Boolean Filter container

Parameters:
filterClause - A FilterClause object containing a Filter and an Occur parameter

add

public final void add(Filter filter,
                      BooleanClause.Occur occur)

clauses

public List<FilterClause> clauses()
Returns the list of clauses

iterator

public final Iterator<FilterClause> iterator()
Returns an iterator on the clauses in this query. It implements the Iterable interface to make it possible to do:
for (FilterClause clause : booleanFilter) {}

Specified by:
iterator in interface Iterable<FilterClause>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Prints a user-readable version of this Filter.

Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BooleanQuery.BooleanWeight

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class BooleanQuery.BooleanWeight

java.lang.Object
    extended by  org.apache.lucene.search.Weight
        extended by  org.apache.lucene.search.BooleanQuery.BooleanWeight
All Implemented Interfaces:
Serializable
Enclosing class:
BooleanQuery
protected class BooleanQuery.BooleanWeight
extends Weight

Expert: the Weight for BooleanQuery, used to normalize, score and explain these queries.

NOTE: this API and implementation is subject to change suddenly in the next release.

See Also:
Serialized Form

Field Summary
protected int | maxCoord
protected Similarity | similarity The Similarity implementation.
protected ArrayList<Weight> | weights
Constructor Summary
BooleanQuery.BooleanWeight(Searcher searcher, boolean disableCoord)
Method Summary
Explanation | explain(IndexReader reader, int doc) An explanation of the score computation for the named document.
Query | getQuery() The query that this concerns.
float | getValue() The weight for this query.
void | normalize(float norm) Assigns the query normalization factor to this.
Scorer | scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.
boolean | scoresDocsOutOfOrder() Returns true iff this implementation scores docs only out of order.
float | sumOfSquaredWeights() The sum of squared weights of contained query clauses.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

similarity

protected Similarity similarity
The Similarity implementation.

weights

protected ArrayList<Weight> weights

maxCoord

protected int maxCoord
Constructor Detail

BooleanQuery.BooleanWeight

public BooleanQuery.BooleanWeight(Searcher searcher,
                                  boolean disableCoord)
                           throws IOException
Throws:
IOException
Method Detail

getQuery

public Query getQuery()
Description copied from class: Weight
The query that this concerns.

Specified by:
getQuery in class Weight

getValue

public float getValue()
Description copied from class: Weight
The weight for this query.

Specified by:
getValue in class Weight

sumOfSquaredWeights

public float sumOfSquaredWeights()
                          throws IOException
Description copied from class: Weight
The sum of squared weights of contained query clauses.

Specified by:
sumOfSquaredWeights in class Weight
Throws:
IOException

normalize

public void normalize(float norm)
Description copied from class: Weight
Assigns the query normalization factor to this.

Specified by:
normalize in class Weight

explain

public Explanation explain(IndexReader reader,
                           int doc)
                    throws IOException
Description copied from class: Weight
An explanation of the score computation for the named document.

Specified by:
explain in class Weight
Parameters:
reader - sub-reader containing the give doc
Returns:
an Explanation for the score
Throws:
IOException

scorer

public Scorer scorer(IndexReader reader,
                     boolean scoreDocsInOrder,
                     boolean topScorer)
              throws IOException
Description copied from class: Weight
Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.

NOTE: even if scoreDocsInOrder is false, it is recommended to check whether the returned Scorer indeed scores documents out of order (i.e., call Weight.scoresDocsOutOfOrder()), as some Scorer implementations will always return documents in-order.
NOTE: null can be returned if no documents will be scored by this query.

Specified by:
scorer in class Weight
Parameters:
reader - the IndexReader for which to return the Scorer.
scoreDocsInOrder - specifies whether in-order scoring of documents is required. Note that if set to false (i.e., out-of-order scoring is required), this method can return whatever scoring mode it supports, as every in-order scorer is also an out-of-order one. However, an out-of-order scorer may not support DocIdSetIterator.nextDoc() and/or DocIdSetIterator.advance(int), therefore it is recommended to request an in-order scorer if use of these methods is required.
topScorer - if true, Scorer.score(Collector) will be called; if false, DocIdSetIterator.nextDoc() and/or DocIdSetIterator.advance(int) will be called.
Returns:
a Scorer which scores documents in/out-of order.
Throws:
IOException

scoresDocsOutOfOrder

public boolean scoresDocsOutOfOrder()
Description copied from class: Weight
Returns true iff this implementation scores docs only out of order. This method is used in conjunction with Collector's acceptsDocsOutOfOrder and Weight.scorer(org.apache.lucene.index.IndexReader, boolean, boolean) to create a matching Scorer instance for a given Collector, or vice versa.

NOTE: the default implementation returns false, i.e. the Scorer scores documents in-order.

Overrides:
scoresDocsOutOfOrder in class Weight
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BooleanQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class BooleanQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.BooleanQuery
All Implemented Interfaces:
Serializable, Cloneable, Iterable<BooleanClause>
public class BooleanQuery
extends Query
implements Iterable<BooleanClause>

A Query that matches documents matching boolean combinations of other queries, e.g. TermQuerys, PhraseQuerys or other BooleanQuerys.

See Also:
Serialized Form

Nested Class Summary
protected class | BooleanQuery.BooleanWeight Expert: the Weight for BooleanQuery, used to normalize, score and explain these queries.
static class | BooleanQuery.TooManyClauses Thrown when an attempt is made to add more than getMaxClauseCount() clauses.
Field Summary
protected  int minNrShouldMatch
Constructor Summary
BooleanQuery()
Constructs an empty boolean query.
BooleanQuery(boolean disableCoord)
Constructs an empty boolean query.
Method Summary
 void add(BooleanClause clause)
Adds a clause to a boolean query.
 void add(Query query, BooleanClause.Occur occur)
Adds a clause to a boolean query.
 List<BooleanClause> clauses()
Returns the list of clauses in this query.
 Object clone()
Returns a clone of this query.
 Weight createWeight(Searcher searcher)
Expert: Constructs an appropriate Weight implementation for this query.
 boolean equals(Object o)
Returns true iff o is equal to this.
 void extractTerms(Set<Term> terms)
Expert: adds all terms occurring in this query to the terms set.
 BooleanClause[] getClauses()
Returns the set of clauses in this query.
static int getMaxClauseCount()
Return the maximum number of clauses permitted, 1024 by default.
 int getMinimumNumberShouldMatch()
Gets the minimum number of the optional BooleanClauses which must be satisfied.
 int hashCode()
Returns a hash code value for this object.
 boolean isCoordDisabled()
Returns true iff Similarity.coord(int,int) is disabled in scoring for this query instance.
 Iterator<BooleanClause> iterator()
Returns an iterator on the clauses in this query.
 Query rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.
static void setMaxClauseCount(int maxClauseCount)
Set the maximum number of clauses permitted per BooleanQuery.
 void setMinimumNumberShouldMatch(int min)
Specifies a minimum number of the optional BooleanClauses which must be satisfied.
 String toString(String field)
Prints a user-readable version of this query.
Methods inherited from class org.apache.lucene.search.Query
combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

minNrShouldMatch

protected int minNrShouldMatch
Constructor Detail

BooleanQuery

public BooleanQuery()
Constructs an empty boolean query.

BooleanQuery

public BooleanQuery(boolean disableCoord)
Constructs an empty boolean query. Similarity.coord(int,int) may be disabled in scoring, as appropriate. For example, this score factor does not make sense for most automatically generated queries, like WildcardQuery and FuzzyQuery.

Parameters:
disableCoord - disables Similarity.coord(int,int) in scoring.
Method Detail

getMaxClauseCount

public static int getMaxClauseCount()
Return the maximum number of clauses permitted, 1024 by default. Attempts to add more than the permitted number of clauses cause BooleanQuery.TooManyClauses to be thrown.

See Also:
setMaxClauseCount(int)

setMaxClauseCount

public static void setMaxClauseCount(int maxClauseCount)
Set the maximum number of clauses permitted per BooleanQuery. Default value is 1024.

isCoordDisabled

public boolean isCoordDisabled()
Returns true iff Similarity.coord(int,int) is disabled in scoring for this query instance.

See Also:
BooleanQuery(boolean)

setMinimumNumberShouldMatch

public void setMinimumNumberShouldMatch(int min)
Specifies a minimum number of the optional BooleanClauses which must be satisfied.

By default no optional clauses are necessary for a match (unless there are no required clauses). If this method is used, then the specified number of clauses is required.

Use of this method is totally independent of specifying that any specific clauses are required (or prohibited). This number will only be compared against the number of matching optional clauses.

Parameters:
min - the number of optional clauses that must match

getMinimumNumberShouldMatch

public int getMinimumNumberShouldMatch()
Gets the minimum number of the optional BooleanClauses which must be satisfied.

add

public void add(Query query,
                BooleanClause.Occur occur)
Adds a clause to a boolean query.

Throws:
BooleanQuery.TooManyClauses - if the new number of clauses exceeds the maximum clause number
See Also:
getMaxClauseCount()

add

public void add(BooleanClause clause)
Adds a clause to a boolean query.

Throws:
BooleanQuery.TooManyClauses - if the new number of clauses exceeds the maximum clause number
See Also:
getMaxClauseCount()

getClauses

public BooleanClause[] getClauses()
Returns the set of clauses in this query.

clauses

public List<BooleanClause> clauses()
Returns the list of clauses in this query.

iterator

public final Iterator<BooleanClause> iterator()
Returns an iterator on the clauses in this query. It implements the Iterable interface to make it possible to do:
for (BooleanClause clause : booleanQuery) {}

Specified by:
iterator in interface Iterable<BooleanClause>

createWeight

public Weight createWeight(Searcher searcher)
                    throws IOException
Description copied from class: Query
Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Overrides:
createWeight in class Query
Throws:
IOException

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

clone

public Object clone()
Description copied from class: Query
Returns a clone of this query.

Overrides:
clone in class Query

toString

public String toString(String field)
Prints a user-readable version of this query.

Specified by:
toString in class Query

equals

public boolean equals(Object o)
Returns true iff o is equal to this.

Overrides:
equals in class Query

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BooleanQuery.TooManyClauses

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class BooleanQuery.TooManyClauses

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.lang.RuntimeException
                extended by  org.apache.lucene.search.BooleanQuery.TooManyClauses
All Implemented Interfaces:
Serializable
Enclosing class:
BooleanQuery
public static class BooleanQuery.TooManyClauses
extends RuntimeException

Thrown when an attempt is made to add more than BooleanQuery.getMaxClauseCount() clauses. This typically happens if a PrefixQuery, FuzzyQuery, WildcardQuery, or TermRangeQuery is expanded to many terms during search.

See Also:
Serialized Form

Constructor Summary
BooleanQuery.TooManyClauses()
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

BooleanQuery.TooManyClauses

public BooleanQuery.TooManyClauses()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BoostingQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class BoostingQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.BoostingQuery
All Implemented Interfaces:
Serializable, Cloneable
public class BoostingQuery
extends Query

The BoostingQuery class can be used to effectively demote results that match a given query. Unlike the "NOT" clause, this still selects documents that contain undesirable terms, but reduces their overall score: Query balancedQuery = new BoostingQuery(positiveQuery, negativeQuery, 0.01f); In this scenario the positiveQuery contains the mandatory, desirable criteria which is used to select all matching documents, and the negativeQuery contains the undesirable elements which are simply used to lessen the scores. Documents that match the negativeQuery have their score multiplied by the supplied "boost" parameter, so this should be less than 1 to achieve a demoting effect This code was originally made available here: [WWW] http://marc.theaimsgroup.com/?l=lucene-user&m=108058407130459&w=2 and is documented here: http://wiki.apache.org/lucene-java/CommunityContributions

See Also:
Serialized Form

Constructor Summary
BoostingQuery(Query match, Query context, float boost)
Method Summary
boolean | equals(Object obj)
int | hashCode()
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.Query
clone, combine, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

BoostingQuery

public BoostingQuery(Query match,
                     Query context,
                     float boost)
Method Detail

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException

hashCode

public int hashCode()
Overrides:
hashCode in class Query

equals

public boolean equals(Object obj)
Overrides:
equals in class Query

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CachingCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class CachingCollector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.CachingCollector

public abstract class CachingCollector
extends Collector

Caches all docs, and optionally also scores, coming from a search, and is then able to replay them to another collector. You specify the max RAM this class may use. Once the collection is done, call isCached(). If this returns true, you can use replay(org.apache.lucene.search.Collector) against a new collector. If it returns false, this means too much RAM was required and you must instead re-run the original search.

NOTE: this class consumes 4 (or 8 bytes, if scoring is cached) per collected document. If the result set is large this can easily be a very substantial amount of RAM!

NOTE: this class caches at least 128 documents before checking RAM limits.

See the Lucene contrib/grouping module for more details including a full code example.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected int | base
protected List<int[]> | cachedDocs
protected List<org.apache.lucene.search.CachingCollector.SegStart> | cachedSegs
protected int[] | curDocs
protected int | lastDocBase
protected int | maxDocsToCache
protected Collector | other
protected int | upto
Method Summary
 boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
static CachingCollector create(boolean acceptDocsOutOfOrder, boolean cacheScores, double maxRAMMB)
Creates a CachingCollector which does not wrap another collector.
static CachingCollector create(Collector other, boolean cacheScores, double maxRAMMB)
Create a new CachingCollector that wraps the given collector and caches documents and scores up to the specified RAM threshold.
static CachingCollector create(Collector other, boolean cacheScores, int maxDocsToCache)
Create a new CachingCollector that wraps the given collector and caches documents and scores up to the specified max docs threshold.
 boolean isCached()
abstract  void replay(Collector other)
Replays the cached doc IDs (and scores) to the given Collector.
 void setNextReader(IndexReader reader, int docBase)
Called before collecting from each IndexReader.
Methods inherited from class org.apache.lucene.search.Collector
collect, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

other

protected final Collector other

maxDocsToCache

protected final int maxDocsToCache

cachedSegs

protected final List<org.apache.lucene.search.CachingCollector.SegStart> cachedSegs

cachedDocs

protected final List<int[]> cachedDocs

curDocs

protected int[] curDocs

upto

protected int upto

base

protected int base

lastDocBase

protected int lastDocBase
Method Detail

create

public static CachingCollector create(boolean acceptDocsOutOfOrder,
                                      boolean cacheScores,
                                      double maxRAMMB)
Creates a CachingCollector which does not wrap another collector. The cached documents and scores can later be replayed.

Parameters:
acceptDocsOutOfOrder - whether documents are allowed to be collected out-of-order

create

public static CachingCollector create(Collector other,
                                      boolean cacheScores,
                                      double maxRAMMB)
Create a new CachingCollector that wraps the given collector and caches documents and scores up to the specified RAM threshold.

Parameters:
other - the Collector to wrap and delegate calls to.
cacheScores - whether to cache scores in addition to document IDs. Note that this increases the RAM consumed per doc
maxRAMMB - the maximum RAM in MB to consume for caching the documents and scores. If the collector exceeds the threshold, no documents and scores are cached.

create

public static CachingCollector create(Collector other,
                                      boolean cacheScores,
                                      int maxDocsToCache)
Create a new CachingCollector that wraps the given collector and caches documents and scores up to the specified max docs threshold.

Parameters:
other - the Collector to wrap and delegate calls to.
cacheScores - whether to cache scores in addition to document IDs. Note that this increases the RAM consumed per doc
maxDocsToCache - the maximum number of documents for caching the documents and possible the scores. If the collector exceeds the threshold, no documents and scores are cached.

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Description copied from class: Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Specified by:
acceptsDocsOutOfOrder in class Collector

isCached

public boolean isCached()

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Specified by:
setNextReader in class Collector
Parameters:
reader - next IndexReader
Throws:
IOException

replay

public abstract void replay(Collector other)
                     throws IOException
Replays the cached doc IDs (and scores) to the given Collector. If this instance does not cache scores, then Scorer is not set on other.setScorer as well as scores are not replayed.

Throws:
IllegalStateException - if this collector is not cached (i.e., if the RAM limits were too low for the number of documents + scores to cache).
IllegalArgumentException - if the given Collect's does not support out-of-order collection, while the collector passed to the ctor does.
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CachingSpanFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class CachingSpanFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.SpanFilter
            extended by  org.apache.lucene.search.CachingSpanFilter
All Implemented Interfaces:
Serializable
public class CachingSpanFilter
extends SpanFilter

Wraps another SpanFilter's result and caches it. The purpose is to allow filters to simply filter, and then wrap with this class to add caching.

See Also:
Serialized Form

Constructor Summary
CachingSpanFilter(SpanFilter filter)
New deletions always result in a cache miss, by default (CachingWrapperFilter.DeletesMode.RECACHE.
CachingSpanFilter(SpanFilter filter, CachingWrapperFilter.DeletesMode deletesMode)
Method Summary
SpanFilterResult | bitSpans(IndexReader reader) Returns a SpanFilterResult with true for documents which should be permitted in search results, and false for those that should not and Spans for where the true docs match.
boolean | equals(Object o)
DocIdSet | getDocIdSet(IndexReader reader) Creates a DocIdSet enumerating the documents that should be permitted in search results.
int | hashCode()
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CachingSpanFilter

public CachingSpanFilter(SpanFilter filter)
New deletions always result in a cache miss, by default (CachingWrapperFilter.DeletesMode.RECACHE.

Parameters:
filter - Filter to cache results of

CachingSpanFilter

public CachingSpanFilter(SpanFilter filter,
                         CachingWrapperFilter.DeletesMode deletesMode)
Parameters:
filter - Filter to cache results of
deletesMode - See CachingWrapperFilter.DeletesMode
Method Detail

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Description copied from class: Filter
Creates a DocIdSet enumerating the documents that should be permitted in search results. NOTE: null can be returned if no documents are accepted by this Filter.

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet

bitSpans

public SpanFilterResult bitSpans(IndexReader reader)
                          throws IOException
Description copied from class: SpanFilter
Returns a SpanFilterResult with true for documents which should be permitted in search results, and false for those that should not and Spans for where the true docs match.

Specified by:
bitSpans in class SpanFilter
Parameters:
reader - The IndexReader to load position and DocIdSet information from
Returns:
A SpanFilterResult
Throws:
IOException - if there was an issue accessing the necessary information

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CachingWrapperFilter.DeletesMode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.search
Enum CachingWrapperFilter.DeletesMode

java.lang.Object
    extended by  java.lang.Enum<CachingWrapperFilter.DeletesMode>
        extended by  org.apache.lucene.search.CachingWrapperFilter.DeletesMode
All Implemented Interfaces:
Serializable, Comparable<CachingWrapperFilter.DeletesMode>
Enclosing class:
CachingWrapperFilter
public static enum CachingWrapperFilter.DeletesMode
extends Enum<CachingWrapperFilter.DeletesMode>

Expert: Specifies how new deletions against a reopened reader should be handled.

The default is IGNORE, which means the cache entry will be re-used for a given segment, even when that segment has been reopened due to changes in deletions. This is a big performance gain, especially with near-real-timer readers, since you don't hit a cache miss on every reopened reader for prior segments.

However, in some cases this can cause invalid query results, allowing deleted documents to be returned. This only happens if the main query does not rule out deleted documents on its own, such as a toplevel ConstantScoreQuery. To fix this, use RECACHE to re-create the cached filter (at a higher per-reopen cost, but at faster subsequent search performance), or use DYNAMIC to dynamically intersect deleted docs (fast reopen time but some hit to search performance).

Enum Constant Summary
DYNAMIC
IGNORE
RECACHE
Method Summary
static CachingWrapperFilter.DeletesMode | valueOf(String name) Returns the enum constant of this type with the specified name.
static CachingWrapperFilter.DeletesMode[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

IGNORE

public static final CachingWrapperFilter.DeletesMode IGNORE

RECACHE

public static final CachingWrapperFilter.DeletesMode RECACHE

DYNAMIC

public static final CachingWrapperFilter.DeletesMode DYNAMIC
Method Detail

values

public static final CachingWrapperFilter.DeletesMode[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(CachingWrapperFilter.DeletesMode c : CachingWrapperFilter.DeletesMode.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static CachingWrapperFilter.DeletesMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


CachingWrapperFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class CachingWrapperFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.CachingWrapperFilter
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CachingWrapperFilterHelper
public class CachingWrapperFilter
extends Filter

Wraps another filter's result and caches it. The purpose is to allow filters to simply filter, and then wrap with this class to add caching.

NOTE: if you wrap this filter as a query (eg, using ConstantScoreQuery), you'll likely want to enforce deletions (using either CachingWrapperFilter.DeletesMode.RECACHE or CachingWrapperFilter.DeletesMode.DYNAMIC).

See Also:
Serialized Form

Nested Class Summary
static class CachingWrapperFilter.DeletesMode
Expert: Specifies how new deletions against a reopened reader should be handled.
Field Summary
protected  org.apache.lucene.search.CachingWrapperFilter.FilterCache<DocIdSet> cache
Constructor Summary
CachingWrapperFilter(Filter filter)
New deletes are ignored by default, which gives higher cache hit rate on reopened readers.
CachingWrapperFilter(Filter filter, CachingWrapperFilter.DeletesMode deletesMode)
Expert: by default, the cached filter will be shared across reopened segments that only had changes to their deletions.
Method Summary
protected DocIdSet | docIdSetToCache(DocIdSet docIdSet, IndexReader reader) Provide the DocIdSet to be cached, using the DocIdSet provided by the wrapped Filter.
boolean | equals(Object o)
DocIdSet | getDocIdSet(IndexReader reader) Creates a DocIdSet enumerating the documents that should be permitted in search results.
int | hashCode()
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

cache

protected final org.apache.lucene.search.CachingWrapperFilter.FilterCache<DocIdSet> cache
Constructor Detail

CachingWrapperFilter

public CachingWrapperFilter(Filter filter)
New deletes are ignored by default, which gives higher cache hit rate on reopened readers. Most of the time this is safe, because the filter will be AND'd with a Query that fully enforces deletions. If instead you need this filter to always enforce deletions, pass either CachingWrapperFilter.DeletesMode.RECACHE or CachingWrapperFilter.DeletesMode.DYNAMIC.

Parameters:
filter - Filter to cache results of

CachingWrapperFilter

public CachingWrapperFilter(Filter filter,
                            CachingWrapperFilter.DeletesMode deletesMode)
Expert: by default, the cached filter will be shared across reopened segments that only had changes to their deletions.

Parameters:
filter - Filter to cache results of
deletesMode - See CachingWrapperFilter.DeletesMode
Method Detail

docIdSetToCache

protected DocIdSet docIdSetToCache(DocIdSet docIdSet,
                                   IndexReader reader)
                            throws IOException
Provide the DocIdSet to be cached, using the DocIdSet provided by the wrapped Filter.

This implementation returns the given DocIdSet, if DocIdSet.isCacheable() returns true, else it copies the DocIdSetIterator into an FixedBitSet.

Throws:
IOException

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Description copied from class: Filter
Creates a DocIdSet enumerating the documents that should be permitted in search results. NOTE: null can be returned if no documents are accepted by this Filter.

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CachingWrapperFilterHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class CachingWrapperFilterHelper

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.CachingWrapperFilter
            extended by  org.apache.lucene.search.CachingWrapperFilterHelper
All Implemented Interfaces:
Serializable
public class CachingWrapperFilterHelper
extends CachingWrapperFilter

A unit test helper class to test when the filter is getting cached and when it is not.

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.CachingWrapperFilter
CachingWrapperFilter.DeletesMode
Field Summary
Fields inherited from class org.apache.lucene.search.CachingWrapperFilter
cache
Constructor Summary
CachingWrapperFilterHelper(Filter filter)
Method Summary
boolean | equals(Object o)
DocIdSet | getDocIdSet(IndexReader reader) Creates a DocIdSet enumerating the documents that should be permitted in search results.
int | hashCode()
void | setShouldHaveCache(boolean shouldHaveCache)
String | toString()
Methods inherited from class org.apache.lucene.search.CachingWrapperFilter
docIdSetToCache
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CachingWrapperFilterHelper

public CachingWrapperFilterHelper(Filter filter)
Parameters:
filter - Filter to cache results of
Method Detail

setShouldHaveCache

public void setShouldHaveCache(boolean shouldHaveCache)

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Description copied from class: Filter
Creates a DocIdSet enumerating the documents that should be permitted in search results. NOTE: null can be returned if no documents are accepted by this Filter.

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

Overrides:
getDocIdSet in class CachingWrapperFilter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet

toString

public String toString()
Overrides:
toString in class CachingWrapperFilter

equals

public boolean equals(Object o)
Overrides:
equals in class CachingWrapperFilter

hashCode

public int hashCode()
Overrides:
hashCode in class CachingWrapperFilter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ChainedFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class ChainedFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.ChainedFilter
All Implemented Interfaces:
Serializable
public class ChainedFilter
extends Filter

Allows multiple Filters to be chained. Logical operations such as NOT and XOR are applied between filters. One operation can be used for all filters, or a specific operation can be declared for each filter.

Order in which filters are called depends on the position of the filter in the chain. It's probably more efficient to place the most restrictive filters /least computationally-intensive filters first.

See Also:
Serialized Form

Field Summary
static int | AND
static int | ANDNOT
static int | DEFAULT Logical operation when none is declared.
static int | OR
static int | XOR
Constructor Summary
ChainedFilter(Filter[] chain)
Ctor.
ChainedFilter(Filter[] chain, int logic)
Ctor.
ChainedFilter(Filter[] chain, int[] logicArray)
Ctor.
Method Summary
protected DocIdSet | finalResult(OpenBitSetDISI result, int maxDocs) Deprecated. Either use CachingWrapperFilter, or switch to a different DocIdSet implementation yourself. This method will be removed in Lucene 4.0
DocIdSet | getDocIdSet(IndexReader reader) Filter.getDocIdSet(org.apache.lucene.index.IndexReader).
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

OR

public static final int OR
See Also:
Constant Field Values

AND

public static final int AND
See Also:
Constant Field Values

ANDNOT

public static final int ANDNOT
See Also:
Constant Field Values

XOR

public static final int XOR
See Also:
Constant Field Values

DEFAULT

public static int DEFAULT
Logical operation when none is declared. Defaults to OR.

Constructor Detail

ChainedFilter

public ChainedFilter(Filter[] chain)
Ctor.

Parameters:
chain - The chain of filters

ChainedFilter

public ChainedFilter(Filter[] chain,
                     int[] logicArray)
Ctor.

Parameters:
chain - The chain of filters
logicArray - Logical operations to apply between filters

ChainedFilter

public ChainedFilter(Filter[] chain,
                     int logic)
Ctor.

Parameters:
chain - The chain of filters
logic - Logical operation to apply to ALL filters
Method Detail

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Filter.getDocIdSet(org.apache.lucene.index.IndexReader).

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet

finalResult

@Deprecated
protected final DocIdSet finalResult(OpenBitSetDISI result,
                                                int maxDocs)
Deprecated. Either use CachingWrapperFilter, or switch to a different DocIdSet implementation yourself. This method will be removed in Lucene 4.0

Provide a SortedVIntList when it is definitely smaller than an OpenBitSet

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CheckHits.ExplanationAsserter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class CheckHits.ExplanationAsserter

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.CheckHits.ExplanationAsserter
Enclosing class:
CheckHits
public static class CheckHits.ExplanationAsserter
extends Collector

Asserts that the score explanation for every document matching a query corresponds with the true score. NOTE: this HitCollector should only be used with the Query and Searcher specified at when it is constructed.

See Also:
CheckHits.verifyExplanation(java.lang.String, int, float, boolean, org.apache.lucene.search.Explanation)

Field Summary
static float SCORE_TOLERANCE_DELTA
Deprecated.
Constructor Summary
CheckHits.ExplanationAsserter(Query q, String defaultFieldName, Searcher s)
Constructs an instance which does shallow tests on the Explanation
CheckHits.ExplanationAsserter(Query q, String defaultFieldName, Searcher s, boolean deep)
Method Summary
 boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
 void collect(int doc)
Called once for every document matching a query, with the unbased document number.
 void setNextReader(IndexReader reader, int docBase)
Called before collecting from each IndexReader.
 void setScorer(Scorer scorer)
Called before successive calls to Collector.collect(int).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

SCORE_TOLERANCE_DELTA

@Deprecated
public static float SCORE_TOLERANCE_DELTA
Deprecated.
See Also:
CheckHits.EXPLAIN_SCORE_TOLERANCE_DELTA
Constructor Detail

CheckHits.ExplanationAsserter

public CheckHits.ExplanationAsserter(Query q,
                                     String defaultFieldName,
                                     Searcher s)
Constructs an instance which does shallow tests on the Explanation

CheckHits.ExplanationAsserter

public CheckHits.ExplanationAsserter(Query q,
                                     String defaultFieldName,
                                     Searcher s,
                                     boolean deep)
Method Detail

setScorer

public void setScorer(Scorer scorer)
               throws IOException
Description copied from class: Collector
Called before successive calls to Collector.collect(int). Implementations that need the score of the current document (passed-in to Collector.collect(int)), should save the passed-in Scorer and call scorer.score() when needed.

Specified by:
setScorer in class Collector
Throws:
IOException

collect

public void collect(int doc)
             throws IOException
Description copied from class: Collector
Called once for every document matching a query, with the unbased document number.

Note: This is called in an inner search loop. For good search performance, implementations of this method should not call Searcher.doc(int) or IndexReader.document(int) on every hit. Doing so can slow searches by an order of magnitude or more.

Specified by:
collect in class Collector
Throws:
IOException

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Specified by:
setNextReader in class Collector
Parameters:
reader - next IndexReader

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Description copied from class: Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Specified by:
acceptsDocsOutOfOrder in class Collector
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CheckHits.ExplanationAssertingSearcher

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class CheckHits.ExplanationAssertingSearcher

java.lang.Object
    extended by  org.apache.lucene.search.Searcher
        extended by  org.apache.lucene.search.IndexSearcher
            extended by  org.apache.lucene.search.CheckHits.ExplanationAssertingSearcher
All Implemented Interfaces:
Closeable, Searchable
Enclosing class:
CheckHits
public static class CheckHits.ExplanationAssertingSearcher
extends IndexSearcher

an IndexSearcher that implicitly checks hte explanation of every match whenever it executes a search.

See Also:
CheckHits.ExplanationAsserter

Field Summary
Fields inherited from class org.apache.lucene.search.IndexSearcher
docStarts, subReaders, subSearchers
Constructor Summary
CheckHits.ExplanationAssertingSearcher(IndexReader r)
Method Summary
protected void | checkExplanations(Query q)
void | search(Query query, Collector results) Lower-level search API.
void | search(Query query, Filter filter, Collector results) Lower-level search API.
TopDocs | search(Query query, Filter filter, int n) Finds the top n hits for query, applying filter if non-null.
TopFieldDocs | search(Query query, Filter filter, int n, Sort sort) Search implementation with arbitrary sorting.
Methods inherited from class org.apache.lucene.search.IndexSearcher
close, createNormalizedWeight, doc, doc, docFreq, explain, explain, gatherSubReaders, getIndexReader, getSimilarity, getSubReaders, maxDoc, rewrite, search, search, search, search, search, search, search, searchAfter, searchAfter, setDefaultFieldSortScoring, setSimilarity, toString
Methods inherited from class org.apache.lucene.search.Searcher
createWeight, docFreqs
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CheckHits.ExplanationAssertingSearcher

public CheckHits.ExplanationAssertingSearcher(IndexReader r)
                                       throws IOException
Throws:
IOException
Method Detail

checkExplanations

protected void checkExplanations(Query q)
                          throws IOException
Throws:
IOException

search

public TopFieldDocs search(Query query,
                           Filter filter,
                           int n,
                           Sort sort)
                    throws IOException
Description copied from class: IndexSearcher
Search implementation with arbitrary sorting. Finds the top n hits for query, applying filter if non-null, and sorting the hits by the criteria in sort.

NOTE: this does not compute scores by default; use IndexSearcher.setDefaultFieldSortScoring(boolean, boolean) to enable scoring.

Overrides:
search in class IndexSearcher
Throws:
IOException

search

public void search(Query query,
                   Collector results)
            throws IOException
Description copied from class: IndexSearcher
Lower-level search API.

Collector.collect(int) is called for every matching document.

Applications should only use this if they need all of the matching documents. The high-level search API (Searcher.search(Query, int)) is usually more efficient, as it skips non-high-scoring hits.

Note: The score passed to this method is a raw score. In other words, the score will not necessarily be a float whose value is between 0 and 1.

Overrides:
search in class IndexSearcher
Throws:
IOException

search

public void search(Query query,
                   Filter filter,
                   Collector results)
            throws IOException
Description copied from class: IndexSearcher
Lower-level search API.

Collector.collect(int) is called for every matching document.
Collector-based access to remote indexes is discouraged.

Applications should only use this if they need all of the matching documents. The high-level search API (Searcher.search(Query, Filter, int)) is usually more efficient, as it skips non-high-scoring hits.

Overrides:
search in class IndexSearcher
Parameters:
query - to match documents
filter - if non-null, used to permit documents to be collected.
results - to receive hits
Throws:
IOException

search

public TopDocs search(Query query,
                      Filter filter,
                      int n)
               throws IOException
Description copied from class: IndexSearcher
Finds the top n hits for query, applying filter if non-null.

Overrides:
search in class IndexSearcher
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CheckHits

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class CheckHits

java.lang.Object
    extended by  org.apache.lucene.search.CheckHits

public class CheckHits
extends Object

Utility class for asserting expected hits in tests.

Nested Class Summary
static class | CheckHits.ExplanationAsserter Asserts that the score explanation for every document matching a query corresponds with the true score.
static class | CheckHits.ExplanationAssertingSearcher an IndexSearcher that implicitly checks hte explanation of every match whenever it executes a search.
static class | CheckHits.SetCollector Just collects document ids into a set.
Field Summary
static float EXPLAIN_SCORE_TOLERANCE_DELTA
Some explains methods calculate their values though a slightly different order of operations from the actual scoring method ...
Constructor Summary
CheckHits()
Method Summary
static void | checkDocIds(String mes, int[] results, ScoreDoc[] hits) Tests that a Hits has an expected order of documents
static void | checkEqual(Query query, ScoreDoc[] hits1, ScoreDoc[] hits2)
static void | checkExplanations(Query query, String defaultFieldName, Searcher searcher) Asserts that the explanation value for every document matching a query corresponds with the true score.
static void | checkExplanations(Query query, String defaultFieldName, Searcher searcher, boolean deep) Asserts that the explanation value for every document matching a query corresponds with the true score.
static void | checkHitCollector(Random random, Query query, String defaultFieldName, Searcher searcher, int[] results) Tests that a query matches the an expected set of documents using a HitCollector.
static void | checkHits(Random random, Query query, String defaultFieldName, Searcher searcher, int[] results) Tests that a query matches the an expected set of documents using Hits.
static void | checkHitsQuery(Query query, ScoreDoc[] hits1, ScoreDoc[] hits2, int[] results) Tests that two queries have an expected order of documents, and that the two queries have the same score values.
static void | checkNoMatchExplanations(Query q, String defaultFieldName, Searcher searcher, int[] results) Tests that all documents up to maxDoc which are *not* in the expected result set, have an explanation which indicates that the document does not match
static String | hits2str(ScoreDoc[] hits1, ScoreDoc[] hits2, int start, int end)
static String | topdocsString(TopDocs docs, int start, int end)
static void | verifyExplanation(String q, int doc, float score, boolean deep, Explanation expl) Assert that an explanation has the expected score, and optionally that its sub-details max/sum/factor match to that score.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

EXPLAIN_SCORE_TOLERANCE_DELTA

public static float EXPLAIN_SCORE_TOLERANCE_DELTA
Some explains methods calculate their values though a slightly different order of operations from the actual scoring method ... this allows for a small amount of variation

Constructor Detail

CheckHits

public CheckHits()
Method Detail

checkNoMatchExplanations

public static void checkNoMatchExplanations(Query q,
                                            String defaultFieldName,
                                            Searcher searcher,
                                            int[] results)
                                     throws IOException
Tests that all documents up to maxDoc which are *not* in the expected result set, have an explanation which indicates that the document does not match

Throws:
IOException

checkHitCollector

public static void checkHitCollector(Random random,
                                     Query query,
                                     String defaultFieldName,
                                     Searcher searcher,
                                     int[] results)
                              throws IOException
Tests that a query matches the an expected set of documents using a HitCollector.

Note that when using the HitCollector API, documents will be collected if they "match" regardless of what their score is.

Parameters:
query - the query to test
searcher - the searcher to test the query against
defaultFieldName - used for displaying the query in assertion messages
results - a list of documentIds that must match the query
Throws:
IOException
See Also:
checkHits(java.util.Random, org.apache.lucene.search.Query, java.lang.String, org.apache.lucene.search.Searcher, int[])

checkHits

public static void checkHits(Random random,
                             Query query,
                             String defaultFieldName,
                             Searcher searcher,
                             int[] results)
                      throws IOException
Tests that a query matches the an expected set of documents using Hits.

Note that when using the Hits API, documents will only be returned if they have a positive normalized score.

Parameters:
query - the query to test
searcher - the searcher to test the query against
defaultFieldName - used for displaing the query in assertion messages
results - a list of documentIds that must match the query
Throws:
IOException
See Also:
checkHitCollector(java.util.Random, org.apache.lucene.search.Query, java.lang.String, org.apache.lucene.search.Searcher, int[])

checkDocIds

public static void checkDocIds(String mes,
                               int[] results,
                               ScoreDoc[] hits)
                        throws IOException
Tests that a Hits has an expected order of documents

Throws:
IOException

checkHitsQuery

public static void checkHitsQuery(Query query,
                                  ScoreDoc[] hits1,
                                  ScoreDoc[] hits2,
                                  int[] results)
                           throws IOException
Tests that two queries have an expected order of documents, and that the two queries have the same score values.

Throws:
IOException

checkEqual

public static void checkEqual(Query query,
                              ScoreDoc[] hits1,
                              ScoreDoc[] hits2)
                       throws IOException
Throws:
IOException

hits2str

public static String hits2str(ScoreDoc[] hits1,
                              ScoreDoc[] hits2,
                              int start,
                              int end)
                       throws IOException
Throws:
IOException

topdocsString

public static String topdocsString(TopDocs docs,
                                   int start,
                                   int end)

checkExplanations

public static void checkExplanations(Query query,
                                     String defaultFieldName,
                                     Searcher searcher)
                              throws IOException
Asserts that the explanation value for every document matching a query corresponds with the true score.

Parameters:
query - the query to test
searcher - the searcher to test the query against
defaultFieldName - used for displaing the query in assertion messages
Throws:
IOException
See Also:
CheckHits.ExplanationAsserter, for a "deep" testing of the explanation details.

checkExplanations

public static void checkExplanations(Query query,
                                     String defaultFieldName,
                                     Searcher searcher,
                                     boolean deep)
                              throws IOException
Asserts that the explanation value for every document matching a query corresponds with the true score. Optionally does "deep" testing of the explanation details.

Parameters:
query - the query to test
searcher - the searcher to test the query against
defaultFieldName - used for displaing the query in assertion messages
deep - indicates whether a deep comparison of sub-Explanation details should be executed
Throws:
IOException
See Also:
CheckHits.ExplanationAsserter

verifyExplanation

public static void verifyExplanation(String q,
                                     int doc,
                                     float score,
                                     boolean deep,
                                     Explanation expl)
Assert that an explanation has the expected score, and optionally that its sub-details max/sum/factor match to that score.

Parameters:
q - String representation of the query for assertion messages
doc - Document ID for assertion messages
score - Real score value of doc with query q
deep - indicates whether a deep comparison of sub-Explanation details should be executed
expl - The Explanation to match against score
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CheckHits.SetCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class CheckHits.SetCollector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.CheckHits.SetCollector
Enclosing class:
CheckHits
public static class CheckHits.SetCollector
extends Collector

Just collects document ids into a set.

Constructor Summary
CheckHits.SetCollector(Set<Integer> bag)
Method Summary
 boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
 void collect(int doc)
Called once for every document matching a query, with the unbased document number.
 void setNextReader(IndexReader reader, int docBase)
Called before collecting from each IndexReader.
 void setScorer(Scorer scorer)
Called before successive calls to Collector.collect(int).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CheckHits.SetCollector

public CheckHits.SetCollector(Set<Integer> bag)
Method Detail

setScorer

public void setScorer(Scorer scorer)
               throws IOException
Description copied from class: Collector
Called before successive calls to Collector.collect(int). Implementations that need the score of the current document (passed-in to Collector.collect(int)), should save the passed-in Scorer and call scorer.score() when needed.

Specified by:
setScorer in class Collector
Throws:
IOException

collect

public void collect(int doc)
Description copied from class: Collector
Called once for every document matching a query, with the unbased document number.

Note: This is called in an inner search loop. For good search performance, implementations of this method should not call Searcher.doc(int) or IndexReader.document(int) on every hit. Doing so can slow searches by an order of magnitude or more.

Specified by:
collect in class Collector

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Specified by:
setNextReader in class Collector
Parameters:
reader - next IndexReader

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Description copied from class: Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Specified by:
acceptsDocsOutOfOrder in class Collector
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Collector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class Collector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
Direct Known Subclasses:
AbstractAllGroupHeadsCollector, AbstractAllGroupsCollector, AbstractFirstPassGroupingCollector, AbstractSecondPassGroupingCollector, BlockGroupingCollector, CachingCollector, CheckHits.ExplanationAsserter, CheckHits.SetCollector, FacetsCollector, MultiCollector, PositiveScoresOnlyCollector, ScoredDocIdCollector, TimeLimitingCollector, ToParentBlockJoinCollector, TopDocsCollector, TotalHitCountCollector
public abstract class Collector
extends Object

Expert: Collectors are primarily meant to be used to gather raw results from a search, and implement sorting or custom result filtering, collation, etc.

Lucene's core collectors are derived from Collector. Likely your application can use one of these classes, or subclass TopDocsCollector, instead of implementing Collector directly:

  • TopDocsCollector is an abstract base class that assumes you will retrieve the top N docs, according to some criteria, after collection is done.
  • TopScoreDocCollector is a concrete subclass TopDocsCollector and sorts according to score + docID. This is used internally by the IndexSearcher search methods that do not take an explicit Sort. It is likely the most frequently used collector.
  • TopFieldCollector subclasses TopDocsCollector and sorts according to a specified Sort object (sort by field). This is used internally by the IndexSearcher search methods that take an explicit Sort.
  • TimeLimitingCollector, which wraps any other Collector and aborts the search if it's taken too much time.
  • PositiveScoresOnlyCollector wraps any other Collector and prevents collection of hits whose score is <= 0.0

Collector decouples the score from the collected doc: the score computation is skipped entirely if it's not needed. Collectors that do need the score should implement the setScorer(org.apache.lucene.search.Scorer) method, to hold onto the passed Scorer instance, and call Scorer.score() within the collect method to compute the current hit's score. If your collector may request the score for a single hit multiple times, you should use ScoreCachingWrappingScorer.

NOTE: The doc that is passed to the collect method is relative to the current reader. If your collector needs to resolve this to the docID space of the Multi*Reader, you must re-base it by recording the docBase from the most recent setNextReader call. Here's a simple example showing how to collect docIDs into a BitSet:

 Searcher searcher = new IndexSearcher(indexReader);
 final BitSet bits = new BitSet(indexReader.maxDoc());
 searcher.search(query, new Collector() {
   private int docBase;

   // ignore scorer
   public void setScorer(Scorer scorer) {
   }

   // accept docs out of order (for a BitSet it doesn't matter)
   public boolean acceptsDocsOutOfOrder() {
     return true;
   }

   public void collect(int doc) {
     bits.set(doc + docBase);
   }

   public void setNextReader(IndexReader reader, int docBase) {
     this.docBase = docBase;
   }
 });

Not all collectors will need to rebase the docID. For example, a collector that simply counts the total number of hits would skip it.

NOTE: Prior to 2.9, Lucene silently filtered out hits with score <= 0. As of 2.9, the core Collectors no longer do that. It's very unusual to have such hits (a negative query boost, or function query returning negative custom scores, could cause it to happen). If you need that behavior, use PositiveScoresOnlyCollector.

Since:
2.9
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
Collector()
Method Summary
abstract boolean | acceptsDocsOutOfOrder() Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to collect(int).
abstract void | collect(int doc) Called once for every document matching a query, with the unbased document number.
abstract void | setNextReader(IndexReader reader, int docBase) Called before collecting from each IndexReader.
abstract void | setScorer(Scorer scorer) Called before successive calls to collect(int).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Collector

public Collector()
Method Detail

setScorer

public abstract void setScorer(Scorer scorer)
                        throws IOException
Called before successive calls to collect(int). Implementations that need the score of the current document (passed-in to collect(int)), should save the passed-in Scorer and call scorer.score() when needed.

Throws:
IOException

collect

public abstract void collect(int doc)
                      throws IOException
Called once for every document matching a query, with the unbased document number.

Note: This is called in an inner search loop. For good search performance, implementations of this method should not call Searcher.doc(int) or IndexReader.document(int) on every hit. Doing so can slow searches by an order of magnitude or more.

Throws:
IOException

setNextReader

public abstract void setNextReader(IndexReader reader,
                                   int docBase)
                            throws IOException
Called before collecting from each IndexReader. All doc ids in collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in collect(int).

Parameters:
reader - next IndexReader
docBase -
Throws:
IOException

acceptsDocsOutOfOrder

public abstract boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ComplexExplanation

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class ComplexExplanation

java.lang.Object
    extended by  org.apache.lucene.search.Explanation
        extended by  org.apache.lucene.search.ComplexExplanation
All Implemented Interfaces:
Serializable
public class ComplexExplanation
extends Explanation

Expert: Describes the score computation for document and query, and can distinguish a match independent of a positive value.

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.Explanation
Explanation.IDFExplanation
Constructor Summary
ComplexExplanation()
ComplexExplanation(boolean match, float value, String description)
Method Summary
Boolean | getMatch() The match status of this explanation node.
protected String | getSummary() A short one line summary which should contain all high level information about this Explanation, without the "Details"
boolean | isMatch() Indicates whether or not this Explanation models a good match.
void | setMatch(Boolean match) Sets the match status assigned to this explanation node.
Methods inherited from class org.apache.lucene.search.Explanation
addDetail, getDescription, getDetails, getValue, setDescription, setValue, toHtml, toString, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ComplexExplanation

public ComplexExplanation()

ComplexExplanation

public ComplexExplanation(boolean match,
                          float value,
                          String description)
Method Detail

getMatch

public Boolean getMatch()
The match status of this explanation node.

Returns:
May be null if match status is unknown

setMatch

public void setMatch(Boolean match)
Sets the match status assigned to this explanation node.

Parameters:
match - May be null if match status is unknown

isMatch

public boolean isMatch()
Indicates whether or not this Explanation models a good match.

If the match status is explicitly set (i.e.: not null) this method uses it; otherwise it defers to the superclass.

Overrides:
isMatch in class Explanation
See Also:
getMatch()

getSummary

protected String getSummary()
Description copied from class: Explanation
A short one line summary which should contain all high level information about this Explanation, without the "Details"

Overrides:
getSummary in class Explanation
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ConstantScoreQuery.ConstantScorer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class ConstantScoreQuery.ConstantScorer

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSetIterator
        extended by  org.apache.lucene.search.Scorer
            extended by  org.apache.lucene.search.ConstantScoreQuery.ConstantScorer
Enclosing class:
ConstantScoreQuery
protected class ConstantScoreQuery.ConstantScorer
extends Scorer

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.Scorer
Scorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer>
Field Summary
Fields inherited from class org.apache.lucene.search.Scorer
weight
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
Constructor Summary
ConstantScoreQuery.ConstantScorer(Similarity similarity, DocIdSetIterator docIdSetIterator, Weight w)
Method Summary
 int advance(int target)
Advances to the first beyond (see NOTE below) the current whose document number is greater than or equal to target.
 int docID()
Returns the following: -1 or DocIdSetIterator.NO_MORE_DOCS if DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) were not called yet.
 int nextDoc()
Advances to the next document in the set and returns the doc it is currently on, or DocIdSetIterator.NO_MORE_DOCS if there are no more docs in the set.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.
 float score()
Returns the score of the current document matching the query.
 void score(Collector collector)
Scores and collects all matching documents.
protected  boolean score(Collector collector, int max, int firstDocID)
Expert: Collects matching documents in a range.
Methods inherited from class org.apache.lucene.search.Scorer
freq, getSimilarity, visitScorers, visitSubScorers
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ConstantScoreQuery.ConstantScorer

public ConstantScoreQuery.ConstantScorer(Similarity similarity,
                                         DocIdSetIterator docIdSetIterator,
                                         Weight w)
                                  throws IOException
Throws:
IOException
Method Detail

nextDoc

public int nextDoc()
            throws IOException
Description copied from class: DocIdSetIterator
Advances to the next document in the set and returns the doc it is currently on, or DocIdSetIterator.NO_MORE_DOCS if there are no more docs in the set.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.

Specified by:
nextDoc in class DocIdSetIterator
Throws:
IOException

docID

public int docID()
Description copied from class: DocIdSetIterator
Returns the following:
  • -1 or DocIdSetIterator.NO_MORE_DOCS if DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) were not called yet.
  • DocIdSetIterator.NO_MORE_DOCS if the iterator has exhausted.
  • Otherwise it should return the doc ID it is currently on.

Specified by:
docID in class DocIdSetIterator

score

public float score()
            throws IOException
Description copied from class: Scorer
Returns the score of the current document matching the query. Initially invalid, until DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) is called the first time, or when called from within Collector.collect(int).

Specified by:
score in class Scorer
Throws:
IOException

advance

public int advance(int target)
            throws IOException
Description copied from class: DocIdSetIterator
Advances to the first beyond (see NOTE below) the current whose document number is greater than or equal to target. Returns the current document number or DocIdSetIterator.NO_MORE_DOCS if there are no more docs in the set.

Behaves as if written:

 int advance(int target) {
   int doc;
   while ((doc = nextDoc()) < target) {
   }
   return doc;
 }
Some implementations are considerably more efficient than that.

NOTE: when target ≤ current implementations may opt not to advance beyond their current DocIdSetIterator.docID().

NOTE: this method may be called with DocIdSetIterator.NO_MORE_DOCS for efficiency by some Scorers. If your implementation cannot efficiently determine that it should exhaust, it is recommended that you check for that value in each call to this method.

NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.

Specified by:
advance in class DocIdSetIterator
Throws:
IOException

score

public void score(Collector collector)
           throws IOException
Description copied from class: Scorer
Scores and collects all matching documents.

Overrides:
score in class Scorer
Parameters:
collector - The collector to which all matching documents are passed.
Throws:
IOException

score

protected boolean score(Collector collector,
                        int max,
                        int firstDocID)
                 throws IOException
Description copied from class: Scorer
Expert: Collects matching documents in a range. Hook for optimization. Note, firstDocID is added to ensure that DocIdSetIterator.nextDoc() was called before this method.

NOTE: Because of backwards compatibility, this method is still declared as protected, but it is intended to be public, because it's called from other classes (like BooleanScorer). If you subclass Scorer, you should declare the overridden method as public to ease transition to Lucene 4.0, where it will be public.

Overrides:
score in class Scorer
Parameters:
collector - The collector to which all matching documents are passed.
max - Do not score documents past this.
firstDocID - The first document ID (ensures DocIdSetIterator.nextDoc() is called before this method.
Returns:
true if more matching documents may remain.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ConstantScoreQuery.ConstantWeight

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class ConstantScoreQuery.ConstantWeight

java.lang.Object
    extended by  org.apache.lucene.search.Weight
        extended by  org.apache.lucene.search.ConstantScoreQuery.ConstantWeight
All Implemented Interfaces:
Serializable
Enclosing class:
ConstantScoreQuery
protected class ConstantScoreQuery.ConstantWeight
extends Weight

See Also:
Serialized Form

Constructor Summary
ConstantScoreQuery.ConstantWeight(Searcher searcher)
Method Summary
Explanation | explain(IndexReader reader, int doc) An explanation of the score computation for the named document.
Query | getQuery() The query that this concerns.
float | getValue() The weight for this query.
void | normalize(float norm) Assigns the query normalization factor to this.
Scorer | scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.
boolean | scoresDocsOutOfOrder() Returns true iff this implementation scores docs only out of order.
float | sumOfSquaredWeights() The sum of squared weights of contained query clauses.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ConstantScoreQuery.ConstantWeight

public ConstantScoreQuery.ConstantWeight(Searcher searcher)
                                  throws IOException
Throws:
IOException
Method Detail

getQuery

public Query getQuery()
Description copied from class: Weight
The query that this concerns.

Specified by:
getQuery in class Weight

getValue

public float getValue()
Description copied from class: Weight
The weight for this query.

Specified by:
getValue in class Weight

sumOfSquaredWeights

public float sumOfSquaredWeights()
                          throws IOException
Description copied from class: Weight
The sum of squared weights of contained query clauses.

Specified by:
sumOfSquaredWeights in class Weight
Throws:
IOException

normalize

public void normalize(float norm)
Description copied from class: Weight
Assigns the query normalization factor to this.

Specified by:
normalize in class Weight

scorer

public Scorer scorer(IndexReader reader,
                     boolean scoreDocsInOrder,
                     boolean topScorer)
              throws IOException
Description copied from class: Weight
Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.

NOTE: even if scoreDocsInOrder is false, it is recommended to check whether the returned Scorer indeed scores documents out of order (i.e., call Weight.scoresDocsOutOfOrder()), as some Scorer implementations will always return documents in-order.
NOTE: null can be returned if no documents will be scored by this query.

Specified by:
scorer in class Weight
Parameters:
reader - the IndexReader for which to return the Scorer.
scoreDocsInOrder - specifies whether in-order scoring of documents is required. Note that if set to false (i.e., out-of-order scoring is required), this method can return whatever scoring mode it supports, as every in-order scorer is also an out-of-order one. However, an out-of-order scorer may not support DocIdSetIterator.nextDoc() and/or DocIdSetIterator.advance(int), therefore it is recommended to request an in-order scorer if use of these methods is required.
topScorer - if true, Scorer.score(Collector) will be called; if false, DocIdSetIterator.nextDoc() and/or DocIdSetIterator.advance(int) will be called.
Returns:
a Scorer which scores documents in/out-of order.
Throws:
IOException

scoresDocsOutOfOrder

public boolean scoresDocsOutOfOrder()
Description copied from class: Weight
Returns true iff this implementation scores docs only out of order. This method is used in conjunction with Collector's acceptsDocsOutOfOrder and Weight.scorer(org.apache.lucene.index.IndexReader, boolean, boolean) to create a matching Scorer instance for a given Collector, or vice versa.

NOTE: the default implementation returns false, i.e. the Scorer scores documents in-order.

Overrides:
scoresDocsOutOfOrder in class Weight

explain

public Explanation explain(IndexReader reader,
                           int doc)
                    throws IOException
Description copied from class: Weight
An explanation of the score computation for the named document.

Specified by:
explain in class Weight
Parameters:
reader - sub-reader containing the give doc
Returns:
an Explanation for the score
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ConstantScoreQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class ConstantScoreQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.ConstantScoreQuery
All Implemented Interfaces:
Serializable, Cloneable
public class ConstantScoreQuery
extends Query

A query that wraps another query or a filter and simply returns a constant score equal to the query boost for every document that matches the filter or query. For queries it therefore simply strips of all scores and returns a constant one.

NOTE: if the wrapped filter is an instance of CachingWrapperFilter, you'll likely want to enforce deletions in the filter (using either CachingWrapperFilter.DeletesMode.RECACHE or CachingWrapperFilter.DeletesMode.DYNAMIC).

See Also:
Serialized Form

Nested Class Summary
protected class | ConstantScoreQuery.ConstantScorer
protected class | ConstantScoreQuery.ConstantWeight
Field Summary
protected Filter | filter
protected Query | query
Constructor Summary
ConstantScoreQuery(Filter filter)
Wraps a Filter as a Query.
ConstantScoreQuery(Query query)
Strips off scores from the passed in Query.
Method Summary
Weight | createWeight(Searcher searcher) Expert: Constructs an appropriate Weight implementation for this query.
boolean | equals(Object o)
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
Filter | getFilter() Returns the encapsulated filter, returns null if a query is wrapped.
Query | getQuery() Returns the encapsulated query, returns null if a filter is wrapped.
int | hashCode()
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.Query
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

filter

protected final Filter filter

query

protected final Query query
Constructor Detail

ConstantScoreQuery

public ConstantScoreQuery(Query query)
Strips off scores from the passed in Query. The hits will get a constant score dependent on the boost factor of this query.

ConstantScoreQuery

public ConstantScoreQuery(Filter filter)
Wraps a Filter as a Query. The hits will get a constant score dependent on the boost factor of this query. If you simply want to strip off scores from a Query, no longer use new ConstantScoreQuery(new QueryWrapperFilter(query)), instead use ConstantScoreQuery(Query)!

Method Detail

getFilter

public Filter getFilter()
Returns the encapsulated filter, returns null if a query is wrapped.

getQuery

public Query getQuery()
Returns the encapsulated query, returns null if a filter is wrapped.

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

createWeight

public Weight createWeight(Searcher searcher)
                    throws IOException
Description copied from class: Query
Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Overrides:
createWeight in class Query
Throws:
IOException

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

equals

public boolean equals(Object o)
Overrides:
equals in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DefaultSimilarity

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class DefaultSimilarity

java.lang.Object
    extended by  org.apache.lucene.search.Similarity
        extended by  org.apache.lucene.search.DefaultSimilarity
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SweetSpotSimilarity
public class DefaultSimilarity
extends Similarity

Expert: Default scoring implementation.

See Also:
Serialized Form

Field Summary
protected  boolean discountOverlaps
Fields inherited from class org.apache.lucene.search.Similarity
NO_DOC_ID_PROVIDED
Constructor Summary
DefaultSimilarity()
Method Summary
 float computeNorm(String field, FieldInvertState state)
Implemented as state.getBoost()*lengthNorm(numTerms), where numTerms is FieldInvertState.getLength() if setDiscountOverlaps(boolean) is false, else it's FieldInvertState.getLength() - FieldInvertState.getNumOverlap().
 float coord(int overlap, int maxOverlap)
Implemented as overlap / maxOverlap.
 boolean getDiscountOverlaps()
 float idf(int docFreq, int numDocs)
Implemented as log(numDocs/(docFreq+1)) + 1.
 float queryNorm(float sumOfSquaredWeights)
Implemented as 1/sqrt(sumOfSquaredWeights).
 void setDiscountOverlaps(boolean v)
Determines whether overlap tokens (Tokens with 0 position increment) are ignored when computing norm.
 float sloppyFreq(int distance)
Implemented as 1 / (distance + 1).
 float tf(float freq)
Implemented as sqrt(freq).
Methods inherited from class org.apache.lucene.search.Similarity
decodeNorm, decodeNormValue, encodeNorm, encodeNormValue, getDefault, getNormDecoder, idfExplain, idfExplain, idfExplain, lengthNorm, scorePayload, setDefault, tf
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

discountOverlaps

protected boolean discountOverlaps
Constructor Detail

DefaultSimilarity

public DefaultSimilarity()
Method Detail

computeNorm

public float computeNorm(String field,
                         FieldInvertState state)
Implemented as state.getBoost()*lengthNorm(numTerms), where numTerms is FieldInvertState.getLength() if setDiscountOverlaps(boolean) is false, else it's FieldInvertState.getLength() - FieldInvertState.getNumOverlap().

Specified by:
computeNorm in class Similarity
Parameters:
field - field name
state - current processing state for this field
Returns:
the calculated float norm
WARNING: This API is experimental and might change in incompatible ways in the next release.

queryNorm

public float queryNorm(float sumOfSquaredWeights)
Implemented as 1/sqrt(sumOfSquaredWeights).

Specified by:
queryNorm in class Similarity
Parameters:
sumOfSquaredWeights - the sum of the squares of query term weights
Returns:
a normalization factor for query weights

tf

public float tf(float freq)
Implemented as sqrt(freq).

Specified by:
tf in class Similarity
Parameters:
freq - the frequency of a term within a document
Returns:
a score factor based on a term's within-document frequency

sloppyFreq

public float sloppyFreq(int distance)
Implemented as 1 / (distance + 1).

Specified by:
sloppyFreq in class Similarity
Parameters:
distance - the edit distance of this sloppy phrase match
Returns:
the frequency increment for this match
See Also:
PhraseQuery.setSlop(int)

idf

public float idf(int docFreq,
                 int numDocs)
Implemented as log(numDocs/(docFreq+1)) + 1.

Specified by:
idf in class Similarity
Parameters:
docFreq - the number of documents which contain the term
numDocs - the total number of documents in the collection
Returns:
a score factor based on the term's document frequency

coord

public float coord(int overlap,
                   int maxOverlap)
Implemented as overlap / maxOverlap.

Specified by:
coord in class Similarity
Parameters:
overlap - the number of query terms matched in the document
maxOverlap - the total number of terms in the query
Returns:
a score factor based on term overlap with the query

setDiscountOverlaps

public void setDiscountOverlaps(boolean v)
Determines whether overlap tokens (Tokens with 0 position increment) are ignored when computing norm. By default this is true, meaning overlap tokens do not count when computing norms.

See Also:
computeNorm(java.lang.String, org.apache.lucene.index.FieldInvertState)
WARNING: This API is experimental and might change in incompatible ways in the next release.

getDiscountOverlaps

public boolean getDiscountOverlaps()
See Also:
setDiscountOverlaps(boolean)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DisjunctionMaxQuery.DisjunctionMaxWeight

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class DisjunctionMaxQuery.DisjunctionMaxWeight

java.lang.Object
    extended by  org.apache.lucene.search.Weight
        extended by  org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight
All Implemented Interfaces:
Serializable
Enclosing class:
DisjunctionMaxQuery
protected class DisjunctionMaxQuery.DisjunctionMaxWeight
extends Weight

Expert: the Weight for DisjunctionMaxQuery, used to normalize, score and explain these queries.

NOTE: this API and implementation is subject to change suddenly in the next release.

See Also:
Serialized Form

Field Summary
protected Similarity | similarity The Similarity implementation.
protected ArrayList<Weight> | weights The Weights for our subqueries, in 1-1 correspondence with disjuncts
Constructor Summary
DisjunctionMaxQuery.DisjunctionMaxWeight(Searcher searcher)
Construct the Weight for this Query searched by searcher.
Method Summary
Explanation | explain(IndexReader reader, int doc) Explain the score we computed for doc
Query | getQuery() Return our associated DisjunctionMaxQuery
float | getValue() Return our boost
void | normalize(float norm) Apply the computed normalization factor to our subqueries
Scorer | scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) Create the scorer used to score our associated DisjunctionMaxQuery
float | sumOfSquaredWeights() Compute the sub of squared weights of us applied to our subqueries.
Methods inherited from class org.apache.lucene.search.Weight
scoresDocsOutOfOrder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

similarity

protected Similarity similarity
The Similarity implementation.

weights

protected ArrayList<Weight> weights
The Weights for our subqueries, in 1-1 correspondence with disjuncts

Constructor Detail

DisjunctionMaxQuery.DisjunctionMaxWeight

public DisjunctionMaxQuery.DisjunctionMaxWeight(Searcher searcher)
                                         throws IOException
Construct the Weight for this Query searched by searcher. Recursively construct subquery weights.

Throws:
IOException
Method Detail

getQuery

public Query getQuery()
Return our associated DisjunctionMaxQuery

Specified by:
getQuery in class Weight

getValue

public float getValue()
Return our boost

Specified by:
getValue in class Weight

sumOfSquaredWeights

public float sumOfSquaredWeights()
                          throws IOException
Compute the sub of squared weights of us applied to our subqueries. Used for normalization.

Specified by:
sumOfSquaredWeights in class Weight
Throws:
IOException

normalize

public void normalize(float norm)
Apply the computed normalization factor to our subqueries

Specified by:
normalize in class Weight

scorer

public Scorer scorer(IndexReader reader,
                     boolean scoreDocsInOrder,
                     boolean topScorer)
              throws IOException
Create the scorer used to score our associated DisjunctionMaxQuery

Specified by:
scorer in class Weight
Parameters:
reader - the IndexReader for which to return the Scorer.
scoreDocsInOrder - specifies whether in-order scoring of documents is required. Note that if set to false (i.e., out-of-order scoring is required), this method can return whatever scoring mode it supports, as every in-order scorer is also an out-of-order one. However, an out-of-order scorer may not support DocIdSetIterator.nextDoc() and/or DocIdSetIterator.advance(int), therefore it is recommended to request an in-order scorer if use of these methods is required.
topScorer - if true, Scorer.score(Collector) will be called; if false, DocIdSetIterator.nextDoc() and/or DocIdSetIterator.advance(int) will be called.
Returns:
a Scorer which scores documents in/out-of order.
Throws:
IOException

explain

public Explanation explain(IndexReader reader,
                           int doc)
                    throws IOException
Explain the score we computed for doc

Specified by:
explain in class Weight
Parameters:
reader - sub-reader containing the give doc
Returns:
an Explanation for the score
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DisjunctionMaxQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class DisjunctionMaxQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.DisjunctionMaxQuery
All Implemented Interfaces:
Serializable, Cloneable, Iterable<Query>
public class DisjunctionMaxQuery
extends Query
implements Iterable<Query>

A query that generates the union of documents produced by its subqueries, and that scores each document with the maximum score for that document as produced by any subquery, plus a tie breaking increment for any additional matching subqueries. This is useful when searching for a word in multiple fields with different boost factors (so that the fields cannot be combined equivalently into a single search field). We want the primary score to be the one associated with the highest boost, not the sum of the field scores (as BooleanQuery would give). If the query is "albino elephant" this ensures that "albino" matching one field and "elephant" matching another gets a higher score than "albino" matching both fields. To get this result, use both BooleanQuery and DisjunctionMaxQuery: for each term a DisjunctionMaxQuery searches for it in each field, while the set of these DisjunctionMaxQuery's is combined into a BooleanQuery. The tie breaker capability allows results that include the same term in multiple fields to be judged better than results that include this term in only the best of those multiple fields, without confusing this with the better case of two different terms in the multiple fields.

See Also:
Serialized Form

Nested Class Summary
protected  class DisjunctionMaxQuery.DisjunctionMaxWeight
Expert: the Weight for DisjunctionMaxQuery, used to normalize, score and explain these queries.
Constructor Summary
DisjunctionMaxQuery(Collection<Query> disjuncts, float tieBreakerMultiplier)
Creates a new DisjunctionMaxQuery
DisjunctionMaxQuery(float tieBreakerMultiplier)
Creates a new empty DisjunctionMaxQuery.
Method Summary
void | add(Collection<Query> disjuncts) Add a collection of disjuncts to this disjunction via Iterable
void | add(Query query) Add a subquery to this disjunction
Object | clone() Create a shallow copy of us -- used in rewriting if necessary
Weight | createWeight(Searcher searcher) Create the Weight used to score us
boolean | equals(Object o) Return true iff we represent the same query as o
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
int | hashCode() Compute a hash code for hashing us
Iterator<Query> | iterator() An Iterator over the disjuncts
Query | rewrite(IndexReader reader) Optimize our representation and our subqueries representations
String | toString(String field) Prettyprint us.
Methods inherited from class org.apache.lucene.search.Query
combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

DisjunctionMaxQuery

public DisjunctionMaxQuery(float tieBreakerMultiplier)
Creates a new empty DisjunctionMaxQuery. Use add() to add the subqueries.

Parameters:
tieBreakerMultiplier - the score of each non-maximum disjunct for a document is multiplied by this weight and added into the final score. If non-zero, the value should be small, on the order of 0.1, which says that 10 occurrences of word in a lower-scored field that is also in a higher scored field is just as good as a unique word in the lower scored field (i.e., one that is not in any higher scored field.

DisjunctionMaxQuery

public DisjunctionMaxQuery(Collection<Query> disjuncts,
                           float tieBreakerMultiplier)
Creates a new DisjunctionMaxQuery

Parameters:
disjuncts - a Collection of all the disjuncts to add
tieBreakerMultiplier - the weight to give to each matching non-maximum disjunct
Method Detail

add

public void add(Query query)
Add a subquery to this disjunction

Parameters:
query - the disjunct added

add

public void add(Collection<Query> disjuncts)
Add a collection of disjuncts to this disjunction via Iterable

iterator

public Iterator<Query> iterator()
An Iterator over the disjuncts

Specified by:
iterator in interface Iterable<Query>

createWeight

public Weight createWeight(Searcher searcher)
                    throws IOException
Create the Weight used to score us

Overrides:
createWeight in class Query
Throws:
IOException

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Optimize our representation and our subqueries representations

Overrides:
rewrite in class Query
Parameters:
reader - the IndexReader we query
Returns:
an optimized copy of us (which may not be a copy if there is nothing to optimize)
Throws:
IOException

clone

public Object clone()
Create a shallow copy of us -- used in rewriting if necessary

Overrides:
clone in class Query
Returns:
a copy of us (but reuse, don't copy, our subqueries)

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

toString

public String toString(String field)
Prettyprint us.

Specified by:
toString in class Query
Parameters:
field - the field to which we are applied
Returns:
a string that shows what we do, of the form "(disjunct1 | disjunct2 | ... | disjunctn)^boost"

equals

public boolean equals(Object o)
Return true iff we represent the same query as o

Overrides:
equals in class Query
Parameters:
o - another object
Returns:
true iff o is a DisjunctionMaxQuery with the same boost and the same subqueries, in the same order, as us

hashCode

public int hashCode()
Compute a hash code for hashing us

Overrides:
hashCode in class Query
Returns:
the hash code
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DocIdSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class DocIdSet

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSet
Direct Known Subclasses:
DocIdBitSet, FieldCacheDocIdSet, FilteredDocIdSet, FixedBitSet, OpenBitSet, SortedVIntList
public abstract class DocIdSet
extends Object

A DocIdSet contains a set of doc ids. Implementing classes must only implement iterator() to provide access to the set.

Field Summary
static DocIdSet EMPTY_DOCIDSET
An empty DocIdSet instance for easy use, e.g.
Constructor Summary
DocIdSet()
Method Summary
boolean | isCacheable() This method is a hint for CachingWrapperFilter, if this DocIdSet should be cached without copying it into a BitSet.
abstract DocIdSetIterator | iterator() Provides a DocIdSetIterator to access the set.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

EMPTY_DOCIDSET

public static final DocIdSet EMPTY_DOCIDSET
An empty DocIdSet instance for easy use, e.g. in Filters that hit no documents.

Constructor Detail

DocIdSet

public DocIdSet()
Method Detail

iterator

public abstract DocIdSetIterator iterator()
                                   throws IOException
Provides a DocIdSetIterator to access the set. This implementation can return null or EMPTY_DOCIDSET.iterator() if there are no docs that match.

Throws:
IOException

isCacheable

public boolean isCacheable()
This method is a hint for CachingWrapperFilter, if this DocIdSet should be cached without copying it into a BitSet. The default is to return false. If you have an own DocIdSet implementation that does its iteration very effective and fast without doing disk I/O, override this method and return true.

Overview  Package   Class  Use  Tree  Deprecated  Index  Help
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DocIdSetIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class DocIdSetIterator

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSetIterator
Direct Known Subclasses:
FilteredDocIdSetIterator, OpenBitSetIterator, Scorer
public abstract class DocIdSetIterator
extends Object

This abstract class defines methods to iterate over a set of non-decreasing doc ids. Note that this class assumes it iterates on doc Ids, and therefore NO_MORE_DOCS is set to 2147483647 in order to be used as a sentinel object. Implementations of this class are expected to consider Integer.MAX_VALUE as an invalid value.

Field Summary
static int NO_MORE_DOCS
When returned by nextDoc(), advance(int) and docID() it means there are no more docs in the iterator.
Constructor Summary
DocIdSetIterator()
Method Summary
abstract  int advance(int target)
Advances to the first beyond (see NOTE below) the current whose document number is greater than or equal to target.
abstract  int docID()
Returns the following: -1 or NO_MORE_DOCS if nextDoc() or advance(int) were not called yet.
abstract  int nextDoc()
Advances to the next document in the set and returns the doc it is currently on, or NO_MORE_DOCS if there are no more docs in the set.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

NO_MORE_DOCS

public static final int NO_MORE_DOCS
When returned by nextDoc(), advance(int) and docID() it means there are no more docs in the iterator.

See Also:
Constant Field Values
Constructor Detail

DocIdSetIterator

public DocIdSetIterator()
Method Detail

docID

public abstract int docID()
Returns the following:
  • -1 or NO_MORE_DOCS if nextDoc() or advance(int) were not called yet.
  • NO_MORE_DOCS if the iterator has exhausted.
  • Otherwise it should return the doc ID it is currently on.

Since:
2.9

nextDoc

public abstract int nextDoc()
                     throws IOException
Advances to the next document in the set and returns the doc it is currently on, or NO_MORE_DOCS if there are no more docs in the set.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.

Throws:
IOException
Since:
2.9

advance

public abstract int advance(int target)
                     throws IOException
Advances to the first beyond (see NOTE below) the current whose document number is greater than or equal to target. Returns the current document number or NO_MORE_DOCS if there are no more docs in the set.

Behaves as if written:

 int advance(int target) {
   int doc;
   while ((doc = nextDoc()) < target) {
   }
   return doc;
 }
Some implementations are considerably more efficient than that.

NOTE: when target ≤ current implementations may opt not to advance beyond their current docID().

NOTE: this method may be called with NO_MORE_DOCS for efficiency by some Scorers. If your implementation cannot efficiently determine that it should exhaust, it is recommended that you check for that value in each call to this method.

NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.

Throws:
IOException
Since:
2.9
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DuplicateFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class DuplicateFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.DuplicateFilter
All Implemented Interfaces:
Serializable
public class DuplicateFilter
extends Filter

See Also:
Serialized Form

Field Summary
static int | KM_USE_FIRST_OCCURRENCE
static int | KM_USE_LAST_OCCURRENCE
static int | PM_FAST_INVALIDATION
static int | PM_FULL_VALIDATION
Constructor Summary
DuplicateFilter(String fieldName)
DuplicateFilter(String fieldName, int keepMode, int processingMode)
Method Summary
boolean | equals(Object obj)
DocIdSet | getDocIdSet(IndexReader reader) Creates a DocIdSet enumerating the documents that should be permitted in search results.
String | getFieldName()
int | getKeepMode()
int | getProcessingMode()
int | hashCode()
void | setFieldName(String fieldName)
void | setKeepMode(int keepMode)
void | setProcessingMode(int processingMode)
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

KM_USE_FIRST_OCCURRENCE

public static final int KM_USE_FIRST_OCCURRENCE
See Also:
Constant Field Values

KM_USE_LAST_OCCURRENCE

public static final int KM_USE_LAST_OCCURRENCE
See Also:
Constant Field Values

PM_FULL_VALIDATION

public static final int PM_FULL_VALIDATION
See Also:
Constant Field Values

PM_FAST_INVALIDATION

public static final int PM_FAST_INVALIDATION
See Also:
Constant Field Values
Constructor Detail

DuplicateFilter

public DuplicateFilter(String fieldName)

DuplicateFilter

public DuplicateFilter(String fieldName,
                       int keepMode,
                       int processingMode)
Method Detail

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Description copied from class: Filter
Creates a DocIdSet enumerating the documents that should be permitted in search results. NOTE: null can be returned if no documents are accepted by this Filter.

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet

getFieldName

public String getFieldName()

setFieldName

public void setFieldName(String fieldName)

getKeepMode

public int getKeepMode()

setKeepMode

public void setKeepMode(int keepMode)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getProcessingMode

public int getProcessingMode()

setProcessingMode

public void setProcessingMode(int processingMode)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Explanation

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class Explanation

java.lang.Object
    extended by  org.apache.lucene.search.Explanation
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ComplexExplanation
public class Explanation
extends Object
implements Serializable

Expert: Describes the score computation for document and query.

See Also:
Serialized Form

Nested Class Summary
static class Explanation.IDFExplanation
Small Util class used to pass both an idf factor as well as an explanation for that factor.
Constructor Summary
Explanation()
Explanation(float value, String description)
Method Summary
void | addDetail(Explanation detail) Adds a sub-node to this explanation node.
String | getDescription() A description of this explanation node.
Explanation[] | getDetails() The sub-nodes of this explanation node.
protected String | getSummary() A short one line summary which should contain all high level information about this Explanation, without the "Details"
float | getValue() The value assigned to this explanation node.
boolean | isMatch() Indicates whether or not this Explanation models a good match.
void | setDescription(String description) Sets the description of this explanation node.
void | setValue(float value) Sets the value assigned to this explanation node.
String | toHtml() Render an explanation as HTML.
String | toString() Render an explanation as text.
protected String | toString(int depth)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Explanation

public Explanation()

Explanation

public Explanation(float value,
                   String description)
Method Detail

isMatch

public boolean isMatch()
Indicates whether or not this Explanation models a good match.

By default, an Explanation represents a "match" if the value is positive.

See Also:
getValue()

getValue

public float getValue()
The value assigned to this explanation node.

setValue

public void setValue(float value)
Sets the value assigned to this explanation node.

getDescription

public String getDescription()
A description of this explanation node.

setDescription

public void setDescription(String description)
Sets the description of this explanation node.

getSummary

protected String getSummary()
A short one line summary which should contain all high level information about this Explanation, without the "Details"

getDetails

public Explanation[] getDetails()
The sub-nodes of this explanation node.

addDetail

public void addDetail(Explanation detail)
Adds a sub-node to this explanation node.

toString

public String toString()
Render an explanation as text.

Overrides:
toString in class Object

toString

protected String toString(int depth)

toHtml

public String toHtml()
Render an explanation as HTML.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Explanation.IDFExplanation

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class Explanation.IDFExplanation

java.lang.Object
    extended by  org.apache.lucene.search.Explanation.IDFExplanation
All Implemented Interfaces:
Serializable
Enclosing class:
Explanation
public abstract static class Explanation.IDFExplanation
extends Object
implements Serializable

Small Util class used to pass both an idf factor as well as an explanation for that factor. This class will likely be held on a Weight, so be aware before storing any large or un-serializable fields.

See Also:
Serialized Form

Constructor Summary
Explanation.IDFExplanation()
Method Summary
abstract String | explain() This should be calculated lazily if possible.
abstract float | getIdf()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Explanation.IDFExplanation

public Explanation.IDFExplanation()
Method Detail

getIdf

public abstract float getIdf()
Returns:
the idf factor

explain

public abstract String explain()
This should be calculated lazily if possible.

Returns:
the explanation for the idf factor.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCache.ByteParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Interface FieldCache.ByteParser

All Superinterfaces:
FieldCache.Parser, Serializable
Enclosing interface:
FieldCache
public static interface FieldCache.ByteParser
extends FieldCache.Parser

Interface to parse bytes from document fields.

See Also:
FieldCache.getBytes(IndexReader, String, FieldCache.ByteParser)

Method Summary
 byte parseByte(String string)
Return a single Byte representation of this field's value.

Method Detail

parseByte

byte parseByte(String string)
Return a single Byte representation of this field's value.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCache.CacheEntry

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldCache.CacheEntry

java.lang.Object
    extended by  org.apache.lucene.search.FieldCache.CacheEntry
Enclosing interface:
FieldCache
public abstract static class FieldCache.CacheEntry
extends Object

EXPERT: A unique Identifier/Description for each item in the FieldCache. Can be useful for logging/debugging.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
FieldCache.CacheEntry()
Method Summary
void | estimateSize() Computes (and stores) the estimated size of the cache Value
abstract Class<?> | getCacheType()
abstract Object | getCustom()
String | getEstimatedSize() The most recently estimated size of the value, null unless estimateSize has been called.
abstract String | getFieldName()
abstract Object | getReaderKey()
abstract Object | getValue()
protected void | setEstimatedSize(String size)
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FieldCache.CacheEntry

public FieldCache.CacheEntry()
Method Detail

getReaderKey

public abstract Object getReaderKey()

getFieldName

public abstract String getFieldName()

getCacheType

public abstract Class<?> getCacheType()

getCustom

public abstract Object getCustom()

getValue

public abstract Object getValue()

setEstimatedSize

protected final void setEstimatedSize(String size)

estimateSize

public void estimateSize()
Computes (and stores) the estimated size of the cache Value

See Also:
getEstimatedSize()

getEstimatedSize

public final String getEstimatedSize()
The most recently estimated size of the value, null unless estimateSize has been called.

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCache.CreationPlaceholder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldCache.CreationPlaceholder

java.lang.Object
    extended by  org.apache.lucene.search.FieldCache.CreationPlaceholder
Enclosing interface:
FieldCache
public static final class FieldCache.CreationPlaceholder
extends Object

Constructor Summary
FieldCache.CreationPlaceholder()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldCache.CreationPlaceholder

public FieldCache.CreationPlaceholder()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCache.DoubleParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Interface FieldCache.DoubleParser

All Superinterfaces:
FieldCache.Parser, Serializable
Enclosing interface:
FieldCache
public static interface FieldCache.DoubleParser
extends FieldCache.Parser

Interface to parse doubles from document fields.

See Also:
FieldCache.getDoubles(IndexReader, String, FieldCache.DoubleParser)

Method Summary
 double parseDouble(String string)
Return an long representation of this field's value.

Method Detail

parseDouble

double parseDouble(String string)
Return an long representation of this field's value.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCache.FloatParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Interface FieldCache.FloatParser

All Superinterfaces:
FieldCache.Parser, Serializable
Enclosing interface:
FieldCache
public static interface FieldCache.FloatParser
extends FieldCache.Parser

Interface to parse floats from document fields.

See Also:
FieldCache.getFloats(IndexReader, String, FieldCache.FloatParser)

Method Summary
 float parseFloat(String string)
Return an float representation of this field's value.

Method Detail

parseFloat

float parseFloat(String string)
Return an float representation of this field's value.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCache

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Interface FieldCache

public interface FieldCache

Expert: Maintains caches of term values.

Created: May 19, 2004 11:13:14 AM

Since:
lucene 1.4
See Also:
FieldCacheSanityChecker

Nested Class Summary
static interface | FieldCache.ByteParser Interface to parse bytes from document fields.
static class | FieldCache.CacheEntry EXPERT: A unique Identifier/Description for each item in the FieldCache.
static class | FieldCache.CreationPlaceholder
static interface | FieldCache.DoubleParser Interface to parse doubles from document fields.
static interface | FieldCache.FloatParser Interface to parse floats from document fields.
static interface | FieldCache.IntParser Interface to parse ints from document fields.
static interface | FieldCache.LongParser Interface to parse long from document fields.
static interface | FieldCache.Parser Marker interface as super-interface to all parsers.
static interface | FieldCache.ShortParser Interface to parse shorts from document fields.
static class | FieldCache.StringIndex Expert: Stores term text values and document ordering data.
Field Summary
static FieldCache | DEFAULT Expert: The cache used internally by sorting and range query classes.
static FieldCache.ByteParser | DEFAULT_BYTE_PARSER The default parser for byte values, which are encoded by Byte.toString(byte)
static FieldCache.DoubleParser | DEFAULT_DOUBLE_PARSER The default parser for double values, which are encoded by Double.toString(double)
static FieldCache.FloatParser | DEFAULT_FLOAT_PARSER The default parser for float values, which are encoded by Float.toString(float)
static FieldCache.IntParser | DEFAULT_INT_PARSER The default parser for int values, which are encoded by Integer.toString(int)
static FieldCache.LongParser | DEFAULT_LONG_PARSER The default parser for long values, which are encoded by Long.toString(long)
static FieldCache.ShortParser | DEFAULT_SHORT_PARSER The default parser for short values, which are encoded by Short.toString(short)
static FieldCache.DoubleParser | NUMERIC_UTILS_DOUBLE_PARSER A parser instance for double values encoded with NumericUtils, e.g.
static FieldCache.FloatParser | NUMERIC_UTILS_FLOAT_PARSER A parser instance for float values encoded with NumericUtils, e.g.
static FieldCache.IntParser | NUMERIC_UTILS_INT_PARSER A parser instance for int values encoded by NumericUtils.intToPrefixCoded(int), e.g.
static FieldCache.LongParser | NUMERIC_UTILS_LONG_PARSER A parser instance for long values encoded by NumericUtils.longToPrefixCoded(long), e.g.
static int | STRING_INDEX Indicator for StringIndex values in the cache.
Method Summary
 byte[] getBytes(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as a single byte and returns an array of size reader.maxDoc() of the value each document has in the given field.
 byte[] getBytes(IndexReader reader, String field, FieldCache.ByteParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as bytes and returns an array of size reader.maxDoc() of the value each document has in the given field.
 byte[] getBytes(IndexReader reader, String field, FieldCache.ByteParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as bytes and returns an array of size reader.maxDoc() of the value each document has in the given field.
 FieldCache.CacheEntry[] getCacheEntries()
EXPERT: Generates an array of CacheEntry objects representing all items currently in the FieldCache.
 Bits getDocsWithField(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field and returns a bit set at the size of reader.maxDoc(), with turned on bits for each docid that does have a value for this field.
 double[] getDoubles(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
 double[] getDoubles(IndexReader reader, String field, FieldCache.DoubleParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as doubles and returns an array of size reader.maxDoc() of the value each document has in the given field.
 double[] getDoubles(IndexReader reader, String field, FieldCache.DoubleParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as doubles and returns an array of size reader.maxDoc() of the value each document has in the given field.
 float[] getFloats(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.
 float[] getFloats(IndexReader reader, String field, FieldCache.FloatParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.
 float[] getFloats(IndexReader reader, String field, FieldCache.FloatParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.
 PrintStream getInfoStream()
counterpart of setInfoStream(PrintStream)
 int[] getInts(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
 int[] getInts(IndexReader reader, String field, FieldCache.IntParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
 int[] getInts(IndexReader reader, String field, FieldCache.IntParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
 long[] getLongs(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.
 long[] getLongs(IndexReader reader, String field, FieldCache.LongParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.
 long[] getLongs(IndexReader reader, String field, FieldCache.LongParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.
 short[] getShorts(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.
 short[] getShorts(IndexReader reader, String field, FieldCache.ShortParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.
 short[] getShorts(IndexReader reader, String field, FieldCache.ShortParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.
 FieldCache.StringIndex getStringIndex(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found reads the term values in field and returns an array of them in natural order, along with an array telling which element in the term array each document uses.
 String[] getStrings(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the term values in field and returns an array of size reader.maxDoc() containing the value each document has in the given field.
 void purge(IndexReader r)
Expert: drops all cache entries associated with this reader.
 void purgeAllCaches()
EXPERT: Instructs the FieldCache to forcibly expunge all entries from the underlying caches.
 void setInfoStream(PrintStream stream)
If non-null, FieldCacheImpl will warn whenever entries are created that are not sane according to FieldCacheSanityChecker.

Field Detail

STRING_INDEX

static final int STRING_INDEX
Indicator for StringIndex values in the cache.

See Also:
Constant Field Values

DEFAULT

static final FieldCache DEFAULT
Expert: The cache used internally by sorting and range query classes.

DEFAULT_BYTE_PARSER

static final FieldCache.ByteParser DEFAULT_BYTE_PARSER
The default parser for byte values, which are encoded by Byte.toString(byte)

DEFAULT_SHORT_PARSER

static final FieldCache.ShortParser DEFAULT_SHORT_PARSER
The default parser for short values, which are encoded by Short.toString(short)

DEFAULT_INT_PARSER

static final FieldCache.IntParser DEFAULT_INT_PARSER
The default parser for int values, which are encoded by Integer.toString(int)

DEFAULT_FLOAT_PARSER

static final FieldCache.FloatParser DEFAULT_FLOAT_PARSER
The default parser for float values, which are encoded by Float.toString(float)

DEFAULT_LONG_PARSER

static final FieldCache.LongParser DEFAULT_LONG_PARSER
The default parser for long values, which are encoded by Long.toString(long)

DEFAULT_DOUBLE_PARSER

static final FieldCache.DoubleParser DEFAULT_DOUBLE_PARSER
The default parser for double values, which are encoded by Double.toString(double)

NUMERIC_UTILS_INT_PARSER

static final FieldCache.IntParser NUMERIC_UTILS_INT_PARSER
A parser instance for int values encoded by NumericUtils.intToPrefixCoded(int), e.g. when indexed via NumericField/NumericTokenStream.

NUMERIC_UTILS_FLOAT_PARSER

static final FieldCache.FloatParser NUMERIC_UTILS_FLOAT_PARSER
A parser instance for float values encoded with NumericUtils, e.g. when indexed via NumericField/NumericTokenStream.

NUMERIC_UTILS_LONG_PARSER

static final FieldCache.LongParser NUMERIC_UTILS_LONG_PARSER
A parser instance for long values encoded by NumericUtils.longToPrefixCoded(long), e.g. when indexed via NumericField/NumericTokenStream.

NUMERIC_UTILS_DOUBLE_PARSER

static final FieldCache.DoubleParser NUMERIC_UTILS_DOUBLE_PARSER
A parser instance for double values encoded with NumericUtils, e.g. when indexed via NumericField/NumericTokenStream.

Method Detail

getDocsWithField

Bits getDocsWithField(IndexReader reader,
                      String field)
                      throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field and returns a bit set at the size of reader.maxDoc(), with turned on bits for each docid that does have a value for this field.

Throws:
IOException

getBytes

byte[] getBytes(IndexReader reader,
                String field)
                throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as a single byte and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the single byte values.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getBytes

byte[] getBytes(IndexReader reader,
                String field,
                FieldCache.ByteParser parser)
                throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as bytes and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the bytes.
parser - Computes byte for string values.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getBytes

byte[] getBytes(IndexReader reader,
                String field,
                FieldCache.ByteParser parser,
                boolean setDocsWithField)
                throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as bytes and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the bytes.
parser - Computes byte for string values.
setDocsWithField - If true then getDocsWithField(org.apache.lucene.index.IndexReader, java.lang.String) will also be computed and stored in the FieldCache.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getShorts

short[] getShorts(IndexReader reader,
                  String field)
                  throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the shorts.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getShorts

short[] getShorts(IndexReader reader,
                  String field,
                  FieldCache.ShortParser parser)
                  throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the shorts.
parser - Computes short for string values.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getShorts

short[] getShorts(IndexReader reader,
                  String field,
                  FieldCache.ShortParser parser,
                  boolean setDocsWithField)
                  throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the shorts.
parser - Computes short for string values.
setDocsWithField - If true then getDocsWithField(org.apache.lucene.index.IndexReader, java.lang.String) will also be computed and stored in the FieldCache.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getInts

int[] getInts(IndexReader reader,
              String field)
              throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the integers.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getInts

int[] getInts(IndexReader reader,
              String field,
              FieldCache.IntParser parser)
              throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the integers.
parser - Computes integer for string values.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getInts

int[] getInts(IndexReader reader,
              String field,
              FieldCache.IntParser parser,
              boolean setDocsWithField)
              throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the integers.
parser - Computes integer for string values.
setDocsWithField - If true then getDocsWithField(org.apache.lucene.index.IndexReader, java.lang.String) will also be computed and stored in the FieldCache.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getFloats

float[] getFloats(IndexReader reader,
                  String field)
                  throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the floats.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getFloats

float[] getFloats(IndexReader reader,
                  String field,
                  FieldCache.FloatParser parser)
                  throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the floats.
parser - Computes float for string values.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getFloats

float[] getFloats(IndexReader reader,
                  String field,
                  FieldCache.FloatParser parser,
                  boolean setDocsWithField)
                  throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the floats.
parser - Computes float for string values.
setDocsWithField - If true then getDocsWithField(org.apache.lucene.index.IndexReader, java.lang.String) will also be computed and stored in the FieldCache.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getLongs

long[] getLongs(IndexReader reader,
                String field)
                throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the longs.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getLongs

long[] getLongs(IndexReader reader,
                String field,
                FieldCache.LongParser parser)
                throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the longs.
parser - Computes integer for string values.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getLongs

long[] getLongs(IndexReader reader,
                String field,
                FieldCache.LongParser parser,
                boolean setDocsWithField)
                throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the longs.
parser - Computes integer for string values.
setDocsWithField - If true then getDocsWithField(org.apache.lucene.index.IndexReader, java.lang.String) will also be computed and stored in the FieldCache.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getDoubles

double[] getDoubles(IndexReader reader,
                    String field)
                    throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the doubles.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getDoubles

double[] getDoubles(IndexReader reader,
                    String field,
                    FieldCache.DoubleParser parser)
                    throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as doubles and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the doubles.
parser - Computes integer for string values.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getDoubles

double[] getDoubles(IndexReader reader,
                    String field,
                    FieldCache.DoubleParser parser,
                    boolean setDocsWithField)
                    throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as doubles and returns an array of size reader.maxDoc() of the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the doubles.
parser - Computes integer for string values.
setDocsWithField - If true then getDocsWithField(org.apache.lucene.index.IndexReader, java.lang.String) will also be computed and stored in the FieldCache.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getStrings

String[] getStrings(IndexReader reader,
                    String field)
                    throws IOException
Checks the internal cache for an appropriate entry, and if none is found, reads the term values in field and returns an array of size reader.maxDoc() containing the value each document has in the given field.

Parameters:
reader - Used to get field values.
field - Which field contains the strings.
Returns:
The values in the given field for each document.
Throws:
IOException - If any error occurs.

getStringIndex

FieldCache.StringIndex getStringIndex(IndexReader reader,
                                      String field)
                                      throws IOException
Checks the internal cache for an appropriate entry, and if none is found reads the term values in field and returns an array of them in natural order, along with an array telling which element in the term array each document uses.

Parameters:
reader - Used to get field values.
field - Which field contains the strings.
Returns:
Array of terms and index into the array for each document.
Throws:
IOException - If any error occurs.

getCacheEntries

FieldCache.CacheEntry[] getCacheEntries()
EXPERT: Generates an array of CacheEntry objects representing all items currently in the FieldCache.

NOTE: These CacheEntry objects maintain a strong reference to the Cached Values. Maintaining references to a CacheEntry the IndexReader associated with it has garbage collected will prevent the Value itself from being garbage collected when the Cache drops the WeakReference.

WARNING: This API is experimental and might change in incompatible ways in the next release.

purgeAllCaches

void purgeAllCaches()

EXPERT: Instructs the FieldCache to forcibly expunge all entries from the underlying caches. This is intended only to be used for test methods as a way to ensure a known base state of the Cache (with out needing to rely on GC to free WeakReferences). It should not be relied on for "Cache maintenance" in general application code.

WARNING: This API is experimental and might change in incompatible ways in the next release.

purge

void purge(IndexReader r)
Expert: drops all cache entries associated with this reader. NOTE: this reader must precisely match the reader that the cache entry is keyed on. If you pass a top-level reader, it usually will have no effect as Lucene now caches at the segment reader level.

setInfoStream

void setInfoStream(PrintStream stream)
If non-null, FieldCacheImpl will warn whenever entries are created that are not sane according to FieldCacheSanityChecker.

getInfoStream

PrintStream getInfoStream()
counterpart of setInfoStream(PrintStream)

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCache.IntParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Interface FieldCache.IntParser

All Superinterfaces:
FieldCache.Parser, Serializable
Enclosing interface:
FieldCache
public static interface FieldCache.IntParser
extends FieldCache.Parser

Interface to parse ints from document fields.

See Also:
FieldCache.getInts(IndexReader, String, FieldCache.IntParser)

Method Summary
 int parseInt(String string)
Return an integer representation of this field's value.

Method Detail

parseInt

int parseInt(String string)
Return an integer representation of this field's value.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCache.LongParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Interface FieldCache.LongParser

All Superinterfaces:
FieldCache.Parser, Serializable
Enclosing interface:
FieldCache
public static interface FieldCache.LongParser
extends FieldCache.Parser

Interface to parse long from document fields.

See Also:
FieldCache.getLongs(IndexReader, String, FieldCache.LongParser)

Method Summary
 long parseLong(String string)
Return an long representation of this field's value.

Method Detail

parseLong

long parseLong(String string)
Return an long representation of this field's value.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCache.Parser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Interface FieldCache.Parser

All Superinterfaces:
Serializable
All Known Subinterfaces:
FieldCache.ByteParser, FieldCache.DoubleParser, FieldCache.FloatParser, FieldCache.IntParser, FieldCache.LongParser, FieldCache.ShortParser
Enclosing interface:
FieldCache
public static interface FieldCache.Parser
extends Serializable

Marker interface as super-interface to all parsers. It is used to specify a custom parser to SortField.SortField(String, FieldCache.Parser).

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCache.ShortParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Interface FieldCache.ShortParser

All Superinterfaces:
FieldCache.Parser, Serializable
Enclosing interface:
FieldCache
public static interface FieldCache.ShortParser
extends FieldCache.Parser

Interface to parse shorts from document fields.

See Also:
FieldCache.getShorts(IndexReader, String, FieldCache.ShortParser)

Method Summary
 short parseShort(String string)
Return a short representation of this field's value.

Method Detail

parseShort

short parseShort(String string)
Return a short representation of this field's value.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCache.StringIndex

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldCache.StringIndex

java.lang.Object
    extended by  org.apache.lucene.search.FieldCache.StringIndex
Enclosing interface:
FieldCache
public static class FieldCache.StringIndex
extends Object

Expert: Stores term text values and document ordering data.

Field Summary
String[] | lookup All the term values, in natural order.
int[] | order For each document, an index into the lookup array.
Constructor Summary
FieldCache.StringIndex(int[] values, String[] lookup)
Creates one of these objects
Method Summary
 int binarySearchLookup(String key)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

lookup

public final String[] lookup
All the term values, in natural order.

order

public final int[] order
For each document, an index into the lookup array.

Constructor Detail

FieldCache.StringIndex

public FieldCache.StringIndex(int[] values,
                              String[] lookup)
Creates one of these objects

Method Detail

binarySearchLookup

public int binarySearchLookup(String key)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCacheDocIdSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldCacheDocIdSet

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSet
        extended by  org.apache.lucene.search.FieldCacheDocIdSet

public abstract class FieldCacheDocIdSet
extends DocIdSet

Base class for DocIdSet to be used with FieldCache. The implementation of its iterator is very stupid and slow if the implementation of the matchDoc(int) method is not optimized, as iterators simply increment the document id until matchDoc(int) returns true. Because of this matchDoc(int) must be as fast as possible and in no case do any I/O.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
protected  IndexReader reader
Fields inherited from class org.apache.lucene.search.DocIdSet
EMPTY_DOCIDSET
Constructor Summary
FieldCacheDocIdSet(IndexReader reader)
Method Summary
boolean | isCacheable() this DocIdSet is cacheable, if it works solely with FieldCache and no TermDocs
DocIdSetIterator | iterator() Provides a DocIdSetIterator to access the set.
protected abstract boolean | matchDoc(int doc) this method checks, if a doc is a hit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

reader

protected final IndexReader reader
Constructor Detail

FieldCacheDocIdSet

public FieldCacheDocIdSet(IndexReader reader)
Method Detail

matchDoc

protected abstract boolean matchDoc(int doc)
this method checks, if a doc is a hit

isCacheable

public final boolean isCacheable()
this DocIdSet is cacheable, if it works solely with FieldCache and no TermDocs

Overrides:
isCacheable in class DocIdSet

iterator

public final DocIdSetIterator iterator()
                                throws IOException
Description copied from class: DocIdSet
Provides a DocIdSetIterator to access the set. This implementation can return null or DocIdSet.EMPTY_DOCIDSET.iterator() if there are no docs that match.

Specified by:
iterator in class DocIdSet
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCacheRangeFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldCacheRangeFilter<T>

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.FieldCacheRangeFilter<T>
All Implemented Interfaces:
Serializable
public abstract class FieldCacheRangeFilter<T>
extends Filter

A range filter built on top of a cached single term field (in FieldCache).

FieldCacheRangeFilter builds a single cache for the field the first time it is used. Each subsequent FieldCacheRangeFilter on the same field then reuses this cache, even if the range itself changes.

This means that FieldCacheRangeFilter is much faster (sometimes more than 100x as fast) as building a TermRangeFilter, if using a newStringRange(java.lang.String, java.lang.String, java.lang.String, boolean, boolean). However, if the range never changes it is slower (around 2x as slow) than building a CachingWrapperFilter on top of a single TermRangeFilter. For numeric data types, this filter may be significantly faster than NumericRangeFilter. Furthermore, it does not need the numeric values encoded by NumericField. But it has the problem that it only works with exact one value/document (see below).

As with all FieldCache based functionality, FieldCacheRangeFilter is only valid for fields which exact one term for each document (except for newStringRange(java.lang.String, java.lang.String, java.lang.String, boolean, boolean) where 0 terms are also allowed). Due to a restriction of FieldCache, for numeric ranges all terms that do not have a numeric value, 0 is assumed.

Thus it works on dates, prices and other single value fields but will not work on regular text fields. It is preferable to use a NOT_ANALYZED field to ensure that there is only a single term.

This class does not have an constructor, use one of the static factory methods available, that create a correct instance for different data types supported by FieldCache.

See Also:
Serialized Form

Method Summary
 boolean equals(Object o)
abstract  DocIdSet getDocIdSet(IndexReader reader)
This method is implemented for each data type
 String getField()
Returns the field name for this filter
 T getLowerVal()
Returns the lower value of this range filter
 FieldCache.Parser getParser()
Returns the current numeric parser (null for T is String}
 T getUpperVal()
Returns the upper value of this range filter
 int hashCode()
 boolean includesLower()
Returns true if the lower endpoint is inclusive
 boolean includesUpper()
Returns true if the upper endpoint is inclusive
static FieldCacheRangeFilter<Byte> newByteRange(String field, Byte lowerVal, Byte upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getBytes(IndexReader,String).
static FieldCacheRangeFilter<Byte> newByteRange(String field, FieldCache.ByteParser parser, Byte lowerVal, Byte upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getBytes(IndexReader,String,FieldCache.ByteParser).
static FieldCacheRangeFilter<Double> newDoubleRange(String field, Double lowerVal, Double upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getDoubles(IndexReader,String).
static FieldCacheRangeFilter<Double> newDoubleRange(String field, FieldCache.DoubleParser parser, Double lowerVal, Double upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getDoubles(IndexReader,String,FieldCache.DoubleParser).
static FieldCacheRangeFilter<Float> newFloatRange(String field, FieldCache.FloatParser parser, Float lowerVal, Float upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getFloats(IndexReader,String,FieldCache.FloatParser).
static FieldCacheRangeFilter<Float> newFloatRange(String field, Float lowerVal, Float upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getFloats(IndexReader,String).
static FieldCacheRangeFilter<Integer> newIntRange(String field, FieldCache.IntParser parser, Integer lowerVal, Integer upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getInts(IndexReader,String,FieldCache.IntParser).
static FieldCacheRangeFilter<Integer> newIntRange(String field, Integer lowerVal, Integer upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getInts(IndexReader,String).
static FieldCacheRangeFilter<Long> newLongRange(String field, FieldCache.LongParser parser, Long lowerVal, Long upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getLongs(IndexReader,String,FieldCache.LongParser).
static FieldCacheRangeFilter<Long> newLongRange(String field, Long lowerVal, Long upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getLongs(IndexReader,String).
static FieldCacheRangeFilter<Short> newShortRange(String field, FieldCache.ShortParser parser, Short lowerVal, Short upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getShorts(IndexReader,String,FieldCache.ShortParser).
static FieldCacheRangeFilter<Short> newShortRange(String field, Short lowerVal, Short upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getShorts(IndexReader,String).
static FieldCacheRangeFilter<String> newStringRange(String field, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper)
Creates a string range filter using FieldCache.getStringIndex(org.apache.lucene.index.IndexReader, java.lang.String).
 String toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail

getDocIdSet

public abstract DocIdSet getDocIdSet(IndexReader reader)
                              throws IOException
This method is implemented for each data type

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet

newStringRange

public static FieldCacheRangeFilter<String> newStringRange(String field,
                                                           String lowerVal,
                                                           String upperVal,
                                                           boolean includeLower,
                                                           boolean includeUpper)
Creates a string range filter using FieldCache.getStringIndex(org.apache.lucene.index.IndexReader, java.lang.String). This works with all fields containing zero or one term in the field. The range can be half-open by setting one of the values to null.

newByteRange

public static FieldCacheRangeFilter<Byte> newByteRange(String field,
                                                       Byte lowerVal,
                                                       Byte upperVal,
                                                       boolean includeLower,
                                                       boolean includeUpper)
Creates a numeric range filter using FieldCache.getBytes(IndexReader,String). This works with all byte fields containing exactly one numeric term in the field. The range can be half-open by setting one of the values to null.

newByteRange

public static FieldCacheRangeFilter<Byte> newByteRange(String field,
                                                       FieldCache.ByteParser parser,
                                                       Byte lowerVal,
                                                       Byte upperVal,
                                                       boolean includeLower,
                                                       boolean includeUpper)
Creates a numeric range filter using FieldCache.getBytes(IndexReader,String,FieldCache.ByteParser). This works with all byte fields containing exactly one numeric term in the field. The range can be half-open by setting one of the values to null.

newShortRange

public static FieldCacheRangeFilter<Short> newShortRange(String field,
                                                         Short lowerVal,
                                                         Short upperVal,
                                                         boolean includeLower,
                                                         boolean includeUpper)
Creates a numeric range filter using FieldCache.getShorts(IndexReader,String). This works with all short fields containing exactly one numeric term in the field. The range can be half-open by setting one of the values to null.

newShortRange

public static FieldCacheRangeFilter<Short> newShortRange(String field,
                                                         FieldCache.ShortParser parser,
                                                         Short lowerVal,
                                                         Short upperVal,
                                                         boolean includeLower,
                                                         boolean includeUpper)
Creates a numeric range filter using FieldCache.getShorts(IndexReader,String,FieldCache.ShortParser). This works with all short fields containing exactly one numeric term in the field. The range can be half-open by setting one of the values to null.

newIntRange

public static FieldCacheRangeFilter<Integer> newIntRange(String field,
                                                         Integer lowerVal,
                                                         Integer upperVal,
                                                         boolean includeLower,
                                                         boolean includeUpper)
Creates a numeric range filter using FieldCache.getInts(IndexReader,String). This works with all int fields containing exactly one numeric term in the field. The range can be half-open by setting one of the values to null.

newIntRange

public static FieldCacheRangeFilter<Integer> newIntRange(String field,
                                                         FieldCache.IntParser parser,
                                                         Integer lowerVal,
                                                         Integer upperVal,
                                                         boolean includeLower,
                                                         boolean includeUpper)
Creates a numeric range filter using FieldCache.getInts(IndexReader,String,FieldCache.IntParser). This works with all int fields containing exactly one numeric term in the field. The range can be half-open by setting one of the values to null.

newLongRange

public static FieldCacheRangeFilter<Long> newLongRange(String field,
                                                       Long lowerVal,
                                                       Long upperVal,
                                                       boolean includeLower,
                                                       boolean includeUpper)
Creates a numeric range filter using FieldCache.getLongs(IndexReader,String). This works with all long fields containing exactly one numeric term in the field. The range can be half-open by setting one of the values to null.

newLongRange

public static FieldCacheRangeFilter<Long> newLongRange(String field,
                                                       FieldCache.LongParser parser,
                                                       Long lowerVal,
                                                       Long upperVal,
                                                       boolean includeLower,
                                                       boolean includeUpper)
Creates a numeric range filter using FieldCache.getLongs(IndexReader,String,FieldCache.LongParser). This works with all long fields containing exactly one numeric term in the field. The range can be half-open by setting one of the values to null.

newFloatRange

public static FieldCacheRangeFilter<Float> newFloatRange(String field,
                                                         Float lowerVal,
                                                         Float upperVal,
                                                         boolean includeLower,
                                                         boolean includeUpper)
Creates a numeric range filter using FieldCache.getFloats(IndexReader,String). This works with all float fields containing exactly one numeric term in the field. The range can be half-open by setting one of the values to null.

newFloatRange

public static FieldCacheRangeFilter<Float> newFloatRange(String field,
                                                         FieldCache.FloatParser parser,
                                                         Float lowerVal,
                                                         Float upperVal,
                                                         boolean includeLower,
                                                         boolean includeUpper)
Creates a numeric range filter using FieldCache.getFloats(IndexReader,String,FieldCache.FloatParser). This works with all float fields containing exactly one numeric term in the field. The range can be half-open by setting one of the values to null.

newDoubleRange

public static FieldCacheRangeFilter<Double> newDoubleRange(String field,
                                                           Double lowerVal,
                                                           Double upperVal,
                                                           boolean includeLower,
                                                           boolean includeUpper)
Creates a numeric range filter using FieldCache.getDoubles(IndexReader,String). This works with all double fields containing exactly one numeric term in the field. The range can be half-open by setting one of the values to null.

newDoubleRange

public static FieldCacheRangeFilter<Double> newDoubleRange(String field,
                                                           FieldCache.DoubleParser parser,
                                                           Double lowerVal,
                                                           Double upperVal,
                                                           boolean includeLower,
                                                           boolean includeUpper)
Creates a numeric range filter using FieldCache.getDoubles(IndexReader,String,FieldCache.DoubleParser). This works with all double fields containing exactly one numeric term in the field. The range can be half-open by setting one of the values to null.

toString

public final String toString()
Overrides:
toString in class Object

equals

public final boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

getField

public String getField()
Returns the field name for this filter

includesLower

public boolean includesLower()
Returns true if the lower endpoint is inclusive

includesUpper

public boolean includesUpper()
Returns true if the upper endpoint is inclusive

getLowerVal

public T getLowerVal()
Returns the lower value of this range filter

getUpperVal

public T getUpperVal()
Returns the upper value of this range filter

getParser

public FieldCache.Parser getParser()
Returns the current numeric parser (null for T is String}

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCacheTermsFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldCacheTermsFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.FieldCacheTermsFilter
All Implemented Interfaces:
Serializable
public class FieldCacheTermsFilter
extends Filter

A Filter that only accepts documents whose single term value in the specified field is contained in the provided set of allowed terms.

This is the same functionality as TermsFilter (from contrib/queries), except this filter requires that the field contains only a single term for all documents. Because of drastically different implementations, they also have different performance characteristics, as described below.

The first invocation of this filter on a given field will be slower, since a FieldCache.StringIndex must be created. Subsequent invocations using the same field will re-use this cache. However, as with all functionality based on FieldCache, persistent RAM is consumed to hold the cache, and is not freed until the IndexReader is closed. In contrast, TermsFilter has no persistent RAM consumption.

With each search, this filter translates the specified set of Terms into a private FixedBitSet keyed by term number per unique IndexReader (normally one reader per segment). Then, during matching, the term number for each docID is retrieved from the cache and then checked for inclusion using the FixedBitSet. Since all testing is done using RAM resident data structures, performance should be very fast, most likely fast enough to not require further caching of the DocIdSet for each possible combination of terms. However, because docIDs are simply scanned linearly, an index with a great many small documents may find this linear scan too costly.

In contrast, TermsFilter builds up an FixedBitSet, keyed by docID, every time it's created, by enumerating through all matching docs using TermDocs to seek and scan through each term's docID list. While there is no linear scan of all docIDs, besides the allocation of the underlying array in the FixedBitSet, this approach requires a number of "disk seeks" in proportion to the number of terms, which can be exceptionally costly when there are cache misses in the OS's IO cache.

Generally, this filter will be slower on the first invocation for a given field, but subsequent invocations, even if you change the allowed set of Terms, should be faster than TermsFilter, especially as the number of Terms being matched increases. If you are matching only a very small number of terms, and those terms in turn match a very small number of documents, TermsFilter may perform faster.

Which filter is best is very application dependent.

See Also:
Serialized Form

Constructor Summary
FieldCacheTermsFilter(String field, String... terms)
Method Summary
DocIdSet | getDocIdSet(IndexReader reader) Creates a DocIdSet enumerating the documents that should be permitted in search results.
FieldCache | getFieldCache()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldCacheTermsFilter

public FieldCacheTermsFilter(String field,
                             String... terms)
Method Detail

getFieldCache

public FieldCache getFieldCache()

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Description copied from class: Filter
Creates a DocIdSet enumerating the documents that should be permitted in search results. NOTE: null can be returned if no documents are accepted by this Filter.

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldComparator.ByteComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldComparator.ByteComparator

java.lang.Object
    extended by  org.apache.lucene.search.FieldComparator<T>
        extended by  org.apache.lucene.search.FieldComparator.NumericComparator<Byte>
            extended by  org.apache.lucene.search.FieldComparator.ByteComparator
Enclosing class:
FieldComparator<T>
public static final class FieldComparator.ByteComparator
extends FieldComparator.NumericComparator<Byte>

Parses field's values as byte (using FieldCache.getBytes(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator
FieldComparator.ByteComparator, FieldComparator.DocComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.NumericComparator<T extends Number>, FieldComparator.RelevanceComparator, FieldComparator.ShortComparator, FieldComparator.StringComparatorLocale, FieldComparator.StringOrdValComparator, FieldComparator.StringValComparator
Field Summary
Fields inherited from class org.apache.lucene.search.FieldComparator.NumericComparator
docsWithField, field, missingValue
Method Summary
int | compare(int slot1, int slot2) Compare hit at slot1 with hit at slot2.
int | compareBottom(int doc) Compare the bottom of the queue with doc.
void | copy(int slot, int doc) This method is called when a new hit is competitive.
void | setBottom(int bottom) Set the bottom slot, ie the "weakest" (sorted last) entry in the queue.
void | setNextReader(IndexReader reader, int docBase) Set a new Reader.
Byte | value(int slot) Return the actual value in the slot.
Methods inherited from class org.apache.lucene.search.FieldComparator
binarySearch, binarySearch, compareValues, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

compare

public int compare(int slot1,
                   int slot2)
Description copied from class: FieldComparator
Compare hit at slot1 with hit at slot2.

Specified by:
compare in class FieldComparator<Byte>
Parameters:
slot1 - first slot to compare
slot2 - second slot to compare
Returns:
any N < 0 if slot2's value is sorted after slot1, any N > 0 if the slot2's value is sorted before slot1 and 0 if they are equal

compareBottom

public int compareBottom(int doc)
Description copied from class: FieldComparator
Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as FieldComparator.compare(int,int)} as if bottom were slot1 and the new document were slot 2.

For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).

Specified by:
compareBottom in class FieldComparator<Byte>
Parameters:
doc - that was hit
Returns:
any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal.

copy

public void copy(int slot,
                 int doc)
Description copied from class: FieldComparator
This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.

Specified by:
copy in class FieldComparator<Byte>
Parameters:
slot - which slot to copy the hit to
doc - docID relative to current reader

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: FieldComparator
Set a new Reader. All doc correspond to the current Reader.

Overrides:
setNextReader in class FieldComparator.NumericComparator<Byte>
Parameters:
reader - current reader
docBase - docBase of this reader
Throws:
IOException

setBottom

public void setBottom(int bottom)
Description copied from class: FieldComparator
Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When FieldComparator.compareBottom(int) is called, you should compare against this slot. This will always be called before FieldComparator.compareBottom(int).

Specified by:
setBottom in class FieldComparator<Byte>
Parameters:
bottom - the currently weakest (sorted last) slot in the queue

value

public Byte value(int slot)
Description copied from class: FieldComparator
Return the actual value in the slot.

Specified by:
value in class FieldComparator<Byte>
Parameters:
slot - the value
Returns:
value in this slot
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldComparator.DocComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldComparator.DocComparator

java.lang.Object
    extended by  org.apache.lucene.search.FieldComparator<Integer>
        extended by  org.apache.lucene.search.FieldComparator.DocComparator
Enclosing class:
FieldComparator<T>
public static final class FieldComparator.DocComparator
extends FieldComparator<Integer>

Sorts by ascending docID

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator
FieldComparator.ByteComparator, FieldComparator.DocComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.NumericComparator<T extends Number>, FieldComparator.RelevanceComparator, FieldComparator.ShortComparator, FieldComparator.StringComparatorLocale, FieldComparator.StringOrdValComparator, FieldComparator.StringValComparator
Method Summary
int | compare(int slot1, int slot2) Compare hit at slot1 with hit at slot2.
int | compareBottom(int doc) Compare the bottom of the queue with doc.
void | copy(int slot, int doc) This method is called when a new hit is competitive.
void | setBottom(int bottom) Set the bottom slot, ie the "weakest" (sorted last) entry in the queue.
void | setNextReader(IndexReader reader, int docBase) Set a new Reader.
Integer | value(int slot) Return the actual value in the slot.
Methods inherited from class org.apache.lucene.search.FieldComparator
binarySearch, binarySearch, compareValues, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

compare

public int compare(int slot1,
                   int slot2)
Description copied from class: FieldComparator
Compare hit at slot1 with hit at slot2.

Specified by:
compare in class FieldComparator<Integer>
Parameters:
slot1 - first slot to compare
slot2 - second slot to compare
Returns:
any N < 0 if slot2's value is sorted after slot1, any N > 0 if the slot2's value is sorted before slot1 and 0 if they are equal

compareBottom

public int compareBottom(int doc)
Description copied from class: FieldComparator
Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as FieldComparator.compare(int,int)} as if bottom were slot1 and the new document were slot 2.

For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).

Specified by:
compareBottom in class FieldComparator<Integer>
Parameters:
doc - that was hit
Returns:
any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal.

copy

public void copy(int slot,
                 int doc)
Description copied from class: FieldComparator
This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.

Specified by:
copy in class FieldComparator<Integer>
Parameters:
slot - which slot to copy the hit to
doc - docID relative to current reader

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
Description copied from class: FieldComparator
Set a new Reader. All doc correspond to the current Reader.

Specified by:
setNextReader in class FieldComparator<Integer>
Parameters:
reader - current reader
docBase - docBase of this reader

setBottom

public void setBottom(int bottom)
Description copied from class: FieldComparator
Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When FieldComparator.compareBottom(int) is called, you should compare against this slot. This will always be called before FieldComparator.compareBottom(int).

Specified by:
setBottom in class FieldComparator<Integer>
Parameters:
bottom - the currently weakest (sorted last) slot in the queue

value

public Integer value(int slot)
Description copied from class: FieldComparator
Return the actual value in the slot.

Specified by:
value in class FieldComparator<Integer>
Parameters:
slot - the value
Returns:
value in this slot
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldComparator.DoubleComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldComparator.DoubleComparator

java.lang.Object
    extended by  org.apache.lucene.search.FieldComparator<T>
        extended by  org.apache.lucene.search.FieldComparator.NumericComparator<Double>
            extended by  org.apache.lucene.search.FieldComparator.DoubleComparator
Enclosing class:
FieldComparator<T>
public static final class FieldComparator.DoubleComparator
extends FieldComparator.NumericComparator<Double>

Parses field's values as double (using FieldCache.getDoubles(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator
FieldComparator.ByteComparator, FieldComparator.DocComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.NumericComparator<T extends Number>, FieldComparator.RelevanceComparator, FieldComparator.ShortComparator, FieldComparator.StringComparatorLocale, FieldComparator.StringOrdValComparator, FieldComparator.StringValComparator
Field Summary
Fields inherited from class org.apache.lucene.search.FieldComparator.NumericComparator
docsWithField, field, missingValue
Method Summary
int | compare(int slot1, int slot2) Compare hit at slot1 with hit at slot2.
int | compareBottom(int doc) Compare the bottom of the queue with doc.
void | copy(int slot, int doc) This method is called when a new hit is competitive.
void | setBottom(int bottom) Set the bottom slot, ie the "weakest" (sorted last) entry in the queue.
void | setNextReader(IndexReader reader, int docBase) Set a new Reader.
Double | value(int slot) Return the actual value in the slot.
Methods inherited from class org.apache.lucene.search.FieldComparator
binarySearch, binarySearch, compareValues, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

compare

public int compare(int slot1,
                   int slot2)
Description copied from class: FieldComparator
Compare hit at slot1 with hit at slot2.

Specified by:
compare in class FieldComparator<Double>
Parameters:
slot1 - first slot to compare
slot2 - second slot to compare
Returns:
any N < 0 if slot2's value is sorted after slot1, any N > 0 if the slot2's value is sorted before slot1 and 0 if they are equal

compareBottom

public int compareBottom(int doc)
Description copied from class: FieldComparator
Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as FieldComparator.compare(int,int)} as if bottom were slot1 and the new document were slot 2.

For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).

Specified by:
compareBottom in class FieldComparator<Double>
Parameters:
doc - that was hit
Returns:
any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal.

copy

public void copy(int slot,
                 int doc)
Description copied from class: FieldComparator
This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.

Specified by:
copy in class FieldComparator<Double>
Parameters:
slot - which slot to copy the hit to
doc - docID relative to current reader

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: FieldComparator
Set a new Reader. All doc correspond to the current Reader.

Overrides:
setNextReader in class FieldComparator.NumericComparator<Double>
Parameters:
reader - current reader
docBase - docBase of this reader
Throws:
IOException

setBottom

public void setBottom(int bottom)
Description copied from class: FieldComparator
Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When FieldComparator.compareBottom(int) is called, you should compare against this slot. This will always be called before FieldComparator.compareBottom(int).

Specified by:
setBottom in class FieldComparator<Double>
Parameters:
bottom - the currently weakest (sorted last) slot in the queue

value

public Double value(int slot)
Description copied from class: FieldComparator
Return the actual value in the slot.

Specified by:
value in class FieldComparator<Double>
Parameters:
slot - the value
Returns:
value in this slot
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldComparator.FloatComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldComparator.FloatComparator

java.lang.Object
    extended by  org.apache.lucene.search.FieldComparator<T>
        extended by  org.apache.lucene.search.FieldComparator.NumericComparator<Float>
            extended by  org.apache.lucene.search.FieldComparator.FloatComparator
Enclosing class:
FieldComparator<T>
public static final class FieldComparator.FloatComparator
extends FieldComparator.NumericComparator<Float>

Parses field's values as float (using FieldCache.getFloats(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator
FieldComparator.ByteComparator, FieldComparator.DocComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.NumericComparator<T extends Number>, FieldComparator.RelevanceComparator, FieldComparator.ShortComparator, FieldComparator.StringComparatorLocale, FieldComparator.StringOrdValComparator, FieldComparator.StringValComparator
Field Summary
Fields inherited from class org.apache.lucene.search.FieldComparator.NumericComparator
docsWithField, field, missingValue
Method Summary
int | compare(int slot1, int slot2) Compare hit at slot1 with hit at slot2.
int | compareBottom(int doc) Compare the bottom of the queue with doc.
void | copy(int slot, int doc) This method is called when a new hit is competitive.
void | setBottom(int bottom) Set the bottom slot, ie the "weakest" (sorted last) entry in the queue.
void | setNextReader(IndexReader reader, int docBase) Set a new Reader.
Float | value(int slot) Return the actual value in the slot.
Methods inherited from class org.apache.lucene.search.FieldComparator
binarySearch, binarySearch, compareValues, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

compare

public int compare(int slot1,
                   int slot2)
Description copied from class: FieldComparator
Compare hit at slot1 with hit at slot2.

Specified by:
compare in class FieldComparator<Float>
Parameters:
slot1 - first slot to compare
slot2 - second slot to compare
Returns:
any N < 0 if slot2's value is sorted after slot1, any N > 0 if the slot2's value is sorted before slot1 and 0 if they are equal

compareBottom

public int compareBottom(int doc)
Description copied from class: FieldComparator
Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as FieldComparator.compare(int,int)} as if bottom were slot1 and the new document were slot 2.

For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).

Specified by:
compareBottom in class FieldComparator<Float>
Parameters:
doc - that was hit
Returns:
any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal.

copy

public void copy(int slot,
                 int doc)
Description copied from class: FieldComparator
This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.

Specified by:
copy in class FieldComparator<Float>
Parameters:
slot - which slot to copy the hit to
doc - docID relative to current reader

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: FieldComparator
Set a new Reader. All doc correspond to the current Reader.

Overrides:
setNextReader in class FieldComparator.NumericComparator<Float>
Parameters:
reader - current reader
docBase - docBase of this reader
Throws:
IOException

setBottom

public void setBottom(int bottom)
Description copied from class: FieldComparator
Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When FieldComparator.compareBottom(int) is called, you should compare against this slot. This will always be called before FieldComparator.compareBottom(int).

Specified by:
setBottom in class FieldComparator<Float>
Parameters:
bottom - the currently weakest (sorted last) slot in the queue

value

public Float value(int slot)
Description copied from class: FieldComparator
Return the actual value in the slot.

Specified by:
value in class FieldComparator<Float>
Parameters:
slot - the value
Returns:
value in this slot
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldComparator<T>

java.lang.Object
    extended by  org.apache.lucene.search.FieldComparator<T>
Direct Known Subclasses:
FieldComparator.DocComparator, FieldComparator.NumericComparator, FieldComparator.RelevanceComparator, FieldComparator.StringComparatorLocale, FieldComparator.StringOrdValComparator, FieldComparator.StringValComparator
public abstract class FieldComparator<T>
extends Object

Expert: a FieldComparator compares hits so as to determine their sort order when collecting the top results with TopFieldCollector. The concrete public FieldComparator classes here correspond to the SortField types.

This API is designed to achieve high performance sorting, by exposing a tight interaction with FieldValueHitQueue as it visits hits. Whenever a hit is competitive, it's enrolled into a virtual slot, which is an int ranging from 0 to numHits-1. The FieldComparator is made aware of segment transitions during searching in case any internal state it's tracking needs to be recomputed during these transitions.

A comparator must define these functions:

  • compare(int, int) Compare a hit at 'slot a' with hit 'slot b'.
  • setBottom(int) This method is called by FieldValueHitQueue to notify the FieldComparator of the current weakest ("bottom") slot. Note that this slot may not hold the weakest value according to your comparator, in cases where your comparator is not the primary one (ie, is only used to break ties from the comparators before it).
  • compareBottom(int) Compare a new hit (docID) against the "weakest" (bottom) entry in the queue.
  • copy(int, int) Installs a new hit into the priority queue. The FieldValueHitQueue calls this method when a new hit is competitive.
  • setNextReader(org.apache.lucene.index.IndexReader, int) Invoked when the search is switching to the next segment. You may need to update internal state of the comparator, for example retrieving new values from the FieldCache.
  • value(int) Return the sort value stored in the specified slot. This is only called at the end of the search, in order to populate FieldDoc.fields when returning the top results.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | FieldComparator.ByteComparator Parses field's values as byte (using FieldCache.getBytes(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.DocComparator Sorts by ascending docID
static class | FieldComparator.DoubleComparator Parses field's values as double (using FieldCache.getDoubles(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.FloatComparator Parses field's values as float (using FieldCache.getFloats(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.IntComparator Parses field's values as int (using FieldCache.getInts(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.LongComparator Parses field's values as long (using FieldCache.getLongs(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.NumericComparator<T extends Number>
static class | FieldComparator.RelevanceComparator Sorts by descending relevance.
static class | FieldComparator.ShortComparator Parses field's values as short (using FieldCache.getShorts(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.StringComparatorLocale Sorts by a field's value using the Collator for a given Locale.
static class | FieldComparator.StringOrdValComparator Sorts by field's natural String sort order, using ordinals.
static class | FieldComparator.StringValComparator Sorts by field's natural String sort order.
Constructor Summary
FieldComparator()
Method Summary
protected static int | binarySearch(String[] a, String key)
protected static int | binarySearch(String[] a, String key, int low, int high)
abstract int | compare(int slot1, int slot2) Compare hit at slot1 with hit at slot2.
abstract int | compareBottom(int doc) Compare the bottom of the queue with doc.
int | compareValues(T first, T second) Returns -1 if first is less than second.
abstract void | copy(int slot, int doc) This method is called when a new hit is competitive.
abstract void | setBottom(int slot) Set the bottom slot, ie the "weakest" (sorted last) entry in the queue.
abstract void | setNextReader(IndexReader reader, int docBase) Set a new Reader.
void | setScorer(Scorer scorer) Sets the Scorer to use in case a document's score is needed.
abstract T | value(int slot) Return the actual value in the slot.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldComparator

public FieldComparator()
Method Detail

compare

public abstract int compare(int slot1,
                            int slot2)
Compare hit at slot1 with hit at slot2.

Parameters:
slot1 - first slot to compare
slot2 - second slot to compare
Returns:
any N < 0 if slot2's value is sorted after slot1, any N > 0 if the slot2's value is sorted before slot1 and 0 if they are equal

setBottom

public abstract void setBottom(int slot)
Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When compareBottom(int) is called, you should compare against this slot. This will always be called before compareBottom(int).

Parameters:
slot - the currently weakest (sorted last) slot in the queue

compareBottom

public abstract int compareBottom(int doc)
                           throws IOException
Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as compare(int,int)} as if bottom were slot1 and the new document were slot 2.

For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).

Parameters:
doc - that was hit
Returns:
any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal.
Throws:
IOException

copy

public abstract void copy(int slot,
                          int doc)
                   throws IOException
This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.

Parameters:
slot - which slot to copy the hit to
doc - docID relative to current reader
Throws:
IOException

setNextReader

public abstract void setNextReader(IndexReader reader,
                                   int docBase)
                            throws IOException
Set a new Reader. All doc correspond to the current Reader.

Parameters:
reader - current reader
docBase - docBase of this reader
Throws:
IOException
IOException

setScorer

public void setScorer(Scorer scorer)
Sets the Scorer to use in case a document's score is needed.

Parameters:
scorer - Scorer instance that you should use to obtain the current hit's score, if necessary.

value

public abstract T value(int slot)
Return the actual value in the slot.

Parameters:
slot - the value
Returns:
value in this slot

compareValues

public int compareValues(T first,
                         T second)
Returns -1 if first is less than second. Default impl to assume the type implements Comparable and invoke .compareTo; be sure to override this method if your FieldComparator's type isn't a Comparable or if your values may sometimes be null

binarySearch

protected static final int binarySearch(String[] a,
                                        String key)

binarySearch

protected static final int binarySearch(String[] a,
                                        String key,
                                        int low,
                                        int high)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldComparator.IntComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldComparator.IntComparator

java.lang.Object
    extended by  org.apache.lucene.search.FieldComparator<T>
        extended by  org.apache.lucene.search.FieldComparator.NumericComparator<Integer>
            extended by  org.apache.lucene.search.FieldComparator.IntComparator
Enclosing class:
FieldComparator<T>
public static final class FieldComparator.IntComparator
extends FieldComparator.NumericComparator<Integer>

Parses field's values as int (using FieldCache.getInts(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator
FieldComparator.ByteComparator, FieldComparator.DocComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.NumericComparator<T extends Number>, FieldComparator.RelevanceComparator, FieldComparator.ShortComparator, FieldComparator.StringComparatorLocale, FieldComparator.StringOrdValComparator, FieldComparator.StringValComparator
Field Summary
Fields inherited from class org.apache.lucene.search.FieldComparator.NumericComparator
docsWithField, field, missingValue
Method Summary
int | compare(int slot1, int slot2) Compare hit at slot1 with hit at slot2.
int | compareBottom(int doc) Compare the bottom of the queue with doc.
void | copy(int slot, int doc) This method is called when a new hit is competitive.
void | setBottom(int bottom) Set the bottom slot, ie the "weakest" (sorted last) entry in the queue.
void | setNextReader(IndexReader reader, int docBase) Set a new Reader.
Integer | value(int slot) Return the actual value in the slot.
Methods inherited from class org.apache.lucene.search.FieldComparator
binarySearch, binarySearch, compareValues, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

compare

public int compare(int slot1,
                   int slot2)
Description copied from class: FieldComparator
Compare hit at slot1 with hit at slot2.

Specified by:
compare in class FieldComparator<Integer>
Parameters:
slot1 - first slot to compare
slot2 - second slot to compare
Returns:
any N < 0 if slot2's value is sorted after slot1, any N > 0 if the slot2's value is sorted before slot1 and 0 if they are equal

compareBottom

public int compareBottom(int doc)
Description copied from class: FieldComparator
Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as FieldComparator.compare(int,int)} as if bottom were slot1 and the new document were slot 2.

For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).

Specified by:
compareBottom in class FieldComparator<Integer>
Parameters:
doc - that was hit
Returns:
any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal.

copy

public void copy(int slot,
                 int doc)
Description copied from class: FieldComparator
This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.

Specified by:
copy in class FieldComparator<Integer>
Parameters:
slot - which slot to copy the hit to
doc - docID relative to current reader

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: FieldComparator
Set a new Reader. All doc correspond to the current Reader.

Overrides:
setNextReader in class FieldComparator.NumericComparator<Integer>
Parameters:
reader - current reader
docBase - docBase of this reader
Throws:
IOException

setBottom

public void setBottom(int bottom)
Description copied from class: FieldComparator
Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When FieldComparator.compareBottom(int) is called, you should compare against this slot. This will always be called before FieldComparator.compareBottom(int).

Specified by:
setBottom in class FieldComparator<Integer>
Parameters:
bottom - the currently weakest (sorted last) slot in the queue

value

public Integer value(int slot)
Description copied from class: FieldComparator
Return the actual value in the slot.

Specified by:
value in class FieldComparator<Integer>
Parameters:
slot - the value
Returns:
value in this slot
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldComparator.LongComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldComparator.LongComparator

java.lang.Object
    extended by  org.apache.lucene.search.FieldComparator<T>
        extended by  org.apache.lucene.search.FieldComparator.NumericComparator<Long>
            extended by  org.apache.lucene.search.FieldComparator.LongComparator
Enclosing class:
FieldComparator<T>
public static final class FieldComparator.LongComparator
extends FieldComparator.NumericComparator<Long>

Parses field's values as long (using FieldCache.getLongs(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator
FieldComparator.ByteComparator, FieldComparator.DocComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.NumericComparator<T extends Number>, FieldComparator.RelevanceComparator, FieldComparator.ShortComparator, FieldComparator.StringComparatorLocale, FieldComparator.StringOrdValComparator, FieldComparator.StringValComparator
Field Summary
Fields inherited from class org.apache.lucene.search.FieldComparator.NumericComparator
docsWithField, field, missingValue
Method Summary
int | compare(int slot1, int slot2) Compare hit at slot1 with hit at slot2.
int | compareBottom(int doc) Compare the bottom of the queue with doc.
void | copy(int slot, int doc) This method is called when a new hit is competitive.
void | setBottom(int bottom) Set the bottom slot, ie the "weakest" (sorted last) entry in the queue.
void | setNextReader(IndexReader reader, int docBase) Set a new Reader.
Long | value(int slot) Return the actual value in the slot.
Methods inherited from class org.apache.lucene.search.FieldComparator
binarySearch, binarySearch, compareValues, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

compare

public int compare(int slot1,
                   int slot2)
Description copied from class: FieldComparator
Compare hit at slot1 with hit at slot2.

Specified by:
compare in class FieldComparator<Long>
Parameters:
slot1 - first slot to compare
slot2 - second slot to compare
Returns:
any N < 0 if slot2's value is sorted after slot1, any N > 0 if the slot2's value is sorted before slot1 and 0 if they are equal

compareBottom

public int compareBottom(int doc)
Description copied from class: FieldComparator
Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as FieldComparator.compare(int,int)} as if bottom were slot1 and the new document were slot 2.

For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).

Specified by:
compareBottom in class FieldComparator<Long>
Parameters:
doc - that was hit
Returns:
any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal.

copy

public void copy(int slot,
                 int doc)
Description copied from class: FieldComparator
This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.

Specified by:
copy in class FieldComparator<Long>
Parameters:
slot - which slot to copy the hit to
doc - docID relative to current reader

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: FieldComparator
Set a new Reader. All doc correspond to the current Reader.

Overrides:
setNextReader in class FieldComparator.NumericComparator<Long>
Parameters:
reader - current reader
docBase - docBase of this reader
Throws:
IOException

setBottom

public void setBottom(int bottom)
Description copied from class: FieldComparator
Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When FieldComparator.compareBottom(int) is called, you should compare against this slot. This will always be called before FieldComparator.compareBottom(int).

Specified by:
setBottom in class FieldComparator<Long>
Parameters:
bottom - the currently weakest (sorted last) slot in the queue

value

public Long value(int slot)
Description copied from class: FieldComparator
Return the actual value in the slot.

Specified by:
value in class FieldComparator<Long>
Parameters:
slot - the value
Returns:
value in this slot
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldComparator.NumericComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldComparator.NumericComparator<T extends Number>

java.lang.Object
    extended by  org.apache.lucene.search.FieldComparator<T>
        extended by  org.apache.lucene.search.FieldComparator.NumericComparator<T>
Direct Known Subclasses:
FieldComparator.ByteComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.ShortComparator
Enclosing class:
FieldComparator<T>
public abstract static class FieldComparator.NumericComparator<T extends Number>
extends FieldComparator<T>

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator
FieldComparator.ByteComparator, FieldComparator.DocComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.NumericComparator<T extends Number>, FieldComparator.RelevanceComparator, FieldComparator.ShortComparator, FieldComparator.StringComparatorLocale, FieldComparator.StringOrdValComparator, FieldComparator.StringValComparator
Field Summary
protected Bits | docsWithField
protected String | field
protected T | missingValue
Constructor Summary
FieldComparator.NumericComparator(String field, T missingValue)
Method Summary
 void setNextReader(IndexReader reader, int docBase)
Set a new Reader.
Methods inherited from class org.apache.lucene.search.FieldComparator
binarySearch, binarySearch, compare, compareBottom, compareValues, copy, setBottom, setScorer, value
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

missingValue

protected final T extends Number missingValue

field

protected final String field

docsWithField

protected Bits docsWithField
Constructor Detail

FieldComparator.NumericComparator

public FieldComparator.NumericComparator(String field,
                                         T missingValue)
Method Detail

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: FieldComparator
Set a new Reader. All doc correspond to the current Reader.

Specified by:
setNextReader in class FieldComparator<T extends Number>
Parameters:
reader - current reader
docBase - docBase of this reader
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldComparator.RelevanceComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldComparator.RelevanceComparator

java.lang.Object
    extended by  org.apache.lucene.search.FieldComparator<Float>
        extended by  org.apache.lucene.search.FieldComparator.RelevanceComparator
Enclosing class:
FieldComparator<T>
public static final class FieldComparator.RelevanceComparator
extends FieldComparator<Float>

Sorts by descending relevance. NOTE: if you are sorting only by descending relevance and then secondarily by ascending docID, performance is faster using TopScoreDocCollector directly (which IndexSearcher.search(org.apache.lucene.search.Query, int) uses when no Sort is specified).

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator
FieldComparator.ByteComparator, FieldComparator.DocComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.NumericComparator<T extends Number>, FieldComparator.RelevanceComparator, FieldComparator.ShortComparator, FieldComparator.StringComparatorLocale, FieldComparator.StringOrdValComparator, FieldComparator.StringValComparator
Method Summary
int | compare(int slot1, int slot2) Compare hit at slot1 with hit at slot2.
int | compareBottom(int doc) Compare the bottom of the queue with doc.
int | compareValues(Float first, Float second) Returns -1 if first is less than second.
void | copy(int slot, int doc) This method is called when a new hit is competitive.
void | setBottom(int bottom) Set the bottom slot, ie the "weakest" (sorted last) entry in the queue.
void | setNextReader(IndexReader reader, int docBase) Set a new Reader.
void | setScorer(Scorer scorer) Sets the Scorer to use in case a document's score is needed.
Float | value(int slot) Return the actual value in the slot.
Methods inherited from class org.apache.lucene.search.FieldComparator
binarySearch, binarySearch
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

compare

public int compare(int slot1,
                   int slot2)
Description copied from class: FieldComparator
Compare hit at slot1 with hit at slot2.

Specified by:
compare in class FieldComparator<Float>
Parameters:
slot1 - first slot to compare
slot2 - second slot to compare
Returns:
any N < 0 if slot2's value is sorted after slot1, any N > 0 if the slot2's value is sorted before slot1 and 0 if they are equal

compareBottom

public int compareBottom(int doc)
                  throws IOException
Description copied from class: FieldComparator
Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as FieldComparator.compare(int,int)} as if bottom were slot1 and the new document were slot 2.

For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).

Specified by:
compareBottom in class FieldComparator<Float>
Parameters:
doc - that was hit
Returns:
any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal.
Throws:
IOException

copy

public void copy(int slot,
                 int doc)
          throws IOException
Description copied from class: FieldComparator
This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.

Specified by:
copy in class FieldComparator<Float>
Parameters:
slot - which slot to copy the hit to
doc - docID relative to current reader
Throws:
IOException

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
Description copied from class: FieldComparator
Set a new Reader. All doc correspond to the current Reader.

Specified by:
setNextReader in class FieldComparator<Float>
Parameters:
reader - current reader
docBase - docBase of this reader

setBottom

public void setBottom(int bottom)
Description copied from class: FieldComparator
Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When FieldComparator.compareBottom(int) is called, you should compare against this slot. This will always be called before FieldComparator.compareBottom(int).

Specified by:
setBottom in class FieldComparator<Float>
Parameters:
bottom - the currently weakest (sorted last) slot in the queue

setScorer

public void setScorer(Scorer scorer)
Description copied from class: FieldComparator
Sets the Scorer to use in case a document's score is needed.

Overrides:
setScorer in class FieldComparator<Float>
Parameters:
scorer - Scorer instance that you should use to obtain the current hit's score, if necessary.

value

public Float value(int slot)
Description copied from class: FieldComparator
Return the actual value in the slot.

Specified by:
value in class FieldComparator<Float>
Parameters:
slot - the value
Returns:
value in this slot

compareValues

public int compareValues(Float first,
                         Float second)
Description copied from class: FieldComparator
Returns -1 if first is less than second. Default impl to assume the type implements Comparable and invoke .compareTo; be sure to override this method if your FieldComparator's type isn't a Comparable or if your values may sometimes be null

Overrides:
compareValues in class FieldComparator<Float>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldComparator.ShortComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldComparator.ShortComparator

java.lang.Object
    extended by  org.apache.lucene.search.FieldComparator<T>
        extended by  org.apache.lucene.search.FieldComparator.NumericComparator<Short>
            extended by  org.apache.lucene.search.FieldComparator.ShortComparator
Enclosing class:
FieldComparator<T>
public static final class FieldComparator.ShortComparator
extends FieldComparator.NumericComparator<Short>

Parses field's values as short (using FieldCache.getShorts(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator
FieldComparator.ByteComparator, FieldComparator.DocComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.NumericComparator<T extends Number>, FieldComparator.RelevanceComparator, FieldComparator.ShortComparator, FieldComparator.StringComparatorLocale, FieldComparator.StringOrdValComparator, FieldComparator.StringValComparator
Field Summary
Fields inherited from class org.apache.lucene.search.FieldComparator.NumericComparator
docsWithField, field, missingValue
Method Summary
int | compare(int slot1, int slot2) Compare hit at slot1 with hit at slot2.
int | compareBottom(int doc) Compare the bottom of the queue with doc.
void | copy(int slot, int doc) This method is called when a new hit is competitive.
void | setBottom(int bottom) Set the bottom slot, ie the "weakest" (sorted last) entry in the queue.
void | setNextReader(IndexReader reader, int docBase) Set a new Reader.
Short | value(int slot) Return the actual value in the slot.
Methods inherited from class org.apache.lucene.search.FieldComparator
binarySearch, binarySearch, compareValues, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

compare

public int compare(int slot1,
                   int slot2)
Description copied from class: FieldComparator
Compare hit at slot1 with hit at slot2.

Specified by:
compare in class FieldComparator<Short>
Parameters:
slot1 - first slot to compare
slot2 - second slot to compare
Returns:
any N < 0 if slot2's value is sorted after slot1, any N > 0 if the slot2's value is sorted before slot1 and 0 if they are equal

compareBottom

public int compareBottom(int doc)
Description copied from class: FieldComparator
Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as FieldComparator.compare(int,int)} as if bottom were slot1 and the new document were slot 2.

For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).

Specified by:
compareBottom in class FieldComparator<Short>
Parameters:
doc - that was hit
Returns:
any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal.

copy

public void copy(int slot,
                 int doc)
Description copied from class: FieldComparator
This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.

Specified by:
copy in class FieldComparator<Short>
Parameters:
slot - which slot to copy the hit to
doc - docID relative to current reader

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: FieldComparator
Set a new Reader. All doc correspond to the current Reader.

Overrides:
setNextReader in class FieldComparator.NumericComparator<Short>
Parameters:
reader - current reader
docBase - docBase of this reader
Throws:
IOException

setBottom

public void setBottom(int bottom)
Description copied from class: FieldComparator
Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When FieldComparator.compareBottom(int) is called, you should compare against this slot. This will always be called before FieldComparator.compareBottom(int).

Specified by:
setBottom in class FieldComparator<Short>
Parameters:
bottom - the currently weakest (sorted last) slot in the queue

value

public Short value(int slot)
Description copied from class: FieldComparator
Return the actual value in the slot.

Specified by:
value in class FieldComparator<Short>
Parameters:
slot - the value
Returns:
value in this slot
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldComparator.StringComparatorLocale

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldComparator.StringComparatorLocale

java.lang.Object
    extended by  org.apache.lucene.search.FieldComparator<String>
        extended by  org.apache.lucene.search.FieldComparator.StringComparatorLocale
Enclosing class:
FieldComparator<T>
public static final class FieldComparator.StringComparatorLocale
extends FieldComparator<String>

Sorts by a field's value using the Collator for a given Locale.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator
FieldComparator.ByteComparator, FieldComparator.DocComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.NumericComparator<T extends Number>, FieldComparator.RelevanceComparator, FieldComparator.ShortComparator, FieldComparator.StringComparatorLocale, FieldComparator.StringOrdValComparator, FieldComparator.StringValComparator
Method Summary
int | compare(int slot1, int slot2) Compare hit at slot1 with hit at slot2.
int | compareBottom(int doc) Compare the bottom of the queue with doc.
int | compareValues(String val1, String val2) Returns -1 if first is less than second.
void | copy(int slot, int doc) This method is called when a new hit is competitive.
void | setBottom(int bottom) Set the bottom slot, ie the "weakest" (sorted last) entry in the queue.
void | setNextReader(IndexReader reader, int docBase) Set a new Reader.
String | value(int slot) Return the actual value in the slot.
Methods inherited from class org.apache.lucene.search.FieldComparator
binarySearch, binarySearch, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

compare

public int compare(int slot1,
                   int slot2)
Description copied from class: FieldComparator
Compare hit at slot1 with hit at slot2.

Specified by:
compare in class FieldComparator<String>
Parameters:
slot1 - first slot to compare
slot2 - second slot to compare
Returns:
any N < 0 if slot2's value is sorted after slot1, any N > 0 if the slot2's value is sorted before slot1 and 0 if they are equal

compareBottom

public int compareBottom(int doc)
Description copied from class: FieldComparator
Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as FieldComparator.compare(int,int)} as if bottom were slot1 and the new document were slot 2.

For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).

Specified by:
compareBottom in class FieldComparator<String>
Parameters:
doc - that was hit
Returns:
any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal.

copy

public void copy(int slot,
                 int doc)
Description copied from class: FieldComparator
This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.

Specified by:
copy in class FieldComparator<String>
Parameters:
slot - which slot to copy the hit to
doc - docID relative to current reader

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: FieldComparator
Set a new Reader. All doc correspond to the current Reader.

Specified by:
setNextReader in class FieldComparator<String>
Parameters:
reader - current reader
docBase - docBase of this reader
Throws:
IOException

setBottom

public void setBottom(int bottom)
Description copied from class: FieldComparator
Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When FieldComparator.compareBottom(int) is called, you should compare against this slot. This will always be called before FieldComparator.compareBottom(int).

Specified by:
setBottom in class FieldComparator<String>
Parameters:
bottom - the currently weakest (sorted last) slot in the queue

value

public String value(int slot)
Description copied from class: FieldComparator
Return the actual value in the slot.

Specified by:
value in class FieldComparator<String>
Parameters:
slot - the value
Returns:
value in this slot

compareValues

public int compareValues(String val1,
                         String val2)
Description copied from class: FieldComparator
Returns -1 if first is less than second. Default impl to assume the type implements Comparable and invoke .compareTo; be sure to override this method if your FieldComparator's type isn't a Comparable or if your values may sometimes be null

Overrides:
compareValues in class FieldComparator<String>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldComparator.StringOrdValComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldComparator.StringOrdValComparator

java.lang.Object
    extended by  org.apache.lucene.search.FieldComparator<String>
        extended by  org.apache.lucene.search.FieldComparator.StringOrdValComparator
Enclosing class:
FieldComparator<T>
public static final class FieldComparator.StringOrdValComparator
extends FieldComparator<String>

Sorts by field's natural String sort order, using ordinals. This is functionally equivalent to FieldComparator.StringValComparator, but it first resolves the string to their relative ordinal positions (using the index returned by FieldCache.getStringIndex(org.apache.lucene.index.IndexReader, java.lang.String)), and does most comparisons using the ordinals. For medium to large results, this comparator will be much faster than FieldComparator.StringValComparator. For very small result sets it may be slower.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator
FieldComparator.ByteComparator, FieldComparator.DocComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.NumericComparator<T extends Number>, FieldComparator.RelevanceComparator, FieldComparator.ShortComparator, FieldComparator.StringComparatorLocale, FieldComparator.StringOrdValComparator, FieldComparator.StringValComparator
Constructor Summary
FieldComparator.StringOrdValComparator(int numHits, String field, int sortPos, boolean reversed)
Method Summary
int | compare(int slot1, int slot2) Compare hit at slot1 with hit at slot2.
int | compareBottom(int doc) Compare the bottom of the queue with doc.
int | compareValues(String val1, String val2) Returns -1 if first is less than second.
void | copy(int slot, int doc) This method is called when a new hit is competitive.
int | getBottomSlot()
String | getField()
String[] | getValues()
void | setBottom(int bottom) Set the bottom slot, ie the "weakest" (sorted last) entry in the queue.
void | setNextReader(IndexReader reader, int docBase) Set a new Reader.
String | value(int slot) Return the actual value in the slot.
Methods inherited from class org.apache.lucene.search.FieldComparator
binarySearch, binarySearch, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldComparator.StringOrdValComparator

public FieldComparator.StringOrdValComparator(int numHits,
                                              String field,
                                              int sortPos,
                                              boolean reversed)
Method Detail

compare

public int compare(int slot1,
                   int slot2)
Description copied from class: FieldComparator
Compare hit at slot1 with hit at slot2.

Specified by:
compare in class FieldComparator<String>
Parameters:
slot1 - first slot to compare
slot2 - second slot to compare
Returns:
any N < 0 if slot2's value is sorted after slot1, any N > 0 if the slot2's value is sorted before slot1 and 0 if they are equal

compareBottom

public int compareBottom(int doc)
Description copied from class: FieldComparator
Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as FieldComparator.compare(int,int)} as if bottom were slot1 and the new document were slot 2.

For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).

Specified by:
compareBottom in class FieldComparator<String>
Parameters:
doc - that was hit
Returns:
any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal.

copy

public void copy(int slot,
                 int doc)
Description copied from class: FieldComparator
This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.

Specified by:
copy in class FieldComparator<String>
Parameters:
slot - which slot to copy the hit to
doc - docID relative to current reader

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: FieldComparator
Set a new Reader. All doc correspond to the current Reader.

Specified by:
setNextReader in class FieldComparator<String>
Parameters:
reader - current reader
docBase - docBase of this reader
Throws:
IOException

setBottom

public void setBottom(int bottom)
Description copied from class: FieldComparator
Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When FieldComparator.compareBottom(int) is called, you should compare against this slot. This will always be called before FieldComparator.compareBottom(int).

Specified by:
setBottom in class FieldComparator<String>
Parameters:
bottom - the currently weakest (sorted last) slot in the queue

value

public String value(int slot)
Description copied from class: FieldComparator
Return the actual value in the slot.

Specified by:
value in class FieldComparator<String>
Parameters:
slot - the value
Returns:
value in this slot

compareValues

public int compareValues(String val1,
                         String val2)
Description copied from class: FieldComparator
Returns -1 if first is less than second. Default impl to assume the type implements Comparable and invoke .compareTo; be sure to override this method if your FieldComparator's type isn't a Comparable or if your values may sometimes be null

Overrides:
compareValues in class FieldComparator<String>

getValues

public String[] getValues()

getBottomSlot

public int getBottomSlot()

getField

public String getField()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldComparator.StringValComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldComparator.StringValComparator

java.lang.Object
    extended by  org.apache.lucene.search.FieldComparator<String>
        extended by  org.apache.lucene.search.FieldComparator.StringValComparator
Enclosing class:
FieldComparator<T>
public static final class FieldComparator.StringValComparator
extends FieldComparator<String>

Sorts by field's natural String sort order. All comparisons are done using String.compareTo, which is slow for medium to large result sets but possibly very fast for very small results sets.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.FieldComparator
FieldComparator.ByteComparator, FieldComparator.DocComparator, FieldComparator.DoubleComparator, FieldComparator.FloatComparator, FieldComparator.IntComparator, FieldComparator.LongComparator, FieldComparator.NumericComparator<T extends Number>, FieldComparator.RelevanceComparator, FieldComparator.ShortComparator, FieldComparator.StringComparatorLocale, FieldComparator.StringOrdValComparator, FieldComparator.StringValComparator
Method Summary
int | compare(int slot1, int slot2) Compare hit at slot1 with hit at slot2.
int | compareBottom(int doc) Compare the bottom of the queue with doc.
int | compareValues(String val1, String val2) Returns -1 if first is less than second.
void | copy(int slot, int doc) This method is called when a new hit is competitive.
void | setBottom(int bottom) Set the bottom slot, ie the "weakest" (sorted last) entry in the queue.
void | setNextReader(IndexReader reader, int docBase) Set a new Reader.
String | value(int slot) Return the actual value in the slot.
Methods inherited from class org.apache.lucene.search.FieldComparator
binarySearch, binarySearch, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

compare

public int compare(int slot1,
                   int slot2)
Description copied from class: FieldComparator
Compare hit at slot1 with hit at slot2.

Specified by:
compare in class FieldComparator<String>
Parameters:
slot1 - first slot to compare
slot2 - second slot to compare
Returns:
any N < 0 if slot2's value is sorted after slot1, any N > 0 if the slot2's value is sorted before slot1 and 0 if they are equal

compareBottom

public int compareBottom(int doc)
Description copied from class: FieldComparator
Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as FieldComparator.compare(int,int)} as if bottom were slot1 and the new document were slot 2.

For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).

Specified by:
compareBottom in class FieldComparator<String>
Parameters:
doc - that was hit
Returns:
any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal.

copy

public void copy(int slot,
                 int doc)
Description copied from class: FieldComparator
This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.

Specified by:
copy in class FieldComparator<String>
Parameters:
slot - which slot to copy the hit to
doc - docID relative to current reader

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: FieldComparator
Set a new Reader. All doc correspond to the current Reader.

Specified by:
setNextReader in class FieldComparator<String>
Parameters:
reader - current reader
docBase - docBase of this reader
Throws:
IOException

setBottom

public void setBottom(int bottom)
Description copied from class: FieldComparator
Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When FieldComparator.compareBottom(int) is called, you should compare against this slot. This will always be called before FieldComparator.compareBottom(int).

Specified by:
setBottom in class FieldComparator<String>
Parameters:
bottom - the currently weakest (sorted last) slot in the queue

value

public String value(int slot)
Description copied from class: FieldComparator
Return the actual value in the slot.

Specified by:
value in class FieldComparator<String>
Parameters:
slot - the value
Returns:
value in this slot

compareValues

public int compareValues(String val1,
                         String val2)
Description copied from class: FieldComparator
Returns -1 if first is less than second. Default impl to assume the type implements Comparable and invoke .compareTo; be sure to override this method if your FieldComparator's type isn't a Comparable or if your values may sometimes be null

Overrides:
compareValues in class FieldComparator<String>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldComparatorSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldComparatorSource

java.lang.Object
    extended by  org.apache.lucene.search.FieldComparatorSource
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DistanceFieldComparatorSource
public abstract class FieldComparatorSource
extends Object
implements Serializable

Provides a FieldComparator for custom field sorting.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
FieldComparatorSource()
Method Summary
abstract  FieldComparator<?> newComparator(String fieldname, int numHits, int sortPos, boolean reversed)
Creates a comparator for the field in the given index.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldComparatorSource

public FieldComparatorSource()
Method Detail

newComparator

public abstract FieldComparator<?> newComparator(String fieldname,
                                                 int numHits,
                                                 int sortPos,
                                                 boolean reversed)
                                          throws IOException
Creates a comparator for the field in the given index.

Parameters:
fieldname - Name of the field to create comparator for.
Returns:
FieldComparator.
Throws:
IOException - If an error occurs reading the index.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldDoc

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldDoc

java.lang.Object
    extended by  org.apache.lucene.search.ScoreDoc
        extended by  org.apache.lucene.search.FieldDoc
All Implemented Interfaces:
Serializable
public class FieldDoc
extends ScoreDoc

Expert: A ScoreDoc which also contains information about how to sort the referenced document. In addition to the document number and score, this object contains an array of values for the document from the field(s) used to sort. For example, if the sort criteria was to sort by fields "a", "b" then "c", the fields object array will have three elements, corresponding respectively to the term values for the document in fields "a", "b" and "c". The class of each element in the array will be either Integer, Float or String depending on the type of values in the terms of each field.

Created: Feb 11, 2004 1:23:38 PM

Since:
lucene 1.4
See Also:
ScoreDoc, TopFieldDocs, Serialized Form

Field Summary
 Object[] fields
Expert: The values which are used to sort the referenced document.
Fields inherited from class org.apache.lucene.search.ScoreDoc
doc, score, shardIndex
Constructor Summary
FieldDoc(int doc, float score)
Expert: Creates one of these objects with empty sort information.
FieldDoc(int doc, float score, Object[] fields)
Expert: Creates one of these objects with the given sort information.
FieldDoc(int doc, float score, Object[] fields, int shardIndex)
Expert: Creates one of these objects with the given sort information.
Method Summary
 String toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

fields

public Object[] fields
Expert: The values which are used to sort the referenced document. The order of these will match the original sort criteria given by a Sort object. Each Object will have been returned from the value method corresponding FieldComparator used to sort this field.

See Also:
Sort, Searcher.search(Query,Filter,int,Sort)
Constructor Detail

FieldDoc

public FieldDoc(int doc,
                float score)
Expert: Creates one of these objects with empty sort information.

FieldDoc

public FieldDoc(int doc,
                float score,
                Object[] fields)
Expert: Creates one of these objects with the given sort information.

FieldDoc

public FieldDoc(int doc,
                float score,
                Object[] fields,
                int shardIndex)
Expert: Creates one of these objects with the given sort information.

Method Detail

toString

public String toString()
Overrides:
toString in class ScoreDoc
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldValueFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldValueFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.FieldValueFilter
All Implemented Interfaces:
Serializable
public class FieldValueFilter
extends Filter

A Filter that accepts all documents that have one or more values in a given field. This Filter request Bits from the FieldCache and build the bits if not present.

See Also:
Serialized Form

Constructor Summary
FieldValueFilter(String field)
Creates a new FieldValueFilter
FieldValueFilter(String field, boolean negate)
Creates a new FieldValueFilter
Method Summary
boolean | equals(Object obj)
String | field() Returns the field this filter is applied on.
DocIdSet | getDocIdSet(IndexReader reader) Creates a DocIdSet enumerating the documents that should be permitted in search results.
int | hashCode()
boolean | negate() Returns true iff this filter is negated, otherwise false
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FieldValueFilter

public FieldValueFilter(String field)
Creates a new FieldValueFilter

Parameters:
field - the field to filter

FieldValueFilter

public FieldValueFilter(String field,
                        boolean negate)
Creates a new FieldValueFilter

Parameters:
field - the field to filter
negate - iff true all documents with no value in the given field are accepted.
Method Detail

field

public String field()
Returns the field this filter is applied on.

Returns:
the field this filter is applied on.

negate

public boolean negate()
Returns true iff this filter is negated, otherwise false

Returns:
true iff this filter is negated, otherwise false

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Description copied from class: Filter
Creates a DocIdSet enumerating the documents that should be permitted in search results. NOTE: null can be returned if no documents are accepted by this Filter.

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldValueHitQueue.Entry

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldValueHitQueue.Entry

java.lang.Object
    extended by  org.apache.lucene.search.ScoreDoc
        extended by  org.apache.lucene.search.FieldValueHitQueue.Entry
All Implemented Interfaces:
Serializable
Enclosing class:
FieldValueHitQueue<T extends FieldValueHitQueue.Entry>
public static class FieldValueHitQueue.Entry
extends ScoreDoc

See Also:
Serialized Form

Field Summary
 int slot
Fields inherited from class org.apache.lucene.search.ScoreDoc
doc, score, shardIndex
Constructor Summary
FieldValueHitQueue.Entry(int slot, int doc, float score)
Method Summary
 String toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

slot

public int slot
Constructor Detail

FieldValueHitQueue.Entry

public FieldValueHitQueue.Entry(int slot,
                                int doc,
                                float score)
Method Detail

toString

public String toString()
Overrides:
toString in class ScoreDoc
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldValueHitQueue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FieldValueHitQueue<T extends FieldValueHitQueue.Entry>

java.lang.Object
    extended by  org.apache.lucene.util.PriorityQueue<T>
        extended by  org.apache.lucene.search.FieldValueHitQueue<T>

public abstract class FieldValueHitQueue<T extends FieldValueHitQueue.Entry>
extends PriorityQueue<T>

Expert: A hit queue for sorting by hits by terms in more than one field. Uses FieldCache.DEFAULT for maintaining internal term lookup tables.

Since:
2.9
See Also:
Searcher.search(Query,Filter,int,Sort), FieldCache
WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class FieldValueHitQueue.Entry
Field Summary
protected FieldComparator<?>[] | comparators
protected SortField[] | fields Stores the sort criteria being used.
protected int[] | reverseMul
Method Summary
static
<T extends FieldValueHitQueue.Entry>
FieldValueHitQueue<T>
create(SortField[] fields, int size)
Creates a hit queue sorted by the given list of fields.
 FieldComparator<?>[] getComparators()
 int[] getReverseMul()
protected abstract  boolean lessThan(FieldValueHitQueue.Entry a, FieldValueHitQueue.Entry b)
Determines the ordering of objects in this priority queue.
Methods inherited from class org.apache.lucene.util.PriorityQueue
add, clear, getHeapArray, getSentinelObject, initialize, insertWithOverflow, pop, size, top, updateTop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

fields

protected final SortField[] fields
Stores the sort criteria being used.

comparators

protected final FieldComparator<?>[] comparators

reverseMul

protected final int[] reverseMul
Method Detail

create

public static <T extends FieldValueHitQueue.Entry> FieldValueHitQueue<T> create(SortField[] fields,
                                                                                int size)
                                                                     throws IOException
Creates a hit queue sorted by the given list of fields.

NOTE: The instances returned by this method pre-allocate a full array of length numHits.

Parameters:
fields - SortField array we are sorting by in priority order (highest priority first); cannot be null or empty
size - The number of hits to retain. Must be greater than zero.
Throws:
IOException

getComparators

public FieldComparator<?>[] getComparators()

getReverseMul

public int[] getReverseMul()

lessThan

protected abstract boolean lessThan(FieldValueHitQueue.Entry a,
                                    FieldValueHitQueue.Entry b)
Description copied from class: PriorityQueue
Determines the ordering of objects in this priority queue. Subclasses must define this one method.

Specified by:
lessThan in class PriorityQueue<T extends FieldValueHitQueue.Entry>
Returns:
true iff parameter a is less than parameter b.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Filter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class Filter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BooleanFilter, CachingWrapperFilter, CartesianShapeFilter, ChainedFilter, DistanceFilter, DuplicateFilter, FieldCacheRangeFilter, FieldCacheTermsFilter, FieldValueFilter, MultiTermQueryWrapperFilter, QueryWrapperFilter, RawTermFilter, RemoteCachingWrapperFilter, SpanFilter, TermsFilter
public abstract class Filter
extends Object
implements Serializable

Abstract base class for restricting which documents may be returned during searching.

See Also:
Serialized Form

Constructor Summary
Filter()
Method Summary
abstract  DocIdSet getDocIdSet(IndexReader reader)
Creates a DocIdSet enumerating the documents that should be permitted in search results.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Filter

public Filter()
Method Detail

getDocIdSet

public abstract DocIdSet getDocIdSet(IndexReader reader)
                              throws IOException
Creates a DocIdSet enumerating the documents that should be permitted in search results. NOTE: null can be returned if no documents are accepted by this Filter.

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterClause

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FilterClause

java.lang.Object
    extended by  org.apache.lucene.search.FilterClause

public final class FilterClause
extends Object

A Filter that wrapped with an indication of how that filter is used when composed with another filter. (Follows the boolean logic in BooleanClause for composition of queries.)

Constructor Summary
FilterClause(Filter filter, BooleanClause.Occur occur)
Create a new FilterClause
Method Summary
boolean | equals(Object o)
Filter | getFilter() Returns this FilterClause's filter
BooleanClause.Occur | getOccur() Returns this FilterClause's occur parameter
int | hashCode()
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FilterClause

public FilterClause(Filter filter,
                    BooleanClause.Occur occur)
Create a new FilterClause

Parameters:
filter - A Filter object containing a BitSet
occur - A parameter implementation indicating SHOULD, MUST or MUST NOT
Method Detail

getFilter

public Filter getFilter()
Returns this FilterClause's filter

Returns:
A Filter object

getOccur

public BooleanClause.Occur getOccur()
Returns this FilterClause's occur parameter

Returns:
An Occur object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilteredDocIdSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FilteredDocIdSet

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSet
        extended by  org.apache.lucene.search.FilteredDocIdSet

public abstract class FilteredDocIdSet
extends DocIdSet

Abstract decorator class for a DocIdSet implementation that provides on-demand filtering/validation mechanism on a given DocIdSet.

Technically, this same functionality could be achieved with ChainedFilter (under contrib/misc), however the benefit of this class is it never materializes the full bitset for the filter. Instead, the match(int) method is invoked on-demand, per docID visited during searching. If you know few docIDs will be visited, and the logic behind match(int) is relatively costly, this may be a better way to filter than ChainedFilter.

See Also:
DocIdSet

Field Summary
Fields inherited from class org.apache.lucene.search.DocIdSet
EMPTY_DOCIDSET
Constructor Summary
FilteredDocIdSet(DocIdSet innerSet)
Constructor.
Method Summary
boolean | isCacheable() This DocIdSet implementation is cacheable if the inner set is cacheable.
DocIdSetIterator | iterator() Implementation of the contract to build a DocIdSetIterator.
protected abstract boolean | match(int docid) Validation method to determine whether a docid should be in the result set.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FilteredDocIdSet

public FilteredDocIdSet(DocIdSet innerSet)
Constructor.

Parameters:
innerSet - Underlying DocIdSet
Method Detail

isCacheable

public boolean isCacheable()
This DocIdSet implementation is cacheable if the inner set is cacheable.

Overrides:
isCacheable in class DocIdSet

match

protected abstract boolean match(int docid)
                          throws IOException
Validation method to determine whether a docid should be in the result set.

Parameters:
docid - docid to be tested
Returns:
true if input docid should be in the result set, false otherwise.
Throws:
IOException

iterator

public DocIdSetIterator iterator()
                          throws IOException
Implementation of the contract to build a DocIdSetIterator.

Specified by:
iterator in class DocIdSet
Throws:
IOException
See Also:
DocIdSetIterator, FilteredDocIdSetIterator
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilteredDocIdSetIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FilteredDocIdSetIterator

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSetIterator
        extended by  org.apache.lucene.search.FilteredDocIdSetIterator

public abstract class FilteredDocIdSetIterator
extends DocIdSetIterator

Abstract decorator class of a DocIdSetIterator implementation that provides on-demand filter/validation mechanism on an underlying DocIdSetIterator. See FilteredDocIdSet.

Field Summary
protected  DocIdSetIterator _innerIter
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
Constructor Summary
FilteredDocIdSetIterator(DocIdSetIterator innerIter)
Constructor.
Method Summary
 int advance(int target)
Advances to the first beyond (see NOTE below) the current whose document number is greater than or equal to target.
 int docID()
Returns the following: -1 or DocIdSetIterator.NO_MORE_DOCS if DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) were not called yet.
protected abstract  boolean match(int doc)
Validation method to determine whether a docid should be in the result set.
 int nextDoc()
Advances to the next document in the set and returns the doc it is currently on, or DocIdSetIterator.NO_MORE_DOCS if there are no more docs in the set.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

_innerIter

protected DocIdSetIterator _innerIter
Constructor Detail

FilteredDocIdSetIterator

public FilteredDocIdSetIterator(DocIdSetIterator innerIter)
Constructor.

Parameters:
innerIter - Underlying DocIdSetIterator.
Method Detail

match

protected abstract boolean match(int doc)
                          throws IOException
Validation method to determine whether a docid should be in the result set.

Parameters:
doc - docid to be tested
Returns:
true if input docid should be in the result set, false otherwise.
Throws:
IOException
See Also:
FilteredDocIdSetIterator(DocIdSetIterator)

docID

public int docID()
Description copied from class: DocIdSetIterator
Returns the following:
  • -1 or DocIdSetIterator.NO_MORE_DOCS if DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) were not called yet.
  • DocIdSetIterator.NO_MORE_DOCS if the iterator has exhausted.
  • Otherwise it should return the doc ID it is currently on.

Specified by:
docID in class DocIdSetIterator

nextDoc

public int nextDoc()
            throws IOException
Description copied from class: DocIdSetIterator
Advances to the next document in the set and returns the doc it is currently on, or DocIdSetIterator.NO_MORE_DOCS if there are no more docs in the set.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.

Specified by:
nextDoc in class DocIdSetIterator
Throws:
IOException

advance

public int advance(int target)
            throws IOException
Description copied from class: DocIdSetIterator
Advances to the first beyond (see NOTE below) the current whose document number is greater than or equal to target. Returns the current document number or DocIdSetIterator.NO_MORE_DOCS if there are no more docs in the set.

Behaves as if written:

 int advance(int target) {
   int doc;
   while ((doc = nextDoc()) < target) {
   }
   return doc;
 }
Some implementations are considerably more efficient than that.

NOTE: when target ≤ current implementations may opt not to advance beyond their current DocIdSetIterator.docID().

NOTE: this method may be called with DocIdSetIterator.NO_MORE_DOCS for efficiency by some Scorers. If your implementation cannot efficiently determine that it should exhaust, it is recommended that you check for that value in each call to this method.

NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.

Specified by:
advance in class DocIdSetIterator
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilteredQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FilteredQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.FilteredQuery
All Implemented Interfaces:
Serializable, Cloneable
public class FilteredQuery
extends Query

A query that applies a filter to the results of another query.

Note: the bits are retrieved from the filter each time this query is used in a search - use a CachingWrapperFilter to avoid regenerating the bits every time.

Created: Apr 20, 2004 8:58:29 AM

Since:
1.4
See Also:
CachingWrapperFilter, Serialized Form

Constructor Summary
FilteredQuery(Query query, Filter filter)
Constructs a new query which applies a filter to the results of the original query.
Method Summary
Weight | createWeight(Searcher searcher) Returns a Weight that applies the filter to the enclosed query's Weight.
boolean | equals(Object o) Returns true iff o is equal to this.
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
Filter | getFilter()
Query | getQuery()
int | hashCode() Returns a hash code value for this object.
Query | rewrite(IndexReader reader) Rewrites the wrapped query.
String | toString(String s) Prints a user-readable version of this query.
Methods inherited from class org.apache.lucene.search.Query
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FilteredQuery

public FilteredQuery(Query query,
                     Filter filter)
Constructs a new query which applies a filter to the results of the original query. Filter.getDocIdSet() will be called every time this query is used in a search.

Parameters:
query - Query to be filtered, cannot be null.
filter - Filter to apply to query results, cannot be null.
Method Detail

createWeight

public Weight createWeight(Searcher searcher)
                    throws IOException
Returns a Weight that applies the filter to the enclosed query's Weight. This is accomplished by overriding the Scorer returned by the Weight.

Overrides:
createWeight in class Query
Throws:
IOException

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Rewrites the wrapped query.

Overrides:
rewrite in class Query
Throws:
IOException

getQuery

public Query getQuery()

getFilter

public Filter getFilter()

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

toString

public String toString(String s)
Prints a user-readable version of this query.

Specified by:
toString in class Query

equals

public boolean equals(Object o)
Returns true iff o is equal to this.

Overrides:
equals in class Query

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilteredTermEnum

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FilteredTermEnum

java.lang.Object
    extended by  org.apache.lucene.index.TermEnum
        extended by  org.apache.lucene.search.FilteredTermEnum
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
FuzzyTermEnum, PrefixTermEnum, RegexTermEnum, SingleTermEnum, TermRangeTermEnum, WildcardTermEnum
public abstract class FilteredTermEnum
extends TermEnum

Abstract class for enumerating a subset of all terms.

Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.

Field Summary
protected TermEnum | actualEnum the delegate enum - to set this member use setEnum(org.apache.lucene.index.TermEnum)
protected Term | currentTerm the current term
Constructor Summary
FilteredTermEnum()
Method Summary
void | close() Closes the enumeration to further activity, freeing resources.
abstract float | difference() Equality measure on the term
int | docFreq() Returns the docFreq of the current Term in the enumeration.
protected abstract boolean | endEnum() Indicates the end of the enumeration has been reached
boolean | next() Increments the enumeration to the next element.
protected void | setEnum(TermEnum actualEnum) use this method to set the actual TermEnum (e.g.
Term | term() Returns the current Term in the enumeration.
protected abstract boolean | termCompare(Term term) Equality compare on the term
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

currentTerm

protected Term currentTerm
the current term

actualEnum

protected TermEnum actualEnum
the delegate enum - to set this member use setEnum(org.apache.lucene.index.TermEnum)

Constructor Detail

FilteredTermEnum

public FilteredTermEnum()
Method Detail

termCompare

protected abstract boolean termCompare(Term term)
Equality compare on the term

difference

public abstract float difference()
Equality measure on the term

endEnum

protected abstract boolean endEnum()
Indicates the end of the enumeration has been reached

setEnum

protected void setEnum(TermEnum actualEnum)
                throws IOException
use this method to set the actual TermEnum (e.g. in ctor), it will be automatically positioned on the first matching term.

Throws:
IOException

docFreq

public int docFreq()
Returns the docFreq of the current Term in the enumeration. Returns -1 if no Term matches or all terms have been enumerated.

Specified by:
docFreq in class TermEnum

next

public boolean next()
             throws IOException
Increments the enumeration to the next element. True if one exists.

Specified by:
next in class TermEnum
Throws:
IOException

term

public Term term()
Returns the current Term in the enumeration. Returns null if no Term matches or all terms have been enumerated.

Specified by:
term in class TermEnum

close

public void close()
           throws IOException
Closes the enumeration to further activity, freeing resources.

Specified by:
close in interface Closeable
Specified by:
close in class TermEnum
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterManager.FilterCleaner

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FilterManager.FilterCleaner

java.lang.Object
    extended by  org.apache.lucene.search.FilterManager.FilterCleaner
All Implemented Interfaces:
Runnable
Enclosing class:
FilterManager
protected class FilterManager.FilterCleaner
extends Object
implements Runnable

Keeps the cache from getting too big. If we were using Java 1.5, we could use LinkedHashMap and we would not need this thread to clean out the cache. The SortedSet sortedFilterItems is used only to sort the items from the cache, so when it's time to clean up we have the TreeSet sort the FilterItems by timestamp. Removes 1.5 * the numbers of items to make the cache smaller. For example: If cache clean size is 10, and the cache is at 15, we would remove (15 - 10) * 1.5 = 7.5 round up to 8. This way we clean the cache a bit more, and avoid having the cache cleaner having to do it frequently.

Constructor Summary
FilterManager.FilterCleaner()
Method Summary
 void run()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FilterManager.FilterCleaner

public FilterManager.FilterCleaner()
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterManager.FilterItem

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FilterManager.FilterItem

java.lang.Object
    extended by  org.apache.lucene.search.FilterManager.FilterItem
Enclosing class:
FilterManager
protected class FilterManager.FilterItem
extends Object

Holds the filter and the last time the filter was used, to make LRU-based cache cleaning possible. TODO: Clean this up when we switch to Java 1.5

Field Summary
Filter | filter
long | timestamp
Constructor Summary
FilterManager.FilterItem(Filter filter)
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

filter

public Filter filter

timestamp

public long timestamp
Constructor Detail

FilterManager.FilterItem

public FilterManager.FilterItem(Filter filter)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FilterManager

java.lang.Object
    extended by  org.apache.lucene.search.FilterManager
Deprecated. used by remote package which is deprecated as well. You should use CachingWrapperFilter if you wish to cache Filters.

@Deprecated
public class FilterManager
extends Object

Filter caching singleton. It can be used to save filters locally for reuse. This class makes it possible to cache Filters even when using RMI, as it keeps the cache on the searcher side of the RMI connection. Also could be used as a persistent storage for any filter as long as the filter provides a proper hashCode(), as that is used as the key in the cache. The cache is periodically cleaned up from a separate thread to ensure the cache doesn't exceed the maximum size.

Nested Class Summary
protected class | FilterManager.FilterCleaner Deprecated. Keeps the cache from getting too big.
protected class | FilterManager.FilterItem Deprecated. Holds the filter and the last time the filter was used, to make LRU-based cache cleaning possible.
Field Summary
protected Map<Integer,FilterManager.FilterItem> | cache Deprecated. The cache itself
protected int | cacheCleanSize Deprecated. Maximum allowed cache size
protected long | cleanSleepTime Deprecated. Cache cleaning frequency
protected static int | DEFAULT_CACHE_CLEAN_SIZE Deprecated. The default maximum number of Filters in the cache
protected static long | DEFAULT_CACHE_SLEEP_TIME Deprecated. The default frequency of cache cleanup
protected FilterManager.FilterCleaner | filterCleaner Deprecated. Cache cleaner that runs in a separate thread
protected static FilterManager | manager Deprecated.
Constructor Summary
protected FilterManager()
Deprecated. Sets up the FilterManager singleton.
Method Summary
Filter | getFilter(Filter filter) Deprecated. Returns the cached version of the filter.
static FilterManager | getInstance() Deprecated.
void | setCacheSize(int cacheCleanSize) Deprecated. Sets the max size that cache should reach before it is cleaned up
void | setCleanThreadSleepTime(long cleanSleepTime) Deprecated. Sets the cache cleaning frequency in milliseconds.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

manager

protected static FilterManager manager
Deprecated.

DEFAULT_CACHE_CLEAN_SIZE

protected static final int DEFAULT_CACHE_CLEAN_SIZE
Deprecated.
The default maximum number of Filters in the cache

See Also:
Constant Field Values

DEFAULT_CACHE_SLEEP_TIME

protected static final long DEFAULT_CACHE_SLEEP_TIME
Deprecated.
The default frequency of cache cleanup

See Also:
Constant Field Values

cache

protected Map<Integer,FilterManager.FilterItem> cache
Deprecated.
The cache itself

cacheCleanSize

protected int cacheCleanSize
Deprecated.
Maximum allowed cache size

cleanSleepTime

protected long cleanSleepTime
Deprecated.
Cache cleaning frequency

filterCleaner

protected FilterManager.FilterCleaner filterCleaner
Deprecated.
Cache cleaner that runs in a separate thread

Constructor Detail

FilterManager

protected FilterManager()
Deprecated.
Sets up the FilterManager singleton.

Method Detail

getInstance

public static FilterManager getInstance()
Deprecated.

setCacheSize

public void setCacheSize(int cacheCleanSize)
Deprecated.
Sets the max size that cache should reach before it is cleaned up

Parameters:
cacheCleanSize - maximum allowed cache size

setCleanThreadSleepTime

public void setCleanThreadSleepTime(long cleanSleepTime)
Deprecated.
Sets the cache cleaning frequency in milliseconds.

Parameters:
cleanSleepTime - cleaning frequency in milliseconds

getFilter

public Filter getFilter(Filter filter)
Deprecated.
Returns the cached version of the filter. Allows the caller to pass up a small filter but this will keep a persistent version around and allow the caching filter to do its job.

Parameters:
filter - The input filter
Returns:
The cached version of the filter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FuzzyLikeThisQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FuzzyLikeThisQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.FuzzyLikeThisQuery
All Implemented Interfaces:
Serializable, Cloneable
public class FuzzyLikeThisQuery
extends Query

Fuzzifies ALL terms provided as strings and then picks the best n differentiating terms. In effect this mixes the behaviour of FuzzyQuery and MoreLikeThis but with special consideration of fuzzy scoring factors. This generally produces good results for queries where users may provide details in a number of fields and have no knowledge of boolean query syntax and also want a degree of fuzzy matching and a fast query. For each source term the fuzzy variants are held in a BooleanQuery with no coord factor (because we are not looking for matches on multiple variants in any one doc). Additionally, a specialized TermQuery is used for variants and does not use that variant term's IDF because this would favour rarer terms eg misspellings. Instead, all variants use the same IDF ranking (the one for the source query term) and this is factored into the variant's boost. If the source query term does not exist in the index the average IDF of the variants is used.

See Also:
Serialized Form

Constructor Summary
FuzzyLikeThisQuery(int maxNumTerms, Analyzer analyzer)
Method Summary
void | addTerms(String queryString, String fieldName, float minSimilarity, int prefixLength) Adds user input for "fuzzification"
boolean | equals(Object obj)
int | hashCode()
boolean | isIgnoreTF()
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
void | setIgnoreTF(boolean ignoreTF)
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.Query
clone, combine, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FuzzyLikeThisQuery

public FuzzyLikeThisQuery(int maxNumTerms,
                          Analyzer analyzer)
Parameters:
maxNumTerms - The total number of terms clauses that will appear once rewritten as a BooleanQuery
analyzer -
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Query

equals

public boolean equals(Object obj)
Overrides:
equals in class Query

addTerms

public void addTerms(String queryString,
                     String fieldName,
                     float minSimilarity,
                     int prefixLength)
Adds user input for "fuzzification"

Parameters:
queryString - The string which will be parsed by the analyzer and for which fuzzy variants will be parsed
fieldName -
minSimilarity - The minimum similarity of the term variants (see FuzzyTermEnum)
prefixLength - Length of required common prefix on variant terms (see FuzzyTermEnum)

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

isIgnoreTF

public boolean isIgnoreTF()

setIgnoreTF

public void setIgnoreTF(boolean ignoreTF)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FuzzyQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FuzzyQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.MultiTermQuery
            extended by  org.apache.lucene.search.FuzzyQuery
All Implemented Interfaces:
Serializable, Cloneable
public class FuzzyQuery
extends MultiTermQuery

Implements the fuzzy search query. The similarity measurement is based on the Levenshtein (edit distance) algorithm.

Warning: this query is not very scalable with its default prefix length of 0 - in this case, *every* term will be enumerated and cause an edit score calculation.

This query uses MultiTermQuery.TopTermsScoringBooleanQueryRewrite as default. So terms will be collected and scored according to their edit distance. Only the top terms are used for building the BooleanQuery. It is not recommended to change the rewrite mode for fuzzy queries.

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.MultiTermQuery
MultiTermQuery.ConstantScoreAutoRewrite, MultiTermQuery.RewriteMethod, MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite, MultiTermQuery.TopTermsScoringBooleanQueryRewrite
Field Summary
static int | defaultMaxExpansions
static float | defaultMinSimilarity
static int | defaultPrefixLength
protected Term | term
Fields inherited from class org.apache.lucene.search.MultiTermQuery
CONSTANT_SCORE_AUTO_REWRITE_DEFAULT, CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE, CONSTANT_SCORE_FILTER_REWRITE, rewriteMethod, SCORING_BOOLEAN_QUERY_REWRITE
Constructor Summary
FuzzyQuery(Term term)
Calls FuzzyQuery(term, 0.5f, 0, Integer.MAX_VALUE).
FuzzyQuery(Term term, float minimumSimilarity)
Calls FuzzyQuery(term, minimumSimilarity, 0, Integer.MAX_VALUE).
FuzzyQuery(Term term, float minimumSimilarity, int prefixLength)
Calls FuzzyQuery(term, minimumSimilarity, prefixLength, Integer.MAX_VALUE).
FuzzyQuery(Term term, float minimumSimilarity, int prefixLength, int maxExpansions)
Create a new FuzzyQuery that will match terms with a similarity of at least minimumSimilarity to term.
Method Summary
boolean | equals(Object obj)
protected FilteredTermEnum | getEnum(IndexReader reader) Construct the enumeration to be used, expanding the pattern term.
float | getMinSimilarity() Returns the minimum similarity that is required for this query to match.
int | getPrefixLength() Returns the non-fuzzy prefix length.
Term | getTerm() Returns the pattern term.
int | hashCode()
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.MultiTermQuery
clearTotalNumberOfTerms, getRewriteMethod, getTotalNumberOfTerms, incTotalNumberOfTerms, rewrite, setRewriteMethod
Methods inherited from class org.apache.lucene.search.Query
clone, combine, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

defaultMinSimilarity

public static final float defaultMinSimilarity
See Also:
Constant Field Values

defaultPrefixLength

public static final int defaultPrefixLength
See Also:
Constant Field Values

defaultMaxExpansions

public static final int defaultMaxExpansions
See Also:
Constant Field Values

term

protected Term term
Constructor Detail

FuzzyQuery

public FuzzyQuery(Term term,
                  float minimumSimilarity,
                  int prefixLength,
                  int maxExpansions)
Create a new FuzzyQuery that will match terms with a similarity of at least minimumSimilarity to term. If a prefixLength > 0 is specified, a common prefix of that length is also required.

Parameters:
term - the term to search for
minimumSimilarity - a value between 0 and 1 to set the required similarity between the query term and the matching terms. For example, for a minimumSimilarity of 0.5 a term of the same length as the query term is considered similar to the query term if the edit distance between both terms is less than length(term)*0.5
prefixLength - length of common (non-fuzzy) prefix
maxExpansions - the maximum number of terms to match. If this number is greater than BooleanQuery.getMaxClauseCount() when the query is rewritten, then the maxClauseCount will be used instead.
Throws:
IllegalArgumentException - if minimumSimilarity is >= 1 or < 0 or if prefixLength < 0

FuzzyQuery

public FuzzyQuery(Term term,
                  float minimumSimilarity,
                  int prefixLength)
Calls FuzzyQuery(term, minimumSimilarity, prefixLength, Integer.MAX_VALUE).

FuzzyQuery

public FuzzyQuery(Term term,
                  float minimumSimilarity)
Calls FuzzyQuery(term, minimumSimilarity, 0, Integer.MAX_VALUE).

FuzzyQuery

public FuzzyQuery(Term term)
Calls FuzzyQuery(term, 0.5f, 0, Integer.MAX_VALUE).

Method Detail

getMinSimilarity

public float getMinSimilarity()
Returns the minimum similarity that is required for this query to match.

Returns:
float value between 0.0 and 1.0

getPrefixLength

public int getPrefixLength()
Returns the non-fuzzy prefix length. This is the number of characters at the start of a term that must be identical (not fuzzy) to the query term if the query is to match that term.

getEnum

protected FilteredTermEnum getEnum(IndexReader reader)
                            throws IOException
Description copied from class: MultiTermQuery
Construct the enumeration to be used, expanding the pattern term.

Specified by:
getEnum in class MultiTermQuery
Throws:
IOException

getTerm

public Term getTerm()
Returns the pattern term.

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class MultiTermQuery

equals

public boolean equals(Object obj)
Overrides:
equals in class MultiTermQuery
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FuzzyTermEnum

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class FuzzyTermEnum

java.lang.Object
    extended by  org.apache.lucene.index.TermEnum
        extended by  org.apache.lucene.search.FilteredTermEnum
            extended by  org.apache.lucene.search.FuzzyTermEnum
All Implemented Interfaces:
Closeable
public final class FuzzyTermEnum
extends FilteredTermEnum

Subclass of FilteredTermEnum for enumerating all terms that are similar to the specified filter term.

Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.

Field Summary
Fields inherited from class org.apache.lucene.search.FilteredTermEnum
actualEnum, currentTerm
Constructor Summary
FuzzyTermEnum(IndexReader reader, Term term)
Creates a FuzzyTermEnum with an empty prefix and a minSimilarity of 0.5f.
FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity)
Creates a FuzzyTermEnum with an empty prefix.
FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity, int prefixLength)
Constructor for enumeration of all terms from specified reader which share a prefix of length prefixLength with term and which have a fuzzy similarity > minSimilarity.
Method Summary
void | close() Closes the enumeration to further activity, freeing resources.
float | difference() Equality measure on the term
boolean | endEnum() Indicates the end of the enumeration has been reached
protected boolean | termCompare(Term term) The termCompare method in FuzzyTermEnum uses Levenshtein distance to calculate the distance between the given term and the comparing term.
Methods inherited from class org.apache.lucene.search.FilteredTermEnum
docFreq, next, setEnum, term
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FuzzyTermEnum

public FuzzyTermEnum(IndexReader reader,
                     Term term)
              throws IOException
Creates a FuzzyTermEnum with an empty prefix and a minSimilarity of 0.5f.

After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.

Parameters:
reader -
term -
Throws:
IOException
See Also:
FuzzyTermEnum(IndexReader, Term, float, int)

FuzzyTermEnum

public FuzzyTermEnum(IndexReader reader,
                     Term term,
                     float minSimilarity)
              throws IOException
Creates a FuzzyTermEnum with an empty prefix.

After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.

Parameters:
reader -
term -
minSimilarity -
Throws:
IOException
See Also:
FuzzyTermEnum(IndexReader, Term, float, int)

FuzzyTermEnum

public FuzzyTermEnum(IndexReader reader,
                     Term term,
                     float minSimilarity,
                     int prefixLength)
              throws IOException
Constructor for enumeration of all terms from specified reader which share a prefix of length prefixLength with term and which have a fuzzy similarity > minSimilarity.

After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.

Parameters:
reader - Delivers terms.
term - Pattern term.
minSimilarity - Minimum required similarity for terms from the reader. Default value is 0.5f.
prefixLength - Length of required common prefix. Default value is 0.
Throws:
IOException
Method Detail

termCompare

protected final boolean termCompare(Term term)
The termCompare method in FuzzyTermEnum uses Levenshtein distance to calculate the distance between the given term and the comparing term.

Specified by:
termCompare in class FilteredTermEnum

difference

public final float difference()
Equality measure on the term

Specified by:
difference in class FilteredTermEnum

endEnum

public final boolean endEnum()
Indicates the end of the enumeration has been reached

Specified by:
endEnum in class FilteredTermEnum

close

public void close()
           throws IOException
Closes the enumeration to further activity, freeing resources.

Specified by:
close in interface Closeable
Overrides:
close in class FilteredTermEnum
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexSearcher

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class IndexSearcher

java.lang.Object
    extended by  org.apache.lucene.search.Searcher
        extended by  org.apache.lucene.search.IndexSearcher
All Implemented Interfaces:
Closeable, Searchable
Direct Known Subclasses:
AssertingIndexSearcher, CheckHits.ExplanationAssertingSearcher
public class IndexSearcher
extends Searcher

Implements search over a single IndexReader.

Applications usually need only call the inherited search(Query,int) or search(Query,Filter,int) methods. For performance reasons, if your index is unchanging, you should share a single IndexSearcher instance across multiple searches instead of creating a new one per-search. If your index has changed and you wish to see the changes reflected in searching, you should use IndexReader.openIfChanged(org.apache.lucene.index.IndexReader) to obtain a new reader and then create a new IndexSearcher from that. Also, for low-latency turnaround it's best to use a near-real-time reader (IndexReader.open(IndexWriter,boolean)). Once you have a new IndexReader, it's relatively cheap to create a new IndexSearcher from it.

NOTE: IndexSearcher instances are completely thread safe, meaning multiple threads can call any of its methods, concurrently. If your application requires external synchronization, you should not synchronize on the IndexSearcher instance; use your own (non-Lucene) objects instead.

Field Summary
protected int[] | docStarts
protected IndexReader[] | subReaders
protected IndexSearcher[] | subSearchers
Constructor Summary
IndexSearcher(Directory path)
Deprecated. use IndexSearcher(IndexReader) instead.
IndexSearcher(Directory path, boolean readOnly)
Deprecated. Use IndexSearcher(IndexReader) instead.
IndexSearcher(IndexReader r)
Creates a searcher searching the provided index.
IndexSearcher(IndexReader r, ExecutorService executor)
Runs searches for each segment separately, using the provided ExecutorService.
IndexSearcher(IndexReader reader, IndexReader[] subReaders, int[] docStarts)
Expert: directly specify the reader, subReaders and their docID starts.
IndexSearcher(IndexReader reader, IndexReader[] subReaders, int[] docStarts, ExecutorService executor)
Expert: directly specify the reader, subReaders and their docID starts, and an ExecutorService.
Method Summary
 void close()
Note that the underlying IndexReader is not closed, if IndexSearcher was constructed with IndexSearcher(IndexReader r).
 Weight createNormalizedWeight(Query query)
Creates a normalized weight for a top-level Query.
 Document doc(int docID)
Returns the stored fields of document i.
 Document doc(int docID, FieldSelector fieldSelector)
Get the Document at the nth position.
 int docFreq(Term term)
Returns total docFreq for this term.
 Explanation explain(Query query, int doc)
Returns an Explanation that describes how doc scored against query.
 Explanation explain(Weight weight, int doc)
Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.
protected  void gatherSubReaders(List<IndexReader> allSubReaders, IndexReader r)
 IndexReader getIndexReader()
Return the IndexReader this searches.
 Similarity getSimilarity()
Expert: Return the Similarity implementation used by this Searcher.
 IndexReader[] getSubReaders()
Returns the atomic subReaders used by this searcher.
 int maxDoc()
Expert: Returns one greater than the largest possible document number.
 Query rewrite(Query original)
Expert: called to re-write queries into primitive queries.
 void search(Query query, Collector results)
Lower-level search API.
 void search(Query query, Filter filter, Collector results)
Lower-level search API.
 TopDocs search(Query query, Filter filter, int n)
Finds the top n hits for query, applying filter if non-null.
 TopFieldDocs search(Query query, Filter filter, int n, Sort sort)
Search implementation with arbitrary sorting.
 TopDocs search(Query query, int n)
Finds the top n hits for query.
 TopFieldDocs search(Query query, int n, Sort sort)
Search implementation with arbitrary sorting and no filter.
 void search(Weight weight, Filter filter, Collector collector)
Lower-level search API.
 TopDocs search(Weight weight, Filter filter, int nDocs)
Expert: Low-level search implementation.
 TopFieldDocs search(Weight weight, Filter filter, int nDocs, Sort sort)
Expert: Low-level search implementation with arbitrary sorting.
protected  TopFieldDocs search(Weight weight, Filter filter, int nDocs, Sort sort, boolean fillFields)
Just like search(Weight, Filter, int, Sort), but you choose whether or not the fields in the returned FieldDoc instances should be set by specifying fillFields.
protected  TopDocs search(Weight weight, Filter filter, ScoreDoc after, int nDocs)
Expert: Low-level search implementation.
 TopDocs searchAfter(ScoreDoc after, Query query, Filter filter, int n)
Finds the top n hits for query, applying filter if non-null, where all results are after a previous result (after).
 TopDocs searchAfter(ScoreDoc after, Query query, int n)
Finds the top n hits for query where all results are after a previous result (after).
 void setDefaultFieldSortScoring(boolean doTrackScores, boolean doMaxScore)
By default, no scores are computed when sorting by field (using search(Query,Filter,int,Sort)).
 void setSimilarity(Similarity similarity)
Expert: Set the Similarity implementation used by this Searcher.
 String toString()
Methods inherited from class org.apache.lucene.search.Searcher
createWeight, docFreqs
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

subReaders

protected final IndexReader[] subReaders

docStarts

protected final int[] docStarts

subSearchers

protected final IndexSearcher[] subSearchers
Constructor Detail

IndexSearcher

@Deprecated
public IndexSearcher(Directory path)
              throws CorruptIndexException,
                     IOException
Deprecated. use IndexSearcher(IndexReader) instead.

Creates a searcher searching the index in the named directory, with readOnly=true

Parameters:
path - directory where IndexReader will be opened
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

IndexSearcher

@Deprecated
public IndexSearcher(Directory path,
                                boolean readOnly)
              throws CorruptIndexException,
                     IOException
Deprecated. Use IndexSearcher(IndexReader) instead.

Creates a searcher searching the index in the named directory. You should pass readOnly=true, since it gives much better concurrent performance, unless you intend to do write operations (delete documents or change norms) with the underlying IndexReader.

Parameters:
path - directory where IndexReader will be opened
readOnly - if true, the underlying IndexReader will be opened readOnly
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error

IndexSearcher

public IndexSearcher(IndexReader r)
Creates a searcher searching the provided index.

IndexSearcher

public IndexSearcher(IndexReader r,
                     ExecutorService executor)
Runs searches for each segment separately, using the provided ExecutorService. IndexSearcher will not shutdown/awaitTermination this ExecutorService on close; you must do so, eventually, on your own. NOTE: if you are using NIOFSDirectory, do not use the shutdownNow method of ExecutorService as this uses Thread.interrupt under-the-hood which can silently close file descriptors (see LUCENE-2239).

WARNING: This API is experimental and might change in incompatible ways in the next release.

IndexSearcher

public IndexSearcher(IndexReader reader,
                     IndexReader[] subReaders,
                     int[] docStarts)
Expert: directly specify the reader, subReaders and their docID starts.

WARNING: This API is experimental and might change in incompatible ways in the next release.

IndexSearcher

public IndexSearcher(IndexReader reader,
                     IndexReader[] subReaders,
                     int[] docStarts,
                     ExecutorService executor)
Expert: directly specify the reader, subReaders and their docID starts, and an ExecutorService. In this case, each segment will be separately searched using the ExecutorService. IndexSearcher will not shutdown/awaitTermination this ExecutorService on close; you must do so, eventually, on your own. NOTE: if you are using NIOFSDirectory, do not use the shutdownNow method of ExecutorService as this uses Thread.interrupt under-the-hood which can silently close file descriptors (see LUCENE-2239).

WARNING: This API is experimental and might change in incompatible ways in the next release.
Method Detail

gatherSubReaders

protected void gatherSubReaders(List<IndexReader> allSubReaders,
                                IndexReader r)

getIndexReader

public IndexReader getIndexReader()
Return the IndexReader this searches.

getSubReaders

public IndexReader[] getSubReaders()
Returns the atomic subReaders used by this searcher.

maxDoc

public int maxDoc()
Expert: Returns one greater than the largest possible document number.

Specified by:
maxDoc in interface Searchable
Specified by:
maxDoc in class Searcher
See Also:
IndexReader.maxDoc()

docFreq

public int docFreq(Term term)
            throws IOException
Returns total docFreq for this term.

Specified by:
docFreq in interface Searchable
Specified by:
docFreq in class Searcher
Throws:
IOException
See Also:
IndexReader.docFreq(Term)

doc

public Document doc(int docID)
             throws CorruptIndexException,
                    IOException
Description copied from interface: Searchable
Returns the stored fields of document i.

Specified by:
doc in interface Searchable
Specified by:
doc in class Searcher
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
IndexReader.document(int)

doc

public Document doc(int docID,
                    FieldSelector fieldSelector)
             throws CorruptIndexException,
                    IOException
Description copied from interface: Searchable
Get the Document at the nth position. The FieldSelector may be used to determine what Fields to load and how they should be loaded. NOTE: If the underlying Reader (more specifically, the underlying FieldsReader) is closed before the lazy Field is loaded an exception may be thrown. If you want the value of a lazy Field to be available after closing you must explicitly load it or fetch the Document again with a new loader.

Specified by:
doc in interface Searchable
Specified by:
doc in class Searcher
Parameters:
docID - Get the document at the nth position
fieldSelector - The FieldSelector to use to determine what Fields should be loaded on the Document. May be null, in which case all Fields will be loaded.
Returns:
The stored fields of the Document at the nth position
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
IndexReader.document(int, FieldSelector), Fieldable, FieldSelector, SetBasedFieldSelector, LoadFirstFieldSelector

setSimilarity

public void setSimilarity(Similarity similarity)
Expert: Set the Similarity implementation used by this Searcher.

Overrides:
setSimilarity in class Searcher
See Also:
Similarity.setDefault(Similarity)

getSimilarity

public Similarity getSimilarity()
Description copied from class: Searcher
Expert: Return the Similarity implementation used by this Searcher.

This defaults to the current value of Similarity.getDefault().

Overrides:
getSimilarity in class Searcher

close

public void close()
           throws IOException
Note that the underlying IndexReader is not closed, if IndexSearcher was constructed with IndexSearcher(IndexReader r). If the IndexReader was supplied implicitly by specifying a directory, then the IndexReader is closed.

Specified by:
close in interface Closeable
Specified by:
close in interface Searchable
Specified by:
close in class Searcher
Throws:
IOException

searchAfter

public TopDocs searchAfter(ScoreDoc after,
                           Query query,
                           int n)
                    throws IOException
Finds the top n hits for query where all results are after a previous result (after).

By passing the bottom result from a previous page as after, this method can be used for efficient 'deep-paging' across potentially large result sets.

Throws:
BooleanQuery.TooManyClauses
IOException

searchAfter

public TopDocs searchAfter(ScoreDoc after,
                           Query query,
                           Filter filter,
                           int n)
                    throws IOException
Finds the top n hits for query, applying filter if non-null, where all results are after a previous result (after).

By passing the bottom result from a previous page as after, this method can be used for efficient 'deep-paging' across potentially large result sets.

Throws:
BooleanQuery.TooManyClauses
IOException

search

public TopDocs search(Query query,
                      int n)
               throws IOException
Finds the top n hits for query.

Overrides:
search in class Searcher
Throws:
BooleanQuery.TooManyClauses
IOException

search

public TopDocs search(Query query,
                      Filter filter,
                      int n)
               throws IOException
Finds the top n hits for query, applying filter if non-null.

Overrides:
search in class Searcher
Throws:
BooleanQuery.TooManyClauses
IOException

search

public void search(Query query,
                   Filter filter,
                   Collector results)
            throws IOException
Lower-level search API.

Collector.collect(int) is called for every matching document.
Collector-based access to remote indexes is discouraged.

Applications should only use this if they need all of the matching documents. The high-level search API (Searcher.search(Query, Filter, int)) is usually more efficient, as it skips non-high-scoring hits.

Overrides:
search in class Searcher
Parameters:
query - to match documents
filter - if non-null, used to permit documents to be collected.
results - to receive hits
Throws:
BooleanQuery.TooManyClauses
IOException

search

public void search(Query query,
                   Collector results)
            throws IOException
Lower-level search API.

Collector.collect(int) is called for every matching document.

Applications should only use this if they need all of the matching documents. The high-level search API (Searcher.search(Query, int)) is usually more efficient, as it skips non-high-scoring hits.

Note: The score passed to this method is a raw score. In other words, the score will not necessarily be a float whose value is between 0 and 1.

Overrides:
search in class Searcher
Throws:
BooleanQuery.TooManyClauses
IOException

search

public TopFieldDocs search(Query query,
                           Filter filter,
                           int n,
                           Sort sort)
                    throws IOException
Search implementation with arbitrary sorting. Finds the top n hits for query, applying filter if non-null, and sorting the hits by the criteria in sort.

NOTE: this does not compute scores by default; use setDefaultFieldSortScoring(boolean, boolean) to enable scoring.

Overrides:
search in class Searcher
Throws:
BooleanQuery.TooManyClauses
IOException

search

public TopFieldDocs search(Query query,
                           int n,
                           Sort sort)
                    throws IOException
Search implementation with arbitrary sorting and no filter.

Overrides:
search in class Searcher
Parameters:
query - The query to search for
n - Return only the top n results
sort - The Sort object
Returns:
The top docs, sorted according to the supplied Sort instance
Throws:
IOException

search

public TopDocs search(Weight weight,
                      Filter filter,
                      int nDocs)
               throws IOException
Expert: Low-level search implementation. Finds the top n hits for query, applying filter if non-null.

Applications should usually call Searcher.search(Query,int) or Searcher.search(Query,Filter,int) instead.

Specified by:
search in interface Searchable
Specified by:
search in class Searcher
Throws:
BooleanQuery.TooManyClauses
IOException

search

protected TopDocs search(Weight weight,
                         Filter filter,
                         ScoreDoc after,
                         int nDocs)
                  throws IOException
Expert: Low-level search implementation. Finds the top n hits for query, applying filter if non-null, returning results after after.

Throws:
BooleanQuery.TooManyClauses
IOException

search

public TopFieldDocs search(Weight weight,
                           Filter filter,
                           int nDocs,
                           Sort sort)
                    throws IOException
Expert: Low-level search implementation with arbitrary sorting. Finds the top n hits for query, applying filter if non-null, and sorting the hits by the criteria in sort.

Applications should usually call Searcher.search(Query,Filter,int,Sort) instead.

Specified by:
search in interface Searchable
Specified by:
search in class Searcher
Throws:
BooleanQuery.TooManyClauses
IOException

search

protected TopFieldDocs search(Weight weight,
                              Filter filter,
                              int nDocs,
                              Sort sort,
                              boolean fillFields)
                       throws IOException
Just like search(Weight, Filter, int, Sort), but you choose whether or not the fields in the returned FieldDoc instances should be set by specifying fillFields.

NOTE: this does not compute scores by default. If you need scores, create a TopFieldCollector instance by calling TopFieldCollector.create(org.apache.lucene.search.Sort, int, boolean, boolean, boolean, boolean) and then pass that to search(Weight, Filter, Collector).

Throws:
IOException

search

public void search(Weight weight,
                   Filter filter,
                   Collector collector)
            throws IOException
Lower-level search API.

Collector.collect(int) is called for every document.
Collector-based access to remote indexes is discouraged.

Applications should only use this if they need all of the matching documents. The high-level search API (Searcher.search(Query,int)) is usually more efficient, as it skips non-high-scoring hits.

Specified by:
search in interface Searchable
Specified by:
search in class Searcher
Parameters:
weight - to match documents
filter - if non-null, used to permit documents to be collected.
collector - to receive hits
Throws:
BooleanQuery.TooManyClauses
IOException

rewrite

public Query rewrite(Query original)
              throws IOException
Expert: called to re-write queries into primitive queries.

Specified by:
rewrite in interface Searchable
Specified by:
rewrite in class Searcher
Throws:
BooleanQuery.TooManyClauses
IOException

explain

public Explanation explain(Query query,
                           int doc)
                    throws IOException
Returns an Explanation that describes how doc scored against query.

This is intended to be used in developing Similarity implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index.

Overrides:
explain in class Searcher
Throws:
IOException

explain

public Explanation explain(Weight weight,
                           int doc)
                    throws IOException
Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.

This is intended to be used in developing Similarity implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index.

Applications should call Searcher.explain(Query, int).

Specified by:
explain in interface Searchable
Specified by:
explain in class Searcher
Throws:
BooleanQuery.TooManyClauses
IOException

setDefaultFieldSortScoring

public void setDefaultFieldSortScoring(boolean doTrackScores,
                                       boolean doMaxScore)
By default, no scores are computed when sorting by field (using search(Query,Filter,int,Sort)). You can change that, per IndexSearcher instance, by calling this method. Note that this will incur a CPU cost.

Parameters:
doTrackScores - If true, then scores are returned for every matching document in TopFieldDocs.
doMaxScore - If true, then the max score for all matching docs is computed.

createNormalizedWeight

public Weight createNormalizedWeight(Query query)
                              throws IOException
Creates a normalized weight for a top-level Query. The query is rewritten by this method and Query.createWeight(org.apache.lucene.search.Searcher) called, afterwards the Weight is normalized. The returned Weight can then directly be used to get a Scorer.

Overrides:
createNormalizedWeight in class Searcher
Throws:
IOException
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MatchAllDocsQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class MatchAllDocsQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.MatchAllDocsQuery
All Implemented Interfaces:
Serializable, Cloneable
public class MatchAllDocsQuery
extends Query

A query that matches all documents.

See Also:
Serialized Form

Constructor Summary
MatchAllDocsQuery()
MatchAllDocsQuery(String normsField)
Method Summary
Weight | createWeight(Searcher searcher) Expert: Constructs an appropriate Weight implementation for this query.
boolean | equals(Object o)
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
int | hashCode()
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.Query
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, rewrite, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

MatchAllDocsQuery

public MatchAllDocsQuery()

MatchAllDocsQuery

public MatchAllDocsQuery(String normsField)
Parameters:
normsField - Field used for normalization factor (document boost). Null if nothing.
Method Detail

createWeight

public Weight createWeight(Searcher searcher)
Description copied from class: Query
Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Overrides:
createWeight in class Query

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

equals

public boolean equals(Object o)
Overrides:
equals in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class MultiCollector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.MultiCollector

public class MultiCollector
extends Collector

A Collector which allows running a search with several Collectors. It offers a static wrap(org.apache.lucene.search.Collector...) method which accepts a list of collectors and wraps them with MultiCollector, while filtering out the null null ones.

Method Summary
 boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
 void collect(int doc)
Called once for every document matching a query, with the unbased document number.
 void setNextReader(IndexReader reader, int o)
Called before collecting from each IndexReader.
 void setScorer(Scorer s)
Called before successive calls to Collector.collect(int).
static Collector wrap(Collector... collectors)
Wraps a list of Collectors with a MultiCollector.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

wrap

public static Collector wrap(Collector... collectors)
Wraps a list of Collectors with a MultiCollector. This method works as follows:
  • Filters out the null collectors, so they are not used during search time.
  • If the input contains 1 real collector (i.e. non-null ), it is returned.
  • Otherwise the method returns a MultiCollector which wraps the non-null ones.

Throws:
IllegalArgumentException - if either 0 collectors were input, or all collectors are null.

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Description copied from class: Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Specified by:
acceptsDocsOutOfOrder in class Collector

collect

public void collect(int doc)
             throws IOException
Description copied from class: Collector
Called once for every document matching a query, with the unbased document number.

Note: This is called in an inner search loop. For good search performance, implementations of this method should not call Searcher.doc(int) or IndexReader.document(int) on every hit. Doing so can slow searches by an order of magnitude or more.

Specified by:
collect in class Collector
Throws:
IOException

setNextReader

public void setNextReader(IndexReader reader,
                          int o)
                   throws IOException
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Specified by:
setNextReader in class Collector
Parameters:
reader - next IndexReader
Throws:
IOException

setScorer

public void setScorer(Scorer s)
               throws IOException
Description copied from class: Collector
Called before successive calls to Collector.collect(int). Implementations that need the score of the current document (passed-in to Collector.collect(int)), should save the passed-in Scorer and call scorer.score() when needed.

Specified by:
setScorer in class Collector
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiPhraseQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class MultiPhraseQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.MultiPhraseQuery
All Implemented Interfaces:
Serializable, Cloneable
public class MultiPhraseQuery
extends Query

MultiPhraseQuery is a generalized version of PhraseQuery, with an added method add(Term[]). To use this class, to search for the phrase "Microsoft app*" first use add(Term) on the term "Microsoft", then find all terms that have "app" as prefix using IndexReader.terms(Term), and use MultiPhraseQuery.add(Term[] terms) to add them to the query.

Version:
1.0
See Also:
Serialized Form

Constructor Summary
MultiPhraseQuery()
Method Summary
void | add(Term term) Add a single term at the next position in the phrase.
void | add(Term[] terms) Add multiple terms at the next position in the phrase.
void | add(Term[] terms, int position) Allows to specify the relative position of terms within the phrase.
Weight | createWeight(Searcher searcher) Expert: Constructs an appropriate Weight implementation for this query.
boolean | equals(Object o) Returns true if o is equal to this.
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
int[] | getPositions() Returns the relative positions of terms in this phrase.
int | getSlop() Sets the phrase slop for this query.
List<Term[]> | getTermArrays() Returns a List of the terms in the multiphrase.
int | hashCode() Returns a hash code value for this object.
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
void | setSlop(int s) Sets the phrase slop for this query.
String | toString(String f) Prints a user-readable version of this query.
Methods inherited from class org.apache.lucene.search.Query
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

MultiPhraseQuery

public MultiPhraseQuery()
Method Detail

setSlop

public void setSlop(int s)
Sets the phrase slop for this query.

See Also:
PhraseQuery.setSlop(int)

getSlop

public int getSlop()
Sets the phrase slop for this query.

See Also:
PhraseQuery.getSlop()

add

public void add(Term term)
Add a single term at the next position in the phrase.

See Also:
PhraseQuery.add(Term)

add

public void add(Term[] terms)
Add multiple terms at the next position in the phrase. Any of the terms may match.

See Also:
PhraseQuery.add(Term)

add

public void add(Term[] terms,
                int position)
Allows to specify the relative position of terms within the phrase.

Parameters:
terms -
position -
See Also:
PhraseQuery.add(Term, int)

getTermArrays

public List<Term[]> getTermArrays()
Returns a List of the terms in the multiphrase. Do not modify the List or its contents.

getPositions

public int[] getPositions()
Returns the relative positions of terms in this phrase.

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

rewrite

public Query rewrite(IndexReader reader)
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query

createWeight

public Weight createWeight(Searcher searcher)
                    throws IOException
Description copied from class: Query
Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Overrides:
createWeight in class Query
Throws:
IOException

toString

public final String toString(String f)
Prints a user-readable version of this query.

Specified by:
toString in class Query

equals

public boolean equals(Object o)
Returns true if o is equal to this.

Overrides:
equals in class Query

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiSearcher

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class MultiSearcher

java.lang.Object
    extended by  org.apache.lucene.search.Searcher
        extended by  org.apache.lucene.search.MultiSearcher
All Implemented Interfaces:
Closeable, Searchable
Direct Known Subclasses:
ParallelMultiSearcher
Deprecated. If you are using MultiSearcher over IndexSearchers, please use MultiReader instead; this class does not properly handle certain kinds of queries (see LUCENE-2756).

@Deprecated
public class MultiSearcher
extends Searcher

Implements search over a set of Searchables.

Applications usually need only call the inherited Searcher.search(Query,int) or Searcher.search(Query,Filter,int) methods.

Constructor Summary
MultiSearcher(Searchable... searchables)
Deprecated. Creates a searcher which searches searchers.
Method Summary
void | close() Deprecated. Frees resources associated with this Searcher.
Weight | createNormalizedWeight(Query original) Deprecated. Create weight in multiple index scenario.
Document | doc(int n) Deprecated. Returns the stored fields of document i.
Document | doc(int n, FieldSelector fieldSelector) Deprecated. Get the Document at the nth position.
int | docFreq(Term term) Deprecated. Expert: Returns the number of documents containing term.
Explanation | explain(Weight weight, int doc) Deprecated. Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.
Searchable[] | getSearchables() Deprecated. Return the array of Searchables this searches.
protected int[] | getStarts() Deprecated.
int | maxDoc() Deprecated. Expert: Returns one greater than the largest possible document number.
Query | rewrite(Query original) Deprecated. Expert: called to re-write queries into primitive queries.
void | search(Weight weight, Filter filter, Collector collector) Deprecated. Lower-level search API.
TopDocs | search(Weight weight, Filter filter, int nDocs) Deprecated. Expert: Low-level search implementation.
TopFieldDocs | search(Weight weight, Filter filter, int n, Sort sort) Deprecated. Expert: Low-level search implementation with arbitrary sorting.
int | subDoc(int n) Deprecated. Returns the document number of document n within its sub-index.
int | subSearcher(int n) Deprecated. Returns index of the searcher for document n in the array used to construct this searcher.
Methods inherited from class org.apache.lucene.search.Searcher
createWeight, docFreqs, explain, getSimilarity, search, search, search, search, search, search, setSimilarity
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MultiSearcher

public MultiSearcher(Searchable... searchables)
              throws IOException
Deprecated.
Creates a searcher which searches searchers.

Throws:
IOException
Method Detail

getSearchables

public Searchable[] getSearchables()
Deprecated.
Return the array of Searchables this searches.

getStarts

protected int[] getStarts()
Deprecated.

close

public void close()
           throws IOException
Deprecated.
Description copied from interface: Searchable
Frees resources associated with this Searcher. Be careful not to call this method while you are still using objects that reference this Searchable.

Specified by:
close in interface Closeable
Specified by:
close in interface Searchable
Specified by:
close in class Searcher
Throws:
IOException

docFreq

public int docFreq(Term term)
            throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: Returns the number of documents containing term.

Specified by:
docFreq in interface Searchable
Specified by:
docFreq in class Searcher
Throws:
IOException
See Also:
IndexReader.docFreq(Term)

doc

public Document doc(int n)
             throws CorruptIndexException,
                    IOException
Deprecated.
Description copied from interface: Searchable
Returns the stored fields of document i.

Specified by:
doc in interface Searchable
Specified by:
doc in class Searcher
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
IndexReader.document(int)

doc

public Document doc(int n,
                    FieldSelector fieldSelector)
             throws CorruptIndexException,
                    IOException
Deprecated.
Description copied from interface: Searchable
Get the Document at the nth position. The FieldSelector may be used to determine what Fields to load and how they should be loaded. NOTE: If the underlying Reader (more specifically, the underlying FieldsReader) is closed before the lazy Field is loaded an exception may be thrown. If you want the value of a lazy Field to be available after closing you must explicitly load it or fetch the Document again with a new loader.

Specified by:
doc in interface Searchable
Specified by:
doc in class Searcher
Parameters:
n - Get the document at the nth position
fieldSelector - The FieldSelector to use to determine what Fields should be loaded on the Document. May be null, in which case all Fields will be loaded.
Returns:
The stored fields of the Document at the nth position
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
IndexReader.document(int, FieldSelector), Fieldable, FieldSelector, SetBasedFieldSelector, LoadFirstFieldSelector

subSearcher

public int subSearcher(int n)
Deprecated.
Returns index of the searcher for document n in the array used to construct this searcher.

subDoc

public int subDoc(int n)
Deprecated.
Returns the document number of document n within its sub-index.

maxDoc

public int maxDoc()
           throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: Returns one greater than the largest possible document number.

Specified by:
maxDoc in interface Searchable
Specified by:
maxDoc in class Searcher
Throws:
IOException
See Also:
IndexReader.maxDoc()

search

public TopDocs search(Weight weight,
                      Filter filter,
                      int nDocs)
               throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: Low-level search implementation. Finds the top n hits for query, applying filter if non-null.

Applications should usually call Searcher.search(Query,int) or Searcher.search(Query,Filter,int) instead.

Specified by:
search in interface Searchable
Specified by:
search in class Searcher
Throws:
IOException

search

public TopFieldDocs search(Weight weight,
                           Filter filter,
                           int n,
                           Sort sort)
                    throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: Low-level search implementation with arbitrary sorting. Finds the top n hits for query, applying filter if non-null, and sorting the hits by the criteria in sort.

Applications should usually call Searcher.search(Query,Filter,int,Sort) instead.

Specified by:
search in interface Searchable
Specified by:
search in class Searcher
Throws:
IOException

search

public void search(Weight weight,
                   Filter filter,
                   Collector collector)
            throws IOException
Deprecated.
Description copied from interface: Searchable
Lower-level search API.

Collector.collect(int) is called for every document.
Collector-based access to remote indexes is discouraged.

Applications should only use this if they need all of the matching documents. The high-level search API (Searcher.search(Query,int)) is usually more efficient, as it skips non-high-scoring hits.

Specified by:
search in interface Searchable
Specified by:
search in class Searcher
Parameters:
weight - to match documents
filter - if non-null, used to permit documents to be collected.
collector - to receive hits
Throws:
IOException

rewrite

public Query rewrite(Query original)
              throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: called to re-write queries into primitive queries.

Specified by:
rewrite in interface Searchable
Specified by:
rewrite in class Searcher
Throws:
IOException

explain

public Explanation explain(Weight weight,
                           int doc)
                    throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.

This is intended to be used in developing Similarity implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index.

Applications should call Searcher.explain(Query, int).

Specified by:
explain in interface Searchable
Specified by:
explain in class Searcher
Throws:
IOException

createNormalizedWeight

public Weight createNormalizedWeight(Query original)
                              throws IOException
Deprecated.
Create weight in multiple index scenario. Distributed query processing is done in the following steps: 1. rewrite query 2. extract necessary terms 3. collect dfs for these terms from the Searchables 4. create query weight using aggregate dfs. 5. distribute that weight to Searchables 6. merge results Steps 1-4 are done here, 5+6 in the search() methods

Overrides:
createNormalizedWeight in class Searcher
Returns:
rewritten queries
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTermQuery.ConstantScoreAutoRewrite

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class MultiTermQuery.ConstantScoreAutoRewrite

java.lang.Object
    extended by  org.apache.lucene.search.MultiTermQuery.RewriteMethod
        extended by  org.apache.lucene.search.MultiTermQuery.ConstantScoreAutoRewrite
All Implemented Interfaces:
Serializable
Enclosing class:
MultiTermQuery
public static class MultiTermQuery.ConstantScoreAutoRewrite
extends MultiTermQuery.RewriteMethod

A rewrite method that tries to pick the best constant-score rewrite method based on term and document counts from the query. If both the number of terms and documents is small enough, then MultiTermQuery.CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE is used. Otherwise, MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE is used.

See Also:
Serialized Form

Nested Class Summary
protected static interface TermCollectingRewrite.TermCollector
Field Summary
static double | DEFAULT_DOC_COUNT_PERCENT
static int | DEFAULT_TERM_COUNT_CUTOFF
Constructor Summary
MultiTermQuery.ConstantScoreAutoRewrite()
Method Summary
protected void | addClause(BooleanQuery topLevel, Term term, float boost) Add a MultiTermQuery term to the top-level query
protected void | collectTerms(IndexReader reader, MultiTermQuery query, TermCollectingRewrite.TermCollector collector)
boolean | equals(Object obj)
double | getDocCountPercent()
int | getTermCountCutoff()
protected BooleanQuery | getTopLevelQuery() Return a suitable top-level Query for holding all expanded terms.
int | hashCode()
Query | rewrite(IndexReader reader, MultiTermQuery query)
void | setDocCountPercent(double percent) If the number of documents to be visited in the postings exceeds this specified percentage of the maxDoc() for the index, then MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE is used.
void | setTermCountCutoff(int count) If the number of terms in this query is equal to or larger than this setting then MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE is used.
Methods inherited from class org.apache.lucene.search.MultiTermQuery.RewriteMethod
getTermsEnum
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_TERM_COUNT_CUTOFF

public static int DEFAULT_TERM_COUNT_CUTOFF

DEFAULT_DOC_COUNT_PERCENT

public static double DEFAULT_DOC_COUNT_PERCENT
Constructor Detail

MultiTermQuery.ConstantScoreAutoRewrite

public MultiTermQuery.ConstantScoreAutoRewrite()
Method Detail

setTermCountCutoff

public void setTermCountCutoff(int count)
If the number of terms in this query is equal to or larger than this setting then MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE is used.

getTermCountCutoff

public int getTermCountCutoff()
See Also:
setTermCountCutoff(int)

setDocCountPercent

public void setDocCountPercent(double percent)
If the number of documents to be visited in the postings exceeds this specified percentage of the maxDoc() for the index, then MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE is used.

Parameters:
percent - 0.0 to 100.0

getDocCountPercent

public double getDocCountPercent()
See Also:
setDocCountPercent(double)

getTopLevelQuery

protected BooleanQuery getTopLevelQuery()
Return a suitable top-level Query for holding all expanded terms.

addClause

protected void addClause(BooleanQuery topLevel,
                         Term term,
                         float boost)
Add a MultiTermQuery term to the top-level query

rewrite

public Query rewrite(IndexReader reader,
                     MultiTermQuery query)
              throws IOException
Specified by:
rewrite in class MultiTermQuery.RewriteMethod
Throws:
IOException

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

collectTerms

protected final void collectTerms(IndexReader reader,
                                  MultiTermQuery query,
                                  TermCollectingRewrite.TermCollector collector)
                           throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTermQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class MultiTermQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.MultiTermQuery
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
FuzzyQuery, NumericRangeQuery, PrefixQuery, RegexQuery, TermRangeQuery, WildcardQuery
public abstract class MultiTermQuery
extends Query

An abstract Query that matches documents containing a subset of terms provided by a FilteredTermEnum enumeration.

This query cannot be used directly; you must subclass it and define getEnum(org.apache.lucene.index.IndexReader) to provide a FilteredTermEnum that iterates through the terms to be matched.

NOTE: if setRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod) is either CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE or SCORING_BOOLEAN_QUERY_REWRITE, you may encounter a BooleanQuery.TooManyClauses exception during searching, which happens when the number of terms to be searched exceeds BooleanQuery.getMaxClauseCount(). Setting setRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod) to CONSTANT_SCORE_FILTER_REWRITE prevents this.

The recommended rewrite method is CONSTANT_SCORE_AUTO_REWRITE_DEFAULT: it doesn't spend CPU computing unhelpful scores, and it tries to pick the most performant rewrite method given the query. If you need scoring (like FuzzyQuery, use MultiTermQuery.TopTermsScoringBooleanQueryRewrite which uses a priority queue to only collect competitive terms and not hit this limitation. Note that QueryParser produces MultiTermQueries using CONSTANT_SCORE_AUTO_REWRITE_DEFAULT by default.

See Also:
Serialized Form

Nested Class Summary
static class | MultiTermQuery.ConstantScoreAutoRewrite A rewrite method that tries to pick the best constant-score rewrite method based on term and document counts from the query.
static class | MultiTermQuery.RewriteMethod Abstract class that defines how the query is rewritten.
static class | MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, but the scores are only computed as the boost.
static class | MultiTermQuery.TopTermsScoringBooleanQueryRewrite A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.
Field Summary
static MultiTermQuery.RewriteMethod | CONSTANT_SCORE_AUTO_REWRITE_DEFAULT Read-only default instance of MultiTermQuery.ConstantScoreAutoRewrite, with ConstantScoreAutoRewrite.setTermCountCutoff(int) set to ConstantScoreAutoRewrite.DEFAULT_TERM_COUNT_CUTOFF and ConstantScoreAutoRewrite.setDocCountPercent(double) set to ConstantScoreAutoRewrite.DEFAULT_DOC_COUNT_PERCENT.
static MultiTermQuery.RewriteMethod | CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE Like SCORING_BOOLEAN_QUERY_REWRITE except scores are not computed.
static MultiTermQuery.RewriteMethod | CONSTANT_SCORE_FILTER_REWRITE A rewrite method that first creates a private Filter, by visiting each term in sequence and marking all docs for that term.
protected MultiTermQuery.RewriteMethod | rewriteMethod
static MultiTermQuery.RewriteMethod | SCORING_BOOLEAN_QUERY_REWRITE A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.
Constructor Summary
MultiTermQuery()
Constructs a query matching terms that cannot be represented with a single Term.
Method Summary
void | clearTotalNumberOfTerms() Deprecated. Don't use this method, as its not thread safe and useless.
boolean | equals(Object obj)
protected abstract FilteredTermEnum | getEnum(IndexReader reader) Construct the enumeration to be used, expanding the pattern term.
MultiTermQuery.RewriteMethod | getRewriteMethod()
int | getTotalNumberOfTerms() Deprecated. Don't use this method, as its not thread safe and useless.
int | hashCode()
protected void | incTotalNumberOfTerms(int inc) Deprecated. Don't use this method, as its not thread safe and useless.
Query | rewrite(IndexReader reader) To rewrite to a simpler form, instead return a simpler enum from getEnum(IndexReader).
void | setRewriteMethod(MultiTermQuery.RewriteMethod method) Sets the rewrite method to be used when executing the query.
Methods inherited from class org.apache.lucene.search.Query
clone, combine, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

rewriteMethod

protected MultiTermQuery.RewriteMethod rewriteMethod

CONSTANT_SCORE_FILTER_REWRITE

public static final MultiTermQuery.RewriteMethod CONSTANT_SCORE_FILTER_REWRITE
A rewrite method that first creates a private Filter, by visiting each term in sequence and marking all docs for that term. Matching documents are assigned a constant score equal to the query's boost.

This method is faster than the BooleanQuery rewrite methods when the number of matched terms or matched documents is non-trivial. Also, it will never hit an errant BooleanQuery.TooManyClauses exception.

See Also:
setRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod)

SCORING_BOOLEAN_QUERY_REWRITE

public static final MultiTermQuery.RewriteMethod SCORING_BOOLEAN_QUERY_REWRITE
A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query. Note that typically such scores are meaningless to the user, and require non-trivial CPU to compute, so it's almost always better to use CONSTANT_SCORE_AUTO_REWRITE_DEFAULT instead.

NOTE: This rewrite method will hit BooleanQuery.TooManyClauses if the number of terms exceeds BooleanQuery.getMaxClauseCount().

See Also:
setRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod)

CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE

public static final MultiTermQuery.RewriteMethod CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE
Like SCORING_BOOLEAN_QUERY_REWRITE except scores are not computed. Instead, each matching document receives a constant score equal to the query's boost.

NOTE: This rewrite method will hit BooleanQuery.TooManyClauses if the number of terms exceeds BooleanQuery.getMaxClauseCount().

See Also:
setRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod)

CONSTANT_SCORE_AUTO_REWRITE_DEFAULT

public static final MultiTermQuery.RewriteMethod CONSTANT_SCORE_AUTO_REWRITE_DEFAULT
Read-only default instance of MultiTermQuery.ConstantScoreAutoRewrite, with ConstantScoreAutoRewrite.setTermCountCutoff(int) set to ConstantScoreAutoRewrite.DEFAULT_TERM_COUNT_CUTOFF and ConstantScoreAutoRewrite.setDocCountPercent(double) set to ConstantScoreAutoRewrite.DEFAULT_DOC_COUNT_PERCENT. Note that you cannot alter the configuration of this instance; you'll need to create a private instance instead.

Constructor Detail

MultiTermQuery

public MultiTermQuery()
Constructs a query matching terms that cannot be represented with a single Term.

Method Detail

getEnum

protected abstract FilteredTermEnum getEnum(IndexReader reader)
                                     throws IOException
Construct the enumeration to be used, expanding the pattern term.

Throws:
IOException

getTotalNumberOfTerms

@Deprecated
public int getTotalNumberOfTerms()
Deprecated. Don't use this method, as its not thread safe and useless.

Expert: Return the number of unique terms visited during execution of the query. If there are many of them, you may consider using another query type or reduce your total term count in index.

This method is not thread safe, be sure to only call it when no query is running! If you re-use the same query instance for another search, be sure to first reset the term counter with clearTotalNumberOfTerms().

On single-segment indexes / no MultiReaders, you get the correct number of unique terms for the whole index. Use this number to compare different queries. For multi-segment indexes this number can also be achieved in non-constant-score mode. In constant-score mode you get the total number of terms seeked for all segments / sub-readers.

See Also:
clearTotalNumberOfTerms()

clearTotalNumberOfTerms

@Deprecated
public void clearTotalNumberOfTerms()
Deprecated. Don't use this method, as its not thread safe and useless.

Expert: Resets the counting of unique terms. Do this before executing the query/filter.

See Also:
getTotalNumberOfTerms()

incTotalNumberOfTerms

@Deprecated
protected void incTotalNumberOfTerms(int inc)
Deprecated. Don't use this method, as its not thread safe and useless.

rewrite

public final Query rewrite(IndexReader reader)
                    throws IOException
To rewrite to a simpler form, instead return a simpler enum from getEnum(IndexReader). For example, to rewrite to a single term, return a SingleTermEnum

Overrides:
rewrite in class Query
Throws:
IOException

getRewriteMethod

public MultiTermQuery.RewriteMethod getRewriteMethod()
See Also:
setRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod)

setRewriteMethod

public void setRewriteMethod(MultiTermQuery.RewriteMethod method)
Sets the rewrite method to be used when executing the query. You can use one of the four core methods, or implement your own subclass of MultiTermQuery.RewriteMethod.

hashCode

public int hashCode()
Overrides:
hashCode in class Query

equals

public boolean equals(Object obj)
Overrides:
equals in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTermQuery.RewriteMethod

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class MultiTermQuery.RewriteMethod

java.lang.Object
    extended by  org.apache.lucene.search.MultiTermQuery.RewriteMethod
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MultiTermQuery.ConstantScoreAutoRewrite, ScoringRewrite, SpanMultiTermQueryWrapper.SpanRewriteMethod, TopTermsRewrite
Enclosing class:
MultiTermQuery
public abstract static class MultiTermQuery.RewriteMethod
extends Object
implements Serializable

Abstract class that defines how the query is rewritten.

See Also:
Serialized Form

Constructor Summary
MultiTermQuery.RewriteMethod()
Method Summary
protected FilteredTermEnum | getTermsEnum(IndexReader reader, MultiTermQuery query) Returns the MultiTermQuerys FilteredTermEnum
abstract Query | rewrite(IndexReader reader, MultiTermQuery query)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MultiTermQuery.RewriteMethod

public MultiTermQuery.RewriteMethod()
Method Detail

rewrite

public abstract Query rewrite(IndexReader reader,
                              MultiTermQuery query)
                       throws IOException
Throws:
IOException

getTermsEnum

protected FilteredTermEnum getTermsEnum(IndexReader reader,
                                        MultiTermQuery query)
                                 throws IOException
Returns the MultiTermQuerys FilteredTermEnum

Throws:
IOException
See Also:
MultiTermQuery.getEnum(IndexReader)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite

java.lang.Object
    extended by  org.apache.lucene.search.MultiTermQuery.RewriteMethod
        extended by  org.apache.lucene.search.TopTermsRewrite<BooleanQuery>
            extended by  org.apache.lucene.search.MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite
All Implemented Interfaces:
Serializable
Enclosing class:
MultiTermQuery
public static final class MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite
extends TopTermsRewrite<BooleanQuery>

A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, but the scores are only computed as the boost.

This rewrite method only uses the top scoring terms so it will not overflow the boolean max clause count.

See Also:
MultiTermQuery.setRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod), Serialized Form

Nested Class Summary
protected static interface TermCollectingRewrite.TermCollector
Constructor Summary
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite(int size)
Create a TopTermsBoostOnlyBooleanQueryRewrite for at most size terms.
Method Summary
protected void | addClause(BooleanQuery topLevel, Term term, float boost) Add a MultiTermQuery term to the top-level query
protected void | collectTerms(IndexReader reader, MultiTermQuery query, TermCollectingRewrite.TermCollector collector)
protected int | getMaxSize() return the maximum size of the priority queue (for boolean rewrites this is BooleanQuery#getMaxClauseCount).
protected BooleanQuery | getTopLevelQuery() Return a suitable top-level Query for holding all expanded terms.
Methods inherited from class org.apache.lucene.search.TopTermsRewrite
equals, getSize, hashCode, rewrite
Methods inherited from class org.apache.lucene.search.MultiTermQuery.RewriteMethod
getTermsEnum
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite

public MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite(int size)
Create a TopTermsBoostOnlyBooleanQueryRewrite for at most size terms.

NOTE: if BooleanQuery.getMaxClauseCount() is smaller than size, then it will be used instead.

Method Detail

getMaxSize

protected int getMaxSize()
Description copied from class: TopTermsRewrite
return the maximum size of the priority queue (for boolean rewrites this is BooleanQuery#getMaxClauseCount).

Specified by:
getMaxSize in class TopTermsRewrite<BooleanQuery>

getTopLevelQuery

protected BooleanQuery getTopLevelQuery()
Return a suitable top-level Query for holding all expanded terms.

addClause

protected void addClause(BooleanQuery topLevel,
                         Term term,
                         float boost)
Add a MultiTermQuery term to the top-level query

collectTerms

protected final void collectTerms(IndexReader reader,
                                  MultiTermQuery query,
                                  TermCollectingRewrite.TermCollector collector)
                           throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTermQuery.TopTermsScoringBooleanQueryRewrite

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class MultiTermQuery.TopTermsScoringBooleanQueryRewrite

java.lang.Object
    extended by  org.apache.lucene.search.MultiTermQuery.RewriteMethod
        extended by  org.apache.lucene.search.TopTermsRewrite<BooleanQuery>
            extended by  org.apache.lucene.search.MultiTermQuery.TopTermsScoringBooleanQueryRewrite
All Implemented Interfaces:
Serializable
Enclosing class:
MultiTermQuery
public static final class MultiTermQuery.TopTermsScoringBooleanQueryRewrite
extends TopTermsRewrite<BooleanQuery>

A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.

This rewrite method only uses the top scoring terms so it will not overflow the boolean max clause count. It is the default rewrite method for FuzzyQuery.

See Also:
MultiTermQuery.setRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod), Serialized Form

Nested Class Summary
protected static interface TermCollectingRewrite.TermCollector
Constructor Summary
MultiTermQuery.TopTermsScoringBooleanQueryRewrite(int size)
Create a TopTermsScoringBooleanQueryRewrite for at most size terms.
Method Summary
protected void | addClause(BooleanQuery topLevel, Term term, float boost) Add a MultiTermQuery term to the top-level query
protected void | collectTerms(IndexReader reader, MultiTermQuery query, TermCollectingRewrite.TermCollector collector)
protected int | getMaxSize() return the maximum size of the priority queue (for boolean rewrites this is BooleanQuery#getMaxClauseCount).
protected BooleanQuery | getTopLevelQuery() Return a suitable top-level Query for holding all expanded terms.
Methods inherited from class org.apache.lucene.search.TopTermsRewrite
equals, getSize, hashCode, rewrite
Methods inherited from class org.apache.lucene.search.MultiTermQuery.RewriteMethod
getTermsEnum
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MultiTermQuery.TopTermsScoringBooleanQueryRewrite

public MultiTermQuery.TopTermsScoringBooleanQueryRewrite(int size)
Create a TopTermsScoringBooleanQueryRewrite for at most size terms.

NOTE: if BooleanQuery.getMaxClauseCount() is smaller than size, then it will be used instead.

Method Detail

getMaxSize

protected int getMaxSize()
Description copied from class: TopTermsRewrite
return the maximum size of the priority queue (for boolean rewrites this is BooleanQuery#getMaxClauseCount).

Specified by:
getMaxSize in class TopTermsRewrite<BooleanQuery>

getTopLevelQuery

protected BooleanQuery getTopLevelQuery()
Return a suitable top-level Query for holding all expanded terms.

addClause

protected void addClause(BooleanQuery topLevel,
                         Term term,
                         float boost)
Add a MultiTermQuery term to the top-level query

collectTerms

protected final void collectTerms(IndexReader reader,
                                  MultiTermQuery query,
                                  TermCollectingRewrite.TermCollector collector)
                           throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTermQueryWrapperFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class MultiTermQueryWrapperFilter<Q extends MultiTermQuery>

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.MultiTermQueryWrapperFilter<Q>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
NumericRangeFilter, PrefixFilter, TermRangeFilter
public class MultiTermQueryWrapperFilter<Q extends MultiTermQuery>
extends Filter

A wrapper for MultiTermQuery, that exposes its functionality as a Filter.

MultiTermQueryWrapperFilter is not designed to be used by itself. Normally you subclass it to provide a Filter counterpart for a MultiTermQuery subclass.

For example, TermRangeFilter and PrefixFilter extend MultiTermQueryWrapperFilter. This class also provides the functionality behind MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE; this is why it is not abstract.

See Also:
Serialized Form

Field Summary
protected  Q query
Constructor Summary
protected MultiTermQueryWrapperFilter(Q query)
Wrap a MultiTermQuery as a Filter.
Method Summary
void | clearTotalNumberOfTerms() Deprecated. Don't use this method, as its not thread safe and useless.
boolean | equals(Object o)
DocIdSet | getDocIdSet(IndexReader reader) Returns a DocIdSet with documents that should be permitted in search results.
int | getTotalNumberOfTerms() Deprecated. Don't use this method, as its not thread safe and useless.
int | hashCode()
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

query

protected final Q extends MultiTermQuery query
Constructor Detail

MultiTermQueryWrapperFilter

protected MultiTermQueryWrapperFilter(Q query)
Wrap a MultiTermQuery as a Filter.

Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

public final boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

getTotalNumberOfTerms

@Deprecated
public int getTotalNumberOfTerms()
Deprecated. Don't use this method, as its not thread safe and useless.

Expert: Return the number of unique terms visited during execution of the filter. If there are many of them, you may consider using another filter type or optimize your total term count in index.

This method is not thread safe, be sure to only call it when no filter is running! If you re-use the same filter instance for another search, be sure to first reset the term counter with clearTotalNumberOfTerms().

See Also:
clearTotalNumberOfTerms()

clearTotalNumberOfTerms

@Deprecated
public void clearTotalNumberOfTerms()
Deprecated. Don't use this method, as its not thread safe and useless.

Expert: Resets the counting of unique terms. Do this before executing the filter.

See Also:
getTotalNumberOfTerms()

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Returns a DocIdSet with documents that should be permitted in search results.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NGramPhraseQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class NGramPhraseQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.PhraseQuery
            extended by  org.apache.lucene.search.NGramPhraseQuery
All Implemented Interfaces:
Serializable, Cloneable
public class NGramPhraseQuery
extends PhraseQuery

This is a PhraseQuery which is optimized for n-gram phrase query. For example, when you query "ABCD" on a 2-gram field, you may want to use NGramPhraseQuery rather than PhraseQuery, because NGramPhraseQuery will rewrite(IndexReader) the query to "AB/0 CD/2", while PhraseQuery will query "AB/0 BC/1 CD/2" (where term/position).

See Also:
Serialized Form

Constructor Summary
NGramPhraseQuery(int n)
Constructor that takes gram size.
Method Summary
boolean | equals(Object o) Returns true iff o is equal to this.
int | hashCode() Returns a hash code value for this object.
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
Methods inherited from class org.apache.lucene.search.PhraseQuery
add, add, createWeight, extractTerms, getPositions, getSlop, getTerms, setSlop, toString
Methods inherited from class org.apache.lucene.search.Query
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

NGramPhraseQuery

public NGramPhraseQuery(int n)
Constructor that takes gram size.

Parameters:
n -
Method Detail

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class PhraseQuery
Throws:
IOException

equals

public boolean equals(Object o)
Returns true iff o is equal to this.

Overrides:
equals in class PhraseQuery

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class PhraseQuery
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NRTManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class NRTManager

java.lang.Object
    extended by  org.apache.lucene.search.ReferenceManager<IndexSearcher>
        extended by  org.apache.lucene.search.NRTManager
All Implemented Interfaces:
Closeable
public class NRTManager
extends ReferenceManager<IndexSearcher>

Utility class to manage sharing near-real-time searchers across multiple searching thread. The difference vs SearcherManager is that this class enables individual requests to wait until specific indexing changes are visible.

You must create an IndexWriter, then create a NRTManager.TrackingIndexWriter from it, and pass that to the NRTManager. You may want to create two NRTManagers, once that always applies deletes on refresh and one that does not. In this case you should use a single NRTManager.TrackingIndexWriter instance for both.

Then, use ReferenceManager.acquire() to obtain the IndexSearcher, and ReferenceManager.release(G) (ideally, from within a finally clause) to release it.

NOTE: to use this class, you must call ReferenceManager.maybeRefresh() periodically. The NRTManagerReopenThread is a simple class to do this on a periodic basis, and reopens more quickly if a request is waiting. If you implement your own reopener, be sure to call addWaitingListener(org.apache.lucene.search.NRTManager.WaitingListener) so your reopener is notified when a caller is waiting for a specific generation searcher.

See Also:
SearcherFactory
WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | NRTManager.TrackingIndexWriter Class that tracks changes to a delegated IndexWriter.
static interface | NRTManager.WaitingListener NRTManager invokes this interface to notify it when a caller is waiting for a specific generation searcher to be visible.
Field Summary
Fields inherited from class org.apache.lucene.search.ReferenceManager
current
Constructor Summary
NRTManager(NRTManager.TrackingIndexWriter writer, SearcherFactory searcherFactory)
Create new NRTManager.
NRTManager(NRTManager.TrackingIndexWriter writer, SearcherFactory searcherFactory, boolean applyAllDeletes)
Expert: just like NRTManager(TrackingIndexWriter,SearcherFactory), but you can also specify whether each reopened searcher must apply deletes.
Method Summary
 void addWaitingListener(NRTManager.WaitingListener l)
Adds a listener, to be notified when a caller is waiting for a specific generation searcher to be visible.
protected  void afterClose()
Called after close(), so subclass can free any resources.
protected  void afterRefresh()
Called after swapReference has installed a new instance.
protected  void decRef(IndexSearcher reference)
Decrement reference counting on the given reference.
 long getCurrentSearchingGen()
Returns generation of current searcher.
 boolean isSearcherCurrent()
Returns true if no changes have occured since this searcher ie.
protected  IndexSearcher refreshIfNeeded(IndexSearcher referenceToRefresh)
Refresh the given reference if needed.
 void removeWaitingListener(NRTManager.WaitingListener l)
Remove a listener added with addWaitingListener(org.apache.lucene.search.NRTManager.WaitingListener).
protected  boolean tryIncRef(IndexSearcher reference)
Try to increment reference counting on the given reference.
 void waitForGeneration(long targetGen)
Waits for the target generation to become visible in the searcher.
 void waitForGeneration(long targetGen, long time, TimeUnit unit)
Waits for the target generation to become visible in the searcher.
Methods inherited from class org.apache.lucene.search.ReferenceManager
acquire, close, maybeRefresh, release
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NRTManager

public NRTManager(NRTManager.TrackingIndexWriter writer,
                  SearcherFactory searcherFactory)
           throws IOException
Create new NRTManager.

Parameters:
writer - TrackingIndexWriter to open near-real-time readers
searcherFactory - An optional SearcherFactory. Pass null if you don't require the searcher to be warmed before going live or other custom behavior.
Throws:
IOException

NRTManager

public NRTManager(NRTManager.TrackingIndexWriter writer,
                  SearcherFactory searcherFactory,
                  boolean applyAllDeletes)
           throws IOException
Expert: just like NRTManager(TrackingIndexWriter,SearcherFactory), but you can also specify whether each reopened searcher must apply deletes. This is useful for cases where certain uses can tolerate seeing some deleted docs, since reopen time is faster if deletes need not be applied.

Throws:
IOException
Method Detail

decRef

protected void decRef(IndexSearcher reference)
               throws IOException
Description copied from class: ReferenceManager
Decrement reference counting on the given reference.

Specified by:
decRef in class ReferenceManager<IndexSearcher>
Throws:
IOException

tryIncRef

protected boolean tryIncRef(IndexSearcher reference)
Description copied from class: ReferenceManager
Try to increment reference counting on the given reference. Return true if the operation was successful.

Specified by:
tryIncRef in class ReferenceManager<IndexSearcher>

addWaitingListener

public void addWaitingListener(NRTManager.WaitingListener l)
Adds a listener, to be notified when a caller is waiting for a specific generation searcher to be visible.

removeWaitingListener

public void removeWaitingListener(NRTManager.WaitingListener l)
Remove a listener added with addWaitingListener(org.apache.lucene.search.NRTManager.WaitingListener).

waitForGeneration

public void waitForGeneration(long targetGen)
Waits for the target generation to become visible in the searcher. If the current searcher is older than the target generation, this method will block until the searcher is reopened, by another via ReferenceManager.maybeRefresh() or until the NRTManager is closed.

Parameters:
targetGen - the generation to wait for

waitForGeneration

public void waitForGeneration(long targetGen,
                              long time,
                              TimeUnit unit)
Waits for the target generation to become visible in the searcher. If the current searcher is older than the target generation, this method will block until the searcher has been reopened by another thread via ReferenceManager.maybeRefresh(), the given waiting time has elapsed, or until the NRTManager is closed.

NOTE: if the waiting time elapses before the requested target generation is available the current SearcherManager is returned instead.

Parameters:
targetGen - the generation to wait for
time - the time to wait for the target generation
unit - the waiting time's time unit

getCurrentSearchingGen

public long getCurrentSearchingGen()
Returns generation of current searcher.

refreshIfNeeded

protected IndexSearcher refreshIfNeeded(IndexSearcher referenceToRefresh)
                                 throws IOException
Description copied from class: ReferenceManager
Refresh the given reference if needed. Returns null if no refresh was needed, otherwise a new refreshed reference.

Specified by:
refreshIfNeeded in class ReferenceManager<IndexSearcher>
Throws:
IOException

afterRefresh

protected void afterRefresh()
Description copied from class: ReferenceManager
Called after swapReference has installed a new instance.

Overrides:
afterRefresh in class ReferenceManager<IndexSearcher>

afterClose

protected void afterClose()
                   throws IOException
Description copied from class: ReferenceManager
Called after close(), so subclass can free any resources.

Overrides:
afterClose in class ReferenceManager<IndexSearcher>
Throws:
IOException

isSearcherCurrent

public boolean isSearcherCurrent()
                          throws IOException
Returns true if no changes have occured since this searcher ie. reader was opened, otherwise false.

Throws:
IOException
See Also:
IndexReader.isCurrent()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NRTManager.TrackingIndexWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class NRTManager.TrackingIndexWriter

java.lang.Object
    extended by  org.apache.lucene.search.NRTManager.TrackingIndexWriter
Enclosing class:
NRTManager
public static class NRTManager.TrackingIndexWriter
extends Object

Class that tracks changes to a delegated IndexWriter. Create this class (passing your IndexWriter), and then pass this class to NRTManager. Be sure to make all changes via the TrackingIndexWriter, otherwise NRTManager won't know about the changes.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
NRTManager.TrackingIndexWriter(IndexWriter writer)
Method Summary
long | addDocument(Document d)
long | addDocument(Document d, Analyzer a)
long | addDocuments(Collection<Document> docs)
long | addDocuments(Collection<Document> docs, Analyzer a)
long | addIndexes(Directory... dirs)
long | addIndexes(IndexReader... readers)
long | deleteAll()
long | deleteDocuments(Query... queries)
long | deleteDocuments(Query q)
long | deleteDocuments(Term... terms)
long | deleteDocuments(Term t)
long | getGeneration()
IndexWriter | getIndexWriter()
long | updateDocument(Term t, Document d)
long | updateDocument(Term t, Document d, Analyzer a)
long | updateDocuments(Term t, Collection<Document> docs)
long | updateDocuments(Term t, Collection<Document> docs, Analyzer a)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NRTManager.TrackingIndexWriter

public NRTManager.TrackingIndexWriter(IndexWriter writer)
Method Detail

updateDocument

public long updateDocument(Term t,
                           Document d,
                           Analyzer a)
                    throws IOException
Throws:
IOException

updateDocument

public long updateDocument(Term t,
                           Document d)
                    throws IOException
Throws:
IOException

updateDocuments

public long updateDocuments(Term t,
                            Collection<Document> docs,
                            Analyzer a)
                     throws IOException
Throws:
IOException

updateDocuments

public long updateDocuments(Term t,
                            Collection<Document> docs)
                     throws IOException
Throws:
IOException

deleteDocuments

public long deleteDocuments(Term t)
                     throws IOException
Throws:
IOException

deleteDocuments

public long deleteDocuments(Term... terms)
                     throws IOException
Throws:
IOException

deleteDocuments

public long deleteDocuments(Query q)
                     throws IOException
Throws:
IOException

deleteDocuments

public long deleteDocuments(Query... queries)
                     throws IOException
Throws:
IOException

deleteAll

public long deleteAll()
               throws IOException
Throws:
IOException

addDocument

public long addDocument(Document d,
                        Analyzer a)
                 throws IOException
Throws:
IOException

addDocuments

public long addDocuments(Collection<Document> docs,
                         Analyzer a)
                  throws IOException
Throws:
IOException

addDocument

public long addDocument(Document d)
                 throws IOException
Throws:
IOException

addDocuments

public long addDocuments(Collection<Document> docs)
                  throws IOException
Throws:
IOException

addIndexes

public long addIndexes(Directory... dirs)
                throws CorruptIndexException,
                       IOException
Throws:
CorruptIndexException
IOException

addIndexes

public long addIndexes(IndexReader... readers)
                throws CorruptIndexException,
                       IOException
Throws:
CorruptIndexException
IOException

getGeneration

public long getGeneration()

getIndexWriter

public IndexWriter getIndexWriter()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NRTManager.WaitingListener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Interface NRTManager.WaitingListener

All Known Implementing Classes:
NRTManagerReopenThread
Enclosing class:
NRTManager
public static interface NRTManager.WaitingListener

NRTManager invokes this interface to notify it when a caller is waiting for a specific generation searcher to be visible.

Method Summary
 void waiting(long targetGen)

Method Detail

waiting

void waiting(long targetGen)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NRTManagerReopenThread

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class NRTManagerReopenThread

java.lang.Object
    extended by  java.lang.Thread
        extended by  org.apache.lucene.search.NRTManagerReopenThread
All Implemented Interfaces:
Closeable, Runnable, NRTManager.WaitingListener
public class NRTManagerReopenThread
extends Thread
implements NRTManager.WaitingListener, Closeable

Utility class that runs a reopen thread to periodically reopen the NRT searchers in the provided NRTManager.

Typical usage looks like this:

   ... open your own writer ...

   NRTManager manager = new NRTManager(writer);

   // Refreshes searcher every 5 seconds when nobody is waiting, and up to 100 msec delay
   // when somebody is waiting:
   NRTManagerReopenThread reopenThread = new NRTManagerReopenThread(manager, 5.0, 0.1);
   reopenThread.setName("NRT Reopen Thread");
   reopenThread.setPriority(Math.min(Thread.currentThread().getPriority()+2, Thread.MAX_PRIORITY));
   reopenThread.setDaemon(true);
   reopenThread.start();
Then, for each incoming query, do this:
   // For each incoming query:
   IndexSearcher searcher = manager.get();
   try {
     // Use searcher to search...
   } finally {
     manager.release(searcher);
   }
You should make changes using the NRTManager; if you later need to obtain a searcher reflecting those changes:
   // ... or updateDocument, deleteDocuments, etc:
   long gen = manager.addDocument(...);

   // Returned searcher is guaranteed to reflect the just added document
   IndexSearcher searcher = manager.get(gen);
   try {
     // Use searcher to search...
   } finally {
     manager.release(searcher);
   }
When you are done be sure to close both the manager and the reopen thrad:

   reopenThread.close();
   manager.close();

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor Summary
NRTManagerReopenThread(NRTManager manager, double targetMaxStaleSec, double targetMinStaleSec)
Create NRTManagerReopenThread, to periodically reopen the NRT searcher.
Method Summary
void | close()
void | run()
void | waiting(long targetGen)
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NRTManagerReopenThread

public NRTManagerReopenThread(NRTManager manager,
                              double targetMaxStaleSec,
                              double targetMinStaleSec)
Create NRTManagerReopenThread, to periodically reopen the NRT searcher.

Parameters:
targetMaxStaleSec - Maximum time until a new reader must be opened; this sets the upper bound on how slowly reopens may occur
targetMinStaleSec - Mininum time until a new reader can be opened; this sets the lower bound on how quickly reopens may occur, when a caller is waiting for a specific indexing change to become visible.
Method Detail

close

public void close()
Specified by:
close in interface Closeable

waiting

public void waiting(long targetGen)
Specified by:
waiting in interface NRTManager.WaitingListener

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericRangeFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class NumericRangeFilter<T extends Number>

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.MultiTermQueryWrapperFilter<NumericRangeQuery<T>>
            extended by  org.apache.lucene.search.NumericRangeFilter<T>
All Implemented Interfaces:
Serializable
public final class NumericRangeFilter<T extends Number>
extends MultiTermQueryWrapperFilter<NumericRangeQuery<T>>

A Filter that only accepts numeric values within a specified range. To use this, you must first index the numeric values using NumericField (expert: NumericTokenStream).

You create a new NumericRangeFilter with the static factory methods, eg:

 Filter f = NumericRangeFilter.newFloatRange("weight", 0.03f, 0.10f, true, true);
accepts all documents whose float valued "weight" field ranges from 0.03 to 0.10, inclusive. See NumericRangeQuery for details on how Lucene indexes and searches numeric valued fields.

Since:
2.9
See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.search.MultiTermQueryWrapperFilter
query
Method Summary
String | getField() Returns the field name for this filter
T | getMax() Returns the upper value of this range filter
T | getMin() Returns the lower value of this range filter
int | getPrecisionStep() Returns the precision step.
boolean | includesMax() Returns true if the upper endpoint is inclusive
boolean | includesMin() Returns true if the lower endpoint is inclusive
static NumericRangeFilter<Double> | newDoubleRange(String field, Double min, Double max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that queries a double range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
static NumericRangeFilter<Double> | newDoubleRange(String field, int precisionStep, Double min, Double max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that filters a double range using the given precisionStep.
static NumericRangeFilter<Float> | newFloatRange(String field, Float min, Float max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that queries a float range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
static NumericRangeFilter<Float> | newFloatRange(String field, int precisionStep, Float min, Float max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that filters a float range using the given precisionStep.
static NumericRangeFilter<Integer> | newIntRange(String field, Integer min, Integer max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that queries a int range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
static NumericRangeFilter<Integer> | newIntRange(String field, int precisionStep, Integer min, Integer max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that filters a int range using the given precisionStep.
static NumericRangeFilter<Long> | newLongRange(String field, int precisionStep, Long min, Long max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that filters a long range using the given precisionStep.
static NumericRangeFilter<Long> | newLongRange(String field, Long min, Long max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that queries a long range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
Methods inherited from class org.apache.lucene.search.MultiTermQueryWrapperFilter
clearTotalNumberOfTerms, equals, getDocIdSet, getTotalNumberOfTerms, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail

newLongRange

public static NumericRangeFilter<Long> newLongRange(String field,
                                                    int precisionStep,
                                                    Long min,
                                                    Long max,
                                                    boolean minInclusive,
                                                    boolean maxInclusive)
Factory that creates a NumericRangeFilter, that filters a long range using the given precisionStep. You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

newLongRange

public static NumericRangeFilter<Long> newLongRange(String field,
                                                    Long min,
                                                    Long max,
                                                    boolean minInclusive,
                                                    boolean maxInclusive)
Factory that creates a NumericRangeFilter, that queries a long range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4). You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

newIntRange

public static NumericRangeFilter<Integer> newIntRange(String field,
                                                      int precisionStep,
                                                      Integer min,
                                                      Integer max,
                                                      boolean minInclusive,
                                                      boolean maxInclusive)
Factory that creates a NumericRangeFilter, that filters a int range using the given precisionStep. You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

newIntRange

public static NumericRangeFilter<Integer> newIntRange(String field,
                                                      Integer min,
                                                      Integer max,
                                                      boolean minInclusive,
                                                      boolean maxInclusive)
Factory that creates a NumericRangeFilter, that queries a int range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4). You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

newDoubleRange

public static NumericRangeFilter<Double> newDoubleRange(String field,
                                                        int precisionStep,
                                                        Double min,
                                                        Double max,
                                                        boolean minInclusive,
                                                        boolean maxInclusive)
Factory that creates a NumericRangeFilter, that filters a double range using the given precisionStep. You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. Double.NaN will never match a half-open range, to hit NaN use a query with min == max == Double.NaN. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

newDoubleRange

public static NumericRangeFilter<Double> newDoubleRange(String field,
                                                        Double min,
                                                        Double max,
                                                        boolean minInclusive,
                                                        boolean maxInclusive)
Factory that creates a NumericRangeFilter, that queries a double range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4). You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. Double.NaN will never match a half-open range, to hit NaN use a query with min == max == Double.NaN. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

newFloatRange

public static NumericRangeFilter<Float> newFloatRange(String field,
                                                      int precisionStep,
                                                      Float min,
                                                      Float max,
                                                      boolean minInclusive,
                                                      boolean maxInclusive)
Factory that creates a NumericRangeFilter, that filters a float range using the given precisionStep. You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. Float.NaN will never match a half-open range, to hit NaN use a query with min == max == Float.NaN. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

newFloatRange

public static NumericRangeFilter<Float> newFloatRange(String field,
                                                      Float min,
                                                      Float max,
                                                      boolean minInclusive,
                                                      boolean maxInclusive)
Factory that creates a NumericRangeFilter, that queries a float range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4). You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. Float.NaN will never match a half-open range, to hit NaN use a query with min == max == Float.NaN. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

getField

public String getField()
Returns the field name for this filter

includesMin

public boolean includesMin()
Returns true if the lower endpoint is inclusive

includesMax

public boolean includesMax()
Returns true if the upper endpoint is inclusive

getMin

public T getMin()
Returns the lower value of this range filter

getMax

public T getMax()
Returns the upper value of this range filter

getPrecisionStep

public int getPrecisionStep()
Returns the precision step.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericRangeQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class NumericRangeQuery<T extends Number>

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.MultiTermQuery
            extended by  org.apache.lucene.search.NumericRangeQuery<T>
All Implemented Interfaces:
Serializable, Cloneable
public final class NumericRangeQuery<T extends Number>
extends MultiTermQuery

A Query that matches numeric values within a specified range. To use this, you must first index the numeric values using NumericField (expert: NumericTokenStream). If your terms are instead textual, you should use TermRangeQuery. NumericRangeFilter is the filter equivalent of this query.

You create a new NumericRangeQuery with the static factory methods, eg:

 Query q = NumericRangeQuery.newFloatRange("weight", 0.03f, 0.10f, true, true);
matches all documents whose float valued "weight" field ranges from 0.03 to 0.10, inclusive.

The performance of NumericRangeQuery is much better than the corresponding TermRangeQuery because the number of terms that must be searched is usually far fewer, thanks to trie indexing, described below.

You can optionally specify a precisionStep when creating this query. This is necessary if you've changed this configuration from its default (4) during indexing. Lower values consume more disk space but speed up searching. Suitable values are between 1 and 8. A good starting point to test is 4, which is the default value for all Numeric* classes. See below for details.

This query defaults to MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT for 32 bit (int/float) ranges with precisionStep ≤8 and 64 bit (long/double) ranges with precisionStep ≤6. Otherwise it uses MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE as the number of terms is likely to be high. With precision steps of ≤4, this query can be run with one of the BooleanQuery rewrite methods without changing BooleanQuery's default max clause count.

How it works

See the publication about panFMP, where this algorithm was described (referred to as TrieRangeQuery):

Schindler, U, Diepenbroek, M, 2008. Generic XML-based Framework for Metadata Portals. Computers & Geosciences 34 (12), 1947-1955. doi:10.1016/j.cageo.2008.02.023

A quote from this paper: Because Apache Lucene is a full-text search engine and not a conventional database, it cannot handle numerical ranges (e.g., field value is inside user defined bounds, even dates are numerical values). We have developed an extension to Apache Lucene that stores the numerical values in a special string-encoded format with variable precision (all numerical values like doubles, longs, floats, and ints are converted to lexicographic sortable string representations and stored with different precisions (for a more detailed description of how the values are stored, see NumericUtils). A range is then divided recursively into multiple intervals for searching: The center of the range is searched only with the lowest possible precision in the trie, while the boundaries are matched more exactly. This reduces the number of terms dramatically.

For the variant that stores long values in 8 different precisions (each reduced by 8 bits) that uses a lowest precision of 1 byte, the index contains only a maximum of 256 distinct values in the lowest precision. Overall, a range could consist of a theoretical maximum of 7*255*2 + 255 = 3825 distinct terms (when there is a term for every distinct value of an 8-byte-number in the index and the range covers almost all of them; a maximum of 255 distinct values is used because it would always be possible to reduce the full 256 values to one term with degraded precision). In practice, we have seen up to 300 terms in most cases (index with 500,000 metadata records and a uniform value distribution).

Precision Step

You can choose any precisionStep when encoding values. Lower step values mean more precisions and so more terms in index (and index gets larger). On the other hand, the maximum number of terms to match reduces, which optimized query speed. The formula to calculate the maximum term count is:

  n = [ (bitsPerValue/precisionStep - 1) * (2^precisionStep - 1 ) * 2 ] + (2^precisionStep - 1 )

(this formula is only correct, when bitsPerValue/precisionStep is an integer; in other cases, the value must be rounded up and the last summand must contain the modulo of the division as precision step). For longs stored using a precision step of 4, n = 15*15*2 + 15 = 465, and for a precision step of 2, n = 31*3*2 + 3 = 189. But the faster search speed is reduced by more seeking in the term enum of the index. Because of this, the ideal precisionStep value can only be found out by testing. Important: You can index with a lower precision step value and test search speed using a multiple of the original step value.

Good values for precisionStep are depending on usage and data type:

  • The default for all data types is 4, which is used, when no precisionStep is given.
  • Ideal value in most cases for 64 bit data types (long, double) is 6 or 8.
  • Ideal value in most cases for 32 bit data types (int, float) is 4.
  • For low cardinality fields larger precision steps are good. If the cardinality is < 100, it is fair to use Integer.MAX_VALUE (see below).
  • Steps ≥64 for long/double and ≥32 for int/float produces one token per value in the index and querying is as slow as a conventional TermRangeQuery. But it can be used to produce fields, that are solely used for sorting (in this case simply use Integer.MAX_VALUE as precisionStep). Using NumericFields for sorting is ideal, because building the field cache is much faster than with text-only numbers. These fields have one term per value and therefore also work with term enumeration for building distinct lists (e.g. facets / preselected values to search for). Sorting is also possible with range query optimized fields using one of the above precisionSteps.

Comparisons of the different types of RangeQueries on an index with about 500,000 docs showed that TermRangeQuery in boolean rewrite mode (with raised BooleanQuery clause count) took about 30-40 secs to complete, TermRangeQuery in constant score filter rewrite mode took 5 secs and executing this class took <100ms to complete (on an Opteron64 machine, Java 1.5, 8 bit precision step). This query type was developed for a geographic portal, where the performance for e.g. bounding boxes or exact date/time stamps is important.

Since:
2.9
See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.MultiTermQuery
MultiTermQuery.ConstantScoreAutoRewrite, MultiTermQuery.RewriteMethod, MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite, MultiTermQuery.TopTermsScoringBooleanQueryRewrite
Field Summary
Fields inherited from class org.apache.lucene.search.MultiTermQuery
CONSTANT_SCORE_AUTO_REWRITE_DEFAULT, CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE, CONSTANT_SCORE_FILTER_REWRITE, rewriteMethod, SCORING_BOOLEAN_QUERY_REWRITE
Method Summary
boolean | equals(Object o)
protected FilteredTermEnum | getEnum(IndexReader reader) Construct the enumeration to be used, expanding the pattern term.
String | getField() Returns the field name for this query
T | getMax() Returns the upper value of this range query
T | getMin() Returns the lower value of this range query
int | getPrecisionStep() Returns the precision step.
int | hashCode()
boolean | includesMax() Returns true if the upper endpoint is inclusive
boolean | includesMin() Returns true if the lower endpoint is inclusive
static NumericRangeQuery<Double> | newDoubleRange(String field, Double min, Double max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a double range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
static NumericRangeQuery<Double> | newDoubleRange(String field, int precisionStep, Double min, Double max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a double range using the given precisionStep.
static NumericRangeQuery<Float> | newFloatRange(String field, Float min, Float max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a float range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
static NumericRangeQuery<Float> | newFloatRange(String field, int precisionStep, Float min, Float max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a float range using the given precisionStep.
static NumericRangeQuery<Integer> | newIntRange(String field, Integer min, Integer max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a int range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
static NumericRangeQuery<Integer> | newIntRange(String field, int precisionStep, Integer min, Integer max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a int range using the given precisionStep.
static NumericRangeQuery<Long> | newLongRange(String field, int precisionStep, Long min, Long max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a long range using the given precisionStep.
static NumericRangeQuery<Long> | newLongRange(String field, Long min, Long max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a long range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.MultiTermQuery
clearTotalNumberOfTerms, getRewriteMethod, getTotalNumberOfTerms, incTotalNumberOfTerms, rewrite, setRewriteMethod
Methods inherited from class org.apache.lucene.search.Query
clone, combine, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Method Detail

newLongRange

public static NumericRangeQuery<Long> newLongRange(String field,
                                                   int precisionStep,
                                                   Long min,
                                                   Long max,
                                                   boolean minInclusive,
                                                   boolean maxInclusive)
Factory that creates a NumericRangeQuery, that queries a long range using the given precisionStep. You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

newLongRange

public static NumericRangeQuery<Long> newLongRange(String field,
                                                   Long min,
                                                   Long max,
                                                   boolean minInclusive,
                                                   boolean maxInclusive)
Factory that creates a NumericRangeQuery, that queries a long range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4). You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

newIntRange

public static NumericRangeQuery<Integer> newIntRange(String field,
                                                     int precisionStep,
                                                     Integer min,
                                                     Integer max,
                                                     boolean minInclusive,
                                                     boolean maxInclusive)
Factory that creates a NumericRangeQuery, that queries a int range using the given precisionStep. You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

newIntRange

public static NumericRangeQuery<Integer> newIntRange(String field,
                                                     Integer min,
                                                     Integer max,
                                                     boolean minInclusive,
                                                     boolean maxInclusive)
Factory that creates a NumericRangeQuery, that queries a int range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4). You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

newDoubleRange

public static NumericRangeQuery<Double> newDoubleRange(String field,
                                                       int precisionStep,
                                                       Double min,
                                                       Double max,
                                                       boolean minInclusive,
                                                       boolean maxInclusive)
Factory that creates a NumericRangeQuery, that queries a double range using the given precisionStep. You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. Double.NaN will never match a half-open range, to hit NaN use a query with min == max == Double.NaN. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

newDoubleRange

public static NumericRangeQuery<Double> newDoubleRange(String field,
                                                       Double min,
                                                       Double max,
                                                       boolean minInclusive,
                                                       boolean maxInclusive)
Factory that creates a NumericRangeQuery, that queries a double range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4). You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. Double.NaN will never match a half-open range, to hit NaN use a query with min == max == Double.NaN. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

newFloatRange

public static NumericRangeQuery<Float> newFloatRange(String field,
                                                     int precisionStep,
                                                     Float min,
                                                     Float max,
                                                     boolean minInclusive,
                                                     boolean maxInclusive)
Factory that creates a NumericRangeQuery, that queries a float range using the given precisionStep. You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. Float.NaN will never match a half-open range, to hit NaN use a query with min == max == Float.NaN. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

newFloatRange

public static NumericRangeQuery<Float> newFloatRange(String field,
                                                     Float min,
                                                     Float max,
                                                     boolean minInclusive,
                                                     boolean maxInclusive)
Factory that creates a NumericRangeQuery, that queries a float range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4). You can have half-open ranges (which are in fact </≤ or >/≥ queries) by setting the min or max value to null. Float.NaN will never match a half-open range, to hit NaN use a query with min == max == Float.NaN. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

getEnum

protected FilteredTermEnum getEnum(IndexReader reader)
                            throws IOException
Description copied from class: MultiTermQuery
Construct the enumeration to be used, expanding the pattern term.

Specified by:
getEnum in class MultiTermQuery
Throws:
IOException

getField

public String getField()
Returns the field name for this query

includesMin

public boolean includesMin()
Returns true if the lower endpoint is inclusive

includesMax

public boolean includesMax()
Returns true if the upper endpoint is inclusive

getMin

public T getMin()
Returns the lower value of this range query

getMax

public T getMax()
Returns the upper value of this range query

getPrecisionStep

public int getPrecisionStep()
Returns the precision step.

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

equals

public final boolean equals(Object o)
Overrides:
equals in class MultiTermQuery

hashCode

public final int hashCode()
Overrides:
hashCode in class MultiTermQuery
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.search
Interfaces
FieldCache
FieldCache.ByteParser
FieldCache.DoubleParser
FieldCache.FloatParser
FieldCache.IntParser
FieldCache.LongParser
FieldCache.Parser
FieldCache.ShortParser
NRTManager.WaitingListener
RMIRemoteSearchable
Searchable
SearcherLifetimeManager.Pruner
Classes
AssertingIndexSearcher
BooleanClause
BooleanFilter
BooleanQuery
BoostingQuery
CachingCollector
CachingSpanFilter
CachingWrapperFilter
CachingWrapperFilterHelper
ChainedFilter
CheckHits
CheckHits.ExplanationAsserter
CheckHits.ExplanationAssertingSearcher
CheckHits.SetCollector
Collector
ComplexExplanation
ConstantScoreQuery
DefaultSimilarity
DisjunctionMaxQuery
DocIdSet
DocIdSetIterator
DuplicateFilter
Explanation
Explanation.IDFExplanation
FieldCache.CacheEntry
FieldCache.CreationPlaceholder
FieldCache.StringIndex
FieldCacheDocIdSet
FieldCacheRangeFilter
FieldCacheTermsFilter
FieldComparator
FieldComparator.ByteComparator
FieldComparator.DocComparator
FieldComparator.DoubleComparator
FieldComparator.FloatComparator
FieldComparator.IntComparator
FieldComparator.LongComparator
FieldComparator.NumericComparator
FieldComparator.RelevanceComparator
FieldComparator.ShortComparator
FieldComparator.StringComparatorLocale
FieldComparator.StringOrdValComparator
FieldComparator.StringValComparator
FieldComparatorSource
FieldDoc
FieldValueFilter
FieldValueHitQueue
FieldValueHitQueue.Entry
Filter
FilterClause
FilteredDocIdSet
FilteredDocIdSetIterator
FilteredQuery
FilteredTermEnum
FilterManager
FuzzyLikeThisQuery
FuzzyQuery
FuzzyTermEnum
IndexSearcher
MatchAllDocsQuery
MultiCollector
MultiPhraseQuery
MultiSearcher
MultiTermQuery
MultiTermQuery.ConstantScoreAutoRewrite
MultiTermQuery.RewriteMethod
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite
MultiTermQuery.TopTermsScoringBooleanQueryRewrite
MultiTermQueryWrapperFilter
NGramPhraseQuery
NRTManager
NRTManager.TrackingIndexWriter
NRTManagerReopenThread
NumericRangeFilter
NumericRangeQuery
ParallelMultiSearcher
PhraseQuery
PositiveScoresOnlyCollector
PrefixFilter
PrefixQuery
PrefixTermEnum
Query
QueryTermVector
QueryUtils
QueryWrapperFilter
ReferenceManager
RemoteCachingWrapperFilter
RemoteSearchable
ScoreCachingWrappingScorer
ScoreDoc
Scorer
Scorer.ScorerVisitor
ScoringRewrite
SearchEquivalenceTestBase
Searcher
SearcherFactory
SearcherLifetimeManager
SearcherLifetimeManager.PruneByAge
SearcherManager
Similarity
SimilarityDelegator
SingleTermEnum
Sort
SortField
SpanFilter
SpanFilterResult
SpanFilterResult.PositionInfo
SpanFilterResult.StartEnd
SpanQueryFilter
TermQuery
TermRangeFilter
TermRangeQuery
TermRangeTermEnum
TermsFilter
TimeLimitingCollector
TimeLimitingCollector.TimerThread
TopDocs
TopDocsCollector
TopFieldCollector
TopFieldDocs
TopScoreDocCollector
TopTermsRewrite
TotalHitCountCollector
Weight
WildcardQuery
WildcardTermEnum
Enums
BooleanClause.Occur
CachingWrapperFilter.DeletesMode
Exceptions
BooleanQuery.TooManyClauses
TimeLimitingCollector.TimeExceededException


org.apache.lucene.search

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.search

Code to search indices.

See:
Description

Interface Summary
FieldCache | Expert: Maintains caches of term values.
FieldCache.ByteParser | Interface to parse bytes from document fields.
FieldCache.DoubleParser | Interface to parse doubles from document fields.
FieldCache.FloatParser | Interface to parse floats from document fields.
FieldCache.IntParser | Interface to parse ints from document fields.
FieldCache.LongParser | Interface to parse long from document fields.
FieldCache.Parser | Marker interface as super-interface to all parsers.
FieldCache.ShortParser | Interface to parse shorts from document fields.
NRTManager.WaitingListener | NRTManager invokes this interface to notify it when a caller is waiting for a specific generation searcher to be visible.
RMIRemoteSearchable | Deprecated. This package (all of contrib/remote) will be removed in 4.0.
Searchable | Deprecated. In 4.0 this interface is removed/absorbed into IndexSearcher
SearcherLifetimeManager.Pruner | See SearcherLifetimeManager.prune(org.apache.lucene.search.SearcherLifetimeManager.Pruner).

Class Summary
AssertingIndexSearcher | Helper class that adds some extra checks to ensure correct usage of IndexSearcher and Weight.
BooleanClause | A clause in a BooleanQuery.
BooleanFilter | A container Filter that allows Boolean composition of Filters.
BooleanQuery | A Query that matches documents matching boolean combinations of other queries, e.g.
BoostingQuery | The BoostingQuery class can be used to effectively demote results that match a given query.
CachingCollector | Caches all docs, and optionally also scores, coming from a search, and is then able to replay them to another collector.
CachingSpanFilter | Wraps another SpanFilter's result and caches it.
CachingWrapperFilter | Wraps another filter's result and caches it.
CachingWrapperFilterHelper | A unit test helper class to test when the filter is getting cached and when it is not.
ChainedFilter | Allows multiple Filters to be chained.
CheckHits | Utility class for asserting expected hits in tests.
CheckHits.ExplanationAsserter | Asserts that the score explanation for every document matching a query corresponds with the true score.
CheckHits.ExplanationAssertingSearcher | an IndexSearcher that implicitly checks hte explanation of every match whenever it executes a search.
CheckHits.SetCollector | Just collects document ids into a set.
Collector | Expert: Collectors are primarily meant to be used to gather raw results from a search, and implement sorting or custom result filtering, collation, etc.
ComplexExplanation | Expert: Describes the score computation for document and query, and can distinguish a match independent of a positive value.
ConstantScoreQuery | A query that wraps another query or a filter and simply returns a constant score equal to the query boost for every document that matches the filter or query.
DefaultSimilarity | Expert: Default scoring implementation.
DisjunctionMaxQuery | A query that generates the union of documents produced by its subqueries, and that scores each document with the maximum score for that document as produced by any subquery, plus a tie breaking increment for any additional matching subqueries.
DocIdSet | A DocIdSet contains a set of doc ids.
DocIdSetIterator | This abstract class defines methods to iterate over a set of non-decreasing doc ids.
DuplicateFilter |
Explanation | Expert: Describes the score computation for document and query.
Explanation.IDFExplanation | Small Util class used to pass both an idf factor as well as an explanation for that factor.
FieldCache.CacheEntry | EXPERT: A unique Identifier/Description for each item in the FieldCache.
FieldCache.CreationPlaceholder |
FieldCache.StringIndex | Expert: Stores term text values and document ordering data.
FieldCacheDocIdSet | Base class for DocIdSet to be used with FieldCache.
FieldCacheRangeFilter<T> | A range filter built on top of a cached single term field (in FieldCache).
FieldCacheTermsFilter | A Filter that only accepts documents whose single term value in the specified field is contained in the provided set of allowed terms.
FieldComparator<T> | Expert: a FieldComparator compares hits so as to determine their sort order when collecting the top results with TopFieldCollector.
FieldComparator.ByteComparator | Parses field's values as byte (using FieldCache.getBytes(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
FieldComparator.DocComparator | Sorts by ascending docID
FieldComparator.DoubleComparator | Parses field's values as double (using FieldCache.getDoubles(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
FieldComparator.FloatComparator | Parses field's values as float (using FieldCache.getFloats(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
FieldComparator.IntComparator | Parses field's values as int (using FieldCache.getInts(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
FieldComparator.LongComparator | Parses field's values as long (using FieldCache.getLongs(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
FieldComparator.NumericComparator<T extends Number> |
FieldComparator.RelevanceComparator | Sorts by descending relevance.
FieldComparator.ShortComparator | Parses field's values as short (using FieldCache.getShorts(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
FieldComparator.StringComparatorLocale | Sorts by a field's value using the Collator for a given Locale.
FieldComparator.StringOrdValComparator | Sorts by field's natural String sort order, using ordinals.
FieldComparator.StringValComparator | Sorts by field's natural String sort order.
FieldComparatorSource | Provides a FieldComparator for custom field sorting.
FieldDoc | Expert: A ScoreDoc which also contains information about how to sort the referenced document.
FieldValueFilter | A Filter that accepts all documents that have one or more values in a given field.
FieldValueHitQueue<T extends FieldValueHitQueue.Entry> | Expert: A hit queue for sorting by hits by terms in more than one field.
FieldValueHitQueue.Entry |
Filter | Abstract base class for restricting which documents may be returned during searching.
FilterClause | A Filter that wrapped with an indication of how that filter is used when composed with another filter.
FilteredDocIdSet | Abstract decorator class for a DocIdSet implementation that provides on-demand filtering/validation mechanism on a given DocIdSet.
FilteredDocIdSetIterator | Abstract decorator class of a DocIdSetIterator implementation that provides on-demand filter/validation mechanism on an underlying DocIdSetIterator.
FilteredQuery | A query that applies a filter to the results of another query.
FilteredTermEnum | Abstract class for enumerating a subset of all terms.
FilterManager | Deprecated. used by remote package which is deprecated as well.
FuzzyLikeThisQuery | Fuzzifies ALL terms provided as strings and then picks the best n differentiating terms.
FuzzyQuery | Implements the fuzzy search query.
FuzzyTermEnum | Subclass of FilteredTermEnum for enumerating all terms that are similar to the specified filter term.
IndexSearcher | Implements search over a single IndexReader.
MatchAllDocsQuery | A query that matches all documents.
MultiCollector | A Collector which allows running a search with several Collectors.
MultiPhraseQuery | MultiPhraseQuery is a generalized version of PhraseQuery, with an added method MultiPhraseQuery.add(Term[]).
MultiSearcher | Deprecated. If you are using MultiSearcher over IndexSearchers, please use MultiReader instead; this class does not properly handle certain kinds of queries (see LUCENE-2756).
MultiTermQuery | An abstract Query that matches documents containing a subset of terms provided by a FilteredTermEnum enumeration.
MultiTermQuery.ConstantScoreAutoRewrite | A rewrite method that tries to pick the best constant-score rewrite method based on term and document counts from the query.
MultiTermQuery.RewriteMethod | Abstract class that defines how the query is rewritten.
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite | A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, but the scores are only computed as the boost.
MultiTermQuery.TopTermsScoringBooleanQueryRewrite | A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.
MultiTermQueryWrapperFilter<Q extends MultiTermQuery> | A wrapper for MultiTermQuery, that exposes its functionality as a Filter.
NGramPhraseQuery | This is a PhraseQuery which is optimized for n-gram phrase query.
NRTManager | Utility class to manage sharing near-real-time searchers across multiple searching thread.
NRTManager.TrackingIndexWriter | Class that tracks changes to a delegated IndexWriter.
NRTManagerReopenThread | Utility class that runs a reopen thread to periodically reopen the NRT searchers in the provided NRTManager.
NumericRangeFilter<T extends Number> | A Filter that only accepts numeric values within a specified range.
NumericRangeQuery<T extends Number> | A Query that matches numeric values within a specified range.
ParallelMultiSearcher | Deprecated. Please pass an ExecutorService to IndexSearcher, instead.
PhraseQuery | A Query that matches documents containing a particular sequence of terms.
PositiveScoresOnlyCollector | A Collector implementation which wraps another Collector and makes sure only documents with scores > 0 are collected.
PrefixFilter | A Filter that restricts search results to values that have a matching prefix in a given field.
PrefixQuery | A Query that matches documents containing terms with a specified prefix.
PrefixTermEnum | Subclass of FilteredTermEnum for enumerating all terms that match the specified prefix filter term.
Query | The abstract base class for queries.
QueryTermVector |
QueryUtils | Utility class for sanity-checking queries.
QueryWrapperFilter | Constrains search results to only match those which also match a provided query.
ReferenceManager<G> | Utility class to safely share instances of a certain type across multiple threads, while periodically refreshing them.
RemoteCachingWrapperFilter | Deprecated. This package (all of contrib/remote) will be removed in 4.0.
RemoteSearchable | Deprecated. This package (all of contrib/remote) will be removed in 4.0.
ScoreCachingWrappingScorer | A Scorer which wraps another scorer and caches the score of the current document.
ScoreDoc | Holds one hit in TopDocs.
Scorer | Expert: Common scoring functionality for different types of queries.
Scorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer> | A callback to gather information from a scorer and its sub-scorers.
ScoringRewrite<Q extends Query> |
SearchEquivalenceTestBase | Simple base class for checking search equivalence.
Searcher | Deprecated. In 4.0 this abstract class is removed/absorbed into IndexSearcher
SearcherFactory | Factory class used by SearcherManager and NRTManager to create new IndexSearchers.
SearcherLifetimeManager | Keeps track of current plus old IndexSearchers, closing the old ones once they have timed out.
SearcherLifetimeManager.PruneByAge | Simple pruner that drops any searcher older by more than the specified seconds, than the newest searcher.
SearcherManager | Utility class to safely share IndexSearcher instances across multiple threads, while periodically reopening.
Similarity | Expert: Scoring API.
SimilarityDelegator | Deprecated. this class will be removed in 4.0.
SingleTermEnum | Subclass of FilteredTermEnum for enumerating a single term.
Sort | Encapsulates sort criteria for returned hits.
SortField | Stores information about how to sort documents by terms in an individual field.
SpanFilter | Abstract base class providing a mechanism to restrict searches to a subset of an index and also maintains and returns position information.
SpanFilterResult | The results of a SpanQueryFilter.
SpanFilterResult.PositionInfo |
SpanFilterResult.StartEnd |
SpanQueryFilter | Constrains search results to only match those which also match a provided query.
TermQuery | A Query that matches documents containing a term.
TermRangeFilter | A Filter that restricts search results to a range of term values in a given field.
TermRangeQuery | A Query that matches documents within an range of terms.
TermRangeTermEnum | Subclass of FilteredTermEnum for enumerating all terms that match the specified range parameters.
TermsFilter | Constructs a filter for docs matching any of the terms added to this class.
TimeLimitingCollector | The TimeLimitingCollector is used to timeout search requests that take longer than the maximum allowed search time limit.
TimeLimitingCollector.TimerThread |
TopDocs | Represents hits returned by Searcher.search(Query,Filter,int) and Searcher.search(Query,int).
TopDocsCollector<T extends ScoreDoc> | A base class for all collectors that return a TopDocs output.
TopFieldCollector | A Collector that sorts by SortField using FieldComparators.
TopFieldDocs | Represents hits returned by Searcher.search(Query,Filter,int,Sort).
TopScoreDocCollector | A Collector implementation that collects the top-scoring hits, returning them as a TopDocs.
TopTermsRewrite<Q extends Query> | Base rewrite method for collecting only the top terms via a priority queue.
TotalHitCountCollector | Just counts the total number of hits.
Weight | Expert: Calculate query weights and build query scorers.
WildcardQuery | Implements the wildcard search query.
WildcardTermEnum | Subclass of FilteredTermEnum for enumerating all terms that match the specified wildcard filter term.

Enum Summary
BooleanClause.Occur | Specifies how clauses are to occur in matching documents.
CachingWrapperFilter.DeletesMode | Expert: Specifies how new deletions against a reopened reader should be handled.

Exception Summary
BooleanQuery.TooManyClauses | Thrown when an attempt is made to add more than BooleanQuery.getMaxClauseCount() clauses.
TimeLimitingCollector.TimeExceededException | Thrown when elapsed search time exceeds allowed search time.

Package org.apache.lucene.search Description

Code to search indices.

Table Of Contents

  1. Search Basics
  2. The Query Classes
  3. Changing the Scoring

Search

Search over indices. Applications usually call Searcher.search(Query,int) or Searcher.search(Query,Filter,int).

Query Classes

TermQuery

Of the various implementations of Query, the TermQuery is the easiest to understand and the most often used in applications. A TermQuery matches all the documents that contain the specified Term, which is a word that occurs in a certain Field. Thus, a TermQuery identifies and scores all Documents that have a Field with the specified string in it. Constructing a TermQuery is as simple as:

        TermQuery tq = new TermQuery(new Term("fieldName", "term"));
In this example, the Query identifies all Documents that have the Field named "fieldName" containing the word "term".

BooleanQuery

Things start to get interesting when one combines multiple TermQuery instances into a BooleanQuery. A BooleanQuery contains multiple BooleanClauses, where each clause contains a sub-query (Query instance) and an operator (from BooleanClause.Occur) describing how that sub-query is combined with the other clauses:

  1. SHOULD — Use this operator when a clause can occur in the result set, but is not required. If a query is made up of all SHOULD clauses, then every document in the result set matches at least one of these clauses.

  2. MUST — Use this operator when a clause is required to occur in the result set. Every document in the result set will match all such clauses.

  3. MUST NOT — Use this operator when a clause must not occur in the result set. No document in the result set will match any such clauses.

Boolean queries are constructed by adding two or more BooleanClause instances. If too many clauses are added, a TooManyClauses exception will be thrown during searching. This most often occurs when a Query is rewritten into a BooleanQuery with many TermQuery clauses, for example by WildcardQuery. The default setting for the maximum number of clauses 1024, but this can be changed via the static method setMaxClauseCount in BooleanQuery.

Phrases

Another common search is to find documents containing certain phrases. This is handled two different ways:

  1. PhraseQuery — Matches a sequence of Terms. PhraseQuery uses a slop factor to determine how many positions may occur between any two terms in the phrase and still be considered a match.

  2. SpanNearQuery — Matches a sequence of other SpanQuery instances. SpanNearQuery allows for much more complicated phrase queries since it is constructed from other SpanQuery instances, instead of only TermQuery instances.

TermRangeQuery

The TermRangeQuery matches all documents that occur in the exclusive range of a lower Term and an upper Term. according to String.compareTo(String). It is not intended for numerical ranges, use NumericRangeQuery instead. For example, one could find all documents that have terms beginning with the letters a through c. This type of Query is frequently used to find documents that occur in a specific date range.

NumericRangeQuery

The NumericRangeQuery matches all documents that occur in a numeric range. For NumericRangeQuery to work, you must index the values using a special NumericField.

PrefixQuery, WildcardQuery

While the PrefixQuery has a different implementation, it is essentially a special case of the WildcardQuery. The PrefixQuery allows an application to identify all documents with terms that begin with a certain string. The WildcardQuery generalizes this by allowing for the use of * (matches 0 or more characters) and ? (matches exactly one character) wildcards. Note that the WildcardQuery can be quite slow. Also note that WildcardQuery should not start with * and ?, as these are extremely slow. To remove this protection and allow a wildcard at the beginning of a term, see method setAllowLeadingWildcard in QueryParser.

FuzzyQuery

A FuzzyQuery matches documents that contain terms similar to the specified term. Similarity is determined using Levenshtein (edit) distance. This type of query can be useful when accounting for spelling variations in the collection.

Changing Similarity

Chances are DefaultSimilarity is sufficient for all your searching needs. However, in some applications it may be necessary to customize your Similarity implementation. For instance, some applications do not need to distinguish between shorter and longer documents (see a "fair" similarity).

To change Similarity, one must do so for both indexing and searching, and the changes must happen before either of these actions take place. Although in theory there is nothing stopping you from changing mid-stream, it just isn't well-defined what is going to happen.

To make this change, implement your own Similarity (likely you'll want to simply subclass DefaultSimilarity) and then use the new class by calling IndexWriter.setSimilarity before indexing and Searcher.setSimilarity before searching.

If you are interested in use cases for changing your similarity, see the Lucene users's mailing list at Overriding Similarity. In summary, here are a few use cases:

  1. SweetSpotSimilarity — SweetSpotSimilarity gives small increases as the frequency increases a small amount and then greater increases when you hit the "sweet spot", i.e. where you think the frequency of terms is more significant.

  2. Overriding tf — In some applications, it doesn't matter what the score of a document is as long as a matching term occurs. In these cases people have overridden Similarity to return 1 from the tf() method.

  3. Changing Length Normalization — By overriding lengthNorm, it is possible to discount how the length of a field contributes to a score. In DefaultSimilarity, lengthNorm = 1 / (numTerms in field)^0.5, but if one changes this to be 1 / (numTerms in field), all fields will be treated "fairly".

In general, Chris Hostetter sums it up best in saying (from the Lucene users's mailing list):
[One would override the Similarity in] ... any situation where you know more about your data then just that it's "text" is a situation where it *might* make sense to to override your Similarity method.

Changing Scoring — Expert Level

Changing scoring is an expert level task, so tread carefully and be prepared to share your code if you want help.

With the warning out of the way, it is possible to change a lot more than just the Similarity when it comes to scoring in Lucene. Lucene's scoring is a complex mechanism that is grounded by three main classes:

  1. Query — The abstract object representation of the user's information need.
  2. Weight — The internal interface representation of the user's Query, so that Query objects may be reused.
  3. Scorer — An abstract class containing common functionality for scoring. Provides both scoring and explanation capabilities.
Details on each of these classes, and their children, can be found in the subsections below.

The Query Class

In some sense, the Query class is where it all begins. Without a Query, there would be nothing to score. Furthermore, the Query class is the catalyst for the other scoring classes as it is often responsible for creating them or coordinating the functionality between them. The Query class has several methods that are important for derived classes:

  1. createWeight(Searcher searcher) — A Weight is the internal representation of the Query, so each Query implementation must provide an implementation of Weight. See the subsection on The Weight Interface below for details on implementing the Weight interface.
  2. rewrite(IndexReader reader) — Rewrites queries into primitive queries. Primitive queries are: TermQuery, BooleanQuery, and other queries that implement Query.html#createWeight(Searcher searcher)

The Weight Interface

The Weight interface provides an internal representation of the Query so that it can be reused. Any Searcher dependent state should be stored in the Weight implementation, not in the Query class. The interface defines six methods that must be implemented:

  1. Weight#getQuery() — Pointer to the Query that this Weight represents.
  2. Weight#getValue() — The weight for this Query. For example, the TermQuery.TermWeight value is equal to the idf^2 * boost * queryNorm
  3. Weight#sumOfSquaredWeights() — The sum of squared weights. For TermQuery, this is (idf * boost)^2
  4. Weight#normalize(float) — Determine the query normalization factor. The query normalization may allow for comparing scores between queries.
  5. Weight#scorer(IndexReader, boolean, boolean) — Construct a new Scorer for this Weight. See The Scorer Class below for help defining a Scorer. As the name implies, the Scorer is responsible for doing the actual scoring of documents given the Query.
  6. Weight#explain(Searcher, IndexReader, int) — Provide a means for explaining why a given document was scored the way it was.

The Scorer Class

The Scorer abstract class provides common scoring functionality for all Scorer implementations and is the heart of the Lucene scoring process. The Scorer defines the following abstract (some of them are not yet abstract, but will be in future versions and should be considered as such now) methods which must be implemented (some of them inherited from DocIdSetIterator ):

  1. DocIdSetIterator#nextDoc() — Advances to the next document that matches this Query, returning true if and only if there is another document that matches.
  2. DocIdSetIterator#docID() — Returns the id of the Document that contains the match. It is not valid until next() has been called at least once.
  3. Scorer#score(Collector) — Scores and collects all matching documents using the given Collector.
  4. Scorer#score() — Return the score of the current document. This value can be determined in any appropriate way for an application. For instance, the TermScorer returns the tf * Weight.getValue() * fieldNorm.
  5. DocIdSetIterator#advance(int) — Skip ahead in the document matches to the document whose id is greater than or equal to the passed in value. In many instances, advance can be implemented more efficiently than simply looping through all the matching documents until the target document is identified.

Why would I want to add my own Query?

In a nutshell, you want to add your own custom Query implementation when you think that Lucene's aren't appropriate for the task that you want to do. You might be doing some cutting edge research or you need more information back out of Lucene (similar to Doug adding SpanQuery functionality).


org.apache.lucene.search Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.search

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.junit.Assert
      • org.apache.lucene.util.LuceneTestCase
        • org.apache.lucene.search.SearchEquivalenceTestBase
    • org.apache.lucene.search.BooleanClause (implements java.io.Serializable)
    • org.apache.lucene.search.CheckHits
    • org.apache.lucene.search.Collector
      • org.apache.lucene.search.CachingCollector
      • org.apache.lucene.search.CheckHits.ExplanationAsserter
      • org.apache.lucene.search.CheckHits.SetCollector
      • org.apache.lucene.search.MultiCollector
      • org.apache.lucene.search.PositiveScoresOnlyCollector
      • org.apache.lucene.search.TimeLimitingCollector
      • org.apache.lucene.search.TopDocsCollector<T>
        • org.apache.lucene.search.TopFieldCollector
        • org.apache.lucene.search.TopScoreDocCollector
      • org.apache.lucene.search.TotalHitCountCollector
    • org.apache.lucene.search.DocIdSet
      • org.apache.lucene.search.FieldCacheDocIdSet
      • org.apache.lucene.search.FilteredDocIdSet
    • org.apache.lucene.search.DocIdSetIterator
      • org.apache.lucene.search.FilteredDocIdSetIterator
      • org.apache.lucene.search.Scorer
        • org.apache.lucene.search.ConstantScoreQuery.ConstantScorer
        • org.apache.lucene.search.ScoreCachingWrappingScorer
    • org.apache.lucene.search.Explanation (implements java.io.Serializable)
      • org.apache.lucene.search.ComplexExplanation
    • org.apache.lucene.search.Explanation.IDFExplanation (implements java.io.Serializable)
    • org.apache.lucene.search.FieldCache.CacheEntry
    • org.apache.lucene.search.FieldCache.CreationPlaceholder
    • org.apache.lucene.search.FieldCache.StringIndex
    • org.apache.lucene.search.FieldComparator<T>
      • org.apache.lucene.search.FieldComparator.DocComparator
      • org.apache.lucene.search.FieldComparator.NumericComparator<T>
        • org.apache.lucene.search.FieldComparator.ByteComparator
        • org.apache.lucene.search.FieldComparator.DoubleComparator
        • org.apache.lucene.search.FieldComparator.FloatComparator
        • org.apache.lucene.search.FieldComparator.IntComparator
        • org.apache.lucene.search.FieldComparator.LongComparator
        • org.apache.lucene.search.FieldComparator.ShortComparator
      • org.apache.lucene.search.FieldComparator.RelevanceComparator
      • org.apache.lucene.search.FieldComparator.StringComparatorLocale
      • org.apache.lucene.search.FieldComparator.StringOrdValComparator
      • org.apache.lucene.search.FieldComparator.StringValComparator
    • org.apache.lucene.search.FieldComparatorSource (implements java.io.Serializable)
    • org.apache.lucene.search.Filter (implements java.io.Serializable)
      • org.apache.lucene.search.BooleanFilter (implements java.lang.Iterable<T>)
      • org.apache.lucene.search.CachingWrapperFilter
        • org.apache.lucene.search.CachingWrapperFilterHelper
      • org.apache.lucene.search.ChainedFilter
      • org.apache.lucene.search.DuplicateFilter
      • org.apache.lucene.search.FieldCacheRangeFilter<T>
      • org.apache.lucene.search.FieldCacheTermsFilter
      • org.apache.lucene.search.FieldValueFilter
      • org.apache.lucene.search.MultiTermQueryWrapperFilter<Q>
        • org.apache.lucene.search.NumericRangeFilter<T>
        • org.apache.lucene.search.PrefixFilter
        • org.apache.lucene.search.TermRangeFilter
      • org.apache.lucene.search.QueryWrapperFilter
      • org.apache.lucene.search.RemoteCachingWrapperFilter
      • org.apache.lucene.search.SpanFilter
        • org.apache.lucene.search.CachingSpanFilter
        • org.apache.lucene.search.SpanQueryFilter
      • org.apache.lucene.search.TermsFilter
    • org.apache.lucene.search.FilterClause
    • org.apache.lucene.search.FilterManager
    • org.apache.lucene.search.FilterManager.FilterCleaner (implements java.lang.Runnable)
    • org.apache.lucene.search.FilterManager.FilterItem
    • org.apache.lucene.search.MultiTermQuery.RewriteMethod (implements java.io.Serializable)
      • org.apache.lucene.search.MultiTermQuery.ConstantScoreAutoRewrite
      • org.apache.lucene.search.ScoringRewrite<Q>
      • org.apache.lucene.search.TopTermsRewrite<Q>
        • org.apache.lucene.search.MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite
        • org.apache.lucene.search.MultiTermQuery.TopTermsScoringBooleanQueryRewrite
    • org.apache.lucene.search.NRTManager.TrackingIndexWriter
    • org.apache.lucene.util.PriorityQueue<T>
      • org.apache.lucene.search.FieldValueHitQueue<T>
    • org.apache.lucene.search.Query (implements java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.search.BooleanQuery (implements java.lang.Iterable<T>)
      • org.apache.lucene.search.BoostingQuery
      • org.apache.lucene.search.ConstantScoreQuery
      • org.apache.lucene.search.DisjunctionMaxQuery (implements java.lang.Iterable<T>)
      • org.apache.lucene.search.FilteredQuery
      • org.apache.lucene.search.FuzzyLikeThisQuery
      • org.apache.lucene.search.MatchAllDocsQuery
      • org.apache.lucene.search.MultiPhraseQuery
      • org.apache.lucene.search.MultiTermQuery
        • org.apache.lucene.search.FuzzyQuery
        • org.apache.lucene.search.NumericRangeQuery<T>
        • org.apache.lucene.search.PrefixQuery
        • org.apache.lucene.search.TermRangeQuery
        • org.apache.lucene.search.WildcardQuery
      • org.apache.lucene.search.PhraseQuery
        • org.apache.lucene.search.NGramPhraseQuery
      • org.apache.lucene.search.TermQuery
    • org.apache.lucene.search.QueryTermVector (implements org.apache.lucene.index.TermFreqVector)
    • org.apache.lucene.search.QueryUtils
    • org.apache.lucene.search.ReferenceManager<G> (implements java.io.Closeable)
      • org.apache.lucene.search.NRTManager
      • org.apache.lucene.search.SearcherManager
    • java.rmi.server.RemoteObject (implements java.rmi.Remote, java.io.Serializable)
      • java.rmi.server.RemoteServer
        • java.rmi.server.UnicastRemoteObject
          • org.apache.lucene.search.RemoteSearchable (implements org.apache.lucene.search.RMIRemoteSearchable)
    • org.apache.lucene.search.ScoreDoc (implements java.io.Serializable)
      • org.apache.lucene.search.FieldDoc
      • org.apache.lucene.search.FieldValueHitQueue.Entry
    • org.apache.lucene.search.Scorer.ScorerVisitor<P,C,S>
    • org.apache.lucene.search.Searcher (implements org.apache.lucene.search.Searchable)
      • org.apache.lucene.search.IndexSearcher
        • org.apache.lucene.search.AssertingIndexSearcher
        • org.apache.lucene.search.CheckHits.ExplanationAssertingSearcher
      • org.apache.lucene.search.MultiSearcher
        • org.apache.lucene.search.ParallelMultiSearcher
    • org.apache.lucene.search.SearcherFactory
    • org.apache.lucene.search.SearcherLifetimeManager (implements java.io.Closeable)
    • org.apache.lucene.search.SearcherLifetimeManager.PruneByAge (implements org.apache.lucene.search.SearcherLifetimeManager.Pruner)
    • org.apache.lucene.search.Similarity (implements java.io.Serializable)
      • org.apache.lucene.search.DefaultSimilarity
      • org.apache.lucene.search.SimilarityDelegator
    • org.apache.lucene.search.Sort (implements java.io.Serializable)
    • org.apache.lucene.search.SortField (implements java.io.Serializable)
    • org.apache.lucene.search.SpanFilterResult
    • org.apache.lucene.search.SpanFilterResult.PositionInfo
    • org.apache.lucene.search.SpanFilterResult.StartEnd
    • org.apache.lucene.index.TermEnum (implements java.io.Closeable)
      • org.apache.lucene.search.FilteredTermEnum
        • org.apache.lucene.search.FuzzyTermEnum
        • org.apache.lucene.search.PrefixTermEnum
        • org.apache.lucene.search.SingleTermEnum
        • org.apache.lucene.search.TermRangeTermEnum
        • org.apache.lucene.search.WildcardTermEnum
    • java.lang.Thread (implements java.lang.Runnable)
      • org.apache.lucene.search.NRTManagerReopenThread (implements java.io.Closeable, org.apache.lucene.search.NRTManager.WaitingListener)
      • org.apache.lucene.search.TimeLimitingCollector.TimerThread
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.lang.RuntimeException
          • org.apache.lucene.search.BooleanQuery.TooManyClauses
          • org.apache.lucene.search.TimeLimitingCollector.TimeExceededException
    • org.apache.lucene.search.TopDocs (implements java.io.Serializable)
      • org.apache.lucene.search.TopFieldDocs
    • org.apache.lucene.search.Weight (implements java.io.Serializable)
      • org.apache.lucene.search.BooleanQuery.BooleanWeight
      • org.apache.lucene.search.ConstantScoreQuery.ConstantWeight
      • org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight

Interface Hierarchy

  • java.io.Closeable
    • org.apache.lucene.search.Searchable
      • org.apache.lucene.search.RMIRemoteSearchable (also extends java.rmi.Remote)
  • org.apache.lucene.search.FieldCache
  • org.apache.lucene.search.NRTManager.WaitingListener
  • java.rmi.Remote
    • org.apache.lucene.search.RMIRemoteSearchable (also extends org.apache.lucene.search.Searchable)
  • org.apache.lucene.search.SearcherLifetimeManager.Pruner
  • java.io.Serializable
    • org.apache.lucene.search.FieldCache.Parser
      • org.apache.lucene.search.FieldCache.ByteParser
      • org.apache.lucene.search.FieldCache.DoubleParser
      • org.apache.lucene.search.FieldCache.FloatParser
      • org.apache.lucene.search.FieldCache.IntParser
      • org.apache.lucene.search.FieldCache.LongParser
      • org.apache.lucene.search.FieldCache.ShortParser

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.search.CachingWrapperFilter.DeletesMode
      • org.apache.lucene.search.BooleanClause.Occur


Uses of Package org.apache.lucene.search

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.search

Packages that use org.apache.lucene.search
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.benchmark.quality | Search Quality Benchmarking.
org.apache.lucene.benchmark.quality.utils | Miscellaneous utilities for search quality benchmarking: query parsing, submission reports.
org.apache.lucene.demo | Demo applications for indexing and searching.
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.util | Various utilities for faceted search
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.memory | High-performance single-document main memory Apache Lucene fulltext search index.
org.apache.lucene.index.pruning | Static Index Pruning Tools
org.apache.lucene.misc | Miscellaneous index tools.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.analyzing | QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.
org.apache.lucene.queryParser.complexPhrase | QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
org.apache.lucene.queryParser.ext | Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration
org.apache.lucene.queryParser.surround.query | This package contains SrndQuery and its subclasses.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.function | Programmatic control over documents scores.
org.apache.lucene.search.grouping | This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.search.join | This modules support index-time and query-time joins.
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.regex | Regular expression Query.
org.apache.lucene.search.similar | Document similarity query generators.
org.apache.lucene.search.spans | The calculus of spans.
org.apache.lucene.search.vectorhighlight | This is an another highlighter implementation.
org.apache.lucene.spatial.geohash | Support for Geohash encoding, decoding, and filtering.
org.apache.lucene.spatial.tier | Support for filtering based upon geographic location.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.
org.apache.lucene.util | Some utility classes.
org.apache.lucene.xmlparser | Parser that produces Lucene Query objects from XML streams.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Classes in org.apache.lucene.search used by org.apache.lucene.benchmark.byTask
IndexSearcher
Implements search over a single IndexReader.

Classes in org.apache.lucene.search used by org.apache.lucene.benchmark.byTask.feeds
Query
The abstract base class for queries.

Classes in org.apache.lucene.search used by org.apache.lucene.benchmark.byTask.tasks
Collector
Expert: Collectors are primarily meant to be used to gather raw results from a search, and implement sorting or custom result filtering, collation, etc.
Query
The abstract base class for queries.
Sort
Encapsulates sort criteria for returned hits.

Classes in org.apache.lucene.search used by org.apache.lucene.benchmark.quality
IndexSearcher
Implements search over a single IndexReader.
Query
The abstract base class for queries.

Classes in org.apache.lucene.search used by org.apache.lucene.benchmark.quality.utils
IndexSearcher
Implements search over a single IndexReader.
Query
The abstract base class for queries.
TopDocs
Represents hits returned by Searcher.search(Query,Filter,int) and Searcher.search(Query,int).

Classes in org.apache.lucene.search used by org.apache.lucene.demo
IndexSearcher
Implements search over a single IndexReader.
Query
The abstract base class for queries.

Classes in org.apache.lucene.search used by org.apache.lucene.facet.search
Collector
Expert: Collectors are primarily meant to be used to gather raw results from a search, and implement sorting or custom result filtering, collation, etc.
DocIdSet
A DocIdSet contains a set of doc ids.
Query
The abstract base class for queries.
Scorer
Expert: Common scoring functionality for different types of queries.

Classes in org.apache.lucene.search used by org.apache.lucene.facet.util
DocIdSet
A DocIdSet contains a set of doc ids.

Classes in org.apache.lucene.search used by org.apache.lucene.index
Filter
Abstract base class for restricting which documents may be returned during searching.
IndexSearcher
Implements search over a single IndexReader.
Query
The abstract base class for queries.
Similarity
Expert: Scoring API.

Classes in org.apache.lucene.search used by org.apache.lucene.index.memory
IndexSearcher
Implements search over a single IndexReader.
Query
The abstract base class for queries.

Classes in org.apache.lucene.search used by org.apache.lucene.index.pruning
ScoreDoc
Holds one hit in TopDocs.
Similarity
Expert: Scoring API.

Classes in org.apache.lucene.search used by org.apache.lucene.misc
DefaultSimilarity
Expert: Default scoring implementation.
Similarity
Expert: Scoring API.

Classes in org.apache.lucene.search used by org.apache.lucene.queryParser
BooleanClause
A clause in a BooleanQuery.
BooleanClause.Occur
Specifies how clauses are to occur in matching documents.
BooleanQuery
A Query that matches documents matching boolean combinations of other queries, e.g.
MultiPhraseQuery
MultiPhraseQuery is a generalized version of PhraseQuery, with an added method MultiPhraseQuery.add(Term[]).
MultiTermQuery.RewriteMethod
Abstract class that defines how the query is rewritten.
PhraseQuery
A Query that matches documents containing a particular sequence of terms.
Query
The abstract base class for queries.

Classes in org.apache.lucene.search used by org.apache.lucene.queryParser.analyzing
Query
The abstract base class for queries.

Classes in org.apache.lucene.search used by org.apache.lucene.queryParser.complexPhrase
Query
The abstract base class for queries.

Classes in org.apache.lucene.search used by org.apache.lucene.queryParser.ext
Query
The abstract base class for queries.

Classes in org.apache.lucene.search used by org.apache.lucene.queryParser.standard
BooleanClause
A clause in a BooleanQuery.
BooleanClause.Occur
Specifies how clauses are to occur in matching documents.
MultiTermQuery.RewriteMethod
Abstract class that defines how the query is rewritten.
Query
The abstract base class for queries.

Classes in org.apache.lucene.search used by org.apache.lucene.queryParser.standard.builders
BooleanQuery
A Query that matches documents matching boolean combinations of other queries, e.g.
FuzzyQuery
Implements the fuzzy search query.
MatchAllDocsQuery
A query that matches all documents.
MultiPhraseQuery
MultiPhraseQuery is a generalized version of PhraseQuery, with an added method MultiPhraseQuery.add(Term[]).
NumericRangeQuery
A Query that matches numeric values within a specified range.
PhraseQuery
A Query that matches documents containing a particular sequence of terms.
PrefixQuery
A Query that matches documents containing terms with a specified prefix.
Query
The abstract base class for queries.
TermQuery
A Query that matches documents containing a term.
TermRangeQuery
A Query that matches documents within an range of terms.
WildcardQuery
Implements the wildcard search query.

Classes in org.apache.lucene.search used by org.apache.lucene.queryParser.standard.config
MultiTermQuery.RewriteMethod
Abstract class that defines how the query is rewritten.

Classes in org.apache.lucene.search used by org.apache.lucene.queryParser.surround.query
Query
The abstract base class for queries.
TermQuery
A Query that matches documents containing a term.

Classes in org.apache.lucene.search used by org.apache.lucene.search
BooleanClause
A clause in a BooleanQuery.
BooleanClause.Occur
Specifies how clauses are to occur in matching documents.
BooleanQuery
A Query that matches documents matching boolean combinations of other queries, e.g.
CachingCollector
Caches all docs, and optionally also scores, coming from a search, and is then able to replay them to another collector.
CachingWrapperFilter
Wraps another filter's result and caches it.
CachingWrapperFilter.DeletesMode
Expert: Specifies how new deletions against a reopened reader should be handled.
Collector
Expert: Collectors are primarily meant to be used to gather raw results from a search, and implement sorting or custom result filtering, collation, etc.
DocIdSet
A DocIdSet contains a set of doc ids.
DocIdSetIterator
This abstract class defines methods to iterate over a set of non-decreasing doc ids.
Explanation
Expert: Describes the score computation for document and query.
Explanation.IDFExplanation
Small Util class used to pass both an idf factor as well as an explanation for that factor.
FieldCache
Expert: Maintains caches of term values.
FieldCache.ByteParser
Interface to parse bytes from document fields.
FieldCache.CacheEntry
EXPERT: A unique Identifier/Description for each item in the FieldCache.
FieldCache.DoubleParser
Interface to parse doubles from document fields.
FieldCache.FloatParser
Interface to parse floats from document fields.
FieldCache.IntParser
Interface to parse ints from document fields.
FieldCache.LongParser
Interface to parse long from document fields.
FieldCache.Parser
Marker interface as super-interface to all parsers.
FieldCache.ShortParser
Interface to parse shorts from document fields.
FieldCache.StringIndex
Expert: Stores term text values and document ordering data.
FieldCacheRangeFilter
A range filter built on top of a cached single term field (in FieldCache).
FieldComparator
Expert: a FieldComparator compares hits so as to determine their sort order when collecting the top results with TopFieldCollector.
FieldComparator.NumericComparator
FieldComparatorSource
Provides a FieldComparator for custom field sorting.
FieldValueHitQueue
Expert: A hit queue for sorting by hits by terms in more than one field.
FieldValueHitQueue.Entry
Filter
Abstract base class for restricting which documents may be returned during searching.
FilterClause
A Filter that wrapped with an indication of how that filter is used when composed with another filter.
FilteredTermEnum
Abstract class for enumerating a subset of all terms.
FilterManager
Deprecated. used by remote package which is deprecated as well. You should use CachingWrapperFilter if you wish to cache Filters.
FilterManager.FilterCleaner
Deprecated. Keeps the cache from getting too big.
FilterManager.FilterItem
Deprecated. Holds the filter and the last time the filter was used, to make LRU-based cache cleaning possible.
IndexSearcher
Implements search over a single IndexReader.
MultiSearcher
Deprecated. If you are using MultiSearcher over IndexSearchers, please use MultiReader instead; this class does not properly handle certain kinds of queries (see LUCENE-2756).
MultiTermQuery
An abstract Query that matches documents containing a subset of terms provided by a FilteredTermEnum enumeration.
MultiTermQuery.RewriteMethod
Abstract class that defines how the query is rewritten.
MultiTermQueryWrapperFilter
A wrapper for MultiTermQuery, that exposes its functionality as a Filter.
NRTManager
Utility class to manage sharing near-real-time searchers across multiple searching thread.
NRTManager.TrackingIndexWriter
Class that tracks changes to a delegated IndexWriter.
NRTManager.WaitingListener
NRTManager invokes this interface to notify it when a caller is waiting for a specific generation searcher to be visible.
NumericRangeFilter
A Filter that only accepts numeric values within a specified range.
NumericRangeQuery
A Query that matches numeric values within a specified range.
PhraseQuery
A Query that matches documents containing a particular sequence of terms.
Query
The abstract base class for queries.
ReferenceManager
Utility class to safely share instances of a certain type across multiple threads, while periodically refreshing them.
RMIRemoteSearchable
Deprecated. This package (all of contrib/remote) will be removed in 4.0.
ScoreDoc
Holds one hit in TopDocs.
Scorer
Expert: Common scoring functionality for different types of queries.
Scorer.ScorerVisitor
A callback to gather information from a scorer and its sub-scorers.
ScoringRewrite
Searchable
Deprecated. In 4.0 this interface is removed/absorbed into IndexSearcher
Searcher
Deprecated. In 4.0 this abstract class is removed/absorbed into IndexSearcher
SearcherFactory
Factory class used by SearcherManager and NRTManager to create new IndexSearchers.
SearcherLifetimeManager.Pruner
See SearcherLifetimeManager.prune(org.apache.lucene.search.SearcherLifetimeManager.Pruner).
Similarity
Expert: Scoring API.
Sort
Encapsulates sort criteria for returned hits.
SortField
Stores information about how to sort documents by terms in an individual field.
SpanFilter
Abstract base class providing a mechanism to restrict searches to a subset of an index and also maintains and returns position information.
SpanFilterResult
The results of a SpanQueryFilter.
SpanFilterResult.PositionInfo
SpanFilterResult.StartEnd
TermRangeFilter
A Filter that restricts search results to a range of term values in a given field.
TimeLimitingCollector.TimerThread
TopDocs
Represents hits returned by Searcher.search(Query,Filter,int) and Searcher.search(Query,int).
TopDocsCollector
A base class for all collectors that return a TopDocs output.
TopFieldCollector
A Collector that sorts by SortField using FieldComparators.
TopFieldDocs
Represents hits returned by Searcher.search(Query,Filter,int,Sort).
TopScoreDocCollector
A Collector implementation that collects the top-scoring hits, returning them as a TopDocs.
TopTermsRewrite
Base rewrite method for collecting only the top terms via a priority queue.
Weight
Expert: Calculate query weights and build query scorers.

Classes in org.apache.lucene.search used by org.apache.lucene.search.function
Explanation
Expert: Describes the score computation for document and query.
FieldCache
Expert: Maintains caches of term values.
FieldCache.ByteParser
Interface to parse bytes from document fields.
FieldCache.FloatParser
Interface to parse floats from document fields.
FieldCache.IntParser
Interface to parse ints from document fields.
FieldCache.ShortParser
Interface to parse shorts from document fields.
Query
The abstract base class for queries.
Searcher
Deprecated. In 4.0 this abstract class is removed/absorbed into IndexSearcher
Weight
Expert: Calculate query weights and build query scorers.

Classes in org.apache.lucene.search used by org.apache.lucene.search.grouping
Collector
Expert: Collectors are primarily meant to be used to gather raw results from a search, and implement sorting or custom result filtering, collation, etc.
Filter
Abstract base class for restricting which documents may be returned during searching.
ScoreDoc
Holds one hit in TopDocs.
Scorer
Expert: Common scoring functionality for different types of queries.
Sort
Encapsulates sort criteria for returned hits.
SortField
Stores information about how to sort documents by terms in an individual field.
TopDocsCollector
A base class for all collectors that return a TopDocs output.

Classes in org.apache.lucene.search used by org.apache.lucene.search.highlight
Query
The abstract base class for queries.

Classes in org.apache.lucene.search used by org.apache.lucene.search.join
Collector
Expert: Collectors are primarily meant to be used to gather raw results from a search, and implement sorting or custom result filtering, collation, etc.
DocIdSet
A DocIdSet contains a set of doc ids.
Filter
Abstract base class for restricting which documents may be returned during searching.
IndexSearcher
Implements search over a single IndexReader.
Query
The abstract base class for queries.
Scorer
Expert: Common scoring functionality for different types of queries.
Searcher
Deprecated. In 4.0 this abstract class is removed/absorbed into IndexSearcher
Sort
Encapsulates sort criteria for returned hits.
Weight
Expert: Calculate query weights and build query scorers.

Classes in org.apache.lucene.search used by org.apache.lucene.search.payloads
DocIdSetIterator
This abstract class defines methods to iterate over a set of non-decreasing doc ids.
Explanation
Expert: Describes the score computation for document and query.
Query
The abstract base class for queries.
Scorer
Expert: Common scoring functionality for different types of queries.
Searcher
Deprecated. In 4.0 this abstract class is removed/absorbed into IndexSearcher
Similarity
Expert: Scoring API.
Weight
Expert: Calculate query weights and build query scorers.

Classes in org.apache.lucene.search used by org.apache.lucene.search.regex
FilteredTermEnum
Abstract class for enumerating a subset of all terms.
MultiTermQuery
An abstract Query that matches documents containing a subset of terms provided by a FilteredTermEnum enumeration.
Query
The abstract base class for queries.

Classes in org.apache.lucene.search used by org.apache.lucene.search.similar
Query
The abstract base class for queries.
Similarity
Expert: Scoring API.

Classes in org.apache.lucene.search used by org.apache.lucene.search.spans
DocIdSetIterator
This abstract class defines methods to iterate over a set of non-decreasing doc ids.
Explanation
Expert: Describes the score computation for document and query.
MultiTermQuery
An abstract Query that matches documents containing a subset of terms provided by a FilteredTermEnum enumeration.
MultiTermQuery.RewriteMethod
Abstract class that defines how the query is rewritten.
Query
The abstract base class for queries.
Scorer
Expert: Common scoring functionality for different types of queries.
Searcher
Deprecated. In 4.0 this abstract class is removed/absorbed into IndexSearcher
Similarity
Expert: Scoring API.
Weight
Expert: Calculate query weights and build query scorers.

Classes in org.apache.lucene.search used by org.apache.lucene.search.vectorhighlight
Query
The abstract base class for queries.

Classes in org.apache.lucene.search used by org.apache.lucene.spatial.geohash
DocIdSet
A DocIdSet contains a set of doc ids.
Filter
Abstract base class for restricting which documents may be returned during searching.

Classes in org.apache.lucene.search used by org.apache.lucene.spatial.tier
DocIdSet
A DocIdSet contains a set of doc ids.
FieldComparator
Expert: a FieldComparator compares hits so as to determine their sort order when collecting the top results with TopFieldCollector.
FieldComparatorSource
Provides a FieldComparator for custom field sorting.
Filter
Abstract base class for restricting which documents may be returned during searching.
Query
The abstract base class for queries.

Classes in org.apache.lucene.search used by org.apache.lucene.store.instantiated
Similarity
Expert: Scoring API.

Classes in org.apache.lucene.search used by org.apache.lucene.util
DocIdSet
A DocIdSet contains a set of doc ids.
DocIdSetIterator
This abstract class defines methods to iterate over a set of non-decreasing doc ids.
FieldCache
Expert: Maintains caches of term values.
FieldCache.CacheEntry
EXPERT: A unique Identifier/Description for each item in the FieldCache.
IndexSearcher
Implements search over a single IndexReader.
Scorer
Expert: Common scoring functionality for different types of queries.
TopDocs
Represents hits returned by Searcher.search(Query,Filter,int) and Searcher.search(Query,int).

Classes in org.apache.lucene.search used by org.apache.lucene.xmlparser
Filter
Abstract base class for restricting which documents may be returned during searching.
Query
The abstract base class for queries.

Classes in org.apache.lucene.search used by org.apache.lucene.xmlparser.builders
Filter
Abstract base class for restricting which documents may be returned during searching.
Query
The abstract base class for queries.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ParallelMultiSearcher

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class ParallelMultiSearcher

java.lang.Object
    extended by  org.apache.lucene.search.Searcher
        extended by  org.apache.lucene.search.MultiSearcher
            extended by  org.apache.lucene.search.ParallelMultiSearcher
All Implemented Interfaces:
Closeable, Searchable
Deprecated. Please pass an ExecutorService to IndexSearcher, instead.

@Deprecated
public class ParallelMultiSearcher
extends MultiSearcher

Implements parallel search over a set of Searchables.

Applications usually need only call the inherited Searcher.search(Query,int) or Searcher.search(Query,Filter,int) methods.

Constructor Summary
ParallelMultiSearcher(ExecutorService executor, Searchable... searchables)
Deprecated. Creates a Searchable which searches searchables with the specified ExecutorService.
ParallelMultiSearcher(Searchable... searchables)
Deprecated. Creates a Searchable which searches searchables with the default executor service (a cached thread pool).
Method Summary
void | close() Deprecated. Frees resources associated with this Searcher.
int | docFreq(Term term) Deprecated. Executes each Searchable's docFreq() in its own thread and waits for each search to complete and merge the results back together.
void | search(Weight weight, Filter filter, Collector collector) Deprecated. Lower-level search API.
TopDocs | search(Weight weight, Filter filter, int nDocs) Deprecated. A search implementation which executes each Searchable in its own thread and waits for each search to complete and merge the results back together.
TopFieldDocs | search(Weight weight, Filter filter, int nDocs, Sort sort) Deprecated. A search implementation allowing sorting which spans a new thread for each Searchable, waits for each search to complete and merges the results back together.
Methods inherited from class org.apache.lucene.search.MultiSearcher
createNormalizedWeight, doc, doc, explain, getSearchables, getStarts, maxDoc, rewrite, subDoc, subSearcher
Methods inherited from class org.apache.lucene.search.Searcher
createWeight, docFreqs, explain, getSimilarity, search, search, search, search, search, search, setSimilarity
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ParallelMultiSearcher

public ParallelMultiSearcher(Searchable... searchables)
                      throws IOException
Deprecated.
Creates a Searchable which searches searchables with the default executor service (a cached thread pool).

Throws:
IOException

ParallelMultiSearcher

public ParallelMultiSearcher(ExecutorService executor,
                             Searchable... searchables)
                      throws IOException
Deprecated.
Creates a Searchable which searches searchables with the specified ExecutorService.

Throws:
IOException
Method Detail

docFreq

public int docFreq(Term term)
            throws IOException
Deprecated.
Executes each Searchable's docFreq() in its own thread and waits for each search to complete and merge the results back together.

Specified by:
docFreq in interface Searchable
Overrides:
docFreq in class MultiSearcher
Throws:
IOException
See Also:
IndexReader.docFreq(Term)

search

public TopDocs search(Weight weight,
                      Filter filter,
                      int nDocs)
               throws IOException
Deprecated.
A search implementation which executes each Searchable in its own thread and waits for each search to complete and merge the results back together.

Specified by:
search in interface Searchable
Overrides:
search in class MultiSearcher
Throws:
IOException

search

public TopFieldDocs search(Weight weight,
                           Filter filter,
                           int nDocs,
                           Sort sort)
                    throws IOException
Deprecated.
A search implementation allowing sorting which spans a new thread for each Searchable, waits for each search to complete and merges the results back together.

Specified by:
search in interface Searchable
Overrides:
search in class MultiSearcher
Throws:
IOException

search

public void search(Weight weight,
                   Filter filter,
                   Collector collector)
            throws IOException
Deprecated.
Lower-level search API.

Collector.collect(int) is called for every matching document.

Applications should only use this if they need all of the matching documents. The high-level search API (Searcher.search(Query,int)) is usually more efficient, as it skips non-high-scoring hits.

This method cannot be parallelized, because Collector supports no concurrent access.

Specified by:
search in interface Searchable
Overrides:
search in class MultiSearcher
Parameters:
weight - to match documents
filter - if non-null, a bitset used to eliminate some documents
collector - to receive hits
Throws:
IOException

close

public void close()
           throws IOException
Deprecated.
Description copied from interface: Searchable
Frees resources associated with this Searcher. Be careful not to call this method while you are still using objects that reference this Searchable.

Specified by:
close in interface Closeable
Specified by:
close in interface Searchable
Overrides:
close in class MultiSearcher
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PhraseQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class PhraseQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.PhraseQuery
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
NGramPhraseQuery
public class PhraseQuery
extends Query

A Query that matches documents containing a particular sequence of terms. A PhraseQuery is built by QueryParser for input like "new york".

This query may be combined with other terms or queries with a BooleanQuery.

See Also:
Serialized Form

Constructor Summary
PhraseQuery()
Constructs an empty phrase query.
Method Summary
void | add(Term term) Adds a term to the end of the query phrase.
void | add(Term term, int position) Adds a term to the end of the query phrase.
Weight | createWeight(Searcher searcher) Expert: Constructs an appropriate Weight implementation for this query.
boolean | equals(Object o) Returns true iff o is equal to this.
void | extractTerms(Set<Term> queryTerms) Expert: adds all terms occurring in this query to the terms set.
int[] | getPositions() Returns the relative positions of terms in this phrase.
int | getSlop() Returns the slop.
Term[] | getTerms() Returns the set of terms in this phrase.
int | hashCode() Returns a hash code value for this object.
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
void | setSlop(int s) Sets the number of other words permitted between words in query phrase.
String | toString(String f) Prints a user-readable version of this query.
Methods inherited from class org.apache.lucene.search.Query
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PhraseQuery

public PhraseQuery()
Constructs an empty phrase query.

Method Detail

setSlop

public void setSlop(int s)
Sets the number of other words permitted between words in query phrase. If zero, then this is an exact phrase search. For larger values this works like a WITHIN or NEAR operator.

The slop is in fact an edit-distance, where the units correspond to moves of terms in the query phrase out of position. For example, to switch the order of two words requires two moves (the first move places the words atop one another), so to permit re-orderings of phrases, the slop must be at least two.

More exact matches are scored higher than sloppier matches, thus search results are sorted by exactness.

The slop is zero by default, requiring exact matches.

getSlop

public int getSlop()
Returns the slop. See setSlop().

add

public void add(Term term)
Adds a term to the end of the query phrase. The relative position of the term is the one immediately after the last term added.

add

public void add(Term term,
                int position)
Adds a term to the end of the query phrase. The relative position of the term within the phrase is specified explicitly. This allows e.g. phrases with more than one term at the same position or phrases with gaps (e.g. in connection with stopwords).

Parameters:
term -
position -

getTerms

public Term[] getTerms()
Returns the set of terms in this phrase.

getPositions

public int[] getPositions()
Returns the relative positions of terms in this phrase.

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException

createWeight

public Weight createWeight(Searcher searcher)
                    throws IOException
Description copied from class: Query
Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Overrides:
createWeight in class Query
Throws:
IOException

extractTerms

public void extractTerms(Set<Term> queryTerms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query
See Also:
Query.extractTerms(Set)

toString

public String toString(String f)
Prints a user-readable version of this query.

Specified by:
toString in class Query

equals

public boolean equals(Object o)
Returns true iff o is equal to this.

Overrides:
equals in class Query

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PositiveScoresOnlyCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class PositiveScoresOnlyCollector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.PositiveScoresOnlyCollector

public class PositiveScoresOnlyCollector
extends Collector

A Collector implementation which wraps another Collector and makes sure only documents with scores > 0 are collected.

Constructor Summary
PositiveScoresOnlyCollector(Collector c)
Method Summary
 boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
 void collect(int doc)
Called once for every document matching a query, with the unbased document number.
 void setNextReader(IndexReader reader, int docBase)
Called before collecting from each IndexReader.
 void setScorer(Scorer scorer)
Called before successive calls to Collector.collect(int).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PositiveScoresOnlyCollector

public PositiveScoresOnlyCollector(Collector c)
Method Detail

collect

public void collect(int doc)
             throws IOException
Description copied from class: Collector
Called once for every document matching a query, with the unbased document number.

Note: This is called in an inner search loop. For good search performance, implementations of this method should not call Searcher.doc(int) or IndexReader.document(int) on every hit. Doing so can slow searches by an order of magnitude or more.

Specified by:
collect in class Collector
Throws:
IOException

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Specified by:
setNextReader in class Collector
Parameters:
reader - next IndexReader
Throws:
IOException

setScorer

public void setScorer(Scorer scorer)
               throws IOException
Description copied from class: Collector
Called before successive calls to Collector.collect(int). Implementations that need the score of the current document (passed-in to Collector.collect(int)), should save the passed-in Scorer and call scorer.score() when needed.

Specified by:
setScorer in class Collector
Throws:
IOException

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Description copied from class: Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Specified by:
acceptsDocsOutOfOrder in class Collector
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrefixFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class PrefixFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.MultiTermQueryWrapperFilter<PrefixQuery>
            extended by  org.apache.lucene.search.PrefixFilter
All Implemented Interfaces:
Serializable
public class PrefixFilter
extends MultiTermQueryWrapperFilter<PrefixQuery>

A Filter that restricts search results to values that have a matching prefix in a given field.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.search.MultiTermQueryWrapperFilter
query
Constructor Summary
PrefixFilter(Term prefix)
Method Summary
Term | getPrefix()
String | toString() Prints a user-readable version of this query.
Methods inherited from class org.apache.lucene.search.MultiTermQueryWrapperFilter
clearTotalNumberOfTerms, equals, getDocIdSet, getTotalNumberOfTerms, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PrefixFilter

public PrefixFilter(Term prefix)
Method Detail

getPrefix

public Term getPrefix()

toString

public String toString()
Prints a user-readable version of this query.

Overrides:
toString in class MultiTermQueryWrapperFilter<PrefixQuery>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrefixQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class PrefixQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.MultiTermQuery
            extended by  org.apache.lucene.search.PrefixQuery
All Implemented Interfaces:
Serializable, Cloneable
public class PrefixQuery
extends MultiTermQuery

A Query that matches documents containing terms with a specified prefix. A PrefixQuery is built by QueryParser for input like app*.

This query uses the MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT rewrite method.

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.MultiTermQuery
MultiTermQuery.ConstantScoreAutoRewrite, MultiTermQuery.RewriteMethod, MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite, MultiTermQuery.TopTermsScoringBooleanQueryRewrite
Field Summary
Fields inherited from class org.apache.lucene.search.MultiTermQuery
CONSTANT_SCORE_AUTO_REWRITE_DEFAULT, CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE, CONSTANT_SCORE_FILTER_REWRITE, rewriteMethod, SCORING_BOOLEAN_QUERY_REWRITE
Constructor Summary
PrefixQuery(Term prefix)
Constructs a query for terms starting with prefix.
Method Summary
boolean | equals(Object obj)
protected FilteredTermEnum | getEnum(IndexReader reader) Construct the enumeration to be used, expanding the pattern term.
Term | getPrefix() Returns the prefix of this query.
int | hashCode()
String | toString(String field) Prints a user-readable version of this query.
Methods inherited from class org.apache.lucene.search.MultiTermQuery
clearTotalNumberOfTerms, getRewriteMethod, getTotalNumberOfTerms, incTotalNumberOfTerms, rewrite, setRewriteMethod
Methods inherited from class org.apache.lucene.search.Query
clone, combine, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

PrefixQuery

public PrefixQuery(Term prefix)
Constructs a query for terms starting with prefix.

Method Detail

getPrefix

public Term getPrefix()
Returns the prefix of this query.

getEnum

protected FilteredTermEnum getEnum(IndexReader reader)
                            throws IOException
Description copied from class: MultiTermQuery
Construct the enumeration to be used, expanding the pattern term.

Specified by:
getEnum in class MultiTermQuery
Throws:
IOException

toString

public String toString(String field)
Prints a user-readable version of this query.

Specified by:
toString in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class MultiTermQuery

equals

public boolean equals(Object obj)
Overrides:
equals in class MultiTermQuery
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PrefixTermEnum

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class PrefixTermEnum

java.lang.Object
    extended by  org.apache.lucene.index.TermEnum
        extended by  org.apache.lucene.search.FilteredTermEnum
            extended by  org.apache.lucene.search.PrefixTermEnum
All Implemented Interfaces:
Closeable
public class PrefixTermEnum
extends FilteredTermEnum

Subclass of FilteredTermEnum for enumerating all terms that match the specified prefix filter term.

Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.

Field Summary
Fields inherited from class org.apache.lucene.search.FilteredTermEnum
actualEnum, currentTerm
Constructor Summary
PrefixTermEnum(IndexReader reader, Term prefix)
Method Summary
float | difference() Equality measure on the term
protected boolean | endEnum() Indicates the end of the enumeration has been reached
protected Term | getPrefixTerm()
protected boolean | termCompare(Term term) Equality compare on the term
Methods inherited from class org.apache.lucene.search.FilteredTermEnum
close, docFreq, next, setEnum, term
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PrefixTermEnum

public PrefixTermEnum(IndexReader reader,
                      Term prefix)
               throws IOException
Throws:
IOException
Method Detail

difference

public float difference()
Description copied from class: FilteredTermEnum
Equality measure on the term

Specified by:
difference in class FilteredTermEnum

endEnum

protected boolean endEnum()
Description copied from class: FilteredTermEnum
Indicates the end of the enumeration has been reached

Specified by:
endEnum in class FilteredTermEnum

getPrefixTerm

protected Term getPrefixTerm()

termCompare

protected boolean termCompare(Term term)
Description copied from class: FilteredTermEnum
Equality compare on the term

Specified by:
termCompare in class FilteredTermEnum
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Query

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class Query

java.lang.Object
    extended by  org.apache.lucene.search.Query
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
BooleanQuery, BoostingQuery, ConstantScoreQuery, CustomScoreQuery, DisjunctionMaxQuery, FilteredQuery, FuzzyLikeThisQuery, MatchAllDocsQuery, MoreLikeThisQuery, MultiPhraseQuery, MultiTermQuery, PhraseQuery, SpanQuery, TermQuery, ToChildBlockJoinQuery, ToParentBlockJoinQuery, ValueSourceQuery
public abstract class Query
extends Object
implements Serializable, Cloneable

The abstract base class for queries.

Instantiable subclasses are:

  • TermQuery
  • MultiTermQuery
  • BooleanQuery
  • WildcardQuery
  • PhraseQuery
  • PrefixQuery
  • MultiPhraseQuery
  • FuzzyQuery
  • TermRangeQuery
  • NumericRangeQuery
  • SpanQuery

A parser for queries is contained in:

  • QueryParser

See Also:
Serialized Form

Constructor Summary
Query()
Method Summary
Object | clone() Returns a clone of this query.
Query | combine(Query[] queries) Expert: called when re-writing queries under MultiSearcher.
Weight | createWeight(Searcher searcher) Expert: Constructs an appropriate Weight implementation for this query.
boolean | equals(Object obj)
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
float | getBoost() Gets the boost for this clause.
Similarity | getSimilarity(Searcher searcher) Deprecated. Instead of using "runtime" subclassing/delegation, subclass the Weight instead.
int | hashCode()
static Query | mergeBooleanQueries(BooleanQuery... queries) Expert: merges the clauses of a set of BooleanQuery's into a single BooleanQuery.
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
void | setBoost(float b) Sets the boost for this query clause to b.
String | toString() Prints a query to a string.
abstract String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Weight | weight(Searcher searcher) Deprecated. never ever use this method in Weight implementations. Subclasses of Query should use createWeight(org.apache.lucene.search.Searcher), instead.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Query

public Query()
Method Detail

setBoost

public void setBoost(float b)
Sets the boost for this query clause to b. Documents matching this clause will (in addition to the normal weightings) have their score multiplied by b.

getBoost

public float getBoost()
Gets the boost for this clause. Documents matching this clause will (in addition to the normal weightings) have their score multiplied by b. The boost is 1.0 by default.

toString

public abstract String toString(String field)
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

toString

public String toString()
Prints a query to a string.

Overrides:
toString in class Object

createWeight

public Weight createWeight(Searcher searcher)
                    throws IOException
Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Throws:
IOException

weight

@Deprecated
public final Weight weight(Searcher searcher)
                    throws IOException
Deprecated. never ever use this method in Weight implementations. Subclasses of Query should use createWeight(org.apache.lucene.search.Searcher), instead.

Expert: Constructs and initializes a Weight for a top-level query.

Throws:
IOException

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Throws:
IOException

combine

public Query combine(Query[] queries)
Expert: called when re-writing queries under MultiSearcher. Create a single query suitable for use by all subsearchers (in 1-1 correspondence with queries). This is an optimization of the OR of all queries. We handle the common optimization cases of equal queries and overlapping clauses of boolean OR queries (as generated by MultiTermQuery.rewrite()). Be careful overriding this method as queries[0] determines which method will be called and is not necessarily of the same type as the other queries.

extractTerms

public void extractTerms(Set<Term> terms)
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Throws:
UnsupportedOperationException - if this query is not yet rewritten

mergeBooleanQueries

public static Query mergeBooleanQueries(BooleanQuery... queries)
Expert: merges the clauses of a set of BooleanQuery's into a single BooleanQuery.

A utility for use by combine(Query[]) implementations.

getSimilarity

@Deprecated
public Similarity getSimilarity(Searcher searcher)
Deprecated. Instead of using "runtime" subclassing/delegation, subclass the Weight instead.

Expert: Returns the Similarity implementation to be used for this query. Subclasses may override this method to specify their own Similarity implementation, perhaps one that delegates through that of the Searcher. By default the Searcher's Similarity implementation is returned.

clone

public Object clone()
Returns a clone of this query.

Overrides:
clone in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryTermVector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class QueryTermVector

java.lang.Object
    extended by  org.apache.lucene.search.QueryTermVector
All Implemented Interfaces:
TermFreqVector
public class QueryTermVector
extends Object
implements TermFreqVector

Constructor Summary
QueryTermVector(String[] queryTerms)
QueryTermVector(String queryString, Analyzer analyzer)
Method Summary
String | getField() The Fieldable name.
int[] | getTermFrequencies() Array of term frequencies.
String[] | getTerms()
int[] | indexesOf(String[] terms, int start, int len) Just like indexOf(int) but searches for a number of terms at the same time.
int | indexOf(String term) Return an index in the term numbers array returned from getTerms at which the term with the specified term appears.
int | size()
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

QueryTermVector

public QueryTermVector(String[] queryTerms)
Parameters:
queryTerms - The original list of terms from the query, can contain duplicates

QueryTermVector

public QueryTermVector(String queryString,
                       Analyzer analyzer)
Method Detail

getField

public String getField()
Description copied from interface: TermFreqVector
The Fieldable name.

Specified by:
getField in interface TermFreqVector
Returns:
The name of the field this vector is associated with.

toString

public final String toString()
Overrides:
toString in class Object

size

public int size()
Specified by:
size in interface TermFreqVector
Returns:
The number of terms in the term vector.

getTerms

public String[] getTerms()
Specified by:
getTerms in interface TermFreqVector
Returns:
An Array of term texts in ascending order.

getTermFrequencies

public int[] getTermFrequencies()
Description copied from interface: TermFreqVector
Array of term frequencies. Locations of the array correspond one to one to the terms in the array obtained from getTerms method. Each location in the array contains the number of times this term occurs in the document or the document field.

Specified by:
getTermFrequencies in interface TermFreqVector

indexOf

public int indexOf(String term)
Description copied from interface: TermFreqVector
Return an index in the term numbers array returned from getTerms at which the term with the specified term appears. If this term does not appear in the array, return -1.

Specified by:
indexOf in interface TermFreqVector

indexesOf

public int[] indexesOf(String[] terms,
                       int start,
                       int len)
Description copied from interface: TermFreqVector
Just like indexOf(int) but searches for a number of terms at the same time. Returns an array that has the same size as the number of terms searched for, each slot containing the result of searching for that term number.

Specified by:
indexesOf in interface TermFreqVector
Parameters:
terms - array containing terms to look for
start - index in the array where the list of terms starts
len - the number of terms in the list
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryUtils

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class QueryUtils

java.lang.Object
    extended by  org.apache.lucene.search.QueryUtils

public class QueryUtils
extends Object

Utility class for sanity-checking queries.

Constructor Summary
QueryUtils()
Method Summary
static void check(Query q)
Check the types of things query objects should be able to do.
static void check(Random random, Query q1, Searcher s)
Various query sanity checks on a searcher, some checks are only done for instanceof IndexSearcher.
static void check(Random random, Query q1, Searcher s, boolean wrap)
static void checkEqual(Query q1, Query q2)
static void checkExplanations(Query q, Searcher s)
deep check that explanations of a query 'score' correctly
static void checkHashEquals(Query q)
check very basic hashCode and equals
static void checkSkipTo(Query q, IndexSearcher s)
alternate scorer skipTo(),skipTo(),next(),next(),skipTo(),skipTo(), etc and ensure a hitcollector receives same docs and scores
static void checkUnequal(Query q1, Query q2)
static MultiSearcher wrapSearcher(Random random, Searcher s, int edge)
Given a Searcher, returns a new MultiSearcher wrapping the the original Searcher, as well as several "empty" IndexSearchers -- some of which will have deleted documents in them.
static IndexSearcher wrapUnderlyingReader(Random random, IndexSearcher s, int edge)
Given an IndexSearcher, returns a new IndexSearcher whose IndexReader is a MultiReader containing the Reader of the original IndexSearcher, as well as several "empty" IndexReaders -- some of which will have deleted documents in them.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

QueryUtils

public QueryUtils()
Method Detail

check

public static void check(Query q)
Check the types of things query objects should be able to do.

checkHashEquals

public static void checkHashEquals(Query q)
check very basic hashCode and equals

checkEqual

public static void checkEqual(Query q1,
                              Query q2)

checkUnequal

public static void checkUnequal(Query q1,
                                Query q2)

checkExplanations

public static void checkExplanations(Query q,
                                     Searcher s)
                              throws IOException
deep check that explanations of a query 'score' correctly

Throws:
IOException

check

public static void check(Random random,
                         Query q1,
                         Searcher s)
Various query sanity checks on a searcher, some checks are only done for instanceof IndexSearcher.

See Also:
check(Query),
checkFirstSkipTo(org.apache.lucene.search.Query, org.apache.lucene.search.IndexSearcher),
checkSkipTo(org.apache.lucene.search.Query, org.apache.lucene.search.IndexSearcher),
checkExplanations(org.apache.lucene.search.Query, org.apache.lucene.search.Searcher),
checkSerialization(org.apache.lucene.search.Query, org.apache.lucene.search.Searcher),
checkEqual(org.apache.lucene.search.Query, org.apache.lucene.search.Query)

check

public static void check(Random random,
                         Query q1,
                         Searcher s,
                         boolean wrap)

wrapUnderlyingReader

public static IndexSearcher wrapUnderlyingReader(Random random,
                                                 IndexSearcher s,
                                                 int edge)
                                          throws IOException
Given an IndexSearcher, returns a new IndexSearcher whose IndexReader is a MultiReader containing the Reader of the original IndexSearcher, as well as several "empty" IndexReaders -- some of which will have deleted documents in them. This new IndexSearcher should behave exactly the same as the original IndexSearcher.

Parameters:
s - the searcher to wrap
edge - if negative, s will be the first sub; if 0, s will be in the middle, if positive s will be the last sub
Throws:
IOException

wrapSearcher

public static MultiSearcher wrapSearcher(Random random,
                                         Searcher s,
                                         int edge)
                                  throws IOException
Given a Searcher, returns a new MultiSearcher wrapping the the original Searcher, as well as several "empty" IndexSearchers -- some of which will have deleted documents in them. This new MultiSearcher should behave exactly the same as the original Searcher.

Parameters:
s - the Searcher to wrap
edge - if negative, s will be the first sub; if 0, s will be in hte middle, if positive s will be the last sub
Throws:
IOException

checkSkipTo

public static void checkSkipTo(Query q,
                               IndexSearcher s)
                        throws IOException
alternate scorer skipTo(),skipTo(),next(),next(),skipTo(),skipTo(), etc and ensure a hitcollector receives same docs and scores

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryWrapperFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class QueryWrapperFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.QueryWrapperFilter
All Implemented Interfaces:
Serializable
public class QueryWrapperFilter
extends Filter

Constrains search results to only match those which also match a provided query.

This could be used, for example, with a TermRangeQuery on a suitably formatted date field to implement date filtering. One could re-use a single QueryFilter that matches, e.g., only documents modified within the last week. The QueryFilter and TermRangeQuery would only need to be reconstructed once per day.

See Also:
Serialized Form

Constructor Summary
QueryWrapperFilter(Query query)
Constructs a filter which only matches documents matching query.
Method Summary
boolean | equals(Object o)
DocIdSet | getDocIdSet(IndexReader reader) Creates a DocIdSet enumerating the documents that should be permitted in search results.
int | hashCode()
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

QueryWrapperFilter

public QueryWrapperFilter(Query query)
Constructs a filter which only matches documents matching query.

Method Detail

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Description copied from class: Filter
Creates a DocIdSet enumerating the documents that should be permitted in search results. NOTE: null can be returned if no documents are accepted by this Filter.

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReferenceManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class ReferenceManager<G>

java.lang.Object
    extended by  org.apache.lucene.search.ReferenceManager<G>
Type Parameters:
G - the concrete type that will be acquired and released.
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
NRTManager, SearcherManager
public abstract class ReferenceManager<G>
extends Object
implements Closeable

Utility class to safely share instances of a certain type across multiple threads, while periodically refreshing them. This class ensures each reference is closed only once all threads have finished using it. It is recommended to consult the documentation of ReferenceManager implementations for their maybeRefresh() semantics.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected  G current
Constructor Summary
ReferenceManager()
Method Summary
 G acquire()
Obtain the current reference.
protected  void afterClose()
Called after close(), so subclass can free any resources.
protected  void afterRefresh()
Called after swapReference has installed a new instance.
 void close()
Close this ReferenceManager to future acquiring.
protected abstract  void decRef(G reference)
Decrement reference counting on the given reference.
 boolean maybeRefresh()
You must call this, periodically, if you want that acquire() will return refreshed instances.
protected abstract  G refreshIfNeeded(G referenceToRefresh)
Refresh the given reference if needed.
 void release(G reference)
Release the refernce previously obtained via acquire().
protected abstract  boolean tryIncRef(G reference)
Try to increment reference counting on the given reference.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

current

protected volatile G current
Constructor Detail

ReferenceManager

public ReferenceManager()
Method Detail

decRef

protected abstract void decRef(G reference)
                        throws IOException
Decrement reference counting on the given reference.

Throws:
IOException

refreshIfNeeded

protected abstract G refreshIfNeeded(G referenceToRefresh)
                              throws IOException
Refresh the given reference if needed. Returns null if no refresh was needed, otherwise a new refreshed reference.

Throws:
IOException

tryIncRef

protected abstract boolean tryIncRef(G reference)
Try to increment reference counting on the given reference. Return true if the operation was successful.

acquire

public final G acquire()
Obtain the current reference. You must match every call to acquire with one call to release(G); it's best to do so in a finally clause, and set the reference to null to prevent accidental usage after it has been released.

close

public final void close()
                 throws IOException
Close this ReferenceManager to future acquiring. Any references that were previously acquired won't be affected, and they should still be released when they are not needed anymore.

Specified by:
close in interface Closeable
Throws:
IOException

afterClose

protected void afterClose()
                   throws IOException
Called after close(), so subclass can free any resources.

Throws:
IOException

maybeRefresh

public final boolean maybeRefresh()
                           throws IOException
You must call this, periodically, if you want that acquire() will return refreshed instances.

Threads: it's fine for more than one thread to call this at once. Only the first thread will attempt the refresh; subsequent threads will see that another thread is already handling refresh and will return immediately. Note that this means if another thread is already refreshing then subsequent threads will return right away without waiting for the refresh to complete.

If this method returns true it means the calling thread either refreshed or that there were no changes to refresh. If it returns false it means another thread is currently refreshing.

Throws:
IOException

afterRefresh

protected void afterRefresh()
                     throws IOException
Called after swapReference has installed a new instance.

Throws:
IOException

release

public final void release(G reference)
                   throws IOException
Release the refernce previously obtained via acquire().

NOTE: it's safe to call this after close().

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RemoteCachingWrapperFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class RemoteCachingWrapperFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.RemoteCachingWrapperFilter
All Implemented Interfaces:
Serializable
Deprecated. This package (all of contrib/remote) will be removed in 4.0.

@Deprecated
public class RemoteCachingWrapperFilter
extends Filter

Provides caching of Filters themselves on the remote end of an RMI connection. The cache is keyed on Filter's hashCode(), so if it sees the same filter twice it will reuse the original version.

NOTE: This does NOT cache the Filter bits, but rather the Filter itself. Thus, this works hand-in-hand with CachingWrapperFilter to keep both file Filter cache and the Filter bits on the remote end, close to the searcher.

Usage:

To cache a result you must do something like RemoteCachingWrapperFilter f = new RemoteCachingWrapperFilter(new CachingWrapperFilter(myFilter));

See Also:
Serialized Form

Field Summary
protected  Filter filter
Deprecated.
Constructor Summary
RemoteCachingWrapperFilter(Filter filter)
Deprecated.
Method Summary
 DocIdSet getDocIdSet(IndexReader reader)
Deprecated. Uses the FilterManager to keep the cache for a filter on the searcher side of a remote connection.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

filter

protected Filter filter
Deprecated.
Constructor Detail

RemoteCachingWrapperFilter

public RemoteCachingWrapperFilter(Filter filter)
Deprecated.
Method Detail

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Deprecated.
Uses the FilterManager to keep the cache for a filter on the searcher side of a remote connection.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - the index reader for the Filter
Returns:
the DocIdSet
Throws:
IOException
See Also:
DocIdBitSet
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RemoteSearchable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class RemoteSearchable

java.lang.Object
    extended by  java.rmi.server.RemoteObject
        extended by  java.rmi.server.RemoteServer
            extended by  java.rmi.server.UnicastRemoteObject
                extended by  org.apache.lucene.search.RemoteSearchable
All Implemented Interfaces:
Closeable, Serializable, Remote, RMIRemoteSearchable, Searchable
Deprecated. This package (all of contrib/remote) will be removed in 4.0.

@Deprecated
public class RemoteSearchable
extends UnicastRemoteObject
implements RMIRemoteSearchable

A remote searchable implementation.

See Also:
Serialized Form

Field Summary
Fields inherited from class java.rmi.server.RemoteObject
ref
Constructor Summary
RemoteSearchable(Searchable local)
Deprecated. Constructs and exports a remote searcher.
Method Summary
void | close() Deprecated. Frees resources associated with this Searcher.
Document | doc(int i) Deprecated. Returns the stored fields of document i.
Document | doc(int i, FieldSelector fieldSelector) Deprecated. Get the Document at the nth position.
int | docFreq(Term term) Deprecated. Expert: Returns the number of documents containing term.
int[] | docFreqs(Term[] terms) Deprecated. Expert: For each term in the terms array, calculates the number of documents containing term.
Explanation | explain(Weight weight, int doc) Deprecated. Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.
static void | main(String[] args) Deprecated. Exports a searcher for the index in args[0] named "//localhost/Searchable".
int | maxDoc() Deprecated. Expert: Returns one greater than the largest possible document number.
Query | rewrite(Query original) Deprecated. Expert: called to re-write queries into primitive queries.
void | search(Weight weight, Filter filter, Collector results) Deprecated. Lower-level search API.
TopDocs | search(Weight weight, Filter filter, int n) Deprecated. Expert: Low-level search implementation.
TopFieldDocs | search(Weight weight, Filter filter, int n, Sort sort) Deprecated. Expert: Low-level search implementation with arbitrary sorting.
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

RemoteSearchable

public RemoteSearchable(Searchable local)
                 throws RemoteException
Deprecated.
Constructs and exports a remote searcher.

Throws:
RemoteException
Method Detail

search

public void search(Weight weight,
                   Filter filter,
                   Collector results)
            throws IOException
Deprecated.
Description copied from interface: Searchable
Lower-level search API.

Collector.collect(int) is called for every document.
Collector-based access to remote indexes is discouraged.

Applications should only use this if they need all of the matching documents. The high-level search API (Searcher.search(Query,int)) is usually more efficient, as it skips non-high-scoring hits.

Specified by:
search in interface Searchable
Parameters:
weight - to match documents
filter - if non-null, used to permit documents to be collected.
results - to receive hits
Throws:
IOException

close

public void close()
           throws IOException
Deprecated.
Description copied from interface: Searchable
Frees resources associated with this Searcher. Be careful not to call this method while you are still using objects that reference this Searchable.

Specified by:
close in interface Closeable
Specified by:
close in interface Searchable
Throws:
IOException

docFreq

public int docFreq(Term term)
            throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: Returns the number of documents containing term.

Specified by:
docFreq in interface Searchable
Throws:
IOException
See Also:
IndexReader.docFreq(Term)

docFreqs

public int[] docFreqs(Term[] terms)
               throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: For each term in the terms array, calculates the number of documents containing term. Returns an array with these document frequencies. Used to minimize number of remote calls.

Specified by:
docFreqs in interface Searchable
Throws:
IOException

maxDoc

public int maxDoc()
           throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: Returns one greater than the largest possible document number.

Specified by:
maxDoc in interface Searchable
Throws:
IOException
See Also:
IndexReader.maxDoc()

search

public TopDocs search(Weight weight,
                      Filter filter,
                      int n)
               throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: Low-level search implementation. Finds the top n hits for query, applying filter if non-null.

Applications should usually call Searcher.search(Query,int) or Searcher.search(Query,Filter,int) instead.

Specified by:
search in interface Searchable
Throws:
IOException

search

public TopFieldDocs search(Weight weight,
                           Filter filter,
                           int n,
                           Sort sort)
                    throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: Low-level search implementation with arbitrary sorting. Finds the top n hits for query, applying filter if non-null, and sorting the hits by the criteria in sort.

Applications should usually call Searcher.search(Query,Filter,int,Sort) instead.

Specified by:
search in interface Searchable
Throws:
IOException

doc

public Document doc(int i)
             throws CorruptIndexException,
                    IOException
Deprecated.
Description copied from interface: Searchable
Returns the stored fields of document i.

Specified by:
doc in interface Searchable
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
IndexReader.document(int)

doc

public Document doc(int i,
                    FieldSelector fieldSelector)
             throws CorruptIndexException,
                    IOException
Deprecated.
Description copied from interface: Searchable
Get the Document at the nth position. The FieldSelector may be used to determine what Fields to load and how they should be loaded. NOTE: If the underlying Reader (more specifically, the underlying FieldsReader) is closed before the lazy Field is loaded an exception may be thrown. If you want the value of a lazy Field to be available after closing you must explicitly load it or fetch the Document again with a new loader.

Specified by:
doc in interface Searchable
Parameters:
i - Get the document at the nth position
fieldSelector - The FieldSelector to use to determine what Fields should be loaded on the Document. May be null, in which case all Fields will be loaded.
Returns:
The stored fields of the Document at the nth position
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
IndexReader.document(int, FieldSelector), Fieldable, FieldSelector, SetBasedFieldSelector, LoadFirstFieldSelector

rewrite

public Query rewrite(Query original)
              throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: called to re-write queries into primitive queries.

Specified by:
rewrite in interface Searchable
Throws:
IOException

explain

public Explanation explain(Weight weight,
                           int doc)
                    throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.

This is intended to be used in developing Similarity implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index.

Applications should call Searcher.explain(Query, int).

Specified by:
explain in interface Searchable
Throws:
IOException

main

public static void main(String[] args)
                 throws Exception
Deprecated.
Exports a searcher for the index in args[0] named "//localhost/Searchable".

Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RMIRemoteSearchable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Interface RMIRemoteSearchable

All Superinterfaces:
Closeable, Remote, Searchable
All Known Implementing Classes:
RemoteSearchable
Deprecated. This package (all of contrib/remote) will be removed in 4.0.

@Deprecated
public interface RMIRemoteSearchable
extends Searchable, Remote

Marker interface to enable subclasses of Searchable to be used via Java RMI. Classes implementing this interface can be used as a RMI - "remote object".

RMIRemoteSearchable extends Searchable and can transparently be used as a such.

Example usage:

   RMIRemoteSearchable remoteObject = ...;
   String remoteObjectName = ...;
   Naming.rebind (remoteObjectName, remoteObject);
   Searchable luceneSearchable = (Searchable) Naming.lookup (remoteObjectName);

Method Summary
Methods inherited from interface org.apache.lucene.search.Searchable
close, doc, doc, docFreq, docFreqs, explain, maxDoc, rewrite, search, search, search

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScoreCachingWrappingScorer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class ScoreCachingWrappingScorer

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSetIterator
        extended by  org.apache.lucene.search.Scorer
            extended by  org.apache.lucene.search.ScoreCachingWrappingScorer

public class ScoreCachingWrappingScorer
extends Scorer

A Scorer which wraps another scorer and caches the score of the current document. Successive calls to score() will return the same result and will not invoke the wrapped Scorer's score() method, unless the current document has changed.
This class might be useful due to the changes done to the Collector interface, in which the score is not computed for a document by default, only if the collector requests it. Some collectors may need to use the score in several places, however all they have in hand is a Scorer object, and might end up computing the score of a document more than once.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.Scorer
Scorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer>
Field Summary
Fields inherited from class org.apache.lucene.search.Scorer
weight
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
Constructor Summary
ScoreCachingWrappingScorer(Scorer scorer)
Creates a new instance by wrapping the given scorer.
Method Summary
 int advance(int target)
Advances to the first beyond (see NOTE below) the current whose document number is greater than or equal to target.
 int docID()
Returns the following: -1 or DocIdSetIterator.NO_MORE_DOCS if DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) were not called yet.
 Similarity getSimilarity()
Returns the Similarity implementation used by this scorer.
 int nextDoc()
Advances to the next document in the set and returns the doc it is currently on, or DocIdSetIterator.NO_MORE_DOCS if there are no more docs in the set.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.
 float score()
Returns the score of the current document matching the query.
 void score(Collector collector)
Scores and collects all matching documents.
protected  boolean score(Collector collector, int max, int firstDocID)
Expert: Collects matching documents in a range.
Methods inherited from class org.apache.lucene.search.Scorer
freq, visitScorers, visitSubScorers
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ScoreCachingWrappingScorer

public ScoreCachingWrappingScorer(Scorer scorer)
Creates a new instance by wrapping the given scorer.

Method Detail

score

protected boolean score(Collector collector,
                        int max,
                        int firstDocID)
                 throws IOException
Description copied from class: Scorer
Expert: Collects matching documents in a range. Hook for optimization. Note, firstDocID is added to ensure that DocIdSetIterator.nextDoc() was called before this method.

NOTE: Because of backwards compatibility, this method is still declared as protected, but it is intended to be public, because it's called from other classes (like BooleanScorer). If you subclass Scorer, you should declare the overridden method as public to ease transition to Lucene 4.0, where it will be public.

Overrides:
score in class Scorer
Parameters:
collector - The collector to which all matching documents are passed.
max - Do not score documents past this.
firstDocID - The first document ID (ensures DocIdSetIterator.nextDoc() is called before this method.
Returns:
true if more matching documents may remain.
Throws:
IOException

getSimilarity

public Similarity getSimilarity()
Description copied from class: Scorer
Returns the Similarity implementation used by this scorer.

Overrides:
getSimilarity in class Scorer

score

public float score()
            throws IOException
Description copied from class: Scorer
Returns the score of the current document matching the query. Initially invalid, until DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) is called the first time, or when called from within Collector.collect(int).

Specified by:
score in class Scorer
Throws:
IOException

docID

public int docID()
Description copied from class: DocIdSetIterator
Returns the following:
  • -1 or DocIdSetIterator.NO_MORE_DOCS if DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) were not called yet.
  • DocIdSetIterator.NO_MORE_DOCS if the iterator has exhausted.
  • Otherwise it should return the doc ID it is currently on.

Specified by:
docID in class DocIdSetIterator

nextDoc

public int nextDoc()
            throws IOException
Description copied from class: DocIdSetIterator
Advances to the next document in the set and returns the doc it is currently on, or DocIdSetIterator.NO_MORE_DOCS if there are no more docs in the set.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.

Specified by:
nextDoc in class DocIdSetIterator
Throws:
IOException

score

public void score(Collector collector)
           throws IOException
Description copied from class: Scorer
Scores and collects all matching documents.

Overrides:
score in class Scorer
Parameters:
collector - The collector to which all matching documents are passed.
Throws:
IOException

advance

public int advance(int target)
            throws IOException
Description copied from class: DocIdSetIterator
Advances to the first beyond (see NOTE below) the current whose document number is greater than or equal to target. Returns the current document number or DocIdSetIterator.NO_MORE_DOCS if there are no more docs in the set.

Behaves as if written:

 int advance(int target) {
   int doc;
   while ((doc = nextDoc()) < target) {
   }
   return doc;
 }
Some implementations are considerably more efficient than that.

NOTE: when target ≤ current implementations may opt not to advance beyond their current DocIdSetIterator.docID().

NOTE: this method may be called with DocIdSetIterator.NO_MORE_DOCS for efficiency by some Scorers. If your implementation cannot efficiently determine that it should exhaust, it is recommended that you check for that value in each call to this method.

NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.

Specified by:
advance in class DocIdSetIterator
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScoreDoc

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class ScoreDoc

java.lang.Object
    extended by  org.apache.lucene.search.ScoreDoc
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FieldDoc, FieldValueHitQueue.Entry
public class ScoreDoc
extends Object
implements Serializable

Holds one hit in TopDocs.

See Also:
Serialized Form

Field Summary
int | doc Expert: A hit document's number.
float | score The score of this document for the query.
int | shardIndex Only set by TopDocs.merge(org.apache.lucene.search.Sort, int, org.apache.lucene.search.TopDocs[])
Constructor Summary
ScoreDoc(int doc, float score)
Constructs a ScoreDoc.
ScoreDoc(int doc, float score, int shardIndex)
Constructs a ScoreDoc.
Method Summary
 String toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

score

public float score
The score of this document for the query.

doc

public int doc
Expert: A hit document's number.

See Also:
Searcher.doc(int)

shardIndex

public int shardIndex
Only set by TopDocs.merge(org.apache.lucene.search.Sort, int, org.apache.lucene.search.TopDocs[])

Constructor Detail

ScoreDoc

public ScoreDoc(int doc,
                float score)
Constructs a ScoreDoc.

ScoreDoc

public ScoreDoc(int doc,
                float score,
                int shardIndex)
Constructs a ScoreDoc.

Method Detail

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Scorer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class Scorer

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSetIterator
        extended by  org.apache.lucene.search.Scorer
Direct Known Subclasses:
ConstantScoreQuery.ConstantScorer, ScoreCachingWrappingScorer, SpanScorer
public abstract class Scorer
extends DocIdSetIterator

Expert: Common scoring functionality for different types of queries.

A Scorer iterates over documents matching a query in increasing order of doc Id.

Document scores are computed using a given Similarity implementation.

NOTE: The values Float.Nan, Float.NEGATIVE_INFINITY and Float.POSITIVE_INFINITY are not valid scores. Certain collectors (eg TopScoreDocCollector) will not properly collect hits with these scores.

Nested Class Summary
static class Scorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer>
A callback to gather information from a scorer and its sub-scorers.
Field Summary
protected  Weight weight
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
Constructor Summary
protected | Scorer(Similarity similarity) Deprecated. Use Scorer(Weight) instead.
protected | Scorer(Similarity similarity, Weight weight) Deprecated. Use Scorer(Weight) instead.
protected | Scorer(Weight weight) Constructs a Scorer
Method Summary
float | freq() Returns number of matches for the current document.
Similarity | getSimilarity() Deprecated. Store any Similarity you might need privately in your implementation instead.
abstract float | score() Returns the score of the current document matching the query.
void | score(Collector collector) Scores and collects all matching documents.
protected boolean | score(Collector collector, int max, int firstDocID) Expert: Collects matching documents in a range.
void | visitScorers(Scorer.ScorerVisitor<Query,Query,Scorer> visitor) Expert: call this to gather details for all sub-scorers for this query.
void | visitSubScorers(Query parent, BooleanClause.Occur relationship, Scorer.ScorerVisitor<Query,Query,Scorer> visitor) Scorer subclasses should implement this method if the subclass itself contains multiple scorers to support gathering details for sub-scorers via Scorer.ScorerVisitor
Methods inherited from class org.apache.lucene.search.DocIdSetIterator
advance, docID, nextDoc
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

weight

protected final Weight weight
Constructor Detail

Scorer

protected Scorer(Weight weight)
Constructs a Scorer

Parameters:
weight - The scorers Weight.

Scorer

@Deprecated
protected Scorer(Similarity similarity)
Deprecated. Use Scorer(Weight) instead.

Constructs a Scorer.

Parameters:
similarity - The Similarity implementation used by this scorer.

Scorer

@Deprecated
protected Scorer(Similarity similarity,
                            Weight weight)
Deprecated. Use Scorer(Weight) instead.

Constructs a Scorer

Parameters:
similarity - The Similarity implementation used by this scorer.
weight - The scorers Weight
Method Detail

getSimilarity

@Deprecated
public Similarity getSimilarity()
Deprecated. Store any Similarity you might need privately in your implementation instead.

Returns the Similarity implementation used by this scorer.

score

public void score(Collector collector)
           throws IOException
Scores and collects all matching documents.

Parameters:
collector - The collector to which all matching documents are passed.
Throws:
IOException

score

protected boolean score(Collector collector,
                        int max,
                        int firstDocID)
                 throws IOException
Expert: Collects matching documents in a range. Hook for optimization. Note, firstDocID is added to ensure that DocIdSetIterator.nextDoc() was called before this method.

NOTE: Because of backwards compatibility, this method is still declared as protected, but it is intended to be public, because it's called from other classes (like BooleanScorer). If you subclass Scorer, you should declare the overridden method as public to ease transition to Lucene 4.0, where it will be public.

Parameters:
collector - The collector to which all matching documents are passed.
max - Do not score documents past this.
firstDocID - The first document ID (ensures DocIdSetIterator.nextDoc() is called before this method.
Returns:
true if more matching documents may remain.
Throws:
IOException

score

public abstract float score()
                     throws IOException
Returns the score of the current document matching the query. Initially invalid, until DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) is called the first time, or when called from within Collector.collect(int).

Throws:
IOException

freq

public float freq()
           throws IOException
Returns number of matches for the current document. This returns a float (not int) because SloppyPhraseScorer discounts its freq according to how "sloppy" the match was.

Throws:
IOException
WARNING: This API is experimental and might change in incompatible ways in the next release.

visitScorers

public void visitScorers(Scorer.ScorerVisitor<Query,Query,Scorer> visitor)
Expert: call this to gather details for all sub-scorers for this query. This can be used, in conjunction with a custom Collector to gather details about how each sub-query matched the current hit.

Parameters:
visitor - a callback executed for each sub-scorer
WARNING: This API is experimental and might change in incompatible ways in the next release.

visitSubScorers

public void visitSubScorers(Query parent,
                            BooleanClause.Occur relationship,
                            Scorer.ScorerVisitor<Query,Query,Scorer> visitor)
Scorer subclasses should implement this method if the subclass itself contains multiple scorers to support gathering details for sub-scorers via Scorer.ScorerVisitor

Note: this method will throw UnsupportedOperationException if no associated Weight instance is provided to Scorer(Weight)

WARNING: This API is experimental and might change in incompatible ways in the next release.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Scorer.ScorerVisitor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class Scorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer>

java.lang.Object
    extended by  org.apache.lucene.search.Scorer.ScorerVisitor<P,C,S>
Enclosing class:
Scorer
public abstract static class Scorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer>
extends Object

A callback to gather information from a scorer and its sub-scorers. Each the top-level scorer as well as each of its sub-scorers are passed to either one of the visit methods depending on their boolean relationship in the query.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
Scorer.ScorerVisitor()
Method Summary
void | visitOptional(P parent, C child, S scorer) Invoked for all optional scorer
void | visitProhibited(P parent, C child, S scorer) Invoked for all prohibited scorer
void | visitRequired(P parent, C child, S scorer) Invoked for all required scorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Scorer.ScorerVisitor

public Scorer.ScorerVisitor()
Method Detail

visitOptional

public void visitOptional(P parent,
                          C child,
                          S scorer)
Invoked for all optional scorer

Parameters:
parent - the parent query of the child query or null if the child is a top-level query
child - the query of the currently visited scorer
scorer - the current scorer

visitRequired

public void visitRequired(P parent,
                          C child,
                          S scorer)
Invoked for all required scorer

Parameters:
parent - the parent query of the child query or null if the child is a top-level query
child - the query of the currently visited scorer
scorer - the current scorer

visitProhibited

public void visitProhibited(P parent,
                            C child,
                            S scorer)
Invoked for all prohibited scorer

Parameters:
parent - the parent query of the child query or null if the child is a top-level query
child - the query of the currently visited scorer
scorer - the current scorer
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScoringRewrite

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class ScoringRewrite<Q extends Query>

java.lang.Object
    extended by  org.apache.lucene.search.MultiTermQuery.RewriteMethod
        extended by  org.apache.lucene.search.ScoringRewrite<Q>
All Implemented Interfaces:
Serializable
public abstract class ScoringRewrite<Q extends Query>
extends MultiTermQuery.RewriteMethod

See Also:
Serialized Form
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
Only public to be accessible by spans package.

Nested Class Summary
protected static interface TermCollectingRewrite.TermCollector
Field Summary
static MultiTermQuery.RewriteMethod | CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE Like SCORING_BOOLEAN_QUERY_REWRITE except scores are not computed.
static ScoringRewrite<BooleanQuery> | SCORING_BOOLEAN_QUERY_REWRITE A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.
Constructor Summary
ScoringRewrite()
Method Summary
protected abstract void | addClause(Q topLevel, Term term, float boost) Add a MultiTermQuery term to the top-level query
protected void | collectTerms(IndexReader reader, MultiTermQuery query, TermCollectingRewrite.TermCollector collector)
protected abstract Q | getTopLevelQuery() Return a suitable top-level Query for holding all expanded terms.
Q | rewrite(IndexReader reader, MultiTermQuery query)
Methods inherited from class org.apache.lucene.search.MultiTermQuery.RewriteMethod
getTermsEnum
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

SCORING_BOOLEAN_QUERY_REWRITE

public static final ScoringRewrite<BooleanQuery> SCORING_BOOLEAN_QUERY_REWRITE
A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query. Note that typically such scores are meaningless to the user, and require non-trivial CPU to compute, so it's almost always better to use MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT instead.

NOTE: This rewrite method will hit BooleanQuery.TooManyClauses if the number of terms exceeds BooleanQuery.getMaxClauseCount().

See Also:
MultiTermQuery.setRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod)

CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE

public static final MultiTermQuery.RewriteMethod CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE
Like SCORING_BOOLEAN_QUERY_REWRITE except scores are not computed. Instead, each matching document receives a constant score equal to the query's boost.

NOTE: This rewrite method will hit BooleanQuery.TooManyClauses if the number of terms exceeds BooleanQuery.getMaxClauseCount().

See Also:
MultiTermQuery.setRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod)
Constructor Detail

ScoringRewrite

public ScoringRewrite()
Method Detail

rewrite

public Q rewrite(IndexReader reader,
                 MultiTermQuery query)
                        throws IOException
Specified by:
rewrite in class MultiTermQuery.RewriteMethod
Throws:
IOException

getTopLevelQuery

protected abstract Q getTopLevelQuery()
                                             throws IOException
Return a suitable top-level Query for holding all expanded terms.

Throws:
IOException

addClause

protected abstract void addClause(Q topLevel,
                                  Term term,
                                  float boost)
                           throws IOException
Add a MultiTermQuery term to the top-level query

Throws:
IOException

collectTerms

protected final void collectTerms(IndexReader reader,
                                  MultiTermQuery query,
                                  TermCollectingRewrite.TermCollector collector)
                           throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Searchable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Interface Searchable

All Superinterfaces:
Closeable
All Known Subinterfaces:
RMIRemoteSearchable
All Known Implementing Classes:
AssertingIndexSearcher, CheckHits.ExplanationAssertingSearcher, IndexSearcher, MultiSearcher, ParallelMultiSearcher, RemoteSearchable, Searcher
Deprecated. In 4.0 this interface is removed/absorbed into IndexSearcher

@Deprecated
public interface Searchable
extends Closeable

The interface for search implementations.

Searchable is the abstract network protocol for searching. Implementations provide search over a single index, over multiple indices, and over indices on remote servers.

Queries, filters and sort criteria are designed to be compact so that they may be efficiently passed to a remote index, with only the top-scoring hits being returned, rather than every matching hit. NOTE: this interface is kept public for convenience. Since it is not expected to be implemented directly, it may be changed unexpectedly between releases.

Method Summary
void | close() Deprecated. Frees resources associated with this Searcher.
Document | doc(int i) Deprecated. Returns the stored fields of document i.
Document | doc(int n, FieldSelector fieldSelector) Deprecated. Get the Document at the nth position.
int | docFreq(Term term) Deprecated. Expert: Returns the number of documents containing term.
int[] | docFreqs(Term[] terms) Deprecated. Expert: For each term in the terms array, calculates the number of documents containing term.
Explanation | explain(Weight weight, int doc) Deprecated. Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.
int | maxDoc() Deprecated. Expert: Returns one greater than the largest possible document number.
Query | rewrite(Query query) Deprecated. Expert: called to re-write queries into primitive queries.
void | search(Weight weight, Filter filter, Collector collector) Deprecated. Lower-level search API.
TopDocs | search(Weight weight, Filter filter, int n) Deprecated. Expert: Low-level search implementation.
TopFieldDocs | search(Weight weight, Filter filter, int n, Sort sort) Deprecated. Expert: Low-level search implementation with arbitrary sorting.

Method Detail

search

void search(Weight weight,
            Filter filter,
            Collector collector)
            throws IOException
Deprecated.
Lower-level search API.

Collector.collect(int) is called for every document.
Collector-based access to remote indexes is discouraged.

Applications should only use this if they need all of the matching documents. The high-level search API (Searcher.search(Query,int)) is usually more efficient, as it skips non-high-scoring hits.

Parameters:
weight - to match documents
filter - if non-null, used to permit documents to be collected.
collector - to receive hits
Throws:
BooleanQuery.TooManyClauses
IOException

close

void close()
           throws IOException
Deprecated.
Frees resources associated with this Searcher. Be careful not to call this method while you are still using objects that reference this Searchable.

Specified by:
close in interface Closeable
Throws:
IOException

docFreq

int docFreq(Term term)
            throws IOException
Deprecated.
Expert: Returns the number of documents containing term.

Throws:
IOException
See Also:
IndexReader.docFreq(Term)

docFreqs

int[] docFreqs(Term[] terms)
               throws IOException
Deprecated.
Expert: For each term in the terms array, calculates the number of documents containing term. Returns an array with these document frequencies. Used to minimize number of remote calls.

Throws:
IOException

maxDoc

int maxDoc()
           throws IOException
Deprecated.
Expert: Returns one greater than the largest possible document number.

Throws:
IOException
See Also:
IndexReader.maxDoc()

search

TopDocs search(Weight weight,
               Filter filter,
               int n)
               throws IOException
Deprecated.
Expert: Low-level search implementation. Finds the top n hits for query, applying filter if non-null.

Applications should usually call Searcher.search(Query,int) or Searcher.search(Query,Filter,int) instead.

Throws:
BooleanQuery.TooManyClauses
IOException

doc

Document doc(int i)
             throws CorruptIndexException,
                    IOException
Deprecated.
Returns the stored fields of document i.

Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
IndexReader.document(int)

doc

Document doc(int n,
             FieldSelector fieldSelector)
             throws CorruptIndexException,
                    IOException
Deprecated.
Get the Document at the nth position. The FieldSelector may be used to determine what Fields to load and how they should be loaded. NOTE: If the underlying Reader (more specifically, the underlying FieldsReader) is closed before the lazy Field is loaded an exception may be thrown. If you want the value of a lazy Field to be available after closing you must explicitly load it or fetch the Document again with a new loader.

Parameters:
n - Get the document at the nth position
fieldSelector - The FieldSelector to use to determine what Fields should be loaded on the Document. May be null, in which case all Fields will be loaded.
Returns:
The stored fields of the Document at the nth position
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
IndexReader.document(int, FieldSelector), Fieldable, FieldSelector, SetBasedFieldSelector, LoadFirstFieldSelector

rewrite

Query rewrite(Query query)
              throws IOException
Deprecated.
Expert: called to re-write queries into primitive queries.

Throws:
BooleanQuery.TooManyClauses
IOException

explain

Explanation explain(Weight weight,
                    int doc)
                    throws IOException
Deprecated.
Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.

This is intended to be used in developing Similarity implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index.

Applications should call Searcher.explain(Query, int).

Throws:
BooleanQuery.TooManyClauses
IOException

search

TopFieldDocs search(Weight weight,
                    Filter filter,
                    int n,
                    Sort sort)
                    throws IOException
Deprecated.
Expert: Low-level search implementation with arbitrary sorting. Finds the top n hits for query, applying filter if non-null, and sorting the hits by the criteria in sort.

Applications should usually call Searcher.search(Query,Filter,int,Sort) instead.

Throws:
BooleanQuery.TooManyClauses
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SearchEquivalenceTestBase

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class SearchEquivalenceTestBase

java.lang.Object
    extended by  org.junit.Assert
        extended by  org.apache.lucene.util.LuceneTestCase
            extended by  org.apache.lucene.search.SearchEquivalenceTestBase

public abstract class SearchEquivalenceTestBase
extends LuceneTestCase

Simple base class for checking search equivalence. Extend it, and write tests that create randomTerm()s (all terms are single characters a-z), and use assertSameSet(Query, Query) and assertSubsetOf(Query, Query)

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.LuceneTestCase
LuceneTestCase.Nightly
Field Summary
protected static Analyzer | analyzer
protected static Directory | directory
protected static IndexReader | reader
protected static IndexSearcher | s1
protected static IndexSearcher | s2
protected static String | stopword
Fields inherited from class org.apache.lucene.util.LuceneTestCase
classRules, random, RANDOM_MULTIPLIER, ruleChain, stores, TEMP_DIR, TEST_CLEAN_THREADS, TEST_DIRECTORY, TEST_ITER, TEST_ITER_MIN, TEST_LINE_DOCS_FILE, TEST_LOCALE, TEST_NIGHTLY, TEST_SEED, TEST_TIMEZONE, TEST_VERSION_CURRENT, testsFailed, VERBOSE
Constructor Summary
SearchEquivalenceTestBase()
Method Summary
static void | afterClass()
void | assertSameSet(Query q1, Query q2) Asserts that the documents returned by q1 are the same as of those returned by q2
void | assertSubsetOf(Query q1, Query q2) Asserts that the documents returned by q1 are a subset of those returned by q2
protected void | assertSubsetOf(Query q1, Query q2, Filter filter) Asserts that the documents returned by q1 are a subset of those returned by q2.
static void | beforeClass()
protected Filter | randomFilter() Returns a random filter over the document set
protected Term | randomTerm() returns a term suitable for searching.
Methods inherited from class org.apache.lucene.util.LuceneTestCase
afterClassLuceneTestCaseJ4, alwaysIgnoredTestMethod, assertEquals, assertEquals, assertEquals, assertEquals, assertSaneFieldCaches, asSet, assumeFalse, assumeNoException, assumeTrue, atLeast, atLeast, beforeClassLuceneTestCaseJ4, dumpArray, dumpIterator, getDataFile, getName, getTestClass, getTestLabel, isTestThread, localeForName, newDirectory, newDirectory, newDirectory, newDirectory, newField, newField, newField, newField, newField, newField, newFSDirectory, newFSDirectory, newIndexWriterConfig, newIndexWriterConfig, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newSearcher, newSearcher, newTieredMergePolicy, newTieredMergePolicy, purgeFieldCache, randomDirectory, randomLocale, randomTimeZone, rarely, rarely, reportAdditionalFailureInfo, reportPartialFailureInfo, setMergeFactor, setUp, setUseCompoundFile, tearDown, usually, usually
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

s1

protected static IndexSearcher s1

s2

protected static IndexSearcher s2

directory

protected static Directory directory

reader

protected static IndexReader reader

analyzer

protected static Analyzer analyzer

stopword

protected static String stopword
Constructor Detail

SearchEquivalenceTestBase

public SearchEquivalenceTestBase()
Method Detail

beforeClass

public static void beforeClass()
                        throws Exception
Throws:
Exception

afterClass

public static void afterClass()
                       throws Exception
Throws:
Exception

randomTerm

protected Term randomTerm()
returns a term suitable for searching. terms are single characters in lowercase (a-z)

randomFilter

protected Filter randomFilter()
Returns a random filter over the document set

assertSameSet

public void assertSameSet(Query q1,
                          Query q2)
                   throws Exception
Asserts that the documents returned by q1 are the same as of those returned by q2

Throws:
Exception

assertSubsetOf

public void assertSubsetOf(Query q1,
                           Query q2)
                    throws Exception
Asserts that the documents returned by q1 are a subset of those returned by q2

Throws:
Exception

assertSubsetOf

protected void assertSubsetOf(Query q1,
                              Query q2,
                              Filter filter)
                       throws Exception
Asserts that the documents returned by q1 are a subset of those returned by q2. Both queries will be filtered by filter

Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Searcher

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class Searcher

java.lang.Object
    extended by  org.apache.lucene.search.Searcher
All Implemented Interfaces:
Closeable, Searchable
Direct Known Subclasses:
IndexSearcher, MultiSearcher
Deprecated. In 4.0 this abstract class is removed/absorbed into IndexSearcher

@Deprecated
public abstract class Searcher
extends Object
implements Searchable

An abstract base class for search implementations. Implements the main search methods.

Note that you can only access hits from a Searcher as long as it is not yet closed, otherwise an IOException will be thrown.

Constructor Summary
Searcher()
Deprecated.
Method Summary
abstract void | close() Deprecated. Frees resources associated with this Searcher.
Weight | createNormalizedWeight(Query query) Deprecated. Creates a normalized weight for a top-level Query.
protected Weight | createWeight(Query query) Deprecated. never ever use this method in Weight implementations. Subclasses of Searcher should use createNormalizedWeight(org.apache.lucene.search.Query), instead.
abstract Document | doc(int i) Deprecated. Returns the stored fields of document i.
abstract Document | doc(int docid, FieldSelector fieldSelector) Deprecated. Get the Document at the nth position.
abstract int | docFreq(Term term) Deprecated. Expert: Returns the number of documents containing term.
int[] | docFreqs(Term[] terms) Deprecated. Expert: For each term in the terms array, calculates the number of documents containing term.
Explanation | explain(Query query, int doc) Deprecated. Returns an Explanation that describes how doc scored against query.
abstract Explanation | explain(Weight weight, int doc) Deprecated. Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.
Similarity | getSimilarity() Deprecated. Expert: Return the Similarity implementation used by this Searcher.
abstract int | maxDoc() Deprecated. Expert: Returns one greater than the largest possible document number.
abstract Query | rewrite(Query query) Deprecated. Expert: called to re-write queries into primitive queries.
void | search(Query query, Collector results) Deprecated. Lower-level search API.
void | search(Query query, Filter filter, Collector results) Deprecated. Lower-level search API.
TopDocs | search(Query query, Filter filter, int n) Deprecated. Finds the top n hits for query, applying filter if non-null.
TopFieldDocs | search(Query query, Filter filter, int n, Sort sort) Deprecated. Search implementation with arbitrary sorting.
TopDocs | search(Query query, int n) Deprecated. Finds the top n hits for query.
TopFieldDocs | search(Query query, int n, Sort sort) Deprecated. Search implementation with arbitrary sorting and no filter.
abstract void | search(Weight weight, Filter filter, Collector results) Deprecated. Lower-level search API.
abstract TopDocs | search(Weight weight, Filter filter, int n) Deprecated. Expert: Low-level search implementation.
abstract TopFieldDocs | search(Weight weight, Filter filter, int n, Sort sort) Deprecated. Expert: Low-level search implementation with arbitrary sorting.
void | setSimilarity(Similarity similarity) Deprecated. Expert: Set the Similarity implementation used by this Searcher.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Searcher

public Searcher()
Deprecated.
Method Detail

search

public TopFieldDocs search(Query query,
                           Filter filter,
                           int n,
                           Sort sort)
                    throws IOException
Deprecated.
Search implementation with arbitrary sorting. Finds the top n hits for query, applying filter if non-null, and sorting the hits by the criteria in sort.

NOTE: this does not compute scores by default; use IndexSearcher.setDefaultFieldSortScoring(boolean, boolean) to enable scoring.

Throws:
BooleanQuery.TooManyClauses
IOException

search

public TopFieldDocs search(Query query,
                           int n,
                           Sort sort)
                    throws IOException
Deprecated.
Search implementation with arbitrary sorting and no filter.

Parameters:
query - The query to search for
n - Return only the top n results
sort - The Sort object
Returns:
The top docs, sorted according to the supplied Sort instance
Throws:
IOException

search

public void search(Query query,
                   Collector results)
            throws IOException
Deprecated.
Lower-level search API.

Collector.collect(int) is called for every matching document.

Applications should only use this if they need all of the matching documents. The high-level search API (search(Query, int)) is usually more efficient, as it skips non-high-scoring hits.

Note: The score passed to this method is a raw score. In other words, the score will not necessarily be a float whose value is between 0 and 1.

Throws:
BooleanQuery.TooManyClauses
IOException

search

public void search(Query query,
                   Filter filter,
                   Collector results)
            throws IOException
Deprecated.
Lower-level search API.

Collector.collect(int) is called for every matching document.
Collector-based access to remote indexes is discouraged.

Applications should only use this if they need all of the matching documents. The high-level search API (search(Query, Filter, int)) is usually more efficient, as it skips non-high-scoring hits.

Parameters:
query - to match documents
filter - if non-null, used to permit documents to be collected.
results - to receive hits
Throws:
BooleanQuery.TooManyClauses
IOException

search

public TopDocs search(Query query,
                      Filter filter,
                      int n)
               throws IOException
Deprecated.
Finds the top n hits for query, applying filter if non-null.

Throws:
BooleanQuery.TooManyClauses
IOException

search

public TopDocs search(Query query,
                      int n)
               throws IOException
Deprecated.
Finds the top n hits for query.

Throws:
BooleanQuery.TooManyClauses
IOException

explain

public Explanation explain(Query query,
                           int doc)
                    throws IOException
Deprecated.
Returns an Explanation that describes how doc scored against query.

This is intended to be used in developing Similarity implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index.

Throws:
IOException

setSimilarity

public void setSimilarity(Similarity similarity)
Deprecated.
Expert: Set the Similarity implementation used by this Searcher.

See Also:
Similarity.setDefault(Similarity)

getSimilarity

public Similarity getSimilarity()
Deprecated.
Expert: Return the Similarity implementation used by this Searcher.

This defaults to the current value of Similarity.getDefault().

createNormalizedWeight

public Weight createNormalizedWeight(Query query)
                              throws IOException
Deprecated.
Creates a normalized weight for a top-level Query. The query is rewritten by this method and Query.createWeight(org.apache.lucene.search.Searcher) called, afterwards the Weight is normalized. The returned Weight can then directly be used to get a Scorer.

Throws:
IOException
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

createWeight

@Deprecated
protected final Weight createWeight(Query query)
                             throws IOException
Deprecated. never ever use this method in Weight implementations. Subclasses of Searcher should use createNormalizedWeight(org.apache.lucene.search.Query), instead.

Expert: Creates a normalized weight for a top-level Query. The query is rewritten by this method and Query.createWeight(org.apache.lucene.search.Searcher) called, afterwards the Weight is normalized. The returned Weight can then directly be used to get a Scorer.

Throws:
IOException

docFreqs

public int[] docFreqs(Term[] terms)
               throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: For each term in the terms array, calculates the number of documents containing term. Returns an array with these document frequencies. Used to minimize number of remote calls.

Specified by:
docFreqs in interface Searchable
Throws:
IOException

search

public abstract void search(Weight weight,
                            Filter filter,
                            Collector results)
                     throws IOException
Deprecated.
Description copied from interface: Searchable
Lower-level search API.

Collector.collect(int) is called for every document.
Collector-based access to remote indexes is discouraged.

Applications should only use this if they need all of the matching documents. The high-level search API (search(Query,int)) is usually more efficient, as it skips non-high-scoring hits.

Specified by:
search in interface Searchable
Parameters:
weight - to match documents
filter - if non-null, used to permit documents to be collected.
results - to receive hits
Throws:
IOException

close

public abstract void close()
                    throws IOException
Deprecated.
Description copied from interface: Searchable
Frees resources associated with this Searcher. Be careful not to call this method while you are still using objects that reference this Searchable.

Specified by:
close in interface Closeable
Specified by:
close in interface Searchable
Throws:
IOException

docFreq

public abstract int docFreq(Term term)
                     throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: Returns the number of documents containing term.

Specified by:
docFreq in interface Searchable
Throws:
IOException
See Also:
IndexReader.docFreq(Term)

maxDoc

public abstract int maxDoc()
                    throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: Returns one greater than the largest possible document number.

Specified by:
maxDoc in interface Searchable
Throws:
IOException
See Also:
IndexReader.maxDoc()

search

public abstract TopDocs search(Weight weight,
                               Filter filter,
                               int n)
                        throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: Low-level search implementation. Finds the top n hits for query, applying filter if non-null.

Applications should usually call search(Query,int) or search(Query,Filter,int) instead.

Specified by:
search in interface Searchable
Throws:
IOException

doc

public abstract Document doc(int i)
                      throws CorruptIndexException,
                             IOException
Deprecated.
Description copied from interface: Searchable
Returns the stored fields of document i.

Specified by:
doc in interface Searchable
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
IndexReader.document(int)

doc

public abstract Document doc(int docid,
                             FieldSelector fieldSelector)
                      throws CorruptIndexException,
                             IOException
Deprecated.
Description copied from interface: Searchable
Get the Document at the nth position. The FieldSelector may be used to determine what Fields to load and how they should be loaded. NOTE: If the underlying Reader (more specifically, the underlying FieldsReader) is closed before the lazy Field is loaded an exception may be thrown. If you want the value of a lazy Field to be available after closing you must explicitly load it or fetch the Document again with a new loader.

Specified by:
doc in interface Searchable
Parameters:
docid - Get the document at the nth position
fieldSelector - The FieldSelector to use to determine what Fields should be loaded on the Document. May be null, in which case all Fields will be loaded.
Returns:
The stored fields of the Document at the nth position
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
IndexReader.document(int, FieldSelector), Fieldable, FieldSelector, SetBasedFieldSelector, LoadFirstFieldSelector

rewrite

public abstract Query rewrite(Query query)
                       throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: called to re-write queries into primitive queries.

Specified by:
rewrite in interface Searchable
Throws:
IOException

explain

public abstract Explanation explain(Weight weight,
                                    int doc)
                             throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.

This is intended to be used in developing Similarity implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index.

Applications should call explain(Query, int).

Specified by:
explain in interface Searchable
Throws:
IOException

search

public abstract TopFieldDocs search(Weight weight,
                                    Filter filter,
                                    int n,
                                    Sort sort)
                             throws IOException
Deprecated.
Description copied from interface: Searchable
Expert: Low-level search implementation with arbitrary sorting. Finds the top n hits for query, applying filter if non-null, and sorting the hits by the criteria in sort.

Applications should usually call search(Query,Filter,int,Sort) instead.

Specified by:
search in interface Searchable
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SearcherFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class SearcherFactory

java.lang.Object
    extended by  org.apache.lucene.search.SearcherFactory

public class SearcherFactory
extends Object

Factory class used by SearcherManager and NRTManager to create new IndexSearchers. The default implementation just creates an IndexSearcher with no custom behavior:

   public IndexSearcher newSearcher(IndexReader r) throws IOException {
     return new IndexSearcher(r);
   }
You can pass your own factory instead if you want custom behavior, such as:
  • Setting a custom scoring model: IndexSearcher.setSimilarity(Similarity)
  • Parallel per-segment search: IndexSearcher.IndexSearcher(IndexReader, ExecutorService)
  • Return custom subclasses of IndexSearcher (for example that implement distributed scoring)
  • Run queries to warm your IndexSearcher before it is used. Note: when using near-realtime search you may want to also IndexWriterConfig.setMergedSegmentWarmer(IndexWriter.IndexReaderWarmer) to warm newly merged segments in the background, outside of the reopen path.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
SearcherFactory()
Method Summary
 IndexSearcher newSearcher(IndexReader reader)
Returns a new IndexSearcher over the given reader.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SearcherFactory

public SearcherFactory()
Method Detail

newSearcher

public IndexSearcher newSearcher(IndexReader reader)
                          throws IOException
Returns a new IndexSearcher over the given reader.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SearcherLifetimeManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class SearcherLifetimeManager

java.lang.Object
    extended by  org.apache.lucene.search.SearcherLifetimeManager
All Implemented Interfaces:
Closeable
public class SearcherLifetimeManager
extends Object
implements Closeable

Keeps track of current plus old IndexSearchers, closing the old ones once they have timed out. Use it like this:

   SearcherLifetimeManager mgr = new SearcherLifetimeManager();
Per search-request, if it's a "new" search request, then obtain the latest searcher you have (for example, by using SearcherManager or NRTManager), and then record this searcher:
   // Record the current searcher, and save the returend
   // token into user's search results (eg as a  hidden
   // HTML form field):
   long token = mgr.record(searcher);
When a follow-up search arrives, for example the user clicks next page, drills down/up, etc., take the token that you saved from the previous search and:
   // If possible, obtain the same searcher as the last
   // search:
   IndexSearcher searcher = mgr.acquire(token);
   if (searcher != null) {
     // Searcher is still here
     try {
       // do searching...
     } finally {
       mgr.release(searcher);
       // Do not use searcher after this!
       searcher = null;
     }
   } else {
     // Searcher was pruned -- notify user session timed
     // out, or, pull fresh searcher again
   }
Finally, in a separate thread, ideally the same thread that's periodically reopening your searchers, you should periodically prune old searchers:
   mgr.prune(new PruneByAge(600.0));

NOTE: keeping many searchers around means you'll use more resources (open files, RAM) than a single searcher. However, as long as you are using IndexReader.openIfChanged(org.apache.lucene.index.IndexReader), the searchers will usually share almost all segments and the added resource usage is contained. When a large merge has completed, and you reopen, because that is a large change, the new searcher will use higher additional RAM than other searchers; but large merges don't complete very often and it's unlikely you'll hit two of them in your expiration window. Still you should budget plenty of heap in the JVM to have a good safety margin.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | SearcherLifetimeManager.PruneByAge Simple pruner that drops any searcher older by more than the specified seconds, than the newest searcher.
static interface | SearcherLifetimeManager.Pruner See prune(org.apache.lucene.search.SearcherLifetimeManager.Pruner).
Constructor Summary
SearcherLifetimeManager()
Method Summary
 IndexSearcher acquire(long version)
Retrieve a previously recorded IndexSearcher, if it has not yet been closed
 void close()
Close this to future searching; any searches still in process in other threads won't be affected, and they should still call release(org.apache.lucene.search.IndexSearcher) after they are done.
 void prune(SearcherLifetimeManager.Pruner pruner)
Calls provided SearcherLifetimeManager.Pruner to prune entries.
 long record(IndexSearcher searcher)
Records that you are now using this IndexSearcher.
 void release(IndexSearcher s)
Release a searcher previously obtained from acquire(long).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SearcherLifetimeManager

public SearcherLifetimeManager()
Method Detail

record

public long record(IndexSearcher searcher)
            throws IOException
Records that you are now using this IndexSearcher. Always call this when you've obtained a possibly new IndexSearcher, for example from one of the get methods in NRTManager or SearcherManager. It's fine if you already passed the same searcher to this method before.

This returns the long token that you can later pass to acquire(long) to retrieve the same IndexSearcher. You should record this long token in the search results sent to your user, such that if the user performs a follow-on action (clicks next page, drills down, etc.) the token is returned.

Throws:
IOException

acquire

public IndexSearcher acquire(long version)
Retrieve a previously recorded IndexSearcher, if it has not yet been closed

NOTE: this may return null when the requested searcher has already timed out. When this happens you should notify your user that their session timed out and that they'll have to restart their search.

If this returns a non-null result, you must match later call release(org.apache.lucene.search.IndexSearcher) on this searcher, best from a finally clause.

release

public void release(IndexSearcher s)
             throws IOException
Release a searcher previously obtained from acquire(long).

NOTE: it's fine to call this after close.

Throws:
IOException

prune

public void prune(SearcherLifetimeManager.Pruner pruner)
           throws IOException
Calls provided SearcherLifetimeManager.Pruner to prune entries. The entries are passed to the Pruner in sorted (newest to oldest IndexSearcher) order.

NOTE: you must peridiocally call this, ideally from the same background thread that opens new searchers.

Throws:
IOException

close

public void close()
           throws IOException
Close this to future searching; any searches still in process in other threads won't be affected, and they should still call release(org.apache.lucene.search.IndexSearcher) after they are done.

NOTE: you must ensure no other threads are calling record(org.apache.lucene.search.IndexSearcher) while you call close(); otherwise it's possible not all searcher references will be freed.

Specified by:
close in interface Closeable
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SearcherLifetimeManager.PruneByAge

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class SearcherLifetimeManager.PruneByAge

java.lang.Object
    extended by  org.apache.lucene.search.SearcherLifetimeManager.PruneByAge
All Implemented Interfaces:
SearcherLifetimeManager.Pruner
Enclosing class:
SearcherLifetimeManager
public static final class SearcherLifetimeManager.PruneByAge
extends Object
implements SearcherLifetimeManager.Pruner

Simple pruner that drops any searcher older by more than the specified seconds, than the newest searcher.

Constructor Summary
SearcherLifetimeManager.PruneByAge(double maxAgeSec)
Method Summary
 boolean doPrune(double ageSec, IndexSearcher searcher)
Return true if this searcher should be removed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SearcherLifetimeManager.PruneByAge

public SearcherLifetimeManager.PruneByAge(double maxAgeSec)
Method Detail

doPrune

public boolean doPrune(double ageSec,
                       IndexSearcher searcher)
Description copied from interface: SearcherLifetimeManager.Pruner
Return true if this searcher should be removed.

Specified by:
doPrune in interface SearcherLifetimeManager.Pruner
Parameters:
ageSec - how much time has passed since this searcher was the current (live) searcher
searcher - Searcher
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SearcherLifetimeManager.Pruner

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Interface SearcherLifetimeManager.Pruner

All Known Implementing Classes:
SearcherLifetimeManager.PruneByAge
Enclosing class:
SearcherLifetimeManager
public static interface SearcherLifetimeManager.Pruner

See SearcherLifetimeManager.prune(org.apache.lucene.search.SearcherLifetimeManager.Pruner).

Method Summary
 boolean doPrune(double ageSec, IndexSearcher searcher)
Return true if this searcher should be removed.

Method Detail

doPrune

boolean doPrune(double ageSec,
                IndexSearcher searcher)
Return true if this searcher should be removed.

Parameters:
ageSec - how much time has passed since this searcher was the current (live) searcher
searcher - Searcher
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SearcherManager

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class SearcherManager

java.lang.Object
    extended by  org.apache.lucene.search.ReferenceManager<IndexSearcher>
        extended by  org.apache.lucene.search.SearcherManager
All Implemented Interfaces:
Closeable
public final class SearcherManager
extends ReferenceManager<IndexSearcher>

Utility class to safely share IndexSearcher instances across multiple threads, while periodically reopening. This class ensures each searcher is closed only once all threads have finished using it.

Use ReferenceManager.acquire() to obtain the current searcher, and ReferenceManager.release(G) to release it, like this:

 IndexSearcher s = manager.acquire();
 try {
   // Do searching, doc retrieval, etc. with s
 } finally {
   manager.release(s);
 }
 // Do not use s after this!
 s = null;

In addition you should periodically call ReferenceManager.maybeRefresh(). While it's possible to call this just before running each query, this is discouraged since it penalizes the unlucky queries that do the reopen. It's better to use a separate background thread, that periodically calls maybeReopen. Finally, be sure to call ReferenceManager.close() once you are done.

See Also:
SearcherFactory
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.search.ReferenceManager
current
Constructor Summary
SearcherManager(Directory dir, SearcherFactory searcherFactory)
Creates and returns a new SearcherManager from the given Directory.
SearcherManager(IndexWriter writer, boolean applyAllDeletes, SearcherFactory searcherFactory)
Creates and returns a new SearcherManager from the given IndexWriter.
Method Summary
protected  void decRef(IndexSearcher reference)
Decrement reference counting on the given reference.
 boolean isSearcherCurrent()
Returns true if no changes have occured since this searcher ie.
 boolean maybeReopen()
Deprecated. see ReferenceManager.maybeRefresh().
protected  IndexSearcher refreshIfNeeded(IndexSearcher referenceToRefresh)
Refresh the given reference if needed.
protected  boolean tryIncRef(IndexSearcher reference)
Try to increment reference counting on the given reference.
Methods inherited from class org.apache.lucene.search.ReferenceManager
acquire, afterClose, afterRefresh, close, maybeRefresh, release
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SearcherManager

public SearcherManager(IndexWriter writer,
                       boolean applyAllDeletes,
                       SearcherFactory searcherFactory)
                throws IOException
Creates and returns a new SearcherManager from the given IndexWriter.

Parameters:
writer - the IndexWriter to open the IndexReader from.
applyAllDeletes - If true, all buffered deletes will be applied (made visible) in the IndexSearcher / IndexReader. If false, the deletes may or may not be applied, but remain buffered (in IndexWriter) so that they will be applied in the future. Applying deletes can be costly, so if your app can tolerate deleted documents being returned you might gain some performance by passing false. See IndexReader.openIfChanged(IndexReader, IndexWriter, boolean).
searcherFactory - An optional SearcherFactory. Pass null if you don't require the searcher to be warmed before going live or other custom behavior.
Throws:
IOException

SearcherManager

public SearcherManager(Directory dir,
                       SearcherFactory searcherFactory)
                throws IOException
Creates and returns a new SearcherManager from the given Directory.

Parameters:
dir - the directory to open the DirectoryReader on.
searcherFactory - An optional SearcherFactory. Pass null if you don't require the searcher to be warmed before going live or other custom behavior.
Throws:
IOException
Method Detail

decRef

protected void decRef(IndexSearcher reference)
               throws IOException
Description copied from class: ReferenceManager
Decrement reference counting on the given reference.

Specified by:
decRef in class ReferenceManager<IndexSearcher>
Throws:
IOException

refreshIfNeeded

protected IndexSearcher refreshIfNeeded(IndexSearcher referenceToRefresh)
                                 throws IOException
Description copied from class: ReferenceManager
Refresh the given reference if needed. Returns null if no refresh was needed, otherwise a new refreshed reference.

Specified by:
refreshIfNeeded in class ReferenceManager<IndexSearcher>
Throws:
IOException

tryIncRef

protected boolean tryIncRef(IndexSearcher reference)
Description copied from class: ReferenceManager
Try to increment reference counting on the given reference. Return true if the operation was successful.

Specified by:
tryIncRef in class ReferenceManager<IndexSearcher>

maybeReopen

@Deprecated
public boolean maybeReopen()
                    throws IOException
Deprecated. see ReferenceManager.maybeRefresh().

Throws:
IOException

isSearcherCurrent

public boolean isSearcherCurrent()
                          throws IOException
Returns true if no changes have occured since this searcher ie. reader was opened, otherwise false.

Throws:
IOException
See Also:
IndexReader.isCurrent()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Similarity

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class Similarity

java.lang.Object
    extended by  org.apache.lucene.search.Similarity
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DefaultSimilarity, SimilarityDelegator
public abstract class Similarity
extends Object
implements Serializable

Expert: Scoring API.

Similarity defines the components of Lucene scoring. Overriding computation of these components is a convenient way to alter Lucene scoring.

Suggested reading: Introduction To Information Retrieval, Chapter 6.

The following describes how Lucene scoring evolves from underlying information retrieval models to (efficient) implementation. We first brief on VSM Score, then derive from it Lucene's Conceptual Scoring Formula, from which, finally, evolves Lucene's Practical Scoring Function (the latter is connected directly with Lucene classes and methods).

Lucene combines Boolean model (BM) of Information Retrieval with Vector Space Model (VSM) of Information Retrieval - documents "approved" by BM are scored by VSM.

In VSM, documents and queries are represented as weighted vectors in a multi-dimensional space, where each distinct index term is a dimension, and weights are Tf-idf values.

VSM does not require weights to be Tf-idf values, but Tf-idf values are believed to produce search results of high quality, and so Lucene is using Tf-idf. Tf and Idf are described in more detail below, but for now, for completion, let's just say that for given term t and document (or query) x, Tf(t,x) varies with the number of occurrences of term t in x (when one increases so does the other) and idf(t) similarly varies with the inverse of the number of index documents containing term t.

VSM score of document d for query q is the Cosine Similarity of the weighted query vectors V(q) and V(d):

cosine-similarity(q,d) =
V(q) · V(d)
–––––––––
|V(q)| |V(d)|
VSM Score

Where V(q) · V(d) is the dot product of the weighted vectors, and |V(q)| and |V(d)| are their Euclidean norms.

Note: the above equation can be viewed as the dot product of the normalized weighted vectors, in the sense that dividing V(q) by its euclidean norm is normalizing it to a unit vector.

Lucene refines VSM score for both search quality and usability:

  • Normalizing V(d) to the unit vector is known to be problematic in that it removes all document length information. For some documents removing this info is probably ok, e.g. a document made by duplicating a certain paragraph 10 times, especially if that paragraph is made of distinct terms. But for a document which contains no duplicated paragraphs, this might be wrong. To avoid this problem, a different document length normalization factor is used, which normalizes to a vector equal to or larger than the unit vector: doc-len-norm(d).
  • At indexing, users can specify that certain documents are more important than others, by assigning a document boost. For this, the score of each document is also multiplied by its boost value doc-boost(d).
  • Lucene is field based, hence each query term applies to a single field, document length normalization is by the length of the certain field, and in addition to document boost there are also document fields boosts.
  • The same field can be added to a document during indexing several times, and so the boost of that field is the multiplication of the boosts of the separate additions (or parts) of that field within the document.
  • At search time users can specify boosts to each query, sub-query, and each query term, hence the contribution of a query term to the score of a document is multiplied by the boost of that query term query-boost(q).
  • A document may match a multi term query without containing all the terms of that query (this is correct for some of the queries), and users can further reward documents matching more query terms through a coordination factor, which is usually larger when more terms are matched: coord-factor(q,d).

Under the simplifying assumption of a single field in the index, we get Lucene's Conceptual scoring formula:

score(q,d) = coord-factor(q,d) · query-boost(q) ·
V(q) · V(d)
–––––––––
|V(q)|
· doc-len-norm(d) · doc-boost(d)
Lucene Conceptual Scoring Formula

The conceptual formula is a simplification in the sense that (1) terms and documents are fielded and (2) boosts are usually per query term rather than per query.

We now describe how Lucene implements this conceptual scoring formula, and derive from it Lucene's Practical Scoring Function.

For efficient score computation some scoring components are computed and aggregated in advance:

  • Query-boost for the query (actually for each query term) is known when search starts.
  • Query Euclidean norm |V(q)| can be computed when search starts, as it is independent of the document being scored. From search optimization perspective, it is a valid question why bother to normalize the query at all, because all scored documents will be multiplied by the same |V(q)|, and hence documents ranks (their order by score) will not be affected by this normalization. There are two good reasons to keep this normalization:
    • Recall that Cosine Similarity can be used find how similar two documents are. One can use Lucene for e.g. clustering, and use a document as a query to compute its similarity to other documents. In this use case it is important that the score of document d3 for query d1 is comparable to the score of document d3 for query d2. In other words, scores of a document for two distinct queries should be comparable. There are other applications that may require this. And this is exactly what normalizing the query vector V(q) provides: comparability (to a certain extent) of two or more queries.
    • Applying query normalization on the scores helps to keep the scores around the unit vector, hence preventing loss of score data because of floating point precision limitations.
  • Document length norm doc-len-norm(d) and document boost doc-boost(d) are known at indexing time. They are computed in advance and their multiplication is saved as a single value in the index: norm(d). (In the equations below, norm(t in d) means norm(field(t) in doc d) where field(t) is the field associated with term t.)

Lucene's Practical Scoring Function is derived from the above. The color codes demonstrate how it relates to those of the conceptual formula:

score(q,d) = coord(q,d) · queryNorm(q) · | ∑ | ( tf(t in d) · idf(t) 2 · t.getBoost() · norm(t,d) )
 | t in q |
Lucene Practical Scoring Function

where

  1. tf(t in d) correlates to the term's frequency, defined as the number of times term t appears in the currently scored document d. Documents that have more occurrences of a given term receive a higher score. Note that tf(t in q) is assumed to be 1 and therefore it does not appear in this equation, However if a query contains twice the same term, there will be two term-queries with that same term and hence the computation would still be correct (although not very efficient). The default computation for tf(t in d) in DefaultSimilarity is:

    tf(t in d) = frequency½

  2. idf(t) stands for Inverse Document Frequency. This value correlates to the inverse of docFreq (the number of documents in which the term t appears). This means rarer terms give higher contribution to the total score. idf(t) appears for t in both the query and the document, hence it is squared in the equation. The default computation for idf(t) in DefaultSimilarity is:

    idf(t) = 1 + log (
    numDocs
    –––––––––
    docFreq+1
            )

  3. coord(q,d) is a score factor based on how many of the query terms are found in the specified document. Typically, a document that contains more of the query's terms will receive a higher score than another document with fewer query terms. This is a search time factor computed in coord(q,d) by the Similarity in effect at search time.

  4. queryNorm(q) is a normalizing factor used to make scores between queries comparable. This factor does not affect document ranking (since all ranked documents are multiplied by the same factor), but rather just attempts to make scores from different queries (or even different indexes) comparable. This is a search time factor computed by the Similarity in effect at search time. The default computation in DefaultSimilarity produces a Euclidean norm:

    queryNorm(q) = queryNorm(sumOfSquaredWeights) =
    1
    ––––––––––––––
    sumOfSquaredWeights½

    The sum of squared weights (of the query terms) is computed by the query Weight object. For example, a BooleanQuery computes this value as:

    sumOfSquaredWeights = q.getBoost() 2 · ∑ ( idf(t) · t.getBoost() ) 2
    t in q

  5. t.getBoost() is a search time boost of term t in the query q as specified in the query text (see query syntax), or as set by application calls to setBoost(). Notice that there is really no direct API for accessing a boost of one term in a multi term query, but rather multi terms are represented in a query as multi TermQuery objects, and so the boost of a term in the query is accessible by calling the sub-query getBoost().

  6. norm(t,d) encapsulates a few (indexing time) boost and length factors:
    • Document boost - set by calling doc.setBoost() before adding the document to the index.
    • Field boost - set by calling field.setBoost() before adding the field to a document.
    • lengthNorm - computed when the document is added to the index in accordance with the number of tokens of this field in the document, so that shorter fields contribute more to the score. LengthNorm is computed by the Similarity class in effect at indexing.
    The computeNorm(java.lang.String, org.apache.lucene.index.FieldInvertState) method is responsible for combining all of these factors into a single float.

    When a document is added to the index, all the above factors are multiplied. If the document has multiple fields with the same name, all their boosts are multiplied together:

    norm(t,d) = doc.getBoost() · lengthNorm · ∏ f.getBoost()
    field f in d named as t

    However the resulted norm value is encoded as a single byte before being stored. At search time, the norm byte value is read from the index directory and decoded back to a float norm value. This encoding/decoding, while reducing index size, comes with the price of precision loss - it is not guaranteed that decode(encode(x)) = x. For instance, decode(encode(0.89)) = 0.75.

    Compression of norm values to a single byte saves memory at search time, because once a field is referenced at search time, its norms - for all documents - are maintained in memory.

    The rationale supporting such lossy compression of norm values is that given the difficulty (and inaccuracy) of users to express their true information need by a query, only big differences matter.

    Last, note that search time is too late to modify this norm part of scoring, e.g. by using a different Similarity for search.

See Also:
setDefault(Similarity), IndexWriter.setSimilarity(Similarity), Searcher.setSimilarity(Similarity), Serialized Form

Field Summary
static int NO_DOC_ID_PROVIDED
Constructor Summary
Similarity()
Method Summary
abstract  float computeNorm(String field, FieldInvertState state)
Computes the normalization value for a field, given the accumulated state of term processing for this field (see FieldInvertState).
abstract  float coord(int overlap, int maxOverlap)
Computes a score factor based on the fraction of all query terms that a document contains.
static float decodeNorm(byte b)
Deprecated. Use decodeNormValue(byte) instead.
 float decodeNormValue(byte b)
Decodes a normalization factor stored in an index.
static byte encodeNorm(float f)
Deprecated. Use encodeNormValue(float) instead.
 byte encodeNormValue(float f)
Encodes a normalization factor for storage in an index.
static Similarity getDefault()
Return the default Similarity implementation used by indexing and search code.
static float[] getNormDecoder()
Deprecated. Use instance methods for encoding/decoding norm values to enable customization.
abstract  float idf(int docFreq, int numDocs)
Computes a score factor based on a term's document frequency (the number of documents which contain the term).
 Explanation.IDFExplanation idfExplain(Collection<Term> terms, Searcher searcher)
Computes a score factor for a phrase.
 Explanation.IDFExplanation idfExplain(Term term, Searcher searcher)
This method forwards to idfExplain(Term,Searcher,int) by passing searcher.docFreq(term) as the docFreq.
 Explanation.IDFExplanation idfExplain(Term term, Searcher searcher, int docFreq)
Computes a score factor for a simple term and returns an explanation for that score factor.
 float lengthNorm(String fieldName, int numTokens)
Deprecated. Please override computeNorm instead
abstract  float queryNorm(float sumOfSquaredWeights)
Computes the normalization value for a query given the sum of the squared weights of each of the query terms.
 float scorePayload(int docId, String fieldName, int start, int end, byte[] payload, int offset, int length)
Calculate a scoring factor based on the data in the payload.
static void setDefault(Similarity similarity)
Set the default Similarity implementation used by indexing and search code.
abstract  float sloppyFreq(int distance)
Computes the amount of a sloppy phrase match, based on an edit distance.
abstract  float tf(float freq)
Computes a score factor based on a term or phrase's frequency in a document.
 float tf(int freq)
Computes a score factor based on a term or phrase's frequency in a document.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

NO_DOC_ID_PROVIDED

public static final int NO_DOC_ID_PROVIDED
See Also:
Constant Field Values
Constructor Detail

Similarity

public Similarity()
Method Detail

setDefault

public static void setDefault(Similarity similarity)
Set the default Similarity implementation used by indexing and search code.

See Also:
Searcher.setSimilarity(Similarity), IndexWriter.setSimilarity(Similarity)

getDefault

public static Similarity getDefault()
Return the default Similarity implementation used by indexing and search code.

This is initially an instance of DefaultSimilarity.

See Also:
Searcher.setSimilarity(Similarity), IndexWriter.setSimilarity(Similarity)

decodeNorm

@Deprecated
public static float decodeNorm(byte b)
Deprecated. Use decodeNormValue(byte) instead.

Decodes a normalization factor stored in an index.

See Also:
decodeNormValue(byte)

decodeNormValue

public float decodeNormValue(byte b)
Decodes a normalization factor stored in an index.

WARNING: If you override this method, you should change the default Similarity to your implementation with setDefault(Similarity). Otherwise, your method may not always be called, especially if you omit norms for some fields.

See Also:
encodeNormValue(float)

getNormDecoder

@Deprecated
public static float[] getNormDecoder()
Deprecated. Use instance methods for encoding/decoding norm values to enable customization.

Returns a table for decoding normalization bytes.

See Also:
encodeNormValue(float), decodeNormValue(byte)

computeNorm

public abstract float computeNorm(String field,
                                  FieldInvertState state)
Computes the normalization value for a field, given the accumulated state of term processing for this field (see FieldInvertState).

Implementations should calculate a float value based on the field state and then return that value.

Matches in longer fields are less precise, so implementations of this method usually return smaller values when state.getLength() is large, and larger values when state.getLength() is small.

Note that the return values are computed under IndexWriter.addDocument(org.apache.lucene.document.Document) and then stored using encodeNormValue(float). Thus they have limited precision, and documents must be re-indexed if this method is altered.

For backward compatibility this method by default calls
 lengthNorm(String, int) passing
 FieldInvertState.getLength() as the second argument, and
 then multiplies this value by FieldInvertState.getBoost().

Parameters:
field - field name
state - current processing state for this field
Returns:
the calculated float norm
WARNING: This API is experimental and might change in incompatible ways in the next release.

lengthNorm

@Deprecated
public final float lengthNorm(String fieldName,
                                         int numTokens)
Deprecated. Please override computeNorm instead

Computes the normalization value for a field given the total number of terms contained in a field. These values, together with field boosts, are stored in an index and multipled into scores for hits on each field by the search code.

Matches in longer fields are less precise, so implementations of this method usually return smaller values when numTokens is large, and larger values when numTokens is small.

Note that the return values are computed under IndexWriter.addDocument(org.apache.lucene.document.Document) and then stored using encodeNormValue(float). Thus they have limited precision, and documents must be re-indexed if this method is altered.

Parameters:
fieldName - the name of the field
numTokens - the total number of tokens contained in fields named fieldName of doc.
Returns:
a normalization factor for hits on this field of this document
See Also:
AbstractField.setBoost(float)

queryNorm

public abstract float queryNorm(float sumOfSquaredWeights)
Computes the normalization value for a query given the sum of the squared weights of each of the query terms. This value is multiplied into the weight of each query term. While the classic query normalization factor is computed as 1/sqrt(sumOfSquaredWeights), other implementations might completely ignore sumOfSquaredWeights (ie return 1).

This does not affect ranking, but the default implementation does make scores from different queries more comparable than they would be by eliminating the magnitude of the Query vector as a factor in the score.

Parameters:
sumOfSquaredWeights - the sum of the squares of query term weights
Returns:
a normalization factor for query weights

encodeNormValue

public byte encodeNormValue(float f)
Encodes a normalization factor for storage in an index.

The encoding uses a three-bit mantissa, a five-bit exponent, and the zero-exponent point at 15, thus representing values from around 7x10^9 to 2x10^-9 with about one significant decimal digit of accuracy. Zero is also represented. Negative numbers are rounded up to zero. Values too large to represent are rounded down to the largest representable value. Positive values too small to represent are rounded up to the smallest positive representable value.

WARNING: If you override this method, you should change the default Similarity to your implementation with setDefault(Similarity). Otherwise, your method may not always be called, especially if you omit norms for some fields.

See Also:
AbstractField.setBoost(float), SmallFloat

encodeNorm

@Deprecated
public static byte encodeNorm(float f)
Deprecated. Use encodeNormValue(float) instead.

Static accessor kept for backwards compability reason, use encodeNormValue instead.

Parameters:
f - norm-value to encode
Returns:
byte representing the given float
See Also:
encodeNormValue(float)

tf

public float tf(int freq)
Computes a score factor based on a term or phrase's frequency in a document. This value is multiplied by the idf(int, int) factor for each term in the query and these products are then summed to form the initial score for a document.

Terms and phrases repeated in a document indicate the topic of the document, so implementations of this method usually return larger values when freq is large, and smaller values when freq is small.

The default implementation calls tf(float).

Parameters:
freq - the frequency of a term within a document
Returns:
a score factor based on a term's within-document frequency

sloppyFreq

public abstract float sloppyFreq(int distance)
Computes the amount of a sloppy phrase match, based on an edit distance. This value is summed for each sloppy phrase match in a document to form the frequency that is passed to tf(float).

A phrase match with a small edit distance to a document passage more closely matches the document, so implementations of this method usually return larger values when the edit distance is small and smaller values when it is large.

Parameters:
distance - the edit distance of this sloppy phrase match
Returns:
the frequency increment for this match
See Also:
PhraseQuery.setSlop(int)

tf

public abstract float tf(float freq)
Computes a score factor based on a term or phrase's frequency in a document. This value is multiplied by the idf(int, int) factor for each term in the query and these products are then summed to form the initial score for a document.

Terms and phrases repeated in a document indicate the topic of the document, so implementations of this method usually return larger values when freq is large, and smaller values when freq is small.

Parameters:
freq - the frequency of a term within a document
Returns:
a score factor based on a term's within-document frequency

idfExplain

public Explanation.IDFExplanation idfExplain(Term term,
                                             Searcher searcher,
                                             int docFreq)
                                      throws IOException
Computes a score factor for a simple term and returns an explanation for that score factor.

The default implementation uses:

 idf(searcher.docFreq(term), searcher.maxDoc());
Note that Searcher.maxDoc() is used instead of IndexReader#numDocs() because also Searcher.docFreq(Term) is used, and when the latter is inaccurate, so is Searcher.maxDoc(), and in the same direction. In addition, Searcher.maxDoc() is more efficient to compute

Parameters:
term - the term in question
searcher - the document collection being searched
Returns:
an IDFExplain object that includes both an idf score factor and an explanation for the term.
Throws:
IOException

idfExplain

public Explanation.IDFExplanation idfExplain(Term term,
                                             Searcher searcher)
                                      throws IOException
This method forwards to idfExplain(Term,Searcher,int) by passing searcher.docFreq(term) as the docFreq. WARNING: if you subclass Similariary and override this method then you may hit a peformance hit for certain queries. Better to override idfExplain(Term,Searcher,int) instead.

Throws:
IOException

idfExplain

public Explanation.IDFExplanation idfExplain(Collection<Term> terms,
                                             Searcher searcher)
                                      throws IOException
Computes a score factor for a phrase.

The default implementation sums the idf factor for each term in the phrase.

Parameters:
terms - the terms in the phrase
searcher - the document collection being searched
Returns:
an IDFExplain object that includes both an idf score factor for the phrase and an explanation for each term.
Throws:
IOException

idf

public abstract float idf(int docFreq,
                          int numDocs)
Computes a score factor based on a term's document frequency (the number of documents which contain the term). This value is multiplied by the tf(int) factor for each term in the query and these products are then summed to form the initial score for a document.

Terms that occur in fewer documents are better indicators of topic, so implementations of this method usually return larger values for rare terms, and smaller values for common terms.

Parameters:
docFreq - the number of documents which contain the term
numDocs - the total number of documents in the collection
Returns:
a score factor based on the term's document frequency

coord

public abstract float coord(int overlap,
                            int maxOverlap)
Computes a score factor based on the fraction of all query terms that a document contains. This value is multiplied into scores.

The presence of a large portion of the query terms indicates a better match with the query, so implementations of this method usually return larger values when the ratio between these parameters is large and smaller values when the ratio between them is small.

Parameters:
overlap - the number of query terms matched in the document
maxOverlap - the total number of terms in the query
Returns:
a score factor based on term overlap with the query

scorePayload

public float scorePayload(int docId,
                          String fieldName,
                          int start,
                          int end,
                          byte[] payload,
                          int offset,
                          int length)
Calculate a scoring factor based on the data in the payload. Overriding implementations are responsible for interpreting what is in the payload. Lucene makes no assumptions about what is in the byte array.

The default implementation returns 1.

Parameters:
docId - The docId currently being scored. If this value is NO_DOC_ID_PROVIDED, then it should be assumed that the PayloadQuery implementation does not provide document information
fieldName - The fieldName of the term this payload belongs to
start - The start position of the payload
end - The end position of the payload
payload - The payload byte array to be scored
offset - The offset into the payload array
length - The length in the array
Returns:
An implementation dependent float to be used as a scoring factor
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimilarityDelegator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class SimilarityDelegator

java.lang.Object
    extended by  org.apache.lucene.search.Similarity
        extended by  org.apache.lucene.search.SimilarityDelegator
All Implemented Interfaces:
Serializable
Deprecated. this class will be removed in 4.0. Please subclass Similarity or DefaultSimilarity instead.

@Deprecated
public class SimilarityDelegator
extends Similarity

Expert: Delegating scoring implementation. Useful in Query.getSimilarity(Searcher) implementations, to override only certain methods of a Searcher's Similarity implementation..

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.search.Similarity
NO_DOC_ID_PROVIDED
Constructor Summary
SimilarityDelegator(Similarity delegee)
Deprecated. Construct a Similarity that delegates all methods to another.
Method Summary
float | computeNorm(String fieldName, FieldInvertState state) Deprecated. Computes the normalization value for a field, given the accumulated state of term processing for this field (see FieldInvertState).
float | coord(int overlap, int maxOverlap) Deprecated. Computes a score factor based on the fraction of all query terms that a document contains.
float | idf(int docFreq, int numDocs) Deprecated. Computes a score factor based on a term's document frequency (the number of documents which contain the term).
float | queryNorm(float sumOfSquaredWeights) Deprecated. Computes the normalization value for a query given the sum of the squared weights of each of the query terms.
float | scorePayload(int docId, String fieldName, int start, int end, byte[] payload, int offset, int length) Deprecated. Calculate a scoring factor based on the data in the payload.
float | sloppyFreq(int distance) Deprecated. Computes the amount of a sloppy phrase match, based on an edit distance.
float | tf(float freq) Deprecated. Computes a score factor based on a term or phrase's frequency in a document.
Methods inherited from class org.apache.lucene.search.Similarity
decodeNorm, decodeNormValue, encodeNorm, encodeNormValue, getDefault, getNormDecoder, idfExplain, idfExplain, idfExplain, lengthNorm, setDefault, tf
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SimilarityDelegator

public SimilarityDelegator(Similarity delegee)
Deprecated.
Construct a Similarity that delegates all methods to another.

Parameters:
delegee - the Similarity implementation to delegate to
Method Detail

computeNorm

public float computeNorm(String fieldName,
                         FieldInvertState state)
Deprecated.
Description copied from class: Similarity
Computes the normalization value for a field, given the accumulated state of term processing for this field (see FieldInvertState).

Implementations should calculate a float value based on the field state and then return that value.

Matches in longer fields are less precise, so implementations of this method usually return smaller values when state.getLength() is large, and larger values when state.getLength() is small.

Note that the return values are computed under IndexWriter.addDocument(org.apache.lucene.document.Document) and then stored using Similarity.encodeNormValue(float). Thus they have limited precision, and documents must be re-indexed if this method is altered.

For backward compatibility this method by default calls
 Similarity.lengthNorm(String, int) passing
 FieldInvertState.getLength() as the second argument, and
 then multiplies this value by FieldInvertState.getBoost().

Specified by:
computeNorm in class Similarity
Parameters:
fieldName - field name
state - current processing state for this field
Returns:
the calculated float norm

queryNorm

public float queryNorm(float sumOfSquaredWeights)
Deprecated.
Description copied from class: Similarity
Computes the normalization value for a query given the sum of the squared weights of each of the query terms. This value is multiplied into the weight of each query term. While the classic query normalization factor is computed as 1/sqrt(sumOfSquaredWeights), other implementations might completely ignore sumOfSquaredWeights (ie return 1).

This does not affect ranking, but the default implementation does make scores from different queries more comparable than they would be by eliminating the magnitude of the Query vector as a factor in the score.

Specified by:
queryNorm in class Similarity
Parameters:
sumOfSquaredWeights - the sum of the squares of query term weights
Returns:
a normalization factor for query weights

tf

public float tf(float freq)
Deprecated.
Description copied from class: Similarity
Computes a score factor based on a term or phrase's frequency in a document. This value is multiplied by the Similarity.idf(int, int) factor for each term in the query and these products are then summed to form the initial score for a document.

Terms and phrases repeated in a document indicate the topic of the document, so implementations of this method usually return larger values when freq is large, and smaller values when freq is small.

Specified by:
tf in class Similarity
Parameters:
freq - the frequency of a term within a document
Returns:
a score factor based on a term's within-document frequency

sloppyFreq

public float sloppyFreq(int distance)
Deprecated.
Description copied from class: Similarity
Computes the amount of a sloppy phrase match, based on an edit distance. This value is summed for each sloppy phrase match in a document to form the frequency that is passed to Similarity.tf(float).

A phrase match with a small edit distance to a document passage more closely matches the document, so implementations of this method usually return larger values when the edit distance is small and smaller values when it is large.

Specified by:
sloppyFreq in class Similarity
Parameters:
distance - the edit distance of this sloppy phrase match
Returns:
the frequency increment for this match
See Also:
PhraseQuery.setSlop(int)

idf

public float idf(int docFreq,
                 int numDocs)
Deprecated.
Description copied from class: Similarity
Computes a score factor based on a term's document frequency (the number of documents which contain the term). This value is multiplied by the Similarity.tf(int) factor for each term in the query and these products are then summed to form the initial score for a document.

Terms that occur in fewer documents are better indicators of topic, so implementations of this method usually return larger values for rare terms, and smaller values for common terms.

Specified by:
idf in class Similarity
Parameters:
docFreq - the number of documents which contain the term
numDocs - the total number of documents in the collection
Returns:
a score factor based on the term's document frequency

coord

public float coord(int overlap,
                   int maxOverlap)
Deprecated.
Description copied from class: Similarity
Computes a score factor based on the fraction of all query terms that a document contains. This value is multiplied into scores.

The presence of a large portion of the query terms indicates a better match with the query, so implementations of this method usually return larger values when the ratio between these parameters is large and smaller values when the ratio between them is small.

Specified by:
coord in class Similarity
Parameters:
overlap - the number of query terms matched in the document
maxOverlap - the total number of terms in the query
Returns:
a score factor based on term overlap with the query

scorePayload

public float scorePayload(int docId,
                          String fieldName,
                          int start,
                          int end,
                          byte[] payload,
                          int offset,
                          int length)
Deprecated.
Description copied from class: Similarity
Calculate a scoring factor based on the data in the payload. Overriding implementations are responsible for interpreting what is in the payload. Lucene makes no assumptions about what is in the byte array.

The default implementation returns 1.

Overrides:
scorePayload in class Similarity
Parameters:
docId - The docId currently being scored. If this value is Similarity.NO_DOC_ID_PROVIDED, then it should be assumed that the PayloadQuery implementation does not provide document information
fieldName - The fieldName of the term this payload belongs to
start - The start position of the payload
end - The end position of the payload
payload - The payload byte array to be scored
offset - The offset into the payload array
length - The length in the array
Returns:
An implementation dependent float to be used as a scoring factor
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SingleTermEnum

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class SingleTermEnum

java.lang.Object
    extended by  org.apache.lucene.index.TermEnum
        extended by  org.apache.lucene.search.FilteredTermEnum
            extended by  org.apache.lucene.search.SingleTermEnum
All Implemented Interfaces:
Closeable
public class SingleTermEnum
extends FilteredTermEnum

Subclass of FilteredTermEnum for enumerating a single term.

This can be used by MultiTermQuerys that need only visit one term, but want to preserve MultiTermQuery semantics such as MultiTermQuery.rewriteMethod.

Field Summary
Fields inherited from class org.apache.lucene.search.FilteredTermEnum
actualEnum, currentTerm
Constructor Summary
SingleTermEnum(IndexReader reader, Term singleTerm)
Creates a new SingleTermEnum.
Method Summary
float | difference() Equality measure on the term
protected boolean | endEnum() Indicates the end of the enumeration has been reached
protected boolean | termCompare(Term term) Equality compare on the term
Methods inherited from class org.apache.lucene.search.FilteredTermEnum
close, docFreq, next, setEnum, term
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SingleTermEnum

public SingleTermEnum(IndexReader reader,
                      Term singleTerm)
               throws IOException
Creates a new SingleTermEnum.

After calling the constructor the enumeration is already pointing to the term, if it exists.

Throws:
IOException
Method Detail

difference

public float difference()
Description copied from class: FilteredTermEnum
Equality measure on the term

Specified by:
difference in class FilteredTermEnum

endEnum

protected boolean endEnum()
Description copied from class: FilteredTermEnum
Indicates the end of the enumeration has been reached

Specified by:
endEnum in class FilteredTermEnum

termCompare

protected boolean termCompare(Term term)
Description copied from class: FilteredTermEnum
Equality compare on the term

Specified by:
termCompare in class FilteredTermEnum
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Sort

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class Sort

java.lang.Object
    extended by  org.apache.lucene.search.Sort
All Implemented Interfaces:
Serializable
public class Sort
extends Object
implements Serializable

Encapsulates sort criteria for returned hits.

The fields used to determine sort order must be carefully chosen. Documents must contain a single term in such a field, and the value of the term should indicate the document's relative position in a given sort order. The field must be indexed, but should not be tokenized, and does not need to be stored (unless you happen to want it back with the rest of your document data). In other words:

document.add (new Field ("byNumber", Integer.toString(x), Field.Store.NO, Field.Index.NOT_ANALYZED));

Valid Types of Values

There are four possible kinds of term values which may be put into sorting fields: Integers, Longs, Floats, or Strings. Unless SortField objects are specified, the type of value in the field is determined by parsing the first term in the field.

Integer term values should contain only digits and an optional preceding negative sign. Values must be base 10 and in the range Integer.MIN_VALUE and Integer.MAX_VALUE inclusive. Documents which should appear first in the sort should have low value integers, later documents high values (i.e. the documents should be numbered 1..n where 1 is the first and n the last).

Long term values should contain only digits and an optional preceding negative sign. Values must be base 10 and in the range Long.MIN_VALUE and Long.MAX_VALUE inclusive. Documents which should appear first in the sort should have low value integers, later documents high values.

Float term values should conform to values accepted by Float.valueOf(String) (except that NaN and Infinity are not supported). Documents which should appear first in the sort should have low values, later documents high values.

String term values can contain any valid String, but should not be tokenized. The values are sorted according to their natural order. Note that using this type of term value has higher memory requirements than the other two types.

Object Reuse

One of these objects can be used multiple times and the sort order changed between usages.

This class is thread safe.

Memory Usage

Sorting uses of caches of term values maintained by the internal HitQueue(s). The cache is static and contains an integer or float array of length IndexReader.maxDoc() for each field name for which a sort is performed. In other words, the size of the cache in bytes is:

4 * IndexReader.maxDoc() * (# of different fields actually used to sort)

For String fields, the cache is larger: in addition to the above array, the value of every term in the field is kept in memory. If there are many unique terms in the field, this could be quite large.

Note that the size of the cache is not affected by how many fields are in the index and might be used to sort - only by the ones actually used to sort a result set.

Created: Feb 12, 2004 10:53:57 AM

Since:
lucene 1.4
See Also:
Serialized Form

Field Summary
static Sort | INDEXORDER Represents sorting by index order.
static Sort | RELEVANCE Represents sorting by computed relevance.
Constructor Summary
Sort()
Sorts by computed relevance.
Sort(SortField... fields)
Sorts in succession by the criteria in each SortField.
Sort(SortField field)
Sorts by the criteria in the given SortField.
Method Summary
boolean | equals(Object o) Returns true if o is equal to this.
SortField[] | getSort() Representation of the sort criteria.
int | hashCode() Returns a hash code value for this object.
void | setSort(SortField... fields) Sets the sort to the given criteria in succession.
void | setSort(SortField field) Sets the sort to the given criteria.
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

RELEVANCE

public static final Sort RELEVANCE
Represents sorting by computed relevance. Using this sort criteria returns the same results as calling Searcher#search()without a sort criteria, only with slightly more overhead.

INDEXORDER

public static final Sort INDEXORDER
Represents sorting by index order.

Constructor Detail

Sort

public Sort()
Sorts by computed relevance. This is the same sort criteria as calling Searcher#search()without a sort criteria, only with slightly more overhead.

Sort

public Sort(SortField field)
Sorts by the criteria in the given SortField.

Sort

public Sort(SortField... fields)
Sorts in succession by the criteria in each SortField.

Method Detail

setSort

public void setSort(SortField field)
Sets the sort to the given criteria.

setSort

public void setSort(SortField... fields)
Sets the sort to the given criteria in succession.

getSort

public SortField[] getSort()
Representation of the sort criteria.

Returns:
Array of SortField objects used in this sort criteria

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Returns true if o is equal to this.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SortField

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class SortField

java.lang.Object
    extended by  org.apache.lucene.search.SortField
All Implemented Interfaces:
Serializable
public class SortField
extends Object
implements Serializable

Stores information about how to sort documents by terms in an individual field. Fields must be indexed in order to sort by them.

Created: Feb 11, 2004 1:25:29 PM

Since:
lucene 1.4
See Also:
Sort, Serialized Form

Field Summary
static int | BYTE Sort using term values as encoded Bytes.
static int | CUSTOM Sort using a custom Comparator.
static int | DOC Sort by document number (index order).
static int | DOUBLE Sort using term values as encoded Doubles.
static SortField | FIELD_DOC Represents sorting by document number (index order).
static SortField | FIELD_SCORE Represents sorting by document score (relevance).
static int | FLOAT Sort using term values as encoded Floats.
static int | INT Sort using term values as encoded Integers.
static int | LONG Sort using term values as encoded Longs.
static int | SCORE Sort by document score (relevance).
static int | SHORT Sort using term values as encoded Shorts.
static int | STRING Sort using term values as Strings.
static int | STRING_VAL Sort using term values as Strings, but comparing by value (using String.compareTo) for all comparisons.
Constructor Summary
SortField(String field, FieldCache.Parser parser)
Creates a sort by terms in the given field, parsed to numeric values using a custom FieldCache.Parser.
SortField(String field, FieldCache.Parser parser, boolean reverse)
Creates a sort, possibly in reverse, by terms in the given field, parsed to numeric values using a custom FieldCache.Parser.
SortField(String field, FieldComparatorSource comparator)
Creates a sort with a custom comparison function.
SortField(String field, FieldComparatorSource comparator, boolean reverse)
Creates a sort, possibly in reverse, with a custom comparison function.
SortField(String field, int type)
Creates a sort by terms in the given field with the type of term values explicitly given.
SortField(String field, int type, boolean reverse)
Creates a sort, possibly in reverse, by terms in the given field with the type of term values explicitly given.
SortField(String field, Locale locale)
Creates a sort by terms in the given field sorted according to the given locale.
SortField(String field, Locale locale, boolean reverse)
Creates a sort, possibly in reverse, by terms in the given field sorted according to the given locale.
Method Summary
boolean | equals(Object o) Returns true if o is equal to this.
FieldComparator<?> | getComparator(int numHits, int sortPos) Returns the FieldComparator to use for sorting.
FieldComparatorSource | getComparatorSource() Returns the FieldComparatorSource used for custom sorting
String | getField() Returns the name of the field.
Locale | getLocale() Returns the Locale by which term values are interpreted.
FieldCache.Parser | getParser() Returns the instance of a FieldCache parser that fits to the given sort type.
boolean | getReverse() Returns whether the sort should be reversed.
int | getType() Returns the type of contents in the field.
int | hashCode() Returns true if o is equal to this.
SortField | setMissingValue(Object missingValue) Set a default sorting value for documents which lacks one
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

SCORE

public static final int SCORE
Sort by document score (relevance). Sort values are Float and higher values are at the front.

See Also:
Constant Field Values

DOC

public static final int DOC
Sort by document number (index order). Sort values are Integer and lower values are at the front.

See Also:
Constant Field Values

STRING

public static final int STRING
Sort using term values as Strings. Sort values are String and lower values are at the front.

See Also:
Constant Field Values

INT

public static final int INT
Sort using term values as encoded Integers. Sort values are Integer and lower values are at the front.

See Also:
Constant Field Values

FLOAT

public static final int FLOAT
Sort using term values as encoded Floats. Sort values are Float and lower values are at the front.

See Also:
Constant Field Values

LONG

public static final int LONG
Sort using term values as encoded Longs. Sort values are Long and lower values are at the front.

See Also:
Constant Field Values

DOUBLE

public static final int DOUBLE
Sort using term values as encoded Doubles. Sort values are Double and lower values are at the front.

See Also:
Constant Field Values

SHORT

public static final int SHORT
Sort using term values as encoded Shorts. Sort values are Short and lower values are at the front.

See Also:
Constant Field Values

CUSTOM

public static final int CUSTOM
Sort using a custom Comparator. Sort values are any Comparable and sorting is done according to natural order.

See Also:
Constant Field Values

BYTE

public static final int BYTE
Sort using term values as encoded Bytes. Sort values are Byte and lower values are at the front.

See Also:
Constant Field Values

STRING_VAL

public static final int STRING_VAL
Sort using term values as Strings, but comparing by value (using String.compareTo) for all comparisons. This is typically slower than STRING, which uses ordinals to do the sorting.

See Also:
Constant Field Values

FIELD_SCORE

public static final SortField FIELD_SCORE
Represents sorting by document score (relevance).

FIELD_DOC

public static final SortField FIELD_DOC
Represents sorting by document number (index order).

Constructor Detail

SortField

public SortField(String field,
                 int type)
Creates a sort by terms in the given field with the type of term values explicitly given.

Parameters:
field - Name of field to sort by. Can be null if type is SCORE or DOC.
type - Type of values in the terms.

SortField

public SortField(String field,
                 int type,
                 boolean reverse)
Creates a sort, possibly in reverse, by terms in the given field with the type of term values explicitly given.

Parameters:
field - Name of field to sort by. Can be null if type is SCORE or DOC.
type - Type of values in the terms.
reverse - True if natural order should be reversed.

SortField

public SortField(String field,
                 FieldCache.Parser parser)
Creates a sort by terms in the given field, parsed to numeric values using a custom FieldCache.Parser.

Parameters:
field - Name of field to sort by. Must not be null.
parser - Instance of a FieldCache.Parser, which must subclass one of the existing numeric parsers from FieldCache. Sort type is inferred by testing which numeric parser the parser subclasses.
Throws:
IllegalArgumentException - if the parser fails to subclass an existing numeric parser, or field is null

SortField

public SortField(String field,
                 FieldCache.Parser parser,
                 boolean reverse)
Creates a sort, possibly in reverse, by terms in the given field, parsed to numeric values using a custom FieldCache.Parser.

Parameters:
field - Name of field to sort by. Must not be null.
parser - Instance of a FieldCache.Parser, which must subclass one of the existing numeric parsers from FieldCache. Sort type is inferred by testing which numeric parser the parser subclasses.
reverse - True if natural order should be reversed.
Throws:
IllegalArgumentException - if the parser fails to subclass an existing numeric parser, or field is null

SortField

public SortField(String field,
                 Locale locale)
Creates a sort by terms in the given field sorted according to the given locale.

Parameters:
field - Name of field to sort by, cannot be null.
locale - Locale of values in the field.

SortField

public SortField(String field,
                 Locale locale,
                 boolean reverse)
Creates a sort, possibly in reverse, by terms in the given field sorted according to the given locale.

Parameters:
field - Name of field to sort by, cannot be null.
locale - Locale of values in the field.

SortField

public SortField(String field,
                 FieldComparatorSource comparator)
Creates a sort with a custom comparison function.

Parameters:
field - Name of field to sort by; cannot be null.
comparator - Returns a comparator for sorting hits.

SortField

public SortField(String field,
                 FieldComparatorSource comparator,
                 boolean reverse)
Creates a sort, possibly in reverse, with a custom comparison function.

Parameters:
field - Name of field to sort by; cannot be null.
comparator - Returns a comparator for sorting hits.
reverse - True if natural order should be reversed.
Method Detail

setMissingValue

public SortField setMissingValue(Object missingValue)
Set a default sorting value for documents which lacks one

getField

public String getField()
Returns the name of the field. Could return null if the sort is by SCORE or DOC.

Returns:
Name of field, possibly null.

getType

public int getType()
Returns the type of contents in the field.

Returns:
One of the constants SCORE, DOC, STRING, INT or FLOAT.

getLocale

public Locale getLocale()
Returns the Locale by which term values are interpreted. May return null if no Locale was specified.

Returns:
Locale, or null.

getParser

public FieldCache.Parser getParser()
Returns the instance of a FieldCache parser that fits to the given sort type. May return null if no parser was specified. Sorting is using the default parser then.

Returns:
An instance of a FieldCache parser, or null.

getReverse

public boolean getReverse()
Returns whether the sort should be reversed.

Returns:
True if natural order should be reversed.

getComparatorSource

public FieldComparatorSource getComparatorSource()
Returns the FieldComparatorSource used for custom sorting

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Returns true if o is equal to this. If a FieldComparatorSource or FieldCache.Parser was provided, it must properly implement equals (unless a singleton is always used).

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns true if o is equal to this. If a FieldComparatorSource or FieldCache.Parser was provided, it must properly implement hashCode (unless a singleton is always used).

Overrides:
hashCode in class Object

getComparator

public FieldComparator<?> getComparator(int numHits,
                                        int sortPos)
                                 throws IOException
Returns the FieldComparator to use for sorting.

Parameters:
numHits - number of top hits the queue will store
sortPos - position of this SortField within Sort. The comparator is primary if sortPos==0, secondary if sortPos==1, etc. Some comparators can optimize themselves when they are the primary sort.
Returns:
FieldComparator to use when sorting
Throws:
IOException
WARNING: This API is experimental and might change in incompatible ways in the next release.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class SpanFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.SpanFilter
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CachingSpanFilter, SpanQueryFilter
public abstract class SpanFilter
extends Filter

Abstract base class providing a mechanism to restrict searches to a subset of an index and also maintains and returns position information. This is useful if you want to compare the positions from a SpanQuery with the positions of items in a filter. For instance, if you had a SpanFilter that marked all the occurrences of the word "foo" in documents, and then you entered a new SpanQuery containing bar, you could not only filter by the word foo, but you could then compare position information for post processing.

See Also:
Serialized Form

Constructor Summary
SpanFilter()
Method Summary
abstract  SpanFilterResult bitSpans(IndexReader reader)
Returns a SpanFilterResult with true for documents which should be permitted in search results, and false for those that should not and Spans for where the true docs match.
Methods inherited from class org.apache.lucene.search.Filter
getDocIdSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanFilter

public SpanFilter()
Method Detail

bitSpans

public abstract SpanFilterResult bitSpans(IndexReader reader)
                                   throws IOException
Returns a SpanFilterResult with true for documents which should be permitted in search results, and false for those that should not and Spans for where the true docs match.

Parameters:
reader - The IndexReader to load position and DocIdSet information from
Returns:
A SpanFilterResult
Throws:
IOException - if there was an issue accessing the necessary information
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanFilterResult

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class SpanFilterResult

java.lang.Object
    extended by  org.apache.lucene.search.SpanFilterResult

public class SpanFilterResult
extends Object

The results of a SpanQueryFilter. Wraps the BitSet and the position information from the SpanQuery

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | SpanFilterResult.PositionInfo
static class | SpanFilterResult.StartEnd
Constructor Summary
SpanFilterResult(DocIdSet docIdSet, List<SpanFilterResult.PositionInfo> positions)
Method Summary
DocIdSet | getDocIdSet() Returns the docIdSet
List<SpanFilterResult.PositionInfo> | getPositions() The first entry in the array corresponds to the first "on" bit.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanFilterResult

public SpanFilterResult(DocIdSet docIdSet,
                        List<SpanFilterResult.PositionInfo> positions)
Parameters:
docIdSet - The DocIdSet for the Filter
positions - A List of SpanFilterResult.PositionInfo objects
Method Detail

getPositions

public List<SpanFilterResult.PositionInfo> getPositions()
The first entry in the array corresponds to the first "on" bit. Entries are increasing by document order

Returns:
A List of PositionInfo objects

getDocIdSet

public DocIdSet getDocIdSet()
Returns the docIdSet

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanFilterResult.PositionInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class SpanFilterResult.PositionInfo

java.lang.Object
    extended by  org.apache.lucene.search.SpanFilterResult.PositionInfo
Enclosing class:
SpanFilterResult
public static class SpanFilterResult.PositionInfo
extends Object

Constructor Summary
SpanFilterResult.PositionInfo(int doc)
Method Summary
void | addPosition(int start, int end)
int | getDoc()
List<SpanFilterResult.StartEnd> | getPositions()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanFilterResult.PositionInfo

public SpanFilterResult.PositionInfo(int doc)
Method Detail

addPosition

public void addPosition(int start,
                        int end)

getDoc

public int getDoc()

getPositions

public List<SpanFilterResult.StartEnd> getPositions()
Returns:
Positions
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanFilterResult.StartEnd

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class SpanFilterResult.StartEnd

java.lang.Object
    extended by  org.apache.lucene.search.SpanFilterResult.StartEnd
Enclosing class:
SpanFilterResult
public static class SpanFilterResult.StartEnd
extends Object

Constructor Summary
SpanFilterResult.StartEnd(int start, int end)
Method Summary
int | getEnd()
int | getStart() The Start position
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanFilterResult.StartEnd

public SpanFilterResult.StartEnd(int start,
                                 int end)
Method Detail

getEnd

public int getEnd()
Returns:
The end position of this match

getStart

public int getStart()
The Start position

Returns:
The start position of this match
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanQueryFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class SpanQueryFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.SpanFilter
            extended by  org.apache.lucene.search.SpanQueryFilter
All Implemented Interfaces:
Serializable
public class SpanQueryFilter
extends SpanFilter

Constrains search results to only match those which also match a provided query. Also provides position information about where each document matches at the cost of extra space compared with the QueryWrapperFilter. There is an added cost to this above what is stored in a QueryWrapperFilter. Namely, the position information for each matching document is stored.

This filter does not cache. See the CachingSpanFilter for a wrapper that caches.

See Also:
Serialized Form

Field Summary
protected  SpanQuery query
Constructor Summary
protected | SpanQueryFilter()
 | SpanQueryFilter(SpanQuery query) Constructs a filter which only matches documents matching query.
Method Summary
SpanFilterResult | bitSpans(IndexReader reader) Returns a SpanFilterResult with true for documents which should be permitted in search results, and false for those that should not and Spans for where the true docs match.
boolean | equals(Object o)
DocIdSet | getDocIdSet(IndexReader reader) Creates a DocIdSet enumerating the documents that should be permitted in search results.
SpanQuery | getQuery()
int | hashCode()
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

query

protected SpanQuery query
Constructor Detail

SpanQueryFilter

protected SpanQueryFilter()

SpanQueryFilter

public SpanQueryFilter(SpanQuery query)
Constructs a filter which only matches documents matching query.

Parameters:
query - The SpanQuery to use as the basis for the Filter.
Method Detail

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Description copied from class: Filter
Creates a DocIdSet enumerating the documents that should be permitted in search results. NOTE: null can be returned if no documents are accepted by this Filter.

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet

bitSpans

public SpanFilterResult bitSpans(IndexReader reader)
                          throws IOException
Description copied from class: SpanFilter
Returns a SpanFilterResult with true for documents which should be permitted in search results, and false for those that should not and Spans for where the true docs match.

Specified by:
bitSpans in class SpanFilter
Parameters:
reader - The IndexReader to load position and DocIdSet information from
Returns:
A SpanFilterResult
Throws:
IOException - if there was an issue accessing the necessary information

getQuery

public SpanQuery getQuery()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class TermQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.TermQuery
All Implemented Interfaces:
Serializable, Cloneable
public class TermQuery
extends Query

A Query that matches documents containing a term. This may be combined with other terms with a BooleanQuery.

See Also:
Serialized Form

Constructor Summary
TermQuery(Term t)
Constructs a query for the term t.
Method Summary
Weight | createWeight(Searcher searcher) Expert: Constructs an appropriate Weight implementation for this query.
boolean | equals(Object o) Returns true iff o is equal to this.
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
Term | getTerm() Returns the term of this query.
int | hashCode() Returns a hash code value for this object.
String | toString(String field) Prints a user-readable version of this query.
Methods inherited from class org.apache.lucene.search.Query
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, rewrite, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

TermQuery

public TermQuery(Term t)
Constructs a query for the term t.

Method Detail

getTerm

public Term getTerm()
Returns the term of this query.

createWeight

public Weight createWeight(Searcher searcher)
                    throws IOException
Description copied from class: Query
Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Overrides:
createWeight in class Query
Throws:
IOException

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

toString

public String toString(String field)
Prints a user-readable version of this query.

Specified by:
toString in class Query

equals

public boolean equals(Object o)
Returns true iff o is equal to this.

Overrides:
equals in class Query

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermRangeFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class TermRangeFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.MultiTermQueryWrapperFilter<TermRangeQuery>
            extended by  org.apache.lucene.search.TermRangeFilter
All Implemented Interfaces:
Serializable
public class TermRangeFilter
extends MultiTermQueryWrapperFilter<TermRangeQuery>

A Filter that restricts search results to a range of term values in a given field.

This filter matches the documents looking for terms that fall into the supplied range according to String.compareTo(String), unless a Collator is provided. It is not intended for numerical ranges; use NumericRangeFilter instead.

If you construct a large number of range filters with different ranges but on the same field, FieldCacheRangeFilter may have significantly better performance.

Since:
2.9
See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.search.MultiTermQueryWrapperFilter
query
Constructor Summary
TermRangeFilter(String fieldName, String lowerTerm, String upperTerm, boolean includeLower, boolean includeUpper)
TermRangeFilter(String fieldName, String lowerTerm, String upperTerm, boolean includeLower, boolean includeUpper, Collator collator)
WARNING: Using this constructor and supplying a non-null value in the collator parameter will cause every single index Term in the Field referenced by lowerTerm and/or upperTerm to be examined.
Method Summary
Collator | getCollator() Returns the collator used to determine range inclusion, if any.
String | getField() Returns the field name for this filter
String | getLowerTerm() Returns the lower value of this range filter
String | getUpperTerm() Returns the upper value of this range filter
boolean | includesLower() Returns true if the lower endpoint is inclusive
boolean | includesUpper() Returns true if the upper endpoint is inclusive
static TermRangeFilter | Less(String fieldName, String upperTerm) Constructs a filter for field fieldName matching less than or equal to upperTerm.
static TermRangeFilter | More(String fieldName, String lowerTerm) Constructs a filter for field fieldName matching greater than or equal to lowerTerm.
Methods inherited from class org.apache.lucene.search.MultiTermQueryWrapperFilter
clearTotalNumberOfTerms, equals, getDocIdSet, getTotalNumberOfTerms, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

TermRangeFilter

public TermRangeFilter(String fieldName,
                       String lowerTerm,
                       String upperTerm,
                       boolean includeLower,
                       boolean includeUpper)
Parameters:
fieldName - The field this range applies to
lowerTerm - The lower bound on this range
upperTerm - The upper bound on this range
includeLower - Does this range include the lower bound?
includeUpper - Does this range include the upper bound?
Throws:
IllegalArgumentException - if both terms are null or if lowerTerm is null and includeLower is true (similar for upperTerm and includeUpper)

TermRangeFilter

public TermRangeFilter(String fieldName,
                       String lowerTerm,
                       String upperTerm,
                       boolean includeLower,
                       boolean includeUpper,
                       Collator collator)
WARNING: Using this constructor and supplying a non-null value in the collator parameter will cause every single index Term in the Field referenced by lowerTerm and/or upperTerm to be examined. Depending on the number of index Terms in this Field, the operation could be very slow.

Parameters:
lowerTerm - The lower bound on this range
upperTerm - The upper bound on this range
includeLower - Does this range include the lower bound?
includeUpper - Does this range include the upper bound?
collator - The collator to use when determining range inclusion; set to null to use Unicode code point ordering instead of collation.
Throws:
IllegalArgumentException - if both terms are null or if lowerTerm is null and includeLower is true (similar for upperTerm and includeUpper)
Method Detail

Less

public static TermRangeFilter Less(String fieldName,
                                   String upperTerm)
Constructs a filter for field fieldName matching less than or equal to upperTerm.

More

public static TermRangeFilter More(String fieldName,
                                   String lowerTerm)
Constructs a filter for field fieldName matching greater than or equal to lowerTerm.

getField

public String getField()
Returns the field name for this filter

getLowerTerm

public String getLowerTerm()
Returns the lower value of this range filter

getUpperTerm

public String getUpperTerm()
Returns the upper value of this range filter

includesLower

public boolean includesLower()
Returns true if the lower endpoint is inclusive

includesUpper

public boolean includesUpper()
Returns true if the upper endpoint is inclusive

getCollator

public Collator getCollator()
Returns the collator used to determine range inclusion, if any.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermRangeQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class TermRangeQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.MultiTermQuery
            extended by  org.apache.lucene.search.TermRangeQuery
All Implemented Interfaces:
Serializable, Cloneable
public class TermRangeQuery
extends MultiTermQuery

A Query that matches documents within an range of terms.

This query matches the documents looking for terms that fall into the supplied range according to String.compareTo(String), unless a Collator is provided. It is not intended for numerical ranges; use NumericRangeQuery instead.

This query uses the MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT rewrite method.

Since:
2.9
See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.MultiTermQuery
MultiTermQuery.ConstantScoreAutoRewrite, MultiTermQuery.RewriteMethod, MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite, MultiTermQuery.TopTermsScoringBooleanQueryRewrite
Field Summary
Fields inherited from class org.apache.lucene.search.MultiTermQuery
CONSTANT_SCORE_AUTO_REWRITE_DEFAULT, CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE, CONSTANT_SCORE_FILTER_REWRITE, rewriteMethod, SCORING_BOOLEAN_QUERY_REWRITE
Constructor Summary
TermRangeQuery(String field, String lowerTerm, String upperTerm, boolean includeLower, boolean includeUpper)
Constructs a query selecting all terms greater/equal than lowerTerm but less/equal than upperTerm.
TermRangeQuery(String field, String lowerTerm, String upperTerm, boolean includeLower, boolean includeUpper, Collator collator)
Constructs a query selecting all terms greater/equal than lowerTerm but less/equal than upperTerm.
Method Summary
boolean | equals(Object obj)
Collator | getCollator() Returns the collator used to determine range inclusion, if any.
protected FilteredTermEnum | getEnum(IndexReader reader) Construct the enumeration to be used, expanding the pattern term.
String | getField() Returns the field name for this query
String | getLowerTerm() Returns the lower value of this range query
String | getUpperTerm() Returns the upper value of this range query
int | hashCode()
boolean | includesLower() Returns true if the lower endpoint is inclusive
boolean | includesUpper() Returns true if the upper endpoint is inclusive
String | toString(String field) Prints a user-readable version of this query.
Methods inherited from class org.apache.lucene.search.MultiTermQuery
clearTotalNumberOfTerms, getRewriteMethod, getTotalNumberOfTerms, incTotalNumberOfTerms, rewrite, setRewriteMethod
Methods inherited from class org.apache.lucene.search.Query
clone, combine, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

TermRangeQuery

public TermRangeQuery(String field,
                      String lowerTerm,
                      String upperTerm,
                      boolean includeLower,
                      boolean includeUpper)
Constructs a query selecting all terms greater/equal than lowerTerm but less/equal than upperTerm.

If an endpoint is null, it is said to be "open". Either or both endpoints may be open. Open endpoints may not be exclusive (you can't select all but the first or last term without explicitly specifying the term to exclude.)

Parameters:
field - The field that holds both lower and upper terms.
lowerTerm - The term text at the lower end of the range
upperTerm - The term text at the upper end of the range
includeLower - If true, the lowerTerm is included in the range.
includeUpper - If true, the upperTerm is included in the range.

TermRangeQuery

public TermRangeQuery(String field,
                      String lowerTerm,
                      String upperTerm,
                      boolean includeLower,
                      boolean includeUpper,
                      Collator collator)
Constructs a query selecting all terms greater/equal than lowerTerm but less/equal than upperTerm.

If an endpoint is null, it is said to be "open". Either or both endpoints may be open. Open endpoints may not be exclusive (you can't select all but the first or last term without explicitly specifying the term to exclude.)

If collator is not null, it will be used to decide whether index terms are within the given range, rather than using the Unicode code point order in which index terms are stored.

WARNING: Using this constructor and supplying a non-null value in the collator parameter will cause every single index Term in the Field referenced by lowerTerm and/or upperTerm to be examined. Depending on the number of index Terms in this Field, the operation could be very slow.

Parameters:
lowerTerm - The Term text at the lower end of the range
upperTerm - The Term text at the upper end of the range
includeLower - If true, the lowerTerm is included in the range.
includeUpper - If true, the upperTerm is included in the range.
collator - The collator to use to collate index Terms, to determine their membership in the range bounded by lowerTerm and upperTerm.
Method Detail

getField

public String getField()
Returns the field name for this query

getLowerTerm

public String getLowerTerm()
Returns the lower value of this range query

getUpperTerm

public String getUpperTerm()
Returns the upper value of this range query

includesLower

public boolean includesLower()
Returns true if the lower endpoint is inclusive

includesUpper

public boolean includesUpper()
Returns true if the upper endpoint is inclusive

getCollator

public Collator getCollator()
Returns the collator used to determine range inclusion, if any.

getEnum

protected FilteredTermEnum getEnum(IndexReader reader)
                            throws IOException
Description copied from class: MultiTermQuery
Construct the enumeration to be used, expanding the pattern term.

Specified by:
getEnum in class MultiTermQuery
Throws:
IOException

toString

public String toString(String field)
Prints a user-readable version of this query.

Specified by:
toString in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class MultiTermQuery

equals

public boolean equals(Object obj)
Overrides:
equals in class MultiTermQuery
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermRangeTermEnum

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class TermRangeTermEnum

java.lang.Object
    extended by  org.apache.lucene.index.TermEnum
        extended by  org.apache.lucene.search.FilteredTermEnum
            extended by  org.apache.lucene.search.TermRangeTermEnum
All Implemented Interfaces:
Closeable
public class TermRangeTermEnum
extends FilteredTermEnum

Subclass of FilteredTermEnum for enumerating all terms that match the specified range parameters.

Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.

Since:
2.9

Field Summary
Fields inherited from class org.apache.lucene.search.FilteredTermEnum
actualEnum, currentTerm
Constructor Summary
TermRangeTermEnum(IndexReader reader, String field, String lowerTermText, String upperTermText, boolean includeLower, boolean includeUpper, Collator collator)
Enumerates all terms greater/equal than lowerTerm but less/equal than upperTerm.
Method Summary
float | difference() Equality measure on the term
protected boolean | endEnum() Indicates the end of the enumeration has been reached
protected boolean | termCompare(Term term) Equality compare on the term
Methods inherited from class org.apache.lucene.search.FilteredTermEnum
close, docFreq, next, setEnum, term
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TermRangeTermEnum

public TermRangeTermEnum(IndexReader reader,
                         String field,
                         String lowerTermText,
                         String upperTermText,
                         boolean includeLower,
                         boolean includeUpper,
                         Collator collator)
                  throws IOException
Enumerates all terms greater/equal than lowerTerm but less/equal than upperTerm. If an endpoint is null, it is said to be "open". Either or both endpoints may be open. Open endpoints may not be exclusive (you can't select all but the first or last term without explicitly specifying the term to exclude.)

Parameters:
reader -
field - An interned field that holds both lower and upper terms.
lowerTermText - The term text at the lower end of the range
upperTermText - The term text at the upper end of the range
includeLower - If true, the lowerTerm is included in the range.
includeUpper - If true, the upperTerm is included in the range.
collator - The collator to use to collate index Terms, to determine their membership in the range bounded by lowerTerm and upperTerm.
Throws:
IOException
Method Detail

difference

public float difference()
Description copied from class: FilteredTermEnum
Equality measure on the term

Specified by:
difference in class FilteredTermEnum

endEnum

protected boolean endEnum()
Description copied from class: FilteredTermEnum
Indicates the end of the enumeration has been reached

Specified by:
endEnum in class FilteredTermEnum

termCompare

protected boolean termCompare(Term term)
Description copied from class: FilteredTermEnum
Equality compare on the term

Specified by:
termCompare in class FilteredTermEnum
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermsFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class TermsFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.TermsFilter
All Implemented Interfaces:
Serializable
public class TermsFilter
extends Filter

Constructs a filter for docs matching any of the terms added to this class. Unlike a RangeFilter this can be used for filtering on multiple terms that are not necessarily in a sequence. An example might be a collection of primary keys from a database query result or perhaps a choice of "category" labels picked by the end user. As a filter, this is much faster than the equivalent query (a BooleanQuery with many "should" TermQueries)

See Also:
Serialized Form

Constructor Summary
TermsFilter()
Method Summary
void | addTerm(Term term) Adds a term to the list of acceptable terms
boolean | equals(Object obj)
DocIdSet | getDocIdSet(IndexReader reader) Creates a DocIdSet enumerating the documents that should be permitted in search results.
int | hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TermsFilter

public TermsFilter()
Method Detail

addTerm

public void addTerm(Term term)
Adds a term to the list of acceptable terms

Parameters:
term -

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Description copied from class: Filter
Creates a DocIdSet enumerating the documents that should be permitted in search results. NOTE: null can be returned if no documents are accepted by this Filter.

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TimeLimitingCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class TimeLimitingCollector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.TimeLimitingCollector

public class TimeLimitingCollector
extends Collector

The TimeLimitingCollector is used to timeout search requests that take longer than the maximum allowed search time limit. After this time is exceeded, the search thread is stopped by throwing a TimeLimitingCollector.TimeExceededException.

Nested Class Summary
static class | TimeLimitingCollector.TimeExceededException Thrown when elapsed search time exceeds allowed search time.
static class | TimeLimitingCollector.TimerThread
Constructor Summary
TimeLimitingCollector(Collector collector, Counter clock, long ticksAllowed)
Create a TimeLimitedCollector wrapper over another Collector with a specified timeout.
Method Summary
 boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
 void collect(int doc)
Calls Collector.collect(int) on the decorated Collector unless the allowed time has passed, in which case it throws an exception.
static Counter getGlobalCounter()
Returns the global TimerThreads Counter
static TimeLimitingCollector.TimerThread getGlobalTimerThread()
Returns the global TimeLimitingCollector.TimerThread.
 boolean isGreedy()
Checks if this time limited collector is greedy in collecting the last hit.
 void setBaseline()
Syntactic sugar for setBaseline(long) using Counter.get() on the clock passed to the construcutor.
 void setBaseline(long clockTime)
Sets the baseline for this collector.
 void setCollector(Collector collector)
This is so the same timer can be used with a multi-phase search process such as grouping.
 void setGreedy(boolean greedy)
Sets whether this time limited collector is greedy.
 void setNextReader(IndexReader reader, int base)
Called before collecting from each IndexReader.
 void setScorer(Scorer scorer)
Called before successive calls to Collector.collect(int).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TimeLimitingCollector

public TimeLimitingCollector(Collector collector,
                             Counter clock,
                             long ticksAllowed)
Create a TimeLimitedCollector wrapper over another Collector with a specified timeout.

Parameters:
collector - the wrapped Collector
clock - the timer clock
ticksAllowed - max time allowed for collecting hits after which TimeLimitingCollector.TimeExceededException is thrown
Method Detail

setBaseline

public void setBaseline(long clockTime)
Sets the baseline for this collector. By default the collectors baseline is initialized once the first reader is passed to the collector. To include operations executed in prior to the actual document collection set the baseline through this method in your prelude.

Example usage:

   Counter clock = ...;
   long baseline = clock.get();
   // ... prepare search
   TimeLimitingCollector collector = new TimeLimitingCollector(c, clock, numTicks);
   collector.setBaseline(baseline);
   indexSearcher.search(query, collector);

Parameters:
clockTime -
See Also:
setBaseline()

setBaseline

public void setBaseline()
Syntactic sugar for setBaseline(long) using Counter.get() on the clock passed to the construcutor.

isGreedy

public boolean isGreedy()
Checks if this time limited collector is greedy in collecting the last hit. A non greedy collector, upon a timeout, would throw a TimeLimitingCollector.TimeExceededException without allowing the wrapped collector to collect current doc. A greedy one would first allow the wrapped hit collector to collect current doc and only then throw a TimeLimitingCollector.TimeExceededException.

See Also:
setGreedy(boolean)

setGreedy

public void setGreedy(boolean greedy)
Sets whether this time limited collector is greedy.

Parameters:
greedy - true to make this time limited greedy
See Also:
isGreedy()

collect

public void collect(int doc)
             throws IOException
Calls Collector.collect(int) on the decorated Collector unless the allowed time has passed, in which case it throws an exception.

Specified by:
collect in class Collector
Throws:
TimeLimitingCollector.TimeExceededException - if the time allowed has exceeded.
IOException

setNextReader

public void setNextReader(IndexReader reader,
                          int base)
                   throws IOException
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Specified by:
setNextReader in class Collector
Parameters:
reader - next IndexReader
Throws:
IOException

setScorer

public void setScorer(Scorer scorer)
               throws IOException
Description copied from class: Collector
Called before successive calls to Collector.collect(int). Implementations that need the score of the current document (passed-in to Collector.collect(int)), should save the passed-in Scorer and call scorer.score() when needed.

Specified by:
setScorer in class Collector
Throws:
IOException

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Description copied from class: Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Specified by:
acceptsDocsOutOfOrder in class Collector

setCollector

public void setCollector(Collector collector)
This is so the same timer can be used with a multi-phase search process such as grouping. We don't want to create a new TimeLimitingCollector for each phase because that would reset the timer for each phase. Once time is up subsequent phases need to timeout quickly.

Parameters:
collector - The actual collector performing search functionality

getGlobalCounter

public static Counter getGlobalCounter()
Returns the global TimerThreads Counter

Invoking this creates may create a new instance of TimeLimitingCollector.TimerThread iff the global TimeLimitingCollector.TimerThread has never been accessed before. The thread returned from this method is started on creation and will be alive unless you stop the TimeLimitingCollector.TimerThread via TimeLimitingCollector.TimerThread.stopTimer().

Returns:
the global TimerThreads Counter
WARNING: This API is experimental and might change in incompatible ways in the next release.

getGlobalTimerThread

public static TimeLimitingCollector.TimerThread getGlobalTimerThread()
Returns the global TimeLimitingCollector.TimerThread.

Invoking this creates may create a new instance of TimeLimitingCollector.TimerThread iff the global TimeLimitingCollector.TimerThread has never been accessed before. The thread returned from this method is started on creation and will be alive unless you stop the TimeLimitingCollector.TimerThread via TimeLimitingCollector.TimerThread.stopTimer().

Returns:
the global TimeLimitingCollector.TimerThread
WARNING: This API is experimental and might change in incompatible ways in the next release.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TimeLimitingCollector.TimeExceededException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class TimeLimitingCollector.TimeExceededException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.lang.RuntimeException
                extended by  org.apache.lucene.search.TimeLimitingCollector.TimeExceededException
All Implemented Interfaces:
Serializable
Enclosing class:
TimeLimitingCollector
public static class TimeLimitingCollector.TimeExceededException
extends RuntimeException

Thrown when elapsed search time exceeds allowed search time.

See Also:
Serialized Form

Method Summary
int | getLastDocCollected() Returns last doc (absolute doc id) that was collected when the search time exceeded.
long | getTimeAllowed() Returns allowed time (milliseconds).
long | getTimeElapsed() Returns elapsed time (milliseconds).
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Method Detail

getTimeAllowed

public long getTimeAllowed()
Returns allowed time (milliseconds).

getTimeElapsed

public long getTimeElapsed()
Returns elapsed time (milliseconds).

getLastDocCollected

public int getLastDocCollected()
Returns last doc (absolute doc id) that was collected when the search time exceeded.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TimeLimitingCollector.TimerThread

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class TimeLimitingCollector.TimerThread

java.lang.Object
    extended by  java.lang.Thread
        extended by  org.apache.lucene.search.TimeLimitingCollector.TimerThread
All Implemented Interfaces:
Runnable
Enclosing class:
TimeLimitingCollector
public static final class TimeLimitingCollector.TimerThread
extends Thread

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
Field Summary
static int | DEFAULT_RESOLUTION
static String | THREAD_NAME
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor Summary
TimeLimitingCollector.TimerThread(Counter counter)
TimeLimitingCollector.TimerThread(long resolution, Counter counter)
Method Summary
long | getMilliseconds() Get the timer value in milliseconds.
long | getResolution() Return the timer resolution.
void | run()
void | setResolution(long resolution) Set the timer resolution.
void | stopTimer() Stops the timer thread
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

THREAD_NAME

public static final String THREAD_NAME
See Also:
Constant Field Values

DEFAULT_RESOLUTION

public static final int DEFAULT_RESOLUTION
See Also:
Constant Field Values
Constructor Detail

TimeLimitingCollector.TimerThread

public TimeLimitingCollector.TimerThread(long resolution,
                                         Counter counter)

TimeLimitingCollector.TimerThread

public TimeLimitingCollector.TimerThread(Counter counter)
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

getMilliseconds

public long getMilliseconds()
Get the timer value in milliseconds.

stopTimer

public void stopTimer()
Stops the timer thread

getResolution

public long getResolution()
Return the timer resolution.

See Also:
setResolution(long)

setResolution

public void setResolution(long resolution)
Set the timer resolution. The default timer resolution is 20 milliseconds. This means that a search required to take no longer than 800 milliseconds may be stopped after 780 to 820 milliseconds.
Note that:
  • Finer (smaller) resolution is more accurate but less efficient.
  • Setting resolution to less than 5 milliseconds will be silently modified to 5 milliseconds.
  • Setting resolution smaller than current resolution might take effect only after current resolution. (Assume current resolution of 20 milliseconds is modified to 5 milliseconds, then it can take up to 20 milliseconds for the change to have effect.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TopDocs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class TopDocs

java.lang.Object
    extended by  org.apache.lucene.search.TopDocs
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TopFieldDocs
public class TopDocs
extends Object
implements Serializable

Represents hits returned by Searcher.search(Query,Filter,int) and Searcher.search(Query,int).

See Also:
Serialized Form

Field Summary
ScoreDoc[] | scoreDocs The top hits for the query.
int | totalHits The total number of hits for the query.
Constructor Summary
TopDocs(int totalHits, ScoreDoc[] scoreDocs, float maxScore)
Method Summary
float | getMaxScore() Returns the maximum score value encountered.
static TopDocs | merge(Sort sort, int topN, TopDocs[] shardHits) Returns a new TopDocs, containing topN results across the provided TopDocs, sorting by the specified Sort.
void | setMaxScore(float maxScore) Sets the maximum score value encountered.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

totalHits

public int totalHits
The total number of hits for the query.

scoreDocs

public ScoreDoc[] scoreDocs
The top hits for the query.

Constructor Detail

TopDocs

public TopDocs(int totalHits,
               ScoreDoc[] scoreDocs,
               float maxScore)
Method Detail

getMaxScore

public float getMaxScore()
Returns the maximum score value encountered. Note that in case scores are not tracked, this returns Float.NaN.

setMaxScore

public void setMaxScore(float maxScore)
Sets the maximum score value encountered.

merge

public static TopDocs merge(Sort sort,
                            int topN,
                            TopDocs[] shardHits)
                     throws IOException
Returns a new TopDocs, containing topN results across the provided TopDocs, sorting by the specified Sort. Each of the TopDocs must have been sorted by the same Sort, and sort field values must have been filled (ie, fillFields=true must be passed to TopFieldCollector.create(org.apache.lucene.search.Sort, int, boolean, boolean, boolean, boolean).

Pass sort=null to merge sort by score descending.

Throws:
IOException
WARNING: This API is experimental and might change in incompatible ways in the next release.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TopDocsCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class TopDocsCollector<T extends ScoreDoc>

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.TopDocsCollector<T>
Direct Known Subclasses:
TopFieldCollector, TopScoreDocCollector
public abstract class TopDocsCollector<T extends ScoreDoc>
extends Collector

A base class for all collectors that return a TopDocs output. This collector allows easy extension by providing a single constructor which accepts a PriorityQueue as well as protected members for that priority queue and a counter of the number of total hits.
Extending classes can override any of the methods to provide their own implementation, as well as avoid the use of the priority queue entirely by passing null to TopDocsCollector(PriorityQueue). In that case however, you might want to consider overriding all methods, in order to avoid a NullPointerException.

Field Summary
protected static TopDocs | EMPTY_TOPDOCS
protected PriorityQueue<T> | pq The priority queue which holds the top documents.
protected int | totalHits The total number of documents that the collector encountered.
Constructor Summary
protected TopDocsCollector(PriorityQueue<T> pq)
Method Summary
int | getTotalHits() The total number of documents that matched this query.
protected TopDocs | newTopDocs(ScoreDoc[] results, int start) Returns a TopDocs instance containing the given results.
protected void | populateResults(ScoreDoc[] results, int howMany) Populates the results array with the ScoreDoc instances.
TopDocs | topDocs() Returns the top docs that were collected by this collector.
TopDocs | topDocs(int start) Returns the documents in the rage [start ..
TopDocs | topDocs(int start, int howMany) Returns the documents in the rage [start ..
protected int | topDocsSize() The number of valid PQ entries
Methods inherited from class org.apache.lucene.search.Collector
acceptsDocsOutOfOrder, collect, setNextReader, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

EMPTY_TOPDOCS

protected static final TopDocs EMPTY_TOPDOCS

pq

protected PriorityQueue<T extends ScoreDoc> pq
The priority queue which holds the top documents. Note that different implementations of PriorityQueue give different meaning to 'top documents'. HitQueue for example aggregates the top scoring documents, while other PQ implementations may hold documents sorted by other criteria.

totalHits

protected int totalHits
The total number of documents that the collector encountered.

Constructor Detail

TopDocsCollector

protected TopDocsCollector(PriorityQueue<T> pq)
Method Detail

populateResults

protected void populateResults(ScoreDoc[] results,
                               int howMany)
Populates the results array with the ScoreDoc instances. This can be overridden in case a different ScoreDoc type should be returned.

newTopDocs

protected TopDocs newTopDocs(ScoreDoc[] results,
                             int start)
Returns a TopDocs instance containing the given results. If results is null it means there are no results to return, either because there were 0 calls to collect() or because the arguments to topDocs were invalid.

getTotalHits

public int getTotalHits()
The total number of documents that matched this query.

topDocsSize

protected int topDocsSize()
The number of valid PQ entries

topDocs

public TopDocs topDocs()
Returns the top docs that were collected by this collector.

topDocs

public TopDocs topDocs(int start)
Returns the documents in the rage [start .. pq.size()) that were collected by this collector. Note that if start >= pq.size(), an empty TopDocs is returned.
This method is convenient to call if the application always asks for the last results, starting from the last 'page'.
NOTE: you cannot call this method more than once for each search execution. If you need to call it more than once, passing each time a different start, you should call topDocs() and work with the returned TopDocs object, which will contain all the results this search execution collected.

topDocs

public TopDocs topDocs(int start,
                       int howMany)
Returns the documents in the rage [start .. start+howMany) that were collected by this collector. Note that if start >= pq.size(), an empty TopDocs is returned, and if pq.size() - start < howMany, then only the available documents in [start .. pq.size()) are returned.
This method is useful to call in case pagination of search results is allowed by the search application, as well as it attempts to optimize the memory used by allocating only as much as requested by howMany.
NOTE: you cannot call this method more than once for each search execution. If you need to call it more than once, passing each time a different range, you should call topDocs() and work with the returned TopDocs object, which will contain all the results this search execution collected.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TopFieldCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class TopFieldCollector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.TopDocsCollector<FieldValueHitQueue.Entry>
            extended by  org.apache.lucene.search.TopFieldCollector

public abstract class TopFieldCollector
extends TopDocsCollector<FieldValueHitQueue.Entry>

A Collector that sorts by SortField using FieldComparators.

See the create(org.apache.lucene.search.Sort, int, boolean, boolean, boolean, boolean) method for instantiating a TopFieldCollector.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.search.TopDocsCollector
EMPTY_TOPDOCS, pq, totalHits
Method Summary
 boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
static TopFieldCollector create(Sort sort, int numHits, boolean fillFields, boolean trackDocScores, boolean trackMaxScore, boolean docsScoredInOrder)
Creates a new TopFieldCollector from the given arguments.
protected  TopDocs newTopDocs(ScoreDoc[] results, int start)
Returns a TopDocs instance containing the given results.
protected  void populateResults(ScoreDoc[] results, int howMany)
Populates the results array with the ScoreDoc instances.
Methods inherited from class org.apache.lucene.search.TopDocsCollector
getTotalHits, topDocs, topDocs, topDocs, topDocsSize
Methods inherited from class org.apache.lucene.search.Collector
collect, setNextReader, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

create

public static TopFieldCollector create(Sort sort,
                                       int numHits,
                                       boolean fillFields,
                                       boolean trackDocScores,
                                       boolean trackMaxScore,
                                       boolean docsScoredInOrder)
                                throws IOException
Creates a new TopFieldCollector from the given arguments.

NOTE: The instances returned by this method pre-allocate a full array of length numHits.

Parameters:
sort - the sort criteria (SortFields).
numHits - the number of results to collect.
fillFields - specifies whether the actual field values should be returned on the results (FieldDoc).
trackDocScores - specifies whether document scores should be tracked and set on the results. Note that if set to false, then the results' scores will be set to Float.NaN. Setting this to true affects performance, as it incurs the score computation on each competitive result. Therefore if document scores are not required by the application, it is recommended to set it to false.
trackMaxScore - specifies whether the query's maxScore should be tracked and set on the resulting TopDocs. Note that if set to false, TopDocs.getMaxScore() returns Float.NaN. Setting this to true affects performance as it incurs the score computation on each result. Also, setting this true automatically sets trackDocScores to true as well.
docsScoredInOrder - specifies whether documents are scored in doc Id order or not by the given Scorer in Collector.setScorer(Scorer).
Returns:
a TopFieldCollector instance which will sort the results by the sort criteria.
Throws:
IOException

populateResults

protected void populateResults(ScoreDoc[] results,
                               int howMany)
Description copied from class: TopDocsCollector
Populates the results array with the ScoreDoc instances. This can be overridden in case a different ScoreDoc type should be returned.

Overrides:
populateResults in class TopDocsCollector<FieldValueHitQueue.Entry>

newTopDocs

protected TopDocs newTopDocs(ScoreDoc[] results,
                             int start)
Description copied from class: TopDocsCollector
Returns a TopDocs instance containing the given results. If results is null it means there are no results to return, either because there were 0 calls to collect() or because the arguments to topDocs were invalid.

Overrides:
newTopDocs in class TopDocsCollector<FieldValueHitQueue.Entry>

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Description copied from class: Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Specified by:
acceptsDocsOutOfOrder in class Collector
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TopFieldDocs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class TopFieldDocs

java.lang.Object
    extended by  org.apache.lucene.search.TopDocs
        extended by  org.apache.lucene.search.TopFieldDocs
All Implemented Interfaces:
Serializable
public class TopFieldDocs
extends TopDocs

Represents hits returned by Searcher.search(Query,Filter,int,Sort).

See Also:
Serialized Form

Field Summary
 SortField[] fields
The fields which were used to sort results by.
Fields inherited from class org.apache.lucene.search.TopDocs
scoreDocs, totalHits
Constructor Summary
TopFieldDocs(int totalHits, ScoreDoc[] scoreDocs, SortField[] fields, float maxScore)
Creates one of these objects.
Method Summary
Methods inherited from class org.apache.lucene.search.TopDocs
getMaxScore, merge, setMaxScore
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

fields

public SortField[] fields
The fields which were used to sort results by.

Constructor Detail

TopFieldDocs

public TopFieldDocs(int totalHits,
                    ScoreDoc[] scoreDocs,
                    SortField[] fields,
                    float maxScore)
Creates one of these objects.

Parameters:
totalHits - Total number of hits for the query.
scoreDocs - The top hits for the query.
fields - The sort criteria used to find the top hits.
maxScore - The maximum score encountered.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TopScoreDocCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class TopScoreDocCollector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.TopDocsCollector<ScoreDoc>
            extended by  org.apache.lucene.search.TopScoreDocCollector

public abstract class TopScoreDocCollector
extends TopDocsCollector<ScoreDoc>

A Collector implementation that collects the top-scoring hits, returning them as a TopDocs. This is used by IndexSearcher to implement TopDocs-based search. Hits are sorted by score descending and then (when the scores are tied) docID ascending. When you create an instance of this collector you should know in advance whether documents are going to be collected in doc Id order or not.

NOTE: The values Float.NaN and {Float#NEGATIVE_INFINITY} are not valid scores. This collector will not properly collect hits with such scores.

Field Summary
Fields inherited from class org.apache.lucene.search.TopDocsCollector
EMPTY_TOPDOCS, pq, totalHits
Method Summary
static TopScoreDocCollector | create(int numHits, boolean docsScoredInOrder) Creates a new TopScoreDocCollector given the number of hits to collect and whether documents are scored in order by the input Scorer to setScorer(Scorer).
static TopScoreDocCollector | create(int numHits, ScoreDoc after, boolean docsScoredInOrder) Creates a new TopScoreDocCollector given the number of hits to collect, the bottom of the previous page, and whether documents are scored in order by the input Scorer to setScorer(Scorer).
protected TopDocs | newTopDocs(ScoreDoc[] results, int start) Returns a TopDocs instance containing the given results.
void | setNextReader(IndexReader reader, int base) Called before collecting from each IndexReader.
void | setScorer(Scorer scorer) Called before successive calls to Collector.collect(int).
Methods inherited from class org.apache.lucene.search.TopDocsCollector
getTotalHits, populateResults, topDocs, topDocs, topDocs, topDocsSize
Methods inherited from class org.apache.lucene.search.Collector
acceptsDocsOutOfOrder, collect
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

create

public static TopScoreDocCollector create(int numHits,
                                          boolean docsScoredInOrder)
Creates a new TopScoreDocCollector given the number of hits to collect and whether documents are scored in order by the input Scorer to setScorer(Scorer).

NOTE: The instances returned by this method pre-allocate a full array of length numHits, and fill the array with sentinel objects.

create

public static TopScoreDocCollector create(int numHits,
                                          ScoreDoc after,
                                          boolean docsScoredInOrder)
Creates a new TopScoreDocCollector given the number of hits to collect, the bottom of the previous page, and whether documents are scored in order by the input Scorer to setScorer(Scorer).

NOTE: The instances returned by this method pre-allocate a full array of length numHits, and fill the array with sentinel objects.

newTopDocs

protected TopDocs newTopDocs(ScoreDoc[] results,
                             int start)
Description copied from class: TopDocsCollector
Returns a TopDocs instance containing the given results. If results is null it means there are no results to return, either because there were 0 calls to collect() or because the arguments to topDocs were invalid.

Overrides:
newTopDocs in class TopDocsCollector<ScoreDoc>

setNextReader

public void setNextReader(IndexReader reader,
                          int base)
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Specified by:
setNextReader in class Collector
Parameters:
reader - next IndexReader

setScorer

public void setScorer(Scorer scorer)
               throws IOException
Description copied from class: Collector
Called before successive calls to Collector.collect(int). Implementations that need the score of the current document (passed-in to Collector.collect(int)), should save the passed-in Scorer and call scorer.score() when needed.

Specified by:
setScorer in class Collector
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TopTermsRewrite

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class TopTermsRewrite<Q extends Query>

java.lang.Object
    extended by  org.apache.lucene.search.MultiTermQuery.RewriteMethod
        extended by  org.apache.lucene.search.TopTermsRewrite<Q>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite, MultiTermQuery.TopTermsScoringBooleanQueryRewrite
public abstract class TopTermsRewrite<Q extends Query>
extends MultiTermQuery.RewriteMethod

Base rewrite method for collecting only the top terms via a priority queue.

See Also:
Serialized Form
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
Only public to be accessible by spans package.

Nested Class Summary
protected static interface TermCollectingRewrite.TermCollector
Constructor Summary
TopTermsRewrite(int size)
Create a TopTermsBooleanQueryRewrite for at most size terms.
Method Summary
protected abstract void | addClause(Q topLevel, Term term, float boost) Add a MultiTermQuery term to the top-level query
protected void | collectTerms(IndexReader reader, MultiTermQuery query, TermCollectingRewrite.TermCollector collector)
boolean | equals(Object obj)
protected abstract int | getMaxSize() return the maximum size of the priority queue (for boolean rewrites this is BooleanQuery#getMaxClauseCount).
int | getSize() return the maximum priority queue size
protected abstract Q | getTopLevelQuery() Return a suitable top-level Query for holding all expanded terms.
int | hashCode()
Q | rewrite(IndexReader reader, MultiTermQuery query)
Methods inherited from class org.apache.lucene.search.MultiTermQuery.RewriteMethod
getTermsEnum
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TopTermsRewrite

public TopTermsRewrite(int size)
Create a TopTermsBooleanQueryRewrite for at most size terms.

NOTE: if BooleanQuery.getMaxClauseCount() is smaller than size, then it will be used instead.

Method Detail

getSize

public int getSize()
return the maximum priority queue size

getMaxSize

protected abstract int getMaxSize()
return the maximum size of the priority queue (for boolean rewrites this is BooleanQuery#getMaxClauseCount).

rewrite

public Q rewrite(IndexReader reader,
                 MultiTermQuery query)
                        throws IOException
Specified by:
rewrite in class MultiTermQuery.RewriteMethod
Throws:
IOException

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getTopLevelQuery

protected abstract Q getTopLevelQuery()
                                             throws IOException
Return a suitable top-level Query for holding all expanded terms.

Throws:
IOException

addClause

protected abstract void addClause(Q topLevel,
                                  Term term,
                                  float boost)
                           throws IOException
Add a MultiTermQuery term to the top-level query

Throws:
IOException

collectTerms

protected final void collectTerms(IndexReader reader,
                                  MultiTermQuery query,
                                  TermCollectingRewrite.TermCollector collector)
                           throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TotalHitCountCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class TotalHitCountCollector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.TotalHitCountCollector

public class TotalHitCountCollector
extends Collector

Just counts the total number of hits.

Constructor Summary
TotalHitCountCollector()
Method Summary
 boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
 void collect(int doc)
Called once for every document matching a query, with the unbased document number.
 int getTotalHits()
Returns how many hits matched the search.
 void setNextReader(IndexReader reader, int docBase)
Called before collecting from each IndexReader.
 void setScorer(Scorer scorer)
Called before successive calls to Collector.collect(int).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TotalHitCountCollector

public TotalHitCountCollector()
Method Detail

getTotalHits

public int getTotalHits()
Returns how many hits matched the search.

setScorer

public void setScorer(Scorer scorer)
Description copied from class: Collector
Called before successive calls to Collector.collect(int). Implementations that need the score of the current document (passed-in to Collector.collect(int)), should save the passed-in Scorer and call scorer.score() when needed.

Specified by:
setScorer in class Collector

collect

public void collect(int doc)
Description copied from class: Collector
Called once for every document matching a query, with the unbased document number.

Note: This is called in an inner search loop. For good search performance, implementations of this method should not call Searcher.doc(int) or IndexReader.document(int) on every hit. Doing so can slow searches by an order of magnitude or more.

Specified by:
collect in class Collector

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Specified by:
setNextReader in class Collector
Parameters:
reader - next IndexReader

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Description copied from class: Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Specified by:
acceptsDocsOutOfOrder in class Collector
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Weight

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class Weight

java.lang.Object
    extended by  org.apache.lucene.search.Weight
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BooleanQuery.BooleanWeight, ConstantScoreQuery.ConstantWeight, DisjunctionMaxQuery.DisjunctionMaxWeight, SpanWeight
public abstract class Weight
extends Object
implements Serializable

Expert: Calculate query weights and build query scorers.

The purpose of Weight is to ensure searching does not modify a Query, so that a Query instance can be reused.
Searcher dependent state of the query should reside in the Weight.
IndexReader dependent state should reside in the Scorer.

A Weight is used in the following way:

  1. A Weight is constructed by a top-level query, given a Searcher (Query.createWeight(Searcher)).
  2. The sumOfSquaredWeights() method is called on the Weight to compute the query normalization factor Similarity.queryNorm(float) of the query clauses contained in the query.
  3. The query normalization factor is passed to normalize(float). At this point the weighting is complete.
  4. A Scorer is constructed by scorer(IndexReader,boolean,boolean).

Since:
2.9
See Also:
Serialized Form

Constructor Summary
Weight()
Method Summary
abstract Explanation | explain(IndexReader reader, int doc) An explanation of the score computation for the named document.
abstract Query | getQuery() The query that this concerns.
abstract float | getValue() The weight for this query.
abstract void | normalize(float norm) Assigns the query normalization factor to this.
abstract Scorer | scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.
boolean | scoresDocsOutOfOrder() Returns true iff this implementation scores docs only out of order.
abstract float | sumOfSquaredWeights() The sum of squared weights of contained query clauses.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Weight

public Weight()
Method Detail

explain

public abstract Explanation explain(IndexReader reader,
                                    int doc)
                             throws IOException
An explanation of the score computation for the named document.

Parameters:
reader - sub-reader containing the give doc
doc -
Returns:
an Explanation for the score
Throws:
IOException

getQuery

public abstract Query getQuery()
The query that this concerns.

getValue

public abstract float getValue()
The weight for this query.

normalize

public abstract void normalize(float norm)
Assigns the query normalization factor to this.

scorer

public abstract Scorer scorer(IndexReader reader,
                              boolean scoreDocsInOrder,
                              boolean topScorer)
                       throws IOException
Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.

NOTE: even if scoreDocsInOrder is false, it is recommended to check whether the returned Scorer indeed scores documents out of order (i.e., call scoresDocsOutOfOrder()), as some Scorer implementations will always return documents in-order.
NOTE: null can be returned if no documents will be scored by this query.

Parameters:
reader - the IndexReader for which to return the Scorer.
scoreDocsInOrder - specifies whether in-order scoring of documents is required. Note that if set to false (i.e., out-of-order scoring is required), this method can return whatever scoring mode it supports, as every in-order scorer is also an out-of-order one. However, an out-of-order scorer may not support DocIdSetIterator.nextDoc() and/or DocIdSetIterator.advance(int), therefore it is recommended to request an in-order scorer if use of these methods is required.
topScorer - if true, Scorer.score(Collector) will be called; if false, DocIdSetIterator.nextDoc() and/or DocIdSetIterator.advance(int) will be called.
Returns:
a Scorer which scores documents in/out-of order.
Throws:
IOException

sumOfSquaredWeights

public abstract float sumOfSquaredWeights()
                                   throws IOException
The sum of squared weights of contained query clauses.

Throws:
IOException

scoresDocsOutOfOrder

public boolean scoresDocsOutOfOrder()
Returns true iff this implementation scores docs only out of order. This method is used in conjunction with Collector's acceptsDocsOutOfOrder and scorer(org.apache.lucene.index.IndexReader, boolean, boolean) to create a matching Scorer instance for a given Collector, or vice versa.

NOTE: the default implementation returns false, i.e. the Scorer scores documents in-order.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WildcardQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class WildcardQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.MultiTermQuery
            extended by  org.apache.lucene.search.WildcardQuery
All Implemented Interfaces:
Serializable, Cloneable
public class WildcardQuery
extends MultiTermQuery

Implements the wildcard search query. Supported wildcards are *, which matches any character sequence (including the empty one), and ?, which matches any single character. Note this query can be slow, as it needs to iterate over many terms. In order to prevent extremely slow WildcardQueries, a Wildcard term should not start with one of the wildcards * or ?.

This query uses the MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT rewrite method.

See Also:
WildcardTermEnum, Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.MultiTermQuery
MultiTermQuery.ConstantScoreAutoRewrite, MultiTermQuery.RewriteMethod, MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite, MultiTermQuery.TopTermsScoringBooleanQueryRewrite
Field Summary
protected  Term term
Fields inherited from class org.apache.lucene.search.MultiTermQuery
CONSTANT_SCORE_AUTO_REWRITE_DEFAULT, CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE, CONSTANT_SCORE_FILTER_REWRITE, rewriteMethod, SCORING_BOOLEAN_QUERY_REWRITE
Constructor Summary
WildcardQuery(Term term)
Method Summary
boolean | equals(Object obj)
protected FilteredTermEnum | getEnum(IndexReader reader) Construct the enumeration to be used, expanding the pattern term.
Term | getTerm() Returns the pattern term.
int | hashCode()
String | toString(String field) Prints a user-readable version of this query.
Methods inherited from class org.apache.lucene.search.MultiTermQuery
clearTotalNumberOfTerms, getRewriteMethod, getTotalNumberOfTerms, incTotalNumberOfTerms, rewrite, setRewriteMethod
Methods inherited from class org.apache.lucene.search.Query
clone, combine, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

term

protected Term term
Constructor Detail

WildcardQuery

public WildcardQuery(Term term)
Method Detail

getEnum

protected FilteredTermEnum getEnum(IndexReader reader)
                            throws IOException
Description copied from class: MultiTermQuery
Construct the enumeration to be used, expanding the pattern term.

Specified by:
getEnum in class MultiTermQuery
Throws:
IOException

getTerm

public Term getTerm()
Returns the pattern term.

toString

public String toString(String field)
Prints a user-readable version of this query.

Specified by:
toString in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class MultiTermQuery

equals

public boolean equals(Object obj)
Overrides:
equals in class MultiTermQuery
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WildcardTermEnum

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search
Class WildcardTermEnum

java.lang.Object
    extended by  org.apache.lucene.index.TermEnum
        extended by  org.apache.lucene.search.FilteredTermEnum
            extended by  org.apache.lucene.search.WildcardTermEnum
All Implemented Interfaces:
Closeable
public class WildcardTermEnum
extends FilteredTermEnum

Subclass of FilteredTermEnum for enumerating all terms that match the specified wildcard filter term.

Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.

Field Summary
static char | WILDCARD_CHAR
static char | WILDCARD_STRING String equality with support for wildcards
Fields inherited from class org.apache.lucene.search.FilteredTermEnum
actualEnum, currentTerm
Constructor Summary
WildcardTermEnum(IndexReader reader, Term term)
Creates a new WildcardTermEnum.
Method Summary
float | difference() Equality measure on the term
boolean | endEnum() Indicates the end of the enumeration has been reached
protected boolean | termCompare(Term term) Equality compare on the term
static boolean | wildcardEquals(String pattern, int patternIdx, String string, int stringIdx) Determines if a word matches a wildcard pattern.
Methods inherited from class org.apache.lucene.search.FilteredTermEnum
close, docFreq, next, setEnum, term
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

WILDCARD_STRING

public static final char WILDCARD_STRING
String equality with support for wildcards

See Also:
Constant Field Values

WILDCARD_CHAR

public static final char WILDCARD_CHAR
See Also:
Constant Field Values
Constructor Detail

WildcardTermEnum

public WildcardTermEnum(IndexReader reader,
                        Term term)
                 throws IOException
Creates a new WildcardTermEnum.

After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.

Throws:
IOException
Method Detail

termCompare

protected final boolean termCompare(Term term)
Description copied from class: FilteredTermEnum
Equality compare on the term

Specified by:
termCompare in class FilteredTermEnum

difference

public float difference()
Description copied from class: FilteredTermEnum
Equality measure on the term

Specified by:
difference in class FilteredTermEnum

endEnum

public final boolean endEnum()
Description copied from class: FilteredTermEnum
Indicates the end of the enumeration has been reached

Specified by:
endEnum in class FilteredTermEnum

wildcardEquals

public static final boolean wildcardEquals(String pattern,
                                           int patternIdx,
                                           String string,
                                           int stringIdx)
Determines if a word matches a wildcard pattern. Work released by Granta Design Ltd after originally being done on company time.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.search.AssertingIndexSearcher

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.AssertingIndexSearcher

No usage of org.apache.lucene.search.AssertingIndexSearcher

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.BooleanClause

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.BooleanClause

Packages that use BooleanClause
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.search | Code to search indices.

Uses of BooleanClause in org.apache.lucene.queryParser

Methods in org.apache.lucene.queryParser that return BooleanClause
protected  BooleanClause QueryParser.newBooleanClause(Query q, BooleanClause.Occur occur)
Builds a new BooleanClause instance

Method parameters in org.apache.lucene.queryParser with type arguments of type BooleanClause
protected void | QueryParser.addClause(List<BooleanClause> clauses, int conj, int mods, Query q)
protected Query | QueryParser.getBooleanQuery(List<BooleanClause> clauses) Factory method for generating query, given a set of clauses.
protected Query | QueryParser.getBooleanQuery(List<BooleanClause> clauses, boolean disableCoord) Factory method for generating query, given a set of clauses.

Uses of BooleanClause in org.apache.lucene.queryParser.standard

Method parameters in org.apache.lucene.queryParser.standard with type arguments of type BooleanClause
protected  Query QueryParserWrapper.getBooleanQuery(List<BooleanClause> clauses, boolean disableCoord)
Deprecated.

Uses of BooleanClause in org.apache.lucene.search

Methods in org.apache.lucene.search that return BooleanClause
 BooleanClause[] BooleanQuery.getClauses()
Returns the set of clauses in this query.

Methods in org.apache.lucene.search that return types with arguments of type BooleanClause
List<BooleanClause> | BooleanQuery.clauses() Returns the list of clauses in this query.
Iterator<BooleanClause> | BooleanQuery.iterator() Returns an iterator on the clauses in this query.

Methods in org.apache.lucene.search with parameters of type BooleanClause
 void BooleanQuery.add(BooleanClause clause)
Adds a clause to a boolean query.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.BooleanClause.Occur

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.BooleanClause.Occur

Packages that use BooleanClause.Occur
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.search | Code to search indices.

Uses of BooleanClause.Occur in org.apache.lucene.queryParser

Methods in org.apache.lucene.queryParser with parameters of type BooleanClause.Occur
protected BooleanClause | QueryParser.newBooleanClause(Query q, BooleanClause.Occur occur) Builds a new BooleanClause instance
static Query | MultiFieldQueryParser.parse(Version matchVersion, String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.
static Query | MultiFieldQueryParser.parse(Version matchVersion, String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.

Uses of BooleanClause.Occur in org.apache.lucene.queryParser.standard

Methods in org.apache.lucene.queryParser.standard with parameters of type BooleanClause.Occur
static Query | MultiFieldQueryParserWrapper.parse(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Deprecated. Parses a query, searching on the fields specified.
static Query | QueryParserUtil.parse(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.
static Query | MultiFieldQueryParserWrapper.parse(String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Deprecated. Parses a query, searching on the fields specified.
static Query | QueryParserUtil.parse(String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.

Uses of BooleanClause.Occur in org.apache.lucene.search

Methods in org.apache.lucene.search that return BooleanClause.Occur
BooleanClause.Occur | FilterClause.getOccur() Returns this FilterClause's occur parameter
BooleanClause.Occur | BooleanClause.getOccur()
static BooleanClause.Occur | BooleanClause.Occur.valueOf(String name) Returns the enum constant of this type with the specified name.
static BooleanClause.Occur[] | BooleanClause.Occur.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.search with parameters of type BooleanClause.Occur
void | BooleanFilter.add(Filter filter, BooleanClause.Occur occur)
void | BooleanQuery.add(Query query, BooleanClause.Occur occur) Adds a clause to a boolean query.
void | BooleanClause.setOccur(BooleanClause.Occur occur)
void | Scorer.visitSubScorers(Query parent, BooleanClause.Occur relationship, Scorer.ScorerVisitor<Query,Query,Scorer> visitor) Scorer subclasses should implement this method if the subclass itself contains multiple scorers to support gathering details for sub-scorers via Scorer.ScorerVisitor

Constructors in org.apache.lucene.search with parameters of type BooleanClause.Occur
BooleanClause(Query query, BooleanClause.Occur occur)
Constructs a BooleanClause.
FilterClause(Filter filter, BooleanClause.Occur occur)
Create a new FilterClause

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.BooleanFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.BooleanFilter

No usage of org.apache.lucene.search.BooleanFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.BooleanQuery.BooleanWeight

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.BooleanQuery.BooleanWeight

No usage of org.apache.lucene.search.BooleanQuery.BooleanWeight

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.BooleanQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.BooleanQuery

Packages that use BooleanQuery
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders
org.apache.lucene.search | Code to search indices.

Uses of BooleanQuery in org.apache.lucene.queryParser

Methods in org.apache.lucene.queryParser that return BooleanQuery
protected  BooleanQuery QueryParser.newBooleanQuery(boolean disableCoord)
Builds a new BooleanQuery instance

Uses of BooleanQuery in org.apache.lucene.queryParser.standard.builders

Methods in org.apache.lucene.queryParser.standard.builders that return BooleanQuery
BooleanQuery | StandardBooleanQueryNodeBuilder.build(QueryNode queryNode)
BooleanQuery | BooleanQueryNodeBuilder.build(QueryNode queryNode)
BooleanQuery | MatchNoDocsQueryNodeBuilder.build(QueryNode queryNode)
BooleanQuery | AnyQueryNodeBuilder.build(QueryNode queryNode)

Uses of BooleanQuery in org.apache.lucene.search

Fields in org.apache.lucene.search with type parameters of type BooleanQuery
static ScoringRewrite<BooleanQuery> ScoringRewrite.SCORING_BOOLEAN_QUERY_REWRITE
A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.

Methods in org.apache.lucene.search that return BooleanQuery
protected BooleanQuery | MultiTermQuery.TopTermsScoringBooleanQueryRewrite.getTopLevelQuery()
protected BooleanQuery | MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite.getTopLevelQuery()

Methods in org.apache.lucene.search with parameters of type BooleanQuery
protected void | MultiTermQuery.TopTermsScoringBooleanQueryRewrite.addClause(BooleanQuery topLevel, Term term, float boost)
protected void | MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite.addClause(BooleanQuery topLevel, Term term, float boost)
static Query | Query.mergeBooleanQueries(BooleanQuery... queries) Expert: merges the clauses of a set of BooleanQuery's into a single BooleanQuery.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.BooleanQuery.TooManyClauses

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.BooleanQuery.TooManyClauses

No usage of org.apache.lucene.search.BooleanQuery.TooManyClauses

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.BoostingQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.BoostingQuery

No usage of org.apache.lucene.search.BoostingQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.CachingCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.CachingCollector

Packages that use CachingCollector
org.apache.lucene.search Code to search indices.

Uses of CachingCollector in org.apache.lucene.search

Methods in org.apache.lucene.search that return CachingCollector
static CachingCollector | CachingCollector.create(boolean acceptDocsOutOfOrder, boolean cacheScores, double maxRAMMB) Creates a CachingCollector which does not wrap another collector.
static CachingCollector | CachingCollector.create(Collector other, boolean cacheScores, double maxRAMMB) Create a new CachingCollector that wraps the given collector and caches documents and scores up to the specified RAM threshold.
static CachingCollector | CachingCollector.create(Collector other, boolean cacheScores, int maxDocsToCache) Create a new CachingCollector that wraps the given collector and caches documents and scores up to the specified max docs threshold.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.CachingSpanFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.CachingSpanFilter

No usage of org.apache.lucene.search.CachingSpanFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.CachingWrapperFilter.DeletesMode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.CachingWrapperFilter.DeletesMode

Packages that use CachingWrapperFilter.DeletesMode
org.apache.lucene.search Code to search indices.

Uses of CachingWrapperFilter.DeletesMode in org.apache.lucene.search

Methods in org.apache.lucene.search that return CachingWrapperFilter.DeletesMode
static CachingWrapperFilter.DeletesMode | CachingWrapperFilter.DeletesMode.valueOf(String name) Returns the enum constant of this type with the specified name.
static CachingWrapperFilter.DeletesMode[] | CachingWrapperFilter.DeletesMode.values() Returns an array containing the constants of this enum type, in the order they're declared.

Constructors in org.apache.lucene.search with parameters of type CachingWrapperFilter.DeletesMode
CachingSpanFilter(SpanFilter filter, CachingWrapperFilter.DeletesMode deletesMode)
CachingWrapperFilter(Filter filter, CachingWrapperFilter.DeletesMode deletesMode)
Expert: by default, the cached filter will be shared across reopened segments that only had changes to their deletions.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.CachingWrapperFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.CachingWrapperFilter

Packages that use CachingWrapperFilter
org.apache.lucene.search Code to search indices.

Uses of CachingWrapperFilter in org.apache.lucene.search

Subclasses of CachingWrapperFilter in org.apache.lucene.search
 class CachingWrapperFilterHelper
A unit test helper class to test when the filter is getting cached and when it is not.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.CachingWrapperFilterHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.CachingWrapperFilterHelper

No usage of org.apache.lucene.search.CachingWrapperFilterHelper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.ChainedFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.ChainedFilter

No usage of org.apache.lucene.search.ChainedFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.CheckHits.ExplanationAsserter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.CheckHits.ExplanationAsserter

No usage of org.apache.lucene.search.CheckHits.ExplanationAsserter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.CheckHits.ExplanationAssertingSearcher

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.CheckHits.ExplanationAssertingSearcher

No usage of org.apache.lucene.search.CheckHits.ExplanationAssertingSearcher

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.CheckHits

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.CheckHits

No usage of org.apache.lucene.search.CheckHits

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.CheckHits.SetCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.CheckHits.SetCollector

No usage of org.apache.lucene.search.CheckHits.SetCollector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.Collector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.Collector

Packages that use Collector
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.grouping | This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.
org.apache.lucene.search.join | This modules support index-time and query-time joins.

Uses of Collector in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks that return Collector
protected Collector | SearchWithCollectorTask.createCollector()
protected Collector | ReadTask.createCollector()

Uses of Collector in org.apache.lucene.facet.search

Subclasses of Collector in org.apache.lucene.facet.search
class | FacetsCollector Collector for facet accumulation.
class | ScoredDocIdCollector A Collector which stores all docIDs and their scores in a ScoredDocIDs instance.

Uses of Collector in org.apache.lucene.search

Subclasses of Collector in org.apache.lucene.search
class | CachingCollector Caches all docs, and optionally also scores, coming from a search, and is then able to replay them to another collector.
static class | CheckHits.ExplanationAsserter Asserts that the score explanation for every document matching a query corresponds with the true score.
static class | CheckHits.SetCollector Just collects document ids into a set.
class | MultiCollector A Collector which allows running a search with several Collectors.
class | PositiveScoresOnlyCollector A Collector implementation which wraps another Collector and makes sure only documents with scores > 0 are collected.
class | TimeLimitingCollector The TimeLimitingCollector is used to timeout search requests that take longer than the maximum allowed search time limit.
class | TopDocsCollector<T extends ScoreDoc> A base class for all collectors that return a TopDocs output.
class | TopFieldCollector A Collector that sorts by SortField using FieldComparators.
class | TopScoreDocCollector A Collector implementation that collects the top-scoring hits, returning them as a TopDocs.
class | TotalHitCountCollector Just counts the total number of hits.

Fields in org.apache.lucene.search declared as Collector
protected  Collector CachingCollector.other

Methods in org.apache.lucene.search that return Collector
static Collector MultiCollector.wrap(Collector... collectors)
Wraps a list of Collectors with a MultiCollector.

Methods in org.apache.lucene.search with parameters of type Collector
static CachingCollector | CachingCollector.create(Collector other, boolean cacheScores, double maxRAMMB) Create a new CachingCollector that wraps the given collector and caches documents and scores up to the specified RAM threshold.
static CachingCollector | CachingCollector.create(Collector other, boolean cacheScores, int maxDocsToCache) Create a new CachingCollector that wraps the given collector and caches documents and scores up to the specified max docs threshold.
abstract void | CachingCollector.replay(Collector other) Replays the cached doc IDs (and scores) to the given Collector.
void | ConstantScoreQuery.ConstantScorer.score(Collector collector)
void | ScoreCachingWrappingScorer.score(Collector collector)
void | Scorer.score(Collector collector) Scores and collects all matching documents.
protected boolean | ConstantScoreQuery.ConstantScorer.score(Collector collector, int max, int firstDocID)
protected boolean | ScoreCachingWrappingScorer.score(Collector collector, int max, int firstDocID)
protected boolean | Scorer.score(Collector collector, int max, int firstDocID) Expert: Collects matching documents in a range.
void | CheckHits.ExplanationAssertingSearcher.search(Query query, Collector results)
void | IndexSearcher.search(Query query, Collector results) Lower-level search API.
void | Searcher.search(Query query, Collector results) Deprecated. Lower-level search API.
void | CheckHits.ExplanationAssertingSearcher.search(Query query, Filter filter, Collector results)
void | IndexSearcher.search(Query query, Filter filter, Collector results) Lower-level search API.
void | Searcher.search(Query query, Filter filter, Collector results) Deprecated. Lower-level search API.
void | RemoteSearchable.search(Weight weight, Filter filter, Collector results) Deprecated.
void | IndexSearcher.search(Weight weight, Filter filter, Collector collector) Lower-level search API.
abstract void | Searcher.search(Weight weight, Filter filter, Collector results) Deprecated.
void | Searchable.search(Weight weight, Filter filter, Collector collector) Deprecated. Lower-level search API.
void | ParallelMultiSearcher.search(Weight weight, Filter filter, Collector collector) Deprecated. Lower-level search API.
void | MultiSearcher.search(Weight weight, Filter filter, Collector collector) Deprecated.
void | TimeLimitingCollector.setCollector(Collector collector) This is so the same timer can be used with a multi-phase search process such as grouping.
static Collector | MultiCollector.wrap(Collector... collectors) Wraps a list of Collectors with a MultiCollector.

Constructors in org.apache.lucene.search with parameters of type Collector
PositiveScoresOnlyCollector(Collector c)
TimeLimitingCollector(Collector collector, Counter clock, long ticksAllowed)
Create a TimeLimitedCollector wrapper over another Collector with a specified timeout.

Uses of Collector in org.apache.lucene.search.grouping

Subclasses of Collector in org.apache.lucene.search.grouping
class | AbstractAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead> This collector specializes in collecting the most relevant document (group head) for each group that match the query.
class | AbstractAllGroupsCollector<GROUP_VALUE_TYPE> A collector that collects all groups that match the query.
class | AbstractFirstPassGroupingCollector<GROUP_VALUE_TYPE> FirstPassGroupingCollector is the first of two passes necessary to collect grouped hits.
class | AbstractSecondPassGroupingCollector<GROUP_VALUE_TYPE> SecondPassGroupingCollector is the second of two passes necessary to collect grouped docs.
class | BlockGroupingCollector BlockGroupingCollector performs grouping with a single pass collector, as long as you are grouping by a doc block field, ie all documents sharing a given group value were indexed as a doc block using the atomic IndexWriter.addDocuments(java.util.Collection) or IndexWriter.updateDocuments(org.apache.lucene.index.Term, java.util.Collection) API.
class | TermAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead> A base implementation of AbstractAllGroupHeadsCollector for retrieving the most relevant groups when grouping on a string based group field.
class | TermAllGroupsCollector A collector that collects all groups that match the query.
class | TermFirstPassGroupingCollector Concrete implementation of AbstractFirstPassGroupingCollector that groups based on field values and more specifically uses FieldCache.StringIndex to collect groups.
class | TermSecondPassGroupingCollector Concrete implementation of AbstractSecondPassGroupingCollector that groups based on field values and more specifically uses FieldCache.StringIndex to collect grouped docs.

Uses of Collector in org.apache.lucene.search.join

Subclasses of Collector in org.apache.lucene.search.join
 class ToParentBlockJoinCollector
Collects parent document hits for a Query containing one more more BlockJoinQuery clauses, sorted by the specified parent Sort.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.ComplexExplanation

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.ComplexExplanation

No usage of org.apache.lucene.search.ComplexExplanation

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.ConstantScoreQuery.ConstantScorer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.ConstantScoreQuery.ConstantScorer

No usage of org.apache.lucene.search.ConstantScoreQuery.ConstantScorer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.ConstantScoreQuery.ConstantWeight

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.ConstantScoreQuery.ConstantWeight

No usage of org.apache.lucene.search.ConstantScoreQuery.ConstantWeight

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.ConstantScoreQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.ConstantScoreQuery

No usage of org.apache.lucene.search.ConstantScoreQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.DefaultSimilarity

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.DefaultSimilarity

Packages that use DefaultSimilarity
org.apache.lucene.misc Miscellaneous index tools.

Uses of DefaultSimilarity in org.apache.lucene.misc

Subclasses of DefaultSimilarity in org.apache.lucene.misc
 class SweetSpotSimilarity
A similarity with a lengthNorm that provides for a "plateau" of equally good lengths, and tf helper functions.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight

No usage of org.apache.lucene.search.DisjunctionMaxQuery.DisjunctionMaxWeight

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.DisjunctionMaxQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.DisjunctionMaxQuery

No usage of org.apache.lucene.search.DisjunctionMaxQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.DocIdSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.DocIdSet

Packages that use DocIdSet
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.util | Various utilities for faceted search
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.join | This modules support index-time and query-time joins.
org.apache.lucene.spatial.geohash | Support for Geohash encoding, decoding, and filtering.
org.apache.lucene.spatial.tier | Support for filtering based upon geographic location.
org.apache.lucene.util | Some utility classes.

Uses of DocIdSet in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search that return DocIdSet
 DocIdSet ScoredDocIDs.getDocIDs()
Returns the set of doc IDs.

Uses of DocIdSet in org.apache.lucene.facet.util

Methods in org.apache.lucene.facet.util with parameters of type DocIdSet
static ScoredDocIDs ScoredDocIdsUtils.createScoredDocIds(DocIdSet docIdSet, int maxDoc)
Create a ScoredDocIDs out of a given docIdSet and the total number of documents in an index

Uses of DocIdSet in org.apache.lucene.search

Subclasses of DocIdSet in org.apache.lucene.search
class | FieldCacheDocIdSet Base class for DocIdSet to be used with FieldCache.
class | FilteredDocIdSet Abstract decorator class for a DocIdSet implementation that provides on-demand filtering/validation mechanism on a given DocIdSet.

Fields in org.apache.lucene.search declared as DocIdSet
static DocIdSet DocIdSet.EMPTY_DOCIDSET
An empty DocIdSet instance for easy use, e.g.

Fields in org.apache.lucene.search with type parameters of type DocIdSet
protected  org.apache.lucene.search.CachingWrapperFilter.FilterCache<DocIdSet> CachingWrapperFilter.cache

Methods in org.apache.lucene.search that return DocIdSet
protected  DocIdSet CachingWrapperFilter.docIdSetToCache(DocIdSet docIdSet, IndexReader reader)
Provide the DocIdSet to be cached, using the DocIdSet provided by the wrapped Filter.
protected  DocIdSet ChainedFilter.finalResult(OpenBitSetDISI result, int maxDocs)
Deprecated. Either use CachingWrapperFilter, or switch to a different DocIdSet implementation yourself. This method will be removed in Lucene 4.0
 DocIdSet SpanFilterResult.getDocIdSet()
Returns the docIdSet
 DocIdSet RemoteCachingWrapperFilter.getDocIdSet(IndexReader reader)
Deprecated. Uses the FilterManager to keep the cache for a filter on the searcher side of a remote connection.
 DocIdSet ChainedFilter.getDocIdSet(IndexReader reader)
Filter.getDocIdSet(org.apache.lucene.index.IndexReader).
 DocIdSet BooleanFilter.getDocIdSet(IndexReader reader)
Returns the a DocIdSetIterator representing the Boolean composition of the filters that have been added.
 DocIdSet TermsFilter.getDocIdSet(IndexReader reader)
 DocIdSet DuplicateFilter.getDocIdSet(IndexReader reader)
 DocIdSet CachingWrapperFilterHelper.getDocIdSet(IndexReader reader)
 DocIdSet SpanQueryFilter.getDocIdSet(IndexReader reader)
 DocIdSet FieldCacheTermsFilter.getDocIdSet(IndexReader reader)
abstract  DocIdSet FieldCacheRangeFilter.getDocIdSet(IndexReader reader)
This method is implemented for each data type
 DocIdSet CachingWrapperFilter.getDocIdSet(IndexReader reader)
 DocIdSet CachingSpanFilter.getDocIdSet(IndexReader reader)
 DocIdSet MultiTermQueryWrapperFilter.getDocIdSet(IndexReader reader)
Returns a DocIdSet with documents that should be permitted in search results.
 DocIdSet FieldValueFilter.getDocIdSet(IndexReader reader)
abstract  DocIdSet Filter.getDocIdSet(IndexReader reader)
Creates a DocIdSet enumerating the documents that should be permitted in search results.
 DocIdSet QueryWrapperFilter.getDocIdSet(IndexReader reader)

Methods in org.apache.lucene.search with parameters of type DocIdSet
protected  DocIdSet CachingWrapperFilter.docIdSetToCache(DocIdSet docIdSet, IndexReader reader)
Provide the DocIdSet to be cached, using the DocIdSet provided by the wrapped Filter.

Constructors in org.apache.lucene.search with parameters of type DocIdSet
FilteredDocIdSet(DocIdSet innerSet)
Constructor.
SpanFilterResult(DocIdSet docIdSet, List<SpanFilterResult.PositionInfo> positions)

Uses of DocIdSet in org.apache.lucene.search.join

Methods in org.apache.lucene.search.join that return DocIdSet
 DocIdSet RawTermFilter.getDocIdSet(IndexReader reader)

Uses of DocIdSet in org.apache.lucene.spatial.geohash

Methods in org.apache.lucene.spatial.geohash that return DocIdSet
 DocIdSet GeoHashDistanceFilter.getDocIdSet(IndexReader reader)
Deprecated.

Uses of DocIdSet in org.apache.lucene.spatial.tier

Methods in org.apache.lucene.spatial.tier that return DocIdSet
DocIdSet | CartesianShapeFilter.getDocIdSet(IndexReader reader) Deprecated.
DocIdSet | LatLongDistanceFilter.getDocIdSet(IndexReader reader) Deprecated.

Uses of DocIdSet in org.apache.lucene.util

Subclasses of DocIdSet in org.apache.lucene.util
class | DocIdBitSet Simple DocIdSet and DocIdSetIterator backed by a BitSet
class | FixedBitSet BitSet of fixed length (numBits), backed by accessible (FixedBitSet.getBits()) long[], accessed with an int index, implementing Bits and DocIdSet.
class | OpenBitSet An "open" BitSet implementation that allows direct access to the array of words storing the bits.
class | OpenBitSetDISI OpenBitSet with added methods to bulk-update the bits from a DocIdSetIterator.
class | SortedVIntList Stores and iterate on sorted integers in compressed form in RAM.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.DocIdSetIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.DocIdSetIterator

Packages that use DocIdSetIterator
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.spans | The calculus of spans.
org.apache.lucene.util | Some utility classes.

Uses of DocIdSetIterator in org.apache.lucene.search

Subclasses of DocIdSetIterator in org.apache.lucene.search
protected class | ConstantScoreQuery.ConstantScorer
class | FilteredDocIdSetIterator Abstract decorator class of a DocIdSetIterator implementation that provides on-demand filter/validation mechanism on an underlying DocIdSetIterator.
class | ScoreCachingWrappingScorer A Scorer which wraps another scorer and caches the score of the current document.
class | Scorer Expert: Common scoring functionality for different types of queries.

Fields in org.apache.lucene.search declared as DocIdSetIterator
protected  DocIdSetIterator FilteredDocIdSetIterator._innerIter

Methods in org.apache.lucene.search that return DocIdSetIterator
DocIdSetIterator | FieldCacheDocIdSet.iterator()
abstract DocIdSetIterator | DocIdSet.iterator() Provides a DocIdSetIterator to access the set.
DocIdSetIterator | FilteredDocIdSet.iterator() Implementation of the contract to build a DocIdSetIterator.

Constructors in org.apache.lucene.search with parameters of type DocIdSetIterator
ConstantScoreQuery.ConstantScorer(Similarity similarity, DocIdSetIterator docIdSetIterator, Weight w)
FilteredDocIdSetIterator(DocIdSetIterator innerIter)
Constructor.

Uses of DocIdSetIterator in org.apache.lucene.search.payloads

Subclasses of DocIdSetIterator in org.apache.lucene.search.payloads
class | PayloadNearQuery.PayloadNearSpanScorer
protected class | PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

Uses of DocIdSetIterator in org.apache.lucene.search.spans

Subclasses of DocIdSetIterator in org.apache.lucene.search.spans
 class SpanScorer
Public for extension only.

Uses of DocIdSetIterator in org.apache.lucene.util

Subclasses of DocIdSetIterator in org.apache.lucene.util
 class OpenBitSetIterator
An iterator to iterate over set bits in an OpenBitSet.

Methods in org.apache.lucene.util that return DocIdSetIterator
DocIdSetIterator | OpenBitSet.iterator()
DocIdSetIterator | FixedBitSet.iterator()
DocIdSetIterator | SortedVIntList.iterator()
DocIdSetIterator | DocIdBitSet.iterator()

Methods in org.apache.lucene.util with parameters of type DocIdSetIterator
void | FixedBitSet.and(DocIdSetIterator iter) Does in-place AND of the bits provided by the iterator.
void | FixedBitSet.andNot(DocIdSetIterator iter) Does in-place AND NOT of the bits provided by the iterator.
void | OpenBitSetDISI.inPlaceAnd(DocIdSetIterator disi) Perform an inplace AND with the doc ids from a given DocIdSetIterator, leaving only the bits set for which the doc ids are in common.
void | OpenBitSetDISI.inPlaceNot(DocIdSetIterator disi) Perform an inplace NOT with the doc ids from a given DocIdSetIterator, clearing all the bits for each such doc id.
void | OpenBitSetDISI.inPlaceOr(DocIdSetIterator disi) Perform an inplace OR with the doc ids from a given DocIdSetIterator, setting the bit for each such doc id.
void | OpenBitSetDISI.inPlaceXor(DocIdSetIterator disi) Perform an inplace XOR with the doc ids from a given DocIdSetIterator, flipping all the bits for each such doc id.
void | FixedBitSet.or(DocIdSetIterator iter) Does in-place OR of the bits provided by the iterator.

Constructors in org.apache.lucene.util with parameters of type DocIdSetIterator
OpenBitSetDISI(DocIdSetIterator disi, int maxSize)
Construct an OpenBitSetDISI with its bits set from the doc ids of the given DocIdSetIterator.
SortedVIntList(DocIdSetIterator docIdSetIterator)
Create a SortedVIntList.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.DuplicateFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.DuplicateFilter

No usage of org.apache.lucene.search.DuplicateFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.Explanation

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.Explanation

Packages that use Explanation
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.function | Programmatic control over documents scores.
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.spans | The calculus of spans.

Uses of Explanation in org.apache.lucene.search

Subclasses of Explanation in org.apache.lucene.search
 class ComplexExplanation
Expert: Describes the score computation for document and query, and can distinguish a match independent of a positive value.

Methods in org.apache.lucene.search that return Explanation
Explanation | DisjunctionMaxQuery.DisjunctionMaxWeight.explain(IndexReader reader, int doc) Explain the score we computed for doc
abstract Explanation | Weight.explain(IndexReader reader, int doc) An explanation of the score computation for the named document.
Explanation | ConstantScoreQuery.ConstantWeight.explain(IndexReader reader, int doc)
Explanation | BooleanQuery.BooleanWeight.explain(IndexReader reader, int doc)
Explanation | IndexSearcher.explain(Query query, int doc) Returns an Explanation that describes how doc scored against query.
Explanation | Searcher.explain(Query query, int doc) Deprecated. Returns an Explanation that describes how doc scored against query.
Explanation | RemoteSearchable.explain(Weight weight, int doc) Deprecated.
Explanation | IndexSearcher.explain(Weight weight, int doc) Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.
abstract Explanation | Searcher.explain(Weight weight, int doc) Deprecated.
Explanation | Searchable.explain(Weight weight, int doc) Deprecated. Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.
Explanation | MultiSearcher.explain(Weight weight, int doc) Deprecated.
Explanation[] | Explanation.getDetails() The sub-nodes of this explanation node.

Methods in org.apache.lucene.search with parameters of type Explanation
void | Explanation.addDetail(Explanation detail) Adds a sub-node to this explanation node.
static void | CheckHits.verifyExplanation(String q, int doc, float score, boolean deep, Explanation expl) Assert that an explanation has the expected score, and optionally that its sub-details max/sum/factor match to that score.

Uses of Explanation in org.apache.lucene.search.function

Methods in org.apache.lucene.search.function that return Explanation
Explanation | CustomScoreProvider.customExplain(int doc, Explanation subQueryExpl, Explanation valSrcExpl) Explain the custom score.
Explanation | CustomScoreProvider.customExplain(int doc, Explanation subQueryExpl, Explanation[] valSrcExpls) Explain the custom score.
Explanation | DocValues.explain(int doc) Explain the scoring value for the input doc.

Methods in org.apache.lucene.search.function with parameters of type Explanation
Explanation | CustomScoreProvider.customExplain(int doc, Explanation subQueryExpl, Explanation valSrcExpl) Explain the custom score.
Explanation | CustomScoreProvider.customExplain(int doc, Explanation subQueryExpl, Explanation[] valSrcExpls) Explain the custom score.
Explanation | CustomScoreProvider.customExplain(int doc, Explanation subQueryExpl, Explanation[] valSrcExpls) Explain the custom score.

Uses of Explanation in org.apache.lucene.search.payloads

Methods in org.apache.lucene.search.payloads that return Explanation
Explanation | PayloadTermQuery.PayloadTermWeight.explain(IndexReader reader, int doc)
protected Explanation | PayloadNearQuery.PayloadNearSpanScorer.explain(int doc)
protected Explanation | PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer.explain(int doc)
Explanation | MinPayloadFunction.explain(int doc, int numPayloadsSeen, float payloadScore)
Explanation | MaxPayloadFunction.explain(int doc, int numPayloadsSeen, float payloadScore)
Explanation | AveragePayloadFunction.explain(int doc, int numPayloadsSeen, float payloadScore)
Explanation | PayloadFunction.explain(int docId, int numPayloadsSeen, float payloadScore)

Uses of Explanation in org.apache.lucene.search.spans

Methods in org.apache.lucene.search.spans that return Explanation
Explanation | SpanWeight.explain(IndexReader reader, int doc)
protected Explanation | SpanScorer.explain(int doc) This method is no longer an official member of Scorer, but it is needed by SpanWeight to build an explanation.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.Explanation.IDFExplanation

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.Explanation.IDFExplanation

Packages that use Explanation.IDFExplanation
org.apache.lucene.search Code to search indices.

Uses of Explanation.IDFExplanation in org.apache.lucene.search

Methods in org.apache.lucene.search that return Explanation.IDFExplanation
 Explanation.IDFExplanation Similarity.idfExplain(Collection<Term> terms, Searcher searcher)
Computes a score factor for a phrase.
 Explanation.IDFExplanation Similarity.idfExplain(Term term, Searcher searcher)
This method forwards to Similarity.idfExplain(Term,Searcher,int) by passing searcher.docFreq(term) as the docFreq.
 Explanation.IDFExplanation Similarity.idfExplain(Term term, Searcher searcher, int docFreq)
Computes a score factor for a simple term and returns an explanation for that score factor.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.FieldCache.ByteParser

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.FieldCache.ByteParser

Packages that use FieldCache.ByteParser
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.function | Programmatic control over documents scores.

Uses of FieldCache.ByteParser in org.apache.lucene.search

Fields in org.apache.lucene.search declared as FieldCache.ByteParser
static FieldCache.ByteParser FieldCache.DEFAULT_BYTE_PARSER
The default parser for byte values, which are encoded by Byte.toString(byte)

Methods in org.apache.lucene.search with parameters of type FieldCache.ByteParser
 byte[] FieldCache.getBytes(IndexReader reader, String field, FieldCache.ByteParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as bytes and returns an array of size reader.maxDoc() of the value each document has in the given field.
 byte[] FieldCache.getBytes(IndexReader reader, String field, FieldCache.ByteParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as bytes and returns an array of size reader.maxDoc() of the value each document has in the given field.
static FieldCacheRangeFilter<Byte> FieldCacheRangeFilter.newByteRange(String field, FieldCache.ByteParser parser, Byte lowerVal, Byte upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getBytes(IndexReader,String,FieldCache.ByteParser).

Uses of FieldCache.ByteParser in org.apache.lucene.search.function

Constructors in org.apache.lucene.search.function with parameters of type FieldCache.ByteParser
ByteFieldSource(String field, FieldCache.ByteParser parser)
Create a cached byte field source with a specific string-to-byte parser.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldCache.CacheEntry

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldCache.CacheEntry

Packages that use FieldCache.CacheEntry
org.apache.lucene.search | Code to search indices.
org.apache.lucene.util | Some utility classes.

Uses of FieldCache.CacheEntry in org.apache.lucene.search

Methods in org.apache.lucene.search that return FieldCache.CacheEntry
 FieldCache.CacheEntry[] FieldCache.getCacheEntries()
EXPERT: Generates an array of CacheEntry objects representing all items currently in the FieldCache.

Uses of FieldCache.CacheEntry in org.apache.lucene.util

Methods in org.apache.lucene.util that return FieldCache.CacheEntry
 FieldCache.CacheEntry[] FieldCacheSanityChecker.Insanity.getCacheEntries()
CacheEntry objects which suggest a problem

Methods in org.apache.lucene.util with parameters of type FieldCache.CacheEntry
FieldCacheSanityChecker.Insanity[] | FieldCacheSanityChecker.check(FieldCache.CacheEntry... cacheEntries) Tests a CacheEntry[] for indication of "insane" cache usage.
static FieldCacheSanityChecker.Insanity[] | FieldCacheSanityChecker.checkSanity(FieldCache.CacheEntry... cacheEntries) Quick and dirty convenience method that instantiates an instance with "good defaults" and uses it to test the CacheEntrys

Constructors in org.apache.lucene.util with parameters of type FieldCache.CacheEntry
FieldCacheSanityChecker.Insanity(FieldCacheSanityChecker.InsanityType type, String msg, FieldCache.CacheEntry... entries)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldCache.CreationPlaceholder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldCache.CreationPlaceholder

No usage of org.apache.lucene.search.FieldCache.CreationPlaceholder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.FieldCache.DoubleParser

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.FieldCache.DoubleParser

Packages that use FieldCache.DoubleParser
org.apache.lucene.search Code to search indices.

Uses of FieldCache.DoubleParser in org.apache.lucene.search

Fields in org.apache.lucene.search declared as FieldCache.DoubleParser
static FieldCache.DoubleParser | FieldCache.DEFAULT_DOUBLE_PARSER The default parser for double values, which are encoded by Double.toString(double)
static FieldCache.DoubleParser | FieldCache.NUMERIC_UTILS_DOUBLE_PARSER A parser instance for double values encoded with NumericUtils, e.g.

Methods in org.apache.lucene.search with parameters of type FieldCache.DoubleParser
 double[] FieldCache.getDoubles(IndexReader reader, String field, FieldCache.DoubleParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as doubles and returns an array of size reader.maxDoc() of the value each document has in the given field.
 double[] FieldCache.getDoubles(IndexReader reader, String field, FieldCache.DoubleParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as doubles and returns an array of size reader.maxDoc() of the value each document has in the given field.
static FieldCacheRangeFilter<Double> FieldCacheRangeFilter.newDoubleRange(String field, FieldCache.DoubleParser parser, Double lowerVal, Double upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getDoubles(IndexReader,String,FieldCache.DoubleParser).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.FieldCache.FloatParser

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.FieldCache.FloatParser

Packages that use FieldCache.FloatParser
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.function | Programmatic control over documents scores.

Uses of FieldCache.FloatParser in org.apache.lucene.search

Fields in org.apache.lucene.search declared as FieldCache.FloatParser
static FieldCache.FloatParser | FieldCache.DEFAULT_FLOAT_PARSER The default parser for float values, which are encoded by Float.toString(float)
static FieldCache.FloatParser | FieldCache.NUMERIC_UTILS_FLOAT_PARSER A parser instance for float values encoded with NumericUtils, e.g.

Methods in org.apache.lucene.search with parameters of type FieldCache.FloatParser
 float[] FieldCache.getFloats(IndexReader reader, String field, FieldCache.FloatParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.
 float[] FieldCache.getFloats(IndexReader reader, String field, FieldCache.FloatParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as floats and returns an array of size reader.maxDoc() of the value each document has in the given field.
static FieldCacheRangeFilter<Float> FieldCacheRangeFilter.newFloatRange(String field, FieldCache.FloatParser parser, Float lowerVal, Float upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getFloats(IndexReader,String,FieldCache.FloatParser).

Uses of FieldCache.FloatParser in org.apache.lucene.search.function

Constructors in org.apache.lucene.search.function with parameters of type FieldCache.FloatParser
FloatFieldSource(String field, FieldCache.FloatParser parser)
Create a cached float field source with a specific string-to-float parser.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.FieldCache

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.FieldCache

Packages that use FieldCache
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.function | Programmatic control over documents scores.
org.apache.lucene.util | Some utility classes.

Uses of FieldCache in org.apache.lucene.search

Fields in org.apache.lucene.search declared as FieldCache
static FieldCache FieldCache.DEFAULT
Expert: The cache used internally by sorting and range query classes.

Methods in org.apache.lucene.search that return FieldCache
 FieldCache FieldCacheTermsFilter.getFieldCache()

Uses of FieldCache in org.apache.lucene.search.function

Methods in org.apache.lucene.search.function with parameters of type FieldCache
DocValues | ByteFieldSource.getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
abstract DocValues | FieldCacheSource.getCachedFieldValues(FieldCache cache, String field, IndexReader reader) Return cached DocValues for input field and reader.
DocValues | ShortFieldSource.getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
DocValues | IntFieldSource.getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
DocValues | FloatFieldSource.getCachedFieldValues(FieldCache cache, String field, IndexReader reader)

Uses of FieldCache in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type FieldCache
static FieldCacheSanityChecker.Insanity[] | FieldCacheSanityChecker.checkSanity(FieldCache cache) Quick and dirty convenience method
protected void | LuceneTestCase.purgeFieldCache(FieldCache fc) Forcible purges all cache entries from the FieldCache.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.FieldCache.IntParser

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.FieldCache.IntParser

Packages that use FieldCache.IntParser
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.function | Programmatic control over documents scores.

Uses of FieldCache.IntParser in org.apache.lucene.search

Fields in org.apache.lucene.search declared as FieldCache.IntParser
static FieldCache.IntParser | FieldCache.DEFAULT_INT_PARSER The default parser for int values, which are encoded by Integer.toString(int)
static FieldCache.IntParser | FieldCache.NUMERIC_UTILS_INT_PARSER A parser instance for int values encoded by NumericUtils.intToPrefixCoded(int), e.g.

Methods in org.apache.lucene.search with parameters of type FieldCache.IntParser
 int[] FieldCache.getInts(IndexReader reader, String field, FieldCache.IntParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
 int[] FieldCache.getInts(IndexReader reader, String field, FieldCache.IntParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as integers and returns an array of size reader.maxDoc() of the value each document has in the given field.
static FieldCacheRangeFilter<Integer> FieldCacheRangeFilter.newIntRange(String field, FieldCache.IntParser parser, Integer lowerVal, Integer upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getInts(IndexReader,String,FieldCache.IntParser).

Uses of FieldCache.IntParser in org.apache.lucene.search.function

Constructors in org.apache.lucene.search.function with parameters of type FieldCache.IntParser
IntFieldSource(String field, FieldCache.IntParser parser)
Create a cached int field source with a specific string-to-int parser.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.FieldCache.LongParser

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.FieldCache.LongParser

Packages that use FieldCache.LongParser
org.apache.lucene.search Code to search indices.

Uses of FieldCache.LongParser in org.apache.lucene.search

Fields in org.apache.lucene.search declared as FieldCache.LongParser
static FieldCache.LongParser | FieldCache.DEFAULT_LONG_PARSER The default parser for long values, which are encoded by Long.toString(long)
static FieldCache.LongParser | FieldCache.NUMERIC_UTILS_LONG_PARSER A parser instance for long values encoded by NumericUtils.longToPrefixCoded(long), e.g.

Methods in org.apache.lucene.search with parameters of type FieldCache.LongParser
 long[] FieldCache.getLongs(IndexReader reader, String field, FieldCache.LongParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.
 long[] FieldCache.getLongs(IndexReader reader, String field, FieldCache.LongParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as longs and returns an array of size reader.maxDoc() of the value each document has in the given field.
static FieldCacheRangeFilter<Long> FieldCacheRangeFilter.newLongRange(String field, FieldCache.LongParser parser, Long lowerVal, Long upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getLongs(IndexReader,String,FieldCache.LongParser).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.FieldCache.Parser

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.FieldCache.Parser

Packages that use FieldCache.Parser
org.apache.lucene.search Code to search indices.

Uses of FieldCache.Parser in org.apache.lucene.search

Subinterfaces of FieldCache.Parser in org.apache.lucene.search
static interface | FieldCache.ByteParser Interface to parse bytes from document fields.
static interface | FieldCache.DoubleParser Interface to parse doubles from document fields.
static interface | FieldCache.FloatParser Interface to parse floats from document fields.
static interface | FieldCache.IntParser Interface to parse ints from document fields.
static interface | FieldCache.LongParser Interface to parse long from document fields.
static interface | FieldCache.ShortParser Interface to parse shorts from document fields.

Methods in org.apache.lucene.search that return FieldCache.Parser
 FieldCache.Parser FieldCacheRangeFilter.getParser()
Returns the current numeric parser (null for T is String}
 FieldCache.Parser SortField.getParser()
Returns the instance of a FieldCache parser that fits to the given sort type.

Constructors in org.apache.lucene.search with parameters of type FieldCache.Parser
SortField(String field, FieldCache.Parser parser)
Creates a sort by terms in the given field, parsed to numeric values using a custom FieldCache.Parser.
SortField(String field, FieldCache.Parser parser, boolean reverse)
Creates a sort, possibly in reverse, by terms in the given field, parsed to numeric values using a custom FieldCache.Parser.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.FieldCache.ShortParser

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.FieldCache.ShortParser

Packages that use FieldCache.ShortParser
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.function | Programmatic control over documents scores.

Uses of FieldCache.ShortParser in org.apache.lucene.search

Fields in org.apache.lucene.search declared as FieldCache.ShortParser
static FieldCache.ShortParser FieldCache.DEFAULT_SHORT_PARSER
The default parser for short values, which are encoded by Short.toString(short)

Methods in org.apache.lucene.search with parameters of type FieldCache.ShortParser
 short[] FieldCache.getShorts(IndexReader reader, String field, FieldCache.ShortParser parser)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.
 short[] FieldCache.getShorts(IndexReader reader, String field, FieldCache.ShortParser parser, boolean setDocsWithField)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field as shorts and returns an array of size reader.maxDoc() of the value each document has in the given field.
static FieldCacheRangeFilter<Short> FieldCacheRangeFilter.newShortRange(String field, FieldCache.ShortParser parser, Short lowerVal, Short upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getShorts(IndexReader,String,FieldCache.ShortParser).

Uses of FieldCache.ShortParser in org.apache.lucene.search.function

Constructors in org.apache.lucene.search.function with parameters of type FieldCache.ShortParser
ShortFieldSource(String field, FieldCache.ShortParser parser)
Create a cached short field source with a specific string-to-short parser.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldCache.StringIndex

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldCache.StringIndex

Packages that use FieldCache.StringIndex
org.apache.lucene.search Code to search indices.

Uses of FieldCache.StringIndex in org.apache.lucene.search

Methods in org.apache.lucene.search that return FieldCache.StringIndex
 FieldCache.StringIndex FieldCache.getStringIndex(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found reads the term values in field and returns an array of them in natural order, along with an array telling which element in the term array each document uses.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldCacheDocIdSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldCacheDocIdSet

No usage of org.apache.lucene.search.FieldCacheDocIdSet

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldCacheRangeFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldCacheRangeFilter

Packages that use FieldCacheRangeFilter
org.apache.lucene.search Code to search indices.

Uses of FieldCacheRangeFilter in org.apache.lucene.search

Methods in org.apache.lucene.search that return FieldCacheRangeFilter
static FieldCacheRangeFilter<Byte> FieldCacheRangeFilter.newByteRange(String field, Byte lowerVal, Byte upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getBytes(IndexReader,String).
static FieldCacheRangeFilter<Byte> FieldCacheRangeFilter.newByteRange(String field, FieldCache.ByteParser parser, Byte lowerVal, Byte upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getBytes(IndexReader,String,FieldCache.ByteParser).
static FieldCacheRangeFilter<Double> FieldCacheRangeFilter.newDoubleRange(String field, Double lowerVal, Double upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getDoubles(IndexReader,String).
static FieldCacheRangeFilter<Double> FieldCacheRangeFilter.newDoubleRange(String field, FieldCache.DoubleParser parser, Double lowerVal, Double upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getDoubles(IndexReader,String,FieldCache.DoubleParser).
static FieldCacheRangeFilter<Float> FieldCacheRangeFilter.newFloatRange(String field, FieldCache.FloatParser parser, Float lowerVal, Float upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getFloats(IndexReader,String,FieldCache.FloatParser).
static FieldCacheRangeFilter<Float> FieldCacheRangeFilter.newFloatRange(String field, Float lowerVal, Float upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getFloats(IndexReader,String).
static FieldCacheRangeFilter<Integer> FieldCacheRangeFilter.newIntRange(String field, FieldCache.IntParser parser, Integer lowerVal, Integer upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getInts(IndexReader,String,FieldCache.IntParser).
static FieldCacheRangeFilter<Integer> FieldCacheRangeFilter.newIntRange(String field, Integer lowerVal, Integer upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getInts(IndexReader,String).
static FieldCacheRangeFilter<Long> FieldCacheRangeFilter.newLongRange(String field, FieldCache.LongParser parser, Long lowerVal, Long upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getLongs(IndexReader,String,FieldCache.LongParser).
static FieldCacheRangeFilter<Long> FieldCacheRangeFilter.newLongRange(String field, Long lowerVal, Long upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getLongs(IndexReader,String).
static FieldCacheRangeFilter<Short> FieldCacheRangeFilter.newShortRange(String field, FieldCache.ShortParser parser, Short lowerVal, Short upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getShorts(IndexReader,String,FieldCache.ShortParser).
static FieldCacheRangeFilter<Short> FieldCacheRangeFilter.newShortRange(String field, Short lowerVal, Short upperVal, boolean includeLower, boolean includeUpper)
Creates a numeric range filter using FieldCache.getShorts(IndexReader,String).
static FieldCacheRangeFilter<String> FieldCacheRangeFilter.newStringRange(String field, String lowerVal, String upperVal, boolean includeLower, boolean includeUpper)
Creates a string range filter using FieldCache.getStringIndex(org.apache.lucene.index.IndexReader, java.lang.String).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldCacheTermsFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldCacheTermsFilter

No usage of org.apache.lucene.search.FieldCacheTermsFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldComparator.ByteComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldComparator.ByteComparator

No usage of org.apache.lucene.search.FieldComparator.ByteComparator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldComparator.DocComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldComparator.DocComparator

No usage of org.apache.lucene.search.FieldComparator.DocComparator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldComparator.DoubleComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldComparator.DoubleComparator

No usage of org.apache.lucene.search.FieldComparator.DoubleComparator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldComparator.FloatComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldComparator.FloatComparator

No usage of org.apache.lucene.search.FieldComparator.FloatComparator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldComparator

Packages that use FieldComparator
org.apache.lucene.search | Code to search indices.
org.apache.lucene.spatial.tier | Support for filtering based upon geographic location.

Uses of FieldComparator in org.apache.lucene.search

Subclasses of FieldComparator in org.apache.lucene.search
static class | FieldComparator.ByteComparator Parses field's values as byte (using FieldCache.getBytes(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.DocComparator Sorts by ascending docID
static class | FieldComparator.DoubleComparator Parses field's values as double (using FieldCache.getDoubles(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.FloatComparator Parses field's values as float (using FieldCache.getFloats(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.IntComparator Parses field's values as int (using FieldCache.getInts(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.LongComparator Parses field's values as long (using FieldCache.getLongs(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.NumericComparator<T extends Number>
static class | FieldComparator.RelevanceComparator Sorts by descending relevance.
static class | FieldComparator.ShortComparator Parses field's values as short (using FieldCache.getShorts(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.StringComparatorLocale Sorts by a field's value using the Collator for a given Locale.
static class | FieldComparator.StringOrdValComparator Sorts by field's natural String sort order, using ordinals.
static class | FieldComparator.StringValComparator Sorts by field's natural String sort order.

Fields in org.apache.lucene.search declared as FieldComparator
protected  FieldComparator<?>[] FieldValueHitQueue.comparators

Methods in org.apache.lucene.search that return FieldComparator
FieldComparator<?> | SortField.getComparator(int numHits, int sortPos) Returns the FieldComparator to use for sorting.
FieldComparator<?>[] | FieldValueHitQueue.getComparators()
abstract FieldComparator<?> | FieldComparatorSource.newComparator(String fieldname, int numHits, int sortPos, boolean reversed) Creates a comparator for the field in the given index.

Uses of FieldComparator in org.apache.lucene.spatial.tier

Methods in org.apache.lucene.spatial.tier that return FieldComparator
 FieldComparator DistanceFieldComparatorSource.newComparator(String fieldname, int numHits, int sortPos, boolean reversed)
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldComparator.IntComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldComparator.IntComparator

No usage of org.apache.lucene.search.FieldComparator.IntComparator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldComparator.LongComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldComparator.LongComparator

No usage of org.apache.lucene.search.FieldComparator.LongComparator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldComparator.NumericComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldComparator.NumericComparator

Packages that use FieldComparator.NumericComparator
org.apache.lucene.search Code to search indices.

Uses of FieldComparator.NumericComparator in org.apache.lucene.search

Subclasses of FieldComparator.NumericComparator in org.apache.lucene.search
static class | FieldComparator.ByteComparator Parses field's values as byte (using FieldCache.getBytes(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.DoubleComparator Parses field's values as double (using FieldCache.getDoubles(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.FloatComparator Parses field's values as float (using FieldCache.getFloats(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.IntComparator Parses field's values as int (using FieldCache.getInts(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.LongComparator Parses field's values as long (using FieldCache.getLongs(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value
static class | FieldComparator.ShortComparator Parses field's values as short (using FieldCache.getShorts(org.apache.lucene.index.IndexReader, java.lang.String) and sorts by ascending value

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldComparator.RelevanceComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldComparator.RelevanceComparator

No usage of org.apache.lucene.search.FieldComparator.RelevanceComparator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldComparator.ShortComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldComparator.ShortComparator

No usage of org.apache.lucene.search.FieldComparator.ShortComparator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldComparator.StringComparatorLocale

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldComparator.StringComparatorLocale

No usage of org.apache.lucene.search.FieldComparator.StringComparatorLocale

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldComparator.StringOrdValComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldComparator.StringOrdValComparator

No usage of org.apache.lucene.search.FieldComparator.StringOrdValComparator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldComparator.StringValComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldComparator.StringValComparator

No usage of org.apache.lucene.search.FieldComparator.StringValComparator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldComparatorSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldComparatorSource

Packages that use FieldComparatorSource
org.apache.lucene.search | Code to search indices.
org.apache.lucene.spatial.tier | Support for filtering based upon geographic location.

Uses of FieldComparatorSource in org.apache.lucene.search

Methods in org.apache.lucene.search that return FieldComparatorSource
 FieldComparatorSource SortField.getComparatorSource()
Returns the FieldComparatorSource used for custom sorting

Constructors in org.apache.lucene.search with parameters of type FieldComparatorSource
SortField(String field, FieldComparatorSource comparator)
Creates a sort with a custom comparison function.
SortField(String field, FieldComparatorSource comparator, boolean reverse)
Creates a sort, possibly in reverse, with a custom comparison function.

Uses of FieldComparatorSource in org.apache.lucene.spatial.tier

Subclasses of FieldComparatorSource in org.apache.lucene.spatial.tier
 class DistanceFieldComparatorSource
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldDoc

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldDoc

No usage of org.apache.lucene.search.FieldDoc

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldValueFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldValueFilter

No usage of org.apache.lucene.search.FieldValueFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldValueHitQueue.Entry

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldValueHitQueue.Entry

Packages that use FieldValueHitQueue.Entry
org.apache.lucene.search Code to search indices.

Uses of FieldValueHitQueue.Entry in org.apache.lucene.search

Classes in org.apache.lucene.search with type parameters of type FieldValueHitQueue.Entry
 class FieldValueHitQueue<T extends FieldValueHitQueue.Entry>
Expert: A hit queue for sorting by hits by terms in more than one field.

Methods in org.apache.lucene.search with type parameters of type FieldValueHitQueue.Entry
static
<T extends FieldValueHitQueue.Entry>
FieldValueHitQueue<T>
FieldValueHitQueue.create(SortField[] fields, int size)
Creates a hit queue sorted by the given list of fields.

Methods in org.apache.lucene.search with parameters of type FieldValueHitQueue.Entry
protected abstract  boolean FieldValueHitQueue.lessThan(FieldValueHitQueue.Entry a, FieldValueHitQueue.Entry b)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FieldValueHitQueue

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FieldValueHitQueue

Packages that use FieldValueHitQueue
org.apache.lucene.search Code to search indices.

Uses of FieldValueHitQueue in org.apache.lucene.search

Methods in org.apache.lucene.search that return FieldValueHitQueue
static
<T extends FieldValueHitQueue.Entry>
FieldValueHitQueue<T>
FieldValueHitQueue.create(SortField[] fields, int size)
Creates a hit queue sorted by the given list of fields.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.Filter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.Filter

Packages that use Filter
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.grouping | This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.
org.apache.lucene.search.join | This modules support index-time and query-time joins.
org.apache.lucene.spatial.geohash | Support for Geohash encoding, decoding, and filtering.
org.apache.lucene.spatial.tier | Support for filtering based upon geographic location.
org.apache.lucene.xmlparser | Parser that produces Lucene Query objects from XML streams.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Uses of Filter in org.apache.lucene.index

Constructors in org.apache.lucene.index with parameters of type Filter
PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Filter docsInFirstIndex)
Deprecated. use PKIndexSplitter.PKIndexSplitter(Version, Directory, Directory, Directory, Filter) instead. This constructor will be removed in Lucene 4.0.
PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Filter docsInFirstIndex, IndexWriterConfig config1, IndexWriterConfig config2)
PKIndexSplitter(Version version, Directory input, Directory dir1, Directory dir2, Filter docsInFirstIndex)
Split an index based on a Filter.

Uses of Filter in org.apache.lucene.search

Subclasses of Filter in org.apache.lucene.search
class | BooleanFilter A container Filter that allows Boolean composition of Filters.
class | CachingSpanFilter Wraps another SpanFilter's result and caches it.
class | CachingWrapperFilter Wraps another filter's result and caches it.
class | CachingWrapperFilterHelper A unit test helper class to test when the filter is getting cached and when it is not.
class | ChainedFilter Allows multiple Filters to be chained.
class | DuplicateFilter
class | FieldCacheRangeFilter<T> A range filter built on top of a cached single term field (in FieldCache).
class | FieldCacheTermsFilter A Filter that only accepts documents whose single term value in the specified field is contained in the provided set of allowed terms.
class | FieldValueFilter A Filter that accepts all documents that have one or more values in a given field.
class | MultiTermQueryWrapperFilter<Q extends MultiTermQuery> A wrapper for MultiTermQuery, that exposes its functionality as a Filter.
class | NumericRangeFilter<T extends Number> A Filter that only accepts numeric values within a specified range.
class | PrefixFilter A Filter that restricts search results to values that have a matching prefix in a given field.
class | QueryWrapperFilter Constrains search results to only match those which also match a provided query.
class | RemoteCachingWrapperFilter Deprecated. This package (all of contrib/remote) will be removed in 4.0.
class | SpanFilter Abstract base class providing a mechanism to restrict searches to a subset of an index and also maintains and returns position information.
class | SpanQueryFilter Constrains search results to only match those which also match a provided query.
class | TermRangeFilter A Filter that restricts search results to a range of term values in a given field.
class | TermsFilter Constructs a filter for docs matching any of the terms added to this class.

Fields in org.apache.lucene.search declared as Filter
protected Filter | RemoteCachingWrapperFilter.filter Deprecated.
protected Filter | ConstantScoreQuery.filter
Filter | FilterManager.FilterItem.filter

Methods in org.apache.lucene.search that return Filter
Filter | FilterClause.getFilter() Returns this FilterClause's filter
Filter | ConstantScoreQuery.getFilter() Returns the encapsulated filter, returns null if a query is wrapped.
Filter | FilteredQuery.getFilter()
Filter | FilterManager.getFilter(Filter filter) Deprecated. Returns the cached version of the filter.
protected Filter | SearchEquivalenceTestBase.randomFilter() Returns a random filter over the document set

Methods in org.apache.lucene.search with parameters of type Filter
 void BooleanFilter.add(Filter filter, BooleanClause.Occur occur)
protected  void SearchEquivalenceTestBase.assertSubsetOf(Query q1, Query q2, Filter filter)
Asserts that the documents returned by q1 are a subset of those returned by q2.
 Filter FilterManager.getFilter(Filter filter)
Deprecated. Returns the cached version of the filter.
 void CheckHits.ExplanationAssertingSearcher.search(Query query, Filter filter, Collector results)
 void IndexSearcher.search(Query query, Filter filter, Collector results)
Lower-level search API.
 void Searcher.search(Query query, Filter filter, Collector results)
Deprecated. Lower-level search API.
 TopDocs CheckHits.ExplanationAssertingSearcher.search(Query query, Filter filter, int n)
 TopDocs IndexSearcher.search(Query query, Filter filter, int n)
Finds the top n hits for query, applying filter if non-null.
 TopDocs Searcher.search(Query query, Filter filter, int n)
Deprecated. Finds the top n hits for query, applying filter if non-null.
 TopFieldDocs CheckHits.ExplanationAssertingSearcher.search(Query query, Filter filter, int n, Sort sort)
 TopFieldDocs IndexSearcher.search(Query query, Filter filter, int n, Sort sort)
Search implementation with arbitrary sorting.
 TopFieldDocs Searcher.search(Query query, Filter filter, int n, Sort sort)
Deprecated. Search implementation with arbitrary sorting.
 void RemoteSearchable.search(Weight weight, Filter filter, Collector results)
Deprecated.
 void IndexSearcher.search(Weight weight, Filter filter, Collector collector)
Lower-level search API.
abstract  void Searcher.search(Weight weight, Filter filter, Collector results)
Deprecated.
 void Searchable.search(Weight weight, Filter filter, Collector collector)
Deprecated. Lower-level search API.
 void ParallelMultiSearcher.search(Weight weight, Filter filter, Collector collector)
Deprecated. Lower-level search API.
 void MultiSearcher.search(Weight weight, Filter filter, Collector collector)
Deprecated.
 TopDocs RemoteSearchable.search(Weight weight, Filter filter, int n)
Deprecated.
 TopDocs IndexSearcher.search(Weight weight, Filter filter, int nDocs)
Expert: Low-level search implementation.
abstract  TopDocs Searcher.search(Weight weight, Filter filter, int n)
Deprecated.
 TopDocs Searchable.search(Weight weight, Filter filter, int n)
Deprecated. Expert: Low-level search implementation.
 TopDocs ParallelMultiSearcher.search(Weight weight, Filter filter, int nDocs)
Deprecated. A search implementation which executes each Searchable in its own thread and waits for each search to complete and merge the results back together.
 TopDocs MultiSearcher.search(Weight weight, Filter filter, int nDocs)
Deprecated.
 TopFieldDocs RemoteSearchable.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated.
 TopFieldDocs IndexSearcher.search(Weight weight, Filter filter, int nDocs, Sort sort)
Expert: Low-level search implementation with arbitrary sorting.
abstract  TopFieldDocs Searcher.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated.
 TopFieldDocs Searchable.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated. Expert: Low-level search implementation with arbitrary sorting.
 TopFieldDocs ParallelMultiSearcher.search(Weight weight, Filter filter, int nDocs, Sort sort)
Deprecated. A search implementation allowing sorting which spans a new thread for each Searchable, waits for each search to complete and merges the results back together.
 TopFieldDocs MultiSearcher.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated.
protected  TopFieldDocs IndexSearcher.search(Weight weight, Filter filter, int nDocs, Sort sort, boolean fillFields)
Just like IndexSearcher.search(Weight, Filter, int, Sort), but you choose whether or not the fields in the returned FieldDoc instances should be set by specifying fillFields.
protected  TopDocs IndexSearcher.search(Weight weight, Filter filter, ScoreDoc after, int nDocs)
Expert: Low-level search implementation.
 TopDocs IndexSearcher.searchAfter(ScoreDoc after, Query query, Filter filter, int n)
Finds the top n hits for query, applying filter if non-null, where all results are after a previous result (after).

Constructors in org.apache.lucene.search with parameters of type Filter
CachingWrapperFilter(Filter filter)
New deletes are ignored by default, which gives higher cache hit rate on reopened readers.
CachingWrapperFilter(Filter filter, CachingWrapperFilter.DeletesMode deletesMode)
Expert: by default, the cached filter will be shared across reopened segments that only had changes to their deletions.
CachingWrapperFilterHelper(Filter filter)
ChainedFilter(Filter[] chain)
Ctor.
ChainedFilter(Filter[] chain, int logic)
Ctor.
ChainedFilter(Filter[] chain, int[] logicArray)
Ctor.
ConstantScoreQuery(Filter filter)
Wraps a Filter as a Query.
FilterClause(Filter filter, BooleanClause.Occur occur)
Create a new FilterClause
FilteredQuery(Query query, Filter filter)
Constructs a new query which applies a filter to the results of the original query.
FilterManager.FilterItem(Filter filter)
RemoteCachingWrapperFilter(Filter filter)
Deprecated.

Uses of Filter in org.apache.lucene.search.grouping

Constructors in org.apache.lucene.search.grouping with parameters of type Filter
BlockGroupingCollector(Sort groupSort, int topNGroups, boolean needsScores, Filter lastDocPerGroup)
Create the single pass collector.

Uses of Filter in org.apache.lucene.search.join

Subclasses of Filter in org.apache.lucene.search.join
 class RawTermFilter
Expert: creates a filter accepting all documents containing the provided term, disregarding deleted documents.

Constructors in org.apache.lucene.search.join with parameters of type Filter
ToChildBlockJoinQuery(Query parentQuery, Filter parentsFilter, boolean doScores)
ToParentBlockJoinQuery(Query childQuery, Filter parentsFilter, ToParentBlockJoinQuery.ScoreMode scoreMode)
Create a ToParentBlockJoinQuery.

Uses of Filter in org.apache.lucene.spatial.geohash

Subclasses of Filter in org.apache.lucene.spatial.geohash
 class GeoHashDistanceFilter
Deprecated.

Constructors in org.apache.lucene.spatial.geohash with parameters of type Filter
GeoHashDistanceFilter(Filter startingFilter, double lat, double lng, double miles, String geoHashField)
Deprecated. Provide a distance filter based from a center point with a radius in miles

Uses of Filter in org.apache.lucene.spatial.tier

Subclasses of Filter in org.apache.lucene.spatial.tier
class | CartesianShapeFilter Deprecated.
class | DistanceFilter Deprecated.
class | LatLongDistanceFilter Deprecated.

Fields in org.apache.lucene.spatial.tier declared as Filter
protected  Filter DistanceFilter.startingFilter
Deprecated.

Methods in org.apache.lucene.spatial.tier that return Filter
Filter | CartesianPolyFilterBuilder.getBoundingArea(double latitude, double longitude, double miles) Deprecated.
Filter | DistanceQueryBuilder.getFilter() Deprecated. Create a distance query using a boundary box wrapper around a more precise DistanceFilter.
Filter | DistanceQueryBuilder.getFilter(Query query) Deprecated.

Constructors in org.apache.lucene.spatial.tier with parameters of type Filter
DistanceFieldComparatorSource(Filter distanceFilter)
Deprecated.
DistanceFilter(Filter startingFilter, double distance)
Deprecated. Filters the startingFilter by precise distance checking filter
LatLongDistanceFilter(Filter startingFilter, double lat, double lng, double miles, String latField, String lngField)
Deprecated. Provide a distance filter based from a center point with a radius in miles.

Uses of Filter in org.apache.lucene.xmlparser

Methods in org.apache.lucene.xmlparser that return Filter
Filter | FilterBuilderFactory.getFilter(Element n)
Filter | FilterBuilder.getFilter(Element e)

Uses of Filter in org.apache.lucene.xmlparser.builders

Methods in org.apache.lucene.xmlparser.builders that return Filter
Filter | TermsFilterBuilder.getFilter(Element e)
Filter | BooleanFilterBuilder.getFilter(Element e)
Filter | CachedFilterBuilder.getFilter(Element e)
Filter | RangeFilterBuilder.getFilter(Element e)
Filter | NumericRangeFilterBuilder.getFilter(Element e)
Filter | DuplicateFilterBuilder.getFilter(Element e)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FilterClause

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FilterClause

Packages that use FilterClause
org.apache.lucene.search Code to search indices.

Uses of FilterClause in org.apache.lucene.search

Methods in org.apache.lucene.search that return types with arguments of type FilterClause
List<FilterClause> | BooleanFilter.clauses() Returns the list of clauses
Iterator<FilterClause> | BooleanFilter.iterator() Returns an iterator on the clauses in this query.

Methods in org.apache.lucene.search with parameters of type FilterClause
 void BooleanFilter.add(FilterClause filterClause)
Adds a new FilterClause to the Boolean Filter container

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FilteredDocIdSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FilteredDocIdSet

No usage of org.apache.lucene.search.FilteredDocIdSet

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FilteredDocIdSetIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FilteredDocIdSetIterator

No usage of org.apache.lucene.search.FilteredDocIdSetIterator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FilteredQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FilteredQuery

No usage of org.apache.lucene.search.FilteredQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FilteredTermEnum

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FilteredTermEnum

Packages that use FilteredTermEnum
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.regex | Regular expression Query.

Uses of FilteredTermEnum in org.apache.lucene.search

Subclasses of FilteredTermEnum in org.apache.lucene.search
class | FuzzyTermEnum Subclass of FilteredTermEnum for enumerating all terms that are similar to the specified filter term.
class | PrefixTermEnum Subclass of FilteredTermEnum for enumerating all terms that match the specified prefix filter term.
class | SingleTermEnum Subclass of FilteredTermEnum for enumerating a single term.
class | TermRangeTermEnum Subclass of FilteredTermEnum for enumerating all terms that match the specified range parameters.
class | WildcardTermEnum Subclass of FilteredTermEnum for enumerating all terms that match the specified wildcard filter term.

Methods in org.apache.lucene.search that return FilteredTermEnum
protected FilteredTermEnum | WildcardQuery.getEnum(IndexReader reader)
protected FilteredTermEnum | TermRangeQuery.getEnum(IndexReader reader)
protected abstract FilteredTermEnum | MultiTermQuery.getEnum(IndexReader reader) Construct the enumeration to be used, expanding the pattern term.
protected FilteredTermEnum | FuzzyQuery.getEnum(IndexReader reader)
protected FilteredTermEnum | PrefixQuery.getEnum(IndexReader reader)
protected FilteredTermEnum | NumericRangeQuery.getEnum(IndexReader reader)
protected FilteredTermEnum | MultiTermQuery.RewriteMethod.getTermsEnum(IndexReader reader, MultiTermQuery query) Returns the MultiTermQuerys FilteredTermEnum

Uses of FilteredTermEnum in org.apache.lucene.search.regex

Subclasses of FilteredTermEnum in org.apache.lucene.search.regex
 class RegexTermEnum
Subclass of FilteredTermEnum for enumerating all terms that match the specified regular expression term using the specified regular expression implementation.

Methods in org.apache.lucene.search.regex that return FilteredTermEnum
protected  FilteredTermEnum RegexQuery.getEnum(IndexReader reader)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FilterManager.FilterCleaner

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FilterManager.FilterCleaner

Packages that use FilterManager.FilterCleaner
org.apache.lucene.search Code to search indices.

Uses of FilterManager.FilterCleaner in org.apache.lucene.search

Fields in org.apache.lucene.search declared as FilterManager.FilterCleaner
protected  FilterManager.FilterCleaner FilterManager.filterCleaner
Deprecated. Cache cleaner that runs in a separate thread

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FilterManager.FilterItem

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FilterManager.FilterItem

Packages that use FilterManager.FilterItem
org.apache.lucene.search Code to search indices.

Uses of FilterManager.FilterItem in org.apache.lucene.search

Fields in org.apache.lucene.search with type parameters of type FilterManager.FilterItem
protected  Map<Integer,FilterManager.FilterItem> FilterManager.cache
Deprecated. The cache itself

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FilterManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FilterManager

Packages that use FilterManager
org.apache.lucene.search Code to search indices.

Uses of FilterManager in org.apache.lucene.search

Fields in org.apache.lucene.search declared as FilterManager
protected static FilterManager FilterManager.manager
Deprecated.

Methods in org.apache.lucene.search that return FilterManager
static FilterManager FilterManager.getInstance()
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FuzzyLikeThisQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FuzzyLikeThisQuery

No usage of org.apache.lucene.search.FuzzyLikeThisQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FuzzyQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FuzzyQuery

Packages that use FuzzyQuery
org.apache.lucene.queryParser.standard.builders Standard Lucene Query Node Builders

Uses of FuzzyQuery in org.apache.lucene.queryParser.standard.builders

Methods in org.apache.lucene.queryParser.standard.builders that return FuzzyQuery
 FuzzyQuery FuzzyQueryNodeBuilder.build(QueryNode queryNode)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.FuzzyTermEnum

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.FuzzyTermEnum

No usage of org.apache.lucene.search.FuzzyTermEnum

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.IndexSearcher

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.IndexSearcher

Packages that use IndexSearcher
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.quality | Search Quality Benchmarking.
org.apache.lucene.benchmark.quality.utils | Miscellaneous utilities for search quality benchmarking: query parsing, submission reports.
org.apache.lucene.demo | Demo applications for indexing and searching.
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.memory | High-performance single-document main memory Apache Lucene fulltext search index.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.join | This modules support index-time and query-time joins.
org.apache.lucene.util | Some utility classes.

Uses of IndexSearcher in org.apache.lucene.benchmark.byTask

Methods in org.apache.lucene.benchmark.byTask that return IndexSearcher
 IndexSearcher PerfRunData.getIndexSearcher()

Uses of IndexSearcher in org.apache.lucene.benchmark.quality

Fields in org.apache.lucene.benchmark.quality declared as IndexSearcher
protected  IndexSearcher QualityBenchmark.searcher
Index to be searched.

Constructors in org.apache.lucene.benchmark.quality with parameters of type IndexSearcher
QualityBenchmark(QualityQuery[] qqs, QualityQueryParser qqParser, IndexSearcher searcher, String docNameField)
Create a QualityBenchmark.

Uses of IndexSearcher in org.apache.lucene.benchmark.quality.utils

Methods in org.apache.lucene.benchmark.quality.utils with parameters of type IndexSearcher
String | DocNameExtractor.docName(IndexSearcher searcher, int docid) Extract the name of the input doc from the index.
void | SubmissionReport.report(QualityQuery qq, TopDocs td, String docNameField, IndexSearcher searcher) Report a search result for a certain quality query.

Uses of IndexSearcher in org.apache.lucene.demo

Methods in org.apache.lucene.demo with parameters of type IndexSearcher
static void SearchFiles.doPagingSearch(BufferedReader in, IndexSearcher searcher, Query query, int hitsPerPage, boolean raw, boolean interactive)
This demonstrates a typical paging search scenario, where the search engine presents pages of size n to the user.

Uses of IndexSearcher in org.apache.lucene.index

Methods in org.apache.lucene.index that return IndexSearcher
protected abstract IndexSearcher | ThreadedIndexingAndSearchingTestCase.getCurrentSearcher()
protected abstract IndexSearcher | ThreadedIndexingAndSearchingTestCase.getFinalSearcher()

Methods in org.apache.lucene.index with parameters of type IndexSearcher
protected void | ThreadedIndexingAndSearchingTestCase.releaseSearcher(IndexSearcher s)
protected void | ThreadedIndexingAndSearchingTestCase.smokeTestSearcher(IndexSearcher s)

Uses of IndexSearcher in org.apache.lucene.index.memory

Methods in org.apache.lucene.index.memory that return IndexSearcher
 IndexSearcher MemoryIndex.createSearcher()
Creates and returns a searcher that can be used to execute arbitrary Lucene queries and to collect the resulting query results as hits.

Uses of IndexSearcher in org.apache.lucene.search

Subclasses of IndexSearcher in org.apache.lucene.search
class | AssertingIndexSearcher Helper class that adds some extra checks to ensure correct usage of IndexSearcher and Weight.
static class | CheckHits.ExplanationAssertingSearcher an IndexSearcher that implicitly checks hte explanation of every match whenever it executes a search.

Fields in org.apache.lucene.search declared as IndexSearcher
protected static IndexSearcher | SearchEquivalenceTestBase.s1
protected static IndexSearcher | SearchEquivalenceTestBase.s2
protected IndexSearcher[] | IndexSearcher.subSearchers

Methods in org.apache.lucene.search that return IndexSearcher
IndexSearcher | SearcherLifetimeManager.acquire(long version) Retrieve a previously recorded IndexSearcher, if it has not yet been closed
IndexSearcher | SearcherFactory.newSearcher(IndexReader reader) Returns a new IndexSearcher over the given reader.
protected IndexSearcher | NRTManager.refreshIfNeeded(IndexSearcher referenceToRefresh)
protected IndexSearcher | SearcherManager.refreshIfNeeded(IndexSearcher referenceToRefresh)
static IndexSearcher | QueryUtils.wrapUnderlyingReader(Random random, IndexSearcher s, int edge) Given an IndexSearcher, returns a new IndexSearcher whose IndexReader is a MultiReader containing the Reader of the original IndexSearcher, as well as several "empty" IndexReaders -- some of which will have deleted documents in them.

Methods in org.apache.lucene.search with parameters of type IndexSearcher
static void QueryUtils.checkSkipTo(Query q, IndexSearcher s)
alternate scorer skipTo(),skipTo(),next(),next(),skipTo(),skipTo(), etc and ensure a hitcollector receives same docs and scores
protected  void NRTManager.decRef(IndexSearcher reference)
protected  void SearcherManager.decRef(IndexSearcher reference)
 boolean SearcherLifetimeManager.Pruner.doPrune(double ageSec, IndexSearcher searcher)
Return true if this searcher should be removed.
 boolean SearcherLifetimeManager.PruneByAge.doPrune(double ageSec, IndexSearcher searcher)
 long SearcherLifetimeManager.record(IndexSearcher searcher)
Records that you are now using this IndexSearcher.
protected  IndexSearcher NRTManager.refreshIfNeeded(IndexSearcher referenceToRefresh)
protected  IndexSearcher SearcherManager.refreshIfNeeded(IndexSearcher referenceToRefresh)
 void SearcherLifetimeManager.release(IndexSearcher s)
Release a searcher previously obtained from SearcherLifetimeManager.acquire(long).
protected  boolean NRTManager.tryIncRef(IndexSearcher reference)
protected  boolean SearcherManager.tryIncRef(IndexSearcher reference)
static IndexSearcher QueryUtils.wrapUnderlyingReader(Random random, IndexSearcher s, int edge)
Given an IndexSearcher, returns a new IndexSearcher whose IndexReader is a MultiReader containing the Reader of the original IndexSearcher, as well as several "empty" IndexReaders -- some of which will have deleted documents in them.

Uses of IndexSearcher in org.apache.lucene.search.join

Methods in org.apache.lucene.search.join with parameters of type IndexSearcher
static Query JoinUtil.createJoinQuery(String fromField, String toField, Query fromQuery, IndexSearcher fromSearcher)
Method for query time joining.

Uses of IndexSearcher in org.apache.lucene.util

Methods in org.apache.lucene.util that return IndexSearcher
static IndexSearcher | LuceneTestCase.newSearcher(IndexReader r) create a new searcher over the reader.
static IndexSearcher | LuceneTestCase.newSearcher(IndexReader r, boolean maybeWrap) create a new searcher over the reader.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.MatchAllDocsQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.MatchAllDocsQuery

Packages that use MatchAllDocsQuery
org.apache.lucene.queryParser.standard.builders Standard Lucene Query Node Builders

Uses of MatchAllDocsQuery in org.apache.lucene.queryParser.standard.builders

Methods in org.apache.lucene.queryParser.standard.builders that return MatchAllDocsQuery
 MatchAllDocsQuery MatchAllDocsQueryNodeBuilder.build(QueryNode queryNode)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.MultiCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.MultiCollector

No usage of org.apache.lucene.search.MultiCollector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.MultiPhraseQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.MultiPhraseQuery

Packages that use MultiPhraseQuery
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders

Uses of MultiPhraseQuery in org.apache.lucene.queryParser

Methods in org.apache.lucene.queryParser that return MultiPhraseQuery
protected  MultiPhraseQuery QueryParser.newMultiPhraseQuery()
Builds a new MultiPhraseQuery instance

Uses of MultiPhraseQuery in org.apache.lucene.queryParser.standard.builders

Methods in org.apache.lucene.queryParser.standard.builders that return MultiPhraseQuery
 MultiPhraseQuery MultiPhraseQueryNodeBuilder.build(QueryNode queryNode)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.MultiSearcher

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.MultiSearcher

Packages that use MultiSearcher
org.apache.lucene.search Code to search indices.

Uses of MultiSearcher in org.apache.lucene.search

Subclasses of MultiSearcher in org.apache.lucene.search
 class ParallelMultiSearcher
Deprecated. Please pass an ExecutorService to IndexSearcher, instead.

Methods in org.apache.lucene.search that return MultiSearcher
static MultiSearcher QueryUtils.wrapSearcher(Random random, Searcher s, int edge)
Given a Searcher, returns a new MultiSearcher wrapping the the original Searcher, as well as several "empty" IndexSearchers -- some of which will have deleted documents in them.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.MultiTermQuery.ConstantScoreAutoRewrite

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.MultiTermQuery.ConstantScoreAutoRewrite

No usage of org.apache.lucene.search.MultiTermQuery.ConstantScoreAutoRewrite

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.MultiTermQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.MultiTermQuery

Packages that use MultiTermQuery
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.regex | Regular expression Query.
org.apache.lucene.search.spans | The calculus of spans.

Uses of MultiTermQuery in org.apache.lucene.search

Classes in org.apache.lucene.search with type parameters of type MultiTermQuery
 class MultiTermQueryWrapperFilter<Q extends MultiTermQuery>
A wrapper for MultiTermQuery, that exposes its functionality as a Filter.

Subclasses of MultiTermQuery in org.apache.lucene.search
class | FuzzyQuery Implements the fuzzy search query.
class | NumericRangeQuery<T extends Number> A Query that matches numeric values within a specified range.
class | PrefixQuery A Query that matches documents containing terms with a specified prefix.
class | TermRangeQuery A Query that matches documents within an range of terms.
class | WildcardQuery Implements the wildcard search query.

Fields in org.apache.lucene.search declared as MultiTermQuery
protected  Q MultiTermQueryWrapperFilter.query

Methods in org.apache.lucene.search with parameters of type MultiTermQuery
protected FilteredTermEnum | MultiTermQuery.RewriteMethod.getTermsEnum(IndexReader reader, MultiTermQuery query) Returns the MultiTermQuerys FilteredTermEnum
Q | TopTermsRewrite.rewrite(IndexReader reader, MultiTermQuery query)
abstract Query | MultiTermQuery.RewriteMethod.rewrite(IndexReader reader, MultiTermQuery query)
Q | ScoringRewrite.rewrite(IndexReader reader, MultiTermQuery query)

Uses of MultiTermQuery in org.apache.lucene.search.regex

Subclasses of MultiTermQuery in org.apache.lucene.search.regex
 class RegexQuery
Implements the regular expression term search query.

Uses of MultiTermQuery in org.apache.lucene.search.spans

Classes in org.apache.lucene.search.spans with type parameters of type MultiTermQuery
 class SpanMultiTermQueryWrapper<Q extends MultiTermQuery>
Wraps any MultiTermQuery as a SpanQuery, so it can be nested within other SpanQuery classes.

Fields in org.apache.lucene.search.spans declared as MultiTermQuery
protected  Q SpanMultiTermQueryWrapper.query

Methods in org.apache.lucene.search.spans with parameters of type MultiTermQuery
abstract SpanQuery | SpanMultiTermQueryWrapper.SpanRewriteMethod.rewrite(IndexReader reader, MultiTermQuery query)
SpanQuery | SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite.rewrite(IndexReader reader, MultiTermQuery query)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.MultiTermQuery.RewriteMethod

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.MultiTermQuery.RewriteMethod

Packages that use MultiTermQuery.RewriteMethod
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.spans | The calculus of spans.

Uses of MultiTermQuery.RewriteMethod in org.apache.lucene.queryParser

Methods in org.apache.lucene.queryParser that return MultiTermQuery.RewriteMethod
 MultiTermQuery.RewriteMethod QueryParser.getMultiTermRewriteMethod()

Methods in org.apache.lucene.queryParser with parameters of type MultiTermQuery.RewriteMethod
 void QueryParser.setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method)
By default QueryParser uses MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT when creating a PrefixQuery, WildcardQuery or RangeQuery.

Uses of MultiTermQuery.RewriteMethod in org.apache.lucene.queryParser.standard

Methods in org.apache.lucene.queryParser.standard that return MultiTermQuery.RewriteMethod
MultiTermQuery.RewriteMethod | QueryParserWrapper.getMultiTermRewriteMethod() Deprecated.
MultiTermQuery.RewriteMethod | StandardQueryParser.getMultiTermRewriteMethod()

Methods in org.apache.lucene.queryParser.standard with parameters of type MultiTermQuery.RewriteMethod
void | QueryParserWrapper.setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method) Deprecated.
void | StandardQueryParser.setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method) By default, it uses MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT when creating a prefix, wildcard and range queries.

Uses of MultiTermQuery.RewriteMethod in org.apache.lucene.queryParser.standard.config

Fields in org.apache.lucene.queryParser.standard.config with type parameters of type MultiTermQuery.RewriteMethod
static ConfigurationKey<MultiTermQuery.RewriteMethod> StandardQueryConfigHandler.ConfigurationKeys.MULTI_TERM_REWRITE_METHOD
Key used to set the MultiTermQuery.RewriteMethod used when creating queries

Methods in org.apache.lucene.queryParser.standard.config that return MultiTermQuery.RewriteMethod
MultiTermQuery.RewriteMethod | MultiTermRewriteMethodAttribute.getMultiTermRewriteMethod() Deprecated.
MultiTermQuery.RewriteMethod | MultiTermRewriteMethodAttributeImpl.getMultiTermRewriteMethod() Deprecated.

Methods in org.apache.lucene.queryParser.standard.config with parameters of type MultiTermQuery.RewriteMethod
void | MultiTermRewriteMethodAttribute.setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method) Deprecated.
void | MultiTermRewriteMethodAttributeImpl.setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method) Deprecated.

Uses of MultiTermQuery.RewriteMethod in org.apache.lucene.search

Subclasses of MultiTermQuery.RewriteMethod in org.apache.lucene.search
static class | MultiTermQuery.ConstantScoreAutoRewrite A rewrite method that tries to pick the best constant-score rewrite method based on term and document counts from the query.
static class | MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, but the scores are only computed as the boost.
static class | MultiTermQuery.TopTermsScoringBooleanQueryRewrite A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.
class | ScoringRewrite<Q extends Query>
class | TopTermsRewrite<Q extends Query> Base rewrite method for collecting only the top terms via a priority queue.

Fields in org.apache.lucene.search declared as MultiTermQuery.RewriteMethod
static MultiTermQuery.RewriteMethod | MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT Read-only default instance of MultiTermQuery.ConstantScoreAutoRewrite, with ConstantScoreAutoRewrite.setTermCountCutoff(int) set to ConstantScoreAutoRewrite.DEFAULT_TERM_COUNT_CUTOFF and ConstantScoreAutoRewrite.setDocCountPercent(double) set to ConstantScoreAutoRewrite.DEFAULT_DOC_COUNT_PERCENT.
static MultiTermQuery.RewriteMethod | MultiTermQuery.CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE Like MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE except scores are not computed.
static MultiTermQuery.RewriteMethod | ScoringRewrite.CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE Like ScoringRewrite.SCORING_BOOLEAN_QUERY_REWRITE except scores are not computed.
static MultiTermQuery.RewriteMethod | MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE A rewrite method that first creates a private Filter, by visiting each term in sequence and marking all docs for that term.
protected MultiTermQuery.RewriteMethod | MultiTermQuery.rewriteMethod
static MultiTermQuery.RewriteMethod | MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.

Methods in org.apache.lucene.search that return MultiTermQuery.RewriteMethod
 MultiTermQuery.RewriteMethod MultiTermQuery.getRewriteMethod()

Methods in org.apache.lucene.search with parameters of type MultiTermQuery.RewriteMethod
 void MultiTermQuery.setRewriteMethod(MultiTermQuery.RewriteMethod method)
Sets the rewrite method to be used when executing the query.

Uses of MultiTermQuery.RewriteMethod in org.apache.lucene.search.spans

Subclasses of MultiTermQuery.RewriteMethod in org.apache.lucene.search.spans
static class | SpanMultiTermQueryWrapper.SpanRewriteMethod Abstract class that defines how the query is rewritten.
static class | SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite A rewrite method that first translates each term into a SpanTermQuery in a BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite

No usage of org.apache.lucene.search.MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.MultiTermQuery.TopTermsScoringBooleanQueryRewrite

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.MultiTermQuery.TopTermsScoringBooleanQueryRewrite

No usage of org.apache.lucene.search.MultiTermQuery.TopTermsScoringBooleanQueryRewrite

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.MultiTermQueryWrapperFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.MultiTermQueryWrapperFilter

Packages that use MultiTermQueryWrapperFilter
org.apache.lucene.search Code to search indices.

Uses of MultiTermQueryWrapperFilter in org.apache.lucene.search

Subclasses of MultiTermQueryWrapperFilter in org.apache.lucene.search
class | NumericRangeFilter<T extends Number> A Filter that only accepts numeric values within a specified range.
class | PrefixFilter A Filter that restricts search results to values that have a matching prefix in a given field.
class | TermRangeFilter A Filter that restricts search results to a range of term values in a given field.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.NGramPhraseQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.NGramPhraseQuery

No usage of org.apache.lucene.search.NGramPhraseQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.NRTManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.NRTManager

Packages that use NRTManager
org.apache.lucene.search Code to search indices.

Uses of NRTManager in org.apache.lucene.search

Constructors in org.apache.lucene.search with parameters of type NRTManager
NRTManagerReopenThread(NRTManager manager, double targetMaxStaleSec, double targetMinStaleSec)
Create NRTManagerReopenThread, to periodically reopen the NRT searcher.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.NRTManager.TrackingIndexWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.NRTManager.TrackingIndexWriter

Packages that use NRTManager.TrackingIndexWriter
org.apache.lucene.search Code to search indices.

Uses of NRTManager.TrackingIndexWriter in org.apache.lucene.search

Constructors in org.apache.lucene.search with parameters of type NRTManager.TrackingIndexWriter
NRTManager(NRTManager.TrackingIndexWriter writer, SearcherFactory searcherFactory)
Create new NRTManager.
NRTManager(NRTManager.TrackingIndexWriter writer, SearcherFactory searcherFactory, boolean applyAllDeletes)
Expert: just like NRTManager.NRTManager(TrackingIndexWriter,SearcherFactory), but you can also specify whether each reopened searcher must apply deletes.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.NRTManager.WaitingListener

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.NRTManager.WaitingListener

Packages that use NRTManager.WaitingListener
org.apache.lucene.search Code to search indices.

Uses of NRTManager.WaitingListener in org.apache.lucene.search

Classes in org.apache.lucene.search that implement NRTManager.WaitingListener
 class NRTManagerReopenThread
Utility class that runs a reopen thread to periodically reopen the NRT searchers in the provided NRTManager.

Methods in org.apache.lucene.search with parameters of type NRTManager.WaitingListener
 void NRTManager.addWaitingListener(NRTManager.WaitingListener l)
Adds a listener, to be notified when a caller is waiting for a specific generation searcher to be visible.
 void NRTManager.removeWaitingListener(NRTManager.WaitingListener l)
Remove a listener added with NRTManager.addWaitingListener(org.apache.lucene.search.NRTManager.WaitingListener).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.NRTManagerReopenThread

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.NRTManagerReopenThread

No usage of org.apache.lucene.search.NRTManagerReopenThread

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.NumericRangeFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.NumericRangeFilter

Packages that use NumericRangeFilter
org.apache.lucene.search Code to search indices.

Uses of NumericRangeFilter in org.apache.lucene.search

Methods in org.apache.lucene.search that return NumericRangeFilter
static NumericRangeFilter<Double> | NumericRangeFilter.newDoubleRange(String field, Double min, Double max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that queries a double range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
static NumericRangeFilter<Double> | NumericRangeFilter.newDoubleRange(String field, int precisionStep, Double min, Double max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that filters a double range using the given precisionStep.
static NumericRangeFilter<Float> | NumericRangeFilter.newFloatRange(String field, Float min, Float max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that queries a float range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
static NumericRangeFilter<Float> | NumericRangeFilter.newFloatRange(String field, int precisionStep, Float min, Float max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that filters a float range using the given precisionStep.
static NumericRangeFilter<Integer> | NumericRangeFilter.newIntRange(String field, Integer min, Integer max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that queries a int range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
static NumericRangeFilter<Integer> | NumericRangeFilter.newIntRange(String field, int precisionStep, Integer min, Integer max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that filters a int range using the given precisionStep.
static NumericRangeFilter<Long> | NumericRangeFilter.newLongRange(String field, int precisionStep, Long min, Long max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that filters a long range using the given precisionStep.
static NumericRangeFilter<Long> | NumericRangeFilter.newLongRange(String field, Long min, Long max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeFilter, that queries a long range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.NumericRangeQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.NumericRangeQuery

Packages that use NumericRangeQuery
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders
org.apache.lucene.search | Code to search indices.

Uses of NumericRangeQuery in org.apache.lucene.queryParser.standard.builders

Methods in org.apache.lucene.queryParser.standard.builders that return NumericRangeQuery
 NumericRangeQuery<? extends Number> NumericRangeQueryNodeBuilder.build(QueryNode queryNode)

Uses of NumericRangeQuery in org.apache.lucene.search

Methods in org.apache.lucene.search that return NumericRangeQuery
static NumericRangeQuery<Double> | NumericRangeQuery.newDoubleRange(String field, Double min, Double max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a double range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
static NumericRangeQuery<Double> | NumericRangeQuery.newDoubleRange(String field, int precisionStep, Double min, Double max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a double range using the given precisionStep.
static NumericRangeQuery<Float> | NumericRangeQuery.newFloatRange(String field, Float min, Float max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a float range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
static NumericRangeQuery<Float> | NumericRangeQuery.newFloatRange(String field, int precisionStep, Float min, Float max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a float range using the given precisionStep.
static NumericRangeQuery<Integer> | NumericRangeQuery.newIntRange(String field, Integer min, Integer max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a int range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).
static NumericRangeQuery<Integer> | NumericRangeQuery.newIntRange(String field, int precisionStep, Integer min, Integer max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a int range using the given precisionStep.
static NumericRangeQuery<Long> | NumericRangeQuery.newLongRange(String field, int precisionStep, Long min, Long max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a long range using the given precisionStep.
static NumericRangeQuery<Long> | NumericRangeQuery.newLongRange(String field, Long min, Long max, boolean minInclusive, boolean maxInclusive) Factory that creates a NumericRangeQuery, that queries a long range using the default precisionStep NumericUtils.PRECISION_STEP_DEFAULT (4).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.ParallelMultiSearcher

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.ParallelMultiSearcher

No usage of org.apache.lucene.search.ParallelMultiSearcher

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.PhraseQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.PhraseQuery

Packages that use PhraseQuery
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders
org.apache.lucene.search | Code to search indices.

Uses of PhraseQuery in org.apache.lucene.queryParser

Methods in org.apache.lucene.queryParser that return PhraseQuery
protected  PhraseQuery QueryParser.newPhraseQuery()
Builds a new PhraseQuery instance

Uses of PhraseQuery in org.apache.lucene.queryParser.standard.builders

Methods in org.apache.lucene.queryParser.standard.builders that return PhraseQuery
 PhraseQuery PhraseQueryNodeBuilder.build(QueryNode queryNode)

Uses of PhraseQuery in org.apache.lucene.search

Subclasses of PhraseQuery in org.apache.lucene.search
 class NGramPhraseQuery
This is a PhraseQuery which is optimized for n-gram phrase query.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.PositiveScoresOnlyCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.PositiveScoresOnlyCollector

No usage of org.apache.lucene.search.PositiveScoresOnlyCollector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.PrefixFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.PrefixFilter

No usage of org.apache.lucene.search.PrefixFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.PrefixQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.PrefixQuery

Packages that use PrefixQuery
org.apache.lucene.queryParser.standard.builders Standard Lucene Query Node Builders

Uses of PrefixQuery in org.apache.lucene.queryParser.standard.builders

Methods in org.apache.lucene.queryParser.standard.builders that return PrefixQuery
 PrefixQuery PrefixWildcardQueryNodeBuilder.build(QueryNode queryNode)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.PrefixTermEnum

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.PrefixTermEnum

No usage of org.apache.lucene.search.PrefixTermEnum

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.Query

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.Query

Packages that use Query
org.apache.lucene.benchmark.byTask.feeds | Sources for benchmark inputs: documents and queries.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.benchmark.quality | Search Quality Benchmarking.
org.apache.lucene.benchmark.quality.utils | Miscellaneous utilities for search quality benchmarking: query parsing, submission reports.
org.apache.lucene.demo | Demo applications for indexing and searching.
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.memory | High-performance single-document main memory Apache Lucene fulltext search index.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.analyzing | QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.
org.apache.lucene.queryParser.complexPhrase | QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
org.apache.lucene.queryParser.ext | Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.
org.apache.lucene.queryParser.standard | Contains the implementation of the Lucene query parser using the flexible query parser frameworks
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders
org.apache.lucene.queryParser.surround.query | This package contains SrndQuery and its subclasses.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.function | Programmatic control over documents scores.
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.search.join | This modules support index-time and query-time joins.
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.regex | Regular expression Query.
org.apache.lucene.search.similar | Document similarity query generators.
org.apache.lucene.search.spans | The calculus of spans.
org.apache.lucene.search.vectorhighlight | This is an another highlighter implementation.
org.apache.lucene.spatial.tier | Support for filtering based upon geographic location.
org.apache.lucene.xmlparser | Parser that produces Lucene Query objects from XML streams.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Uses of Query in org.apache.lucene.benchmark.byTask.feeds

Fields in org.apache.lucene.benchmark.byTask.feeds declared as Query
protected  Query[] AbstractQueryMaker.queries

Methods in org.apache.lucene.benchmark.byTask.feeds that return Query
Query | LongToEnglishQueryMaker.makeQuery()
Query | QueryMaker.makeQuery() Create the next query
Query | AbstractQueryMaker.makeQuery()
Query | LongToEnglishQueryMaker.makeQuery(int size)
Query | QueryMaker.makeQuery(int size) Create the next query, of the given size.
Query | AbstractQueryMaker.makeQuery(int size)
protected Query[] | ReutersQueryMaker.prepareQueries()
protected Query[] | SimpleSloppyPhraseQueryMaker.prepareQueries()
protected Query[] | SimpleQueryMaker.prepareQueries() Prepare the queries for this test.
protected Query[] | FileBasedQueryMaker.prepareQueries()
protected abstract Query[] | AbstractQueryMaker.prepareQueries()
protected Query[] | EnwikiQueryMaker.prepareQueries()

Uses of Query in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks with parameters of type Query
protected BenchmarkHighlighter | SearchTravRetHighlightTask.getBenchmarkHighlighter(Query q)
protected BenchmarkHighlighter | ReadTask.getBenchmarkHighlighter(Query q) Return an appropriate highlighter to be used with highlighting tasks
protected BenchmarkHighlighter | SearchTravRetVectorHighlightTask.getBenchmarkHighlighter(Query q)

Uses of Query in org.apache.lucene.benchmark.quality

Methods in org.apache.lucene.benchmark.quality that return Query
 Query QualityQueryParser.parse(QualityQuery qq)
Parse a given QualityQuery into a Lucene query.

Uses of Query in org.apache.lucene.benchmark.quality.utils

Methods in org.apache.lucene.benchmark.quality.utils that return Query
 Query SimpleQQParser.parse(QualityQuery qq)

Uses of Query in org.apache.lucene.demo

Methods in org.apache.lucene.demo with parameters of type Query
static void SearchFiles.doPagingSearch(BufferedReader in, IndexSearcher searcher, Query query, int hitsPerPage, boolean raw, boolean interactive)
This demonstrates a typical paging search scenario, where the search engine presents pages of size n to the user.

Uses of Query in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search that return Query
static Query | DrillDown.query(FacetIndexingParams iParams, CategoryPath... paths) Return a query for drilling down into all given categories (AND).
static Query | DrillDown.query(FacetIndexingParams iParams, Query baseQuery, CategoryPath... paths) Turn a base query into a drilling-down query for all given category paths (AND).
static Query | DrillDown.query(FacetSearchParams sParams, CategoryPath... paths) Return a query for drilling down into all given categories (AND).
static Query | DrillDown.query(FacetSearchParams sParams, Query baseQuery, CategoryPath... paths) Turn a base query into a drilling-down query for all given category paths (AND).
static Query | DrillDown.query(Query baseQuery, CategoryPath... paths) Turn a base query into a drilling-down query using the default FacetSearchParams

Methods in org.apache.lucene.facet.search with parameters of type Query
static Query | DrillDown.query(FacetIndexingParams iParams, Query baseQuery, CategoryPath... paths) Turn a base query into a drilling-down query for all given category paths (AND).
static Query | DrillDown.query(FacetSearchParams sParams, Query baseQuery, CategoryPath... paths) Turn a base query into a drilling-down query for all given category paths (AND).
static Query | DrillDown.query(Query baseQuery, CategoryPath... paths) Turn a base query into a drilling-down query using the default FacetSearchParams

Uses of Query in org.apache.lucene.index

Methods in org.apache.lucene.index with parameters of type Query
void | IndexWriter.deleteDocuments(Query... queries) Deletes the document(s) matching any of the provided queries.
void | RandomIndexWriter.deleteDocuments(Query q)
void | IndexWriter.deleteDocuments(Query query) Deletes the document(s) matching the provided query.

Uses of Query in org.apache.lucene.index.memory

Methods in org.apache.lucene.index.memory with parameters of type Query
 float MemoryIndex.search(Query query)
Convenience method that efficiently returns the relevance score by matching this index against the given Lucene query expression.

Uses of Query in org.apache.lucene.queryParser

Methods in org.apache.lucene.queryParser that return Query
 Query QueryParser.Clause(String field)
protected  Query QueryParser.getBooleanQuery(List<BooleanClause> clauses)
Factory method for generating query, given a set of clauses.
protected  Query QueryParser.getBooleanQuery(List<BooleanClause> clauses, boolean disableCoord)
Factory method for generating query, given a set of clauses.
protected  Query QueryParser.getFieldQuery(String field, String queryText)
Deprecated. Use QueryParser.getFieldQuery(String,String,boolean) instead.
protected  Query QueryParser.getFieldQuery(String field, String queryText, boolean quoted)
protected  Query MultiFieldQueryParser.getFieldQuery(String field, String queryText, boolean quoted)
protected  Query QueryParser.getFieldQuery(String field, String queryText, int slop)
Base implementation delegates to QueryParser.getFieldQuery(String,String,boolean).
protected  Query MultiFieldQueryParser.getFieldQuery(String field, String queryText, int slop)
protected  Query QueryParserTestBase.QPTestParser.getFuzzyQuery(String field, String termStr, float minSimilarity)
protected  Query QueryParser.getFuzzyQuery(String field, String termStr, float minSimilarity)
Factory method for generating a query (similar to QueryParser.getWildcardQuery(java.lang.String, java.lang.String)).
protected  Query MultiFieldQueryParser.getFuzzyQuery(String field, String termStr, float minSimilarity)
protected  Query QueryParser.getPrefixQuery(String field, String termStr)
Factory method for generating a query (similar to QueryParser.getWildcardQuery(java.lang.String, java.lang.String)).
protected  Query MultiFieldQueryParser.getPrefixQuery(String field, String termStr)
 Query QueryParserTestBase.getQuery(String query, Analyzer a)
 Query QueryParserTestBase.getQueryDOA(String query, Analyzer a)
protected  Query QueryParser.getRangeQuery(String field, String part1, String part2, boolean inclusive)
protected  Query MultiFieldQueryParser.getRangeQuery(String field, String part1, String part2, boolean inclusive)
protected  Query QueryParserTestBase.QPTestParser.getWildcardQuery(String field, String termStr)
protected  Query QueryParser.getWildcardQuery(String field, String termStr)
Factory method for generating a query.
protected  Query MultiFieldQueryParser.getWildcardQuery(String field, String termStr)
protected  Query QueryParser.newFuzzyQuery(Term term, float minimumSimilarity, int prefixLength)
Builds a new FuzzyQuery instance
protected  Query QueryParser.newMatchAllDocsQuery()
Builds a new MatchAllDocsQuery instance
protected  Query QueryParser.newPrefixQuery(Term prefix)
Builds a new PrefixQuery instance
protected  Query QueryParser.newRangeQuery(String field, String part1, String part2, boolean inclusive)
Builds a new TermRangeQuery instance
protected  Query QueryParser.newTermQuery(Term term)
Builds a new TermQuery instance
protected  Query QueryParser.newWildcardQuery(Term t)
Builds a new WildcardQuery instance
 Query QueryParser.parse(String query)
Parses a query string, returning a Query.
static Query MultiFieldQueryParser.parse(Version matchVersion, String[] queries, String[] fields, Analyzer analyzer)
Parses a query which searches on the fields specified.
static Query MultiFieldQueryParser.parse(Version matchVersion, String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Parses a query, searching on the fields specified.
static Query MultiFieldQueryParser.parse(Version matchVersion, String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Parses a query, searching on the fields specified.
 Query QueryParser.Query(String field)
 Query QueryParser.Term(String field)
 Query QueryParser.TopLevelQuery(String field)

Methods in org.apache.lucene.queryParser with parameters of type Query
protected void | QueryParser.addClause(List<BooleanClause> clauses, int conj, int mods, Query q)
protected BooleanClause | QueryParser.newBooleanClause(Query q, BooleanClause.Occur occur) Builds a new BooleanClause instance

Uses of Query in org.apache.lucene.queryParser.analyzing

Methods in org.apache.lucene.queryParser.analyzing that return Query
protected Query | AnalyzingQueryParser.getFuzzyQuery(String field, String termStr, float minSimilarity) Called when parser parses an input term token that has the fuzzy suffix (~) appended.
protected Query | AnalyzingQueryParser.getPrefixQuery(String field, String termStr) Called when parser parses an input term token that uses prefix notation; that is, contains a single '*' wildcard character as its last character.
protected Query | AnalyzingQueryParser.getRangeQuery(String field, String part1, String part2, boolean inclusive) Overrides super class, by passing terms through analyzer.
protected Query | AnalyzingQueryParser.getWildcardQuery(String field, String termStr) Called when parser parses an input term token that contains one or more wildcard characters (like *), but is not a prefix term token (one that has just a single * character at the end).

Uses of Query in org.apache.lucene.queryParser.complexPhrase

Methods in org.apache.lucene.queryParser.complexPhrase that return Query
protected Query | ComplexPhraseQueryParser.getFieldQuery(String field, String queryText, int slop)
protected Query | ComplexPhraseQueryParser.getFuzzyQuery(String field, String termStr, float minSimilarity)
protected Query | ComplexPhraseQueryParser.getRangeQuery(String field, String part1, String part2, boolean inclusive)
protected Query | ComplexPhraseQueryParser.getWildcardQuery(String field, String termStr)
protected Query | ComplexPhraseQueryParser.newRangeQuery(String field, String part1, String part2, boolean inclusive)
protected Query | ComplexPhraseQueryParser.newTermQuery(Term term)
Query | ComplexPhraseQueryParser.parse(String query)

Uses of Query in org.apache.lucene.queryParser.ext

Methods in org.apache.lucene.queryParser.ext that return Query
protected Query | ExtendableQueryParser.getFieldQuery(String field, String queryText, boolean quoted)
abstract Query | ParserExtension.parse(ExtensionQuery query) Processes the given ExtensionQuery and returns a corresponding Query instance.

Uses of Query in org.apache.lucene.queryParser.standard

Methods in org.apache.lucene.queryParser.standard that return Query
protected  Query QueryParserWrapper.getBooleanQuery(List<BooleanClause> clauses, boolean disableCoord)
Deprecated.
protected  Query QueryParserWrapper.getFieldQuery(String field, String queryText)
Deprecated. Use QueryParserWrapper.getFieldQuery(String, String, boolean) instead
protected  Query QueryParserWrapper.getFieldQuery(String field, String queryText, boolean quoted)
Deprecated.
protected  Query QueryParserWrapper.getFieldQuery(String field, String queryText, int slop)
Deprecated. Base implementation delegates to QueryParserWrapper.getFieldQuery(String,String).
protected  Query QueryParserWrapper.getFuzzyQuery(String field, String termStr, float minSimilarity)
Deprecated.
protected  Query QueryParserWrapper.getPrefixQuery(String field, String termStr)
Deprecated.
protected  Query QueryParserWrapper.getRangeQuery(String field, String part1, String part2, boolean inclusive)
Deprecated.
protected  Query QueryParserWrapper.getWildcardQuery(String field, String termStr)
Deprecated.
 Query QueryParserWrapper.parse(String query)
Deprecated.
static Query MultiFieldQueryParserWrapper.parse(String[] queries, String[] fields, Analyzer analyzer)
Deprecated. Parses a query which searches on the fields specified.
static Query QueryParserUtil.parse(String[] queries, String[] fields, Analyzer analyzer)
Parses a query which searches on the fields specified.
static Query MultiFieldQueryParserWrapper.parse(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Deprecated. Parses a query, searching on the fields specified.
static Query QueryParserUtil.parse(String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Parses a query, searching on the fields specified.
 Query StandardQueryParser.parse(String query, String defaultField)
Overrides QueryParserHelper.parse(String, String) so it casts the return object to Query.
static Query MultiFieldQueryParserWrapper.parse(String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Deprecated. Parses a query, searching on the fields specified.
static Query QueryParserUtil.parse(String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer)
Parses a query, searching on the fields specified.

Uses of Query in org.apache.lucene.queryParser.standard.builders

Methods in org.apache.lucene.queryParser.standard.builders that return Query
Query | StandardQueryTreeBuilder.build(QueryNode queryNode)
Query | StandardQueryBuilder.build(QueryNode queryNode)
Query | GroupQueryNodeBuilder.build(QueryNode queryNode)
Query | BoostQueryNodeBuilder.build(QueryNode queryNode)
Query | ModifierQueryNodeBuilder.build(QueryNode queryNode)
Query | SlopQueryNodeBuilder.build(QueryNode queryNode)

Uses of Query in org.apache.lucene.queryParser.surround.query

Fields in org.apache.lucene.queryParser.surround.query declared as Query
static Query SrndQuery.theEmptyLcnQuery

Methods in org.apache.lucene.queryParser.surround.query that return Query
Query | DistanceQuery.getSpanNearQuery(IndexReader reader, String fieldName, float boost, BasicQueryFactory qf)
Query | SrndQuery.makeLuceneQueryField(String fieldName, BasicQueryFactory qf)
Query | NotQuery.makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Query | OrQuery.makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
abstract Query | SrndQuery.makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Query | SimpleTerm.makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Query | FieldsQuery.makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Query | AndQuery.makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Query | DistanceQuery.makeLuceneQueryFieldNoBoost(String fieldName, BasicQueryFactory qf)
Query | FieldsQuery.makeLuceneQueryNoBoost(BasicQueryFactory qf)

Methods in org.apache.lucene.queryParser.surround.query that return types with arguments of type Query
 List<Query> ComposedQuery.makeLuceneSubQueriesField(String fn, BasicQueryFactory qf)

Methods in org.apache.lucene.queryParser.surround.query with parameters of type Query
 void SpanNearClauseFactory.addSpanNearQuery(Query q)

Uses of Query in org.apache.lucene.search

Classes in org.apache.lucene.search with type parameters of type Query
static class | Scorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer> A callback to gather information from a scorer and its sub-scorers.
static class | Scorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer> A callback to gather information from a scorer and its sub-scorers.
class | ScoringRewrite<Q extends Query>
class | TopTermsRewrite<Q extends Query> Base rewrite method for collecting only the top terms via a priority queue.

Subclasses of Query in org.apache.lucene.search
class | BooleanQuery A Query that matches documents matching boolean combinations of other queries, e.g.
class | BoostingQuery The BoostingQuery class can be used to effectively demote results that match a given query.
class | ConstantScoreQuery A query that wraps another query or a filter and simply returns a constant score equal to the query boost for every document that matches the filter or query.
class | DisjunctionMaxQuery A query that generates the union of documents produced by its subqueries, and that scores each document with the maximum score for that document as produced by any subquery, plus a tie breaking increment for any additional matching subqueries.
class | FilteredQuery A query that applies a filter to the results of another query.
class | FuzzyLikeThisQuery Fuzzifies ALL terms provided as strings and then picks the best n differentiating terms.
class | FuzzyQuery Implements the fuzzy search query.
class | MatchAllDocsQuery A query that matches all documents.
class | MultiPhraseQuery MultiPhraseQuery is a generalized version of PhraseQuery, with an added method MultiPhraseQuery.add(Term[]).
class | MultiTermQuery An abstract Query that matches documents containing a subset of terms provided by a FilteredTermEnum enumeration.
class | NGramPhraseQuery This is a PhraseQuery which is optimized for n-gram phrase query.
class | NumericRangeQuery<T extends Number> A Query that matches numeric values within a specified range.
class | PhraseQuery A Query that matches documents containing a particular sequence of terms.
class | PrefixQuery A Query that matches documents containing terms with a specified prefix.
class | TermQuery A Query that matches documents containing a term.
class | TermRangeQuery A Query that matches documents within an range of terms.
class | WildcardQuery Implements the wildcard search query.

Fields in org.apache.lucene.search declared as Query
protected  Query ConstantScoreQuery.query

Methods in org.apache.lucene.search that return Query
 Query Query.combine(Query[] queries)
Expert: called when re-writing queries under MultiSearcher.
 Query DisjunctionMaxQuery.DisjunctionMaxWeight.getQuery()
Return our associated DisjunctionMaxQuery
abstract  Query Weight.getQuery()
The query that this concerns.
 Query ConstantScoreQuery.getQuery()
Returns the encapsulated query, returns null if a filter is wrapped.
 Query ConstantScoreQuery.ConstantWeight.getQuery()
 Query BooleanQuery.BooleanWeight.getQuery()
 Query FilteredQuery.getQuery()
 Query BooleanClause.getQuery()
static Query Query.mergeBooleanQueries(BooleanQuery... queries)
Expert: merges the clauses of a set of BooleanQuery's into a single BooleanQuery.
 Query BoostingQuery.rewrite(IndexReader reader)
 Query FuzzyLikeThisQuery.rewrite(IndexReader reader)
 Query PhraseQuery.rewrite(IndexReader reader)
 Query DisjunctionMaxQuery.rewrite(IndexReader reader)
Optimize our representation and our subqueries representations
 Query NGramPhraseQuery.rewrite(IndexReader reader)
 Query ConstantScoreQuery.rewrite(IndexReader reader)
 Query MultiPhraseQuery.rewrite(IndexReader reader)
 Query MultiTermQuery.rewrite(IndexReader reader)
To rewrite to a simpler form, instead return a simpler enum from MultiTermQuery.getEnum(IndexReader).
 Query BooleanQuery.rewrite(IndexReader reader)
 Query FilteredQuery.rewrite(IndexReader reader)
Rewrites the wrapped query.
 Query Query.rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.
abstract  Query MultiTermQuery.RewriteMethod.rewrite(IndexReader reader, MultiTermQuery query)
 Query RemoteSearchable.rewrite(Query original)
Deprecated.
 Query IndexSearcher.rewrite(Query original)
Expert: called to re-write queries into primitive queries.
abstract  Query Searcher.rewrite(Query query)
Deprecated.
 Query Searchable.rewrite(Query query)
Deprecated. Expert: called to re-write queries into primitive queries.
 Query MultiSearcher.rewrite(Query original)
Deprecated.

Methods in org.apache.lucene.search that return types with arguments of type Query
 Iterator<Query> DisjunctionMaxQuery.iterator()
An Iterator over the disjuncts

Methods in org.apache.lucene.search with parameters of type Query
 void DisjunctionMaxQuery.add(Query query)
Add a subquery to this disjunction
 void BooleanQuery.add(Query query, BooleanClause.Occur occur)
Adds a clause to a boolean query.
 void SearchEquivalenceTestBase.assertSameSet(Query q1, Query q2)
Asserts that the documents returned by q1 are the same as of those returned by q2
 void SearchEquivalenceTestBase.assertSubsetOf(Query q1, Query q2)
Asserts that the documents returned by q1 are a subset of those returned by q2
protected  void SearchEquivalenceTestBase.assertSubsetOf(Query q1, Query q2, Filter filter)
Asserts that the documents returned by q1 are a subset of those returned by q2.
static void QueryUtils.check(Query q)
Check the types of things query objects should be able to do.
static void QueryUtils.check(Random random, Query q1, Searcher s)
Various query sanity checks on a searcher, some checks are only done for instanceof IndexSearcher.
static void QueryUtils.check(Random random, Query q1, Searcher s, boolean wrap)
static void QueryUtils.checkEqual(Query q1, Query q2)
static void CheckHits.checkEqual(Query query, ScoreDoc[] hits1, ScoreDoc[] hits2)
protected  void CheckHits.ExplanationAssertingSearcher.checkExplanations(Query q)
static void QueryUtils.checkExplanations(Query q, Searcher s)
deep check that explanations of a query 'score' correctly
static void CheckHits.checkExplanations(Query query, String defaultFieldName, Searcher searcher)
Asserts that the explanation value for every document matching a query corresponds with the true score.
static void CheckHits.checkExplanations(Query query, String defaultFieldName, Searcher searcher, boolean deep)
Asserts that the explanation value for every document matching a query corresponds with the true score.
static void QueryUtils.checkHashEquals(Query q)
check very basic hashCode and equals
static void CheckHits.checkHitCollector(Random random, Query query, String defaultFieldName, Searcher searcher, int[] results)
Tests that a query matches the an expected set of documents using a HitCollector.
static void CheckHits.checkHits(Random random, Query query, String defaultFieldName, Searcher searcher, int[] results)
Tests that a query matches the an expected set of documents using Hits.
static void CheckHits.checkHitsQuery(Query query, ScoreDoc[] hits1, ScoreDoc[] hits2, int[] results)
Tests that two queries have an expected order of documents, and that the two queries have the same score values.
static void CheckHits.checkNoMatchExplanations(Query q, String defaultFieldName, Searcher searcher, int[] results)
Tests that all documents up to maxDoc which are *not* in the expected result set, have an explanation which indicates that the document does not match
static void QueryUtils.checkSkipTo(Query q, IndexSearcher s)
alternate scorer skipTo(),skipTo(),next(),next(),skipTo(),skipTo(), etc and ensure a hitcollector receives same docs and scores
static void QueryUtils.checkUnequal(Query q1, Query q2)
 Query Query.combine(Query[] queries)
Expert: called when re-writing queries under MultiSearcher.
 Weight AssertingIndexSearcher.createNormalizedWeight(Query query)
Ensures, that the returned Weight is not normalized again, which may produce wrong scores.
 Weight IndexSearcher.createNormalizedWeight(Query query)
Creates a normalized weight for a top-level Query.
 Weight Searcher.createNormalizedWeight(Query query)
Deprecated. Creates a normalized weight for a top-level Query.
 Weight MultiSearcher.createNormalizedWeight(Query original)
Deprecated. Create weight in multiple index scenario.
protected  Weight Searcher.createWeight(Query query)
Deprecated. never ever use this method in Weight implementations. Subclasses of Searcher should use Searcher.createNormalizedWeight(org.apache.lucene.search.Query), instead.
 long NRTManager.TrackingIndexWriter.deleteDocuments(Query... queries)
 long NRTManager.TrackingIndexWriter.deleteDocuments(Query q)
 Explanation IndexSearcher.explain(Query query, int doc)
Returns an Explanation that describes how doc scored against query.
 Explanation Searcher.explain(Query query, int doc)
Deprecated. Returns an Explanation that describes how doc scored against query.
 Query RemoteSearchable.rewrite(Query original)
Deprecated.
 Query IndexSearcher.rewrite(Query original)
Expert: called to re-write queries into primitive queries.
abstract  Query Searcher.rewrite(Query query)
Deprecated.
 Query Searchable.rewrite(Query query)
Deprecated. Expert: called to re-write queries into primitive queries.
 Query MultiSearcher.rewrite(Query original)
Deprecated.
 void CheckHits.ExplanationAssertingSearcher.search(Query query, Collector results)
 void IndexSearcher.search(Query query, Collector results)
Lower-level search API.
 void Searcher.search(Query query, Collector results)
Deprecated. Lower-level search API.
 void CheckHits.ExplanationAssertingSearcher.search(Query query, Filter filter, Collector results)
 void IndexSearcher.search(Query query, Filter filter, Collector results)
Lower-level search API.
 void Searcher.search(Query query, Filter filter, Collector results)
Deprecated. Lower-level search API.
 TopDocs CheckHits.ExplanationAssertingSearcher.search(Query query, Filter filter, int n)
 TopDocs IndexSearcher.search(Query query, Filter filter, int n)
Finds the top n hits for query, applying filter if non-null.
 TopDocs Searcher.search(Query query, Filter filter, int n)
Deprecated. Finds the top n hits for query, applying filter if non-null.
 TopFieldDocs CheckHits.ExplanationAssertingSearcher.search(Query query, Filter filter, int n, Sort sort)
 TopFieldDocs IndexSearcher.search(Query query, Filter filter, int n, Sort sort)
Search implementation with arbitrary sorting.
 TopFieldDocs Searcher.search(Query query, Filter filter, int n, Sort sort)
Deprecated. Search implementation with arbitrary sorting.
 TopDocs IndexSearcher.search(Query query, int n)
Finds the top n hits for query.
 TopDocs Searcher.search(Query query, int n)
Deprecated. Finds the top n hits for query.
 TopFieldDocs IndexSearcher.search(Query query, int n, Sort sort)
Search implementation with arbitrary sorting and no filter.
 TopFieldDocs Searcher.search(Query query, int n, Sort sort)
Deprecated. Search implementation with arbitrary sorting and no filter.
 TopDocs IndexSearcher.searchAfter(ScoreDoc after, Query query, Filter filter, int n)
Finds the top n hits for query, applying filter if non-null, where all results are after a previous result (after).
 TopDocs IndexSearcher.searchAfter(ScoreDoc after, Query query, int n)
Finds the top n hits for query where all results are after a previous result (after).
 void BooleanClause.setQuery(Query query)
 void Scorer.visitSubScorers(Query parent, BooleanClause.Occur relationship, Scorer.ScorerVisitor<Query,Query,Scorer> visitor)
Scorer subclasses should implement this method if the subclass itself contains multiple scorers to support gathering details for sub-scorers via Scorer.ScorerVisitor

Method parameters in org.apache.lucene.search with type arguments of type Query
void | DisjunctionMaxQuery.add(Collection<Query> disjuncts) Add a collection of disjuncts to this disjunction via Iterable
void | Scorer.visitScorers(Scorer.ScorerVisitor<Query,Query,Scorer> visitor) Expert: call this to gather details for all sub-scorers for this query.
void | Scorer.visitScorers(Scorer.ScorerVisitor<Query,Query,Scorer> visitor) Expert: call this to gather details for all sub-scorers for this query.
void | Scorer.visitSubScorers(Query parent, BooleanClause.Occur relationship, Scorer.ScorerVisitor<Query,Query,Scorer> visitor) Scorer subclasses should implement this method if the subclass itself contains multiple scorers to support gathering details for sub-scorers via Scorer.ScorerVisitor
void | Scorer.visitSubScorers(Query parent, BooleanClause.Occur relationship, Scorer.ScorerVisitor<Query,Query,Scorer> visitor) Scorer subclasses should implement this method if the subclass itself contains multiple scorers to support gathering details for sub-scorers via Scorer.ScorerVisitor

Constructors in org.apache.lucene.search with parameters of type Query
BooleanClause(Query query, BooleanClause.Occur occur)
Constructs a BooleanClause.
BoostingQuery(Query match, Query context, float boost)
CheckHits.ExplanationAsserter(Query q, String defaultFieldName, Searcher s)
Constructs an instance which does shallow tests on the Explanation
CheckHits.ExplanationAsserter(Query q, String defaultFieldName, Searcher s, boolean deep)
ConstantScoreQuery(Query query)
Strips off scores from the passed in Query.
FilteredQuery(Query query, Filter filter)
Constructs a new query which applies a filter to the results of the original query.
QueryWrapperFilter(Query query)
Constructs a filter which only matches documents matching query.

Constructor parameters in org.apache.lucene.search with type arguments of type Query
DisjunctionMaxQuery(Collection<Query> disjuncts, float tieBreakerMultiplier)
Creates a new DisjunctionMaxQuery

Uses of Query in org.apache.lucene.search.function

Subclasses of Query in org.apache.lucene.search.function
class | CustomScoreQuery Query that sets document score as a programmatic function of several (sub) scores: the score of its subQuery (any query) (optional) the score of its ValueSourceQuery (or queries).
class | FieldScoreQuery A query that scores each document as the value of the numeric input field.
class | ValueSourceQuery Expert: A Query that sets the scores of document to the values obtained from a ValueSource.

Methods in org.apache.lucene.search.function that return Query
Query | ValueSourceQuery.rewrite(IndexReader reader)
Query | CustomScoreQuery.rewrite(IndexReader reader)

Constructors in org.apache.lucene.search.function with parameters of type Query
CustomScoreQuery(Query subQuery)
Create a CustomScoreQuery over input subQuery.
CustomScoreQuery(Query subQuery, ValueSourceQuery... valSrcQueries)
Create a CustomScoreQuery over input subQuery and a ValueSourceQuery.
CustomScoreQuery(Query subQuery, ValueSourceQuery valSrcQuery)
Create a CustomScoreQuery over input subQuery and a ValueSourceQuery.

Uses of Query in org.apache.lucene.search.highlight

Methods in org.apache.lucene.search.highlight with parameters of type Query
protected void | WeightedSpanTermExtractor.extract(Query query, Map<String,WeightedSpanTerm> terms) Fills a Map with <@link WeightedSpanTerm>s using the terms from the supplied Query.
protected void | WeightedSpanTermExtractor.extractUnknownQuery(Query query, Map<String,WeightedSpanTerm> terms)
protected void | WeightedSpanTermExtractor.extractWeightedTerms(Map<String,WeightedSpanTerm> terms, Query query) Fills a Map with <@link WeightedSpanTerm>s using the terms from the supplied Query.
static WeightedTerm[] | QueryTermExtractor.getIdfWeightedTerms(Query query, IndexReader reader, String fieldName) Extracts all terms texts of a given Query into an array of WeightedTerms
static WeightedTerm[] | QueryTermExtractor.getTerms(Query query) Extracts all terms texts of a given Query into an array of WeightedTerms
static WeightedTerm[] | QueryTermExtractor.getTerms(Query query, boolean prohibited) Extracts all terms texts of a given Query into an array of WeightedTerms
static WeightedTerm[] | QueryTermExtractor.getTerms(Query query, boolean prohibited, String fieldName) Extracts all terms texts of a given Query into an array of WeightedTerms
Map<String,WeightedSpanTerm> | WeightedSpanTermExtractor.getWeightedSpanTerms(Query query, TokenStream tokenStream) Creates a Map of WeightedSpanTerms from the given Query and TokenStream.
Map<String,WeightedSpanTerm> | WeightedSpanTermExtractor.getWeightedSpanTerms(Query query, TokenStream tokenStream, String fieldName) Creates a Map of WeightedSpanTerms from the given Query and TokenStream.
Map<String,WeightedSpanTerm> | WeightedSpanTermExtractor.getWeightedSpanTermsWithScores(Query query, TokenStream tokenStream, String fieldName, IndexReader reader) Creates a Map of WeightedSpanTerms from the given Query and TokenStream.

Constructors in org.apache.lucene.search.highlight with parameters of type Query
QueryScorer(Query query)
QueryScorer(Query query, IndexReader reader, String field)
QueryScorer(Query query, IndexReader reader, String field, String defaultField)
QueryScorer(Query query, String field)
QueryScorer(Query query, String field, String defaultField)
QueryTermScorer(Query query)
QueryTermScorer(Query query, IndexReader reader, String fieldName)
QueryTermScorer(Query query, String fieldName)

Uses of Query in org.apache.lucene.search.join

Subclasses of Query in org.apache.lucene.search.join
class | ToChildBlockJoinQuery Just like ToParentBlockJoinQuery, except this query joins in reverse: you provide a Query matching parent documents and it joins down to child documents.
class | ToParentBlockJoinQuery This query requires that you index children and parent docs as a single block, using the IndexWriter.addDocuments(java.util.Collection) or IndexWriter.updateDocuments(org.apache.lucene.index.Term, java.util.Collection) API.

Methods in org.apache.lucene.search.join that return Query
static Query | JoinUtil.createJoinQuery(String fromField, String toField, Query fromQuery, IndexSearcher fromSearcher) Method for query time joining.
Query | ToChildBlockJoinQuery.rewrite(IndexReader reader)
Query | ToParentBlockJoinQuery.rewrite(IndexReader reader)

Methods in org.apache.lucene.search.join with parameters of type Query
static Query JoinUtil.createJoinQuery(String fromField, String toField, Query fromQuery, IndexSearcher fromSearcher)
Method for query time joining.

Constructors in org.apache.lucene.search.join with parameters of type Query
ToChildBlockJoinQuery(Query parentQuery, Filter parentsFilter, boolean doScores)
ToParentBlockJoinQuery(Query childQuery, Filter parentsFilter, ToParentBlockJoinQuery.ScoreMode scoreMode)
Create a ToParentBlockJoinQuery.

Uses of Query in org.apache.lucene.search.payloads

Subclasses of Query in org.apache.lucene.search.payloads
class | PayloadNearQuery This class is very similar to SpanNearQuery except that it factors in the value of the payloads located at each of the positions where the TermSpans occurs.
class | PayloadTermQuery This class is very similar to SpanTermQuery except that it factors in the value of the payload located at each of the positions where the Term occurs.

Methods in org.apache.lucene.search.payloads with parameters of type Query
 Collection<byte[]> PayloadSpanUtil.getPayloadsForQuery(Query query)
Query should be rewritten for wild/fuzzy support.

Uses of Query in org.apache.lucene.search.regex

Subclasses of Query in org.apache.lucene.search.regex
class | RegexQuery Implements the regular expression term search query.
class | SpanRegexQuery Deprecated. Use new SpanMultiTermQueryWrapper<RegexQuery>(new RegexQuery()) instead. This query will be removed in Lucene 4.0

Uses of Query in org.apache.lucene.search.similar

Subclasses of Query in org.apache.lucene.search.similar
 class MoreLikeThisQuery
A simple wrapper for MoreLikeThis for use in scenarios where a Query object is required eg in custom QueryParser extensions.

Methods in org.apache.lucene.search.similar that return Query
static Query SimilarityQueries.formSimilarQuery(String body, Analyzer a, String field, Set<?> stop)
Simple similarity query generators.
 Query MoreLikeThis.like(File f)
Deprecated. use MoreLikeThis.like(Reader, String) instead
 Query MoreLikeThis.like(InputStream is)
Deprecated. use MoreLikeThis.like(Reader, String) instead
 Query MoreLikeThis.like(int docNum)
Return a query that will return docs like the passed lucene document ID.
 Query MoreLikeThis.like(Reader r)
Deprecated. use MoreLikeThis.like(Reader, String) instead
 Query MoreLikeThis.like(Reader r, String fieldName)
Return a query that will return docs like the passed Reader.
 Query MoreLikeThis.like(URL u)
Deprecated. use MoreLikeThis.like(Reader, String) instead
 Query MoreLikeThisQuery.rewrite(IndexReader reader)

Uses of Query in org.apache.lucene.search.spans

Subclasses of Query in org.apache.lucene.search.spans
class | FieldMaskingSpanQuery Wrapper to allow SpanQuery objects participate in composite single-field SpanQueries by 'lying' about their search field.
class | SpanFirstQuery Matches spans near the beginning of a field.
class | SpanMultiTermQueryWrapper<Q extends MultiTermQuery> Wraps any MultiTermQuery as a SpanQuery, so it can be nested within other SpanQuery classes.
class | SpanNearPayloadCheckQuery Only return those matches that have a specific payload at the given position.
class | SpanNearQuery Matches spans which are near one another.
class | SpanNotQuery Removes matches which overlap with another SpanQuery.
class | SpanOrQuery Matches the union of its clauses.
class | SpanPayloadCheckQuery Only return those matches that have a specific payload at the given position.
class | SpanPositionCheckQuery Base class for filtering a SpanQuery based on the position of a match.
class | SpanPositionRangeQuery Checks to see if the SpanPositionCheckQuery.getMatch() lies between a start and end position
class | SpanQuery Base class for span-based queries.
class | SpanTermQuery Matches spans containing a term.

Methods in org.apache.lucene.search.spans that return Query
Query | SpanWeight.getQuery()
Query | SpanOrQuery.rewrite(IndexReader reader)
Query | SpanNearQuery.rewrite(IndexReader reader)
Query | SpanPositionCheckQuery.rewrite(IndexReader reader)
Query | SpanMultiTermQueryWrapper.rewrite(IndexReader reader)
Query | SpanNotQuery.rewrite(IndexReader reader)
Query | FieldMaskingSpanQuery.rewrite(IndexReader reader)

Uses of Query in org.apache.lucene.search.vectorhighlight

Methods in org.apache.lucene.search.vectorhighlight with parameters of type Query
FieldQuery | FastVectorHighlighter.getFieldQuery(Query query) create a FieldQuery object.
FieldQuery | FastVectorHighlighter.getFieldQuery(Query query, IndexReader reader) create a FieldQuery object.

Uses of Query in org.apache.lucene.spatial.tier

Methods in org.apache.lucene.spatial.tier that return Query
 Query DistanceQueryBuilder.getQuery(Query query)
Deprecated.

Methods in org.apache.lucene.spatial.tier with parameters of type Query
Filter | DistanceQueryBuilder.getFilter(Query query) Deprecated.
Query | DistanceQueryBuilder.getQuery(Query query) Deprecated.

Uses of Query in org.apache.lucene.xmlparser

Methods in org.apache.lucene.xmlparser that return Query
Query | QueryBuilder.getQuery(Element e)
Query | QueryBuilderFactory.getQuery(Element n)
Query | CoreParser.getQuery(Element e)
Query | CoreParser.parse(InputStream xmlStream)

Uses of Query in org.apache.lucene.xmlparser.builders

Methods in org.apache.lucene.xmlparser.builders that return Query
Query | NumericRangeQueryBuilder.getQuery(Element e)
Query | BoostingQueryBuilder.getQuery(Element e)
Query | TermsQueryBuilder.getQuery(Element e)
Query | ConstantScoreQueryBuilder.getQuery(Element e)
Query | FuzzyLikeThisQueryBuilder.getQuery(Element e)
Query | BooleanQueryBuilder.getQuery(Element e)
Query | SpanBuilderBase.getQuery(Element e)
Query | UserInputQueryBuilder.getQuery(Element e)
Query | TermQueryBuilder.getQuery(Element e)
Query | LikeThisQueryBuilder.getQuery(Element e)
Query | MatchAllDocsQueryBuilder.getQuery(Element e)
Query | FilteredQueryBuilder.getQuery(Element e)
Query | SpanQueryBuilderFactory.getQuery(Element e)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.QueryTermVector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.QueryTermVector

No usage of org.apache.lucene.search.QueryTermVector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.QueryUtils

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.QueryUtils

No usage of org.apache.lucene.search.QueryUtils

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.QueryWrapperFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.QueryWrapperFilter

No usage of org.apache.lucene.search.QueryWrapperFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.ReferenceManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.ReferenceManager

Packages that use ReferenceManager
org.apache.lucene.search Code to search indices.

Uses of ReferenceManager in org.apache.lucene.search

Subclasses of ReferenceManager in org.apache.lucene.search
class | NRTManager Utility class to manage sharing near-real-time searchers across multiple searching thread.
class | SearcherManager Utility class to safely share IndexSearcher instances across multiple threads, while periodically reopening.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.RemoteCachingWrapperFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.RemoteCachingWrapperFilter

No usage of org.apache.lucene.search.RemoteCachingWrapperFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.RemoteSearchable

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.RemoteSearchable

No usage of org.apache.lucene.search.RemoteSearchable

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.RMIRemoteSearchable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.RMIRemoteSearchable

Packages that use RMIRemoteSearchable
org.apache.lucene.search Code to search indices.

Uses of RMIRemoteSearchable in org.apache.lucene.search

Classes in org.apache.lucene.search that implement RMIRemoteSearchable
 class RemoteSearchable
Deprecated. This package (all of contrib/remote) will be removed in 4.0.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.ScoreCachingWrappingScorer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.ScoreCachingWrappingScorer

No usage of org.apache.lucene.search.ScoreCachingWrappingScorer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.ScoreDoc

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.ScoreDoc

Packages that use ScoreDoc
org.apache.lucene.index.pruning | Static Index Pruning Tools
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.grouping | This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.

Uses of ScoreDoc in org.apache.lucene.index.pruning

Methods in org.apache.lucene.index.pruning with parameters of type ScoreDoc
int | CarmelUniformTermPruningPolicy.ByDocComparator.compare(ScoreDoc o1, ScoreDoc o2)
int | CarmelTopKTermPruningPolicy.ByDocComparator.compare(ScoreDoc o1, ScoreDoc o2)

Uses of ScoreDoc in org.apache.lucene.search

Classes in org.apache.lucene.search with type parameters of type ScoreDoc
 class TopDocsCollector<T extends ScoreDoc>
A base class for all collectors that return a TopDocs output.

Subclasses of ScoreDoc in org.apache.lucene.search
class | FieldDoc Expert: A ScoreDoc which also contains information about how to sort the referenced document.
static class | FieldValueHitQueue.Entry

Fields in org.apache.lucene.search declared as ScoreDoc
 ScoreDoc[] TopDocs.scoreDocs
The top hits for the query.

Methods in org.apache.lucene.search with parameters of type ScoreDoc
static void CheckHits.checkDocIds(String mes, int[] results, ScoreDoc[] hits)
Tests that a Hits has an expected order of documents
static void CheckHits.checkEqual(Query query, ScoreDoc[] hits1, ScoreDoc[] hits2)
static void CheckHits.checkEqual(Query query, ScoreDoc[] hits1, ScoreDoc[] hits2)
static void CheckHits.checkHitsQuery(Query query, ScoreDoc[] hits1, ScoreDoc[] hits2, int[] results)
Tests that two queries have an expected order of documents, and that the two queries have the same score values.
static void CheckHits.checkHitsQuery(Query query, ScoreDoc[] hits1, ScoreDoc[] hits2, int[] results)
Tests that two queries have an expected order of documents, and that the two queries have the same score values.
static TopScoreDocCollector TopScoreDocCollector.create(int numHits, ScoreDoc after, boolean docsScoredInOrder)
Creates a new TopScoreDocCollector given the number of hits to collect, the bottom of the previous page, and whether documents are scored in order by the input Scorer to TopScoreDocCollector.setScorer(Scorer).
static String CheckHits.hits2str(ScoreDoc[] hits1, ScoreDoc[] hits2, int start, int end)
static String CheckHits.hits2str(ScoreDoc[] hits1, ScoreDoc[] hits2, int start, int end)
protected  TopDocs TopDocsCollector.newTopDocs(ScoreDoc[] results, int start)
Returns a TopDocs instance containing the given results.
protected  TopDocs TopFieldCollector.newTopDocs(ScoreDoc[] results, int start)
protected  TopDocs TopScoreDocCollector.newTopDocs(ScoreDoc[] results, int start)
protected  void TopDocsCollector.populateResults(ScoreDoc[] results, int howMany)
Populates the results array with the ScoreDoc instances.
protected  void TopFieldCollector.populateResults(ScoreDoc[] results, int howMany)
protected  TopDocs IndexSearcher.search(Weight weight, Filter filter, ScoreDoc after, int nDocs)
Expert: Low-level search implementation.
 TopDocs IndexSearcher.searchAfter(ScoreDoc after, Query query, Filter filter, int n)
Finds the top n hits for query, applying filter if non-null, where all results are after a previous result (after).
 TopDocs IndexSearcher.searchAfter(ScoreDoc after, Query query, int n)
Finds the top n hits for query where all results are after a previous result (after).

Constructors in org.apache.lucene.search with parameters of type ScoreDoc
TopDocs(int totalHits, ScoreDoc[] scoreDocs, float maxScore)
TopFieldDocs(int totalHits, ScoreDoc[] scoreDocs, SortField[] fields, float maxScore)
Creates one of these objects.

Uses of ScoreDoc in org.apache.lucene.search.grouping

Fields in org.apache.lucene.search.grouping declared as ScoreDoc
 ScoreDoc[] GroupDocs.scoreDocs
Hits; this may be FieldDoc instances if the withinGroupSort sorted by fields.

Constructors in org.apache.lucene.search.grouping with parameters of type ScoreDoc
GroupDocs(float maxScore, int totalHits, ScoreDoc[] scoreDocs, GROUP_VALUE_TYPE groupValue, Object[] groupSortValues)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.Scorer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.Scorer

Packages that use Scorer
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.grouping | This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.
org.apache.lucene.search.join | This modules support index-time and query-time joins.
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.spans | The calculus of spans.
org.apache.lucene.util | Some utility classes.

Uses of Scorer in org.apache.lucene.facet.search

Methods in org.apache.lucene.facet.search with parameters of type Scorer
 void FacetsCollector.setScorer(Scorer scorer)

Uses of Scorer in org.apache.lucene.search

Classes in org.apache.lucene.search with type parameters of type Scorer
static class Scorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer>
A callback to gather information from a scorer and its sub-scorers.

Subclasses of Scorer in org.apache.lucene.search
protected class | ConstantScoreQuery.ConstantScorer
class | ScoreCachingWrappingScorer A Scorer which wraps another scorer and caches the score of the current document.

Methods in org.apache.lucene.search that return Scorer
Scorer | DisjunctionMaxQuery.DisjunctionMaxWeight.scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) Create the scorer used to score our associated DisjunctionMaxQuery
abstract Scorer | Weight.scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.
Scorer | ConstantScoreQuery.ConstantWeight.scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)
Scorer | BooleanQuery.BooleanWeight.scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)

Methods in org.apache.lucene.search with parameters of type Scorer
 void CheckHits.SetCollector.setScorer(Scorer scorer)
 void CheckHits.ExplanationAsserter.setScorer(Scorer scorer)
 void PositiveScoresOnlyCollector.setScorer(Scorer scorer)
 void FieldComparator.setScorer(Scorer scorer)
Sets the Scorer to use in case a document's score is needed.
 void FieldComparator.RelevanceComparator.setScorer(Scorer scorer)
 void MultiCollector.setScorer(Scorer s)
 void TimeLimitingCollector.setScorer(Scorer scorer)
abstract  void Collector.setScorer(Scorer scorer)
Called before successive calls to Collector.collect(int).
 void TopScoreDocCollector.setScorer(Scorer scorer)
 void TotalHitCountCollector.setScorer(Scorer scorer)

Method parameters in org.apache.lucene.search with type arguments of type Scorer
void | Scorer.visitScorers(Scorer.ScorerVisitor<Query,Query,Scorer> visitor) Expert: call this to gather details for all sub-scorers for this query.
void | Scorer.visitSubScorers(Query parent, BooleanClause.Occur relationship, Scorer.ScorerVisitor<Query,Query,Scorer> visitor) Scorer subclasses should implement this method if the subclass itself contains multiple scorers to support gathering details for sub-scorers via Scorer.ScorerVisitor

Constructors in org.apache.lucene.search with parameters of type Scorer
ScoreCachingWrappingScorer(Scorer scorer)
Creates a new instance by wrapping the given scorer.

Uses of Scorer in org.apache.lucene.search.grouping

Methods in org.apache.lucene.search.grouping with parameters of type Scorer
void | AbstractSecondPassGroupingCollector.setScorer(Scorer scorer)
void | AbstractFirstPassGroupingCollector.setScorer(Scorer scorer)
void | AbstractAllGroupsCollector.setScorer(Scorer scorer)
void | BlockGroupingCollector.setScorer(Scorer scorer)

Uses of Scorer in org.apache.lucene.search.join

Methods in org.apache.lucene.search.join with parameters of type Scorer
 void ToParentBlockJoinCollector.setScorer(Scorer scorer)

Uses of Scorer in org.apache.lucene.search.payloads

Subclasses of Scorer in org.apache.lucene.search.payloads
class | PayloadNearQuery.PayloadNearSpanScorer
protected class | PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

Methods in org.apache.lucene.search.payloads that return Scorer
Scorer | PayloadNearQuery.PayloadNearSpanWeight.scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)
Scorer | PayloadTermQuery.PayloadTermWeight.scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)

Uses of Scorer in org.apache.lucene.search.spans

Subclasses of Scorer in org.apache.lucene.search.spans
 class SpanScorer
Public for extension only.

Methods in org.apache.lucene.search.spans that return Scorer
 Scorer SpanWeight.scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)

Uses of Scorer in org.apache.lucene.util

Methods in org.apache.lucene.util that return Scorer
Scorer | ScorerDocQueue.pop() Removes and returns the least scorer of the ScorerDocQueue in log(size) time.
Scorer | ScorerDocQueue.top() Returns the least Scorer of the ScorerDocQueue in constant time.

Methods in org.apache.lucene.util with parameters of type Scorer
 boolean ScorerDocQueue.insert(Scorer scorer)
Adds a Scorer to the ScorerDocQueue in log(size) time if either the ScorerDocQueue is not full, or not lessThan(scorer, top()).
 void ScorerDocQueue.put(Scorer scorer)
Adds a Scorer to a ScorerDocQueue in log(size) time.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.Scorer.ScorerVisitor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.Scorer.ScorerVisitor

Packages that use Scorer.ScorerVisitor
org.apache.lucene.search Code to search indices.

Uses of Scorer.ScorerVisitor in org.apache.lucene.search

Methods in org.apache.lucene.search with parameters of type Scorer.ScorerVisitor
void | Scorer.visitScorers(Scorer.ScorerVisitor<Query,Query,Scorer> visitor) Expert: call this to gather details for all sub-scorers for this query.
void | Scorer.visitSubScorers(Query parent, BooleanClause.Occur relationship, Scorer.ScorerVisitor<Query,Query,Scorer> visitor) Scorer subclasses should implement this method if the subclass itself contains multiple scorers to support gathering details for sub-scorers via Scorer.ScorerVisitor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.ScoringRewrite

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.ScoringRewrite

Packages that use ScoringRewrite
org.apache.lucene.search Code to search indices.

Uses of ScoringRewrite in org.apache.lucene.search

Fields in org.apache.lucene.search declared as ScoringRewrite
static ScoringRewrite<BooleanQuery> ScoringRewrite.SCORING_BOOLEAN_QUERY_REWRITE
A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.Searchable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.Searchable

Packages that use Searchable
org.apache.lucene.search Code to search indices.

Uses of Searchable in org.apache.lucene.search

Subinterfaces of Searchable in org.apache.lucene.search
 interface RMIRemoteSearchable
Deprecated. This package (all of contrib/remote) will be removed in 4.0.

Classes in org.apache.lucene.search that implement Searchable
class | AssertingIndexSearcher Helper class that adds some extra checks to ensure correct usage of IndexSearcher and Weight.
static class | CheckHits.ExplanationAssertingSearcher an IndexSearcher that implicitly checks hte explanation of every match whenever it executes a search.
class | IndexSearcher Implements search over a single IndexReader.
class | MultiSearcher Deprecated. If you are using MultiSearcher over IndexSearchers, please use MultiReader instead; this class does not properly handle certain kinds of queries (see LUCENE-2756).
class | ParallelMultiSearcher Deprecated. Please pass an ExecutorService to IndexSearcher, instead.
class | RemoteSearchable Deprecated. This package (all of contrib/remote) will be removed in 4.0.
class | Searcher Deprecated. In 4.0 this abstract class is removed/absorbed into IndexSearcher

Methods in org.apache.lucene.search that return Searchable
 Searchable[] MultiSearcher.getSearchables()
Deprecated. Return the array of Searchables this searches.

Constructors in org.apache.lucene.search with parameters of type Searchable
MultiSearcher(Searchable... searchables)
Deprecated. Creates a searcher which searches searchers.
ParallelMultiSearcher(ExecutorService executor, Searchable... searchables)
Deprecated. Creates a Searchable which searches searchables with the specified ExecutorService.
ParallelMultiSearcher(Searchable... searchables)
Deprecated. Creates a Searchable which searches searchables with the default executor service (a cached thread pool).
RemoteSearchable(Searchable local)
Deprecated. Constructs and exports a remote searcher.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.SearchEquivalenceTestBase

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.SearchEquivalenceTestBase

No usage of org.apache.lucene.search.SearchEquivalenceTestBase

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.Searcher

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.Searcher

Packages that use Searcher
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.function | Programmatic control over documents scores.
org.apache.lucene.search.join | This modules support index-time and query-time joins.
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.spans | The calculus of spans.

Uses of Searcher in org.apache.lucene.search

Subclasses of Searcher in org.apache.lucene.search
class | AssertingIndexSearcher Helper class that adds some extra checks to ensure correct usage of IndexSearcher and Weight.
static class | CheckHits.ExplanationAssertingSearcher an IndexSearcher that implicitly checks hte explanation of every match whenever it executes a search.
class | IndexSearcher Implements search over a single IndexReader.
class | MultiSearcher Deprecated. If you are using MultiSearcher over IndexSearchers, please use MultiReader instead; this class does not properly handle certain kinds of queries (see LUCENE-2756).
class | ParallelMultiSearcher Deprecated. Please pass an ExecutorService to IndexSearcher, instead.

Methods in org.apache.lucene.search with parameters of type Searcher
static void QueryUtils.check(Random random, Query q1, Searcher s)
Various query sanity checks on a searcher, some checks are only done for instanceof IndexSearcher.
static void QueryUtils.check(Random random, Query q1, Searcher s, boolean wrap)
static void QueryUtils.checkExplanations(Query q, Searcher s)
deep check that explanations of a query 'score' correctly
static void CheckHits.checkExplanations(Query query, String defaultFieldName, Searcher searcher)
Asserts that the explanation value for every document matching a query corresponds with the true score.
static void CheckHits.checkExplanations(Query query, String defaultFieldName, Searcher searcher, boolean deep)
Asserts that the explanation value for every document matching a query corresponds with the true score.
static void CheckHits.checkHitCollector(Random random, Query query, String defaultFieldName, Searcher searcher, int[] results)
Tests that a query matches the an expected set of documents using a HitCollector.
static void CheckHits.checkHits(Random random, Query query, String defaultFieldName, Searcher searcher, int[] results)
Tests that a query matches the an expected set of documents using Hits.
static void CheckHits.checkNoMatchExplanations(Query q, String defaultFieldName, Searcher searcher, int[] results)
Tests that all documents up to maxDoc which are *not* in the expected result set, have an explanation which indicates that the document does not match
 Weight PhraseQuery.createWeight(Searcher searcher)
 Weight DisjunctionMaxQuery.createWeight(Searcher searcher)
Create the Weight used to score us
 Weight ConstantScoreQuery.createWeight(Searcher searcher)
 Weight MultiPhraseQuery.createWeight(Searcher searcher)
 Weight TermQuery.createWeight(Searcher searcher)
 Weight BooleanQuery.createWeight(Searcher searcher)
 Weight MatchAllDocsQuery.createWeight(Searcher searcher)
 Weight FilteredQuery.createWeight(Searcher searcher)
Returns a Weight that applies the filter to the enclosed query's Weight.
 Weight Query.createWeight(Searcher searcher)
Expert: Constructs an appropriate Weight implementation for this query.
 Similarity Query.getSimilarity(Searcher searcher)
Deprecated. Instead of using "runtime" subclassing/delegation, subclass the Weight instead.
 Explanation.IDFExplanation Similarity.idfExplain(Collection<Term> terms, Searcher searcher)
Computes a score factor for a phrase.
 Explanation.IDFExplanation Similarity.idfExplain(Term term, Searcher searcher)
This method forwards to Similarity.idfExplain(Term,Searcher,int) by passing searcher.docFreq(term) as the docFreq.
 Explanation.IDFExplanation Similarity.idfExplain(Term term, Searcher searcher, int docFreq)
Computes a score factor for a simple term and returns an explanation for that score factor.
 Weight Query.weight(Searcher searcher)
Deprecated. never ever use this method in Weight implementations. Subclasses of Query should use Query.createWeight(org.apache.lucene.search.Searcher), instead.
static MultiSearcher QueryUtils.wrapSearcher(Random random, Searcher s, int edge)
Given a Searcher, returns a new MultiSearcher wrapping the the original Searcher, as well as several "empty" IndexSearchers -- some of which will have deleted documents in them.

Constructors in org.apache.lucene.search with parameters of type Searcher
BooleanQuery.BooleanWeight(Searcher searcher, boolean disableCoord)
CheckHits.ExplanationAsserter(Query q, String defaultFieldName, Searcher s)
Constructs an instance which does shallow tests on the Explanation
CheckHits.ExplanationAsserter(Query q, String defaultFieldName, Searcher s, boolean deep)
ConstantScoreQuery.ConstantWeight(Searcher searcher)
DisjunctionMaxQuery.DisjunctionMaxWeight(Searcher searcher)
Construct the Weight for this Query searched by searcher.

Uses of Searcher in org.apache.lucene.search.function

Methods in org.apache.lucene.search.function with parameters of type Searcher
Weight | ValueSourceQuery.createWeight(Searcher searcher)
Weight | CustomScoreQuery.createWeight(Searcher searcher)

Uses of Searcher in org.apache.lucene.search.join

Methods in org.apache.lucene.search.join with parameters of type Searcher
Weight | ToChildBlockJoinQuery.createWeight(Searcher searcher)
Weight | ToParentBlockJoinQuery.createWeight(Searcher searcher)

Uses of Searcher in org.apache.lucene.search.payloads

Methods in org.apache.lucene.search.payloads with parameters of type Searcher
Weight | PayloadNearQuery.createWeight(Searcher searcher)
Weight | PayloadTermQuery.createWeight(Searcher searcher)

Constructors in org.apache.lucene.search.payloads with parameters of type Searcher
PayloadNearQuery.PayloadNearSpanWeight(SpanQuery query, Searcher searcher)
PayloadTermQuery.PayloadTermWeight(PayloadTermQuery query, Searcher searcher)

Uses of Searcher in org.apache.lucene.search.spans

Methods in org.apache.lucene.search.spans with parameters of type Searcher
Weight | SpanQuery.createWeight(Searcher searcher)
Weight | FieldMaskingSpanQuery.createWeight(Searcher searcher)

Constructors in org.apache.lucene.search.spans with parameters of type Searcher
SpanWeight(SpanQuery query, Searcher searcher)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.SearcherFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.SearcherFactory

Packages that use SearcherFactory
org.apache.lucene.search Code to search indices.

Uses of SearcherFactory in org.apache.lucene.search

Constructors in org.apache.lucene.search with parameters of type SearcherFactory
NRTManager(NRTManager.TrackingIndexWriter writer, SearcherFactory searcherFactory)
Create new NRTManager.
NRTManager(NRTManager.TrackingIndexWriter writer, SearcherFactory searcherFactory, boolean applyAllDeletes)
Expert: just like NRTManager.NRTManager(TrackingIndexWriter,SearcherFactory), but you can also specify whether each reopened searcher must apply deletes.
SearcherManager(Directory dir, SearcherFactory searcherFactory)
Creates and returns a new SearcherManager from the given Directory.
SearcherManager(IndexWriter writer, boolean applyAllDeletes, SearcherFactory searcherFactory)
Creates and returns a new SearcherManager from the given IndexWriter.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.SearcherLifetimeManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.SearcherLifetimeManager

No usage of org.apache.lucene.search.SearcherLifetimeManager

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.SearcherLifetimeManager.PruneByAge

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.SearcherLifetimeManager.PruneByAge

No usage of org.apache.lucene.search.SearcherLifetimeManager.PruneByAge

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.SearcherLifetimeManager.Pruner

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.SearcherLifetimeManager.Pruner

Packages that use SearcherLifetimeManager.Pruner
org.apache.lucene.search Code to search indices.

Uses of SearcherLifetimeManager.Pruner in org.apache.lucene.search

Classes in org.apache.lucene.search that implement SearcherLifetimeManager.Pruner
static class SearcherLifetimeManager.PruneByAge
Simple pruner that drops any searcher older by more than the specified seconds, than the newest searcher.

Methods in org.apache.lucene.search with parameters of type SearcherLifetimeManager.Pruner
 void SearcherLifetimeManager.prune(SearcherLifetimeManager.Pruner pruner)
Calls provided SearcherLifetimeManager.Pruner to prune entries.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.SearcherManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.SearcherManager

No usage of org.apache.lucene.search.SearcherManager

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.Similarity

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.Similarity

Packages that use Similarity
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.index.pruning | Static Index Pruning Tools
org.apache.lucene.misc | Miscellaneous index tools.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.similar | Document similarity query generators.
org.apache.lucene.search.spans | The calculus of spans.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.

Uses of Similarity in org.apache.lucene.index

Methods in org.apache.lucene.index that return Similarity
 Similarity IndexWriter.getSimilarity()
Deprecated. use IndexWriterConfig.getSimilarity() instead
 Similarity IndexWriterConfig.getSimilarity()
Expert: returns the Similarity implementation used by this IndexWriter.

Methods in org.apache.lucene.index with parameters of type Similarity
 void IndexWriter.setSimilarity(Similarity similarity)
Deprecated. use IndexWriterConfig.setSimilarity(Similarity) instead
 IndexWriterConfig IndexWriterConfig.setSimilarity(Similarity similarity)
Expert: set the Similarity implementation used by this IndexWriter.

Constructors in org.apache.lucene.index with parameters of type Similarity
FieldNormModifier(Directory d, Similarity s)
Deprecated. Constructor for code that wishes to use this class programmatically If Similarity is null, kill the field norms.

Uses of Similarity in org.apache.lucene.index.pruning

Constructors in org.apache.lucene.index.pruning with parameters of type Similarity
CarmelTopKTermPruningPolicy(IndexReader in, Map<String,Integer> fieldFlags, int k, float epsilon, int r, Similarity sim)
Constructor with specific settings
CarmelUniformTermPruningPolicy(IndexReader in, Map<String,Integer> fieldFlags, Map<String,Float> thresholds, float defThreshold, Similarity sim)

Uses of Similarity in org.apache.lucene.misc

Subclasses of Similarity in org.apache.lucene.misc
 class SweetSpotSimilarity
A similarity with a lengthNorm that provides for a "plateau" of equally good lengths, and tf helper functions.

Uses of Similarity in org.apache.lucene.search

Subclasses of Similarity in org.apache.lucene.search
class | DefaultSimilarity Expert: Default scoring implementation.
class | SimilarityDelegator Deprecated. this class will be removed in 4.0. Please subclass Similarity or DefaultSimilarity instead.

Fields in org.apache.lucene.search declared as Similarity
protected Similarity | DisjunctionMaxQuery.DisjunctionMaxWeight.similarity The Similarity implementation.
protected Similarity | BooleanQuery.BooleanWeight.similarity The Similarity implementation.

Methods in org.apache.lucene.search that return Similarity
static Similarity | Similarity.getDefault() Return the default Similarity implementation used by indexing and search code.
Similarity | ScoreCachingWrappingScorer.getSimilarity()
Similarity | IndexSearcher.getSimilarity()
Similarity | Scorer.getSimilarity() Deprecated. Store any Similarity you might need privately in your implementation instead.
Similarity | Searcher.getSimilarity() Deprecated. Expert: Return the Similarity implementation used by this Searcher.
Similarity | Query.getSimilarity(Searcher searcher) Deprecated. Instead of using "runtime" subclassing/delegation, subclass the Weight instead.

Methods in org.apache.lucene.search with parameters of type Similarity
static void | Similarity.setDefault(Similarity similarity) Set the default Similarity implementation used by indexing and search code.
void | IndexSearcher.setSimilarity(Similarity similarity) Expert: Set the Similarity implementation used by this Searcher.
void | Searcher.setSimilarity(Similarity similarity) Deprecated. Expert: Set the Similarity implementation used by this Searcher.

Constructors in org.apache.lucene.search with parameters of type Similarity
ConstantScoreQuery.ConstantScorer(Similarity similarity, DocIdSetIterator docIdSetIterator, Weight w)
Scorer(Similarity similarity)
Deprecated. Use Scorer.Scorer(Weight) instead.
Scorer(Similarity similarity, Weight weight)
Deprecated. Use Scorer.Scorer(Weight) instead.
SimilarityDelegator(Similarity delegee)
Deprecated. Construct a Similarity that delegates all methods to another.

Uses of Similarity in org.apache.lucene.search.payloads

Methods in org.apache.lucene.search.payloads with parameters of type Similarity
protected  void PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer.processPayload(Similarity similarity)

Constructors in org.apache.lucene.search.payloads with parameters of type Similarity
PayloadNearQuery.PayloadNearSpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms)
PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer(TermSpans spans, Weight weight, Similarity similarity, byte[] norms)

Uses of Similarity in org.apache.lucene.search.similar

Methods in org.apache.lucene.search.similar that return Similarity
 Similarity MoreLikeThis.getSimilarity()

Methods in org.apache.lucene.search.similar with parameters of type Similarity
 void MoreLikeThis.setSimilarity(Similarity similarity)

Constructors in org.apache.lucene.search.similar with parameters of type Similarity
MoreLikeThis(IndexReader ir, Similarity sim)

Uses of Similarity in org.apache.lucene.search.spans

Fields in org.apache.lucene.search.spans declared as Similarity
protected  Similarity SpanWeight.similarity

Constructors in org.apache.lucene.search.spans with parameters of type Similarity
SpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms)

Uses of Similarity in org.apache.lucene.store.instantiated

Methods in org.apache.lucene.store.instantiated that return Similarity
 Similarity InstantiatedIndexWriter.getSimilarity()
Deprecated.

Methods in org.apache.lucene.store.instantiated with parameters of type Similarity
 void InstantiatedIndexWriter.setSimilarity(Similarity similarity)
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.SimilarityDelegator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.SimilarityDelegator

No usage of org.apache.lucene.search.SimilarityDelegator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.SingleTermEnum

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.SingleTermEnum

No usage of org.apache.lucene.search.SingleTermEnum

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.Sort

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.Sort

Packages that use Sort
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.grouping | This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.
org.apache.lucene.search.join | This modules support index-time and query-time joins.

Uses of Sort in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks that return Sort
protected Sort | ReadTask.getSort()
Sort | SearchWithSortTask.getSort()

Uses of Sort in org.apache.lucene.search

Fields in org.apache.lucene.search declared as Sort
static Sort | Sort.INDEXORDER Represents sorting by index order.
static Sort | Sort.RELEVANCE Represents sorting by computed relevance.

Methods in org.apache.lucene.search with parameters of type Sort
static TopFieldCollector TopFieldCollector.create(Sort sort, int numHits, boolean fillFields, boolean trackDocScores, boolean trackMaxScore, boolean docsScoredInOrder)
Creates a new TopFieldCollector from the given arguments.
static TopDocs TopDocs.merge(Sort sort, int topN, TopDocs[] shardHits)
Returns a new TopDocs, containing topN results across the provided TopDocs, sorting by the specified Sort.
 TopFieldDocs CheckHits.ExplanationAssertingSearcher.search(Query query, Filter filter, int n, Sort sort)
 TopFieldDocs IndexSearcher.search(Query query, Filter filter, int n, Sort sort)
Search implementation with arbitrary sorting.
 TopFieldDocs Searcher.search(Query query, Filter filter, int n, Sort sort)
Deprecated. Search implementation with arbitrary sorting.
 TopFieldDocs IndexSearcher.search(Query query, int n, Sort sort)
Search implementation with arbitrary sorting and no filter.
 TopFieldDocs Searcher.search(Query query, int n, Sort sort)
Deprecated. Search implementation with arbitrary sorting and no filter.
 TopFieldDocs RemoteSearchable.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated.
 TopFieldDocs IndexSearcher.search(Weight weight, Filter filter, int nDocs, Sort sort)
Expert: Low-level search implementation with arbitrary sorting.
abstract  TopFieldDocs Searcher.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated.
 TopFieldDocs Searchable.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated. Expert: Low-level search implementation with arbitrary sorting.
 TopFieldDocs ParallelMultiSearcher.search(Weight weight, Filter filter, int nDocs, Sort sort)
Deprecated. A search implementation allowing sorting which spans a new thread for each Searchable, waits for each search to complete and merges the results back together.
 TopFieldDocs MultiSearcher.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated.
protected  TopFieldDocs IndexSearcher.search(Weight weight, Filter filter, int nDocs, Sort sort, boolean fillFields)
Just like IndexSearcher.search(Weight, Filter, int, Sort), but you choose whether or not the fields in the returned FieldDoc instances should be set by specifying fillFields.

Uses of Sort in org.apache.lucene.search.grouping

Methods in org.apache.lucene.search.grouping with parameters of type Sort
static AbstractAllGroupHeadsCollector TermAllGroupHeadsCollector.create(String groupField, Sort sortWithinGroup)
Creates an AbstractAllGroupHeadsCollector instance based on the supplied arguments.
static AbstractAllGroupHeadsCollector TermAllGroupHeadsCollector.create(String groupField, Sort sortWithinGroup, int initialSize)
Creates an AbstractAllGroupHeadsCollector instance based on the supplied arguments.
 TopGroups BlockGroupingCollector.getTopGroups(Sort withinGroupSort, int groupOffset, int withinGroupOffset, int maxDocsPerGroup, boolean fillSortFields)
Returns the grouped results.
static
<T> Collection<SearchGroup<T>>
SearchGroup.merge(List<Collection<SearchGroup<T>>> topGroups, int offset, int topN, Sort groupSort)
Merges multiple collections of top groups, for example obtained from separate index shards.
static
<T> TopGroups<T>
TopGroups.merge(TopGroups<T>[] shardGroups, Sort groupSort, Sort docSort, int docOffset, int docTopN)
Merges an array of TopGroups, for example obtained from the second-pass collector across multiple shards.

Constructors in org.apache.lucene.search.grouping with parameters of type Sort
AbstractFirstPassGroupingCollector(Sort groupSort, int topNGroups)
Create the first pass collector.
AbstractSecondPassGroupingCollector(Collection<SearchGroup<GROUP_VALUE_TYPE>> groups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, boolean getScores, boolean getMaxScores, boolean fillSortFields)
BlockGroupingCollector(Sort groupSort, int topNGroups, boolean needsScores, Filter lastDocPerGroup)
Create the single pass collector.
TermFirstPassGroupingCollector(String groupField, Sort groupSort, int topNGroups)
Create the first pass collector.
TermSecondPassGroupingCollector(String groupField, Collection<SearchGroup<String>> groups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, boolean getScores, boolean getMaxScores, boolean fillSortFields)

Uses of Sort in org.apache.lucene.search.join

Methods in org.apache.lucene.search.join with parameters of type Sort
 TopGroups<Integer> ToParentBlockJoinCollector.getTopGroups(ToParentBlockJoinQuery query, Sort withinGroupSort, int offset, int maxDocsPerGroup, int withinGroupOffset, boolean fillSortFields)
Return the TopGroups for the specified BlockJoinQuery.

Constructors in org.apache.lucene.search.join with parameters of type Sort
ToParentBlockJoinCollector(Sort sort, int numParentHits, boolean trackScores, boolean trackMaxScore)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.SortField

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.SortField

Packages that use SortField
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.grouping | This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.

Uses of SortField in org.apache.lucene.search

Fields in org.apache.lucene.search declared as SortField
static SortField | SortField.FIELD_DOC Represents sorting by document number (index order).
static SortField | SortField.FIELD_SCORE Represents sorting by document score (relevance).
SortField[] | TopFieldDocs.fields The fields which were used to sort results by.
protected SortField[] | FieldValueHitQueue.fields Stores the sort criteria being used.

Methods in org.apache.lucene.search that return SortField
SortField[] | Sort.getSort() Representation of the sort criteria.
SortField | SortField.setMissingValue(Object missingValue) Set a default sorting value for documents which lacks one

Methods in org.apache.lucene.search with parameters of type SortField
static
<T extends FieldValueHitQueue.Entry>
FieldValueHitQueue<T>
FieldValueHitQueue.create(SortField[] fields, int size)
Creates a hit queue sorted by the given list of fields.
 void Sort.setSort(SortField... fields)
Sets the sort to the given criteria in succession.
 void Sort.setSort(SortField field)
Sets the sort to the given criteria.

Constructors in org.apache.lucene.search with parameters of type SortField
Sort(SortField... fields)
Sorts in succession by the criteria in each SortField.
Sort(SortField field)
Sorts by the criteria in the given SortField.
TopFieldDocs(int totalHits, ScoreDoc[] scoreDocs, SortField[] fields, float maxScore)
Creates one of these objects.

Uses of SortField in org.apache.lucene.search.grouping

Fields in org.apache.lucene.search.grouping declared as SortField
SortField[] | TopGroups.groupSort How groups are sorted against each other
SortField[] | TopGroups.withinGroupSort How docs are sorted within each group

Constructors in org.apache.lucene.search.grouping with parameters of type SortField
TopGroups(SortField[] groupSort, SortField[] withinGroupSort, int totalHitCount, int totalGroupedHitCount, GroupDocs<GROUP_VALUE_TYPE>[] groups)
TopGroups(SortField[] groupSort, SortField[] withinGroupSort, int totalHitCount, int totalGroupedHitCount, GroupDocs<GROUP_VALUE_TYPE>[] groups)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.SpanFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.SpanFilter

Packages that use SpanFilter
org.apache.lucene.search Code to search indices.

Uses of SpanFilter in org.apache.lucene.search

Subclasses of SpanFilter in org.apache.lucene.search
class | CachingSpanFilter Wraps another SpanFilter's result and caches it.
class | SpanQueryFilter Constrains search results to only match those which also match a provided query.

Constructors in org.apache.lucene.search with parameters of type SpanFilter
CachingSpanFilter(SpanFilter filter)
New deletions always result in a cache miss, by default (CachingWrapperFilter.DeletesMode.RECACHE.
CachingSpanFilter(SpanFilter filter, CachingWrapperFilter.DeletesMode deletesMode)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.SpanFilterResult

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.SpanFilterResult

Packages that use SpanFilterResult
org.apache.lucene.search Code to search indices.

Uses of SpanFilterResult in org.apache.lucene.search

Methods in org.apache.lucene.search that return SpanFilterResult
SpanFilterResult | SpanQueryFilter.bitSpans(IndexReader reader)
SpanFilterResult | CachingSpanFilter.bitSpans(IndexReader reader)
abstract SpanFilterResult | SpanFilter.bitSpans(IndexReader reader) Returns a SpanFilterResult with true for documents which should be permitted in search results, and false for those that should not and Spans for where the true docs match.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.SpanFilterResult.PositionInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.SpanFilterResult.PositionInfo

Packages that use SpanFilterResult.PositionInfo
org.apache.lucene.search Code to search indices.

Uses of SpanFilterResult.PositionInfo in org.apache.lucene.search

Methods in org.apache.lucene.search that return types with arguments of type SpanFilterResult.PositionInfo
 List<SpanFilterResult.PositionInfo> SpanFilterResult.getPositions()
The first entry in the array corresponds to the first "on" bit.

Constructor parameters in org.apache.lucene.search with type arguments of type SpanFilterResult.PositionInfo
SpanFilterResult(DocIdSet docIdSet, List<SpanFilterResult.PositionInfo> positions)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.SpanFilterResult.StartEnd

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.SpanFilterResult.StartEnd

Packages that use SpanFilterResult.StartEnd
org.apache.lucene.search Code to search indices.

Uses of SpanFilterResult.StartEnd in org.apache.lucene.search

Methods in org.apache.lucene.search that return types with arguments of type SpanFilterResult.StartEnd
 List<SpanFilterResult.StartEnd> SpanFilterResult.PositionInfo.getPositions()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.SpanQueryFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.SpanQueryFilter

No usage of org.apache.lucene.search.SpanQueryFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.TermQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.TermQuery

Packages that use TermQuery
org.apache.lucene.queryParser.standard.builders | Standard Lucene Query Node Builders
org.apache.lucene.queryParser.surround.query | This package contains SrndQuery and its subclasses.

Uses of TermQuery in org.apache.lucene.queryParser.standard.builders

Methods in org.apache.lucene.queryParser.standard.builders that return TermQuery
TermQuery | FieldQueryNodeBuilder.build(QueryNode queryNode)
TermQuery | DummyQueryNodeBuilder.build(QueryNode queryNode) Always return null.

Uses of TermQuery in org.apache.lucene.queryParser.surround.query

Methods in org.apache.lucene.queryParser.surround.query that return TermQuery
 TermQuery BasicQueryFactory.newTermQuery(Term term)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.TermRangeFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.TermRangeFilter

Packages that use TermRangeFilter
org.apache.lucene.search Code to search indices.

Uses of TermRangeFilter in org.apache.lucene.search

Methods in org.apache.lucene.search that return TermRangeFilter
static TermRangeFilter | TermRangeFilter.Less(String fieldName, String upperTerm) Constructs a filter for field fieldName matching less than or equal to upperTerm.
static TermRangeFilter | TermRangeFilter.More(String fieldName, String lowerTerm) Constructs a filter for field fieldName matching greater than or equal to lowerTerm.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.TermRangeQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.TermRangeQuery

Packages that use TermRangeQuery
org.apache.lucene.queryParser.standard.builders Standard Lucene Query Node Builders

Uses of TermRangeQuery in org.apache.lucene.queryParser.standard.builders

Methods in org.apache.lucene.queryParser.standard.builders that return TermRangeQuery
TermRangeQuery | TermRangeQueryNodeBuilder.build(QueryNode queryNode)
TermRangeQuery | RangeQueryNodeBuilder.build(QueryNode queryNode) Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.TermRangeTermEnum

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.TermRangeTermEnum

No usage of org.apache.lucene.search.TermRangeTermEnum

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.TermsFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.TermsFilter

No usage of org.apache.lucene.search.TermsFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.TimeLimitingCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.TimeLimitingCollector

No usage of org.apache.lucene.search.TimeLimitingCollector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.TimeLimitingCollector.TimeExceededException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.TimeLimitingCollector.TimeExceededException

No usage of org.apache.lucene.search.TimeLimitingCollector.TimeExceededException

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.TimeLimitingCollector.TimerThread

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.TimeLimitingCollector.TimerThread

Packages that use TimeLimitingCollector.TimerThread
org.apache.lucene.search Code to search indices.

Uses of TimeLimitingCollector.TimerThread in org.apache.lucene.search

Methods in org.apache.lucene.search that return TimeLimitingCollector.TimerThread
static TimeLimitingCollector.TimerThread TimeLimitingCollector.getGlobalTimerThread()
Returns the global TimeLimitingCollector.TimerThread.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.TopDocs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.TopDocs

Packages that use TopDocs
org.apache.lucene.benchmark.quality.utils | Miscellaneous utilities for search quality benchmarking: query parsing, submission reports.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.util | Some utility classes.

Uses of TopDocs in org.apache.lucene.benchmark.quality.utils

Methods in org.apache.lucene.benchmark.quality.utils with parameters of type TopDocs
 void SubmissionReport.report(QualityQuery qq, TopDocs td, String docNameField, IndexSearcher searcher)
Report a search result for a certain quality query.

Uses of TopDocs in org.apache.lucene.search

Subclasses of TopDocs in org.apache.lucene.search
 class TopFieldDocs
Represents hits returned by Searcher.search(Query,Filter,int,Sort).

Fields in org.apache.lucene.search declared as TopDocs
protected static TopDocs TopDocsCollector.EMPTY_TOPDOCS

Methods in org.apache.lucene.search that return TopDocs
static TopDocs | TopDocs.merge(Sort sort, int topN, TopDocs[] shardHits) Returns a new TopDocs, containing topN results across the provided TopDocs, sorting by the specified Sort.
protected TopDocs | TopDocsCollector.newTopDocs(ScoreDoc[] results, int start) Returns a TopDocs instance containing the given results.
protected TopDocs | TopFieldCollector.newTopDocs(ScoreDoc[] results, int start)
protected TopDocs | TopScoreDocCollector.newTopDocs(ScoreDoc[] results, int start)
TopDocs | CheckHits.ExplanationAssertingSearcher.search(Query query, Filter filter, int n)
TopDocs | IndexSearcher.search(Query query, Filter filter, int n) Finds the top n hits for query, applying filter if non-null.
TopDocs | Searcher.search(Query query, Filter filter, int n) Deprecated. Finds the top n hits for query, applying filter if non-null.
TopDocs | IndexSearcher.search(Query query, int n) Finds the top n hits for query.
TopDocs | Searcher.search(Query query, int n) Deprecated. Finds the top n hits for query.
TopDocs | RemoteSearchable.search(Weight weight, Filter filter, int n) Deprecated.
TopDocs | IndexSearcher.search(Weight weight, Filter filter, int nDocs) Expert: Low-level search implementation.
abstract TopDocs | Searcher.search(Weight weight, Filter filter, int n) Deprecated.
TopDocs | Searchable.search(Weight weight, Filter filter, int n) Deprecated. Expert: Low-level search implementation.
TopDocs | ParallelMultiSearcher.search(Weight weight, Filter filter, int nDocs) Deprecated. A search implementation which executes each Searchable in its own thread and waits for each search to complete and merge the results back together.
TopDocs | MultiSearcher.search(Weight weight, Filter filter, int nDocs) Deprecated.
protected TopDocs | IndexSearcher.search(Weight weight, Filter filter, ScoreDoc after, int nDocs) Expert: Low-level search implementation.
TopDocs | IndexSearcher.searchAfter(ScoreDoc after, Query query, Filter filter, int n) Finds the top n hits for query, applying filter if non-null, where all results are after a previous result (after).
TopDocs | IndexSearcher.searchAfter(ScoreDoc after, Query query, int n) Finds the top n hits for query where all results are after a previous result (after).
TopDocs | TopDocsCollector.topDocs() Returns the top docs that were collected by this collector.
TopDocs | TopDocsCollector.topDocs(int start) Returns the documents in the rage [start ..
TopDocs | TopDocsCollector.topDocs(int start, int howMany) Returns the documents in the rage [start ..

Methods in org.apache.lucene.search with parameters of type TopDocs
static TopDocs | TopDocs.merge(Sort sort, int topN, TopDocs[] shardHits) Returns a new TopDocs, containing topN results across the provided TopDocs, sorting by the specified Sort.
static String | CheckHits.topdocsString(TopDocs docs, int start, int end)

Uses of TopDocs in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type TopDocs
static void _TestUtil.assertEquals(TopDocs expected, TopDocs actual)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.TopDocsCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.TopDocsCollector

Packages that use TopDocsCollector
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.grouping | This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.

Uses of TopDocsCollector in org.apache.lucene.search

Subclasses of TopDocsCollector in org.apache.lucene.search
class | TopFieldCollector A Collector that sorts by SortField using FieldComparators.
class | TopScoreDocCollector A Collector implementation that collects the top-scoring hits, returning them as a TopDocs.

Uses of TopDocsCollector in org.apache.lucene.search.grouping

Fields in org.apache.lucene.search.grouping declared as TopDocsCollector
 TopDocsCollector<?> AbstractSecondPassGroupingCollector.SearchGroupDocs.collector

Constructors in org.apache.lucene.search.grouping with parameters of type TopDocsCollector
AbstractSecondPassGroupingCollector.SearchGroupDocs(GROUP_VALUE_TYPE groupValue, TopDocsCollector<?> collector)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.TopFieldCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.TopFieldCollector

Packages that use TopFieldCollector
org.apache.lucene.search Code to search indices.

Uses of TopFieldCollector in org.apache.lucene.search

Methods in org.apache.lucene.search that return TopFieldCollector
static TopFieldCollector TopFieldCollector.create(Sort sort, int numHits, boolean fillFields, boolean trackDocScores, boolean trackMaxScore, boolean docsScoredInOrder)
Creates a new TopFieldCollector from the given arguments.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.TopFieldDocs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.TopFieldDocs

Packages that use TopFieldDocs
org.apache.lucene.search Code to search indices.

Uses of TopFieldDocs in org.apache.lucene.search

Methods in org.apache.lucene.search that return TopFieldDocs
 TopFieldDocs CheckHits.ExplanationAssertingSearcher.search(Query query, Filter filter, int n, Sort sort)
 TopFieldDocs IndexSearcher.search(Query query, Filter filter, int n, Sort sort)
Search implementation with arbitrary sorting.
 TopFieldDocs Searcher.search(Query query, Filter filter, int n, Sort sort)
Deprecated. Search implementation with arbitrary sorting.
 TopFieldDocs IndexSearcher.search(Query query, int n, Sort sort)
Search implementation with arbitrary sorting and no filter.
 TopFieldDocs Searcher.search(Query query, int n, Sort sort)
Deprecated. Search implementation with arbitrary sorting and no filter.
 TopFieldDocs RemoteSearchable.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated.
 TopFieldDocs IndexSearcher.search(Weight weight, Filter filter, int nDocs, Sort sort)
Expert: Low-level search implementation with arbitrary sorting.
abstract  TopFieldDocs Searcher.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated.
 TopFieldDocs Searchable.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated. Expert: Low-level search implementation with arbitrary sorting.
 TopFieldDocs ParallelMultiSearcher.search(Weight weight, Filter filter, int nDocs, Sort sort)
Deprecated. A search implementation allowing sorting which spans a new thread for each Searchable, waits for each search to complete and merges the results back together.
 TopFieldDocs MultiSearcher.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated.
protected  TopFieldDocs IndexSearcher.search(Weight weight, Filter filter, int nDocs, Sort sort, boolean fillFields)
Just like IndexSearcher.search(Weight, Filter, int, Sort), but you choose whether or not the fields in the returned FieldDoc instances should be set by specifying fillFields.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.TopScoreDocCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.TopScoreDocCollector

Packages that use TopScoreDocCollector
org.apache.lucene.search Code to search indices.

Uses of TopScoreDocCollector in org.apache.lucene.search

Methods in org.apache.lucene.search that return TopScoreDocCollector
static TopScoreDocCollector | TopScoreDocCollector.create(int numHits, boolean docsScoredInOrder) Creates a new TopScoreDocCollector given the number of hits to collect and whether documents are scored in order by the input Scorer to setScorer(Scorer).
static TopScoreDocCollector | TopScoreDocCollector.create(int numHits, ScoreDoc after, boolean docsScoredInOrder) Creates a new TopScoreDocCollector given the number of hits to collect, the bottom of the previous page, and whether documents are scored in order by the input Scorer to setScorer(Scorer).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.TopTermsRewrite

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.TopTermsRewrite

Packages that use TopTermsRewrite
org.apache.lucene.search Code to search indices.

Uses of TopTermsRewrite in org.apache.lucene.search

Subclasses of TopTermsRewrite in org.apache.lucene.search
static class | MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, but the scores are only computed as the boost.
static class | MultiTermQuery.TopTermsScoringBooleanQueryRewrite A rewrite method that first translates each term into BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.TotalHitCountCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.TotalHitCountCollector

No usage of org.apache.lucene.search.TotalHitCountCollector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.Weight

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.Weight

Packages that use Weight
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.function | Programmatic control over documents scores.
org.apache.lucene.search.join | This modules support index-time and query-time joins.
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.spans | The calculus of spans.

Uses of Weight in org.apache.lucene.search

Subclasses of Weight in org.apache.lucene.search
protected class | BooleanQuery.BooleanWeight Expert: the Weight for BooleanQuery, used to normalize, score and explain these queries.
protected class | ConstantScoreQuery.ConstantWeight
protected class | DisjunctionMaxQuery.DisjunctionMaxWeight Expert: the Weight for DisjunctionMaxQuery, used to normalize, score and explain these queries.

Fields in org.apache.lucene.search declared as Weight
protected  Weight Scorer.weight

Fields in org.apache.lucene.search with type parameters of type Weight
protected ArrayList<Weight> | DisjunctionMaxQuery.DisjunctionMaxWeight.weights The Weights for our subqueries, in 1-1 correspondence with disjuncts
protected ArrayList<Weight> | BooleanQuery.BooleanWeight.weights

Methods in org.apache.lucene.search that return Weight
 Weight AssertingIndexSearcher.createNormalizedWeight(Query query)
Ensures, that the returned Weight is not normalized again, which may produce wrong scores.
 Weight IndexSearcher.createNormalizedWeight(Query query)
Creates a normalized weight for a top-level Query.
 Weight Searcher.createNormalizedWeight(Query query)
Deprecated. Creates a normalized weight for a top-level Query.
 Weight MultiSearcher.createNormalizedWeight(Query original)
Deprecated. Create weight in multiple index scenario.
protected  Weight Searcher.createWeight(Query query)
Deprecated. never ever use this method in Weight implementations. Subclasses of Searcher should use Searcher.createNormalizedWeight(org.apache.lucene.search.Query), instead.
 Weight PhraseQuery.createWeight(Searcher searcher)
 Weight DisjunctionMaxQuery.createWeight(Searcher searcher)
Create the Weight used to score us
 Weight ConstantScoreQuery.createWeight(Searcher searcher)
 Weight MultiPhraseQuery.createWeight(Searcher searcher)
 Weight TermQuery.createWeight(Searcher searcher)
 Weight BooleanQuery.createWeight(Searcher searcher)
 Weight MatchAllDocsQuery.createWeight(Searcher searcher)
 Weight FilteredQuery.createWeight(Searcher searcher)
Returns a Weight that applies the filter to the enclosed query's Weight.
 Weight Query.createWeight(Searcher searcher)
Expert: Constructs an appropriate Weight implementation for this query.
 Weight Query.weight(Searcher searcher)
Deprecated. never ever use this method in Weight implementations. Subclasses of Query should use Query.createWeight(org.apache.lucene.search.Searcher), instead.

Methods in org.apache.lucene.search with parameters of type Weight
 Explanation RemoteSearchable.explain(Weight weight, int doc)
Deprecated.
 Explanation IndexSearcher.explain(Weight weight, int doc)
Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.
abstract  Explanation Searcher.explain(Weight weight, int doc)
Deprecated.
 Explanation Searchable.explain(Weight weight, int doc)
Deprecated. Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.
 Explanation MultiSearcher.explain(Weight weight, int doc)
Deprecated.
 void RemoteSearchable.search(Weight weight, Filter filter, Collector results)
Deprecated.
 void IndexSearcher.search(Weight weight, Filter filter, Collector collector)
Lower-level search API.
abstract  void Searcher.search(Weight weight, Filter filter, Collector results)
Deprecated.
 void Searchable.search(Weight weight, Filter filter, Collector collector)
Deprecated. Lower-level search API.
 void ParallelMultiSearcher.search(Weight weight, Filter filter, Collector collector)
Deprecated. Lower-level search API.
 void MultiSearcher.search(Weight weight, Filter filter, Collector collector)
Deprecated.
 TopDocs RemoteSearchable.search(Weight weight, Filter filter, int n)
Deprecated.
 TopDocs IndexSearcher.search(Weight weight, Filter filter, int nDocs)
Expert: Low-level search implementation.
abstract  TopDocs Searcher.search(Weight weight, Filter filter, int n)
Deprecated.
 TopDocs Searchable.search(Weight weight, Filter filter, int n)
Deprecated. Expert: Low-level search implementation.
 TopDocs ParallelMultiSearcher.search(Weight weight, Filter filter, int nDocs)
Deprecated. A search implementation which executes each Searchable in its own thread and waits for each search to complete and merge the results back together.
 TopDocs MultiSearcher.search(Weight weight, Filter filter, int nDocs)
Deprecated.
 TopFieldDocs RemoteSearchable.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated.
 TopFieldDocs IndexSearcher.search(Weight weight, Filter filter, int nDocs, Sort sort)
Expert: Low-level search implementation with arbitrary sorting.
abstract  TopFieldDocs Searcher.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated.
 TopFieldDocs Searchable.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated. Expert: Low-level search implementation with arbitrary sorting.
 TopFieldDocs ParallelMultiSearcher.search(Weight weight, Filter filter, int nDocs, Sort sort)
Deprecated. A search implementation allowing sorting which spans a new thread for each Searchable, waits for each search to complete and merges the results back together.
 TopFieldDocs MultiSearcher.search(Weight weight, Filter filter, int n, Sort sort)
Deprecated.
protected  TopFieldDocs IndexSearcher.search(Weight weight, Filter filter, int nDocs, Sort sort, boolean fillFields)
Just like IndexSearcher.search(Weight, Filter, int, Sort), but you choose whether or not the fields in the returned FieldDoc instances should be set by specifying fillFields.
protected  TopDocs IndexSearcher.search(Weight weight, Filter filter, ScoreDoc after, int nDocs)
Expert: Low-level search implementation.

Constructors in org.apache.lucene.search with parameters of type Weight
ConstantScoreQuery.ConstantScorer(Similarity similarity, DocIdSetIterator docIdSetIterator, Weight w)
Scorer(Similarity similarity, Weight weight)
Deprecated. Use Scorer.Scorer(Weight) instead.
Scorer(Weight weight)
Constructs a Scorer

Uses of Weight in org.apache.lucene.search.function

Methods in org.apache.lucene.search.function that return Weight
Weight | ValueSourceQuery.createWeight(Searcher searcher)
Weight | CustomScoreQuery.createWeight(Searcher searcher)

Uses of Weight in org.apache.lucene.search.join

Methods in org.apache.lucene.search.join that return Weight
Weight | ToChildBlockJoinQuery.createWeight(Searcher searcher)
Weight | ToParentBlockJoinQuery.createWeight(Searcher searcher)

Uses of Weight in org.apache.lucene.search.payloads

Subclasses of Weight in org.apache.lucene.search.payloads
class | PayloadNearQuery.PayloadNearSpanWeight
protected class | PayloadTermQuery.PayloadTermWeight

Methods in org.apache.lucene.search.payloads that return Weight
Weight | PayloadNearQuery.createWeight(Searcher searcher)
Weight | PayloadTermQuery.createWeight(Searcher searcher)

Constructors in org.apache.lucene.search.payloads with parameters of type Weight
PayloadNearQuery.PayloadNearSpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms)
PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer(TermSpans spans, Weight weight, Similarity similarity, byte[] norms)

Uses of Weight in org.apache.lucene.search.spans

Subclasses of Weight in org.apache.lucene.search.spans
 class SpanWeight
Expert-only.

Methods in org.apache.lucene.search.spans that return Weight
Weight | SpanQuery.createWeight(Searcher searcher)
Weight | FieldMaskingSpanQuery.createWeight(Searcher searcher)

Constructors in org.apache.lucene.search.spans with parameters of type Weight
SpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.WildcardQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.WildcardQuery

Packages that use WildcardQuery
org.apache.lucene.queryParser.standard.builders Standard Lucene Query Node Builders

Uses of WildcardQuery in org.apache.lucene.queryParser.standard.builders

Methods in org.apache.lucene.queryParser.standard.builders that return WildcardQuery
 WildcardQuery WildcardQueryNodeBuilder.build(QueryNode queryNode)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.WildcardTermEnum

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.WildcardTermEnum

No usage of org.apache.lucene.search.WildcardTermEnum

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ByteFieldSource

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.function
Class ByteFieldSource

java.lang.Object
    extended by  org.apache.lucene.search.function.ValueSource
        extended by  org.apache.lucene.search.function.FieldCacheSource
            extended by  org.apache.lucene.search.function.ByteFieldSource
All Implemented Interfaces:
Serializable
public class ByteFieldSource
extends FieldCacheSource

Expert: obtains single byte field values from the FieldCache using getBytes() and makes those values available as other numeric types, casting as needed.

See Also:
for requirements on the field.

NOTE: with the switch in 2.9 to segment-based searching, if {@link #getValues} is invoked with a composite (multi-segment) reader, this can easily cause double RAM usage for the values in the FieldCache. It's best to switch your application to pass only atomic (single segment) readers to this API.

, Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ByteFieldSource(String field)
Create a cached byte field source with default string-to-byte parser.
ByteFieldSource(String field, FieldCache.ByteParser parser)
Create a cached byte field source with a specific string-to-byte parser.
Method Summary
 boolean cachedFieldSourceEquals(FieldCacheSource o)
Check if equals to another FieldCacheSource, already knowing that cache and field are equal.
 int cachedFieldSourceHashCode()
Return a hash code of a FieldCacheSource, without the hash-codes of the field and the cache (those are taken care of elsewhere).
 String description()
description of field, used in explain()
 DocValues getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
Return cached DocValues for input field and reader.
Methods inherited from class org.apache.lucene.search.function.FieldCacheSource
equals, getValues, hashCode
Methods inherited from class org.apache.lucene.search.function.ValueSource
toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ByteFieldSource

public ByteFieldSource(String field)
Create a cached byte field source with default string-to-byte parser.

ByteFieldSource

public ByteFieldSource(String field,
                       FieldCache.ByteParser parser)
Create a cached byte field source with a specific string-to-byte parser.

Method Detail

description

public String description()
Description copied from class: ValueSource
description of field, used in explain()

Overrides:
description in class FieldCacheSource

getCachedFieldValues

public DocValues getCachedFieldValues(FieldCache cache,
                                      String field,
                                      IndexReader reader)
                               throws IOException
Description copied from class: FieldCacheSource
Return cached DocValues for input field and reader.

Specified by:
getCachedFieldValues in class FieldCacheSource
Parameters:
cache - FieldCache so that values of a field are loaded once per reader (RAM allowing)
field - Field for which values are required.
Throws:
IOException
See Also:
ValueSource

cachedFieldSourceEquals

public boolean cachedFieldSourceEquals(FieldCacheSource o)
Description copied from class: FieldCacheSource
Check if equals to another FieldCacheSource, already knowing that cache and field are equal.

Specified by:
cachedFieldSourceEquals in class FieldCacheSource
See Also:
Object.equals(java.lang.Object)

cachedFieldSourceHashCode

public int cachedFieldSourceHashCode()
Description copied from class: FieldCacheSource
Return a hash code of a FieldCacheSource, without the hash-codes of the field and the cache (those are taken care of elsewhere).

Specified by:
cachedFieldSourceHashCode in class FieldCacheSource
See Also:
Object.hashCode()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CustomScoreProvider

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.function
Class CustomScoreProvider

java.lang.Object
    extended by  org.apache.lucene.search.function.CustomScoreProvider

public class CustomScoreProvider
extends Object

An instance of this subclass should be returned by CustomScoreQuery.getCustomScoreProvider(org.apache.lucene.index.IndexReader), if you want to modify the custom score calculation of a CustomScoreQuery.

Since Lucene 2.9, queries operate on each segment of an index separately, so the protected reader field can be used to resolve doc IDs, as the supplied doc ID is per-segment and without knowledge of the IndexReader you cannot access the document or FieldCache.

Since:
2.9.2
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected  IndexReader reader
Constructor Summary
CustomScoreProvider(IndexReader reader)
Creates a new instance of the provider class for the given IndexReader.
Method Summary
Explanation | customExplain(int doc, Explanation subQueryExpl, Explanation valSrcExpl) Explain the custom score.
Explanation | customExplain(int doc, Explanation subQueryExpl, Explanation[] valSrcExpls) Explain the custom score.
float | customScore(int doc, float subQueryScore, float valSrcScore) Compute a custom score by the subQuery score and the ValueSourceQuery score.
float | customScore(int doc, float subQueryScore, float[] valSrcScores) Compute a custom score by the subQuery score and a number of ValueSourceQuery scores.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

reader

protected final IndexReader reader
Constructor Detail

CustomScoreProvider

public CustomScoreProvider(IndexReader reader)
Creates a new instance of the provider class for the given IndexReader.

Method Detail

customScore

public float customScore(int doc,
                         float subQueryScore,
                         float[] valSrcScores)
                  throws IOException
Compute a custom score by the subQuery score and a number of ValueSourceQuery scores.

Subclasses can override this method to modify the custom score.

If your custom scoring is different than the default herein you should override at least one of the two customScore() methods. If the number of ValueSourceQueries is always < 2 it is sufficient to override the other customScore() method, which is simpler.

The default computation herein is a multiplication of given scores:

     ModifiedScore = valSrcScore * valSrcScores[0] * valSrcScores[1] * ...

Parameters:
doc - id of scored doc.
subQueryScore - score of that doc by the subQuery.
valSrcScores - scores of that doc by the ValueSourceQuery.
Returns:
custom score.
Throws:
IOException

customScore

public float customScore(int doc,
                         float subQueryScore,
                         float valSrcScore)
                  throws IOException
Compute a custom score by the subQuery score and the ValueSourceQuery score.

Subclasses can override this method to modify the custom score.

If your custom scoring is different than the default herein you should override at least one of the two customScore() methods. If the number of ValueSourceQueries is always < 2 it is sufficient to override this customScore() method, which is simpler.

The default computation herein is a multiplication of the two scores:

     ModifiedScore = subQueryScore * valSrcScore

Parameters:
doc - id of scored doc.
subQueryScore - score of that doc by the subQuery.
valSrcScore - score of that doc by the ValueSourceQuery.
Returns:
custom score.
Throws:
IOException

customExplain

public Explanation customExplain(int doc,
                                 Explanation subQueryExpl,
                                 Explanation[] valSrcExpls)
                          throws IOException
Explain the custom score. Whenever overriding customScore(int, float, float[]), this method should also be overridden to provide the correct explanation for the part of the custom scoring.

Parameters:
doc - doc being explained.
subQueryExpl - explanation for the sub-query part.
valSrcExpls - explanation for the value source part.
Returns:
an explanation for the custom score
Throws:
IOException

customExplain

public Explanation customExplain(int doc,
                                 Explanation subQueryExpl,
                                 Explanation valSrcExpl)
                          throws IOException
Explain the custom score. Whenever overriding customScore(int, float, float), this method should also be overridden to provide the correct explanation for the part of the custom scoring.

Parameters:
doc - doc being explained.
subQueryExpl - explanation for the sub-query part.
valSrcExpl - explanation for the value source part.
Returns:
an explanation for the custom score
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CustomScoreQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.function
Class CustomScoreQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.function.CustomScoreQuery
All Implemented Interfaces:
Serializable, Cloneable
public class CustomScoreQuery
extends Query

Query that sets document score as a programmatic function of several (sub) scores:

  1. the score of its subQuery (any query)
  2. (optional) the score of its ValueSourceQuery (or queries). For most simple/convenient use cases this query is likely to be a FieldScoreQuery
Subclasses can modify the computation by overriding getCustomScoreProvider(org.apache.lucene.index.IndexReader).

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
CustomScoreQuery(Query subQuery)
Create a CustomScoreQuery over input subQuery.
CustomScoreQuery(Query subQuery, ValueSourceQuery... valSrcQueries)
Create a CustomScoreQuery over input subQuery and a ValueSourceQuery.
CustomScoreQuery(Query subQuery, ValueSourceQuery valSrcQuery)
Create a CustomScoreQuery over input subQuery and a ValueSourceQuery.
Method Summary
Object | clone() Returns a clone of this query.
Weight | createWeight(Searcher searcher) Expert: Constructs an appropriate Weight implementation for this query.
boolean | equals(Object o) Returns true if o is equal to this.
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
protected CustomScoreProvider | getCustomScoreProvider(IndexReader reader) Returns a CustomScoreProvider that calculates the custom scores for the given IndexReader.
int | hashCode() Returns a hash code value for this object.
boolean | isStrict() Checks if this is strict custom scoring.
String | name() A short name of this query, used in toString(String).
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
void | setStrict(boolean strict) Set the strict mode of this query.
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.Query
combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CustomScoreQuery

public CustomScoreQuery(Query subQuery)
Create a CustomScoreQuery over input subQuery.

Parameters:
subQuery - the sub query whose scored is being customized. Must not be null.

CustomScoreQuery

public CustomScoreQuery(Query subQuery,
                        ValueSourceQuery valSrcQuery)
Create a CustomScoreQuery over input subQuery and a ValueSourceQuery.

Parameters:
subQuery - the sub query whose score is being customized. Must not be null.
valSrcQuery - a value source query whose scores are used in the custom score computation. For most simple/convenient use case this would be a FieldScoreQuery. This parameter is optional - it can be null.

CustomScoreQuery

public CustomScoreQuery(Query subQuery,
                        ValueSourceQuery... valSrcQueries)
Create a CustomScoreQuery over input subQuery and a ValueSourceQuery.

Parameters:
subQuery - the sub query whose score is being customized. Must not be null.
valSrcQueries - value source queries whose scores are used in the custom score computation. For most simple/convenient use case these would be FieldScoreQueries. This parameter is optional - it can be null or even an empty array.
Method Detail

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

clone

public Object clone()
Description copied from class: Query
Returns a clone of this query.

Overrides:
clone in class Query

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

equals

public boolean equals(Object o)
Returns true if o is equal to this.

Overrides:
equals in class Query

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Query

getCustomScoreProvider

protected CustomScoreProvider getCustomScoreProvider(IndexReader reader)
                                              throws IOException
Returns a CustomScoreProvider that calculates the custom scores for the given IndexReader. The default implementation returns a default implementation as specified in the docs of CustomScoreProvider.

Throws:
IOException
Since:
2.9.2

createWeight

public Weight createWeight(Searcher searcher)
                    throws IOException
Description copied from class: Query
Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Overrides:
createWeight in class Query
Throws:
IOException

isStrict

public boolean isStrict()
Checks if this is strict custom scoring. In strict custom scoring, the ValueSource part does not participate in weight normalization. This may be useful when one wants full control over how scores are modified, and does not care about normalizing by the ValueSource part. One particular case where this is useful if for testing this query.

Note: only has effect when the ValueSource part is not null.

setStrict

public void setStrict(boolean strict)
Set the strict mode of this query.

Parameters:
strict - The strict mode to set.
See Also:
isStrict()

name

public String name()
A short name of this query, used in toString(String).

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DocValues

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.function
Class DocValues

java.lang.Object
    extended by  org.apache.lucene.search.function.DocValues

public abstract class DocValues
extends Object

Expert: represents field values as different types. Normally created via a ValueSuorce for a particular field and reader.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
DocValues()
Method Summary
double | doubleVal(int doc) Return doc value as a double.
Explanation | explain(int doc) Explain the scoring value for the input doc.
abstract float | floatVal(int doc) Return doc value as a float.
float | getAverageValue() Returns the average of all values or Float.NaN if this DocValues instance does not contain any value.
float | getMaxValue() Returns the maximum of all values or Float.NaN if this DocValues instance does not contain any value.
float | getMinValue() Returns the minimum of all values or Float.NaN if this DocValues instance does not contain any value.
int | intVal(int doc) Return doc value as an int.
long | longVal(int doc) Return doc value as a long.
String | strVal(int doc) Return doc value as a string.
abstract String | toString(int doc) Return a string representation of a doc value, as required for Explanations.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DocValues

public DocValues()
Method Detail

floatVal

public abstract float floatVal(int doc)
Return doc value as a float.

Mandatory: every DocValues implementation must implement at least this method.

Parameters:
doc - document whose float value is requested.

intVal

public int intVal(int doc)
Return doc value as an int.

Optional: DocValues implementation can (but don't have to) override this method.

Parameters:
doc - document whose int value is requested.

longVal

public long longVal(int doc)
Return doc value as a long.

Optional: DocValues implementation can (but don't have to) override this method.

Parameters:
doc - document whose long value is requested.

doubleVal

public double doubleVal(int doc)
Return doc value as a double.

Optional: DocValues implementation can (but don't have to) override this method.

Parameters:
doc - document whose double value is requested.

strVal

public String strVal(int doc)
Return doc value as a string.

Optional: DocValues implementation can (but don't have to) override this method.

Parameters:
doc - document whose string value is requested.

toString

public abstract String toString(int doc)
Return a string representation of a doc value, as required for Explanations.

explain

public Explanation explain(int doc)
Explain the scoring value for the input doc.

getMinValue

public float getMinValue()
Returns the minimum of all values or Float.NaN if this DocValues instance does not contain any value.

This operation is optional

Returns:
the minimum of all values or Float.NaN if this DocValues instance does not contain any value.

getMaxValue

public float getMaxValue()
Returns the maximum of all values or Float.NaN if this DocValues instance does not contain any value.

This operation is optional

Returns:
the maximum of all values or Float.NaN if this DocValues instance does not contain any value.

getAverageValue

public float getAverageValue()
Returns the average of all values or Float.NaN if this DocValues instance does not contain any value. *

This operation is optional

Returns:
the average of all values or Float.NaN if this DocValues instance does not contain any value
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCacheSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.function
Class FieldCacheSource

java.lang.Object
    extended by  org.apache.lucene.search.function.ValueSource
        extended by  org.apache.lucene.search.function.FieldCacheSource
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ByteFieldSource, FloatFieldSource, IntFieldSource, ShortFieldSource
public abstract class FieldCacheSource
extends ValueSource

Expert: A base class for ValueSource implementations that retrieve values for a single field from the FieldCache.

Fields used herein must be indexed (doesn't matter if these fields are stored or not).

It is assumed that each such indexed field is untokenized, or at least has a single token in a document. For documents with multiple tokens of the same field, behavior is undefined (It is likely that current code would use the value of one of these tokens, but this is not guaranteed).

Document with no tokens in this field are assigned the Zero value.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

NOTE: with the switch in 2.9 to segment-based searching, if getValues(org.apache.lucene.index.IndexReader) is invoked with a composite (multi-segment) reader, this can easily cause double RAM usage for the values in the FieldCache. It's best to switch your application to pass only atomic (single segment) readers to this API.

Constructor Summary
FieldCacheSource(String field)
Create a cached field source for the input field.
Method Summary
abstract  boolean cachedFieldSourceEquals(FieldCacheSource other)
Check if equals to another FieldCacheSource, already knowing that cache and field are equal.
abstract  int cachedFieldSourceHashCode()
Return a hash code of a FieldCacheSource, without the hash-codes of the field and the cache (those are taken care of elsewhere).
 String description()
description of field, used in explain()
 boolean equals(Object o)
Needed for possible caching of query results - used by ValueSourceQuery.equals(Object).
abstract  DocValues getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
Return cached DocValues for input field and reader.
 DocValues getValues(IndexReader reader)
Return the DocValues used by the function query.
 int hashCode()
Needed for possible caching of query results - used by ValueSourceQuery.hashCode().
Methods inherited from class org.apache.lucene.search.function.ValueSource
toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FieldCacheSource

public FieldCacheSource(String field)
Create a cached field source for the input field.

Method Detail

getValues

public final DocValues getValues(IndexReader reader)
                          throws IOException
Description copied from class: ValueSource
Return the DocValues used by the function query.

Specified by:
getValues in class ValueSource
Parameters:
reader - the IndexReader used to read these values. If any caching is involved, that caching would also be IndexReader based.
Throws:
IOException - for any error.

description

public String description()
Description copied from class: ValueSource
description of field, used in explain()

Specified by:
description in class ValueSource

getCachedFieldValues

public abstract DocValues getCachedFieldValues(FieldCache cache,
                                               String field,
                                               IndexReader reader)
                                        throws IOException
Return cached DocValues for input field and reader.

Parameters:
cache - FieldCache so that values of a field are loaded once per reader (RAM allowing)
field - Field for which values are required.
Throws:
IOException
See Also:
ValueSource

equals

public final boolean equals(Object o)
Description copied from class: ValueSource
Needed for possible caching of query results - used by ValueSourceQuery.equals(Object).

Specified by:
equals in class ValueSource
See Also:
Object.equals(Object)

hashCode

public final int hashCode()
Description copied from class: ValueSource
Needed for possible caching of query results - used by ValueSourceQuery.hashCode().

Specified by:
hashCode in class ValueSource
See Also:
Object.hashCode()

cachedFieldSourceEquals

public abstract boolean cachedFieldSourceEquals(FieldCacheSource other)
Check if equals to another FieldCacheSource, already knowing that cache and field are equal.

See Also:
Object.equals(java.lang.Object)

cachedFieldSourceHashCode

public abstract int cachedFieldSourceHashCode()
Return a hash code of a FieldCacheSource, without the hash-codes of the field and the cache (those are taken care of elsewhere).

See Also:
Object.hashCode()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldScoreQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.function
Class FieldScoreQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.function.ValueSourceQuery
            extended by  org.apache.lucene.search.function.FieldScoreQuery
All Implemented Interfaces:
Serializable, Cloneable
public class FieldScoreQuery
extends ValueSourceQuery

A query that scores each document as the value of the numeric input field.

The query matches all documents, and scores each document according to the numeric value of that field.

It is assumed, and expected, that:

  • The field used here is indexed, and has exactly one token in every scored document.
  • Best if this field is un_tokenized.
  • That token is parseable to the selected type.

Combining this query in a FunctionQuery allows much freedom in affecting document scores. Note, that with this freedom comes responsibility: it is more than likely that the default Lucene scoring is superior in quality to scoring modified as explained here. However, in some cases, and certainly for research experiments, this capability may turn useful.

When constructing this query, select the appropriate type. That type should match the data stored in the field. So in fact the "right" type should be selected before indexing. Type selection has effect on the RAM usage:

  • FieldScoreQuery.Type.BYTE consumes 1 * maxDocs bytes.
  • FieldScoreQuery.Type.SHORT consumes 2 * maxDocs bytes.
  • FieldScoreQuery.Type.INT consumes 4 * maxDocs bytes.
  • FieldScoreQuery.Type.FLOAT consumes 8 * maxDocs bytes.

Caching: Values for the numeric field are loaded once and cached in memory for further use with the same IndexReader. To take advantage of this, it is extremely important to reuse index-readers or index-searchers, otherwise, for instance if for each query a new index reader is opened, large penalties would be paid for loading the field values into memory over and over again!

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class FieldScoreQuery.Type
Type of score field, indicating how field values are interpreted/parsed.
Constructor Summary
FieldScoreQuery(String field, FieldScoreQuery.Type type)
Create a FieldScoreQuery - a query that scores each document as the value of the numeric input field.
Method Summary
Methods inherited from class org.apache.lucene.search.function.ValueSourceQuery
createWeight, equals, extractTerms, hashCode, rewrite, toString
Methods inherited from class org.apache.lucene.search.Query
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FieldScoreQuery

public FieldScoreQuery(String field,
                       FieldScoreQuery.Type type)
Create a FieldScoreQuery - a query that scores each document as the value of the numeric input field.

The type param tells how to parse the field string values into a numeric score value.

Parameters:
field - the numeric field to be used.
type - the type of the field: either FieldScoreQuery.Type.BYTE, FieldScoreQuery.Type.SHORT, FieldScoreQuery.Type.INT, or FieldScoreQuery.Type.FLOAT.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldScoreQuery.Type

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.function
Class FieldScoreQuery.Type

java.lang.Object
    extended by  org.apache.lucene.search.function.FieldScoreQuery.Type
Enclosing class:
FieldScoreQuery
public static class FieldScoreQuery.Type
extends Object

Type of score field, indicating how field values are interpreted/parsed.

The type selected at search search time should match the data stored in the field. Different types have different RAM requirements:

  • BYTE consumes 1 * maxDocs bytes.
  • SHORT consumes 2 * maxDocs bytes.
  • INT consumes 4 * maxDocs bytes.
  • FLOAT consumes 8 * maxDocs bytes.

Field Summary
static FieldScoreQuery.Type | BYTE field values are interpreted as numeric byte values.
static FieldScoreQuery.Type | FLOAT field values are interpreted as numeric float values.
static FieldScoreQuery.Type | INT field values are interpreted as numeric int values.
static FieldScoreQuery.Type | SHORT field values are interpreted as numeric short values.
Method Summary
 String toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

BYTE

public static final FieldScoreQuery.Type BYTE
field values are interpreted as numeric byte values.

SHORT

public static final FieldScoreQuery.Type SHORT
field values are interpreted as numeric short values.

INT

public static final FieldScoreQuery.Type INT
field values are interpreted as numeric int values.

FLOAT

public static final FieldScoreQuery.Type FLOAT
field values are interpreted as numeric float values.

Method Detail

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FloatFieldSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.function
Class FloatFieldSource

java.lang.Object
    extended by  org.apache.lucene.search.function.ValueSource
        extended by  org.apache.lucene.search.function.FieldCacheSource
            extended by  org.apache.lucene.search.function.FloatFieldSource
All Implemented Interfaces:
Serializable
public class FloatFieldSource
extends FieldCacheSource

Expert: obtains float field values from the FieldCache using getFloats() and makes those values available as other numeric types, casting as needed.

See Also:
for requirements on the field.

NOTE: with the switch in 2.9 to segment-based searching, if {@link #getValues} is invoked with a composite (multi-segment) reader, this can easily cause double RAM usage for the values in the FieldCache. It's best to switch your application to pass only atomic (single segment) readers to this API.

, Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
FloatFieldSource(String field)
Create a cached float field source with default string-to-float parser.
FloatFieldSource(String field, FieldCache.FloatParser parser)
Create a cached float field source with a specific string-to-float parser.
Method Summary
 boolean cachedFieldSourceEquals(FieldCacheSource o)
Check if equals to another FieldCacheSource, already knowing that cache and field are equal.
 int cachedFieldSourceHashCode()
Return a hash code of a FieldCacheSource, without the hash-codes of the field and the cache (those are taken care of elsewhere).
 String description()
description of field, used in explain()
 DocValues getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
Return cached DocValues for input field and reader.
Methods inherited from class org.apache.lucene.search.function.FieldCacheSource
equals, getValues, hashCode
Methods inherited from class org.apache.lucene.search.function.ValueSource
toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FloatFieldSource

public FloatFieldSource(String field)
Create a cached float field source with default string-to-float parser.

FloatFieldSource

public FloatFieldSource(String field,
                        FieldCache.FloatParser parser)
Create a cached float field source with a specific string-to-float parser.

Method Detail

description

public String description()
Description copied from class: ValueSource
description of field, used in explain()

Overrides:
description in class FieldCacheSource

getCachedFieldValues

public DocValues getCachedFieldValues(FieldCache cache,
                                      String field,
                                      IndexReader reader)
                               throws IOException
Description copied from class: FieldCacheSource
Return cached DocValues for input field and reader.

Specified by:
getCachedFieldValues in class FieldCacheSource
Parameters:
cache - FieldCache so that values of a field are loaded once per reader (RAM allowing)
field - Field for which values are required.
Throws:
IOException
See Also:
ValueSource

cachedFieldSourceEquals

public boolean cachedFieldSourceEquals(FieldCacheSource o)
Description copied from class: FieldCacheSource
Check if equals to another FieldCacheSource, already knowing that cache and field are equal.

Specified by:
cachedFieldSourceEquals in class FieldCacheSource
See Also:
Object.equals(java.lang.Object)

cachedFieldSourceHashCode

public int cachedFieldSourceHashCode()
Description copied from class: FieldCacheSource
Return a hash code of a FieldCacheSource, without the hash-codes of the field and the cache (those are taken care of elsewhere).

Specified by:
cachedFieldSourceHashCode in class FieldCacheSource
See Also:
Object.hashCode()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntFieldSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.function
Class IntFieldSource

java.lang.Object
    extended by  org.apache.lucene.search.function.ValueSource
        extended by  org.apache.lucene.search.function.FieldCacheSource
            extended by  org.apache.lucene.search.function.IntFieldSource
All Implemented Interfaces:
Serializable
public class IntFieldSource
extends FieldCacheSource

Expert: obtains int field values from the FieldCache using getInts() and makes those values available as other numeric types, casting as needed.

See Also:
for requirements on the field.

NOTE: with the switch in 2.9 to segment-based searching, if {@link #getValues} is invoked with a composite (multi-segment) reader, this can easily cause double RAM usage for the values in the FieldCache. It's best to switch your application to pass only atomic (single segment) readers to this API.

, Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
IntFieldSource(String field)
Create a cached int field source with default string-to-int parser.
IntFieldSource(String field, FieldCache.IntParser parser)
Create a cached int field source with a specific string-to-int parser.
Method Summary
 boolean cachedFieldSourceEquals(FieldCacheSource o)
Check if equals to another FieldCacheSource, already knowing that cache and field are equal.
 int cachedFieldSourceHashCode()
Return a hash code of a FieldCacheSource, without the hash-codes of the field and the cache (those are taken care of elsewhere).
 String description()
description of field, used in explain()
 DocValues getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
Return cached DocValues for input field and reader.
Methods inherited from class org.apache.lucene.search.function.FieldCacheSource
equals, getValues, hashCode
Methods inherited from class org.apache.lucene.search.function.ValueSource
toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

IntFieldSource

public IntFieldSource(String field)
Create a cached int field source with default string-to-int parser.

IntFieldSource

public IntFieldSource(String field,
                      FieldCache.IntParser parser)
Create a cached int field source with a specific string-to-int parser.

Method Detail

description

public String description()
Description copied from class: ValueSource
description of field, used in explain()

Overrides:
description in class FieldCacheSource

getCachedFieldValues

public DocValues getCachedFieldValues(FieldCache cache,
                                      String field,
                                      IndexReader reader)
                               throws IOException
Description copied from class: FieldCacheSource
Return cached DocValues for input field and reader.

Specified by:
getCachedFieldValues in class FieldCacheSource
Parameters:
cache - FieldCache so that values of a field are loaded once per reader (RAM allowing)
field - Field for which values are required.
Throws:
IOException
See Also:
ValueSource

cachedFieldSourceEquals

public boolean cachedFieldSourceEquals(FieldCacheSource o)
Description copied from class: FieldCacheSource
Check if equals to another FieldCacheSource, already knowing that cache and field are equal.

Specified by:
cachedFieldSourceEquals in class FieldCacheSource
See Also:
Object.equals(java.lang.Object)

cachedFieldSourceHashCode

public int cachedFieldSourceHashCode()
Description copied from class: FieldCacheSource
Return a hash code of a FieldCacheSource, without the hash-codes of the field and the cache (those are taken care of elsewhere).

Specified by:
cachedFieldSourceHashCode in class FieldCacheSource
See Also:
Object.hashCode()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OrdFieldSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.function
Class OrdFieldSource

java.lang.Object
    extended by  org.apache.lucene.search.function.ValueSource
        extended by  org.apache.lucene.search.function.OrdFieldSource
All Implemented Interfaces:
Serializable
public class OrdFieldSource
extends ValueSource

Expert: obtains the ordinal of the field value from the default Lucene Fieldcache using getStringIndex().

The native lucene index order is used to assign an ordinal value for each field value.

Example:
If there were only three field values: "apple","banana","pear"
then ord("apple")=1, ord("banana")=2, ord("pear")=3

WARNING: ord() depends on the position in an index and can thus change when other documents are inserted or deleted, or if a MultiSearcher is used.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

NOTE: with the switch in 2.9 to segment-based searching, if getValues(org.apache.lucene.index.IndexReader) is invoked with a composite (multi-segment) reader, this can easily cause double RAM usage for the values in the FieldCache. It's best to switch your application to pass only atomic (single segment) readers to this API.

Field Summary
protected  String field
Constructor Summary
OrdFieldSource(String field)
Constructor for a certain field.
Method Summary
 String description()
description of field, used in explain()
 boolean equals(Object o)
Needed for possible caching of query results - used by ValueSourceQuery.equals(Object).
 DocValues getValues(IndexReader reader)
Return the DocValues used by the function query.
 int hashCode()
Needed for possible caching of query results - used by ValueSourceQuery.hashCode().
Methods inherited from class org.apache.lucene.search.function.ValueSource
toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

field

protected String field
Constructor Detail

OrdFieldSource

public OrdFieldSource(String field)
Constructor for a certain field.

Parameters:
field - field whose values order is used.
Method Detail

description

public String description()
Description copied from class: ValueSource
description of field, used in explain()

Specified by:
description in class ValueSource

getValues

public DocValues getValues(IndexReader reader)
                    throws IOException
Description copied from class: ValueSource
Return the DocValues used by the function query.

Specified by:
getValues in class ValueSource
Parameters:
reader - the IndexReader used to read these values. If any caching is involved, that caching would also be IndexReader based.
Throws:
IOException - for any error.

equals

public boolean equals(Object o)
Description copied from class: ValueSource
Needed for possible caching of query results - used by ValueSourceQuery.equals(Object).

Specified by:
equals in class ValueSource
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Description copied from class: ValueSource
Needed for possible caching of query results - used by ValueSourceQuery.hashCode().

Specified by:
hashCode in class ValueSource
See Also:
Object.hashCode()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.search.function
Classes
ByteFieldSource
CustomScoreProvider
CustomScoreQuery
DocValues
FieldCacheSource
FieldScoreQuery
FieldScoreQuery.Type
FloatFieldSource
IntFieldSource
OrdFieldSource
ReverseOrdFieldSource
ShortFieldSource
ValueSource
ValueSourceQuery


org.apache.lucene.search.function

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.search.function

Programmatic control over documents scores.

See:
Description

Class Summary
ByteFieldSource | Expert: obtains single byte field values from the FieldCache using getBytes() and makes those values available as other numeric types, casting as needed.
CustomScoreProvider | An instance of this subclass should be returned by CustomScoreQuery.getCustomScoreProvider(org.apache.lucene.index.IndexReader), if you want to modify the custom score calculation of a CustomScoreQuery.
CustomScoreQuery | Query that sets document score as a programmatic function of several (sub) scores: the score of its subQuery (any query) (optional) the score of its ValueSourceQuery (or queries).
DocValues | Expert: represents field values as different types.
FieldCacheSource | Expert: A base class for ValueSource implementations that retrieve values for a single field from the FieldCache.
FieldScoreQuery | A query that scores each document as the value of the numeric input field.
FieldScoreQuery.Type | Type of score field, indicating how field values are interpreted/parsed.
FloatFieldSource | Expert: obtains float field values from the FieldCache using getFloats() and makes those values available as other numeric types, casting as needed.
IntFieldSource | Expert: obtains int field values from the FieldCache using getInts() and makes those values available as other numeric types, casting as needed.
OrdFieldSource | Expert: obtains the ordinal of the field value from the default Lucene Fieldcache using getStringIndex().
ReverseOrdFieldSource | Expert: obtains the ordinal of the field value from the default Lucene FieldCache using getStringIndex() and reverses the order.
ShortFieldSource | Expert: obtains short field values from the FieldCache using getShorts() and makes those values available as other numeric types, casting as needed.
ValueSource | Expert: source of values for basic function queries.
ValueSourceQuery | Expert: A Query that sets the scores of document to the values obtained from a ValueSource.

Package org.apache.lucene.search.function Description

Programmatic control over documents scores.
The function package provides tight control over documents scores.

WARNING: This API is experimental and might change in incompatible ways in the next release.
Two types of queries are available in this package:
  1. Custom Score queries - allowing to set the score of a matching document as a mathematical expression over scores of that document by contained (sub) queries.
  2. Field score queries - allowing to base the score of a document on numeric values of indexed fields.
Some possible uses of these queries:
  1. Normalizing the document scores by values indexed in a special field - for instance, experimenting with a different doc length normalization.
  2. Introducing some static scoring element, to the score of a document, - for instance using some topological attribute of the links to/from a document.
  3. Computing the score of a matching document as an arbitrary odd function of its score by a certain query.
Performance and Quality Considerations:
  1. When scoring by values of indexed fields, these values are loaded into memory. Unlike the regular scoring, where the required information is read from disk as necessary, here field values are loaded once and cached by Lucene in memory for further use, anticipating reuse by further queries. While all this is carefully cached with performance in mind, it is recommended to use these features only when the default Lucene scoring does not match your "special" application needs.
  2. Use only with carefully selected fields, because in most cases, search quality with regular Lucene scoring would outperform that of scoring by field values.
  3. Values of fields used for scoring should match. Do not apply on a field containing arbitrary (long) text. Do not mix values in the same field if that field is used for scoring.
  4. Smaller (shorter) field tokens means less RAM (something always desired). When using FieldScoreQuery, select the shortest FieldScoreQuery.Type that is sufficient for the used field values.
  5. Reusing IndexReaders/IndexSearchers is essential, because the caching of field tokens is based on an IndexReader. Whenever a new IndexReader is used, values currently in the cache cannot be used and new values must be loaded from disk. So replace/refresh readers/searchers in a controlled manner.
History and Credits:
  • A large part of the code of this package was originated from Yonik's FunctionQuery code that was imported from Solr (see LUCENE-446).
  • The idea behind CustomScoreQurey is borrowed from the "Easily create queries that transform sub-query scores arbitrarily" contribution by Mike Klaas (see LUCENE-850) though the implementation and API here are different.
Code sample:

Note: code snippets here should work, but they were never really compiled... so, tests sources under TestCustomScoreQuery, TestFieldScoreQuery and TestOrdValues may also be useful.

  1. Using field (byte) values to as scores:

    Indexing:

          f = new Field("score", "7", Field.Store.NO, Field.Index.UN_TOKENIZED);
      f.setOmitNorms(true);
      d1.add(f);

    Search:

          Query q = new FieldScoreQuery("score", FieldScoreQuery.Type.BYTE);
    Document d1 above would get a score of 7.

  2. Manipulating scores

    Dividing the original score of each document by a square root of its docid (just to demonstrate what it takes to manipulate scores this way)

          Query q = queryParser.parse("my query text");
      CustomScoreQuery customQ = new CustomScoreQuery(q) {
        public float customScore(int doc, float subQueryScore, float valSrcScore) {
          return subQueryScore / Math.sqrt(docid);
        }
      };

    For more informative debug info on the custom query, also override the name() method:

          CustomScoreQuery customQ = new CustomScoreQuery(q) {
        public float customScore(int doc, float subQueryScore, float valSrcScore) {
          return subQueryScore / Math.sqrt(docid);
        }
        public String name() {
          return "1/sqrt(docid)";
        }
      };

    Taking the square root of the original score and multiplying it by a "short field driven score", ie, the short value that was indexed for the scored doc in a certain field:

          Query q = queryParser.parse("my query text");
      FieldScoreQuery qf = new FieldScoreQuery("shortScore", FieldScoreQuery.Type.SHORT);
      CustomScoreQuery customQ = new CustomScoreQuery(q,qf) {
        public float customScore(int doc, float subQueryScore, float valSrcScore) {
          return Math.sqrt(subQueryScore) * valSrcScore;
        }
        public String name() {
          return "shortVal*sqrt(score)";
        }
      };


org.apache.lucene.search.function Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.search.function

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.search.function.CustomScoreProvider
    • org.apache.lucene.search.function.DocValues
    • org.apache.lucene.search.function.FieldScoreQuery.Type
    • org.apache.lucene.search.Query (implements java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.search.function.CustomScoreQuery
      • org.apache.lucene.search.function.ValueSourceQuery
        • org.apache.lucene.search.function.FieldScoreQuery
    • org.apache.lucene.search.function.ValueSource (implements java.io.Serializable)
      • org.apache.lucene.search.function.FieldCacheSource
        • org.apache.lucene.search.function.ByteFieldSource
        • org.apache.lucene.search.function.FloatFieldSource
        • org.apache.lucene.search.function.IntFieldSource
        • org.apache.lucene.search.function.ShortFieldSource
      • org.apache.lucene.search.function.OrdFieldSource
      • org.apache.lucene.search.function.ReverseOrdFieldSource


Uses of Package org.apache.lucene.search.function

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.search.function

Packages that use org.apache.lucene.search.function
org.apache.lucene.search.function
Programmatic control over documents scores.

Classes in org.apache.lucene.search.function used by org.apache.lucene.search.function
CustomScoreProvider
An instance of this subclass should be returned by CustomScoreQuery.getCustomScoreProvider(org.apache.lucene.index.IndexReader), if you want to modify the custom score calculation of a CustomScoreQuery.
DocValues
Expert: represents field values as different types.
FieldCacheSource
Expert: A base class for ValueSource implementations that retrieve values for a single field from the FieldCache.
FieldScoreQuery.Type
Type of score field, indicating how field values are interpreted/parsed.
ValueSource
Expert: source of values for basic function queries.
ValueSourceQuery
Expert: A Query that sets the scores of document to the values obtained from a ValueSource.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ReverseOrdFieldSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.function
Class ReverseOrdFieldSource

java.lang.Object
    extended by  org.apache.lucene.search.function.ValueSource
        extended by  org.apache.lucene.search.function.ReverseOrdFieldSource
All Implemented Interfaces:
Serializable
public class ReverseOrdFieldSource
extends ValueSource

Expert: obtains the ordinal of the field value from the default Lucene FieldCache using getStringIndex() and reverses the order.

The native lucene index order is used to assign an ordinal value for each field value.

Field values (terms) are lexicographically ordered by unicode value, and numbered starting at 1.
Example of reverse ordinal (rord):
If there were only three field values: "apple","banana","pear"
then rord("apple")=3, rord("banana")=2, ord("pear")=1

WARNING: rord() depends on the position in an index and can thus change when other documents are inserted or deleted, or if a MultiSearcher is used.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

NOTE: with the switch in 2.9 to segment-based searching, if getValues(org.apache.lucene.index.IndexReader) is invoked with a composite (multi-segment) reader, this can easily cause double RAM usage for the values in the FieldCache. It's best to switch your application to pass only atomic (single segment) readers to this API.

Field Summary
 String field
Constructor Summary
ReverseOrdFieldSource(String field)
Contructor for a certain field.
Method Summary
 String description()
description of field, used in explain()
 boolean equals(Object o)
Needed for possible caching of query results - used by ValueSourceQuery.equals(Object).
 DocValues getValues(IndexReader reader)
Return the DocValues used by the function query.
 int hashCode()
Needed for possible caching of query results - used by ValueSourceQuery.hashCode().
Methods inherited from class org.apache.lucene.search.function.ValueSource
toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

field

public String field
Constructor Detail

ReverseOrdFieldSource

public ReverseOrdFieldSource(String field)
Contructor for a certain field.

Parameters:
field - field whose values reverse order is used.
Method Detail

description

public String description()
Description copied from class: ValueSource
description of field, used in explain()

Specified by:
description in class ValueSource

getValues

public DocValues getValues(IndexReader reader)
                    throws IOException
Description copied from class: ValueSource
Return the DocValues used by the function query.

Specified by:
getValues in class ValueSource
Parameters:
reader - the IndexReader used to read these values. If any caching is involved, that caching would also be IndexReader based.
Throws:
IOException - for any error.

equals

public boolean equals(Object o)
Description copied from class: ValueSource
Needed for possible caching of query results - used by ValueSourceQuery.equals(Object).

Specified by:
equals in class ValueSource
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Description copied from class: ValueSource
Needed for possible caching of query results - used by ValueSourceQuery.hashCode().

Specified by:
hashCode in class ValueSource
See Also:
Object.hashCode()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ShortFieldSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.function
Class ShortFieldSource

java.lang.Object
    extended by  org.apache.lucene.search.function.ValueSource
        extended by  org.apache.lucene.search.function.FieldCacheSource
            extended by  org.apache.lucene.search.function.ShortFieldSource
All Implemented Interfaces:
Serializable
public class ShortFieldSource
extends FieldCacheSource

Expert: obtains short field values from the FieldCache using getShorts() and makes those values available as other numeric types, casting as needed.

See Also:
for requirements on the field.

NOTE: with the switch in 2.9 to segment-based searching, if {@link #getValues} is invoked with a composite (multi-segment) reader, this can easily cause double RAM usage for the values in the FieldCache. It's best to switch your application to pass only atomic (single segment) readers to this API.

, Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ShortFieldSource(String field)
Create a cached short field source with default string-to-short parser.
ShortFieldSource(String field, FieldCache.ShortParser parser)
Create a cached short field source with a specific string-to-short parser.
Method Summary
 boolean cachedFieldSourceEquals(FieldCacheSource o)
Check if equals to another FieldCacheSource, already knowing that cache and field are equal.
 int cachedFieldSourceHashCode()
Return a hash code of a FieldCacheSource, without the hash-codes of the field and the cache (those are taken care of elsewhere).
 String description()
description of field, used in explain()
 DocValues getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
Return cached DocValues for input field and reader.
Methods inherited from class org.apache.lucene.search.function.FieldCacheSource
equals, getValues, hashCode
Methods inherited from class org.apache.lucene.search.function.ValueSource
toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ShortFieldSource

public ShortFieldSource(String field)
Create a cached short field source with default string-to-short parser.

ShortFieldSource

public ShortFieldSource(String field,
                        FieldCache.ShortParser parser)
Create a cached short field source with a specific string-to-short parser.

Method Detail

description

public String description()
Description copied from class: ValueSource
description of field, used in explain()

Overrides:
description in class FieldCacheSource

getCachedFieldValues

public DocValues getCachedFieldValues(FieldCache cache,
                                      String field,
                                      IndexReader reader)
                               throws IOException
Description copied from class: FieldCacheSource
Return cached DocValues for input field and reader.

Specified by:
getCachedFieldValues in class FieldCacheSource
Parameters:
cache - FieldCache so that values of a field are loaded once per reader (RAM allowing)
field - Field for which values are required.
Throws:
IOException
See Also:
ValueSource

cachedFieldSourceEquals

public boolean cachedFieldSourceEquals(FieldCacheSource o)
Description copied from class: FieldCacheSource
Check if equals to another FieldCacheSource, already knowing that cache and field are equal.

Specified by:
cachedFieldSourceEquals in class FieldCacheSource
See Also:
Object.equals(java.lang.Object)

cachedFieldSourceHashCode

public int cachedFieldSourceHashCode()
Description copied from class: FieldCacheSource
Return a hash code of a FieldCacheSource, without the hash-codes of the field and the cache (those are taken care of elsewhere).

Specified by:
cachedFieldSourceHashCode in class FieldCacheSource
See Also:
Object.hashCode()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ValueSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.function
Class ValueSource

java.lang.Object
    extended by  org.apache.lucene.search.function.ValueSource
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FieldCacheSource, OrdFieldSource, ReverseOrdFieldSource
public abstract class ValueSource
extends Object
implements Serializable

Expert: source of values for basic function queries.

At its default/simplest form, values - one per doc - are used as the score of that doc.

Values are instantiated as DocValues for a particular reader.

ValueSource implementations differ in RAM requirements: it would always be a factor of the number of documents, but for each document the number of bytes can be 1, 2, 4, or 8.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ValueSource()
Method Summary
abstract  String description()
description of field, used in explain()
abstract  boolean equals(Object o)
Needed for possible caching of query results - used by ValueSourceQuery.equals(Object).
abstract  DocValues getValues(IndexReader reader)
Return the DocValues used by the function query.
abstract  int hashCode()
Needed for possible caching of query results - used by ValueSourceQuery.hashCode().
 String toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ValueSource

public ValueSource()
Method Detail

getValues

public abstract DocValues getValues(IndexReader reader)
                             throws IOException
Return the DocValues used by the function query.

Parameters:
reader - the IndexReader used to read these values. If any caching is involved, that caching would also be IndexReader based.
Throws:
IOException - for any error.

description

public abstract String description()
description of field, used in explain()

toString

public String toString()
Overrides:
toString in class Object

equals

public abstract boolean equals(Object o)
Needed for possible caching of query results - used by ValueSourceQuery.equals(Object).

Overrides:
equals in class Object
See Also:
Object.equals(Object)

hashCode

public abstract int hashCode()
Needed for possible caching of query results - used by ValueSourceQuery.hashCode().

Overrides:
hashCode in class Object
See Also:
Object.hashCode()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ValueSourceQuery

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.function
Class ValueSourceQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.function.ValueSourceQuery
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
FieldScoreQuery
public class ValueSourceQuery
extends Query

Expert: A Query that sets the scores of document to the values obtained from a ValueSource.

This query provides a score for each and every undeleted document in the index.

The value source can be based on a (cached) value of an indexed field, but it can also be based on an external source, e.g. values read from an external database.

Score is set as: Score(doc,query) = query.getBoost()2 * valueSource(doc).

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ValueSourceQuery(ValueSource valSrc)
Create a value source query
Method Summary
Weight | createWeight(Searcher searcher) Expert: Constructs an appropriate Weight implementation for this query.
boolean | equals(Object o) Returns true if o is equal to this.
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
int | hashCode() Returns a hash code value for this object.
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.Query
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ValueSourceQuery

public ValueSourceQuery(ValueSource valSrc)
Create a value source query

Parameters:
valSrc - provides the values defines the function to be used for scoring
Method Detail

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

createWeight

public Weight createWeight(Searcher searcher)
Description copied from class: Query
Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Overrides:
createWeight in class Query

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

equals

public boolean equals(Object o)
Returns true if o is equal to this.

Overrides:
equals in class Query

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.search.function.ByteFieldSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.function.ByteFieldSource

No usage of org.apache.lucene.search.function.ByteFieldSource

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.function.CustomScoreProvider

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.function.CustomScoreProvider

Packages that use CustomScoreProvider
org.apache.lucene.search.function
Programmatic control over documents scores.

Uses of CustomScoreProvider in org.apache.lucene.search.function

Methods in org.apache.lucene.search.function that return CustomScoreProvider
protected  CustomScoreProvider CustomScoreQuery.getCustomScoreProvider(IndexReader reader)
Returns a CustomScoreProvider that calculates the custom scores for the given IndexReader.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.function.CustomScoreQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.function.CustomScoreQuery

No usage of org.apache.lucene.search.function.CustomScoreQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.function.DocValues

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.function.DocValues

Packages that use DocValues
org.apache.lucene.search.function
Programmatic control over documents scores.

Uses of DocValues in org.apache.lucene.search.function

Methods in org.apache.lucene.search.function that return DocValues
DocValues | ByteFieldSource.getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
abstract DocValues | FieldCacheSource.getCachedFieldValues(FieldCache cache, String field, IndexReader reader) Return cached DocValues for input field and reader.
DocValues | ShortFieldSource.getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
DocValues | IntFieldSource.getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
DocValues | FloatFieldSource.getCachedFieldValues(FieldCache cache, String field, IndexReader reader)
DocValues | FieldCacheSource.getValues(IndexReader reader)
abstract DocValues | ValueSource.getValues(IndexReader reader) Return the DocValues used by the function query.
DocValues | OrdFieldSource.getValues(IndexReader reader)
DocValues | ReverseOrdFieldSource.getValues(IndexReader reader)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.function.FieldCacheSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.function.FieldCacheSource

Packages that use FieldCacheSource
org.apache.lucene.search.function
Programmatic control over documents scores.

Uses of FieldCacheSource in org.apache.lucene.search.function

Subclasses of FieldCacheSource in org.apache.lucene.search.function
class | ByteFieldSource Expert: obtains single byte field values from the FieldCache using getBytes() and makes those values available as other numeric types, casting as needed.
class | FloatFieldSource Expert: obtains float field values from the FieldCache using getFloats() and makes those values available as other numeric types, casting as needed.
class | IntFieldSource Expert: obtains int field values from the FieldCache using getInts() and makes those values available as other numeric types, casting as needed.
class | ShortFieldSource Expert: obtains short field values from the FieldCache using getShorts() and makes those values available as other numeric types, casting as needed.

Methods in org.apache.lucene.search.function with parameters of type FieldCacheSource
boolean | ByteFieldSource.cachedFieldSourceEquals(FieldCacheSource o)
abstract boolean | FieldCacheSource.cachedFieldSourceEquals(FieldCacheSource other) Check if equals to another FieldCacheSource, already knowing that cache and field are equal.
boolean | ShortFieldSource.cachedFieldSourceEquals(FieldCacheSource o)
boolean | IntFieldSource.cachedFieldSourceEquals(FieldCacheSource o)
boolean | FloatFieldSource.cachedFieldSourceEquals(FieldCacheSource o)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.function.FieldScoreQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.function.FieldScoreQuery

No usage of org.apache.lucene.search.function.FieldScoreQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.function.FieldScoreQuery.Type

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.function.FieldScoreQuery.Type

Packages that use FieldScoreQuery.Type
org.apache.lucene.search.function
Programmatic control over documents scores.

Uses of FieldScoreQuery.Type in org.apache.lucene.search.function

Fields in org.apache.lucene.search.function declared as FieldScoreQuery.Type
static FieldScoreQuery.Type | FieldScoreQuery.Type.BYTE field values are interpreted as numeric byte values.
static FieldScoreQuery.Type | FieldScoreQuery.Type.FLOAT field values are interpreted as numeric float values.
static FieldScoreQuery.Type | FieldScoreQuery.Type.INT field values are interpreted as numeric int values.
static FieldScoreQuery.Type | FieldScoreQuery.Type.SHORT field values are interpreted as numeric short values.

Constructors in org.apache.lucene.search.function with parameters of type FieldScoreQuery.Type
FieldScoreQuery(String field, FieldScoreQuery.Type type)
Create a FieldScoreQuery - a query that scores each document as the value of the numeric input field.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.function.FloatFieldSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.function.FloatFieldSource

No usage of org.apache.lucene.search.function.FloatFieldSource

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.function.IntFieldSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.function.IntFieldSource

No usage of org.apache.lucene.search.function.IntFieldSource

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.function.OrdFieldSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.function.OrdFieldSource

No usage of org.apache.lucene.search.function.OrdFieldSource

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.function.ReverseOrdFieldSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.function.ReverseOrdFieldSource

No usage of org.apache.lucene.search.function.ReverseOrdFieldSource

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.function.ShortFieldSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.function.ShortFieldSource

No usage of org.apache.lucene.search.function.ShortFieldSource

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.function.ValueSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.function.ValueSource

Packages that use ValueSource
org.apache.lucene.search.function
Programmatic control over documents scores.

Uses of ValueSource in org.apache.lucene.search.function

Subclasses of ValueSource in org.apache.lucene.search.function
class | ByteFieldSource Expert: obtains single byte field values from the FieldCache using getBytes() and makes those values available as other numeric types, casting as needed.
class | FieldCacheSource Expert: A base class for ValueSource implementations that retrieve values for a single field from the FieldCache.
class | FloatFieldSource Expert: obtains float field values from the FieldCache using getFloats() and makes those values available as other numeric types, casting as needed.
class | IntFieldSource Expert: obtains int field values from the FieldCache using getInts() and makes those values available as other numeric types, casting as needed.
class | OrdFieldSource Expert: obtains the ordinal of the field value from the default Lucene Fieldcache using getStringIndex().
class | ReverseOrdFieldSource Expert: obtains the ordinal of the field value from the default Lucene FieldCache using getStringIndex() and reverses the order.
class | ShortFieldSource Expert: obtains short field values from the FieldCache using getShorts() and makes those values available as other numeric types, casting as needed.

Constructors in org.apache.lucene.search.function with parameters of type ValueSource
ValueSourceQuery(ValueSource valSrc)
Create a value source query

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.function.ValueSourceQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.function.ValueSourceQuery

Packages that use ValueSourceQuery
org.apache.lucene.search.function
Programmatic control over documents scores.

Uses of ValueSourceQuery in org.apache.lucene.search.function

Subclasses of ValueSourceQuery in org.apache.lucene.search.function
 class FieldScoreQuery
A query that scores each document as the value of the numeric input field.

Constructors in org.apache.lucene.search.function with parameters of type ValueSourceQuery
CustomScoreQuery(Query subQuery, ValueSourceQuery... valSrcQueries)
Create a CustomScoreQuery over input subQuery and a ValueSourceQuery.
CustomScoreQuery(Query subQuery, ValueSourceQuery valSrcQuery)
Create a CustomScoreQuery over input subQuery and a ValueSourceQuery.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AbstractAllGroupHeadsCollector.GroupHead

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class AbstractAllGroupHeadsCollector.GroupHead<GROUP_VALUE_TYPE>

java.lang.Object
    extended by  org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.GroupHead<GROUP_VALUE_TYPE>
Enclosing class:
AbstractAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead>
public abstract static class AbstractAllGroupHeadsCollector.GroupHead<GROUP_VALUE_TYPE>
extends Object

Represents a group head. A group head is the most relevant document for a particular group. The relevancy is based is usually based on the sort. The group head contains a group value with its associated most relevant document id.

Field Summary
int | doc
GROUP_VALUE_TYPE | groupValue
Constructor Summary
protected AbstractAllGroupHeadsCollector.GroupHead(GROUP_VALUE_TYPE groupValue, int doc)
Method Summary
protected abstract int | compare(int compIDX, int doc) Compares the specified document for a specified comparator against the current most relevant document.
protected abstract void | updateDocHead(int doc) Updates the current most relevant document with the specified document.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

groupValue

public final GROUP_VALUE_TYPE groupValue

doc

public int doc
Constructor Detail

AbstractAllGroupHeadsCollector.GroupHead

protected AbstractAllGroupHeadsCollector.GroupHead(GROUP_VALUE_TYPE groupValue,
                                                   int doc)
Method Detail

compare

protected abstract int compare(int compIDX,
                               int doc)
                        throws IOException
Compares the specified document for a specified comparator against the current most relevant document.

Parameters:
compIDX - The comparator index of the specified comparator.
doc - The specified document.
Returns:
-1 if the specified document wasn't competitive against the current most relevant document, 1 if the specified document was competitive against the current most relevant document. Otherwise 0.
Throws:
IOException - If I/O related errors occur

updateDocHead

protected abstract void updateDocHead(int doc)
                               throws IOException
Updates the current most relevant document with the specified document.

Parameters:
doc - The specified document
Throws:
IOException - If I/O related errors occur
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AbstractAllGroupHeadsCollector

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class AbstractAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead>

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector<GH>
Direct Known Subclasses:
TermAllGroupHeadsCollector
public abstract class AbstractAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead>
extends Collector

This collector specializes in collecting the most relevant document (group head) for each group that match the query.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | AbstractAllGroupHeadsCollector.GroupHead<GROUP_VALUE_TYPE> Represents a group head.
protected class | AbstractAllGroupHeadsCollector.TemporalResult Contains the result of group head retrieval.
Field Summary
protected int | compIDXEnd
protected int[] | reversed
protected AbstractAllGroupHeadsCollector.TemporalResult | temporalResult
Constructor Summary
protected AbstractAllGroupHeadsCollector(int numberOfSorts)
Method Summary
 boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
 void collect(int doc)
Called once for every document matching a query, with the unbased document number.
protected abstract  Collection<GH> getCollectedGroupHeads()
Returns the collected group heads.
 int groupHeadsSize()
protected abstract  void retrieveGroupHeadAndAddIfNotExist(int doc)
Returns the group head and puts it into temporalResult.
 int[] retrieveGroupHeads()
 FixedBitSet retrieveGroupHeads(int maxDoc)
Methods inherited from class org.apache.lucene.search.Collector
setNextReader, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

reversed

protected final int[] reversed

compIDXEnd

protected final int compIDXEnd

temporalResult

protected final AbstractAllGroupHeadsCollector.TemporalResult temporalResult
Constructor Detail

AbstractAllGroupHeadsCollector

protected AbstractAllGroupHeadsCollector(int numberOfSorts)
Method Detail

retrieveGroupHeads

public FixedBitSet retrieveGroupHeads(int maxDoc)
Parameters:
maxDoc - The maxDoc of the top level IndexReader.
Returns:
an FixedBitSet containing all group heads.

retrieveGroupHeads

public int[] retrieveGroupHeads()
Returns:
an int array containing all group heads. The size of the array is equal to number of collected unique groups.

groupHeadsSize

public int groupHeadsSize()
Returns:
the number of group heads found for a query.

retrieveGroupHeadAndAddIfNotExist

protected abstract void retrieveGroupHeadAndAddIfNotExist(int doc)
                                                   throws IOException
Returns the group head and puts it into temporalResult. If the group head wasn't encountered before then it will be added to the collected group heads.

The AbstractAllGroupHeadsCollector.TemporalResult.stop property will be true if the group head wasn't encountered before otherwise false.

Parameters:
doc - The document to retrieve the group head for.
Throws:
IOException - If I/O related errors occur

getCollectedGroupHeads

protected abstract Collection<GH> getCollectedGroupHeads()
Returns the collected group heads. Subsequent calls should return the same group heads.

Returns:
the collected group heads

collect

public void collect(int doc)
             throws IOException
Description copied from class: Collector
Called once for every document matching a query, with the unbased document number.

Note: This is called in an inner search loop. For good search performance, implementations of this method should not call Searcher.doc(int) or IndexReader.document(int) on every hit. Doing so can slow searches by an order of magnitude or more.

Specified by:
collect in class Collector
Throws:
IOException

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Description copied from class: Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Specified by:
acceptsDocsOutOfOrder in class Collector
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AbstractAllGroupHeadsCollector.TemporalResult

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class AbstractAllGroupHeadsCollector.TemporalResult

java.lang.Object
    extended by  org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.TemporalResult
Enclosing class:
AbstractAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead>
protected class AbstractAllGroupHeadsCollector.TemporalResult
extends Object

Contains the result of group head retrieval. To prevent new object creations of this class for every collect.

Field Summary
GH | groupHead
boolean | stop
Constructor Summary
protected AbstractAllGroupHeadsCollector.TemporalResult()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

groupHead

public GH extends AbstractAllGroupHeadsCollector.GroupHead groupHead

stop

public boolean stop
Constructor Detail

AbstractAllGroupHeadsCollector.TemporalResult

protected AbstractAllGroupHeadsCollector.TemporalResult()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AbstractAllGroupsCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class AbstractAllGroupsCollector<GROUP_VALUE_TYPE>

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.grouping.AbstractAllGroupsCollector<GROUP_VALUE_TYPE>
Direct Known Subclasses:
TermAllGroupsCollector
public abstract class AbstractAllGroupsCollector<GROUP_VALUE_TYPE>
extends Collector

A collector that collects all groups that match the query. Only the group value is collected, and the order is undefined. This collector does not determine the most relevant document of a group.

This is an abstract version. Concrete implementations define what a group actually is and how it is internally collected.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
AbstractAllGroupsCollector()
Method Summary
 boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
 int getGroupCount()
Returns the total number of groups for the executed search.
abstract  Collection<GROUP_VALUE_TYPE> getGroups()
Returns the group values

This is an unordered collections of group values.

 void setScorer(Scorer scorer)
Called before successive calls to Collector.collect(int).
Methods inherited from class org.apache.lucene.search.Collector
collect, setNextReader
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AbstractAllGroupsCollector

public AbstractAllGroupsCollector()
Method Detail

getGroupCount

public int getGroupCount()
Returns the total number of groups for the executed search. This is a convenience method. The following code snippet has the same effect:
getGroups().size()

Returns:
The total number of groups for the executed search

getGroups

public abstract Collection<GROUP_VALUE_TYPE> getGroups()
Returns the group values

This is an unordered collections of group values. For each group that matched the query there is a BytesRef representing a group value.

Returns:
the group values

setScorer

public void setScorer(Scorer scorer)
               throws IOException
Description copied from class: Collector
Called before successive calls to Collector.collect(int). Implementations that need the score of the current document (passed-in to Collector.collect(int)), should save the passed-in Scorer and call scorer.score() when needed.

Specified by:
setScorer in class Collector
Throws:
IOException

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Description copied from class: Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Specified by:
acceptsDocsOutOfOrder in class Collector
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AbstractFirstPassGroupingCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class AbstractFirstPassGroupingCollector<GROUP_VALUE_TYPE>

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector<GROUP_VALUE_TYPE>
Direct Known Subclasses:
TermFirstPassGroupingCollector
public abstract class AbstractFirstPassGroupingCollector<GROUP_VALUE_TYPE>
extends Collector

FirstPassGroupingCollector is the first of two passes necessary to collect grouped hits. This pass gathers the top N sorted groups. Concrete subclasses define what a group is and how it is internally collected.

See org.apache.lucene.search.grouping for more details including a full code example.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
AbstractFirstPassGroupingCollector(Sort groupSort, int topNGroups)
Create the first pass collector.
Method Summary
 boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
 void collect(int doc)
Called once for every document matching a query, with the unbased document number.
protected abstract  GROUP_VALUE_TYPE copyDocGroupValue(GROUP_VALUE_TYPE groupValue, GROUP_VALUE_TYPE reuse)
Returns a copy of the specified group value by creating a new instance and copying the value from the specified groupValue in the new instance.
protected abstract  GROUP_VALUE_TYPE getDocGroupValue(int doc)
Returns the group value for the specified doc.
 Collection<SearchGroup<GROUP_VALUE_TYPE>> getTopGroups(int groupOffset, boolean fillFields)
Returns top groups, starting from offset.
 void setNextReader(IndexReader reader, int docBase)
Called before collecting from each IndexReader.
 void setScorer(Scorer scorer)
Called before successive calls to Collector.collect(int).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AbstractFirstPassGroupingCollector

public AbstractFirstPassGroupingCollector(Sort groupSort,
                                          int topNGroups)
                                   throws IOException
Create the first pass collector.

Parameters:
groupSort - The Sort used to sort the groups. The top sorted document within each group according to groupSort, determines how that group sorts against other groups. This must be non-null, ie, if you want to groupSort by relevance use Sort.RELEVANCE.
topNGroups - How many top groups to keep.
Throws:
IOException - If I/O related errors occur
Method Detail

getTopGroups

public Collection<SearchGroup<GROUP_VALUE_TYPE>> getTopGroups(int groupOffset,
                                                              boolean fillFields)
Returns top groups, starting from offset. This may return null, if no groups were collected, or if the number of unique groups collected is <= offset.

Parameters:
groupOffset - The offset in the collected groups
fillFields - Whether to fill to SearchGroup.sortValues
Returns:
top groups, starting from offset

setScorer

public void setScorer(Scorer scorer)
               throws IOException
Description copied from class: Collector
Called before successive calls to Collector.collect(int). Implementations that need the score of the current document (passed-in to Collector.collect(int)), should save the passed-in Scorer and call scorer.score() when needed.

Specified by:
setScorer in class Collector
Throws:
IOException

collect

public void collect(int doc)
             throws IOException
Description copied from class: Collector
Called once for every document matching a query, with the unbased document number.

Note: This is called in an inner search loop. For good search performance, implementations of this method should not call Searcher.doc(int) or IndexReader.document(int) on every hit. Doing so can slow searches by an order of magnitude or more.

Specified by:
collect in class Collector
Throws:
IOException

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Description copied from class: Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Specified by:
acceptsDocsOutOfOrder in class Collector

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Specified by:
setNextReader in class Collector
Parameters:
reader - next IndexReader
Throws:
IOException

getDocGroupValue

protected abstract GROUP_VALUE_TYPE getDocGroupValue(int doc)
Returns the group value for the specified doc.

Parameters:
doc - The specified doc
Returns:
the group value for the specified doc

copyDocGroupValue

protected abstract GROUP_VALUE_TYPE copyDocGroupValue(GROUP_VALUE_TYPE groupValue,
                                                      GROUP_VALUE_TYPE reuse)
Returns a copy of the specified group value by creating a new instance and copying the value from the specified groupValue in the new instance. Or optionally the reuse argument can be used to copy the group value in.

Parameters:
groupValue - The group value to copy
reuse - Optionally a reuse instance to prevent a new instance creation
Returns:
a copy of the specified group value
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AbstractSecondPassGroupingCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class AbstractSecondPassGroupingCollector<GROUP_VALUE_TYPE>

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector<GROUP_VALUE_TYPE>
Direct Known Subclasses:
TermSecondPassGroupingCollector
public abstract class AbstractSecondPassGroupingCollector<GROUP_VALUE_TYPE>
extends Collector

SecondPassGroupingCollector is the second of two passes necessary to collect grouped docs. This pass gathers the top N documents per top group computed from the first pass. Concrete subclasses define what a group is and how it is internally collected.

See org.apache.lucene.search.grouping for more details including a full code example.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
 class AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>
Field Summary
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>[] | groupDocs
protected Map<GROUP_VALUE_TYPE,AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>> | groupMap
Constructor Summary
AbstractSecondPassGroupingCollector(Collection<SearchGroup<GROUP_VALUE_TYPE>> groups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, boolean getScores, boolean getMaxScores, boolean fillSortFields)
Method Summary
 boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
 void collect(int doc)
Called once for every document matching a query, with the unbased document number.
 TopGroups<GROUP_VALUE_TYPE> getTopGroups(int withinGroupOffset)
protected abstract  AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE> retrieveGroup(int doc)
Returns the group the specified doc belongs to or null if no group could be retrieved.
 void setNextReader(IndexReader reader, int docBase)
Called before collecting from each IndexReader.
 void setScorer(Scorer scorer)
Called before successive calls to Collector.collect(int).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

groupMap

protected final Map<GROUP_VALUE_TYPE,AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>> groupMap

groupDocs

protected AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>[] groupDocs
Constructor Detail

AbstractSecondPassGroupingCollector

public AbstractSecondPassGroupingCollector(Collection<SearchGroup<GROUP_VALUE_TYPE>> groups,
                                           Sort groupSort,
                                           Sort withinGroupSort,
                                           int maxDocsPerGroup,
                                           boolean getScores,
                                           boolean getMaxScores,
                                           boolean fillSortFields)
                                    throws IOException
Throws:
IOException
Method Detail

setScorer

public void setScorer(Scorer scorer)
               throws IOException
Description copied from class: Collector
Called before successive calls to Collector.collect(int). Implementations that need the score of the current document (passed-in to Collector.collect(int)), should save the passed-in Scorer and call scorer.score() when needed.

Specified by:
setScorer in class Collector
Throws:
IOException

collect

public void collect(int doc)
             throws IOException
Description copied from class: Collector
Called once for every document matching a query, with the unbased document number.

Note: This is called in an inner search loop. For good search performance, implementations of this method should not call Searcher.doc(int) or IndexReader.document(int) on every hit. Doing so can slow searches by an order of magnitude or more.

Specified by:
collect in class Collector
Throws:
IOException

retrieveGroup

protected abstract AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE> retrieveGroup(int doc)
                                                                                throws IOException
Returns the group the specified doc belongs to or null if no group could be retrieved.

Parameters:
doc - The specified doc
Returns:
the group the specified doc belongs to or null if no group could be retrieved
Throws:
IOException - If an I/O related error occurred

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Specified by:
setNextReader in class Collector
Parameters:
reader - next IndexReader
Throws:
IOException

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Description copied from class: Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Specified by:
acceptsDocsOutOfOrder in class Collector

getTopGroups

public TopGroups<GROUP_VALUE_TYPE> getTopGroups(int withinGroupOffset)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AbstractSecondPassGroupingCollector.SearchGroupDocs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>

java.lang.Object
    extended by  org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>
Enclosing class:
AbstractSecondPassGroupingCollector<GROUP_VALUE_TYPE>
public class AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>
extends Object

Field Summary
TopDocsCollector<?> | collector
GROUP_VALUE_TYPE | groupValue
Constructor Summary
AbstractSecondPassGroupingCollector.SearchGroupDocs(GROUP_VALUE_TYPE groupValue, TopDocsCollector<?> collector)
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

groupValue

public final GROUP_VALUE_TYPE groupValue

collector

public final TopDocsCollector<?> collector
Constructor Detail

AbstractSecondPassGroupingCollector.SearchGroupDocs

public AbstractSecondPassGroupingCollector.SearchGroupDocs(GROUP_VALUE_TYPE groupValue,
                                                           TopDocsCollector<?> collector)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BlockGroupingCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class BlockGroupingCollector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.grouping.BlockGroupingCollector

public class BlockGroupingCollector
extends Collector

BlockGroupingCollector performs grouping with a single pass collector, as long as you are grouping by a doc block field, ie all documents sharing a given group value were indexed as a doc block using the atomic IndexWriter.addDocuments(java.util.Collection) or IndexWriter.updateDocuments(org.apache.lucene.index.Term, java.util.Collection) API.

This results in faster performance (~25% faster QPS) than the two-pass grouping collectors, with the tradeoff being that the documents in each group must always be indexed as a block. This collector also fills in TopGroups.totalGroupCount without requiring the separate TermAllGroupsCollector. However, this collector does not fill in the groupValue of each group; this field will always be null.

NOTE: this collector makes no effort to verify the docs were in fact indexed as a block, so it's up to you to ensure this was the case.

See org.apache.lucene.search.grouping for more details including a full code example.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
BlockGroupingCollector(Sort groupSort, int topNGroups, boolean needsScores, Filter lastDocPerGroup)
Create the single pass collector.
Method Summary
 boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
 void collect(int doc)
Called once for every document matching a query, with the unbased document number.
 TopGroups getTopGroups(Sort withinGroupSort, int groupOffset, int withinGroupOffset, int maxDocsPerGroup, boolean fillSortFields)
Returns the grouped results.
 void setNextReader(IndexReader reader, int docBase)
Called before collecting from each IndexReader.
 void setScorer(Scorer scorer)
Called before successive calls to Collector.collect(int).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BlockGroupingCollector

public BlockGroupingCollector(Sort groupSort,
                              int topNGroups,
                              boolean needsScores,
                              Filter lastDocPerGroup)
                       throws IOException
Create the single pass collector.

Parameters:
groupSort - The Sort used to sort the groups. The top sorted document within each group according to groupSort, determines how that group sorts against other groups. This must be non-null, ie, if you want to groupSort by relevance use Sort.RELEVANCE.
topNGroups - How many top groups to keep.
needsScores - true if the collected documents require scores, either because relevance is included in the withinGroupSort or because you plan to pass true for either getSscores or getMaxScores to getTopGroups(org.apache.lucene.search.Sort, int, int, int, boolean)
lastDocPerGroup - a Filter that marks the last document in each group.
Throws:
IOException
Method Detail

getTopGroups

public TopGroups getTopGroups(Sort withinGroupSort,
                              int groupOffset,
                              int withinGroupOffset,
                              int maxDocsPerGroup,
                              boolean fillSortFields)
                       throws IOException
Returns the grouped results. Returns null if the number of groups collected is <= groupOffset.

NOTE: This collector is unable to compute the groupValue per group so it will always be null. This is normally not a problem, as you can obtain the value just like you obtain other values for each matching document (eg, via stored fields, via FieldCache, etc.)

Parameters:
withinGroupSort - The Sort used to sort documents within each group. Passing null is allowed, to sort by relevance.
groupOffset - Which group to start from
withinGroupOffset - Which document to start from within each group
maxDocsPerGroup - How many top documents to keep within each group.
fillSortFields - If true then the Comparable values for the sort fields will be set
Throws:
IOException

setScorer

public void setScorer(Scorer scorer)
               throws IOException
Description copied from class: Collector
Called before successive calls to Collector.collect(int). Implementations that need the score of the current document (passed-in to Collector.collect(int)), should save the passed-in Scorer and call scorer.score() when needed.

Specified by:
setScorer in class Collector
Throws:
IOException

collect

public void collect(int doc)
             throws IOException
Description copied from class: Collector
Called once for every document matching a query, with the unbased document number.

Note: This is called in an inner search loop. For good search performance, implementations of this method should not call Searcher.doc(int) or IndexReader.document(int) on every hit. Doing so can slow searches by an order of magnitude or more.

Specified by:
collect in class Collector
Throws:
IOException

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Description copied from class: Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Specified by:
acceptsDocsOutOfOrder in class Collector

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Specified by:
setNextReader in class Collector
Parameters:
reader - next IndexReader
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GroupDocs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class GroupDocs<GROUP_VALUE_TYPE>

java.lang.Object
    extended by  org.apache.lucene.search.grouping.GroupDocs<GROUP_VALUE_TYPE>

public class GroupDocs<GROUP_VALUE_TYPE>
extends Object

Represents one group in the results.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Object[] | groupSortValues Matches the groupSort passed to AbstractFirstPassGroupingCollector.
GROUP_VALUE_TYPE | groupValue The groupField value for all docs in this group; this may be null if hits did not have the groupField.
float | maxScore Max score in this group
ScoreDoc[] | scoreDocs Hits; this may be FieldDoc instances if the withinGroupSort sorted by fields.
int | totalHits Total hits within this group
Constructor Summary
GroupDocs(float maxScore, int totalHits, ScoreDoc[] scoreDocs, GROUP_VALUE_TYPE groupValue, Object[] groupSortValues)
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

groupValue

public final GROUP_VALUE_TYPE groupValue
The groupField value for all docs in this group; this may be null if hits did not have the groupField.

maxScore

public final float maxScore
Max score in this group

scoreDocs

public final ScoreDoc[] scoreDocs
Hits; this may be FieldDoc instances if the withinGroupSort sorted by fields.

totalHits

public final int totalHits
Total hits within this group

groupSortValues

public final Object[] groupSortValues
Matches the groupSort passed to AbstractFirstPassGroupingCollector.

Constructor Detail

GroupDocs

public GroupDocs(float maxScore,
                 int totalHits,
                 ScoreDoc[] scoreDocs,
                 GROUP_VALUE_TYPE groupValue,
                 Object[] groupSortValues)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.search.grouping
Classes
AbstractAllGroupHeadsCollector
AbstractAllGroupHeadsCollector.GroupHead
AbstractAllGroupsCollector
AbstractFirstPassGroupingCollector
AbstractSecondPassGroupingCollector
BlockGroupingCollector
GroupDocs
SearchGroup
SentinelIntSet
TermAllGroupHeadsCollector
TermAllGroupsCollector
TermFirstPassGroupingCollector
TermSecondPassGroupingCollector
TopGroups


org.apache.lucene.search.grouping

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.search.grouping

This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.

See:
Description

Class Summary
AbstractAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead> | This collector specializes in collecting the most relevant document (group head) for each group that match the query.
AbstractAllGroupHeadsCollector.GroupHead<GROUP_VALUE_TYPE> | Represents a group head.
AbstractAllGroupsCollector<GROUP_VALUE_TYPE> | A collector that collects all groups that match the query.
AbstractFirstPassGroupingCollector<GROUP_VALUE_TYPE> | FirstPassGroupingCollector is the first of two passes necessary to collect grouped hits.
AbstractSecondPassGroupingCollector<GROUP_VALUE_TYPE> | SecondPassGroupingCollector is the second of two passes necessary to collect grouped docs.
BlockGroupingCollector | BlockGroupingCollector performs grouping with a single pass collector, as long as you are grouping by a doc block field, ie all documents sharing a given group value were indexed as a doc block using the atomic IndexWriter.addDocuments(java.util.Collection) or IndexWriter.updateDocuments(org.apache.lucene.index.Term, java.util.Collection) API.
GroupDocs<GROUP_VALUE_TYPE> | Represents one group in the results.
SearchGroup<GROUP_VALUE_TYPE> | Represents a group that is found during the first pass search.
SentinelIntSet | A native int set where one value is reserved to mean "EMPTY"
TermAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead> | A base implementation of AbstractAllGroupHeadsCollector for retrieving the most relevant groups when grouping on a string based group field.
TermAllGroupsCollector | A collector that collects all groups that match the query.
TermFirstPassGroupingCollector | Concrete implementation of AbstractFirstPassGroupingCollector that groups based on field values and more specifically uses FieldCache.StringIndex to collect groups.
TermSecondPassGroupingCollector | Concrete implementation of AbstractSecondPassGroupingCollector that groups based on field values and more specifically uses FieldCache.StringIndex to collect grouped docs.
TopGroups<GROUP_VALUE_TYPE> | Represents result returned by a grouping search.

Package org.apache.lucene.search.grouping Description

This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together. For example, if you group by the author field, then all documents with the same value in the author field fall into a single group.

Grouping requires a number of inputs:

  • groupField: this is the field used for grouping. For example, if you use the author field then each group has all books by the same author. Documents that don't have this field are grouped under a single group with a null group value.
  • groupSort: how the groups are sorted. For sorting purposes, each group is "represented" by the highest-sorted document according to the groupSort within it. For example, if you specify "price" (ascending) then the first group is the one with the lowest price book within it. Or if you specify relevance group sort, then the first group is the one containing the highest scoring book.
  • topNGroups: how many top groups to keep. For example, 10 means the top 10 groups are computed.
  • groupOffset: which "slice" of top groups you want to retrieve. For example, 3 means you'll get 7 groups back (assuming topNGroups is 10). This is useful for paging, where you might show 5 groups per page.
  • withinGroupSort: how the documents within each group are sorted. This can be different from the group sort.
  • maxDocsPerGroup: how many top documents within each group to keep.
  • withinGroupOffset: which "slice" of top documents you want to retrieve from each group.

The implementation is two-pass: the first pass (TermFirstPassGroupingCollector) gathers the top groups, and the second pass (TermSecondPassGroupingCollector) gathers documents within those groups. If the search is costly to run you may want to use the CachingCollector class, which caches hits and can (quickly) replay them for the second pass. This way you only run the query once, but you pay a RAM cost to (briefly) hold all hits. Results are returned as a TopGroups instance.

This module abstracts away what defines group and how it is collected. All grouping collectors are abstract and have currently term based implementations. One can implement collectors that for example group on multiple fields.

Known limitations:

  • For the two-pass grouping collector, the group field must be a single-valued indexed field. FieldCache is used to load the FieldCache.StringIndex for this field.
  • Although Solr support grouping by function and this module has abstraction of what a group is, there are currently only implementations for grouping based on terms.
  • Sharding is not directly supported, though is not too difficult, if you can merge the top groups and top documents per group yourself.

Typical usage for the generic two-pass collector looks like this (using the CachingCollector):

  TermFirstPassGroupingCollector c1 = new TermFirstPassGroupingCollector("author", groupSort, groupOffset+topNGroups);

  boolean cacheScores = true;
  double maxCacheRAMMB = 4.0;
  CachingCollector cachedCollector = CachingCollector.create(c1, cacheScores, maxCacheRAMMB);
  s.search(new TermQuery(new Term("content", searchTerm)), cachedCollector);

  Collection<SearchGroup<String>> topGroups = c1.getTopGroups(groupOffset, fillFields);

  if (topGroups == null) {
    // No groups matched
    return;
  }

  boolean getScores = true;
  boolean getMaxScores = true;
  boolean fillFields = true;
  TermSecondPassGroupingCollector c2 = new TermSecondPassGroupingCollector("author", topGroups, groupSort, docSort, docOffset+docsPerGroup, getScores, getMaxScores, fillFields);

  //Optionally compute total group count
  TermAllGroupsCollector allGroupsCollector = null;
  if (requiredTotalGroupCount) {
    allGroupsCollector = new TermAllGroupsCollector("author");
    c2 = MultiCollector.wrap(c2, allGroupsCollector);
  }

  if (cachedCollector.isCached()) {
    // Cache fit within maxCacheRAMMB, so we can replay it:
    cachedCollector.replay(c2);
  } else {
    // Cache was too large; must re-execute query:
    s.search(new TermQuery(new Term("content", searchTerm)), c2);
  }

  TopGroups<String> groupsResult = c2.getTopGroups(docOffset);
  if (requiredTotalGroupCount) {
    groupsResult = new TopGroups<String>(groupsResult, allGroupsCollector.getGroupCount());
  }

  // Render groupsResult...

To use the single-pass BlockGroupingCollector, first, at indexing time, you must ensure all docs in each group are added as a block, and you have some way to find the last document of each group. One simple way to do this is to add a marker binary field:

  // Create Documents from your source:
  List<Document> oneGroup = ...;

  Field groupEndField = new Field("groupEnd", "x", Field.Store.NO, Field.Index.NOT_ANALYZED);
  groupEndField.setOmitTermFreqAndPositions(true);
  groupEndField.setOmitNorms(true);
  oneGroup.get(oneGroup.size()-1).add(groupEndField);

  // You can also use writer.updateDocuments(); just be sure you
  // replace an entire previous doc block with this new one.  For
  // example, each group could have a "groupID" field, with the same
  // value for all docs in this group:
  writer.addDocuments(oneGroup);
Then, at search time, do this up front:
  // Set this once in your app & save away for reusing across all queries:
  Filter groupEndDocs = new CachingWrapperFilter(new QueryWrapperFilter(new TermQuery(new Term("groupEnd", "x"))));
Finally, do this per search:
  // Per search:
  BlockGroupingCollector c = new BlockGroupingCollector(groupSort, groupOffset+topNGroups, needsScores, groupEndDocs);
  s.search(new TermQuery(new Term("content", searchTerm)), c);
  TopGroups groupsResult = c.getTopGroups(withinGroupSort, groupOffset, docOffset, docOffset+docsPerGroup, fillFields);

  // Render groupsResult...
Note that the groupValue of each GroupDocs will be null, so if you need to present this value you'll have to separately retrieve it (for example using stored fields, FieldCache, etc.).

Another collector is the TermAllGroupHeadsCollector that can be used to retrieve all most relevant documents per group. Also known as group heads. This can be useful in situations when one wants to compute grouping based facets / statistics on the complete query result. The collector can be executed during the first or second phase.

  AbstractAllGroupHeadsCollector c = TermAllGroupHeadsCollector.create(groupField, sortWithinGroup);
  s.search(new TermQuery(new Term("content", searchTerm)), c);
  // Return all group heads as int array
  int[] groupHeadsArray = c.retrieveGroupHeads()
  // Return all group heads as FixedBitSet.
  int maxDoc = s.maxDoc();
  FixedBitSet groupHeadsBitSet = c.retrieveGroupHeads(maxDoc)


org.apache.lucene.search.grouping Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.search.grouping

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.GroupHead<GROUP_VALUE_TYPE>
    • org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.TemporalResult
    • org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>
    • org.apache.lucene.search.Collector
      • org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector<GH>
        • org.apache.lucene.search.grouping.TermAllGroupHeadsCollector<GH>
      • org.apache.lucene.search.grouping.AbstractAllGroupsCollector<GROUP_VALUE_TYPE>
        • org.apache.lucene.search.grouping.TermAllGroupsCollector
      • org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector<GROUP_VALUE_TYPE>
        • org.apache.lucene.search.grouping.TermFirstPassGroupingCollector
      • org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector<GROUP_VALUE_TYPE>
        • org.apache.lucene.search.grouping.TermSecondPassGroupingCollector
      • org.apache.lucene.search.grouping.BlockGroupingCollector
    • org.apache.lucene.search.grouping.GroupDocs<GROUP_VALUE_TYPE>
    • org.apache.lucene.search.grouping.SearchGroup<GROUP_VALUE_TYPE>
    • org.apache.lucene.search.grouping.SentinelIntSet
    • org.apache.lucene.search.grouping.TopGroups<GROUP_VALUE_TYPE>


Uses of Package org.apache.lucene.search.grouping

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.search.grouping

Packages that use org.apache.lucene.search.grouping
org.apache.lucene.search.grouping | This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.
org.apache.lucene.search.join | This modules support index-time and query-time joins.

Classes in org.apache.lucene.search.grouping used by org.apache.lucene.search.grouping
AbstractAllGroupHeadsCollector
This collector specializes in collecting the most relevant document (group head) for each group that match the query.
AbstractAllGroupHeadsCollector.GroupHead
Represents a group head.
AbstractAllGroupHeadsCollector.TemporalResult
Contains the result of group head retrieval.
AbstractAllGroupsCollector
A collector that collects all groups that match the query.
AbstractFirstPassGroupingCollector
FirstPassGroupingCollector is the first of two passes necessary to collect grouped hits.
AbstractSecondPassGroupingCollector
SecondPassGroupingCollector is the second of two passes necessary to collect grouped docs.
AbstractSecondPassGroupingCollector.SearchGroupDocs
GroupDocs
Represents one group in the results.
SearchGroup
Represents a group that is found during the first pass search.
TopGroups
Represents result returned by a grouping search.

Classes in org.apache.lucene.search.grouping used by org.apache.lucene.search.join
TopGroups
Represents result returned by a grouping search.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SearchGroup

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class SearchGroup<GROUP_VALUE_TYPE>

java.lang.Object
    extended by  org.apache.lucene.search.grouping.SearchGroup<GROUP_VALUE_TYPE>

public class SearchGroup<GROUP_VALUE_TYPE>
extends Object

Represents a group that is found during the first pass search.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
GROUP_VALUE_TYPE | groupValue The value that defines this group
Object[] | sortValues The sort values used during sorting.
Constructor Summary
SearchGroup()
Method Summary
 boolean equals(Object o)
 int hashCode()
static
<T> Collection<SearchGroup<T>>
merge(List<Collection<SearchGroup<T>>> topGroups, int offset, int topN, Sort groupSort)
Merges multiple collections of top groups, for example obtained from separate index shards.
 String toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

groupValue

public GROUP_VALUE_TYPE groupValue
The value that defines this group

sortValues

public Object[] sortValues
The sort values used during sorting. These are the groupSort field values of the highest rank document (by the groupSort) within the group. Can be null if fillFields=false had been passed to AbstractFirstPassGroupingCollector.getTopGroups(int, boolean)

Constructor Detail

SearchGroup

public SearchGroup()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

merge

public static <T> Collection<SearchGroup<T>> merge(List<Collection<SearchGroup<T>>> topGroups,
                                                   int offset,
                                                   int topN,
                                                   Sort groupSort)
                                        throws IOException
Merges multiple collections of top groups, for example obtained from separate index shards. The provided groupSort must match how the groups were sorted, and the provided SearchGroups must have been computed with fillFields=true passed to AbstractFirstPassGroupingCollector.getTopGroups(int, boolean).

NOTE: this returns null if the topGroups is empty.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SentinelIntSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class SentinelIntSet

java.lang.Object
    extended by  org.apache.lucene.search.grouping.SentinelIntSet

public class SentinelIntSet
extends Object

A native int set where one value is reserved to mean "EMPTY"

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
int | count
int | emptyVal
int[] | keys
int | rehashCount
Constructor Summary
SentinelIntSet(int size, int emptyVal)
Method Summary
void | clear()
boolean | exists(int key)
int | find(int key) returns the slot for this key, or -slot-1 if not found
int | getSlot(int key) returns the slot for this key
int | hash(int key)
int | put(int key)
void | rehash()
int | size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

keys

public int[] keys

count

public int count

emptyVal

public final int emptyVal

rehashCount

public int rehashCount
Constructor Detail

SentinelIntSet

public SentinelIntSet(int size,
                      int emptyVal)
Parameters:
size - The minimum number of elements this set should be able to hold without re-hashing (i.e. the slots are guaranteed not to change)
emptyVal - The integer value to use for EMPTY
Method Detail

clear

public void clear()

hash

public int hash(int key)

size

public int size()

getSlot

public int getSlot(int key)
returns the slot for this key

find

public int find(int key)
returns the slot for this key, or -slot-1 if not found

exists

public boolean exists(int key)

put

public int put(int key)

rehash

public void rehash()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermAllGroupHeadsCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class TermAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead>

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector<GH>
            extended by  org.apache.lucene.search.grouping.TermAllGroupHeadsCollector<GH>

public abstract class TermAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead>
extends AbstractAllGroupHeadsCollector<GH>

A base implementation of AbstractAllGroupHeadsCollector for retrieving the most relevant groups when grouping on a string based group field. More specifically this all concrete implementations of this base implementation use FieldCache.StringIndex.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector
AbstractAllGroupHeadsCollector.GroupHead<GROUP_VALUE_TYPE>, AbstractAllGroupHeadsCollector.TemporalResult
Field Summary
Fields inherited from class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector
compIDXEnd, reversed, temporalResult
Constructor Summary
protected TermAllGroupHeadsCollector(String groupField, int numberOfSorts)
Method Summary
static AbstractAllGroupHeadsCollector | create(String groupField, Sort sortWithinGroup) Creates an AbstractAllGroupHeadsCollector instance based on the supplied arguments.
static AbstractAllGroupHeadsCollector | create(String groupField, Sort sortWithinGroup, int initialSize) Creates an AbstractAllGroupHeadsCollector instance based on the supplied arguments.
Methods inherited from class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector
acceptsDocsOutOfOrder, collect, getCollectedGroupHeads, groupHeadsSize, retrieveGroupHeadAndAddIfNotExist, retrieveGroupHeads, retrieveGroupHeads
Methods inherited from class org.apache.lucene.search.Collector
setNextReader, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TermAllGroupHeadsCollector

protected TermAllGroupHeadsCollector(String groupField,
                                     int numberOfSorts)
Method Detail

create

public static AbstractAllGroupHeadsCollector create(String groupField,
                                                    Sort sortWithinGroup)
                                             throws IOException
Creates an AbstractAllGroupHeadsCollector instance based on the supplied arguments. This factory method decides with implementation is best suited. Delegates to create(String, org.apache.lucene.search.Sort, int) with an initialSize of 128.

Parameters:
groupField - The field to group by
sortWithinGroup - The sort within each group
Returns:
an AbstractAllGroupHeadsCollector instance based on the supplied arguments
Throws:
IOException - If I/O related errors occur

create

public static AbstractAllGroupHeadsCollector create(String groupField,
                                                    Sort sortWithinGroup,
                                                    int initialSize)
                                             throws IOException
Creates an AbstractAllGroupHeadsCollector instance based on the supplied arguments. This factory method decides with implementation is best suited.

Parameters:
groupField - The field to group by
sortWithinGroup - The sort within each group
initialSize - The initial allocation size of the internal int set and group list which should roughly match the total number of expected unique groups. Be aware that the heap usage is 4 bytes * initialSize.
Returns:
an AbstractAllGroupHeadsCollector instance based on the supplied arguments
Throws:
IOException - If I/O related errors occur
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermAllGroupsCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class TermAllGroupsCollector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.grouping.AbstractAllGroupsCollector<String>
            extended by  org.apache.lucene.search.grouping.TermAllGroupsCollector

public class TermAllGroupsCollector
extends AbstractAllGroupsCollector<String>

A collector that collects all groups that match the query. Only the group value is collected, and the order is undefined. This collector does not determine the most relevant document of a group.

Implementation detail: an int hash set (SentinelIntSet) is used to detect if a group is already added to the total count. For each segment the int set is cleared and filled with previous counted groups that occur in the new segment.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
TermAllGroupsCollector(String groupField)
Constructs a AbstractAllGroupsCollector.
TermAllGroupsCollector(String groupField, int initialSize)
Expert: Constructs a AbstractAllGroupsCollector
Method Summary
void | collect(int doc) Called once for every document matching a query, with the unbased document number.
Collection<String> | getGroups() Returns the group values This is an unordered collections of group values.
void | setNextReader(IndexReader reader, int docBase) Called before collecting from each IndexReader.
Methods inherited from class org.apache.lucene.search.grouping.AbstractAllGroupsCollector
acceptsDocsOutOfOrder, getGroupCount, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TermAllGroupsCollector

public TermAllGroupsCollector(String groupField,
                              int initialSize)
Expert: Constructs a AbstractAllGroupsCollector

Parameters:
groupField - The field to group by
initialSize - The initial allocation size of the internal int set and group list which should roughly match the total number of expected unique groups. Be aware that the heap usage is 4 bytes * initialSize.

TermAllGroupsCollector

public TermAllGroupsCollector(String groupField)
Constructs a AbstractAllGroupsCollector. This sets the initial allocation size for the internal int set and group list to 128.

Parameters:
groupField - The field to group by
Method Detail

collect

public void collect(int doc)
             throws IOException
Description copied from class: Collector
Called once for every document matching a query, with the unbased document number.

Note: This is called in an inner search loop. For good search performance, implementations of this method should not call Searcher.doc(int) or IndexReader.document(int) on every hit. Doing so can slow searches by an order of magnitude or more.

Specified by:
collect in class Collector
Throws:
IOException

getGroups

public Collection<String> getGroups()
Returns the group values

This is an unordered collections of group values. For each group that matched the query there is a BytesRef representing a group value.

Specified by:
getGroups in class AbstractAllGroupsCollector<String>
Returns:
the group values

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Specified by:
setNextReader in class Collector
Parameters:
reader - next IndexReader
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermFirstPassGroupingCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class TermFirstPassGroupingCollector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector<String>
            extended by  org.apache.lucene.search.grouping.TermFirstPassGroupingCollector

public class TermFirstPassGroupingCollector
extends AbstractFirstPassGroupingCollector<String>

Concrete implementation of AbstractFirstPassGroupingCollector that groups based on field values and more specifically uses FieldCache.StringIndex to collect groups.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
TermFirstPassGroupingCollector(String groupField, Sort groupSort, int topNGroups)
Create the first pass collector.
Method Summary
protected String | copyDocGroupValue(String groupValue, String reuse) Returns a copy of the specified group value by creating a new instance and copying the value from the specified groupValue in the new instance.
protected String | getDocGroupValue(int doc) Returns the group value for the specified doc.
void | setNextReader(IndexReader reader, int docBase) Called before collecting from each IndexReader.
Methods inherited from class org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector
acceptsDocsOutOfOrder, collect, getTopGroups, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TermFirstPassGroupingCollector

public TermFirstPassGroupingCollector(String groupField,
                                      Sort groupSort,
                                      int topNGroups)
                               throws IOException
Create the first pass collector.

Parameters:
groupField - The field used to group documents. This field must be single-valued and indexed (FieldCache is used to access its value per-document).
groupSort - The Sort used to sort the groups. The top sorted document within each group according to groupSort, determines how that group sorts against other groups. This must be non-null, ie, if you want to groupSort by relevance use Sort.RELEVANCE.
topNGroups - How many top groups to keep.
Throws:
IOException - When I/O related errors occur
Method Detail

getDocGroupValue

protected String getDocGroupValue(int doc)
Description copied from class: AbstractFirstPassGroupingCollector
Returns the group value for the specified doc.

Specified by:
getDocGroupValue in class AbstractFirstPassGroupingCollector<String>
Parameters:
doc - The specified doc
Returns:
the group value for the specified doc

copyDocGroupValue

protected String copyDocGroupValue(String groupValue,
                                   String reuse)
Description copied from class: AbstractFirstPassGroupingCollector
Returns a copy of the specified group value by creating a new instance and copying the value from the specified groupValue in the new instance. Or optionally the reuse argument can be used to copy the group value in.

Specified by:
copyDocGroupValue in class AbstractFirstPassGroupingCollector<String>
Parameters:
groupValue - The group value to copy
reuse - Optionally a reuse instance to prevent a new instance creation
Returns:
a copy of the specified group value

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Overrides:
setNextReader in class AbstractFirstPassGroupingCollector<String>
Parameters:
reader - next IndexReader
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermSecondPassGroupingCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class TermSecondPassGroupingCollector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector<String>
            extended by  org.apache.lucene.search.grouping.TermSecondPassGroupingCollector

public class TermSecondPassGroupingCollector
extends AbstractSecondPassGroupingCollector<String>

Concrete implementation of AbstractSecondPassGroupingCollector that groups based on field values and more specifically uses FieldCache.StringIndex to collect grouped docs.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector
AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>
Field Summary
Fields inherited from class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector
groupDocs, groupMap
Constructor Summary
TermSecondPassGroupingCollector(String groupField, Collection<SearchGroup<String>> groups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, boolean getScores, boolean getMaxScores, boolean fillSortFields)
Method Summary
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<String> | retrieveGroup(int doc) Returns the group the specified doc belongs to or null if no group could be retrieved.
void | setNextReader(IndexReader reader, int docBase) Called before collecting from each IndexReader.
Methods inherited from class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector
acceptsDocsOutOfOrder, collect, getTopGroups, setScorer
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TermSecondPassGroupingCollector

public TermSecondPassGroupingCollector(String groupField,
                                       Collection<SearchGroup<String>> groups,
                                       Sort groupSort,
                                       Sort withinGroupSort,
                                       int maxDocsPerGroup,
                                       boolean getScores,
                                       boolean getMaxScores,
                                       boolean fillSortFields)
                                throws IOException
Throws:
IOException
Method Detail

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Overrides:
setNextReader in class AbstractSecondPassGroupingCollector<String>
Parameters:
reader - next IndexReader
Throws:
IOException

retrieveGroup

protected AbstractSecondPassGroupingCollector.SearchGroupDocs<String> retrieveGroup(int doc)
                                                                             throws IOException
Description copied from class: AbstractSecondPassGroupingCollector
Returns the group the specified doc belongs to or null if no group could be retrieved.

Specified by:
retrieveGroup in class AbstractSecondPassGroupingCollector<String>
Parameters:
doc - The specified doc
Returns:
the group the specified doc belongs to or null if no group could be retrieved
Throws:
IOException - If an I/O related error occurred
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TopGroups

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.grouping
Class TopGroups<GROUP_VALUE_TYPE>

java.lang.Object
    extended by  org.apache.lucene.search.grouping.TopGroups<GROUP_VALUE_TYPE>

public class TopGroups<GROUP_VALUE_TYPE>
extends Object

Represents result returned by a grouping search.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
GroupDocs<GROUP_VALUE_TYPE>[] | groups Group results in groupSort order
SortField[] | groupSort How groups are sorted against each other
Integer | totalGroupCount The total number of unique groups.
int | totalGroupedHitCount Number of documents grouped into the topN groups
int | totalHitCount Number of documents matching the search
SortField[] | withinGroupSort How docs are sorted within each group
Constructor Summary
TopGroups(SortField[] groupSort, SortField[] withinGroupSort, int totalHitCount, int totalGroupedHitCount, GroupDocs<GROUP_VALUE_TYPE>[] groups)
TopGroups(TopGroups<GROUP_VALUE_TYPE> oldTopGroups, Integer totalGroupCount)
Method Summary
static
<T> TopGroups<T>
merge(TopGroups<T>[] shardGroups, Sort groupSort, Sort docSort, int docOffset, int docTopN)
Merges an array of TopGroups, for example obtained from the second-pass collector across multiple shards.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

totalHitCount

public final int totalHitCount
Number of documents matching the search

totalGroupedHitCount

public final int totalGroupedHitCount
Number of documents grouped into the topN groups

totalGroupCount

public final Integer totalGroupCount
The total number of unique groups. If null this value is not computed.

groups

public final GroupDocs<GROUP_VALUE_TYPE>[] groups
Group results in groupSort order

groupSort

public final SortField[] groupSort
How groups are sorted against each other

withinGroupSort

public final SortField[] withinGroupSort
How docs are sorted within each group

Constructor Detail

TopGroups

public TopGroups(SortField[] groupSort,
                 SortField[] withinGroupSort,
                 int totalHitCount,
                 int totalGroupedHitCount,
                 GroupDocs<GROUP_VALUE_TYPE>[] groups)

TopGroups

public TopGroups(TopGroups<GROUP_VALUE_TYPE> oldTopGroups,
                 Integer totalGroupCount)
Method Detail

merge

public static <T> TopGroups<T> merge(TopGroups<T>[] shardGroups,
                                     Sort groupSort,
                                     Sort docSort,
                                     int docOffset,
                                     int docTopN)
                          throws IOException
Merges an array of TopGroups, for example obtained from the second-pass collector across multiple shards. Each TopGroups must have been sorted by the same groupSort and docSort, and the top groups passed to all second-pass collectors must be the same. NOTE: We can't always compute an exact totalGroupCount. Documents belonging to a group may occur on more than one shard and thus the merged totalGroupCount can be higher than the actual totalGroupCount. In this case the totalGroupCount represents a upper bound. If the documents of one group do only reside in one shard then the totalGroupCount is exact. NOTE: the topDocs in each GroupDocs is actually an instance of TopDocsAndShards

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.GroupHead

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.GroupHead

Packages that use AbstractAllGroupHeadsCollector.GroupHead
org.apache.lucene.search.grouping This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.

Uses of AbstractAllGroupHeadsCollector.GroupHead in org.apache.lucene.search.grouping

Classes in org.apache.lucene.search.grouping with type parameters of type AbstractAllGroupHeadsCollector.GroupHead
class | AbstractAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead> This collector specializes in collecting the most relevant document (group head) for each group that match the query.
class | TermAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead> A base implementation of AbstractAllGroupHeadsCollector for retrieving the most relevant groups when grouping on a string based group field.

Fields in org.apache.lucene.search.grouping declared as AbstractAllGroupHeadsCollector.GroupHead
 GH AbstractAllGroupHeadsCollector.TemporalResult.groupHead

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector

Packages that use AbstractAllGroupHeadsCollector
org.apache.lucene.search.grouping This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.

Uses of AbstractAllGroupHeadsCollector in org.apache.lucene.search.grouping

Subclasses of AbstractAllGroupHeadsCollector in org.apache.lucene.search.grouping
 class TermAllGroupHeadsCollector<GH extends AbstractAllGroupHeadsCollector.GroupHead>
A base implementation of AbstractAllGroupHeadsCollector for retrieving the most relevant groups when grouping on a string based group field.

Methods in org.apache.lucene.search.grouping that return AbstractAllGroupHeadsCollector
static AbstractAllGroupHeadsCollector | TermAllGroupHeadsCollector.create(String groupField, Sort sortWithinGroup) Creates an AbstractAllGroupHeadsCollector instance based on the supplied arguments.
static AbstractAllGroupHeadsCollector | TermAllGroupHeadsCollector.create(String groupField, Sort sortWithinGroup, int initialSize) Creates an AbstractAllGroupHeadsCollector instance based on the supplied arguments.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.TemporalResult

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.AbstractAllGroupHeadsCollector.TemporalResult

Packages that use AbstractAllGroupHeadsCollector.TemporalResult
org.apache.lucene.search.grouping This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.

Uses of AbstractAllGroupHeadsCollector.TemporalResult in org.apache.lucene.search.grouping

Fields in org.apache.lucene.search.grouping declared as AbstractAllGroupHeadsCollector.TemporalResult
protected  AbstractAllGroupHeadsCollector.TemporalResult AbstractAllGroupHeadsCollector.temporalResult

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.grouping.AbstractAllGroupsCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.AbstractAllGroupsCollector

Packages that use AbstractAllGroupsCollector
org.apache.lucene.search.grouping This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.

Uses of AbstractAllGroupsCollector in org.apache.lucene.search.grouping

Subclasses of AbstractAllGroupsCollector in org.apache.lucene.search.grouping
 class TermAllGroupsCollector
A collector that collects all groups that match the query.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.AbstractFirstPassGroupingCollector

Packages that use AbstractFirstPassGroupingCollector
org.apache.lucene.search.grouping This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.

Uses of AbstractFirstPassGroupingCollector in org.apache.lucene.search.grouping

Subclasses of AbstractFirstPassGroupingCollector in org.apache.lucene.search.grouping
 class TermFirstPassGroupingCollector
Concrete implementation of AbstractFirstPassGroupingCollector that groups based on field values and more specifically uses FieldCache.StringIndex to collect groups.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector

Packages that use AbstractSecondPassGroupingCollector
org.apache.lucene.search.grouping This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.

Uses of AbstractSecondPassGroupingCollector in org.apache.lucene.search.grouping

Subclasses of AbstractSecondPassGroupingCollector in org.apache.lucene.search.grouping
 class TermSecondPassGroupingCollector
Concrete implementation of AbstractSecondPassGroupingCollector that groups based on field values and more specifically uses FieldCache.StringIndex to collect grouped docs.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector.SearchGroupDocs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.AbstractSecondPassGroupingCollector.SearchGroupDocs

Packages that use AbstractSecondPassGroupingCollector.SearchGroupDocs
org.apache.lucene.search.grouping This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.

Uses of AbstractSecondPassGroupingCollector.SearchGroupDocs in org.apache.lucene.search.grouping

Fields in org.apache.lucene.search.grouping declared as AbstractSecondPassGroupingCollector.SearchGroupDocs
protected  AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>[] AbstractSecondPassGroupingCollector.groupDocs

Fields in org.apache.lucene.search.grouping with type parameters of type AbstractSecondPassGroupingCollector.SearchGroupDocs
protected  Map<GROUP_VALUE_TYPE,AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE>> AbstractSecondPassGroupingCollector.groupMap

Methods in org.apache.lucene.search.grouping that return AbstractSecondPassGroupingCollector.SearchGroupDocs
protected abstract AbstractSecondPassGroupingCollector.SearchGroupDocs<GROUP_VALUE_TYPE> | AbstractSecondPassGroupingCollector.retrieveGroup(int doc) Returns the group the specified doc belongs to or null if no group could be retrieved.
protected AbstractSecondPassGroupingCollector.SearchGroupDocs<String> | TermSecondPassGroupingCollector.retrieveGroup(int doc)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.grouping.BlockGroupingCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.BlockGroupingCollector

No usage of org.apache.lucene.search.grouping.BlockGroupingCollector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.grouping.GroupDocs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.GroupDocs

Packages that use GroupDocs
org.apache.lucene.search.grouping This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.

Uses of GroupDocs in org.apache.lucene.search.grouping

Fields in org.apache.lucene.search.grouping declared as GroupDocs
 GroupDocs<GROUP_VALUE_TYPE>[] TopGroups.groups
Group results in groupSort order

Constructors in org.apache.lucene.search.grouping with parameters of type GroupDocs
TopGroups(SortField[] groupSort, SortField[] withinGroupSort, int totalHitCount, int totalGroupedHitCount, GroupDocs<GROUP_VALUE_TYPE>[] groups)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.grouping.SearchGroup

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.SearchGroup

Packages that use SearchGroup
org.apache.lucene.search.grouping This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.

Uses of SearchGroup in org.apache.lucene.search.grouping

Methods in org.apache.lucene.search.grouping that return types with arguments of type SearchGroup
 Collection<SearchGroup<GROUP_VALUE_TYPE>> AbstractFirstPassGroupingCollector.getTopGroups(int groupOffset, boolean fillFields)
Returns top groups, starting from offset.
static
<T> Collection<SearchGroup<T>>
SearchGroup.merge(List<Collection<SearchGroup<T>>> topGroups, int offset, int topN, Sort groupSort)
Merges multiple collections of top groups, for example obtained from separate index shards.

Method parameters in org.apache.lucene.search.grouping with type arguments of type SearchGroup
static
<T> Collection<SearchGroup<T>>
SearchGroup.merge(List<Collection<SearchGroup<T>>> topGroups, int offset, int topN, Sort groupSort)
Merges multiple collections of top groups, for example obtained from separate index shards.

Constructor parameters in org.apache.lucene.search.grouping with type arguments of type SearchGroup
AbstractSecondPassGroupingCollector(Collection<SearchGroup<GROUP_VALUE_TYPE>> groups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, boolean getScores, boolean getMaxScores, boolean fillSortFields)
TermSecondPassGroupingCollector(String groupField, Collection<SearchGroup<String>> groups, Sort groupSort, Sort withinGroupSort, int maxDocsPerGroup, boolean getScores, boolean getMaxScores, boolean fillSortFields)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.grouping.SentinelIntSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.SentinelIntSet

No usage of org.apache.lucene.search.grouping.SentinelIntSet

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.grouping.TermAllGroupHeadsCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.TermAllGroupHeadsCollector

No usage of org.apache.lucene.search.grouping.TermAllGroupHeadsCollector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.grouping.TermAllGroupsCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.TermAllGroupsCollector

No usage of org.apache.lucene.search.grouping.TermAllGroupsCollector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.grouping.TermFirstPassGroupingCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.TermFirstPassGroupingCollector

No usage of org.apache.lucene.search.grouping.TermFirstPassGroupingCollector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.grouping.TermSecondPassGroupingCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.TermSecondPassGroupingCollector

No usage of org.apache.lucene.search.grouping.TermSecondPassGroupingCollector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.grouping.TopGroups

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.grouping.TopGroups

Packages that use TopGroups
org.apache.lucene.search.grouping | This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.
org.apache.lucene.search.join | This modules support index-time and query-time joins.

Uses of TopGroups in org.apache.lucene.search.grouping

Methods in org.apache.lucene.search.grouping that return TopGroups
 TopGroups<GROUP_VALUE_TYPE> AbstractSecondPassGroupingCollector.getTopGroups(int withinGroupOffset)
 TopGroups BlockGroupingCollector.getTopGroups(Sort withinGroupSort, int groupOffset, int withinGroupOffset, int maxDocsPerGroup, boolean fillSortFields)
Returns the grouped results.
static
<T> TopGroups<T>
TopGroups.merge(TopGroups<T>[] shardGroups, Sort groupSort, Sort docSort, int docOffset, int docTopN)
Merges an array of TopGroups, for example obtained from the second-pass collector across multiple shards.

Methods in org.apache.lucene.search.grouping with parameters of type TopGroups
static
<T> TopGroups<T>
TopGroups.merge(TopGroups<T>[] shardGroups, Sort groupSort, Sort docSort, int docOffset, int docTopN)
Merges an array of TopGroups, for example obtained from the second-pass collector across multiple shards.

Constructors in org.apache.lucene.search.grouping with parameters of type TopGroups
TopGroups(TopGroups<GROUP_VALUE_TYPE> oldTopGroups, Integer totalGroupCount)

Uses of TopGroups in org.apache.lucene.search.join

Methods in org.apache.lucene.search.join that return TopGroups
 TopGroups<Integer> ToParentBlockJoinCollector.getTopGroups(ToParentBlockJoinQuery query, Sort withinGroupSort, int offset, int maxDocsPerGroup, int withinGroupOffset, boolean fillSortFields)
Return the TopGroups for the specified BlockJoinQuery.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


DefaultEncoder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class DefaultEncoder

java.lang.Object
    extended by  org.apache.lucene.search.highlight.DefaultEncoder
All Implemented Interfaces:
Encoder
public class DefaultEncoder
extends Object
implements Encoder

Simple Encoder implementation that does not modify the output

Constructor Summary
DefaultEncoder()
Method Summary
 String encodeText(String originalText)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DefaultEncoder

public DefaultEncoder()
Method Detail

encodeText

public String encodeText(String originalText)
Specified by:
encodeText in interface Encoder
Parameters:
originalText - The section of text being output
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Encoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Interface Encoder

All Known Implementing Classes:
DefaultEncoder, SimpleHTMLEncoder
public interface Encoder

Encodes original text. The Encoder works with the Formatter to generate output.

Method Summary
 String encodeText(String originalText)

Method Detail

encodeText

String encodeText(String originalText)
Parameters:
originalText - The section of text being output
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Formatter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Interface Formatter

All Known Implementing Classes:
GradientFormatter, SimpleHTMLFormatter, SpanGradientFormatter
public interface Formatter

Processes terms found in the original text, typically by applying some form of mark-up to highlight terms in HTML search results pages.

Method Summary
 String highlightTerm(String originalText, TokenGroup tokenGroup)

Method Detail

highlightTerm

String highlightTerm(String originalText,
                     TokenGroup tokenGroup)
Parameters:
originalText - The section of text being considered for markup
tokenGroup - contains one or several overlapping Tokens along with their scores and positions.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Fragmenter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Interface Fragmenter

All Known Implementing Classes:
NullFragmenter, SimpleFragmenter, SimpleSpanFragmenter
public interface Fragmenter

Implements the policy for breaking text into multiple fragments for consideration by the Highlighter class. A sophisticated implementation may do this on the basis of detecting end of sentences in the text.

Method Summary
boolean | isNewFragment() Test to see if this token from the stream should be held in a new TextFragment.
void | start(String originalText, TokenStream tokenStream) Initializes the Fragmenter.

Method Detail

start

void start(String originalText,
           TokenStream tokenStream)
Initializes the Fragmenter. You can grab references to the Attributes you are interested in from tokenStream and then access the values in isNewFragment().

Parameters:
originalText - the original source text
tokenStream - the TokenStream to be fragmented

isNewFragment

boolean isNewFragment()
Test to see if this token from the stream should be held in a new TextFragment. Every time this is called, the TokenStream passed to start(String, TokenStream) will have been incremented.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GradientFormatter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class GradientFormatter

java.lang.Object
    extended by  org.apache.lucene.search.highlight.GradientFormatter
All Implemented Interfaces:
Formatter
Direct Known Subclasses:
SpanGradientFormatter
public class GradientFormatter
extends Object
implements Formatter

Formats text with different color intensity depending on the score of the term.

Field Summary
protected boolean | highlightBackground
protected boolean | highlightForeground
Constructor Summary
GradientFormatter(float maxScore, String minForegroundColor, String maxForegroundColor, String minBackgroundColor, String maxBackgroundColor)
Sets the color range for the IDF scores
Method Summary
protected String | getBackgroundColorString(float score)
protected String | getForegroundColorString(float score)
static int | hexToInt(String hex) Converts a hex string into an int.
String | highlightTerm(String originalText, TokenGroup tokenGroup)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

highlightForeground

protected boolean highlightForeground

highlightBackground

protected boolean highlightBackground
Constructor Detail

GradientFormatter

public GradientFormatter(float maxScore,
                         String minForegroundColor,
                         String maxForegroundColor,
                         String minBackgroundColor,
                         String maxBackgroundColor)
Sets the color range for the IDF scores

Parameters:
maxScore - The score (and above) displayed as maxColor (See QueryScorer.getMaxWeight which can be used to calibrate scoring scale)
minForegroundColor - The hex color used for representing IDF scores of zero eg #FFFFFF (white) or null if no foreground color required
maxForegroundColor - The largest hex color used for representing IDF scores eg #000000 (black) or null if no foreground color required
minBackgroundColor - The hex color used for representing IDF scores of zero eg #FFFFFF (white) or null if no background color required
maxBackgroundColor - The largest hex color used for representing IDF scores eg #000000 (black) or null if no background color required
Method Detail

highlightTerm

public String highlightTerm(String originalText,
                            TokenGroup tokenGroup)
Specified by:
highlightTerm in interface Formatter
Parameters:
originalText - The section of text being considered for markup
tokenGroup - contains one or several overlapping Tokens along with their scores and positions.

getForegroundColorString

protected String getForegroundColorString(float score)

getBackgroundColorString

protected String getBackgroundColorString(float score)

hexToInt

public static final int hexToInt(String hex)
Converts a hex string into an int. Integer.parseInt(hex, 16) assumes the input is nonnegative unless there is a preceding minus sign. This method reads the input as twos complement instead, so if the input is 8 bytes long, it will correctly restore a negative int produced by Integer.toHexString() but not necessarily one produced by Integer.toString(x,16) since that method will produce a string like '-FF' for negative integer values.

Parameters:
hex - A string in capital or lower case hex, of no more then 16 characters.
Throws:
NumberFormatException - if the string is more than 16 characters long, or if any character is not in the set [0-9a-fA-f]
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Highlighter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class Highlighter

java.lang.Object
    extended by  org.apache.lucene.search.highlight.Highlighter

public class Highlighter
extends Object

Class used to markup highlighted terms found in the best sections of a text, using configurable Fragmenter, Scorer, Formatter, Encoder and tokenizers.

Field Summary
static int DEFAULT_MAX_CHARS_TO_ANALYZE
Constructor Summary
Highlighter(Formatter formatter, Encoder encoder, Scorer fragmentScorer)
Highlighter(Formatter formatter, Scorer fragmentScorer)
Highlighter(Scorer fragmentScorer)
Method Summary
String | getBestFragment(Analyzer analyzer, String fieldName, String text) Highlights chosen terms in a text, extracting the most relevant section.
String | getBestFragment(TokenStream tokenStream, String text) Highlights chosen terms in a text, extracting the most relevant section.
String[] | getBestFragments(Analyzer analyzer, String fieldName, String text, int maxNumFragments) Highlights chosen terms in a text, extracting the most relevant sections.
String[] | getBestFragments(TokenStream tokenStream, String text, int maxNumFragments) Highlights chosen terms in a text, extracting the most relevant sections.
String | getBestFragments(TokenStream tokenStream, String text, int maxNumFragments, String separator) Highlights terms in the text , extracting the most relevant sections and concatenating the chosen fragments with a separator (typically "...").
TextFragment[] | getBestTextFragments(TokenStream tokenStream, String text, boolean mergeContiguousFragments, int maxNumFragments) Low level api to get the most relevant (formatted) sections of the document.
Encoder | getEncoder()
Scorer | getFragmentScorer()
int | getMaxDocCharsToAnalyze()
Fragmenter | getTextFragmenter()
void | setEncoder(Encoder encoder)
void | setFragmentScorer(Scorer scorer)
void | setMaxDocCharsToAnalyze(int maxDocCharsToAnalyze)
void | setTextFragmenter(Fragmenter fragmenter)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_MAX_CHARS_TO_ANALYZE

public static final int DEFAULT_MAX_CHARS_TO_ANALYZE
See Also:
Constant Field Values
Constructor Detail

Highlighter

public Highlighter(Scorer fragmentScorer)

Highlighter

public Highlighter(Formatter formatter,
                   Scorer fragmentScorer)

Highlighter

public Highlighter(Formatter formatter,
                   Encoder encoder,
                   Scorer fragmentScorer)
Method Detail

getBestFragment

public final String getBestFragment(Analyzer analyzer,
                                    String fieldName,
                                    String text)
                             throws IOException,
                                    InvalidTokenOffsetsException
Highlights chosen terms in a text, extracting the most relevant section. This is a convenience method that calls getBestFragment(TokenStream, String)

Parameters:
analyzer - the analyzer that will be used to split text into chunks
text - text to highlight terms in
fieldName - Name of field used to influence analyzer's tokenization policy
Returns:
highlighted text fragment or null if no terms found
Throws:
InvalidTokenOffsetsException - thrown if any token's endOffset exceeds the provided text's length
IOException

getBestFragment

public final String getBestFragment(TokenStream tokenStream,
                                    String text)
                             throws IOException,
                                    InvalidTokenOffsetsException
Highlights chosen terms in a text, extracting the most relevant section. The document text is analysed in chunks to record hit statistics across the document. After accumulating stats, the fragment with the highest score is returned

Parameters:
tokenStream - a stream of tokens identified in the text parameter, including offset information. This is typically produced by an analyzer re-parsing a document's text. Some work may be done on retrieving TokenStreams more efficiently by adding support for storing original text position data in the Lucene index but this support is not currently available (as of Lucene 1.4 rc2).
text - text to highlight terms in
Returns:
highlighted text fragment or null if no terms found
Throws:
InvalidTokenOffsetsException - thrown if any token's endOffset exceeds the provided text's length
IOException

getBestFragments

public final String[] getBestFragments(Analyzer analyzer,
                                       String fieldName,
                                       String text,
                                       int maxNumFragments)
                                throws IOException,
                                       InvalidTokenOffsetsException
Highlights chosen terms in a text, extracting the most relevant sections. This is a convenience method that calls getBestFragments(TokenStream, String, int)

Parameters:
analyzer - the analyzer that will be used to split text into chunks
fieldName - the name of the field being highlighted (used by analyzer)
text - text to highlight terms in
maxNumFragments - the maximum number of fragments.
Returns:
highlighted text fragments (between 0 and maxNumFragments number of fragments)
Throws:
InvalidTokenOffsetsException - thrown if any token's endOffset exceeds the provided text's length
IOException

getBestFragments

public final String[] getBestFragments(TokenStream tokenStream,
                                       String text,
                                       int maxNumFragments)
                                throws IOException,
                                       InvalidTokenOffsetsException
Highlights chosen terms in a text, extracting the most relevant sections. The document text is analysed in chunks to record hit statistics across the document. After accumulating stats, the fragments with the highest scores are returned as an array of strings in order of score (contiguous fragments are merged into one in their original order to improve readability)

Parameters:
text - text to highlight terms in
maxNumFragments - the maximum number of fragments.
Returns:
highlighted text fragments (between 0 and maxNumFragments number of fragments)
Throws:
InvalidTokenOffsetsException - thrown if any token's endOffset exceeds the provided text's length
IOException

getBestTextFragments

public final TextFragment[] getBestTextFragments(TokenStream tokenStream,
                                                 String text,
                                                 boolean mergeContiguousFragments,
                                                 int maxNumFragments)
                                          throws IOException,
                                                 InvalidTokenOffsetsException
Low level api to get the most relevant (formatted) sections of the document. This method has been made public to allow visibility of score information held in TextFragment objects. Thanks to Jason Calabrese for help in redefining the interface.

Parameters:
tokenStream -
text -
maxNumFragments -
mergeContiguousFragments -
Throws:
IOException
InvalidTokenOffsetsException - thrown if any token's endOffset exceeds the provided text's length

getBestFragments

public final String getBestFragments(TokenStream tokenStream,
                                     String text,
                                     int maxNumFragments,
                                     String separator)
                              throws IOException,
                                     InvalidTokenOffsetsException
Highlights terms in the text , extracting the most relevant sections and concatenating the chosen fragments with a separator (typically "..."). The document text is analysed in chunks to record hit statistics across the document. After accumulating stats, the fragments with the highest scores are returned in order as "separator" delimited strings.

Parameters:
text - text to highlight terms in
maxNumFragments - the maximum number of fragments.
separator - the separator used to intersperse the document fragments (typically "...")
Returns:
highlighted text
Throws:
InvalidTokenOffsetsException - thrown if any token's endOffset exceeds the provided text's length
IOException

getMaxDocCharsToAnalyze

public int getMaxDocCharsToAnalyze()

setMaxDocCharsToAnalyze

public void setMaxDocCharsToAnalyze(int maxDocCharsToAnalyze)

getTextFragmenter

public Fragmenter getTextFragmenter()

setTextFragmenter

public void setTextFragmenter(Fragmenter fragmenter)
Parameters:
fragmenter -

getFragmentScorer

public Scorer getFragmentScorer()
Returns:
Object used to score each text fragment

setFragmentScorer

public void setFragmentScorer(Scorer scorer)
Parameters:
scorer -

getEncoder

public Encoder getEncoder()

setEncoder

public void setEncoder(Encoder encoder)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidTokenOffsetsException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class InvalidTokenOffsetsException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  org.apache.lucene.search.highlight.InvalidTokenOffsetsException
All Implemented Interfaces:
Serializable
public class InvalidTokenOffsetsException
extends Exception

Exception thrown if TokenStream Tokens are incompatible with provided text

See Also:
Serialized Form

Constructor Summary
InvalidTokenOffsetsException(String message)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidTokenOffsetsException

public InvalidTokenOffsetsException(String message)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NullFragmenter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class NullFragmenter

java.lang.Object
    extended by  org.apache.lucene.search.highlight.NullFragmenter
All Implemented Interfaces:
Fragmenter
public class NullFragmenter
extends Object
implements Fragmenter

Fragmenter implementation which does not fragment the text. This is useful for highlighting the entire content of a document or field.

Constructor Summary
NullFragmenter()
Method Summary
boolean | isNewFragment() Test to see if this token from the stream should be held in a new TextFragment.
void | start(String s, TokenStream tokenStream) Initializes the Fragmenter.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NullFragmenter

public NullFragmenter()
Method Detail

start

public void start(String s,
                  TokenStream tokenStream)
Description copied from interface: Fragmenter
Initializes the Fragmenter. You can grab references to the Attributes you are interested in from tokenStream and then access the values in Fragmenter.isNewFragment().

Specified by:
start in interface Fragmenter
Parameters:
s - the original source text
tokenStream - the TokenStream to be fragmented

isNewFragment

public boolean isNewFragment()
Description copied from interface: Fragmenter
Test to see if this token from the stream should be held in a new TextFragment. Every time this is called, the TokenStream passed to start(String, TokenStream) will have been incremented.

Specified by:
isNewFragment in interface Fragmenter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OffsetLimitTokenFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class OffsetLimitTokenFilter

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.analysis.TokenFilter
                extended by  org.apache.lucene.search.highlight.OffsetLimitTokenFilter
All Implemented Interfaces:
Closeable
public final class OffsetLimitTokenFilter
extends TokenFilter

This TokenFilter limits the number of tokens while indexing by adding up the current offset.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
Constructor Summary
OffsetLimitTokenFilter(TokenStream input, int offsetLimit)
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Reset the filter as well as the input TokenStream.
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

OffsetLimitTokenFilter

public OffsetLimitTokenFilter(TokenStream input,
                              int offsetLimit)
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenFilter
Reset the filter as well as the input TokenStream.

Overrides:
reset in class TokenFilter
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.search.highlight
Interfaces
Encoder
Formatter
Fragmenter
Scorer
Classes
DefaultEncoder
GradientFormatter
Highlighter
NullFragmenter
OffsetLimitTokenFilter
PositionSpan
QueryScorer
QueryTermExtractor
QueryTermScorer
SimpleFragmenter
SimpleHTMLEncoder
SimpleHTMLFormatter
SimpleSpanFragmenter
SpanGradientFormatter
TextFragment
TokenGroup
TokenSources
TokenStreamFromTermPositionVector
WeightedSpanTerm
WeightedSpanTermExtractor
WeightedSpanTermExtractor.PositionCheckingMap
WeightedTerm
Exceptions
InvalidTokenOffsetsException


org.apache.lucene.search.highlight

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.search.highlight

The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

See:
Description

Interface Summary
Encoder | Encodes original text.
Formatter | Processes terms found in the original text, typically by applying some form of mark-up to highlight terms in HTML search results pages.
Fragmenter | Implements the policy for breaking text into multiple fragments for consideration by the Highlighter class.
Scorer | A Scorer is responsible for scoring a stream of tokens.

Class Summary
DefaultEncoder | Simple Encoder implementation that does not modify the output
GradientFormatter | Formats text with different color intensity depending on the score of the term.
Highlighter | Class used to markup highlighted terms found in the best sections of a text, using configurable Fragmenter, Scorer, Formatter, Encoder and tokenizers.
NullFragmenter | Fragmenter implementation which does not fragment the text.
OffsetLimitTokenFilter | This TokenFilter limits the number of tokens while indexing by adding up the current offset.
PositionSpan | Utility class to record Positions Spans
QueryScorer | Scorer implementation which scores text fragments by the number of unique query terms found.
QueryTermExtractor | Utility class used to extract the terms used in a query, plus any weights.
QueryTermScorer | Scorer implementation which scores text fragments by the number of unique query terms found.
SimpleFragmenter | Fragmenter implementation which breaks text up into same-size fragments with no concerns over spotting sentence boundaries.
SimpleHTMLEncoder | Simple Encoder implementation to escape text for HTML output
SimpleHTMLFormatter | Simple Formatter implementation to highlight terms with a pre and post tag.
SimpleSpanFragmenter | Fragmenter implementation which breaks text up into same-size fragments but does not split up Spans.
SpanGradientFormatter | Formats text with different color intensity depending on the score of the term using the span tag.
TextFragment | Low-level class used to record information about a section of a document with a score.
TokenGroup | One, or several overlapping tokens, along with the score(s) and the scope of the original text
TokenSources | Hides implementation issues associated with obtaining a TokenStream for use with the higlighter - can obtain from TermFreqVectors with offsets and (optionally) positions or from Analyzer class reparsing the stored content.
TokenStreamFromTermPositionVector |
WeightedSpanTerm | Lightweight class to hold term, weight, and positions used for scoring this term.
WeightedSpanTermExtractor | Class used to extract WeightedSpanTerms from a Query based on whether Terms from the Query are contained in a supplied TokenStream.
WeightedSpanTermExtractor.PositionCheckingMap<K> | This class makes sure that if both position sensitive and insensitive versions of the same term are added, the position insensitive one wins.
WeightedTerm | Lightweight class to hold term and a weight value used for scoring this term

Exception Summary
InvalidTokenOffsetsException Exception thrown if TokenStream Tokens are incompatible with provided text

Package org.apache.lucene.search.highlight Description

The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages. The Highlighter class is the central component and can be used to extract the most interesting sections of a piece of text and highlight them, with the help of Fragmenter, fragment Scorer, and Formatter classes.

Example Usage

  //... Above, create documents with two fields, one with term vectors (tv) and one without (notv)
  IndexSearcher searcher = new IndexSearcher(directory);
  QueryParser parser = new QueryParser("notv", analyzer);
  Query query = parser.parse("million");

  TopDocs hits = searcher.search(query, 10);

  SimpleHTMLFormatter htmlFormatter = new SimpleHTMLFormatter();
  Highlighter highlighter = new Highlighter(htmlFormatter, new QueryScorer(query));
  for (int i = 0; i < 10; i++) {
    int id = hits.scoreDocs[i].doc;
    Document doc = searcher.doc(id);
    String text = doc.get("notv");
    TokenStream tokenStream = TokenSources.getAnyTokenStream(searcher.getIndexReader(), id, "notv", analyzer);
    TextFragment[] frag = highlighter.getBestTextFragments(tokenStream, text, false, 10);//highlighter.getBestFragments(tokenStream, text, 3, "...");
    for (int j = 0; j < frag.length; j++) {
      if ((frag[j] != null) && (frag[j].getScore() > 0)) {
        System.out.println((frag[j].toString()));
      }
    }
    //Term vector
    text = doc.get("tv");
    tokenStream = TokenSources.getAnyTokenStream(searcher.getIndexReader(), hits.scoreDocs[i].doc, "tv", analyzer);
    frag = highlighter.getBestTextFragments(tokenStream, text, false, 10);
    for (int j = 0; j < frag.length; j++) {
      if ((frag[j] != null) && (frag[j].getScore() > 0)) {
        System.out.println((frag[j].toString()));
      }
    }
    System.out.println("-------------");
  }

New features 06/02/2005

This release adds options for encoding (thanks to Nicko Cadell). An "Encoder" implementation such as the new SimpleHTMLEncoder class can be passed to the highlighter to encode all those non-xhtml standard characters such as & into legal values. This simple class may not suffice for some languages - Commons Lang has an implementation that could be used: escapeHtml(String) in http://svn.apache.org/viewcvs.cgi/jakarta/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringEscapeUtils.java?rev=137958&view=markup

New features 22/12/2004

This release adds some new capabilities:
  1. Faster highlighting using Term vector support
  2. New formatting options to use color intensity to show informational value
  3. Options for better summarization by using term IDF scores to influence fragment selection

The highlighter takes a TokenStream as input. Until now these streams have typically been produced using an Analyzer but the new class TokenSources provides helper methods for obtaining TokenStreams from the new TermVector position support (see latest CVS version).

The new class GradientFormatter can use a scale of colors to highlight terms according to their score. A subtle use of color can help emphasise the reasons for matching (useful when doing "MoreLikeThis" queries and you want to see what the basis of the similarities are).

The QueryScorer class has a new constructor which can use an IndexReader to derive the IDF (inverse document frequency) for each term in order to influence the score. This is useful for helping to extracting the most significant sections of a document and in supplying scores used by the new GradientFormatter to color significant words more strongly. The QueryScorer.getMaxWeight method is useful when passed to the GradientFormatter constructor to define the top score which is associated with the top color.


org.apache.lucene.search.highlight Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.search.highlight

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • java.util.AbstractMap<K,V> (implements java.util.Map<K,V>)
      • java.util.HashMap<K,V> (implements java.lang.Cloneable, java.util.Map<K,V>, java.io.Serializable)
        • org.apache.lucene.search.highlight.WeightedSpanTermExtractor.PositionCheckingMap<K>
    • org.apache.lucene.util.AttributeSource
      • org.apache.lucene.analysis.TokenStream (implements java.io.Closeable)
        • org.apache.lucene.analysis.TokenFilter
          • org.apache.lucene.search.highlight.OffsetLimitTokenFilter
        • org.apache.lucene.search.highlight.TokenStreamFromTermPositionVector
    • org.apache.lucene.search.highlight.DefaultEncoder (implements org.apache.lucene.search.highlight.Encoder)
    • org.apache.lucene.search.highlight.GradientFormatter (implements org.apache.lucene.search.highlight.Formatter)
      • org.apache.lucene.search.highlight.SpanGradientFormatter
    • org.apache.lucene.search.highlight.Highlighter
    • org.apache.lucene.search.highlight.NullFragmenter (implements org.apache.lucene.search.highlight.Fragmenter)
    • org.apache.lucene.search.highlight.PositionSpan
    • org.apache.lucene.search.highlight.QueryScorer (implements org.apache.lucene.search.highlight.Scorer)
    • org.apache.lucene.search.highlight.QueryTermExtractor
    • org.apache.lucene.search.highlight.QueryTermScorer (implements org.apache.lucene.search.highlight.Scorer)
    • org.apache.lucene.search.highlight.SimpleFragmenter (implements org.apache.lucene.search.highlight.Fragmenter)
    • org.apache.lucene.search.highlight.SimpleHTMLEncoder (implements org.apache.lucene.search.highlight.Encoder)
    • org.apache.lucene.search.highlight.SimpleHTMLFormatter (implements org.apache.lucene.search.highlight.Formatter)
    • org.apache.lucene.search.highlight.SimpleSpanFragmenter (implements org.apache.lucene.search.highlight.Fragmenter)
    • org.apache.lucene.search.highlight.TextFragment
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.apache.lucene.search.highlight.InvalidTokenOffsetsException
    • org.apache.lucene.search.highlight.TokenGroup
    • org.apache.lucene.search.highlight.TokenSources
    • org.apache.lucene.search.highlight.WeightedSpanTermExtractor
    • org.apache.lucene.search.highlight.WeightedTerm
      • org.apache.lucene.search.highlight.WeightedSpanTerm

Interface Hierarchy

  • org.apache.lucene.search.highlight.Encoder
  • org.apache.lucene.search.highlight.Formatter
  • org.apache.lucene.search.highlight.Fragmenter
  • org.apache.lucene.search.highlight.Scorer


Uses of Package org.apache.lucene.search.highlight

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.search.highlight

Packages that use org.apache.lucene.search.highlight
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.search.vectorhighlight | This is an another highlighter implementation.

Classes in org.apache.lucene.search.highlight used by org.apache.lucene.benchmark.byTask.tasks
Highlighter
Class used to markup highlighted terms found in the best sections of a text, using configurable Fragmenter, Scorer, Formatter, Encoder and tokenizers.

Classes in org.apache.lucene.search.highlight used by org.apache.lucene.search.highlight
Encoder
Encodes original text.
Formatter
Processes terms found in the original text, typically by applying some form of mark-up to highlight terms in HTML search results pages.
Fragmenter
Implements the policy for breaking text into multiple fragments for consideration by the Highlighter class.
GradientFormatter
Formats text with different color intensity depending on the score of the term.
InvalidTokenOffsetsException
Exception thrown if TokenStream Tokens are incompatible with provided text
PositionSpan
Utility class to record Positions Spans
QueryScorer
Scorer implementation which scores text fragments by the number of unique query terms found.
Scorer
A Scorer is responsible for scoring a stream of tokens.
TextFragment
Low-level class used to record information about a section of a document with a score.
TokenGroup
One, or several overlapping tokens, along with the score(s) and the scope of the original text
WeightedSpanTerm
Lightweight class to hold term, weight, and positions used for scoring this term.
WeightedSpanTermExtractor
Class used to extract WeightedSpanTerms from a Query based on whether Terms from the Query are contained in a supplied TokenStream.
WeightedTerm
Lightweight class to hold term and a weight value used for scoring this term

Classes in org.apache.lucene.search.highlight used by org.apache.lucene.search.vectorhighlight
Encoder
Encodes original text.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PositionSpan

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class PositionSpan

java.lang.Object
    extended by  org.apache.lucene.search.highlight.PositionSpan

public class PositionSpan
extends Object

Utility class to record Positions Spans

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
PositionSpan(int start, int end)
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PositionSpan

public PositionSpan(int start,
                    int end)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryScorer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class QueryScorer

java.lang.Object
    extended by  org.apache.lucene.search.highlight.QueryScorer
All Implemented Interfaces:
Scorer
public class QueryScorer
extends Object
implements Scorer

Scorer implementation which scores text fragments by the number of unique query terms found. This class converts appropriate Querys to SpanQuerys and attempts to score only those terms that participated in generating the 'hit' on the document.

Constructor Summary
QueryScorer(Query query)
QueryScorer(Query query, IndexReader reader, String field)
QueryScorer(Query query, IndexReader reader, String field, String defaultField)
QueryScorer(Query query, String field)
QueryScorer(Query query, String field, String defaultField)
QueryScorer(WeightedSpanTerm[] weightedTerms)
Method Summary
 float getFragmentScore()
Called when the Highlighter has no more tokens for the current fragment - the Scorer returns the weighting it has derived for the most recent fragment, typically based on the results of Scorer.getTokenScore().
 float getMaxTermWeight()
 float getTokenScore()
Called for each token in the current fragment.
 WeightedSpanTerm getWeightedSpanTerm(String token)
Retrieve the WeightedSpanTerm for the specified token.
 TokenStream init(TokenStream tokenStream)
Called to init the Scorer with a TokenStream.
 boolean isExpandMultiTermQuery()
protected  WeightedSpanTermExtractor newTermExtractor(String defaultField)
 void setExpandMultiTermQuery(boolean expandMultiTermQuery)
Controls whether or not multi-term queries are expanded against a MemoryIndex IndexReader.
 void setMaxDocCharsToAnalyze(int maxDocCharsToAnalyze)
 void setWrapIfNotCachingTokenFilter(boolean wrap)
By default, TokenStreams that are not of the type CachingTokenFilter are wrapped in a CachingTokenFilter to ensure an efficient reset - if you are already using a different caching TokenStream impl and you don't want it to be wrapped, set this to false.
 void startFragment(TextFragment newFragment)
Called when a new fragment is started for consideration.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

QueryScorer

public QueryScorer(Query query)
Parameters:
query - Query to use for highlighting

QueryScorer

public QueryScorer(Query query,
                   String field)
Parameters:
query - Query to use for highlighting
field - Field to highlight - pass null to ignore fields

QueryScorer

public QueryScorer(Query query,
                   IndexReader reader,
                   String field)
Parameters:
query - Query to use for highlighting
field - Field to highlight - pass null to ignore fields
reader - IndexReader to use for quasi tf/idf scoring

QueryScorer

public QueryScorer(Query query,
                   IndexReader reader,
                   String field,
                   String defaultField)
Parameters:
query - to use for highlighting
reader - IndexReader to use for quasi tf/idf scoring
field - to highlight - pass null to ignore fields
defaultField -

QueryScorer

public QueryScorer(Query query,
                   String field,
                   String defaultField)
Parameters:
defaultField - - The default field for queries with the field name unspecified

QueryScorer

public QueryScorer(WeightedSpanTerm[] weightedTerms)
Parameters:
weightedTerms - an array of pre-created WeightedSpanTerms
Method Detail

getFragmentScore

public float getFragmentScore()
Description copied from interface: Scorer
Called when the Highlighter has no more tokens for the current fragment - the Scorer returns the weighting it has derived for the most recent fragment, typically based on the results of Scorer.getTokenScore().

Specified by:
getFragmentScore in interface Scorer

getMaxTermWeight

public float getMaxTermWeight()
Returns:
The highest weighted term (useful for passing to GradientFormatter to set top end of coloring scale).

getTokenScore

public float getTokenScore()
Description copied from interface: Scorer
Called for each token in the current fragment. The Highlighter will increment the TokenStream passed to init on every call.

Specified by:
getTokenScore in interface Scorer
Returns:
a score which is passed to the Highlighter class to influence the mark-up of the text (this return value is NOT used to score the fragment)

init

public TokenStream init(TokenStream tokenStream)
                 throws IOException
Description copied from interface: Scorer
Called to init the Scorer with a TokenStream. You can grab references to the attributes you are interested in here and access them from Scorer.getTokenScore().

Specified by:
init in interface Scorer
Parameters:
tokenStream - the TokenStream that will be scored.
Returns:
either a TokenStream that the Highlighter should continue using (eg if you read the tokenSream in this method) or null to continue using the same TokenStream that was passed in.
Throws:
IOException

getWeightedSpanTerm

public WeightedSpanTerm getWeightedSpanTerm(String token)
Retrieve the WeightedSpanTerm for the specified token. Useful for passing Span information to a Fragmenter.

Parameters:
token - to get WeightedSpanTerm for
Returns:
WeightedSpanTerm for token

newTermExtractor

protected WeightedSpanTermExtractor newTermExtractor(String defaultField)

startFragment

public void startFragment(TextFragment newFragment)
Description copied from interface: Scorer
Called when a new fragment is started for consideration.

Specified by:
startFragment in interface Scorer
Parameters:
newFragment - the fragment that will be scored next

isExpandMultiTermQuery

public boolean isExpandMultiTermQuery()
Returns:
true if multi-term queries should be expanded

setExpandMultiTermQuery

public void setExpandMultiTermQuery(boolean expandMultiTermQuery)
Controls whether or not multi-term queries are expanded against a MemoryIndex IndexReader.

Parameters:
expandMultiTermQuery - true if multi-term queries should be expanded

setWrapIfNotCachingTokenFilter

public void setWrapIfNotCachingTokenFilter(boolean wrap)
By default, TokenStreams that are not of the type CachingTokenFilter are wrapped in a CachingTokenFilter to ensure an efficient reset - if you are already using a different caching TokenStream impl and you don't want it to be wrapped, set this to false.

Parameters:
wrap -

setMaxDocCharsToAnalyze

public void setMaxDocCharsToAnalyze(int maxDocCharsToAnalyze)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryTermExtractor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class QueryTermExtractor

java.lang.Object
    extended by  org.apache.lucene.search.highlight.QueryTermExtractor

public final class QueryTermExtractor
extends Object

Utility class used to extract the terms used in a query, plus any weights. This class will not find terms for MultiTermQuery, TermRangeQuery and PrefixQuery classes so the caller must pass a rewritten query (see Query.rewrite) to obtain a list of expanded terms.

Constructor Summary
QueryTermExtractor()
Method Summary
static WeightedTerm[] | getIdfWeightedTerms(Query query, IndexReader reader, String fieldName) Extracts all terms texts of a given Query into an array of WeightedTerms
static WeightedTerm[] | getTerms(Query query) Extracts all terms texts of a given Query into an array of WeightedTerms
static WeightedTerm[] | getTerms(Query query, boolean prohibited) Extracts all terms texts of a given Query into an array of WeightedTerms
static WeightedTerm[] | getTerms(Query query, boolean prohibited, String fieldName) Extracts all terms texts of a given Query into an array of WeightedTerms
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

QueryTermExtractor

public QueryTermExtractor()
Method Detail

getTerms

public static final WeightedTerm[] getTerms(Query query)
Extracts all terms texts of a given Query into an array of WeightedTerms

Parameters:
query - Query to extract term texts from
Returns:
an array of the terms used in a query, plus their weights.

getIdfWeightedTerms

public static final WeightedTerm[] getIdfWeightedTerms(Query query,
                                                       IndexReader reader,
                                                       String fieldName)
Extracts all terms texts of a given Query into an array of WeightedTerms

Parameters:
query - Query to extract term texts from
reader - used to compute IDF which can be used to a) score selected fragments better b) use graded highlights eg changing intensity of font color
fieldName - the field on which Inverse Document Frequency (IDF) calculations are based
Returns:
an array of the terms used in a query, plus their weights.

getTerms

public static final WeightedTerm[] getTerms(Query query,
                                            boolean prohibited,
                                            String fieldName)
Extracts all terms texts of a given Query into an array of WeightedTerms

Parameters:
query - Query to extract term texts from
prohibited - true to extract "prohibited" terms, too
fieldName - The fieldName used to filter query terms
Returns:
an array of the terms used in a query, plus their weights.

getTerms

public static final WeightedTerm[] getTerms(Query query,
                                            boolean prohibited)
Extracts all terms texts of a given Query into an array of WeightedTerms

Parameters:
query - Query to extract term texts from
prohibited - true to extract "prohibited" terms, too
Returns:
an array of the terms used in a query, plus their weights.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryTermScorer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class QueryTermScorer

java.lang.Object
    extended by  org.apache.lucene.search.highlight.QueryTermScorer
All Implemented Interfaces:
Scorer
public class QueryTermScorer
extends Object
implements Scorer

Scorer implementation which scores text fragments by the number of unique query terms found. This class uses the QueryTermExtractor class to process determine the query terms and their boosts to be used.

Constructor Summary
QueryTermScorer(Query query)
QueryTermScorer(Query query, IndexReader reader, String fieldName)
QueryTermScorer(Query query, String fieldName)
QueryTermScorer(WeightedTerm[] weightedTerms)
Method Summary
 void allFragmentsProcessed()
 float getFragmentScore()
Called when the Highlighter has no more tokens for the current fragment - the Scorer returns the weighting it has derived for the most recent fragment, typically based on the results of Scorer.getTokenScore().
 float getMaxTermWeight()
 float getTokenScore()
Called for each token in the current fragment.
 TokenStream init(TokenStream tokenStream)
Called to init the Scorer with a TokenStream.
 void startFragment(TextFragment newFragment)
Called when a new fragment is started for consideration.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

QueryTermScorer

public QueryTermScorer(Query query)
Parameters:
query - a Lucene query (ideally rewritten using query.rewrite before being passed to this class and the searcher)

QueryTermScorer

public QueryTermScorer(Query query,
                       String fieldName)
Parameters:
query - a Lucene query (ideally rewritten using query.rewrite before being passed to this class and the searcher)
fieldName - the Field name which is used to match Query terms

QueryTermScorer

public QueryTermScorer(Query query,
                       IndexReader reader,
                       String fieldName)
Parameters:
query - a Lucene query (ideally rewritten using query.rewrite before being passed to this class and the searcher)
reader - used to compute IDF which can be used to a) score selected fragments better b) use graded highlights eg set font color intensity
fieldName - the field on which Inverse Document Frequency (IDF) calculations are based

QueryTermScorer

public QueryTermScorer(WeightedTerm[] weightedTerms)
Method Detail

init

public TokenStream init(TokenStream tokenStream)
Description copied from interface: Scorer
Called to init the Scorer with a TokenStream. You can grab references to the attributes you are interested in here and access them from Scorer.getTokenScore().

Specified by:
init in interface Scorer
Parameters:
tokenStream - the TokenStream that will be scored.
Returns:
either a TokenStream that the Highlighter should continue using (eg if you read the tokenSream in this method) or null to continue using the same TokenStream that was passed in.

startFragment

public void startFragment(TextFragment newFragment)
Description copied from interface: Scorer
Called when a new fragment is started for consideration.

Specified by:
startFragment in interface Scorer
Parameters:
newFragment - the fragment that will be scored next

getTokenScore

public float getTokenScore()
Description copied from interface: Scorer
Called for each token in the current fragment. The Highlighter will increment the TokenStream passed to init on every call.

Specified by:
getTokenScore in interface Scorer
Returns:
a score which is passed to the Highlighter class to influence the mark-up of the text (this return value is NOT used to score the fragment)

getFragmentScore

public float getFragmentScore()
Description copied from interface: Scorer
Called when the Highlighter has no more tokens for the current fragment - the Scorer returns the weighting it has derived for the most recent fragment, typically based on the results of Scorer.getTokenScore().

Specified by:
getFragmentScore in interface Scorer

allFragmentsProcessed

public void allFragmentsProcessed()

getMaxTermWeight

public float getMaxTermWeight()
Returns:
The highest weighted term (useful for passing to GradientFormatter to set top end of coloring scale.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Scorer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Interface Scorer

All Known Implementing Classes:
QueryScorer, QueryTermScorer
public interface Scorer

A Scorer is responsible for scoring a stream of tokens. These token scores can then be used to compute TextFragment scores.

Method Summary
 float getFragmentScore()
Called when the Highlighter has no more tokens for the current fragment - the Scorer returns the weighting it has derived for the most recent fragment, typically based on the results of getTokenScore().
 float getTokenScore()
Called for each token in the current fragment.
 TokenStream init(TokenStream tokenStream)
Called to init the Scorer with a TokenStream.
 void startFragment(TextFragment newFragment)
Called when a new fragment is started for consideration.

Method Detail

init

TokenStream init(TokenStream tokenStream)
                 throws IOException
Called to init the Scorer with a TokenStream. You can grab references to the attributes you are interested in here and access them from getTokenScore().

Parameters:
tokenStream - the TokenStream that will be scored.
Returns:
either a TokenStream that the Highlighter should continue using (eg if you read the tokenSream in this method) or null to continue using the same TokenStream that was passed in.
Throws:
IOException

startFragment

void startFragment(TextFragment newFragment)
Called when a new fragment is started for consideration.

Parameters:
newFragment - the fragment that will be scored next

getTokenScore

float getTokenScore()
Called for each token in the current fragment. The Highlighter will increment the TokenStream passed to init on every call.

Returns:
a score which is passed to the Highlighter class to influence the mark-up of the text (this return value is NOT used to score the fragment)

getFragmentScore

float getFragmentScore()
Called when the Highlighter has no more tokens for the current fragment - the Scorer returns the weighting it has derived for the most recent fragment, typically based on the results of getTokenScore().

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleFragmenter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class SimpleFragmenter

java.lang.Object
    extended by  org.apache.lucene.search.highlight.SimpleFragmenter
All Implemented Interfaces:
Fragmenter
public class SimpleFragmenter
extends Object
implements Fragmenter

Fragmenter implementation which breaks text up into same-size fragments with no concerns over spotting sentence boundaries.

Constructor Summary
SimpleFragmenter()
SimpleFragmenter(int fragmentSize)
Method Summary
int | getFragmentSize()
boolean | isNewFragment() Test to see if this token from the stream should be held in a new TextFragment.
void | setFragmentSize(int size)
void | start(String originalText, TokenStream stream) Initializes the Fragmenter.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SimpleFragmenter

public SimpleFragmenter()

SimpleFragmenter

public SimpleFragmenter(int fragmentSize)
Parameters:
fragmentSize - size in number of characters of each fragment
Method Detail

start

public void start(String originalText,
                  TokenStream stream)
Description copied from interface: Fragmenter
Initializes the Fragmenter. You can grab references to the Attributes you are interested in from tokenStream and then access the values in Fragmenter.isNewFragment().

Specified by:
start in interface Fragmenter
Parameters:
originalText - the original source text
stream - the TokenStream to be fragmented

isNewFragment

public boolean isNewFragment()
Description copied from interface: Fragmenter
Test to see if this token from the stream should be held in a new TextFragment. Every time this is called, the TokenStream passed to start(String, TokenStream) will have been incremented.

Specified by:
isNewFragment in interface Fragmenter

getFragmentSize

public int getFragmentSize()
Returns:
size in number of characters of each fragment

setFragmentSize

public void setFragmentSize(int size)
Parameters:
size - size in characters of each fragment
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleHTMLEncoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class SimpleHTMLEncoder

java.lang.Object
    extended by  org.apache.lucene.search.highlight.SimpleHTMLEncoder
All Implemented Interfaces:
Encoder
public class SimpleHTMLEncoder
extends Object
implements Encoder

Simple Encoder implementation to escape text for HTML output

Constructor Summary
SimpleHTMLEncoder()
Method Summary
String | encodeText(String originalText)
static String | htmlEncode(String plainText) Encode string into HTML
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SimpleHTMLEncoder

public SimpleHTMLEncoder()
Method Detail

encodeText

public String encodeText(String originalText)
Specified by:
encodeText in interface Encoder
Parameters:
originalText - The section of text being output

htmlEncode

public static final String htmlEncode(String plainText)
Encode string into HTML

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleHTMLFormatter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class SimpleHTMLFormatter

java.lang.Object
    extended by  org.apache.lucene.search.highlight.SimpleHTMLFormatter
All Implemented Interfaces:
Formatter
public class SimpleHTMLFormatter
extends Object
implements Formatter

Simple Formatter implementation to highlight terms with a pre and post tag.

Constructor Summary
SimpleHTMLFormatter()
Default constructor uses HTML: <B> tags to markup terms.
SimpleHTMLFormatter(String preTag, String postTag)
Method Summary
 String highlightTerm(String originalText, TokenGroup tokenGroup)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SimpleHTMLFormatter

public SimpleHTMLFormatter(String preTag,
                           String postTag)

SimpleHTMLFormatter

public SimpleHTMLFormatter()
Default constructor uses HTML: <B> tags to markup terms.

Method Detail

highlightTerm

public String highlightTerm(String originalText,
                            TokenGroup tokenGroup)
Specified by:
highlightTerm in interface Formatter
Parameters:
originalText - The section of text being considered for markup
tokenGroup - contains one or several overlapping Tokens along with their scores and positions.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleSpanFragmenter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class SimpleSpanFragmenter

java.lang.Object
    extended by  org.apache.lucene.search.highlight.SimpleSpanFragmenter
All Implemented Interfaces:
Fragmenter
public class SimpleSpanFragmenter
extends Object
implements Fragmenter

Fragmenter implementation which breaks text up into same-size fragments but does not split up Spans. This is a simple sample class.

Constructor Summary
SimpleSpanFragmenter(QueryScorer queryScorer)
SimpleSpanFragmenter(QueryScorer queryScorer, int fragmentSize)
Method Summary
boolean | isNewFragment() Test to see if this token from the stream should be held in a new TextFragment.
void | start(String originalText, TokenStream tokenStream) Initializes the Fragmenter.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SimpleSpanFragmenter

public SimpleSpanFragmenter(QueryScorer queryScorer)
Parameters:
queryScorer - QueryScorer that was used to score hits

SimpleSpanFragmenter

public SimpleSpanFragmenter(QueryScorer queryScorer,
                            int fragmentSize)
Parameters:
queryScorer - QueryScorer that was used to score hits
fragmentSize - size in bytes of each fragment
Method Detail

isNewFragment

public boolean isNewFragment()
Description copied from interface: Fragmenter
Test to see if this token from the stream should be held in a new TextFragment. Every time this is called, the TokenStream passed to start(String, TokenStream) will have been incremented.

Specified by:
isNewFragment in interface Fragmenter

start

public void start(String originalText,
                  TokenStream tokenStream)
Description copied from interface: Fragmenter
Initializes the Fragmenter. You can grab references to the Attributes you are interested in from tokenStream and then access the values in Fragmenter.isNewFragment().

Specified by:
start in interface Fragmenter
Parameters:
originalText - the original source text
tokenStream - the TokenStream to be fragmented
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanGradientFormatter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class SpanGradientFormatter

java.lang.Object
    extended by  org.apache.lucene.search.highlight.GradientFormatter
        extended by  org.apache.lucene.search.highlight.SpanGradientFormatter
All Implemented Interfaces:
Formatter
public class SpanGradientFormatter
extends GradientFormatter

Formats text with different color intensity depending on the score of the term using the span tag. GradientFormatter uses a bgcolor argument to the font tag which doesn't work in Mozilla, thus this class.

See Also:
GradientFormatter

Field Summary
Fields inherited from class org.apache.lucene.search.highlight.GradientFormatter
highlightBackground, highlightForeground
Constructor Summary
SpanGradientFormatter(float maxScore, String minForegroundColor, String maxForegroundColor, String minBackgroundColor, String maxBackgroundColor)
Method Summary
 String highlightTerm(String originalText, TokenGroup tokenGroup)
Methods inherited from class org.apache.lucene.search.highlight.GradientFormatter
getBackgroundColorString, getForegroundColorString, hexToInt
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanGradientFormatter

public SpanGradientFormatter(float maxScore,
                             String minForegroundColor,
                             String maxForegroundColor,
                             String minBackgroundColor,
                             String maxBackgroundColor)
Method Detail

highlightTerm

public String highlightTerm(String originalText,
                            TokenGroup tokenGroup)
Specified by:
highlightTerm in interface Formatter
Overrides:
highlightTerm in class GradientFormatter
Parameters:
originalText - The section of text being considered for markup
tokenGroup - contains one or several overlapping Tokens along with their scores and positions.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TextFragment

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class TextFragment

java.lang.Object
    extended by  org.apache.lucene.search.highlight.TextFragment

public class TextFragment
extends Object

Low-level class used to record information about a section of a document with a score.

Constructor Summary
TextFragment(CharSequence markedUpText, int textStartPos, int fragNum)
TextFragment(StringBuffer markedUpText, int textStartPos, int fragNum)
Deprecated. Use TextFragment(CharSequence, int, int) instead. This constructor will be removed in Lucene 4.0
Method Summary
boolean | follows(TextFragment fragment)
int | getFragNum()
float | getScore()
void | merge(TextFragment frag2)
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TextFragment

public TextFragment(CharSequence markedUpText,
                    int textStartPos,
                    int fragNum)

TextFragment

@Deprecated
public TextFragment(StringBuffer markedUpText,
                               int textStartPos,
                               int fragNum)
Deprecated. Use TextFragment(CharSequence, int, int) instead. This constructor will be removed in Lucene 4.0

Method Detail

getScore

public float getScore()

merge

public void merge(TextFragment frag2)
Parameters:
frag2 - Fragment to be merged into this one

follows

public boolean follows(TextFragment fragment)
Parameters:
fragment -
Returns:
true if this fragment follows the one passed

getFragNum

public int getFragNum()
Returns:
the fragment sequence number

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TokenGroup

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class TokenGroup

java.lang.Object
    extended by  org.apache.lucene.search.highlight.TokenGroup

public class TokenGroup
extends Object

One, or several overlapping tokens, along with the score(s) and the scope of the original text

Constructor Summary
TokenGroup(TokenStream tokenStream)
Method Summary
int | getEndOffset()
int | getNumTokens()
float | getScore(int index)
int | getStartOffset()
Token | getToken(int index)
float | getTotalScore()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TokenGroup

public TokenGroup(TokenStream tokenStream)
Method Detail

getToken

public Token getToken(int index)

getScore

public float getScore(int index)
Parameters:
index - a value between 0 and numTokens -1
Returns:
the "n"th score

getEndOffset

public int getEndOffset()
Returns:
the end position in the original text

getNumTokens

public int getNumTokens()
Returns:
the number of tokens in this group

getStartOffset

public int getStartOffset()
Returns:
the start position in the original text

getTotalScore

public float getTotalScore()
Returns:
all tokens' scores summed up
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TokenSources

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class TokenSources

java.lang.Object
    extended by  org.apache.lucene.search.highlight.TokenSources

public class TokenSources
extends Object

Hides implementation issues associated with obtaining a TokenStream for use with the higlighter - can obtain from TermFreqVectors with offsets and (optionally) positions or from Analyzer class reparsing the stored content.

Constructor Summary
TokenSources()
Method Summary
static TokenStream | getAnyTokenStream(IndexReader reader, int docId, String field, Analyzer analyzer) A convenience method that tries a number of approaches to getting a token stream.
static TokenStream | getAnyTokenStream(IndexReader reader, int docId, String field, Document doc, Analyzer analyzer) A convenience method that tries to first get a TermPositionVector for the specified docId, then, falls back to using the passed in Document to retrieve the TokenStream.
static TokenStream | getTokenStream(Document doc, String field, Analyzer analyzer)
static TokenStream | getTokenStream(IndexReader reader, int docId, String field)
static TokenStream | getTokenStream(IndexReader reader, int docId, String field, Analyzer analyzer)
static TokenStream | getTokenStream(String field, String contents, Analyzer analyzer)
static TokenStream | getTokenStream(TermPositionVector tpv)
static TokenStream | getTokenStream(TermPositionVector tpv, boolean tokenPositionsGuaranteedContiguous) Low level api.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TokenSources

public TokenSources()
Method Detail

getAnyTokenStream

public static TokenStream getAnyTokenStream(IndexReader reader,
                                            int docId,
                                            String field,
                                            Document doc,
                                            Analyzer analyzer)
                                     throws IOException
A convenience method that tries to first get a TermPositionVector for the specified docId, then, falls back to using the passed in Document to retrieve the TokenStream. This is useful when you already have the document, but would prefer to use the vector first.

Parameters:
reader - The IndexReader to use to try and get the vector from
docId - The docId to retrieve.
field - The field to retrieve on the document
doc - The document to fall back on
analyzer - The analyzer to use for creating the TokenStream if the vector doesn't exist
Returns:
The TokenStream for the Fieldable on the Document
Throws:
IOException - if there was an error loading

getAnyTokenStream

public static TokenStream getAnyTokenStream(IndexReader reader,
                                            int docId,
                                            String field,
                                            Analyzer analyzer)
                                     throws IOException
A convenience method that tries a number of approaches to getting a token stream. The cost of finding there are no termVectors in the index is minimal (1000 invocations still registers 0 ms). So this "lazy" (flexible?) approach to coding is probably acceptable

Parameters:
reader -
docId -
field -
analyzer -
Returns:
null if field not stored correctly
Throws:
IOException

getTokenStream

public static TokenStream getTokenStream(TermPositionVector tpv)

getTokenStream

public static TokenStream getTokenStream(TermPositionVector tpv,
                                         boolean tokenPositionsGuaranteedContiguous)
Low level api. Returns a token stream or null if no offset info available in index. This can be used to feed the highlighter with a pre-parsed token stream In my tests the speeds to recreate 1000 token streams using this method are: - with TermVector offset only data stored - 420 milliseconds - with TermVector offset AND position data stored - 271 milliseconds (nb timings for TermVector with position data are based on a tokenizer with contiguous positions - no overlaps or gaps) The cost of not using TermPositionVector to store pre-parsed content and using an analyzer to re-parse the original content: - reanalyzing the original content - 980 milliseconds The re-analyze timings will typically vary depending on - 1) The complexity of the analyzer code (timings above were using a stemmer/lowercaser/stopword combo) 2) The number of other fields (Lucene reads ALL fields off the disk when accessing just one document field - can cost dear!) 3) Use of compression on field storage - could be faster due to compression (less disk IO) or slower (more CPU burn) depending on the content.

Parameters:
tpv -
tokenPositionsGuaranteedContiguous - true if the token position numbers have no overlaps or gaps. If looking to eek out the last drops of performance, set to true. If in doubt, set to false.

getTokenStream

public static TokenStream getTokenStream(IndexReader reader,
                                         int docId,
                                         String field)
                                  throws IOException
Throws:
IOException

getTokenStream

public static TokenStream getTokenStream(IndexReader reader,
                                         int docId,
                                         String field,
                                         Analyzer analyzer)
                                  throws IOException
Throws:
IOException

getTokenStream

public static TokenStream getTokenStream(Document doc,
                                         String field,
                                         Analyzer analyzer)

getTokenStream

public static TokenStream getTokenStream(String field,
                                         String contents,
                                         Analyzer analyzer)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TokenStreamFromTermPositionVector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class TokenStreamFromTermPositionVector

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
        extended by  org.apache.lucene.analysis.TokenStream
            extended by  org.apache.lucene.search.highlight.TokenStreamFromTermPositionVector
All Implemented Interfaces:
Closeable
public final class TokenStreamFromTermPositionVector
extends TokenStream

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
AttributeSource.AttributeFactory, AttributeSource.State
Constructor Summary
TokenStreamFromTermPositionVector(TermPositionVector termPositionVector)
Constructor.
Method Summary
boolean | incrementToken() Consumers (i.e., IndexWriter) use this method to advance the stream to the next token.
void | reset() Resets this stream to the beginning.
Methods inherited from class org.apache.lucene.analysis.TokenStream
close, end
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, restoreState, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

TokenStreamFromTermPositionVector

public TokenStreamFromTermPositionVector(TermPositionVector termPositionVector)
Constructor.

Parameters:
termPositionVector - TermPositionVector that contains the data for creating the TokenStream. Must have positions and offsets.
Method Detail

incrementToken

public boolean incrementToken()
                       throws IOException
Description copied from class: TokenStream
Consumers (i.e., IndexWriter) use this method to advance the stream to the next token. Implementing classes must implement this method and update the appropriate AttributeImpls with the attributes of the next token.

The producer must make no assumptions about the attributes after the method has been returned: the caller may arbitrarily change it. If the producer needs to preserve the state for subsequent calls, it can use AttributeSource.captureState() to create a copy of the current attribute state.

This method is called for every token of a document, so an efficient implementation is crucial for good performance. To avoid calls to AttributeSource.addAttribute(Class) and AttributeSource.getAttribute(Class), references to all AttributeImpls that this stream uses should be retrieved during instantiation.

To ensure that filters and consumers know which attributes are available, the attributes must be added during instantiation. Filters and consumers are not required to check for availability of attributes in TokenStream.incrementToken().

Specified by:
incrementToken in class TokenStream
Returns:
false for end of stream; true otherwise
Throws:
IOException

reset

public void reset()
           throws IOException
Description copied from class: TokenStream
Resets this stream to the beginning. This is an optional operation, so subclasses may or may not implement this method. TokenStream.reset() is not needed for the standard indexing process. However, if the tokens of a TokenStream are intended to be consumed more than once, it is necessary to implement TokenStream.reset(). Note that if your TokenStream caches tokens and feeds them back again after a reset, it is imperative that you clone the tokens when you store them away (on the first pass) as well as when you return them (on future passes after TokenStream.reset()).

Overrides:
reset in class TokenStream
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WeightedSpanTerm

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class WeightedSpanTerm

java.lang.Object
    extended by  org.apache.lucene.search.highlight.WeightedTerm
        extended by  org.apache.lucene.search.highlight.WeightedSpanTerm

public class WeightedSpanTerm
extends WeightedTerm

Lightweight class to hold term, weight, and positions used for scoring this term.

Constructor Summary
WeightedSpanTerm(float weight, String term)
WeightedSpanTerm(float weight, String term, boolean positionSensitive)
Method Summary
void | addPositionSpans(List<PositionSpan> positionSpans)
boolean | checkPosition(int position) Checks to see if this term is valid at position.
List<PositionSpan> | getPositionSpans()
boolean | isPositionSensitive()
void | setPositionSensitive(boolean positionSensitive)
Methods inherited from class org.apache.lucene.search.highlight.WeightedTerm
getTerm, getWeight, setTerm, setWeight
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WeightedSpanTerm

public WeightedSpanTerm(float weight,
                        String term)
Parameters:
weight -
term -

WeightedSpanTerm

public WeightedSpanTerm(float weight,
                        String term,
                        boolean positionSensitive)
Parameters:
weight -
term -
positionSensitive -
Method Detail

checkPosition

public boolean checkPosition(int position)
Checks to see if this term is valid at position.

Parameters:
position - to check against valid term positions
Returns:
true iff this term is a hit at this position

addPositionSpans

public void addPositionSpans(List<PositionSpan> positionSpans)

isPositionSensitive

public boolean isPositionSensitive()

setPositionSensitive

public void setPositionSensitive(boolean positionSensitive)

getPositionSpans

public List<PositionSpan> getPositionSpans()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WeightedSpanTermExtractor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class WeightedSpanTermExtractor

java.lang.Object
    extended by  org.apache.lucene.search.highlight.WeightedSpanTermExtractor

public class WeightedSpanTermExtractor
extends Object

Class used to extract WeightedSpanTerms from a Query based on whether Terms from the Query are contained in a supplied TokenStream.

Nested Class Summary
protected static class WeightedSpanTermExtractor.PositionCheckingMap<K>
This class makes sure that if both position sensitive and insensitive versions of the same term are added, the position insensitive one wins.
Constructor Summary
WeightedSpanTermExtractor()
WeightedSpanTermExtractor(String defaultField)
Method Summary
protected void | collectSpanQueryFields(SpanQuery spanQuery, Set<String> fieldNames)
protected void | extract(Query query, Map<String,WeightedSpanTerm> terms) Fills a Map with <@link WeightedSpanTerm>s using the terms from the supplied Query.
protected void | extractUnknownQuery(Query query, Map<String,WeightedSpanTerm> terms)
protected void | extractWeightedSpanTerms(Map<String,WeightedSpanTerm> terms, SpanQuery spanQuery) Fills a Map with <@link WeightedSpanTerm>s using the terms from the supplied SpanQuery.
protected void | extractWeightedTerms(Map<String,WeightedSpanTerm> terms, Query query) Fills a Map with <@link WeightedSpanTerm>s using the terms from the supplied Query.
protected boolean | fieldNameComparator(String fieldNameToCheck) Necessary to implement matches for queries against defaultField
boolean | getExpandMultiTermQuery()
protected IndexReader | getReaderForField(String field)
TokenStream | getTokenStream()
Map<String,WeightedSpanTerm> | getWeightedSpanTerms(Query query, TokenStream tokenStream) Creates a Map of WeightedSpanTerms from the given Query and TokenStream.
Map<String,WeightedSpanTerm> | getWeightedSpanTerms(Query query, TokenStream tokenStream, String fieldName) Creates a Map of WeightedSpanTerms from the given Query and TokenStream.
Map<String,WeightedSpanTerm> | getWeightedSpanTermsWithScores(Query query, TokenStream tokenStream, String fieldName, IndexReader reader) Creates a Map of WeightedSpanTerms from the given Query and TokenStream.
boolean | isCachedTokenStream()
protected boolean | mustRewriteQuery(SpanQuery spanQuery)
void | setExpandMultiTermQuery(boolean expandMultiTermQuery)
protected void | setMaxDocCharsToAnalyze(int maxDocCharsToAnalyze)
void | setWrapIfNotCachingTokenFilter(boolean wrap) By default, TokenStreams that are not of the type CachingTokenFilter are wrapped in a CachingTokenFilter to ensure an efficient reset - if you are already using a different caching TokenStream impl and you don't want it to be wrapped, set this to false.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WeightedSpanTermExtractor

public WeightedSpanTermExtractor()

WeightedSpanTermExtractor

public WeightedSpanTermExtractor(String defaultField)
Method Detail

extract

protected void extract(Query query,
                       Map<String,WeightedSpanTerm> terms)
                throws IOException
Fills a Map with <@link WeightedSpanTerm>s using the terms from the supplied Query.

Parameters:
query - Query to extract Terms from
terms - Map to place created WeightedSpanTerms in
Throws:
IOException

extractUnknownQuery

protected void extractUnknownQuery(Query query,
                                   Map<String,WeightedSpanTerm> terms)
                            throws IOException
Throws:
IOException

extractWeightedSpanTerms

protected void extractWeightedSpanTerms(Map<String,WeightedSpanTerm> terms,
                                        SpanQuery spanQuery)
                                 throws IOException
Fills a Map with <@link WeightedSpanTerm>s using the terms from the supplied SpanQuery.

Parameters:
terms - Map to place created WeightedSpanTerms in
spanQuery - SpanQuery to extract Terms from
Throws:
IOException

extractWeightedTerms

protected void extractWeightedTerms(Map<String,WeightedSpanTerm> terms,
                                    Query query)
                             throws IOException
Fills a Map with <@link WeightedSpanTerm>s using the terms from the supplied Query.

Parameters:
terms - Map to place created WeightedSpanTerms in
query - Query to extract Terms from
Throws:
IOException

fieldNameComparator

protected boolean fieldNameComparator(String fieldNameToCheck)
Necessary to implement matches for queries against defaultField

getReaderForField

protected IndexReader getReaderForField(String field)
                                 throws IOException
Throws:
IOException

getWeightedSpanTerms

public Map<String,WeightedSpanTerm> getWeightedSpanTerms(Query query,
                                                         TokenStream tokenStream)
                                                  throws IOException
Creates a Map of WeightedSpanTerms from the given Query and TokenStream.

Parameters:
query - that caused hit
tokenStream - of text to be highlighted
Returns:
Map containing WeightedSpanTerms
Throws:
IOException

getWeightedSpanTerms

public Map<String,WeightedSpanTerm> getWeightedSpanTerms(Query query,
                                                         TokenStream tokenStream,
                                                         String fieldName)
                                                  throws IOException
Creates a Map of WeightedSpanTerms from the given Query and TokenStream.

Parameters:
query - that caused hit
tokenStream - of text to be highlighted
fieldName - restricts Term's used based on field name
Returns:
Map containing WeightedSpanTerms
Throws:
IOException

getWeightedSpanTermsWithScores

public Map<String,WeightedSpanTerm> getWeightedSpanTermsWithScores(Query query,
                                                                   TokenStream tokenStream,
                                                                   String fieldName,
                                                                   IndexReader reader)
                                                            throws IOException
Creates a Map of WeightedSpanTerms from the given Query and TokenStream. Uses a supplied IndexReader to properly weight terms (for gradient highlighting).

Parameters:
query - that caused hit
tokenStream - of text to be highlighted
fieldName - restricts Term's used based on field name
reader - to use for scoring
Returns:
Map of WeightedSpanTerms with quasi tf/idf scores
Throws:
IOException

collectSpanQueryFields

protected void collectSpanQueryFields(SpanQuery spanQuery,
                                      Set<String> fieldNames)

mustRewriteQuery

protected boolean mustRewriteQuery(SpanQuery spanQuery)

getExpandMultiTermQuery

public boolean getExpandMultiTermQuery()

setExpandMultiTermQuery

public void setExpandMultiTermQuery(boolean expandMultiTermQuery)

isCachedTokenStream

public boolean isCachedTokenStream()

getTokenStream

public TokenStream getTokenStream()

setWrapIfNotCachingTokenFilter

public void setWrapIfNotCachingTokenFilter(boolean wrap)
By default, TokenStreams that are not of the type CachingTokenFilter are wrapped in a CachingTokenFilter to ensure an efficient reset - if you are already using a different caching TokenStream impl and you don't want it to be wrapped, set this to false.

Parameters:
wrap -

setMaxDocCharsToAnalyze

protected final void setMaxDocCharsToAnalyze(int maxDocCharsToAnalyze)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WeightedSpanTermExtractor.PositionCheckingMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class WeightedSpanTermExtractor.PositionCheckingMap<K>

java.lang.Object
    extended by  java.util.AbstractMap<K,V>
        extended by  java.util.HashMap<K,WeightedSpanTerm>
            extended by  org.apache.lucene.search.highlight.WeightedSpanTermExtractor.PositionCheckingMap<K>
All Implemented Interfaces:
Serializable, Cloneable, Map<K,WeightedSpanTerm>
Enclosing class:
WeightedSpanTermExtractor
protected static class WeightedSpanTermExtractor.PositionCheckingMap<K>
extends HashMap<K,WeightedSpanTerm>

This class makes sure that if both position sensitive and insensitive versions of the same term are added, the position insensitive one wins.

See Also:
Serialized Form

Constructor Summary
protected WeightedSpanTermExtractor.PositionCheckingMap()
Method Summary
WeightedSpanTerm | put(K key, WeightedSpanTerm value)
void | putAll(Map<? extends K,? extends WeightedSpanTerm> m)
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, remove, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
equals, hashCode

Constructor Detail

WeightedSpanTermExtractor.PositionCheckingMap

protected WeightedSpanTermExtractor.PositionCheckingMap()
Method Detail

putAll

public void putAll(Map<? extends K,? extends WeightedSpanTerm> m)
Specified by:
putAll in interface Map<K,WeightedSpanTerm>
Overrides:
putAll in class HashMap<K,WeightedSpanTerm>

put

public WeightedSpanTerm put(K key,
                            WeightedSpanTerm value)
Specified by:
put in interface Map<K,WeightedSpanTerm>
Overrides:
put in class HashMap<K,WeightedSpanTerm>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WeightedTerm

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.highlight
Class WeightedTerm

java.lang.Object
    extended by  org.apache.lucene.search.highlight.WeightedTerm
Direct Known Subclasses:
WeightedSpanTerm
public class WeightedTerm
extends Object

Lightweight class to hold term and a weight value used for scoring this term

Constructor Summary
WeightedTerm(float weight, String term)
Method Summary
String | getTerm()
float | getWeight()
void | setTerm(String term)
void | setWeight(float weight)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WeightedTerm

public WeightedTerm(float weight,
                    String term)
Method Detail

getTerm

public String getTerm()
Returns:
the term value (stemmed)

getWeight

public float getWeight()
Returns:
the weight associated with this term

setTerm

public void setTerm(String term)
Parameters:
term - the term value (stemmed)

setWeight

public void setWeight(float weight)
Parameters:
weight - the weight associated with this term
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.search.highlight.DefaultEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.DefaultEncoder

No usage of org.apache.lucene.search.highlight.DefaultEncoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.highlight.Encoder

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.highlight.Encoder

Packages that use Encoder
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.search.vectorhighlight | This is an another highlighter implementation.

Uses of Encoder in org.apache.lucene.search.highlight

Classes in org.apache.lucene.search.highlight that implement Encoder
class | DefaultEncoder Simple Encoder implementation that does not modify the output
class | SimpleHTMLEncoder Simple Encoder implementation to escape text for HTML output

Methods in org.apache.lucene.search.highlight that return Encoder
 Encoder Highlighter.getEncoder()

Methods in org.apache.lucene.search.highlight with parameters of type Encoder
 void Highlighter.setEncoder(Encoder encoder)

Constructors in org.apache.lucene.search.highlight with parameters of type Encoder
Highlighter(Formatter formatter, Encoder encoder, Scorer fragmentScorer)

Uses of Encoder in org.apache.lucene.search.vectorhighlight

Methods in org.apache.lucene.search.vectorhighlight with parameters of type Encoder
String | FragmentsBuilder.createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, String[] preTags, String[] postTags, Encoder encoder) create a fragment.
String | BaseFragmentsBuilder.createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, String[] preTags, String[] postTags, Encoder encoder)
String[] | FragmentsBuilder.createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments, String[] preTags, String[] postTags, Encoder encoder) create multiple fragments.
String[] | BaseFragmentsBuilder.createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments, String[] preTags, String[] postTags, Encoder encoder)
String | FastVectorHighlighter.getBestFragment(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder, String[] preTags, String[] postTags, Encoder encoder) return the best fragment.
String[] | FastVectorHighlighter.getBestFragments(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, int maxNumFragments, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder, String[] preTags, String[] postTags, Encoder encoder) return the best fragments.
protected String | BaseFragmentsBuilder.makeFragment(StringBuilder buffer, int[] index, Field[] values, FieldFragList.WeightedFragInfo fragInfo, String[] preTags, String[] postTags, Encoder encoder)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.highlight.Formatter

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.highlight.Formatter

Packages that use Formatter
org.apache.lucene.search.highlight The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

Uses of Formatter in org.apache.lucene.search.highlight

Classes in org.apache.lucene.search.highlight that implement Formatter
class | GradientFormatter Formats text with different color intensity depending on the score of the term.
class | SimpleHTMLFormatter Simple Formatter implementation to highlight terms with a pre and post tag.
class | SpanGradientFormatter Formats text with different color intensity depending on the score of the term using the span tag.

Constructors in org.apache.lucene.search.highlight with parameters of type Formatter
Highlighter(Formatter formatter, Encoder encoder, Scorer fragmentScorer)
Highlighter(Formatter formatter, Scorer fragmentScorer)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.highlight.Fragmenter

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.highlight.Fragmenter

Packages that use Fragmenter
org.apache.lucene.search.highlight The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

Uses of Fragmenter in org.apache.lucene.search.highlight

Classes in org.apache.lucene.search.highlight that implement Fragmenter
class | NullFragmenter Fragmenter implementation which does not fragment the text.
class | SimpleFragmenter Fragmenter implementation which breaks text up into same-size fragments with no concerns over spotting sentence boundaries.
class | SimpleSpanFragmenter Fragmenter implementation which breaks text up into same-size fragments but does not split up Spans.

Methods in org.apache.lucene.search.highlight that return Fragmenter
 Fragmenter Highlighter.getTextFragmenter()

Methods in org.apache.lucene.search.highlight with parameters of type Fragmenter
 void Highlighter.setTextFragmenter(Fragmenter fragmenter)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.GradientFormatter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.GradientFormatter

Packages that use GradientFormatter
org.apache.lucene.search.highlight The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

Uses of GradientFormatter in org.apache.lucene.search.highlight

Subclasses of GradientFormatter in org.apache.lucene.search.highlight
 class SpanGradientFormatter
Formats text with different color intensity depending on the score of the term using the span tag.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.Highlighter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.Highlighter

Packages that use Highlighter
org.apache.lucene.benchmark.byTask.tasks Extendable benchmark tasks.

Uses of Highlighter in org.apache.lucene.benchmark.byTask.tasks

Fields in org.apache.lucene.benchmark.byTask.tasks declared as Highlighter
protected  Highlighter SearchTravRetHighlightTask.highlighter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.InvalidTokenOffsetsException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.InvalidTokenOffsetsException

Packages that use InvalidTokenOffsetsException
org.apache.lucene.search.highlight The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

Uses of InvalidTokenOffsetsException in org.apache.lucene.search.highlight

Methods in org.apache.lucene.search.highlight that throw InvalidTokenOffsetsException
String | Highlighter.getBestFragment(Analyzer analyzer, String fieldName, String text) Highlights chosen terms in a text, extracting the most relevant section.
String | Highlighter.getBestFragment(TokenStream tokenStream, String text) Highlights chosen terms in a text, extracting the most relevant section.
String[] | Highlighter.getBestFragments(Analyzer analyzer, String fieldName, String text, int maxNumFragments) Highlights chosen terms in a text, extracting the most relevant sections.
String[] | Highlighter.getBestFragments(TokenStream tokenStream, String text, int maxNumFragments) Highlights chosen terms in a text, extracting the most relevant sections.
String | Highlighter.getBestFragments(TokenStream tokenStream, String text, int maxNumFragments, String separator) Highlights terms in the text , extracting the most relevant sections and concatenating the chosen fragments with a separator (typically "...").
TextFragment[] | Highlighter.getBestTextFragments(TokenStream tokenStream, String text, boolean mergeContiguousFragments, int maxNumFragments) Low level api to get the most relevant (formatted) sections of the document.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.NullFragmenter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.NullFragmenter

No usage of org.apache.lucene.search.highlight.NullFragmenter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.OffsetLimitTokenFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.OffsetLimitTokenFilter

No usage of org.apache.lucene.search.highlight.OffsetLimitTokenFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.PositionSpan

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.PositionSpan

Packages that use PositionSpan
org.apache.lucene.search.highlight The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

Uses of PositionSpan in org.apache.lucene.search.highlight

Methods in org.apache.lucene.search.highlight that return types with arguments of type PositionSpan
 List<PositionSpan> WeightedSpanTerm.getPositionSpans()

Method parameters in org.apache.lucene.search.highlight with type arguments of type PositionSpan
 void WeightedSpanTerm.addPositionSpans(List<PositionSpan> positionSpans)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.QueryScorer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.QueryScorer

Packages that use QueryScorer
org.apache.lucene.search.highlight The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

Uses of QueryScorer in org.apache.lucene.search.highlight

Constructors in org.apache.lucene.search.highlight with parameters of type QueryScorer
SimpleSpanFragmenter(QueryScorer queryScorer)
SimpleSpanFragmenter(QueryScorer queryScorer, int fragmentSize)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.QueryTermExtractor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.QueryTermExtractor

No usage of org.apache.lucene.search.highlight.QueryTermExtractor

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.QueryTermScorer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.QueryTermScorer

No usage of org.apache.lucene.search.highlight.QueryTermScorer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.highlight.Scorer

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.highlight.Scorer

Packages that use Scorer
org.apache.lucene.search.highlight The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

Uses of Scorer in org.apache.lucene.search.highlight

Classes in org.apache.lucene.search.highlight that implement Scorer
class | QueryScorer Scorer implementation which scores text fragments by the number of unique query terms found.
class | QueryTermScorer Scorer implementation which scores text fragments by the number of unique query terms found.

Methods in org.apache.lucene.search.highlight that return Scorer
 Scorer Highlighter.getFragmentScorer()

Methods in org.apache.lucene.search.highlight with parameters of type Scorer
 void Highlighter.setFragmentScorer(Scorer scorer)

Constructors in org.apache.lucene.search.highlight with parameters of type Scorer
Highlighter(Formatter formatter, Encoder encoder, Scorer fragmentScorer)
Highlighter(Formatter formatter, Scorer fragmentScorer)
Highlighter(Scorer fragmentScorer)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.SimpleFragmenter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.SimpleFragmenter

No usage of org.apache.lucene.search.highlight.SimpleFragmenter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.SimpleHTMLEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.SimpleHTMLEncoder

No usage of org.apache.lucene.search.highlight.SimpleHTMLEncoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.SimpleHTMLFormatter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.SimpleHTMLFormatter

No usage of org.apache.lucene.search.highlight.SimpleHTMLFormatter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.SimpleSpanFragmenter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.SimpleSpanFragmenter

No usage of org.apache.lucene.search.highlight.SimpleSpanFragmenter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.SpanGradientFormatter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.SpanGradientFormatter

No usage of org.apache.lucene.search.highlight.SpanGradientFormatter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.TextFragment

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.TextFragment

Packages that use TextFragment
org.apache.lucene.search.highlight The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

Uses of TextFragment in org.apache.lucene.search.highlight

Methods in org.apache.lucene.search.highlight that return TextFragment
 TextFragment[] Highlighter.getBestTextFragments(TokenStream tokenStream, String text, boolean mergeContiguousFragments, int maxNumFragments)
Low level api to get the most relevant (formatted) sections of the document.

Methods in org.apache.lucene.search.highlight with parameters of type TextFragment
boolean | TextFragment.follows(TextFragment fragment)
void | TextFragment.merge(TextFragment frag2)
void | QueryTermScorer.startFragment(TextFragment newFragment)
void | Scorer.startFragment(TextFragment newFragment) Called when a new fragment is started for consideration.
void | QueryScorer.startFragment(TextFragment newFragment)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.TokenGroup

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.TokenGroup

Packages that use TokenGroup
org.apache.lucene.search.highlight The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

Uses of TokenGroup in org.apache.lucene.search.highlight

Methods in org.apache.lucene.search.highlight with parameters of type TokenGroup
String | SimpleHTMLFormatter.highlightTerm(String originalText, TokenGroup tokenGroup)
String | GradientFormatter.highlightTerm(String originalText, TokenGroup tokenGroup)
String | Formatter.highlightTerm(String originalText, TokenGroup tokenGroup)
String | SpanGradientFormatter.highlightTerm(String originalText, TokenGroup tokenGroup)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.TokenSources

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.TokenSources

No usage of org.apache.lucene.search.highlight.TokenSources

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.TokenStreamFromTermPositionVector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.TokenStreamFromTermPositionVector

No usage of org.apache.lucene.search.highlight.TokenStreamFromTermPositionVector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.WeightedSpanTerm

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.WeightedSpanTerm

Packages that use WeightedSpanTerm
org.apache.lucene.search.highlight The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

Uses of WeightedSpanTerm in org.apache.lucene.search.highlight

Methods in org.apache.lucene.search.highlight that return WeightedSpanTerm
WeightedSpanTerm | QueryScorer.getWeightedSpanTerm(String token) Retrieve the WeightedSpanTerm for the specified token.
WeightedSpanTerm | WeightedSpanTermExtractor.PositionCheckingMap.put(K key, WeightedSpanTerm value)

Methods in org.apache.lucene.search.highlight that return types with arguments of type WeightedSpanTerm
Map<String,WeightedSpanTerm> | WeightedSpanTermExtractor.getWeightedSpanTerms(Query query, TokenStream tokenStream) Creates a Map of WeightedSpanTerms from the given Query and TokenStream.
Map<String,WeightedSpanTerm> | WeightedSpanTermExtractor.getWeightedSpanTerms(Query query, TokenStream tokenStream, String fieldName) Creates a Map of WeightedSpanTerms from the given Query and TokenStream.
Map<String,WeightedSpanTerm> | WeightedSpanTermExtractor.getWeightedSpanTermsWithScores(Query query, TokenStream tokenStream, String fieldName, IndexReader reader) Creates a Map of WeightedSpanTerms from the given Query and TokenStream.

Methods in org.apache.lucene.search.highlight with parameters of type WeightedSpanTerm
 WeightedSpanTerm WeightedSpanTermExtractor.PositionCheckingMap.put(K key, WeightedSpanTerm value)

Method parameters in org.apache.lucene.search.highlight with type arguments of type WeightedSpanTerm
protected void | WeightedSpanTermExtractor.extract(Query query, Map<String,WeightedSpanTerm> terms) Fills a Map with <@link WeightedSpanTerm>s using the terms from the supplied Query.
protected void | WeightedSpanTermExtractor.extractUnknownQuery(Query query, Map<String,WeightedSpanTerm> terms)
protected void | WeightedSpanTermExtractor.extractWeightedSpanTerms(Map<String,WeightedSpanTerm> terms, SpanQuery spanQuery) Fills a Map with <@link WeightedSpanTerm>s using the terms from the supplied SpanQuery.
protected void | WeightedSpanTermExtractor.extractWeightedTerms(Map<String,WeightedSpanTerm> terms, Query query) Fills a Map with <@link WeightedSpanTerm>s using the terms from the supplied Query.
void | WeightedSpanTermExtractor.PositionCheckingMap.putAll(Map<? extends K,? extends WeightedSpanTerm> m)

Constructors in org.apache.lucene.search.highlight with parameters of type WeightedSpanTerm
QueryScorer(WeightedSpanTerm[] weightedTerms)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.WeightedSpanTermExtractor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.WeightedSpanTermExtractor

Packages that use WeightedSpanTermExtractor
org.apache.lucene.search.highlight The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

Uses of WeightedSpanTermExtractor in org.apache.lucene.search.highlight

Methods in org.apache.lucene.search.highlight that return WeightedSpanTermExtractor
protected  WeightedSpanTermExtractor QueryScorer.newTermExtractor(String defaultField)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.WeightedSpanTermExtractor.PositionCheckingMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.WeightedSpanTermExtractor.PositionCheckingMap

No usage of org.apache.lucene.search.highlight.WeightedSpanTermExtractor.PositionCheckingMap

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.highlight.WeightedTerm

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.highlight.WeightedTerm

Packages that use WeightedTerm
org.apache.lucene.search.highlight The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.

Uses of WeightedTerm in org.apache.lucene.search.highlight

Subclasses of WeightedTerm in org.apache.lucene.search.highlight
 class WeightedSpanTerm
Lightweight class to hold term, weight, and positions used for scoring this term.

Methods in org.apache.lucene.search.highlight that return WeightedTerm
static WeightedTerm[] | QueryTermExtractor.getIdfWeightedTerms(Query query, IndexReader reader, String fieldName) Extracts all terms texts of a given Query into an array of WeightedTerms
static WeightedTerm[] | QueryTermExtractor.getTerms(Query query) Extracts all terms texts of a given Query into an array of WeightedTerms
static WeightedTerm[] | QueryTermExtractor.getTerms(Query query, boolean prohibited) Extracts all terms texts of a given Query into an array of WeightedTerms
static WeightedTerm[] | QueryTermExtractor.getTerms(Query query, boolean prohibited, String fieldName) Extracts all terms texts of a given Query into an array of WeightedTerms

Constructors in org.apache.lucene.search.highlight with parameters of type WeightedTerm
QueryTermScorer(WeightedTerm[] weightedTerms)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


JoinUtil

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.join
Class JoinUtil

java.lang.Object
    extended by  org.apache.lucene.search.join.JoinUtil

public final class JoinUtil
extends Object

Utility for query time joining using TermsQuery and TermsCollector.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
static Query createJoinQuery(String fromField, String toField, Query fromQuery, IndexSearcher fromSearcher)
Method for query time joining.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

createJoinQuery

public static Query createJoinQuery(String fromField,
                                    String toField,
                                    Query fromQuery,
                                    IndexSearcher fromSearcher)
                             throws IOException
Method for query time joining.

Execute the returned query with a IndexSearcher to retrieve all documents that have the same terms in the to field that match with documents matching the specified fromQuery and have the same terms in the from field. Notice: Can't join documents with a fromField that holds more then one term.

Parameters:
fromField - The from field to join from
toField - The to field to join to
fromQuery - The query to match documents on the from side
fromSearcher - The searcher that executed the specified fromQuery
Returns:
a Query instance that can be used to join documents based on the terms in the from and to field
Throws:
IOException - If I/O related errors occur
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.search.join
Classes
JoinUtil
RawTermFilter
ToChildBlockJoinQuery
ToParentBlockJoinCollector
ToParentBlockJoinQuery
Enums
ToParentBlockJoinQuery.ScoreMode


org.apache.lucene.search.join

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.search.join

This modules support index-time and query-time joins.

See:
Description

Class Summary
JoinUtil | Utility for query time joining using TermsQuery and TermsCollector.
RawTermFilter | Expert: creates a filter accepting all documents containing the provided term, disregarding deleted documents.
ToChildBlockJoinQuery | Just like ToParentBlockJoinQuery, except this query joins in reverse: you provide a Query matching parent documents and it joins down to child documents.
ToParentBlockJoinCollector | Collects parent document hits for a Query containing one more more BlockJoinQuery clauses, sorted by the specified parent Sort.
ToParentBlockJoinQuery | This query requires that you index children and parent docs as a single block, using the IndexWriter.addDocuments(java.util.Collection) or IndexWriter.updateDocuments(org.apache.lucene.index.Term, java.util.Collection) API.

Enum Summary
ToParentBlockJoinQuery.ScoreMode How to aggregate multiple child hit scores into a single parent score.

Package org.apache.lucene.search.join Description

This modules support index-time and query-time joins.

Index-time joins

The index-time joining support joins while searching, where joined documents are indexed as a single document block using IndexWriter.addDocuments(java.util.Collection). This is useful for any normalized content (XML documents or database tables). In database terms, all rows for all joined tables matching a single row of the primary table must be indexed as a single document block, with the parent document being last in the group.

When you index in this way, the documents in your index are divided into parent documents (the last document of each block) and child documents (all others). You provide a Filter that identifies the parent documents, as Lucene does not currently record any information about doc blocks.

At search time, use ToParentBlockJoinQuery to remap/join matches from any child Query (ie, a query that matches only child documents) up to the parent document space. The resulting query can then be used as a clause in any query that matches parent.

If you only care about the parent documents matching the query, you can use any collector to collect the parent hits, but if you'd also like to see which child documents match for each parent document, use the ToParentBlockJoinCollector to collect the hits. Once the search is done, you retrieve a TopGroups instance from the ToParentBlockJoinCollector.getTopGroups(org.apache.lucene.search.join.ToParentBlockJoinQuery, org.apache.lucene.search.Sort, int, int, int, boolean) method.

To map/join in the opposite direction, use ToChildBlockJoinQuery. This wraps any query matching parent documents, creating the joined query matching only child documents.

Search-time joins

The query time joining is index term based and implemented as two pass search. The first pass collects all the terms from a fromField that match the fromQuery. The second pass returns all documents that have matching terms in a toField to the terms collected in the first pass.

Query time joining has the following input:

  • fromField: The from field to join from.
  • fromQuery: The query executed to collect the from terms. This is usually the user specified query.
  • toField: The to field to join to

Basically the query-time joining is accessible from one static method. The user of this method supplies the method with the described input and a IndexSearcher where the from terms need to be collected from. The returned query can be executed with the same IndexSearcher, but also with another IndexSearcher. Example usage of the JoinUtil.createJoinQuery(String, String, org.apache.lucene.search.Query, org.apache.lucene.search.IndexSearcher) :

  String fromField = "from"; // Name of the from field
  String toField = "to"; // Name of the to field
  Query fromQuery = new TermQuery(new Term("content", searchTerm)); // Query executed to collect from values to join to the to values

  Query joinQuery = JoinUtil.createJoinQuery(fromField, toField, fromQuery, fromSearcher);
  TopDocs topDocs = toSearcher.search(joinQuery, 10); // Note: toSearcher can be the same as the fromSearcher
  // Render topDocs...


org.apache.lucene.search.join Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.search.join

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.search.Collector
      • org.apache.lucene.search.join.ToParentBlockJoinCollector
    • org.apache.lucene.search.Filter (implements java.io.Serializable)
      • org.apache.lucene.search.join.RawTermFilter
    • org.apache.lucene.search.join.JoinUtil
    • org.apache.lucene.search.Query (implements java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.search.join.ToChildBlockJoinQuery
      • org.apache.lucene.search.join.ToParentBlockJoinQuery

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.search.join.ToParentBlockJoinQuery.ScoreMode


Uses of Package org.apache.lucene.search.join

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.search.join

Packages that use org.apache.lucene.search.join
org.apache.lucene.search.join This modules support index-time and query-time joins.

Classes in org.apache.lucene.search.join used by org.apache.lucene.search.join
ToParentBlockJoinQuery
This query requires that you index children and parent docs as a single block, using the IndexWriter.addDocuments(java.util.Collection) or IndexWriter.updateDocuments(org.apache.lucene.index.Term, java.util.Collection) API.
ToParentBlockJoinQuery.ScoreMode
How to aggregate multiple child hit scores into a single parent score.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


RawTermFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.join
Class RawTermFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.search.join.RawTermFilter
All Implemented Interfaces:
Serializable
public class RawTermFilter
extends Filter

Expert: creates a filter accepting all documents containing the provided term, disregarding deleted documents. NOTE: this filter only works on readers whose sequential sub readers are SegmentReaders.

Normally you should not use this class; the only known required case is when using BlockJoinQuery from contrib/join.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
RawTermFilter(Term term)
Method Summary
 DocIdSet getDocIdSet(IndexReader reader)
Creates a DocIdSet enumerating the documents that should be permitted in search results.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RawTermFilter

public RawTermFilter(Term term)
Method Detail

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Description copied from class: Filter
Creates a DocIdSet enumerating the documents that should be permitted in search results. NOTE: null can be returned if no documents are accepted by this Filter.

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ToChildBlockJoinQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.join
Class ToChildBlockJoinQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.join.ToChildBlockJoinQuery
All Implemented Interfaces:
Serializable, Cloneable
public class ToChildBlockJoinQuery
extends Query

Just like ToParentBlockJoinQuery, except this query joins in reverse: you provide a Query matching parent documents and it joins down to child documents.

WARNING: to create the parents filter, always use RawTermFilter (so that the filter includes deleted docs), wrapped with CachingWrapperFilter (so that the returned bit set per reader is a FixedBitSet), specifying DeletesMode.IGNORE (so that on reopen, the filter still includes deleted docs). Failure to do this can result in completely wrong documents being returned! For example:

   Filter parents = new CachingWrapperFilter(
                          new RawTermFilter(new Term("parent", "yes")),
                          CachingWrapperFilter.DeletesMode.IGNORE);

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ToChildBlockJoinQuery(Query parentQuery, Filter parentsFilter, boolean doScores)
Method Summary
Object | clone() Returns a clone of this query.
Weight | createWeight(Searcher searcher) Expert: Constructs an appropriate Weight implementation for this query.
boolean | equals(Object _other)
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
int | hashCode()
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.Query
combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ToChildBlockJoinQuery

public ToChildBlockJoinQuery(Query parentQuery,
                             Filter parentsFilter,
                             boolean doScores)
Method Detail

createWeight

public Weight createWeight(Searcher searcher)
                    throws IOException
Description copied from class: Query
Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Overrides:
createWeight in class Query
Throws:
IOException

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

equals

public boolean equals(Object _other)
Overrides:
equals in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class Query

clone

public Object clone()
Description copied from class: Query
Returns a clone of this query.

Overrides:
clone in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ToParentBlockJoinCollector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.join
Class ToParentBlockJoinCollector

java.lang.Object
    extended by  org.apache.lucene.search.Collector
        extended by  org.apache.lucene.search.join.ToParentBlockJoinCollector

public class ToParentBlockJoinCollector
extends Collector

Collects parent document hits for a Query containing one more more BlockJoinQuery clauses, sorted by the specified parent Sort. Note that this cannot perform arbitrary joins; rather, it requires that all joined documents are indexed as a doc block (using IndexWriter.addDocuments(java.util.Collection) or IndexWriter.updateDocuments(org.apache.lucene.index.Term, java.util.Collection)). Ie, the join is computed at index time.

The parent Sort must only use fields from the parent documents; sorting by field in the child documents is not supported.

You should only use this collector if one or more of the clauses in the query is a ToParentBlockJoinQuery. This collector will find those query clauses and record the matching child documents for the top scoring parent documents.

Multiple joins (star join) and nested joins and a mix of the two are allowed, as long as in all cases the documents corresponding to a single row of each joined parent table were indexed as a doc block.

For the simple star join you can retrieve the TopGroups instance containing each ToParentBlockJoinQuery's matching child documents for the top parent groups, using getTopGroups(org.apache.lucene.search.join.ToParentBlockJoinQuery, org.apache.lucene.search.Sort, int, int, int, boolean). Ie, a single query, which will contain two or more ToParentBlockJoinQuery's as clauses representing the star join, can then retrieve two or more TopGroups instances.

For nested joins, the query will run correctly (ie, match the right parent and child documents), however, because TopGroups is currently unable to support nesting (each group is not able to hold another TopGroups), you are only able to retrieve the TopGroups of the first join. The TopGroups of the nested joins will not be correct. See org.apache.lucene.search.join for a code sample.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ToParentBlockJoinCollector(Sort sort, int numParentHits, boolean trackScores, boolean trackMaxScore)
Method Summary
 boolean acceptsDocsOutOfOrder()
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).
 void collect(int parentDoc)
Called once for every document matching a query, with the unbased document number.
 TopGroups<Integer> getTopGroups(ToParentBlockJoinQuery query, Sort withinGroupSort, int offset, int maxDocsPerGroup, int withinGroupOffset, boolean fillSortFields)
Return the TopGroups for the specified BlockJoinQuery.
 void setNextReader(IndexReader reader, int docBase)
Called before collecting from each IndexReader.
 void setScorer(Scorer scorer)
Called before successive calls to Collector.collect(int).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ToParentBlockJoinCollector

public ToParentBlockJoinCollector(Sort sort,
                                  int numParentHits,
                                  boolean trackScores,
                                  boolean trackMaxScore)
                           throws IOException
Throws:
IOException
Method Detail

collect

public void collect(int parentDoc)
             throws IOException
Description copied from class: Collector
Called once for every document matching a query, with the unbased document number.

Note: This is called in an inner search loop. For good search performance, implementations of this method should not call Searcher.doc(int) or IndexReader.document(int) on every hit. Doing so can slow searches by an order of magnitude or more.

Specified by:
collect in class Collector
Throws:
IOException

setNextReader

public void setNextReader(IndexReader reader,
                          int docBase)
                   throws IOException
Description copied from class: Collector
Called before collecting from each IndexReader. All doc ids in Collector.collect(int) will correspond to reader. Add docBase to the current IndexReaders internal document id to re-base ids in Collector.collect(int).

Specified by:
setNextReader in class Collector
Parameters:
reader - next IndexReader
Throws:
IOException

acceptsDocsOutOfOrder

public boolean acceptsDocsOutOfOrder()
Description copied from class: Collector
Return true if this collector does not require the matching docIDs to be delivered in int sort order (smallest to largest) to Collector.collect(int).

Most Lucene Query implementations will visit matching docIDs in order. However, some queries (currently limited to certain cases of BooleanQuery) can achieve faster searching if the Collector allows them to deliver the docIDs out of order.

Many collectors don't mind getting docIDs out of order, so it's important to return true here.

Specified by:
acceptsDocsOutOfOrder in class Collector

setScorer

public void setScorer(Scorer scorer)
Description copied from class: Collector
Called before successive calls to Collector.collect(int). Implementations that need the score of the current document (passed-in to Collector.collect(int)), should save the passed-in Scorer and call scorer.score() when needed.

Specified by:
setScorer in class Collector

getTopGroups

public TopGroups<Integer> getTopGroups(ToParentBlockJoinQuery query,
                                       Sort withinGroupSort,
                                       int offset,
                                       int maxDocsPerGroup,
                                       int withinGroupOffset,
                                       boolean fillSortFields)
                                throws IOException
Return the TopGroups for the specified BlockJoinQuery. The groupValue of each GroupDocs will be the parent docID for that group. Note that the GroupDocs.totalHits, which would be the total number of child documents matching that parent, is not computed (will always be 0). Returns null if no groups matched.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ToParentBlockJoinQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.join
Class ToParentBlockJoinQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.join.ToParentBlockJoinQuery
All Implemented Interfaces:
Serializable, Cloneable
public class ToParentBlockJoinQuery
extends Query

This query requires that you index children and parent docs as a single block, using the IndexWriter.addDocuments(java.util.Collection) or IndexWriter.updateDocuments(org.apache.lucene.index.Term, java.util.Collection) API. In each block, the child documents must appear first, ending with the parent document. At search time you provide a Filter identifying the parents, however this Filter must provide an FixedBitSet per sub-reader.

WARNING: to create the parents filter, always use RawTermFilter (so that the filter includes deleted docs), wrapped with CachingWrapperFilter (so that the returned bit set per reader is a FixedBitSet), specifying DeletesMode.IGNORE (so that on reopen, the filter still includes deleted docs). Failure to do this can result in completely wrong documents being returned! For example:

   Filter parents = new CachingWrapperFilter(
                          new RawTermFilter(new Term("parent", "yes")),
                          CachingWrapperFilter.DeletesMode.IGNORE);

Once the block index is built, use this query to wrap any sub-query matching only child docs and join matches in that child document space up to the parent document space. You can then use this Query as a clause with other queries in the parent document space.

See ToChildBlockJoinQuery if you need to join in the reverse order.

The child documents must be orthogonal to the parent documents: the wrapped child query must never return a parent document.

If you'd like to retrieve TopGroups for the resulting query, use the ToParentBlockJoinCollector. Note that this is not necessary, ie, if you simply want to collect the parent documents and don't need to see which child documents matched under that parent, then you can use any collector.

NOTE: If the overall query contains parent-only matches, for example you OR a parent-only query with a joined child-only query, then the resulting collected documents will be correct, however the TopGroups you get from ToParentBlockJoinCollector will not contain every child for parents that had matched.

See org.apache.lucene.search.join for an overview.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class ToParentBlockJoinQuery.ScoreMode
How to aggregate multiple child hit scores into a single parent score.
Constructor Summary
ToParentBlockJoinQuery(Query childQuery, Filter parentsFilter, ToParentBlockJoinQuery.ScoreMode scoreMode)
Create a ToParentBlockJoinQuery.
Method Summary
Object | clone() Returns a clone of this query.
Weight | createWeight(Searcher searcher) Expert: Constructs an appropriate Weight implementation for this query.
boolean | equals(Object _other)
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
int | hashCode()
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.Query
combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ToParentBlockJoinQuery

public ToParentBlockJoinQuery(Query childQuery,
                              Filter parentsFilter,
                              ToParentBlockJoinQuery.ScoreMode scoreMode)
Create a ToParentBlockJoinQuery.

Parameters:
childQuery - Query matching child documents.
parentsFilter - Filter (must produce FixedBitSet per-seegment) identifying the parent documents.
scoreMode - How to aggregate multiple child scores into a single parent score.
Method Detail

createWeight

public Weight createWeight(Searcher searcher)
                    throws IOException
Description copied from class: Query
Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Overrides:
createWeight in class Query
Throws:
IOException

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

equals

public boolean equals(Object _other)
Overrides:
equals in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class Query

clone

public Object clone()
Description copied from class: Query
Returns a clone of this query.

Overrides:
clone in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ToParentBlockJoinQuery.ScoreMode

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.search.join
Enum ToParentBlockJoinQuery.ScoreMode

java.lang.Object
    extended by  java.lang.Enum<ToParentBlockJoinQuery.ScoreMode>
        extended by  org.apache.lucene.search.join.ToParentBlockJoinQuery.ScoreMode
All Implemented Interfaces:
Serializable, Comparable<ToParentBlockJoinQuery.ScoreMode>
Enclosing class:
ToParentBlockJoinQuery
public static enum ToParentBlockJoinQuery.ScoreMode
extends Enum<ToParentBlockJoinQuery.ScoreMode>

How to aggregate multiple child hit scores into a single parent score.

Enum Constant Summary
Avg
Parent hit's score is the average of all child scores.
Max
Parent hit's score is the max of all child scores.
None
Do no scoring.
Total
Parent hit's score is the sum of all child scores.
Method Summary
static ToParentBlockJoinQuery.ScoreMode | valueOf(String name) Returns the enum constant of this type with the specified name.
static ToParentBlockJoinQuery.ScoreMode[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

None

public static final ToParentBlockJoinQuery.ScoreMode None
Do no scoring.

Avg

public static final ToParentBlockJoinQuery.ScoreMode Avg
Parent hit's score is the average of all child scores.

Max

public static final ToParentBlockJoinQuery.ScoreMode Max
Parent hit's score is the max of all child scores.

Total

public static final ToParentBlockJoinQuery.ScoreMode Total
Parent hit's score is the sum of all child scores.

Method Detail

values

public static final ToParentBlockJoinQuery.ScoreMode[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(ToParentBlockJoinQuery.ScoreMode c : ToParentBlockJoinQuery.ScoreMode.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static ToParentBlockJoinQuery.ScoreMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD


Uses of Class org.apache.lucene.search.join.JoinUtil

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.join.JoinUtil

No usage of org.apache.lucene.search.join.JoinUtil

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.join.RawTermFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.join.RawTermFilter

No usage of org.apache.lucene.search.join.RawTermFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.join.ToChildBlockJoinQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.join.ToChildBlockJoinQuery

No usage of org.apache.lucene.search.join.ToChildBlockJoinQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.join.ToParentBlockJoinCollector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.join.ToParentBlockJoinCollector

No usage of org.apache.lucene.search.join.ToParentBlockJoinCollector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.join.ToParentBlockJoinQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.join.ToParentBlockJoinQuery

Packages that use ToParentBlockJoinQuery
org.apache.lucene.search.join This modules support index-time and query-time joins.

Uses of ToParentBlockJoinQuery in org.apache.lucene.search.join

Methods in org.apache.lucene.search.join with parameters of type ToParentBlockJoinQuery
 TopGroups<Integer> ToParentBlockJoinCollector.getTopGroups(ToParentBlockJoinQuery query, Sort withinGroupSort, int offset, int maxDocsPerGroup, int withinGroupOffset, boolean fillSortFields)
Return the TopGroups for the specified BlockJoinQuery.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.join.ToParentBlockJoinQuery.ScoreMode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.join.ToParentBlockJoinQuery.ScoreMode

Packages that use ToParentBlockJoinQuery.ScoreMode
org.apache.lucene.search.join This modules support index-time and query-time joins.

Uses of ToParentBlockJoinQuery.ScoreMode in org.apache.lucene.search.join

Methods in org.apache.lucene.search.join that return ToParentBlockJoinQuery.ScoreMode
static ToParentBlockJoinQuery.ScoreMode | ToParentBlockJoinQuery.ScoreMode.valueOf(String name) Returns the enum constant of this type with the specified name.
static ToParentBlockJoinQuery.ScoreMode[] | ToParentBlockJoinQuery.ScoreMode.values() Returns an array containing the constants of this enum type, in the order they're declared.

Constructors in org.apache.lucene.search.join with parameters of type ToParentBlockJoinQuery.ScoreMode
ToParentBlockJoinQuery(Query childQuery, Filter parentsFilter, ToParentBlockJoinQuery.ScoreMode scoreMode)
Create a ToParentBlockJoinQuery.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


AveragePayloadFunction

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.payloads
Class AveragePayloadFunction

java.lang.Object
    extended by  org.apache.lucene.search.payloads.PayloadFunction
        extended by  org.apache.lucene.search.payloads.AveragePayloadFunction
All Implemented Interfaces:
Serializable
public class AveragePayloadFunction
extends PayloadFunction

Calculate the final score as the average score of all payloads seen.

Is thread safe and completely reusable.

See Also:
Serialized Form

Constructor Summary
AveragePayloadFunction()
Method Summary
float | currentScore(int docId, String field, int start, int end, int numPayloadsSeen, float currentScore, float currentPayloadScore) Calculate the score up to this point for this doc and field
float | docScore(int docId, String field, int numPayloadsSeen, float payloadScore) Calculate the final score for all the payloads seen so far for this doc/field
boolean | equals(Object obj)
Explanation | explain(int doc, int numPayloadsSeen, float payloadScore)
int | hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AveragePayloadFunction

public AveragePayloadFunction()
Method Detail

currentScore

public float currentScore(int docId,
                          String field,
                          int start,
                          int end,
                          int numPayloadsSeen,
                          float currentScore,
                          float currentPayloadScore)
Description copied from class: PayloadFunction
Calculate the score up to this point for this doc and field

Specified by:
currentScore in class PayloadFunction
Parameters:
docId - The current doc
field - The field
start - The start position of the matching Span
end - The end position of the matching Span
numPayloadsSeen - The number of payloads seen so far
currentScore - The current score so far
currentPayloadScore - The score for the current payload
Returns:
The new current Score
See Also:
Spans

docScore

public float docScore(int docId,
                      String field,
                      int numPayloadsSeen,
                      float payloadScore)
Description copied from class: PayloadFunction
Calculate the final score for all the payloads seen so far for this doc/field

Specified by:
docScore in class PayloadFunction
Parameters:
docId - The current doc
field - The current field
numPayloadsSeen - The total number of payloads seen on this document
payloadScore - The raw score for those payloads
Returns:
The final score for the payloads

explain

public Explanation explain(int doc,
                           int numPayloadsSeen,
                           float payloadScore)
Overrides:
explain in class PayloadFunction

hashCode

public int hashCode()
Specified by:
hashCode in class PayloadFunction

equals

public boolean equals(Object obj)
Specified by:
equals in class PayloadFunction
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


MaxPayloadFunction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.payloads
Class MaxPayloadFunction

java.lang.Object
    extended by  org.apache.lucene.search.payloads.PayloadFunction
        extended by  org.apache.lucene.search.payloads.MaxPayloadFunction
All Implemented Interfaces:
Serializable
public class MaxPayloadFunction
extends PayloadFunction

Returns the maximum payload score seen, else 1 if there are no payloads on the doc.

Is thread safe and completely reusable.

See Also:
Serialized Form

Constructor Summary
MaxPayloadFunction()
Method Summary
float | currentScore(int docId, String field, int start, int end, int numPayloadsSeen, float currentScore, float currentPayloadScore) Calculate the score up to this point for this doc and field
float | docScore(int docId, String field, int numPayloadsSeen, float payloadScore) Calculate the final score for all the payloads seen so far for this doc/field
boolean | equals(Object obj)
Explanation | explain(int doc, int numPayloadsSeen, float payloadScore)
int | hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MaxPayloadFunction

public MaxPayloadFunction()
Method Detail

currentScore

public float currentScore(int docId,
                          String field,
                          int start,
                          int end,
                          int numPayloadsSeen,
                          float currentScore,
                          float currentPayloadScore)
Description copied from class: PayloadFunction
Calculate the score up to this point for this doc and field

Specified by:
currentScore in class PayloadFunction
Parameters:
docId - The current doc
field - The field
start - The start position of the matching Span
end - The end position of the matching Span
numPayloadsSeen - The number of payloads seen so far
currentScore - The current score so far
currentPayloadScore - The score for the current payload
Returns:
The new current Score
See Also:
Spans

docScore

public float docScore(int docId,
                      String field,
                      int numPayloadsSeen,
                      float payloadScore)
Description copied from class: PayloadFunction
Calculate the final score for all the payloads seen so far for this doc/field

Specified by:
docScore in class PayloadFunction
Parameters:
docId - The current doc
field - The current field
numPayloadsSeen - The total number of payloads seen on this document
payloadScore - The raw score for those payloads
Returns:
The final score for the payloads

explain

public Explanation explain(int doc,
                           int numPayloadsSeen,
                           float payloadScore)
Overrides:
explain in class PayloadFunction

hashCode

public int hashCode()
Specified by:
hashCode in class PayloadFunction

equals

public boolean equals(Object obj)
Specified by:
equals in class PayloadFunction
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MinPayloadFunction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.payloads
Class MinPayloadFunction

java.lang.Object
    extended by  org.apache.lucene.search.payloads.PayloadFunction
        extended by  org.apache.lucene.search.payloads.MinPayloadFunction
All Implemented Interfaces:
Serializable
public class MinPayloadFunction
extends PayloadFunction

Calculates the minimum payload seen

See Also:
Serialized Form

Constructor Summary
MinPayloadFunction()
Method Summary
float | currentScore(int docId, String field, int start, int end, int numPayloadsSeen, float currentScore, float currentPayloadScore) Calculate the score up to this point for this doc and field
float | docScore(int docId, String field, int numPayloadsSeen, float payloadScore) Calculate the final score for all the payloads seen so far for this doc/field
boolean | equals(Object obj)
Explanation | explain(int doc, int numPayloadsSeen, float payloadScore)
int | hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MinPayloadFunction

public MinPayloadFunction()
Method Detail

currentScore

public float currentScore(int docId,
                          String field,
                          int start,
                          int end,
                          int numPayloadsSeen,
                          float currentScore,
                          float currentPayloadScore)
Description copied from class: PayloadFunction
Calculate the score up to this point for this doc and field

Specified by:
currentScore in class PayloadFunction
Parameters:
docId - The current doc
field - The field
start - The start position of the matching Span
end - The end position of the matching Span
numPayloadsSeen - The number of payloads seen so far
currentScore - The current score so far
currentPayloadScore - The score for the current payload
Returns:
The new current Score
See Also:
Spans

docScore

public float docScore(int docId,
                      String field,
                      int numPayloadsSeen,
                      float payloadScore)
Description copied from class: PayloadFunction
Calculate the final score for all the payloads seen so far for this doc/field

Specified by:
docScore in class PayloadFunction
Parameters:
docId - The current doc
field - The current field
numPayloadsSeen - The total number of payloads seen on this document
payloadScore - The raw score for those payloads
Returns:
The final score for the payloads

explain

public Explanation explain(int doc,
                           int numPayloadsSeen,
                           float payloadScore)
Overrides:
explain in class PayloadFunction

hashCode

public int hashCode()
Specified by:
hashCode in class PayloadFunction

equals

public boolean equals(Object obj)
Specified by:
equals in class PayloadFunction
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.search.payloads
Classes
AveragePayloadFunction
MaxPayloadFunction
MinPayloadFunction
PayloadFunction
PayloadNearQuery
PayloadSpanUtil
PayloadTermQuery


org.apache.lucene.search.payloads

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.search.payloads

The payloads package provides Query mechanisms for finding and using payloads.

See:
Description

Class Summary
AveragePayloadFunction | Calculate the final score as the average score of all payloads seen.
MaxPayloadFunction | Returns the maximum payload score seen, else 1 if there are no payloads on the doc.
MinPayloadFunction | Calculates the minimum payload seen
PayloadFunction | An abstract class that defines a way for Payload*Query instances to transform the cumulative effects of payload scores for a document.
PayloadNearQuery | This class is very similar to SpanNearQuery except that it factors in the value of the payloads located at each of the positions where the TermSpans occurs.
PayloadSpanUtil | Experimental class to get set of payloads for most standard Lucene queries.
PayloadTermQuery | This class is very similar to SpanTermQuery except that it factors in the value of the payload located at each of the positions where the Term occurs.

Package org.apache.lucene.search.payloads Description

The payloads package provides Query mechanisms for finding and using payloads. The following Query implementations are provided:
  1. PayloadTermQuery -- Boost a term's score based on the value of the payload located at that term.
  2. PayloadNearQuery -- A SpanNearQuery that factors in the value of the payloads located at each of the positions where the spans occur.


org.apache.lucene.search.payloads Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.search.payloads

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.search.DocIdSetIterator
      • org.apache.lucene.search.Scorer
        • org.apache.lucene.search.spans.SpanScorer
          • org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanScorer
          • org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer
    • org.apache.lucene.search.payloads.PayloadFunction (implements java.io.Serializable)
      • org.apache.lucene.search.payloads.AveragePayloadFunction
      • org.apache.lucene.search.payloads.MaxPayloadFunction
      • org.apache.lucene.search.payloads.MinPayloadFunction
    • org.apache.lucene.search.payloads.PayloadSpanUtil
    • org.apache.lucene.search.Query (implements java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.search.spans.SpanQuery
        • org.apache.lucene.search.spans.SpanNearQuery (implements java.lang.Cloneable)
          • org.apache.lucene.search.payloads.PayloadNearQuery
        • org.apache.lucene.search.spans.SpanTermQuery
          • org.apache.lucene.search.payloads.PayloadTermQuery
    • org.apache.lucene.search.Weight (implements java.io.Serializable)
      • org.apache.lucene.search.spans.SpanWeight
        • org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanWeight
        • org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight


Uses of Package org.apache.lucene.search.payloads

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.search.payloads

Packages that use org.apache.lucene.search.payloads
org.apache.lucene.search.payloads
The payloads package provides Query mechanisms for finding and using payloads.

Classes in org.apache.lucene.search.payloads used by org.apache.lucene.search.payloads
PayloadFunction
An abstract class that defines a way for Payload*Query instances to transform the cumulative effects of payload scores for a document.
PayloadTermQuery
This class is very similar to SpanTermQuery except that it factors in the value of the payload located at each of the positions where the Term occurs.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PayloadFunction

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.payloads
Class PayloadFunction

java.lang.Object
    extended by  org.apache.lucene.search.payloads.PayloadFunction
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AveragePayloadFunction, MaxPayloadFunction, MinPayloadFunction
public abstract class PayloadFunction
extends Object
implements Serializable

An abstract class that defines a way for Payload*Query instances to transform the cumulative effects of payload scores for a document.

See Also:
for more information, Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.
This class and its derivations are experimental and subject to change

Constructor Summary
PayloadFunction()
Method Summary
abstract float | currentScore(int docId, String field, int start, int end, int numPayloadsSeen, float currentScore, float currentPayloadScore) Calculate the score up to this point for this doc and field
abstract float | docScore(int docId, String field, int numPayloadsSeen, float payloadScore) Calculate the final score for all the payloads seen so far for this doc/field
abstract boolean | equals(Object o)
Explanation | explain(int docId, int numPayloadsSeen, float payloadScore)
abstract int | hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PayloadFunction

public PayloadFunction()
Method Detail

currentScore

public abstract float currentScore(int docId,
                                   String field,
                                   int start,
                                   int end,
                                   int numPayloadsSeen,
                                   float currentScore,
                                   float currentPayloadScore)
Calculate the score up to this point for this doc and field

Parameters:
docId - The current doc
field - The field
start - The start position of the matching Span
end - The end position of the matching Span
numPayloadsSeen - The number of payloads seen so far
currentScore - The current score so far
currentPayloadScore - The score for the current payload
Returns:
The new current Score
See Also:
Spans

docScore

public abstract float docScore(int docId,
                               String field,
                               int numPayloadsSeen,
                               float payloadScore)
Calculate the final score for all the payloads seen so far for this doc/field

Parameters:
docId - The current doc
field - The current field
numPayloadsSeen - The total number of payloads seen on this document
payloadScore - The raw score for those payloads
Returns:
The final score for the payloads

explain

public Explanation explain(int docId,
                           int numPayloadsSeen,
                           float payloadScore)

hashCode

public abstract int hashCode()
Overrides:
hashCode in class Object

equals

public abstract boolean equals(Object o)
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PayloadNearQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.payloads
Class PayloadNearQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.spans.SpanQuery
            extended by  org.apache.lucene.search.spans.SpanNearQuery
                extended by  org.apache.lucene.search.payloads.PayloadNearQuery
All Implemented Interfaces:
Serializable, Cloneable
public class PayloadNearQuery
extends SpanNearQuery

This class is very similar to SpanNearQuery except that it factors in the value of the payloads located at each of the positions where the TermSpans occurs.

In order to take advantage of this, you must override Similarity.scorePayload(int, java.lang.String, int, int, byte[], int, int) which returns 1 by default.

Payload scores are aggregated using a pluggable PayloadFunction.

See Also:
Similarity.scorePayload(int, java.lang.String, int, int, byte[], int, int), Serialized Form

Nested Class Summary
class | PayloadNearQuery.PayloadNearSpanScorer
class | PayloadNearQuery.PayloadNearSpanWeight
Field Summary
protected String | fieldName
protected PayloadFunction | function
Fields inherited from class org.apache.lucene.search.spans.SpanNearQuery
clauses, field, inOrder, slop
Constructor Summary
PayloadNearQuery(SpanQuery[] clauses, int slop, boolean inOrder)
PayloadNearQuery(SpanQuery[] clauses, int slop, boolean inOrder, PayloadFunction function)
Method Summary
Object | clone() Returns a clone of this query.
Weight | createWeight(Searcher searcher) Expert: Constructs an appropriate Weight implementation for this query.
boolean | equals(Object obj) Returns true iff o is equal to this.
int | hashCode()
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.spans.SpanNearQuery
extractTerms, getClauses, getField, getSlop, getSpans, isInOrder, rewrite
Methods inherited from class org.apache.lucene.search.Query
combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

fieldName

protected String fieldName

function

protected PayloadFunction function
Constructor Detail

PayloadNearQuery

public PayloadNearQuery(SpanQuery[] clauses,
                        int slop,
                        boolean inOrder)

PayloadNearQuery

public PayloadNearQuery(SpanQuery[] clauses,
                        int slop,
                        boolean inOrder,
                        PayloadFunction function)
Method Detail

createWeight

public Weight createWeight(Searcher searcher)
                    throws IOException
Description copied from class: Query
Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Overrides:
createWeight in class SpanQuery
Throws:
IOException

clone

public Object clone()
Description copied from class: Query
Returns a clone of this query.

Overrides:
clone in class SpanNearQuery

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Overrides:
toString in class SpanNearQuery

hashCode

public int hashCode()
Overrides:
hashCode in class SpanNearQuery

equals

public boolean equals(Object obj)
Description copied from class: SpanNearQuery
Returns true iff o is equal to this.

Overrides:
equals in class SpanNearQuery
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PayloadNearQuery.PayloadNearSpanScorer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.payloads
Class PayloadNearQuery.PayloadNearSpanScorer

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSetIterator
        extended by  org.apache.lucene.search.Scorer
            extended by  org.apache.lucene.search.spans.SpanScorer
                extended by  org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanScorer
Enclosing class:
PayloadNearQuery
public class PayloadNearQuery.PayloadNearSpanScorer
extends SpanScorer

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.Scorer
Scorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer>
Field Summary
protected  float payloadScore
Fields inherited from class org.apache.lucene.search.spans.SpanScorer
doc, freq, more, norms, value
Fields inherited from class org.apache.lucene.search.Scorer
weight
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
Constructor Summary
protected PayloadNearQuery.PayloadNearSpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms)
Method Summary
protected Explanation | explain(int doc) This method is no longer an official member of Scorer, but it is needed by SpanWeight to build an explanation.
void | getPayloads(Spans[] subSpans)
protected void | processPayloads(Collection<byte[]> payLoads, int start, int end) By default, uses the PayloadFunction to score the payloads, but can be overridden to do other things.
float | score() Returns the score of the current document matching the query.
protected boolean | setFreqCurrentDoc()
Methods inherited from class org.apache.lucene.search.spans.SpanScorer
advance, docID, freq, nextDoc
Methods inherited from class org.apache.lucene.search.Scorer
getSimilarity, score, score, visitScorers, visitSubScorers
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

payloadScore

protected float payloadScore
Constructor Detail

PayloadNearQuery.PayloadNearSpanScorer

protected PayloadNearQuery.PayloadNearSpanScorer(Spans spans,
                                                 Weight weight,
                                                 Similarity similarity,
                                                 byte[] norms)
                                          throws IOException
Throws:
IOException
Method Detail

getPayloads

public void getPayloads(Spans[] subSpans)
                 throws IOException
Throws:
IOException

processPayloads

protected void processPayloads(Collection<byte[]> payLoads,
                               int start,
                               int end)
By default, uses the PayloadFunction to score the payloads, but can be overridden to do other things.

Parameters:
payLoads - The payloads
start - The start position of the span being scored
end - The end position of the span being scored
See Also:
Spans

setFreqCurrentDoc

protected boolean setFreqCurrentDoc()
                             throws IOException
Overrides:
setFreqCurrentDoc in class SpanScorer
Throws:
IOException

score

public float score()
            throws IOException
Description copied from class: Scorer
Returns the score of the current document matching the query. Initially invalid, until DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) is called the first time, or when called from within Collector.collect(int).

Overrides:
score in class SpanScorer
Throws:
IOException

explain

protected Explanation explain(int doc)
                       throws IOException
Description copied from class: SpanScorer
This method is no longer an official member of Scorer, but it is needed by SpanWeight to build an explanation.

Overrides:
explain in class SpanScorer
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PayloadNearQuery.PayloadNearSpanWeight

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.payloads
Class PayloadNearQuery.PayloadNearSpanWeight

java.lang.Object
    extended by  org.apache.lucene.search.Weight
        extended by  org.apache.lucene.search.spans.SpanWeight
            extended by  org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanWeight
All Implemented Interfaces:
Serializable
Enclosing class:
PayloadNearQuery
public class PayloadNearQuery.PayloadNearSpanWeight
extends SpanWeight

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.search.spans.SpanWeight
idf, query, queryNorm, queryWeight, similarity, terms, value
Constructor Summary
PayloadNearQuery.PayloadNearSpanWeight(SpanQuery query, Searcher searcher)
Method Summary
 Scorer scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer)
Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.
Methods inherited from class org.apache.lucene.search.spans.SpanWeight
explain, getQuery, getValue, normalize, sumOfSquaredWeights
Methods inherited from class org.apache.lucene.search.Weight
scoresDocsOutOfOrder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PayloadNearQuery.PayloadNearSpanWeight

public PayloadNearQuery.PayloadNearSpanWeight(SpanQuery query,
                                              Searcher searcher)
                                       throws IOException
Throws:
IOException
Method Detail

scorer

public Scorer scorer(IndexReader reader,
                     boolean scoreDocsInOrder,
                     boolean topScorer)
              throws IOException
Description copied from class: Weight
Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.

NOTE: even if scoreDocsInOrder is false, it is recommended to check whether the returned Scorer indeed scores documents out of order (i.e., call Weight.scoresDocsOutOfOrder()), as some Scorer implementations will always return documents in-order.
NOTE: null can be returned if no documents will be scored by this query.

Overrides:
scorer in class SpanWeight
Parameters:
reader - the IndexReader for which to return the Scorer.
scoreDocsInOrder - specifies whether in-order scoring of documents is required. Note that if set to false (i.e., out-of-order scoring is required), this method can return whatever scoring mode it supports, as every in-order scorer is also an out-of-order one. However, an out-of-order scorer may not support DocIdSetIterator.nextDoc() and/or DocIdSetIterator.advance(int), therefore it is recommended to request an in-order scorer if use of these methods is required.
topScorer - if true, Scorer.score(Collector) will be called; if false, DocIdSetIterator.nextDoc() and/or DocIdSetIterator.advance(int) will be called.
Returns:
a Scorer which scores documents in/out-of order.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PayloadSpanUtil

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.payloads
Class PayloadSpanUtil

java.lang.Object
    extended by  org.apache.lucene.search.payloads.PayloadSpanUtil

public class PayloadSpanUtil
extends Object

Experimental class to get set of payloads for most standard Lucene queries. Operates like Highlighter - IndexReader should only contain doc of interest, best to use MemoryIndex.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
PayloadSpanUtil(IndexReader reader)
Method Summary
 Collection<byte[]> getPayloadsForQuery(Query query)
Query should be rewritten for wild/fuzzy support.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PayloadSpanUtil

public PayloadSpanUtil(IndexReader reader)
Parameters:
reader - that contains doc with payloads to extract
Method Detail

getPayloadsForQuery

public Collection<byte[]> getPayloadsForQuery(Query query)
                                       throws IOException
Query should be rewritten for wild/fuzzy support.

Parameters:
query -
Returns:
payloads Collection
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PayloadTermQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.payloads
Class PayloadTermQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.spans.SpanQuery
            extended by  org.apache.lucene.search.spans.SpanTermQuery
                extended by  org.apache.lucene.search.payloads.PayloadTermQuery
All Implemented Interfaces:
Serializable, Cloneable
public class PayloadTermQuery
extends SpanTermQuery

This class is very similar to SpanTermQuery except that it factors in the value of the payload located at each of the positions where the Term occurs.

In order to take advantage of this, you must override Similarity.scorePayload(int, String, int, int, byte[],int,int) which returns 1 by default.

Payload scores are aggregated using a pluggable PayloadFunction.

See Also:
Serialized Form

Nested Class Summary
protected  class PayloadTermQuery.PayloadTermWeight
Field Summary
protected  PayloadFunction function
Fields inherited from class org.apache.lucene.search.spans.SpanTermQuery
term
Constructor Summary
PayloadTermQuery(Term term, PayloadFunction function)
PayloadTermQuery(Term term, PayloadFunction function, boolean includeSpanScore)
Method Summary
Weight | createWeight(Searcher searcher) Expert: Constructs an appropriate Weight implementation for this query.
boolean | equals(Object obj)
int | hashCode()
Methods inherited from class org.apache.lucene.search.spans.SpanTermQuery
extractTerms, getField, getSpans, getTerm, toString
Methods inherited from class org.apache.lucene.search.Query
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, rewrite, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

function

protected PayloadFunction function
Constructor Detail

PayloadTermQuery

public PayloadTermQuery(Term term,
                        PayloadFunction function)

PayloadTermQuery

public PayloadTermQuery(Term term,
                        PayloadFunction function,
                        boolean includeSpanScore)
Method Detail

createWeight

public Weight createWeight(Searcher searcher)
                    throws IOException
Description copied from class: Query
Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Overrides:
createWeight in class SpanQuery
Throws:
IOException

hashCode

public int hashCode()
Overrides:
hashCode in class SpanTermQuery

equals

public boolean equals(Object obj)
Overrides:
equals in class SpanTermQuery
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PayloadTermQuery.PayloadTermWeight

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.payloads
Class PayloadTermQuery.PayloadTermWeight

java.lang.Object
    extended by  org.apache.lucene.search.Weight
        extended by  org.apache.lucene.search.spans.SpanWeight
            extended by  org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight
All Implemented Interfaces:
Serializable
Enclosing class:
PayloadTermQuery
protected class PayloadTermQuery.PayloadTermWeight
extends SpanWeight

See Also:
Serialized Form

Nested Class Summary
protected  class PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer
Field Summary
Fields inherited from class org.apache.lucene.search.spans.SpanWeight
idf, query, queryNorm, queryWeight, similarity, terms, value
Constructor Summary
PayloadTermQuery.PayloadTermWeight(PayloadTermQuery query, Searcher searcher)
Method Summary
Explanation | explain(IndexReader reader, int doc) An explanation of the score computation for the named document.
Scorer | scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.
Methods inherited from class org.apache.lucene.search.spans.SpanWeight
getQuery, getValue, normalize, sumOfSquaredWeights
Methods inherited from class org.apache.lucene.search.Weight
scoresDocsOutOfOrder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PayloadTermQuery.PayloadTermWeight

public PayloadTermQuery.PayloadTermWeight(PayloadTermQuery query,
                                          Searcher searcher)
                                   throws IOException
Throws:
IOException
Method Detail

scorer

public Scorer scorer(IndexReader reader,
                     boolean scoreDocsInOrder,
                     boolean topScorer)
              throws IOException
Description copied from class: Weight
Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.

NOTE: even if scoreDocsInOrder is false, it is recommended to check whether the returned Scorer indeed scores documents out of order (i.e., call Weight.scoresDocsOutOfOrder()), as some Scorer implementations will always return documents in-order.
NOTE: null can be returned if no documents will be scored by this query.

Overrides:
scorer in class SpanWeight
Parameters:
reader - the IndexReader for which to return the Scorer.
scoreDocsInOrder - specifies whether in-order scoring of documents is required. Note that if set to false (i.e., out-of-order scoring is required), this method can return whatever scoring mode it supports, as every in-order scorer is also an out-of-order one. However, an out-of-order scorer may not support DocIdSetIterator.nextDoc() and/or DocIdSetIterator.advance(int), therefore it is recommended to request an in-order scorer if use of these methods is required.
topScorer - if true, Scorer.score(Collector) will be called; if false, DocIdSetIterator.nextDoc() and/or DocIdSetIterator.advance(int) will be called.
Returns:
a Scorer which scores documents in/out-of order.
Throws:
IOException

explain

public Explanation explain(IndexReader reader,
                           int doc)
                    throws IOException
Description copied from class: Weight
An explanation of the score computation for the named document.

Overrides:
explain in class SpanWeight
Parameters:
reader - sub-reader containing the give doc
Returns:
an Explanation for the score
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.payloads
Class PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSetIterator
        extended by  org.apache.lucene.search.Scorer
            extended by  org.apache.lucene.search.spans.SpanScorer
                extended by  org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer
Enclosing class:
PayloadTermQuery.PayloadTermWeight
protected class PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer
extends SpanScorer

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.Scorer
Scorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer>
Field Summary
protected byte[] | payload
protected float | payloadScore
protected int | payloadsSeen
protected TermPositions | positions
Fields inherited from class org.apache.lucene.search.spans.SpanScorer
doc, freq, more, norms, spans, value
Fields inherited from class org.apache.lucene.search.Scorer
weight
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
Constructor Summary
PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer(TermSpans spans, Weight weight, Similarity similarity, byte[] norms)
Method Summary
protected Explanation | explain(int doc) This method is no longer an official member of Scorer, but it is needed by SpanWeight to build an explanation.
protected float | getPayloadScore() The score for the payload
protected float | getSpanScore() Returns the SpanScorer score only.
protected void | processPayload(Similarity similarity)
float | score() Returns the score of the current document matching the query.
protected boolean | setFreqCurrentDoc()
Methods inherited from class org.apache.lucene.search.spans.SpanScorer
advance, docID, freq, nextDoc
Methods inherited from class org.apache.lucene.search.Scorer
getSimilarity, score, score, visitScorers, visitSubScorers
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

payload

protected byte[] payload

positions

protected TermPositions positions

payloadScore

protected float payloadScore

payloadsSeen

protected int payloadsSeen
Constructor Detail

PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

public PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer(TermSpans spans,
                                                                Weight weight,
                                                                Similarity similarity,
                                                                byte[] norms)
                                                         throws IOException
Throws:
IOException
Method Detail

setFreqCurrentDoc

protected boolean setFreqCurrentDoc()
                             throws IOException
Overrides:
setFreqCurrentDoc in class SpanScorer
Throws:
IOException

processPayload

protected void processPayload(Similarity similarity)
                       throws IOException
Throws:
IOException

score

public float score()
            throws IOException
Description copied from class: Scorer
Returns the score of the current document matching the query. Initially invalid, until DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) is called the first time, or when called from within Collector.collect(int).

Overrides:
score in class SpanScorer
Returns:
getSpanScore() * getPayloadScore()
Throws:
IOException

getSpanScore

protected float getSpanScore()
                      throws IOException
Returns the SpanScorer score only.

Should not be overridden without good cause!

Returns:
the score for just the Span part w/o the payload
Throws:
IOException
See Also:
score()

getPayloadScore

protected float getPayloadScore()
The score for the payload

Returns:
The score, as calculated by PayloadFunction.docScore(int, String, int, float)

explain

protected Explanation explain(int doc)
                       throws IOException
Description copied from class: SpanScorer
This method is no longer an official member of Scorer, but it is needed by SpanWeight to build an explanation.

Overrides:
explain in class SpanScorer
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.search.payloads.AveragePayloadFunction

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.payloads.AveragePayloadFunction

No usage of org.apache.lucene.search.payloads.AveragePayloadFunction

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.payloads.MaxPayloadFunction

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.payloads.MaxPayloadFunction

No usage of org.apache.lucene.search.payloads.MaxPayloadFunction

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.payloads.MinPayloadFunction

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.payloads.MinPayloadFunction

No usage of org.apache.lucene.search.payloads.MinPayloadFunction

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.payloads.PayloadFunction

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.payloads.PayloadFunction

Packages that use PayloadFunction
org.apache.lucene.search.payloads
The payloads package provides Query mechanisms for finding and using payloads.

Uses of PayloadFunction in org.apache.lucene.search.payloads

Subclasses of PayloadFunction in org.apache.lucene.search.payloads
class | AveragePayloadFunction Calculate the final score as the average score of all payloads seen.
class | MaxPayloadFunction Returns the maximum payload score seen, else 1 if there are no payloads on the doc.
class | MinPayloadFunction Calculates the minimum payload seen

Fields in org.apache.lucene.search.payloads declared as PayloadFunction
protected PayloadFunction | PayloadNearQuery.function
protected PayloadFunction | PayloadTermQuery.function

Constructors in org.apache.lucene.search.payloads with parameters of type PayloadFunction
PayloadNearQuery(SpanQuery[] clauses, int slop, boolean inOrder, PayloadFunction function)
PayloadTermQuery(Term term, PayloadFunction function)
PayloadTermQuery(Term term, PayloadFunction function, boolean includeSpanScore)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.payloads.PayloadNearQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.payloads.PayloadNearQuery

No usage of org.apache.lucene.search.payloads.PayloadNearQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanScorer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanScorer

No usage of org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanScorer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanWeight

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanWeight

No usage of org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanWeight

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.payloads.PayloadSpanUtil

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.payloads.PayloadSpanUtil

No usage of org.apache.lucene.search.payloads.PayloadSpanUtil

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.payloads.PayloadTermQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.payloads.PayloadTermQuery

Packages that use PayloadTermQuery
org.apache.lucene.search.payloads
The payloads package provides Query mechanisms for finding and using payloads.

Uses of PayloadTermQuery in org.apache.lucene.search.payloads

Constructors in org.apache.lucene.search.payloads with parameters of type PayloadTermQuery
PayloadTermQuery.PayloadTermWeight(PayloadTermQuery query, Searcher searcher)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight

No usage of org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

No usage of org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


JakartaRegexpCapabilities

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.regex
Class JakartaRegexpCapabilities

java.lang.Object
    extended by  org.apache.lucene.search.regex.JakartaRegexpCapabilities
All Implemented Interfaces:
RegexCapabilities
public class JakartaRegexpCapabilities
extends Object
implements RegexCapabilities

Implementation tying Jakarta Regexp to RegexQuery. Jakarta Regepx internally supports a prefix() implementation which can offer performance gains under certain circumstances. Yet, the implementation appears to be rather shaky as it doesn't always provide a prefix even if one would exist.

Field Summary
static int | FLAG_MATCH_CASEINDEPENDENT Flag to specify that matching should be case-independent (folded)
static int | FLAG_MATCH_NORMAL Flag to specify normal, case-sensitive matching behaviour.
Constructor Summary
JakartaRegexpCapabilities()
Constructs a RegexCapabilities with the default MATCH_NORMAL match style.
JakartaRegexpCapabilities(int flags)
Constructs a RegexCapabilities with the provided match flags.
Method Summary
void | compile(String pattern) Called by the constructor of RegexTermEnum allowing implementations to cache a compiled version of the regular expression pattern.
boolean | equals(Object o)
int | hashCode()
boolean | match(String string)
String | prefix() A wise prefix implementation can reduce the term enumeration (and thus increase performance) of RegexQuery dramatically!
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

FLAG_MATCH_NORMAL

public static final int FLAG_MATCH_NORMAL
Flag to specify normal, case-sensitive matching behaviour. This is the default.

See Also:
Constant Field Values

FLAG_MATCH_CASEINDEPENDENT

public static final int FLAG_MATCH_CASEINDEPENDENT
Flag to specify that matching should be case-independent (folded)

See Also:
Constant Field Values
Constructor Detail

JakartaRegexpCapabilities

public JakartaRegexpCapabilities()
Constructs a RegexCapabilities with the default MATCH_NORMAL match style.

JakartaRegexpCapabilities

public JakartaRegexpCapabilities(int flags)
Constructs a RegexCapabilities with the provided match flags. Multiple flags should be ORed together.

Parameters:
flags - The matching style
Method Detail

compile

public void compile(String pattern)
Description copied from interface: RegexCapabilities
Called by the constructor of RegexTermEnum allowing implementations to cache a compiled version of the regular expression pattern.

Specified by:
compile in interface RegexCapabilities
Parameters:
pattern - regular expression pattern

match

public boolean match(String string)
Specified by:
match in interface RegexCapabilities
Returns:
true if string matches the pattern last passed to RegexCapabilities.compile(java.lang.String).

prefix

public String prefix()
Description copied from interface: RegexCapabilities
A wise prefix implementation can reduce the term enumeration (and thus increase performance) of RegexQuery dramatically!

Specified by:
prefix in interface RegexCapabilities
Returns:
static non-regex prefix of the pattern last passed to RegexCapabilities.compile(java.lang.String). May return null.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


JavaUtilRegexCapabilities

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.regex
Class JavaUtilRegexCapabilities

java.lang.Object
    extended by  org.apache.lucene.search.regex.JavaUtilRegexCapabilities
All Implemented Interfaces:
RegexCapabilities
public class JavaUtilRegexCapabilities
extends Object
implements RegexCapabilities

An implementation tying Java's built-in java.util.regex to RegexQuery. Note that because this implementation currently only returns null from prefix() that queries using this implementation will enumerate and attempt to match(java.lang.String) each term for the specified field in the index.

Field Summary
static int | FLAG_CANON_EQ
static int | FLAG_CASE_INSENSITIVE
static int | FLAG_COMMENTS
static int | FLAG_DOTALL
static int | FLAG_LITERAL
static int | FLAG_MULTILINE
static int | FLAG_UNICODE_CASE
static int | FLAG_UNIX_LINES
Constructor Summary
JavaUtilRegexCapabilities()
Default constructor that uses java.util.regex.Pattern with its default flags.
JavaUtilRegexCapabilities(int flags)
Constructor that allows for the modification of the flags that the java.util.regex.Pattern will use to compile the regular expression.
Method Summary
void | compile(String pattern) Called by the constructor of RegexTermEnum allowing implementations to cache a compiled version of the regular expression pattern.
boolean | equals(Object o)
int | hashCode()
boolean | match(String string)
String | prefix() A wise prefix implementation can reduce the term enumeration (and thus increase performance) of RegexQuery dramatically!
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

FLAG_CANON_EQ

public static final int FLAG_CANON_EQ
See Also:
Constant Field Values

FLAG_CASE_INSENSITIVE

public static final int FLAG_CASE_INSENSITIVE
See Also:
Constant Field Values

FLAG_COMMENTS

public static final int FLAG_COMMENTS
See Also:
Constant Field Values

FLAG_DOTALL

public static final int FLAG_DOTALL
See Also:
Constant Field Values

FLAG_LITERAL

public static final int FLAG_LITERAL
See Also:
Constant Field Values

FLAG_MULTILINE

public static final int FLAG_MULTILINE
See Also:
Constant Field Values

FLAG_UNICODE_CASE

public static final int FLAG_UNICODE_CASE
See Also:
Constant Field Values

FLAG_UNIX_LINES

public static final int FLAG_UNIX_LINES
See Also:
Constant Field Values
Constructor Detail

JavaUtilRegexCapabilities

public JavaUtilRegexCapabilities()
Default constructor that uses java.util.regex.Pattern with its default flags.

JavaUtilRegexCapabilities

public JavaUtilRegexCapabilities(int flags)
Constructor that allows for the modification of the flags that the java.util.regex.Pattern will use to compile the regular expression. This gives the user the ability to fine-tune how the regular expression to match the functionality that they need. The Pattern class supports specifying these fields via the regular expression text itself, but this gives the caller another option to modify the behavior. Useful in cases where the regular expression text cannot be modified, or if doing so is undesired.

Parameters:
flags - The flags that are ORed together.
Method Detail

compile

public void compile(String pattern)
Description copied from interface: RegexCapabilities
Called by the constructor of RegexTermEnum allowing implementations to cache a compiled version of the regular expression pattern.

Specified by:
compile in interface RegexCapabilities
Parameters:
pattern - regular expression pattern

match

public boolean match(String string)
Specified by:
match in interface RegexCapabilities
Returns:
true if string matches the pattern last passed to RegexCapabilities.compile(java.lang.String).

prefix

public String prefix()
Description copied from interface: RegexCapabilities
A wise prefix implementation can reduce the term enumeration (and thus increase performance) of RegexQuery dramatically!

Specified by:
prefix in interface RegexCapabilities
Returns:
static non-regex prefix of the pattern last passed to RegexCapabilities.compile(java.lang.String). May return null.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.search.regex
Interfaces
RegexCapabilities
RegexQueryCapable
Classes
JakartaRegexpCapabilities
JavaUtilRegexCapabilities
RegexQuery
RegexTermEnum
SpanRegexQuery


org.apache.lucene.search.regex

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.search.regex

Regular expression Query.

See:
Description

Interface Summary
RegexCapabilities | Defines basic operations needed by RegexQuery for a regular expression implementation.
RegexQueryCapable | Defines methods for regular expression supporting Querys to use.

Class Summary
JakartaRegexpCapabilities | Implementation tying Jakarta Regexp to RegexQuery.
JavaUtilRegexCapabilities | An implementation tying Java's built-in java.util.regex to RegexQuery.
RegexQuery | Implements the regular expression term search query.
RegexTermEnum | Subclass of FilteredTermEnum for enumerating all terms that match the specified regular expression term using the specified regular expression implementation.
SpanRegexQuery | Deprecated. Use new SpanMultiTermQueryWrapper<RegexQuery>(new RegexQuery()) instead.

Package org.apache.lucene.search.regex Description

Regular expression Query.


org.apache.lucene.search.regex Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.search.regex

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.search.regex.JakartaRegexpCapabilities (implements org.apache.lucene.search.regex.RegexCapabilities)
    • org.apache.lucene.search.regex.JavaUtilRegexCapabilities (implements org.apache.lucene.search.regex.RegexCapabilities)
    • org.apache.lucene.search.Query (implements java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.search.MultiTermQuery
        • org.apache.lucene.search.regex.RegexQuery (implements org.apache.lucene.search.regex.RegexQueryCapable)
      • org.apache.lucene.search.spans.SpanQuery
        • org.apache.lucene.search.spans.SpanMultiTermQueryWrapper<Q>
          • org.apache.lucene.search.regex.SpanRegexQuery (implements org.apache.lucene.search.regex.RegexQueryCapable)
    • org.apache.lucene.index.TermEnum (implements java.io.Closeable)
      • org.apache.lucene.search.FilteredTermEnum
        • org.apache.lucene.search.regex.RegexTermEnum

Interface Hierarchy

  • org.apache.lucene.search.regex.RegexCapabilities
  • org.apache.lucene.search.regex.RegexQueryCapable


Uses of Package org.apache.lucene.search.regex

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.search.regex

Packages that use org.apache.lucene.search.regex
org.apache.lucene.search.regex Regular expression Query.

Classes in org.apache.lucene.search.regex used by org.apache.lucene.search.regex
RegexCapabilities
Defines basic operations needed by RegexQuery for a regular expression implementation.
RegexQueryCapable
Defines methods for regular expression supporting Querys to use.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


RegexCapabilities

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.regex
Interface RegexCapabilities

All Known Implementing Classes:
JakartaRegexpCapabilities, JavaUtilRegexCapabilities
public interface RegexCapabilities

Defines basic operations needed by RegexQuery for a regular expression implementation.

Method Summary
void | compile(String pattern) Called by the constructor of RegexTermEnum allowing implementations to cache a compiled version of the regular expression pattern.
boolean | match(String string)
String | prefix() A wise prefix implementation can reduce the term enumeration (and thus increase performance) of RegexQuery dramatically!

Method Detail

compile

void compile(String pattern)
Called by the constructor of RegexTermEnum allowing implementations to cache a compiled version of the regular expression pattern.

Parameters:
pattern - regular expression pattern

match

boolean match(String string)
Parameters:
string -
Returns:
true if string matches the pattern last passed to compile(java.lang.String).

prefix

String prefix()
A wise prefix implementation can reduce the term enumeration (and thus increase performance) of RegexQuery dramatically!

Returns:
static non-regex prefix of the pattern last passed to compile(java.lang.String). May return null.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RegexQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.regex
Class RegexQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.MultiTermQuery
            extended by  org.apache.lucene.search.regex.RegexQuery
All Implemented Interfaces:
Serializable, Cloneable, RegexQueryCapable
public class RegexQuery
extends MultiTermQuery
implements RegexQueryCapable

Implements the regular expression term search query. The expressions supported depend on the regular expression implementation used by way of the RegexCapabilities interface.

See Also:
RegexTermEnum, Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.MultiTermQuery
MultiTermQuery.ConstantScoreAutoRewrite, MultiTermQuery.RewriteMethod, MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite, MultiTermQuery.TopTermsScoringBooleanQueryRewrite
Field Summary
Fields inherited from class org.apache.lucene.search.MultiTermQuery
CONSTANT_SCORE_AUTO_REWRITE_DEFAULT, CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE, CONSTANT_SCORE_FILTER_REWRITE, rewriteMethod, SCORING_BOOLEAN_QUERY_REWRITE
Constructor Summary
RegexQuery(Term term)
Constructs a query for terms matching term.
Method Summary
boolean | equals(Object o)
protected FilteredTermEnum | getEnum(IndexReader reader) Construct the enumeration to be used, expanding the pattern term.
RegexCapabilities | getRegexImplementation()
Term | getTerm()
int | hashCode()
void | setRegexImplementation(RegexCapabilities impl) Defines which RegexCapabilities implementation is used by this instance.
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.MultiTermQuery
clearTotalNumberOfTerms, getRewriteMethod, getTotalNumberOfTerms, incTotalNumberOfTerms, rewrite, setRewriteMethod
Methods inherited from class org.apache.lucene.search.Query
clone, combine, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

RegexQuery

public RegexQuery(Term term)
Constructs a query for terms matching term.

Method Detail

getTerm

public Term getTerm()

setRegexImplementation

public void setRegexImplementation(RegexCapabilities impl)
Defines which RegexCapabilities implementation is used by this instance.

Specified by:
setRegexImplementation in interface RegexQueryCapable
Parameters:
impl -

getRegexImplementation

public RegexCapabilities getRegexImplementation()
Specified by:
getRegexImplementation in interface RegexQueryCapable
Returns:
The implementation used by this instance.

getEnum

protected FilteredTermEnum getEnum(IndexReader reader)
                            throws IOException
Description copied from class: MultiTermQuery
Construct the enumeration to be used, expanding the pattern term.

Specified by:
getEnum in class MultiTermQuery
Throws:
IOException

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

equals

public boolean equals(Object o)
Overrides:
equals in class MultiTermQuery

hashCode

public int hashCode()
Overrides:
hashCode in class MultiTermQuery
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RegexQueryCapable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.regex
Interface RegexQueryCapable

All Known Implementing Classes:
RegexQuery, SpanRegexQuery
public interface RegexQueryCapable

Defines methods for regular expression supporting Querys to use.

Method Summary
RegexCapabilities | getRegexImplementation()
void | setRegexImplementation(RegexCapabilities impl)

Method Detail

setRegexImplementation

void setRegexImplementation(RegexCapabilities impl)

getRegexImplementation

RegexCapabilities getRegexImplementation()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RegexTermEnum

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.regex
Class RegexTermEnum

java.lang.Object
    extended by  org.apache.lucene.index.TermEnum
        extended by  org.apache.lucene.search.FilteredTermEnum
            extended by  org.apache.lucene.search.regex.RegexTermEnum
All Implemented Interfaces:
Closeable
public class RegexTermEnum
extends FilteredTermEnum

Subclass of FilteredTermEnum for enumerating all terms that match the specified regular expression term using the specified regular expression implementation.

Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.

Field Summary
Fields inherited from class org.apache.lucene.search.FilteredTermEnum
actualEnum, currentTerm
Constructor Summary
RegexTermEnum(IndexReader reader, Term term, RegexCapabilities regexImpl)
Method Summary
void | close() Closes the enumeration to further activity, freeing resources.
float | difference() Equality measure on the term
boolean | endEnum() Indicates the end of the enumeration has been reached
protected boolean | termCompare(Term term) Equality compare on the term
Methods inherited from class org.apache.lucene.search.FilteredTermEnum
docFreq, next, setEnum, term
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RegexTermEnum

public RegexTermEnum(IndexReader reader,
                     Term term,
                     RegexCapabilities regexImpl)
              throws IOException
Throws:
IOException
Method Detail

termCompare

protected final boolean termCompare(Term term)
Description copied from class: FilteredTermEnum
Equality compare on the term

Specified by:
termCompare in class FilteredTermEnum

difference

public final float difference()
Description copied from class: FilteredTermEnum
Equality measure on the term

Specified by:
difference in class FilteredTermEnum

endEnum

public final boolean endEnum()
Description copied from class: FilteredTermEnum
Indicates the end of the enumeration has been reached

Specified by:
endEnum in class FilteredTermEnum

close

public void close()
           throws IOException
Description copied from class: FilteredTermEnum
Closes the enumeration to further activity, freeing resources.

Specified by:
close in interface Closeable
Overrides:
close in class FilteredTermEnum
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanRegexQuery

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.regex
Class SpanRegexQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.spans.SpanQuery
            extended by  org.apache.lucene.search.spans.SpanMultiTermQueryWrapper<RegexQuery>
                extended by  org.apache.lucene.search.regex.SpanRegexQuery
All Implemented Interfaces:
Serializable, Cloneable, RegexQueryCapable
Deprecated. Use new SpanMultiTermQueryWrapper<RegexQuery>(new RegexQuery()) instead. This query will be removed in Lucene 4.0

@Deprecated
public class SpanRegexQuery
extends SpanMultiTermQueryWrapper<RegexQuery>
implements RegexQueryCapable

A SpanQuery version of RegexQuery allowing regular expression queries to be nested within other SpanQuery subclasses.

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper
SpanMultiTermQueryWrapper.SpanRewriteMethod, SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite
Field Summary
Fields inherited from class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper
query, SCORING_SPAN_QUERY_REWRITE
Constructor Summary
SpanRegexQuery(Term term)
Deprecated.
Method Summary
RegexCapabilities | getRegexImplementation() Deprecated.
Term | getTerm() Deprecated.
void | setRegexImplementation(RegexCapabilities impl) Deprecated.
Methods inherited from class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper
equals, getField, getRewriteMethod, getSpans, hashCode, rewrite, setRewriteMethod, toString
Methods inherited from class org.apache.lucene.search.spans.SpanQuery
createWeight
Methods inherited from class org.apache.lucene.search.Query
clone, combine, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SpanRegexQuery

public SpanRegexQuery(Term term)
Deprecated.
Method Detail

getTerm

public Term getTerm()
Deprecated.

setRegexImplementation

public void setRegexImplementation(RegexCapabilities impl)
Deprecated.
Specified by:
setRegexImplementation in interface RegexQueryCapable

getRegexImplementation

public RegexCapabilities getRegexImplementation()
Deprecated.
Specified by:
getRegexImplementation in interface RegexQueryCapable
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.search.regex.JakartaRegexpCapabilities

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.regex.JakartaRegexpCapabilities

No usage of org.apache.lucene.search.regex.JakartaRegexpCapabilities

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.regex.JavaUtilRegexCapabilities

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.regex.JavaUtilRegexCapabilities

No usage of org.apache.lucene.search.regex.JavaUtilRegexCapabilities

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.regex.RegexCapabilities

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.regex.RegexCapabilities

Packages that use RegexCapabilities
org.apache.lucene.search.regex Regular expression Query.

Uses of RegexCapabilities in org.apache.lucene.search.regex

Classes in org.apache.lucene.search.regex that implement RegexCapabilities
class | JakartaRegexpCapabilities Implementation tying Jakarta Regexp to RegexQuery.
class | JavaUtilRegexCapabilities An implementation tying Java's built-in java.util.regex to RegexQuery.

Methods in org.apache.lucene.search.regex that return RegexCapabilities
RegexCapabilities | RegexQuery.getRegexImplementation()
RegexCapabilities | SpanRegexQuery.getRegexImplementation() Deprecated.
RegexCapabilities | RegexQueryCapable.getRegexImplementation()

Methods in org.apache.lucene.search.regex with parameters of type RegexCapabilities
void | RegexQuery.setRegexImplementation(RegexCapabilities impl) Defines which RegexCapabilities implementation is used by this instance.
void | SpanRegexQuery.setRegexImplementation(RegexCapabilities impl) Deprecated.
void | RegexQueryCapable.setRegexImplementation(RegexCapabilities impl)

Constructors in org.apache.lucene.search.regex with parameters of type RegexCapabilities
RegexTermEnum(IndexReader reader, Term term, RegexCapabilities regexImpl)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.regex.RegexQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.regex.RegexQuery

No usage of org.apache.lucene.search.regex.RegexQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.regex.RegexQueryCapable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.regex.RegexQueryCapable

Packages that use RegexQueryCapable
org.apache.lucene.search.regex Regular expression Query.

Uses of RegexQueryCapable in org.apache.lucene.search.regex

Classes in org.apache.lucene.search.regex that implement RegexQueryCapable
class | RegexQuery Implements the regular expression term search query.
class | SpanRegexQuery Deprecated. Use new SpanMultiTermQueryWrapper<RegexQuery>(new RegexQuery()) instead. This query will be removed in Lucene 4.0

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.regex.RegexTermEnum

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.regex.RegexTermEnum

No usage of org.apache.lucene.search.regex.RegexTermEnum

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.regex.SpanRegexQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.regex.SpanRegexQuery

No usage of org.apache.lucene.search.regex.SpanRegexQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


MoreLikeThis

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.similar
Class MoreLikeThis

java.lang.Object
    extended by  org.apache.lucene.search.similar.MoreLikeThis

public final class MoreLikeThis
extends Object

Generate "more like this" similarity queries. Based on this mail:

 Lucene does let you access the document frequency of terms, with IndexReader.docFreq().
 Term frequencies can be computed by re-tokenizing the text, which, for a single document,
 is usually fast enough.  But looking up the docFreq() of every term in the document is
 probably too slow.

 You can use some heuristics to prune the set of terms, to avoid calling docFreq() too much,
 or at all.  Since you're trying to maximize a tf*idf score, you're probably most interested
 in terms with a high tf. Choosing a tf threshold even as low as two or three will radically
 reduce the number of terms under consideration.  Another heuristic is that terms with a
 high idf (i.e., a low df) tend to be longer.  So you could threshold the terms by the
 number of characters, not selecting anything less than, e.g., six or seven characters.
 With these sorts of heuristics you can usually find small set of, e.g., ten or fewer terms
 that do a pretty good job of characterizing a document.

 It all depends on what you're trying to do.  If you're trying to eek out that last percent
 of precision and recall regardless of computational difficulty so that you can win a TREC
 competition, then the techniques I mention above are useless.  But if you're trying to
 provide a "more like this" button on a search results page that does a decent job and has
 good performance, such techniques might be useful.

 An efficient, effective "more-like-this" query generator would be a great contribution, if
 anyone's interested.  I'd imagine that it would take a Reader or a String (the document's
 text), analyzer Analyzer, and return a set of representative terms using heuristics like those
 above.  The frequency and length thresholds could be parameters, etc.

 Doug

Initial Usage

This class has lots of options to try to make it efficient and flexible. The simplest possible usage is as follows. The bold fragment is specific to this class.

 IndexReader ir = ...
 IndexSearcher is = ...

 MoreLikeThis mlt = new MoreLikeThis(ir);
 Reader target = ... // orig source of doc you want to find similarities to
 Query query = mlt.like( target);

 Hits hits = is.search(query);
 // now the usual iteration thru 'hits' - the only thing to watch for is to make sure
 //you ignore the doc if it matches your 'target' document, as it should be similar to itself
Thus you:
  1. do your normal, Lucene setup for searching,
  2. create a MoreLikeThis,
  3. get the text of the doc you want to find similarities to
  4. then call one of the like() calls to generate a similarity query
  5. call the searcher to find the similar docs

More Advanced Usage

You may want to use setFieldNames(...) so you can examine multiple fields (e.g. body and title) for similarity.

Depending on the size of your index and the size and makeup of your documents you may want to call the other set methods to control how the similarity queries are generated:

  • setMinTermFreq(...)
  • setMinDocFreq(...)
  • setMaxDocFreq(...)
  • setMaxDocFreqPct(...)
  • setMinWordLen(...)
  • setMaxWordLen(...)
  • setMaxQueryTerms(...)
  • setMaxNumTokensParsed(...)
  • setStopWord(...)
 Changes: Mark Harwood 29/02/04
 Some bugfixing, some refactoring, some optimisation.
  - bugfix: retrieveTerms(int docNum) was not working for indexes without a termvector -added missing code
  - bugfix: No significant terms being created for fields with a termvector - because
            was only counting one occurrence per term/field pair in calculations(ie not including frequency info from TermVector)
  - refactor: moved common code into isNoiseWord()
  - optimise: when no termvector support available - used maxNumTermsParsed to limit amount of tokenization

Field Summary
static Analyzer | DEFAULT_ANALYZER Deprecated. This default will be removed in Lucene 4.0 (with the default being null). If you are not using term vectors, explicitly set your analyzer instead.
static boolean | DEFAULT_BOOST Boost terms in query based on score.
static String[] | DEFAULT_FIELD_NAMES Default field names.
static int | DEFAULT_MAX_DOC_FREQ Ignore words which occur in more than this many docs.
static int | DEFAULT_MAX_NUM_TOKENS_PARSED Default maximum number of tokens to parse in each example doc field that is not stored with TermVector support.
static int | DEFAULT_MAX_QUERY_TERMS Return a Query with no more than this many terms.
static int | DEFAULT_MAX_WORD_LENGTH Ignore words greater than this length or if 0 then this has no effect.
static int | DEFAULT_MIN_DOC_FREQ Ignore words which do not occur in at least this many docs.
static int | DEFAULT_MIN_TERM_FREQ Ignore terms with less than this frequency in the source doc.
static int | DEFAULT_MIN_WORD_LENGTH Ignore words less than this length or if 0 then this has no effect.
static Set<?> | DEFAULT_STOP_WORDS Default set of stopwords.
Constructor Summary
MoreLikeThis(IndexReader ir)
Constructor requiring an IndexReader.
MoreLikeThis(IndexReader ir, Similarity sim)
Method Summary
String | describeParams() Describe the parameters that control how the "more like this" query is formed.
Analyzer | getAnalyzer() Returns an analyzer that will be used to parse source doc with.
float | getBoostFactor() Returns the boost factor used when boosting terms
String[] | getFieldNames() Returns the field names that will be used when generating the 'More Like This' query.
int | getMaxDocFreq() Returns the maximum frequency in which words may still appear.
int | getMaxNumTokensParsed()
int | getMaxQueryTerms() Returns the maximum number of query terms that will be included in any generated query.
int | getMaxWordLen() Returns the maximum word length above which words will be ignored.
int | getMinDocFreq() Returns the frequency at which words will be ignored which do not occur in at least this many docs.
int | getMinTermFreq() Returns the frequency below which terms will be ignored in the source doc.
int | getMinWordLen() Returns the minimum word length below which words will be ignored.
Similarity | getSimilarity()
Set<?> | getStopWords() Get the current stop words being used.
boolean | isBoost() Returns whether to boost terms in query based on "score" or not.
Query | like(File f) Deprecated. use like(Reader, String) instead
Query | like(InputStream is) Deprecated. use like(Reader, String) instead
Query | like(int docNum) Return a query that will return docs like the passed lucene document ID.
Query | like(Reader r) Deprecated. use like(Reader, String) instead
Query | like(Reader r, String fieldName) Return a query that will return docs like the passed Reader.
Query | like(URL u) Deprecated. use like(Reader, String) instead
String[] | retrieveInterestingTerms(int docNum)
String[] | retrieveInterestingTerms(Reader r) Deprecated. use retrieveInterestingTerms(Reader, String) instead.
String[] | retrieveInterestingTerms(Reader r, String fieldName) Convenience routine to make it easy to return the most interesting words in a document.
PriorityQueue<Object[]> | retrieveTerms(int docNum) Find words for a more-like-this query former.
PriorityQueue<Object[]> | retrieveTerms(Reader r) Deprecated. use retrieveTerms(Reader, String) instead
PriorityQueue<Object[]> | retrieveTerms(Reader r, String fieldName) Find words for a more-like-this query former.
void | setAnalyzer(Analyzer analyzer) Sets the analyzer to use.
void | setBoost(boolean boost) Sets whether to boost terms in query based on "score" or not.
void | setBoostFactor(float boostFactor) Sets the boost factor to use when boosting terms
void | setFieldNames(String[] fieldNames) Sets the field names that will be used when generating the 'More Like This' query.
void | setMaxDocFreq(int maxFreq) Set the maximum frequency in which words may still appear.
void | setMaxDocFreqPct(int maxPercentage) Set the maximum percentage in which words may still appear.
void | setMaxNumTokensParsed(int i)
void | setMaxQueryTerms(int maxQueryTerms) Sets the maximum number of query terms that will be included in any generated query.
void | setMaxWordLen(int maxWordLen) Sets the maximum word length above which words will be ignored.
void | setMinDocFreq(int minDocFreq) Sets the frequency at which words will be ignored which do not occur in at least this many docs.
void | setMinTermFreq(int minTermFreq) Sets the frequency below which terms will be ignored in the source doc.
void | setMinWordLen(int minWordLen) Sets the minimum word length below which words will be ignored.
void | setSimilarity(Similarity similarity)
void | setStopWords(Set<?> stopWords) Set the set of stopwords.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_MAX_NUM_TOKENS_PARSED

public static final int DEFAULT_MAX_NUM_TOKENS_PARSED
Default maximum number of tokens to parse in each example doc field that is not stored with TermVector support.

See Also:
getMaxNumTokensParsed(), Constant Field Values

DEFAULT_ANALYZER

@Deprecated
public static final Analyzer DEFAULT_ANALYZER
Deprecated. This default will be removed in Lucene 4.0 (with the default being null). If you are not using term vectors, explicitly set your analyzer instead.
Default analyzer to parse source doc with.

See Also:
getAnalyzer()

DEFAULT_MIN_TERM_FREQ

public static final int DEFAULT_MIN_TERM_FREQ
Ignore terms with less than this frequency in the source doc.

See Also:
getMinTermFreq(), setMinTermFreq(int), Constant Field Values

DEFAULT_MIN_DOC_FREQ

public static final int DEFAULT_MIN_DOC_FREQ
Ignore words which do not occur in at least this many docs.

See Also:
getMinDocFreq(), setMinDocFreq(int), Constant Field Values

DEFAULT_MAX_DOC_FREQ

public static final int DEFAULT_MAX_DOC_FREQ
Ignore words which occur in more than this many docs.

See Also:
getMaxDocFreq(), setMaxDocFreq(int), setMaxDocFreqPct(int), Constant Field Values

DEFAULT_BOOST

public static final boolean DEFAULT_BOOST
Boost terms in query based on score.

See Also:
isBoost(), setBoost(boolean), Constant Field Values

DEFAULT_FIELD_NAMES

public static final String[] DEFAULT_FIELD_NAMES
Default field names. Null is used to specify that the field names should be looked up at runtime from the provided reader.

DEFAULT_MIN_WORD_LENGTH

public static final int DEFAULT_MIN_WORD_LENGTH
Ignore words less than this length or if 0 then this has no effect.

See Also:
getMinWordLen(), setMinWordLen(int), Constant Field Values

DEFAULT_MAX_WORD_LENGTH

public static final int DEFAULT_MAX_WORD_LENGTH
Ignore words greater than this length or if 0 then this has no effect.

See Also:
getMaxWordLen(), setMaxWordLen(int), Constant Field Values

DEFAULT_STOP_WORDS

public static final Set<?> DEFAULT_STOP_WORDS
Default set of stopwords. If null means to allow stop words.

See Also:
setStopWords(java.util.Set), getStopWords()

DEFAULT_MAX_QUERY_TERMS

public static final int DEFAULT_MAX_QUERY_TERMS
Return a Query with no more than this many terms.

See Also:
BooleanQuery.getMaxClauseCount(), getMaxQueryTerms(), setMaxQueryTerms(int), Constant Field Values
Constructor Detail

MoreLikeThis

public MoreLikeThis(IndexReader ir)
Constructor requiring an IndexReader.

MoreLikeThis

public MoreLikeThis(IndexReader ir,
                    Similarity sim)
Method Detail

getBoostFactor

public float getBoostFactor()
Returns the boost factor used when boosting terms

Returns:
the boost factor used when boosting terms

setBoostFactor

public void setBoostFactor(float boostFactor)
Sets the boost factor to use when boosting terms

Parameters:
boostFactor -

getSimilarity

public Similarity getSimilarity()

setSimilarity

public void setSimilarity(Similarity similarity)

getAnalyzer

public Analyzer getAnalyzer()
Returns an analyzer that will be used to parse source doc with. The default analyzer is the DEFAULT_ANALYZER.

Returns:
the analyzer that will be used to parse source doc with.
See Also:
DEFAULT_ANALYZER

setAnalyzer

public void setAnalyzer(Analyzer analyzer)
Sets the analyzer to use. An analyzer is not required for generating a query with the like(int) method, all other 'like' methods require an analyzer.

Parameters:
analyzer - the analyzer to use to tokenize text.

getMinTermFreq

public int getMinTermFreq()
Returns the frequency below which terms will be ignored in the source doc. The default frequency is the DEFAULT_MIN_TERM_FREQ.

Returns:
the frequency below which terms will be ignored in the source doc.

setMinTermFreq

public void setMinTermFreq(int minTermFreq)
Sets the frequency below which terms will be ignored in the source doc.

Parameters:
minTermFreq - the frequency below which terms will be ignored in the source doc.

getMinDocFreq

public int getMinDocFreq()
Returns the frequency at which words will be ignored which do not occur in at least this many docs. The default frequency is DEFAULT_MIN_DOC_FREQ.

Returns:
the frequency at which words will be ignored which do not occur in at least this many docs.

setMinDocFreq

public void setMinDocFreq(int minDocFreq)
Sets the frequency at which words will be ignored which do not occur in at least this many docs.

Parameters:
minDocFreq - the frequency at which words will be ignored which do not occur in at least this many docs.

getMaxDocFreq

public int getMaxDocFreq()
Returns the maximum frequency in which words may still appear. Words that appear in more than this many docs will be ignored. The default frequency is DEFAULT_MAX_DOC_FREQ.

Returns:
get the maximum frequency at which words are still allowed, words which occur in more docs than this are ignored.

setMaxDocFreq

public void setMaxDocFreq(int maxFreq)
Set the maximum frequency in which words may still appear. Words that appear in more than this many docs will be ignored.

Parameters:
maxFreq - the maximum count of documents that a term may appear in to be still considered relevant

setMaxDocFreqPct

public void setMaxDocFreqPct(int maxPercentage)
Set the maximum percentage in which words may still appear. Words that appear in more than this many percent of all docs will be ignored.

Parameters:
maxPercentage - the maximum percentage of documents (0-100) that a term may appear in to be still considered relevant

isBoost

public boolean isBoost()
Returns whether to boost terms in query based on "score" or not. The default is DEFAULT_BOOST.

Returns:
whether to boost terms in query based on "score" or not.
See Also:
setBoost(boolean)

setBoost

public void setBoost(boolean boost)
Sets whether to boost terms in query based on "score" or not.

Parameters:
boost - true to boost terms in query based on "score", false otherwise.
See Also:
isBoost()

getFieldNames

public String[] getFieldNames()
Returns the field names that will be used when generating the 'More Like This' query. The default field names that will be used is DEFAULT_FIELD_NAMES.

Returns:
the field names that will be used when generating the 'More Like This' query.

setFieldNames

public void setFieldNames(String[] fieldNames)
Sets the field names that will be used when generating the 'More Like This' query. Set this to null for the field names to be determined at runtime from the IndexReader provided in the constructor.

Parameters:
fieldNames - the field names that will be used when generating the 'More Like This' query.

getMinWordLen

public int getMinWordLen()
Returns the minimum word length below which words will be ignored. Set this to 0 for no minimum word length. The default is DEFAULT_MIN_WORD_LENGTH.

Returns:
the minimum word length below which words will be ignored.

setMinWordLen

public void setMinWordLen(int minWordLen)
Sets the minimum word length below which words will be ignored.

Parameters:
minWordLen - the minimum word length below which words will be ignored.

getMaxWordLen

public int getMaxWordLen()
Returns the maximum word length above which words will be ignored. Set this to 0 for no maximum word length. The default is DEFAULT_MAX_WORD_LENGTH.

Returns:
the maximum word length above which words will be ignored.

setMaxWordLen

public void setMaxWordLen(int maxWordLen)
Sets the maximum word length above which words will be ignored.

Parameters:
maxWordLen - the maximum word length above which words will be ignored.

setStopWords

public void setStopWords(Set<?> stopWords)
Set the set of stopwords. Any word in this set is considered "uninteresting" and ignored. Even if your Analyzer allows stopwords, you might want to tell the MoreLikeThis code to ignore them, as for the purposes of document similarity it seems reasonable to assume that "a stop word is never interesting".

Parameters:
stopWords - set of stopwords, if null it means to allow stop words
See Also:
StopFilter.makeStopSet(), getStopWords()

getStopWords

public Set<?> getStopWords()
Get the current stop words being used.

See Also:
setStopWords(java.util.Set)

getMaxQueryTerms

public int getMaxQueryTerms()
Returns the maximum number of query terms that will be included in any generated query. The default is DEFAULT_MAX_QUERY_TERMS.

Returns:
the maximum number of query terms that will be included in any generated query.

setMaxQueryTerms

public void setMaxQueryTerms(int maxQueryTerms)
Sets the maximum number of query terms that will be included in any generated query.

Parameters:
maxQueryTerms - the maximum number of query terms that will be included in any generated query.

getMaxNumTokensParsed

public int getMaxNumTokensParsed()
Returns:
The maximum number of tokens to parse in each example doc field that is not stored with TermVector support
See Also:
DEFAULT_MAX_NUM_TOKENS_PARSED

setMaxNumTokensParsed

public void setMaxNumTokensParsed(int i)
Parameters:
i - The maximum number of tokens to parse in each example doc field that is not stored with TermVector support

like

public Query like(int docNum)
           throws IOException
Return a query that will return docs like the passed lucene document ID.

Parameters:
docNum - the documentID of the lucene doc to generate the 'More Like This" query for.
Returns:
a query that will return docs like the passed lucene document ID.
Throws:
IOException

like

@Deprecated
public Query like(File f)
           throws IOException
Deprecated. use like(Reader, String) instead

Return a query that will return docs like the passed file.

Returns:
a query that will return docs like the passed file.
Throws:
IOException

like

@Deprecated
public Query like(URL u)
           throws IOException
Deprecated. use like(Reader, String) instead

Return a query that will return docs like the passed URL.

Returns:
a query that will return docs like the passed URL.
Throws:
IOException

like

@Deprecated
public Query like(InputStream is)
           throws IOException
Deprecated. use like(Reader, String) instead

Return a query that will return docs like the passed stream.

Returns:
a query that will return docs like the passed stream.
Throws:
IOException

like

@Deprecated
public Query like(Reader r)
           throws IOException
Deprecated. use like(Reader, String) instead

Throws:
IOException

like

public Query like(Reader r,
                  String fieldName)
           throws IOException
Return a query that will return docs like the passed Reader.

Returns:
a query that will return docs like the passed Reader.
Throws:
IOException

describeParams

public String describeParams()
Describe the parameters that control how the "more like this" query is formed.

retrieveTerms

public PriorityQueue<Object[]> retrieveTerms(int docNum)
                                      throws IOException
Find words for a more-like-this query former.

Parameters:
docNum - the id of the lucene document from which to find terms
Throws:
IOException

retrieveTerms

public PriorityQueue<Object[]> retrieveTerms(Reader r,
                                             String fieldName)
                                      throws IOException
Find words for a more-like-this query former. The result is a priority queue of arrays with one entry for every word in the document. Each array has 6 elements. The elements are:
  1. The word (String)
  2. The top field that this word comes from (String)
  3. The score for this word (Float)
  4. The IDF value (Float)
  5. The frequency of this word in the index (Integer)
  6. The frequency of this word in the source document (Integer)
This is a somewhat "advanced" routine, and in general only the 1st entry in the array is of interest. This method is exposed so that you can identify the "interesting words" in a document. For an easier method to call see retrieveInterestingTerms().

Parameters:
r - the reader that has the content of the document
fieldName - field passed to the analyzer to use when analyzing the content
Returns:
the most interesting words in the document ordered by score, with the highest scoring, or best entry, first
Throws:
IOException
See Also:
retrieveInterestingTerms(int)

retrieveTerms

@Deprecated
public PriorityQueue<Object[]> retrieveTerms(Reader r)
                                      throws IOException
Deprecated. use retrieveTerms(Reader, String) instead

Throws:
IOException

retrieveInterestingTerms

public String[] retrieveInterestingTerms(int docNum)
                                  throws IOException
Throws:
IOException
See Also:
retrieveInterestingTerms(java.io.Reader, String)

retrieveInterestingTerms

public String[] retrieveInterestingTerms(Reader r,
                                         String fieldName)
                                  throws IOException
Convenience routine to make it easy to return the most interesting words in a document. More advanced users will call retrieveTerms() directly.

Parameters:
r - the source document
fieldName - field passed to analyzer to use when analyzing the content
Returns:
the most interesting words in the document
Throws:
IOException
See Also:
retrieveTerms(java.io.Reader, String), setMaxQueryTerms(int)

retrieveInterestingTerms

@Deprecated
public String[] retrieveInterestingTerms(Reader r)
                                  throws IOException
Deprecated. use retrieveInterestingTerms(Reader, String) instead.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


MoreLikeThisQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.similar
Class MoreLikeThisQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.similar.MoreLikeThisQuery
All Implemented Interfaces:
Serializable, Cloneable
public class MoreLikeThisQuery
extends Query

A simple wrapper for MoreLikeThis for use in scenarios where a Query object is required eg in custom QueryParser extensions. At query.rewrite() time the reader is used to construct the actual MoreLikeThis object and obtain the real Query object.

See Also:
Serialized Form

Constructor Summary
MoreLikeThisQuery(String likeText, String[] moreLikeFields, Analyzer analyzer)
Deprecated. use MoreLikeThisQuery(String, String[], Analyzer, String) instead.
MoreLikeThisQuery(String likeText, String[] moreLikeFields, Analyzer analyzer, String fieldName)
Method Summary
Analyzer | getAnalyzer()
String | getLikeText()
int | getMaxQueryTerms()
int | getMinDocFreq()
int | getMinTermFrequency()
String[] | getMoreLikeFields()
float | getPercentTermsToMatch()
Set<?> | getStopWords()
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
void | setAnalyzer(Analyzer analyzer)
void | setLikeText(String likeText)
void | setMaxQueryTerms(int maxQueryTerms)
void | setMinDocFreq(int minDocFreq)
void | setMinTermFrequency(int minTermFrequency)
void | setMoreLikeFields(String[] moreLikeFields)
void | setPercentTermsToMatch(float percentTermsToMatch)
void | setStopWords(Set<?> stopWords)
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.Query
clone, combine, createWeight, equals, extractTerms, getBoost, getSimilarity, hashCode, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

MoreLikeThisQuery

@Deprecated
public MoreLikeThisQuery(String likeText,
                                    String[] moreLikeFields,
                                    Analyzer analyzer)
Deprecated. use MoreLikeThisQuery(String, String[], Analyzer, String) instead.

MoreLikeThisQuery

public MoreLikeThisQuery(String likeText,
                         String[] moreLikeFields,
                         Analyzer analyzer,
                         String fieldName)
Parameters:
moreLikeFields -
Method Detail

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

getPercentTermsToMatch

public float getPercentTermsToMatch()

setPercentTermsToMatch

public void setPercentTermsToMatch(float percentTermsToMatch)

getAnalyzer

public Analyzer getAnalyzer()

setAnalyzer

public void setAnalyzer(Analyzer analyzer)

getLikeText

public String getLikeText()

setLikeText

public void setLikeText(String likeText)

getMaxQueryTerms

public int getMaxQueryTerms()

setMaxQueryTerms

public void setMaxQueryTerms(int maxQueryTerms)

getMinTermFrequency

public int getMinTermFrequency()

setMinTermFrequency

public void setMinTermFrequency(int minTermFrequency)

getMoreLikeFields

public String[] getMoreLikeFields()

setMoreLikeFields

public void setMoreLikeFields(String[] moreLikeFields)

getStopWords

public Set<?> getStopWords()

setStopWords

public void setStopWords(Set<?> stopWords)

getMinDocFreq

public int getMinDocFreq()

setMinDocFreq

public void setMinDocFreq(int minDocFreq)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.search.similar
Classes
MoreLikeThis
MoreLikeThisQuery
SimilarityQueries


org.apache.lucene.search.similar

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.search.similar

Document similarity query generators.

See:
Description

Class Summary
MoreLikeThis | Generate "more like this" similarity queries.
MoreLikeThisQuery | A simple wrapper for MoreLikeThis for use in scenarios where a Query object is required eg in custom QueryParser extensions.
SimilarityQueries | Simple similarity measures.

Package org.apache.lucene.search.similar Description

Document similarity query generators.


org.apache.lucene.search.similar Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.search.similar

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.search.similar.MoreLikeThis
    • org.apache.lucene.search.Query (implements java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.search.similar.MoreLikeThisQuery
    • org.apache.lucene.search.similar.SimilarityQueries


Uses of Package org.apache.lucene.search.similar

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.search.similar

No usage of org.apache.lucene.search.similar

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SimilarityQueries

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.similar
Class SimilarityQueries

java.lang.Object
    extended by  org.apache.lucene.search.similar.SimilarityQueries

public final class SimilarityQueries
extends Object

Simple similarity measures.

See Also:
MoreLikeThis

Method Summary
static Query formSimilarQuery(String body, Analyzer a, String field, Set<?> stop)
Simple similarity query generators.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

formSimilarQuery

public static Query formSimilarQuery(String body,
                                     Analyzer a,
                                     String field,
                                     Set<?> stop)
                              throws IOException
Simple similarity query generators. Takes every unique word and forms a boolean query where all words are optional. After you get this you'll use to to query your IndexSearcher for similar docs. The only caveat is the first hit returned should be your source document - you'll need to then ignore that.

So, if you have a code fragment like this:
Query q = formSimilaryQuery( "I use Lucene to search fast. Fast searchers are good", new StandardAnalyzer(), "contents", null);

The query returned, in string form, will be '(i use lucene to search fast searchers are good').

The philosophy behind this method is "two documents are similar if they share lots of words". Note that behind the scenes, Lucene's scoring algorithm will tend to give two documents a higher similarity score if the share more uncommon words.

This method is fail-safe in that if a long 'body' is passed in and BooleanQuery.add() (used internally) throws BooleanQuery.TooManyClauses, the query as it is will be returned.

Parameters:
body - the body of the document you want to find similar documents to
a - the analyzer to use to parse the body
field - the field you want to search on, probably something like "contents" or "body"
stop - optional set of stop words to ignore
Returns:
a query with all unique words in 'body'
Throws:
IOException - this can't happen...
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.search.similar.MoreLikeThis

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.similar.MoreLikeThis

No usage of org.apache.lucene.search.similar.MoreLikeThis

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.similar.MoreLikeThisQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.similar.MoreLikeThisQuery

No usage of org.apache.lucene.search.similar.MoreLikeThisQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.similar.SimilarityQueries

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.similar.SimilarityQueries

No usage of org.apache.lucene.search.similar.SimilarityQueries

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


FieldMaskingSpanQuery

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class FieldMaskingSpanQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.spans.SpanQuery
            extended by  org.apache.lucene.search.spans.FieldMaskingSpanQuery
All Implemented Interfaces:
Serializable, Cloneable
public class FieldMaskingSpanQuery
extends SpanQuery

Wrapper to allow SpanQuery objects participate in composite single-field SpanQueries by 'lying' about their search field. That is, the masked SpanQuery will function as normal, but SpanQuery.getField() simply hands back the value supplied in this class's constructor.

This can be used to support Queries like SpanNearQuery or SpanOrQuery across different fields, which is not ordinarily permitted.

This can be useful for denormalized relational data: for example, when indexing a document with conceptually many 'children':

  teacherid: 1
  studentfirstname: james
  studentsurname: jones

  teacherid: 2
  studenfirstname: james
  studentsurname: smith
  studentfirstname: sally
  studentsurname: jones

a SpanNearQuery with a slop of 0 can be applied across two SpanTermQuery objects as follows:

    SpanQuery q1  = new SpanTermQuery(new Term("studentfirstname", "james"));
    SpanQuery q2  = new SpanTermQuery(new Term("studentsurname", "jones"));
    SpanQuery q2m = new FieldMaskingSpanQuery(q2, "studentfirstname");
    Query q = new SpanNearQuery(new SpanQuery[]{q1, q2m}, -1, false);
to search for 'studentfirstname:james studentsurname:jones' and find teacherid 1 without matching teacherid 2 (which has a 'james' in position 0 and 'jones' in position 1).

Note: as getField() returns the masked field, scoring will be done using the norms of the field name supplied. This may lead to unexpected scoring behaviour.

See Also:
Serialized Form

Constructor Summary
FieldMaskingSpanQuery(SpanQuery maskedQuery, String maskedField)
Method Summary
Weight | createWeight(Searcher searcher) Expert: Constructs an appropriate Weight implementation for this query.
boolean | equals(Object o)
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
String | getField() Returns the name of the field matched by this query.
SpanQuery | getMaskedQuery()
Spans | getSpans(IndexReader reader) Expert: Returns the matches for this query in an index.
int | hashCode()
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.Query
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FieldMaskingSpanQuery

public FieldMaskingSpanQuery(SpanQuery maskedQuery,
                             String maskedField)
Method Detail

getField

public String getField()
Description copied from class: SpanQuery
Returns the name of the field matched by this query.

Specified by:
getField in class SpanQuery

getMaskedQuery

public SpanQuery getMaskedQuery()

getSpans

public Spans getSpans(IndexReader reader)
               throws IOException
Description copied from class: SpanQuery
Expert: Returns the matches for this query in an index. Used internally to search for spans.

Specified by:
getSpans in class SpanQuery
Throws:
IOException

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

createWeight

public Weight createWeight(Searcher searcher)
                    throws IOException
Description copied from class: Query
Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Overrides:
createWeight in class SpanQuery
Throws:
IOException

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

equals

public boolean equals(Object o)
Overrides:
equals in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


NearSpansOrdered

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class NearSpansOrdered

java.lang.Object
    extended by  org.apache.lucene.search.spans.Spans
        extended by  org.apache.lucene.search.spans.NearSpansOrdered

public class NearSpansOrdered
extends Spans

A Spans that is formed from the ordered subspans of a SpanNearQuery where the subspans do not overlap and have a maximum slop between them.

The formed spans only contains minimum slop matches.
The matching slop is computed from the distance(s) between the non overlapping matching Spans.
Successive matches are always formed from the successive Spans of the SpanNearQuery.

The formed spans may contain overlaps when the slop is at least 1. For example, when querying using

t1 t2 t3
with slop at least 1, the fragment:
t1 t2 t1 t3 t2 t3
matches twice:
t1 t2 .. t3
      t1 .. t2 t3
Expert: Only public for subclassing. Most implementations should not need this class

Constructor Summary
NearSpansOrdered(SpanNearQuery spanNearQuery, IndexReader reader)
NearSpansOrdered(SpanNearQuery spanNearQuery, IndexReader reader, boolean collectPayloads)
Method Summary
int | doc() Returns the document number of the current match.
int | end() Returns the end position of the current match.
Collection<byte[]> | getPayload() Returns the payload data for the current span.
Spans[] | getSubSpans()
boolean | isPayloadAvailable() Checks if a payload can be loaded at this position.
boolean | next() Move to the next match, returning true iff any such exists.
boolean | skipTo(int target) Skips to the first match beyond the current, whose document number is greater than or equal to target.
int | start() Returns the start position of the current match.
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NearSpansOrdered

public NearSpansOrdered(SpanNearQuery spanNearQuery,
                        IndexReader reader)
                 throws IOException
Throws:
IOException

NearSpansOrdered

public NearSpansOrdered(SpanNearQuery spanNearQuery,
                        IndexReader reader,
                        boolean collectPayloads)
                 throws IOException
Throws:
IOException
Method Detail

doc

public int doc()
Description copied from class: Spans
Returns the document number of the current match. Initially invalid.

Specified by:
doc in class Spans

start

public int start()
Description copied from class: Spans
Returns the start position of the current match. Initially invalid.

Specified by:
start in class Spans

end

public int end()
Description copied from class: Spans
Returns the end position of the current match. Initially invalid.

Specified by:
end in class Spans

getSubSpans

public Spans[] getSubSpans()

getPayload

public Collection<byte[]> getPayload()
                              throws IOException
Description copied from class: Spans
Returns the payload data for the current span. This is invalid until Spans.next() is called for the first time. This method must not be called more than once after each call of Spans.next(). However, most payloads are loaded lazily, so if the payload data for the current position is not needed, this method may not be called at all for performance reasons. An ordered SpanQuery does not lazy load, so if you have payloads in your index and you do not want ordered SpanNearQuerys to collect payloads, you can disable collection with a constructor option.

Note that the return type is a collection, thus the ordering should not be relied upon.

Specified by:
getPayload in class Spans
Returns:
a List of byte arrays containing the data of this payload, otherwise null if isPayloadAvailable is false
Throws:
IOException

isPayloadAvailable

public boolean isPayloadAvailable()
Description copied from class: Spans
Checks if a payload can be loaded at this position.

Payloads can only be loaded once per call to Spans.next().

Specified by:
isPayloadAvailable in class Spans
Returns:
true if there is a payload available at this position that can be loaded

next

public boolean next()
             throws IOException
Description copied from class: Spans
Move to the next match, returning true iff any such exists.

Specified by:
next in class Spans
Throws:
IOException

skipTo

public boolean skipTo(int target)
               throws IOException
Description copied from class: Spans
Skips to the first match beyond the current, whose document number is greater than or equal to target.

Returns true iff there is such a match.

Behaves as if written:

   boolean skipTo(int target) {
     do {
       if (!next())
             return false;
     } while (target > doc());
     return true;
   }
Most implementations are considerably more efficient than that.

Specified by:
skipTo in class Spans
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NearSpansUnordered

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class NearSpansUnordered

java.lang.Object
    extended by  org.apache.lucene.search.spans.Spans
        extended by  org.apache.lucene.search.spans.NearSpansUnordered

public class NearSpansUnordered
extends Spans

Similar to NearSpansOrdered, but for the unordered case. Expert: Only public for subclassing. Most implementations should not need this class

Constructor Summary
NearSpansUnordered(SpanNearQuery query, IndexReader reader)
Method Summary
int | doc() Returns the document number of the current match.
int | end() Returns the end position of the current match.
Collection<byte[]> | getPayload() WARNING: The List is not necessarily in order of the the positions
Spans[] | getSubSpans()
boolean | isPayloadAvailable() Checks if a payload can be loaded at this position.
boolean | next() Move to the next match, returning true iff any such exists.
boolean | skipTo(int target) Skips to the first match beyond the current, whose document number is greater than or equal to target.
int | start() Returns the start position of the current match.
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NearSpansUnordered

public NearSpansUnordered(SpanNearQuery query,
                          IndexReader reader)
                   throws IOException
Throws:
IOException
Method Detail

getSubSpans

public Spans[] getSubSpans()

next

public boolean next()
             throws IOException
Description copied from class: Spans
Move to the next match, returning true iff any such exists.

Specified by:
next in class Spans
Throws:
IOException

skipTo

public boolean skipTo(int target)
               throws IOException
Description copied from class: Spans
Skips to the first match beyond the current, whose document number is greater than or equal to target.

Returns true iff there is such a match.

Behaves as if written:

   boolean skipTo(int target) {
     do {
       if (!next())
             return false;
     } while (target > doc());
     return true;
   }
Most implementations are considerably more efficient than that.

Specified by:
skipTo in class Spans
Throws:
IOException

doc

public int doc()
Description copied from class: Spans
Returns the document number of the current match. Initially invalid.

Specified by:
doc in class Spans

start

public int start()
Description copied from class: Spans
Returns the start position of the current match. Initially invalid.

Specified by:
start in class Spans

end

public int end()
Description copied from class: Spans
Returns the end position of the current match. Initially invalid.

Specified by:
end in class Spans

getPayload

public Collection<byte[]> getPayload()
                              throws IOException
WARNING: The List is not necessarily in order of the the positions

Specified by:
getPayload in class Spans
Returns:
Collection of byte[] payloads
Throws:
IOException

isPayloadAvailable

public boolean isPayloadAvailable()
Description copied from class: Spans
Checks if a payload can be loaded at this position.

Payloads can only be loaded once per call to Spans.next().

Specified by:
isPayloadAvailable in class Spans
Returns:
true if there is a payload available at this position that can be loaded

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.search.spans
Classes
FieldMaskingSpanQuery
NearSpansOrdered
NearSpansUnordered
SpanFirstQuery
SpanMultiTermQueryWrapper
SpanMultiTermQueryWrapper.SpanRewriteMethod
SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite
SpanNearPayloadCheckQuery
SpanNearQuery
SpanNotQuery
SpanOrQuery
SpanPayloadCheckQuery
SpanPositionCheckQuery
SpanPositionRangeQuery
SpanQuery
Spans
SpanScorer
SpanTermQuery
SpanWeight
TermSpans
Enums
SpanPositionCheckQuery.AcceptStatus


org.apache.lucene.search.spans

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.search.spans

The calculus of spans.

See:
Description

Class Summary
FieldMaskingSpanQuery | Wrapper to allow SpanQuery objects participate in composite single-field SpanQueries by 'lying' about their search field.
NearSpansOrdered | A Spans that is formed from the ordered subspans of a SpanNearQuery where the subspans do not overlap and have a maximum slop between them.
NearSpansUnordered | Similar to NearSpansOrdered, but for the unordered case.
SpanFirstQuery | Matches spans near the beginning of a field.
SpanMultiTermQueryWrapper<Q extends MultiTermQuery> | Wraps any MultiTermQuery as a SpanQuery, so it can be nested within other SpanQuery classes.
SpanMultiTermQueryWrapper.SpanRewriteMethod | Abstract class that defines how the query is rewritten.
SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite | A rewrite method that first translates each term into a SpanTermQuery in a BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.
SpanNearPayloadCheckQuery | Only return those matches that have a specific payload at the given position.
SpanNearQuery | Matches spans which are near one another.
SpanNotQuery | Removes matches which overlap with another SpanQuery.
SpanOrQuery | Matches the union of its clauses.
SpanPayloadCheckQuery | Only return those matches that have a specific payload at the given position.
SpanPositionCheckQuery | Base class for filtering a SpanQuery based on the position of a match.
SpanPositionRangeQuery | Checks to see if the SpanPositionCheckQuery.getMatch() lies between a start and end position
SpanQuery | Base class for span-based queries.
Spans | Expert: an enumeration of span matches.
SpanScorer | Public for extension only.
SpanTermQuery | Matches spans containing a term.
SpanWeight | Expert-only.
TermSpans | Expert: Public for extension only

Enum Summary
SpanPositionCheckQuery.AcceptStatus Return value if the match should be accepted YES, rejected NO, or rejected and enumeration should advance to the next document NO_AND_ADVANCE.

Package org.apache.lucene.search.spans Description

The calculus of spans.

A span is a <doc,startPosition,endPosition> tuple.

The following span query operators are implemented:

  • A SpanTermQuery matches all spans containing a particular Term.
  • A SpanNearQuery matches spans which occur near one another, and can be used to implement things like phrase search (when constructed from SpanTermQueries) and inter-phrase proximity (when constructed from other SpanNearQueries).
  • A SpanOrQuery merges spans from a number of other SpanQueries.
  • A SpanNotQuery removes spans matching one SpanQuery which overlap another. This can be used, e.g., to implement within-paragraph search.
  • A SpanFirstQuery matches spans matching q whose end position is less than n. This can be used to constrain matches to the first part of the document.
In all cases, output spans are minimally inclusive. In other words, a span formed by matching a span in x and y starts at the lesser of the two starts and ends at the greater of the two ends.

For example, a span query which matches "John Kerry" within ten words of "George Bush" within the first 100 words of the document could be constructed with:

SpanQuery john   = new SpanTermQuery(new Term("content", "john"));
SpanQuery kerry  = new SpanTermQuery(new Term("content", "kerry"));
SpanQuery george = new SpanTermQuery(new Term("content", "george"));
SpanQuery bush   = new SpanTermQuery(new Term("content", "bush"));

SpanQuery johnKerry =
   new SpanNearQuery(new SpanQuery[] {john, kerry}, 0, true);

SpanQuery georgeBush =
   new SpanNearQuery(new SpanQuery[] {george, bush}, 0, true);

SpanQuery johnKerryNearGeorgeBush =
   new SpanNearQuery(new SpanQuery[] {johnKerry, georgeBush}, 10, false);

SpanQuery johnKerryNearGeorgeBushAtStart =
   new SpanFirstQuery(johnKerryNearGeorgeBush, 100);

Span queries may be freely intermixed with other Lucene queries. So, for example, the above query can be restricted to documents which also use the word "iraq" with:

Query query = new BooleanQuery();
query.add(johnKerryNearGeorgeBushAtStart, true, false);
query.add(new TermQuery("content", "iraq"), true, false);


org.apache.lucene.search.spans Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.search.spans

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.search.DocIdSetIterator
      • org.apache.lucene.search.Scorer
        • org.apache.lucene.search.spans.SpanScorer
    • org.apache.lucene.search.MultiTermQuery.RewriteMethod (implements java.io.Serializable)
      • org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod
        • org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite
    • org.apache.lucene.search.Query (implements java.lang.Cloneable, java.io.Serializable)
      • org.apache.lucene.search.spans.SpanQuery
        • org.apache.lucene.search.spans.FieldMaskingSpanQuery
        • org.apache.lucene.search.spans.SpanMultiTermQueryWrapper<Q>
        • org.apache.lucene.search.spans.SpanNearQuery (implements java.lang.Cloneable)
        • org.apache.lucene.search.spans.SpanNotQuery (implements java.lang.Cloneable)
        • org.apache.lucene.search.spans.SpanOrQuery (implements java.lang.Cloneable)
        • org.apache.lucene.search.spans.SpanPositionCheckQuery (implements java.lang.Cloneable)
          • org.apache.lucene.search.spans.SpanNearPayloadCheckQuery
          • org.apache.lucene.search.spans.SpanPayloadCheckQuery
          • org.apache.lucene.search.spans.SpanPositionRangeQuery
            • org.apache.lucene.search.spans.SpanFirstQuery
        • org.apache.lucene.search.spans.SpanTermQuery
    • org.apache.lucene.search.spans.Spans
      • org.apache.lucene.search.spans.NearSpansOrdered
      • org.apache.lucene.search.spans.NearSpansUnordered
      • org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan
      • org.apache.lucene.search.spans.TermSpans
    • org.apache.lucene.search.Weight (implements java.io.Serializable)
      • org.apache.lucene.search.spans.SpanWeight

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.search.spans.SpanPositionCheckQuery.AcceptStatus


Uses of Package org.apache.lucene.search.spans

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.search.spans

Packages that use org.apache.lucene.search.spans
org.apache.lucene.queryParser.surround.query | This package contains SrndQuery and its subclasses.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.regex | Regular expression Query.
org.apache.lucene.search.spans | The calculus of spans.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Classes in org.apache.lucene.search.spans used by org.apache.lucene.queryParser.surround.query
SpanQuery
Base class for span-based queries.
SpanTermQuery
Matches spans containing a term.

Classes in org.apache.lucene.search.spans used by org.apache.lucene.search
SpanQuery
Base class for span-based queries.

Classes in org.apache.lucene.search.spans used by org.apache.lucene.search.highlight
SpanQuery
Base class for span-based queries.

Classes in org.apache.lucene.search.spans used by org.apache.lucene.search.payloads
SpanNearQuery
Matches spans which are near one another.
SpanQuery
Base class for span-based queries.
Spans
Expert: an enumeration of span matches.
SpanScorer
Public for extension only.
SpanTermQuery
Matches spans containing a term.
SpanWeight
Expert-only.
TermSpans
Expert: Public for extension only

Classes in org.apache.lucene.search.spans used by org.apache.lucene.search.regex
SpanMultiTermQueryWrapper
Wraps any MultiTermQuery as a SpanQuery, so it can be nested within other SpanQuery classes.
SpanQuery
Base class for span-based queries.

Classes in org.apache.lucene.search.spans used by org.apache.lucene.search.spans
SpanMultiTermQueryWrapper.SpanRewriteMethod
Abstract class that defines how the query is rewritten.
SpanNearQuery
Matches spans which are near one another.
SpanPositionCheckQuery
Base class for filtering a SpanQuery based on the position of a match.
SpanPositionCheckQuery.AcceptStatus
Return value if the match should be accepted YES, rejected NO, or rejected and enumeration should advance to the next document NO_AND_ADVANCE.
SpanPositionRangeQuery
Checks to see if the SpanPositionCheckQuery.getMatch() lies between a start and end position
SpanQuery
Base class for span-based queries.
Spans
Expert: an enumeration of span matches.

Classes in org.apache.lucene.search.spans used by org.apache.lucene.xmlparser.builders
SpanQuery
Base class for span-based queries.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SpanFirstQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanFirstQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.spans.SpanQuery
            extended by  org.apache.lucene.search.spans.SpanPositionCheckQuery
                extended by  org.apache.lucene.search.spans.SpanPositionRangeQuery
                    extended by  org.apache.lucene.search.spans.SpanFirstQuery
All Implemented Interfaces:
Serializable, Cloneable
public class SpanFirstQuery
extends SpanPositionRangeQuery

Matches spans near the beginning of a field.

This class is a simple extension of SpanPositionRangeQuery in that it assumes the start to be zero and only checks the end boundary.

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.spans.SpanPositionCheckQuery
SpanPositionCheckQuery.AcceptStatus, SpanPositionCheckQuery.PositionCheckSpan
Field Summary
Fields inherited from class org.apache.lucene.search.spans.SpanPositionRangeQuery
end, start
Fields inherited from class org.apache.lucene.search.spans.SpanPositionCheckQuery
match
Constructor Summary
SpanFirstQuery(SpanQuery match, int end)
Construct a SpanFirstQuery matching spans in match whose end position is less than or equal to end.
Method Summary
protected SpanPositionCheckQuery.AcceptStatus | acceptPosition(Spans spans) Implementing classes are required to return whether the current position is a match for the passed in "match" SpanQuery.
Object | clone() Returns a clone of this query.
boolean | equals(Object o)
int | hashCode()
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.spans.SpanPositionRangeQuery
getEnd, getStart
Methods inherited from class org.apache.lucene.search.spans.SpanPositionCheckQuery
extractTerms, getField, getMatch, getSpans, rewrite
Methods inherited from class org.apache.lucene.search.spans.SpanQuery
createWeight
Methods inherited from class org.apache.lucene.search.Query
combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SpanFirstQuery

public SpanFirstQuery(SpanQuery match,
                      int end)
Construct a SpanFirstQuery matching spans in match whose end position is less than or equal to end.

Method Detail

acceptPosition

protected SpanPositionCheckQuery.AcceptStatus acceptPosition(Spans spans)
                                                      throws IOException
Description copied from class: SpanPositionCheckQuery
Implementing classes are required to return whether the current position is a match for the passed in "match" SpanQuery. This is only called if the underlying Spans.next() for the match is successful

Overrides:
acceptPosition in class SpanPositionRangeQuery
Parameters:
spans - The Spans instance, positioned at the spot to check
Returns:
whether the match is accepted, rejected, or rejected and should move to the next doc.
Throws:
IOException
See Also:
Spans.next()

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Overrides:
toString in class SpanPositionRangeQuery

clone

public Object clone()
Description copied from class: Query
Returns a clone of this query.

Overrides:
clone in class SpanPositionRangeQuery

equals

public boolean equals(Object o)
Overrides:
equals in class SpanPositionRangeQuery

hashCode

public int hashCode()
Overrides:
hashCode in class SpanPositionRangeQuery
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanMultiTermQueryWrapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanMultiTermQueryWrapper<Q extends MultiTermQuery>

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.spans.SpanQuery
            extended by  org.apache.lucene.search.spans.SpanMultiTermQueryWrapper<Q>
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
SpanRegexQuery
public class SpanMultiTermQueryWrapper<Q extends MultiTermQuery>
extends SpanQuery

Wraps any MultiTermQuery as a SpanQuery, so it can be nested within other SpanQuery classes.

The query is rewritten by default to a SpanOrQuery containing the expanded terms, but this can be customized.

Example:

 WildcardQuery wildcard = new WildcardQuery(new Term("field", "bro?n"));
 SpanQuery spanWildcard = new SpanMultiTermQueryWrapper<WildcardQuery>(wildcard);
 // do something with spanWildcard, such as use it in a SpanFirstQuery

See Also:
Serialized Form

Nested Class Summary
static class | SpanMultiTermQueryWrapper.SpanRewriteMethod Abstract class that defines how the query is rewritten.
static class | SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite A rewrite method that first translates each term into a SpanTermQuery in a BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.
Field Summary
protected Q | query
static SpanMultiTermQueryWrapper.SpanRewriteMethod | SCORING_SPAN_QUERY_REWRITE A rewrite method that first translates each term into a SpanTermQuery in a BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.
Constructor Summary
SpanMultiTermQueryWrapper(Q query)
Create a new SpanMultiTermQueryWrapper.
Method Summary
boolean | equals(Object obj)
String | getField() Returns the name of the field matched by this query.
SpanMultiTermQueryWrapper.SpanRewriteMethod | getRewriteMethod() Expert: returns the rewriteMethod
Spans | getSpans(IndexReader reader) Expert: Returns the matches for this query in an index.
int | hashCode()
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
void | setRewriteMethod(SpanMultiTermQueryWrapper.SpanRewriteMethod rewriteMethod) Expert: sets the rewrite method.
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.spans.SpanQuery
createWeight
Methods inherited from class org.apache.lucene.search.Query
clone, combine, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

query

protected final Q extends MultiTermQuery query

SCORING_SPAN_QUERY_REWRITE

public static final SpanMultiTermQueryWrapper.SpanRewriteMethod SCORING_SPAN_QUERY_REWRITE
A rewrite method that first translates each term into a SpanTermQuery in a BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.

See Also:
setRewriteMethod(org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod)
Constructor Detail

SpanMultiTermQueryWrapper

public SpanMultiTermQueryWrapper(Q query)
Create a new SpanMultiTermQueryWrapper.

Parameters:
query - Query to wrap.

NOTE: This will call MultiTermQuery.setRewriteMethod(MultiTermQuery.RewriteMethod) on the wrapped query, changing its rewrite method to a suitable one for spans. Be sure to not change the rewrite method on the wrapped query afterwards! Doing so will throw UnsupportedOperationException on rewriting this query! In Lucene 3.x, MultiTermQuery allows queries to rewrite to different field names, but SpanQuery needs a fixed field. The wrapped query must therefore support getField() or getTerm().

Throws:
IllegalArgumentException - if the wrapped query does not provide getField() or getTerm().
Method Detail

getRewriteMethod

public final SpanMultiTermQueryWrapper.SpanRewriteMethod getRewriteMethod()
Expert: returns the rewriteMethod

setRewriteMethod

public final void setRewriteMethod(SpanMultiTermQueryWrapper.SpanRewriteMethod rewriteMethod)
Expert: sets the rewrite method. This only makes sense to be a span rewrite method.

getSpans

public Spans getSpans(IndexReader reader)
               throws IOException
Description copied from class: SpanQuery
Expert: Returns the matches for this query in an index. Used internally to search for spans.

Specified by:
getSpans in class SpanQuery
Throws:
IOException

getField

public String getField()
Description copied from class: SpanQuery
Returns the name of the field matched by this query.

Specified by:
getField in class SpanQuery

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException

hashCode

public int hashCode()
Overrides:
hashCode in class Query

equals

public boolean equals(Object obj)
Overrides:
equals in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanMultiTermQueryWrapper.SpanRewriteMethod

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanMultiTermQueryWrapper.SpanRewriteMethod

java.lang.Object
    extended by  org.apache.lucene.search.MultiTermQuery.RewriteMethod
        extended by  org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite
Enclosing class:
SpanMultiTermQueryWrapper<Q extends MultiTermQuery>
public abstract static class SpanMultiTermQueryWrapper.SpanRewriteMethod
extends MultiTermQuery.RewriteMethod

Abstract class that defines how the query is rewritten.

See Also:
Serialized Form

Constructor Summary
SpanMultiTermQueryWrapper.SpanRewriteMethod()
Method Summary
abstract  SpanQuery rewrite(IndexReader reader, MultiTermQuery query)
Methods inherited from class org.apache.lucene.search.MultiTermQuery.RewriteMethod
getTermsEnum
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanMultiTermQueryWrapper.SpanRewriteMethod

public SpanMultiTermQueryWrapper.SpanRewriteMethod()
Method Detail

rewrite

public abstract SpanQuery rewrite(IndexReader reader,
                                  MultiTermQuery query)
                           throws IOException
Specified by:
rewrite in class MultiTermQuery.RewriteMethod
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite

java.lang.Object
    extended by  org.apache.lucene.search.MultiTermQuery.RewriteMethod
        extended by  org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod
            extended by  org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite
All Implemented Interfaces:
Serializable
Enclosing class:
SpanMultiTermQueryWrapper<Q extends MultiTermQuery>
public static final class SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite
extends SpanMultiTermQueryWrapper.SpanRewriteMethod

A rewrite method that first translates each term into a SpanTermQuery in a BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.

This rewrite method only uses the top scoring terms so it will not overflow the boolean max clause count.

See Also:
MultiTermQuery.setRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod), Serialized Form

Constructor Summary
SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite(int size)
Create a TopTermsSpanBooleanQueryRewrite for at most size terms.
Method Summary
boolean | equals(Object obj)
int | getSize() return the maximum priority queue size
int | hashCode()
SpanQuery | rewrite(IndexReader reader, MultiTermQuery query)
Methods inherited from class org.apache.lucene.search.MultiTermQuery.RewriteMethod
getTermsEnum
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite

public SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite(int size)
Create a TopTermsSpanBooleanQueryRewrite for at most size terms.

Method Detail

getSize

public int getSize()
return the maximum priority queue size

rewrite

public SpanQuery rewrite(IndexReader reader,
                         MultiTermQuery query)
                  throws IOException
Specified by:
rewrite in class SpanMultiTermQueryWrapper.SpanRewriteMethod
Throws:
IOException

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanNearPayloadCheckQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanNearPayloadCheckQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.spans.SpanQuery
            extended by  org.apache.lucene.search.spans.SpanPositionCheckQuery
                extended by  org.apache.lucene.search.spans.SpanNearPayloadCheckQuery
All Implemented Interfaces:
Serializable, Cloneable
public class SpanNearPayloadCheckQuery
extends SpanPositionCheckQuery

Only return those matches that have a specific payload at the given position.

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.spans.SpanPositionCheckQuery
SpanPositionCheckQuery.AcceptStatus, SpanPositionCheckQuery.PositionCheckSpan
Field Summary
protected  Collection<byte[]> payloadToMatch
Fields inherited from class org.apache.lucene.search.spans.SpanPositionCheckQuery
match
Constructor Summary
SpanNearPayloadCheckQuery(SpanNearQuery match, Collection<byte[]> payloadToMatch)
Method Summary
protected SpanPositionCheckQuery.AcceptStatus | acceptPosition(Spans spans) Implementing classes are required to return whether the current position is a match for the passed in "match" SpanQuery.
Object | clone() Returns a clone of this query.
boolean | equals(Object o)
int | hashCode()
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.spans.SpanPositionCheckQuery
extractTerms, getField, getMatch, getSpans, rewrite
Methods inherited from class org.apache.lucene.search.spans.SpanQuery
createWeight
Methods inherited from class org.apache.lucene.search.Query
combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

payloadToMatch

protected final Collection<byte[]> payloadToMatch
Constructor Detail

SpanNearPayloadCheckQuery

public SpanNearPayloadCheckQuery(SpanNearQuery match,
                                 Collection<byte[]> payloadToMatch)
Parameters:
match - The underlying SpanQuery to check
payloadToMatch - The Collection of payloads to match
Method Detail

acceptPosition

protected SpanPositionCheckQuery.AcceptStatus acceptPosition(Spans spans)
                                                      throws IOException
Description copied from class: SpanPositionCheckQuery
Implementing classes are required to return whether the current position is a match for the passed in "match" SpanQuery. This is only called if the underlying Spans.next() for the match is successful

Specified by:
acceptPosition in class SpanPositionCheckQuery
Parameters:
spans - The Spans instance, positioned at the spot to check
Returns:
whether the match is accepted, rejected, or rejected and should move to the next doc.
Throws:
IOException
See Also:
Spans.next()

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

clone

public Object clone()
Description copied from class: Query
Returns a clone of this query.

Overrides:
clone in class Query

equals

public boolean equals(Object o)
Overrides:
equals in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanNearQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanNearQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.spans.SpanQuery
            extended by  org.apache.lucene.search.spans.SpanNearQuery
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
PayloadNearQuery
public class SpanNearQuery
extends SpanQuery
implements Cloneable

Matches spans which are near one another. One can specify slop, the maximum number of intervening unmatched positions, as well as whether matches are required to be in-order.

See Also:
Serialized Form

Field Summary
protected List<SpanQuery> | clauses
protected String | field
protected boolean | inOrder
protected int | slop
Constructor Summary
SpanNearQuery(SpanQuery[] clauses, int slop, boolean inOrder)
Construct a SpanNearQuery.
SpanNearQuery(SpanQuery[] clauses, int slop, boolean inOrder, boolean collectPayloads)
Method Summary
Object | clone() Returns a clone of this query.
boolean | equals(Object o) Returns true iff o is equal to this.
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
SpanQuery[] | getClauses() Return the clauses whose spans are matched.
String | getField() Returns the name of the field matched by this query.
int | getSlop() Return the maximum number of intervening unmatched positions permitted.
Spans | getSpans(IndexReader reader) Expert: Returns the matches for this query in an index.
int | hashCode()
boolean | isInOrder() Return true if matches are required to be in-order.
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.spans.SpanQuery
createWeight
Methods inherited from class org.apache.lucene.search.Query
combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

clauses

protected List<SpanQuery> clauses

slop

protected int slop

inOrder

protected boolean inOrder

field

protected String field
Constructor Detail

SpanNearQuery

public SpanNearQuery(SpanQuery[] clauses,
                     int slop,
                     boolean inOrder)
Construct a SpanNearQuery. Matches spans matching a span from each clause, with up to slop total unmatched positions between them. * When inOrder is true, the spans from each clause must be * ordered as in clauses.

Parameters:
clauses - the clauses to find near each other
slop - The slop value
inOrder - true if order is important

SpanNearQuery

public SpanNearQuery(SpanQuery[] clauses,
                     int slop,
                     boolean inOrder,
                     boolean collectPayloads)
Method Detail

getClauses

public SpanQuery[] getClauses()
Return the clauses whose spans are matched.

getSlop

public int getSlop()
Return the maximum number of intervening unmatched positions permitted.

isInOrder

public boolean isInOrder()
Return true if matches are required to be in-order.

getField

public String getField()
Description copied from class: SpanQuery
Returns the name of the field matched by this query.

Specified by:
getField in class SpanQuery

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

getSpans

public Spans getSpans(IndexReader reader)
               throws IOException
Description copied from class: SpanQuery
Expert: Returns the matches for this query in an index. Used internally to search for spans.

Specified by:
getSpans in class SpanQuery
Throws:
IOException

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException

clone

public Object clone()
Description copied from class: Query
Returns a clone of this query.

Overrides:
clone in class Query

equals

public boolean equals(Object o)
Returns true iff o is equal to this.

Overrides:
equals in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanNotQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanNotQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.spans.SpanQuery
            extended by  org.apache.lucene.search.spans.SpanNotQuery
All Implemented Interfaces:
Serializable, Cloneable
public class SpanNotQuery
extends SpanQuery
implements Cloneable

Removes matches which overlap with another SpanQuery.

See Also:
Serialized Form

Constructor Summary
SpanNotQuery(SpanQuery include, SpanQuery exclude)
Construct a SpanNotQuery matching spans from include which have no overlap with spans from exclude.
Method Summary
Object | clone() Returns a clone of this query.
boolean | equals(Object o) Returns true iff o is equal to this.
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
SpanQuery | getExclude() Return the SpanQuery whose matches must not overlap those returned.
String | getField() Returns the name of the field matched by this query.
SpanQuery | getInclude() Return the SpanQuery whose matches are filtered.
Spans | getSpans(IndexReader reader) Expert: Returns the matches for this query in an index.
int | hashCode()
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.spans.SpanQuery
createWeight
Methods inherited from class org.apache.lucene.search.Query
combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SpanNotQuery

public SpanNotQuery(SpanQuery include,
                    SpanQuery exclude)
Construct a SpanNotQuery matching spans from include which have no overlap with spans from exclude.

Method Detail

getInclude

public SpanQuery getInclude()
Return the SpanQuery whose matches are filtered.

getExclude

public SpanQuery getExclude()
Return the SpanQuery whose matches must not overlap those returned.

getField

public String getField()
Description copied from class: SpanQuery
Returns the name of the field matched by this query.

Specified by:
getField in class SpanQuery

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

clone

public Object clone()
Description copied from class: Query
Returns a clone of this query.

Overrides:
clone in class Query

getSpans

public Spans getSpans(IndexReader reader)
               throws IOException
Description copied from class: SpanQuery
Expert: Returns the matches for this query in an index. Used internally to search for spans.

Specified by:
getSpans in class SpanQuery
Throws:
IOException

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException

equals

public boolean equals(Object o)
Returns true iff o is equal to this.

Overrides:
equals in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanOrQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanOrQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.spans.SpanQuery
            extended by  org.apache.lucene.search.spans.SpanOrQuery
All Implemented Interfaces:
Serializable, Cloneable
public class SpanOrQuery
extends SpanQuery
implements Cloneable

Matches the union of its clauses.

See Also:
Serialized Form

Constructor Summary
SpanOrQuery(SpanQuery... clauses)
Construct a SpanOrQuery merging the provided clauses.
Method Summary
void | addClause(SpanQuery clause) Adds a clause to this query
Object | clone() Returns a clone of this query.
boolean | equals(Object o)
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
SpanQuery[] | getClauses() Return the clauses whose spans are matched.
String | getField() Returns the name of the field matched by this query.
Spans | getSpans(IndexReader reader) Expert: Returns the matches for this query in an index.
int | hashCode()
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.spans.SpanQuery
createWeight
Methods inherited from class org.apache.lucene.search.Query
combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SpanOrQuery

public SpanOrQuery(SpanQuery... clauses)
Construct a SpanOrQuery merging the provided clauses.

Method Detail

addClause

public final void addClause(SpanQuery clause)
Adds a clause to this query

getClauses

public SpanQuery[] getClauses()
Return the clauses whose spans are matched.

getField

public String getField()
Description copied from class: SpanQuery
Returns the name of the field matched by this query.

Specified by:
getField in class SpanQuery

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

clone

public Object clone()
Description copied from class: Query
Returns a clone of this query.

Overrides:
clone in class Query

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

equals

public boolean equals(Object o)
Overrides:
equals in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class Query

getSpans

public Spans getSpans(IndexReader reader)
               throws IOException
Description copied from class: SpanQuery
Expert: Returns the matches for this query in an index. Used internally to search for spans.

Specified by:
getSpans in class SpanQuery
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanPayloadCheckQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanPayloadCheckQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.spans.SpanQuery
            extended by  org.apache.lucene.search.spans.SpanPositionCheckQuery
                extended by  org.apache.lucene.search.spans.SpanPayloadCheckQuery
All Implemented Interfaces:
Serializable, Cloneable
public class SpanPayloadCheckQuery
extends SpanPositionCheckQuery

Only return those matches that have a specific payload at the given position.

Do not use this with an SpanQuery that contains a SpanNearQuery. Instead, use SpanNearPayloadCheckQuery since it properly handles the fact that payloads aren't ordered by SpanNearQuery.

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.spans.SpanPositionCheckQuery
SpanPositionCheckQuery.AcceptStatus, SpanPositionCheckQuery.PositionCheckSpan
Field Summary
protected  Collection<byte[]> payloadToMatch
Fields inherited from class org.apache.lucene.search.spans.SpanPositionCheckQuery
match
Constructor Summary
SpanPayloadCheckQuery(SpanQuery match, Collection<byte[]> payloadToMatch)
Method Summary
protected SpanPositionCheckQuery.AcceptStatus | acceptPosition(Spans spans) Implementing classes are required to return whether the current position is a match for the passed in "match" SpanQuery.
Object | clone() Returns a clone of this query.
boolean | equals(Object o)
int | hashCode()
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.spans.SpanPositionCheckQuery
extractTerms, getField, getMatch, getSpans, rewrite
Methods inherited from class org.apache.lucene.search.spans.SpanQuery
createWeight
Methods inherited from class org.apache.lucene.search.Query
combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

payloadToMatch

protected final Collection<byte[]> payloadToMatch
Constructor Detail

SpanPayloadCheckQuery

public SpanPayloadCheckQuery(SpanQuery match,
                             Collection<byte[]> payloadToMatch)
Parameters:
match - The underlying SpanQuery to check
payloadToMatch - The Collection of payloads to match
Method Detail

acceptPosition

protected SpanPositionCheckQuery.AcceptStatus acceptPosition(Spans spans)
                                                      throws IOException
Description copied from class: SpanPositionCheckQuery
Implementing classes are required to return whether the current position is a match for the passed in "match" SpanQuery. This is only called if the underlying Spans.next() for the match is successful

Specified by:
acceptPosition in class SpanPositionCheckQuery
Parameters:
spans - The Spans instance, positioned at the spot to check
Returns:
whether the match is accepted, rejected, or rejected and should move to the next doc.
Throws:
IOException
See Also:
Spans.next()

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

clone

public Object clone()
Description copied from class: Query
Returns a clone of this query.

Overrides:
clone in class Query

equals

public boolean equals(Object o)
Overrides:
equals in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanPositionCheckQuery.AcceptStatus

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.search.spans
Enum SpanPositionCheckQuery.AcceptStatus

java.lang.Object
    extended by  java.lang.Enum<SpanPositionCheckQuery.AcceptStatus>
        extended by  org.apache.lucene.search.spans.SpanPositionCheckQuery.AcceptStatus
All Implemented Interfaces:
Serializable, Comparable<SpanPositionCheckQuery.AcceptStatus>
Enclosing class:
SpanPositionCheckQuery
protected static enum SpanPositionCheckQuery.AcceptStatus
extends Enum<SpanPositionCheckQuery.AcceptStatus>

Return value if the match should be accepted YES, rejected NO, or rejected and enumeration should advance to the next document NO_AND_ADVANCE.

See Also:
SpanPositionCheckQuery.acceptPosition(Spans)

Enum Constant Summary
NO
NO_AND_ADVANCE
YES
Method Summary
static SpanPositionCheckQuery.AcceptStatus | valueOf(String name) Returns the enum constant of this type with the specified name.
static SpanPositionCheckQuery.AcceptStatus[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

YES

public static final SpanPositionCheckQuery.AcceptStatus YES

NO

public static final SpanPositionCheckQuery.AcceptStatus NO

NO_AND_ADVANCE

public static final SpanPositionCheckQuery.AcceptStatus NO_AND_ADVANCE
Method Detail

values

public static final SpanPositionCheckQuery.AcceptStatus[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(SpanPositionCheckQuery.AcceptStatus c : SpanPositionCheckQuery.AcceptStatus.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static SpanPositionCheckQuery.AcceptStatus valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


SpanPositionCheckQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanPositionCheckQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.spans.SpanQuery
            extended by  org.apache.lucene.search.spans.SpanPositionCheckQuery
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
SpanNearPayloadCheckQuery, SpanPayloadCheckQuery, SpanPositionRangeQuery
public abstract class SpanPositionCheckQuery
extends SpanQuery
implements Cloneable

Base class for filtering a SpanQuery based on the position of a match.

See Also:
Serialized Form

Nested Class Summary
protected static class | SpanPositionCheckQuery.AcceptStatus Return value if the match should be accepted YES, rejected NO, or rejected and enumeration should advance to the next document NO_AND_ADVANCE.
protected class | SpanPositionCheckQuery.PositionCheckSpan
Field Summary
protected  SpanQuery match
Constructor Summary
SpanPositionCheckQuery(SpanQuery match)
Method Summary
protected abstract SpanPositionCheckQuery.AcceptStatus | acceptPosition(Spans spans) Implementing classes are required to return whether the current position is a match for the passed in "match" SpanQuery.
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
String | getField() Returns the name of the field matched by this query.
SpanQuery | getMatch()
Spans | getSpans(IndexReader reader) Expert: Returns the matches for this query in an index.
Query | rewrite(IndexReader reader) Expert: called to re-write queries into primitive queries.
Methods inherited from class org.apache.lucene.search.spans.SpanQuery
createWeight
Methods inherited from class org.apache.lucene.search.Query
clone, combine, equals, getBoost, getSimilarity, hashCode, mergeBooleanQueries, setBoost, toString, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

match

protected SpanQuery match
Constructor Detail

SpanPositionCheckQuery

public SpanPositionCheckQuery(SpanQuery match)
Method Detail

getMatch

public SpanQuery getMatch()
Returns:
the SpanQuery whose matches are filtered.

getField

public String getField()
Description copied from class: SpanQuery
Returns the name of the field matched by this query.

Specified by:
getField in class SpanQuery

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

acceptPosition

protected abstract SpanPositionCheckQuery.AcceptStatus acceptPosition(Spans spans)
                                                               throws IOException
Implementing classes are required to return whether the current position is a match for the passed in "match" SpanQuery. This is only called if the underlying Spans.next() for the match is successful

Parameters:
spans - The Spans instance, positioned at the spot to check
Returns:
whether the match is accepted, rejected, or rejected and should move to the next doc.
Throws:
IOException
See Also:
Spans.next()

getSpans

public Spans getSpans(IndexReader reader)
               throws IOException
Description copied from class: SpanQuery
Expert: Returns the matches for this query in an index. Used internally to search for spans.

Specified by:
getSpans in class SpanQuery
Throws:
IOException

rewrite

public Query rewrite(IndexReader reader)
              throws IOException
Description copied from class: Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.

Overrides:
rewrite in class Query
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanPositionCheckQuery.PositionCheckSpan

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanPositionCheckQuery.PositionCheckSpan

java.lang.Object
    extended by  org.apache.lucene.search.spans.Spans
        extended by  org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan
Enclosing class:
SpanPositionCheckQuery
protected class SpanPositionCheckQuery.PositionCheckSpan
extends Spans

Constructor Summary
SpanPositionCheckQuery.PositionCheckSpan(IndexReader reader)
Method Summary
int | doc() Returns the document number of the current match.
protected boolean | doNext()
int | end() Returns the end position of the current match.
Collection<byte[]> | getPayload() Returns the payload data for the current span.
boolean | isPayloadAvailable() Checks if a payload can be loaded at this position.
boolean | next() Move to the next match, returning true iff any such exists.
boolean | skipTo(int target) Skips to the first match beyond the current, whose document number is greater than or equal to target.
int | start() Returns the start position of the current match.
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SpanPositionCheckQuery.PositionCheckSpan

public SpanPositionCheckQuery.PositionCheckSpan(IndexReader reader)
                                         throws IOException
Throws:
IOException
Method Detail

next

public boolean next()
             throws IOException
Description copied from class: Spans
Move to the next match, returning true iff any such exists.

Specified by:
next in class Spans
Throws:
IOException

skipTo

public boolean skipTo(int target)
               throws IOException
Description copied from class: Spans
Skips to the first match beyond the current, whose document number is greater than or equal to target.

Returns true iff there is such a match.

Behaves as if written:

   boolean skipTo(int target) {
     do {
       if (!next())
             return false;
     } while (target > doc());
     return true;
   }
Most implementations are considerably more efficient than that.

Specified by:
skipTo in class Spans
Throws:
IOException

doNext

protected boolean doNext()
                  throws IOException
Throws:
IOException

doc

public int doc()
Description copied from class: Spans
Returns the document number of the current match. Initially invalid.

Specified by:
doc in class Spans

start

public int start()
Description copied from class: Spans
Returns the start position of the current match. Initially invalid.

Specified by:
start in class Spans

end

public int end()
Description copied from class: Spans
Returns the end position of the current match. Initially invalid.

Specified by:
end in class Spans

getPayload

public Collection<byte[]> getPayload()
                              throws IOException
Description copied from class: Spans
Returns the payload data for the current span. This is invalid until Spans.next() is called for the first time. This method must not be called more than once after each call of Spans.next(). However, most payloads are loaded lazily, so if the payload data for the current position is not needed, this method may not be called at all for performance reasons. An ordered SpanQuery does not lazy load, so if you have payloads in your index and you do not want ordered SpanNearQuerys to collect payloads, you can disable collection with a constructor option.

Note that the return type is a collection, thus the ordering should not be relied upon.

Specified by:
getPayload in class Spans
Returns:
a List of byte arrays containing the data of this payload, otherwise null if isPayloadAvailable is false
Throws:
IOException

isPayloadAvailable

public boolean isPayloadAvailable()
Description copied from class: Spans
Checks if a payload can be loaded at this position.

Payloads can only be loaded once per call to Spans.next().

Specified by:
isPayloadAvailable in class Spans
Returns:
true if there is a payload available at this position that can be loaded

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanPositionRangeQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanPositionRangeQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.spans.SpanQuery
            extended by  org.apache.lucene.search.spans.SpanPositionCheckQuery
                extended by  org.apache.lucene.search.spans.SpanPositionRangeQuery
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
SpanFirstQuery
public class SpanPositionRangeQuery
extends SpanPositionCheckQuery

Checks to see if the SpanPositionCheckQuery.getMatch() lies between a start and end position

See Also:
for a derivation that is optimized for the case where start position is 0, Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.spans.SpanPositionCheckQuery
SpanPositionCheckQuery.AcceptStatus, SpanPositionCheckQuery.PositionCheckSpan
Field Summary
protected int | end
protected int | start
Fields inherited from class org.apache.lucene.search.spans.SpanPositionCheckQuery
match
Constructor Summary
SpanPositionRangeQuery(SpanQuery match, int start, int end)
Method Summary
protected SpanPositionCheckQuery.AcceptStatus | acceptPosition(Spans spans) Implementing classes are required to return whether the current position is a match for the passed in "match" SpanQuery.
Object | clone() Returns a clone of this query.
boolean | equals(Object o)
int | getEnd()
int | getStart()
int | hashCode()
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.spans.SpanPositionCheckQuery
extractTerms, getField, getMatch, getSpans, rewrite
Methods inherited from class org.apache.lucene.search.spans.SpanQuery
createWeight
Methods inherited from class org.apache.lucene.search.Query
combine, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

start

protected int start

end

protected int end
Constructor Detail

SpanPositionRangeQuery

public SpanPositionRangeQuery(SpanQuery match,
                              int start,
                              int end)
Method Detail

acceptPosition

protected SpanPositionCheckQuery.AcceptStatus acceptPosition(Spans spans)
                                                      throws IOException
Description copied from class: SpanPositionCheckQuery
Implementing classes are required to return whether the current position is a match for the passed in "match" SpanQuery. This is only called if the underlying Spans.next() for the match is successful

Specified by:
acceptPosition in class SpanPositionCheckQuery
Parameters:
spans - The Spans instance, positioned at the spot to check
Returns:
whether the match is accepted, rejected, or rejected and should move to the next doc.
Throws:
IOException
See Also:
Spans.next()

getStart

public int getStart()
Returns:
The minimum position permitted in a match

getEnd

public int getEnd()
Returns:
the maximum end position permitted in a match.

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

clone

public Object clone()
Description copied from class: Query
Returns a clone of this query.

Overrides:
clone in class Query

equals

public boolean equals(Object o)
Overrides:
equals in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class Query
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.spans.SpanQuery
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
FieldMaskingSpanQuery, SpanMultiTermQueryWrapper, SpanNearQuery, SpanNotQuery, SpanOrQuery, SpanPositionCheckQuery, SpanTermQuery
public abstract class SpanQuery
extends Query

Base class for span-based queries.

See Also:
Serialized Form

Constructor Summary
SpanQuery()
Method Summary
Weight | createWeight(Searcher searcher) Expert: Constructs an appropriate Weight implementation for this query.
abstract String | getField() Returns the name of the field matched by this query.
abstract Spans | getSpans(IndexReader reader) Expert: Returns the matches for this query in an index.
Methods inherited from class org.apache.lucene.search.Query
clone, combine, equals, extractTerms, getBoost, getSimilarity, hashCode, mergeBooleanQueries, rewrite, setBoost, toString, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

SpanQuery

public SpanQuery()
Method Detail

getSpans

public abstract Spans getSpans(IndexReader reader)
                        throws IOException
Expert: Returns the matches for this query in an index. Used internally to search for spans.

Throws:
IOException

getField

public abstract String getField()
Returns the name of the field matched by this query.

createWeight

public Weight createWeight(Searcher searcher)
                    throws IOException
Description copied from class: Query
Expert: Constructs an appropriate Weight implementation for this query.

Only implemented by primitive queries, which re-write to themselves.

Overrides:
createWeight in class Query
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Spans

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class Spans

java.lang.Object
    extended by  org.apache.lucene.search.spans.Spans
Direct Known Subclasses:
NearSpansOrdered, NearSpansUnordered, SpanPositionCheckQuery.PositionCheckSpan, TermSpans
public abstract class Spans
extends Object

Expert: an enumeration of span matches. Used to implement span searching. Each span represents a range of term positions within a document. Matches are enumerated in order, by increasing document number, within that by increasing start position and finally by increasing end position.

Constructor Summary
Spans()
Method Summary
abstract int | doc() Returns the document number of the current match.
abstract int | end() Returns the end position of the current match.
abstract Collection<byte[]> | getPayload() Returns the payload data for the current span.
abstract boolean | isPayloadAvailable() Checks if a payload can be loaded at this position.
abstract boolean | next() Move to the next match, returning true iff any such exists.
abstract boolean | skipTo(int target) Skips to the first match beyond the current, whose document number is greater than or equal to target.
abstract int | start() Returns the start position of the current match.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Spans

public Spans()
Method Detail

next

public abstract boolean next()
                      throws IOException
Move to the next match, returning true iff any such exists.

Throws:
IOException

skipTo

public abstract boolean skipTo(int target)
                        throws IOException
Skips to the first match beyond the current, whose document number is greater than or equal to target.

Returns true iff there is such a match.

Behaves as if written:

   boolean skipTo(int target) {
     do {
       if (!next())
             return false;
     } while (target > doc());
     return true;
   }
Most implementations are considerably more efficient than that.

Throws:
IOException

doc

public abstract int doc()
Returns the document number of the current match. Initially invalid.

start

public abstract int start()
Returns the start position of the current match. Initially invalid.

end

public abstract int end()
Returns the end position of the current match. Initially invalid.

getPayload

public abstract Collection<byte[]> getPayload()
                                       throws IOException
Returns the payload data for the current span. This is invalid until next() is called for the first time. This method must not be called more than once after each call of next(). However, most payloads are loaded lazily, so if the payload data for the current position is not needed, this method may not be called at all for performance reasons. An ordered SpanQuery does not lazy load, so if you have payloads in your index and you do not want ordered SpanNearQuerys to collect payloads, you can disable collection with a constructor option.

Note that the return type is a collection, thus the ordering should not be relied upon.

Returns:
a List of byte arrays containing the data of this payload, otherwise null if isPayloadAvailable is false
Throws:
IOException
WARNING: This API is experimental and might change in incompatible ways in the next release.

isPayloadAvailable

public abstract boolean isPayloadAvailable()
Checks if a payload can be loaded at this position.

Payloads can only be loaded once per call to next().

Returns:
true if there is a payload available at this position that can be loaded
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanScorer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanScorer

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSetIterator
        extended by  org.apache.lucene.search.Scorer
            extended by  org.apache.lucene.search.spans.SpanScorer
Direct Known Subclasses:
PayloadNearQuery.PayloadNearSpanScorer, PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer
public class SpanScorer
extends Scorer

Public for extension only.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.Scorer
Scorer.ScorerVisitor<P extends Query,C extends Query,S extends Scorer>
Field Summary
protected int | doc
protected float | freq
protected boolean | more
protected byte[] | norms
protected Spans | spans
protected float | value
Fields inherited from class org.apache.lucene.search.Scorer
weight
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
Constructor Summary
protected SpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms)
Method Summary
 int advance(int target)
Advances to the first beyond (see NOTE below) the current whose document number is greater than or equal to target.
 int docID()
Returns the following: -1 or DocIdSetIterator.NO_MORE_DOCS if DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) were not called yet.
protected  Explanation explain(int doc)
This method is no longer an official member of Scorer, but it is needed by SpanWeight to build an explanation.
 float freq()
Returns number of matches for the current document.
 int nextDoc()
Advances to the next document in the set and returns the doc it is currently on, or DocIdSetIterator.NO_MORE_DOCS if there are no more docs in the set.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.
 float score()
Returns the score of the current document matching the query.
protected  boolean setFreqCurrentDoc()
Methods inherited from class org.apache.lucene.search.Scorer
getSimilarity, score, score, visitScorers, visitSubScorers
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

spans

protected Spans spans

norms

protected byte[] norms

value

protected float value

more

protected boolean more

doc

protected int doc

freq

protected float freq
Constructor Detail

SpanScorer

protected SpanScorer(Spans spans,
                     Weight weight,
                     Similarity similarity,
                     byte[] norms)
              throws IOException
Throws:
IOException
Method Detail

nextDoc

public int nextDoc()
            throws IOException
Description copied from class: DocIdSetIterator
Advances to the next document in the set and returns the doc it is currently on, or DocIdSetIterator.NO_MORE_DOCS if there are no more docs in the set.
NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.

Specified by:
nextDoc in class DocIdSetIterator
Throws:
IOException

advance

public int advance(int target)
            throws IOException
Description copied from class: DocIdSetIterator
Advances to the first beyond (see NOTE below) the current whose document number is greater than or equal to target. Returns the current document number or DocIdSetIterator.NO_MORE_DOCS if there are no more docs in the set.

Behaves as if written:

 int advance(int target) {
   int doc;
   while ((doc = nextDoc()) < target) {
   }
   return doc;
 }
Some implementations are considerably more efficient than that.

NOTE: when target ≤ current implementations may opt not to advance beyond their current DocIdSetIterator.docID().

NOTE: this method may be called with DocIdSetIterator.NO_MORE_DOCS for efficiency by some Scorers. If your implementation cannot efficiently determine that it should exhaust, it is recommended that you check for that value in each call to this method.

NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.

Specified by:
advance in class DocIdSetIterator
Throws:
IOException

setFreqCurrentDoc

protected boolean setFreqCurrentDoc()
                             throws IOException
Throws:
IOException

docID

public int docID()
Description copied from class: DocIdSetIterator
Returns the following:
  • -1 or DocIdSetIterator.NO_MORE_DOCS if DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) were not called yet.
  • DocIdSetIterator.NO_MORE_DOCS if the iterator has exhausted.
  • Otherwise it should return the doc ID it is currently on.

Specified by:
docID in class DocIdSetIterator

score

public float score()
            throws IOException
Description copied from class: Scorer
Returns the score of the current document matching the query. Initially invalid, until DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) is called the first time, or when called from within Collector.collect(int).

Specified by:
score in class Scorer
Throws:
IOException

freq

public float freq()
           throws IOException
Description copied from class: Scorer
Returns number of matches for the current document. This returns a float (not int) because SloppyPhraseScorer discounts its freq according to how "sloppy" the match was.

Overrides:
freq in class Scorer
Throws:
IOException

explain

protected Explanation explain(int doc)
                       throws IOException
This method is no longer an official member of Scorer, but it is needed by SpanWeight to build an explanation.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanTermQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanTermQuery

java.lang.Object
    extended by  org.apache.lucene.search.Query
        extended by  org.apache.lucene.search.spans.SpanQuery
            extended by  org.apache.lucene.search.spans.SpanTermQuery
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
PayloadTermQuery
public class SpanTermQuery
extends SpanQuery

Matches spans containing a term.

See Also:
Serialized Form

Field Summary
protected  Term term
Constructor Summary
SpanTermQuery(Term term)
Construct a SpanTermQuery matching the named term's spans.
Method Summary
boolean | equals(Object obj)
void | extractTerms(Set<Term> terms) Expert: adds all terms occurring in this query to the terms set.
String | getField() Returns the name of the field matched by this query.
Spans | getSpans(IndexReader reader) Expert: Returns the matches for this query in an index.
Term | getTerm() Return the term whose spans are matched.
int | hashCode()
String | toString(String field) Prints a query to a string, with field assumed to be the default field and omitted.
Methods inherited from class org.apache.lucene.search.spans.SpanQuery
createWeight
Methods inherited from class org.apache.lucene.search.Query
clone, combine, getBoost, getSimilarity, mergeBooleanQueries, rewrite, setBoost, toString, weight
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

term

protected Term term
Constructor Detail

SpanTermQuery

public SpanTermQuery(Term term)
Construct a SpanTermQuery matching the named term's spans.

Method Detail

getTerm

public Term getTerm()
Return the term whose spans are matched.

getField

public String getField()
Description copied from class: SpanQuery
Returns the name of the field matched by this query.

Specified by:
getField in class SpanQuery

extractTerms

public void extractTerms(Set<Term> terms)
Description copied from class: Query
Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten form.

Overrides:
extractTerms in class Query

toString

public String toString(String field)
Description copied from class: Query
Prints a query to a string, with field assumed to be the default field and omitted.

The representation used is one that is supposed to be readable by QueryParser. However, there are the following limitations:

  • If the query was created by the parser, the printed representation may not be exactly what was parsed. For example, characters that need to be escaped will be represented without the required backslash.
  • Some of the more complicated queries (e.g. span queries) don't have a representation that can be parsed by QueryParser.

Specified by:
toString in class Query

hashCode

public int hashCode()
Overrides:
hashCode in class Query

equals

public boolean equals(Object obj)
Overrides:
equals in class Query

getSpans

public Spans getSpans(IndexReader reader)
               throws IOException
Description copied from class: SpanQuery
Expert: Returns the matches for this query in an index. Used internally to search for spans.

Specified by:
getSpans in class SpanQuery
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanWeight

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class SpanWeight

java.lang.Object
    extended by  org.apache.lucene.search.Weight
        extended by  org.apache.lucene.search.spans.SpanWeight
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PayloadNearQuery.PayloadNearSpanWeight, PayloadTermQuery.PayloadTermWeight
public class SpanWeight
extends Weight

Expert-only. Public for use by other weight implementations

See Also:
Serialized Form

Field Summary
protected float | idf
protected SpanQuery | query
protected float | queryNorm
protected float | queryWeight
protected Similarity | similarity
protected Set<Term> | terms
protected float | value
Constructor Summary
SpanWeight(SpanQuery query, Searcher searcher)
Method Summary
Explanation | explain(IndexReader reader, int doc) An explanation of the score computation for the named document.
Query | getQuery() The query that this concerns.
float | getValue() The weight for this query.
void | normalize(float queryNorm) Assigns the query normalization factor to this.
Scorer | scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.
float | sumOfSquaredWeights() The sum of squared weights of contained query clauses.
Methods inherited from class org.apache.lucene.search.Weight
scoresDocsOutOfOrder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

similarity

protected Similarity similarity

value

protected float value

idf

protected float idf

queryNorm

protected float queryNorm

queryWeight

protected float queryWeight

terms

protected Set<Term> terms

query

protected SpanQuery query
Constructor Detail

SpanWeight

public SpanWeight(SpanQuery query,
                  Searcher searcher)
           throws IOException
Throws:
IOException
Method Detail

getQuery

public Query getQuery()
Description copied from class: Weight
The query that this concerns.

Specified by:
getQuery in class Weight

getValue

public float getValue()
Description copied from class: Weight
The weight for this query.

Specified by:
getValue in class Weight

sumOfSquaredWeights

public float sumOfSquaredWeights()
                          throws IOException
Description copied from class: Weight
The sum of squared weights of contained query clauses.

Specified by:
sumOfSquaredWeights in class Weight
Throws:
IOException

normalize

public void normalize(float queryNorm)
Description copied from class: Weight
Assigns the query normalization factor to this.

Specified by:
normalize in class Weight

scorer

public Scorer scorer(IndexReader reader,
                     boolean scoreDocsInOrder,
                     boolean topScorer)
              throws IOException
Description copied from class: Weight
Returns a Scorer which scores documents in/out-of order according to scoreDocsInOrder.

NOTE: even if scoreDocsInOrder is false, it is recommended to check whether the returned Scorer indeed scores documents out of order (i.e., call Weight.scoresDocsOutOfOrder()), as some Scorer implementations will always return documents in-order.
NOTE: null can be returned if no documents will be scored by this query.

Specified by:
scorer in class Weight
Parameters:
reader - the IndexReader for which to return the Scorer.
scoreDocsInOrder - specifies whether in-order scoring of documents is required. Note that if set to false (i.e., out-of-order scoring is required), this method can return whatever scoring mode it supports, as every in-order scorer is also an out-of-order one. However, an out-of-order scorer may not support DocIdSetIterator.nextDoc() and/or DocIdSetIterator.advance(int), therefore it is recommended to request an in-order scorer if use of these methods is required.
topScorer - if true, Scorer.score(Collector) will be called; if false, DocIdSetIterator.nextDoc() and/or DocIdSetIterator.advance(int) will be called.
Returns:
a Scorer which scores documents in/out-of order.
Throws:
IOException

explain

public Explanation explain(IndexReader reader,
                           int doc)
                    throws IOException
Description copied from class: Weight
An explanation of the score computation for the named document.

Specified by:
explain in class Weight
Parameters:
reader - sub-reader containing the give doc
Returns:
an Explanation for the score
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermSpans

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spans
Class TermSpans

java.lang.Object
    extended by  org.apache.lucene.search.spans.Spans
        extended by  org.apache.lucene.search.spans.TermSpans

public class TermSpans
extends Spans

Expert: Public for extension only

Field Summary
protected int | count
protected int | doc
protected int | freq
protected int | position
protected TermPositions | positions
protected Term | term
Constructor Summary
TermSpans(TermPositions positions, Term term)
Method Summary
int | doc() Returns the document number of the current match.
int | end() Returns the end position of the current match.
Collection<byte[]> | getPayload() Returns the payload data for the current span.
TermPositions | getPositions()
boolean | isPayloadAvailable() Checks if a payload can be loaded at this position.
boolean | next() Move to the next match, returning true iff any such exists.
boolean | skipTo(int target) Skips to the first match beyond the current, whose document number is greater than or equal to target.
int | start() Returns the start position of the current match.
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

positions

protected TermPositions positions

term

protected Term term

doc

protected int doc

freq

protected int freq

count

protected int count

position

protected int position
Constructor Detail

TermSpans

public TermSpans(TermPositions positions,
                 Term term)
          throws IOException
Throws:
IOException
Method Detail

next

public boolean next()
             throws IOException
Description copied from class: Spans
Move to the next match, returning true iff any such exists.

Specified by:
next in class Spans
Throws:
IOException

skipTo

public boolean skipTo(int target)
               throws IOException
Description copied from class: Spans
Skips to the first match beyond the current, whose document number is greater than or equal to target.

Returns true iff there is such a match.

Behaves as if written:

   boolean skipTo(int target) {
     do {
       if (!next())
             return false;
     } while (target > doc());
     return true;
   }
Most implementations are considerably more efficient than that.

Specified by:
skipTo in class Spans
Throws:
IOException

doc

public int doc()
Description copied from class: Spans
Returns the document number of the current match. Initially invalid.

Specified by:
doc in class Spans

start

public int start()
Description copied from class: Spans
Returns the start position of the current match. Initially invalid.

Specified by:
start in class Spans

end

public int end()
Description copied from class: Spans
Returns the end position of the current match. Initially invalid.

Specified by:
end in class Spans

getPayload

public Collection<byte[]> getPayload()
                              throws IOException
Description copied from class: Spans
Returns the payload data for the current span. This is invalid until Spans.next() is called for the first time. This method must not be called more than once after each call of Spans.next(). However, most payloads are loaded lazily, so if the payload data for the current position is not needed, this method may not be called at all for performance reasons. An ordered SpanQuery does not lazy load, so if you have payloads in your index and you do not want ordered SpanNearQuerys to collect payloads, you can disable collection with a constructor option.

Note that the return type is a collection, thus the ordering should not be relied upon.

Specified by:
getPayload in class Spans
Returns:
a List of byte arrays containing the data of this payload, otherwise null if isPayloadAvailable is false
Throws:
IOException

isPayloadAvailable

public boolean isPayloadAvailable()
Description copied from class: Spans
Checks if a payload can be loaded at this position.

Payloads can only be loaded once per call to Spans.next().

Specified by:
isPayloadAvailable in class Spans
Returns:
true if there is a payload available at this position that can be loaded

toString

public String toString()
Overrides:
toString in class Object

getPositions

public TermPositions getPositions()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.search.spans.FieldMaskingSpanQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.FieldMaskingSpanQuery

No usage of org.apache.lucene.search.spans.FieldMaskingSpanQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.NearSpansOrdered

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.NearSpansOrdered

No usage of org.apache.lucene.search.spans.NearSpansOrdered

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.NearSpansUnordered

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.NearSpansUnordered

No usage of org.apache.lucene.search.spans.NearSpansUnordered

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanFirstQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanFirstQuery

No usage of org.apache.lucene.search.spans.SpanFirstQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanMultiTermQueryWrapper

Packages that use SpanMultiTermQueryWrapper
org.apache.lucene.search.regex Regular expression Query.

Uses of SpanMultiTermQueryWrapper in org.apache.lucene.search.regex

Subclasses of SpanMultiTermQueryWrapper in org.apache.lucene.search.regex
 class SpanRegexQuery
Deprecated. Use new SpanMultiTermQueryWrapper<RegexQuery>(new RegexQuery()) instead. This query will be removed in Lucene 4.0

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod

Packages that use SpanMultiTermQueryWrapper.SpanRewriteMethod
org.apache.lucene.search.spans The calculus of spans.

Uses of SpanMultiTermQueryWrapper.SpanRewriteMethod in org.apache.lucene.search.spans

Subclasses of SpanMultiTermQueryWrapper.SpanRewriteMethod in org.apache.lucene.search.spans
static class SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite
A rewrite method that first translates each term into a SpanTermQuery in a BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.

Fields in org.apache.lucene.search.spans declared as SpanMultiTermQueryWrapper.SpanRewriteMethod
static SpanMultiTermQueryWrapper.SpanRewriteMethod SpanMultiTermQueryWrapper.SCORING_SPAN_QUERY_REWRITE
A rewrite method that first translates each term into a SpanTermQuery in a BooleanClause.Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query.

Methods in org.apache.lucene.search.spans that return SpanMultiTermQueryWrapper.SpanRewriteMethod
 SpanMultiTermQueryWrapper.SpanRewriteMethod SpanMultiTermQueryWrapper.getRewriteMethod()
Expert: returns the rewriteMethod

Methods in org.apache.lucene.search.spans with parameters of type SpanMultiTermQueryWrapper.SpanRewriteMethod
 void SpanMultiTermQueryWrapper.setRewriteMethod(SpanMultiTermQueryWrapper.SpanRewriteMethod rewriteMethod)
Expert: sets the rewrite method.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite

No usage of org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanNearPayloadCheckQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanNearPayloadCheckQuery

No usage of org.apache.lucene.search.spans.SpanNearPayloadCheckQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanNearQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanNearQuery

Packages that use SpanNearQuery
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.spans | The calculus of spans.

Uses of SpanNearQuery in org.apache.lucene.search.payloads

Subclasses of SpanNearQuery in org.apache.lucene.search.payloads
 class PayloadNearQuery
This class is very similar to SpanNearQuery except that it factors in the value of the payloads located at each of the positions where the TermSpans occurs.

Uses of SpanNearQuery in org.apache.lucene.search.spans

Constructors in org.apache.lucene.search.spans with parameters of type SpanNearQuery
NearSpansOrdered(SpanNearQuery spanNearQuery, IndexReader reader)
NearSpansOrdered(SpanNearQuery spanNearQuery, IndexReader reader, boolean collectPayloads)
NearSpansUnordered(SpanNearQuery query, IndexReader reader)
SpanNearPayloadCheckQuery(SpanNearQuery match, Collection<byte[]> payloadToMatch)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanNotQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanNotQuery

No usage of org.apache.lucene.search.spans.SpanNotQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanOrQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanOrQuery

No usage of org.apache.lucene.search.spans.SpanOrQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanPayloadCheckQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanPayloadCheckQuery

No usage of org.apache.lucene.search.spans.SpanPayloadCheckQuery

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanPositionCheckQuery.AcceptStatus

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanPositionCheckQuery.AcceptStatus

Packages that use SpanPositionCheckQuery.AcceptStatus
org.apache.lucene.search.spans The calculus of spans.

Uses of SpanPositionCheckQuery.AcceptStatus in org.apache.lucene.search.spans

Methods in org.apache.lucene.search.spans that return SpanPositionCheckQuery.AcceptStatus
protected SpanPositionCheckQuery.AcceptStatus | SpanPositionRangeQuery.acceptPosition(Spans spans)
protected SpanPositionCheckQuery.AcceptStatus | SpanNearPayloadCheckQuery.acceptPosition(Spans spans)
protected SpanPositionCheckQuery.AcceptStatus | SpanFirstQuery.acceptPosition(Spans spans)
protected SpanPositionCheckQuery.AcceptStatus | SpanPayloadCheckQuery.acceptPosition(Spans spans)
protected abstract SpanPositionCheckQuery.AcceptStatus | SpanPositionCheckQuery.acceptPosition(Spans spans) Implementing classes are required to return whether the current position is a match for the passed in "match" SpanQuery.
static SpanPositionCheckQuery.AcceptStatus | SpanPositionCheckQuery.AcceptStatus.valueOf(String name) Returns the enum constant of this type with the specified name.
static SpanPositionCheckQuery.AcceptStatus[] | SpanPositionCheckQuery.AcceptStatus.values() Returns an array containing the constants of this enum type, in the order they're declared.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanPositionCheckQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanPositionCheckQuery

Packages that use SpanPositionCheckQuery
org.apache.lucene.search.spans The calculus of spans.

Uses of SpanPositionCheckQuery in org.apache.lucene.search.spans

Subclasses of SpanPositionCheckQuery in org.apache.lucene.search.spans
class | SpanFirstQuery Matches spans near the beginning of a field.
class | SpanNearPayloadCheckQuery Only return those matches that have a specific payload at the given position.
class | SpanPayloadCheckQuery Only return those matches that have a specific payload at the given position.
class | SpanPositionRangeQuery Checks to see if the getMatch() lies between a start and end position

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan

No usage of org.apache.lucene.search.spans.SpanPositionCheckQuery.PositionCheckSpan

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanPositionRangeQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanPositionRangeQuery

Packages that use SpanPositionRangeQuery
org.apache.lucene.search.spans The calculus of spans.

Uses of SpanPositionRangeQuery in org.apache.lucene.search.spans

Subclasses of SpanPositionRangeQuery in org.apache.lucene.search.spans
 class SpanFirstQuery
Matches spans near the beginning of a field.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanQuery

Packages that use SpanQuery
org.apache.lucene.queryParser.surround.query | This package contains SrndQuery and its subclasses.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.regex | Regular expression Query.
org.apache.lucene.search.spans | The calculus of spans.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Uses of SpanQuery in org.apache.lucene.queryParser.surround.query

Methods in org.apache.lucene.queryParser.surround.query that return SpanQuery
 SpanQuery SpanNearClauseFactory.makeSpanNearClause()

Methods in org.apache.lucene.queryParser.surround.query with parameters of type SpanQuery
protected  void SpanNearClauseFactory.addSpanQueryWeighted(SpanQuery sq, float weight)

Uses of SpanQuery in org.apache.lucene.search

Fields in org.apache.lucene.search declared as SpanQuery
protected  SpanQuery SpanQueryFilter.query

Methods in org.apache.lucene.search that return SpanQuery
 SpanQuery SpanQueryFilter.getQuery()

Constructors in org.apache.lucene.search with parameters of type SpanQuery
SpanQueryFilter(SpanQuery query)
Constructs a filter which only matches documents matching query.

Uses of SpanQuery in org.apache.lucene.search.highlight

Methods in org.apache.lucene.search.highlight with parameters of type SpanQuery
protected void | WeightedSpanTermExtractor.collectSpanQueryFields(SpanQuery spanQuery, Set<String> fieldNames)
protected void | WeightedSpanTermExtractor.extractWeightedSpanTerms(Map<String,WeightedSpanTerm> terms, SpanQuery spanQuery) Fills a Map with <@link WeightedSpanTerm>s using the terms from the supplied SpanQuery.
protected boolean | WeightedSpanTermExtractor.mustRewriteQuery(SpanQuery spanQuery)

Uses of SpanQuery in org.apache.lucene.search.payloads

Subclasses of SpanQuery in org.apache.lucene.search.payloads
class | PayloadNearQuery This class is very similar to SpanNearQuery except that it factors in the value of the payloads located at each of the positions where the TermSpans occurs.
class | PayloadTermQuery This class is very similar to SpanTermQuery except that it factors in the value of the payload located at each of the positions where the Term occurs.

Constructors in org.apache.lucene.search.payloads with parameters of type SpanQuery
PayloadNearQuery.PayloadNearSpanWeight(SpanQuery query, Searcher searcher)
PayloadNearQuery(SpanQuery[] clauses, int slop, boolean inOrder)
PayloadNearQuery(SpanQuery[] clauses, int slop, boolean inOrder, PayloadFunction function)

Uses of SpanQuery in org.apache.lucene.search.regex

Subclasses of SpanQuery in org.apache.lucene.search.regex
 class SpanRegexQuery
Deprecated. Use new SpanMultiTermQueryWrapper<RegexQuery>(new RegexQuery()) instead. This query will be removed in Lucene 4.0

Uses of SpanQuery in org.apache.lucene.search.spans

Subclasses of SpanQuery in org.apache.lucene.search.spans
class | FieldMaskingSpanQuery Wrapper to allow SpanQuery objects participate in composite single-field SpanQueries by 'lying' about their search field.
class | SpanFirstQuery Matches spans near the beginning of a field.
class | SpanMultiTermQueryWrapper<Q extends MultiTermQuery> Wraps any MultiTermQuery as a SpanQuery, so it can be nested within other SpanQuery classes.
class | SpanNearPayloadCheckQuery Only return those matches that have a specific payload at the given position.
class | SpanNearQuery Matches spans which are near one another.
class | SpanNotQuery Removes matches which overlap with another SpanQuery.
class | SpanOrQuery Matches the union of its clauses.
class | SpanPayloadCheckQuery Only return those matches that have a specific payload at the given position.
class | SpanPositionCheckQuery Base class for filtering a SpanQuery based on the position of a match.
class | SpanPositionRangeQuery Checks to see if the SpanPositionCheckQuery.getMatch() lies between a start and end position
class | SpanTermQuery Matches spans containing a term.

Fields in org.apache.lucene.search.spans declared as SpanQuery
protected SpanQuery | SpanPositionCheckQuery.match
protected SpanQuery | SpanWeight.query

Fields in org.apache.lucene.search.spans with type parameters of type SpanQuery
protected  List<SpanQuery> SpanNearQuery.clauses

Methods in org.apache.lucene.search.spans that return SpanQuery
SpanQuery[] | SpanOrQuery.getClauses() Return the clauses whose spans are matched.
SpanQuery[] | SpanNearQuery.getClauses() Return the clauses whose spans are matched.
SpanQuery | SpanNotQuery.getExclude() Return the SpanQuery whose matches must not overlap those returned.
SpanQuery | SpanNotQuery.getInclude() Return the SpanQuery whose matches are filtered.
SpanQuery | FieldMaskingSpanQuery.getMaskedQuery()
SpanQuery | SpanPositionCheckQuery.getMatch()
abstract SpanQuery | SpanMultiTermQueryWrapper.SpanRewriteMethod.rewrite(IndexReader reader, MultiTermQuery query)
SpanQuery | SpanMultiTermQueryWrapper.TopTermsSpanBooleanQueryRewrite.rewrite(IndexReader reader, MultiTermQuery query)

Methods in org.apache.lucene.search.spans with parameters of type SpanQuery
 void SpanOrQuery.addClause(SpanQuery clause)
Adds a clause to this query

Constructors in org.apache.lucene.search.spans with parameters of type SpanQuery
FieldMaskingSpanQuery(SpanQuery maskedQuery, String maskedField)
SpanFirstQuery(SpanQuery match, int end)
Construct a SpanFirstQuery matching spans in match whose end position is less than or equal to end.
SpanNearQuery(SpanQuery[] clauses, int slop, boolean inOrder)
Construct a SpanNearQuery.
SpanNearQuery(SpanQuery[] clauses, int slop, boolean inOrder, boolean collectPayloads)
SpanNotQuery(SpanQuery include, SpanQuery exclude)
Construct a SpanNotQuery matching spans from include which have no overlap with spans from exclude.
SpanOrQuery(SpanQuery... clauses)
Construct a SpanOrQuery merging the provided clauses.
SpanPayloadCheckQuery(SpanQuery match, Collection<byte[]> payloadToMatch)
SpanPositionCheckQuery(SpanQuery match)
SpanPositionRangeQuery(SpanQuery match, int start, int end)
SpanWeight(SpanQuery query, Searcher searcher)

Uses of SpanQuery in org.apache.lucene.xmlparser.builders

Methods in org.apache.lucene.xmlparser.builders that return SpanQuery
SpanQuery | SpanNotBuilder.getSpanQuery(Element e)
SpanQuery | BoostingTermBuilder.getSpanQuery(Element e)
SpanQuery | SpanTermBuilder.getSpanQuery(Element e)
SpanQuery | SpanQueryBuilder.getSpanQuery(Element e)
SpanQuery | SpanOrTermsBuilder.getSpanQuery(Element e)
SpanQuery | SpanOrBuilder.getSpanQuery(Element e)
SpanQuery | SpanNearBuilder.getSpanQuery(Element e)
SpanQuery | SpanFirstBuilder.getSpanQuery(Element e)
SpanQuery | SpanQueryBuilderFactory.getSpanQuery(Element e)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.Spans

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.Spans

Packages that use Spans
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.
org.apache.lucene.search.spans | The calculus of spans.

Uses of Spans in org.apache.lucene.search.payloads

Methods in org.apache.lucene.search.payloads with parameters of type Spans
 void PayloadNearQuery.PayloadNearSpanScorer.getPayloads(Spans[] subSpans)

Constructors in org.apache.lucene.search.payloads with parameters of type Spans
PayloadNearQuery.PayloadNearSpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms)

Uses of Spans in org.apache.lucene.search.spans

Subclasses of Spans in org.apache.lucene.search.spans
class | NearSpansOrdered A Spans that is formed from the ordered subspans of a SpanNearQuery where the subspans do not overlap and have a maximum slop between them.
class | NearSpansUnordered Similar to NearSpansOrdered, but for the unordered case.
protected class | SpanPositionCheckQuery.PositionCheckSpan
class | TermSpans Expert: Public for extension only

Fields in org.apache.lucene.search.spans declared as Spans
protected  Spans SpanScorer.spans

Methods in org.apache.lucene.search.spans that return Spans
Spans | SpanOrQuery.getSpans(IndexReader reader)
Spans | SpanNearQuery.getSpans(IndexReader reader)
Spans | SpanPositionCheckQuery.getSpans(IndexReader reader)
Spans | SpanMultiTermQueryWrapper.getSpans(IndexReader reader)
Spans | SpanNotQuery.getSpans(IndexReader reader)
Spans | SpanTermQuery.getSpans(IndexReader reader)
abstract Spans | SpanQuery.getSpans(IndexReader reader) Expert: Returns the matches for this query in an index.
Spans | FieldMaskingSpanQuery.getSpans(IndexReader reader)
Spans[] | NearSpansUnordered.getSubSpans()
Spans[] | NearSpansOrdered.getSubSpans()

Methods in org.apache.lucene.search.spans with parameters of type Spans
protected SpanPositionCheckQuery.AcceptStatus | SpanPositionRangeQuery.acceptPosition(Spans spans)
protected SpanPositionCheckQuery.AcceptStatus | SpanNearPayloadCheckQuery.acceptPosition(Spans spans)
protected SpanPositionCheckQuery.AcceptStatus | SpanFirstQuery.acceptPosition(Spans spans)
protected SpanPositionCheckQuery.AcceptStatus | SpanPayloadCheckQuery.acceptPosition(Spans spans)
protected abstract SpanPositionCheckQuery.AcceptStatus | SpanPositionCheckQuery.acceptPosition(Spans spans) Implementing classes are required to return whether the current position is a match for the passed in "match" SpanQuery.

Constructors in org.apache.lucene.search.spans with parameters of type Spans
SpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanScorer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanScorer

Packages that use SpanScorer
org.apache.lucene.search.payloads
The payloads package provides Query mechanisms for finding and using payloads.

Uses of SpanScorer in org.apache.lucene.search.payloads

Subclasses of SpanScorer in org.apache.lucene.search.payloads
class | PayloadNearQuery.PayloadNearSpanScorer
protected class | PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanTermQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanTermQuery

Packages that use SpanTermQuery
org.apache.lucene.queryParser.surround.query | This package contains SrndQuery and its subclasses.
org.apache.lucene.search.payloads | The payloads package provides Query mechanisms for finding and using payloads.

Uses of SpanTermQuery in org.apache.lucene.queryParser.surround.query

Methods in org.apache.lucene.queryParser.surround.query that return SpanTermQuery
 SpanTermQuery BasicQueryFactory.newSpanTermQuery(Term term)

Uses of SpanTermQuery in org.apache.lucene.search.payloads

Subclasses of SpanTermQuery in org.apache.lucene.search.payloads
 class PayloadTermQuery
This class is very similar to SpanTermQuery except that it factors in the value of the payload located at each of the positions where the Term occurs.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.SpanWeight

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.SpanWeight

Packages that use SpanWeight
org.apache.lucene.search.payloads
The payloads package provides Query mechanisms for finding and using payloads.

Uses of SpanWeight in org.apache.lucene.search.payloads

Subclasses of SpanWeight in org.apache.lucene.search.payloads
class | PayloadNearQuery.PayloadNearSpanWeight
protected class | PayloadTermQuery.PayloadTermWeight

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spans.TermSpans

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spans.TermSpans

Packages that use TermSpans
org.apache.lucene.search.payloads
The payloads package provides Query mechanisms for finding and using payloads.

Uses of TermSpans in org.apache.lucene.search.payloads

Constructors in org.apache.lucene.search.payloads with parameters of type TermSpans
PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer(TermSpans spans, Weight weight, Similarity similarity, byte[] norms)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Dictionary

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spell
Interface Dictionary

All Known Implementing Classes:
FileDictionary, HighFrequencyDictionary, LuceneDictionary, PlainTextDictionary
public interface Dictionary

A simple interface representing a Dictionary. A Dictionary here is just a list of words.

Version:
1.0

Method Summary
 BytesRefIterator getWordsIterator()
Return all words present in the dictionary

Method Detail

getWordsIterator

BytesRefIterator getWordsIterator()
                                  throws IOException
Return all words present in the dictionary

Returns:
Iterator
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


HighFrequencyDictionary

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spell
Class HighFrequencyDictionary

java.lang.Object
    extended by  org.apache.lucene.search.spell.HighFrequencyDictionary
All Implemented Interfaces:
Dictionary
public class HighFrequencyDictionary
extends Object
implements Dictionary

HighFrequencyDictionary: terms taken from the given field of a Lucene index, which appear in a number of documents above a given threshold. Threshold is a value in [0..1] representing the minimum number of documents (of the total) where a term should appear. Based on LuceneDictionary.

Constructor Summary
HighFrequencyDictionary(IndexReader reader, String field, float thresh)
Method Summary
 BytesRefIterator getWordsIterator()
Return all words present in the dictionary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HighFrequencyDictionary

public HighFrequencyDictionary(IndexReader reader,
                               String field,
                               float thresh)
Method Detail

getWordsIterator

public final BytesRefIterator getWordsIterator()
                                        throws IOException
Description copied from interface: Dictionary
Return all words present in the dictionary

Specified by:
getWordsIterator in interface Dictionary
Returns:
Iterator
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JaroWinklerDistance

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spell
Class JaroWinklerDistance

java.lang.Object
    extended by  org.apache.lucene.search.spell.JaroWinklerDistance
All Implemented Interfaces:
StringDistance
public class JaroWinklerDistance
extends Object
implements StringDistance

Similarity measure for short strings such as person names.

See Also:
http://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance

Constructor Summary
JaroWinklerDistance()
Method Summary
float | getDistance(String s1, String s2) Returns a float between 0 and 1 based on how similar the specified strings are to one another.
float | getThreshold() Returns the current value of the threshold used for adding the Winkler bonus.
void | setThreshold(float threshold) Sets the threshold used to determine when Winkler bonus should be used.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JaroWinklerDistance

public JaroWinklerDistance()
Method Detail

getDistance

public float getDistance(String s1,
                         String s2)
Description copied from interface: StringDistance
Returns a float between 0 and 1 based on how similar the specified strings are to one another. Returning a value of 1 means the specified strings are identical and 0 means the string are maximally different.

Specified by:
getDistance in interface StringDistance
Parameters:
s1 - The first string.
s2 - The second string.
Returns:
a float between 0 and 1 based on how similar the specified strings are to one another.

setThreshold

public void setThreshold(float threshold)
Sets the threshold used to determine when Winkler bonus should be used. Set to a negative value to get the Jaro distance.

Parameters:
threshold - the new value of the threshold

getThreshold

public float getThreshold()
Returns the current value of the threshold used for adding the Winkler bonus. The default value is 0.7.

Returns:
the current value of the threshold
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LevensteinDistance

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spell
Class LevensteinDistance

java.lang.Object
    extended by  org.apache.lucene.search.spell.LevensteinDistance
All Implemented Interfaces:
StringDistance
public final class LevensteinDistance
extends Object
implements StringDistance

Levenstein edit distance class.

Constructor Summary
LevensteinDistance()
Optimized to run a bit faster than the static getDistance().
Method Summary
 float getDistance(String target, String other)
Returns a float between 0 and 1 based on how similar the specified strings are to one another.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LevensteinDistance

public LevensteinDistance()
Optimized to run a bit faster than the static getDistance(). In one benchmark times were 5.3sec using ctr vs 8.5sec w/ static method, thus 37% faster.

Method Detail

getDistance

public float getDistance(String target,
                         String other)
Description copied from interface: StringDistance
Returns a float between 0 and 1 based on how similar the specified strings are to one another. Returning a value of 1 means the specified strings are identical and 0 means the string are maximally different.

Specified by:
getDistance in interface StringDistance
Parameters:
target - The first string.
other - The second string.
Returns:
a float between 0 and 1 based on how similar the specified strings are to one another.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LuceneDictionary

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spell
Class LuceneDictionary

java.lang.Object
    extended by  org.apache.lucene.search.spell.LuceneDictionary
All Implemented Interfaces:
Dictionary
public class LuceneDictionary
extends Object
implements Dictionary

Lucene Dictionary: terms taken from the given field of a Lucene index. When using IndexReader.terms(Term) the code must not call next() on TermEnum as the first call to TermEnum, see: http://issues.apache.org/jira/browse/LUCENE-6

Constructor Summary
LuceneDictionary(IndexReader reader, String field)
Method Summary
 BytesRefIterator getWordsIterator()
Return all words present in the dictionary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LuceneDictionary

public LuceneDictionary(IndexReader reader,
                        String field)
Method Detail

getWordsIterator

public final BytesRefIterator getWordsIterator()
                                        throws IOException
Description copied from interface: Dictionary
Return all words present in the dictionary

Specified by:
getWordsIterator in interface Dictionary
Returns:
Iterator
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NGramDistance

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spell
Class NGramDistance

java.lang.Object
    extended by  org.apache.lucene.search.spell.NGramDistance
All Implemented Interfaces:
StringDistance
public class NGramDistance
extends Object
implements StringDistance

N-Gram version of edit distance based on paper by Grzegorz Kondrak, "N-gram similarity and distance". Proceedings of the Twelfth International Conference on String Processing and Information Retrieval (SPIRE 2005), pp. 115-126, Buenos Aires, Argentina, November 2005. http://www.cs.ualberta.ca/~kondrak/papers/spire05.pdf This implementation uses the position-based optimization to compute partial matches of n-gram sub-strings and adds a null-character prefix of size n-1 so that the first character is contained in the same number of n-grams as a middle character. Null-character prefix matches are discounted so that strings with no matching characters will return a distance of 0.

Constructor Summary
NGramDistance()
Creates an N-Gram distance measure using n-grams of size 2.
NGramDistance(int size)
Creates an N-Gram distance measure using n-grams of the specified size.
Method Summary
 float getDistance(String source, String target)
Returns a float between 0 and 1 based on how similar the specified strings are to one another.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NGramDistance

public NGramDistance(int size)
Creates an N-Gram distance measure using n-grams of the specified size.

Parameters:
size - The size of the n-gram to be used to compute the string distance.

NGramDistance

public NGramDistance()
Creates an N-Gram distance measure using n-grams of size 2.

Method Detail

getDistance

public float getDistance(String source,
                         String target)
Description copied from interface: StringDistance
Returns a float between 0 and 1 based on how similar the specified strings are to one another. Returning a value of 1 means the specified strings are identical and 0 means the string are maximally different.

Specified by:
getDistance in interface StringDistance
Parameters:
source - The first string.
target - The second string.
Returns:
a float between 0 and 1 based on how similar the specified strings are to one another.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.search.spell
Interfaces
Dictionary
StringDistance
TermFreqIterator
Classes
HighFrequencyDictionary
JaroWinklerDistance
LevensteinDistance
LuceneDictionary
NGramDistance
PlainTextDictionary
SpellChecker
SuggestWord
SuggestWordFrequencyComparator
SuggestWordQueue
SuggestWordScoreComparator
TermFreqIterator.TermFreqIteratorWrapper
Enums
SuggestMode


org.apache.lucene.search.spell

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.search.spell

Suggest alternate spellings for words.

See:
Description

Interface Summary
Dictionary | A simple interface representing a Dictionary.
StringDistance | Interface for string distances.
TermFreqIterator | Interface for enumerating term,weight pairs.

Class Summary
HighFrequencyDictionary | HighFrequencyDictionary: terms taken from the given field of a Lucene index, which appear in a number of documents above a given threshold.
JaroWinklerDistance | Similarity measure for short strings such as person names.
LevensteinDistance | Levenstein edit distance class.
LuceneDictionary | Lucene Dictionary: terms taken from the given field of a Lucene index.
NGramDistance | N-Gram version of edit distance based on paper by Grzegorz Kondrak, "N-gram similarity and distance".
PlainTextDictionary | Dictionary represented by a text file.
SpellChecker | Spell Checker class (Main class) (initially inspired by the David Spencer code).
SuggestWord | SuggestWord, used in suggestSimilar method in SpellChecker class.
SuggestWordFrequencyComparator | Frequency first, then score.
SuggestWordQueue | Sorts SuggestWord instances
SuggestWordScoreComparator | Score first, then frequency
TermFreqIterator.TermFreqIteratorWrapper | Wraps a BytesRefIterator as a TermFreqIterator, with all weights set to 1

Enum Summary
SuggestMode Set of strategies for suggesting related terms

Package org.apache.lucene.search.spell Description

Suggest alternate spellings for words. Also see the spell checker Wiki page.


org.apache.lucene.search.spell Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.search.spell

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.search.spell.HighFrequencyDictionary (implements org.apache.lucene.search.spell.Dictionary)
    • org.apache.lucene.search.spell.JaroWinklerDistance (implements org.apache.lucene.search.spell.StringDistance)
    • org.apache.lucene.search.spell.LevensteinDistance (implements org.apache.lucene.search.spell.StringDistance)
    • org.apache.lucene.search.spell.LuceneDictionary (implements org.apache.lucene.search.spell.Dictionary)
    • org.apache.lucene.search.spell.NGramDistance (implements org.apache.lucene.search.spell.StringDistance)
    • org.apache.lucene.search.spell.PlainTextDictionary (implements org.apache.lucene.search.spell.Dictionary)
    • org.apache.lucene.util.PriorityQueue<T>
      • org.apache.lucene.search.spell.SuggestWordQueue
    • org.apache.lucene.search.spell.SpellChecker (implements java.io.Closeable)
    • org.apache.lucene.search.spell.SuggestWord
    • org.apache.lucene.search.spell.SuggestWordFrequencyComparator (implements java.util.Comparator<T>)
    • org.apache.lucene.search.spell.SuggestWordScoreComparator (implements java.util.Comparator<T>)
    • org.apache.lucene.search.spell.TermFreqIterator.TermFreqIteratorWrapper (implements org.apache.lucene.search.spell.TermFreqIterator)

Interface Hierarchy

  • org.apache.lucene.util.BytesRefIterator
    • org.apache.lucene.search.spell.TermFreqIterator
  • org.apache.lucene.search.spell.Dictionary
  • org.apache.lucene.search.spell.StringDistance

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.search.spell.SuggestMode


Uses of Package org.apache.lucene.search.spell

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.search.spell

Packages that use org.apache.lucene.search.spell
org.apache.lucene.search.spell | Suggest alternate spellings for words.
org.apache.lucene.search.suggest | Support for Autocomplete/Autosuggest
org.apache.lucene.search.suggest.fst | Finite-state based autosuggest.
org.apache.lucene.search.suggest.jaspell | JaSpell-based autosuggest.
org.apache.lucene.search.suggest.tst | Ternary Search Tree based autosuggest.

Classes in org.apache.lucene.search.spell used by org.apache.lucene.search.spell
Dictionary
A simple interface representing a Dictionary.
StringDistance
Interface for string distances.
SuggestMode
Set of strategies for suggesting related terms
SuggestWord
SuggestWord, used in suggestSimilar method in SpellChecker class.
TermFreqIterator
Interface for enumerating term,weight pairs.

Classes in org.apache.lucene.search.spell used by org.apache.lucene.search.suggest
Dictionary
A simple interface representing a Dictionary.
TermFreqIterator
Interface for enumerating term,weight pairs.

Classes in org.apache.lucene.search.spell used by org.apache.lucene.search.suggest.fst
TermFreqIterator
Interface for enumerating term,weight pairs.

Classes in org.apache.lucene.search.spell used by org.apache.lucene.search.suggest.jaspell
TermFreqIterator
Interface for enumerating term,weight pairs.

Classes in org.apache.lucene.search.spell used by org.apache.lucene.search.suggest.tst
TermFreqIterator
Interface for enumerating term,weight pairs.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PlainTextDictionary

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spell
Class PlainTextDictionary

java.lang.Object
    extended by  org.apache.lucene.search.spell.PlainTextDictionary
All Implemented Interfaces:
Dictionary
public class PlainTextDictionary
extends Object
implements Dictionary

Dictionary represented by a text file.

Format allowed: 1 word per line:
word1
word2
word3

Constructor Summary
PlainTextDictionary(File file)
PlainTextDictionary(InputStream dictFile)
PlainTextDictionary(Reader reader)
Creates a dictionary based on a reader.
Method Summary
 BytesRefIterator getWordsIterator()
Return all words present in the dictionary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PlainTextDictionary

public PlainTextDictionary(File file)
                    throws FileNotFoundException
Throws:
FileNotFoundException

PlainTextDictionary

public PlainTextDictionary(InputStream dictFile)

PlainTextDictionary

public PlainTextDictionary(Reader reader)
Creates a dictionary based on a reader.

Method Detail

getWordsIterator

public BytesRefIterator getWordsIterator()
                                  throws IOException
Description copied from interface: Dictionary
Return all words present in the dictionary

Specified by:
getWordsIterator in interface Dictionary
Returns:
Iterator
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpellChecker

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spell
Class SpellChecker

java.lang.Object
    extended by  org.apache.lucene.search.spell.SpellChecker
All Implemented Interfaces:
Closeable
public class SpellChecker
extends Object
implements Closeable

Spell Checker class (Main class)
(initially inspired by the David Spencer code).

Example Usage:

  SpellChecker spellchecker = new SpellChecker(spellIndexDirectory);
  // To index a field of a user index:
  spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));
  // To index a file containing words:
  spellchecker.indexDictionary(new PlainTextDictionary(new File("myfile.txt")));
  String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);

Version:
1.0

Field Summary
static float | DEFAULT_ACCURACY The default minimum score to use, if not specified by calling setAccuracy(float) .
static String | F_WORD Field name for each word in the ngram index.
Constructor Summary
SpellChecker(Directory spellIndex)
Use the given directory as a spell checker index with a LevensteinDistance as the default StringDistance.
SpellChecker(Directory spellIndex, StringDistance sd)
Use the given directory as a spell checker index.
SpellChecker(Directory spellIndex, StringDistance sd, Comparator<SuggestWord> comparator)
Use the given directory as a spell checker index with the given StringDistance measure and the given Comparator for sorting the results.
Method Summary
 void clearIndex()
Removes all terms from the spell check index.
 void close()
Close the IndexSearcher used by this SpellChecker
 boolean exist(String word)
Check whether the word exists in the index.
 float getAccuracy()
The accuracy (minimum score) to be used, unless overridden in suggestSimilar(String, int, org.apache.lucene.index.IndexReader, String, boolean, float), to decide whether a suggestion is included or not.
 Comparator<SuggestWord> getComparator()
 StringDistance getStringDistance()
Returns the StringDistance instance used by this SpellChecker instance.
 void indexDictionary(Dictionary dict, IndexWriterConfig config, boolean fullMerge)
Indexes the data from the given Dictionary.
 void setAccuracy(float acc)
Sets the accuracy 0 < minScore < 1; default DEFAULT_ACCURACY
 void setComparator(Comparator<SuggestWord> comparator)
Sets the Comparator for the SuggestWordQueue.
 void setSpellIndex(Directory spellIndexDir)
Use a different index as the spell checker index or re-open the existing index if spellIndex is the same value as given in the constructor.
 void setStringDistance(StringDistance sd)
Sets the StringDistance implementation for this SpellChecker instance.
 String[] suggestSimilar(String word, int numSug)
Suggest similar words.
 String[] suggestSimilar(String word, int numSug, float accuracy)
Suggest similar words.
 String[] suggestSimilar(String word, int numSug, IndexReader ir, String field, boolean morePopular)
Deprecated. use suggestSimilar(String, int, IndexReader, String, SuggestMode)
  • SuggestMode.SUGGEST_WHEN_NOT_IN_INDEX instead of morePopular=false
  • SuggestMode.SuGGEST_MORE_POPULAR instead of morePopular=true
 String[] suggestSimilar(String word, int numSug, IndexReader ir, String field, boolean morePopular, float accuracy)
Deprecated. use suggestSimilar(String, int, IndexReader, String, SuggestMode, float)
  • SuggestMode.SUGGEST_WHEN_NOT_IN_INDEX instead of morePopular=false
  • SuggestMode.SuGGEST_MORE_POPULAR instead of morePopular=true
 String[] suggestSimilar(String word, int numSug, IndexReader ir, String field, SuggestMode suggestMode)
Calls suggestSimilar(word, numSug, ir, suggestMode, field, this.accuracy)
 String[] suggestSimilar(String word, int numSug, IndexReader ir, String field, SuggestMode suggestMode, float accuracy)
Suggest similar words (optionally restricted to a field of an index).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_ACCURACY

public static final float DEFAULT_ACCURACY
The default minimum score to use, if not specified by calling setAccuracy(float) .

See Also:
Constant Field Values

F_WORD

public static final String F_WORD
Field name for each word in the ngram index.

See Also:
Constant Field Values
Constructor Detail

SpellChecker

public SpellChecker(Directory spellIndex,
                    StringDistance sd)
             throws IOException
Use the given directory as a spell checker index. The directory is created if it doesn't exist yet.

Parameters:
spellIndex - the spell index directory
sd - the StringDistance measurement to use
Throws:
IOException - if Spellchecker can not open the directory

SpellChecker

public SpellChecker(Directory spellIndex)
             throws IOException
Use the given directory as a spell checker index with a LevensteinDistance as the default StringDistance. The directory is created if it doesn't exist yet.

Parameters:
spellIndex - the spell index directory
Throws:
IOException - if spellchecker can not open the directory

SpellChecker

public SpellChecker(Directory spellIndex,
                    StringDistance sd,
                    Comparator<SuggestWord> comparator)
             throws IOException
Use the given directory as a spell checker index with the given StringDistance measure and the given Comparator for sorting the results.

Parameters:
spellIndex - The spelling index
sd - The distance
comparator - The comparator
Throws:
IOException - if there is a problem opening the index
Method Detail

setSpellIndex

public void setSpellIndex(Directory spellIndexDir)
                   throws IOException
Use a different index as the spell checker index or re-open the existing index if spellIndex is the same value as given in the constructor.

Parameters:
spellIndexDir - the spell directory to use
Throws:
AlreadyClosedException - if the Spellchecker is already closed
IOException - if spellchecker can not open the directory

setComparator

public void setComparator(Comparator<SuggestWord> comparator)
Sets the Comparator for the SuggestWordQueue.

Parameters:
comparator - the comparator

getComparator

public Comparator<SuggestWord> getComparator()

setStringDistance

public void setStringDistance(StringDistance sd)
Sets the StringDistance implementation for this SpellChecker instance.

Parameters:
sd - the StringDistance implementation for this SpellChecker instance

getStringDistance

public StringDistance getStringDistance()
Returns the StringDistance instance used by this SpellChecker instance.

Returns:
the StringDistance instance used by this SpellChecker instance.

setAccuracy

public void setAccuracy(float acc)
Sets the accuracy 0 < minScore < 1; default DEFAULT_ACCURACY

Parameters:
acc - The new accuracy

getAccuracy

public float getAccuracy()
The accuracy (minimum score) to be used, unless overridden in suggestSimilar(String, int, org.apache.lucene.index.IndexReader, String, boolean, float), to decide whether a suggestion is included or not.

Returns:
The current accuracy setting

suggestSimilar

public String[] suggestSimilar(String word,
                               int numSug)
                        throws IOException
Suggest similar words.

As the Lucene similarity that is used to fetch the most relevant n-grammed terms is not the same as the edit distance strategy used to calculate the best matching spell-checked word from the hits that Lucene found, one usually has to retrieve a couple of numSug's in order to get the true best match.

I.e. if numSug == 1, don't count on that suggestion being the best one. Thus, you should set this value to at least 5 for a good suggestion.

Parameters:
word - the word you want a spell check done on
numSug - the number of suggested words
Returns:
String[]
Throws:
IOException - if the underlying index throws an IOException
AlreadyClosedException - if the Spellchecker is already closed
See Also:
suggestSimilar(String, int, org.apache.lucene.index.IndexReader, String, boolean, float)

suggestSimilar

public String[] suggestSimilar(String word,
                               int numSug,
                               float accuracy)
                        throws IOException
Suggest similar words.

As the Lucene similarity that is used to fetch the most relevant n-grammed terms is not the same as the edit distance strategy used to calculate the best matching spell-checked word from the hits that Lucene found, one usually has to retrieve a couple of numSug's in order to get the true best match.

I.e. if numSug == 1, don't count on that suggestion being the best one. Thus, you should set this value to at least 5 for a good suggestion.

Parameters:
word - the word you want a spell check done on
numSug - the number of suggested words
accuracy - The minimum score a suggestion must have in order to qualify for inclusion in the results
Returns:
String[]
Throws:
IOException - if the underlying index throws an IOException
AlreadyClosedException - if the Spellchecker is already closed
See Also:
suggestSimilar(String, int, org.apache.lucene.index.IndexReader, String, boolean, float)

suggestSimilar

@Deprecated
public String[] suggestSimilar(String word,
                                          int numSug,
                                          IndexReader ir,
                                          String field,
                                          boolean morePopular)
                        throws IOException
Deprecated. use suggestSimilar(String, int, IndexReader, String, SuggestMode)
  • SuggestMode.SUGGEST_WHEN_NOT_IN_INDEX instead of morePopular=false
  • SuggestMode.SuGGEST_MORE_POPULAR instead of morePopular=true

Suggest similar words (optionally restricted to a field of an index).

As the Lucene similarity that is used to fetch the most relevant n-grammed terms is not the same as the edit distance strategy used to calculate the best matching spell-checked word from the hits that Lucene found, one usually has to retrieve a couple of numSug's in order to get the true best match.

I.e. if numSug == 1, don't count on that suggestion being the best one. Thus, you should set this value to at least 5 for a good suggestion.

Uses the getAccuracy() value passed into the constructor as the accuracy.

Parameters:
word - the word you want a spell check done on
numSug - the number of suggested words
ir - the indexReader of the user index (can be null see field param)
field - the field of the user index: if field is not null, the suggested words are restricted to the words present in this field.
morePopular - return only the suggest words that are as frequent or more frequent than the searched word (only if restricted mode = (indexReader!=null and field!=null)
Returns:
String[] the sorted list of the suggest words with these 2 criteria: first criteria: the edit distance, second criteria (only if restricted mode): the popularity of the suggest words in the field of the user index
Throws:
IOException - if the underlying index throws an IOException
AlreadyClosedException - if the Spellchecker is already closed
See Also:
suggestSimilar(String, int, IndexReader, String, SuggestMode, float)

suggestSimilar

@Deprecated
public String[] suggestSimilar(String word,
                                          int numSug,
                                          IndexReader ir,
                                          String field,
                                          boolean morePopular,
                                          float accuracy)
                        throws IOException
Deprecated. use suggestSimilar(String, int, IndexReader, String, SuggestMode, float)
  • SuggestMode.SUGGEST_WHEN_NOT_IN_INDEX instead of morePopular=false
  • SuggestMode.SuGGEST_MORE_POPULAR instead of morePopular=true

Suggest similar words (optionally restricted to a field of an index).

As the Lucene similarity that is used to fetch the most relevant n-grammed terms is not the same as the edit distance strategy used to calculate the best matching spell-checked word from the hits that Lucene found, one usually has to retrieve a couple of numSug's in order to get the true best match.

I.e. if numSug == 1, don't count on that suggestion being the best one. Thus, you should set this value to at least 5 for a good suggestion.

Parameters:
word - the word you want a spell check done on
numSug - the number of suggested words
ir - the indexReader of the user index (can be null see field param)
field - the field of the user index: if field is not null, the suggested words are restricted to the words present in this field.
morePopular - return only the suggest words that are as frequent or more frequent than the searched word (only if restricted mode = (indexReader!=null and field!=null)
accuracy - The minimum score a suggestion must have in order to qualify for inclusion in the results
Returns:
String[] the sorted list of the suggest words with these 2 criteria: first criteria: the edit distance, second criteria (only if restricted mode): the popularity of the suggest words in the field of the user index
Throws:
IOException - if the underlying index throws an IOException
AlreadyClosedException - if the Spellchecker is already closed
See Also:
suggestSimilar(String, int, IndexReader, String, SuggestMode, float)

suggestSimilar

public String[] suggestSimilar(String word,
                               int numSug,
                               IndexReader ir,
                               String field,
                               SuggestMode suggestMode)
                        throws IOException
Calls suggestSimilar(word, numSug, ir, suggestMode, field, this.accuracy)

Throws:
IOException

suggestSimilar

public String[] suggestSimilar(String word,
                               int numSug,
                               IndexReader ir,
                               String field,
                               SuggestMode suggestMode,
                               float accuracy)
                        throws IOException
Suggest similar words (optionally restricted to a field of an index).

As the Lucene similarity that is used to fetch the most relevant n-grammed terms is not the same as the edit distance strategy used to calculate the best matching spell-checked word from the hits that Lucene found, one usually has to retrieve a couple of numSug's in order to get the true best match.

I.e. if numSug == 1, don't count on that suggestion being the best one. Thus, you should set this value to at least 5 for a good suggestion.

Parameters:
word - the word you want a spell check done on
numSug - the number of suggested words
ir - the indexReader of the user index (can be null see field param)
field - the field of the user index: if field is not null, the suggested words are restricted to the words present in this field.
suggestMode - (NOTE: if indexReader==null and/or field==null, then this is overridden with SuggestMode.SUGGEST_ALWAYS)
accuracy - The minimum score a suggestion must have in order to qualify for inclusion in the results
Returns:
String[] the sorted list of the suggest words with these 2 criteria: first criteria: the edit distance, second criteria (only if restricted mode): the popularity of the suggest words in the field of the user index
Throws:
IOException - if the underlying index throws an IOException
AlreadyClosedException - if the Spellchecker is already closed

clearIndex

public void clearIndex()
                throws IOException
Removes all terms from the spell check index.

Throws:
IOException
AlreadyClosedException - if the Spellchecker is already closed

exist

public boolean exist(String word)
              throws IOException
Check whether the word exists in the index.

Parameters:
word -
Returns:
true if the word exists in the index
Throws:
IOException
AlreadyClosedException - if the Spellchecker is already closed

indexDictionary

public final void indexDictionary(Dictionary dict,
                                  IndexWriterConfig config,
                                  boolean fullMerge)
                           throws IOException
Indexes the data from the given Dictionary.

Parameters:
dict - Dictionary to index
config - IndexWriterConfig to use
fullMerge - whether or not the spellcheck index should be fully merged
Throws:
AlreadyClosedException - if the Spellchecker is already closed
IOException

close

public void close()
           throws IOException
Close the IndexSearcher used by this SpellChecker

Specified by:
close in interface Closeable
Throws:
IOException - if the close operation causes an IOException
AlreadyClosedException - if the SpellChecker is already closed
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StringDistance

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spell
Interface StringDistance

All Known Implementing Classes:
JaroWinklerDistance, LevensteinDistance, NGramDistance
public interface StringDistance

Interface for string distances.

Method Summary
 float getDistance(String s1, String s2)
Returns a float between 0 and 1 based on how similar the specified strings are to one another.

Method Detail

getDistance

float getDistance(String s1,
                  String s2)
Returns a float between 0 and 1 based on how similar the specified strings are to one another. Returning a value of 1 means the specified strings are identical and 0 means the string are maximally different.

Parameters:
s1 - The first string.
s2 - The second string.
Returns:
a float between 0 and 1 based on how similar the specified strings are to one another.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SuggestMode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.search.spell
Enum SuggestMode

java.lang.Object
    extended by  java.lang.Enum<SuggestMode>
        extended by  org.apache.lucene.search.spell.SuggestMode
All Implemented Interfaces:
Serializable, Comparable<SuggestMode>
public enum SuggestMode
extends Enum<SuggestMode>

Set of strategies for suggesting related terms

WARNING: This API is experimental and might change in incompatible ways in the next release.

Enum Constant Summary
SUGGEST_ALWAYS
Always attempt to offer suggestions (however, other parameters may limit suggestions.)
SUGGEST_MORE_POPULAR
Return only suggested words that are as frequent or more frequent than the searched word
SUGGEST_WHEN_NOT_IN_INDEX
Generate suggestions only for terms not in the index (default)
Method Summary
static SuggestMode | valueOf(String name) Returns the enum constant of this type with the specified name.
static SuggestMode[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

SUGGEST_WHEN_NOT_IN_INDEX

public static final SuggestMode SUGGEST_WHEN_NOT_IN_INDEX
Generate suggestions only for terms not in the index (default)

SUGGEST_MORE_POPULAR

public static final SuggestMode SUGGEST_MORE_POPULAR
Return only suggested words that are as frequent or more frequent than the searched word

SUGGEST_ALWAYS

public static final SuggestMode SUGGEST_ALWAYS
Always attempt to offer suggestions (however, other parameters may limit suggestions.)

Method Detail

values

public static final SuggestMode[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(SuggestMode c : SuggestMode.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static SuggestMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


SuggestWord

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spell
Class SuggestWord

java.lang.Object
    extended by  org.apache.lucene.search.spell.SuggestWord

public final class SuggestWord
extends Object

SuggestWord, used in suggestSimilar method in SpellChecker class.

Default sort is first by score, then by frequency.

Field Summary
int | freq The freq of the word
float | score the score of the word
String | string the suggested word
Constructor Summary
SuggestWord()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

score

public float score
the score of the word

freq

public int freq
The freq of the word

string

public String string
the suggested word

Constructor Detail

SuggestWord

public SuggestWord()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SuggestWordFrequencyComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spell
Class SuggestWordFrequencyComparator

java.lang.Object
    extended by  org.apache.lucene.search.spell.SuggestWordFrequencyComparator
All Implemented Interfaces:
Comparator<SuggestWord>
public class SuggestWordFrequencyComparator
extends Object
implements Comparator<SuggestWord>

Frequency first, then score. Must have

Constructor Summary
SuggestWordFrequencyComparator()
Method Summary
 int compare(SuggestWord first, SuggestWord second)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals

Constructor Detail

SuggestWordFrequencyComparator

public SuggestWordFrequencyComparator()
Method Detail

compare

public int compare(SuggestWord first,
                   SuggestWord second)
Specified by:
compare in interface Comparator<SuggestWord>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SuggestWordQueue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spell
Class SuggestWordQueue

java.lang.Object
    extended by  org.apache.lucene.util.PriorityQueue<SuggestWord>
        extended by  org.apache.lucene.search.spell.SuggestWordQueue

public final class SuggestWordQueue
extends PriorityQueue<SuggestWord>

Sorts SuggestWord instances

See Also:
SuggestWordScoreComparator, SuggestWordFrequencyComparator

Field Summary
static Comparator<SuggestWord> DEFAULT_COMPARATOR
Constructor Summary
SuggestWordQueue(int size)
Use the DEFAULT_COMPARATOR
SuggestWordQueue(int size, Comparator<SuggestWord> comparator)
Specify the size of the queue and the comparator to use for sorting.
Method Summary
protected  boolean lessThan(SuggestWord wa, SuggestWord wb)
Determines the ordering of objects in this priority queue.
Methods inherited from class org.apache.lucene.util.PriorityQueue
add, clear, getHeapArray, getSentinelObject, initialize, insertWithOverflow, pop, size, top, updateTop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_COMPARATOR

public static final Comparator<SuggestWord> DEFAULT_COMPARATOR
Constructor Detail

SuggestWordQueue

public SuggestWordQueue(int size)
Use the DEFAULT_COMPARATOR

Parameters:
size - The size of the queue

SuggestWordQueue

public SuggestWordQueue(int size,
                        Comparator<SuggestWord> comparator)
Specify the size of the queue and the comparator to use for sorting.

Parameters:
size - The size
comparator - The comparator.
Method Detail

lessThan

protected final boolean lessThan(SuggestWord wa,
                                 SuggestWord wb)
Description copied from class: PriorityQueue
Determines the ordering of objects in this priority queue. Subclasses must define this one method.

Specified by:
lessThan in class PriorityQueue<SuggestWord>
Returns:
true iff parameter a is less than parameter b.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SuggestWordScoreComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spell
Class SuggestWordScoreComparator

java.lang.Object
    extended by  org.apache.lucene.search.spell.SuggestWordScoreComparator
All Implemented Interfaces:
Comparator<SuggestWord>
public class SuggestWordScoreComparator
extends Object
implements Comparator<SuggestWord>

Score first, then frequency

Constructor Summary
SuggestWordScoreComparator()
Method Summary
 int compare(SuggestWord first, SuggestWord second)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals

Constructor Detail

SuggestWordScoreComparator

public SuggestWordScoreComparator()
Method Detail

compare

public int compare(SuggestWord first,
                   SuggestWord second)
Specified by:
compare in interface Comparator<SuggestWord>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermFreqIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spell
Interface TermFreqIterator

All Superinterfaces:
BytesRefIterator
All Known Implementing Classes:
BufferingTermFreqIteratorWrapper, SortedTermFreqIteratorWrapper, TermFreqIterator.TermFreqIteratorWrapper, UnsortedTermFreqIteratorWrapper
public interface TermFreqIterator
extends BytesRefIterator

Interface for enumerating term,weight pairs.

Nested Class Summary
static class TermFreqIterator.TermFreqIteratorWrapper
Wraps a BytesRefIterator as a TermFreqIterator, with all weights set to 1
Field Summary
Fields inherited from interface org.apache.lucene.util.BytesRefIterator
EMPTY
Method Summary
 long weight()
Methods inherited from interface org.apache.lucene.util.BytesRefIterator
getComparator, next

Method Detail

weight

long weight()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermFreqIterator.TermFreqIteratorWrapper

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.spell
Class TermFreqIterator.TermFreqIteratorWrapper

java.lang.Object
    extended by  org.apache.lucene.search.spell.TermFreqIterator.TermFreqIteratorWrapper
All Implemented Interfaces:
TermFreqIterator, BytesRefIterator
Enclosing interface:
TermFreqIterator
public static class TermFreqIterator.TermFreqIteratorWrapper
extends Object
implements TermFreqIterator

Wraps a BytesRefIterator as a TermFreqIterator, with all weights set to 1

Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.search.spell.TermFreqIterator
TermFreqIterator.TermFreqIteratorWrapper
Field Summary
Fields inherited from interface org.apache.lucene.util.BytesRefIterator
EMPTY
Constructor Summary
TermFreqIterator.TermFreqIteratorWrapper(BytesRefIterator wrapped)
Method Summary
Comparator<BytesRef> | getComparator() Return the BytesRef Comparator used to sort terms provided by the iterator.
BytesRef | next() Increments the iteration to the next BytesRef in the iterator.
long | weight()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TermFreqIterator.TermFreqIteratorWrapper

public TermFreqIterator.TermFreqIteratorWrapper(BytesRefIterator wrapped)
Method Detail

weight

public long weight()
Specified by:
weight in interface TermFreqIterator

next

public BytesRef next()
              throws IOException
Description copied from interface: BytesRefIterator
Increments the iteration to the next BytesRef in the iterator. Returns the resulting BytesRef or null if the end of the iterator is reached. The returned BytesRef may be re-used across calls to next. After this method returns null, do not call it again: the results are undefined.

Specified by:
next in interface BytesRefIterator
Returns:
the next BytesRef in the iterator or null if the end of the iterator is reached.
Throws:
IOException

getComparator

public Comparator<BytesRef> getComparator()
Description copied from interface: BytesRefIterator
Return the BytesRef Comparator used to sort terms provided by the iterator. This may return null if there are no items or the iterator is not sorted. Callers may invoke this method many times, so it's best to cache a single instance & reuse it.

Specified by:
getComparator in interface BytesRefIterator
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Interface org.apache.lucene.search.spell.Dictionary

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.spell.Dictionary

Packages that use Dictionary
org.apache.lucene.search.spell | Suggest alternate spellings for words.
org.apache.lucene.search.suggest | Support for Autocomplete/Autosuggest

Uses of Dictionary in org.apache.lucene.search.spell

Classes in org.apache.lucene.search.spell that implement Dictionary
class | HighFrequencyDictionary HighFrequencyDictionary: terms taken from the given field of a Lucene index, which appear in a number of documents above a given threshold.
class | LuceneDictionary Lucene Dictionary: terms taken from the given field of a Lucene index.
class | PlainTextDictionary Dictionary represented by a text file.

Methods in org.apache.lucene.search.spell with parameters of type Dictionary
 void SpellChecker.indexDictionary(Dictionary dict, IndexWriterConfig config, boolean fullMerge)
Indexes the data from the given Dictionary.

Uses of Dictionary in org.apache.lucene.search.suggest

Classes in org.apache.lucene.search.suggest that implement Dictionary
 class FileDictionary
Dictionary represented by a text file.

Methods in org.apache.lucene.search.suggest with parameters of type Dictionary
 void Lookup.build(Dictionary dict)
Build lookup from a dictionary.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spell.HighFrequencyDictionary

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spell.HighFrequencyDictionary

No usage of org.apache.lucene.search.spell.HighFrequencyDictionary

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spell.JaroWinklerDistance

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spell.JaroWinklerDistance

No usage of org.apache.lucene.search.spell.JaroWinklerDistance

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spell.LevensteinDistance

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spell.LevensteinDistance

No usage of org.apache.lucene.search.spell.LevensteinDistance

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spell.LuceneDictionary

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spell.LuceneDictionary

No usage of org.apache.lucene.search.spell.LuceneDictionary

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spell.NGramDistance

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spell.NGramDistance

No usage of org.apache.lucene.search.spell.NGramDistance

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spell.PlainTextDictionary

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spell.PlainTextDictionary

No usage of org.apache.lucene.search.spell.PlainTextDictionary

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spell.SpellChecker

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spell.SpellChecker

No usage of org.apache.lucene.search.spell.SpellChecker

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.spell.StringDistance

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.spell.StringDistance

Packages that use StringDistance
org.apache.lucene.search.spell Suggest alternate spellings for words.

Uses of StringDistance in org.apache.lucene.search.spell

Classes in org.apache.lucene.search.spell that implement StringDistance
class | JaroWinklerDistance Similarity measure for short strings such as person names.
class | LevensteinDistance Levenstein edit distance class.
class | NGramDistance N-Gram version of edit distance based on paper by Grzegorz Kondrak, "N-gram similarity and distance".

Methods in org.apache.lucene.search.spell that return StringDistance
 StringDistance SpellChecker.getStringDistance()
Returns the StringDistance instance used by this SpellChecker instance.

Methods in org.apache.lucene.search.spell with parameters of type StringDistance
 void SpellChecker.setStringDistance(StringDistance sd)
Sets the StringDistance implementation for this SpellChecker instance.

Constructors in org.apache.lucene.search.spell with parameters of type StringDistance
SpellChecker(Directory spellIndex, StringDistance sd)
Use the given directory as a spell checker index.
SpellChecker(Directory spellIndex, StringDistance sd, Comparator<SuggestWord> comparator)
Use the given directory as a spell checker index with the given StringDistance measure and the given Comparator for sorting the results.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spell.SuggestMode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spell.SuggestMode

Packages that use SuggestMode
org.apache.lucene.search.spell Suggest alternate spellings for words.

Uses of SuggestMode in org.apache.lucene.search.spell

Methods in org.apache.lucene.search.spell that return SuggestMode
static SuggestMode | SuggestMode.valueOf(String name) Returns the enum constant of this type with the specified name.
static SuggestMode[] | SuggestMode.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.search.spell with parameters of type SuggestMode
 String[] SpellChecker.suggestSimilar(String word, int numSug, IndexReader ir, String field, SuggestMode suggestMode)
Calls suggestSimilar(word, numSug, ir, suggestMode, field, this.accuracy)
 String[] SpellChecker.suggestSimilar(String word, int numSug, IndexReader ir, String field, SuggestMode suggestMode, float accuracy)
Suggest similar words (optionally restricted to a field of an index).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spell.SuggestWord

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spell.SuggestWord

Packages that use SuggestWord
org.apache.lucene.search.spell Suggest alternate spellings for words.

Uses of SuggestWord in org.apache.lucene.search.spell

Fields in org.apache.lucene.search.spell with type parameters of type SuggestWord
static Comparator<SuggestWord> SuggestWordQueue.DEFAULT_COMPARATOR

Methods in org.apache.lucene.search.spell that return types with arguments of type SuggestWord
 Comparator<SuggestWord> SpellChecker.getComparator()

Methods in org.apache.lucene.search.spell with parameters of type SuggestWord
int | SuggestWordFrequencyComparator.compare(SuggestWord first, SuggestWord second)
int | SuggestWordScoreComparator.compare(SuggestWord first, SuggestWord second)
protected boolean | SuggestWordQueue.lessThan(SuggestWord wa, SuggestWord wb)

Method parameters in org.apache.lucene.search.spell with type arguments of type SuggestWord
 void SpellChecker.setComparator(Comparator<SuggestWord> comparator)
Sets the Comparator for the SuggestWordQueue.

Constructor parameters in org.apache.lucene.search.spell with type arguments of type SuggestWord
SpellChecker(Directory spellIndex, StringDistance sd, Comparator<SuggestWord> comparator)
Use the given directory as a spell checker index with the given StringDistance measure and the given Comparator for sorting the results.
SuggestWordQueue(int size, Comparator<SuggestWord> comparator)
Specify the size of the queue and the comparator to use for sorting.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spell.SuggestWordFrequencyComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spell.SuggestWordFrequencyComparator

No usage of org.apache.lucene.search.spell.SuggestWordFrequencyComparator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spell.SuggestWordQueue

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spell.SuggestWordQueue

No usage of org.apache.lucene.search.spell.SuggestWordQueue

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spell.SuggestWordScoreComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spell.SuggestWordScoreComparator

No usage of org.apache.lucene.search.spell.SuggestWordScoreComparator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.spell.TermFreqIterator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.spell.TermFreqIterator

Packages that use TermFreqIterator
org.apache.lucene.search.spell | Suggest alternate spellings for words.
org.apache.lucene.search.suggest | Support for Autocomplete/Autosuggest
org.apache.lucene.search.suggest.fst | Finite-state based autosuggest.
org.apache.lucene.search.suggest.jaspell | JaSpell-based autosuggest.
org.apache.lucene.search.suggest.tst | Ternary Search Tree based autosuggest.

Uses of TermFreqIterator in org.apache.lucene.search.spell

Classes in org.apache.lucene.search.spell that implement TermFreqIterator
static class TermFreqIterator.TermFreqIteratorWrapper
Wraps a BytesRefIterator as a TermFreqIterator, with all weights set to 1

Uses of TermFreqIterator in org.apache.lucene.search.suggest

Classes in org.apache.lucene.search.suggest that implement TermFreqIterator
class | BufferingTermFreqIteratorWrapper This wrapper buffers incoming elements.
class | SortedTermFreqIteratorWrapper This wrapper buffers incoming elements and makes sure they are sorted based on given comparator.
class | UnsortedTermFreqIteratorWrapper This wrapper buffers the incoming elements and makes sure they are in random order.

Methods in org.apache.lucene.search.suggest that return TermFreqIterator
 TermFreqIterator FileDictionary.getWordsIterator()

Methods in org.apache.lucene.search.suggest with parameters of type TermFreqIterator
abstract  void Lookup.build(TermFreqIterator tfit)
Builds up a new internal Lookup representation based on the given TermFreqIterator.

Constructors in org.apache.lucene.search.suggest with parameters of type TermFreqIterator
BufferingTermFreqIteratorWrapper(TermFreqIterator source)
SortedTermFreqIteratorWrapper(TermFreqIterator source, Comparator<BytesRef> comparator)
SortedTermFreqIteratorWrapper(TermFreqIterator source, Comparator<BytesRef> comparator, boolean compareRawBytes)
UnsortedTermFreqIteratorWrapper(TermFreqIterator source)

Uses of TermFreqIterator in org.apache.lucene.search.suggest.fst

Methods in org.apache.lucene.search.suggest.fst with parameters of type TermFreqIterator
void | FSTCompletionLookup.build(TermFreqIterator tfit) Builds up a new internal Lookup representation based on the given TermFreqIterator.
void | WFSTCompletionLookup.build(TermFreqIterator iterator)
void | FSTLookup.build(TermFreqIterator tfit) Deprecated.

Uses of TermFreqIterator in org.apache.lucene.search.suggest.jaspell

Methods in org.apache.lucene.search.suggest.jaspell with parameters of type TermFreqIterator
 void JaspellLookup.build(TermFreqIterator tfit)

Uses of TermFreqIterator in org.apache.lucene.search.suggest.tst

Methods in org.apache.lucene.search.suggest.tst with parameters of type TermFreqIterator
 void TSTLookup.build(TermFreqIterator tfit)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.spell.TermFreqIterator.TermFreqIteratorWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.spell.TermFreqIterator.TermFreqIteratorWrapper

No usage of org.apache.lucene.search.spell.TermFreqIterator.TermFreqIteratorWrapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


BufferingTermFreqIteratorWrapper

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest
Class BufferingTermFreqIteratorWrapper

java.lang.Object
    extended by  org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper
All Implemented Interfaces:
TermFreqIterator, BytesRefIterator
Direct Known Subclasses:
UnsortedTermFreqIteratorWrapper
public class BufferingTermFreqIteratorWrapper
extends Object
implements TermFreqIterator

This wrapper buffers incoming elements.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.search.spell.TermFreqIterator
TermFreqIterator.TermFreqIteratorWrapper
Field Summary
protected int | curPos
protected BytesRefList | entries
protected long[] | freqs
Fields inherited from interface org.apache.lucene.util.BytesRefIterator
EMPTY
Constructor Summary
BufferingTermFreqIteratorWrapper(TermFreqIterator source)
Method Summary
Comparator<BytesRef> | getComparator() Return the BytesRef Comparator used to sort terms provided by the iterator.
BytesRef | next() Increments the iteration to the next BytesRef in the iterator.
long | weight()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

entries

protected BytesRefList entries

curPos

protected int curPos

freqs

protected long[] freqs
Constructor Detail

BufferingTermFreqIteratorWrapper

public BufferingTermFreqIteratorWrapper(TermFreqIterator source)
                                 throws IOException
Throws:
IOException
Method Detail

weight

public long weight()
Specified by:
weight in interface TermFreqIterator

next

public BytesRef next()
              throws IOException
Description copied from interface: BytesRefIterator
Increments the iteration to the next BytesRef in the iterator. Returns the resulting BytesRef or null if the end of the iterator is reached. The returned BytesRef may be re-used across calls to next. After this method returns null, do not call it again: the results are undefined.

Specified by:
next in interface BytesRefIterator
Returns:
the next BytesRef in the iterator or null if the end of the iterator is reached.
Throws:
IOException

getComparator

public Comparator<BytesRef> getComparator()
Description copied from interface: BytesRefIterator
Return the BytesRef Comparator used to sort terms provided by the iterator. This may return null if there are no items or the iterator is not sorted. Callers may invoke this method many times, so it's best to cache a single instance & reuse it.

Specified by:
getComparator in interface BytesRefIterator
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BytesRefList

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest
Class BytesRefList

java.lang.Object
    extended by  org.apache.lucene.search.suggest.BytesRefList

public final class BytesRefList
extends Object

A simple append only random-access BytesRef array that stores full copies of the appended bytes in a ByteBlockPool. Note: This class is not Thread-Safe!

WARNING: This API is experimental and might change in incompatible ways in the next release.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
BytesRefList()
Creates a new BytesRefList
Method Summary
int | append(BytesRef bytes) Appends a copy of the given BytesRef to this BytesRefList.
long | bytesUsed() Returns the number internally used bytes to hold the appended bytes in memory
void | clear() Clears this BytesRefList
BytesRef | get(BytesRef spare, int ord) Returns the n'th element of this BytesRefList
BytesRefIterator | iterator() sugar for iterator(Comparator) with a null comparator
BytesRefIterator | iterator(Comparator<BytesRef> comp) Returns a BytesRefIterator with point in time semantics.
int | size() Returns the current size of this BytesRefList
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BytesRefList

public BytesRefList()
Creates a new BytesRefList

Method Detail

clear

public void clear()
Clears this BytesRefList

append

public int append(BytesRef bytes)
Appends a copy of the given BytesRef to this BytesRefList.

Parameters:
bytes - the bytes to append
Returns:
the ordinal of the appended bytes

size

public int size()
Returns the current size of this BytesRefList

Returns:
the current size of this BytesRefList

get

public BytesRef get(BytesRef spare,
                    int ord)
Returns the n'th element of this BytesRefList

Parameters:
spare - a spare BytesRef instance
ord - the elements ordinal to retrieve
Returns:
the n'th element of this BytesRefList

bytesUsed

public long bytesUsed()
Returns the number internally used bytes to hold the appended bytes in memory

Returns:
the number internally used bytes to hold the appended bytes in memory

iterator

public BytesRefIterator iterator()
sugar for iterator(Comparator) with a null comparator

iterator

public BytesRefIterator iterator(Comparator<BytesRef> comp)

Returns a BytesRefIterator with point in time semantics. The iterator provides access to all so far appended BytesRef instances.

If a non null Comparator is provided the iterator will iterate the byte values in the order specified by the comparator. Otherwise the order is the same as the values were appended.

This is a non-destructive operation.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileDictionary

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest
Class FileDictionary

java.lang.Object
    extended by  org.apache.lucene.search.suggest.FileDictionary
All Implemented Interfaces:
Dictionary
public class FileDictionary
extends Object
implements Dictionary

Dictionary represented by a text file.

Format allowed: 1 string per line, optionally with a tab-separated integer value:
word1 TAB 100
word2 word3 TAB 101
word4 word5 TAB 102

Constructor Summary
FileDictionary(InputStream dictFile)
FileDictionary(Reader reader)
Creates a dictionary based on a reader.
Method Summary
 TermFreqIterator getWordsIterator()
Return all words present in the dictionary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FileDictionary

public FileDictionary(InputStream dictFile)

FileDictionary

public FileDictionary(Reader reader)
Creates a dictionary based on a reader.

Method Detail

getWordsIterator

public TermFreqIterator getWordsIterator()
Description copied from interface: Dictionary
Return all words present in the dictionary

Specified by:
getWordsIterator in interface Dictionary
Returns:
Iterator
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Lookup

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest
Class Lookup

java.lang.Object
    extended by  org.apache.lucene.search.suggest.Lookup
Direct Known Subclasses:
FSTCompletionLookup, FSTLookup, JaspellLookup, TSTLookup, WFSTCompletionLookup
public abstract class Lookup
extends Object

Simple Lookup interface for CharSequence suggestions.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | Lookup.LookupPriorityQueue A PriorityQueue collecting a fixed size of high priority Lookup.LookupResult
static class | Lookup.LookupResult Result of a lookup.
Field Summary
static Comparator<CharSequence> CHARSEQUENCE_COMPARATOR
A simple char-by-char comparator for CharSequence
Constructor Summary
Lookup()
Method Summary
void | build(Dictionary dict) Build lookup from a dictionary.
abstract void | build(TermFreqIterator tfit) Builds up a new internal Lookup representation based on the given TermFreqIterator.
abstract boolean | load(InputStream input) Discard current lookup data and load it from a previously saved copy.
abstract List<Lookup.LookupResult> | lookup(CharSequence key, boolean onlyMorePopular, int num) Look up a key and return possible completion for this key.
abstract boolean | store(OutputStream output) Persist the constructed lookup data to a directory.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

CHARSEQUENCE_COMPARATOR

public static final Comparator<CharSequence> CHARSEQUENCE_COMPARATOR
A simple char-by-char comparator for CharSequence

Constructor Detail

Lookup

public Lookup()
Method Detail

build

public void build(Dictionary dict)
           throws IOException
Build lookup from a dictionary. Some implementations may require sorted or unsorted keys from the dictionary's iterator - use SortedTermFreqIteratorWrapper or UnsortedTermFreqIteratorWrapper in such case.

Throws:
IOException

build

public abstract void build(TermFreqIterator tfit)
                    throws IOException
Builds up a new internal Lookup representation based on the given TermFreqIterator. The implementation might re-sort the data internally.

Throws:
IOException

lookup

public abstract List<Lookup.LookupResult> lookup(CharSequence key,
                                                 boolean onlyMorePopular,
                                                 int num)
Look up a key and return possible completion for this key.

Parameters:
key - lookup key. Depending on the implementation this may be a prefix, misspelling, or even infix.
onlyMorePopular - return only more popular results
num - maximum number of results to return
Returns:
a list of possible completions, with their relative weight (e.g. popularity)

store

public abstract boolean store(OutputStream output)
                       throws IOException
Persist the constructed lookup data to a directory. Optional operation.

Parameters:
output - OutputStream to write the data to.
Returns:
true if successful, false if unsuccessful or not supported.
Throws:
IOException - when fatal IO error occurs.

load

public abstract boolean load(InputStream input)
                      throws IOException
Discard current lookup data and load it from a previously saved copy. Optional operation.

Parameters:
input - the InputStream to load the lookup data.
Returns:
true if completed successfully, false if unsuccessful or not supported.
Throws:
IOException - when fatal IO error occurs.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Lookup.LookupPriorityQueue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest
Class Lookup.LookupPriorityQueue

java.lang.Object
    extended by  org.apache.lucene.util.PriorityQueue<Lookup.LookupResult>
        extended by  org.apache.lucene.search.suggest.Lookup.LookupPriorityQueue
Enclosing class:
Lookup
public static final class Lookup.LookupPriorityQueue
extends PriorityQueue<Lookup.LookupResult>

A PriorityQueue collecting a fixed size of high priority Lookup.LookupResult

Constructor Summary
Lookup.LookupPriorityQueue(int size)
Method Summary
Lookup.LookupResult[] | getResults() Returns the top N results in descending order.
protected boolean | lessThan(Lookup.LookupResult a, Lookup.LookupResult b) Determines the ordering of objects in this priority queue.
Methods inherited from class org.apache.lucene.util.PriorityQueue
add, clear, getHeapArray, getSentinelObject, initialize, insertWithOverflow, pop, size, top, updateTop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Lookup.LookupPriorityQueue

public Lookup.LookupPriorityQueue(int size)
Method Detail

lessThan

protected boolean lessThan(Lookup.LookupResult a,
                           Lookup.LookupResult b)
Description copied from class: PriorityQueue
Determines the ordering of objects in this priority queue. Subclasses must define this one method.

Specified by:
lessThan in class PriorityQueue<Lookup.LookupResult>
Returns:
true iff parameter a is less than parameter b.

getResults

public Lookup.LookupResult[] getResults()
Returns the top N results in descending order.

Returns:
the top N results in descending order.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Lookup.LookupResult

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest
Class Lookup.LookupResult

java.lang.Object
    extended by  org.apache.lucene.search.suggest.Lookup.LookupResult
All Implemented Interfaces:
Comparable<Lookup.LookupResult>
Enclosing class:
Lookup
public static final class Lookup.LookupResult
extends Object
implements Comparable<Lookup.LookupResult>

Result of a lookup.

Field Summary
CharSequence | key
long | value
Constructor Summary
Lookup.LookupResult(CharSequence key, long value)
Method Summary
int | compareTo(Lookup.LookupResult o) Compare alphabetically.
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

key

public final CharSequence key

value

public final long value
Constructor Detail

Lookup.LookupResult

public Lookup.LookupResult(CharSequence key,
                           long value)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(Lookup.LookupResult o)
Compare alphabetically.

Specified by:
compareTo in interface Comparable<Lookup.LookupResult>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.search.suggest
Classes
BufferingTermFreqIteratorWrapper
BytesRefList
FileDictionary
Lookup
Lookup.LookupPriorityQueue
Lookup.LookupResult
SortedTermFreqIteratorWrapper
UnsortedTermFreqIteratorWrapper


org.apache.lucene.search.suggest

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.search.suggest

Support for Autocomplete/Autosuggest

See:
Description

Class Summary
BufferingTermFreqIteratorWrapper | This wrapper buffers incoming elements.
BytesRefList | A simple append only random-access BytesRef array that stores full copies of the appended bytes in a ByteBlockPool.
FileDictionary | Dictionary represented by a text file.
Lookup | Simple Lookup interface for CharSequence suggestions.
Lookup.LookupPriorityQueue | A PriorityQueue collecting a fixed size of high priority Lookup.LookupResult
Lookup.LookupResult | Result of a lookup.
SortedTermFreqIteratorWrapper | This wrapper buffers incoming elements and makes sure they are sorted based on given comparator.
UnsortedTermFreqIteratorWrapper | This wrapper buffers the incoming elements and makes sure they are in random order.

Package org.apache.lucene.search.suggest Description

Support for Autocomplete/Autosuggest


org.apache.lucene.search.suggest Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.search.suggest

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper (implements org.apache.lucene.search.spell.TermFreqIterator)
      • org.apache.lucene.search.suggest.UnsortedTermFreqIteratorWrapper
    • org.apache.lucene.search.suggest.BytesRefList
    • org.apache.lucene.search.suggest.FileDictionary (implements org.apache.lucene.search.spell.Dictionary)
    • org.apache.lucene.search.suggest.Lookup
    • org.apache.lucene.search.suggest.Lookup.LookupResult (implements java.lang.Comparable<T>)
    • org.apache.lucene.util.PriorityQueue<T>
      • org.apache.lucene.search.suggest.Lookup.LookupPriorityQueue
    • org.apache.lucene.search.suggest.SortedTermFreqIteratorWrapper (implements org.apache.lucene.search.spell.TermFreqIterator)


Uses of Package org.apache.lucene.search.suggest

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.search.suggest

Packages that use org.apache.lucene.search.suggest
org.apache.lucene.search.suggest | Support for Autocomplete/Autosuggest
org.apache.lucene.search.suggest.fst | Finite-state based autosuggest.
org.apache.lucene.search.suggest.jaspell | JaSpell-based autosuggest.
org.apache.lucene.search.suggest.tst | Ternary Search Tree based autosuggest.

Classes in org.apache.lucene.search.suggest used by org.apache.lucene.search.suggest
BufferingTermFreqIteratorWrapper
This wrapper buffers incoming elements.
BytesRefList
A simple append only random-access BytesRef array that stores full copies of the appended bytes in a ByteBlockPool.
Lookup.LookupResult
Result of a lookup.

Classes in org.apache.lucene.search.suggest used by org.apache.lucene.search.suggest.fst
Lookup
Simple Lookup interface for CharSequence suggestions.
Lookup.LookupResult
Result of a lookup.

Classes in org.apache.lucene.search.suggest used by org.apache.lucene.search.suggest.jaspell
Lookup
Simple Lookup interface for CharSequence suggestions.
Lookup.LookupResult
Result of a lookup.

Classes in org.apache.lucene.search.suggest used by org.apache.lucene.search.suggest.tst
Lookup
Simple Lookup interface for CharSequence suggestions.
Lookup.LookupResult
Result of a lookup.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SortedTermFreqIteratorWrapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest
Class SortedTermFreqIteratorWrapper

java.lang.Object
    extended by  org.apache.lucene.search.suggest.SortedTermFreqIteratorWrapper
All Implemented Interfaces:
TermFreqIterator, BytesRefIterator
public class SortedTermFreqIteratorWrapper
extends Object
implements TermFreqIterator

This wrapper buffers incoming elements and makes sure they are sorted based on given comparator.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.search.spell.TermFreqIterator
TermFreqIterator.TermFreqIteratorWrapper
Field Summary
Fields inherited from interface org.apache.lucene.util.BytesRefIterator
EMPTY
Constructor Summary
SortedTermFreqIteratorWrapper(TermFreqIterator source, Comparator<BytesRef> comparator)
SortedTermFreqIteratorWrapper(TermFreqIterator source, Comparator<BytesRef> comparator, boolean compareRawBytes)
Method Summary
protected long | decode(BytesRef scratch, ByteArrayDataInput tmpInput)
protected void | encode(Sort.ByteSequencesWriter writer, ByteArrayDataOutput output, byte[] buffer, BytesRef spare, long weight)
Comparator<BytesRef> | getComparator() Return the BytesRef Comparator used to sort terms provided by the iterator.
BytesRef | next() Increments the iteration to the next BytesRef in the iterator.
long | weight()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SortedTermFreqIteratorWrapper

public SortedTermFreqIteratorWrapper(TermFreqIterator source,
                                     Comparator<BytesRef> comparator)
                              throws IOException
Throws:
IOException

SortedTermFreqIteratorWrapper

public SortedTermFreqIteratorWrapper(TermFreqIterator source,
                                     Comparator<BytesRef> comparator,
                                     boolean compareRawBytes)
                              throws IOException
Throws:
IOException
Method Detail

next

public BytesRef next()
              throws IOException
Description copied from interface: BytesRefIterator
Increments the iteration to the next BytesRef in the iterator. Returns the resulting BytesRef or null if the end of the iterator is reached. The returned BytesRef may be re-used across calls to next. After this method returns null, do not call it again: the results are undefined.

Specified by:
next in interface BytesRefIterator
Returns:
the next BytesRef in the iterator or null if the end of the iterator is reached.
Throws:
IOException

getComparator

public Comparator<BytesRef> getComparator()
Description copied from interface: BytesRefIterator
Return the BytesRef Comparator used to sort terms provided by the iterator. This may return null if there are no items or the iterator is not sorted. Callers may invoke this method many times, so it's best to cache a single instance & reuse it.

Specified by:
getComparator in interface BytesRefIterator

weight

public long weight()
Specified by:
weight in interface TermFreqIterator

encode

protected void encode(Sort.ByteSequencesWriter writer,
                      ByteArrayDataOutput output,
                      byte[] buffer,
                      BytesRef spare,
                      long weight)
               throws IOException
Throws:
IOException

decode

protected long decode(BytesRef scratch,
                      ByteArrayDataInput tmpInput)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnsortedTermFreqIteratorWrapper

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest
Class UnsortedTermFreqIteratorWrapper

java.lang.Object
    extended by  org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper
        extended by  org.apache.lucene.search.suggest.UnsortedTermFreqIteratorWrapper
All Implemented Interfaces:
TermFreqIterator, BytesRefIterator
public class UnsortedTermFreqIteratorWrapper
extends BufferingTermFreqIteratorWrapper

This wrapper buffers the incoming elements and makes sure they are in random order.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.search.spell.TermFreqIterator
TermFreqIterator.TermFreqIteratorWrapper
Field Summary
Fields inherited from class org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper
curPos, entries, freqs
Fields inherited from interface org.apache.lucene.util.BytesRefIterator
EMPTY
Constructor Summary
UnsortedTermFreqIteratorWrapper(TermFreqIterator source)
Method Summary
BytesRef | next() Increments the iteration to the next BytesRef in the iterator.
long | weight()
Methods inherited from class org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper
getComparator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

UnsortedTermFreqIteratorWrapper

public UnsortedTermFreqIteratorWrapper(TermFreqIterator source)
                                throws IOException
Throws:
IOException
Method Detail

weight

public long weight()
Specified by:
weight in interface TermFreqIterator
Overrides:
weight in class BufferingTermFreqIteratorWrapper

next

public BytesRef next()
              throws IOException
Description copied from interface: BytesRefIterator
Increments the iteration to the next BytesRef in the iterator. Returns the resulting BytesRef or null if the end of the iterator is reached. The returned BytesRef may be re-used across calls to next. After this method returns null, do not call it again: the results are undefined.

Specified by:
next in interface BytesRefIterator
Overrides:
next in class BufferingTermFreqIteratorWrapper
Returns:
the next BytesRef in the iterator or null if the end of the iterator is reached.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper

Packages that use BufferingTermFreqIteratorWrapper
org.apache.lucene.search.suggest Support for Autocomplete/Autosuggest

Uses of BufferingTermFreqIteratorWrapper in org.apache.lucene.search.suggest

Subclasses of BufferingTermFreqIteratorWrapper in org.apache.lucene.search.suggest
 class UnsortedTermFreqIteratorWrapper
This wrapper buffers the incoming elements and makes sure they are in random order.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.BytesRefList

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.BytesRefList

Packages that use BytesRefList
org.apache.lucene.search.suggest Support for Autocomplete/Autosuggest

Uses of BytesRefList in org.apache.lucene.search.suggest

Fields in org.apache.lucene.search.suggest declared as BytesRefList
protected  BytesRefList BufferingTermFreqIteratorWrapper.entries

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.FileDictionary

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.FileDictionary

No usage of org.apache.lucene.search.suggest.FileDictionary

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.Lookup

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.Lookup

Packages that use Lookup
org.apache.lucene.search.suggest.fst | Finite-state based autosuggest.
org.apache.lucene.search.suggest.jaspell | JaSpell-based autosuggest.
org.apache.lucene.search.suggest.tst | Ternary Search Tree based autosuggest.

Uses of Lookup in org.apache.lucene.search.suggest.fst

Subclasses of Lookup in org.apache.lucene.search.suggest.fst
class | FSTCompletionLookup An adapter from Lookup API to FSTCompletion.
class | FSTLookup Deprecated. Use FSTCompletionLookup instead.
class | WFSTCompletionLookup Suggester based on a weighted FST: it first traverses the prefix, then walks the n shortest paths to retrieve top-ranked suggestions.

Uses of Lookup in org.apache.lucene.search.suggest.jaspell

Subclasses of Lookup in org.apache.lucene.search.suggest.jaspell
 class JaspellLookup

Uses of Lookup in org.apache.lucene.search.suggest.tst

Subclasses of Lookup in org.apache.lucene.search.suggest.tst
 class TSTLookup

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.Lookup.LookupPriorityQueue

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.Lookup.LookupPriorityQueue

No usage of org.apache.lucene.search.suggest.Lookup.LookupPriorityQueue

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.Lookup.LookupResult

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.Lookup.LookupResult

Packages that use Lookup.LookupResult
org.apache.lucene.search.suggest | Support for Autocomplete/Autosuggest
org.apache.lucene.search.suggest.fst | Finite-state based autosuggest.
org.apache.lucene.search.suggest.jaspell | JaSpell-based autosuggest.
org.apache.lucene.search.suggest.tst | Ternary Search Tree based autosuggest.

Uses of Lookup.LookupResult in org.apache.lucene.search.suggest

Methods in org.apache.lucene.search.suggest that return Lookup.LookupResult
 Lookup.LookupResult[] Lookup.LookupPriorityQueue.getResults()
Returns the top N results in descending order.

Methods in org.apache.lucene.search.suggest that return types with arguments of type Lookup.LookupResult
abstract  List<Lookup.LookupResult> Lookup.lookup(CharSequence key, boolean onlyMorePopular, int num)
Look up a key and return possible completion for this key.

Methods in org.apache.lucene.search.suggest with parameters of type Lookup.LookupResult
int | Lookup.LookupResult.compareTo(Lookup.LookupResult o) Compare alphabetically.
protected boolean | Lookup.LookupPriorityQueue.lessThan(Lookup.LookupResult a, Lookup.LookupResult b)

Uses of Lookup.LookupResult in org.apache.lucene.search.suggest.fst

Methods in org.apache.lucene.search.suggest.fst that return types with arguments of type Lookup.LookupResult
List<Lookup.LookupResult> | FSTCompletionLookup.lookup(CharSequence key, boolean higherWeightsFirst, int num)
List<Lookup.LookupResult> | WFSTCompletionLookup.lookup(CharSequence key, boolean onlyMorePopular, int num)
List<Lookup.LookupResult> | FSTLookup.lookup(CharSequence key, boolean onlyMorePopular, int num) Deprecated. Lookup autocomplete suggestions to key.

Uses of Lookup.LookupResult in org.apache.lucene.search.suggest.jaspell

Methods in org.apache.lucene.search.suggest.jaspell that return types with arguments of type Lookup.LookupResult
 List<Lookup.LookupResult> JaspellLookup.lookup(CharSequence key, boolean onlyMorePopular, int num)

Uses of Lookup.LookupResult in org.apache.lucene.search.suggest.tst

Methods in org.apache.lucene.search.suggest.tst that return types with arguments of type Lookup.LookupResult
 List<Lookup.LookupResult> TSTLookup.lookup(CharSequence key, boolean onlyMorePopular, int num)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.SortedTermFreqIteratorWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.SortedTermFreqIteratorWrapper

No usage of org.apache.lucene.search.suggest.SortedTermFreqIteratorWrapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.UnsortedTermFreqIteratorWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.UnsortedTermFreqIteratorWrapper

No usage of org.apache.lucene.search.suggest.UnsortedTermFreqIteratorWrapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


BytesRefSorter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.fst
Interface BytesRefSorter

All Known Implementing Classes:
ExternalRefSorter, InMemorySorter
public interface BytesRefSorter

Collects BytesRef and then allows one to iterate over their sorted order. Implementations of this interface will be called in a single-threaded scenario.

WARNING: This API is experimental and might change in incompatible ways in the next release.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Method Summary
void | add(BytesRef utf8) Adds a single suggestion entry (possibly compound with its bucket).
Comparator<BytesRef> | getComparator()
BytesRefIterator | iterator() Sorts the entries added in add(BytesRef) and returns an iterator over all sorted entries.

Method Detail

add

void add(BytesRef utf8)
         throws IOException,
                IllegalStateException
Adds a single suggestion entry (possibly compound with its bucket).

Throws:
IOException - If an I/O exception occurs.
IllegalStateException - If an addition attempt is performed after a call to iterator() has been made.

iterator

BytesRefIterator iterator()
                          throws IOException
Sorts the entries added in add(BytesRef) and returns an iterator over all sorted entries.

Throws:
IOException - If an I/O exception occurs.

getComparator

Comparator<BytesRef> getComparator()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ExternalRefSorter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.fst
Class ExternalRefSorter

java.lang.Object
    extended by  org.apache.lucene.search.suggest.fst.ExternalRefSorter
All Implemented Interfaces:
Closeable, BytesRefSorter
public class ExternalRefSorter
extends Object
implements BytesRefSorter, Closeable

Builds and iterates over sequences stored on disk.

WARNING: This API is experimental and might change in incompatible ways in the next release.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
ExternalRefSorter(Sort sort)
Will buffer all sequences to a temporary file and then sort (all on-disk).
Method Summary
 void add(BytesRef utf8)
Adds a single suggestion entry (possibly compound with its bucket).
 void close()
Removes any written temporary files.
 Comparator<BytesRef> getComparator()
 BytesRefIterator iterator()
Sorts the entries added in BytesRefSorter.add(BytesRef) and returns an iterator over all sorted entries.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ExternalRefSorter

public ExternalRefSorter(Sort sort)
                  throws IOException
Will buffer all sequences to a temporary file and then sort (all on-disk).

Throws:
IOException
Method Detail

add

public void add(BytesRef utf8)
         throws IOException
Description copied from interface: BytesRefSorter
Adds a single suggestion entry (possibly compound with its bucket).

Specified by:
add in interface BytesRefSorter
Throws:
IOException - If an I/O exception occurs.

iterator

public BytesRefIterator iterator()
                          throws IOException
Description copied from interface: BytesRefSorter
Sorts the entries added in BytesRefSorter.add(BytesRef) and returns an iterator over all sorted entries.

Specified by:
iterator in interface BytesRefSorter
Throws:
IOException - If an I/O exception occurs.

close

public void close()
           throws IOException
Removes any written temporary files.

Specified by:
close in interface Closeable
Throws:
IOException

getComparator

public Comparator<BytesRef> getComparator()
Specified by:
getComparator in interface BytesRefSorter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FSTCompletion.Completion

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.fst
Class FSTCompletion.Completion

java.lang.Object
    extended by  org.apache.lucene.search.suggest.fst.FSTCompletion.Completion
All Implemented Interfaces:
Comparable<FSTCompletion.Completion>
Enclosing class:
FSTCompletion
public static final class FSTCompletion.Completion
extends Object
implements Comparable<FSTCompletion.Completion>

A single completion for a given key.

Field Summary
int | bucket
BytesRef | utf8
Method Summary
int | compareTo(FSTCompletion.Completion o)
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

utf8

public final BytesRef utf8

bucket

public final int bucket
Method Detail

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(FSTCompletion.Completion o)
Specified by:
compareTo in interface Comparable<FSTCompletion.Completion>
See Also:
BytesRef.compareTo(BytesRef)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FSTCompletion

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.fst
Class FSTCompletion

java.lang.Object
    extended by  org.apache.lucene.search.suggest.fst.FSTCompletion

public class FSTCompletion
extends Object

Finite state automata based implementation of "autocomplete" functionality.

See Also:
FSTCompletionBuilder
WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class FSTCompletion.Completion
A single completion for a given key.
Field Summary
static int DEFAULT_BUCKETS
Default number of buckets.
Constructor Summary
FSTCompletion(FST<Object> automaton)
Defaults to higher weights first and exact first.
FSTCompletion(FST<Object> automaton, boolean higherWeightsFirst, boolean exactFirst)
Method Summary
int | getBucket(CharSequence key) Returns the bucket assigned to a given key (if found) or -1 if no exact match exists.
int | getBucketCount() Returns the bucket count (discretization thresholds).
FST<Object> | getFST() Returns the internal automaton.
List<FSTCompletion.Completion> | lookup(CharSequence key, int num) Lookup suggestions to key.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_BUCKETS

public static final int DEFAULT_BUCKETS
Default number of buckets.

See Also:
Constant Field Values
Constructor Detail

FSTCompletion

public FSTCompletion(FST<Object> automaton,
                     boolean higherWeightsFirst,
                     boolean exactFirst)
Parameters:
automaton - Automaton with completions. See FSTCompletionBuilder.
higherWeightsFirst - Return most popular suggestions first. This is the default behavior for this implementation. Setting it to false has no effect (use constant term weights to sort alphabetically only).
exactFirst - Find and push an exact match to the first position of the result list if found.

FSTCompletion

public FSTCompletion(FST<Object> automaton)
Defaults to higher weights first and exact first.

See Also:
FSTCompletion(FST, boolean, boolean)
Method Detail

lookup

public List<FSTCompletion.Completion> lookup(CharSequence key,
                                             int num)
Lookup suggestions to key.

Parameters:
key - The prefix to which suggestions should be sought.
num - At most this number of suggestions will be returned.
Returns:
Returns the suggestions, sorted by their approximated weight first (decreasing) and then alphabetically (UTF-8 codepoint order).

getBucketCount

public int getBucketCount()
Returns the bucket count (discretization thresholds).

getBucket

public int getBucket(CharSequence key)
Returns the bucket assigned to a given key (if found) or -1 if no exact match exists.

getFST

public FST<Object> getFST()
Returns the internal automaton.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FSTCompletionBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.fst
Class FSTCompletionBuilder

java.lang.Object
    extended by  org.apache.lucene.search.suggest.fst.FSTCompletionBuilder

public class FSTCompletionBuilder
extends Object

Finite state automata based implementation of "autocomplete" functionality.

Implementation details

The construction step in Object.finalize() works as follows:

  • A set of input terms and their buckets is given.
  • All terms in the input are prefixed with a synthetic pseudo-character (code) of the weight bucket the term fell into. For example a term abc with a discretized weight equal '1' would become 1abc.
  • The terms are then sorted by their raw value of UTF-8 character values (including the synthetic bucket code in front).
  • A finite state automaton (FST) is constructed from the input. The root node has arcs labeled with all possible weights. We cache all these arcs, highest-weight first.

At runtime, in FSTCompletion.lookup(CharSequence, int), the automaton is utilized as follows:

  • For each possible term weight encoded in the automaton (cached arcs from the root above), starting with the highest one, we descend along the path of the input key. If the key is not a prefix of a sequence in the automaton (path ends prematurely), we exit immediately -- no completions.
  • Otherwise, we have found an internal automaton node that ends the key. The entire subautomaton (all paths) starting from this node form the key's completions. We start the traversal of this subautomaton. Every time we reach a final state (arc), we add a single suggestion to the list of results (the weight of this suggestion is constant and equal to the root path we started from). The tricky part is that because automaton edges are sorted and we scan depth-first, we can terminate the entire procedure as soon as we collect enough suggestions the user requested.
  • In case the number of suggestions collected in the step above is still insufficient, we proceed to the next (smaller) weight leaving the root node and repeat the same algorithm again.

Runtime behavior and performance characteristic

The algorithm described above is optimized for finding suggestions to short prefixes in a top-weights-first order. This is probably the most common use case: it allows presenting suggestions early and sorts them by the global frequency (and then alphabetically).

If there is an exact match in the automaton, it is returned first on the results list (even with by-weight sorting).

Note that the maximum lookup time for any prefix is the time of descending to the subtree, plus traversal of the subtree up to the number of requested suggestions (because they are already presorted by weight on the root level and alphabetically at any node level).

To order alphabetically only (no ordering by priorities), use identical term weights for all terms. Alphabetical suggestions are returned even if non-constant weights are used, but the algorithm for doing this is suboptimal.

"alphabetically" in any of the documentation above indicates UTF-8 representation order, nothing else.

NOTE: the FST file format is experimental and subject to suddenly change, requiring you to rebuild the FST suggest index.

See Also:
FSTCompletion
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static int DEFAULT_BUCKETS
Default number of buckets.
Constructor Summary
FSTCompletionBuilder()
Creates an FSTCompletion with default options: 10 buckets, exact match promoted to first position and InMemorySorter with a comparator obtained from BytesRef.getUTF8SortedAsUnicodeComparator().
FSTCompletionBuilder(int buckets, BytesRefSorter sorter, int shareMaxTailLength)
Method Summary
void | add(BytesRef utf8, int bucket) Appends a single suggestion and its weight to the internal buffers.
FSTCompletion | build() Builds the final automaton from a list of added entries.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_BUCKETS

public static final int DEFAULT_BUCKETS
Default number of buckets.

See Also:
Constant Field Values
Constructor Detail

FSTCompletionBuilder

public FSTCompletionBuilder()
Creates an FSTCompletion with default options: 10 buckets, exact match promoted to first position and InMemorySorter with a comparator obtained from BytesRef.getUTF8SortedAsUnicodeComparator().

FSTCompletionBuilder

public FSTCompletionBuilder(int buckets,
                            BytesRefSorter sorter,
                            int shareMaxTailLength)
Parameters:
buckets - The number of buckets for weight discretization. Buckets are used in add(BytesRef, int) and must be smaller than the number given here.
sorter - BytesRefSorter used for re-sorting input for the automaton. For large inputs, use on-disk sorting implementations. The sorter is closed automatically in build() if it implements Closeable.
shareMaxTailLength - Max shared suffix sharing length. See the description of this parameter in Builder's constructor. In general, for very large inputs you'll want to construct a non-minimal automaton which will be larger, but the construction will take far less ram. For minimal automata, set it to Integer.MAX_VALUE.
Method Detail

add

public void add(BytesRef utf8,
                int bucket)
         throws IOException
Appends a single suggestion and its weight to the internal buffers.

Parameters:
utf8 - The suggestion (utf8 representation) to be added. The content is copied and the object can be reused.
bucket - The bucket to place this suggestion in. Must be non-negative and smaller than the number of buckets passed in the constructor. Higher numbers indicate suggestions that should be presented before suggestions placed in smaller buckets.
Throws:
IOException

build

public FSTCompletion build()
                    throws IOException
Builds the final automaton from a list of added entries. This method may take a longer while as it needs to build the automaton.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FSTCompletionLookup

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.fst
Class FSTCompletionLookup

java.lang.Object
    extended by  org.apache.lucene.search.suggest.Lookup
        extended by  org.apache.lucene.search.suggest.fst.FSTCompletionLookup

public class FSTCompletionLookup
extends Lookup

An adapter from Lookup API to FSTCompletion.

This adapter differs from FSTCompletion in that it attempts to discretize any "weights" as passed from in TermFreqIterator.weight() to match the number of buckets. For the rationale for bucketing, see FSTCompletion.

Note:Discretization requires an additional sorting pass.

The range of weights for bucketing/ discretization is determined by sorting the input by weight and then dividing into equal ranges. Then, scores within each range are assigned to that bucket.

Note that this means that even large differences in weights may be lost during automaton construction, but the overall distinction between "classes" of weights will be preserved regardless of the distribution of weights.

For fine-grained control over which weights are assigned to which buckets, use FSTCompletion directly or TSTLookup, for example.

See Also:
FSTCompletion
WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.suggest.Lookup
Lookup.LookupPriorityQueue, Lookup.LookupResult
Field Summary
Fields inherited from class org.apache.lucene.search.suggest.Lookup
CHARSEQUENCE_COMPARATOR
Constructor Summary
FSTCompletionLookup()
This constructor prepares for creating a suggested FST using the build(TermFreqIterator) method.
FSTCompletionLookup(FSTCompletion completion, boolean exactMatchFirst)
This constructor takes a pre-built automaton.
FSTCompletionLookup(int buckets, boolean exactMatchFirst)
This constructor prepares for creating a suggested FST using the build(TermFreqIterator) method.
Method Summary
void | build(TermFreqIterator tfit) Builds up a new internal Lookup representation based on the given TermFreqIterator.
Object | get(CharSequence key)
boolean | load(InputStream input) Discard current lookup data and load it from a previously saved copy.
List<Lookup.LookupResult> | lookup(CharSequence key, boolean higherWeightsFirst, int num) Look up a key and return possible completion for this key.
boolean | store(OutputStream output) Persist the constructed lookup data to a directory.
Methods inherited from class org.apache.lucene.search.suggest.Lookup
build
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FSTCompletionLookup

public FSTCompletionLookup()
This constructor prepares for creating a suggested FST using the build(TermFreqIterator) method. The number of weight discretization buckets is set to FSTCompletion.DEFAULT_BUCKETS and exact matches are promoted to the top of the suggestions list.

FSTCompletionLookup

public FSTCompletionLookup(int buckets,
                           boolean exactMatchFirst)
This constructor prepares for creating a suggested FST using the build(TermFreqIterator) method.

Parameters:
buckets - The number of weight discretization buckets (see FSTCompletion for details).
exactMatchFirst - If true exact matches are promoted to the top of the suggestions list. Otherwise they appear in the order of discretized weight and alphabetical within the bucket.

FSTCompletionLookup

public FSTCompletionLookup(FSTCompletion completion,
                           boolean exactMatchFirst)
This constructor takes a pre-built automaton.

Parameters:
completion - An instance of FSTCompletion.
exactMatchFirst - If true exact matches are promoted to the top of the suggestions list. Otherwise they appear in the order of discretized weight and alphabetical within the bucket.
Method Detail

build

public void build(TermFreqIterator tfit)
           throws IOException
Builds up a new internal Lookup representation based on the given TermFreqIterator. The implementation might re-sort the data internally.

Specified by:
build in class Lookup
Throws:
IOException

lookup

public List<Lookup.LookupResult> lookup(CharSequence key,
                                        boolean higherWeightsFirst,
                                        int num)
Description copied from class: Lookup
Look up a key and return possible completion for this key.

Specified by:
lookup in class Lookup
Parameters:
key - lookup key. Depending on the implementation this may be a prefix, misspelling, or even infix.
higherWeightsFirst - return only more popular results
num - maximum number of results to return
Returns:
a list of possible completions, with their relative weight (e.g. popularity)

get

public Object get(CharSequence key)

store

public boolean store(OutputStream output)
              throws IOException
Description copied from class: Lookup
Persist the constructed lookup data to a directory. Optional operation.

Specified by:
store in class Lookup
Parameters:
output - OutputStream to write the data to.
Returns:
true if successful, false if unsuccessful or not supported.
Throws:
IOException - when fatal IO error occurs.

load

public boolean load(InputStream input)
             throws IOException
Description copied from class: Lookup
Discard current lookup data and load it from a previously saved copy. Optional operation.

Specified by:
load in class Lookup
Parameters:
input - the InputStream to load the lookup data.
Returns:
true if completed successfully, false if unsuccessful or not supported.
Throws:
IOException - when fatal IO error occurs.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FSTLookup

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.fst
Class FSTLookup

java.lang.Object
    extended by  org.apache.lucene.search.suggest.Lookup
        extended by  org.apache.lucene.search.suggest.fst.FSTLookup
Deprecated. Use FSTCompletionLookup instead.

@Deprecated
public class FSTLookup
extends Lookup

Finite state automata based implementation of Lookup query suggestion/ autocomplete interface.

Implementation details

The construction step in build(TermFreqIterator) works as follows:

  • A set of input terms (String) and weights (float) is given.
  • The range of weights is determined and then all weights are discretized into a fixed set of values (buckets). Note that this means that minor changes in weights may be lost during automaton construction. In general, this is not a big problem because the "priorities" of completions can be split into a fixed set of classes (even as rough as: very frequent, frequent, baseline, marginal). If you need exact, fine-grained weights, use TSTLookup instead.
  • All terms in the input are preprended with a synthetic pseudo-character being the weight of that term. For example a term abc with a discretized weight equal '1' would become 1abc.
  • The terms are sorted by their raw value of utf16 character values (including the synthetic term in front).
  • A finite state automaton (FST) is constructed from the input. The root node has arcs labeled with all possible weights. We cache all these arcs, highest-weight first.

At runtime, in lookup(CharSequence, boolean, int), the automaton is utilized as follows:

  • For each possible term weight encoded in the automaton (cached arcs from the root above), starting with the highest one, we descend along the path of the input key. If the key is not a prefix of a sequence in the automaton (path ends prematurely), we exit immediately. No completions.
  • Otherwise, we have found an internal automaton node that ends the key. The entire subautomaton (all paths) starting from this node form the key's completions. We start the traversal of this subautomaton. Every time we reach a final state (arc), we add a single suggestion to the list of results (the weight of this suggestion is constant and equal to the root path we started from). The tricky part is that because automaton edges are sorted and we scan depth-first, we can terminate the entire procedure as soon as we collect enough suggestions the user requested.
  • In case the number of suggestions collected in the step above is still insufficient, we proceed to the next (smaller) weight leaving the root node and repeat the same algorithm again.

Runtime behavior and performance characteristic

The algorithm described above is optimized for finding suggestions to short prefixes in a top-weights-first order. This is probably the most common use case: it allows presenting suggestions early and sorts them by the global frequency (and then alphabetically).

If there is an exact match in the automaton, it is returned first on the results list (even with by-weight sorting).

Note that the maximum lookup time for any prefix is the time of descending to the subtree, plus traversal of the subtree up to the number of requested suggestions (because they are already presorted by weight on the root level and alphabetically at any node level).

To order alphabetically only (no ordering by priorities), use identical term weights for all terms. Alphabetical suggestions are returned even if non-constant weights are used, but the algorithm for doing this is suboptimal.

"alphabetically" in any of the documentation above indicates utf16 codepoint order, nothing else.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.suggest.Lookup
Lookup.LookupPriorityQueue, Lookup.LookupResult
Field Summary
static String FILENAME
Deprecated. Serialized automaton file name (storage).
Fields inherited from class org.apache.lucene.search.suggest.Lookup
CHARSEQUENCE_COMPARATOR
Constructor Summary
FSTLookup()
Deprecated.
FSTLookup(int buckets, boolean exactMatchFirst)
Deprecated.
Method Summary
void | build(TermFreqIterator tfit) Deprecated. Builds up a new internal Lookup representation based on the given TermFreqIterator.
Float | get(CharSequence key) Deprecated. Get the (approximated) weight of a single key (if there is a perfect match for it in the automaton).
boolean | load(InputStream input) Deprecated. Discard current lookup data and load it from a previously saved copy.
List<Lookup.LookupResult> | lookup(CharSequence key, boolean onlyMorePopular, int num) Deprecated. Lookup autocomplete suggestions to key.
boolean | store(OutputStream output) Deprecated. Persist the constructed lookup data to a directory.
Methods inherited from class org.apache.lucene.search.suggest.Lookup
build
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

FILENAME

public static final String FILENAME
Deprecated.
Serialized automaton file name (storage).

See Also:
Constant Field Values
Constructor Detail

FSTLookup

public FSTLookup()
Deprecated.

FSTLookup

public FSTLookup(int buckets,
                 boolean exactMatchFirst)
Deprecated.
Method Detail

build

public void build(TermFreqIterator tfit)
           throws IOException
Deprecated.
Description copied from class: Lookup
Builds up a new internal Lookup representation based on the given TermFreqIterator. The implementation might re-sort the data internally.

Specified by:
build in class Lookup
Throws:
IOException

get

public Float get(CharSequence key)
Deprecated.
Get the (approximated) weight of a single key (if there is a perfect match for it in the automaton).

Returns:
Returns the approximated weight of the input key or null if not found.

lookup

public List<Lookup.LookupResult> lookup(CharSequence key,
                                        boolean onlyMorePopular,
                                        int num)
Deprecated.
Lookup autocomplete suggestions to key.

Specified by:
lookup in class Lookup
Parameters:
key - The prefix to which suggestions should be sought.
onlyMorePopular - Return most popular suggestions first. This is the default behavior for this implementation. Setting it to false has no effect (use constant term weights to sort alphabetically only).
num - At most this number of suggestions will be returned.
Returns:
Returns the suggestions, sorted by their approximated weight first (decreasing) and then alphabetically (utf16 codepoint order).

store

public boolean store(OutputStream output)
              throws IOException
Deprecated.
Description copied from class: Lookup
Persist the constructed lookup data to a directory. Optional operation.

Specified by:
store in class Lookup
Parameters:
output - OutputStream to write the data to.
Returns:
true if successful, false if unsuccessful or not supported.
Throws:
IOException - when fatal IO error occurs.

load

public boolean load(InputStream input)
             throws IOException
Deprecated.
Description copied from class: Lookup
Discard current lookup data and load it from a previously saved copy. Optional operation.

Specified by:
load in class Lookup
Parameters:
input - the InputStream to load the lookup data.
Returns:
true if completed successfully, false if unsuccessful or not supported.
Throws:
IOException - when fatal IO error occurs.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InMemorySorter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.fst
Class InMemorySorter

java.lang.Object
    extended by  org.apache.lucene.search.suggest.fst.InMemorySorter
All Implemented Interfaces:
BytesRefSorter
public final class InMemorySorter
extends Object
implements BytesRefSorter

An BytesRefSorter that keeps all the entries in memory.

WARNING: This API is experimental and might change in incompatible ways in the next release.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
InMemorySorter(Comparator<BytesRef> comparator)
Method Summary
 void add(BytesRef utf8)
Adds a single suggestion entry (possibly compound with its bucket).
 Comparator<BytesRef> getComparator()
 BytesRefIterator iterator()
Sorts the entries added in BytesRefSorter.add(BytesRef) and returns an iterator over all sorted entries.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InMemorySorter

public InMemorySorter(Comparator<BytesRef> comparator)
Method Detail

add

public void add(BytesRef utf8)
Description copied from interface: BytesRefSorter
Adds a single suggestion entry (possibly compound with its bucket).

Specified by:
add in interface BytesRefSorter

iterator

public BytesRefIterator iterator()
Description copied from interface: BytesRefSorter
Sorts the entries added in BytesRefSorter.add(BytesRef) and returns an iterator over all sorted entries.

Specified by:
iterator in interface BytesRefSorter

getComparator

public Comparator<BytesRef> getComparator()
Specified by:
getComparator in interface BytesRefSorter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.search.suggest.fst
Interfaces
BytesRefSorter
Classes
ExternalRefSorter
FSTCompletion
FSTCompletion.Completion
FSTCompletionBuilder
FSTCompletionLookup
FSTLookup
InMemorySorter
Sort
Sort.BufferSize
Sort.ByteSequencesReader
Sort.ByteSequencesWriter
WFSTCompletionLookup


org.apache.lucene.search.suggest.fst

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.search.suggest.fst

Finite-state based autosuggest.

See:
Description

Interface Summary
BytesRefSorter Collects BytesRef and then allows one to iterate over their sorted order.

Class Summary
ExternalRefSorter | Builds and iterates over sequences stored on disk.
FSTCompletion | Finite state automata based implementation of "autocomplete" functionality.
FSTCompletion.Completion | A single completion for a given key.
FSTCompletionBuilder | Finite state automata based implementation of "autocomplete" functionality.
FSTCompletionLookup | An adapter from Lookup API to FSTCompletion.
FSTLookup | Deprecated. Use FSTCompletionLookup instead.
InMemorySorter | An BytesRefSorter that keeps all the entries in memory.
Sort | On-disk sorting of byte arrays.
Sort.BufferSize | A bit more descriptive unit for constructors.
Sort.ByteSequencesReader | Utility class to read length-prefixed byte[] entries from an input.
Sort.ByteSequencesWriter | Utility class to emit length-prefixed byte[] entries to an output stream for sorting.
WFSTCompletionLookup | Suggester based on a weighted FST: it first traverses the prefix, then walks the n shortest paths to retrieve top-ranked suggestions.

Package org.apache.lucene.search.suggest.fst Description

Finite-state based autosuggest.


org.apache.lucene.search.suggest.fst Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.search.suggest.fst

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.search.suggest.fst.ExternalRefSorter (implements org.apache.lucene.search.suggest.fst.BytesRefSorter, java.io.Closeable)
    • org.apache.lucene.search.suggest.fst.FSTCompletion
    • org.apache.lucene.search.suggest.fst.FSTCompletion.Completion (implements java.lang.Comparable<T>)
    • org.apache.lucene.search.suggest.fst.FSTCompletionBuilder
    • org.apache.lucene.search.suggest.fst.InMemorySorter (implements org.apache.lucene.search.suggest.fst.BytesRefSorter)
    • org.apache.lucene.search.suggest.Lookup
      • org.apache.lucene.search.suggest.fst.FSTCompletionLookup
      • org.apache.lucene.search.suggest.fst.FSTLookup
      • org.apache.lucene.search.suggest.fst.WFSTCompletionLookup
    • org.apache.lucene.search.suggest.fst.Sort
    • org.apache.lucene.search.suggest.fst.Sort.BufferSize
    • org.apache.lucene.search.suggest.fst.Sort.ByteSequencesReader (implements java.io.Closeable)
    • org.apache.lucene.search.suggest.fst.Sort.ByteSequencesWriter (implements java.io.Closeable)
    • org.apache.lucene.search.suggest.fst.Sort.SortInfo

Interface Hierarchy

  • org.apache.lucene.search.suggest.fst.BytesRefSorter


Uses of Package org.apache.lucene.search.suggest.fst

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.search.suggest.fst

Packages that use org.apache.lucene.search.suggest.fst
org.apache.lucene.search.suggest | Support for Autocomplete/Autosuggest
org.apache.lucene.search.suggest.fst | Finite-state based autosuggest.

Classes in org.apache.lucene.search.suggest.fst used by org.apache.lucene.search.suggest
Sort.ByteSequencesWriter
Utility class to emit length-prefixed byte[] entries to an output stream for sorting.

Classes in org.apache.lucene.search.suggest.fst used by org.apache.lucene.search.suggest.fst
BytesRefSorter
Collects BytesRef and then allows one to iterate over their sorted order.
FSTCompletion
Finite state automata based implementation of "autocomplete" functionality.
FSTCompletion.Completion
A single completion for a given key.
Sort
On-disk sorting of byte arrays.
Sort.BufferSize
A bit more descriptive unit for constructors.
Sort.SortInfo
Sort info (debugging mostly).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Sort.BufferSize

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.fst
Class Sort.BufferSize

java.lang.Object
    extended by  org.apache.lucene.search.suggest.fst.Sort.BufferSize
Enclosing class:
Sort
public static final class Sort.BufferSize
extends Object

A bit more descriptive unit for constructors.

See Also:
automatic(), megabytes(long)

Method Summary
static Sort.BufferSize | automatic() Approximately half of the currently available free heap, but no less than Sort.ABSOLUTE_MIN_SORT_BUFFER_SIZE.
static Sort.BufferSize | megabytes(long mb) Creates a Sort.BufferSize in MB.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

megabytes

public static Sort.BufferSize megabytes(long mb)
Creates a Sort.BufferSize in MB. The given values must be $gt; 0 and < 2048.

automatic

public static Sort.BufferSize automatic()
Approximately half of the currently available free heap, but no less than Sort.ABSOLUTE_MIN_SORT_BUFFER_SIZE. However if current heap allocation is insufficient or if there is a large portion of unallocated heap-space available for sorting consult with max allowed heap size.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Sort.ByteSequencesReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.fst
Class Sort.ByteSequencesReader

java.lang.Object
    extended by  org.apache.lucene.search.suggest.fst.Sort.ByteSequencesReader
All Implemented Interfaces:
Closeable
Enclosing class:
Sort
public static class Sort.ByteSequencesReader
extends Object
implements Closeable

Utility class to read length-prefixed byte[] entries from an input. Complementary to Sort.ByteSequencesWriter.

Constructor Summary
Sort.ByteSequencesReader(DataInput is)
Sort.ByteSequencesReader(File file)
Method Summary
void | close() Closes the provided DataInput if it is Closeable.
byte[] | read() Reads the next entry and returns it if successful.
boolean | read(BytesRef ref) Reads the next entry into the provided BytesRef.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Sort.ByteSequencesReader

public Sort.ByteSequencesReader(File file)
                         throws IOException
Throws:
IOException

Sort.ByteSequencesReader

public Sort.ByteSequencesReader(DataInput is)
Method Detail

read

public boolean read(BytesRef ref)
             throws IOException
Reads the next entry into the provided BytesRef. The internal storage is resized if needed.

Returns:
Returns false if EOF occurred when trying to read the header of the next sequence. Returns true otherwise.
Throws:
EOFException - if the file ends before the full sequence is read.
IOException

read

public byte[] read()
            throws IOException
Reads the next entry and returns it if successful.

Returns:
Returns null if EOF occurred before the next entry could be read.
Throws:
EOFException - if the file ends before the full sequence is read.
IOException
See Also:
read(BytesRef)

close

public void close()
           throws IOException
Closes the provided DataInput if it is Closeable.

Specified by:
close in interface Closeable
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Sort.ByteSequencesWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.fst
Class Sort.ByteSequencesWriter

java.lang.Object
    extended by  org.apache.lucene.search.suggest.fst.Sort.ByteSequencesWriter
All Implemented Interfaces:
Closeable
Enclosing class:
Sort
public static class Sort.ByteSequencesWriter
extends Object
implements Closeable

Utility class to emit length-prefixed byte[] entries to an output stream for sorting. Complementary to Sort.ByteSequencesReader.

Constructor Summary
Sort.ByteSequencesWriter(DataOutput os)
Sort.ByteSequencesWriter(File file)
Method Summary
void | close() Closes the provided DataOutput if it is Closeable.
void | write(byte[] bytes)
void | write(byte[] bytes, int off, int len)
void | write(BytesRef ref)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Sort.ByteSequencesWriter

public Sort.ByteSequencesWriter(File file)
                         throws IOException
Throws:
IOException

Sort.ByteSequencesWriter

public Sort.ByteSequencesWriter(DataOutput os)
Method Detail

write

public void write(BytesRef ref)
           throws IOException
Throws:
IOException

write

public void write(byte[] bytes)
           throws IOException
Throws:
IOException

write

public void write(byte[] bytes,
                  int off,
                  int len)
           throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Closes the provided DataOutput if it is Closeable.

Specified by:
close in interface Closeable
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Sort

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.fst
Class Sort

java.lang.Object
    extended by  org.apache.lucene.search.suggest.fst.Sort

public final class Sort
extends Object

On-disk sorting of byte arrays. Each byte array (entry) is a composed of the following fields:

  • (two bytes) length of the following byte array,
  • exactly the above count of bytes for the sequence to be sorted.

See Also:
sort(File, File)
WARNING: This API is experimental and might change in incompatible ways in the next release.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
static class | Sort.BufferSize A bit more descriptive unit for constructors.
static class | Sort.ByteSequencesReader Utility class to read length-prefixed byte[] entries from an input.
static class | Sort.ByteSequencesWriter Utility class to emit length-prefixed byte[] entries to an output stream for sorting.
class | Sort.SortInfo Sort info (debugging mostly).
Field Summary
static long | ABSOLUTE_MIN_SORT_BUFFER_SIZE Absolute minimum required buffer size for sorting.
static Comparator<BytesRef> | DEFAULT_COMPARATOR
static long | GB
static int | MAX_TEMPFILES Maximum number of temporary files before doing an intermediate merge.
static long | MB
static long | MIN_BUFFER_SIZE_MB Minimum recommended buffer size for sorting.
Constructor Summary
Sort()
Defaults constructor.
Sort(Comparator<BytesRef> comparator)
Sort(Comparator<BytesRef> comparator, Sort.BufferSize ramBufferSize, File tempDirectory, int maxTempfiles)
All-details constructor.
Method Summary
static File | defaultTempDir() Returns the default temporary directory.
Comparator<BytesRef> | getComparator()
Sort.SortInfo | sort(File input, File output) Sort input to output, explicit hint for the buffer size.
protected File | sortPartition(int len) Sort a single partition in-memory.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

MB

public static final long MB
See Also:
Constant Field Values

GB

public static final long GB
See Also:
Constant Field Values

MIN_BUFFER_SIZE_MB

public static final long MIN_BUFFER_SIZE_MB
Minimum recommended buffer size for sorting.

See Also:
Constant Field Values

ABSOLUTE_MIN_SORT_BUFFER_SIZE

public static final long ABSOLUTE_MIN_SORT_BUFFER_SIZE
Absolute minimum required buffer size for sorting.

See Also:
Constant Field Values

MAX_TEMPFILES

public static final int MAX_TEMPFILES
Maximum number of temporary files before doing an intermediate merge.

See Also:
Constant Field Values

DEFAULT_COMPARATOR

public static final Comparator<BytesRef> DEFAULT_COMPARATOR
Constructor Detail

Sort

public Sort()
     throws IOException
Defaults constructor.

Throws:
IOException
See Also:
defaultTempDir(), Sort.BufferSize.automatic()

Sort

public Sort(Comparator<BytesRef> comparator)
     throws IOException
Throws:
IOException

Sort

public Sort(Comparator<BytesRef> comparator,
            Sort.BufferSize ramBufferSize,
            File tempDirectory,
            int maxTempfiles)
All-details constructor.

Method Detail

sort

public Sort.SortInfo sort(File input,
                          File output)
                   throws IOException
Sort input to output, explicit hint for the buffer size. The amount of allocated memory may deviate from the hint (may be smaller or larger).

Throws:
IOException

defaultTempDir

public static File defaultTempDir()
                           throws IOException
Returns the default temporary directory. By default, java.io.tmpdir. If not accessible or not available, an IOException is thrown

Throws:
IOException

sortPartition

protected File sortPartition(int len)
                      throws IOException
Sort a single partition in-memory.

Throws:
IOException

getComparator

public Comparator<BytesRef> getComparator()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Sort.SortInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.fst
Class Sort.SortInfo

java.lang.Object
    extended by  org.apache.lucene.search.suggest.fst.Sort.SortInfo
Enclosing class:
Sort
public class Sort.SortInfo
extends Object

Sort info (debugging mostly).

Field Summary
long | bufferSize
int | lines
int | mergeRounds
long | mergeTime
long | readTime
long | sortTime
int | tempMergeFiles
long | totalTime
Constructor Summary
Sort.SortInfo()
Method Summary
 String toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

tempMergeFiles

public int tempMergeFiles

mergeRounds

public int mergeRounds

lines

public int lines

mergeTime

public long mergeTime

sortTime

public long sortTime

totalTime

public long totalTime

readTime

public long readTime

bufferSize

public final long bufferSize
Constructor Detail

Sort.SortInfo

public Sort.SortInfo()
Method Detail

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WFSTCompletionLookup

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.fst
Class WFSTCompletionLookup

java.lang.Object
    extended by  org.apache.lucene.search.suggest.Lookup
        extended by  org.apache.lucene.search.suggest.fst.WFSTCompletionLookup

public class WFSTCompletionLookup
extends Lookup

Suggester based on a weighted FST: it first traverses the prefix, then walks the n shortest paths to retrieve top-ranked suggestions.

NOTE: Although the TermFreqIterator API specifies floating point weights, input weights should be whole numbers. Input weights will be cast to a java integer, and any negative, infinite, or NaN values will be rejected.

See Also:
Util.shortestPaths(FST, FST.Arc, Comparator, int)
WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.suggest.Lookup
Lookup.LookupPriorityQueue, Lookup.LookupResult
Field Summary
Fields inherited from class org.apache.lucene.search.suggest.Lookup
CHARSEQUENCE_COMPARATOR
Constructor Summary
WFSTCompletionLookup()
Calls WFSTCompletionLookup(true)
WFSTCompletionLookup(boolean exactFirst)
Creates a new suggester.
Method Summary
void | build(TermFreqIterator iterator) Builds up a new internal Lookup representation based on the given TermFreqIterator.
Object | get(CharSequence key) Returns the weight associated with an input string, or null if it does not exist.
boolean | load(InputStream input) Discard current lookup data and load it from a previously saved copy.
List<Lookup.LookupResult> | lookup(CharSequence key, boolean onlyMorePopular, int num) Look up a key and return possible completion for this key.
boolean | store(OutputStream output) Persist the constructed lookup data to a directory.
Methods inherited from class org.apache.lucene.search.suggest.Lookup
build
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WFSTCompletionLookup

public WFSTCompletionLookup()
Calls WFSTCompletionLookup(true)

WFSTCompletionLookup

public WFSTCompletionLookup(boolean exactFirst)
Creates a new suggester.

Parameters:
exactFirst - true if suggestions that match the prefix exactly should always be returned first, regardless of score. This has no performance impact, but could result in low-quality suggestions.
Method Detail

build

public void build(TermFreqIterator iterator)
           throws IOException
Description copied from class: Lookup
Builds up a new internal Lookup representation based on the given TermFreqIterator. The implementation might re-sort the data internally.

Specified by:
build in class Lookup
Throws:
IOException

store

public boolean store(OutputStream output)
              throws IOException
Description copied from class: Lookup
Persist the constructed lookup data to a directory. Optional operation.

Specified by:
store in class Lookup
Parameters:
output - OutputStream to write the data to.
Returns:
true if successful, false if unsuccessful or not supported.
Throws:
IOException - when fatal IO error occurs.

load

public boolean load(InputStream input)
             throws IOException
Description copied from class: Lookup
Discard current lookup data and load it from a previously saved copy. Optional operation.

Specified by:
load in class Lookup
Parameters:
input - the InputStream to load the lookup data.
Returns:
true if completed successfully, false if unsuccessful or not supported.
Throws:
IOException - when fatal IO error occurs.

lookup

public List<Lookup.LookupResult> lookup(CharSequence key,
                                        boolean onlyMorePopular,
                                        int num)
Description copied from class: Lookup
Look up a key and return possible completion for this key.

Specified by:
lookup in class Lookup
Parameters:
key - lookup key. Depending on the implementation this may be a prefix, misspelling, or even infix.
onlyMorePopular - return only more popular results
num - maximum number of results to return
Returns:
a list of possible completions, with their relative weight (e.g. popularity)

get

public Object get(CharSequence key)
Returns the weight associated with an input string, or null if it does not exist.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Interface org.apache.lucene.search.suggest.fst.BytesRefSorter

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.suggest.fst.BytesRefSorter

Packages that use BytesRefSorter
org.apache.lucene.search.suggest.fst Finite-state based autosuggest.

Uses of BytesRefSorter in org.apache.lucene.search.suggest.fst

Classes in org.apache.lucene.search.suggest.fst that implement BytesRefSorter
class | ExternalRefSorter Builds and iterates over sequences stored on disk.
class | InMemorySorter An BytesRefSorter that keeps all the entries in memory.

Constructors in org.apache.lucene.search.suggest.fst with parameters of type BytesRefSorter
FSTCompletionBuilder(int buckets, BytesRefSorter sorter, int shareMaxTailLength)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.fst.ExternalRefSorter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.fst.ExternalRefSorter

No usage of org.apache.lucene.search.suggest.fst.ExternalRefSorter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.fst.FSTCompletion.Completion

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.fst.FSTCompletion.Completion

Packages that use FSTCompletion.Completion
org.apache.lucene.search.suggest.fst Finite-state based autosuggest.

Uses of FSTCompletion.Completion in org.apache.lucene.search.suggest.fst

Methods in org.apache.lucene.search.suggest.fst that return types with arguments of type FSTCompletion.Completion
 List<FSTCompletion.Completion> FSTCompletion.lookup(CharSequence key, int num)
Lookup suggestions to key.

Methods in org.apache.lucene.search.suggest.fst with parameters of type FSTCompletion.Completion
 int FSTCompletion.Completion.compareTo(FSTCompletion.Completion o)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.fst.FSTCompletion

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.fst.FSTCompletion

Packages that use FSTCompletion
org.apache.lucene.search.suggest.fst Finite-state based autosuggest.

Uses of FSTCompletion in org.apache.lucene.search.suggest.fst

Methods in org.apache.lucene.search.suggest.fst that return FSTCompletion
 FSTCompletion FSTCompletionBuilder.build()
Builds the final automaton from a list of added entries.

Constructors in org.apache.lucene.search.suggest.fst with parameters of type FSTCompletion
FSTCompletionLookup(FSTCompletion completion, boolean exactMatchFirst)
This constructor takes a pre-built automaton.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.fst.FSTCompletionBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.fst.FSTCompletionBuilder

No usage of org.apache.lucene.search.suggest.fst.FSTCompletionBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.fst.FSTCompletionLookup

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.fst.FSTCompletionLookup

No usage of org.apache.lucene.search.suggest.fst.FSTCompletionLookup

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.fst.FSTLookup

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.fst.FSTLookup

No usage of org.apache.lucene.search.suggest.fst.FSTLookup

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.fst.InMemorySorter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.fst.InMemorySorter

No usage of org.apache.lucene.search.suggest.fst.InMemorySorter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.fst.Sort.BufferSize

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.fst.Sort.BufferSize

Packages that use Sort.BufferSize
org.apache.lucene.search.suggest.fst Finite-state based autosuggest.

Uses of Sort.BufferSize in org.apache.lucene.search.suggest.fst

Methods in org.apache.lucene.search.suggest.fst that return Sort.BufferSize
static Sort.BufferSize | Sort.BufferSize.automatic() Approximately half of the currently available free heap, but no less than Sort.ABSOLUTE_MIN_SORT_BUFFER_SIZE.
static Sort.BufferSize | Sort.BufferSize.megabytes(long mb) Creates a Sort.BufferSize in MB.

Constructors in org.apache.lucene.search.suggest.fst with parameters of type Sort.BufferSize
Sort(Comparator<BytesRef> comparator, Sort.BufferSize ramBufferSize, File tempDirectory, int maxTempfiles)
All-details constructor.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.fst.Sort.ByteSequencesReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.fst.Sort.ByteSequencesReader

No usage of org.apache.lucene.search.suggest.fst.Sort.ByteSequencesReader

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.fst.Sort.ByteSequencesWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.fst.Sort.ByteSequencesWriter

Packages that use Sort.ByteSequencesWriter
org.apache.lucene.search.suggest Support for Autocomplete/Autosuggest

Uses of Sort.ByteSequencesWriter in org.apache.lucene.search.suggest

Methods in org.apache.lucene.search.suggest with parameters of type Sort.ByteSequencesWriter
protected  void SortedTermFreqIteratorWrapper.encode(Sort.ByteSequencesWriter writer, ByteArrayDataOutput output, byte[] buffer, BytesRef spare, long weight)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.fst.Sort

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.fst.Sort

Packages that use Sort
org.apache.lucene.search.suggest.fst Finite-state based autosuggest.

Uses of Sort in org.apache.lucene.search.suggest.fst

Constructors in org.apache.lucene.search.suggest.fst with parameters of type Sort
ExternalRefSorter(Sort sort)
Will buffer all sequences to a temporary file and then sort (all on-disk).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.fst.Sort.SortInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.fst.Sort.SortInfo

Packages that use Sort.SortInfo
org.apache.lucene.search.suggest.fst Finite-state based autosuggest.

Uses of Sort.SortInfo in org.apache.lucene.search.suggest.fst

Methods in org.apache.lucene.search.suggest.fst that return Sort.SortInfo
 Sort.SortInfo Sort.sort(File input, File output)
Sort input to output, explicit hint for the buffer size.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.fst.WFSTCompletionLookup

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.fst.WFSTCompletionLookup

No usage of org.apache.lucene.search.suggest.fst.WFSTCompletionLookup

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


JaspellLookup

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.jaspell
Class JaspellLookup

java.lang.Object
    extended by  org.apache.lucene.search.suggest.Lookup
        extended by  org.apache.lucene.search.suggest.jaspell.JaspellLookup

public class JaspellLookup
extends Lookup

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.suggest.Lookup
Lookup.LookupPriorityQueue, Lookup.LookupResult
Field Summary
Fields inherited from class org.apache.lucene.search.suggest.Lookup
CHARSEQUENCE_COMPARATOR
Constructor Summary
JaspellLookup()
Method Summary
boolean | add(CharSequence key, Object value)
void | build(TermFreqIterator tfit) Builds up a new internal Lookup representation based on the given TermFreqIterator.
Object | get(CharSequence key)
boolean | load(InputStream input) Discard current lookup data and load it from a previously saved copy.
List<Lookup.LookupResult> | lookup(CharSequence key, boolean onlyMorePopular, int num) Look up a key and return possible completion for this key.
boolean | store(OutputStream output) Persist the constructed lookup data to a directory.
Methods inherited from class org.apache.lucene.search.suggest.Lookup
build
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JaspellLookup

public JaspellLookup()
Method Detail

build

public void build(TermFreqIterator tfit)
           throws IOException
Description copied from class: Lookup
Builds up a new internal Lookup representation based on the given TermFreqIterator. The implementation might re-sort the data internally.

Specified by:
build in class Lookup
Throws:
IOException

add

public boolean add(CharSequence key,
                   Object value)

get

public Object get(CharSequence key)

lookup

public List<Lookup.LookupResult> lookup(CharSequence key,
                                        boolean onlyMorePopular,
                                        int num)
Description copied from class: Lookup
Look up a key and return possible completion for this key.

Specified by:
lookup in class Lookup
Parameters:
key - lookup key. Depending on the implementation this may be a prefix, misspelling, or even infix.
onlyMorePopular - return only more popular results
num - maximum number of results to return
Returns:
a list of possible completions, with their relative weight (e.g. popularity)

store

public boolean store(OutputStream output)
              throws IOException
Description copied from class: Lookup
Persist the constructed lookup data to a directory. Optional operation.

Specified by:
store in class Lookup
Parameters:
output - OutputStream to write the data to.
Returns:
true if successful, false if unsuccessful or not supported.
Throws:
IOException - when fatal IO error occurs.

load

public boolean load(InputStream input)
             throws IOException
Description copied from class: Lookup
Discard current lookup data and load it from a previously saved copy. Optional operation.

Specified by:
load in class Lookup
Parameters:
input - the InputStream to load the lookup data.
Returns:
true if completed successfully, false if unsuccessful or not supported.
Throws:
IOException - when fatal IO error occurs.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


JaspellTernarySearchTrie

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.jaspell
Class JaspellTernarySearchTrie

java.lang.Object
    extended by  org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie

public class JaspellTernarySearchTrie
extends Object

Implementation of a Ternary Search Trie, a data structure for storing String objects that combines the compact size of a binary search tree with the speed of a digital search trie, and is therefore ideal for practical use in sorting and searching data.

This data structure is faster than hashing for many typical search problems, and supports a broader range of useful problems and operations. Ternary searches are faster than hashing and more powerful, too.

The theory of ternary search trees was described at a symposium in 1997 (see "Fast Algorithms for Sorting and Searching Strings," by J.L. Bentley and R. Sedgewick, Proceedings of the 8th Annual ACM-SIAM Symposium on Discrete Algorithms, January 1997). Algorithms in C, Third Edition, by Robert Sedgewick (Addison-Wesley, 1998) provides yet another view of ternary search trees.

Author:
Bruno Martins

Nested Class Summary
protected  class JaspellTernarySearchTrie.TSTNode
An inner class of Ternary Search Trie that represents a node in the trie.
Constructor Summary
JaspellTernarySearchTrie()
Constructs an empty Ternary Search Trie.
JaspellTernarySearchTrie(File file)
Constructs a Ternary Search Trie and loads data from a File into the Trie.
JaspellTernarySearchTrie(File file, boolean compression)
Constructs a Ternary Search Trie and loads data from a File into the Trie.
Method Summary
Object | get(CharSequence key) Retrieve the object indexed by a key.
Float | getAndIncrement(String key) Retrieve the Float indexed by key, increment it by one unit and store the new Float.
protected String | getKey(JaspellTernarySearchTrie.TSTNode node) Returns the key that indexes the node argument.
JaspellTernarySearchTrie.TSTNode | getNode(CharSequence key) Returns the node indexed by key, or null if that node doesn't exist.
protected JaspellTernarySearchTrie.TSTNode | getNode(CharSequence key, JaspellTernarySearchTrie.TSTNode startNode) Returns the node indexed by key, or null if that node doesn't exist.
protected JaspellTernarySearchTrie.TSTNode | getOrCreateNode(CharSequence key) Returns the node indexed by key, creating that node if it doesn't exist, and creating any required intermediate nodes if they don't exist.
List<String> | matchAlmost(CharSequence key, int numReturnValues) Returns a List of keys that almost match the argument key.
List<String> | matchAlmost(String key) Returns a List of keys that almost match the argument key.
List<String> | matchPrefix(CharSequence prefix, int numReturnValues) Returns an alphabetical List of all keys in the trie that begin with a given prefix.
List<String> | matchPrefix(String prefix) Returns an alphabetical List of all keys in the trie that begin with a given prefix.
int | numDataNodes() Returns the number of nodes in the trie that have non-null data.
protected int | numDataNodes(JaspellTernarySearchTrie.TSTNode startingNode) Returns the number of nodes in the subtrie below and including the starting node.
int | numNodes() Returns the total number of nodes in the trie.
protected int | numNodes(JaspellTernarySearchTrie.TSTNode startingNode) Returns the total number of nodes in the subtrie below and including the starting Node.
void | put(CharSequence key, Object value) Stores a value in the trie.
void | remove(String key) Removes the value indexed by key.
void | setMatchAlmostDiff(int diff) Sets the number of characters by which words can differ from target word when calling the matchAlmost method.
void | setNumReturnValues(int num) Sets the default maximum number of values returned from the matchPrefix and matchAlmost methods.
protected List<String> | sortKeys(JaspellTernarySearchTrie.TSTNode startNode, int numReturnValues) Returns keys sorted in alphabetical order.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

JaspellTernarySearchTrie

public JaspellTernarySearchTrie()
Constructs an empty Ternary Search Trie.

JaspellTernarySearchTrie

public JaspellTernarySearchTrie(File file)
                         throws IOException
Constructs a Ternary Search Trie and loads data from a File into the Trie. The file is a normal text document, where each line is of the form word TAB float.

Parameters:
file - The File with the data to load into the Trie.
Throws:
IOException - A problem occured while reading the data.

JaspellTernarySearchTrie

public JaspellTernarySearchTrie(File file,
                                boolean compression)
                         throws IOException
Constructs a Ternary Search Trie and loads data from a File into the Trie. The file is a normal text document, where each line is of the form "word TAB float".

Parameters:
file - The File with the data to load into the Trie.
compression - If true, the file is compressed with the GZIP algorithm, and if false, the file is a normal text document.
Throws:
IOException - A problem occured while reading the data.
Method Detail

get

public Object get(CharSequence key)
Retrieve the object indexed by a key.

Parameters:
key - A String index.
Returns:
The object retrieved from the Ternary Search Trie.

getAndIncrement

public Float getAndIncrement(String key)
Retrieve the Float indexed by key, increment it by one unit and store the new Float.

Parameters:
key - A String index.
Returns:
The Float retrieved from the Ternary Search Trie.

getKey

protected String getKey(JaspellTernarySearchTrie.TSTNode node)
Returns the key that indexes the node argument.

Parameters:
node - The node whose index is to be calculated.
Returns:
The String that indexes the node argument.

getNode

public JaspellTernarySearchTrie.TSTNode getNode(CharSequence key)
Returns the node indexed by key, or null if that node doesn't exist. Search begins at root node.

Parameters:
key - A String that indexes the node that is returned.
Returns:
The node object indexed by key. This object is an instance of an inner class named TernarySearchTrie.TSTNode.

getNode

protected JaspellTernarySearchTrie.TSTNode getNode(CharSequence key,
                                                   JaspellTernarySearchTrie.TSTNode startNode)
Returns the node indexed by key, or null if that node doesn't exist. The search begins at root node.

Parameters:
key - A String that indexes the node that is returned.
startNode - The top node defining the subtrie to be searched.
Returns:
The node object indexed by key. This object is an instance of an inner class named TernarySearchTrie.TSTNode.

getOrCreateNode

protected JaspellTernarySearchTrie.TSTNode getOrCreateNode(CharSequence key)
                                                    throws NullPointerException,
                                                           IllegalArgumentException
Returns the node indexed by key, creating that node if it doesn't exist, and creating any required intermediate nodes if they don't exist.

Parameters:
key - A String that indexes the node that is returned.
Returns:
The node object indexed by key. This object is an instance of an inner class named TernarySearchTrie.TSTNode.
Throws:
NullPointerException - If the key is null.
IllegalArgumentException - If the key is an empty String.

matchAlmost

public List<String> matchAlmost(String key)
Returns a List of keys that almost match the argument key. Keys returned will have exactly diff characters that do not match the target key, where diff is equal to the last value passed in as an argument to the setMatchAlmostDiff method.

If the matchAlmost method is called before the setMatchAlmostDiff method has been called for the first time, then diff = 0.

Parameters:
key - The target key.
Returns:
A List with the results.

matchAlmost

public List<String> matchAlmost(CharSequence key,
                                int numReturnValues)
Returns a List of keys that almost match the argument key. Keys returned will have exactly diff characters that do not match the target key, where diff is equal to the last value passed in as an argument to the setMatchAlmostDiff method.

If the matchAlmost method is called before the setMatchAlmostDiff method has been called for the first time, then diff = 0.

Parameters:
key - The target key.
numReturnValues - The maximum number of values returned by this method.
Returns:
A List with the results

matchPrefix

public List<String> matchPrefix(String prefix)
Returns an alphabetical List of all keys in the trie that begin with a given prefix. Only keys for nodes having non-null data are included in the List.

Parameters:
prefix - Each key returned from this method will begin with the characters in prefix.
Returns:
A List with the results.

matchPrefix

public List<String> matchPrefix(CharSequence prefix,
                                int numReturnValues)
Returns an alphabetical List of all keys in the trie that begin with a given prefix. Only keys for nodes having non-null data are included in the List.

Parameters:
prefix - Each key returned from this method will begin with the characters in prefix.
numReturnValues - The maximum number of values returned from this method.
Returns:
A List with the results

numDataNodes

public int numDataNodes()
Returns the number of nodes in the trie that have non-null data.

Returns:
The number of nodes in the trie that have non-null data.

numDataNodes

protected int numDataNodes(JaspellTernarySearchTrie.TSTNode startingNode)
Returns the number of nodes in the subtrie below and including the starting node. The method counts only nodes that have non-null data.

Parameters:
startingNode - The top node of the subtrie. the node that defines the subtrie.
Returns:
The total number of nodes in the subtrie.

numNodes

public int numNodes()
Returns the total number of nodes in the trie. The method counts nodes whether or not they have data.

Returns:
The total number of nodes in the trie.

numNodes

protected int numNodes(JaspellTernarySearchTrie.TSTNode startingNode)
Returns the total number of nodes in the subtrie below and including the starting Node. The method counts nodes whether or not they have data.

Parameters:
startingNode - The top node of the subtrie. The node that defines the subtrie.
Returns:
The total number of nodes in the subtrie.

put

public void put(CharSequence key,
                Object value)
Stores a value in the trie. The value may be retrieved using the key.

Parameters:
key - A String that indexes the object to be stored.
value - The object to be stored in the Trie.

remove

public void remove(String key)
Removes the value indexed by key. Also removes all nodes that are rendered unnecessary by the removal of this data.

Parameters:
key - A string that indexes the object to be removed from the Trie.

setMatchAlmostDiff

public void setMatchAlmostDiff(int diff)
Sets the number of characters by which words can differ from target word when calling the matchAlmost method.

Arguments less than 0 will set the char difference to 0, and arguments greater than 3 will set the char difference to 3.

Parameters:
diff - The number of characters by which words can differ from target word.

setNumReturnValues

public void setNumReturnValues(int num)
Sets the default maximum number of values returned from the matchPrefix and matchAlmost methods.

The value should be set this to -1 to get an unlimited number of return values. note that the methods mentioned above provide overloaded versions that allow you to specify the maximum number of return values, in which case this value is temporarily overridden.

Parameters:
num - The number of values that will be returned when calling the methods above.

sortKeys

protected List<String> sortKeys(JaspellTernarySearchTrie.TSTNode startNode,
                                int numReturnValues)
Returns keys sorted in alphabetical order. This includes the start Node and all nodes connected to the start Node.

The number of keys returned is limited to numReturnValues. To get a list that isn't limited in size, set numReturnValues to -1.

Parameters:
startNode - The top node defining the subtrie to be searched.
numReturnValues - The maximum number of values returned from this method.
Returns:
A List with the results.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


JaspellTernarySearchTrie.TSTNode

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.jaspell
Class JaspellTernarySearchTrie.TSTNode

java.lang.Object
    extended by  org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode
Enclosing class:
JaspellTernarySearchTrie
protected final class JaspellTernarySearchTrie.TSTNode
extends Object

An inner class of Ternary Search Trie that represents a node in the trie.

Field Summary
protected Object | data The key to the node.
protected static int | EQKID Index values for accessing relatives array.
protected static int | HIKID Index values for accessing relatives array.
protected static int | LOKID Index values for accessing relatives array.
protected static int | PARENT Index values for accessing relatives array.
protected JaspellTernarySearchTrie.TSTNode[] | relatives The relative nodes.
protected char | splitchar The char used in the split.
Constructor Summary
protected JaspellTernarySearchTrie.TSTNode(char splitchar, JaspellTernarySearchTrie.TSTNode parent)
Constructor method.
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

PARENT

protected static final int PARENT
Index values for accessing relatives array.

See Also:
Constant Field Values

LOKID

protected static final int LOKID
Index values for accessing relatives array.

See Also:
Constant Field Values

EQKID

protected static final int EQKID
Index values for accessing relatives array.

See Also:
Constant Field Values

HIKID

protected static final int HIKID
Index values for accessing relatives array.

See Also:
Constant Field Values

data

protected Object data
The key to the node.

relatives

protected JaspellTernarySearchTrie.TSTNode[] relatives
The relative nodes.

splitchar

protected char splitchar
The char used in the split.

Constructor Detail

JaspellTernarySearchTrie.TSTNode

protected JaspellTernarySearchTrie.TSTNode(char splitchar,
                                           JaspellTernarySearchTrie.TSTNode parent)
Constructor method.

Parameters:
splitchar - The char used in the split.
parent - The parent node.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.search.suggest.jaspell
Classes
JaspellLookup
JaspellTernarySearchTrie


org.apache.lucene.search.suggest.jaspell

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.search.suggest.jaspell

JaSpell-based autosuggest.

See:
Description

Class Summary
JaspellLookup |
JaspellTernarySearchTrie | Implementation of a Ternary Search Trie, a data structure for storing String objects that combines the compact size of a binary search tree with the speed of a digital search trie, and is therefore ideal for practical use in sorting and searching data.

Package org.apache.lucene.search.suggest.jaspell Description

JaSpell-based autosuggest.


org.apache.lucene.search.suggest.jaspell Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.search.suggest.jaspell

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie
    • org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode
    • org.apache.lucene.search.suggest.Lookup
      • org.apache.lucene.search.suggest.jaspell.JaspellLookup


Uses of Package org.apache.lucene.search.suggest.jaspell

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.search.suggest.jaspell

Packages that use org.apache.lucene.search.suggest.jaspell
org.apache.lucene.search.suggest.jaspell JaSpell-based autosuggest.

Classes in org.apache.lucene.search.suggest.jaspell used by org.apache.lucene.search.suggest.jaspell
JaspellTernarySearchTrie.TSTNode
An inner class of Ternary Search Trie that represents a node in the trie.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.jaspell.JaspellLookup

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.jaspell.JaspellLookup

No usage of org.apache.lucene.search.suggest.jaspell.JaspellLookup

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie

No usage of org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.jaspell.JaspellTernarySearchTrie.TSTNode

Packages that use JaspellTernarySearchTrie.TSTNode
org.apache.lucene.search.suggest.jaspell JaSpell-based autosuggest.

Uses of JaspellTernarySearchTrie.TSTNode in org.apache.lucene.search.suggest.jaspell

Fields in org.apache.lucene.search.suggest.jaspell declared as JaspellTernarySearchTrie.TSTNode
protected  JaspellTernarySearchTrie.TSTNode[] JaspellTernarySearchTrie.TSTNode.relatives
The relative nodes.

Methods in org.apache.lucene.search.suggest.jaspell that return JaspellTernarySearchTrie.TSTNode
JaspellTernarySearchTrie.TSTNode | JaspellTernarySearchTrie.getNode(CharSequence key) Returns the node indexed by key, or null if that node doesn't exist.
protected JaspellTernarySearchTrie.TSTNode | JaspellTernarySearchTrie.getNode(CharSequence key, JaspellTernarySearchTrie.TSTNode startNode) Returns the node indexed by key, or null if that node doesn't exist.
protected JaspellTernarySearchTrie.TSTNode | JaspellTernarySearchTrie.getOrCreateNode(CharSequence key) Returns the node indexed by key, creating that node if it doesn't exist, and creating any required intermediate nodes if they don't exist.

Methods in org.apache.lucene.search.suggest.jaspell with parameters of type JaspellTernarySearchTrie.TSTNode
protected String | JaspellTernarySearchTrie.getKey(JaspellTernarySearchTrie.TSTNode node) Returns the key that indexes the node argument.
protected JaspellTernarySearchTrie.TSTNode | JaspellTernarySearchTrie.getNode(CharSequence key, JaspellTernarySearchTrie.TSTNode startNode) Returns the node indexed by key, or null if that node doesn't exist.
protected int | JaspellTernarySearchTrie.numDataNodes(JaspellTernarySearchTrie.TSTNode startingNode) Returns the number of nodes in the subtrie below and including the starting node.
protected int | JaspellTernarySearchTrie.numNodes(JaspellTernarySearchTrie.TSTNode startingNode) Returns the total number of nodes in the subtrie below and including the starting Node.
protected List<String> | JaspellTernarySearchTrie.sortKeys(JaspellTernarySearchTrie.TSTNode startNode, int numReturnValues) Returns keys sorted in alphabetical order.

Constructors in org.apache.lucene.search.suggest.jaspell with parameters of type JaspellTernarySearchTrie.TSTNode
JaspellTernarySearchTrie.TSTNode(char splitchar, JaspellTernarySearchTrie.TSTNode parent)
Constructor method.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


 org.apache.lucene.search.suggest.tst
Classes
TernaryTreeNode
TSTAutocomplete
TSTLookup


org.apache.lucene.search.suggest.tst

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.search.suggest.tst

Ternary Search Tree based autosuggest.

See:
Description

Class Summary
TernaryTreeNode | The class creates a TST node.
TSTAutocomplete |
TSTLookup |

Package org.apache.lucene.search.suggest.tst Description

Ternary Search Tree based autosuggest.


org.apache.lucene.search.suggest.tst Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.search.suggest.tst

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.search.suggest.Lookup
      • org.apache.lucene.search.suggest.tst.TSTLookup
    • org.apache.lucene.search.suggest.tst.TernaryTreeNode
    • org.apache.lucene.search.suggest.tst.TSTAutocomplete


Uses of Package org.apache.lucene.search.suggest.tst

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.search.suggest.tst

Packages that use org.apache.lucene.search.suggest.tst
org.apache.lucene.search.suggest.tst Ternary Search Tree based autosuggest.

Classes in org.apache.lucene.search.suggest.tst used by org.apache.lucene.search.suggest.tst
TernaryTreeNode
The class creates a TST node.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


TernaryTreeNode

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.tst
Class TernaryTreeNode

java.lang.Object
    extended by  org.apache.lucene.search.suggest.tst.TernaryTreeNode

public class TernaryTreeNode
extends Object

The class creates a TST node.

Constructor Summary
TernaryTreeNode()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TernaryTreeNode

public TernaryTreeNode()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


TSTAutocomplete

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.tst
Class TSTAutocomplete

java.lang.Object
    extended by  org.apache.lucene.search.suggest.tst.TSTAutocomplete

public class TSTAutocomplete
extends Object

Constructor Summary
TSTAutocomplete()
Method Summary
void | balancedTree(Object[] tokens, Object[] vals, int lo, int hi, TernaryTreeNode root) Inserting keys in TST in the order middle,small,big (lexicographic measure) recursively creates a balanced tree which reduces insertion and search times significantly.
TernaryTreeNode | insert(TernaryTreeNode currentNode, CharSequence s, Object val, int x) Inserts a key in TST creating a series of Binary Search Trees at each node.
ArrayList<TernaryTreeNode> | prefixCompletion(TernaryTreeNode root, CharSequence s, int x) Auto-completes a given prefix query using Depth-First Search with the end of prefix as source node each time finding a new leaf to get a complete key to be added in the suggest list.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TSTAutocomplete

public TSTAutocomplete()
Method Detail

balancedTree

public void balancedTree(Object[] tokens,
                         Object[] vals,
                         int lo,
                         int hi,
                         TernaryTreeNode root)
Inserting keys in TST in the order middle,small,big (lexicographic measure) recursively creates a balanced tree which reduces insertion and search times significantly.

Parameters:
tokens - Sorted list of keys to be inserted in TST.
lo - stores the lower index of current list.
hi - stores the higher index of current list.
root - a reference object to root of TST.

insert

public TernaryTreeNode insert(TernaryTreeNode currentNode,
                              CharSequence s,
                              Object val,
                              int x)
Inserts a key in TST creating a series of Binary Search Trees at each node. The key is actually stored across the eqKid of each node in a successive manner.

Parameters:
currentNode - a reference node where the insertion will take currently.
s - key to be inserted in TST.
x - index of character in key to be inserted currently.
Returns:
currentNode The new reference to root node of TST

prefixCompletion

public ArrayList<TernaryTreeNode> prefixCompletion(TernaryTreeNode root,
                                                   CharSequence s,
                                                   int x)
Auto-completes a given prefix query using Depth-First Search with the end of prefix as source node each time finding a new leaf to get a complete key to be added in the suggest list.

Parameters:
root - a reference to root node of TST.
s - prefix query to be auto-completed.
x - index of current character to be searched while traversing through the prefix in TST.
Returns:
suggest list of auto-completed keys for the given prefix query.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TSTLookup

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.suggest.tst
Class TSTLookup

java.lang.Object
    extended by  org.apache.lucene.search.suggest.Lookup
        extended by  org.apache.lucene.search.suggest.tst.TSTLookup

public class TSTLookup
extends Lookup

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.suggest.Lookup
Lookup.LookupPriorityQueue, Lookup.LookupResult
Field Summary
Fields inherited from class org.apache.lucene.search.suggest.Lookup
CHARSEQUENCE_COMPARATOR
Constructor Summary
TSTLookup()
Method Summary
boolean | add(CharSequence key, Object value)
void | build(TermFreqIterator tfit) Builds up a new internal Lookup representation based on the given TermFreqIterator.
Object | get(CharSequence key)
boolean | load(InputStream input) Discard current lookup data and load it from a previously saved copy.
List<Lookup.LookupResult> | lookup(CharSequence key, boolean onlyMorePopular, int num) Look up a key and return possible completion for this key.
boolean | store(OutputStream output) Persist the constructed lookup data to a directory.
Methods inherited from class org.apache.lucene.search.suggest.Lookup
build
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TSTLookup

public TSTLookup()
Method Detail

build

public void build(TermFreqIterator tfit)
           throws IOException
Description copied from class: Lookup
Builds up a new internal Lookup representation based on the given TermFreqIterator. The implementation might re-sort the data internally.

Specified by:
build in class Lookup
Throws:
IOException

add

public boolean add(CharSequence key,
                   Object value)

get

public Object get(CharSequence key)

lookup

public List<Lookup.LookupResult> lookup(CharSequence key,
                                        boolean onlyMorePopular,
                                        int num)
Description copied from class: Lookup
Look up a key and return possible completion for this key.

Specified by:
lookup in class Lookup
Parameters:
key - lookup key. Depending on the implementation this may be a prefix, misspelling, or even infix.
onlyMorePopular - return only more popular results
num - maximum number of results to return
Returns:
a list of possible completions, with their relative weight (e.g. popularity)

store

public boolean store(OutputStream output)
              throws IOException
Description copied from class: Lookup
Persist the constructed lookup data to a directory. Optional operation.

Specified by:
store in class Lookup
Parameters:
output - OutputStream to write the data to.
Returns:
true if successful, false if unsuccessful or not supported.
Throws:
IOException - when fatal IO error occurs.

load

public boolean load(InputStream input)
             throws IOException
Description copied from class: Lookup
Discard current lookup data and load it from a previously saved copy. Optional operation.

Specified by:
load in class Lookup
Parameters:
input - the InputStream to load the lookup data.
Returns:
true if completed successfully, false if unsuccessful or not supported.
Throws:
IOException - when fatal IO error occurs.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.search.suggest.tst.TernaryTreeNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.tst.TernaryTreeNode

Packages that use TernaryTreeNode
org.apache.lucene.search.suggest.tst Ternary Search Tree based autosuggest.

Uses of TernaryTreeNode in org.apache.lucene.search.suggest.tst

Methods in org.apache.lucene.search.suggest.tst that return TernaryTreeNode
 TernaryTreeNode TSTAutocomplete.insert(TernaryTreeNode currentNode, CharSequence s, Object val, int x)
Inserts a key in TST creating a series of Binary Search Trees at each node.

Methods in org.apache.lucene.search.suggest.tst that return types with arguments of type TernaryTreeNode
 ArrayList<TernaryTreeNode> TSTAutocomplete.prefixCompletion(TernaryTreeNode root, CharSequence s, int x)
Auto-completes a given prefix query using Depth-First Search with the end of prefix as source node each time finding a new leaf to get a complete key to be added in the suggest list.

Methods in org.apache.lucene.search.suggest.tst with parameters of type TernaryTreeNode
void | TSTAutocomplete.balancedTree(Object[] tokens, Object[] vals, int lo, int hi, TernaryTreeNode root) Inserting keys in TST in the order middle,small,big (lexicographic measure) recursively creates a balanced tree which reduces insertion and search times significantly.
TernaryTreeNode | TSTAutocomplete.insert(TernaryTreeNode currentNode, CharSequence s, Object val, int x) Inserts a key in TST creating a series of Binary Search Trees at each node.
ArrayList<TernaryTreeNode> | TSTAutocomplete.prefixCompletion(TernaryTreeNode root, CharSequence s, int x) Auto-completes a given prefix query using Depth-First Search with the end of prefix as source node each time finding a new leaf to get a complete key to be added in the suggest list.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.tst.TSTAutocomplete

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.tst.TSTAutocomplete

No usage of org.apache.lucene.search.suggest.tst.TSTAutocomplete

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.suggest.tst.TSTLookup

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.suggest.tst.TSTLookup

No usage of org.apache.lucene.search.suggest.tst.TSTLookup

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


BaseFragmentsBuilder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class BaseFragmentsBuilder

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder
All Implemented Interfaces:
FragmentsBuilder
Direct Known Subclasses:
ScoreOrderFragmentsBuilder, SimpleFragmentsBuilder
public abstract class BaseFragmentsBuilder
extends Object
implements FragmentsBuilder

Field Summary
static String[] | COLORED_POST_TAGS
static String[] | COLORED_PRE_TAGS
protected String[] | postTags
protected String[] | preTags
Constructor Summary
protected | BaseFragmentsBuilder()
protected | BaseFragmentsBuilder(BoundaryScanner boundaryScanner)
protected | BaseFragmentsBuilder(String[] preTags, String[] postTags)
protected | BaseFragmentsBuilder(String[] preTags, String[] postTags, BoundaryScanner boundaryScanner)
Method Summary
String | createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList) create a fragment.
String | createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, String[] preTags, String[] postTags, Encoder encoder) create a fragment.
String[] | createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments) create multiple fragments.
String[] | createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments, String[] preTags, String[] postTags, Encoder encoder) create multiple fragments.
protected Field[] | getFields(IndexReader reader, int docId, String fieldName)
protected String[] | getFieldValues(IndexReader reader, int docId, String fieldName) Deprecated.
protected String | getFragmentSource(StringBuilder buffer, int[] index, Field[] values, int startOffset, int endOffset)
protected String | getFragmentSource(StringBuilder buffer, int[] index, String[] values, int startOffset, int endOffset) Deprecated.
protected String | getFragmentSourceMSO(StringBuilder buffer, int[] index, Field[] values, int startOffset, int endOffset, int[] modifiedStartOffset)
char | getMultiValuedSeparator()
protected String | getPostTag(int num)
protected String | getPostTag(String[] postTags, int num)
protected String | getPreTag(int num)
protected String | getPreTag(String[] preTags, int num)
abstract List<FieldFragList.WeightedFragInfo> | getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src)
protected String | makeFragment(StringBuilder buffer, int[] index, Field[] values, FieldFragList.WeightedFragInfo fragInfo, String[] preTags, String[] postTags, Encoder encoder)
protected String | makeFragment(StringBuilder buffer, int[] index, String[] values, FieldFragList.WeightedFragInfo fragInfo) Deprecated.
void | setMultiValuedSeparator(char separator)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

preTags

protected String[] preTags

postTags

protected String[] postTags

COLORED_PRE_TAGS

public static final String[] COLORED_PRE_TAGS

COLORED_POST_TAGS

public static final String[] COLORED_POST_TAGS
Constructor Detail

BaseFragmentsBuilder

protected BaseFragmentsBuilder()

BaseFragmentsBuilder

protected BaseFragmentsBuilder(String[] preTags,
                               String[] postTags)

BaseFragmentsBuilder

protected BaseFragmentsBuilder(BoundaryScanner boundaryScanner)

BaseFragmentsBuilder

protected BaseFragmentsBuilder(String[] preTags,
                               String[] postTags,
                               BoundaryScanner boundaryScanner)
Method Detail

getWeightedFragInfoList

public abstract List<FieldFragList.WeightedFragInfo> getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src)

createFragment

public String createFragment(IndexReader reader,
                             int docId,
                             String fieldName,
                             FieldFragList fieldFragList)
                      throws IOException
Description copied from interface: FragmentsBuilder
create a fragment.

Specified by:
createFragment in interface FragmentsBuilder
Parameters:
reader - IndexReader of the index
docId - document id to be highlighted
fieldName - field of the document to be highlighted
fieldFragList - FieldFragList object
Returns:
a created fragment or null when no fragment created
Throws:
IOException

createFragments

public String[] createFragments(IndexReader reader,
                                int docId,
                                String fieldName,
                                FieldFragList fieldFragList,
                                int maxNumFragments)
                         throws IOException
Description copied from interface: FragmentsBuilder
create multiple fragments.

Specified by:
createFragments in interface FragmentsBuilder
Parameters:
reader - IndexReader of the index
docId - document id to be highlighter
fieldName - field of the document to be highlighted
fieldFragList - FieldFragList object
maxNumFragments - maximum number of fragments
Returns:
created fragments or null when no fragments created. size of the array can be less than maxNumFragments
Throws:
IOException

createFragment

public String createFragment(IndexReader reader,
                             int docId,
                             String fieldName,
                             FieldFragList fieldFragList,
                             String[] preTags,
                             String[] postTags,
                             Encoder encoder)
                      throws IOException
Description copied from interface: FragmentsBuilder
create a fragment.

Specified by:
createFragment in interface FragmentsBuilder
Parameters:
reader - IndexReader of the index
docId - document id to be highlighted
fieldName - field of the document to be highlighted
fieldFragList - FieldFragList object
preTags - pre-tags to be used to highlight terms
postTags - post-tags to be used to highlight terms
encoder - an encoder that generates encoded text
Returns:
a created fragment or null when no fragment created
Throws:
IOException

createFragments

public String[] createFragments(IndexReader reader,
                                int docId,
                                String fieldName,
                                FieldFragList fieldFragList,
                                int maxNumFragments,
                                String[] preTags,
                                String[] postTags,
                                Encoder encoder)
                         throws IOException
Description copied from interface: FragmentsBuilder
create multiple fragments.

Specified by:
createFragments in interface FragmentsBuilder
Parameters:
reader - IndexReader of the index
docId - document id to be highlighter
fieldName - field of the document to be highlighted
fieldFragList - FieldFragList object
maxNumFragments - maximum number of fragments
preTags - pre-tags to be used to highlight terms
postTags - post-tags to be used to highlight terms
encoder - an encoder that generates encoded text
Returns:
created fragments or null when no fragments created. size of the array can be less than maxNumFragments
Throws:
IOException

getFieldValues

@Deprecated
protected String[] getFieldValues(IndexReader reader,
                                             int docId,
                                             String fieldName)
                           throws IOException
Deprecated.

Throws:
IOException

getFields

protected Field[] getFields(IndexReader reader,
                            int docId,
                            String fieldName)
                     throws IOException
Throws:
IOException

makeFragment

@Deprecated
protected String makeFragment(StringBuilder buffer,
                                         int[] index,
                                         String[] values,
                                         FieldFragList.WeightedFragInfo fragInfo)
Deprecated.

makeFragment

protected String makeFragment(StringBuilder buffer,
                              int[] index,
                              Field[] values,
                              FieldFragList.WeightedFragInfo fragInfo,
                              String[] preTags,
                              String[] postTags,
                              Encoder encoder)

getFragmentSourceMSO

protected String getFragmentSourceMSO(StringBuilder buffer,
                                      int[] index,
                                      Field[] values,
                                      int startOffset,
                                      int endOffset,
                                      int[] modifiedStartOffset)

getFragmentSource

@Deprecated
protected String getFragmentSource(StringBuilder buffer,
                                              int[] index,
                                              String[] values,
                                              int startOffset,
                                              int endOffset)
Deprecated.

getFragmentSource

protected String getFragmentSource(StringBuilder buffer,
                                   int[] index,
                                   Field[] values,
                                   int startOffset,
                                   int endOffset)

setMultiValuedSeparator

public void setMultiValuedSeparator(char separator)

getMultiValuedSeparator

public char getMultiValuedSeparator()

getPreTag

protected String getPreTag(int num)

getPostTag

protected String getPostTag(int num)

getPreTag

protected String getPreTag(String[] preTags,
                           int num)

getPostTag

protected String getPostTag(String[] postTags,
                            int num)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BoundaryScanner

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Interface BoundaryScanner

All Known Implementing Classes:
BreakIteratorBoundaryScanner, SimpleBoundaryScanner
public interface BoundaryScanner

Method Summary
int | findEndOffset(StringBuilder buffer, int start) Scan forward to find start offset.
int | findStartOffset(StringBuilder buffer, int start) Scan backward to find end offset.

Method Detail

findStartOffset

int findStartOffset(StringBuilder buffer,
                    int start)
Scan backward to find end offset.

Parameters:
buffer - scanned object
start - start offset to begin
Returns:
the found start offset

findEndOffset

int findEndOffset(StringBuilder buffer,
                  int start)
Scan forward to find start offset.

Parameters:
buffer - scanned object
start - start offset to begin
Returns:
the found end offset
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BreakIteratorBoundaryScanner

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class BreakIteratorBoundaryScanner

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.BreakIteratorBoundaryScanner
All Implemented Interfaces:
BoundaryScanner
public class BreakIteratorBoundaryScanner
extends Object
implements BoundaryScanner

A BoundaryScanner implementation that uses BreakIterator to find boundaries in the text.

See Also:
BreakIterator

Constructor Summary
BreakIteratorBoundaryScanner(BreakIterator bi)
Method Summary
int | findEndOffset(StringBuilder buffer, int start) Scan forward to find start offset.
int | findStartOffset(StringBuilder buffer, int start) Scan backward to find end offset.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BreakIteratorBoundaryScanner

public BreakIteratorBoundaryScanner(BreakIterator bi)
Method Detail

findStartOffset

public int findStartOffset(StringBuilder buffer,
                           int start)
Description copied from interface: BoundaryScanner
Scan backward to find end offset.

Specified by:
findStartOffset in interface BoundaryScanner
Parameters:
buffer - scanned object
start - start offset to begin
Returns:
the found start offset

findEndOffset

public int findEndOffset(StringBuilder buffer,
                         int start)
Description copied from interface: BoundaryScanner
Scan forward to find start offset.

Specified by:
findEndOffset in interface BoundaryScanner
Parameters:
buffer - scanned object
start - start offset to begin
Returns:
the found end offset
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FastVectorHighlighter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class FastVectorHighlighter

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.FastVectorHighlighter

public class FastVectorHighlighter
extends Object

Another highlighter implementation.

Field Summary
static boolean | DEFAULT_FIELD_MATCH
static boolean | DEFAULT_PHRASE_HIGHLIGHT
Constructor Summary
FastVectorHighlighter()
the default constructor.
FastVectorHighlighter(boolean phraseHighlight, boolean fieldMatch)
a constructor.
FastVectorHighlighter(boolean phraseHighlight, boolean fieldMatch, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder)
a constructor.
Method Summary
String | getBestFragment(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize) return the best fragment.
String | getBestFragment(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder, String[] preTags, String[] postTags, Encoder encoder) return the best fragment.
String[] | getBestFragments(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, int maxNumFragments) return the best fragments.
String[] | getBestFragments(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, int maxNumFragments, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder, String[] preTags, String[] postTags, Encoder encoder) return the best fragments.
FieldQuery | getFieldQuery(Query query) create a FieldQuery object.
FieldQuery | getFieldQuery(Query query, IndexReader reader) create a FieldQuery object.
int | getPhraseLimit()
boolean | isFieldMatch() return whether fieldMatch or not.
boolean | isPhraseHighlight() return whether phraseHighlight or not.
void | setPhraseLimit(int phraseLimit) set the maximum number of phrases to analyze when searching for the highest-scoring phrase.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_PHRASE_HIGHLIGHT

public static final boolean DEFAULT_PHRASE_HIGHLIGHT
See Also:
Constant Field Values

DEFAULT_FIELD_MATCH

public static final boolean DEFAULT_FIELD_MATCH
See Also:
Constant Field Values
Constructor Detail

FastVectorHighlighter

public FastVectorHighlighter()
the default constructor.

FastVectorHighlighter

public FastVectorHighlighter(boolean phraseHighlight,
                             boolean fieldMatch)
a constructor. Using SimpleFragListBuilder and ScoreOrderFragmentsBuilder.

Parameters:
phraseHighlight - true or false for phrase highlighting
fieldMatch - true of false for field matching

FastVectorHighlighter

public FastVectorHighlighter(boolean phraseHighlight,
                             boolean fieldMatch,
                             FragListBuilder fragListBuilder,
                             FragmentsBuilder fragmentsBuilder)
a constructor. A FragListBuilder and a FragmentsBuilder can be specified (plugins).

Parameters:
phraseHighlight - true of false for phrase highlighting
fieldMatch - true of false for field matching
fragListBuilder - an instance of FragListBuilder
fragmentsBuilder - an instance of FragmentsBuilder
Method Detail

getFieldQuery

public FieldQuery getFieldQuery(Query query)
create a FieldQuery object.

Parameters:
query - a query
Returns:
the created FieldQuery object

getFieldQuery

public FieldQuery getFieldQuery(Query query,
                                IndexReader reader)
                         throws IOException
create a FieldQuery object.

Parameters:
query - a query
Returns:
the created FieldQuery object
Throws:
IOException

getBestFragment

public final String getBestFragment(FieldQuery fieldQuery,
                                    IndexReader reader,
                                    int docId,
                                    String fieldName,
                                    int fragCharSize)
                             throws IOException
return the best fragment.

Parameters:
fieldQuery - FieldQuery object
reader - IndexReader of the index
docId - document id to be highlighted
fieldName - field of the document to be highlighted
fragCharSize - the length (number of chars) of a fragment
Returns:
the best fragment (snippet) string
Throws:
IOException

getBestFragments

public final String[] getBestFragments(FieldQuery fieldQuery,
                                       IndexReader reader,
                                       int docId,
                                       String fieldName,
                                       int fragCharSize,
                                       int maxNumFragments)
                                throws IOException
return the best fragments.

Parameters:
fieldQuery - FieldQuery object
reader - IndexReader of the index
docId - document id to be highlighted
fieldName - field of the document to be highlighted
fragCharSize - the length (number of chars) of a fragment
maxNumFragments - maximum number of fragments
Returns:
created fragments or null when no fragments created. size of the array can be less than maxNumFragments
Throws:
IOException

getBestFragment

public final String getBestFragment(FieldQuery fieldQuery,
                                    IndexReader reader,
                                    int docId,
                                    String fieldName,
                                    int fragCharSize,
                                    FragListBuilder fragListBuilder,
                                    FragmentsBuilder fragmentsBuilder,
                                    String[] preTags,
                                    String[] postTags,
                                    Encoder encoder)
                             throws IOException
return the best fragment.

Parameters:
fieldQuery - FieldQuery object
reader - IndexReader of the index
docId - document id to be highlighted
fieldName - field of the document to be highlighted
fragCharSize - the length (number of chars) of a fragment
fragListBuilder - FragListBuilder object
fragmentsBuilder - FragmentsBuilder object
preTags - pre-tags to be used to highlight terms
postTags - post-tags to be used to highlight terms
encoder - an encoder that generates encoded text
Returns:
the best fragment (snippet) string
Throws:
IOException

getBestFragments

public final String[] getBestFragments(FieldQuery fieldQuery,
                                       IndexReader reader,
                                       int docId,
                                       String fieldName,
                                       int fragCharSize,
                                       int maxNumFragments,
                                       FragListBuilder fragListBuilder,
                                       FragmentsBuilder fragmentsBuilder,
                                       String[] preTags,
                                       String[] postTags,
                                       Encoder encoder)
                                throws IOException
return the best fragments.

Parameters:
fieldQuery - FieldQuery object
reader - IndexReader of the index
docId - document id to be highlighted
fieldName - field of the document to be highlighted
fragCharSize - the length (number of chars) of a fragment
maxNumFragments - maximum number of fragments
fragListBuilder - FragListBuilder object
fragmentsBuilder - FragmentsBuilder object
preTags - pre-tags to be used to highlight terms
postTags - post-tags to be used to highlight terms
encoder - an encoder that generates encoded text
Returns:
created fragments or null when no fragments created. size of the array can be less than maxNumFragments
Throws:
IOException

isPhraseHighlight

public boolean isPhraseHighlight()
return whether phraseHighlight or not.

Returns:
whether phraseHighlight or not

isFieldMatch

public boolean isFieldMatch()
return whether fieldMatch or not.

Returns:
whether fieldMatch or not

getPhraseLimit

public int getPhraseLimit()
Returns:
the maximum number of phrases to analyze when searching for the highest-scoring phrase.

setPhraseLimit

public void setPhraseLimit(int phraseLimit)
set the maximum number of phrases to analyze when searching for the highest-scoring phrase. The default is unlimited (Integer.MAX_VALUE).

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldFragList

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class FieldFragList

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.FieldFragList

public class FieldFragList
extends Object

FieldFragList has a list of "frag info" that is used by FragmentsBuilder class to create fragments (snippets).

Nested Class Summary
static class FieldFragList.WeightedFragInfo
Constructor Summary
FieldFragList(int fragCharSize)
a constructor.
Method Summary
void | add(int startOffset, int endOffset, List<FieldPhraseList.WeightedPhraseInfo> phraseInfoList) convert the list of WeightedPhraseInfo to WeightedFragInfo, then add it to the fragInfos
List<FieldFragList.WeightedFragInfo> | getFragInfos() return the list of WeightedFragInfos.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldFragList

public FieldFragList(int fragCharSize)
a constructor.

Parameters:
fragCharSize - the length (number of chars) of a fragment
Method Detail

add

public void add(int startOffset,
                int endOffset,
                List<FieldPhraseList.WeightedPhraseInfo> phraseInfoList)
convert the list of WeightedPhraseInfo to WeightedFragInfo, then add it to the fragInfos

Parameters:
startOffset - start offset of the fragment
endOffset - end offset of the fragment
phraseInfoList - list of WeightedPhraseInfo objects

getFragInfos

public List<FieldFragList.WeightedFragInfo> getFragInfos()
return the list of WeightedFragInfos.

Returns:
fragInfos.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldFragList.WeightedFragInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class FieldFragList.WeightedFragInfo

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo
Enclosing class:
FieldFragList
public static class FieldFragList.WeightedFragInfo
extends Object

Nested Class Summary
static class FieldFragList.WeightedFragInfo.SubInfo
Constructor Summary
FieldFragList.WeightedFragInfo(int startOffset, int endOffset, List<FieldPhraseList.WeightedPhraseInfo> phraseInfoList)
Method Summary
int | getEndOffset()
int | getStartOffset()
List<FieldFragList.WeightedFragInfo.SubInfo> | getSubInfos()
float | getTotalBoost()
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FieldFragList.WeightedFragInfo

public FieldFragList.WeightedFragInfo(int startOffset,
                                      int endOffset,
                                      List<FieldPhraseList.WeightedPhraseInfo> phraseInfoList)
Method Detail

getSubInfos

public List<FieldFragList.WeightedFragInfo.SubInfo> getSubInfos()

getTotalBoost

public float getTotalBoost()

getStartOffset

public int getStartOffset()

getEndOffset

public int getEndOffset()

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldFragList.WeightedFragInfo.SubInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class FieldFragList.WeightedFragInfo.SubInfo

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo.SubInfo
Enclosing class:
FieldFragList.WeightedFragInfo
public static class FieldFragList.WeightedFragInfo.SubInfo
extends Object

Method Summary
int | getSeqnum()
List<FieldPhraseList.WeightedPhraseInfo.Toffs> | getTermsOffsets()
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Method Detail

getTermsOffsets

public List<FieldPhraseList.WeightedPhraseInfo.Toffs> getTermsOffsets()

getSeqnum

public int getSeqnum()

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldPhraseList

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class FieldPhraseList

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.FieldPhraseList

public class FieldPhraseList
extends Object

FieldPhraseList has a list of WeightedPhraseInfo that is used by FragListBuilder to create a FieldFragList object.

Nested Class Summary
static class FieldPhraseList.WeightedPhraseInfo
Constructor Summary
FieldPhraseList(FieldTermStack fieldTermStack, FieldQuery fieldQuery)
create a FieldPhraseList that has no limit on the number of phrases to analyze
FieldPhraseList(FieldTermStack fieldTermStack, FieldQuery fieldQuery, int phraseLimit)
a constructor.
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldPhraseList

public FieldPhraseList(FieldTermStack fieldTermStack,
                       FieldQuery fieldQuery)
create a FieldPhraseList that has no limit on the number of phrases to analyze

Parameters:
fieldTermStack - FieldTermStack object
fieldQuery - FieldQuery object

FieldPhraseList

public FieldPhraseList(FieldTermStack fieldTermStack,
                       FieldQuery fieldQuery,
                       int phraseLimit)
a constructor.

Parameters:
fieldTermStack - FieldTermStack object
fieldQuery - FieldQuery object
phraseLimit - maximum size of phraseList
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldPhraseList.WeightedPhraseInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class FieldPhraseList.WeightedPhraseInfo

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo
Enclosing class:
FieldPhraseList
public static class FieldPhraseList.WeightedPhraseInfo
extends Object

Nested Class Summary
static class FieldPhraseList.WeightedPhraseInfo.Toffs
Constructor Summary
FieldPhraseList.WeightedPhraseInfo(LinkedList<FieldTermStack.TermInfo> terms, float boost)
FieldPhraseList.WeightedPhraseInfo(LinkedList<FieldTermStack.TermInfo> terms, float boost, int number)
Method Summary
int | getEndOffset()
int | getStartOffset()
boolean | isOffsetOverlap(FieldPhraseList.WeightedPhraseInfo other)
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FieldPhraseList.WeightedPhraseInfo

public FieldPhraseList.WeightedPhraseInfo(LinkedList<FieldTermStack.TermInfo> terms,
                                          float boost)

FieldPhraseList.WeightedPhraseInfo

public FieldPhraseList.WeightedPhraseInfo(LinkedList<FieldTermStack.TermInfo> terms,
                                          float boost,
                                          int number)
Method Detail

getStartOffset

public int getStartOffset()

getEndOffset

public int getEndOffset()

isOffsetOverlap

public boolean isOffsetOverlap(FieldPhraseList.WeightedPhraseInfo other)

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldPhraseList.WeightedPhraseInfo.Toffs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class FieldPhraseList.WeightedPhraseInfo.Toffs

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo.Toffs
Enclosing class:
FieldPhraseList.WeightedPhraseInfo
public static class FieldPhraseList.WeightedPhraseInfo.Toffs
extends Object

Constructor Summary
FieldPhraseList.WeightedPhraseInfo.Toffs(int startOffset, int endOffset)
Method Summary
int | getEndOffset()
int | getStartOffset()
void | setEndOffset(int endOffset)
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FieldPhraseList.WeightedPhraseInfo.Toffs

public FieldPhraseList.WeightedPhraseInfo.Toffs(int startOffset,
                                                int endOffset)
Method Detail

setEndOffset

public void setEndOffset(int endOffset)

getStartOffset

public int getStartOffset()

getEndOffset

public int getEndOffset()

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldQuery

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class FieldQuery

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.FieldQuery

public class FieldQuery
extends Object

FieldQuery breaks down query object into terms/phrases and keep them in QueryPhraseMap structure.

Nested Class Summary
static class FieldQuery.QueryPhraseMap
Method Summary
FieldQuery.QueryPhraseMap | getFieldTermMap(String fieldName, String term)
FieldQuery.QueryPhraseMap | searchPhrase(String fieldName, List<FieldTermStack.TermInfo> phraseCandidate)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getFieldTermMap

public FieldQuery.QueryPhraseMap getFieldTermMap(String fieldName,
                                                 String term)
Parameters:
fieldName -
term -
Returns:
QueryPhraseMap

searchPhrase

public FieldQuery.QueryPhraseMap searchPhrase(String fieldName,
                                              List<FieldTermStack.TermInfo> phraseCandidate)
Parameters:
fieldName -
phraseCandidate -
Returns:
QueryPhraseMap
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldQuery.QueryPhraseMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class FieldQuery.QueryPhraseMap

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.FieldQuery.QueryPhraseMap
Enclosing class:
FieldQuery
public static class FieldQuery.QueryPhraseMap
extends Object

Constructor Summary
FieldQuery.QueryPhraseMap(FieldQuery fieldQuery)
Method Summary
float | getBoost()
int | getSlop()
FieldQuery.QueryPhraseMap | getTermMap(String term)
int | getTermOrPhraseNumber()
boolean | isTerminal()
boolean | isValidTermOrPhrase(List<FieldTermStack.TermInfo> phraseCandidate)
FieldQuery.QueryPhraseMap | searchPhrase(List<FieldTermStack.TermInfo> phraseCandidate)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldQuery.QueryPhraseMap

public FieldQuery.QueryPhraseMap(FieldQuery fieldQuery)
Method Detail

getTermMap

public FieldQuery.QueryPhraseMap getTermMap(String term)

isTerminal

public boolean isTerminal()

getSlop

public int getSlop()

getBoost

public float getBoost()

getTermOrPhraseNumber

public int getTermOrPhraseNumber()

searchPhrase

public FieldQuery.QueryPhraseMap searchPhrase(List<FieldTermStack.TermInfo> phraseCandidate)

isValidTermOrPhrase

public boolean isValidTermOrPhrase(List<FieldTermStack.TermInfo> phraseCandidate)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldTermStack

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class FieldTermStack

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.FieldTermStack

public class FieldTermStack
extends Object

FieldTermStack is a stack that keeps query terms in the specified field of the document to be highlighted.

Nested Class Summary
static class FieldTermStack.TermInfo
Constructor Summary
FieldTermStack(IndexReader reader, int docId, String fieldName, FieldQuery fieldQuery)
a constructor.
Method Summary
String | getFieldName()
boolean | isEmpty() to know whether the stack is empty
static void | main(String[] args)
FieldTermStack.TermInfo | pop()
void | push(FieldTermStack.TermInfo termInfo)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldTermStack

public FieldTermStack(IndexReader reader,
                      int docId,
                      String fieldName,
                      FieldQuery fieldQuery)
               throws IOException
a constructor.

Parameters:
reader - IndexReader of the index
docId - document id to be highlighted
fieldName - field of the document to be highlighted
fieldQuery - FieldQuery object
Throws:
IOException
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

getFieldName

public String getFieldName()
Returns:
field name

pop

public FieldTermStack.TermInfo pop()
Returns:
the top TermInfo object of the stack

push

public void push(FieldTermStack.TermInfo termInfo)
Parameters:
termInfo - the TermInfo object to be put on the top of the stack

isEmpty

public boolean isEmpty()
to know whether the stack is empty

Returns:
true if the stack is empty, false if not
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldTermStack.TermInfo

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class FieldTermStack.TermInfo

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.FieldTermStack.TermInfo
All Implemented Interfaces:
Comparable<FieldTermStack.TermInfo>
Enclosing class:
FieldTermStack
public static class FieldTermStack.TermInfo
extends Object
implements Comparable<FieldTermStack.TermInfo>

Method Summary
int | compareTo(FieldTermStack.TermInfo o)
int | getEndOffset()
int | getPosition()
int | getStartOffset()
String | getText()
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Method Detail

getText

public String getText()

getStartOffset

public int getStartOffset()

getEndOffset

public int getEndOffset()

getPosition

public int getPosition()

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(FieldTermStack.TermInfo o)
Specified by:
compareTo in interface Comparable<FieldTermStack.TermInfo>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FragListBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Interface FragListBuilder

All Known Implementing Classes:
SimpleFragListBuilder, SingleFragListBuilder
public interface FragListBuilder

FragListBuilder is an interface for FieldFragList builder classes. A FragListBuilder class can be plugged in to Highlighter.

Method Summary
 FieldFragList createFieldFragList(FieldPhraseList fieldPhraseList, int fragCharSize)
create a FieldFragList.

Method Detail

createFieldFragList

FieldFragList createFieldFragList(FieldPhraseList fieldPhraseList,
                                  int fragCharSize)
create a FieldFragList.

Parameters:
fieldPhraseList - FieldPhraseList object
fragCharSize - the length (number of chars) of a fragment
Returns:
the created FieldFragList object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FragmentsBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Interface FragmentsBuilder

All Known Implementing Classes:
BaseFragmentsBuilder, ScoreOrderFragmentsBuilder, SimpleFragmentsBuilder
public interface FragmentsBuilder

FragmentsBuilder is an interface for fragments (snippets) builder classes. A FragmentsBuilder class can be plugged in to FastVectorHighlighter.

Method Summary
String | createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList) create a fragment.
String | createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, String[] preTags, String[] postTags, Encoder encoder) create a fragment.
String[] | createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments) create multiple fragments.
String[] | createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments, String[] preTags, String[] postTags, Encoder encoder) create multiple fragments.

Method Detail

createFragment

String createFragment(IndexReader reader,
                      int docId,
                      String fieldName,
                      FieldFragList fieldFragList)
                      throws IOException
create a fragment.

Parameters:
reader - IndexReader of the index
docId - document id to be highlighted
fieldName - field of the document to be highlighted
fieldFragList - FieldFragList object
Returns:
a created fragment or null when no fragment created
Throws:
IOException

createFragments

String[] createFragments(IndexReader reader,
                         int docId,
                         String fieldName,
                         FieldFragList fieldFragList,
                         int maxNumFragments)
                         throws IOException
create multiple fragments.

Parameters:
reader - IndexReader of the index
docId - document id to be highlighter
fieldName - field of the document to be highlighted
fieldFragList - FieldFragList object
maxNumFragments - maximum number of fragments
Returns:
created fragments or null when no fragments created. size of the array can be less than maxNumFragments
Throws:
IOException

createFragment

String createFragment(IndexReader reader,
                      int docId,
                      String fieldName,
                      FieldFragList fieldFragList,
                      String[] preTags,
                      String[] postTags,
                      Encoder encoder)
                      throws IOException
create a fragment.

Parameters:
reader - IndexReader of the index
docId - document id to be highlighted
fieldName - field of the document to be highlighted
fieldFragList - FieldFragList object
preTags - pre-tags to be used to highlight terms
postTags - post-tags to be used to highlight terms
encoder - an encoder that generates encoded text
Returns:
a created fragment or null when no fragment created
Throws:
IOException

createFragments

String[] createFragments(IndexReader reader,
                         int docId,
                         String fieldName,
                         FieldFragList fieldFragList,
                         int maxNumFragments,
                         String[] preTags,
                         String[] postTags,
                         Encoder encoder)
                         throws IOException
create multiple fragments.

Parameters:
reader - IndexReader of the index
docId - document id to be highlighter
fieldName - field of the document to be highlighted
fieldFragList - FieldFragList object
maxNumFragments - maximum number of fragments
preTags - pre-tags to be used to highlight terms
postTags - post-tags to be used to highlight terms
encoder - an encoder that generates encoded text
Returns:
created fragments or null when no fragments created. size of the array can be less than maxNumFragments
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.search.vectorhighlight
Interfaces
BoundaryScanner
FragListBuilder
FragmentsBuilder
Classes
BaseFragmentsBuilder
BreakIteratorBoundaryScanner
FastVectorHighlighter
FieldFragList
FieldFragList.WeightedFragInfo
FieldFragList.WeightedFragInfo.SubInfo
FieldPhraseList
FieldPhraseList.WeightedPhraseInfo
FieldPhraseList.WeightedPhraseInfo.Toffs
FieldQuery
FieldQuery.QueryPhraseMap
FieldTermStack
FieldTermStack.TermInfo
ScoreOrderFragmentsBuilder
ScoreOrderFragmentsBuilder.ScoreComparator
SimpleBoundaryScanner
SimpleFragListBuilder
SimpleFragmentsBuilder
SingleFragListBuilder


org.apache.lucene.search.vectorhighlight

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.search.vectorhighlight

This is an another highlighter implementation.

See:
Description

Interface Summary
BoundaryScanner |
FragListBuilder | FragListBuilder is an interface for FieldFragList builder classes.
FragmentsBuilder | FragmentsBuilder is an interface for fragments (snippets) builder classes.

Class Summary
BaseFragmentsBuilder |
BreakIteratorBoundaryScanner | A BoundaryScanner implementation that uses BreakIterator to find boundaries in the text.
FastVectorHighlighter | Another highlighter implementation.
FieldFragList | FieldFragList has a list of "frag info" that is used by FragmentsBuilder class to create fragments (snippets).
FieldFragList.WeightedFragInfo |
FieldFragList.WeightedFragInfo.SubInfo |
FieldPhraseList | FieldPhraseList has a list of WeightedPhraseInfo that is used by FragListBuilder to create a FieldFragList object.
FieldPhraseList.WeightedPhraseInfo |
FieldPhraseList.WeightedPhraseInfo.Toffs |
FieldQuery | FieldQuery breaks down query object into terms/phrases and keep them in QueryPhraseMap structure.
FieldQuery.QueryPhraseMap |
FieldTermStack | FieldTermStack is a stack that keeps query terms in the specified field of the document to be highlighted.
FieldTermStack.TermInfo |
ScoreOrderFragmentsBuilder | An implementation of FragmentsBuilder that outputs score-order fragments.
ScoreOrderFragmentsBuilder.ScoreComparator |
SimpleBoundaryScanner |
SimpleFragListBuilder | A simple implementation of FragListBuilder.
SimpleFragmentsBuilder | A simple implementation of FragmentsBuilder.
SingleFragListBuilder | An implementation class of FragListBuilder that generates one FieldFragList.WeightedFragInfo object.

Package org.apache.lucene.search.vectorhighlight Description

This is an another highlighter implementation.

Features

  • fast for large docs
  • support N-gram fields
  • support phrase-unit highlighting with slops
  • support multi-term (includes wildcard, range, regexp, etc) queries
  • need Java 1.5
  • highlight fields need to be TermVector.WITH_POSITIONS_OFFSETS
  • take into account query boost to score fragments
  • support colored highlight tags
  • pluggable FragListBuilder
  • pluggable FragmentsBuilder

Algorithm

To explain the algorithm, let's use the following sample text (to be highlighted) and user query:

Sample Text | Lucene is a search engine library.
User Query | Lucene^2 OR "search library"~1

The user query is a BooleanQuery that consists of TermQuery("Lucene") with boost of 2 and PhraseQuery("search library") with slop of 1.

For your convenience, here is the offsets and positions info of the sample text.

+--------+-----------------------------------+
|        |          1111111111222222222233333|
|  offset|01234567890123456789012345678901234|
+--------+-----------------------------------+
|document|Lucene is a search engine library. |
+--------*-----------------------------------+
|position|0      1  2 3      4      5        |
+--------*-----------------------------------+

Step 1.

In Step 1, Fast Vector Highlighter generates FieldQuery.QueryPhraseMap from the user query. QueryPhraseMap consists of the following members:

public class QueryPhraseMap {
  boolean terminal;
  int slop;   // valid if terminal == true and phraseHighlight == true
  float boost;  // valid if terminal == true
  Map<String, QueryPhraseMap> subMap;
}

QueryPhraseMap has subMap. The key of the subMap is a term text in the user query and the value is a subsequent QueryPhraseMap. If the query is a term (not phrase), then the subsequent QueryPhraseMap is marked as terminal. If the query is a phrase, then the subsequent QueryPhraseMap is not a terminal and it has the next term text in the phrase.

From the sample user query, the following QueryPhraseMap will be generated:

   QueryPhraseMap
+--------+-+  +-------+-+
|"Lucene"|o+->|boost=2|*|  * : terminal
+--------+-+  +-------+-+

+--------+-+  +---------+-+  +-------+------+-+
|"search"|o+->|"library"|o+->|boost=1|slop=1|*|
+--------+-+  +---------+-+  +-------+------+-+

Step 2.

In Step 2, Fast Vector Highlighter generates FieldTermStack. Fast Vector Highlighter uses TermFreqVector data (must be stored Field.TermVector.WITH_POSITIONS_OFFSETS) to generate it. FieldTermStack keeps the terms in the user query. Therefore, in this sample case, Fast Vector Highlighter generates the following FieldTermStack:

   FieldTermStack
+------------------+
|"Lucene"(0,6,0)   |
+------------------+
|"search"(12,18,3) |
+------------------+
|"library"(26,33,5)|
+------------------+
where : "termText"(startOffset,endOffset,position)

Step 3.

In Step 3, Fast Vector Highlighter generates FieldPhraseList by reference to QueryPhraseMap and FieldTermStack.

   FieldPhraseList
+----------------+-----------------+---+
|"Lucene"        |[(0,6)]          |w=2|
+----------------+-----------------+---+
|"search library"|[(12,18),(26,33)]|w=1|
+----------------+-----------------+---+

The type of each entry is WeightedPhraseInfo that consists of an array of terms offsets and weight. The weight (Fast Vector Highlighter uses query boost to calculate the weight) will be taken into account when Fast Vector Highlighter creates FieldFragList in the next step.

Step 4.

In Step 4, Fast Vector Highlighter creates FieldFragList by reference to FieldPhraseList. In this sample case, the following FieldFragList will be generated:

   FieldFragList
+---------------------------------+
|"Lucene"[(0,6)]                  |
|"search library"[(12,18),(26,33)]|
|totalBoost=3                     |
+---------------------------------+

Step 5.

In Step 5, by using FieldFragList and the field stored data, Fast Vector Highlighter creates highlighted snippets!


org.apache.lucene.search.vectorhighlight Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.search.vectorhighlight

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder (implements org.apache.lucene.search.vectorhighlight.FragmentsBuilder)
      • org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder
      • org.apache.lucene.search.vectorhighlight.SimpleFragmentsBuilder
    • org.apache.lucene.search.vectorhighlight.BreakIteratorBoundaryScanner (implements org.apache.lucene.search.vectorhighlight.BoundaryScanner)
    • org.apache.lucene.search.vectorhighlight.FastVectorHighlighter
    • org.apache.lucene.search.vectorhighlight.FieldFragList
    • org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo
    • org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo.SubInfo
    • org.apache.lucene.search.vectorhighlight.FieldPhraseList
    • org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo
    • org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo.Toffs
    • org.apache.lucene.search.vectorhighlight.FieldQuery
    • org.apache.lucene.search.vectorhighlight.FieldQuery.QueryPhraseMap
    • org.apache.lucene.search.vectorhighlight.FieldTermStack
    • org.apache.lucene.search.vectorhighlight.FieldTermStack.TermInfo (implements java.lang.Comparable<T>)
    • org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder.ScoreComparator (implements java.util.Comparator<T>)
    • org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner (implements org.apache.lucene.search.vectorhighlight.BoundaryScanner)
    • org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder (implements org.apache.lucene.search.vectorhighlight.FragListBuilder)
    • org.apache.lucene.search.vectorhighlight.SingleFragListBuilder (implements org.apache.lucene.search.vectorhighlight.FragListBuilder)

Interface Hierarchy

  • org.apache.lucene.search.vectorhighlight.BoundaryScanner
  • org.apache.lucene.search.vectorhighlight.FragListBuilder
  • org.apache.lucene.search.vectorhighlight.FragmentsBuilder


Uses of Package org.apache.lucene.search.vectorhighlight

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.search.vectorhighlight

Packages that use org.apache.lucene.search.vectorhighlight
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.search.vectorhighlight | This is an another highlighter implementation.

Classes in org.apache.lucene.search.vectorhighlight used by org.apache.lucene.benchmark.byTask.tasks
FastVectorHighlighter
Another highlighter implementation.

Classes in org.apache.lucene.search.vectorhighlight used by org.apache.lucene.search.vectorhighlight
BaseFragmentsBuilder
BoundaryScanner
FieldFragList
FieldFragList has a list of "frag info" that is used by FragmentsBuilder class to create fragments (snippets).
FieldFragList.WeightedFragInfo
FieldFragList.WeightedFragInfo.SubInfo
FieldPhraseList
FieldPhraseList has a list of WeightedPhraseInfo that is used by FragListBuilder to create a FieldFragList object.
FieldPhraseList.WeightedPhraseInfo
FieldPhraseList.WeightedPhraseInfo.Toffs
FieldQuery
FieldQuery breaks down query object into terms/phrases and keep them in QueryPhraseMap structure.
FieldQuery.QueryPhraseMap
FieldTermStack
FieldTermStack is a stack that keeps query terms in the specified field of the document to be highlighted.
FieldTermStack.TermInfo
FragListBuilder
FragListBuilder is an interface for FieldFragList builder classes.
FragmentsBuilder
FragmentsBuilder is an interface for fragments (snippets) builder classes.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ScoreOrderFragmentsBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class ScoreOrderFragmentsBuilder

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder
        extended by  org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder
All Implemented Interfaces:
FragmentsBuilder
public class ScoreOrderFragmentsBuilder
extends BaseFragmentsBuilder

An implementation of FragmentsBuilder that outputs score-order fragments.

Nested Class Summary
static class ScoreOrderFragmentsBuilder.ScoreComparator
Field Summary
Fields inherited from class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder
COLORED_POST_TAGS, COLORED_PRE_TAGS, postTags, preTags
Constructor Summary
ScoreOrderFragmentsBuilder()
a constructor.
ScoreOrderFragmentsBuilder(BoundaryScanner bs)
ScoreOrderFragmentsBuilder(String[] preTags, String[] postTags)
a constructor.
ScoreOrderFragmentsBuilder(String[] preTags, String[] postTags, BoundaryScanner bs)
Method Summary
 List<FieldFragList.WeightedFragInfo> getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src)
Sort by score the list of WeightedFragInfo
Methods inherited from class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder
createFragment, createFragment, createFragments, createFragments, getFields, getFieldValues, getFragmentSource, getFragmentSource, getFragmentSourceMSO, getMultiValuedSeparator, getPostTag, getPostTag, getPreTag, getPreTag, makeFragment, makeFragment, setMultiValuedSeparator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ScoreOrderFragmentsBuilder

public ScoreOrderFragmentsBuilder()
a constructor.

ScoreOrderFragmentsBuilder

public ScoreOrderFragmentsBuilder(String[] preTags,
                                  String[] postTags)
a constructor.

Parameters:
preTags - array of pre-tags for markup terms.
postTags - array of post-tags for markup terms.

ScoreOrderFragmentsBuilder

public ScoreOrderFragmentsBuilder(BoundaryScanner bs)

ScoreOrderFragmentsBuilder

public ScoreOrderFragmentsBuilder(String[] preTags,
                                  String[] postTags,
                                  BoundaryScanner bs)
Method Detail

getWeightedFragInfoList

public List<FieldFragList.WeightedFragInfo> getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src)
Sort by score the list of WeightedFragInfo

Specified by:
getWeightedFragInfoList in class BaseFragmentsBuilder
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScoreOrderFragmentsBuilder.ScoreComparator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class ScoreOrderFragmentsBuilder.ScoreComparator

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder.ScoreComparator
All Implemented Interfaces:
Comparator<FieldFragList.WeightedFragInfo>
Enclosing class:
ScoreOrderFragmentsBuilder
public static class ScoreOrderFragmentsBuilder.ScoreComparator
extends Object
implements Comparator<FieldFragList.WeightedFragInfo>

Constructor Summary
ScoreOrderFragmentsBuilder.ScoreComparator()
Method Summary
 int compare(FieldFragList.WeightedFragInfo o1, FieldFragList.WeightedFragInfo o2)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals

Constructor Detail

ScoreOrderFragmentsBuilder.ScoreComparator

public ScoreOrderFragmentsBuilder.ScoreComparator()
Method Detail

compare

public int compare(FieldFragList.WeightedFragInfo o1,
                   FieldFragList.WeightedFragInfo o2)
Specified by:
compare in interface Comparator<FieldFragList.WeightedFragInfo>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleBoundaryScanner

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class SimpleBoundaryScanner

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner
All Implemented Interfaces:
BoundaryScanner
public class SimpleBoundaryScanner
extends Object
implements BoundaryScanner

Field Summary
protected Set<Character> | boundaryChars
static Character[] | DEFAULT_BOUNDARY_CHARS
static int | DEFAULT_MAX_SCAN
protected int | maxScan
Constructor Summary
SimpleBoundaryScanner()
SimpleBoundaryScanner(Character[] boundaryChars)
SimpleBoundaryScanner(int maxScan)
SimpleBoundaryScanner(int maxScan, Character[] boundaryChars)
SimpleBoundaryScanner(int maxScan, Set<Character> boundaryChars)
Method Summary
int | findEndOffset(StringBuilder buffer, int start) Scan forward to find start offset.
int | findStartOffset(StringBuilder buffer, int start) Scan backward to find end offset.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_MAX_SCAN

public static final int DEFAULT_MAX_SCAN
See Also:
Constant Field Values

DEFAULT_BOUNDARY_CHARS

public static final Character[] DEFAULT_BOUNDARY_CHARS

maxScan

protected int maxScan

boundaryChars

protected Set<Character> boundaryChars
Constructor Detail

SimpleBoundaryScanner

public SimpleBoundaryScanner()

SimpleBoundaryScanner

public SimpleBoundaryScanner(int maxScan)

SimpleBoundaryScanner

public SimpleBoundaryScanner(Character[] boundaryChars)

SimpleBoundaryScanner

public SimpleBoundaryScanner(int maxScan,
                             Character[] boundaryChars)

SimpleBoundaryScanner

public SimpleBoundaryScanner(int maxScan,
                             Set<Character> boundaryChars)
Method Detail

findStartOffset

public int findStartOffset(StringBuilder buffer,
                           int start)
Description copied from interface: BoundaryScanner
Scan backward to find end offset.

Specified by:
findStartOffset in interface BoundaryScanner
Parameters:
buffer - scanned object
start - start offset to begin
Returns:
the found start offset

findEndOffset

public int findEndOffset(StringBuilder buffer,
                         int start)
Description copied from interface: BoundaryScanner
Scan forward to find start offset.

Specified by:
findEndOffset in interface BoundaryScanner
Parameters:
buffer - scanned object
start - start offset to begin
Returns:
the found end offset
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleFragListBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class SimpleFragListBuilder

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder
All Implemented Interfaces:
FragListBuilder
public class SimpleFragListBuilder
extends Object
implements FragListBuilder

A simple implementation of FragListBuilder.

Field Summary
static int | MARGIN_DEFAULT
static int | MIN_FRAG_CHAR_SIZE_FACTOR
Constructor Summary
SimpleFragListBuilder()
SimpleFragListBuilder(int margin)
Method Summary
 FieldFragList createFieldFragList(FieldPhraseList fieldPhraseList, int fragCharSize)
create a FieldFragList.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

MARGIN_DEFAULT

public static final int MARGIN_DEFAULT
See Also:
Constant Field Values

MIN_FRAG_CHAR_SIZE_FACTOR

public static final int MIN_FRAG_CHAR_SIZE_FACTOR
See Also:
Constant Field Values
Constructor Detail

SimpleFragListBuilder

public SimpleFragListBuilder(int margin)

SimpleFragListBuilder

public SimpleFragListBuilder()
Method Detail

createFieldFragList

public FieldFragList createFieldFragList(FieldPhraseList fieldPhraseList,
                                         int fragCharSize)
Description copied from interface: FragListBuilder
create a FieldFragList.

Specified by:
createFieldFragList in interface FragListBuilder
Parameters:
fieldPhraseList - FieldPhraseList object
fragCharSize - the length (number of chars) of a fragment
Returns:
the created FieldFragList object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleFragmentsBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class SimpleFragmentsBuilder

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder
        extended by  org.apache.lucene.search.vectorhighlight.SimpleFragmentsBuilder
All Implemented Interfaces:
FragmentsBuilder
public class SimpleFragmentsBuilder
extends BaseFragmentsBuilder

A simple implementation of FragmentsBuilder.

Field Summary
Fields inherited from class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder
COLORED_POST_TAGS, COLORED_PRE_TAGS, postTags, preTags
Constructor Summary
SimpleFragmentsBuilder()
a constructor.
SimpleFragmentsBuilder(BoundaryScanner bs)
SimpleFragmentsBuilder(String[] preTags, String[] postTags)
a constructor.
SimpleFragmentsBuilder(String[] preTags, String[] postTags, BoundaryScanner bs)
Method Summary
 List<FieldFragList.WeightedFragInfo> getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src)
do nothing.
Methods inherited from class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder
createFragment, createFragment, createFragments, createFragments, getFields, getFieldValues, getFragmentSource, getFragmentSource, getFragmentSourceMSO, getMultiValuedSeparator, getPostTag, getPostTag, getPreTag, getPreTag, makeFragment, makeFragment, setMultiValuedSeparator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SimpleFragmentsBuilder

public SimpleFragmentsBuilder()
a constructor.

SimpleFragmentsBuilder

public SimpleFragmentsBuilder(String[] preTags,
                              String[] postTags)
a constructor.

Parameters:
preTags - array of pre-tags for markup terms.
postTags - array of post-tags for markup terms.

SimpleFragmentsBuilder

public SimpleFragmentsBuilder(BoundaryScanner bs)

SimpleFragmentsBuilder

public SimpleFragmentsBuilder(String[] preTags,
                              String[] postTags,
                              BoundaryScanner bs)
Method Detail

getWeightedFragInfoList

public List<FieldFragList.WeightedFragInfo> getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src)
do nothing. return the source list.

Specified by:
getWeightedFragInfoList in class BaseFragmentsBuilder
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SingleFragListBuilder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.search.vectorhighlight
Class SingleFragListBuilder

java.lang.Object
    extended by  org.apache.lucene.search.vectorhighlight.SingleFragListBuilder
All Implemented Interfaces:
FragListBuilder
public class SingleFragListBuilder
extends Object
implements FragListBuilder

An implementation class of FragListBuilder that generates one FieldFragList.WeightedFragInfo object. Typical use case of this class is that you can get an entire field contents by using both of this class and SimpleFragmentsBuilder.

 FastVectorHighlighter h = new FastVectorHighlighter( true, true,
   new SingleFragListBuilder(), new SimpleFragmentsBuilder() );

Constructor Summary
SingleFragListBuilder()
Method Summary
 FieldFragList createFieldFragList(FieldPhraseList fieldPhraseList, int fragCharSize)
create a FieldFragList.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SingleFragListBuilder

public SingleFragListBuilder()
Method Detail

createFieldFragList

public FieldFragList createFieldFragList(FieldPhraseList fieldPhraseList,
                                         int fragCharSize)
Description copied from interface: FragListBuilder
create a FieldFragList.

Specified by:
createFieldFragList in interface FragListBuilder
Parameters:
fieldPhraseList - FieldPhraseList object
fragCharSize - the length (number of chars) of a fragment
Returns:
the created FieldFragList object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.BaseFragmentsBuilder

Packages that use BaseFragmentsBuilder
org.apache.lucene.search.vectorhighlight This is an another highlighter implementation.

Uses of BaseFragmentsBuilder in org.apache.lucene.search.vectorhighlight

Subclasses of BaseFragmentsBuilder in org.apache.lucene.search.vectorhighlight
class | ScoreOrderFragmentsBuilder An implementation of FragmentsBuilder that outputs score-order fragments.
class | SimpleFragmentsBuilder A simple implementation of FragmentsBuilder.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.vectorhighlight.BoundaryScanner

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.vectorhighlight.BoundaryScanner

Packages that use BoundaryScanner
org.apache.lucene.search.vectorhighlight This is an another highlighter implementation.

Uses of BoundaryScanner in org.apache.lucene.search.vectorhighlight

Classes in org.apache.lucene.search.vectorhighlight that implement BoundaryScanner
class | BreakIteratorBoundaryScanner A BoundaryScanner implementation that uses BreakIterator to find boundaries in the text.
class | SimpleBoundaryScanner

Constructors in org.apache.lucene.search.vectorhighlight with parameters of type BoundaryScanner
BaseFragmentsBuilder(BoundaryScanner boundaryScanner)
BaseFragmentsBuilder(String[] preTags, String[] postTags, BoundaryScanner boundaryScanner)
ScoreOrderFragmentsBuilder(BoundaryScanner bs)
ScoreOrderFragmentsBuilder(String[] preTags, String[] postTags, BoundaryScanner bs)
SimpleFragmentsBuilder(BoundaryScanner bs)
SimpleFragmentsBuilder(String[] preTags, String[] postTags, BoundaryScanner bs)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.BreakIteratorBoundaryScanner

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.BreakIteratorBoundaryScanner

No usage of org.apache.lucene.search.vectorhighlight.BreakIteratorBoundaryScanner

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.FastVectorHighlighter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.FastVectorHighlighter

Packages that use FastVectorHighlighter
org.apache.lucene.benchmark.byTask.tasks Extendable benchmark tasks.

Uses of FastVectorHighlighter in org.apache.lucene.benchmark.byTask.tasks

Fields in org.apache.lucene.benchmark.byTask.tasks declared as FastVectorHighlighter
protected  FastVectorHighlighter SearchTravRetVectorHighlightTask.highlighter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.FieldFragList

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.FieldFragList

Packages that use FieldFragList
org.apache.lucene.search.vectorhighlight This is an another highlighter implementation.

Uses of FieldFragList in org.apache.lucene.search.vectorhighlight

Methods in org.apache.lucene.search.vectorhighlight that return FieldFragList
FieldFragList | SingleFragListBuilder.createFieldFragList(FieldPhraseList fieldPhraseList, int fragCharSize)
FieldFragList | FragListBuilder.createFieldFragList(FieldPhraseList fieldPhraseList, int fragCharSize) create a FieldFragList.
FieldFragList | SimpleFragListBuilder.createFieldFragList(FieldPhraseList fieldPhraseList, int fragCharSize)

Methods in org.apache.lucene.search.vectorhighlight with parameters of type FieldFragList
String | FragmentsBuilder.createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList) create a fragment.
String | BaseFragmentsBuilder.createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList)
String | FragmentsBuilder.createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, String[] preTags, String[] postTags, Encoder encoder) create a fragment.
String | BaseFragmentsBuilder.createFragment(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, String[] preTags, String[] postTags, Encoder encoder)
String[] | FragmentsBuilder.createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments) create multiple fragments.
String[] | BaseFragmentsBuilder.createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments)
String[] | FragmentsBuilder.createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments, String[] preTags, String[] postTags, Encoder encoder) create multiple fragments.
String[] | BaseFragmentsBuilder.createFragments(IndexReader reader, int docId, String fieldName, FieldFragList fieldFragList, int maxNumFragments, String[] preTags, String[] postTags, Encoder encoder)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo

Packages that use FieldFragList.WeightedFragInfo
org.apache.lucene.search.vectorhighlight This is an another highlighter implementation.

Uses of FieldFragList.WeightedFragInfo in org.apache.lucene.search.vectorhighlight

Methods in org.apache.lucene.search.vectorhighlight that return types with arguments of type FieldFragList.WeightedFragInfo
List<FieldFragList.WeightedFragInfo> | FieldFragList.getFragInfos() return the list of WeightedFragInfos.
List<FieldFragList.WeightedFragInfo> | SimpleFragmentsBuilder.getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src) do nothing.
abstract List<FieldFragList.WeightedFragInfo> | BaseFragmentsBuilder.getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src)
List<FieldFragList.WeightedFragInfo> | ScoreOrderFragmentsBuilder.getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src) Sort by score the list of WeightedFragInfo

Methods in org.apache.lucene.search.vectorhighlight with parameters of type FieldFragList.WeightedFragInfo
int | ScoreOrderFragmentsBuilder.ScoreComparator.compare(FieldFragList.WeightedFragInfo o1, FieldFragList.WeightedFragInfo o2)
protected String | BaseFragmentsBuilder.makeFragment(StringBuilder buffer, int[] index, Field[] values, FieldFragList.WeightedFragInfo fragInfo, String[] preTags, String[] postTags, Encoder encoder)
protected String | BaseFragmentsBuilder.makeFragment(StringBuilder buffer, int[] index, String[] values, FieldFragList.WeightedFragInfo fragInfo) Deprecated.

Method parameters in org.apache.lucene.search.vectorhighlight with type arguments of type FieldFragList.WeightedFragInfo
List<FieldFragList.WeightedFragInfo> | SimpleFragmentsBuilder.getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src) do nothing.
abstract List<FieldFragList.WeightedFragInfo> | BaseFragmentsBuilder.getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src)
List<FieldFragList.WeightedFragInfo> | ScoreOrderFragmentsBuilder.getWeightedFragInfoList(List<FieldFragList.WeightedFragInfo> src) Sort by score the list of WeightedFragInfo

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo.SubInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.FieldFragList.WeightedFragInfo.SubInfo

Packages that use FieldFragList.WeightedFragInfo.SubInfo
org.apache.lucene.search.vectorhighlight This is an another highlighter implementation.

Uses of FieldFragList.WeightedFragInfo.SubInfo in org.apache.lucene.search.vectorhighlight

Methods in org.apache.lucene.search.vectorhighlight that return types with arguments of type FieldFragList.WeightedFragInfo.SubInfo
 List<FieldFragList.WeightedFragInfo.SubInfo> FieldFragList.WeightedFragInfo.getSubInfos()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.FieldPhraseList

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.FieldPhraseList

Packages that use FieldPhraseList
org.apache.lucene.search.vectorhighlight This is an another highlighter implementation.

Uses of FieldPhraseList in org.apache.lucene.search.vectorhighlight

Methods in org.apache.lucene.search.vectorhighlight with parameters of type FieldPhraseList
FieldFragList | SingleFragListBuilder.createFieldFragList(FieldPhraseList fieldPhraseList, int fragCharSize)
FieldFragList | FragListBuilder.createFieldFragList(FieldPhraseList fieldPhraseList, int fragCharSize) create a FieldFragList.
FieldFragList | SimpleFragListBuilder.createFieldFragList(FieldPhraseList fieldPhraseList, int fragCharSize)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo

Packages that use FieldPhraseList.WeightedPhraseInfo
org.apache.lucene.search.vectorhighlight This is an another highlighter implementation.

Uses of FieldPhraseList.WeightedPhraseInfo in org.apache.lucene.search.vectorhighlight

Methods in org.apache.lucene.search.vectorhighlight with parameters of type FieldPhraseList.WeightedPhraseInfo
 boolean FieldPhraseList.WeightedPhraseInfo.isOffsetOverlap(FieldPhraseList.WeightedPhraseInfo other)

Method parameters in org.apache.lucene.search.vectorhighlight with type arguments of type FieldPhraseList.WeightedPhraseInfo
 void FieldFragList.add(int startOffset, int endOffset, List<FieldPhraseList.WeightedPhraseInfo> phraseInfoList)
convert the list of WeightedPhraseInfo to WeightedFragInfo, then add it to the fragInfos

Constructor parameters in org.apache.lucene.search.vectorhighlight with type arguments of type FieldPhraseList.WeightedPhraseInfo
FieldFragList.WeightedFragInfo(int startOffset, int endOffset, List<FieldPhraseList.WeightedPhraseInfo> phraseInfoList)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo.Toffs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.FieldPhraseList.WeightedPhraseInfo.Toffs

Packages that use FieldPhraseList.WeightedPhraseInfo.Toffs
org.apache.lucene.search.vectorhighlight This is an another highlighter implementation.

Uses of FieldPhraseList.WeightedPhraseInfo.Toffs in org.apache.lucene.search.vectorhighlight

Methods in org.apache.lucene.search.vectorhighlight that return types with arguments of type FieldPhraseList.WeightedPhraseInfo.Toffs
 List<FieldPhraseList.WeightedPhraseInfo.Toffs> FieldFragList.WeightedFragInfo.SubInfo.getTermsOffsets()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.FieldQuery

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.FieldQuery

Packages that use FieldQuery
org.apache.lucene.search.vectorhighlight This is an another highlighter implementation.

Uses of FieldQuery in org.apache.lucene.search.vectorhighlight

Methods in org.apache.lucene.search.vectorhighlight that return FieldQuery
FieldQuery | FastVectorHighlighter.getFieldQuery(Query query) create a FieldQuery object.
FieldQuery | FastVectorHighlighter.getFieldQuery(Query query, IndexReader reader) create a FieldQuery object.

Methods in org.apache.lucene.search.vectorhighlight with parameters of type FieldQuery
String | FastVectorHighlighter.getBestFragment(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize) return the best fragment.
String | FastVectorHighlighter.getBestFragment(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder, String[] preTags, String[] postTags, Encoder encoder) return the best fragment.
String[] | FastVectorHighlighter.getBestFragments(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, int maxNumFragments) return the best fragments.
String[] | FastVectorHighlighter.getBestFragments(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, int maxNumFragments, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder, String[] preTags, String[] postTags, Encoder encoder) return the best fragments.

Constructors in org.apache.lucene.search.vectorhighlight with parameters of type FieldQuery
FieldPhraseList(FieldTermStack fieldTermStack, FieldQuery fieldQuery)
create a FieldPhraseList that has no limit on the number of phrases to analyze
FieldPhraseList(FieldTermStack fieldTermStack, FieldQuery fieldQuery, int phraseLimit)
a constructor.
FieldQuery.QueryPhraseMap(FieldQuery fieldQuery)
FieldTermStack(IndexReader reader, int docId, String fieldName, FieldQuery fieldQuery)
a constructor.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.FieldQuery.QueryPhraseMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.FieldQuery.QueryPhraseMap

Packages that use FieldQuery.QueryPhraseMap
org.apache.lucene.search.vectorhighlight This is an another highlighter implementation.

Uses of FieldQuery.QueryPhraseMap in org.apache.lucene.search.vectorhighlight

Methods in org.apache.lucene.search.vectorhighlight that return FieldQuery.QueryPhraseMap
FieldQuery.QueryPhraseMap | FieldQuery.getFieldTermMap(String fieldName, String term)
FieldQuery.QueryPhraseMap | FieldQuery.QueryPhraseMap.getTermMap(String term)
FieldQuery.QueryPhraseMap | FieldQuery.QueryPhraseMap.searchPhrase(List<FieldTermStack.TermInfo> phraseCandidate)
FieldQuery.QueryPhraseMap | FieldQuery.searchPhrase(String fieldName, List<FieldTermStack.TermInfo> phraseCandidate)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.FieldTermStack

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.FieldTermStack

Packages that use FieldTermStack
org.apache.lucene.search.vectorhighlight This is an another highlighter implementation.

Uses of FieldTermStack in org.apache.lucene.search.vectorhighlight

Constructors in org.apache.lucene.search.vectorhighlight with parameters of type FieldTermStack
FieldPhraseList(FieldTermStack fieldTermStack, FieldQuery fieldQuery)
create a FieldPhraseList that has no limit on the number of phrases to analyze
FieldPhraseList(FieldTermStack fieldTermStack, FieldQuery fieldQuery, int phraseLimit)
a constructor.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.FieldTermStack.TermInfo

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.FieldTermStack.TermInfo

Packages that use FieldTermStack.TermInfo
org.apache.lucene.search.vectorhighlight This is an another highlighter implementation.

Uses of FieldTermStack.TermInfo in org.apache.lucene.search.vectorhighlight

Methods in org.apache.lucene.search.vectorhighlight that return FieldTermStack.TermInfo
 FieldTermStack.TermInfo FieldTermStack.pop()

Methods in org.apache.lucene.search.vectorhighlight with parameters of type FieldTermStack.TermInfo
int | FieldTermStack.TermInfo.compareTo(FieldTermStack.TermInfo o)
void | FieldTermStack.push(FieldTermStack.TermInfo termInfo)

Method parameters in org.apache.lucene.search.vectorhighlight with type arguments of type FieldTermStack.TermInfo
boolean | FieldQuery.QueryPhraseMap.isValidTermOrPhrase(List<FieldTermStack.TermInfo> phraseCandidate)
FieldQuery.QueryPhraseMap | FieldQuery.QueryPhraseMap.searchPhrase(List<FieldTermStack.TermInfo> phraseCandidate)
FieldQuery.QueryPhraseMap | FieldQuery.searchPhrase(String fieldName, List<FieldTermStack.TermInfo> phraseCandidate)

Constructor parameters in org.apache.lucene.search.vectorhighlight with type arguments of type FieldTermStack.TermInfo
FieldPhraseList.WeightedPhraseInfo(LinkedList<FieldTermStack.TermInfo> terms, float boost)
FieldPhraseList.WeightedPhraseInfo(LinkedList<FieldTermStack.TermInfo> terms, float boost, int number)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.vectorhighlight.FragListBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.vectorhighlight.FragListBuilder

Packages that use FragListBuilder
org.apache.lucene.search.vectorhighlight This is an another highlighter implementation.

Uses of FragListBuilder in org.apache.lucene.search.vectorhighlight

Classes in org.apache.lucene.search.vectorhighlight that implement FragListBuilder
class | SimpleFragListBuilder A simple implementation of FragListBuilder.
class | SingleFragListBuilder An implementation class of FragListBuilder that generates one FieldFragList.WeightedFragInfo object.

Methods in org.apache.lucene.search.vectorhighlight with parameters of type FragListBuilder
String | FastVectorHighlighter.getBestFragment(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder, String[] preTags, String[] postTags, Encoder encoder) return the best fragment.
String[] | FastVectorHighlighter.getBestFragments(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, int maxNumFragments, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder, String[] preTags, String[] postTags, Encoder encoder) return the best fragments.

Constructors in org.apache.lucene.search.vectorhighlight with parameters of type FragListBuilder
FastVectorHighlighter(boolean phraseHighlight, boolean fieldMatch, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder)
a constructor.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.search.vectorhighlight.FragmentsBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.search.vectorhighlight.FragmentsBuilder

Packages that use FragmentsBuilder
org.apache.lucene.search.vectorhighlight This is an another highlighter implementation.

Uses of FragmentsBuilder in org.apache.lucene.search.vectorhighlight

Classes in org.apache.lucene.search.vectorhighlight that implement FragmentsBuilder
class | BaseFragmentsBuilder
class | ScoreOrderFragmentsBuilder An implementation of FragmentsBuilder that outputs score-order fragments.
class | SimpleFragmentsBuilder A simple implementation of FragmentsBuilder.

Methods in org.apache.lucene.search.vectorhighlight with parameters of type FragmentsBuilder
String | FastVectorHighlighter.getBestFragment(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder, String[] preTags, String[] postTags, Encoder encoder) return the best fragment.
String[] | FastVectorHighlighter.getBestFragments(FieldQuery fieldQuery, IndexReader reader, int docId, String fieldName, int fragCharSize, int maxNumFragments, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder, String[] preTags, String[] postTags, Encoder encoder) return the best fragments.

Constructors in org.apache.lucene.search.vectorhighlight with parameters of type FragmentsBuilder
FastVectorHighlighter(boolean phraseHighlight, boolean fieldMatch, FragListBuilder fragListBuilder, FragmentsBuilder fragmentsBuilder)
a constructor.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder

No usage of org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder.ScoreComparator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder.ScoreComparator

No usage of org.apache.lucene.search.vectorhighlight.ScoreOrderFragmentsBuilder.ScoreComparator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner

No usage of org.apache.lucene.search.vectorhighlight.SimpleBoundaryScanner

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder

No usage of org.apache.lucene.search.vectorhighlight.SimpleFragListBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.SimpleFragmentsBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.SimpleFragmentsBuilder

No usage of org.apache.lucene.search.vectorhighlight.SimpleFragmentsBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.search.vectorhighlight.SingleFragListBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.search.vectorhighlight.SingleFragListBuilder

No usage of org.apache.lucene.search.vectorhighlight.SingleFragListBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


DistanceUtils

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial
Class DistanceUtils

java.lang.Object
    extended by  org.apache.lucene.spatial.DistanceUtils
Deprecated.

@Deprecated
public class DistanceUtils
extends Object

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Field Summary
static double | DEG_180_AS_RADS Deprecated.
static double | DEG_225_AS_RADS Deprecated.
static double | DEG_270_AS_RADS Deprecated.
static double | DEG_45_AS_RADS Deprecated.
static double | DEG_90_AS_RADS Deprecated.
static double | DEGREES_TO_RADIANS Deprecated.
static double | EARTH_EQUATORIAL_RADIUS_KM Deprecated.
static double | EARTH_EQUATORIAL_RADIUS_MI Deprecated.
static double | EARTH_MEAN_RADIUS_KM Deprecated. The International Union of Geodesy and Geophysics says the Earth's mean radius in KM is: [1] http://en.wikipedia.org/wiki/Earth_radius
static double | EARTH_MEAN_RADIUS_MI Deprecated.
static double | KM_TO_MILES Deprecated.
static double | MILES_TO_KM Deprecated.
static double | RADIANS_TO_DEGREES Deprecated.
static double | SIN_45_AS_RADS Deprecated.
Constructor Summary
DistanceUtils()
Deprecated.
Method Summary
static double angularDistance(double distance, double radius)
Deprecated. distance/radius.
static Rectangle getBoundary(double x1, double y1, double miles)
Deprecated.
static double getDistanceMi(double x1, double y1, double x2, double y2)
Deprecated.
static double getLLMDistance(double x1, double y1, double x2, double y2)
Deprecated.
static double haversine(double y1, double x1, double y2, double x2, double radius)
Deprecated. Computes the haversine distance between two points.
static double[] latLonCorner(double latCenter, double lonCenter, double distance, double[] result, boolean upperRight, double sphereRadius)
Deprecated. Uses Haversine to calculate the corner of a box (upper right or lower left) that is the distance away, given a sphere of the specified radius.
static double[] latLonCornerDegs(double latCenter, double lonCenter, double distance, double[] result, boolean upperRight, double sphereRadius)
Deprecated.
static void normLat(double[] latLng)
Deprecated.
static void normLng(double[] latLng)
Deprecated. Returns a normalized Lng rectangle shape for the bounding box
static double[] parseLatitudeLongitude(double[] latLon, String latLonStr)
Deprecated. extract (by calling parsePoint(String[], String, int) and validate the latitude and longitude contained in the String by making sure the latitude is between 90 & -90 and longitude is between -180 and 180.
static double[] parseLatitudeLongitude(String latLonStr)
Deprecated.
static String[] parsePoint(String[] out, String externalVal, int dimension)
Deprecated. Given a string containing dimension values encoded in it, separated by commas, return a String array of length dimension containing the values.
static double[] parsePointDouble(double[] out, String externalVal, int dimension)
Deprecated. Given a string containing dimension values encoded in it, separated by commas, return a double array of length dimension containing the values.
static double[] pointOnBearing(double startLat, double startLon, double distance, double bearing, double[] result, double sphereRadius)
Deprecated. Given a start point (startLat, startLon) and a bearing on a sphere of radius sphereRadius, return the destination point.
static double squaredEuclideanDistance(double[] vec1, double[] vec2)
Deprecated. The square of the Euclidean Distance.
static double[] vectorBoxCorner(double[] center, double[] result, double distance, boolean upperRight)
Deprecated. Return the coordinates of a vector that is the corner of a box (upper right or lower left), assuming a Rectangular coordinate system.
static double vectorDistance(double[] vec1, double[] vec2, double power)
Deprecated. Calculate the p-norm (i.e.
static double vectorDistance(double[] vec1, double[] vec2, double power, double oneOverPower)
Deprecated. Calculate the p-norm (i.e.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEGREES_TO_RADIANS

public static final double DEGREES_TO_RADIANS
Deprecated.
See Also:
Constant Field Values

RADIANS_TO_DEGREES

public static final double RADIANS_TO_DEGREES
Deprecated.
See Also:
Constant Field Values

DEG_45_AS_RADS

public static final double DEG_45_AS_RADS
Deprecated.
See Also:
Constant Field Values

SIN_45_AS_RADS

public static final double SIN_45_AS_RADS
Deprecated.

DEG_90_AS_RADS

public static final double DEG_90_AS_RADS
Deprecated.
See Also:
Constant Field Values

DEG_180_AS_RADS

public static final double DEG_180_AS_RADS
Deprecated.
See Also:
Constant Field Values

DEG_225_AS_RADS

public static final double DEG_225_AS_RADS
Deprecated.
See Also:
Constant Field Values

DEG_270_AS_RADS

public static final double DEG_270_AS_RADS
Deprecated.
See Also:
Constant Field Values

KM_TO_MILES

public static final double KM_TO_MILES
Deprecated.
See Also:
Constant Field Values

MILES_TO_KM

public static final double MILES_TO_KM
Deprecated.
See Also:
Constant Field Values

EARTH_MEAN_RADIUS_KM

public static final double EARTH_MEAN_RADIUS_KM
Deprecated.
The International Union of Geodesy and Geophysics says the Earth's mean radius in KM is: [1] http://en.wikipedia.org/wiki/Earth_radius

See Also:
Constant Field Values

EARTH_MEAN_RADIUS_MI

public static final double EARTH_MEAN_RADIUS_MI
Deprecated.
See Also:
Constant Field Values

EARTH_EQUATORIAL_RADIUS_MI

public static final double EARTH_EQUATORIAL_RADIUS_MI
Deprecated.
See Also:
Constant Field Values

EARTH_EQUATORIAL_RADIUS_KM

public static final double EARTH_EQUATORIAL_RADIUS_KM
Deprecated.
See Also:
Constant Field Values
Constructor Detail

DistanceUtils

public DistanceUtils()
Deprecated.
Method Detail

getDistanceMi

public static double getDistanceMi(double x1,
                                   double y1,
                                   double x2,
                                   double y2)
Deprecated.

getBoundary

public static Rectangle getBoundary(double x1,
                                    double y1,
                                    double miles)
Deprecated.
Parameters:
x1 -
y1 -
miles -
Returns:
boundary rectangle where getY/getX is top left, getMinY/getMinX is bottom right

getLLMDistance

public static double getLLMDistance(double x1,
                                    double y1,
                                    double x2,
                                    double y2)
Deprecated.

angularDistance

public static double angularDistance(double distance,
                                     double radius)
Deprecated.
distance/radius.

Parameters:
distance - The distance travelled
radius - The radius of the sphere
Returns:
The angular distance, in radians

vectorDistance

public static double vectorDistance(double[] vec1,
                                    double[] vec2,
                                    double power)
Deprecated.
Calculate the p-norm (i.e. length) beteen two vectors

Parameters:
vec1 - The first vector
vec2 - The second vector
power - The power (2 for Euclidean distance, 1 for manhattan, etc.)
Returns:
The length.

See http://en.wikipedia.org/wiki/Lp_space

See Also:
vectorDistance(double[], double[], double, double)

vectorDistance

public static double vectorDistance(double[] vec1,
                                    double[] vec2,
                                    double power,
                                    double oneOverPower)
Deprecated.
Calculate the p-norm (i.e. length) between two vectors

Parameters:
vec1 - The first vector
vec2 - The second vector
power - The power (2 for Euclidean distance, 1 for manhattan, etc.)
oneOverPower - If you've precalculated oneOverPower and cached it, use this method to save one division operation over vectorDistance(double[], double[], double).
Returns:
The length.

vectorBoxCorner

public static double[] vectorBoxCorner(double[] center,
                                       double[] result,
                                       double distance,
                                       boolean upperRight)
Deprecated.
Return the coordinates of a vector that is the corner of a box (upper right or lower left), assuming a Rectangular coordinate system. Note, this does not apply for points on a sphere or ellipse (although it could be used as an approximatation).

Parameters:
center - The center point
result - Holds the result, potentially resizing if needed.
distance - The d from the center to the corner
upperRight - If true, return the coords for the upper right corner, else return the lower left.
Returns:
The point, either the upperLeft or the lower right

latLonCornerDegs

public static double[] latLonCornerDegs(double latCenter,
                                        double lonCenter,
                                        double distance,
                                        double[] result,
                                        boolean upperRight,
                                        double sphereRadius)
Deprecated.
Parameters:
latCenter - In degrees
lonCenter - In degrees
distance - The distance
result - A preallocated array to hold the results. If null, a new one is constructed.
upperRight - If true, calculate the upper right corner, else the lower left
sphereRadius - The radius of the sphere to use.
Returns:
The Lat/Lon in degrees
See Also:
latLonCorner(double, double, double, double[], boolean, double)

latLonCorner

public static double[] latLonCorner(double latCenter,
                                    double lonCenter,
                                    double distance,
                                    double[] result,
                                    boolean upperRight,
                                    double sphereRadius)
Deprecated.
Uses Haversine to calculate the corner of a box (upper right or lower left) that is the distance away, given a sphere of the specified radius. NOTE: This is not the same as calculating a box that transcribes a circle of the given distance.

Parameters:
latCenter - In radians
lonCenter - In radians
distance - The distance
result - A preallocated array to hold the results. If null, a new one is constructed.
upperRight - If true, give lat/lon for the upper right corner, else lower left
sphereRadius - The radius to use for the calculation
Returns:
The Lat/Lon in Radians

pointOnBearing

public static double[] pointOnBearing(double startLat,
                                      double startLon,
                                      double distance,
                                      double bearing,
                                      double[] result,
                                      double sphereRadius)
Deprecated.
Given a start point (startLat, startLon) and a bearing on a sphere of radius sphereRadius, return the destination point.

Parameters:
startLat - The starting point latitude, in radians
startLon - The starting point longitude, in radians
distance - The distance to travel along the bearing. The units are assumed to be the same as the sphereRadius units, both of which is up to the caller to know
bearing - The bearing, in radians. North is a 0 deg. bearing, east is 90 deg, south is 180 deg, west is 270 deg.
result - A preallocated array to hold the results. If null, a new one is constructed.
sphereRadius - The radius of the sphere to use for the calculation.
Returns:
The destination point, in radians. First entry is latitude, second is longitude

normLat

public static void normLat(double[] latLng)
Deprecated.
Parameters:
latLng - The lat/lon, in radians. lat in position 0, long in position 1

normLng

public static void normLng(double[] latLng)
Deprecated.
Returns a normalized Lng rectangle shape for the bounding box

Parameters:
latLng - The lat/lon, in radians, lat in position 0, long in position 1

squaredEuclideanDistance

public static double squaredEuclideanDistance(double[] vec1,
                                              double[] vec2)
Deprecated.
The square of the Euclidean Distance. Not really a distance, but useful if all that matters is comparing the result to another one.

Parameters:
vec1 - The first point
vec2 - The second point
Returns:
The squared Euclidean distance

haversine

public static double haversine(double y1,
                               double x1,
                               double y2,
                               double x2,
                               double radius)
Deprecated.
Computes the haversine distance between two points. The arguments are in radians and provided in lat,lon order.

Parameters:
y1 - The y coordinate of the first point, in radians
x1 - The x coordinate of the first point, in radians
y2 - The y coordinate of the second point, in radians
x2 - The x coordinate of the second point, in radians
radius - The radius of the sphere
Returns:
The distance between the two points, as determined by the haversine formula.

parsePoint

public static String[] parsePoint(String[] out,
                                  String externalVal,
                                  int dimension)
                           throws InvalidGeoException
Deprecated.
Given a string containing dimension values encoded in it, separated by commas, return a String array of length dimension containing the values.

Parameters:
out - A preallocated array. Must be size dimension. If it is not it will be resized.
externalVal - The value to parse
dimension - The expected number of values for the point
Returns:
An array of the values that make up the point (aka vector)
Throws:
InvalidGeoException - if the dimension specified does not match the number of values in the externalValue.

parsePointDouble

public static double[] parsePointDouble(double[] out,
                                        String externalVal,
                                        int dimension)
                                 throws InvalidGeoException
Deprecated.
Given a string containing dimension values encoded in it, separated by commas, return a double array of length dimension containing the values.

Parameters:
out - A preallocated array. Must be size dimension. If it is not it will be resized.
externalVal - The value to parse
dimension - The expected number of values for the point
Returns:
An array of the values that make up the point (aka vector)
Throws:
InvalidGeoException - if the dimension specified does not match the number of values in the externalValue.

parseLatitudeLongitude

public static final double[] parseLatitudeLongitude(String latLonStr)
                                             throws InvalidGeoException
Deprecated.
Throws:
InvalidGeoException

parseLatitudeLongitude

public static final double[] parseLatitudeLongitude(double[] latLon,
                                                    String latLonStr)
                                             throws InvalidGeoException
Deprecated.
extract (by calling parsePoint(String[], String, int) and validate the latitude and longitude contained in the String by making sure the latitude is between 90 & -90 and longitude is between -180 and 180.

The latitude is assumed to be the first part of the string and the longitude the second part.

Parameters:
latLon - A preallocated array to hold the result
latLonStr - The string to parse. Latitude is the first value, longitude is the second.
Returns:
The lat long
Throws:
InvalidGeoException - if there was an error parsing
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.spatial
Classes
DistanceUtils


org.apache.lucene.spatial

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.spatial

Support for geospatial search.

See:
Description

Class Summary
DistanceUtils Deprecated.

Package org.apache.lucene.spatial Description

Support for geospatial search.


org.apache.lucene.spatial Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.spatial

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.spatial.DistanceUtils


Uses of Package org.apache.lucene.spatial

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.spatial

No usage of org.apache.lucene.spatial

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.DistanceUtils

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.DistanceUtils

No usage of org.apache.lucene.spatial.DistanceUtils

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


GeoHashDistanceFilter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.geohash
Class GeoHashDistanceFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.spatial.tier.DistanceFilter
            extended by  org.apache.lucene.spatial.geohash.GeoHashDistanceFilter
All Implemented Interfaces:
Serializable
Deprecated.

@Deprecated
public class GeoHashDistanceFilter
extends DistanceFilter

NOTE: This API is still in flux and might change in incompatible ways in the next release.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.spatial.tier.DistanceFilter
distance, distanceLookupCache, distances, nextDocBase, precise, startingFilter
Constructor Summary
GeoHashDistanceFilter(Filter startingFilter, double lat, double lng, double miles, String geoHashField)
Deprecated. Provide a distance filter based from a center point with a radius in miles
Method Summary
boolean | equals(Object o) Deprecated. Returns true if o is equal to this.
DocIdSet | getDocIdSet(IndexReader reader) Deprecated. Creates a DocIdSet enumerating the documents that should be permitted in search results.
int | hashCode() Deprecated. Returns a hash code value for this object.
Methods inherited from class org.apache.lucene.spatial.tier.DistanceFilter
getDistance, getDistances, reset, setDistances
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GeoHashDistanceFilter

public GeoHashDistanceFilter(Filter startingFilter,
                             double lat,
                             double lng,
                             double miles,
                             String geoHashField)
Deprecated.
Provide a distance filter based from a center point with a radius in miles

Parameters:
startingFilter -
lat -
lng -
miles -
Method Detail

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Deprecated.
Description copied from class: Filter
Creates a DocIdSet enumerating the documents that should be permitted in search results. NOTE: null can be returned if no documents are accepted by this Filter.

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet

equals

public boolean equals(Object o)
Deprecated.
Returns true if o is equal to this.

Specified by:
equals in class DistanceFilter

hashCode

public int hashCode()
Deprecated.
Returns a hash code value for this object.

Specified by:
hashCode in class DistanceFilter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


GeoHashUtils

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.geohash
Class GeoHashUtils

java.lang.Object
    extended by  org.apache.lucene.spatial.geohash.GeoHashUtils
Deprecated.

@Deprecated
public class GeoHashUtils
extends Object

Utilities for encoding and decoding geohashes. Based on http://en.wikipedia.org/wiki/Geohash.

Method Summary
static double[] | decode(String geohash) Deprecated. Decodes the given geohash into a latitude and longitude
static String | encode(double latitude, double longitude) Deprecated. Encodes the given latitude and longitude into a geohash
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

encode

public static String encode(double latitude,
                            double longitude)
Deprecated.
Encodes the given latitude and longitude into a geohash

Parameters:
latitude - Latitude to encode
longitude - Longitude to encode
Returns:
Geohash encoding of the longitude and latitude

decode

public static double[] decode(String geohash)
Deprecated.
Decodes the given geohash into a latitude and longitude

Parameters:
geohash - Geohash to deocde
Returns:
Array with the latitude at index 0, and longitude at index 1
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.spatial.geohash
Classes
GeoHashDistanceFilter
GeoHashUtils


org.apache.lucene.spatial.geohash

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.spatial.geohash

Support for Geohash encoding, decoding, and filtering.

See:
Description

Class Summary
GeoHashDistanceFilter | Deprecated.
GeoHashUtils | Deprecated.

Package org.apache.lucene.spatial.geohash Description

Support for Geohash encoding, decoding, and filtering.


org.apache.lucene.spatial.geohash Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.spatial.geohash

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.search.Filter (implements java.io.Serializable)
      • org.apache.lucene.spatial.tier.DistanceFilter
        • org.apache.lucene.spatial.geohash.GeoHashDistanceFilter
    • org.apache.lucene.spatial.geohash.GeoHashUtils


Uses of Package org.apache.lucene.spatial.geohash

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.spatial.geohash

No usage of org.apache.lucene.spatial.geohash

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.geohash.GeoHashDistanceFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.geohash.GeoHashDistanceFilter

No usage of org.apache.lucene.spatial.geohash.GeoHashDistanceFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.geohash.GeoHashUtils

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.geohash.GeoHashUtils

No usage of org.apache.lucene.spatial.geohash.GeoHashUtils

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CartesianPoint

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.geometry
Class CartesianPoint

java.lang.Object
    extended by  org.apache.lucene.spatial.geometry.CartesianPoint
Deprecated.

@Deprecated
public class CartesianPoint
extends Object

Represents lat/lngs as fixed point numbers translated so that all world coordinates are in the first quadrant. The same fixed point scale as is used for FixedLatLng is employed.

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Constructor Summary
CartesianPoint(int x, int y)
Deprecated.
Method Summary
boolean | equals(Object obj) Deprecated.
int | getX() Deprecated.
int | getY() Deprecated.
int | hashCode() Deprecated.
String | toString() Deprecated.
CartesianPoint | translate(int deltaX, int deltaY) Deprecated. Return a new point translated in the x and y dimensions
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

CartesianPoint

public CartesianPoint(int x,
                      int y)
Deprecated.
Method Detail

getX

public int getX()
Deprecated.

getY

public int getY()
Deprecated.

toString

public String toString()
Deprecated.
Overrides:
toString in class Object

translate

public CartesianPoint translate(int deltaX,
                                int deltaY)
Deprecated.
Return a new point translated in the x and y dimensions

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Deprecated.
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DistanceUnits

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.spatial.geometry
Enum DistanceUnits

java.lang.Object
    extended by  java.lang.Enum<DistanceUnits>
        extended by  org.apache.lucene.spatial.geometry.DistanceUnits
All Implemented Interfaces:
Serializable, Comparable<DistanceUnits>
Deprecated.

@Deprecated
public enum DistanceUnits
extends Enum<DistanceUnits>

Enum representing difference distance units, currently only kilometers and miles

Enum Constant Summary
KILOMETERS
Deprecated.
MILES
Deprecated.
Method Summary
double | convert(double distance, DistanceUnits from) Deprecated. Converts the given distance in given DistanceUnit, to a distance in the unit represented by this
double | earthCircumference() Deprecated. Returns the circumference of the Earth
double | earthRadius() Deprecated. Returns the average earth radius
static DistanceUnits | findDistanceUnit(String unit) Deprecated. Returns the DistanceUnit which represents the given unit
String | getUnit() Deprecated. Returns the string representation of the distance unit
static DistanceUnits | valueOf(String name) Deprecated. Returns the enum constant of this type with the specified name.
static DistanceUnits[] | values() Deprecated. Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

MILES

public static final DistanceUnits MILES
Deprecated.

KILOMETERS

public static final DistanceUnits KILOMETERS
Deprecated.
Method Detail

values

public static final DistanceUnits[] values()
Deprecated.
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(DistanceUnits c : DistanceUnits.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static DistanceUnits valueOf(String name)
Deprecated.
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

findDistanceUnit

public static DistanceUnits findDistanceUnit(String unit)
Deprecated.
Returns the DistanceUnit which represents the given unit

Parameters:
unit - Unit whose DistanceUnit should be found
Returns:
DistanceUnit representing the unit
Throws:
IllegalArgumentException - if no DistanceUnit which represents the given unit is found

convert

public double convert(double distance,
                      DistanceUnits from)
Deprecated.
Converts the given distance in given DistanceUnit, to a distance in the unit represented by this

Parameters:
distance - Distance to convert
from - Unit to convert the distance from
Returns:
Given distance converted to the distance in the given unit

getUnit

public String getUnit()
Deprecated.
Returns the string representation of the distance unit

Returns:
String representation of the distance unit

earthRadius

public double earthRadius()
Deprecated.
Returns the average earth radius

Returns:
the average earth radius

earthCircumference

public double earthCircumference()
Deprecated.
Returns the circumference of the Earth

Returns:
the circumference of the Earth
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


FixedLatLng

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.geometry
Class FixedLatLng

java.lang.Object
    extended by  org.apache.lucene.spatial.geometry.LatLng
        extended by  org.apache.lucene.spatial.geometry.FixedLatLng
Deprecated.

@Deprecated
public class FixedLatLng
extends LatLng

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Field Summary
static double | SCALE_FACTOR Deprecated.
static int | SCALE_FACTOR_INT Deprecated.
Constructor Summary
FixedLatLng(int lat, int lng)
Deprecated.
FixedLatLng(LatLng ll)
Deprecated.
Method Summary
LatLng | calculateMidpoint(LatLng other) Deprecated. Calculate the midpoint between this point an another.
LatLng | copy() Deprecated.
static int | doubleToFixed(double d) Deprecated.
boolean | equals(Object obj) Deprecated.
static double | fixedToDouble(int fixed) Deprecated.
int | getFixedLat() Deprecated.
int | getFixedLng() Deprecated.
double | getLat() Deprecated.
double | getLng() Deprecated.
int | hashCode() Deprecated.
boolean | isFixedPoint() Deprecated.
boolean | isNormalized() Deprecated.
LatLng | normalize() Deprecated.
protected void | setLat(int lat) Deprecated.
protected void | setLng(int lng) Deprecated.
FixedLatLng | toFixed() Deprecated.
FloatLatLng | toFloat() Deprecated.
Methods inherited from class org.apache.lucene.spatial.geometry.LatLng
arcDistance, arcDistance, fromCartesian, toCartesian, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

SCALE_FACTOR

public static final double SCALE_FACTOR
Deprecated.
See Also:
Constant Field Values

SCALE_FACTOR_INT

public static final int SCALE_FACTOR_INT
Deprecated.
See Also:
Constant Field Values
Constructor Detail

FixedLatLng

public FixedLatLng(int lat,
                   int lng)
Deprecated.

FixedLatLng

public FixedLatLng(LatLng ll)
Deprecated.
Method Detail

setLat

protected void setLat(int lat)
Deprecated.

setLng

protected void setLng(int lng)
Deprecated.

fixedToDouble

public static double fixedToDouble(int fixed)
Deprecated.

doubleToFixed

public static int doubleToFixed(double d)
Deprecated.

copy

public LatLng copy()
Deprecated.
Specified by:
copy in class LatLng

getFixedLat

public int getFixedLat()
Deprecated.
Specified by:
getFixedLat in class LatLng

getFixedLng

public int getFixedLng()
Deprecated.
Specified by:
getFixedLng in class LatLng

getLat

public double getLat()
Deprecated.
Specified by:
getLat in class LatLng

getLng

public double getLng()
Deprecated.
Specified by:
getLng in class LatLng

isFixedPoint

public boolean isFixedPoint()
Deprecated.
Specified by:
isFixedPoint in class LatLng

toFixed

public FixedLatLng toFixed()
Deprecated.
Specified by:
toFixed in class LatLng

toFloat

public FloatLatLng toFloat()
Deprecated.
Specified by:
toFloat in class LatLng

isNormalized

public boolean isNormalized()
Deprecated.
Specified by:
isNormalized in class LatLng

normalize

public LatLng normalize()
Deprecated.
Specified by:
normalize in class LatLng

calculateMidpoint

public LatLng calculateMidpoint(LatLng other)
Deprecated.
Description copied from class: LatLng
Calculate the midpoint between this point an another. Respects fixed vs floating point

Specified by:
calculateMidpoint in class LatLng

hashCode

public int hashCode()
Deprecated.
Specified by:
hashCode in class LatLng

equals

public boolean equals(Object obj)
Deprecated.
Specified by:
equals in class LatLng
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FloatLatLng

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.geometry
Class FloatLatLng

java.lang.Object
    extended by  org.apache.lucene.spatial.geometry.LatLng
        extended by  org.apache.lucene.spatial.geometry.FloatLatLng
Deprecated.

@Deprecated
public class FloatLatLng
extends LatLng

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Constructor Summary
FloatLatLng(double lat, double lng)
Deprecated.
FloatLatLng(LatLng ll)
Deprecated.
Method Summary
LatLng | calculateMidpoint(LatLng other) Deprecated. Calculate the midpoint between this point an another.
LatLng | copy() Deprecated.
boolean | equals(Object obj) Deprecated.
int | getFixedLat() Deprecated.
int | getFixedLng() Deprecated.
double | getLat() Deprecated.
double | getLng() Deprecated.
int | hashCode() Deprecated.
boolean | isFixedPoint() Deprecated.
boolean | isNormalized() Deprecated.
LatLng | normalize() Deprecated.
FixedLatLng | toFixed() Deprecated.
FloatLatLng | toFloat() Deprecated.
Methods inherited from class org.apache.lucene.spatial.geometry.LatLng
arcDistance, arcDistance, fromCartesian, toCartesian, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FloatLatLng

public FloatLatLng(double lat,
                   double lng)
Deprecated.

FloatLatLng

public FloatLatLng(LatLng ll)
Deprecated.
Method Detail

copy

public LatLng copy()
Deprecated.
Specified by:
copy in class LatLng

getFixedLat

public int getFixedLat()
Deprecated.
Specified by:
getFixedLat in class LatLng

getFixedLng

public int getFixedLng()
Deprecated.
Specified by:
getFixedLng in class LatLng

getLat

public double getLat()
Deprecated.
Specified by:
getLat in class LatLng

getLng

public double getLng()
Deprecated.
Specified by:
getLng in class LatLng

isFixedPoint

public boolean isFixedPoint()
Deprecated.
Specified by:
isFixedPoint in class LatLng

toFixed

public FixedLatLng toFixed()
Deprecated.
Specified by:
toFixed in class LatLng

toFloat

public FloatLatLng toFloat()
Deprecated.
Specified by:
toFloat in class LatLng

isNormalized

public boolean isNormalized()
Deprecated.
Specified by:
isNormalized in class LatLng

normalize

public LatLng normalize()
Deprecated.
Specified by:
normalize in class LatLng

calculateMidpoint

public LatLng calculateMidpoint(LatLng other)
Deprecated.
Description copied from class: LatLng
Calculate the midpoint between this point an another. Respects fixed vs floating point

Specified by:
calculateMidpoint in class LatLng

hashCode

public int hashCode()
Deprecated.
Specified by:
hashCode in class LatLng

equals

public boolean equals(Object obj)
Deprecated.
Specified by:
equals in class LatLng
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LatLng

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.geometry
Class LatLng

java.lang.Object
    extended by  org.apache.lucene.spatial.geometry.LatLng
Direct Known Subclasses:
FixedLatLng, FloatLatLng
Deprecated.

@Deprecated
public abstract class LatLng
extends Object

Abstract base lat-lng class which can manipulate fixed point or floating point based coordinates. Instances are immutable.

See Also:

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Constructor Summary
LatLng()
Deprecated.
Method Summary
double | arcDistance(LatLng ll2) Deprecated. Calculates the distance between two lat/lng's in miles.
double | arcDistance(LatLng ll2, DistanceUnits lUnits) Deprecated. Calculates the distance between two lat/lng's in miles or meters.
abstract LatLng | calculateMidpoint(LatLng other) Deprecated. Calculate the midpoint between this point an another.
abstract LatLng | copy() Deprecated.
abstract boolean | equals(Object obj) Deprecated.
static LatLng | fromCartesian(CartesianPoint pt) Deprecated. The inverse of toCartesian().
abstract int | getFixedLat() Deprecated.
abstract int | getFixedLng() Deprecated.
abstract double | getLat() Deprecated.
abstract double | getLng() Deprecated.
abstract int | hashCode() Deprecated.
abstract boolean | isFixedPoint() Deprecated.
abstract boolean | isNormalized() Deprecated.
abstract LatLng | normalize() Deprecated.
CartesianPoint | toCartesian() Deprecated. Convert the lat/lng into the cartesian coordinate plane such that all world coordinates are represented in the first quadrant.
abstract FixedLatLng | toFixed() Deprecated.
abstract FloatLatLng | toFloat() Deprecated.
String | toString() Deprecated.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

LatLng

public LatLng()
Deprecated.
Method Detail

isNormalized

public abstract boolean isNormalized()
Deprecated.

isFixedPoint

public abstract boolean isFixedPoint()
Deprecated.

normalize

public abstract LatLng normalize()
Deprecated.

getFixedLat

public abstract int getFixedLat()
Deprecated.

getFixedLng

public abstract int getFixedLng()
Deprecated.

getLat

public abstract double getLat()
Deprecated.

getLng

public abstract double getLng()
Deprecated.

copy

public abstract LatLng copy()
Deprecated.

toFixed

public abstract FixedLatLng toFixed()
Deprecated.

toFloat

public abstract FloatLatLng toFloat()
Deprecated.

toCartesian

public CartesianPoint toCartesian()
Deprecated.
Convert the lat/lng into the cartesian coordinate plane such that all world coordinates are represented in the first quadrant. The x dimension corresponds to latitude and y corresponds to longitude. The translation starts with the normalized latlng and adds 180 to the latitude and 90 to the longitude (subject to fixed point scaling).

fromCartesian

public static LatLng fromCartesian(CartesianPoint pt)
Deprecated.
The inverse of toCartesian(). Always returns a FixedLatLng.

Parameters:
pt -

arcDistance

public double arcDistance(LatLng ll2)
Deprecated.
Calculates the distance between two lat/lng's in miles. Imported from mq java client.

Parameters:
ll2 - Second lat,lng position to calculate distance to.
Returns:
Returns the distance in miles.

arcDistance

public double arcDistance(LatLng ll2,
                          DistanceUnits lUnits)
Deprecated.
Calculates the distance between two lat/lng's in miles or meters. Imported from mq java client. Variable references changed to match.

Parameters:
ll2 - Second lat,lng position to calculate distance to.
lUnits - Units to calculate distance, defaults to miles
Returns:
Returns the distance in meters or miles.

toString

public String toString()
Deprecated.
Overrides:
toString in class Object

calculateMidpoint

public abstract LatLng calculateMidpoint(LatLng other)
Deprecated.
Calculate the midpoint between this point an another. Respects fixed vs floating point

Parameters:
other -

hashCode

public abstract int hashCode()
Deprecated.
Overrides:
hashCode in class Object

equals

public abstract boolean equals(Object obj)
Deprecated.
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.spatial.geometry
Classes
CartesianPoint
FixedLatLng
FloatLatLng
LatLng
Enums
DistanceUnits


org.apache.lucene.spatial.geometry

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.spatial.geometry

Coordinate and distance representations.

See:
Description

Class Summary
CartesianPoint | Deprecated.
FixedLatLng | Deprecated.
FloatLatLng | Deprecated.
LatLng | Deprecated.

Enum Summary
DistanceUnits Deprecated.

Package org.apache.lucene.spatial.geometry Description

Coordinate and distance representations.


org.apache.lucene.spatial.geometry Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.spatial.geometry

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.spatial.geometry.CartesianPoint
    • org.apache.lucene.spatial.geometry.LatLng
      • org.apache.lucene.spatial.geometry.FixedLatLng
      • org.apache.lucene.spatial.geometry.FloatLatLng

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.spatial.geometry.DistanceUnits


Uses of Package org.apache.lucene.spatial.geometry

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.spatial.geometry

Packages that use org.apache.lucene.spatial.geometry
org.apache.lucene.spatial.geometry | Coordinate and distance representations.
org.apache.lucene.spatial.geometry.shape | Shape representations.

Classes in org.apache.lucene.spatial.geometry used by org.apache.lucene.spatial.geometry
CartesianPoint
Deprecated.
DistanceUnits
Deprecated.
FixedLatLng
Deprecated.
FloatLatLng
Deprecated.
LatLng
Deprecated.

Classes in org.apache.lucene.spatial.geometry used by org.apache.lucene.spatial.geometry.shape
LatLng
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.geometry.CartesianPoint

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.geometry.CartesianPoint

Packages that use CartesianPoint
org.apache.lucene.spatial.geometry Coordinate and distance representations.

Uses of CartesianPoint in org.apache.lucene.spatial.geometry

Methods in org.apache.lucene.spatial.geometry that return CartesianPoint
CartesianPoint | LatLng.toCartesian() Deprecated. Convert the lat/lng into the cartesian coordinate plane such that all world coordinates are represented in the first quadrant.
CartesianPoint | CartesianPoint.translate(int deltaX, int deltaY) Deprecated. Return a new point translated in the x and y dimensions

Methods in org.apache.lucene.spatial.geometry with parameters of type CartesianPoint
static LatLng LatLng.fromCartesian(CartesianPoint pt)
Deprecated. The inverse of toCartesian().

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.geometry.DistanceUnits

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.geometry.DistanceUnits

Packages that use DistanceUnits
org.apache.lucene.spatial.geometry Coordinate and distance representations.

Uses of DistanceUnits in org.apache.lucene.spatial.geometry

Methods in org.apache.lucene.spatial.geometry that return DistanceUnits
static DistanceUnits | DistanceUnits.findDistanceUnit(String unit) Deprecated. Returns the DistanceUnit which represents the given unit
static DistanceUnits | DistanceUnits.valueOf(String name) Deprecated. Returns the enum constant of this type with the specified name.
static DistanceUnits[] | DistanceUnits.values() Deprecated. Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.spatial.geometry with parameters of type DistanceUnits
double | LatLng.arcDistance(LatLng ll2, DistanceUnits lUnits) Deprecated. Calculates the distance between two lat/lng's in miles or meters.
double | DistanceUnits.convert(double distance, DistanceUnits from) Deprecated. Converts the given distance in given DistanceUnit, to a distance in the unit represented by this

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.geometry.FixedLatLng

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.geometry.FixedLatLng

Packages that use FixedLatLng
org.apache.lucene.spatial.geometry Coordinate and distance representations.

Uses of FixedLatLng in org.apache.lucene.spatial.geometry

Methods in org.apache.lucene.spatial.geometry that return FixedLatLng
FixedLatLng | FixedLatLng.toFixed() Deprecated.
abstract FixedLatLng | LatLng.toFixed() Deprecated.
FixedLatLng | FloatLatLng.toFixed() Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.geometry.FloatLatLng

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.geometry.FloatLatLng

Packages that use FloatLatLng
org.apache.lucene.spatial.geometry Coordinate and distance representations.

Uses of FloatLatLng in org.apache.lucene.spatial.geometry

Methods in org.apache.lucene.spatial.geometry that return FloatLatLng
FloatLatLng | FixedLatLng.toFloat() Deprecated.
abstract FloatLatLng | LatLng.toFloat() Deprecated.
FloatLatLng | FloatLatLng.toFloat() Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.geometry.LatLng

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.geometry.LatLng

Packages that use LatLng
org.apache.lucene.spatial.geometry | Coordinate and distance representations.
org.apache.lucene.spatial.geometry.shape | Shape representations.

Uses of LatLng in org.apache.lucene.spatial.geometry

Subclasses of LatLng in org.apache.lucene.spatial.geometry
class | FixedLatLng Deprecated.
class | FloatLatLng Deprecated.

Methods in org.apache.lucene.spatial.geometry that return LatLng
 LatLng FixedLatLng.calculateMidpoint(LatLng other)
Deprecated.
abstract  LatLng LatLng.calculateMidpoint(LatLng other)
Deprecated. Calculate the midpoint between this point an another.
 LatLng FloatLatLng.calculateMidpoint(LatLng other)
Deprecated.
 LatLng FixedLatLng.copy()
Deprecated.
abstract  LatLng LatLng.copy()
Deprecated.
 LatLng FloatLatLng.copy()
Deprecated.
static LatLng LatLng.fromCartesian(CartesianPoint pt)
Deprecated. The inverse of toCartesian().
 LatLng FixedLatLng.normalize()
Deprecated.
abstract  LatLng LatLng.normalize()
Deprecated.
 LatLng FloatLatLng.normalize()
Deprecated.

Methods in org.apache.lucene.spatial.geometry with parameters of type LatLng
double | LatLng.arcDistance(LatLng ll2) Deprecated. Calculates the distance between two lat/lng's in miles.
double | LatLng.arcDistance(LatLng ll2, DistanceUnits lUnits) Deprecated. Calculates the distance between two lat/lng's in miles or meters.
LatLng | FixedLatLng.calculateMidpoint(LatLng other) Deprecated.
abstract LatLng | LatLng.calculateMidpoint(LatLng other) Deprecated. Calculate the midpoint between this point an another.
LatLng | FloatLatLng.calculateMidpoint(LatLng other) Deprecated.

Constructors in org.apache.lucene.spatial.geometry with parameters of type LatLng
FixedLatLng(LatLng ll)
Deprecated.
FloatLatLng(LatLng ll)
Deprecated.

Uses of LatLng in org.apache.lucene.spatial.geometry.shape

Methods in org.apache.lucene.spatial.geometry.shape that return LatLng
LatLng | LLRect.getLowerLeft() Deprecated.
LatLng | LLRect.getMidpoint() Deprecated.
LatLng | LLRect.getUpperRight() Deprecated.

Methods in org.apache.lucene.spatial.geometry.shape with parameters of type LatLng
static LLRect LLRect.createBox(LatLng center, double widthMi, double heightMi)
Deprecated. Approximates a box centered at the given point with the given width and height in miles.

Constructors in org.apache.lucene.spatial.geometry.shape with parameters of type LatLng
LLRect(LatLng ll, LatLng ur)
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


DistanceApproximation

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.geometry.shape
Class DistanceApproximation

java.lang.Object
    extended by  org.apache.lucene.spatial.geometry.shape.DistanceApproximation
Deprecated. This has been replaced with more accurate math in LLRect. This class will be removed in a future release.

@Deprecated
public class DistanceApproximation
extends Object

Imported from mq java client. No changes made.

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Field Summary
static double | KILOMETERS_PER_MILE Deprecated.
static double | MILES_PER_LATITUDE Deprecated.
Constructor Summary
DistanceApproximation()
Deprecated.
Method Summary
double | getDistanceSq(double lat, double lng) Deprecated.
double | getDistanceSq(double lat1, double lng1, double lat2, double lng2) Deprecated.
static double | getMilesPerLatDeg() Deprecated.
static double | getMilesPerLngDeg(double lat) Deprecated.
void | setTestPoint(double lat, double lng) Deprecated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

MILES_PER_LATITUDE

public static final double MILES_PER_LATITUDE
Deprecated.
See Also:
Constant Field Values

KILOMETERS_PER_MILE

public static final double KILOMETERS_PER_MILE
Deprecated.
See Also:
Constant Field Values
Constructor Detail

DistanceApproximation

public DistanceApproximation()
Deprecated.
Method Detail

setTestPoint

public void setTestPoint(double lat,
                         double lng)
Deprecated.

getDistanceSq

public double getDistanceSq(double lat,
                            double lng)
Deprecated.

getDistanceSq

public double getDistanceSq(double lat1,
                            double lng1,
                            double lat2,
                            double lng2)
Deprecated.

getMilesPerLngDeg

public static double getMilesPerLngDeg(double lat)
Deprecated.

getMilesPerLatDeg

public static double getMilesPerLatDeg()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Ellipse

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.geometry.shape
Class Ellipse

java.lang.Object
    extended by  org.apache.lucene.spatial.geometry.shape.Ellipse
All Implemented Interfaces:
Geometry2D
Deprecated.

@Deprecated
public class Ellipse
extends Object
implements Geometry2D

Ellipse shape. From C++ gl.

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Constructor Summary
Ellipse()
Deprecated.
Ellipse(Point2D p1, Point2D p2, double angle)
Deprecated. Constructor given bounding rectangle and a rotation.
Method Summary
double | area() Deprecated. Return the area
Point2D | centroid() Deprecated. Return the centroid
boolean | contains(Point2D pt) Deprecated. Does the shape contain the given point
int | intersect(LineSegment seg, Point2D pt0, Point2D pt1) Deprecated. Determines if a line segment intersects the ellipse and if so finds the point(s) of intersection.
IntersectCase | intersect(Rectangle r) Deprecated. Returns information about how this shape intersects the given rectangle
void | translate(Vector2D v) Deprecated. Translate according to the vector
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Ellipse

public Ellipse()
Deprecated.

Ellipse

public Ellipse(Point2D p1,
               Point2D p2,
               double angle)
Deprecated.
Constructor given bounding rectangle and a rotation.

Method Detail

intersect

public int intersect(LineSegment seg,
                     Point2D pt0,
                     Point2D pt1)
Deprecated.
Determines if a line segment intersects the ellipse and if so finds the point(s) of intersection.

Parameters:
seg - Line segment to test for intersection
pt0 - OUT - intersection point (if it exists)
pt1 - OUT - second intersection point (if it exists)
Returns:
Returns the number of intersection points (0, 1, or 2).

intersect

public IntersectCase intersect(Rectangle r)
Deprecated.
Description copied from interface: Geometry2D
Returns information about how this shape intersects the given rectangle

Specified by:
intersect in interface Geometry2D

area

public double area()
Deprecated.
Description copied from interface: Geometry2D
Return the area

Specified by:
area in interface Geometry2D

centroid

public Point2D centroid()
Deprecated.
Description copied from interface: Geometry2D
Return the centroid

Specified by:
centroid in interface Geometry2D

contains

public boolean contains(Point2D pt)
Deprecated.
Description copied from interface: Geometry2D
Does the shape contain the given point

Specified by:
contains in interface Geometry2D

translate

public void translate(Vector2D v)
Deprecated.
Description copied from interface: Geometry2D
Translate according to the vector

Specified by:
translate in interface Geometry2D
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Geometry2D

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.geometry.shape
Interface Geometry2D

All Known Implementing Classes:
Ellipse, Rectangle
Deprecated.

@Deprecated
public interface Geometry2D

Common set of operations available on 2d shapes.

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Method Summary
double | area() Deprecated. Return the area
Point2D | centroid() Deprecated. Return the centroid
boolean | contains(Point2D p) Deprecated. Does the shape contain the given point
IntersectCase | intersect(Rectangle r) Deprecated. Returns information about how this shape intersects the given rectangle
void | translate(Vector2D v) Deprecated. Translate according to the vector

Method Detail

translate

void translate(Vector2D v)
Deprecated.
Translate according to the vector

Parameters:
v -

contains

boolean contains(Point2D p)
Deprecated.
Does the shape contain the given point

Parameters:
p -

area

double area()
Deprecated.
Return the area

centroid

Point2D centroid()
Deprecated.
Return the centroid

intersect

IntersectCase intersect(Rectangle r)
Deprecated.
Returns information about how this shape intersects the given rectangle

Parameters:
r -
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntersectCase

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.spatial.geometry.shape
Enum IntersectCase

java.lang.Object
    extended by  java.lang.Enum<IntersectCase>
        extended by  org.apache.lucene.spatial.geometry.shape.IntersectCase
All Implemented Interfaces:
Serializable, Comparable<IntersectCase>
Deprecated.

@Deprecated
public enum IntersectCase
extends Enum<IntersectCase>

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Enum Constant Summary
CONTAINS
Deprecated.
INTERSECTS
Deprecated.
OUTSIDE
Deprecated.
WITHIN
Deprecated.
Method Summary
static IntersectCase | valueOf(String name) Deprecated. Returns the enum constant of this type with the specified name.
static IntersectCase[] | values() Deprecated. Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

WITHIN

public static final IntersectCase WITHIN
Deprecated.

CONTAINS

public static final IntersectCase CONTAINS
Deprecated.

OUTSIDE

public static final IntersectCase OUTSIDE
Deprecated.

INTERSECTS

public static final IntersectCase INTERSECTS
Deprecated.
Method Detail

values

public static final IntersectCase[] values()
Deprecated.
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(IntersectCase c : IntersectCase.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static IntersectCase valueOf(String name)
Deprecated.
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


LineSegment

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.geometry.shape
Class LineSegment

java.lang.Object
    extended by  org.apache.lucene.spatial.geometry.shape.LineSegment
Deprecated.

@Deprecated
public class LineSegment
extends Object

2d line segment.

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Field Summary
Point2D | A Deprecated.
Point2D | B Deprecated.
Constructor Summary
LineSegment()
Deprecated.
LineSegment(Point2D p1, Point2D p2)
Deprecated.
Method Summary
double | distance(Point2D P, Point2D closestPt) Deprecated. Finds the distance of a specified point from the line segment and the closest point on the segment to the specified point.
boolean | equals(Object obj) Deprecated.
int | hashCode() Deprecated.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

A

public final Point2D A
Deprecated.

B

public final Point2D B
Deprecated.
Constructor Detail

LineSegment

public LineSegment()
Deprecated.

LineSegment

public LineSegment(Point2D p1,
                   Point2D p2)
Deprecated.
Method Detail

distance

public double distance(Point2D P,
                       Point2D closestPt)
Deprecated.
Finds the distance of a specified point from the line segment and the closest point on the segment to the specified point.

Parameters:
P - Test point.
closestPt - (Return) Closest point on the segment to c.
Returns:
Returns the distance from P to the closest point on the segment.

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Deprecated.
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LLRect

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.geometry.shape
Class LLRect

java.lang.Object
    extended by  org.apache.lucene.spatial.geometry.shape.LLRect
Deprecated.

@Deprecated
public class LLRect
extends Object

Lat-long rect. Instances are mutable.

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Constructor Summary
LLRect(LatLng ll, LatLng ur)
Deprecated.
LLRect(LLRect other)
Deprecated.
Method Summary
double | area() Deprecated. Return the area in units of lat-lng squared.
static LLRect | createBox(LatLng center, double widthMi, double heightMi) Deprecated. Approximates a box centered at the given point with the given width and height in miles.
boolean | equals(Object obj) Deprecated.
LatLng | getLowerLeft() Deprecated.
LatLng | getMidpoint() Deprecated.
LatLng | getUpperRight() Deprecated.
int | hashCode() Deprecated.
Rectangle | toRectangle() Deprecated. Returns a rectangle shape for the bounding box
String | toString() Deprecated.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

LLRect

public LLRect(LatLng ll,
              LatLng ur)
Deprecated.

LLRect

public LLRect(LLRect other)
Deprecated.
Method Detail

area

public double area()
Deprecated.
Return the area in units of lat-lng squared. This is a contrived unit that only has value when comparing to something else.

getLowerLeft

public LatLng getLowerLeft()
Deprecated.

getUpperRight

public LatLng getUpperRight()
Deprecated.

toString

public String toString()
Deprecated.
Overrides:
toString in class Object

getMidpoint

public LatLng getMidpoint()
Deprecated.

createBox

public static LLRect createBox(LatLng center,
                               double widthMi,
                               double heightMi)
Deprecated.
Approximates a box centered at the given point with the given width and height in miles.

Parameters:
center -
widthMi -
heightMi -

toRectangle

public Rectangle toRectangle()
Deprecated.
Returns a rectangle shape for the bounding box

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Deprecated.
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.spatial.geometry.shape
Interfaces
Geometry2D
Classes
DistanceApproximation
Ellipse
LineSegment
LLRect
Point2D
Rectangle
Vector2D
Enums
IntersectCase


org.apache.lucene.spatial.geometry.shape

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.spatial.geometry.shape

Shape representations.

See:
Description

Interface Summary
Geometry2D Deprecated.

Class Summary
DistanceApproximation | Deprecated. This has been replaced with more accurate math in LLRect.
Ellipse | Deprecated.
LineSegment | Deprecated.
LLRect | Deprecated.
Point2D | Deprecated.
Rectangle | Deprecated.
Vector2D | Deprecated.

Enum Summary
IntersectCase Deprecated.

Package org.apache.lucene.spatial.geometry.shape Description

Shape representations.


org.apache.lucene.spatial.geometry.shape Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.spatial.geometry.shape

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.spatial.geometry.shape.DistanceApproximation
    • org.apache.lucene.spatial.geometry.shape.Ellipse (implements org.apache.lucene.spatial.geometry.shape.Geometry2D)
    • org.apache.lucene.spatial.geometry.shape.LineSegment
    • org.apache.lucene.spatial.geometry.shape.LLRect
    • org.apache.lucene.spatial.geometry.shape.Point2D
    • org.apache.lucene.spatial.geometry.shape.Rectangle (implements org.apache.lucene.spatial.geometry.shape.Geometry2D)
    • org.apache.lucene.spatial.geometry.shape.Vector2D

Interface Hierarchy

  • org.apache.lucene.spatial.geometry.shape.Geometry2D

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.spatial.geometry.shape.IntersectCase


Uses of Package org.apache.lucene.spatial.geometry.shape

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.spatial.geometry.shape

Packages that use org.apache.lucene.spatial.geometry.shape
org.apache.lucene.spatial | Support for geospatial search.
org.apache.lucene.spatial.geometry.shape | Shape representations.

Classes in org.apache.lucene.spatial.geometry.shape used by org.apache.lucene.spatial
Rectangle
Deprecated.

Classes in org.apache.lucene.spatial.geometry.shape used by org.apache.lucene.spatial.geometry.shape
Geometry2D
Deprecated.
IntersectCase
Deprecated.
LineSegment
Deprecated.
LLRect
Deprecated.
Point2D
Deprecated.
Rectangle
Deprecated.
Vector2D
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Point2D

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.geometry.shape
Class Point2D

java.lang.Object
    extended by  org.apache.lucene.spatial.geometry.shape.Point2D
Deprecated.

@Deprecated
public class Point2D
extends Object

Point class. This type is mutable.

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Constructor Summary
Point2D()
Deprecated.
Point2D(double x, double y)
Deprecated.
Point2D(Point2D other)
Deprecated.
Method Summary
void | add(Point2D a) Deprecated.
void | add(Vector2D v) Deprecated.
boolean | equals(Object obj) Deprecated.
double | getX() Deprecated.
double | getY() Deprecated.
int | hashCode() Deprecated.
void | set(double x, double y) Deprecated.
void | set(Point2D p1) Deprecated.
void | set(Vector2D v) Deprecated.
void | setX(double x) Deprecated.
void | setY(double y) Deprecated.
String | toString() Deprecated.
double | x() Deprecated.
void | x(double x) Deprecated.
double | y() Deprecated.
void | y(double y) Deprecated.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Point2D

public Point2D(double x,
               double y)
Deprecated.

Point2D

public Point2D()
Deprecated.

Point2D

public Point2D(Point2D other)
Deprecated.
Method Detail

toString

public String toString()
Deprecated.
Overrides:
toString in class Object

getX

public double getX()
Deprecated.

getY

public double getY()
Deprecated.

x

public double x()
Deprecated.

y

public double y()
Deprecated.

x

public void x(double x)
Deprecated.

y

public void y(double y)
Deprecated.

setX

public void setX(double x)
Deprecated.

setY

public void setY(double y)
Deprecated.

set

public void set(double x,
                double y)
Deprecated.

add

public void add(Vector2D v)
Deprecated.

set

public void set(Point2D p1)
Deprecated.

add

public void add(Point2D a)
Deprecated.

set

public void set(Vector2D v)
Deprecated.

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Deprecated.
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Rectangle

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.geometry.shape
Class Rectangle

java.lang.Object
    extended by  org.apache.lucene.spatial.geometry.shape.Rectangle
All Implemented Interfaces:
Geometry2D
Deprecated.

@Deprecated
public class Rectangle
extends Object
implements Geometry2D

Rectangle shape.

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Constructor Summary
Rectangle()
Deprecated.
Rectangle(double x1, double y1, double x2, double y2)
Deprecated.
Rectangle(Point2D ptMin, Point2D ptMax)
Deprecated.
Method Summary
double | area() Deprecated. Return the area
Point2D | centroid() Deprecated. Return the centroid
boolean | contains(Point2D p) Deprecated. Does the shape contain the given point
boolean | equals(Object obj) Deprecated.
Point2D | getMaxPoint() Deprecated.
Point2D | getMinPoint() Deprecated.
int | hashCode() Deprecated.
IntersectCase | intersect(Rectangle r) Deprecated. Returns information about how this shape intersects the given rectangle
String | toString() Deprecated.
void | translate(Vector2D v) Deprecated. Translate according to the vector
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

Rectangle

public Rectangle()
Deprecated.

Rectangle

public Rectangle(Point2D ptMin,
                 Point2D ptMax)
Deprecated.

Rectangle

public Rectangle(double x1,
                 double y1,
                 double x2,
                 double y2)
Deprecated.
Method Detail

toString

public String toString()
Deprecated.
Overrides:
toString in class Object

area

public double area()
Deprecated.
Description copied from interface: Geometry2D
Return the area

Specified by:
area in interface Geometry2D

centroid

public Point2D centroid()
Deprecated.
Description copied from interface: Geometry2D
Return the centroid

Specified by:
centroid in interface Geometry2D

contains

public boolean contains(Point2D p)
Deprecated.
Description copied from interface: Geometry2D
Does the shape contain the given point

Specified by:
contains in interface Geometry2D

translate

public void translate(Vector2D v)
Deprecated.
Description copied from interface: Geometry2D
Translate according to the vector

Specified by:
translate in interface Geometry2D

intersect

public IntersectCase intersect(Rectangle r)
Deprecated.
Description copied from interface: Geometry2D
Returns information about how this shape intersects the given rectangle

Specified by:
intersect in interface Geometry2D

getMaxPoint

public Point2D getMaxPoint()
Deprecated.

getMinPoint

public Point2D getMinPoint()
Deprecated.

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Deprecated.
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Vector2D

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.geometry.shape
Class Vector2D

java.lang.Object
    extended by  org.apache.lucene.spatial.geometry.shape.Vector2D
Deprecated.

@Deprecated
public class Vector2D
extends Object

2D vector

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Constructor Summary
Vector2D()
Deprecated.
Vector2D(double x, double y)
Deprecated. Create a vector from the origin of the coordinate system to the given point
Vector2D(Point2D p)
Deprecated. Create a vector from the origin of the coordinate system to the given point
Vector2D(Point2D from, Point2D to)
Deprecated. Create a vector from one point to another
Vector2D(Vector2D other)
Deprecated.
Method Summary
double | dot(Vector2D in) Deprecated.
boolean | equals(Object obj) Deprecated.
boolean | equals(Vector2D other) Deprecated.
double | getX() Deprecated.
double | getY() Deprecated.
int | hashCode() Deprecated.
Vector2D | mult(double d) Deprecated.
double | norm() Deprecated.
double | normSqr() Deprecated. Vector length (magnitude) squared
void | set(double x, double y) Deprecated.
void | setX(double x) Deprecated.
void | setY(double y) Deprecated.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Vector2D

public Vector2D(double x,
                double y)
Deprecated.
Create a vector from the origin of the coordinate system to the given point

Parameters:
x -
y -

Vector2D

public Vector2D(Point2D p)
Deprecated.
Create a vector from the origin of the coordinate system to the given point

Vector2D

public Vector2D(Point2D from,
                Point2D to)
Deprecated.
Create a vector from one point to another

Parameters:
from -
to -

Vector2D

public Vector2D()
Deprecated.

Vector2D

public Vector2D(Vector2D other)
Deprecated.
Method Detail

getX

public double getX()
Deprecated.

getY

public double getY()
Deprecated.

setX

public void setX(double x)
Deprecated.

setY

public void setY(double y)
Deprecated.

set

public void set(double x,
                double y)
Deprecated.

equals

public boolean equals(Vector2D other)
Deprecated.

dot

public double dot(Vector2D in)
Deprecated.

normSqr

public double normSqr()
Deprecated.
Vector length (magnitude) squared

norm

public double norm()
Deprecated.

mult

public Vector2D mult(double d)
Deprecated.

hashCode

public int hashCode()
Deprecated.
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Deprecated.
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.spatial.geometry.shape.DistanceApproximation

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.geometry.shape.DistanceApproximation

No usage of org.apache.lucene.spatial.geometry.shape.DistanceApproximation

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.geometry.shape.Ellipse

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.geometry.shape.Ellipse

No usage of org.apache.lucene.spatial.geometry.shape.Ellipse

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.spatial.geometry.shape.Geometry2D

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.spatial.geometry.shape.Geometry2D

Packages that use Geometry2D
org.apache.lucene.spatial.geometry.shape Shape representations.

Uses of Geometry2D in org.apache.lucene.spatial.geometry.shape

Classes in org.apache.lucene.spatial.geometry.shape that implement Geometry2D
class | Ellipse Deprecated.
class | Rectangle Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.geometry.shape.IntersectCase

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.geometry.shape.IntersectCase

Packages that use IntersectCase
org.apache.lucene.spatial.geometry.shape Shape representations.

Uses of IntersectCase in org.apache.lucene.spatial.geometry.shape

Methods in org.apache.lucene.spatial.geometry.shape that return IntersectCase
IntersectCase | Rectangle.intersect(Rectangle r) Deprecated.
IntersectCase | Geometry2D.intersect(Rectangle r) Deprecated. Returns information about how this shape intersects the given rectangle
IntersectCase | Ellipse.intersect(Rectangle r) Deprecated.
static IntersectCase | IntersectCase.valueOf(String name) Deprecated. Returns the enum constant of this type with the specified name.
static IntersectCase[] | IntersectCase.values() Deprecated. Returns an array containing the constants of this enum type, in the order they're declared.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.geometry.shape.LineSegment

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.geometry.shape.LineSegment

Packages that use LineSegment
org.apache.lucene.spatial.geometry.shape Shape representations.

Uses of LineSegment in org.apache.lucene.spatial.geometry.shape

Methods in org.apache.lucene.spatial.geometry.shape with parameters of type LineSegment
 int Ellipse.intersect(LineSegment seg, Point2D pt0, Point2D pt1)
Deprecated. Determines if a line segment intersects the ellipse and if so finds the point(s) of intersection.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.geometry.shape.LLRect

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.geometry.shape.LLRect

Packages that use LLRect
org.apache.lucene.spatial.geometry.shape Shape representations.

Uses of LLRect in org.apache.lucene.spatial.geometry.shape

Methods in org.apache.lucene.spatial.geometry.shape that return LLRect
static LLRect LLRect.createBox(LatLng center, double widthMi, double heightMi)
Deprecated. Approximates a box centered at the given point with the given width and height in miles.

Constructors in org.apache.lucene.spatial.geometry.shape with parameters of type LLRect
LLRect(LLRect other)
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.geometry.shape.Point2D

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.geometry.shape.Point2D

Packages that use Point2D
org.apache.lucene.spatial.geometry.shape Shape representations.

Uses of Point2D in org.apache.lucene.spatial.geometry.shape

Fields in org.apache.lucene.spatial.geometry.shape declared as Point2D
Point2D | LineSegment.A Deprecated.
Point2D | LineSegment.B Deprecated.

Methods in org.apache.lucene.spatial.geometry.shape that return Point2D
Point2D | Rectangle.centroid() Deprecated.
Point2D | Geometry2D.centroid() Deprecated. Return the centroid
Point2D | Ellipse.centroid() Deprecated.
Point2D | Rectangle.getMaxPoint() Deprecated.
Point2D | Rectangle.getMinPoint() Deprecated.

Methods in org.apache.lucene.spatial.geometry.shape with parameters of type Point2D
void | Point2D.add(Point2D a) Deprecated.
boolean | Rectangle.contains(Point2D p) Deprecated.
boolean | Geometry2D.contains(Point2D p) Deprecated. Does the shape contain the given point
boolean | Ellipse.contains(Point2D pt) Deprecated.
double | LineSegment.distance(Point2D P, Point2D closestPt) Deprecated. Finds the distance of a specified point from the line segment and the closest point on the segment to the specified point.
int | Ellipse.intersect(LineSegment seg, Point2D pt0, Point2D pt1) Deprecated. Determines if a line segment intersects the ellipse and if so finds the point(s) of intersection.
void | Point2D.set(Point2D p1) Deprecated.

Constructors in org.apache.lucene.spatial.geometry.shape with parameters of type Point2D
Ellipse(Point2D p1, Point2D p2, double angle)
Deprecated. Constructor given bounding rectangle and a rotation.
LineSegment(Point2D p1, Point2D p2)
Deprecated.
Point2D(Point2D other)
Deprecated.
Rectangle(Point2D ptMin, Point2D ptMax)
Deprecated.
Vector2D(Point2D p)
Deprecated. Create a vector from the origin of the coordinate system to the given point
Vector2D(Point2D from, Point2D to)
Deprecated. Create a vector from one point to another

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.geometry.shape.Rectangle

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.geometry.shape.Rectangle

Packages that use Rectangle
org.apache.lucene.spatial | Support for geospatial search.
org.apache.lucene.spatial.geometry.shape | Shape representations.

Uses of Rectangle in org.apache.lucene.spatial

Methods in org.apache.lucene.spatial that return Rectangle
static Rectangle DistanceUtils.getBoundary(double x1, double y1, double miles)
Deprecated.

Uses of Rectangle in org.apache.lucene.spatial.geometry.shape

Methods in org.apache.lucene.spatial.geometry.shape that return Rectangle
 Rectangle LLRect.toRectangle()
Deprecated. Returns a rectangle shape for the bounding box

Methods in org.apache.lucene.spatial.geometry.shape with parameters of type Rectangle
IntersectCase | Rectangle.intersect(Rectangle r) Deprecated.
IntersectCase | Geometry2D.intersect(Rectangle r) Deprecated. Returns information about how this shape intersects the given rectangle
IntersectCase | Ellipse.intersect(Rectangle r) Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.geometry.shape.Vector2D

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.geometry.shape.Vector2D

Packages that use Vector2D
org.apache.lucene.spatial.geometry.shape Shape representations.

Uses of Vector2D in org.apache.lucene.spatial.geometry.shape

Methods in org.apache.lucene.spatial.geometry.shape that return Vector2D
 Vector2D Vector2D.mult(double d)
Deprecated.

Methods in org.apache.lucene.spatial.geometry.shape with parameters of type Vector2D
void | Point2D.add(Vector2D v) Deprecated.
double | Vector2D.dot(Vector2D in) Deprecated.
boolean | Vector2D.equals(Vector2D other) Deprecated.
void | Point2D.set(Vector2D v) Deprecated.
void | Rectangle.translate(Vector2D v) Deprecated.
void | Geometry2D.translate(Vector2D v) Deprecated. Translate according to the vector
void | Ellipse.translate(Vector2D v) Deprecated.

Constructors in org.apache.lucene.spatial.geometry.shape with parameters of type Vector2D
Vector2D(Vector2D other)
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CartesianPolyFilterBuilder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.tier
Class CartesianPolyFilterBuilder

java.lang.Object
    extended by  org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder
Deprecated.

@Deprecated
public class CartesianPolyFilterBuilder
extends Object

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Field Summary
static double MILES_FLOOR
Deprecated.
Constructor Summary
CartesianPolyFilterBuilder(String tierPrefix, int minTierIndexed, int maxTierIndexed)
Deprecated.
Method Summary
Filter | getBoundingArea(double latitude, double longitude, double miles) Deprecated.
Shape | getBoxShape(double latitude, double longitude, double miles) Deprecated.
Shape | getShapeLoop(Shape shape, CartesianTierPlotter ctp, double latX, double longX, double latY, double longY) Deprecated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

MILES_FLOOR

public static final double MILES_FLOOR
Deprecated.
See Also:
Constant Field Values
Constructor Detail

CartesianPolyFilterBuilder

public CartesianPolyFilterBuilder(String tierPrefix,
                                  int minTierIndexed,
                                  int maxTierIndexed)
Deprecated.
Parameters:
tierPrefix - The prefix for the name of the fields containing the tier info
minTierIndexed - The minimum tier level indexed
maxTierIndexed - The maximum tier level indexed
Method Detail

getBoxShape

public Shape getBoxShape(double latitude,
                         double longitude,
                         double miles)
Deprecated.

getShapeLoop

public Shape getShapeLoop(Shape shape,
                          CartesianTierPlotter ctp,
                          double latX,
                          double longX,
                          double latY,
                          double longY)
Deprecated.

getBoundingArea

public Filter getBoundingArea(double latitude,
                              double longitude,
                              double miles)
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CartesianShapeFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.tier
Class CartesianShapeFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.spatial.tier.CartesianShapeFilter
All Implemented Interfaces:
Serializable
Deprecated.

@Deprecated
public class CartesianShapeFilter
extends Filter

NOTE: This API is still in flux and might change in incompatible ways in the next release.

See Also:
Serialized Form

Method Summary
 DocIdSet getDocIdSet(IndexReader reader)
Deprecated. Creates a DocIdSet enumerating the documents that should be permitted in search results.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Deprecated.
Description copied from class: Filter
Creates a DocIdSet enumerating the documents that should be permitted in search results. NOTE: null can be returned if no documents are accepted by this Filter.

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DistanceFieldComparatorSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.tier
Class DistanceFieldComparatorSource

java.lang.Object
    extended by  org.apache.lucene.search.FieldComparatorSource
        extended by  org.apache.lucene.spatial.tier.DistanceFieldComparatorSource
All Implemented Interfaces:
Serializable
Deprecated.

@Deprecated
public class DistanceFieldComparatorSource
extends FieldComparatorSource

NOTE: This API is still in flux and might change in incompatible ways in the next release.

See Also:
Serialized Form

Constructor Summary
DistanceFieldComparatorSource(Filter distanceFilter)
Deprecated.
Method Summary
void | cleanUp() Deprecated.
FieldComparator | newComparator(String fieldname, int numHits, int sortPos, boolean reversed) Deprecated. Creates a comparator for the field in the given index.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DistanceFieldComparatorSource

public DistanceFieldComparatorSource(Filter distanceFilter)
Deprecated.
Method Detail

cleanUp

public void cleanUp()
Deprecated.

newComparator

public FieldComparator newComparator(String fieldname,
                                     int numHits,
                                     int sortPos,
                                     boolean reversed)
                              throws IOException
Deprecated.
Description copied from class: FieldComparatorSource
Creates a comparator for the field in the given index.

Specified by:
newComparator in class FieldComparatorSource
Parameters:
fieldname - Name of the field to create comparator for.
Returns:
FieldComparator.
Throws:
IOException - If an error occurs reading the index.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DistanceFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.tier
Class DistanceFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.spatial.tier.DistanceFilter
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
GeoHashDistanceFilter, LatLongDistanceFilter
Deprecated.

@Deprecated
public abstract class DistanceFilter
extends Filter

NOTE: This API is still in flux and might change in incompatible ways in the next release.

See Also:
Serialized Form

Field Summary
protected double | distance Deprecated.
protected WeakHashMap<String,Double> | distanceLookupCache Deprecated.
protected Map<Integer,Double> | distances Deprecated.
protected int | nextDocBase Deprecated.
protected DistanceHandler.Precision | precise Deprecated.
protected Filter | startingFilter Deprecated.
Constructor Summary
DistanceFilter(Filter startingFilter, double distance)
Deprecated. Filters the startingFilter by precise distance checking filter
Method Summary
abstract boolean | equals(Object o) Deprecated. Returns true if o is equal to this.
Double | getDistance(int docid) Deprecated.
Map<Integer,Double> | getDistances() Deprecated.
abstract int | hashCode() Deprecated. Returns a hash code value for this object.
void | reset() Deprecated. You must call this before re-using this DistanceFilter across searches
void | setDistances(Map<Integer,Double> distances) Deprecated.
Methods inherited from class org.apache.lucene.search.Filter
getDocIdSet
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

startingFilter

protected final Filter startingFilter
Deprecated.

precise

protected DistanceHandler.Precision precise
Deprecated.

distances

protected Map<Integer,Double> distances
Deprecated.

distance

protected double distance
Deprecated.

nextDocBase

protected int nextDocBase
Deprecated.

distanceLookupCache

protected transient WeakHashMap<String,Double> distanceLookupCache
Deprecated.
Constructor Detail

DistanceFilter

public DistanceFilter(Filter startingFilter,
                      double distance)
Deprecated.
Filters the startingFilter by precise distance checking filter

Method Detail

getDistances

public Map<Integer,Double> getDistances()
Deprecated.

getDistance

public Double getDistance(int docid)
Deprecated.

setDistances

public void setDistances(Map<Integer,Double> distances)
Deprecated.

reset

public void reset()
Deprecated.
You must call this before re-using this DistanceFilter across searches

equals

public abstract boolean equals(Object o)
Deprecated.
Returns true if o is equal to this.

Overrides:
equals in class Object

hashCode

public abstract int hashCode()
Deprecated.
Returns a hash code value for this object.

Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DistanceHandler

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.tier
Class DistanceHandler

java.lang.Object
    extended by  org.apache.lucene.spatial.tier.DistanceHandler
Deprecated.

@Deprecated
public class DistanceHandler
extends Object

Provide a high level access point to distances Used by DistanceSortSource and DistanceQuery

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Nested Class Summary
static class DistanceHandler.Precision
Deprecated.
Constructor Summary
DistanceHandler(Map<Integer,Double> distances, Map<String,Double> distanceLookupCache, DistanceHandler.Precision precise)
Deprecated.
Method Summary
double | getDistance(int docid, double centerLat, double centerLng, double lat, double lng) Deprecated.
DistanceHandler.Precision | getPrecision() Deprecated.
static double | getPrecision(double x, DistanceHandler.Precision thisPrecise) Deprecated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DistanceHandler

public DistanceHandler(Map<Integer,Double> distances,
                       Map<String,Double> distanceLookupCache,
                       DistanceHandler.Precision precise)
Deprecated.
Method Detail

getPrecision

public static double getPrecision(double x,
                                  DistanceHandler.Precision thisPrecise)
Deprecated.

getPrecision

public DistanceHandler.Precision getPrecision()
Deprecated.

getDistance

public double getDistance(int docid,
                          double centerLat,
                          double centerLng,
                          double lat,
                          double lng)
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DistanceHandler.Precision

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.spatial.tier
Enum DistanceHandler.Precision

java.lang.Object
    extended by  java.lang.Enum<DistanceHandler.Precision>
        extended by  org.apache.lucene.spatial.tier.DistanceHandler.Precision
All Implemented Interfaces:
Serializable, Comparable<DistanceHandler.Precision>
Enclosing class:
DistanceHandler
public static enum DistanceHandler.Precision
extends Enum<DistanceHandler.Precision>

Enum Constant Summary
EXACT
TWENTYFEET
TWOFEET
TWOHUNDREDFEET
Method Summary
static DistanceHandler.Precision | valueOf(String name) Returns the enum constant of this type with the specified name.
static DistanceHandler.Precision[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

EXACT

public static final DistanceHandler.Precision EXACT

TWOFEET

public static final DistanceHandler.Precision TWOFEET

TWENTYFEET

public static final DistanceHandler.Precision TWENTYFEET

TWOHUNDREDFEET

public static final DistanceHandler.Precision TWOHUNDREDFEET
Method Detail

values

public static final DistanceHandler.Precision[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(DistanceHandler.Precision c : DistanceHandler.Precision.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static DistanceHandler.Precision valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


DistanceQueryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.tier
Class DistanceQueryBuilder

java.lang.Object
    extended by  org.apache.lucene.spatial.tier.DistanceQueryBuilder
Deprecated.

@Deprecated
public class DistanceQueryBuilder
extends Object

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Constructor Summary
DistanceQueryBuilder(double lat, double lng, double miles, String geoHashFieldPrefix, String tierFieldPrefix, boolean needPrecise, int minTierIndexed, int maxTierIndexed)
Deprecated. Create a distance query using a boundary box wrapper around a more precise DistanceFilter.
DistanceQueryBuilder(double lat, double lng, double miles, String latField, String lngField, String tierFieldPrefix, boolean needPrecise, int minTierIndexed, int maxTierIndexed)
Deprecated. Create a distance query using a boundary box wrapper around a more precise DistanceFilter.
Method Summary
DistanceFilter | getDistanceFilter() Deprecated.
Filter | getFilter() Deprecated. Create a distance query using a boundary box wrapper around a more precise DistanceFilter.
Filter | getFilter(Query query) Deprecated.
double | getLat() Deprecated.
double | getLng() Deprecated.
double | getMiles() Deprecated.
Query | getQuery(Query query) Deprecated.
String | toString() Deprecated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DistanceQueryBuilder

public DistanceQueryBuilder(double lat,
                            double lng,
                            double miles,
                            String latField,
                            String lngField,
                            String tierFieldPrefix,
                            boolean needPrecise,
                            int minTierIndexed,
                            int maxTierIndexed)
Deprecated.
Create a distance query using a boundary box wrapper around a more precise DistanceFilter.

Parameters:
lat - The latitude to search around
lng - the Longitude to search around
miles - The radius to search within
latField - The name of the field containing the latitude
lngField - The name of the field containing the longitude
tierFieldPrefix - The prefix of the tier
needPrecise - if true, then distance is calculated in addition to tier info
minTierIndexed - The minimum tier level indexed
maxTierIndexed - The maximum tier level indexed

DistanceQueryBuilder

public DistanceQueryBuilder(double lat,
                            double lng,
                            double miles,
                            String geoHashFieldPrefix,
                            String tierFieldPrefix,
                            boolean needPrecise,
                            int minTierIndexed,
                            int maxTierIndexed)
Deprecated.
Create a distance query using a boundary box wrapper around a more precise DistanceFilter.

Parameters:
lat -
lng -
miles -
Method Detail

getFilter

public Filter getFilter()
Deprecated.
Create a distance query using a boundary box wrapper around a more precise DistanceFilter.

getFilter

public Filter getFilter(Query query)
Deprecated.

getDistanceFilter

public DistanceFilter getDistanceFilter()
Deprecated.

getQuery

public Query getQuery(Query query)
Deprecated.

getLat

public double getLat()
Deprecated.

getLng

public double getLng()
Deprecated.

getMiles

public double getMiles()
Deprecated.

toString

public String toString()
Deprecated.
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InvalidGeoException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.tier
Class InvalidGeoException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  org.apache.lucene.spatial.tier.InvalidGeoException
All Implemented Interfaces:
Serializable
Deprecated.

@Deprecated
public class InvalidGeoException
extends Exception

NOTE: This API is still in flux and might change in incompatible ways in the next release.

See Also:
Serialized Form

Constructor Summary
InvalidGeoException(String message)
Deprecated.
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InvalidGeoException

public InvalidGeoException(String message)
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LatLongDistanceFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.tier
Class LatLongDistanceFilter

java.lang.Object
    extended by  org.apache.lucene.search.Filter
        extended by  org.apache.lucene.spatial.tier.DistanceFilter
            extended by  org.apache.lucene.spatial.tier.LatLongDistanceFilter
All Implemented Interfaces:
Serializable
Deprecated.

@Deprecated
public class LatLongDistanceFilter
extends DistanceFilter

NOTE: This API is still in flux and might change in incompatible ways in the next release.

See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.lucene.spatial.tier.DistanceFilter
distance, distanceLookupCache, distances, nextDocBase, precise, startingFilter
Constructor Summary
LatLongDistanceFilter(Filter startingFilter, double lat, double lng, double miles, String latField, String lngField)
Deprecated. Provide a distance filter based from a center point with a radius in miles.
Method Summary
boolean | equals(Object o) Deprecated. Returns true if o is equal to this.
DocIdSet | getDocIdSet(IndexReader reader) Deprecated. Creates a DocIdSet enumerating the documents that should be permitted in search results.
int | hashCode() Deprecated. Returns a hash code value for this object.
Methods inherited from class org.apache.lucene.spatial.tier.DistanceFilter
getDistance, getDistances, reset, setDistances
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LatLongDistanceFilter

public LatLongDistanceFilter(Filter startingFilter,
                             double lat,
                             double lng,
                             double miles,
                             String latField,
                             String lngField)
Deprecated.
Provide a distance filter based from a center point with a radius in miles.

Parameters:
startingFilter - Filter to start from
lat -
lng -
miles -
latField -
lngField -
Method Detail

getDocIdSet

public DocIdSet getDocIdSet(IndexReader reader)
                     throws IOException
Deprecated.
Description copied from class: Filter
Creates a DocIdSet enumerating the documents that should be permitted in search results. NOTE: null can be returned if no documents are accepted by this Filter.

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

Specified by:
getDocIdSet in class Filter
Parameters:
reader - a IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment.
Returns:
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Throws:
IOException
See Also:
DocIdBitSet

equals

public boolean equals(Object o)
Deprecated.
Returns true if o is equal to this.

Specified by:
equals in class DistanceFilter

hashCode

public int hashCode()
Deprecated.
Returns a hash code value for this object.

Specified by:
hashCode in class DistanceFilter
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.spatial.tier
Classes
CartesianPolyFilterBuilder
CartesianShapeFilter
DistanceFieldComparatorSource
DistanceFilter
DistanceHandler
DistanceQueryBuilder
LatLongDistanceFilter
Shape
Enums
DistanceHandler.Precision
Exceptions
InvalidGeoException


org.apache.lucene.spatial.tier

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.spatial.tier

Support for filtering based upon geographic location.

See:
Description

Class Summary
CartesianPolyFilterBuilder | Deprecated.
CartesianShapeFilter | Deprecated.
DistanceFieldComparatorSource | Deprecated.
DistanceFilter | Deprecated.
DistanceHandler | Deprecated.
DistanceQueryBuilder | Deprecated.
LatLongDistanceFilter | Deprecated.
Shape | Deprecated.

Enum Summary
DistanceHandler.Precision

Exception Summary
InvalidGeoException Deprecated.

Package org.apache.lucene.spatial.tier Description

Support for filtering based upon geographic location.


org.apache.lucene.spatial.tier Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.spatial.tier

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder
    • org.apache.lucene.spatial.tier.DistanceHandler
    • org.apache.lucene.spatial.tier.DistanceQueryBuilder
    • org.apache.lucene.search.FieldComparatorSource (implements java.io.Serializable)
      • org.apache.lucene.spatial.tier.DistanceFieldComparatorSource
    • org.apache.lucene.search.Filter (implements java.io.Serializable)
      • org.apache.lucene.spatial.tier.CartesianShapeFilter
      • org.apache.lucene.spatial.tier.DistanceFilter
        • org.apache.lucene.spatial.tier.LatLongDistanceFilter
    • org.apache.lucene.spatial.tier.Shape (implements java.io.Serializable)
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.apache.lucene.spatial.tier.InvalidGeoException

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.spatial.tier.DistanceHandler.Precision


Uses of Package org.apache.lucene.spatial.tier

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.spatial.tier

Packages that use org.apache.lucene.spatial.tier
org.apache.lucene.spatial | Support for geospatial search.
org.apache.lucene.spatial.geohash | Support for Geohash encoding, decoding, and filtering.
org.apache.lucene.spatial.tier | Support for filtering based upon geographic location.

Classes in org.apache.lucene.spatial.tier used by org.apache.lucene.spatial
InvalidGeoException
Deprecated.

Classes in org.apache.lucene.spatial.tier used by org.apache.lucene.spatial.geohash
DistanceFilter
Deprecated.

Classes in org.apache.lucene.spatial.tier used by org.apache.lucene.spatial.tier
DistanceFilter
Deprecated.
DistanceHandler.Precision
Deprecated.
Shape
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Shape

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.tier
Class Shape

java.lang.Object
    extended by  org.apache.lucene.spatial.tier.Shape
All Implemented Interfaces:
Serializable
Deprecated.

@Deprecated
public class Shape
extends Object
implements Serializable

NOTE: This API is still in flux and might change in incompatible ways in the next release.

See Also:
Serialized Form

Constructor Summary
Shape(String tierId)
Deprecated.
Method Summary
void | addBox(double boxId) Deprecated.
List<Double> | getArea() Deprecated.
String | getTierId() Deprecated.
boolean | isInside(double boxId) Deprecated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Shape

public Shape(String tierId)
Deprecated.
Method Detail

addBox

public void addBox(double boxId)
Deprecated.

getArea

public List<Double> getArea()
Deprecated.

getTierId

public String getTierId()
Deprecated.

isInside

public boolean isInside(double boxId)
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder

No usage of org.apache.lucene.spatial.tier.CartesianPolyFilterBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.tier.CartesianShapeFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.tier.CartesianShapeFilter

No usage of org.apache.lucene.spatial.tier.CartesianShapeFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.tier.DistanceFieldComparatorSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.tier.DistanceFieldComparatorSource

No usage of org.apache.lucene.spatial.tier.DistanceFieldComparatorSource

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.tier.DistanceFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.tier.DistanceFilter

Packages that use DistanceFilter
org.apache.lucene.spatial.geohash | Support for Geohash encoding, decoding, and filtering.
org.apache.lucene.spatial.tier | Support for filtering based upon geographic location.

Uses of DistanceFilter in org.apache.lucene.spatial.geohash

Subclasses of DistanceFilter in org.apache.lucene.spatial.geohash
 class GeoHashDistanceFilter
Deprecated.

Uses of DistanceFilter in org.apache.lucene.spatial.tier

Subclasses of DistanceFilter in org.apache.lucene.spatial.tier
 class LatLongDistanceFilter
Deprecated.

Methods in org.apache.lucene.spatial.tier that return DistanceFilter
 DistanceFilter DistanceQueryBuilder.getDistanceFilter()
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.tier.DistanceHandler

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.tier.DistanceHandler

No usage of org.apache.lucene.spatial.tier.DistanceHandler

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.tier.DistanceHandler.Precision

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.tier.DistanceHandler.Precision

Packages that use DistanceHandler.Precision
org.apache.lucene.spatial.tier Support for filtering based upon geographic location.

Uses of DistanceHandler.Precision in org.apache.lucene.spatial.tier

Fields in org.apache.lucene.spatial.tier declared as DistanceHandler.Precision
protected  DistanceHandler.Precision DistanceFilter.precise
Deprecated.

Methods in org.apache.lucene.spatial.tier that return DistanceHandler.Precision
DistanceHandler.Precision | DistanceHandler.getPrecision() Deprecated.
static DistanceHandler.Precision | DistanceHandler.Precision.valueOf(String name) Returns the enum constant of this type with the specified name.
static DistanceHandler.Precision[] | DistanceHandler.Precision.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.spatial.tier with parameters of type DistanceHandler.Precision
static double DistanceHandler.getPrecision(double x, DistanceHandler.Precision thisPrecise)
Deprecated.

Constructors in org.apache.lucene.spatial.tier with parameters of type DistanceHandler.Precision
DistanceHandler(Map<Integer,Double> distances, Map<String,Double> distanceLookupCache, DistanceHandler.Precision precise)
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.tier.DistanceQueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.tier.DistanceQueryBuilder

No usage of org.apache.lucene.spatial.tier.DistanceQueryBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.tier.InvalidGeoException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.tier.InvalidGeoException

Packages that use InvalidGeoException
org.apache.lucene.spatial Support for geospatial search.

Uses of InvalidGeoException in org.apache.lucene.spatial

Methods in org.apache.lucene.spatial that throw InvalidGeoException
static double[] DistanceUtils.parseLatitudeLongitude(double[] latLon, String latLonStr)
Deprecated. extract (by calling DistanceUtils.parsePoint(String[], String, int) and validate the latitude and longitude contained in the String by making sure the latitude is between 90 & -90 and longitude is between -180 and 180.
static double[] DistanceUtils.parseLatitudeLongitude(String latLonStr)
Deprecated.
static String[] DistanceUtils.parsePoint(String[] out, String externalVal, int dimension)
Deprecated. Given a string containing dimension values encoded in it, separated by commas, return a String array of length dimension containing the values.
static double[] DistanceUtils.parsePointDouble(double[] out, String externalVal, int dimension)
Deprecated. Given a string containing dimension values encoded in it, separated by commas, return a double array of length dimension containing the values.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.tier.LatLongDistanceFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.tier.LatLongDistanceFilter

No usage of org.apache.lucene.spatial.tier.LatLongDistanceFilter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.tier.Shape

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.tier.Shape

Packages that use Shape
org.apache.lucene.spatial.tier Support for filtering based upon geographic location.

Uses of Shape in org.apache.lucene.spatial.tier

Methods in org.apache.lucene.spatial.tier that return Shape
Shape | CartesianPolyFilterBuilder.getBoxShape(double latitude, double longitude, double miles) Deprecated.
Shape | CartesianPolyFilterBuilder.getShapeLoop(Shape shape, CartesianTierPlotter ctp, double latX, double longX, double latY, double longY) Deprecated.

Methods in org.apache.lucene.spatial.tier with parameters of type Shape
 Shape CartesianPolyFilterBuilder.getShapeLoop(Shape shape, CartesianTierPlotter ctp, double latX, double longX, double latY, double longY)
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CartesianTierPlotter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.tier.projections
Class CartesianTierPlotter

java.lang.Object
    extended by  org.apache.lucene.spatial.tier.projections.CartesianTierPlotter
Deprecated.

@Deprecated
public class CartesianTierPlotter
extends Object

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Field Summary
static String DEFALT_FIELD_PREFIX
Deprecated.
Constructor Summary
CartesianTierPlotter(int tierLevel, IProjector projector, String fieldPrefix)
Deprecated.
Method Summary
int | bestFit(double miles) Deprecated. Find the tier with the best fit for a bounding box Best fit is defined as the ceiling of log2 (circumference of earth / distance) distance is defined as the smallest box fitting the corner between a radius and a bounding box.
double | getTierBoxId(double latitude, double longitude) Deprecated. TierBoxId is latitude box id + longitude box id where latitude box id, and longitude box id are transposed in to position coordinates.
String | getTierFieldName() Deprecated. get the string name representing current tier _localTier<tiedId>
String | getTierFieldName(int tierId) Deprecated. get the string name representing tierId _localTier<tierId>
double | getTierVerticalPosDivider() Deprecated.
double | log2(double value) Deprecated. a log to the base 2 formula Math.log(value) / Math.log(2)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFALT_FIELD_PREFIX

public static final String DEFALT_FIELD_PREFIX
Deprecated.
See Also:
Constant Field Values
Constructor Detail

CartesianTierPlotter

public CartesianTierPlotter(int tierLevel,
                            IProjector projector,
                            String fieldPrefix)
Deprecated.
Method Detail

getTierVerticalPosDivider

public double getTierVerticalPosDivider()
Deprecated.

getTierBoxId

public double getTierBoxId(double latitude,
                           double longitude)
Deprecated.
TierBoxId is latitude box id + longitude box id where latitude box id, and longitude box id are transposed in to position coordinates.

Parameters:
latitude -
longitude -

getTierFieldName

public String getTierFieldName()
Deprecated.
get the string name representing current tier _localTier<tiedId>

getTierFieldName

public String getTierFieldName(int tierId)
Deprecated.
get the string name representing tierId _localTier<tierId>

Parameters:
tierId -

bestFit

public int bestFit(double miles)
Deprecated.
Find the tier with the best fit for a bounding box Best fit is defined as the ceiling of log2 (circumference of earth / distance) distance is defined as the smallest box fitting the corner between a radius and a bounding box. Distances less than a mile return 15, finer granularity is in accurate

log2

public double log2(double value)
Deprecated.
a log to the base 2 formula Math.log(value) / Math.log(2)

Parameters:
value -
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


IProjector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.tier.projections
Interface IProjector

All Known Implementing Classes:
SinusoidalProjector
Deprecated.

@Deprecated
public interface IProjector

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Method Summary
double[] | coords(double latitude, double longitude) Deprecated.
String | coordsAsString(double latitude, double longitude) Deprecated.

Method Detail

coordsAsString

String coordsAsString(double latitude,
                      double longitude)
Deprecated.

coords

double[] coords(double latitude,
                double longitude)
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.spatial.tier.projections
Interfaces
IProjector
Classes
CartesianTierPlotter
SinusoidalProjector


org.apache.lucene.spatial.tier.projections

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.spatial.tier.projections

Spatial projections.

See:
Description

Interface Summary
IProjector Deprecated.

Class Summary
CartesianTierPlotter | Deprecated.
SinusoidalProjector | Deprecated. Until we can put in place proper tests and a proper fix.

Package org.apache.lucene.spatial.tier.projections Description

Spatial projections.


org.apache.lucene.spatial.tier.projections Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.spatial.tier.projections

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.spatial.tier.projections.CartesianTierPlotter
    • org.apache.lucene.spatial.tier.projections.SinusoidalProjector (implements org.apache.lucene.spatial.tier.projections.IProjector)

Interface Hierarchy

  • org.apache.lucene.spatial.tier.projections.IProjector


Uses of Package org.apache.lucene.spatial.tier.projections

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.spatial.tier.projections

Packages that use org.apache.lucene.spatial.tier.projections
org.apache.lucene.spatial.tier | Support for filtering based upon geographic location.
org.apache.lucene.spatial.tier.projections | Spatial projections.

Classes in org.apache.lucene.spatial.tier.projections used by org.apache.lucene.spatial.tier
CartesianTierPlotter
Deprecated.

Classes in org.apache.lucene.spatial.tier.projections used by org.apache.lucene.spatial.tier.projections
IProjector
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SinusoidalProjector

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.spatial.tier.projections
Class SinusoidalProjector

java.lang.Object
    extended by  org.apache.lucene.spatial.tier.projections.SinusoidalProjector
All Implemented Interfaces:
IProjector
Deprecated. Until we can put in place proper tests and a proper fix.

@Deprecated
public class SinusoidalProjector
extends Object
implements IProjector

Based on Sinusoidal Projections Project a latitude / longitude on a 2D cartesian map

THIS PROJECTION IS WRONG, but it's not going to be fixed b/c it will break a lot of existing tests, plus we are deprecating most of the existing spatial and replacing with a more reliable approach.

NOTE: This API is still in flux and might change in incompatible ways in the next release.

Constructor Summary
SinusoidalProjector()
Deprecated.
Method Summary
double[] | coords(double latitude, double longitude) Deprecated.
String | coordsAsString(double latitude, double longitude) Deprecated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SinusoidalProjector

public SinusoidalProjector()
Deprecated.
Method Detail

coordsAsString

public String coordsAsString(double latitude,
                             double longitude)
Deprecated.
Specified by:
coordsAsString in interface IProjector

coords

public double[] coords(double latitude,
                       double longitude)
Deprecated.
Specified by:
coords in interface IProjector
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.spatial.tier.projections.CartesianTierPlotter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.tier.projections.CartesianTierPlotter

Packages that use CartesianTierPlotter
org.apache.lucene.spatial.tier Support for filtering based upon geographic location.

Uses of CartesianTierPlotter in org.apache.lucene.spatial.tier

Methods in org.apache.lucene.spatial.tier with parameters of type CartesianTierPlotter
 Shape CartesianPolyFilterBuilder.getShapeLoop(Shape shape, CartesianTierPlotter ctp, double latX, double longX, double latY, double longY)
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.spatial.tier.projections.IProjector

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.spatial.tier.projections.IProjector

Packages that use IProjector
org.apache.lucene.spatial.tier.projections Spatial projections.

Uses of IProjector in org.apache.lucene.spatial.tier.projections

Classes in org.apache.lucene.spatial.tier.projections that implement IProjector
 class SinusoidalProjector
Deprecated. Until we can put in place proper tests and a proper fix.

Constructors in org.apache.lucene.spatial.tier.projections with parameters of type IProjector
CartesianTierPlotter(int tierLevel, IProjector projector, String fieldPrefix)
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.spatial.tier.projections.SinusoidalProjector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.spatial.tier.projections.SinusoidalProjector

No usage of org.apache.lucene.spatial.tier.projections.SinusoidalProjector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


_TestHelper

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class _TestHelper

java.lang.Object
    extended by  org.apache.lucene.store._TestHelper

public class _TestHelper
extends Object

This class provides access to package-level features defined in the store package. It is used for testing only.

Constructor Summary
_TestHelper()
Method Summary
static boolean | isSimpleFSIndexInput(IndexInput is) Returns true if the instance of the provided input stream is actually an SimpleFSIndexInput.
static boolean | isSimpleFSIndexInputClone(IndexInput is) Returns true if the provided input stream is an SimpleFSIndexInput and is a clone, that is it does not own its underlying file descriptor.
static boolean | isSimpleFSIndexInputOpen(IndexInput is) Given an instance of SimpleFSDirectory.SimpleFSIndexInput, this method returns true if the underlying file descriptor is valid, and false otherwise.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

_TestHelper

public _TestHelper()
Method Detail

isSimpleFSIndexInput

public static boolean isSimpleFSIndexInput(IndexInput is)
Returns true if the instance of the provided input stream is actually an SimpleFSIndexInput.

isSimpleFSIndexInputClone

public static boolean isSimpleFSIndexInputClone(IndexInput is)
Returns true if the provided input stream is an SimpleFSIndexInput and is a clone, that is it does not own its underlying file descriptor.

isSimpleFSIndexInputOpen

public static boolean isSimpleFSIndexInputOpen(IndexInput is)
                                        throws IOException
Given an instance of SimpleFSDirectory.SimpleFSIndexInput, this method returns true if the underlying file descriptor is valid, and false otherwise. This can be used to determine if the OS file has been closed. The descriptor becomes invalid when the non-clone instance of the SimpleFSIndexInput that owns this descriptor is closed. However, the descriptor may possibly become invalid in other ways as well.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


AlreadyClosedException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class AlreadyClosedException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.lang.RuntimeException
                extended by  java.lang.IllegalStateException
                    extended by  org.apache.lucene.store.AlreadyClosedException
All Implemented Interfaces:
Serializable
public class AlreadyClosedException
extends IllegalStateException

This exception is thrown when there is an attempt to access something that has already been closed.

See Also:
Serialized Form

Constructor Summary
AlreadyClosedException(String message)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

AlreadyClosedException

public AlreadyClosedException(String message)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BufferedIndexInput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class BufferedIndexInput

java.lang.Object
    extended by  org.apache.lucene.store.DataInput
        extended by  org.apache.lucene.store.IndexInput
            extended by  org.apache.lucene.store.BufferedIndexInput
All Implemented Interfaces:
Closeable, Cloneable
Direct Known Subclasses:
MockIndexInput, SimpleFSDirectory.SimpleFSIndexInput, WindowsDirectory.WindowsIndexInput
public abstract class BufferedIndexInput
extends IndexInput

Base implementation class for buffered IndexInput.

Field Summary
protected byte[] | buffer
static int | BUFFER_SIZE Default buffer size
Constructor Summary
BufferedIndexInput()
Deprecated. please pass resourceDesc
BufferedIndexInput(int bufferSize)
Deprecated. please pass resourceDesc
BufferedIndexInput(String resourceDesc)
BufferedIndexInput(String resourceDesc, int bufferSize)
Inits BufferedIndexInput with a specific bufferSize
Method Summary
Object | clone() Returns a clone of this stream.
void | copyBytes(IndexOutput out, long numBytes) Copies numBytes bytes to the given IndexOutput.
protected int | flushBuffer(IndexOutput out, long numBytes) Flushes the in-memory bufer to the given output, copying at most numBytes.
int | getBufferSize() Returns buffer size.
long | getFilePointer() Returns the current position in this file, where the next read will occur.
protected void | newBuffer(byte[] newBuffer)
byte | readByte() Reads and returns a single byte.
void | readBytes(byte[] b, int offset, int len) Reads a specified number of bytes into an array at the specified offset.
void | readBytes(byte[] b, int offset, int len, boolean useBuffer) Reads a specified number of bytes into an array at the specified offset with control over whether the read should be buffered (callers who have their own buffer should pass in "false" for useBuffer).
int | readInt() Reads four bytes and returns an int.
protected abstract void | readInternal(byte[] b, int offset, int length) Expert: implements buffer refill.
long | readLong() Reads eight bytes and returns a long.
short | readShort() Reads two bytes and returns a short.
int | readVInt() Reads an int stored in variable-length format.
long | readVLong() Reads a long stored in variable-length format.
void | seek(long pos) Sets current position in this file, where the next read will occur.
protected abstract void | seekInternal(long pos) Expert: implements seek.
void | setBufferSize(int newSize) Change the buffer size used by this IndexInput
Methods inherited from class org.apache.lucene.store.IndexInput
close, length, skipChars, toString
Methods inherited from class org.apache.lucene.store.DataInput
readChars, readString, readStringStringMap, setModifiedUTF8StringsMode
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

BUFFER_SIZE

public static final int BUFFER_SIZE
Default buffer size

See Also:
Constant Field Values

buffer

protected byte[] buffer
Constructor Detail

BufferedIndexInput

@Deprecated
public BufferedIndexInput()
Deprecated. please pass resourceDesc

BufferedIndexInput

public BufferedIndexInput(String resourceDesc)

BufferedIndexInput

@Deprecated
public BufferedIndexInput(int bufferSize)
Deprecated. please pass resourceDesc

Inits BufferedIndexInput with a specific bufferSize

BufferedIndexInput

public BufferedIndexInput(String resourceDesc,
                          int bufferSize)
Inits BufferedIndexInput with a specific bufferSize

Method Detail

readByte

public final byte readByte()
                    throws IOException
Description copied from class: DataInput
Reads and returns a single byte.

Specified by:
readByte in class DataInput
Throws:
IOException
See Also:
DataOutput.writeByte(byte)

setBufferSize

public final void setBufferSize(int newSize)
Change the buffer size used by this IndexInput

newBuffer

protected void newBuffer(byte[] newBuffer)

getBufferSize

public final int getBufferSize()
Returns buffer size. @see #setBufferSize

readBytes

public final void readBytes(byte[] b,
                            int offset,
                            int len)
                     throws IOException
Description copied from class: DataInput
Reads a specified number of bytes into an array at the specified offset.

Specified by:
readBytes in class DataInput
Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
Throws:
IOException
See Also:
DataOutput.writeBytes(byte[],int)

readBytes

public final void readBytes(byte[] b,
                            int offset,
                            int len,
                            boolean useBuffer)
                     throws IOException
Description copied from class: DataInput
Reads a specified number of bytes into an array at the specified offset with control over whether the read should be buffered (callers who have their own buffer should pass in "false" for useBuffer). Currently only BufferedIndexInput respects this parameter.

Overrides:
readBytes in class DataInput
Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
useBuffer - set to false if the caller will handle buffering.
Throws:
IOException
See Also:
DataOutput.writeBytes(byte[],int)

readShort

public final short readShort()
                      throws IOException
Description copied from class: DataInput
Reads two bytes and returns a short.

Overrides:
readShort in class DataInput
Throws:
IOException
See Also:
DataOutput.writeByte(byte)

readInt

public final int readInt()
                  throws IOException
Description copied from class: DataInput
Reads four bytes and returns an int.

Overrides:
readInt in class DataInput
Throws:
IOException
See Also:
DataOutput.writeInt(int)

readLong

public final long readLong()
                    throws IOException
Description copied from class: DataInput
Reads eight bytes and returns a long.

Overrides:
readLong in class DataInput
Throws:
IOException
See Also:
DataOutput.writeLong(long)

readVInt

public final int readVInt()
                   throws IOException
Description copied from class: DataInput
Reads an int stored in variable-length format. Reads between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.

Overrides:
readVInt in class DataInput
Throws:
IOException
See Also:
DataOutput.writeVInt(int)

readVLong

public final long readVLong()
                     throws IOException
Description copied from class: DataInput
Reads a long stored in variable-length format. Reads between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported.

Overrides:
readVLong in class DataInput
Throws:
IOException

readInternal

protected abstract void readInternal(byte[] b,
                                     int offset,
                                     int length)
                              throws IOException
Expert: implements buffer refill. Reads bytes from the current position in the input.

Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
length - the number of bytes to read
Throws:
IOException

getFilePointer

public final long getFilePointer()
Description copied from class: IndexInput
Returns the current position in this file, where the next read will occur.

Specified by:
getFilePointer in class IndexInput
See Also:
IndexInput.seek(long)

seek

public final void seek(long pos)
                throws IOException
Description copied from class: IndexInput
Sets current position in this file, where the next read will occur.

Specified by:
seek in class IndexInput
Throws:
IOException
See Also:
IndexInput.getFilePointer()

seekInternal

protected abstract void seekInternal(long pos)
                              throws IOException
Expert: implements seek. Sets current position in this file, where the next readInternal(byte[],int,int) will occur.

Throws:
IOException
See Also:
readInternal(byte[],int,int)

clone

public Object clone()
Description copied from class: DataInput
Returns a clone of this stream.

Clones of a stream access the same data, and are positioned at the same point as the stream they were cloned from.

Expert: Subclasses must ensure that clones may be positioned at different points in the input from each other and from the stream they were cloned from.

Overrides:
clone in class DataInput

flushBuffer

protected final int flushBuffer(IndexOutput out,
                                long numBytes)
                         throws IOException
Flushes the in-memory bufer to the given output, copying at most numBytes.

NOTE: this method does not refill the buffer, however it does advance the buffer position.

Returns:
the number of bytes actually flushed from the in-memory buffer.
Throws:
IOException

copyBytes

public void copyBytes(IndexOutput out,
                      long numBytes)
               throws IOException
Description copied from class: IndexInput
Copies numBytes bytes to the given IndexOutput.

NOTE: this method uses an intermediate buffer to copy the bytes. Consider overriding it in your implementation, if you can make a better, optimized copy.

NOTE ensure that there are enough bytes in the input to copy to output. Otherwise, different exceptions may be thrown, depending on the implementation.

Overrides:
copyBytes in class IndexInput
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BufferedIndexOutput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class BufferedIndexOutput

java.lang.Object
    extended by  org.apache.lucene.store.DataOutput
        extended by  org.apache.lucene.store.IndexOutput
            extended by  org.apache.lucene.store.BufferedIndexOutput
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
FSDirectory.FSIndexOutput
public abstract class BufferedIndexOutput
extends IndexOutput

Base implementation class for buffered IndexOutput.

Constructor Summary
BufferedIndexOutput()
Method Summary
void | close() Closes this stream to further operations.
void | flush() Forces any buffered output to be written.
protected abstract void | flushBuffer(byte[] b, int offset, int len) Expert: implements buffer write.
long | getFilePointer() Returns the current position in this file, where the next write will occur.
abstract long | length() The number of bytes in the file.
void | seek(long pos) Sets current position in this file, where the next write will occur.
void | writeByte(byte b) Writes a single byte.
void | writeBytes(byte[] b, int offset, int length) Writes an array of bytes.
Methods inherited from class org.apache.lucene.store.IndexOutput
setLength
Methods inherited from class org.apache.lucene.store.DataOutput
copyBytes, writeBytes, writeChars, writeChars, writeInt, writeLong, writeShort, writeString, writeStringStringMap, writeVInt, writeVLong
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BufferedIndexOutput

public BufferedIndexOutput()
Method Detail

writeByte

public void writeByte(byte b)
               throws IOException
Writes a single byte.

Specified by:
writeByte in class DataOutput
Throws:
IOException
See Also:
DataInput.readByte()

writeBytes

public void writeBytes(byte[] b,
                       int offset,
                       int length)
                throws IOException
Writes an array of bytes.

Specified by:
writeBytes in class DataOutput
Parameters:
b - the bytes to write
length - the number of bytes to write
offset - the offset in the byte array
Throws:
IOException
See Also:
DataInput.readBytes(byte[],int,int)

flush

public void flush()
           throws IOException
Forces any buffered output to be written.

Specified by:
flush in class IndexOutput
Throws:
IOException

flushBuffer

protected abstract void flushBuffer(byte[] b,
                                    int offset,
                                    int len)
                             throws IOException
Expert: implements buffer write. Writes bytes at the current position in the output.

Parameters:
b - the bytes to write
offset - the offset in the byte array
len - the number of bytes to write
Throws:
IOException

close

public void close()
           throws IOException
Closes this stream to further operations.

Specified by:
close in interface Closeable
Specified by:
close in class IndexOutput
Throws:
IOException

getFilePointer

public long getFilePointer()
Returns the current position in this file, where the next write will occur.

Specified by:
getFilePointer in class IndexOutput
See Also:
seek(long)

seek

public void seek(long pos)
          throws IOException
Sets current position in this file, where the next write will occur.

Specified by:
seek in class IndexOutput
Throws:
IOException
See Also:
getFilePointer()

length

public abstract long length()
                     throws IOException
The number of bytes in the file.

Specified by:
length in class IndexOutput
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ByteArrayDataInput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class ByteArrayDataInput

java.lang.Object
    extended by  org.apache.lucene.store.DataInput
        extended by  org.apache.lucene.store.ByteArrayDataInput
All Implemented Interfaces:
Cloneable
public final class ByteArrayDataInput
extends DataInput

DataInput backed by a byte array. WARNING: This class omits all low-level checks.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ByteArrayDataInput()
ByteArrayDataInput(byte[] bytes)
ByteArrayDataInput(byte[] bytes, int offset, int len)
Method Summary
boolean | eof()
int | getPosition()
byte | readByte() Reads and returns a single byte.
void | readBytes(byte[] b, int offset, int len) Reads a specified number of bytes into an array at the specified offset.
int | readInt() Reads four bytes and returns an int.
long | readLong() Reads eight bytes and returns a long.
short | readShort() Reads two bytes and returns a short.
int | readVInt() Reads an int stored in variable-length format.
long | readVLong() Reads a long stored in variable-length format.
void | reset(byte[] bytes)
void | reset(byte[] bytes, int offset, int len)
void | skipBytes(int count)
Methods inherited from class org.apache.lucene.store.DataInput
clone, readBytes, readChars, readString, readStringStringMap, setModifiedUTF8StringsMode
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ByteArrayDataInput

public ByteArrayDataInput(byte[] bytes)

ByteArrayDataInput

public ByteArrayDataInput(byte[] bytes,
                          int offset,
                          int len)

ByteArrayDataInput

public ByteArrayDataInput()
Method Detail

reset

public void reset(byte[] bytes)

getPosition

public int getPosition()

reset

public void reset(byte[] bytes,
                  int offset,
                  int len)

eof

public boolean eof()

skipBytes

public void skipBytes(int count)

readShort

public short readShort()
Description copied from class: DataInput
Reads two bytes and returns a short.

Overrides:
readShort in class DataInput
See Also:
DataOutput.writeByte(byte)

readInt

public int readInt()
Description copied from class: DataInput
Reads four bytes and returns an int.

Overrides:
readInt in class DataInput
See Also:
DataOutput.writeInt(int)

readLong

public long readLong()
Description copied from class: DataInput
Reads eight bytes and returns a long.

Overrides:
readLong in class DataInput
See Also:
DataOutput.writeLong(long)

readVInt

public int readVInt()
Description copied from class: DataInput
Reads an int stored in variable-length format. Reads between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.

Overrides:
readVInt in class DataInput
See Also:
DataOutput.writeVInt(int)

readVLong

public long readVLong()
Description copied from class: DataInput
Reads a long stored in variable-length format. Reads between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported.

Overrides:
readVLong in class DataInput

readByte

public byte readByte()
Description copied from class: DataInput
Reads and returns a single byte.

Specified by:
readByte in class DataInput
See Also:
DataOutput.writeByte(byte)

readBytes

public void readBytes(byte[] b,
                      int offset,
                      int len)
Description copied from class: DataInput
Reads a specified number of bytes into an array at the specified offset.

Specified by:
readBytes in class DataInput
Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
See Also:
DataOutput.writeBytes(byte[],int)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ByteArrayDataOutput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class ByteArrayDataOutput

java.lang.Object
    extended by  org.apache.lucene.store.DataOutput
        extended by  org.apache.lucene.store.ByteArrayDataOutput

public class ByteArrayDataOutput
extends DataOutput

DataOutput backed by a byte array. WARNING: This class omits most low-level checks, so be sure to test heavily with assertions enabled.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ByteArrayDataOutput()
ByteArrayDataOutput(byte[] bytes)
ByteArrayDataOutput(byte[] bytes, int offset, int len)
Method Summary
int | getPosition()
void | reset(byte[] bytes)
void | reset(byte[] bytes, int offset, int len)
void | writeByte(byte b) Writes a single byte.
void | writeBytes(byte[] b, int offset, int length) Writes an array of bytes.
Methods inherited from class org.apache.lucene.store.DataOutput
copyBytes, writeBytes, writeChars, writeChars, writeInt, writeLong, writeShort, writeString, writeStringStringMap, writeVInt, writeVLong
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ByteArrayDataOutput

public ByteArrayDataOutput(byte[] bytes)

ByteArrayDataOutput

public ByteArrayDataOutput(byte[] bytes,
                           int offset,
                           int len)

ByteArrayDataOutput

public ByteArrayDataOutput()
Method Detail

reset

public void reset(byte[] bytes)

reset

public void reset(byte[] bytes,
                  int offset,
                  int len)

getPosition

public int getPosition()

writeByte

public void writeByte(byte b)
Description copied from class: DataOutput
Writes a single byte.

Specified by:
writeByte in class DataOutput
See Also:
DataInput.readByte()

writeBytes

public void writeBytes(byte[] b,
                       int offset,
                       int length)
Description copied from class: DataOutput
Writes an array of bytes.

Specified by:
writeBytes in class DataOutput
Parameters:
b - the bytes to write
offset - the offset in the byte array
length - the number of bytes to write
See Also:
DataInput.readBytes(byte[],int,int)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ChecksumIndexInput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class ChecksumIndexInput

java.lang.Object
    extended by  org.apache.lucene.store.DataInput
        extended by  org.apache.lucene.store.IndexInput
            extended by  org.apache.lucene.store.ChecksumIndexInput
All Implemented Interfaces:
Closeable, Cloneable
public class ChecksumIndexInput
extends IndexInput

Writes bytes through to a primary IndexOutput, computing checksum as it goes. Note that you cannot use seek().

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
ChecksumIndexInput(IndexInput main)
Method Summary
void | close() Closes the stream to further operations.
long | getChecksum()
long | getFilePointer() Returns the current position in this file, where the next read will occur.
long | length() The number of bytes in the file.
byte | readByte() Reads and returns a single byte.
void | readBytes(byte[] b, int offset, int len) Reads a specified number of bytes into an array at the specified offset.
void | seek(long pos) Sets current position in this file, where the next read will occur.
Methods inherited from class org.apache.lucene.store.IndexInput
copyBytes, skipChars, toString
Methods inherited from class org.apache.lucene.store.DataInput
clone, readBytes, readChars, readInt, readLong, readShort, readString, readStringStringMap, readVInt, readVLong, setModifiedUTF8StringsMode
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ChecksumIndexInput

public ChecksumIndexInput(IndexInput main)
Method Detail

readByte

public byte readByte()
              throws IOException
Description copied from class: DataInput
Reads and returns a single byte.

Specified by:
readByte in class DataInput
Throws:
IOException
See Also:
DataOutput.writeByte(byte)

readBytes

public void readBytes(byte[] b,
                      int offset,
                      int len)
               throws IOException
Description copied from class: DataInput
Reads a specified number of bytes into an array at the specified offset.

Specified by:
readBytes in class DataInput
Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
Throws:
IOException
See Also:
DataOutput.writeBytes(byte[],int)

getChecksum

public long getChecksum()

close

public void close()
           throws IOException
Description copied from class: IndexInput
Closes the stream to further operations.

Specified by:
close in interface Closeable
Specified by:
close in class IndexInput
Throws:
IOException

getFilePointer

public long getFilePointer()
Description copied from class: IndexInput
Returns the current position in this file, where the next read will occur.

Specified by:
getFilePointer in class IndexInput
See Also:
IndexInput.seek(long)

seek

public void seek(long pos)
Description copied from class: IndexInput
Sets current position in this file, where the next read will occur.

Specified by:
seek in class IndexInput
See Also:
IndexInput.getFilePointer()

length

public long length()
Description copied from class: IndexInput
The number of bytes in the file.

Specified by:
length in class IndexInput
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ChecksumIndexOutput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class ChecksumIndexOutput

java.lang.Object
    extended by  org.apache.lucene.store.DataOutput
        extended by  org.apache.lucene.store.IndexOutput
            extended by  org.apache.lucene.store.ChecksumIndexOutput
All Implemented Interfaces:
Closeable
public class ChecksumIndexOutput
extends IndexOutput

Writes bytes through to a primary IndexOutput, computing checksum. Note that you cannot use seek().

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
ChecksumIndexOutput(IndexOutput main)
Method Summary
 void close()
Closes this stream to further operations.
 void finishCommit()
See prepareCommit()
 void flush()
Forces any buffered output to be written.
 long getChecksum()
 long getFilePointer()
Returns the current position in this file, where the next write will occur.
 long length()
The number of bytes in the file.
 void prepareCommit()
Starts but does not complete the commit of this file (= writing of the final checksum at the end).
 void seek(long pos)
Sets current position in this file, where the next write will occur.
 void writeByte(byte b)
Writes a single byte.
 void writeBytes(byte[] b, int offset, int length)
Writes an array of bytes.
Methods inherited from class org.apache.lucene.store.IndexOutput
setLength
Methods inherited from class org.apache.lucene.store.DataOutput
copyBytes, writeBytes, writeChars, writeChars, writeInt, writeLong, writeShort, writeString, writeStringStringMap, writeVInt, writeVLong
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ChecksumIndexOutput

public ChecksumIndexOutput(IndexOutput main)
Method Detail

writeByte

public void writeByte(byte b)
               throws IOException
Description copied from class: DataOutput
Writes a single byte.

Specified by:
writeByte in class DataOutput
Throws:
IOException
See Also:
DataInput.readByte()

writeBytes

public void writeBytes(byte[] b,
                       int offset,
                       int length)
                throws IOException
Description copied from class: DataOutput
Writes an array of bytes.

Specified by:
writeBytes in class DataOutput
Parameters:
b - the bytes to write
offset - the offset in the byte array
length - the number of bytes to write
Throws:
IOException
See Also:
DataInput.readBytes(byte[],int,int)

getChecksum

public long getChecksum()

flush

public void flush()
           throws IOException
Description copied from class: IndexOutput
Forces any buffered output to be written.

Specified by:
flush in class IndexOutput
Throws:
IOException

close

public void close()
           throws IOException
Description copied from class: IndexOutput
Closes this stream to further operations.

Specified by:
close in interface Closeable
Specified by:
close in class IndexOutput
Throws:
IOException

getFilePointer

public long getFilePointer()
Description copied from class: IndexOutput
Returns the current position in this file, where the next write will occur.

Specified by:
getFilePointer in class IndexOutput
See Also:
IndexOutput.seek(long)

seek

public void seek(long pos)
Description copied from class: IndexOutput
Sets current position in this file, where the next write will occur.

Specified by:
seek in class IndexOutput
See Also:
IndexOutput.getFilePointer()

prepareCommit

public void prepareCommit()
                   throws IOException
Starts but does not complete the commit of this file (= writing of the final checksum at the end). After this is called must call finishCommit() and the close() to complete the commit.

Throws:
IOException

finishCommit

public void finishCommit()
                  throws IOException
See prepareCommit()

Throws:
IOException

length

public long length()
            throws IOException
Description copied from class: IndexOutput
The number of bytes in the file.

Specified by:
length in class IndexOutput
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DataInput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class DataInput

java.lang.Object
    extended by  org.apache.lucene.store.DataInput
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ByteArrayDataInput, FST.BytesReader, IndexInput, InputStreamDataInput, PagedBytes.PagedBytesDataInput
public abstract class DataInput
extends Object
implements Cloneable

Abstract base class for performing read operations of Lucene's low-level data types.

Constructor Summary
DataInput()
Method Summary
Object | clone() Returns a clone of this stream.
abstract byte | readByte() Reads and returns a single byte.
abstract void | readBytes(byte[] b, int offset, int len) Reads a specified number of bytes into an array at the specified offset.
void | readBytes(byte[] b, int offset, int len, boolean useBuffer) Reads a specified number of bytes into an array at the specified offset with control over whether the read should be buffered (callers who have their own buffer should pass in "false" for useBuffer).
void | readChars(char[] buffer, int start, int length) Deprecated. -- please use readString or readBytes instead, and construct the string from those utf8 bytes
int | readInt() Reads four bytes and returns an int.
long | readLong() Reads eight bytes and returns a long.
short | readShort() Reads two bytes and returns a short.
String | readString() Reads a string.
Map<String,String> | readStringStringMap()
int | readVInt() Reads an int stored in variable-length format.
long | readVLong() Reads a long stored in variable-length format.
void | setModifiedUTF8StringsMode() Call this if readString should read characters stored in the old modified UTF8 format (length in java chars and java's modified UTF8 encoding).
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DataInput

public DataInput()
Method Detail

setModifiedUTF8StringsMode

public void setModifiedUTF8StringsMode()
Call this if readString should read characters stored in the old modified UTF8 format (length in java chars and java's modified UTF8 encoding). This is used for indices written pre-2.4 See LUCENE-510 for details.

readByte

public abstract byte readByte()
                       throws IOException
Reads and returns a single byte.

Throws:
IOException
See Also:
DataOutput.writeByte(byte)

readBytes

public abstract void readBytes(byte[] b,
                               int offset,
                               int len)
                        throws IOException
Reads a specified number of bytes into an array at the specified offset.

Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
Throws:
IOException
See Also:
DataOutput.writeBytes(byte[],int)

readBytes

public void readBytes(byte[] b,
                      int offset,
                      int len,
                      boolean useBuffer)
               throws IOException
Reads a specified number of bytes into an array at the specified offset with control over whether the read should be buffered (callers who have their own buffer should pass in "false" for useBuffer). Currently only BufferedIndexInput respects this parameter.

Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
useBuffer - set to false if the caller will handle buffering.
Throws:
IOException
See Also:
DataOutput.writeBytes(byte[],int)

readShort

public short readShort()
                throws IOException
Reads two bytes and returns a short.

Throws:
IOException
See Also:
DataOutput.writeByte(byte)

readInt

public int readInt()
            throws IOException
Reads four bytes and returns an int.

Throws:
IOException
See Also:
DataOutput.writeInt(int)

readVInt

public int readVInt()
             throws IOException
Reads an int stored in variable-length format. Reads between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.

Throws:
IOException
See Also:
DataOutput.writeVInt(int)

readLong

public long readLong()
              throws IOException
Reads eight bytes and returns a long.

Throws:
IOException
See Also:
DataOutput.writeLong(long)

readVLong

public long readVLong()
               throws IOException
Reads a long stored in variable-length format. Reads between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported.

Throws:
IOException

readString

public String readString()
                  throws IOException
Reads a string.

Throws:
IOException
See Also:
DataOutput.writeString(String)

readChars

@Deprecated
public void readChars(char[] buffer,
                                 int start,
                                 int length)
               throws IOException
Deprecated. -- please use readString or readBytes instead, and construct the string from those utf8 bytes

Reads Lucene's old "modified UTF-8" encoded characters into an array.

Parameters:
buffer - the array to read characters into
start - the offset in the array to start storing characters
length - the number of characters to read
Throws:
IOException
See Also:
DataOutput.writeChars(String,int,int)

clone

public Object clone()
Returns a clone of this stream.

Clones of a stream access the same data, and are positioned at the same point as the stream they were cloned from.

Expert: Subclasses must ensure that clones may be positioned at different points in the input from each other and from the stream they were cloned from.

Overrides:
clone in class Object

readStringStringMap

public Map<String,String> readStringStringMap()
                                       throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DataOutput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class DataOutput

java.lang.Object
    extended by  org.apache.lucene.store.DataOutput
Direct Known Subclasses:
ByteArrayDataOutput, IndexOutput, OutputStreamDataOutput, PagedBytes.PagedBytesDataOutput
public abstract class DataOutput
extends Object

Abstract base class for performing write operations of Lucene's low-level data types.

Constructor Summary
DataOutput()
Method Summary
 void copyBytes(DataInput input, long numBytes)
Copy numBytes bytes from input to ourself.
abstract  void writeByte(byte b)
Writes a single byte.
 void writeBytes(byte[] b, int length)
Writes an array of bytes.
abstract  void writeBytes(byte[] b, int offset, int length)
Writes an array of bytes.
 void writeChars(char[] s, int start, int length)
Deprecated. -- please pre-convert to utf8 bytes instead or use writeString(java.lang.String)
 void writeChars(String s, int start, int length)
Deprecated. -- please pre-convert to utf8 bytes instead or use writeString(java.lang.String)
 void writeInt(int i)
Writes an int as four bytes.
 void writeLong(long i)
Writes a long as eight bytes.
 void writeShort(short i)
Writes a short as two bytes.
 void writeString(String s)
Writes a string.
 void writeStringStringMap(Map<String,String> map)
 void writeVInt(int i)
Writes an int in a variable-length format.
 void writeVLong(long i)
Writes an long in a variable-length format.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DataOutput

public DataOutput()
Method Detail

writeByte

public abstract void writeByte(byte b)
                        throws IOException
Writes a single byte.

Throws:
IOException
See Also:
DataInput.readByte()

writeBytes

public void writeBytes(byte[] b,
                       int length)
                throws IOException
Writes an array of bytes.

Parameters:
b - the bytes to write
length - the number of bytes to write
Throws:
IOException
See Also:
DataInput.readBytes(byte[],int,int)

writeBytes

public abstract void writeBytes(byte[] b,
                                int offset,
                                int length)
                         throws IOException
Writes an array of bytes.

Parameters:
b - the bytes to write
offset - the offset in the byte array
length - the number of bytes to write
Throws:
IOException
See Also:
DataInput.readBytes(byte[],int,int)

writeInt

public void writeInt(int i)
              throws IOException
Writes an int as four bytes.

Throws:
IOException
See Also:
DataInput.readInt()

writeShort

public void writeShort(short i)
                throws IOException
Writes a short as two bytes.

Throws:
IOException
See Also:
DataInput.readShort()

writeVInt

public final void writeVInt(int i)
                     throws IOException
Writes an int in a variable-length format. Writes between one and five bytes. Smaller values take fewer bytes. Negative numbers are supported, but should be avoided.

Throws:
IOException
See Also:
DataInput.readVInt()

writeLong

public void writeLong(long i)
               throws IOException
Writes a long as eight bytes.

Throws:
IOException
See Also:
DataInput.readLong()

writeVLong

public final void writeVLong(long i)
                      throws IOException
Writes an long in a variable-length format. Writes between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported.

Throws:
IOException
See Also:
DataInput.readVLong()

writeString

public void writeString(String s)
                 throws IOException
Writes a string.

Throws:
IOException
See Also:
DataInput.readString()

copyBytes

public void copyBytes(DataInput input,
                      long numBytes)
               throws IOException
Copy numBytes bytes from input to ourself.

Throws:
IOException

writeChars

@Deprecated
public void writeChars(String s,
                                  int start,
                                  int length)
                throws IOException
Deprecated. -- please pre-convert to utf8 bytes instead or use writeString(java.lang.String)

Writes a sub sequence of characters from s as the old format (modified UTF-8 encoded bytes).

Parameters:
s - the source of the characters
start - the first character in the sequence
length - the number of characters in the sequence
Throws:
IOException

writeChars

@Deprecated
public void writeChars(char[] s,
                                  int start,
                                  int length)
                throws IOException
Deprecated. -- please pre-convert to utf8 bytes instead or use writeString(java.lang.String)

Writes a sub sequence of characters from char[] as the old format (modified UTF-8 encoded bytes).

Parameters:
s - the source of the characters
start - the first character in the sequence
length - the number of characters in the sequence
Throws:
IOException

writeStringStringMap

public void writeStringStringMap(Map<String,String> map)
                          throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DirectIOLinuxDirectory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class DirectIOLinuxDirectory

java.lang.Object
    extended by  org.apache.lucene.store.Directory
        extended by  org.apache.lucene.store.FSDirectory
            extended by  org.apache.lucene.store.DirectIOLinuxDirectory
All Implemented Interfaces:
Closeable
public class DirectIOLinuxDirectory
extends FSDirectory

An Directory implementation that uses the Linux-specific O_DIRECT flag to bypass all OS level caching. To use this you must compile NativePosixUtil.cpp (exposes Linux-specific APIs through JNI) for your platform.

WARNING: this code is very new and quite easily could contain horrible bugs. For example, here's one known issue: if you use seek in IndexOutput, and then write more than one buffer's worth of bytes, then the file will be wrong. Lucene does not do this (only writes small number of bytes after seek).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.store.FSDirectory
FSDirectory.FSIndexOutput
Field Summary
Fields inherited from class org.apache.lucene.store.FSDirectory
DEFAULT_READ_CHUNK_SIZE, directory, staleFiles
Fields inherited from class org.apache.lucene.store.Directory
isOpen, lockFactory
Constructor Summary
DirectIOLinuxDirectory(File path, LockFactory lockFactory, int forcedBufferSize)
Create a new NIOFSDirectory for the named location.
Method Summary
IndexOutput | createOutput(String name) Creates an IndexOutput for the file with the given name.
IndexInput | openInput(String name, int bufferSize) Returns a stream reading an existing file, with the specified read buffer size.
Methods inherited from class org.apache.lucene.store.FSDirectory
close, deleteFile, ensureCanWrite, fileExists, fileLength, fileModified, fileModified, fsync, getDirectory, getFile, getLockID, getReadChunkSize, listAll, listAll, onIndexOutputClosed, open, open, openInput, setLockFactory, setReadChunkSize, sync, sync, toString, touchFile
Methods inherited from class org.apache.lucene.store.Directory
clearLock, copy, copy, ensureOpen, getLockFactory, makeLock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DirectIOLinuxDirectory

public DirectIOLinuxDirectory(File path,
                              LockFactory lockFactory,
                              int forcedBufferSize)
                       throws IOException
Create a new NIOFSDirectory for the named location.

Parameters:
path - the path of the directory
lockFactory - the lock factory to use, or null for the default (NativeFSLockFactory);
forcedBufferSize - if this is 0, just use Lucene's default buffer size; else, force this buffer size. For best performance, force the buffer size to something fairly large (eg 1 MB), but note that this will eat up the JRE's direct buffer storage space
Throws:
IOException
Method Detail

openInput

public IndexInput openInput(String name,
                            int bufferSize)
                     throws IOException
Description copied from class: Directory
Returns a stream reading an existing file, with the specified read buffer size. The particular Directory implementation may ignore the buffer size. Currently the only Directory implementations that respect this parameter are FSDirectory and CompoundFileReader.

Overrides:
openInput in class Directory
Throws:
IOException

createOutput

public IndexOutput createOutput(String name)
                         throws IOException
Description copied from class: FSDirectory
Creates an IndexOutput for the file with the given name.

Overrides:
createOutput in class FSDirectory
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Directory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class Directory

java.lang.Object
    extended by  org.apache.lucene.store.Directory
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
FileSwitchDirectory, FSDirectory, MockDirectoryWrapper, NRTCachingDirectory, RAMDirectory
public abstract class Directory
extends Object
implements Closeable

A Directory is a flat list of files. Files may be written once, when they are created. Once a file is created it may only be opened for read, or deleted. Random access is permitted both when reading and writing.

Java's i/o APIs not used directly, but rather all i/o is through this API. This permits things such as:

  • implementation of RAM-based indices;
  • implementation indices stored in a database, via JDBC;
  • implementation of an index as a single file;
Directory locking is implemented by an instance of LockFactory, and can be changed for each Directory instance using setLockFactory(org.apache.lucene.store.LockFactory).

Field Summary
protected boolean | isOpen
protected LockFactory | lockFactory Holds the LockFactory instance (implements locking for this Directory instance).
Constructor Summary
Directory()
Method Summary
 void clearLock(String name)
Attempt to clear (forcefully unlock and remove) the specified lock.
abstract  void close()
Closes the store.
static void copy(Directory src, Directory dest, boolean closeDirSrc)
Deprecated. should be replaced with calls to copy(Directory, String, String) for every file that needs copying. You can use the following code:
 IndexFileNameFilter filter = IndexFileNameFilter.getFilter();
 for (String file : src.listAll()) {
   if (filter.accept(null, file)) {
     src.copy(dest, file, file);
   }
 }
 void copy(Directory to, String src, String dest)
Copies the file src to Directory to under the new file name dest.
abstract  IndexOutput createOutput(String name)
Creates a new, empty file in the directory with the given name.
abstract  void deleteFile(String name)
Removes an existing file in the directory.
protected  void ensureOpen()
abstract  boolean fileExists(String name)
Returns true iff a file with the given name exists.
abstract  long fileLength(String name)
Returns the length of a file in the directory.
abstract  long fileModified(String name)
Deprecated.
 LockFactory getLockFactory()
Get the LockFactory that this Directory instance is using for its locking implementation.
 String getLockID()
Return a string identifier that uniquely differentiates this Directory instance from other Directory instances.
abstract  String[] listAll()
Returns an array of strings, one for each file in the directory.
 Lock makeLock(String name)
Construct a Lock.
abstract  IndexInput openInput(String name)
Returns a stream reading an existing file.
 IndexInput openInput(String name, int bufferSize)
Returns a stream reading an existing file, with the specified read buffer size.
 void setLockFactory(LockFactory lockFactory)
Set the LockFactory that this Directory instance should use for its locking implementation.
 void sync(Collection<String> names)
Ensure that any writes to these files are moved to stable storage.
 void sync(String name)
Deprecated. use sync(Collection) instead. For easy migration you can change your code to call sync(Collections.singleton(name))
 String toString()
abstract  void touchFile(String name)
Deprecated. Lucene never uses this API; it will be removed in 4.0.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

isOpen

protected volatile boolean isOpen

lockFactory

protected LockFactory lockFactory
Holds the LockFactory instance (implements locking for this Directory instance).

Constructor Detail

Directory

public Directory()
Method Detail

listAll

public abstract String[] listAll()
                          throws IOException
Returns an array of strings, one for each file in the directory.

Throws:
NoSuchDirectoryException - if the directory is not prepared for any write operations (such as createOutput(String)).
IOException - in case of other IO errors

fileExists

public abstract boolean fileExists(String name)
                            throws IOException
Returns true iff a file with the given name exists.

Throws:
IOException

fileModified

@Deprecated
public abstract long fileModified(String name)
                           throws IOException
Deprecated.

Returns the time the named file was last modified.

Throws:
IOException

touchFile

@Deprecated
public abstract void touchFile(String name)
                        throws IOException
Deprecated. Lucene never uses this API; it will be removed in 4.0.

Set the modified time of an existing file to now.

Throws:
IOException

deleteFile

public abstract void deleteFile(String name)
                         throws IOException
Removes an existing file in the directory.

Throws:
IOException

fileLength

public abstract long fileLength(String name)
                         throws IOException
Returns the length of a file in the directory. This method follows the following contract:
  • Throws FileNotFoundException if the file does not exist
  • Returns a value ≥0 if the file exists, which specifies its length.

Parameters:
name - the name of the file for which to return the length.
Throws:
FileNotFoundException - if the file does not exist.
IOException - if there was an IO error while retrieving the file's length.

createOutput

public abstract IndexOutput createOutput(String name)
                                  throws IOException
Creates a new, empty file in the directory with the given name. Returns a stream writing this file.

Throws:
IOException

sync

@Deprecated
public void sync(String name)
          throws IOException
Deprecated. use sync(Collection) instead. For easy migration you can change your code to call sync(Collections.singleton(name))

Ensure that any writes to this file are moved to stable storage. Lucene uses this to properly commit changes to the index, to prevent a machine/OS crash from corrupting the index.

Throws:
IOException

sync

public void sync(Collection<String> names)
          throws IOException
Ensure that any writes to these files are moved to stable storage. Lucene uses this to properly commit changes to the index, to prevent a machine/OS crash from corrupting the index.

NOTE: Clients may call this method for same files over and over again, so some impls might optimize for that. For other impls the operation can be a noop, for various reasons.

Throws:
IOException

openInput

public abstract IndexInput openInput(String name)
                              throws IOException
Returns a stream reading an existing file.

Throws:
IOException

openInput

public IndexInput openInput(String name,
                            int bufferSize)
                     throws IOException
Returns a stream reading an existing file, with the specified read buffer size. The particular Directory implementation may ignore the buffer size. Currently the only Directory implementations that respect this parameter are FSDirectory and CompoundFileReader.

Throws:
IOException

makeLock

public Lock makeLock(String name)
Construct a Lock.

Parameters:
name - the name of the lock file

clearLock

public void clearLock(String name)
               throws IOException
Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you are certain this lock is no longer in use.

Parameters:
name - name of the lock to be cleared.
Throws:
IOException

close

public abstract void close()
                    throws IOException
Closes the store.

Specified by:
close in interface Closeable
Throws:
IOException

setLockFactory

public void setLockFactory(LockFactory lockFactory)
                    throws IOException
Set the LockFactory that this Directory instance should use for its locking implementation. Each * instance of LockFactory should only be used for one directory (ie, do not share a single instance across multiple Directories).

Parameters:
lockFactory - instance of LockFactory.
Throws:
IOException

getLockFactory

public LockFactory getLockFactory()
Get the LockFactory that this Directory instance is using for its locking implementation. Note that this may be null for Directory implementations that provide their own locking implementation.

getLockID

public String getLockID()
Return a string identifier that uniquely differentiates this Directory instance from other Directory instances. This ID should be the same if two Directory instances (even in different JVMs and/or on different machines) are considered "the same index". This is how locking "scopes" to the right index.

toString

public String toString()
Overrides:
toString in class Object

copy

public void copy(Directory to,
                 String src,
                 String dest)
          throws IOException
Copies the file src to Directory to under the new file name dest.

If you want to copy the entire source directory to the destination one, you can do so like this:

 Directory to; // the directory to copy to
 for (String file : dir.listAll()) {
   dir.copy(to, file, newFile); // newFile can be either file, or a new name
 }

NOTE: this method does not check whether dest exist and will overwrite it if it does.

Throws:
IOException

copy

@Deprecated
public static void copy(Directory src,
                                   Directory dest,
                                   boolean closeDirSrc)
                 throws IOException
Deprecated. should be replaced with calls to copy(Directory, String, String) for every file that needs copying. You can use the following code:
 IndexFileNameFilter filter = IndexFileNameFilter.getFilter();
 for (String file : src.listAll()) {
   if (filter.accept(null, file)) {
     src.copy(dest, file, file);
   }
 }

Copy contents of a directory src to a directory dest. If a file in src already exists in dest then the one in dest will be blindly overwritten.

NOTE: the source directory cannot change while this method is running. Otherwise the results are undefined and you could easily hit a FileNotFoundException.

NOTE: this method only copies files that look like index files (ie, have extensions matching the known extensions of index files).

Parameters:
src - source directory
dest - destination directory
closeDirSrc - if true, call close() method on source directory
Throws:
IOException

ensureOpen

protected final void ensureOpen()
                         throws AlreadyClosedException
Throws:
AlreadyClosedException - if this Directory is closed
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FileSwitchDirectory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class FileSwitchDirectory

java.lang.Object
    extended by  org.apache.lucene.store.Directory
        extended by  org.apache.lucene.store.FileSwitchDirectory
All Implemented Interfaces:
Closeable
public class FileSwitchDirectory
extends Directory

Expert: A Directory instance that switches files between two other Directory instances.

Files with the specified extensions are placed in the primary directory; others are placed in the secondary directory. The provided Set must not change once passed to this class, and must allow multiple threads to call contains at once.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.store.Directory
isOpen, lockFactory
Constructor Summary
FileSwitchDirectory(Set<String> primaryExtensions, Directory primaryDir, Directory secondaryDir, boolean doClose)
Method Summary
void | close() Closes the store.
IndexOutput | createOutput(String name) Creates a new, empty file in the directory with the given name.
void | deleteFile(String name) Removes an existing file in the directory.
boolean | fileExists(String name) Returns true iff a file with the given name exists.
long | fileLength(String name) Returns the length of a file in the directory.
long | fileModified(String name) Returns the time the named file was last modified.
static String | getExtension(String name) Utility method to return a file's extension.
Directory | getPrimaryDir() Return the primary directory
Directory | getSecondaryDir() Return the secondary directory
String[] | listAll() Returns an array of strings, one for each file in the directory.
IndexInput | openInput(String name) Returns a stream reading an existing file.
void | sync(Collection<String> names) Ensure that any writes to these files are moved to stable storage.
void | sync(String name) Deprecated.
void | touchFile(String name) Deprecated.
Methods inherited from class org.apache.lucene.store.Directory
clearLock, copy, copy, ensureOpen, getLockFactory, getLockID, makeLock, openInput, setLockFactory, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FileSwitchDirectory

public FileSwitchDirectory(Set<String> primaryExtensions,
                           Directory primaryDir,
                           Directory secondaryDir,
                           boolean doClose)
Method Detail

getPrimaryDir

public Directory getPrimaryDir()
Return the primary directory

getSecondaryDir

public Directory getSecondaryDir()
Return the secondary directory

close

public void close()
           throws IOException
Description copied from class: Directory
Closes the store.

Specified by:
close in interface Closeable
Specified by:
close in class Directory
Throws:
IOException

listAll

public String[] listAll()
                 throws IOException
Description copied from class: Directory
Returns an array of strings, one for each file in the directory.

Specified by:
listAll in class Directory
Throws:
NoSuchDirectoryException - if the directory is not prepared for any write operations (such as Directory.createOutput(String)).
IOException - in case of other IO errors

getExtension

public static String getExtension(String name)
Utility method to return a file's extension.

fileExists

public boolean fileExists(String name)
                   throws IOException
Description copied from class: Directory
Returns true iff a file with the given name exists.

Specified by:
fileExists in class Directory
Throws:
IOException

fileModified

public long fileModified(String name)
                  throws IOException
Description copied from class: Directory
Returns the time the named file was last modified.

Specified by:
fileModified in class Directory
Throws:
IOException

touchFile

@Deprecated
public void touchFile(String name)
               throws IOException
Deprecated.

Description copied from class: Directory
Set the modified time of an existing file to now.

Specified by:
touchFile in class Directory
Throws:
IOException

deleteFile

public void deleteFile(String name)
                throws IOException
Description copied from class: Directory
Removes an existing file in the directory.

Specified by:
deleteFile in class Directory
Throws:
IOException

fileLength

public long fileLength(String name)
                throws IOException
Description copied from class: Directory
Returns the length of a file in the directory. This method follows the following contract:
  • Throws FileNotFoundException if the file does not exist
  • Returns a value ≥0 if the file exists, which specifies its length.

Specified by:
fileLength in class Directory
Parameters:
name - the name of the file for which to return the length.
Throws:
FileNotFoundException - if the file does not exist.
IOException - if there was an IO error while retrieving the file's length.

createOutput

public IndexOutput createOutput(String name)
                         throws IOException
Description copied from class: Directory
Creates a new, empty file in the directory with the given name. Returns a stream writing this file.

Specified by:
createOutput in class Directory
Throws:
IOException

sync

@Deprecated
public void sync(String name)
          throws IOException
Deprecated.

Description copied from class: Directory
Ensure that any writes to this file are moved to stable storage. Lucene uses this to properly commit changes to the index, to prevent a machine/OS crash from corrupting the index.

Overrides:
sync in class Directory
Throws:
IOException

sync

public void sync(Collection<String> names)
          throws IOException
Description copied from class: Directory
Ensure that any writes to these files are moved to stable storage. Lucene uses this to properly commit changes to the index, to prevent a machine/OS crash from corrupting the index.

NOTE: Clients may call this method for same files over and over again, so some impls might optimize for that. For other impls the operation can be a noop, for various reasons.

Overrides:
sync in class Directory
Throws:
IOException

openInput

public IndexInput openInput(String name)
                     throws IOException
Description copied from class: Directory
Returns a stream reading an existing file.

Specified by:
openInput in class Directory
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FSDirectory.FSIndexOutput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class FSDirectory.FSIndexOutput

java.lang.Object
    extended by  org.apache.lucene.store.DataOutput
        extended by  org.apache.lucene.store.IndexOutput
            extended by  org.apache.lucene.store.BufferedIndexOutput
                extended by  org.apache.lucene.store.FSDirectory.FSIndexOutput
All Implemented Interfaces:
Closeable
Enclosing class:
FSDirectory
protected static class FSDirectory.FSIndexOutput
extends BufferedIndexOutput

Constructor Summary
FSDirectory.FSIndexOutput(FSDirectory parent, String name)
Method Summary
void | close() Closes this stream to further operations.
void | flushBuffer(byte[] b, int offset, int size) output methods:
long | length() The number of bytes in the file.
void | seek(long pos) Random-access methods
void | setLength(long length) Set the file length.
Methods inherited from class org.apache.lucene.store.BufferedIndexOutput
flush, getFilePointer, writeByte, writeBytes
Methods inherited from class org.apache.lucene.store.DataOutput
copyBytes, writeBytes, writeChars, writeChars, writeInt, writeLong, writeShort, writeString, writeStringStringMap, writeVInt, writeVLong
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FSDirectory.FSIndexOutput

public FSDirectory.FSIndexOutput(FSDirectory parent,
                                 String name)
                          throws IOException
Throws:
IOException
Method Detail

flushBuffer

public void flushBuffer(byte[] b,
                        int offset,
                        int size)
                 throws IOException
output methods:

Specified by:
flushBuffer in class BufferedIndexOutput
Parameters:
b - the bytes to write
offset - the offset in the byte array
size - the number of bytes to write
Throws:
IOException

close

public void close()
           throws IOException
Description copied from class: BufferedIndexOutput
Closes this stream to further operations.

Specified by:
close in interface Closeable
Overrides:
close in class BufferedIndexOutput
Throws:
IOException

seek

public void seek(long pos)
          throws IOException
Random-access methods

Overrides:
seek in class BufferedIndexOutput
Throws:
IOException
See Also:
BufferedIndexOutput.getFilePointer()

length

public long length()
            throws IOException
Description copied from class: BufferedIndexOutput
The number of bytes in the file.

Specified by:
length in class BufferedIndexOutput
Throws:
IOException

setLength

public void setLength(long length)
               throws IOException
Description copied from class: IndexOutput
Set the file length. By default, this method does nothing (it's optional for a Directory to implement it). But, certain Directory implementations (for example @see FSDirectory) can use this to inform the underlying IO system to pre-allocate the file to the specified size. If the length is longer than the current file length, the bytes added to the file are undefined. Otherwise the file is truncated.

Overrides:
setLength in class IndexOutput
Parameters:
length - file length
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FSDirectory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class FSDirectory

java.lang.Object
    extended by  org.apache.lucene.store.Directory
        extended by  org.apache.lucene.store.FSDirectory
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
DirectIOLinuxDirectory, MMapDirectory, NIOFSDirectory, SimpleFSDirectory, WindowsDirectory
public abstract class FSDirectory
extends Directory

Base class for Directory implementations that store index files in the file system. There are currently three core subclasses:

  • SimpleFSDirectory is a straightforward implementation using java.io.RandomAccessFile. However, it has poor concurrent performance (multiple threads will bottleneck) as it synchronizes when multiple threads read from the same file.
  • NIOFSDirectory uses java.nio's FileChannel's positional io when reading to avoid synchronization when reading from the same file. Unfortunately, due to a Windows-only Sun JRE bug this is a poor choice for Windows, but on all other platforms this is the preferred choice. Applications using Thread.interrupt() or Future.cancel(boolean) should use SimpleFSDirectory instead. See NIOFSDirectory java doc for details.
  • MMapDirectory uses memory-mapped IO when reading. This is a good choice if you have plenty of virtual memory relative to your index size, eg if you are running on a 64 bit JRE, or you are running on a 32 bit JRE but your index sizes are small enough to fit into the virtual memory space. Java has currently the limitation of not being able to unmap files from user code. The files are unmapped, when GC releases the byte buffers. Due to this bug in Sun's JRE, MMapDirectory's IndexInput.close() is unable to close the underlying OS file handle. Only when GC finally collects the underlying objects, which could be quite some time later, will the file handle be closed. This will consume additional transient disk usage: on Windows, attempts to delete or overwrite the files will result in an exception; on other platforms, which typically have a "delete on last close" semantics, while such operations will succeed, the bytes are still consuming space on disk. For many applications this limitation is not a problem (e.g. if you have plenty of disk space, and you don't rely on overwriting files on Windows) but it's still an important limitation to be aware of. This class supplies a (possibly dangerous) workaround mentioned in the bug report, which may fail on non-Sun JVMs. Applications using Thread.interrupt() or Future.cancel(boolean) should use SimpleFSDirectory instead. See MMapDirectory java doc for details.
Unfortunately, because of system peculiarities, there is no single overall best implementation. Therefore, we've added the open(java.io.File) method, to allow Lucene to choose the best FSDirectory implementation given your environment, and the known limitations of each implementation. For users who have no reason to prefer a specific implementation, it's best to simply use open(java.io.File). For all others, you should instantiate the desired implementation directly.

The locking implementation is by default NativeFSLockFactory, but can be changed by passing in a custom LockFactory instance.

See Also:
Directory

Nested Class Summary
protected static class FSDirectory.FSIndexOutput
Field Summary
static int | DEFAULT_READ_CHUNK_SIZE Default read chunk size.
protected File | directory
protected Set<String> | staleFiles
Fields inherited from class org.apache.lucene.store.Directory
isOpen, lockFactory
Constructor Summary
protected FSDirectory(File path, LockFactory lockFactory)
Create a new FSDirectory for the named location (ctor for subclasses).
Method Summary
 void close()
Closes the store to future operations.
 IndexOutput createOutput(String name)
Creates an IndexOutput for the file with the given name.
 void deleteFile(String name)
Removes an existing file in the directory.
protected  void ensureCanWrite(String name)
 boolean fileExists(String name)
Returns true iff a file with the given name exists.
 long fileLength(String name)
Returns the length in bytes of a file in the directory.
static long fileModified(File directory, String name)
Returns the time the named file was last modified.
 long fileModified(String name)
Returns the time the named file was last modified.
protected  void fsync(String name)
 File getDirectory()
 File getFile()
Deprecated. Use getDirectory() instead.
 String getLockID()
Return a string identifier that uniquely differentiates this Directory instance from other Directory instances.
 int getReadChunkSize()
The maximum number of bytes to read at once from the underlying file during DataInput.readBytes(byte[], int, int).
 String[] listAll()
Lists all files (not subdirectories) in the directory.
static String[] listAll(File dir)
Lists all files (not subdirectories) in the directory.
protected  void onIndexOutputClosed(FSDirectory.FSIndexOutput io)
static FSDirectory open(File path)
Creates an FSDirectory instance, trying to pick the best implementation given the current environment.
static FSDirectory open(File path, LockFactory lockFactory)
Just like open(File), but allows you to also specify a custom LockFactory.
 IndexInput openInput(String name)
Returns a stream reading an existing file.
 void setLockFactory(LockFactory lockFactory)
Set the LockFactory that this Directory instance should use for its locking implementation.
 void setReadChunkSize(int chunkSize)
Sets the maximum number of bytes read at once from the underlying file during DataInput.readBytes(byte[], int, int).
 void sync(Collection<String> names)
Ensure that any writes to these files are moved to stable storage.
 void sync(String name)
Deprecated.
 String toString()
For debug output.
 void touchFile(String name)
Deprecated. Lucene never uses this API; it will be removed in 4.0.
Methods inherited from class org.apache.lucene.store.Directory
clearLock, copy, copy, ensureOpen, getLockFactory, makeLock, openInput
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_READ_CHUNK_SIZE

public static final int DEFAULT_READ_CHUNK_SIZE
Default read chunk size. This is a conditional default: on 32bit JVMs, it defaults to 100 MB. On 64bit JVMs, it's Integer.MAX_VALUE.

See Also:
setReadChunkSize(int)

directory

protected final File directory

staleFiles

protected final Set<String> staleFiles
Constructor Detail

FSDirectory

protected FSDirectory(File path,
                      LockFactory lockFactory)
               throws IOException
Create a new FSDirectory for the named location (ctor for subclasses).

Parameters:
path - the path of the directory
lockFactory - the lock factory to use, or null for the default (NativeFSLockFactory);
Throws:
IOException
Method Detail

open

public static FSDirectory open(File path)
                        throws IOException
Creates an FSDirectory instance, trying to pick the best implementation given the current environment. The directory returned uses the NativeFSLockFactory.

Currently this returns MMapDirectory for most Solaris and Windows 64-bit JREs, NIOFSDirectory for other non-Windows JREs, and SimpleFSDirectory for other JREs on Windows. It is highly recommended that you consult the implementation's documentation for your platform before using this method.

NOTE: this method may suddenly change which implementation is returned from release to release, in the event that higher performance defaults become possible; if the precise implementation is important to your application, please instantiate it directly, instead. For optimal performance you should consider using MMapDirectory on 64 bit JVMs.

See above

Throws:
IOException

open

public static FSDirectory open(File path,
                               LockFactory lockFactory)
                        throws IOException
Just like open(File), but allows you to also specify a custom LockFactory.

Throws:
IOException

setLockFactory

public void setLockFactory(LockFactory lockFactory)
                    throws IOException
Description copied from class: Directory
Set the LockFactory that this Directory instance should use for its locking implementation. Each * instance of LockFactory should only be used for one directory (ie, do not share a single instance across multiple Directories).

Overrides:
setLockFactory in class Directory
Parameters:
lockFactory - instance of LockFactory.
Throws:
IOException

listAll

public static String[] listAll(File dir)
                        throws IOException
Lists all files (not subdirectories) in the directory. This method never returns null (throws IOException instead).

Throws:
NoSuchDirectoryException - if the directory does not exist, or does exist but is not a directory.
IOException - if list() returns null

listAll

public String[] listAll()
                 throws IOException
Lists all files (not subdirectories) in the directory.

Specified by:
listAll in class Directory
Throws:
NoSuchDirectoryException - if the directory is not prepared for any write operations (such as Directory.createOutput(String)).
IOException - in case of other IO errors
See Also:
listAll(File)

fileExists

public boolean fileExists(String name)
Returns true iff a file with the given name exists.

Specified by:
fileExists in class Directory

fileModified

public long fileModified(String name)
Returns the time the named file was last modified.

Specified by:
fileModified in class Directory

fileModified

public static long fileModified(File directory,
                                String name)
Returns the time the named file was last modified.

touchFile

@Deprecated
public void touchFile(String name)
Deprecated. Lucene never uses this API; it will be removed in 4.0.

Set the modified time of an existing file to now.

Specified by:
touchFile in class Directory

fileLength

public long fileLength(String name)
                throws IOException
Returns the length in bytes of a file in the directory.

Specified by:
fileLength in class Directory
Parameters:
name - the name of the file for which to return the length.
Throws:
FileNotFoundException - if the file does not exist.
IOException - if there was an IO error while retrieving the file's length.

deleteFile

public void deleteFile(String name)
                throws IOException
Removes an existing file in the directory.

Specified by:
deleteFile in class Directory
Throws:
IOException

createOutput

public IndexOutput createOutput(String name)
                         throws IOException
Creates an IndexOutput for the file with the given name.

Specified by:
createOutput in class Directory
Throws:
IOException

ensureCanWrite

protected void ensureCanWrite(String name)
                       throws IOException
Throws:
IOException

onIndexOutputClosed

protected void onIndexOutputClosed(FSDirectory.FSIndexOutput io)

sync

@Deprecated
public void sync(String name)
          throws IOException
Deprecated.

Description copied from class: Directory
Ensure that any writes to this file are moved to stable storage. Lucene uses this to properly commit changes to the index, to prevent a machine/OS crash from corrupting the index.

Overrides:
sync in class Directory
Throws:
IOException

sync

public void sync(Collection<String> names)
          throws IOException
Description copied from class: Directory
Ensure that any writes to these files are moved to stable storage. Lucene uses this to properly commit changes to the index, to prevent a machine/OS crash from corrupting the index.

NOTE: Clients may call this method for same files over and over again, so some impls might optimize for that. For other impls the operation can be a noop, for various reasons.

Overrides:
sync in class Directory
Throws:
IOException

openInput

public IndexInput openInput(String name)
                     throws IOException
Description copied from class: Directory
Returns a stream reading an existing file.

Specified by:
openInput in class Directory
Throws:
IOException

getLockID

public String getLockID()
Description copied from class: Directory
Return a string identifier that uniquely differentiates this Directory instance from other Directory instances. This ID should be the same if two Directory instances (even in different JVMs and/or on different machines) are considered "the same index". This is how locking "scopes" to the right index.

Overrides:
getLockID in class Directory

close

public void close()
Closes the store to future operations.

Specified by:
close in interface Closeable
Specified by:
close in class Directory

getFile

@Deprecated
public File getFile()
Deprecated. Use getDirectory() instead.

getDirectory

public File getDirectory()
Returns:
the underlying filesystem directory

toString

public String toString()
For debug output.

Overrides:
toString in class Directory

setReadChunkSize

public final void setReadChunkSize(int chunkSize)
Sets the maximum number of bytes read at once from the underlying file during DataInput.readBytes(byte[], int, int). The default value is DEFAULT_READ_CHUNK_SIZE;

This was introduced due to Sun JVM Bug 6478546, which throws an incorrect OutOfMemoryError when attempting to read too many bytes at once. It only happens on 32bit JVMs with a large maximum heap size.

Changes to this value will not impact any already-opened IndexInputs. You should call this before attempting to open an index on the directory.

NOTE: This value should be as large as possible to reduce any possible performance impact. If you still encounter an incorrect OutOfMemoryError, trying lowering the chunk size.

getReadChunkSize

public final int getReadChunkSize()
The maximum number of bytes to read at once from the underlying file during DataInput.readBytes(byte[], int, int).

See Also:
setReadChunkSize(int)

fsync

protected void fsync(String name)
              throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FSLockFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class FSLockFactory

java.lang.Object
    extended by  org.apache.lucene.store.LockFactory
        extended by  org.apache.lucene.store.FSLockFactory
Direct Known Subclasses:
NativeFSLockFactory, SimpleFSLockFactory
public abstract class FSLockFactory
extends LockFactory

Base class for file system based locking implementation.

Field Summary
protected  File lockDir
Directory for the lock files.
Fields inherited from class org.apache.lucene.store.LockFactory
lockPrefix
Constructor Summary
FSLockFactory()
Method Summary
File | getLockDir() Retrieve the lock directory.
protected void | setLockDir(File lockDir) Set the lock directory.
Methods inherited from class org.apache.lucene.store.LockFactory
clearLock, getLockPrefix, makeLock, setLockPrefix
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

lockDir

protected File lockDir
Directory for the lock files.

Constructor Detail

FSLockFactory

public FSLockFactory()
Method Detail

setLockDir

protected final void setLockDir(File lockDir)
Set the lock directory. This method can be only called once to initialize the lock directory. It is used by FSDirectory to set the lock directory to itself. Subclasses can also use this method to set the directory in the constructor.

getLockDir

public File getLockDir()
Retrieve the lock directory.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexInput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class IndexInput

java.lang.Object
    extended by  org.apache.lucene.store.DataInput
        extended by  org.apache.lucene.store.IndexInput
All Implemented Interfaces:
Closeable, Cloneable
Direct Known Subclasses:
BufferedIndexInput, ChecksumIndexInput, MockIndexInputWrapper, RAMInputStream
public abstract class IndexInput
extends DataInput
implements Cloneable, Closeable

Abstract base class for input from a file in a Directory. A random-access input stream. Used for all Lucene index input operations.

See Also:
Directory

Constructor Summary
protected | IndexInput() Deprecated. please pass resourceDescription
protected | IndexInput(String resourceDescription) resourceDescription should be a non-null, opaque string describing this resource; it's returned from toString().
Method Summary
abstract void | close() Closes the stream to further operations.
void | copyBytes(IndexOutput out, long numBytes) Copies numBytes bytes to the given IndexOutput.
abstract long | getFilePointer() Returns the current position in this file, where the next read will occur.
abstract long | length() The number of bytes in the file.
abstract void | seek(long pos) Sets current position in this file, where the next read will occur.
void | skipChars(int length) Deprecated. this method operates on old "modified utf8" encoded strings
String | toString()
Methods inherited from class org.apache.lucene.store.DataInput
clone, readByte, readBytes, readBytes, readChars, readInt, readLong, readShort, readString, readStringStringMap, readVInt, readVLong, setModifiedUTF8StringsMode
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IndexInput

@Deprecated
protected IndexInput()
Deprecated. please pass resourceDescription

IndexInput

protected IndexInput(String resourceDescription)
resourceDescription should be a non-null, opaque string describing this resource; it's returned from toString().

Method Detail

skipChars

@Deprecated
public void skipChars(int length)
               throws IOException
Deprecated. this method operates on old "modified utf8" encoded strings

Expert Similar to DataInput.readChars(char[], int, int) but does not do any conversion operations on the bytes it is reading in. It still has to invoke DataInput.readByte() just as DataInput.readChars(char[], int, int) does, but it does not need a buffer to store anything and it does not have to do any of the bitwise operations, since we don't actually care what is in the byte except to determine how many more bytes to read

Parameters:
length - The number of chars to read
Throws:
IOException

close

public abstract void close()
                    throws IOException
Closes the stream to further operations.

Specified by:
close in interface Closeable
Throws:
IOException

getFilePointer

public abstract long getFilePointer()
Returns the current position in this file, where the next read will occur.

See Also:
seek(long)

seek

public abstract void seek(long pos)
                   throws IOException
Sets current position in this file, where the next read will occur.

Throws:
IOException
See Also:
getFilePointer()

length

public abstract long length()
The number of bytes in the file.

copyBytes

public void copyBytes(IndexOutput out,
                      long numBytes)
               throws IOException
Copies numBytes bytes to the given IndexOutput.

NOTE: this method uses an intermediate buffer to copy the bytes. Consider overriding it in your implementation, if you can make a better, optimized copy.

NOTE ensure that there are enough bytes in the input to copy to output. Otherwise, different exceptions may be thrown, depending on the implementation.

Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexOutput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class IndexOutput

java.lang.Object
    extended by  org.apache.lucene.store.DataOutput
        extended by  org.apache.lucene.store.IndexOutput
All Implemented Interfaces:
Closeable
Direct Known Subclasses:
BufferedIndexOutput, ChecksumIndexOutput, MockIndexOutputWrapper, RAMOutputStream, ThrottledIndexOutput
public abstract class IndexOutput
extends DataOutput
implements Closeable

Abstract base class for output to a file in a Directory. A random-access output stream. Used for all Lucene index output operations.

See Also:
Directory, IndexInput

Constructor Summary
IndexOutput()
Method Summary
abstract void | close() Closes this stream to further operations.
abstract void | flush() Forces any buffered output to be written.
abstract long | getFilePointer() Returns the current position in this file, where the next write will occur.
abstract long | length() The number of bytes in the file.
abstract void | seek(long pos) Sets current position in this file, where the next write will occur.
void | setLength(long length) Set the file length.
Methods inherited from class org.apache.lucene.store.DataOutput
copyBytes, writeByte, writeBytes, writeBytes, writeChars, writeChars, writeInt, writeLong, writeShort, writeString, writeStringStringMap, writeVInt, writeVLong
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IndexOutput

public IndexOutput()
Method Detail

flush

public abstract void flush()
                    throws IOException
Forces any buffered output to be written.

Throws:
IOException

close

public abstract void close()
                    throws IOException
Closes this stream to further operations.

Specified by:
close in interface Closeable
Throws:
IOException

getFilePointer

public abstract long getFilePointer()
Returns the current position in this file, where the next write will occur.

See Also:
seek(long)

seek

public abstract void seek(long pos)
                   throws IOException
Sets current position in this file, where the next write will occur.

Throws:
IOException
See Also:
getFilePointer()

length

public abstract long length()
                     throws IOException
The number of bytes in the file.

Throws:
IOException

setLength

public void setLength(long length)
               throws IOException
Set the file length. By default, this method does nothing (it's optional for a Directory to implement it). But, certain Directory implementations (for example @see FSDirectory) can use this to inform the underlying IO system to pre-allocate the file to the specified size. If the length is longer than the current file length, the bytes added to the file are undefined. Otherwise the file is truncated.

Parameters:
length - file length
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InputStreamDataInput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class InputStreamDataInput

java.lang.Object
    extended by  org.apache.lucene.store.DataInput
        extended by  org.apache.lucene.store.InputStreamDataInput
All Implemented Interfaces:
Closeable, Cloneable
public class InputStreamDataInput
extends DataInput
implements Closeable

A DataInput wrapping a plain InputStream.

Constructor Summary
InputStreamDataInput(InputStream is)
Method Summary
void | close()
byte | readByte() Reads and returns a single byte.
void | readBytes(byte[] b, int offset, int len) Reads a specified number of bytes into an array at the specified offset.
Methods inherited from class org.apache.lucene.store.DataInput
clone, readBytes, readChars, readInt, readLong, readShort, readString, readStringStringMap, readVInt, readVLong, setModifiedUTF8StringsMode
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InputStreamDataInput

public InputStreamDataInput(InputStream is)
Method Detail

readByte

public byte readByte()
              throws IOException
Description copied from class: DataInput
Reads and returns a single byte.

Specified by:
readByte in class DataInput
Throws:
IOException
See Also:
DataOutput.writeByte(byte)

readBytes

public void readBytes(byte[] b,
                      int offset,
                      int len)
               throws IOException
Description copied from class: DataInput
Reads a specified number of bytes into an array at the specified offset.

Specified by:
readBytes in class DataInput
Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
Throws:
IOException
See Also:
DataOutput.writeBytes(byte[],int)

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Lock

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class Lock

java.lang.Object
    extended by  org.apache.lucene.store.Lock

public abstract class Lock
extends Object

An interprocess mutex lock.

Typical use might look like:

 new Lock.With(directory.makeLock("my.lock")) {
     public Object doBody() {
       ... code to execute while locked ...
     }
   }.run();

See Also:
Directory.makeLock(String)

Nested Class Summary
static class Lock.With
Utility class for executing code with exclusive access.
Field Summary
protected Throwable | failureReason If a lock obtain called, this failureReason may be set with the "root cause" Exception as to why the lock was not obtained.
static long | LOCK_OBTAIN_WAIT_FOREVER Pass this value to obtain(long) to try forever to obtain the lock.
static long | LOCK_POLL_INTERVAL How long obtain(long) waits, in milliseconds, in between attempts to acquire the lock.
Constructor Summary
Lock()
Method Summary
abstract boolean | isLocked() Returns true if the resource is currently locked.
abstract boolean | obtain() Attempts to obtain exclusive access and immediately return upon success or failure.
boolean | obtain(long lockWaitTimeout) Attempts to obtain an exclusive lock within amount of time given.
abstract void | release() Releases exclusive access.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

LOCK_POLL_INTERVAL

public static long LOCK_POLL_INTERVAL
How long obtain(long) waits, in milliseconds, in between attempts to acquire the lock.

LOCK_OBTAIN_WAIT_FOREVER

public static final long LOCK_OBTAIN_WAIT_FOREVER
Pass this value to obtain(long) to try forever to obtain the lock.

See Also:
Constant Field Values

failureReason

protected Throwable failureReason
If a lock obtain called, this failureReason may be set with the "root cause" Exception as to why the lock was not obtained.

Constructor Detail

Lock

public Lock()
Method Detail

obtain

public abstract boolean obtain()
                        throws IOException
Attempts to obtain exclusive access and immediately return upon success or failure.

Returns:
true iff exclusive access is obtained
Throws:
IOException

obtain

public boolean obtain(long lockWaitTimeout)
               throws LockObtainFailedException,
                      IOException
Attempts to obtain an exclusive lock within amount of time given. Polls once per LOCK_POLL_INTERVAL (currently 1000) milliseconds until lockWaitTimeout is passed.

Parameters:
lockWaitTimeout - length of time to wait in milliseconds or LOCK_OBTAIN_WAIT_FOREVER to retry forever
Returns:
true if lock was obtained
Throws:
LockObtainFailedException - if lock wait times out
IllegalArgumentException - if lockWaitTimeout is out of bounds
IOException - if obtain() throws IOException

release

public abstract void release()
                      throws IOException
Releases exclusive access.

Throws:
IOException

isLocked

public abstract boolean isLocked()
                          throws IOException
Returns true if the resource is currently locked. Note that one must still call obtain() before using the resource.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Lock.With

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class Lock.With

java.lang.Object
    extended by  org.apache.lucene.store.Lock.With
Enclosing class:
Lock
public abstract static class Lock.With
extends Object

Utility class for executing code with exclusive access.

Constructor Summary
Lock.With(Lock lock, long lockWaitTimeout)
Constructs an executor that will grab the named lock.
Method Summary
protected abstract  Object doBody()
Code to execute with exclusive access.
 Object run()
Calls doBody() while lock is obtained.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Lock.With

public Lock.With(Lock lock,
                 long lockWaitTimeout)
Constructs an executor that will grab the named lock.

Method Detail

doBody

protected abstract Object doBody()
                          throws IOException
Code to execute with exclusive access.

Throws:
IOException

run

public Object run()
           throws LockObtainFailedException,
                  IOException
Calls doBody() while lock is obtained. Blocks if lock cannot be obtained immediately. Retries to obtain lock once per second until it is obtained, or until it has tried ten times. Lock is released when doBody() exits.

Throws:
LockObtainFailedException - if lock could not be obtained
IOException - if Lock.obtain() throws IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LockFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class LockFactory

java.lang.Object
    extended by  org.apache.lucene.store.LockFactory
Direct Known Subclasses:
FSLockFactory, MockLockFactoryWrapper, NoLockFactory, SingleInstanceLockFactory, VerifyingLockFactory
public abstract class LockFactory
extends Object

Base class for Locking implementation. Directory uses instances of this class to implement locking.

Note that there are some useful tools to verify that your LockFactory is working correctly: VerifyingLockFactory, LockStressTest, LockVerifyServer.

See Also:
LockVerifyServer, LockStressTest, VerifyingLockFactory

Field Summary
protected  String lockPrefix
Constructor Summary
LockFactory()
Method Summary
abstract void | clearLock(String lockName) Attempt to clear (forcefully unlock and remove) the specified lock.
String | getLockPrefix() Get the prefix in use for all locks created in this LockFactory.
abstract Lock | makeLock(String lockName) Return a new Lock instance identified by lockName.
void | setLockPrefix(String lockPrefix) Set the prefix in use for all locks created in this LockFactory.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

lockPrefix

protected String lockPrefix
Constructor Detail

LockFactory

public LockFactory()
Method Detail

setLockPrefix

public void setLockPrefix(String lockPrefix)
Set the prefix in use for all locks created in this LockFactory. This is normally called once, when a Directory gets this LockFactory instance. However, you can also call this (after this instance is assigned to a Directory) to override the prefix in use. This is helpful if you're running Lucene on machines that have different mount points for the same shared directory.

getLockPrefix

public String getLockPrefix()
Get the prefix in use for all locks created in this LockFactory.

makeLock

public abstract Lock makeLock(String lockName)
Return a new Lock instance identified by lockName.

Parameters:
lockName - name of the lock to be created.

clearLock

public abstract void clearLock(String lockName)
                        throws IOException
Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you are certain this lock is no longer in use.

Parameters:
lockName - name of the lock to be cleared.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LockObtainFailedException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class LockObtainFailedException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.io.IOException
                extended by  org.apache.lucene.store.LockObtainFailedException
All Implemented Interfaces:
Serializable
public class LockObtainFailedException
extends IOException

This exception is thrown when the write.lock could not be acquired. This happens when a writer tries to open an index that another writer already has open.

See Also:
Lock.obtain(long), Serialized Form

Constructor Summary
LockObtainFailedException(String message)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

LockObtainFailedException

public LockObtainFailedException(String message)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LockReleaseFailedException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class LockReleaseFailedException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.io.IOException
                extended by  org.apache.lucene.store.LockReleaseFailedException
All Implemented Interfaces:
Serializable
public class LockReleaseFailedException
extends IOException

This exception is thrown when the write.lock could not be released.

See Also:
Lock.release(), Serialized Form

Constructor Summary
LockReleaseFailedException(String message)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

LockReleaseFailedException

public LockReleaseFailedException(String message)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LockStressTest

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class LockStressTest

java.lang.Object
    extended by  org.apache.lucene.store.LockStressTest

public class LockStressTest
extends Object

Simple standalone tool that forever acquires & releases a lock using a specific LockFactory. Run without any args to see usage.

See Also:
VerifyingLockFactory, LockVerifyServer

Constructor Summary
LockStressTest()
Method Summary
static void main(String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LockStressTest

public LockStressTest()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LockVerifyServer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class LockVerifyServer

java.lang.Object
    extended by  org.apache.lucene.store.LockVerifyServer

public class LockVerifyServer
extends Object

Simple standalone server that must be running when you use VerifyingLockFactory. This server simply verifies at most one process holds the lock at a time. Run without any args to see usage.

See Also:
VerifyingLockFactory, LockStressTest

Constructor Summary
LockVerifyServer()
Method Summary
static void main(String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LockVerifyServer

public LockVerifyServer()
Method Detail

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MMapDirectory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class MMapDirectory

java.lang.Object
    extended by  org.apache.lucene.store.Directory
        extended by  org.apache.lucene.store.FSDirectory
            extended by  org.apache.lucene.store.MMapDirectory
All Implemented Interfaces:
Closeable
public class MMapDirectory
extends FSDirectory

File-based Directory implementation that uses mmap for reading, and FSDirectory.FSIndexOutput for writing.

NOTE: memory mapping uses up a portion of the virtual memory address space in your process equal to the size of the file being mapped. Before using this class, be sure your have plenty of virtual address space, e.g. by using a 64 bit JRE, or a 32 bit JRE with indexes that are guaranteed to fit within the address space. On 32 bit platforms also consult setMaxChunkSize(int) if you have problems with mmap failing because of fragmented address space. If you get an OutOfMemoryException, it is recommended to reduce the chunk size, until it works.

Due to this bug in Sun's JRE, MMapDirectory's IndexInput.close() is unable to close the underlying OS file handle. Only when GC finally collects the underlying objects, which could be quite some time later, will the file handle be closed.

This will consume additional transient disk usage: on Windows, attempts to delete or overwrite the files will result in an exception; on other platforms, which typically have a "delete on last close" semantics, while such operations will succeed, the bytes are still consuming space on disk. For many applications this limitation is not a problem (e.g. if you have plenty of disk space, and you don't rely on overwriting files on Windows) but it's still an important limitation to be aware of.

This class supplies the workaround mentioned in the bug report (see setUseUnmap(boolean)), which may fail on non-Sun JVMs. It forcefully unmaps the buffer on close by using an undocumented internal cleanup functionality. UNMAP_SUPPORTED is true, if the workaround can be enabled (with no guarantees).

NOTE: Accessing this class either directly or indirectly from a thread while it's interrupted can close the underlying channel immediately if at the same time the thread is blocked on IO. The channel will remain closed and subsequent access to MMapDirectory will throw a ClosedChannelException.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.store.FSDirectory
FSDirectory.FSIndexOutput
Field Summary
static int | DEFAULT_MAX_BUFF
static boolean | UNMAP_SUPPORTED true, if this platform supports unmapping mmapped files.
Fields inherited from class org.apache.lucene.store.FSDirectory
DEFAULT_READ_CHUNK_SIZE, directory, staleFiles
Fields inherited from class org.apache.lucene.store.Directory
isOpen, lockFactory
Constructor Summary
MMapDirectory(File path)
Create a new MMapDirectory for the named location and NativeFSLockFactory.
MMapDirectory(File path, LockFactory lockFactory)
Create a new MMapDirectory for the named location.
Method Summary
int | getMaxChunkSize() Returns the current mmap chunk size.
boolean | getUseUnmap() Returns true, if the unmap workaround is enabled.
IndexInput | openInput(String name, int bufferSize) Creates an IndexInput for the file with the given name.
void | setMaxChunkSize(int maxChunkSize) Sets the maximum chunk size (default is 1 GiBytes for 64 bit JVMs and 256 MiBytes for 32 bit JVMs) used for memory mapping.
void | setUseUnmap(boolean useUnmapHack) This method enables the workaround for unmapping the buffers from address space after closing IndexInput, that is mentioned in the bug report.
Methods inherited from class org.apache.lucene.store.FSDirectory
close, createOutput, deleteFile, ensureCanWrite, fileExists, fileLength, fileModified, fileModified, fsync, getDirectory, getFile, getLockID, getReadChunkSize, listAll, listAll, onIndexOutputClosed, open, open, openInput, setLockFactory, setReadChunkSize, sync, sync, toString, touchFile
Methods inherited from class org.apache.lucene.store.Directory
clearLock, copy, copy, ensureOpen, getLockFactory, makeLock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

DEFAULT_MAX_BUFF

public static final int DEFAULT_MAX_BUFF

UNMAP_SUPPORTED

public static final boolean UNMAP_SUPPORTED
true, if this platform supports unmapping mmapped files.

Constructor Detail

MMapDirectory

public MMapDirectory(File path,
                     LockFactory lockFactory)
              throws IOException
Create a new MMapDirectory for the named location.

Parameters:
path - the path of the directory
lockFactory - the lock factory to use, or null for the default (NativeFSLockFactory);
Throws:
IOException

MMapDirectory

public MMapDirectory(File path)
              throws IOException
Create a new MMapDirectory for the named location and NativeFSLockFactory.

Parameters:
path - the path of the directory
Throws:
IOException
Method Detail

setUseUnmap

public void setUseUnmap(boolean useUnmapHack)
This method enables the workaround for unmapping the buffers from address space after closing IndexInput, that is mentioned in the bug report. This hack may fail on non-Sun JVMs. It forcefully unmaps the buffer on close by using an undocumented internal cleanup functionality.

NOTE: Enabling this is completely unsupported by Java and may lead to JVM crashes if IndexInput is closed while another thread is still accessing it (SIGSEGV).

Throws:
IllegalArgumentException - if UNMAP_SUPPORTED is false and the workaround cannot be enabled.

getUseUnmap

public boolean getUseUnmap()
Returns true, if the unmap workaround is enabled.

See Also:
setUseUnmap(boolean)

setMaxChunkSize

public final void setMaxChunkSize(int maxChunkSize)
Sets the maximum chunk size (default is 1 GiBytes for 64 bit JVMs and 256 MiBytes for 32 bit JVMs) used for memory mapping. Especially on 32 bit platform, the address space can be very fragmented, so large index files cannot be mapped. Using a lower chunk size makes the directory implementation a little bit slower (as the correct chunk may be resolved on lots of seeks) but the chance is higher that mmap does not fail. On 64 bit Java platforms, this parameter should always be 1 << 30, as the address space is big enough. Please note: This method always rounds down the chunk size to a power of 2.

getMaxChunkSize

public final int getMaxChunkSize()
Returns the current mmap chunk size.

See Also:
setMaxChunkSize(int)

openInput

public IndexInput openInput(String name,
                            int bufferSize)
                     throws IOException
Creates an IndexInput for the file with the given name.

Overrides:
openInput in class Directory
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockDirectoryWrapper.Failure

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class MockDirectoryWrapper.Failure

java.lang.Object
    extended by  org.apache.lucene.store.MockDirectoryWrapper.Failure
Enclosing class:
MockDirectoryWrapper
public static class MockDirectoryWrapper.Failure
extends Object

Objects that represent fail-able conditions. Objects of a derived class are created and registered with the mock directory. After register, each object will be invoked once for each first write of a file, giving the object a chance to throw an IOException.

Field Summary
protected  boolean doFail
Constructor Summary
MockDirectoryWrapper.Failure()
Method Summary
void | clearDoFail()
void | eval(MockDirectoryWrapper dir) eval is called on the first write of every new file.
MockDirectoryWrapper.Failure | reset() reset should set the state of the failure to its default (freshly constructed) state.
void | setDoFail()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

doFail

protected boolean doFail
Constructor Detail

MockDirectoryWrapper.Failure

public MockDirectoryWrapper.Failure()
Method Detail

eval

public void eval(MockDirectoryWrapper dir)
          throws IOException
eval is called on the first write of every new file.

Throws:
IOException

reset

public MockDirectoryWrapper.Failure reset()
reset should set the state of the failure to its default (freshly constructed) state. Reset is convenient for tests that want to create one failure object and then reuse it in multiple cases. This, combined with the fact that Failure subclasses are often anonymous classes makes reset difficult to do otherwise. A typical example of use is Failure failure = new Failure() { ... }; ... mock.failOn(failure.reset())

setDoFail

public void setDoFail()

clearDoFail

public void clearDoFail()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockDirectoryWrapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class MockDirectoryWrapper

java.lang.Object
    extended by  org.apache.lucene.store.Directory
        extended by  org.apache.lucene.store.MockDirectoryWrapper
All Implemented Interfaces:
Closeable
public class MockDirectoryWrapper
extends Directory

This is a Directory Wrapper that adds methods intended to be used only by unit tests. It also adds a number of features useful for testing:

  • Instances created by LuceneTestCase.newDirectory() are tracked to ensure they are closed by the test.
  • When a MockDirectoryWrapper is closed, it will throw an exception if it has any open files against it (with a stacktrace indicating where they were opened from).
  • When a MockDirectoryWrapper is closed, it runs CheckIndex to test if the index was corrupted.
  • MockDirectoryWrapper simulates some "features" of Windows, such as refusing to write/delete to open files.

Nested Class Summary
static class | MockDirectoryWrapper.Failure Objects that represent fail-able conditions.
static class | MockDirectoryWrapper.Throttling
Field Summary
Fields inherited from class org.apache.lucene.store.Directory
isOpen, lockFactory
Constructor Summary
MockDirectoryWrapper(Random random, Directory delegate)
Method Summary
 void clearCrash()
 void clearLock(String name)
Attempt to clear (forcefully unlock and remove) the specified lock.
 void close()
Closes the store.
 void copy(Directory to, String src, String dest)
Copies the file src to Directory to under the new file name dest.
 void crash()
Simulates a crash of OS or machine by overwriting unsynced files.
 IndexOutput createOutput(String name)
Creates a new, empty file in the directory with the given name.
 void deleteFile(String name)
Removes an existing file in the directory.
 void failOn(MockDirectoryWrapper.Failure fail)
add a Failure object to the list of objects to be evaluated at every potential failure point
 boolean fileExists(String name)
Returns true iff a file with the given name exists.
 long fileLength(String name)
Returns the length of a file in the directory.
 long fileModified(String name)
Returns the time the named file was last modified.
 boolean getCheckIndexOnClose()
 int getInputCloneCount()
 LockFactory getLockFactory()
Get the LockFactory that this Directory instance is using for its locking implementation.
 String getLockID()
Return a string identifier that uniquely differentiates this Directory instance from other Directory instances.
 long getMaxSizeInBytes()
 long getMaxUsedSizeInBytes()
Returns the peek actual storage used (bytes) in this directory.
 boolean getNoDeleteOpenFile()
 Set<String> getOpenDeletedFiles()
 double getRandomIOExceptionRate()
 long getRecomputedActualSizeInBytes()
Like getRecomputedSizeInBytes(), but, uses actual file lengths rather than buffer allocations (which are quantized up to nearest RAMOutputStream.BUFFER_SIZE (now 1024) bytes.
 long getRecomputedSizeInBytes()
Provided for testing purposes.
 boolean isOpen()
 String[] listAll()
Returns an array of strings, one for each file in the directory.
 Lock makeLock(String name)
Construct a Lock.
 IndexInput openInput(String name)
Returns a stream reading an existing file.
 void removeIndexInput(IndexInput in, String name)
 void removeIndexOutput(IndexOutput out, String name)
 void resetMaxUsedSizeInBytes()
 void setAssertNoUnrefencedFilesOnClose(boolean v)
 void setCheckIndexOnClose(boolean value)
Set whether or not checkindex should be run on close
 void setFailOnCreateOutput(boolean v)
 void setFailOnOpenInput(boolean v)
 void setLockFactory(LockFactory lockFactory)
Set the LockFactory that this Directory instance should use for its locking implementation.
 void setMaxSizeInBytes(long maxSize)
 void setNoDeleteOpenFile(boolean value)
Emulate windows whereby deleting an open file is not allowed (raise IOException).
 void setPreventDoubleWrite(boolean value)
If set to true, we throw an IOException if the same file is opened by createOutput, ever.
 void setRandomIOExceptionRate(double rate)
If 0.0, no exceptions will be thrown.
 void setThrottling(MockDirectoryWrapper.Throttling throttling)
 void setTrackDiskUsage(boolean v)
 long sizeInBytes()
 void sync(Collection<String> names)
Ensure that any writes to these files are moved to stable storage.
 void sync(String name)
Deprecated.
 String toString()
 void touchFile(String name)
Deprecated.
Methods inherited from class org.apache.lucene.store.Directory
copy, ensureOpen, openInput
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MockDirectoryWrapper

public MockDirectoryWrapper(Random random,
                            Directory delegate)
Method Detail

getInputCloneCount

public int getInputCloneCount()

setTrackDiskUsage

public void setTrackDiskUsage(boolean v)

setPreventDoubleWrite

public void setPreventDoubleWrite(boolean value)
If set to true, we throw an IOException if the same file is opened by createOutput, ever.

sync

@Deprecated
public void sync(String name)
          throws IOException
Deprecated.

Description copied from class: Directory
Ensure that any writes to this file are moved to stable storage. Lucene uses this to properly commit changes to the index, to prevent a machine/OS crash from corrupting the index.

Overrides:
sync in class Directory
Throws:
IOException

setThrottling

public void setThrottling(MockDirectoryWrapper.Throttling throttling)

sync

public void sync(Collection<String> names)
          throws IOException
Description copied from class: Directory
Ensure that any writes to these files are moved to stable storage. Lucene uses this to properly commit changes to the index, to prevent a machine/OS crash from corrupting the index.

NOTE: Clients may call this method for same files over and over again, so some impls might optimize for that. For other impls the operation can be a noop, for various reasons.

Overrides:
sync in class Directory
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Directory

sizeInBytes

public final long sizeInBytes()
                       throws IOException
Throws:
IOException

crash

public void crash()
           throws IOException
Simulates a crash of OS or machine by overwriting unsynced files.

Throws:
IOException

clearCrash

public void clearCrash()
                throws IOException
Throws:
IOException

setMaxSizeInBytes

public void setMaxSizeInBytes(long maxSize)

getMaxSizeInBytes

public long getMaxSizeInBytes()

getMaxUsedSizeInBytes

public long getMaxUsedSizeInBytes()
Returns the peek actual storage used (bytes) in this directory.

resetMaxUsedSizeInBytes

public void resetMaxUsedSizeInBytes()
                             throws IOException
Throws:
IOException

setNoDeleteOpenFile

public void setNoDeleteOpenFile(boolean value)
Emulate windows whereby deleting an open file is not allowed (raise IOException).

getNoDeleteOpenFile

public boolean getNoDeleteOpenFile()

setCheckIndexOnClose

public void setCheckIndexOnClose(boolean value)
Set whether or not checkindex should be run on close

getCheckIndexOnClose

public boolean getCheckIndexOnClose()

setRandomIOExceptionRate

public void setRandomIOExceptionRate(double rate)
If 0.0, no exceptions will be thrown. Else this should be a double 0.0 - 1.0. We will randomly throw an IOException on the first write to an OutputStream based on this probability.

getRandomIOExceptionRate

public double getRandomIOExceptionRate()

deleteFile

public void deleteFile(String name)
                throws IOException
Description copied from class: Directory
Removes an existing file in the directory.

Specified by:
deleteFile in class Directory
Throws:
IOException

getOpenDeletedFiles

public Set<String> getOpenDeletedFiles()

setFailOnCreateOutput

public void setFailOnCreateOutput(boolean v)

createOutput

public IndexOutput createOutput(String name)
                         throws IOException
Description copied from class: Directory
Creates a new, empty file in the directory with the given name. Returns a stream writing this file.

Specified by:
createOutput in class Directory
Throws:
IOException

setFailOnOpenInput

public void setFailOnOpenInput(boolean v)

openInput

public IndexInput openInput(String name)
                     throws IOException
Description copied from class: Directory
Returns a stream reading an existing file.

Specified by:
openInput in class Directory
Throws:
IOException

getRecomputedSizeInBytes

public final long getRecomputedSizeInBytes()
                                    throws IOException
Provided for testing purposes. Use sizeInBytes() instead.

Throws:
IOException

getRecomputedActualSizeInBytes

public final long getRecomputedActualSizeInBytes()
                                          throws IOException
Like getRecomputedSizeInBytes(), but, uses actual file lengths rather than buffer allocations (which are quantized up to nearest RAMOutputStream.BUFFER_SIZE (now 1024) bytes.

Throws:
IOException

setAssertNoUnrefencedFilesOnClose

public void setAssertNoUnrefencedFilesOnClose(boolean v)

close

public void close()
           throws IOException
Description copied from class: Directory
Closes the store.

Specified by:
close in interface Closeable
Specified by:
close in class Directory
Throws:
IOException

removeIndexOutput

public void removeIndexOutput(IndexOutput out,
                              String name)

removeIndexInput

public void removeIndexInput(IndexInput in,
                             String name)

isOpen

public boolean isOpen()

failOn

public void failOn(MockDirectoryWrapper.Failure fail)
add a Failure object to the list of objects to be evaluated at every potential failure point

listAll

public String[] listAll()
                 throws IOException
Description copied from class: Directory
Returns an array of strings, one for each file in the directory.

Specified by:
listAll in class Directory
Throws:
NoSuchDirectoryException - if the directory is not prepared for any write operations (such as Directory.createOutput(String)).
IOException - in case of other IO errors

fileExists

public boolean fileExists(String name)
                   throws IOException
Description copied from class: Directory
Returns true iff a file with the given name exists.

Specified by:
fileExists in class Directory
Throws:
IOException

fileModified

public long fileModified(String name)
                  throws IOException
Description copied from class: Directory
Returns the time the named file was last modified.

Specified by:
fileModified in class Directory
Throws:
IOException

touchFile

@Deprecated
public void touchFile(String name)
               throws IOException
Deprecated.

Description copied from class: Directory
Set the modified time of an existing file to now.

Specified by:
touchFile in class Directory
Throws:
IOException

fileLength

public long fileLength(String name)
                throws IOException
Description copied from class: Directory
Returns the length of a file in the directory. This method follows the following contract:
  • Throws FileNotFoundException if the file does not exist
  • Returns a value ≥0 if the file exists, which specifies its length.

Specified by:
fileLength in class Directory
Parameters:
name - the name of the file for which to return the length.
Throws:
FileNotFoundException - if the file does not exist.
IOException - if there was an IO error while retrieving the file's length.

makeLock

public Lock makeLock(String name)
Description copied from class: Directory
Construct a Lock.

Overrides:
makeLock in class Directory
Parameters:
name - the name of the lock file

clearLock

public void clearLock(String name)
               throws IOException
Description copied from class: Directory
Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you are certain this lock is no longer in use.

Overrides:
clearLock in class Directory
Parameters:
name - name of the lock to be cleared.
Throws:
IOException

setLockFactory

public void setLockFactory(LockFactory lockFactory)
                    throws IOException
Description copied from class: Directory
Set the LockFactory that this Directory instance should use for its locking implementation. Each * instance of LockFactory should only be used for one directory (ie, do not share a single instance across multiple Directories).

Overrides:
setLockFactory in class Directory
Parameters:
lockFactory - instance of LockFactory.
Throws:
IOException

getLockFactory

public LockFactory getLockFactory()
Description copied from class: Directory
Get the LockFactory that this Directory instance is using for its locking implementation. Note that this may be null for Directory implementations that provide their own locking implementation.

Overrides:
getLockFactory in class Directory

getLockID

public String getLockID()
Description copied from class: Directory
Return a string identifier that uniquely differentiates this Directory instance from other Directory instances. This ID should be the same if two Directory instances (even in different JVMs and/or on different machines) are considered "the same index". This is how locking "scopes" to the right index.

Overrides:
getLockID in class Directory

copy

public void copy(Directory to,
                 String src,
                 String dest)
          throws IOException
Description copied from class: Directory
Copies the file src to Directory to under the new file name dest.

If you want to copy the entire source directory to the destination one, you can do so like this:

 Directory to; // the directory to copy to
 for (String file : dir.listAll()) {
   dir.copy(to, file, newFile); // newFile can be either file, or a new name
 }

NOTE: this method does not check whether dest exist and will overwrite it if it does.

Overrides:
copy in class Directory
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockDirectoryWrapper.Throttling

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.store
Enum MockDirectoryWrapper.Throttling

java.lang.Object
    extended by  java.lang.Enum<MockDirectoryWrapper.Throttling>
        extended by  org.apache.lucene.store.MockDirectoryWrapper.Throttling
All Implemented Interfaces:
Serializable, Comparable<MockDirectoryWrapper.Throttling>
Enclosing class:
MockDirectoryWrapper
public static enum MockDirectoryWrapper.Throttling
extends Enum<MockDirectoryWrapper.Throttling>

Enum Constant Summary
ALWAYS
always emulate a slow hard disk.
NEVER
never throttle output
SOMETIMES
sometimes (2% of the time) emulate a slow hard disk.
Method Summary
static MockDirectoryWrapper.Throttling | valueOf(String name) Returns the enum constant of this type with the specified name.
static MockDirectoryWrapper.Throttling[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

ALWAYS

public static final MockDirectoryWrapper.Throttling ALWAYS
always emulate a slow hard disk. could be very slow!

SOMETIMES

public static final MockDirectoryWrapper.Throttling SOMETIMES
sometimes (2% of the time) emulate a slow hard disk.

NEVER

public static final MockDirectoryWrapper.Throttling NEVER
never throttle output

Method Detail

values

public static final MockDirectoryWrapper.Throttling[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(MockDirectoryWrapper.Throttling c : MockDirectoryWrapper.Throttling.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static MockDirectoryWrapper.Throttling valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


MockIndexInputWrapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class MockIndexInputWrapper

java.lang.Object
    extended by  org.apache.lucene.store.DataInput
        extended by  org.apache.lucene.store.IndexInput
            extended by  org.apache.lucene.store.MockIndexInputWrapper
All Implemented Interfaces:
Closeable, Cloneable
public class MockIndexInputWrapper
extends IndexInput

Used by MockDirectoryWrapper to create an input stream that keeps track of when it's been closed.

Constructor Summary
MockIndexInputWrapper(MockDirectoryWrapper dir, String name, IndexInput delegate)
Construct an empty output buffer.
Method Summary
Object | clone() Returns a clone of this stream.
void | close() Closes the stream to further operations.
void | copyBytes(IndexOutput out, long numBytes) Copies numBytes bytes to the given IndexOutput.
long | getFilePointer() Returns the current position in this file, where the next read will occur.
long | length() The number of bytes in the file.
byte | readByte() Reads and returns a single byte.
void | readBytes(byte[] b, int offset, int len) Reads a specified number of bytes into an array at the specified offset.
void | readBytes(byte[] b, int offset, int len, boolean useBuffer) Reads a specified number of bytes into an array at the specified offset with control over whether the read should be buffered (callers who have their own buffer should pass in "false" for useBuffer).
void | readChars(char[] buffer, int start, int length) Reads Lucene's old "modified UTF-8" encoded characters into an array.
int | readInt() Reads four bytes and returns an int.
long | readLong() Reads eight bytes and returns a long.
String | readString() Reads a string.
Map<String,String> | readStringStringMap()
int | readVInt() Reads an int stored in variable-length format.
long | readVLong() Reads a long stored in variable-length format.
void | seek(long pos) Sets current position in this file, where the next read will occur.
void | setModifiedUTF8StringsMode() Call this if readString should read characters stored in the old modified UTF8 format (length in java chars and java's modified UTF8 encoding).
void | skipChars(int length) Expert Similar to DataInput.readChars(char[], int, int) but does not do any conversion operations on the bytes it is reading in.
Methods inherited from class org.apache.lucene.store.IndexInput
toString
Methods inherited from class org.apache.lucene.store.DataInput
readShort
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MockIndexInputWrapper

public MockIndexInputWrapper(MockDirectoryWrapper dir,
                             String name,
                             IndexInput delegate)
Construct an empty output buffer.

Method Detail

close

public void close()
           throws IOException
Description copied from class: IndexInput
Closes the stream to further operations.

Specified by:
close in interface Closeable
Specified by:
close in class IndexInput
Throws:
IOException

clone

public Object clone()
Description copied from class: DataInput
Returns a clone of this stream.

Clones of a stream access the same data, and are positioned at the same point as the stream they were cloned from.

Expert: Subclasses must ensure that clones may be positioned at different points in the input from each other and from the stream they were cloned from.

Overrides:
clone in class DataInput

getFilePointer

public long getFilePointer()
Description copied from class: IndexInput
Returns the current position in this file, where the next read will occur.

Specified by:
getFilePointer in class IndexInput
See Also:
IndexInput.seek(long)

seek

public void seek(long pos)
          throws IOException
Description copied from class: IndexInput
Sets current position in this file, where the next read will occur.

Specified by:
seek in class IndexInput
Throws:
IOException
See Also:
IndexInput.getFilePointer()

length

public long length()
Description copied from class: IndexInput
The number of bytes in the file.

Specified by:
length in class IndexInput

readByte

public byte readByte()
              throws IOException
Description copied from class: DataInput
Reads and returns a single byte.

Specified by:
readByte in class DataInput
Throws:
IOException
See Also:
DataOutput.writeByte(byte)

readBytes

public void readBytes(byte[] b,
                      int offset,
                      int len)
               throws IOException
Description copied from class: DataInput
Reads a specified number of bytes into an array at the specified offset.

Specified by:
readBytes in class DataInput
Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
Throws:
IOException
See Also:
DataOutput.writeBytes(byte[],int)

copyBytes

public void copyBytes(IndexOutput out,
                      long numBytes)
               throws IOException
Description copied from class: IndexInput
Copies numBytes bytes to the given IndexOutput.

NOTE: this method uses an intermediate buffer to copy the bytes. Consider overriding it in your implementation, if you can make a better, optimized copy.

NOTE ensure that there are enough bytes in the input to copy to output. Otherwise, different exceptions may be thrown, depending on the implementation.

Overrides:
copyBytes in class IndexInput
Throws:
IOException

readBytes

public void readBytes(byte[] b,
                      int offset,
                      int len,
                      boolean useBuffer)
               throws IOException
Description copied from class: DataInput
Reads a specified number of bytes into an array at the specified offset with control over whether the read should be buffered (callers who have their own buffer should pass in "false" for useBuffer). Currently only BufferedIndexInput respects this parameter.

Overrides:
readBytes in class DataInput
Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
useBuffer - set to false if the caller will handle buffering.
Throws:
IOException
See Also:
DataOutput.writeBytes(byte[],int)

readInt

public int readInt()
            throws IOException
Description copied from class: DataInput
Reads four bytes and returns an int.

Overrides:
readInt in class DataInput
Throws:
IOException
See Also:
DataOutput.writeInt(int)

readVInt

public int readVInt()
             throws IOException
Description copied from class: DataInput
Reads an int stored in variable-length format. Reads between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.

Overrides:
readVInt in class DataInput
Throws:
IOException
See Also:
DataOutput.writeVInt(int)

readLong

public long readLong()
              throws IOException
Description copied from class: DataInput
Reads eight bytes and returns a long.

Overrides:
readLong in class DataInput
Throws:
IOException
See Also:
DataOutput.writeLong(long)

readVLong

public long readVLong()
               throws IOException
Description copied from class: DataInput
Reads a long stored in variable-length format. Reads between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported.

Overrides:
readVLong in class DataInput
Throws:
IOException

readString

public String readString()
                  throws IOException
Description copied from class: DataInput
Reads a string.

Overrides:
readString in class DataInput
Throws:
IOException
See Also:
DataOutput.writeString(String)

readStringStringMap

public Map<String,String> readStringStringMap()
                                       throws IOException
Overrides:
readStringStringMap in class DataInput
Throws:
IOException

setModifiedUTF8StringsMode

public void setModifiedUTF8StringsMode()
Description copied from class: DataInput
Call this if readString should read characters stored in the old modified UTF8 format (length in java chars and java's modified UTF8 encoding). This is used for indices written pre-2.4 See LUCENE-510 for details.

Overrides:
setModifiedUTF8StringsMode in class DataInput

readChars

public void readChars(char[] buffer,
                      int start,
                      int length)
               throws IOException
Description copied from class: DataInput
Reads Lucene's old "modified UTF-8" encoded characters into an array.

Overrides:
readChars in class DataInput
Parameters:
buffer - the array to read characters into
start - the offset in the array to start storing characters
length - the number of characters to read
Throws:
IOException
See Also:
DataOutput.writeChars(String,int,int)

skipChars

public void skipChars(int length)
               throws IOException
Description copied from class: IndexInput
Expert Similar to DataInput.readChars(char[], int, int) but does not do any conversion operations on the bytes it is reading in. It still has to invoke DataInput.readByte() just as DataInput.readChars(char[], int, int) does, but it does not need a buffer to store anything and it does not have to do any of the bitwise operations, since we don't actually care what is in the byte except to determine how many more bytes to read

Overrides:
skipChars in class IndexInput
Parameters:
length - The number of chars to read
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockIndexOutputWrapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class MockIndexOutputWrapper

java.lang.Object
    extended by  org.apache.lucene.store.DataOutput
        extended by  org.apache.lucene.store.IndexOutput
            extended by  org.apache.lucene.store.MockIndexOutputWrapper
All Implemented Interfaces:
Closeable
public class MockIndexOutputWrapper
extends IndexOutput

Used by MockRAMDirectory to create an output stream that will throw an IOException on fake disk full, track max disk space actually used, and maybe throw random IOExceptions.

Constructor Summary
MockIndexOutputWrapper(MockDirectoryWrapper dir, IndexOutput delegate, String name)
Construct an empty output buffer.
Method Summary
void | close() Closes this stream to further operations.
void | copyBytes(DataInput input, long numBytes) Copy numBytes bytes from input to ourself.
void | flush() Forces any buffered output to be written.
long | getFilePointer() Returns the current position in this file, where the next write will occur.
long | length() The number of bytes in the file.
void | seek(long pos) Sets current position in this file, where the next write will occur.
void | setLength(long length) Set the file length.
void | writeByte(byte b) Writes a single byte.
void | writeBytes(byte[] b, int offset, int len) Writes an array of bytes.
Methods inherited from class org.apache.lucene.store.DataOutput
writeBytes, writeChars, writeChars, writeInt, writeLong, writeShort, writeString, writeStringStringMap, writeVInt, writeVLong
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MockIndexOutputWrapper

public MockIndexOutputWrapper(MockDirectoryWrapper dir,
                              IndexOutput delegate,
                              String name)
Construct an empty output buffer.

Method Detail

close

public void close()
           throws IOException
Description copied from class: IndexOutput
Closes this stream to further operations.

Specified by:
close in interface Closeable
Specified by:
close in class IndexOutput
Throws:
IOException

flush

public void flush()
           throws IOException
Description copied from class: IndexOutput
Forces any buffered output to be written.

Specified by:
flush in class IndexOutput
Throws:
IOException

writeByte

public void writeByte(byte b)
               throws IOException
Description copied from class: DataOutput
Writes a single byte.

Specified by:
writeByte in class DataOutput
Throws:
IOException
See Also:
DataInput.readByte()

writeBytes

public void writeBytes(byte[] b,
                       int offset,
                       int len)
                throws IOException
Description copied from class: DataOutput
Writes an array of bytes.

Specified by:
writeBytes in class DataOutput
Parameters:
b - the bytes to write
offset - the offset in the byte array
len - the number of bytes to write
Throws:
IOException
See Also:
DataInput.readBytes(byte[],int,int)

getFilePointer

public long getFilePointer()
Description copied from class: IndexOutput
Returns the current position in this file, where the next write will occur.

Specified by:
getFilePointer in class IndexOutput
See Also:
IndexOutput.seek(long)

seek

public void seek(long pos)
          throws IOException
Description copied from class: IndexOutput
Sets current position in this file, where the next write will occur.

Specified by:
seek in class IndexOutput
Throws:
IOException
See Also:
IndexOutput.getFilePointer()

length

public long length()
            throws IOException
Description copied from class: IndexOutput
The number of bytes in the file.

Specified by:
length in class IndexOutput
Throws:
IOException

setLength

public void setLength(long length)
               throws IOException
Description copied from class: IndexOutput
Set the file length. By default, this method does nothing (it's optional for a Directory to implement it). But, certain Directory implementations (for example @see FSDirectory) can use this to inform the underlying IO system to pre-allocate the file to the specified size. If the length is longer than the current file length, the bytes added to the file are undefined. Otherwise the file is truncated.

Overrides:
setLength in class IndexOutput
Parameters:
length - file length
Throws:
IOException

copyBytes

public void copyBytes(DataInput input,
                      long numBytes)
               throws IOException
Description copied from class: DataOutput
Copy numBytes bytes from input to ourself.

Overrides:
copyBytes in class DataOutput
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MockLockFactoryWrapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class MockLockFactoryWrapper

java.lang.Object
    extended by  org.apache.lucene.store.LockFactory
        extended by  org.apache.lucene.store.MockLockFactoryWrapper

public class MockLockFactoryWrapper
extends LockFactory

Used by MockDirectoryWrapper to wrap another factory and track open locks.

Field Summary
Fields inherited from class org.apache.lucene.store.LockFactory
lockPrefix
Constructor Summary
MockLockFactoryWrapper(MockDirectoryWrapper dir, LockFactory delegate)
Method Summary
void | clearLock(String lockName) Attempt to clear (forcefully unlock and remove) the specified lock.
String | getLockPrefix() Get the prefix in use for all locks created in this LockFactory.
Lock | makeLock(String lockName) Return a new Lock instance identified by lockName.
void | setLockPrefix(String lockPrefix) Set the prefix in use for all locks created in this LockFactory.
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

MockLockFactoryWrapper

public MockLockFactoryWrapper(MockDirectoryWrapper dir,
                              LockFactory delegate)
Method Detail

setLockPrefix

public void setLockPrefix(String lockPrefix)
Description copied from class: LockFactory
Set the prefix in use for all locks created in this LockFactory. This is normally called once, when a Directory gets this LockFactory instance. However, you can also call this (after this instance is assigned to a Directory) to override the prefix in use. This is helpful if you're running Lucene on machines that have different mount points for the same shared directory.

Overrides:
setLockPrefix in class LockFactory

getLockPrefix

public String getLockPrefix()
Description copied from class: LockFactory
Get the prefix in use for all locks created in this LockFactory.

Overrides:
getLockPrefix in class LockFactory

makeLock

public Lock makeLock(String lockName)
Description copied from class: LockFactory
Return a new Lock instance identified by lockName.

Specified by:
makeLock in class LockFactory
Parameters:
lockName - name of the lock to be created.

clearLock

public void clearLock(String lockName)
               throws IOException
Description copied from class: LockFactory
Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you are certain this lock is no longer in use.

Specified by:
clearLock in class LockFactory
Parameters:
lockName - name of the lock to be cleared.
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NativeFSLockFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class NativeFSLockFactory

java.lang.Object
    extended by  org.apache.lucene.store.LockFactory
        extended by  org.apache.lucene.store.FSLockFactory
            extended by  org.apache.lucene.store.NativeFSLockFactory

public class NativeFSLockFactory
extends FSLockFactory

Implements LockFactory using native OS file locks. Note that because this LockFactory relies on java.nio.* APIs for locking, any problems with those APIs will cause locking to fail. Specifically, on certain NFS environments the java.nio.* locks will fail (the lock can incorrectly be double acquired) whereas SimpleFSLockFactory worked perfectly in those same environments. For NFS based access to an index, it's recommended that you try SimpleFSLockFactory first and work around the one limitation that a lock file could be left when the JVM exits abnormally.

The primary benefit of NativeFSLockFactory is that lock files will be properly removed (by the OS) if the JVM has an abnormal exit.

Note that, unlike SimpleFSLockFactory, the existence of leftover lock files in the filesystem on exiting the JVM is fine because the OS will free the locks held against these files even though the files still remain.

If you suspect that this or any other LockFactory is not working properly in your environment, you can easily test it by using VerifyingLockFactory, LockVerifyServer and LockStressTest.

See Also:
LockFactory

Field Summary
Fields inherited from class org.apache.lucene.store.FSLockFactory
lockDir
Fields inherited from class org.apache.lucene.store.LockFactory
lockPrefix
Constructor Summary
NativeFSLockFactory()
Create a NativeFSLockFactory instance, with null (unset) lock directory.
NativeFSLockFactory(File lockDir)
Create a NativeFSLockFactory instance, storing lock files into the specified lockDir:
NativeFSLockFactory(String lockDirName)
Create a NativeFSLockFactory instance, storing lock files into the specified lockDirName:
Method Summary
void | clearLock(String lockName) Attempt to clear (forcefully unlock and remove) the specified lock.
Lock | makeLock(String lockName) Return a new Lock instance identified by lockName.
Methods inherited from class org.apache.lucene.store.FSLockFactory
getLockDir, setLockDir
Methods inherited from class org.apache.lucene.store.LockFactory
getLockPrefix, setLockPrefix
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NativeFSLockFactory

public NativeFSLockFactory()
                    throws IOException
Create a NativeFSLockFactory instance, with null (unset) lock directory. When you pass this factory to a FSDirectory subclass, the lock directory is automatically set to the directory itself. Be sure to create one instance for each directory your create!

Throws:
IOException

NativeFSLockFactory

public NativeFSLockFactory(String lockDirName)
                    throws IOException
Create a NativeFSLockFactory instance, storing lock files into the specified lockDirName:

Parameters:
lockDirName - where lock files are created.
Throws:
IOException

NativeFSLockFactory

public NativeFSLockFactory(File lockDir)
                    throws IOException
Create a NativeFSLockFactory instance, storing lock files into the specified lockDir:

Parameters:
lockDir - where lock files are created.
Throws:
IOException
Method Detail

makeLock

public Lock makeLock(String lockName)
Description copied from class: LockFactory
Return a new Lock instance identified by lockName.

Specified by:
makeLock in class LockFactory
Parameters:
lockName - name of the lock to be created.

clearLock

public void clearLock(String lockName)
               throws IOException
Description copied from class: LockFactory
Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you are certain this lock is no longer in use.

Specified by:
clearLock in class LockFactory
Parameters:
lockName - name of the lock to be cleared.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NativePosixUtil

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class NativePosixUtil

java.lang.Object
    extended by  org.apache.lucene.store.NativePosixUtil

public final class NativePosixUtil
extends Object

Field Summary
static int | DONTNEED
static int | NOREUSE
static int | NORMAL
static int | RANDOM
static int | SEQUENTIAL
static int | WILLNEED
Constructor Summary
NativePosixUtil()
Method Summary
static void | advise(FileDescriptor fd, long offset, long len, int advise)
static int | madvise(ByteBuffer buf, int advise)
static FileDescriptor | open_direct(String filename, boolean read)
static int | posix_madvise(ByteBuffer buf, int advise)
static long | pread(FileDescriptor fd, long pos, ByteBuffer byteBuf)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

NORMAL

public static final int NORMAL
See Also:
Constant Field Values

SEQUENTIAL

public static final int SEQUENTIAL
See Also:
Constant Field Values

RANDOM

public static final int RANDOM
See Also:
Constant Field Values

WILLNEED

public static final int WILLNEED
See Also:
Constant Field Values

DONTNEED

public static final int DONTNEED
See Also:
Constant Field Values

NOREUSE

public static final int NOREUSE
See Also:
Constant Field Values
Constructor Detail

NativePosixUtil

public NativePosixUtil()
Method Detail

posix_madvise

public static int posix_madvise(ByteBuffer buf,
                                int advise)
                         throws IOException
Throws:
IOException

madvise

public static int madvise(ByteBuffer buf,
                          int advise)
                   throws IOException
Throws:
IOException

open_direct

public static FileDescriptor open_direct(String filename,
                                         boolean read)
                                  throws IOException
Throws:
IOException

pread

public static long pread(FileDescriptor fd,
                         long pos,
                         ByteBuffer byteBuf)
                  throws IOException
Throws:
IOException

advise

public static void advise(FileDescriptor fd,
                          long offset,
                          long len,
                          int advise)
                   throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NIOFSDirectory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class NIOFSDirectory

java.lang.Object
    extended by  org.apache.lucene.store.Directory
        extended by  org.apache.lucene.store.FSDirectory
            extended by  org.apache.lucene.store.NIOFSDirectory
All Implemented Interfaces:
Closeable
public class NIOFSDirectory
extends FSDirectory

An FSDirectory implementation that uses java.nio's FileChannel's positional read, which allows multiple threads to read from the same file without synchronizing.

This class only uses FileChannel when reading; writing is achieved with FSDirectory.FSIndexOutput.

NOTE: NIOFSDirectory is not recommended on Windows because of a bug in how FileChannel.read is implemented in Sun's JRE. Inside of the implementation the position is apparently synchronized. See here for details.

NOTE: Accessing this class either directly or indirectly from a thread while it's interrupted can close the underlying file descriptor immediately if at the same time the thread is blocked on IO. The file descriptor will remain closed and subsequent access to NIOFSDirectory will throw a ClosedChannelException. If your application uses either Thread.interrupt() or Future.cancel(boolean) you should use SimpleFSDirectory in favor of NIOFSDirectory.

Nested Class Summary
protected static class NIOFSDirectory.NIOFSIndexInput
Nested classes/interfaces inherited from class org.apache.lucene.store.FSDirectory
FSDirectory.FSIndexOutput
Field Summary
Fields inherited from class org.apache.lucene.store.FSDirectory
DEFAULT_READ_CHUNK_SIZE, directory, staleFiles
Fields inherited from class org.apache.lucene.store.Directory
isOpen, lockFactory
Constructor Summary
NIOFSDirectory(File path)
Create a new NIOFSDirectory for the named location and NativeFSLockFactory.
NIOFSDirectory(File path, LockFactory lockFactory)
Create a new NIOFSDirectory for the named location.
Method Summary
 IndexInput openInput(String name, int bufferSize)
Creates an IndexInput for the file with the given name.
Methods inherited from class org.apache.lucene.store.FSDirectory
close, createOutput, deleteFile, ensureCanWrite, fileExists, fileLength, fileModified, fileModified, fsync, getDirectory, getFile, getLockID, getReadChunkSize, listAll, listAll, onIndexOutputClosed, open, open, openInput, setLockFactory, setReadChunkSize, sync, sync, toString, touchFile
Methods inherited from class org.apache.lucene.store.Directory
clearLock, copy, copy, ensureOpen, getLockFactory, makeLock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NIOFSDirectory

public NIOFSDirectory(File path,
                      LockFactory lockFactory)
               throws IOException
Create a new NIOFSDirectory for the named location.

Parameters:
path - the path of the directory
lockFactory - the lock factory to use, or null for the default (NativeFSLockFactory);
Throws:
IOException

NIOFSDirectory

public NIOFSDirectory(File path)
               throws IOException
Create a new NIOFSDirectory for the named location and NativeFSLockFactory.

Parameters:
path - the path of the directory
Throws:
IOException
Method Detail

openInput

public IndexInput openInput(String name,
                            int bufferSize)
                     throws IOException
Creates an IndexInput for the file with the given name.

Overrides:
openInput in class Directory
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NIOFSDirectory.NIOFSIndexInput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class NIOFSDirectory.NIOFSIndexInput

java.lang.Object
    extended by  org.apache.lucene.store.DataInput
        extended by  org.apache.lucene.store.IndexInput
            extended by  org.apache.lucene.store.BufferedIndexInput
                extended by  org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput
                    extended by  org.apache.lucene.store.NIOFSDirectory.NIOFSIndexInput
All Implemented Interfaces:
Closeable, Cloneable
Enclosing class:
NIOFSDirectory
protected static class NIOFSDirectory.NIOFSIndexInput
extends SimpleFSDirectory.SimpleFSIndexInput

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput
SimpleFSDirectory.SimpleFSIndexInput.Descriptor
Field Summary
Fields inherited from class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput
chunkSize, file
Fields inherited from class org.apache.lucene.store.BufferedIndexInput
buffer, BUFFER_SIZE
Constructor Summary
NIOFSDirectory.NIOFSIndexInput(File path, int bufferSize, int chunkSize)
Method Summary
void | close() Closes the stream to further operations.
protected void | newBuffer(byte[] newBuffer)
protected void | readInternal(byte[] b, int offset, int len) IndexInput methods
Methods inherited from class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput
clone, copyBytes, length, seekInternal
Methods inherited from class org.apache.lucene.store.BufferedIndexInput
flushBuffer, getBufferSize, getFilePointer, readByte, readBytes, readBytes, readInt, readLong, readShort, readVInt, readVLong, seek, setBufferSize
Methods inherited from class org.apache.lucene.store.IndexInput
skipChars, toString
Methods inherited from class org.apache.lucene.store.DataInput
readChars, readString, readStringStringMap, setModifiedUTF8StringsMode
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NIOFSDirectory.NIOFSIndexInput

public NIOFSDirectory.NIOFSIndexInput(File path,
                                      int bufferSize,
                                      int chunkSize)
                               throws IOException
Throws:
IOException
Method Detail

newBuffer

protected void newBuffer(byte[] newBuffer)
Overrides:
newBuffer in class BufferedIndexInput

close

public void close()
           throws IOException
Description copied from class: IndexInput
Closes the stream to further operations.

Specified by:
close in interface Closeable
Overrides:
close in class SimpleFSDirectory.SimpleFSIndexInput
Throws:
IOException

readInternal

protected void readInternal(byte[] b,
                            int offset,
                            int len)
                     throws IOException
Description copied from class: SimpleFSDirectory.SimpleFSIndexInput
IndexInput methods

Overrides:
readInternal in class SimpleFSDirectory.SimpleFSIndexInput
Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoLockFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class NoLockFactory

java.lang.Object
    extended by  org.apache.lucene.store.LockFactory
        extended by  org.apache.lucene.store.NoLockFactory

public class NoLockFactory
extends LockFactory

Use this LockFactory to disable locking entirely. Only one instance of this lock is created. You should call getNoLockFactory() to get the instance.

See Also:
LockFactory

Field Summary
Fields inherited from class org.apache.lucene.store.LockFactory
lockPrefix
Constructor Summary
NoLockFactory()
Deprecated. This constructor was not intended to be public and should not be used. It will be made private in Lucene 4.0
Method Summary
void | clearLock(String lockName) Attempt to clear (forcefully unlock and remove) the specified lock.
static NoLockFactory | getNoLockFactory()
Lock | makeLock(String lockName) Return a new Lock instance identified by lockName.
Methods inherited from class org.apache.lucene.store.LockFactory
getLockPrefix, setLockPrefix
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NoLockFactory

@Deprecated
public NoLockFactory()
Deprecated. This constructor was not intended to be public and should not be used. It will be made private in Lucene 4.0

See Also:
getNoLockFactory()
Method Detail

getNoLockFactory

public static NoLockFactory getNoLockFactory()

makeLock

public Lock makeLock(String lockName)
Description copied from class: LockFactory
Return a new Lock instance identified by lockName.

Specified by:
makeLock in class LockFactory
Parameters:
lockName - name of the lock to be created.

clearLock

public void clearLock(String lockName)
Description copied from class: LockFactory
Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you are certain this lock is no longer in use.

Specified by:
clearLock in class LockFactory
Parameters:
lockName - name of the lock to be cleared.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoSuchDirectoryException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class NoSuchDirectoryException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.io.IOException
                extended by  java.io.FileNotFoundException
                    extended by  org.apache.lucene.store.NoSuchDirectoryException
All Implemented Interfaces:
Serializable
public class NoSuchDirectoryException
extends FileNotFoundException

This exception is thrown when you try to list a non-existent directory.

See Also:
Serialized Form

Constructor Summary
NoSuchDirectoryException(String message)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NoSuchDirectoryException

public NoSuchDirectoryException(String message)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NRTCachingDirectory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class NRTCachingDirectory

java.lang.Object
    extended by  org.apache.lucene.store.Directory
        extended by  org.apache.lucene.store.NRTCachingDirectory
All Implemented Interfaces:
Closeable
public class NRTCachingDirectory
extends Directory

Wraps a RAMDirectory around any provided delegate directory, to be used during NRT search. Make sure you pull the merge scheduler using getMergeScheduler() and pass that to your IndexWriter; this class uses that to keep track of which merges are being done by which threads, to decide when to cache each written file.

This class is likely only useful in a near-real-time context, where indexing rate is lowish but reopen rate is highish, resulting in many tiny files being written. This directory keeps such segments (as well as the segments produced by merging them, as long as they are small enough), in RAM.

This is safe to use: when your app calls {IndexWriter#commit}, all cached files will be flushed from the cached and sync'd.

NOTE: this class is somewhat sneaky in its approach for spying on merges to determine the size of a merge: it records which threads are running which merges by watching ConcurrentMergeScheduler's doMerge method. While this works correctly, likely future versions of this class will take a more general approach.

Here's a simple example usage:

   Directory fsDir = FSDirectory.open(new File("/path/to/index"));
   NRTCachingDirectory cachedFSDir = new NRTCachingDirectory(fsDir, 5.0, 60.0);
   IndexWriterConfig conf = new IndexWriterConfig(Version.LUCENE_32, analyzer);
   conf.setMergeScheduler(cachedFSDir.getMergeScheduler());
   IndexWriter writer = new IndexWriter(cachedFSDir, conf);

This will cache all newly flushed segments, all merges whose expected segment size is <= 5 MB, unless the net cached bytes exceeds 60 MB at which point all writes will not be cached (until the net bytes falls below 60 MB).

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.store.Directory
isOpen, lockFactory
Constructor Summary
NRTCachingDirectory(Directory delegate, double maxMergeSizeMB, double maxCachedMB)
We will cache a newly created output if 1) it's a flush or a merge and the estimated size of the merged segment is <= maxMergeSizeMB, and 2) the total cached bytes is <= maxCachedMB
Method Summary
void | clearLock(String name) Attempt to clear (forcefully unlock and remove) the specified lock.
void | close() Close this directory, which flushes any cached files to the delegate and then closes the delegate.
IndexOutput | createOutput(String name) Creates a new, empty file in the directory with the given name.
void | deleteFile(String name) Removes an existing file in the directory.
protected boolean | doCacheWrite(String name) Subclass can override this to customize logic; return true if this file should be written to the RAMDirectory.
boolean | fileExists(String name) Returns true iff a file with the given name exists.
long | fileLength(String name) Returns the length of a file in the directory.
long | fileModified(String name) Returns the time the named file was last modified.
LockFactory | getLockFactory() Get the LockFactory that this Directory instance is using for its locking implementation.
String | getLockID() Return a string identifier that uniquely differentiates this Directory instance from other Directory instances.
MergeScheduler | getMergeScheduler()
String[] | listAll() Returns an array of strings, one for each file in the directory.
String[] | listCachedFiles()
Lock | makeLock(String name) Construct a Lock.
IndexInput | openInput(String name) Returns a stream reading an existing file.
IndexInput | openInput(String name, int bufferSize) Returns a stream reading an existing file, with the specified read buffer size.
void | setLockFactory(LockFactory lf) Set the LockFactory that this Directory instance should use for its locking implementation.
long | sizeInBytes() Returns how many bytes are being used by the RAMDirectory cache
void | sync(Collection<String> fileNames) Ensure that any writes to these files are moved to stable storage.
String | toString()
void | touchFile(String name) Deprecated.
Methods inherited from class org.apache.lucene.store.Directory
copy, copy, ensureOpen, sync
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NRTCachingDirectory

public NRTCachingDirectory(Directory delegate,
                           double maxMergeSizeMB,
                           double maxCachedMB)
We will cache a newly created output if 1) it's a flush or a merge and the estimated size of the merged segment is <= maxMergeSizeMB, and 2) the total cached bytes is <= maxCachedMB

Method Detail

getLockFactory

public LockFactory getLockFactory()
Description copied from class: Directory
Get the LockFactory that this Directory instance is using for its locking implementation. Note that this may be null for Directory implementations that provide their own locking implementation.

Overrides:
getLockFactory in class Directory

setLockFactory

public void setLockFactory(LockFactory lf)
                    throws IOException
Description copied from class: Directory
Set the LockFactory that this Directory instance should use for its locking implementation. Each * instance of LockFactory should only be used for one directory (ie, do not share a single instance across multiple Directories).

Overrides:
setLockFactory in class Directory
Parameters:
lf - instance of LockFactory.
Throws:
IOException

getLockID

public String getLockID()
Description copied from class: Directory
Return a string identifier that uniquely differentiates this Directory instance from other Directory instances. This ID should be the same if two Directory instances (even in different JVMs and/or on different machines) are considered "the same index". This is how locking "scopes" to the right index.

Overrides:
getLockID in class Directory

makeLock

public Lock makeLock(String name)
Description copied from class: Directory
Construct a Lock.

Overrides:
makeLock in class Directory
Parameters:
name - the name of the lock file

clearLock

public void clearLock(String name)
               throws IOException
Description copied from class: Directory
Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you are certain this lock is no longer in use.

Overrides:
clearLock in class Directory
Parameters:
name - name of the lock to be cleared.
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Directory

listAll

public String[] listAll()
                 throws IOException
Description copied from class: Directory
Returns an array of strings, one for each file in the directory.

Specified by:
listAll in class Directory
Throws:
NoSuchDirectoryException - if the directory is not prepared for any write operations (such as Directory.createOutput(String)).
IOException - in case of other IO errors

sizeInBytes

public long sizeInBytes()
Returns how many bytes are being used by the RAMDirectory cache

fileExists

public boolean fileExists(String name)
                   throws IOException
Description copied from class: Directory
Returns true iff a file with the given name exists.

Specified by:
fileExists in class Directory
Throws:
IOException

fileModified

public long fileModified(String name)
                  throws IOException
Description copied from class: Directory
Returns the time the named file was last modified.

Specified by:
fileModified in class Directory
Throws:
IOException

touchFile

@Deprecated
public void touchFile(String name)
               throws IOException
Deprecated.

Description copied from class: Directory
Set the modified time of an existing file to now.

Specified by:
touchFile in class Directory
Throws:
IOException

deleteFile

public void deleteFile(String name)
                throws IOException
Description copied from class: Directory
Removes an existing file in the directory.

Specified by:
deleteFile in class Directory
Throws:
IOException

fileLength

public long fileLength(String name)
                throws IOException
Description copied from class: Directory
Returns the length of a file in the directory. This method follows the following contract:
  • Throws FileNotFoundException if the file does not exist
  • Returns a value ≥0 if the file exists, which specifies its length.

Specified by:
fileLength in class Directory
Parameters:
name - the name of the file for which to return the length.
Throws:
FileNotFoundException - if the file does not exist.
IOException - if there was an IO error while retrieving the file's length.

listCachedFiles

public String[] listCachedFiles()

createOutput

public IndexOutput createOutput(String name)
                         throws IOException
Description copied from class: Directory
Creates a new, empty file in the directory with the given name. Returns a stream writing this file.

Specified by:
createOutput in class Directory
Throws:
IOException

sync

public void sync(Collection<String> fileNames)
          throws IOException
Description copied from class: Directory
Ensure that any writes to these files are moved to stable storage. Lucene uses this to properly commit changes to the index, to prevent a machine/OS crash from corrupting the index.

NOTE: Clients may call this method for same files over and over again, so some impls might optimize for that. For other impls the operation can be a noop, for various reasons.

Overrides:
sync in class Directory
Throws:
IOException

openInput

public IndexInput openInput(String name)
                     throws IOException
Description copied from class: Directory
Returns a stream reading an existing file.

Specified by:
openInput in class Directory
Throws:
IOException

openInput

public IndexInput openInput(String name,
                            int bufferSize)
                     throws IOException
Description copied from class: Directory
Returns a stream reading an existing file, with the specified read buffer size. The particular Directory implementation may ignore the buffer size. Currently the only Directory implementations that respect this parameter are FSDirectory and CompoundFileReader.

Overrides:
openInput in class Directory
Throws:
IOException

close

public void close()
           throws IOException
Close this directory, which flushes any cached files to the delegate and then closes the delegate.

Specified by:
close in interface Closeable
Specified by:
close in class Directory
Throws:
IOException

getMergeScheduler

public MergeScheduler getMergeScheduler()

doCacheWrite

protected boolean doCacheWrite(String name)
Subclass can override this to customize logic; return true if this file should be written to the RAMDirectory.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OutputStreamDataOutput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class OutputStreamDataOutput

java.lang.Object
    extended by  org.apache.lucene.store.DataOutput
        extended by  org.apache.lucene.store.OutputStreamDataOutput
All Implemented Interfaces:
Closeable
public class OutputStreamDataOutput
extends DataOutput
implements Closeable

A DataOutput wrapping a plain OutputStream.

Constructor Summary
OutputStreamDataOutput(OutputStream os)
Method Summary
void | close()
void | writeByte(byte b) Writes a single byte.
void | writeBytes(byte[] b, int offset, int length) Writes an array of bytes.
Methods inherited from class org.apache.lucene.store.DataOutput
copyBytes, writeBytes, writeChars, writeChars, writeInt, writeLong, writeShort, writeString, writeStringStringMap, writeVInt, writeVLong
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

OutputStreamDataOutput

public OutputStreamDataOutput(OutputStream os)
Method Detail

writeByte

public void writeByte(byte b)
               throws IOException
Description copied from class: DataOutput
Writes a single byte.

Specified by:
writeByte in class DataOutput
Throws:
IOException
See Also:
DataInput.readByte()

writeBytes

public void writeBytes(byte[] b,
                       int offset,
                       int length)
                throws IOException
Description copied from class: DataOutput
Writes an array of bytes.

Specified by:
writeBytes in class DataOutput
Parameters:
b - the bytes to write
offset - the offset in the byte array
length - the number of bytes to write
Throws:
IOException
See Also:
DataInput.readBytes(byte[],int,int)

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.store
Classes
_TestHelper
BufferedIndexInput
BufferedIndexOutput
ByteArrayDataInput
ByteArrayDataOutput
ChecksumIndexInput
ChecksumIndexOutput
DataInput
DataOutput
DirectIOLinuxDirectory
Directory
FileSwitchDirectory
FSDirectory
FSDirectory.FSIndexOutput
FSLockFactory
IndexInput
IndexOutput
InputStreamDataInput
Lock
Lock.With
LockFactory
LockStressTest
LockVerifyServer
MMapDirectory
MockDirectoryWrapper
MockDirectoryWrapper.Failure
MockIndexInputWrapper
MockIndexOutputWrapper
MockLockFactoryWrapper
NativeFSLockFactory
NativePosixUtil
NIOFSDirectory
NIOFSDirectory.NIOFSIndexInput
NoLockFactory
NRTCachingDirectory
OutputStreamDataOutput
RAMDirectory
RAMFile
RAMInputStream
RAMOutputStream
SimpleFSDirectory
SimpleFSDirectory.SimpleFSIndexInput
SimpleFSDirectory.SimpleFSIndexInput.Descriptor
SimpleFSLockFactory
SingleInstanceLockFactory
VerifyingLockFactory
WindowsDirectory
WindowsDirectory.WindowsIndexInput
Enums
MockDirectoryWrapper.Throttling
Exceptions
AlreadyClosedException
LockObtainFailedException
LockReleaseFailedException
NoSuchDirectoryException


org.apache.lucene.store

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.store

Binary i/o API, used for all index data.

See:
Description

Class Summary
_TestHelper | This class provides access to package-level features defined in the store package.
BufferedIndexInput | Base implementation class for buffered IndexInput.
BufferedIndexOutput | Base implementation class for buffered IndexOutput.
ByteArrayDataInput | DataInput backed by a byte array.
ByteArrayDataOutput | DataOutput backed by a byte array.
ChecksumIndexInput | Writes bytes through to a primary IndexOutput, computing checksum as it goes.
ChecksumIndexOutput | Writes bytes through to a primary IndexOutput, computing checksum.
DataInput | Abstract base class for performing read operations of Lucene's low-level data types.
DataOutput | Abstract base class for performing write operations of Lucene's low-level data types.
DirectIOLinuxDirectory | An Directory implementation that uses the Linux-specific O_DIRECT flag to bypass all OS level caching.
Directory | A Directory is a flat list of files.
FileSwitchDirectory | Expert: A Directory instance that switches files between two other Directory instances.
FSDirectory | Base class for Directory implementations that store index files in the file system.
FSDirectory.FSIndexOutput |
FSLockFactory | Base class for file system based locking implementation.
IndexInput | Abstract base class for input from a file in a Directory.
IndexOutput | Abstract base class for output to a file in a Directory.
InputStreamDataInput | A DataInput wrapping a plain InputStream.
Lock | An interprocess mutex lock.
Lock.With | Utility class for executing code with exclusive access.
LockFactory | Base class for Locking implementation.
LockStressTest | Simple standalone tool that forever acquires & releases a lock using a specific LockFactory.
LockVerifyServer | Simple standalone server that must be running when you use VerifyingLockFactory.
MMapDirectory | File-based Directory implementation that uses mmap for reading, and FSDirectory.FSIndexOutput for writing.
MockDirectoryWrapper | This is a Directory Wrapper that adds methods intended to be used only by unit tests.
MockDirectoryWrapper.Failure | Objects that represent fail-able conditions.
MockIndexInputWrapper | Used by MockDirectoryWrapper to create an input stream that keeps track of when it's been closed.
MockIndexOutputWrapper | Used by MockRAMDirectory to create an output stream that will throw an IOException on fake disk full, track max disk space actually used, and maybe throw random IOExceptions.
MockLockFactoryWrapper | Used by MockDirectoryWrapper to wrap another factory and track open locks.
NativeFSLockFactory | Implements LockFactory using native OS file locks.
NativePosixUtil |
NIOFSDirectory | An FSDirectory implementation that uses java.nio's FileChannel's positional read, which allows multiple threads to read from the same file without synchronizing.
NIOFSDirectory.NIOFSIndexInput |
NoLockFactory | Use this LockFactory to disable locking entirely.
NRTCachingDirectory | Wraps a RAMDirectory around any provided delegate directory, to be used during NRT search.
OutputStreamDataOutput | A DataOutput wrapping a plain OutputStream.
RAMDirectory | A memory-resident Directory implementation.
RAMFile |
RAMInputStream | A memory-resident IndexInput implementation.
RAMOutputStream | A memory-resident IndexOutput implementation.
SimpleFSDirectory | A straightforward implementation of FSDirectory using java.io.RandomAccessFile.
SimpleFSDirectory.SimpleFSIndexInput |
SimpleFSDirectory.SimpleFSIndexInput.Descriptor |
SimpleFSLockFactory | Implements LockFactory using File.createNewFile().
SingleInstanceLockFactory | Implements LockFactory for a single in-process instance, meaning all locking will take place through this one instance.
VerifyingLockFactory | A LockFactory that wraps another LockFactory and verifies that each lock obtain/release is "correct" (never results in two processes holding the lock at the same time).
WindowsDirectory | Native Directory implementation for Microsoft Windows.
WindowsDirectory.WindowsIndexInput |

Enum Summary
MockDirectoryWrapper.Throttling

Exception Summary
AlreadyClosedException | This exception is thrown when there is an attempt to access something that has already been closed.
LockObtainFailedException | This exception is thrown when the write.lock could not be acquired.
LockReleaseFailedException | This exception is thrown when the write.lock could not be released.
NoSuchDirectoryException | This exception is thrown when you try to list a non-existent directory.

Package org.apache.lucene.store Description

Binary i/o API, used for all index data.


org.apache.lucene.store Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.store

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.store._TestHelper
    • org.apache.lucene.store.DataInput (implements java.lang.Cloneable)
      • org.apache.lucene.store.ByteArrayDataInput
      • org.apache.lucene.store.IndexInput (implements java.lang.Cloneable, java.io.Closeable)
        • org.apache.lucene.store.BufferedIndexInput
          • org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput
            • org.apache.lucene.store.NIOFSDirectory.NIOFSIndexInput
          • org.apache.lucene.store.WindowsDirectory.WindowsIndexInput
        • org.apache.lucene.store.ChecksumIndexInput
        • org.apache.lucene.store.MockIndexInputWrapper
        • org.apache.lucene.store.RAMInputStream (implements java.lang.Cloneable)
      • org.apache.lucene.store.InputStreamDataInput (implements java.io.Closeable)
    • org.apache.lucene.store.DataOutput
      • org.apache.lucene.store.ByteArrayDataOutput
      • org.apache.lucene.store.IndexOutput (implements java.io.Closeable)
        • org.apache.lucene.store.BufferedIndexOutput
          • org.apache.lucene.store.FSDirectory.FSIndexOutput
        • org.apache.lucene.store.ChecksumIndexOutput
        • org.apache.lucene.store.MockIndexOutputWrapper
        • org.apache.lucene.store.RAMOutputStream
      • org.apache.lucene.store.OutputStreamDataOutput (implements java.io.Closeable)
    • org.apache.lucene.store.Directory (implements java.io.Closeable)
      • org.apache.lucene.store.FileSwitchDirectory
      • org.apache.lucene.store.FSDirectory
        • org.apache.lucene.store.DirectIOLinuxDirectory
        • org.apache.lucene.store.MMapDirectory
        • org.apache.lucene.store.NIOFSDirectory
        • org.apache.lucene.store.SimpleFSDirectory
        • org.apache.lucene.store.WindowsDirectory
      • org.apache.lucene.store.MockDirectoryWrapper
      • org.apache.lucene.store.NRTCachingDirectory
      • org.apache.lucene.store.RAMDirectory (implements java.io.Serializable)
    • org.apache.lucene.store.Lock
    • org.apache.lucene.store.Lock.With
    • org.apache.lucene.store.LockFactory
      • org.apache.lucene.store.FSLockFactory
        • org.apache.lucene.store.NativeFSLockFactory
        • org.apache.lucene.store.SimpleFSLockFactory
      • org.apache.lucene.store.MockLockFactoryWrapper
      • org.apache.lucene.store.NoLockFactory
      • org.apache.lucene.store.SingleInstanceLockFactory
      • org.apache.lucene.store.VerifyingLockFactory
    • org.apache.lucene.store.LockStressTest
    • org.apache.lucene.store.LockVerifyServer
    • org.apache.lucene.store.MockDirectoryWrapper.Failure
    • org.apache.lucene.store.NativePosixUtil
    • org.apache.lucene.store.RAMFile (implements java.io.Serializable)
    • java.io.RandomAccessFile (implements java.io.Closeable, java.io.DataInput, java.io.DataOutput)
      • org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput.Descriptor
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.io.IOException
          • java.io.FileNotFoundException
            • org.apache.lucene.store.NoSuchDirectoryException
          • org.apache.lucene.store.LockObtainFailedException
          • org.apache.lucene.store.LockReleaseFailedException
        • java.lang.RuntimeException
          • java.lang.IllegalStateException
            • org.apache.lucene.store.AlreadyClosedException

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.store.MockDirectoryWrapper.Throttling


Uses of Package org.apache.lucene.store

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.store

Packages that use org.apache.lucene.store
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.misc | Miscellaneous index tools.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.spell | Suggest alternate spellings for words.
org.apache.lucene.search.suggest | Support for Autocomplete/Autosuggest
org.apache.lucene.store | Binary i/o API, used for all index data.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.
org.apache.lucene.util | Some utility classes.
org.apache.lucene.util.fst | Finite state transducers
org.apache.lucene.util.packed | The packed package provides random access capable arrays of positive longs.

Classes in org.apache.lucene.store used by org.apache.lucene.benchmark.byTask
Directory
A Directory is a flat list of files.

Classes in org.apache.lucene.store used by org.apache.lucene.benchmark.byTask.tasks
Directory
A Directory is a flat list of files.
LockObtainFailedException
This exception is thrown when the write.lock could not be acquired.

Classes in org.apache.lucene.store used by org.apache.lucene.facet.index
Directory
A Directory is a flat list of files.

Classes in org.apache.lucene.store used by org.apache.lucene.facet.taxonomy.directory
AlreadyClosedException
This exception is thrown when there is an attempt to access something that has already been closed.
Directory
A Directory is a flat list of files.
LockObtainFailedException
This exception is thrown when the write.lock could not be acquired.

Classes in org.apache.lucene.store used by org.apache.lucene.index
AlreadyClosedException
This exception is thrown when there is an attempt to access something that has already been closed.
BufferedIndexInput
Base implementation class for buffered IndexInput.
DataInput
Abstract base class for performing read operations of Lucene's low-level data types.
Directory
A Directory is a flat list of files.
IndexInput
Abstract base class for input from a file in a Directory.
IndexOutput
Abstract base class for output to a file in a Directory.
LockObtainFailedException
This exception is thrown when the write.lock could not be acquired.

Classes in org.apache.lucene.store used by org.apache.lucene.misc
Directory
A Directory is a flat list of files.

Classes in org.apache.lucene.store used by org.apache.lucene.search
Directory
A Directory is a flat list of files.

Classes in org.apache.lucene.store used by org.apache.lucene.search.spell
Directory
A Directory is a flat list of files.

Classes in org.apache.lucene.store used by org.apache.lucene.search.suggest
ByteArrayDataInput
DataInput backed by a byte array.
ByteArrayDataOutput
DataOutput backed by a byte array.

Classes in org.apache.lucene.store used by org.apache.lucene.store
AlreadyClosedException
This exception is thrown when there is an attempt to access something that has already been closed.
BufferedIndexInput
Base implementation class for buffered IndexInput.
BufferedIndexOutput
Base implementation class for buffered IndexOutput.
DataInput
Abstract base class for performing read operations of Lucene's low-level data types.
DataOutput
Abstract base class for performing write operations of Lucene's low-level data types.
Directory
A Directory is a flat list of files.
FSDirectory
Base class for Directory implementations that store index files in the file system.
FSDirectory.FSIndexOutput
FSLockFactory
Base class for file system based locking implementation.
IndexInput
Abstract base class for input from a file in a Directory.
IndexOutput
Abstract base class for output to a file in a Directory.
Lock
An interprocess mutex lock.
LockFactory
Base class for Locking implementation.
LockObtainFailedException
This exception is thrown when the write.lock could not be acquired.
MockDirectoryWrapper
This is a Directory Wrapper that adds methods intended to be used only by unit tests.
MockDirectoryWrapper.Failure
Objects that represent fail-able conditions.
MockDirectoryWrapper.Throttling
NoLockFactory
Use this LockFactory to disable locking entirely.
RAMFile
SimpleFSDirectory.SimpleFSIndexInput
SimpleFSDirectory.SimpleFSIndexInput.Descriptor

Classes in org.apache.lucene.store used by org.apache.lucene.store.instantiated
Directory
A Directory is a flat list of files.

Classes in org.apache.lucene.store used by org.apache.lucene.util
DataInput
Abstract base class for performing read operations of Lucene's low-level data types.
DataOutput
Abstract base class for performing write operations of Lucene's low-level data types.
Directory
A Directory is a flat list of files.
FSDirectory
Base class for Directory implementations that store index files in the file system.
IndexInput
Abstract base class for input from a file in a Directory.
IndexOutput
Abstract base class for output to a file in a Directory.
LockFactory
Base class for Locking implementation.
MockDirectoryWrapper
This is a Directory Wrapper that adds methods intended to be used only by unit tests.

Classes in org.apache.lucene.store used by org.apache.lucene.util.fst
DataInput
Abstract base class for performing read operations of Lucene's low-level data types.
DataOutput
Abstract base class for performing write operations of Lucene's low-level data types.

Classes in org.apache.lucene.store used by org.apache.lucene.util.packed
DataInput
Abstract base class for performing read operations of Lucene's low-level data types.
DataOutput
Abstract base class for performing write operations of Lucene's low-level data types.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


RAMDirectory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class RAMDirectory

java.lang.Object
    extended by  org.apache.lucene.store.Directory
        extended by  org.apache.lucene.store.RAMDirectory
All Implemented Interfaces:
Closeable, Serializable
public class RAMDirectory
extends Directory
implements Serializable

A memory-resident Directory implementation. Locking implementation is by default the SingleInstanceLockFactory but can be changed with Directory.setLockFactory(org.apache.lucene.store.LockFactory).

Warning: This class is not intended to work with huge indexes. Everything beyond several hundred megabytes will waste resources (GC cycles), because it uses an internal buffer size of 1024 bytes, producing millions of byte[1024] arrays. This class is optimized for small memory-resident indexes. It also has bad concurrency on multithreaded environments.

It is recommended to materialize large indexes on disk and use MMapDirectory, which is a high-performance directory implementation working directly on the file system cache of the operating system, so copying data to Java heap space is not useful.

See Also:
Serialized Form

Field Summary
protected Map<String,RAMFile> | fileMap
protected AtomicLong | sizeInBytes
Fields inherited from class org.apache.lucene.store.Directory
isOpen, lockFactory
Constructor Summary
RAMDirectory()
Constructs an empty Directory.
RAMDirectory(Directory dir)
Creates a new RAMDirectory instance from a different Directory implementation.
Method Summary
void | close() Closes the store to future operations, releasing associated memory.
IndexOutput | createOutput(String name) Creates a new, empty file in the directory with the given name.
void | deleteFile(String name) Removes an existing file in the directory.
boolean | fileExists(String name) Returns true iff the named file exists in this directory.
long | fileLength(String name) Returns the length in bytes of a file in the directory.
long | fileModified(String name) Returns the time the named file was last modified.
String[] | listAll() Returns an array of strings, one for each file in the directory.
protected RAMFile | newRAMFile() Returns a new RAMFile for storing data.
IndexInput | openInput(String name) Returns a stream reading an existing file.
long | sizeInBytes() Return total size in bytes of all files in this directory.
void | touchFile(String name) Deprecated. Lucene never uses this API; it will be removed in 4.0.
Methods inherited from class org.apache.lucene.store.Directory
clearLock, copy, copy, ensureOpen, getLockFactory, getLockID, makeLock, openInput, setLockFactory, sync, sync, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

fileMap

protected final Map<String,RAMFile> fileMap

sizeInBytes

protected final AtomicLong sizeInBytes
Constructor Detail

RAMDirectory

public RAMDirectory()
Constructs an empty Directory.

RAMDirectory

public RAMDirectory(Directory dir)
             throws IOException
Creates a new RAMDirectory instance from a different Directory implementation. This can be used to load a disk-based index into memory.

Warning: This class is not intended to work with huge indexes. Everything beyond several hundred megabytes will waste resources (GC cycles), because it uses an internal buffer size of 1024 bytes, producing millions of byte[1024] arrays. This class is optimized for small memory-resident indexes. It also has bad concurrency on multithreaded environments.

For disk-based indexes it is recommended to use MMapDirectory, which is a high-performance directory implementation working directly on the file system cache of the operating system, so copying data to Java heap space is not useful.

Note that the resulting RAMDirectory instance is fully independent from the original Directory (it is a complete copy). Any subsequent changes to the original Directory will not be visible in the RAMDirectory instance.

Parameters:
dir - a Directory value
Throws:
IOException - if an error occurs
Method Detail

listAll

public final String[] listAll()
Description copied from class: Directory
Returns an array of strings, one for each file in the directory.

Specified by:
listAll in class Directory

fileExists

public final boolean fileExists(String name)
Returns true iff the named file exists in this directory.

Specified by:
fileExists in class Directory

fileModified

public final long fileModified(String name)
                        throws IOException
Returns the time the named file was last modified.

Specified by:
fileModified in class Directory
Throws:
IOException - if the file does not exist

touchFile

@Deprecated
public void touchFile(String name)
               throws IOException
Deprecated. Lucene never uses this API; it will be removed in 4.0.

Set the modified time of an existing file to now.

Specified by:
touchFile in class Directory
Throws:
IOException - if the file does not exist

fileLength

public final long fileLength(String name)
                      throws IOException
Returns the length in bytes of a file in the directory.

Specified by:
fileLength in class Directory
Parameters:
name - the name of the file for which to return the length.
Throws:
IOException - if the file does not exist

sizeInBytes

public final long sizeInBytes()
Return total size in bytes of all files in this directory. This is currently quantized to RAMOutputStream.BUFFER_SIZE.

deleteFile

public void deleteFile(String name)
                throws IOException
Removes an existing file in the directory.

Specified by:
deleteFile in class Directory
Throws:
IOException - if the file does not exist

createOutput

public IndexOutput createOutput(String name)
                         throws IOException
Creates a new, empty file in the directory with the given name. Returns a stream writing this file.

Specified by:
createOutput in class Directory
Throws:
IOException

newRAMFile

protected RAMFile newRAMFile()
Returns a new RAMFile for storing data. This method can be overridden to return different RAMFile impls, that e.g. override RAMFile.newBuffer(int).

openInput

public IndexInput openInput(String name)
                     throws IOException
Returns a stream reading an existing file.

Specified by:
openInput in class Directory
Throws:
IOException

close

public void close()
Closes the store to future operations, releasing associated memory.

Specified by:
close in interface Closeable
Specified by:
close in class Directory
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RAMFile

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class RAMFile

java.lang.Object
    extended by  org.apache.lucene.store.RAMFile
All Implemented Interfaces:
Serializable
public class RAMFile
extends Object
implements Serializable

See Also:
Serialized Form
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
protected ArrayList<byte[]> | buffers
protected long | sizeInBytes
Constructor Summary
RAMFile()
Method Summary
protected byte[] | addBuffer(int size)
protected byte[] | getBuffer(int index)
long | getLastModified()
long | getLength()
long | getSizeInBytes()
protected byte[] | newBuffer(int size) Expert: allocate a new buffer.
protected int | numBuffers()
protected void | setLastModified(long lastModified)
protected void | setLength(long length)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

buffers

protected ArrayList<byte[]> buffers

sizeInBytes

protected long sizeInBytes
Constructor Detail

RAMFile

public RAMFile()
Method Detail

getLength

public long getLength()

setLength

protected void setLength(long length)

getLastModified

public long getLastModified()

setLastModified

protected void setLastModified(long lastModified)

addBuffer

protected final byte[] addBuffer(int size)

getBuffer

protected final byte[] getBuffer(int index)

numBuffers

protected final int numBuffers()

newBuffer

protected byte[] newBuffer(int size)
Expert: allocate a new buffer. Subclasses can allocate differently.

Parameters:
size - size of allocated buffer.
Returns:
allocated buffer.

getSizeInBytes

public long getSizeInBytes()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RAMInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class RAMInputStream

java.lang.Object
    extended by  org.apache.lucene.store.DataInput
        extended by  org.apache.lucene.store.IndexInput
            extended by  org.apache.lucene.store.RAMInputStream
All Implemented Interfaces:
Closeable, Cloneable
public class RAMInputStream
extends IndexInput
implements Cloneable

A memory-resident IndexInput implementation.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
RAMInputStream(RAMFile f)
Deprecated.
RAMInputStream(String name, RAMFile f)
Method Summary
void | close() Closes the stream to further operations.
void | copyBytes(IndexOutput out, long numBytes) Copies numBytes bytes to the given IndexOutput.
long | getFilePointer() Returns the current position in this file, where the next read will occur.
long | length() The number of bytes in the file.
byte | readByte() Reads and returns a single byte.
void | readBytes(byte[] b, int offset, int len) Reads a specified number of bytes into an array at the specified offset.
void | seek(long pos) Sets current position in this file, where the next read will occur.
Methods inherited from class org.apache.lucene.store.IndexInput
skipChars, toString
Methods inherited from class org.apache.lucene.store.DataInput
clone, readBytes, readChars, readInt, readLong, readShort, readString, readStringStringMap, readVInt, readVLong, setModifiedUTF8StringsMode
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

RAMInputStream

@Deprecated
public RAMInputStream(RAMFile f)
               throws IOException
Deprecated.

Please pass String name

Throws:
IOException

RAMInputStream

public RAMInputStream(String name,
                      RAMFile f)
               throws IOException
Throws:
IOException
Method Detail

close

public void close()
Description copied from class: IndexInput
Closes the stream to further operations.

Specified by:
close in interface Closeable
Specified by:
close in class IndexInput

length

public long length()
Description copied from class: IndexInput
The number of bytes in the file.

Specified by:
length in class IndexInput

readByte

public byte readByte()
              throws IOException
Description copied from class: DataInput
Reads and returns a single byte.

Specified by:
readByte in class DataInput
Throws:
IOException
See Also:
DataOutput.writeByte(byte)

readBytes

public void readBytes(byte[] b,
                      int offset,
                      int len)
               throws IOException
Description copied from class: DataInput
Reads a specified number of bytes into an array at the specified offset.

Specified by:
readBytes in class DataInput
Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
Throws:
IOException
See Also:
DataOutput.writeBytes(byte[],int)

copyBytes

public void copyBytes(IndexOutput out,
                      long numBytes)
               throws IOException
Description copied from class: IndexInput
Copies numBytes bytes to the given IndexOutput.

NOTE: this method uses an intermediate buffer to copy the bytes. Consider overriding it in your implementation, if you can make a better, optimized copy.

NOTE ensure that there are enough bytes in the input to copy to output. Otherwise, different exceptions may be thrown, depending on the implementation.

Overrides:
copyBytes in class IndexInput
Throws:
IOException

getFilePointer

public long getFilePointer()
Description copied from class: IndexInput
Returns the current position in this file, where the next read will occur.

Specified by:
getFilePointer in class IndexInput
See Also:
IndexInput.seek(long)

seek

public void seek(long pos)
          throws IOException
Description copied from class: IndexInput
Sets current position in this file, where the next read will occur.

Specified by:
seek in class IndexInput
Throws:
IOException
See Also:
IndexInput.getFilePointer()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RAMOutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class RAMOutputStream

java.lang.Object
    extended by  org.apache.lucene.store.DataOutput
        extended by  org.apache.lucene.store.IndexOutput
            extended by  org.apache.lucene.store.RAMOutputStream
All Implemented Interfaces:
Closeable
public class RAMOutputStream
extends IndexOutput

A memory-resident IndexOutput implementation.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
RAMOutputStream()
Construct an empty output buffer.
RAMOutputStream(RAMFile f)
Method Summary
void | close() Closes this stream to further operations.
void | copyBytes(DataInput input, long numBytes) Copy numBytes bytes from input to ourself.
void | flush() Forces any buffered output to be written.
long | getFilePointer() Returns the current position in this file, where the next write will occur.
long | length() The number of bytes in the file.
void | reset() Resets this to an empty file.
void | seek(long pos) Sets current position in this file, where the next write will occur.
long | sizeInBytes() Returns byte usage of all buffers.
void | writeByte(byte b) Writes a single byte.
void | writeBytes(byte[] b, int offset, int len) Writes an array of bytes.
void | writeTo(IndexOutput out) Copy the current contents of this buffer to the named output.
Methods inherited from class org.apache.lucene.store.IndexOutput
setLength
Methods inherited from class org.apache.lucene.store.DataOutput
writeBytes, writeChars, writeChars, writeInt, writeLong, writeShort, writeString, writeStringStringMap, writeVInt, writeVLong
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RAMOutputStream

public RAMOutputStream()
Construct an empty output buffer.

RAMOutputStream

public RAMOutputStream(RAMFile f)
Method Detail

writeTo

public void writeTo(IndexOutput out)
             throws IOException
Copy the current contents of this buffer to the named output.

Throws:
IOException

reset

public void reset()
Resets this to an empty file.

close

public void close()
           throws IOException
Description copied from class: IndexOutput
Closes this stream to further operations.

Specified by:
close in interface Closeable
Specified by:
close in class IndexOutput
Throws:
IOException

seek

public void seek(long pos)
          throws IOException
Description copied from class: IndexOutput
Sets current position in this file, where the next write will occur.

Specified by:
seek in class IndexOutput
Throws:
IOException
See Also:
IndexOutput.getFilePointer()

length

public long length()
Description copied from class: IndexOutput
The number of bytes in the file.

Specified by:
length in class IndexOutput

writeByte

public void writeByte(byte b)
               throws IOException
Description copied from class: DataOutput
Writes a single byte.

Specified by:
writeByte in class DataOutput
Throws:
IOException
See Also:
DataInput.readByte()

writeBytes

public void writeBytes(byte[] b,
                       int offset,
                       int len)
                throws IOException
Description copied from class: DataOutput
Writes an array of bytes.

Specified by:
writeBytes in class DataOutput
Parameters:
b - the bytes to write
offset - the offset in the byte array
len - the number of bytes to write
Throws:
IOException
See Also:
DataInput.readBytes(byte[],int,int)

flush

public void flush()
           throws IOException
Description copied from class: IndexOutput
Forces any buffered output to be written.

Specified by:
flush in class IndexOutput
Throws:
IOException

getFilePointer

public long getFilePointer()
Description copied from class: IndexOutput
Returns the current position in this file, where the next write will occur.

Specified by:
getFilePointer in class IndexOutput
See Also:
IndexOutput.seek(long)

sizeInBytes

public long sizeInBytes()
Returns byte usage of all buffers.

copyBytes

public void copyBytes(DataInput input,
                      long numBytes)
               throws IOException
Description copied from class: DataOutput
Copy numBytes bytes from input to ourself.

Overrides:
copyBytes in class DataOutput
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleFSDirectory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class SimpleFSDirectory

java.lang.Object
    extended by  org.apache.lucene.store.Directory
        extended by  org.apache.lucene.store.FSDirectory
            extended by  org.apache.lucene.store.SimpleFSDirectory
All Implemented Interfaces:
Closeable
public class SimpleFSDirectory
extends FSDirectory

A straightforward implementation of FSDirectory using java.io.RandomAccessFile. However, this class has poor concurrent performance (multiple threads will bottleneck) as it synchronizes when multiple threads read from the same file. It's usually better to use NIOFSDirectory or MMapDirectory instead.

Nested Class Summary
protected static class SimpleFSDirectory.SimpleFSIndexInput
Nested classes/interfaces inherited from class org.apache.lucene.store.FSDirectory
FSDirectory.FSIndexOutput
Field Summary
Fields inherited from class org.apache.lucene.store.FSDirectory
DEFAULT_READ_CHUNK_SIZE, directory, staleFiles
Fields inherited from class org.apache.lucene.store.Directory
isOpen, lockFactory
Constructor Summary
SimpleFSDirectory(File path)
Create a new SimpleFSDirectory for the named location and NativeFSLockFactory.
SimpleFSDirectory(File path, LockFactory lockFactory)
Create a new SimpleFSDirectory for the named location.
Method Summary
 IndexInput openInput(String name, int bufferSize)
Creates an IndexInput for the file with the given name.
Methods inherited from class org.apache.lucene.store.FSDirectory
close, createOutput, deleteFile, ensureCanWrite, fileExists, fileLength, fileModified, fileModified, fsync, getDirectory, getFile, getLockID, getReadChunkSize, listAll, listAll, onIndexOutputClosed, open, open, openInput, setLockFactory, setReadChunkSize, sync, sync, toString, touchFile
Methods inherited from class org.apache.lucene.store.Directory
clearLock, copy, copy, ensureOpen, getLockFactory, makeLock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SimpleFSDirectory

public SimpleFSDirectory(File path,
                         LockFactory lockFactory)
                  throws IOException
Create a new SimpleFSDirectory for the named location.

Parameters:
path - the path of the directory
lockFactory - the lock factory to use, or null for the default (NativeFSLockFactory);
Throws:
IOException

SimpleFSDirectory

public SimpleFSDirectory(File path)
                  throws IOException
Create a new SimpleFSDirectory for the named location and NativeFSLockFactory.

Parameters:
path - the path of the directory
Throws:
IOException
Method Detail

openInput

public IndexInput openInput(String name,
                            int bufferSize)
                     throws IOException
Creates an IndexInput for the file with the given name.

Overrides:
openInput in class Directory
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleFSDirectory.SimpleFSIndexInput.Descriptor

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class SimpleFSDirectory.SimpleFSIndexInput.Descriptor

java.lang.Object
    extended by  java.io.RandomAccessFile
        extended by  org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput.Descriptor
All Implemented Interfaces:
Closeable, DataInput, DataOutput
Enclosing class:
SimpleFSDirectory.SimpleFSIndexInput
protected static class SimpleFSDirectory.SimpleFSIndexInput.Descriptor
extends RandomAccessFile

Field Summary
protected  boolean isOpen
Constructor Summary
SimpleFSDirectory.SimpleFSIndexInput.Descriptor(File file, String mode)
Method Summary
 void close()
Methods inherited from class java.io.RandomAccessFile
getChannel, getFD, getFilePointer, length, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, seek, setLength, skipBytes, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

isOpen

protected volatile boolean isOpen
Constructor Detail

SimpleFSDirectory.SimpleFSIndexInput.Descriptor

public SimpleFSDirectory.SimpleFSIndexInput.Descriptor(File file,
                                                       String mode)
                                                throws IOException
Throws:
IOException
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class RandomAccessFile
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleFSDirectory.SimpleFSIndexInput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class SimpleFSDirectory.SimpleFSIndexInput

java.lang.Object
    extended by  org.apache.lucene.store.DataInput
        extended by  org.apache.lucene.store.IndexInput
            extended by  org.apache.lucene.store.BufferedIndexInput
                extended by  org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput
All Implemented Interfaces:
Closeable, Cloneable
Direct Known Subclasses:
NIOFSDirectory.NIOFSIndexInput
Enclosing class:
SimpleFSDirectory
protected static class SimpleFSDirectory.SimpleFSIndexInput
extends BufferedIndexInput

Nested Class Summary
protected static class SimpleFSDirectory.SimpleFSIndexInput.Descriptor
Field Summary
protected int | chunkSize
protected SimpleFSDirectory.SimpleFSIndexInput.Descriptor | file
Fields inherited from class org.apache.lucene.store.BufferedIndexInput
buffer, BUFFER_SIZE
Constructor Summary
SimpleFSDirectory.SimpleFSIndexInput(File path, int bufferSize, int chunkSize)
Deprecated. please pass resourceDesc
SimpleFSDirectory.SimpleFSIndexInput(String resourceDesc, File path, int bufferSize, int chunkSize)
Method Summary
Object | clone() Returns a clone of this stream.
void | close() Closes the stream to further operations.
void | copyBytes(IndexOutput out, long numBytes) Copies numBytes bytes to the given IndexOutput.
long | length() The number of bytes in the file.
protected void | readInternal(byte[] b, int offset, int len) IndexInput methods
protected void | seekInternal(long position) Expert: implements seek.
Methods inherited from class org.apache.lucene.store.BufferedIndexInput
flushBuffer, getBufferSize, getFilePointer, newBuffer, readByte, readBytes, readBytes, readInt, readLong, readShort, readVInt, readVLong, seek, setBufferSize
Methods inherited from class org.apache.lucene.store.IndexInput
skipChars, toString
Methods inherited from class org.apache.lucene.store.DataInput
readChars, readString, readStringStringMap, setModifiedUTF8StringsMode
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

file

protected final SimpleFSDirectory.SimpleFSIndexInput.Descriptor file

chunkSize

protected final int chunkSize
Constructor Detail

SimpleFSDirectory.SimpleFSIndexInput

@Deprecated
public SimpleFSDirectory.SimpleFSIndexInput(File path,
                                                       int bufferSize,
                                                       int chunkSize)
                                     throws IOException
Deprecated. please pass resourceDesc

Throws:
IOException

SimpleFSDirectory.SimpleFSIndexInput

public SimpleFSDirectory.SimpleFSIndexInput(String resourceDesc,
                                            File path,
                                            int bufferSize,
                                            int chunkSize)
                                     throws IOException
Throws:
IOException
Method Detail

readInternal

protected void readInternal(byte[] b,
                            int offset,
                            int len)
                     throws IOException
IndexInput methods

Specified by:
readInternal in class BufferedIndexInput
Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
Throws:
IOException

close

public void close()
           throws IOException
Description copied from class: IndexInput
Closes the stream to further operations.

Specified by:
close in interface Closeable
Specified by:
close in class IndexInput
Throws:
IOException

seekInternal

protected void seekInternal(long position)
Description copied from class: BufferedIndexInput
Expert: implements seek. Sets current position in this file, where the next BufferedIndexInput.readInternal(byte[],int,int) will occur.

Specified by:
seekInternal in class BufferedIndexInput
See Also:
BufferedIndexInput.readInternal(byte[],int,int)

length

public long length()
Description copied from class: IndexInput
The number of bytes in the file.

Specified by:
length in class IndexInput

clone

public Object clone()
Description copied from class: DataInput
Returns a clone of this stream.

Clones of a stream access the same data, and are positioned at the same point as the stream they were cloned from.

Expert: Subclasses must ensure that clones may be positioned at different points in the input from each other and from the stream they were cloned from.

Overrides:
clone in class BufferedIndexInput

copyBytes

public void copyBytes(IndexOutput out,
                      long numBytes)
               throws IOException
Description copied from class: IndexInput
Copies numBytes bytes to the given IndexOutput.

NOTE: this method uses an intermediate buffer to copy the bytes. Consider overriding it in your implementation, if you can make a better, optimized copy.

NOTE ensure that there are enough bytes in the input to copy to output. Otherwise, different exceptions may be thrown, depending on the implementation.

Overrides:
copyBytes in class BufferedIndexInput
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleFSLockFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class SimpleFSLockFactory

java.lang.Object
    extended by  org.apache.lucene.store.LockFactory
        extended by  org.apache.lucene.store.FSLockFactory
            extended by  org.apache.lucene.store.SimpleFSLockFactory

public class SimpleFSLockFactory
extends FSLockFactory

Implements LockFactory using File.createNewFile().

NOTE: the javadocs for File.createNewFile contain a vague yet spooky warning about not using the API for file locking. This warning was added due to this bug, and in fact the only known problem with using this API for locking is that the Lucene write lock may not be released when the JVM exits abnormally.

When this happens, a LockObtainFailedException is hit when trying to create a writer, in which case you need to explicitly clear the lock file first. You can either manually remove the file, or use the IndexWriter.unlock(Directory) API. But, first be certain that no writer is in fact writing to the index otherwise you can easily corrupt your index.

If you suspect that this or any other LockFactory is not working properly in your environment, you can easily test it by using VerifyingLockFactory, LockVerifyServer and LockStressTest.

See Also:
LockFactory

Field Summary
Fields inherited from class org.apache.lucene.store.FSLockFactory
lockDir
Fields inherited from class org.apache.lucene.store.LockFactory
lockPrefix
Constructor Summary
SimpleFSLockFactory()
Create a SimpleFSLockFactory instance, with null (unset) lock directory.
SimpleFSLockFactory(File lockDir)
Instantiate using the provided directory (as a File instance).
SimpleFSLockFactory(String lockDirName)
Instantiate using the provided directory name (String).
Method Summary
void | clearLock(String lockName) Attempt to clear (forcefully unlock and remove) the specified lock.
Lock | makeLock(String lockName) Return a new Lock instance identified by lockName.
Methods inherited from class org.apache.lucene.store.FSLockFactory
getLockDir, setLockDir
Methods inherited from class org.apache.lucene.store.LockFactory
getLockPrefix, setLockPrefix
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SimpleFSLockFactory

public SimpleFSLockFactory()
                    throws IOException
Create a SimpleFSLockFactory instance, with null (unset) lock directory. When you pass this factory to a FSDirectory subclass, the lock directory is automatically set to the directory itself. Be sure to create one instance for each directory your create!

Throws:
IOException

SimpleFSLockFactory

public SimpleFSLockFactory(File lockDir)
                    throws IOException
Instantiate using the provided directory (as a File instance).

Parameters:
lockDir - where lock files should be created.
Throws:
IOException

SimpleFSLockFactory

public SimpleFSLockFactory(String lockDirName)
                    throws IOException
Instantiate using the provided directory name (String).

Parameters:
lockDirName - where lock files should be created.
Throws:
IOException
Method Detail

makeLock

public Lock makeLock(String lockName)
Description copied from class: LockFactory
Return a new Lock instance identified by lockName.

Specified by:
makeLock in class LockFactory
Parameters:
lockName - name of the lock to be created.

clearLock

public void clearLock(String lockName)
               throws IOException
Description copied from class: LockFactory
Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you are certain this lock is no longer in use.

Specified by:
clearLock in class LockFactory
Parameters:
lockName - name of the lock to be cleared.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SingleInstanceLockFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class SingleInstanceLockFactory

java.lang.Object
    extended by  org.apache.lucene.store.LockFactory
        extended by  org.apache.lucene.store.SingleInstanceLockFactory

public class SingleInstanceLockFactory
extends LockFactory

Implements LockFactory for a single in-process instance, meaning all locking will take place through this one instance. Only use this LockFactory when you are certain all IndexReaders and IndexWriters for a given index are running against a single shared in-process Directory instance. This is currently the default locking for RAMDirectory.

See Also:
LockFactory

Field Summary
Fields inherited from class org.apache.lucene.store.LockFactory
lockPrefix
Constructor Summary
SingleInstanceLockFactory()
Method Summary
void | clearLock(String lockName) Attempt to clear (forcefully unlock and remove) the specified lock.
Lock | makeLock(String lockName) Return a new Lock instance identified by lockName.
Methods inherited from class org.apache.lucene.store.LockFactory
getLockPrefix, setLockPrefix
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SingleInstanceLockFactory

public SingleInstanceLockFactory()
Method Detail

makeLock

public Lock makeLock(String lockName)
Description copied from class: LockFactory
Return a new Lock instance identified by lockName.

Specified by:
makeLock in class LockFactory
Parameters:
lockName - name of the lock to be created.

clearLock

public void clearLock(String lockName)
               throws IOException
Description copied from class: LockFactory
Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you are certain this lock is no longer in use.

Specified by:
clearLock in class LockFactory
Parameters:
lockName - name of the lock to be cleared.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VerifyingLockFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class VerifyingLockFactory

java.lang.Object
    extended by  org.apache.lucene.store.LockFactory
        extended by  org.apache.lucene.store.VerifyingLockFactory

public class VerifyingLockFactory
extends LockFactory

A LockFactory that wraps another LockFactory and verifies that each lock obtain/release is "correct" (never results in two processes holding the lock at the same time). It does this by contacting an external server (LockVerifyServer) to assert that at most one process holds the lock at a time. To use this, you should also run LockVerifyServer on the host & port matching what you pass to the constructor.

See Also:
LockVerifyServer, LockStressTest

Field Summary
Fields inherited from class org.apache.lucene.store.LockFactory
lockPrefix
Constructor Summary
VerifyingLockFactory(byte id, LockFactory lf, String host, int port)
Method Summary
void | clearLock(String lockName) Attempt to clear (forcefully unlock and remove) the specified lock.
Lock | makeLock(String lockName) Return a new Lock instance identified by lockName.
Methods inherited from class org.apache.lucene.store.LockFactory
getLockPrefix, setLockPrefix
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

VerifyingLockFactory

public VerifyingLockFactory(byte id,
                            LockFactory lf,
                            String host,
                            int port)
                     throws IOException
Parameters:
id - should be a unique id across all clients
lf - the LockFactory that we are testing
host - host or IP where LockVerifyServer is running
port - the port LockVerifyServer is listening on
Throws:
IOException
Method Detail

makeLock

public Lock makeLock(String lockName)
Description copied from class: LockFactory
Return a new Lock instance identified by lockName.

Specified by:
makeLock in class LockFactory
Parameters:
lockName - name of the lock to be created.

clearLock

public void clearLock(String lockName)
               throws IOException
Description copied from class: LockFactory
Attempt to clear (forcefully unlock and remove) the specified lock. Only call this at a time when you are certain this lock is no longer in use.

Specified by:
clearLock in class LockFactory
Parameters:
lockName - name of the lock to be cleared.
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WindowsDirectory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class WindowsDirectory

java.lang.Object
    extended by  org.apache.lucene.store.Directory
        extended by  org.apache.lucene.store.FSDirectory
            extended by  org.apache.lucene.store.WindowsDirectory
All Implemented Interfaces:
Closeable
public class WindowsDirectory
extends FSDirectory

Native Directory implementation for Microsoft Windows.

Steps:

  1. Compile the source code to create WindowsDirectory.dll:
    c:\mingw\bin\g++ -Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at -I"%JAVA_HOME%\include" -I"%JAVA_HOME%\include\win32" -static-libgcc -static-libstdc++ -shared WindowsDirectory.cpp -o WindowsDirectory.dll
    For 64-bit JREs, use mingw64, with the -m64 option.
  2. Put WindowsDirectory.dll into some directory in your windows PATH
  3. Open indexes with WindowsDirectory and use it.

    WARNING: This API is experimental and might change in incompatible ways in the next release.

    Nested Class Summary
    protected static class WindowsDirectory.WindowsIndexInput
    Nested classes/interfaces inherited from class org.apache.lucene.store.FSDirectory
    FSDirectory.FSIndexOutput
    Field Summary
    Fields inherited from class org.apache.lucene.store.FSDirectory
    DEFAULT_READ_CHUNK_SIZE, directory, staleFiles
    Fields inherited from class org.apache.lucene.store.Directory
    isOpen, lockFactory
    Constructor Summary
    WindowsDirectory(File path)
    Create a new WindowsDirectory for the named location and NativeFSLockFactory.
    WindowsDirectory(File path, LockFactory lockFactory)
    Create a new WindowsDirectory for the named location.
    Method Summary
     IndexInput openInput(String name, int bufferSize)
    Returns a stream reading an existing file, with the specified read buffer size.
    Methods inherited from class org.apache.lucene.store.FSDirectory
    close, createOutput, deleteFile, ensureCanWrite, fileExists, fileLength, fileModified, fileModified, fsync, getDirectory, getFile, getLockID, getReadChunkSize, listAll, listAll, onIndexOutputClosed, open, open, openInput, setLockFactory, setReadChunkSize, sync, sync, toString, touchFile
    Methods inherited from class org.apache.lucene.store.Directory
    clearLock, copy, copy, ensureOpen, getLockFactory, makeLock
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Constructor Detail

    WindowsDirectory

    public WindowsDirectory(File path,
                        LockFactory lockFactory)
                 throws IOException
    Create a new WindowsDirectory for the named location.

    Parameters:
    path - the path of the directory
    lockFactory - the lock factory to use, or null for the default (NativeFSLockFactory);
    Throws:
    IOException

    WindowsDirectory

    public WindowsDirectory(File path)
                 throws IOException
    Create a new WindowsDirectory for the named location and NativeFSLockFactory.

    Parameters:
    path - the path of the directory
    Throws:
    IOException
    Method Detail

    openInput

    public IndexInput openInput(String name,
                            int bufferSize)
                     throws IOException
    Description copied from class: Directory
    Returns a stream reading an existing file, with the specified read buffer size. The particular Directory implementation may ignore the buffer size. Currently the only Directory implementations that respect this parameter are FSDirectory and CompoundFileReader.

    Overrides:
    openInput in class Directory
    Throws:
    IOException
    Overview Package Class Use Tree Deprecated Index Help
    PREV CLASS NEXT CLASS FRAMES NO FRAMES
    SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WindowsDirectory.WindowsIndexInput

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store
Class WindowsDirectory.WindowsIndexInput

java.lang.Object
    extended by  org.apache.lucene.store.DataInput
        extended by  org.apache.lucene.store.IndexInput
            extended by  org.apache.lucene.store.BufferedIndexInput
                extended by  org.apache.lucene.store.WindowsDirectory.WindowsIndexInput
All Implemented Interfaces:
Closeable, Cloneable
Enclosing class:
WindowsDirectory
protected static class WindowsDirectory.WindowsIndexInput
extends BufferedIndexInput

Field Summary
Fields inherited from class org.apache.lucene.store.BufferedIndexInput
buffer, BUFFER_SIZE
Constructor Summary
WindowsDirectory.WindowsIndexInput(File file, int bufferSize)
Method Summary
Object | clone() Returns a clone of this stream.
void | close() Closes the stream to further operations.
long | length() The number of bytes in the file.
protected void | readInternal(byte[] b, int offset, int length) Expert: implements buffer refill.
protected void | seekInternal(long pos) Expert: implements seek.
Methods inherited from class org.apache.lucene.store.BufferedIndexInput
copyBytes, flushBuffer, getBufferSize, getFilePointer, newBuffer, readByte, readBytes, readBytes, readInt, readLong, readShort, readVInt, readVLong, seek, setBufferSize
Methods inherited from class org.apache.lucene.store.IndexInput
skipChars, toString
Methods inherited from class org.apache.lucene.store.DataInput
readChars, readString, readStringStringMap, setModifiedUTF8StringsMode
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

WindowsDirectory.WindowsIndexInput

public WindowsDirectory.WindowsIndexInput(File file,
                                          int bufferSize)
                                   throws IOException
Throws:
IOException
Method Detail

readInternal

protected void readInternal(byte[] b,
                            int offset,
                            int length)
                     throws IOException
Description copied from class: BufferedIndexInput
Expert: implements buffer refill. Reads bytes from the current position in the input.

Specified by:
readInternal in class BufferedIndexInput
Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
length - the number of bytes to read
Throws:
IOException

seekInternal

protected void seekInternal(long pos)
                     throws IOException
Description copied from class: BufferedIndexInput
Expert: implements seek. Sets current position in this file, where the next BufferedIndexInput.readInternal(byte[],int,int) will occur.

Specified by:
seekInternal in class BufferedIndexInput
Throws:
IOException
See Also:
BufferedIndexInput.readInternal(byte[],int,int)

close

public void close()
           throws IOException
Description copied from class: IndexInput
Closes the stream to further operations.

Specified by:
close in interface Closeable
Specified by:
close in class IndexInput
Throws:
IOException

length

public long length()
Description copied from class: IndexInput
The number of bytes in the file.

Specified by:
length in class IndexInput

clone

public Object clone()
Description copied from class: DataInput
Returns a clone of this stream.

Clones of a stream access the same data, and are positioned at the same point as the stream they were cloned from.

Expert: Subclasses must ensure that clones may be positioned at different points in the input from each other and from the stream they were cloned from.

Overrides:
clone in class BufferedIndexInput
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.store._TestHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store._TestHelper

No usage of org.apache.lucene.store._TestHelper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.AlreadyClosedException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.AlreadyClosedException

Packages that use AlreadyClosedException
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.store | Binary i/o API, used for all index data.

Uses of AlreadyClosedException in org.apache.lucene.facet.taxonomy.directory

Methods in org.apache.lucene.facet.taxonomy.directory that throw AlreadyClosedException
protected  void DirectoryTaxonomyReader.ensureOpen()

Uses of AlreadyClosedException in org.apache.lucene.index

Methods in org.apache.lucene.index that throw AlreadyClosedException
protected void | IndexReader.ensureOpen()
protected void | IndexWriter.ensureOpen()
protected void | IndexWriter.ensureOpen(boolean includePendingClose) Used internally to throw an AlreadyClosedException if this IndexWriter has been closed.

Uses of AlreadyClosedException in org.apache.lucene.store

Methods in org.apache.lucene.store that throw AlreadyClosedException
protected  void Directory.ensureOpen()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.BufferedIndexInput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.BufferedIndexInput

Packages that use BufferedIndexInput
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.store | Binary i/o API, used for all index data.

Uses of BufferedIndexInput in org.apache.lucene.index

Subclasses of BufferedIndexInput in org.apache.lucene.index
 class MockIndexInput
IndexInput backed by a byte[] for testing.

Uses of BufferedIndexInput in org.apache.lucene.store

Subclasses of BufferedIndexInput in org.apache.lucene.store
protected static class | NIOFSDirectory.NIOFSIndexInput
protected static class | SimpleFSDirectory.SimpleFSIndexInput
protected static class | WindowsDirectory.WindowsIndexInput

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.BufferedIndexOutput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.BufferedIndexOutput

Packages that use BufferedIndexOutput
org.apache.lucene.store Binary i/o API, used for all index data.

Uses of BufferedIndexOutput in org.apache.lucene.store

Subclasses of BufferedIndexOutput in org.apache.lucene.store
protected static class FSDirectory.FSIndexOutput

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.ByteArrayDataInput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.ByteArrayDataInput

Packages that use ByteArrayDataInput
org.apache.lucene.search.suggest Support for Autocomplete/Autosuggest

Uses of ByteArrayDataInput in org.apache.lucene.search.suggest

Methods in org.apache.lucene.search.suggest with parameters of type ByteArrayDataInput
protected  long SortedTermFreqIteratorWrapper.decode(BytesRef scratch, ByteArrayDataInput tmpInput)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.ByteArrayDataOutput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.ByteArrayDataOutput

Packages that use ByteArrayDataOutput
org.apache.lucene.search.suggest Support for Autocomplete/Autosuggest

Uses of ByteArrayDataOutput in org.apache.lucene.search.suggest

Methods in org.apache.lucene.search.suggest with parameters of type ByteArrayDataOutput
protected  void SortedTermFreqIteratorWrapper.encode(Sort.ByteSequencesWriter writer, ByteArrayDataOutput output, byte[] buffer, BytesRef spare, long weight)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.ChecksumIndexInput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.ChecksumIndexInput

No usage of org.apache.lucene.store.ChecksumIndexInput

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.ChecksumIndexOutput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.ChecksumIndexOutput

No usage of org.apache.lucene.store.ChecksumIndexOutput

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.DataInput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.DataInput

Packages that use DataInput
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.store | Binary i/o API, used for all index data.
org.apache.lucene.util | Some utility classes.
org.apache.lucene.util.fst | Finite state transducers
org.apache.lucene.util.packed | The packed package provides random access capable arrays of positive longs.

Uses of DataInput in org.apache.lucene.index

Subclasses of DataInput in org.apache.lucene.index
 class MockIndexInput
IndexInput backed by a byte[] for testing.

Constructors in org.apache.lucene.index with parameters of type DataInput
IndexFormatTooNewException(DataInput in, int version, int minVersion, int maxVersion)
IndexFormatTooOldException(DataInput in, int version, int minVersion, int maxVersion)
IndexFormatTooOldException(DataInput in, String version)

Uses of DataInput in org.apache.lucene.store

Subclasses of DataInput in org.apache.lucene.store
class | BufferedIndexInput Base implementation class for buffered IndexInput.
class | ByteArrayDataInput DataInput backed by a byte array.
class | ChecksumIndexInput Writes bytes through to a primary IndexOutput, computing checksum as it goes.
class | IndexInput Abstract base class for input from a file in a Directory.
class | InputStreamDataInput A DataInput wrapping a plain InputStream.
class | MockIndexInputWrapper Used by MockDirectoryWrapper to create an input stream that keeps track of when it's been closed.
protected static class | NIOFSDirectory.NIOFSIndexInput
class | RAMInputStream A memory-resident IndexInput implementation.
protected static class | SimpleFSDirectory.SimpleFSIndexInput
protected static class | WindowsDirectory.WindowsIndexInput

Methods in org.apache.lucene.store with parameters of type DataInput
void | MockIndexOutputWrapper.copyBytes(DataInput input, long numBytes)
void | RAMOutputStream.copyBytes(DataInput input, long numBytes)
void | DataOutput.copyBytes(DataInput input, long numBytes) Copy numBytes bytes from input to ourself.

Uses of DataInput in org.apache.lucene.util

Subclasses of DataInput in org.apache.lucene.util
 class PagedBytes.PagedBytesDataInput

Methods in org.apache.lucene.util with parameters of type DataInput
static int | CodecUtil.checkHeader(DataInput in, String codec, int minVersion, int maxVersion)
void | ThrottledIndexOutput.copyBytes(DataInput input, long numBytes)

Uses of DataInput in org.apache.lucene.util.fst

Subclasses of DataInput in org.apache.lucene.util.fst
static class FST.BytesReader
Reads the bytes from this FST.

Methods in org.apache.lucene.util.fst with parameters of type DataInput
PairOutputs.Pair<A,B> | PairOutputs.read(DataInput in)
IntsRef | IntSequenceOutputs.read(DataInput in)
abstract T | Outputs.read(DataInput in)
BytesRef | ByteSequenceOutputs.read(DataInput in)
Long | PositiveIntOutputs.read(DataInput in)
Object | UpToTwoPositiveIntOutputs.read(DataInput in)
Object | NoOutputs.read(DataInput in)

Constructors in org.apache.lucene.util.fst with parameters of type DataInput
FST(DataInput in, Outputs<T> outputs)
Load a previously saved FST.

Uses of DataInput in org.apache.lucene.util.packed

Methods in org.apache.lucene.util.packed with parameters of type DataInput
static PackedInts.Reader PackedInts.getReader(DataInput in)
Retrieve PackedInt data from the DataInput and return a packed int structure based on it.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.DataOutput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.DataOutput

Packages that use DataOutput
org.apache.lucene.store | Binary i/o API, used for all index data.
org.apache.lucene.util | Some utility classes.
org.apache.lucene.util.fst | Finite state transducers
org.apache.lucene.util.packed | The packed package provides random access capable arrays of positive longs.

Uses of DataOutput in org.apache.lucene.store

Subclasses of DataOutput in org.apache.lucene.store
class | BufferedIndexOutput Base implementation class for buffered IndexOutput.
class | ByteArrayDataOutput DataOutput backed by a byte array.
class | ChecksumIndexOutput Writes bytes through to a primary IndexOutput, computing checksum.
protected static class | FSDirectory.FSIndexOutput
class | IndexOutput Abstract base class for output to a file in a Directory.
class | MockIndexOutputWrapper Used by MockRAMDirectory to create an output stream that will throw an IOException on fake disk full, track max disk space actually used, and maybe throw random IOExceptions.
class | OutputStreamDataOutput A DataOutput wrapping a plain OutputStream.
class | RAMOutputStream A memory-resident IndexOutput implementation.

Uses of DataOutput in org.apache.lucene.util

Subclasses of DataOutput in org.apache.lucene.util
class | PagedBytes.PagedBytesDataOutput
class | ThrottledIndexOutput Intentionally slow IndexOutput for testing.

Methods in org.apache.lucene.util that return DataOutput
static DataOutput CodecUtil.writeHeader(DataOutput out, String codec, int version)

Methods in org.apache.lucene.util with parameters of type DataOutput
static DataOutput | CodecUtil.writeHeader(DataOutput out, String codec, int version)
void | ByteBlockPool.writePool(DataOutput out) Writes the pools content to the given DataOutput

Uses of DataOutput in org.apache.lucene.util.fst

Methods in org.apache.lucene.util.fst with parameters of type DataOutput
void | FST.save(DataOutput out)
void | ByteSequenceOutputs.write(BytesRef prefix, DataOutput out)
void | IntSequenceOutputs.write(IntsRef prefix, DataOutput out)
void | PositiveIntOutputs.write(Long output, DataOutput out)
void | UpToTwoPositiveIntOutputs.write(Object _output, DataOutput out)
void | NoOutputs.write(Object prefix, DataOutput out)
void | PairOutputs.write(PairOutputs.Pair<A,B> output, DataOutput writer)
abstract void | Outputs.write(T output, DataOutput out)

Uses of DataOutput in org.apache.lucene.util.packed

Fields in org.apache.lucene.util.packed declared as DataOutput
protected  DataOutput PackedInts.Writer.out

Methods in org.apache.lucene.util.packed with parameters of type DataOutput
static PackedInts.Writer PackedInts.getWriter(DataOutput out, int valueCount, int bitsPerValue)
Create a packed integer array writer for the given number of values at the given bits/value.

Constructors in org.apache.lucene.util.packed with parameters of type DataOutput
PackedInts.Writer(DataOutput out, int valueCount, int bitsPerValue)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.DirectIOLinuxDirectory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.DirectIOLinuxDirectory

No usage of org.apache.lucene.store.DirectIOLinuxDirectory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.Directory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.Directory

Packages that use Directory
org.apache.lucene.benchmark.byTask | Benchmarking Lucene By Tasks.
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.misc | Miscellaneous index tools.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.spell | Suggest alternate spellings for words.
org.apache.lucene.store | Binary i/o API, used for all index data.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.
org.apache.lucene.util | Some utility classes.

Uses of Directory in org.apache.lucene.benchmark.byTask

Methods in org.apache.lucene.benchmark.byTask that return Directory
Directory | PerfRunData.getDirectory()
Directory | PerfRunData.getTaxonomyDir()

Methods in org.apache.lucene.benchmark.byTask with parameters of type Directory
 void PerfRunData.setDirectory(Directory directory)

Uses of Directory in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks with parameters of type Directory
static IndexCommit OpenReaderTask.findIndexCommit(Directory dir, String userData)

Uses of Directory in org.apache.lucene.facet.index

Constructors in org.apache.lucene.facet.index with parameters of type Directory
FacetsPayloadProcessorProvider(Directory dir, int[] ordinalMap, FacetIndexingParams indexingParams)
Construct FacetsPayloadProcessorProvider with FacetIndexingParams

Uses of Directory in org.apache.lucene.facet.taxonomy.directory

Methods in org.apache.lucene.facet.taxonomy.directory with parameters of type Directory
void | DirectoryTaxonomyWriter.addTaxonomy(Directory taxoDir, DirectoryTaxonomyWriter.OrdinalMap map) Takes the categories from the given taxonomy directory, and adds the missing ones to this taxonomy.
protected IndexReader | DirectoryTaxonomyReader.openIndexReader(Directory directory)
protected IndexWriter | DirectoryTaxonomyWriter.openIndexWriter(Directory directory, IndexWriterConfig config) Open internal index writer, which contains the taxonomy data.
static void | DirectoryTaxonomyWriter.unlock(Directory directory) Forcibly unlocks the taxonomy in the named directory.

Constructors in org.apache.lucene.facet.taxonomy.directory with parameters of type Directory
DirectoryTaxonomyReader(Directory directory)
Open for reading a taxonomy stored in a given Directory.
DirectoryTaxonomyWriter(Directory d)
DirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode)
Creates a new instance with a default cached as defined by DirectoryTaxonomyWriter.defaultTaxonomyWriterCache().
DirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode, TaxonomyWriterCache cache)
Construct a Taxonomy writer.

Uses of Directory in org.apache.lucene.index

Fields in org.apache.lucene.index declared as Directory
protected Directory | ThreadedIndexingAndSearchingTestCase.dir
Directory | CheckIndex.Status.dir Directory index is in.
protected Directory | ConcurrentMergeScheduler.dir
Directory | SegmentInfo.dir
Directory | SegmentWriteState.directory

Methods in org.apache.lucene.index that return Directory
Directory | IndexReader.directory() Returns the directory associated with this index.
Directory | SegmentReader.directory() Returns the directory this index resides in.
Directory | FilterIndexReader.directory()
Directory | IndexWriter.getDirectory() Returns the Directory used by this index.
Directory | SnapshotDeletionPolicy.SnapshotCommitPoint.getDirectory()
Directory | MergePolicy.MergeException.getDirectory() Returns the Directory of the index that hit the exception.
abstract Directory | IndexCommit.getDirectory() Returns the Directory for the index.
Directory | CompoundFileWriter.getDirectory() Returns the directory of the compound file.
protected Directory | ThreadedIndexingAndSearchingTestCase.getDirectory(Directory in)

Methods in org.apache.lucene.index with parameters of type Directory
 void CompoundFileWriter.addFile(String file, Directory dir)
Same as CompoundFileWriter.addFile(String), only for files that are found in an external Directory.
 void RandomIndexWriter.addIndexes(Directory... dirs)
 void IndexWriter.addIndexes(Directory... dirs)
Adds all segments from an array of indexes into this index.
 void IndexWriter.addIndexesNoOptimize(Directory... dirs)
Deprecated. use IndexWriter.addIndexes(Directory...) instead
 Collection<String> SegmentInfos.files(Directory dir, boolean includeSegmentsFile)
Returns all file names referenced by SegmentInfo instances matching the provided Directory (ie files associated with any "external" segments are skipped).
static SegmentReader SegmentReader.get(boolean readOnly, Directory dir, SegmentInfo si, int readBufferSize, boolean doOpenStores, int termInfosIndexDivisor)
static Map<String,String> IndexReader.getCommitUserData(Directory directory)
Deprecated. Call IndexReader.getIndexCommit() on an open IndexReader, and then call IndexCommit.getUserData().
static long IndexReader.getCurrentVersion(Directory directory)
Deprecated. Use IndexReader.getVersion() on an opened IndexReader.
protected  Directory ThreadedIndexingAndSearchingTestCase.getDirectory(Directory in)
 PayloadProcessorProvider.DirPayloadProcessor PayloadProcessorProvider.getDirProcessor(Directory dir)
Deprecated. Use PayloadProcessorProvider.getReaderProcessor(org.apache.lucene.index.IndexReader) instead. You can still select by Directory, if you retrieve the underlying directory from IndexReader.directory().
static long SegmentInfos.getLastCommitGeneration(Directory directory)
Get the generation of the most recent commit to the index in this directory (N in the segments_N file).
static String SegmentInfos.getLastCommitSegmentsFileName(Directory directory)
Get the filename of the segments_N file for the most recent commit to the index in this Directory.
static boolean IndexReader.indexExists(Directory directory)
Returns true if an index exists at the specified directory.
static boolean IndexWriter.isLocked(Directory directory)
Returns true iff the index in the named directory is currently locked.
static long IndexReader.lastModified(Directory directory2)
Deprecated. If you need to track commit time of an index, you can store it in the commit data (see IndexWriter.commit(Map)
static Collection<IndexCommit> IndexReader.listCommits(Directory dir)
Returns all commit points that exist in the Directory.
static IndexReader IndexReader.open(Directory directory)
Returns a IndexReader reading the index in the given Directory, with readOnly=true.
static IndexReader IndexReader.open(Directory directory, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(Directory) instead
static IndexReader IndexReader.open(Directory directory, IndexDeletionPolicy deletionPolicy, boolean readOnly)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(Directory) instead
static IndexReader IndexReader.open(Directory directory, IndexDeletionPolicy deletionPolicy, boolean readOnly, int termInfosIndexDivisor)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexReader.open(Directory,int) instead
static IndexReader IndexReader.open(Directory directory, int termInfosIndexDivisor)
Expert: Returns a IndexReader reading the index in the given Director and given termInfosIndexDivisor
 void SegmentInfos.read(Directory directory)
This version of read uses the retry logic (for lock-less commits) to find the right segments file to load.
 void SegmentInfos.read(Directory directory, String segmentFileName)
Read a particular segmentFileName.
static long SegmentInfos.readCurrentVersion(Directory directory)
Deprecated. Load the SegmentInfos and then call SegmentInfos.getVersion().
static Map<String,String> PersistentSnapshotDeletionPolicy.readSnapshotsInfo(Directory dir)
Reads the snapshots information from the given Directory.
 String MergePolicy.OneMerge.segString(Directory dir)
 String MergePolicy.MergeSpecification.segString(Directory dir)
 void IndexSorter.sort(Directory input, Directory output, String field)
 void MultiPassIndexSplitter.split(IndexReader input, Directory[] outputs, boolean seq)
Deprecated. use MultiPassIndexSplitter.split(Version, IndexReader, Directory[], boolean) instead. This method will be removed in Lucene 4.0.
 void MultiPassIndexSplitter.split(Version version, IndexReader input, Directory[] outputs, boolean seq)
Split source index into multiple parts.
 String SegmentInfos.toString(Directory directory)
 String SegmentInfo.toString(Directory dir, int pendingDelCount)
Used for debugging.
static void IndexWriter.unlock(Directory directory)
Forcibly unlocks the index in the named directory.
 void FieldInfos.write(Directory d, String name)

Constructors in org.apache.lucene.index with parameters of type Directory
CheckIndex(Directory dir)
Create a new CheckIndex on the directory.
CompoundFileWriter(Directory dir, String name)
Create the compound stream in the specified file.
FieldInfos(Directory d, String name)
Construct a FieldInfos object using the directory and the name of the file IndexInput
FieldNormModifier(Directory d, Similarity s)
Deprecated. Constructor for code that wishes to use this class programmatically If Similarity is null, kill the field norms.
IndexUpgrader(Directory dir, IndexWriterConfig iwc, PrintStream infoStream, boolean deletePriorCommits)
Creates index upgrader on the given directory, using an IndexWriter using the given config.
IndexUpgrader(Directory dir, Version matchVersion)
Creates index upgrader on the given directory, using an IndexWriter using the given matchVersion.
IndexUpgrader(Directory dir, Version matchVersion, PrintStream infoStream, boolean deletePriorCommits)
Creates index upgrader on the given directory, using an IndexWriter using the given matchVersion.
IndexWriter(Directory d, Analyzer a, boolean create, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, boolean create, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl, IndexCommit commit)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, IndexWriterConfig conf)
Constructs a new IndexWriter per the settings given in conf.
MergePolicy.MergeException(String message, Directory dir)
MergePolicy.MergeException(Throwable exc, Directory dir)
PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir, IndexWriterConfig.OpenMode mode, Version matchVersion)
PersistentSnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting.
PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Filter docsInFirstIndex)
Deprecated. use PKIndexSplitter.PKIndexSplitter(Version, Directory, Directory, Directory, Filter) instead. This constructor will be removed in Lucene 4.0.
PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Filter docsInFirstIndex, IndexWriterConfig config1, IndexWriterConfig config2)
PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Term midTerm)
Deprecated. use PKIndexSplitter.PKIndexSplitter(Version, Directory, Directory, Directory, Term) instead. This constructor will be removed in Lucene 4.0.
PKIndexSplitter(Directory input, Directory dir1, Directory dir2, Term midTerm, IndexWriterConfig config1, IndexWriterConfig config2)
PKIndexSplitter(Version version, Directory input, Directory dir1, Directory dir2, Filter docsInFirstIndex)
Split an index based on a Filter.
PKIndexSplitter(Version version, Directory input, Directory dir1, Directory dir2, Term midTerm)
Split an index based on a given primary key term and a 'middle' term.
RandomIndexWriter(Random r, Directory dir)
create a RandomIndexWriter with a random config: Uses TEST_VERSION_CURRENT and Whitespace+LowercasingAnalyzer
RandomIndexWriter(Random r, Directory dir, Analyzer a)
create a RandomIndexWriter with a random config: Uses TEST_VERSION_CURRENT
RandomIndexWriter(Random r, Directory dir, IndexWriterConfig c)
create a RandomIndexWriter with the provided config
RandomIndexWriter(Random r, Directory dir, Version v, Analyzer a)
create a RandomIndexWriter with a random config
SegmentInfo(String name, int docCount, Directory dir, boolean isCompoundFile, boolean hasSingleNormFile, boolean hasProx, boolean hasVectors)
SegmentInfos.FindSegmentsFile(Directory directory)
SegmentWriteState(PrintStream infoStream, Directory directory, String segmentName, FieldInfos fieldInfos, int numDocs, int termIndexInterval, org.apache.lucene.index.BufferedDeletes segDeletes)

Uses of Directory in org.apache.lucene.misc

Methods in org.apache.lucene.misc with parameters of type Directory
static void GetTermInfo.getTermInfo(Directory dir, Term term)

Uses of Directory in org.apache.lucene.search

Fields in org.apache.lucene.search declared as Directory
protected static Directory SearchEquivalenceTestBase.directory

Methods in org.apache.lucene.search with parameters of type Directory
 long NRTManager.TrackingIndexWriter.addIndexes(Directory... dirs)

Constructors in org.apache.lucene.search with parameters of type Directory
IndexSearcher(Directory path)
Deprecated. use IndexSearcher.IndexSearcher(IndexReader) instead.
IndexSearcher(Directory path, boolean readOnly)
Deprecated. Use IndexSearcher.IndexSearcher(IndexReader) instead.
SearcherManager(Directory dir, SearcherFactory searcherFactory)
Creates and returns a new SearcherManager from the given Directory.

Uses of Directory in org.apache.lucene.search.spell

Methods in org.apache.lucene.search.spell with parameters of type Directory
 void SpellChecker.setSpellIndex(Directory spellIndexDir)
Use a different index as the spell checker index or re-open the existing index if spellIndex is the same value as given in the constructor.

Constructors in org.apache.lucene.search.spell with parameters of type Directory
SpellChecker(Directory spellIndex)
Use the given directory as a spell checker index with a LevensteinDistance as the default StringDistance.
SpellChecker(Directory spellIndex, StringDistance sd)
Use the given directory as a spell checker index.
SpellChecker(Directory spellIndex, StringDistance sd, Comparator<SuggestWord> comparator)
Use the given directory as a spell checker index with the given StringDistance measure and the given Comparator for sorting the results.

Uses of Directory in org.apache.lucene.store

Subclasses of Directory in org.apache.lucene.store
class | DirectIOLinuxDirectory An Directory implementation that uses the Linux-specific O_DIRECT flag to bypass all OS level caching.
class | FileSwitchDirectory Expert: A Directory instance that switches files between two other Directory instances.
class | FSDirectory Base class for Directory implementations that store index files in the file system.
class | MMapDirectory File-based Directory implementation that uses mmap for reading, and FSDirectory.FSIndexOutput for writing.
class | MockDirectoryWrapper This is a Directory Wrapper that adds methods intended to be used only by unit tests.
class | NIOFSDirectory An FSDirectory implementation that uses java.nio's FileChannel's positional read, which allows multiple threads to read from the same file without synchronizing.
class | NRTCachingDirectory Wraps a RAMDirectory around any provided delegate directory, to be used during NRT search.
class | RAMDirectory A memory-resident Directory implementation.
class | SimpleFSDirectory A straightforward implementation of FSDirectory using java.io.RandomAccessFile.
class | WindowsDirectory Native Directory implementation for Microsoft Windows.

Methods in org.apache.lucene.store that return Directory
Directory | FileSwitchDirectory.getPrimaryDir() Return the primary directory
Directory | FileSwitchDirectory.getSecondaryDir() Return the secondary directory

Methods in org.apache.lucene.store with parameters of type Directory
static void Directory.copy(Directory src, Directory dest, boolean closeDirSrc)
Deprecated. should be replaced with calls to copy(Directory, String, String) for every file that needs copying. You can use the following code:
 IndexFileNameFilter filter = IndexFileNameFilter.getFilter();
 for (String file : src.listAll()) {
   if (filter.accept(null, file)) {
     src.copy(dest, file, file);
   }
 }
 void MockDirectoryWrapper.copy(Directory to, String src, String dest)
 void Directory.copy(Directory to, String src, String dest)
Copies the file src to Directory to under the new file name dest.

Constructors in org.apache.lucene.store with parameters of type Directory
FileSwitchDirectory(Set<String> primaryExtensions, Directory primaryDir, Directory secondaryDir, boolean doClose)
MockDirectoryWrapper(Random random, Directory delegate)
NRTCachingDirectory(Directory delegate, double maxMergeSizeMB, double maxCachedMB)
We will cache a newly created output if 1) it's a flush or a merge and the estimated size of the merged segment is <= maxMergeSizeMB, and 2) the total cached bytes is <= maxCachedMB
RAMDirectory(Directory dir)
Creates a new RAMDirectory instance from a different Directory implementation.

Uses of Directory in org.apache.lucene.store.instantiated

Methods in org.apache.lucene.store.instantiated that return Directory
 Directory InstantiatedIndexReader.directory()
Deprecated.

Uses of Directory in org.apache.lucene.util

Methods in org.apache.lucene.util that return types with arguments of type Directory
static Class<? extends Directory> CommandLineUtil.loadDirectoryClass(String clazzName)
Loads a specific Directory implementation

Methods in org.apache.lucene.util with parameters of type Directory
static boolean _TestUtil.anyFilesExceptWriteLock(Directory dir)
static CheckIndex.Status _TestUtil.checkIndex(Directory dir)
This runs the CheckIndex tool on the index in.
static MockDirectoryWrapper LuceneTestCase.newDirectory(Directory d)
Returns a new Directory instance, with contents copied from the provided directory.
static MockDirectoryWrapper LuceneTestCase.newDirectory(Random r, Directory d)
Returns a new Directory instance, using the specified random with contents copied from the provided directory.
 void BitVector.write(Directory d, String name)
Writes this vector to the file name in Directory d, in a format that can be read by the constructor BitVector.BitVector(Directory, String).

Constructors in org.apache.lucene.util with parameters of type Directory
BitVector(Directory d, String name)
Constructs a bit vector from the file name in Directory d, as written by the BitVector.write(org.apache.lucene.store.Directory, java.lang.String) method.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.FileSwitchDirectory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.FileSwitchDirectory

No usage of org.apache.lucene.store.FileSwitchDirectory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.FSDirectory.FSIndexOutput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.FSDirectory.FSIndexOutput

Packages that use FSDirectory.FSIndexOutput
org.apache.lucene.store Binary i/o API, used for all index data.

Uses of FSDirectory.FSIndexOutput in org.apache.lucene.store

Methods in org.apache.lucene.store with parameters of type FSDirectory.FSIndexOutput
protected  void FSDirectory.onIndexOutputClosed(FSDirectory.FSIndexOutput io)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.FSDirectory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.FSDirectory

Packages that use FSDirectory
org.apache.lucene.store | Binary i/o API, used for all index data.
org.apache.lucene.util | Some utility classes.

Uses of FSDirectory in org.apache.lucene.store

Subclasses of FSDirectory in org.apache.lucene.store
class | DirectIOLinuxDirectory An Directory implementation that uses the Linux-specific O_DIRECT flag to bypass all OS level caching.
class | MMapDirectory File-based Directory implementation that uses mmap for reading, and FSDirectory.FSIndexOutput for writing.
class | NIOFSDirectory An FSDirectory implementation that uses java.nio's FileChannel's positional read, which allows multiple threads to read from the same file without synchronizing.
class | SimpleFSDirectory A straightforward implementation of FSDirectory using java.io.RandomAccessFile.
class | WindowsDirectory Native Directory implementation for Microsoft Windows.

Methods in org.apache.lucene.store that return FSDirectory
static FSDirectory | FSDirectory.open(File path) Creates an FSDirectory instance, trying to pick the best implementation given the current environment.
static FSDirectory | FSDirectory.open(File path, LockFactory lockFactory) Just like open(File), but allows you to also specify a custom LockFactory.

Constructors in org.apache.lucene.store with parameters of type FSDirectory
FSDirectory.FSIndexOutput(FSDirectory parent, String name)

Uses of FSDirectory in org.apache.lucene.util

Methods in org.apache.lucene.util that return FSDirectory
static FSDirectory | CommandLineUtil.newFSDirectory(Class<? extends FSDirectory> clazz, File file) Creates a new specific FSDirectory instance
static FSDirectory | CommandLineUtil.newFSDirectory(String clazzName, File file) Creates a specific FSDirectory instance starting from its class name

Methods in org.apache.lucene.util that return types with arguments of type FSDirectory
static Class<? extends FSDirectory> CommandLineUtil.loadFSDirectoryClass(String clazzName)
Loads a specific FSDirectory implementation

Method parameters in org.apache.lucene.util with type arguments of type FSDirectory
static FSDirectory CommandLineUtil.newFSDirectory(Class<? extends FSDirectory> clazz, File file)
Creates a new specific FSDirectory instance

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.FSLockFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.FSLockFactory

Packages that use FSLockFactory
org.apache.lucene.store Binary i/o API, used for all index data.

Uses of FSLockFactory in org.apache.lucene.store

Subclasses of FSLockFactory in org.apache.lucene.store
class | NativeFSLockFactory Implements LockFactory using native OS file locks.
class | SimpleFSLockFactory Implements LockFactory using File.createNewFile().

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.IndexInput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.IndexInput

Packages that use IndexInput
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.store | Binary i/o API, used for all index data.
org.apache.lucene.util | Some utility classes.

Uses of IndexInput in org.apache.lucene.index

Subclasses of IndexInput in org.apache.lucene.index
 class MockIndexInput
IndexInput backed by a byte[] for testing.

Uses of IndexInput in org.apache.lucene.store

Subclasses of IndexInput in org.apache.lucene.store
class | BufferedIndexInput Base implementation class for buffered IndexInput.
class | ChecksumIndexInput Writes bytes through to a primary IndexOutput, computing checksum as it goes.
class | MockIndexInputWrapper Used by MockDirectoryWrapper to create an input stream that keeps track of when it's been closed.
protected static class | NIOFSDirectory.NIOFSIndexInput
class | RAMInputStream A memory-resident IndexInput implementation.
protected static class | SimpleFSDirectory.SimpleFSIndexInput
protected static class | WindowsDirectory.WindowsIndexInput

Methods in org.apache.lucene.store that return IndexInput
IndexInput | MockDirectoryWrapper.openInput(String name)
abstract IndexInput | Directory.openInput(String name) Returns a stream reading an existing file.
IndexInput | NRTCachingDirectory.openInput(String name)
IndexInput | FileSwitchDirectory.openInput(String name)
IndexInput | FSDirectory.openInput(String name)
IndexInput | RAMDirectory.openInput(String name) Returns a stream reading an existing file.
IndexInput | WindowsDirectory.openInput(String name, int bufferSize)
IndexInput | DirectIOLinuxDirectory.openInput(String name, int bufferSize)
IndexInput | Directory.openInput(String name, int bufferSize) Returns a stream reading an existing file, with the specified read buffer size.
IndexInput | NRTCachingDirectory.openInput(String name, int bufferSize)
IndexInput | NIOFSDirectory.openInput(String name, int bufferSize) Creates an IndexInput for the file with the given name.
IndexInput | MMapDirectory.openInput(String name, int bufferSize) Creates an IndexInput for the file with the given name.
IndexInput | SimpleFSDirectory.openInput(String name, int bufferSize) Creates an IndexInput for the file with the given name.

Methods in org.apache.lucene.store with parameters of type IndexInput
static boolean | _TestHelper.isSimpleFSIndexInput(IndexInput is) Returns true if the instance of the provided input stream is actually an SimpleFSIndexInput.
static boolean | _TestHelper.isSimpleFSIndexInputClone(IndexInput is) Returns true if the provided input stream is an SimpleFSIndexInput and is a clone, that is it does not own its underlying file descriptor.
static boolean | _TestHelper.isSimpleFSIndexInputOpen(IndexInput is) Given an instance of SimpleFSDirectory.SimpleFSIndexInput, this method returns true if the underlying file descriptor is valid, and false otherwise.
void | MockDirectoryWrapper.removeIndexInput(IndexInput in, String name)

Constructors in org.apache.lucene.store with parameters of type IndexInput
ChecksumIndexInput(IndexInput main)
MockIndexInputWrapper(MockDirectoryWrapper dir, String name, IndexInput delegate)
Construct an empty output buffer.

Uses of IndexInput in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type IndexInput
 void PagedBytes.copy(IndexInput in, long byteCount)
Read this many bytes from in

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.IndexOutput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.IndexOutput

Packages that use IndexOutput
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.store | Binary i/o API, used for all index data.
org.apache.lucene.util | Some utility classes.

Uses of IndexOutput in org.apache.lucene.index

Methods in org.apache.lucene.index with parameters of type IndexOutput
 void FieldInfos.write(IndexOutput output)

Uses of IndexOutput in org.apache.lucene.store

Subclasses of IndexOutput in org.apache.lucene.store
class | BufferedIndexOutput Base implementation class for buffered IndexOutput.
class | ChecksumIndexOutput Writes bytes through to a primary IndexOutput, computing checksum.
protected static class | FSDirectory.FSIndexOutput
class | MockIndexOutputWrapper Used by MockRAMDirectory to create an output stream that will throw an IOException on fake disk full, track max disk space actually used, and maybe throw random IOExceptions.
class | RAMOutputStream A memory-resident IndexOutput implementation.

Methods in org.apache.lucene.store that return IndexOutput
IndexOutput | DirectIOLinuxDirectory.createOutput(String name)
IndexOutput | MockDirectoryWrapper.createOutput(String name)
abstract IndexOutput | Directory.createOutput(String name) Creates a new, empty file in the directory with the given name.
IndexOutput | NRTCachingDirectory.createOutput(String name)
IndexOutput | FileSwitchDirectory.createOutput(String name)
IndexOutput | FSDirectory.createOutput(String name) Creates an IndexOutput for the file with the given name.
IndexOutput | RAMDirectory.createOutput(String name) Creates a new, empty file in the directory with the given name.

Methods in org.apache.lucene.store with parameters of type IndexOutput
void | MockIndexInputWrapper.copyBytes(IndexOutput out, long numBytes)
void | RAMInputStream.copyBytes(IndexOutput out, long numBytes)
void | BufferedIndexInput.copyBytes(IndexOutput out, long numBytes)
void | IndexInput.copyBytes(IndexOutput out, long numBytes) Copies numBytes bytes to the given IndexOutput.
void | SimpleFSDirectory.SimpleFSIndexInput.copyBytes(IndexOutput out, long numBytes)
protected int | BufferedIndexInput.flushBuffer(IndexOutput out, long numBytes) Flushes the in-memory bufer to the given output, copying at most numBytes.
void | MockDirectoryWrapper.removeIndexOutput(IndexOutput out, String name)
void | RAMOutputStream.writeTo(IndexOutput out) Copy the current contents of this buffer to the named output.

Constructors in org.apache.lucene.store with parameters of type IndexOutput
ChecksumIndexOutput(IndexOutput main)
MockIndexOutputWrapper(MockDirectoryWrapper dir, IndexOutput delegate, String name)
Construct an empty output buffer.

Uses of IndexOutput in org.apache.lucene.util

Subclasses of IndexOutput in org.apache.lucene.util
 class ThrottledIndexOutput
Intentionally slow IndexOutput for testing.

Methods in org.apache.lucene.util with parameters of type IndexOutput
 ThrottledIndexOutput ThrottledIndexOutput.newFromDelegate(IndexOutput output)

Constructors in org.apache.lucene.util with parameters of type IndexOutput
ThrottledIndexOutput(int bytesPerSecond, long delayInMillis, IndexOutput delegate)
ThrottledIndexOutput(int bytesPerSecond, long delays, int minBytesWritten, IndexOutput delegate)
ThrottledIndexOutput(int bytesPerSecond, long flushDelayMillis, long closeDelayMillis, long seekDelayMillis, long minBytesWritten, IndexOutput delegate)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.InputStreamDataInput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.InputStreamDataInput

No usage of org.apache.lucene.store.InputStreamDataInput

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.Lock

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.Lock

Packages that use Lock
org.apache.lucene.store Binary i/o API, used for all index data.

Uses of Lock in org.apache.lucene.store

Methods in org.apache.lucene.store that return Lock
Lock | MockDirectoryWrapper.makeLock(String name)
Lock | MockLockFactoryWrapper.makeLock(String lockName)
Lock | SimpleFSLockFactory.makeLock(String lockName)
Lock | Directory.makeLock(String name) Construct a Lock.
Lock | VerifyingLockFactory.makeLock(String lockName)
Lock | NRTCachingDirectory.makeLock(String name)
Lock | NativeFSLockFactory.makeLock(String lockName)
abstract Lock | LockFactory.makeLock(String lockName) Return a new Lock instance identified by lockName.
Lock | NoLockFactory.makeLock(String lockName)
Lock | SingleInstanceLockFactory.makeLock(String lockName)

Constructors in org.apache.lucene.store with parameters of type Lock
Lock.With(Lock lock, long lockWaitTimeout)
Constructs an executor that will grab the named lock.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.Lock.With

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.Lock.With

No usage of org.apache.lucene.store.Lock.With

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.LockFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.LockFactory

Packages that use LockFactory
org.apache.lucene.store | Binary i/o API, used for all index data.
org.apache.lucene.util | Some utility classes.

Uses of LockFactory in org.apache.lucene.store

Subclasses of LockFactory in org.apache.lucene.store
class | FSLockFactory Base class for file system based locking implementation.
class | MockLockFactoryWrapper Used by MockDirectoryWrapper to wrap another factory and track open locks.
class | NativeFSLockFactory Implements LockFactory using native OS file locks.
class | NoLockFactory Use this LockFactory to disable locking entirely.
class | SimpleFSLockFactory Implements LockFactory using File.createNewFile().
class | SingleInstanceLockFactory Implements LockFactory for a single in-process instance, meaning all locking will take place through this one instance.
class | VerifyingLockFactory A LockFactory that wraps another LockFactory and verifies that each lock obtain/release is "correct" (never results in two processes holding the lock at the same time).

Fields in org.apache.lucene.store declared as LockFactory
protected  LockFactory Directory.lockFactory
Holds the LockFactory instance (implements locking for this Directory instance).

Methods in org.apache.lucene.store that return LockFactory
LockFactory | MockDirectoryWrapper.getLockFactory()
LockFactory | Directory.getLockFactory() Get the LockFactory that this Directory instance is using for its locking implementation.
LockFactory | NRTCachingDirectory.getLockFactory()

Methods in org.apache.lucene.store with parameters of type LockFactory
static FSDirectory FSDirectory.open(File path, LockFactory lockFactory)
Just like FSDirectory.open(File), but allows you to also specify a custom LockFactory.
 void MockDirectoryWrapper.setLockFactory(LockFactory lockFactory)
 void Directory.setLockFactory(LockFactory lockFactory)
Set the LockFactory that this Directory instance should use for its locking implementation.
 void NRTCachingDirectory.setLockFactory(LockFactory lf)
 void FSDirectory.setLockFactory(LockFactory lockFactory)

Constructors in org.apache.lucene.store with parameters of type LockFactory
DirectIOLinuxDirectory(File path, LockFactory lockFactory, int forcedBufferSize)
Create a new NIOFSDirectory for the named location.
FSDirectory(File path, LockFactory lockFactory)
Create a new FSDirectory for the named location (ctor for subclasses).
MMapDirectory(File path, LockFactory lockFactory)
Create a new MMapDirectory for the named location.
MockLockFactoryWrapper(MockDirectoryWrapper dir, LockFactory delegate)
NIOFSDirectory(File path, LockFactory lockFactory)
Create a new NIOFSDirectory for the named location.
SimpleFSDirectory(File path, LockFactory lockFactory)
Create a new SimpleFSDirectory for the named location.
VerifyingLockFactory(byte id, LockFactory lf, String host, int port)
WindowsDirectory(File path, LockFactory lockFactory)
Create a new WindowsDirectory for the named location.

Uses of LockFactory in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type LockFactory
static MockDirectoryWrapper LuceneTestCase.newFSDirectory(File f, LockFactory lf)
Returns a new FSDirectory instance over the given file, which must be a folder.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.LockObtainFailedException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.LockObtainFailedException

Packages that use LockObtainFailedException
org.apache.lucene.benchmark.byTask.tasks | Extendable benchmark tasks.
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.store | Binary i/o API, used for all index data.

Uses of LockObtainFailedException in org.apache.lucene.benchmark.byTask.tasks

Methods in org.apache.lucene.benchmark.byTask.tasks that throw LockObtainFailedException
static IndexWriter CreateIndexTask.configureWriter(Config config, PerfRunData runData, IndexWriterConfig.OpenMode mode, IndexCommit commit)

Uses of LockObtainFailedException in org.apache.lucene.facet.taxonomy.directory

Constructors in org.apache.lucene.facet.taxonomy.directory that throw LockObtainFailedException
DirectoryTaxonomyWriter(Directory d)
DirectoryTaxonomyWriter(Directory directory, IndexWriterConfig.OpenMode openMode)
Creates a new instance with a default cached as defined by DirectoryTaxonomyWriter.defaultTaxonomyWriterCache().

Uses of LockObtainFailedException in org.apache.lucene.index

Methods in org.apache.lucene.index that throw LockObtainFailedException
 void IndexReader.deleteDocument(int docNum)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
 int IndexReader.deleteDocuments(Term term)
Deprecated. Write support will be removed in Lucene 4.0. Use IndexWriter.deleteDocuments(Term) instead
 void IndexReader.setNorm(int doc, String field, byte value)
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
 void IndexReader.setNorm(int doc, String field, float value)
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.
 void IndexReader.undeleteAll()
Deprecated. Write support will be removed in Lucene 4.0. There will be no replacement for this method.

Constructors in org.apache.lucene.index that throw LockObtainFailedException
IndexWriter(Directory d, Analyzer a, boolean create, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, boolean create, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexDeletionPolicy deletionPolicy, IndexWriter.MaxFieldLength mfl, IndexCommit commit)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, Analyzer a, IndexWriter.MaxFieldLength mfl)
Deprecated. use IndexWriter.IndexWriter(Directory, IndexWriterConfig) instead
IndexWriter(Directory d, IndexWriterConfig conf)
Constructs a new IndexWriter per the settings given in conf.
PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir, IndexWriterConfig.OpenMode mode, Version matchVersion)
PersistentSnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting.

Uses of LockObtainFailedException in org.apache.lucene.store

Methods in org.apache.lucene.store that throw LockObtainFailedException
 boolean Lock.obtain(long lockWaitTimeout)
Attempts to obtain an exclusive lock within amount of time given.
 Object Lock.With.run()
Calls Lock.With.doBody() while lock is obtained.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.LockReleaseFailedException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.LockReleaseFailedException

No usage of org.apache.lucene.store.LockReleaseFailedException

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.LockStressTest

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.LockStressTest

No usage of org.apache.lucene.store.LockStressTest

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.LockVerifyServer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.LockVerifyServer

No usage of org.apache.lucene.store.LockVerifyServer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.MMapDirectory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.MMapDirectory

No usage of org.apache.lucene.store.MMapDirectory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.MockDirectoryWrapper.Failure

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.MockDirectoryWrapper.Failure

Packages that use MockDirectoryWrapper.Failure
org.apache.lucene.store Binary i/o API, used for all index data.

Uses of MockDirectoryWrapper.Failure in org.apache.lucene.store

Methods in org.apache.lucene.store that return MockDirectoryWrapper.Failure
 MockDirectoryWrapper.Failure MockDirectoryWrapper.Failure.reset()
reset should set the state of the failure to its default (freshly constructed) state.

Methods in org.apache.lucene.store with parameters of type MockDirectoryWrapper.Failure
 void MockDirectoryWrapper.failOn(MockDirectoryWrapper.Failure fail)
add a Failure object to the list of objects to be evaluated at every potential failure point

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.MockDirectoryWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.MockDirectoryWrapper

Packages that use MockDirectoryWrapper
org.apache.lucene.store | Binary i/o API, used for all index data.
org.apache.lucene.util | Some utility classes.

Uses of MockDirectoryWrapper in org.apache.lucene.store

Methods in org.apache.lucene.store with parameters of type MockDirectoryWrapper
 void MockDirectoryWrapper.Failure.eval(MockDirectoryWrapper dir)
eval is called on the first write of every new file.

Constructors in org.apache.lucene.store with parameters of type MockDirectoryWrapper
MockIndexInputWrapper(MockDirectoryWrapper dir, String name, IndexInput delegate)
Construct an empty output buffer.
MockIndexOutputWrapper(MockDirectoryWrapper dir, IndexOutput delegate, String name)
Construct an empty output buffer.
MockLockFactoryWrapper(MockDirectoryWrapper dir, LockFactory delegate)

Uses of MockDirectoryWrapper in org.apache.lucene.util

Fields in org.apache.lucene.util with type parameters of type MockDirectoryWrapper
protected static Map<MockDirectoryWrapper,StackTraceElement[]> LuceneTestCase.stores

Methods in org.apache.lucene.util that return MockDirectoryWrapper
static MockDirectoryWrapper | LuceneTestCase.newDirectory() Returns a new Directory instance.
static MockDirectoryWrapper | LuceneTestCase.newDirectory(Directory d) Returns a new Directory instance, with contents copied from the provided directory.
static MockDirectoryWrapper | LuceneTestCase.newDirectory(Random r) Returns a new Directory instance, using the specified random.
static MockDirectoryWrapper | LuceneTestCase.newDirectory(Random r, Directory d) Returns a new Directory instance, using the specified random with contents copied from the provided directory.
static MockDirectoryWrapper | LuceneTestCase.newFSDirectory(File f) Returns a new FSDirectory instance over the given file, which must be a folder.
static MockDirectoryWrapper | LuceneTestCase.newFSDirectory(File f, LockFactory lf) Returns a new FSDirectory instance over the given file, which must be a folder.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.MockDirectoryWrapper.Throttling

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.MockDirectoryWrapper.Throttling

Packages that use MockDirectoryWrapper.Throttling
org.apache.lucene.store Binary i/o API, used for all index data.

Uses of MockDirectoryWrapper.Throttling in org.apache.lucene.store

Methods in org.apache.lucene.store that return MockDirectoryWrapper.Throttling
static MockDirectoryWrapper.Throttling | MockDirectoryWrapper.Throttling.valueOf(String name) Returns the enum constant of this type with the specified name.
static MockDirectoryWrapper.Throttling[] | MockDirectoryWrapper.Throttling.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.store with parameters of type MockDirectoryWrapper.Throttling
 void MockDirectoryWrapper.setThrottling(MockDirectoryWrapper.Throttling throttling)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.MockIndexInputWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.MockIndexInputWrapper

No usage of org.apache.lucene.store.MockIndexInputWrapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.MockIndexOutputWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.MockIndexOutputWrapper

No usage of org.apache.lucene.store.MockIndexOutputWrapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.MockLockFactoryWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.MockLockFactoryWrapper

No usage of org.apache.lucene.store.MockLockFactoryWrapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.NativeFSLockFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.NativeFSLockFactory

No usage of org.apache.lucene.store.NativeFSLockFactory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.NativePosixUtil

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.NativePosixUtil

No usage of org.apache.lucene.store.NativePosixUtil

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.NIOFSDirectory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.NIOFSDirectory

No usage of org.apache.lucene.store.NIOFSDirectory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.NIOFSDirectory.NIOFSIndexInput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.NIOFSDirectory.NIOFSIndexInput

No usage of org.apache.lucene.store.NIOFSDirectory.NIOFSIndexInput

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.NoLockFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.NoLockFactory

Packages that use NoLockFactory
org.apache.lucene.store Binary i/o API, used for all index data.

Uses of NoLockFactory in org.apache.lucene.store

Methods in org.apache.lucene.store that return NoLockFactory
static NoLockFactory NoLockFactory.getNoLockFactory()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.NoSuchDirectoryException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.NoSuchDirectoryException

No usage of org.apache.lucene.store.NoSuchDirectoryException

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.NRTCachingDirectory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.NRTCachingDirectory

No usage of org.apache.lucene.store.NRTCachingDirectory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.OutputStreamDataOutput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.OutputStreamDataOutput

No usage of org.apache.lucene.store.OutputStreamDataOutput

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.RAMDirectory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.RAMDirectory

No usage of org.apache.lucene.store.RAMDirectory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.RAMFile

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.RAMFile

Packages that use RAMFile
org.apache.lucene.store Binary i/o API, used for all index data.

Uses of RAMFile in org.apache.lucene.store

Fields in org.apache.lucene.store with type parameters of type RAMFile
protected  Map<String,RAMFile> RAMDirectory.fileMap

Methods in org.apache.lucene.store that return RAMFile
protected  RAMFile RAMDirectory.newRAMFile()
Returns a new RAMFile for storing data.

Constructors in org.apache.lucene.store with parameters of type RAMFile
RAMInputStream(RAMFile f)
Deprecated.
RAMInputStream(String name, RAMFile f)
RAMOutputStream(RAMFile f)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.RAMInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.RAMInputStream

No usage of org.apache.lucene.store.RAMInputStream

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.RAMOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.RAMOutputStream

No usage of org.apache.lucene.store.RAMOutputStream

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.SimpleFSDirectory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.SimpleFSDirectory

No usage of org.apache.lucene.store.SimpleFSDirectory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput.Descriptor

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput.Descriptor

Packages that use SimpleFSDirectory.SimpleFSIndexInput.Descriptor
org.apache.lucene.store Binary i/o API, used for all index data.

Uses of SimpleFSDirectory.SimpleFSIndexInput.Descriptor in org.apache.lucene.store

Fields in org.apache.lucene.store declared as SimpleFSDirectory.SimpleFSIndexInput.Descriptor
protected  SimpleFSDirectory.SimpleFSIndexInput.Descriptor SimpleFSDirectory.SimpleFSIndexInput.file

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.SimpleFSDirectory.SimpleFSIndexInput

Packages that use SimpleFSDirectory.SimpleFSIndexInput
org.apache.lucene.store Binary i/o API, used for all index data.

Uses of SimpleFSDirectory.SimpleFSIndexInput in org.apache.lucene.store

Subclasses of SimpleFSDirectory.SimpleFSIndexInput in org.apache.lucene.store
protected static class NIOFSDirectory.NIOFSIndexInput

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.SimpleFSLockFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.SimpleFSLockFactory

No usage of org.apache.lucene.store.SimpleFSLockFactory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.SingleInstanceLockFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.SingleInstanceLockFactory

No usage of org.apache.lucene.store.SingleInstanceLockFactory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.VerifyingLockFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.VerifyingLockFactory

No usage of org.apache.lucene.store.VerifyingLockFactory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.WindowsDirectory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.WindowsDirectory

No usage of org.apache.lucene.store.WindowsDirectory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.WindowsDirectory.WindowsIndexInput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.WindowsDirectory.WindowsIndexInput

No usage of org.apache.lucene.store.WindowsDirectory.WindowsIndexInput

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


InstantiatedDocument

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store.instantiated
Class InstantiatedDocument

java.lang.Object
    extended by  org.apache.lucene.store.instantiated.InstantiatedDocument
All Implemented Interfaces:
Serializable
public class InstantiatedDocument
extends Object
implements Serializable

A document in the instantiated index object graph, optionally coupled to the vector space view.

See Also:
Document, Serialized Form

Constructor Summary
InstantiatedDocument()
InstantiatedDocument(Document document)
Method Summary
Document | getDocument()
Integer | getDocumentNumber()
Map<String,List<InstantiatedTermDocumentInformation>> | getVectorSpace()
void | setVectorSpace(Map<String,List<InstantiatedTermDocumentInformation>> vectorSpace)
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InstantiatedDocument

public InstantiatedDocument()

InstantiatedDocument

public InstantiatedDocument(Document document)
Method Detail

getDocumentNumber

public Integer getDocumentNumber()
Returns:
position of document in the index.

getVectorSpace

public Map<String,List<InstantiatedTermDocumentInformation>> getVectorSpace()

setVectorSpace

public void setVectorSpace(Map<String,List<InstantiatedTermDocumentInformation>> vectorSpace)

getDocument

public Document getDocument()

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


InstantiatedIndex

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store.instantiated
Class InstantiatedIndex

java.lang.Object
    extended by  org.apache.lucene.store.instantiated.InstantiatedIndex
All Implemented Interfaces:
Closeable, Serializable
Deprecated. contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM

@Deprecated
public class InstantiatedIndex
extends Object
implements Serializable, Closeable

Represented as a coupled graph of class instances, this all-in-memory index store implementation delivers search results up to a 100 times faster than the file-centric RAMDirectory at the cost of greater RAM consumption.

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

There are no read and write locks in this store. InstantiatedIndexReader InstantiatedIndexReader.isCurrent() all the time and InstantiatedIndexWriter will attempt to update instances of the object graph in memory at the same time as a searcher is reading from it. Consider using InstantiatedIndex as if it was immutable.

Constructor Summary
InstantiatedIndex()
Deprecated. Creates an empty instantiated index for you to fill with data using an InstantiatedIndexWriter.
InstantiatedIndex(IndexReader sourceIndexReader)
Deprecated. Creates a new instantiated index that looks just like the index in a specific state as represented by a reader.
InstantiatedIndex(IndexReader sourceIndexReader, Set<String> fields)
Deprecated. Creates a new instantiated index that looks just like the index in a specific state as represented by a reader.
Method Summary
void | close() Deprecated.
BitVector | getDeletedDocuments() Deprecated.
InstantiatedDocument[] | getDocumentsByNumber() Deprecated.
FieldInfos | getFieldInfos() Deprecated.
Map<String,byte[]> | getNormsByFieldNameAndDocumentNumber() Deprecated.
InstantiatedTerm[] | getOrderedTerms() Deprecated.
Map<String,Map<String,InstantiatedTerm>> | getTermsByFieldAndText() Deprecated.
long | getVersion() Deprecated.
InstantiatedIndexReader | indexReaderFactory() Deprecated.
InstantiatedIndexWriter | indexWriterFactory(Analyzer analyzer, boolean create) Deprecated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InstantiatedIndex

public InstantiatedIndex()
Deprecated.
Creates an empty instantiated index for you to fill with data using an InstantiatedIndexWriter.

InstantiatedIndex

public InstantiatedIndex(IndexReader sourceIndexReader)
                  throws IOException
Deprecated.
Creates a new instantiated index that looks just like the index in a specific state as represented by a reader.

Parameters:
sourceIndexReader - the source index this new instantiated index will be copied from.
Throws:
IOException - if the source index is not single-segment, or when accessing the source.

InstantiatedIndex

public InstantiatedIndex(IndexReader sourceIndexReader,
                         Set<String> fields)
                  throws IOException
Deprecated.
Creates a new instantiated index that looks just like the index in a specific state as represented by a reader.

Parameters:
sourceIndexReader - the source index this new instantiated index will be copied from.
fields - fields to be added, or null for all
Throws:
IOException - if the source index is not single-segment, or when accessing the source.
Method Detail

getFieldInfos

public FieldInfos getFieldInfos()
Deprecated.

indexWriterFactory

public InstantiatedIndexWriter indexWriterFactory(Analyzer analyzer,
                                                  boolean create)
                                           throws IOException
Deprecated.
Throws:
IOException

indexReaderFactory

public InstantiatedIndexReader indexReaderFactory()
                                           throws IOException
Deprecated.
Throws:
IOException

close

public void close()
           throws IOException
Deprecated.
Specified by:
close in interface Closeable
Throws:
IOException

getTermsByFieldAndText

public Map<String,Map<String,InstantiatedTerm>> getTermsByFieldAndText()
Deprecated.

getOrderedTerms

public InstantiatedTerm[] getOrderedTerms()
Deprecated.

getDocumentsByNumber

public InstantiatedDocument[] getDocumentsByNumber()
Deprecated.

getNormsByFieldNameAndDocumentNumber

public Map<String,byte[]> getNormsByFieldNameAndDocumentNumber()
Deprecated.

getDeletedDocuments

public BitVector getDeletedDocuments()
Deprecated.

getVersion

public long getVersion()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InstantiatedIndexReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store.instantiated
Class InstantiatedIndexReader

java.lang.Object
    extended by  org.apache.lucene.index.IndexReader
        extended by  org.apache.lucene.store.instantiated.InstantiatedIndexReader
All Implemented Interfaces:
Closeable, Cloneable
Deprecated. contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM

@Deprecated
public class InstantiatedIndexReader
extends IndexReader

An InstantiatedIndexReader is not a snapshot in time, it is completely in sync with the latest commit to the store!

Consider using InstantiatedIndex as if it was immutable.

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.index.IndexReader
IndexReader.ReaderClosedListener
Field Summary
Fields inherited from class org.apache.lucene.index.IndexReader
hasChanges
Constructor Summary
InstantiatedIndexReader(InstantiatedIndex index)
Deprecated.
Method Summary
 Directory directory()
Deprecated. Returns the directory associated with this index.
 int docFreq(Term t)
Deprecated. Returns the number of documents containing the term t.
protected  void doClose()
Deprecated. Implements close.
protected  void doCommit(Map<String,String> commitUserData)
Deprecated. Implements commit.
 Document document(int n, FieldSelector fieldSelector)
Deprecated. Return the Document at the nth position.
protected  void doDelete(int docNum)
Deprecated. Implements deletion of the document numbered docNum.
protected  void doSetNorm(int doc, String field, byte value)
Deprecated. Implements setNorm in subclass.
protected  void doUndeleteAll()
Deprecated. Implements actual undeleteAll() in subclass.
 FieldInfos getFieldInfos()
Deprecated. Get the FieldInfos describing all fields in this reader.
 InstantiatedIndex getIndex()
Deprecated.
 TermFreqVector getTermFreqVector(int docNumber, String field)
Deprecated. Return a term frequency vector for the specified document and field.
 void getTermFreqVector(int docNumber, String field, TermVectorMapper mapper)
Deprecated. Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the TermFreqVector.
 void getTermFreqVector(int docNumber, TermVectorMapper mapper)
Deprecated. Map all the term vectors for all fields in a Document
 TermFreqVector[] getTermFreqVectors(int docNumber)
Deprecated. Return an array of term frequency vectors for the specified document.
 long getVersion()
Deprecated. An InstantiatedIndexReader is not a snapshot in time, it is completely in sync with the latest commit to the store!
 boolean hasDeletions()
Deprecated. Returns true if any documents have been deleted
 boolean isCurrent()
Deprecated. An InstantiatedIndexReader is always current! Check whether this IndexReader is still using the current (i.e., most recently committed) version of the index.
 boolean isDeleted(int n)
Deprecated. Returns true if document n has been deleted
 boolean isOptimized()
Deprecated.
 int maxDoc()
Deprecated. Returns one greater than the largest possible document number.
 byte[] norms(String field)
Deprecated. never ever touch these values.
 void norms(String field, byte[] bytes, int offset)
Deprecated. Reads the byte-encoded normalization factor for the named field of every document.
 int numDocs()
Deprecated. Returns the number of documents in this index.
 TermDocs termDocs()
Deprecated. Returns an unpositioned TermDocs enumerator.
 TermDocs termDocs(Term term)
Deprecated. Returns an enumeration of all the documents which contain term.
 TermPositions termPositions()
Deprecated. Returns an unpositioned TermPositions enumerator.
 TermEnum terms()
Deprecated. Returns an enumeration of all the terms in the index.
 TermEnum terms(Term t)
Deprecated. Returns an enumeration of all terms starting at a given term.
Methods inherited from class org.apache.lucene.index.IndexReader
acquireWriteLock, addReaderClosedListener, clone, clone, close, commit, commit, decRef, deleteDocument, deleteDocuments, document, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, doOpenIfChanged, ensureOpen, flush, flush, getCommitUserData, getCommitUserData, getCoreCacheKey, getCurrentVersion, getDeletesCacheKey, getIndexCommit, getRefCount, getSequentialSubReaders, getTermInfosIndexDivisor, getUniqueTermCount, hasNorms, incRef, indexExists, lastModified, listCommits, numDeletedDocs, open, open, open, open, open, open, open, open, open, open, open, openIfChanged, openIfChanged, openIfChanged, openIfChanged, removeReaderClosedListener, reopen, reopen, reopen, reopen, setNorm, setNorm, termPositions, toString, tryIncRef, undeleteAll
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InstantiatedIndexReader

public InstantiatedIndexReader(InstantiatedIndex index)
Deprecated.
Method Detail

isOptimized

@Deprecated
public boolean isOptimized()
Deprecated.

Overrides:
isOptimized in class IndexReader

getVersion

public long getVersion()
Deprecated.
An InstantiatedIndexReader is not a snapshot in time, it is completely in sync with the latest commit to the store!

Overrides:
getVersion in class IndexReader
Returns:
output from InstantiatedIndex.getVersion() in associated instantiated index.

getFieldInfos

public FieldInfos getFieldInfos()
Deprecated.
Description copied from class: IndexReader
Get the FieldInfos describing all fields in this reader. NOTE: do not make any changes to the returned FieldInfos!

Specified by:
getFieldInfos in class IndexReader

directory

public Directory directory()
Deprecated.
Description copied from class: IndexReader
Returns the directory associated with this index. The Default implementation returns the directory specified by subclasses when delegating to the IndexReader(Directory) constructor, or throws an UnsupportedOperationException if one was not specified.

Overrides:
directory in class IndexReader

isCurrent

public boolean isCurrent()
                  throws IOException
Deprecated.
An InstantiatedIndexReader is always current! Check whether this IndexReader is still using the current (i.e., most recently committed) version of the index. If a writer has committed any changes to the index since this reader was opened, this will return false, in which case you must open a new IndexReader in order to see the changes. See the description of the autoCommit flag which controls when the IndexWriter actually commits changes to the index.

Overrides:
isCurrent in class IndexReader
Returns:
always true
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
UnsupportedOperationException - unless overridden in subclass

getIndex

public InstantiatedIndex getIndex()
Deprecated.

numDocs

public int numDocs()
Deprecated.
Description copied from class: IndexReader
Returns the number of documents in this index.

Specified by:
numDocs in class IndexReader

maxDoc

public int maxDoc()
Deprecated.
Description copied from class: IndexReader
Returns one greater than the largest possible document number. This may be used to, e.g., determine how big to allocate an array which will have an element for every document number in an index.

Specified by:
maxDoc in class IndexReader

hasDeletions

public boolean hasDeletions()
Deprecated.
Description copied from class: IndexReader
Returns true if any documents have been deleted

Specified by:
hasDeletions in class IndexReader

isDeleted

public boolean isDeleted(int n)
Deprecated.
Description copied from class: IndexReader
Returns true if document n has been deleted

Specified by:
isDeleted in class IndexReader

doDelete

protected void doDelete(int docNum)
                 throws IOException
Deprecated.
Description copied from class: IndexReader
Implements deletion of the document numbered docNum. Applications should call IndexReader.deleteDocument(int) or IndexReader.deleteDocuments(Term).

Specified by:
doDelete in class IndexReader
Throws:
IOException

doUndeleteAll

protected void doUndeleteAll()
                      throws IOException
Deprecated.
Description copied from class: IndexReader
Implements actual undeleteAll() in subclass.

Specified by:
doUndeleteAll in class IndexReader
Throws:
IOException

doCommit

protected void doCommit(Map<String,String> commitUserData)
                 throws IOException
Deprecated.
Description copied from class: IndexReader
Implements commit.

Specified by:
doCommit in class IndexReader
Throws:
IOException

doClose

protected void doClose()
                throws IOException
Deprecated.
Description copied from class: IndexReader
Implements close.

Specified by:
doClose in class IndexReader
Throws:
IOException

document

public Document document(int n,
                         FieldSelector fieldSelector)
                  throws CorruptIndexException,
                         IOException
Deprecated.
Return the Document at the nth position.

Warning! The resulting document is the actual stored document instance and not a deserialized clone as retuned by an IndexReader over a Directory. I.e., if you need to touch the document, clone it first!

This can also be seen as a feature for live changes of stored values, but be careful! Adding a field with an name unknown to the index or to a field with previously no stored values will make getFieldInfos() out of sync, causing problems for instance when merging the instantiated index to another index.

This implementation ignores the field selector! All stored fields are always returned!

Specified by:
document in class IndexReader
Parameters:
n - document number
fieldSelector - ignored
Returns:
The stored fields of the Document at the nth position
Throws:
CorruptIndexException - if the index is corrupt
IOException - if there is a low-level IO error
See Also:
Fieldable, FieldSelector, SetBasedFieldSelector, LoadFirstFieldSelector

norms

public byte[] norms(String field)
             throws IOException
Deprecated.
never ever touch these values. it is the true values, unless norms have been touched.

Specified by:
norms in class IndexReader
Throws:
IOException
See Also:
AbstractField.setBoost(float)

norms

public void norms(String field,
                  byte[] bytes,
                  int offset)
           throws IOException
Deprecated.
Description copied from class: IndexReader
Reads the byte-encoded normalization factor for the named field of every document. This is used by the search code to score documents.

Specified by:
norms in class IndexReader
Throws:
IOException
See Also:
AbstractField.setBoost(float)

doSetNorm

protected void doSetNorm(int doc,
                         String field,
                         byte value)
                  throws IOException
Deprecated.
Description copied from class: IndexReader
Implements setNorm in subclass.

Specified by:
doSetNorm in class IndexReader
Throws:
IOException

docFreq

public int docFreq(Term t)
            throws IOException
Deprecated.
Description copied from class: IndexReader
Returns the number of documents containing the term t.

Specified by:
docFreq in class IndexReader
Throws:
IOException - if there is a low-level IO error

terms

public TermEnum terms()
               throws IOException
Deprecated.
Description copied from class: IndexReader
Returns an enumeration of all the terms in the index. The enumeration is ordered by Term.compareTo(). Each term is greater than all that precede it in the enumeration. Note that after calling terms(), TermEnum.next() must be called on the resulting enumeration before calling other methods such as TermEnum.term().

Specified by:
terms in class IndexReader
Throws:
IOException - if there is a low-level IO error

terms

public TermEnum terms(Term t)
               throws IOException
Deprecated.
Description copied from class: IndexReader
Returns an enumeration of all terms starting at a given term. If the given term does not exist, the enumeration is positioned at the first term greater than the supplied term. The enumeration is ordered by Term.compareTo(). Each term is greater than all that precede it in the enumeration.

Specified by:
terms in class IndexReader
Throws:
IOException - if there is a low-level IO error

termDocs

public TermDocs termDocs()
                  throws IOException
Deprecated.
Description copied from class: IndexReader
Returns an unpositioned TermDocs enumerator.

Note: the TermDocs returned is unpositioned. Before using it, ensure that you first position it with TermDocs.seek(Term) or TermDocs.seek(TermEnum).

Specified by:
termDocs in class IndexReader
Throws:
IOException - if there is a low-level IO error

termDocs

public TermDocs termDocs(Term term)
                  throws IOException
Deprecated.
Description copied from class: IndexReader
Returns an enumeration of all the documents which contain term. For each document, the document number, the frequency of the term in that document is also provided, for use in search scoring. If term is null, then all non-deleted docs are returned with freq=1. Thus, this method implements the mapping:

    Term => <docNum, freq>*

The enumeration is ordered by document number. Each document number is greater than all that precede it in the enumeration.

Overrides:
termDocs in class IndexReader
Throws:
IOException - if there is a low-level IO error

termPositions

public TermPositions termPositions()
                            throws IOException
Deprecated.
Description copied from class: IndexReader
Returns an unpositioned TermPositions enumerator.

Specified by:
termPositions in class IndexReader
Throws:
IOException - if there is a low-level IO error

getTermFreqVectors

public TermFreqVector[] getTermFreqVectors(int docNumber)
                                    throws IOException
Deprecated.
Description copied from class: IndexReader
Return an array of term frequency vectors for the specified document. The array contains a vector for each vectorized field in the document. Each vector contains terms and frequencies for all terms in a given vectorized field. If no such fields existed, the method returns null. The term vectors that are returned may either be of type TermFreqVector or of type TermPositionVector if positions or offsets have been stored.

Specified by:
getTermFreqVectors in class IndexReader
Parameters:
docNumber - document for which term frequency vectors are returned
Returns:
array of term frequency vectors. May be null if no term vectors have been stored for the specified document.
Throws:
IOException - if index cannot be accessed
See Also:
Field.TermVector

getTermFreqVector

public TermFreqVector getTermFreqVector(int docNumber,
                                        String field)
                                 throws IOException
Deprecated.
Description copied from class: IndexReader
Return a term frequency vector for the specified document and field. The returned vector contains terms and frequencies for the terms in the specified field of this document, if the field had the storeTermVector flag set. If termvectors had been stored with positions or offsets, a TermPositionVector is returned.

Specified by:
getTermFreqVector in class IndexReader
Parameters:
docNumber - document for which the term frequency vector is returned
field - field for which the term frequency vector is returned.
Returns:
term frequency vector May be null if field does not exist in the specified document or term vector was not stored.
Throws:
IOException - if index cannot be accessed
See Also:
Field.TermVector

getTermFreqVector

public void getTermFreqVector(int docNumber,
                              String field,
                              TermVectorMapper mapper)
                       throws IOException
Deprecated.
Description copied from class: IndexReader
Load the Term Vector into a user-defined data structure instead of relying on the parallel arrays of the TermFreqVector.

Specified by:
getTermFreqVector in class IndexReader
Parameters:
docNumber - The number of the document to load the vector for
field - The name of the field to load
mapper - The TermVectorMapper to process the vector. Must not be null
Throws:
IOException - if term vectors cannot be accessed or if they do not exist on the field and doc. specified.

getTermFreqVector

public void getTermFreqVector(int docNumber,
                              TermVectorMapper mapper)
                       throws IOException
Deprecated.
Description copied from class: IndexReader
Map all the term vectors for all fields in a Document

Specified by:
getTermFreqVector in class IndexReader
Parameters:
docNumber - The number of the document to load the vector for
mapper - The TermVectorMapper to process the vector. Must not be null
Throws:
IOException - if term vectors cannot be accessed or if they do not exist on the field and doc. specified.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InstantiatedIndexWriter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store.instantiated
Class InstantiatedIndexWriter

java.lang.Object
    extended by  org.apache.lucene.store.instantiated.InstantiatedIndexWriter
All Implemented Interfaces:
Closeable
Deprecated. contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM

@Deprecated
public class InstantiatedIndexWriter
extends Object
implements Closeable

This class, similar to IndexWriter, has no locking mechanism.

InstantiatedIndexReader is navigating the same instances in memory as this writer is updating so searchers active while you are committing are bound to throw exceptions.

Consider using InstantiatedIndex as if it was immutable.

See Also:
IndexWriter

Constructor Summary
InstantiatedIndexWriter(InstantiatedIndex index)
Deprecated.
InstantiatedIndexWriter(InstantiatedIndex index, Analyzer analyzer)
Deprecated.
InstantiatedIndexWriter(InstantiatedIndex index, Analyzer analyzer, boolean create)
Deprecated.
Method Summary
 void abort()
Deprecated.
 void addDocument(Document doc)
Deprecated. Adds a document to this index.
 void addDocument(Document doc, Analyzer analyzer)
Deprecated. Adds a document to this index, using the provided analyzer instead of the value of getAnalyzer().
protected  void addDocument(InstantiatedDocument document, Analyzer analyzer)
Deprecated. Tokenizes a document and adds it to the buffer.
 void addIndexes(IndexReader[] readers)
Deprecated.
 void close()
Deprecated. Flushes all changes to an index and closes all associated files.
 void commit()
Deprecated. Locks the index and commits the buffered documents.
 void deleteDocuments(Term term)
Deprecated.
 void deleteDocuments(Term[] terms)
Deprecated.
 int docCount()
Deprecated. Returns the number of documents currently in this index.
 Analyzer getAnalyzer()
Deprecated.
 PrintStream getInfoStream()
Deprecated.
 int getMaxFieldLength()
Deprecated.
 int getMergeFactor()
Deprecated.
 Similarity getSimilarity()
Deprecated.
 void setInfoStream(PrintStream infoStream)
Deprecated. If non-null, information about merges and a message when maxFieldLength is reached could be printed to this -- currently not yet implemented.
 void setMaxFieldLength(int maxFieldLength)
Deprecated.
 void setMergeFactor(int mergeFactor)
Deprecated. The sweetspot for this implementation is somewhere around 2500 at 2K text large documents.
 void setSimilarity(Similarity similarity)
Deprecated.
 void updateDocument(Term term, Document doc)
Deprecated.
 void updateDocument(Term term, Document doc, Analyzer analyzer)
Deprecated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InstantiatedIndexWriter

public InstantiatedIndexWriter(InstantiatedIndex index)
                        throws IOException
Deprecated.
Throws:
IOException

InstantiatedIndexWriter

public InstantiatedIndexWriter(InstantiatedIndex index,
                               Analyzer analyzer)
                        throws IOException
Deprecated.
Throws:
IOException

InstantiatedIndexWriter

public InstantiatedIndexWriter(InstantiatedIndex index,
                               Analyzer analyzer,
                               boolean create)
                        throws IOException
Deprecated.
Throws:
IOException
Method Detail

setMergeFactor

public void setMergeFactor(int mergeFactor)
Deprecated.
The sweetspot for this implementation is somewhere around 2500 at 2K text large documents.

Benchmark output:

  ------------> Report sum by Prefix (MAddDocs) and Round (8 about 8 out of 160153)
  Operation      round  mrg buf cmpnd   runCnt   recsPerRun        rec/s  elapsedSec    avgUsedMem    avgTotalMem
  MAddDocs_20000     0   10  10  true        1        20000         81,4      245,68   200 325 152    268 156 928
  MAddDocs_20000 -   1 1000  10  true -  -   1 -  -   20000 -  -   494,1 -  -  40,47 - 247 119 072 -  347 025 408
  MAddDocs_20000     2   10 100  true        1        20000        104,8      190,81   233 895 552    363 720 704
  MAddDocs_20000 -   3 2000 100  true -  -   1 -  -   20000 -  -   527,2 -  -  37,94 - 266 136 448 -  378 273 792
  MAddDocs_20000     4   10  10 false        1        20000        103,2      193,75   222 089 792    378 273 792
  MAddDocs_20000 -   5 3000  10 false -  -   1 -  -   20000 -  -   545,2 -  -  36,69 - 237 917 152 -  378 273 792
  MAddDocs_20000     6   10 100 false        1        20000        102,7      194,67   237 018 976    378 273 792
  MAddDocs_20000 -   7 4000 100 false -  -   1 -  -   20000 -  -   535,8 -  -  37,33 - 309 680 640 -  501 968 896

See Also:
LogMergePolicy.setMergeFactor(int)

getMergeFactor

public int getMergeFactor()
Deprecated.
See Also:
LogMergePolicy.getMergeFactor()

setInfoStream

public void setInfoStream(PrintStream infoStream)
Deprecated.
If non-null, information about merges and a message when maxFieldLength is reached could be printed to this -- currently not yet implemented.

abort

public void abort()
           throws IOException
Deprecated.
Throws:
IOException

addIndexes

public void addIndexes(IndexReader[] readers)
Deprecated.

getInfoStream

public PrintStream getInfoStream()
Deprecated.

close

public void close()
           throws IOException
Deprecated.
Flushes all changes to an index and closes all associated files.

Specified by:
close in interface Closeable
Throws:
IOException

docCount

public int docCount()
Deprecated.
Returns the number of documents currently in this index.

commit

public void commit()
            throws IOException
Deprecated.
Locks the index and commits the buffered documents.

Throws:
IOException

addDocument

public void addDocument(Document doc)
                 throws IOException
Deprecated.
Adds a document to this index. If the document contains more than setMaxFieldLength(int) terms for a given field, the remainder are discarded.

Throws:
IOException

addDocument

public void addDocument(Document doc,
                        Analyzer analyzer)
                 throws IOException
Deprecated.
Adds a document to this index, using the provided analyzer instead of the value of getAnalyzer(). If the document contains more than setMaxFieldLength(int) terms for a given field, the remainder are discarded.

Parameters:
doc -
analyzer -
Throws:
IOException

addDocument

protected void addDocument(InstantiatedDocument document,
                           Analyzer analyzer)
                    throws IOException
Deprecated.
Tokenizes a document and adds it to the buffer. Try to do all calculations in this method rather than in commit, as this is a non locking method. Remember, this index implementation expects unlimited memory for maximum speed.

Parameters:
document -
analyzer -
Throws:
IOException

deleteDocuments

public void deleteDocuments(Term term)
                     throws IOException
Deprecated.
Throws:
IOException

deleteDocuments

public void deleteDocuments(Term[] terms)
                     throws IOException
Deprecated.
Throws:
IOException

updateDocument

public void updateDocument(Term term,
                           Document doc)
                    throws IOException
Deprecated.
Throws:
IOException

updateDocument

public void updateDocument(Term term,
                           Document doc,
                           Analyzer analyzer)
                    throws IOException
Deprecated.
Throws:
IOException

getMaxFieldLength

public int getMaxFieldLength()
Deprecated.

setMaxFieldLength

public void setMaxFieldLength(int maxFieldLength)
Deprecated.

getSimilarity

public Similarity getSimilarity()
Deprecated.

setSimilarity

public void setSimilarity(Similarity similarity)
Deprecated.

getAnalyzer

public Analyzer getAnalyzer()
Deprecated.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InstantiatedTerm

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store.instantiated
Class InstantiatedTerm

java.lang.Object
    extended by  org.apache.lucene.store.instantiated.InstantiatedTerm
All Implemented Interfaces:
Serializable
public class InstantiatedTerm
extends Object
implements Serializable

A term in the inverted index, coupled to the documents it occurs in.

See Also:
Term, Serialized Form

Field Summary
static Comparator<InstantiatedTerm> | comparator
static Comparator<Object> | termComparator
Method Summary
int | binarySearchAssociatedDocuments(int target)
int | binarySearchAssociatedDocuments(int target, int offset)
int | binarySearchAssociatedDocuments(int target, int offset, int length)
String | field()
InstantiatedTermDocumentInformation | getAssociatedDocument(int documentNumber) Navigates to the view of this occurrences of this term in a specific document.
InstantiatedTermDocumentInformation[] | getAssociatedDocuments() Meta data per document in which this term is occurring.
Term | getTerm()
int | getTermIndex()
int | seekCeilingDocumentInformationIndex(int target) Finds index to the first beyond the current whose document number is greater than or equal to target, -1 if there is no such element.
int | seekCeilingDocumentInformationIndex(int target, int startOffset) Finds index to the first beyond the current whose document number is greater than or equal to target, -1 if there is no such element.
int | seekCeilingDocumentInformationIndex(int target, int startOffset, int endPosition) Finds index to the first beyond the current whose document number is greater than or equal to target, -1 if there is no such element.
void | setTermIndex(int termIndex)
String | text()
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

comparator

public static final Comparator<InstantiatedTerm> comparator

termComparator

public static final Comparator<Object> termComparator
Method Detail

getTerm

public Term getTerm()
Returns:
Term associated with this entry of the index object graph

getAssociatedDocuments

public InstantiatedTermDocumentInformation[] getAssociatedDocuments()
Meta data per document in which this term is occurring. Ordered by document number.

Returns:
Meta data per document in which this term is occurring.

seekCeilingDocumentInformationIndex

public int seekCeilingDocumentInformationIndex(int target)
Finds index to the first beyond the current whose document number is greater than or equal to target, -1 if there is no such element.

Parameters:
target - the document number to match
Returns:
-1 if there is no such element

seekCeilingDocumentInformationIndex

public int seekCeilingDocumentInformationIndex(int target,
                                               int startOffset)
Finds index to the first beyond the current whose document number is greater than or equal to target, -1 if there is no such element.

Parameters:
target - the document number to match
startOffset - associated documents index start offset
Returns:
-1 if there is no such element

seekCeilingDocumentInformationIndex

public int seekCeilingDocumentInformationIndex(int target,
                                               int startOffset,
                                               int endPosition)
Finds index to the first beyond the current whose document number is greater than or equal to target, -1 if there is no such element.

Parameters:
target - the document number to match
startOffset - associated documents index start offset
endPosition - associated documents index end position
Returns:
-1 if there is no such element

binarySearchAssociatedDocuments

public int binarySearchAssociatedDocuments(int target)

binarySearchAssociatedDocuments

public int binarySearchAssociatedDocuments(int target,
                                           int offset)

binarySearchAssociatedDocuments

public int binarySearchAssociatedDocuments(int target,
                                           int offset,
                                           int length)
Parameters:
target - value to search for in the array
offset - index of the first valid value in the array
length - number of valid values in the array
Returns:
index of an occurrence of key in array, or -(insertionIndex + 1) if key is not contained in array (insertionIndex is then the index at which key could be inserted).

getAssociatedDocument

public InstantiatedTermDocumentInformation getAssociatedDocument(int documentNumber)
Navigates to the view of this occurrences of this term in a specific document. This method is only used by InstantiatedIndex(IndexReader) and should not be optimized for less CPU at the cost of more RAM.

Parameters:
documentNumber - the n:th document in the index
Returns:
view of this term from specified document

field

public final String field()

text

public final String text()

toString

public String toString()
Overrides:
toString in class Object

getTermIndex

public int getTermIndex()

setTermIndex

public void setTermIndex(int termIndex)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InstantiatedTermDocs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store.instantiated
Class InstantiatedTermDocs

java.lang.Object
    extended by  org.apache.lucene.store.instantiated.InstantiatedTermDocs
All Implemented Interfaces:
Closeable, TermDocs
Direct Known Subclasses:
InstantiatedTermPositions
public class InstantiatedTermDocs
extends Object
implements TermDocs

A TermDocs navigating an InstantiatedIndexReader.

Field Summary
protected InstantiatedTermDocumentInformation | currentDocumentInformation
protected InstantiatedTerm | currentTerm
Constructor Summary
InstantiatedTermDocs(InstantiatedIndexReader reader)
Method Summary
void | close() Does nothing
int | doc() Returns the current document number.
int | freq() Returns the frequency of the term within the current document.
boolean | next() Moves to the next pair in the enumeration.
int | read(int[] docs, int[] freqs) Attempts to read multiple entries from the enumeration, up to length of docs.
void | seek(Term term) Sets this to the data for a term.
void | seek(TermEnum termEnum) Sets this to the data for the current term in a TermEnum.
boolean | skipTo(int target) Skips entries to the first beyond the current whose document number is greater than or equal to target.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

currentDocumentInformation

protected InstantiatedTermDocumentInformation currentDocumentInformation

currentTerm

protected InstantiatedTerm currentTerm
Constructor Detail

InstantiatedTermDocs

public InstantiatedTermDocs(InstantiatedIndexReader reader)
Method Detail

seek

public void seek(Term term)
Description copied from interface: TermDocs
Sets this to the data for a term. The enumeration is reset to the start of the data for this term.

Specified by:
seek in interface TermDocs

seek

public void seek(TermEnum termEnum)
Description copied from interface: TermDocs
Sets this to the data for the current term in a TermEnum. This may be optimized in some implementations.

Specified by:
seek in interface TermDocs

doc

public int doc()
Description copied from interface: TermDocs
Returns the current document number.

This is invalid until TermDocs.next() is called for the first time.

Specified by:
doc in interface TermDocs

freq

public int freq()
Description copied from interface: TermDocs
Returns the frequency of the term within the current document.

This is invalid until TermDocs.next() is called for the first time.

Specified by:
freq in interface TermDocs

next

public boolean next()
Description copied from interface: TermDocs
Moves to the next pair in the enumeration.

Returns true iff there is such a next pair in the enumeration. Once this returns false you should not call any of the other methods.

Specified by:
next in interface TermDocs

read

public int read(int[] docs,
                int[] freqs)
Description copied from interface: TermDocs
Attempts to read multiple entries from the enumeration, up to length of docs. Document numbers are stored in docs, and term frequencies are stored in freqs. The freqs array must be as long as the docs array.

Returns the number of entries read. Zero is only returned when the stream has been exhausted.

Specified by:
read in interface TermDocs

skipTo

public boolean skipTo(int target)
Skips entries to the first beyond the current whose document number is greater than or equal to target.

Returns true if there is such an entry.

Behaves as if written:

   boolean skipTo(int target) {
     do {
       if (!next())
             return false;
     } while (target > doc());
     return true;
   }
This implementation is considerably more efficient than that.

Specified by:
skipTo in interface TermDocs

close

public void close()
Does nothing

Specified by:
close in interface Closeable
Specified by:
close in interface TermDocs
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InstantiatedTermDocumentInformation

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store.instantiated
Class InstantiatedTermDocumentInformation

java.lang.Object
    extended by  org.apache.lucene.store.instantiated.InstantiatedTermDocumentInformation
All Implemented Interfaces:
Serializable
public class InstantiatedTermDocumentInformation
extends Object
implements Serializable

There is one instance of this class per indexed term in a document and it contains the meta data about each occurrence of a term in a document. It is the inner glue of the inverted index.

 [Term]-- {0..*} | {0..*} --(field)[Document]
            <<ordered>>
                 |
    [TermDocumentInformation]
       +payloads
       +termPositions
       +termOffsets

See Also:
Serialized Form

Field Summary
static Comparator<InstantiatedTermDocumentInformation> | documentNumberComparator
static Comparator | doumentNumberIntegerComparator
static Comparator<InstantiatedTermDocumentInformation> | termComparator
Constructor Summary
InstantiatedTermDocumentInformation(InstantiatedTerm term, InstantiatedDocument document, int[] termPositions, byte[][] payloads)
Method Summary
InstantiatedDocument | getDocument()
byte[][] | getPayloads()
InstantiatedTerm | getTerm()
TermVectorOffsetInfo[] | getTermOffsets()
int[] | getTermPositions()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

termComparator

public static final Comparator<InstantiatedTermDocumentInformation> termComparator

documentNumberComparator

public static final Comparator<InstantiatedTermDocumentInformation> documentNumberComparator

doumentNumberIntegerComparator

public static final Comparator doumentNumberIntegerComparator
Constructor Detail

InstantiatedTermDocumentInformation

public InstantiatedTermDocumentInformation(InstantiatedTerm term,
                                           InstantiatedDocument document,
                                           int[] termPositions,
                                           byte[][] payloads)
Method Detail

getTermPositions

public int[] getTermPositions()

getPayloads

public byte[][] getPayloads()

getDocument

public InstantiatedDocument getDocument()

getTerm

public InstantiatedTerm getTerm()

getTermOffsets

public TermVectorOffsetInfo[] getTermOffsets()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InstantiatedTermEnum

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store.instantiated
Class InstantiatedTermEnum

java.lang.Object
    extended by  org.apache.lucene.index.TermEnum
        extended by  org.apache.lucene.store.instantiated.InstantiatedTermEnum
All Implemented Interfaces:
Closeable
public class InstantiatedTermEnum
extends TermEnum

A TermEnum navigating an InstantiatedIndexReader.

Constructor Summary
InstantiatedTermEnum(InstantiatedIndexReader reader)
InstantiatedTermEnum(InstantiatedIndexReader reader, int startPosition)
Method Summary
void | close() Closes the enumeration to further activity, freeing resources.
int | docFreq() Returns the docFreq of the current Term in the enumeration.
boolean | next() Increments the enumeration to the next element.
Term | term() Returns the current Term in the enumeration.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

InstantiatedTermEnum

public InstantiatedTermEnum(InstantiatedIndexReader reader)

InstantiatedTermEnum

public InstantiatedTermEnum(InstantiatedIndexReader reader,
                            int startPosition)
Method Detail

next

public boolean next()
Increments the enumeration to the next element. True if one exists.

Specified by:
next in class TermEnum

term

public Term term()
Returns the current Term in the enumeration.

Specified by:
term in class TermEnum

docFreq

public int docFreq()
Returns the docFreq of the current Term in the enumeration.

Specified by:
docFreq in class TermEnum

close

public void close()
Closes the enumeration to further activity, freeing resources.

Specified by:
close in interface Closeable
Specified by:
close in class TermEnum
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InstantiatedTermFreqVector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store.instantiated
Class InstantiatedTermFreqVector

java.lang.Object
    extended by  org.apache.lucene.store.instantiated.InstantiatedTermFreqVector
All Implemented Interfaces:
Serializable, TermFreqVector
Direct Known Subclasses:
InstantiatedTermPositionVector
public class InstantiatedTermFreqVector
extends Object
implements TermFreqVector, Serializable

Vector space view of a document in an InstantiatedIndexReader.

See Also:
TermFreqVector, Serialized Form

Constructor Summary
InstantiatedTermFreqVector(InstantiatedDocument document, String field)
Method Summary
String | getField() The Fieldable name.
List<InstantiatedTermDocumentInformation> | getTermDocumentInformations()
int[] | getTermFrequencies() Array of term frequencies.
String[] | getTerms()
int[] | indexesOf(String[] termNumbers, int start, int len) Just like indexOf(int) but searches for a number of terms at the same time.
int | indexOf(String termText) Return an index in the term numbers array returned from getTerms at which the term with the specified term appears.
int | size()
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

InstantiatedTermFreqVector

public InstantiatedTermFreqVector(InstantiatedDocument document,
                                  String field)
Method Detail

getField

public String getField()
Description copied from interface: TermFreqVector
The Fieldable name.

Specified by:
getField in interface TermFreqVector
Returns:
The number of the field this vector is associated with

toString

public String toString()
Overrides:
toString in class Object

size

public int size()
Specified by:
size in interface TermFreqVector
Returns:
The number of terms in the term vector.

getTerms

public String[] getTerms()
Specified by:
getTerms in interface TermFreqVector
Returns:
An Array of term texts in ascending order.

getTermFrequencies

public int[] getTermFrequencies()
Description copied from interface: TermFreqVector
Array of term frequencies. Locations of the array correspond one to one to the terms in the array obtained from getTerms method. Each location in the array contains the number of times this term occurs in the document or the document field.

Specified by:
getTermFrequencies in interface TermFreqVector

indexOf

public int indexOf(String termText)
Description copied from interface: TermFreqVector
Return an index in the term numbers array returned from getTerms at which the term with the specified term appears. If this term does not appear in the array, return -1.

Specified by:
indexOf in interface TermFreqVector

indexesOf

public int[] indexesOf(String[] termNumbers,
                       int start,
                       int len)
Description copied from interface: TermFreqVector
Just like indexOf(int) but searches for a number of terms at the same time. Returns an array that has the same size as the number of terms searched for, each slot containing the result of searching for that term number.

Specified by:
indexesOf in interface TermFreqVector
Parameters:
termNumbers - array containing terms to look for
start - index in the array where the list of terms starts
len - the number of terms in the list

getTermDocumentInformations

public List<InstantiatedTermDocumentInformation> getTermDocumentInformations()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InstantiatedTermPositions

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store.instantiated
Class InstantiatedTermPositions

java.lang.Object
    extended by  org.apache.lucene.store.instantiated.InstantiatedTermDocs
        extended by  org.apache.lucene.store.instantiated.InstantiatedTermPositions
All Implemented Interfaces:
Closeable, TermDocs, TermPositions
public class InstantiatedTermPositions
extends InstantiatedTermDocs
implements TermPositions

A TermPositions navigating an InstantiatedIndexReader.

Field Summary
Fields inherited from class org.apache.lucene.store.instantiated.InstantiatedTermDocs
currentDocumentInformation, currentTerm
Constructor Summary
InstantiatedTermPositions(InstantiatedIndexReader reader)
Method Summary
byte[] | getPayload(byte[] data, int offset) Returns the payload data at the current term position.
int | getPayloadLength() Returns the length of the payload at the current term position.
boolean | isPayloadAvailable() Checks if a payload can be loaded at this position.
boolean | next() Moves to the next pair in the enumeration.
int | nextPosition() Returns next position in the current document.
boolean | skipTo(int target) Skips entries to the first beyond the current whose document number is greater than or equal to target.
Methods inherited from class org.apache.lucene.store.instantiated.InstantiatedTermDocs
close, doc, freq, read, seek, seek
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.index.TermDocs
close, doc, freq, read, seek, seek

Constructor Detail

InstantiatedTermPositions

public InstantiatedTermPositions(InstantiatedIndexReader reader)
Method Detail

getPayloadLength

public int getPayloadLength()
Description copied from interface: TermPositions
Returns the length of the payload at the current term position. This is invalid until TermPositions.nextPosition() is called for the first time.

Specified by:
getPayloadLength in interface TermPositions
Returns:
length of the current payload in number of bytes

getPayload

public byte[] getPayload(byte[] data,
                         int offset)
                  throws IOException
Description copied from interface: TermPositions
Returns the payload data at the current term position. This is invalid until TermPositions.nextPosition() is called for the first time. This method must not be called more than once after each call of TermPositions.nextPosition(). However, payloads are loaded lazily, so if the payload data for the current position is not needed, this method may not be called at all for performance reasons.

Specified by:
getPayload in interface TermPositions
Parameters:
data - the array into which the data of this payload is to be stored, if it is big enough; otherwise, a new byte[] array is allocated for this purpose.
offset - the offset in the array into which the data of this payload is to be stored.
Returns:
a byte[] array containing the data of this payload
Throws:
IOException

isPayloadAvailable

public boolean isPayloadAvailable()
Description copied from interface: TermPositions
Checks if a payload can be loaded at this position.

Payloads can only be loaded once per call to TermPositions.nextPosition().

Specified by:
isPayloadAvailable in interface TermPositions
Returns:
true if there is a payload available at this position that can be loaded

nextPosition

public int nextPosition()
Returns next position in the current document. It is an error to call this more than InstantiatedTermDocs.freq() times without calling next()

This is invalid until next() is called for the first time.

Specified by:
nextPosition in interface TermPositions

next

public boolean next()
Moves to the next pair in the enumeration.

Returns true if there is such a next pair in the enumeration.

Specified by:
next in interface TermDocs
Overrides:
next in class InstantiatedTermDocs

skipTo

public boolean skipTo(int target)
Skips entries to the first beyond the current whose document number is greater than or equal to target.

Returns true iff there is such an entry.

Behaves as if written:

   boolean skipTo(int target) {
     do {
       if (!next())
             return false;
     } while (target > doc());
     return true;
   }
Some implementations are considerably more efficient than that.

Specified by:
skipTo in interface TermDocs
Overrides:
skipTo in class InstantiatedTermDocs
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


InstantiatedTermPositionVector

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.store.instantiated
Class InstantiatedTermPositionVector

java.lang.Object
    extended by  org.apache.lucene.store.instantiated.InstantiatedTermFreqVector
        extended by  org.apache.lucene.store.instantiated.InstantiatedTermPositionVector
All Implemented Interfaces:
Serializable, TermFreqVector, TermPositionVector
public class InstantiatedTermPositionVector
extends InstantiatedTermFreqVector
implements TermPositionVector, Serializable

Extended vector space view of a document in an InstantiatedIndexReader.

See Also:
TermPositionVector, Serialized Form

Constructor Summary
InstantiatedTermPositionVector(InstantiatedDocument document, String field)
Method Summary
TermVectorOffsetInfo[] | getOffsets(int index) Returns an array of TermVectorOffsetInfo in which the term is found.
int[] | getTermPositions(int index) Returns an array of positions in which the term is found.
Methods inherited from class org.apache.lucene.store.instantiated.InstantiatedTermFreqVector
getField, getTermDocumentInformations, getTermFrequencies, getTerms, indexesOf, indexOf, size, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.lucene.index.TermFreqVector
getField, getTermFrequencies, getTerms, indexesOf, indexOf, size

Constructor Detail

InstantiatedTermPositionVector

public InstantiatedTermPositionVector(InstantiatedDocument document,
                                      String field)
Method Detail

getTermPositions

public int[] getTermPositions(int index)
Description copied from interface: TermPositionVector
Returns an array of positions in which the term is found. Terms are identified by the index at which its number appears in the term String array obtained from the indexOf method. May return null if positions have not been stored.

Specified by:
getTermPositions in interface TermPositionVector

getOffsets

public TermVectorOffsetInfo[] getOffsets(int index)
Description copied from interface: TermPositionVector
Returns an array of TermVectorOffsetInfo in which the term is found. May return null if offsets have not been stored.

Specified by:
getOffsets in interface TermPositionVector
Parameters:
index - The position in the array to get the offsets from
Returns:
An array of TermVectorOffsetInfo objects or the empty list
See Also:
Token
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.store.instantiated
Classes
InstantiatedDocument
InstantiatedIndex
InstantiatedIndexReader
InstantiatedIndexWriter
InstantiatedTerm
InstantiatedTermDocs
InstantiatedTermDocumentInformation
InstantiatedTermEnum
InstantiatedTermFreqVector
InstantiatedTermPositions
InstantiatedTermPositionVector


org.apache.lucene.store.instantiated

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.store.instantiated

InstantiatedIndex, alternative RAM store for small corpora.

See:
Description

Class Summary
InstantiatedDocument | A document in the instantiated index object graph, optionally coupled to the vector space view.
InstantiatedIndex | Deprecated. contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM
InstantiatedIndexReader | Deprecated. contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM
InstantiatedIndexWriter | Deprecated. contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM
InstantiatedTerm | A term in the inverted index, coupled to the documents it occurs in.
InstantiatedTermDocs | A TermDocs navigating an InstantiatedIndexReader.
InstantiatedTermDocumentInformation | There is one instance of this class per indexed term in a document and it contains the meta data about each occurrence of a term in a document.
InstantiatedTermEnum | A TermEnum navigating an InstantiatedIndexReader.
InstantiatedTermFreqVector | Vector space view of a document in an InstantiatedIndexReader.
InstantiatedTermPositions | A TermPositions navigating an InstantiatedIndexReader.
InstantiatedTermPositionVector | Extended vector space view of a document in an InstantiatedIndexReader.

Package org.apache.lucene.store.instantiated Description

InstantiatedIndex, alternative RAM store for small corpora.

@lucene.experimental

Abstract

Represented as a coupled graph of class instances, this all-in-memory index store implementation delivers search results up to a 100 times faster than the file-centric RAMDirectory at the cost of greater RAM consumption.

API

Just as the default store implementation, InstantiatedIndex comes with an IndexReader and IndexWriter. The latter share many method signatures with the file-centric IndexWriter.

It is also possible to load the content of another index by passing an IndexReader to the InstantiatedIndex constructor.

Performance

At a few thousand ~160 characters long documents InstantiatedIndex outperforms RAMDirectory some 50x, 15x at 100 documents of 2000 characters length, and is linear to RAMDirectory at 10,000 documents of 2000 characters length.

Mileage may vary depending on term saturation.

benchmark

Populated with a single document InstantiatedIndex is almost, but not quite, as fast as MemoryIndex.

It takes more or less the same time to populate an InstantiatedIndex as it takes to populate a RAMDirectory. Hardly any effort has been put in to optimizing the InstantiatedIndexWriter, only minimizing the amount of time needed to write-lock the index has been considered.

Caveats

  • No locks! Consider using InstantiatedIndex as if it was immutable.
  • No documents with fields containing readers.
  • No field selection when retrieving documents, as all stored field are available in memory.
  • Any document returned must cloned if they are to be touched.
  • Norms array returned must not be touched.

Use cases

Could replace any small index that could do with greater response time. spell check a priori index, the index of new documents exposed to user search agent queries, to compile classifiers in machine learning environments, etc.

Class diagram

class diagram
Diagram rendered using UMLet 7.1.


org.apache.lucene.store.instantiated Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.store.instantiated

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.index.IndexReader (implements java.lang.Cloneable, java.io.Closeable)
      • org.apache.lucene.store.instantiated.InstantiatedIndexReader
    • org.apache.lucene.store.instantiated.InstantiatedDocument (implements java.io.Serializable)
    • org.apache.lucene.store.instantiated.InstantiatedIndex (implements java.io.Closeable, java.io.Serializable)
    • org.apache.lucene.store.instantiated.InstantiatedIndexWriter (implements java.io.Closeable)
    • org.apache.lucene.store.instantiated.InstantiatedTerm (implements java.io.Serializable)
    • org.apache.lucene.store.instantiated.InstantiatedTermDocs (implements org.apache.lucene.index.TermDocs)
      • org.apache.lucene.store.instantiated.InstantiatedTermPositions (implements org.apache.lucene.index.TermPositions)
    • org.apache.lucene.store.instantiated.InstantiatedTermDocumentInformation (implements java.io.Serializable)
    • org.apache.lucene.store.instantiated.InstantiatedTermFreqVector (implements java.io.Serializable, org.apache.lucene.index.TermFreqVector)
      • org.apache.lucene.store.instantiated.InstantiatedTermPositionVector (implements java.io.Serializable, org.apache.lucene.index.TermPositionVector)
    • org.apache.lucene.index.TermEnum (implements java.io.Closeable)
      • org.apache.lucene.store.instantiated.InstantiatedTermEnum


Uses of Package org.apache.lucene.store.instantiated

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.store.instantiated

Packages that use org.apache.lucene.store.instantiated
org.apache.lucene.store.instantiated InstantiatedIndex, alternative RAM store for small corpora.

Classes in org.apache.lucene.store.instantiated used by org.apache.lucene.store.instantiated
InstantiatedDocument
A document in the instantiated index object graph, optionally coupled to the vector space view.
InstantiatedIndex
Deprecated. contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM
InstantiatedIndexReader
Deprecated. contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM
InstantiatedIndexWriter
Deprecated. contrib/instantiated will be removed in 4.0; you can use the memory codec to hold all postings in RAM
InstantiatedTerm
A term in the inverted index, coupled to the documents it occurs in.
InstantiatedTermDocs
A TermDocs navigating an InstantiatedIndexReader.
InstantiatedTermDocumentInformation
There is one instance of this class per indexed term in a document and it contains the meta data about each occurrence of a term in a document.
InstantiatedTermFreqVector
Vector space view of a document in an InstantiatedIndexReader.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.instantiated.InstantiatedDocument

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.instantiated.InstantiatedDocument

Packages that use InstantiatedDocument
org.apache.lucene.store.instantiated InstantiatedIndex, alternative RAM store for small corpora.

Uses of InstantiatedDocument in org.apache.lucene.store.instantiated

Methods in org.apache.lucene.store.instantiated that return InstantiatedDocument
InstantiatedDocument | InstantiatedTermDocumentInformation.getDocument()
InstantiatedDocument[] | InstantiatedIndex.getDocumentsByNumber() Deprecated.

Methods in org.apache.lucene.store.instantiated with parameters of type InstantiatedDocument
protected  void InstantiatedIndexWriter.addDocument(InstantiatedDocument document, Analyzer analyzer)
Deprecated. Tokenizes a document and adds it to the buffer.

Constructors in org.apache.lucene.store.instantiated with parameters of type InstantiatedDocument
InstantiatedTermDocumentInformation(InstantiatedTerm term, InstantiatedDocument document, int[] termPositions, byte[][] payloads)
InstantiatedTermFreqVector(InstantiatedDocument document, String field)
InstantiatedTermPositionVector(InstantiatedDocument document, String field)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.instantiated.InstantiatedIndex

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.instantiated.InstantiatedIndex

Packages that use InstantiatedIndex
org.apache.lucene.store.instantiated InstantiatedIndex, alternative RAM store for small corpora.

Uses of InstantiatedIndex in org.apache.lucene.store.instantiated

Methods in org.apache.lucene.store.instantiated that return InstantiatedIndex
 InstantiatedIndex InstantiatedIndexReader.getIndex()
Deprecated.

Constructors in org.apache.lucene.store.instantiated with parameters of type InstantiatedIndex
InstantiatedIndexReader(InstantiatedIndex index)
Deprecated.
InstantiatedIndexWriter(InstantiatedIndex index)
Deprecated.
InstantiatedIndexWriter(InstantiatedIndex index, Analyzer analyzer)
Deprecated.
InstantiatedIndexWriter(InstantiatedIndex index, Analyzer analyzer, boolean create)
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.instantiated.InstantiatedIndexReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.instantiated.InstantiatedIndexReader

Packages that use InstantiatedIndexReader
org.apache.lucene.store.instantiated InstantiatedIndex, alternative RAM store for small corpora.

Uses of InstantiatedIndexReader in org.apache.lucene.store.instantiated

Methods in org.apache.lucene.store.instantiated that return InstantiatedIndexReader
 InstantiatedIndexReader InstantiatedIndex.indexReaderFactory()
Deprecated.

Constructors in org.apache.lucene.store.instantiated with parameters of type InstantiatedIndexReader
InstantiatedTermDocs(InstantiatedIndexReader reader)
InstantiatedTermEnum(InstantiatedIndexReader reader)
InstantiatedTermEnum(InstantiatedIndexReader reader, int startPosition)
InstantiatedTermPositions(InstantiatedIndexReader reader)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.instantiated.InstantiatedIndexWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.instantiated.InstantiatedIndexWriter

Packages that use InstantiatedIndexWriter
org.apache.lucene.store.instantiated InstantiatedIndex, alternative RAM store for small corpora.

Uses of InstantiatedIndexWriter in org.apache.lucene.store.instantiated

Methods in org.apache.lucene.store.instantiated that return InstantiatedIndexWriter
 InstantiatedIndexWriter InstantiatedIndex.indexWriterFactory(Analyzer analyzer, boolean create)
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.instantiated.InstantiatedTerm

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.instantiated.InstantiatedTerm

Packages that use InstantiatedTerm
org.apache.lucene.store.instantiated InstantiatedIndex, alternative RAM store for small corpora.

Uses of InstantiatedTerm in org.apache.lucene.store.instantiated

Fields in org.apache.lucene.store.instantiated declared as InstantiatedTerm
protected  InstantiatedTerm InstantiatedTermDocs.currentTerm

Fields in org.apache.lucene.store.instantiated with type parameters of type InstantiatedTerm
static Comparator<InstantiatedTerm> InstantiatedTerm.comparator

Methods in org.apache.lucene.store.instantiated that return InstantiatedTerm
InstantiatedTerm[] | InstantiatedIndex.getOrderedTerms() Deprecated.
InstantiatedTerm | InstantiatedTermDocumentInformation.getTerm()

Methods in org.apache.lucene.store.instantiated that return types with arguments of type InstantiatedTerm
 Map<String,Map<String,InstantiatedTerm>> InstantiatedIndex.getTermsByFieldAndText()
Deprecated.

Constructors in org.apache.lucene.store.instantiated with parameters of type InstantiatedTerm
InstantiatedTermDocumentInformation(InstantiatedTerm term, InstantiatedDocument document, int[] termPositions, byte[][] payloads)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.instantiated.InstantiatedTermDocs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.instantiated.InstantiatedTermDocs

Packages that use InstantiatedTermDocs
org.apache.lucene.store.instantiated InstantiatedIndex, alternative RAM store for small corpora.

Uses of InstantiatedTermDocs in org.apache.lucene.store.instantiated

Subclasses of InstantiatedTermDocs in org.apache.lucene.store.instantiated
 class InstantiatedTermPositions
A TermPositions navigating an InstantiatedIndexReader.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.instantiated.InstantiatedTermDocumentInformation

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.instantiated.InstantiatedTermDocumentInformation

Packages that use InstantiatedTermDocumentInformation
org.apache.lucene.store.instantiated InstantiatedIndex, alternative RAM store for small corpora.

Uses of InstantiatedTermDocumentInformation in org.apache.lucene.store.instantiated

Fields in org.apache.lucene.store.instantiated declared as InstantiatedTermDocumentInformation
protected  InstantiatedTermDocumentInformation InstantiatedTermDocs.currentDocumentInformation

Fields in org.apache.lucene.store.instantiated with type parameters of type InstantiatedTermDocumentInformation
static Comparator<InstantiatedTermDocumentInformation> | InstantiatedTermDocumentInformation.documentNumberComparator
static Comparator<InstantiatedTermDocumentInformation> | InstantiatedTermDocumentInformation.termComparator

Methods in org.apache.lucene.store.instantiated that return InstantiatedTermDocumentInformation
InstantiatedTermDocumentInformation | InstantiatedTerm.getAssociatedDocument(int documentNumber) Navigates to the view of this occurrences of this term in a specific document.
InstantiatedTermDocumentInformation[] | InstantiatedTerm.getAssociatedDocuments() Meta data per document in which this term is occurring.

Methods in org.apache.lucene.store.instantiated that return types with arguments of type InstantiatedTermDocumentInformation
List<InstantiatedTermDocumentInformation> | InstantiatedTermFreqVector.getTermDocumentInformations()
Map<String,List<InstantiatedTermDocumentInformation>> | InstantiatedDocument.getVectorSpace()

Method parameters in org.apache.lucene.store.instantiated with type arguments of type InstantiatedTermDocumentInformation
 void InstantiatedDocument.setVectorSpace(Map<String,List<InstantiatedTermDocumentInformation>> vectorSpace)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.instantiated.InstantiatedTermEnum

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.instantiated.InstantiatedTermEnum

No usage of org.apache.lucene.store.instantiated.InstantiatedTermEnum

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.instantiated.InstantiatedTermFreqVector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.instantiated.InstantiatedTermFreqVector

Packages that use InstantiatedTermFreqVector
org.apache.lucene.store.instantiated InstantiatedIndex, alternative RAM store for small corpora.

Uses of InstantiatedTermFreqVector in org.apache.lucene.store.instantiated

Subclasses of InstantiatedTermFreqVector in org.apache.lucene.store.instantiated
 class InstantiatedTermPositionVector
Extended vector space view of a document in an InstantiatedIndexReader.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.instantiated.InstantiatedTermPositions

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.instantiated.InstantiatedTermPositions

No usage of org.apache.lucene.store.instantiated.InstantiatedTermPositions

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.store.instantiated.InstantiatedTermPositionVector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.store.instantiated.InstantiatedTermPositionVector

No usage of org.apache.lucene.store.instantiated.InstantiatedTermPositionVector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


_TestUtil

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class _TestUtil

java.lang.Object
    extended by  org.apache.lucene.util._TestUtil

public class _TestUtil
extends Object

General utility methods for Lucene unit tests.

Constructor Summary
_TestUtil()
Method Summary
static boolean anyFilesExceptWriteLock(Directory dir)
static String arrayToString(int[] array)
Deprecated. -- in 3.0 we can use Arrays.toString instead
static String arrayToString(Object[] array)
Deprecated. -- in 3.0 we can use Arrays.toString instead
static
<T> void
assertAttributeReflection(AttributeImpl att, Map<String,T> reflectedValues)
Checks some basic behaviour of an AttributeImpl
static void assertEquals(TopDocs expected, TopDocs actual)
static CharSequence bytesToCharSequence(BytesRef ref, Random random)
static CheckIndex.Status checkIndex(Directory dir)
This runs the CheckIndex tool on the index in.
static Document cloneDocument(Document doc1)
static File createTempFile(String prefix, String suffix, File directory)
insecure, fast version of File.createTempFile uses Random instead of SecureRandom.
static File getTempDir(String desc)
Returns temp dir, based on String arg in its name; does not create the directory.
static void keepFullyDeletedSegments(IndexWriter w)
static int nextInt(Random r, int start, int end)
start and end are BOTH inclusive
static String randomFixedByteLengthUnicodeString(Random r, int length)
Returns random string, with a given UTF-8 byte length
static void randomFixedLengthUnicodeString(Random random, char[] chars, int offset, int length)
Fills provided char[] with valid random unicode code unit sequence.
static String randomHtmlishString(Random random, int numElements)
static String randomlyRecaseCodePoints(Random random, String str)
Randomly upcases, downcases, or leaves intact each code point in the given string
static String randomRealisticUnicodeString(Random r)
Returns random string of length between 0-20 codepoints, all codepoints within the same unicode block.
static String randomRealisticUnicodeString(Random r, int maxLength)
Returns random string of length up to maxLength codepoints , all codepoints within the same unicode block.
static String randomRealisticUnicodeString(Random r, int minLength, int maxLength)
Returns random string of length between min and max codepoints, all codepoints within the same unicode block.
static String randomRegexpishString(Random r)
Returns a String thats "regexpish" (contains lots of operators typically found in regular expressions) If you call this enough times, you might get a valid regex!
static String randomRegexpishString(Random r, int maxLength)
Returns a String thats "regexpish" (contains lots of operators typically found in regular expressions) If you call this enough times, you might get a valid regex!
static String randomSimpleString(Random r)
static String randomSimpleString(Random r, int maxLength)
static String randomUnicodeString(Random r)
Returns random string, including full unicode range.
static String randomUnicodeString(Random r, int maxLength)
Returns a random string up to a certain length.
static void reduceOpenFiles(IndexWriter w)
just tries to configure things to keep the open file count lowish
static void rmDir(File dir)
Deletes a directory and everything underneath it.
static void setUseCompoundFile(MergePolicy mp, boolean v)
static CharSequence stringToCharSequence(String string, Random random)
static void syncConcurrentMerges(IndexWriter writer)
static void syncConcurrentMerges(MergeScheduler ms)
static void unzip(File zipName, File destDir)
Convenience method: Unzip zipName + ".zip" under destDir, removing destDir first
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

_TestUtil

public _TestUtil()
Method Detail

getTempDir

public static File getTempDir(String desc)
Returns temp dir, based on String arg in its name; does not create the directory.

rmDir

public static void rmDir(File dir)
                  throws IOException
Deletes a directory and everything underneath it.

Throws:
IOException

unzip

public static void unzip(File zipName,
                         File destDir)
                  throws IOException
Convenience method: Unzip zipName + ".zip" under destDir, removing destDir first

Throws:
IOException

syncConcurrentMerges

public static void syncConcurrentMerges(IndexWriter writer)

syncConcurrentMerges

public static void syncConcurrentMerges(MergeScheduler ms)

checkIndex

public static CheckIndex.Status checkIndex(Directory dir)
                                    throws IOException
This runs the CheckIndex tool on the index in. If any issues are hit, a RuntimeException is thrown; else, true is returned.

Throws:
IOException

arrayToString

@Deprecated
public static String arrayToString(int[] array)
Deprecated. -- in 3.0 we can use Arrays.toString instead

Use only for testing.

nextInt

public static int nextInt(Random r,
                          int start,
                          int end)
start and end are BOTH inclusive

setUseCompoundFile

public static void setUseCompoundFile(MergePolicy mp,
                                      boolean v)

arrayToString

@Deprecated
public static String arrayToString(Object[] array)
Deprecated. -- in 3.0 we can use Arrays.toString instead

Use only for testing.

randomSimpleString

public static String randomSimpleString(Random r,
                                        int maxLength)

randomSimpleString

public static String randomSimpleString(Random r)

randomUnicodeString

public static String randomUnicodeString(Random r)
Returns random string, including full unicode range.

randomUnicodeString

public static String randomUnicodeString(Random r,
                                         int maxLength)
Returns a random string up to a certain length.

randomFixedLengthUnicodeString

public static void randomFixedLengthUnicodeString(Random random,
                                                  char[] chars,
                                                  int offset,
                                                  int length)
Fills provided char[] with valid random unicode code unit sequence.

randomRegexpishString

public static String randomRegexpishString(Random r)
Returns a String thats "regexpish" (contains lots of operators typically found in regular expressions) If you call this enough times, you might get a valid regex!

randomRegexpishString

public static String randomRegexpishString(Random r,
                                           int maxLength)
Returns a String thats "regexpish" (contains lots of operators typically found in regular expressions) If you call this enough times, you might get a valid regex!

randomHtmlishString

public static String randomHtmlishString(Random random,
                                         int numElements)

randomlyRecaseCodePoints

public static String randomlyRecaseCodePoints(Random random,
                                              String str)
Randomly upcases, downcases, or leaves intact each code point in the given string

randomRealisticUnicodeString

public static String randomRealisticUnicodeString(Random r)
Returns random string of length between 0-20 codepoints, all codepoints within the same unicode block.

randomRealisticUnicodeString

public static String randomRealisticUnicodeString(Random r,
                                                  int maxLength)
Returns random string of length up to maxLength codepoints , all codepoints within the same unicode block.

randomRealisticUnicodeString

public static String randomRealisticUnicodeString(Random r,
                                                  int minLength,
                                                  int maxLength)
Returns random string of length between min and max codepoints, all codepoints within the same unicode block.

randomFixedByteLengthUnicodeString

public static String randomFixedByteLengthUnicodeString(Random r,
                                                        int length)
Returns random string, with a given UTF-8 byte length

anyFilesExceptWriteLock

public static boolean anyFilesExceptWriteLock(Directory dir)
                                       throws IOException
Throws:
IOException

reduceOpenFiles

public static void reduceOpenFiles(IndexWriter w)
just tries to configure things to keep the open file count lowish

assertAttributeReflection

public static <T> void assertAttributeReflection(AttributeImpl att,
                                                 Map<String,T> reflectedValues)
Checks some basic behaviour of an AttributeImpl

Parameters:
reflectedValues - contains a map with "AttributeClass#key" as values

keepFullyDeletedSegments

public static void keepFullyDeletedSegments(IndexWriter w)

createTempFile

public static File createTempFile(String prefix,
                                  String suffix,
                                  File directory)
                           throws IOException
insecure, fast version of File.createTempFile uses Random instead of SecureRandom.

Throws:
IOException

assertEquals

public static void assertEquals(TopDocs expected,
                                TopDocs actual)

cloneDocument

public static Document cloneDocument(Document doc1)

stringToCharSequence

public static CharSequence stringToCharSequence(String string,
                                                Random random)

bytesToCharSequence

public static CharSequence bytesToCharSequence(BytesRef ref,
                                               Random random)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


ArrayUtil

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class ArrayUtil

java.lang.Object
    extended by  org.apache.lucene.util.ArrayUtil

public final class ArrayUtil
extends Object

Methods for manipulating arrays.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
ArrayUtil()
Deprecated. This constructor was not intended to be public and should not be used. This class contains solely a static utility methods. It will be made private in Lucene 4.0
Method Summary
static boolean equals(char[] left, int offsetLeft, char[] right, int offsetRight, int length)
See if two array slices are the same.
static boolean equals(int[] left, int offsetLeft, int[] right, int offsetRight, int length)
See if two array slices are the same.
static int getShrinkSize(int currentSize, int targetSize, int bytesPerElement)
static boolean[] grow(boolean[] array)
static boolean[] grow(boolean[] array, int minSize)
static byte[] grow(byte[] array)
static byte[] grow(byte[] array, int minSize)
static char[] grow(char[] array)
static char[] grow(char[] array, int minSize)
static double[] grow(double[] array)
static double[] grow(double[] array, int minSize)
static float[] grow(float[] array)
static float[][] grow(float[][] array)
static float[][] grow(float[][] array, int minSize)
static float[] grow(float[] array, int minSize)
static int[] grow(int[] array)
static int[][] grow(int[][] array)
static int[][] grow(int[][] array, int minSize)
static int[] grow(int[] array, int minSize)
static long[] grow(long[] array)
static long[] grow(long[] array, int minSize)
static short[] grow(short[] array)
static short[] grow(short[] array, int minSize)
static int hashCode(byte[] array, int start, int end)
Returns hash of bytes in range start (inclusive) to end (inclusive)
static int hashCode(char[] array, int start, int end)
Returns hash of chars in range start (inclusive) to end (inclusive)
static
<T extends Comparable<? super T>>
void
insertionSort(T[] a)
Sorts the given array in natural order.
static
<T> void
insertionSort(T[] a, Comparator<? super T> comp)
Sorts the given array using the Comparator.
static
<T extends Comparable<? super T>>
void
insertionSort(T[] a, int fromIndex, int toIndex)
Sorts the given array slice in natural order.
static
<T> void
insertionSort(T[] a, int fromIndex, int toIndex, Comparator<? super T> comp)
Sorts the given array slice using the Comparator.
static
<T extends Comparable<? super T>>
void
mergeSort(T[] a)
Sorts the given array in natural order.
static
<T> void
mergeSort(T[] a, Comparator<? super T> comp)
Sorts the given array using the Comparator.
static
<T extends Comparable<? super T>>
void
mergeSort(T[] a, int fromIndex, int toIndex)
Sorts the given array slice in natural order.
static
<T> void
mergeSort(T[] a, int fromIndex, int toIndex, Comparator<? super T> comp)
Sorts the given array slice using the Comparator.
static int oversize(int minTargetSize, int bytesPerElement)
Returns an array size >= minTargetSize, generally over-allocating exponentially to achieve amortized linear-time cost as the array grows.
static int parseInt(char[] chars)
Parses the string argument as if it was an int value and returns the result.
static int parseInt(char[] chars, int offset, int len)
Parses a char array into an int.
static int parseInt(char[] chars, int offset, int len, int radix)
Parses the string argument as if it was an int value and returns the result.
static
<T extends Comparable<? super T>>
void
quickSort(T[] a)
Sorts the given array in natural order.
static
<T> void
quickSort(T[] a, Comparator<? super T> comp)
Sorts the given array using the Comparator.
static
<T extends Comparable<? super T>>
void
quickSort(T[] a, int fromIndex, int toIndex)
Sorts the given array slice in natural order.
static
<T> void
quickSort(T[] a, int fromIndex, int toIndex, Comparator<? super T> comp)
Sorts the given array slice using the Comparator.
static boolean[] shrink(boolean[] array, int targetSize)
static byte[] shrink(byte[] array, int targetSize)
static char[] shrink(char[] array, int targetSize)
static float[][] shrink(float[][] array, int targetSize)
static int[][] shrink(int[][] array, int targetSize)
static int[] shrink(int[] array, int targetSize)
static long[] shrink(long[] array, int targetSize)
static short[] shrink(short[] array, int targetSize)
static int[] toIntArray(Collection<Integer> ints)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ArrayUtil

@Deprecated
public ArrayUtil()
Deprecated. This constructor was not intended to be public and should not be used. This class contains solely a static utility methods. It will be made private in Lucene 4.0

Method Detail

parseInt

public static int parseInt(char[] chars)
                    throws NumberFormatException
Parses the string argument as if it was an int value and returns the result. Throws NumberFormatException if the string does not represent an int quantity.

Parameters:
chars - a string representation of an int quantity.
Returns:
int the value represented by the argument
Throws:
NumberFormatException - if the argument could not be parsed as an int quantity.

parseInt

public static int parseInt(char[] chars,
                           int offset,
                           int len)
                    throws NumberFormatException
Parses a char array into an int.

Parameters:
chars - the character array
offset - The offset into the array
len - The length
Returns:
the int
Throws:
NumberFormatException - if it can't parse

parseInt

public static int parseInt(char[] chars,
                           int offset,
                           int len,
                           int radix)
                    throws NumberFormatException
Parses the string argument as if it was an int value and returns the result. Throws NumberFormatException if the string does not represent an int quantity. The second argument specifies the radix to use when parsing the value.

Parameters:
chars - a string representation of an int quantity.
radix - the base to use for conversion.
Returns:
int the value represented by the argument
Throws:
NumberFormatException - if the argument could not be parsed as an int quantity.

oversize

public static int oversize(int minTargetSize,
                           int bytesPerElement)
Returns an array size >= minTargetSize, generally over-allocating exponentially to achieve amortized linear-time cost as the array grows. NOTE: this was originally borrowed from Python 2.4.2 listobject.c sources (attribution in LICENSE.txt), but has now been substantially changed based on discussions from java-dev thread with subject "Dynamic array reallocation algorithms", started on Jan 12 2010.

Parameters:
minTargetSize - Minimum required value to be returned.
bytesPerElement - Bytes used by each element of the array. See constants in RamUsageEstimator.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

getShrinkSize

public static int getShrinkSize(int currentSize,
                                int targetSize,
                                int bytesPerElement)

grow

public static short[] grow(short[] array,
                           int minSize)

grow

public static short[] grow(short[] array)

grow

public static float[] grow(float[] array,
                           int minSize)

grow

public static float[] grow(float[] array)

grow

public static double[] grow(double[] array,
                            int minSize)

grow

public static double[] grow(double[] array)

shrink

public static short[] shrink(short[] array,
                             int targetSize)

grow

public static int[] grow(int[] array,
                         int minSize)

grow

public static int[] grow(int[] array)

shrink

public static int[] shrink(int[] array,
                           int targetSize)

grow

public static long[] grow(long[] array,
                          int minSize)

grow

public static long[] grow(long[] array)

shrink

public static long[] shrink(long[] array,
                            int targetSize)

grow

public static byte[] grow(byte[] array,
                          int minSize)

grow

public static byte[] grow(byte[] array)

shrink

public static byte[] shrink(byte[] array,
                            int targetSize)

grow

public static boolean[] grow(boolean[] array,
                             int minSize)

grow

public static boolean[] grow(boolean[] array)

shrink

public static boolean[] shrink(boolean[] array,
                               int targetSize)

grow

public static char[] grow(char[] array,
                          int minSize)

grow

public static char[] grow(char[] array)

shrink

public static char[] shrink(char[] array,
                            int targetSize)

grow

public static int[][] grow(int[][] array,
                           int minSize)

grow

public static int[][] grow(int[][] array)

shrink

public static int[][] shrink(int[][] array,
                             int targetSize)

grow

public static float[][] grow(float[][] array,
                             int minSize)

grow

public static float[][] grow(float[][] array)

shrink

public static float[][] shrink(float[][] array,
                               int targetSize)

hashCode

public static int hashCode(char[] array,
                           int start,
                           int end)
Returns hash of chars in range start (inclusive) to end (inclusive)

hashCode

public static int hashCode(byte[] array,
                           int start,
                           int end)
Returns hash of bytes in range start (inclusive) to end (inclusive)

equals

public static boolean equals(char[] left,
                             int offsetLeft,
                             char[] right,
                             int offsetRight,
                             int length)
See if two array slices are the same.

Parameters:
left - The left array to compare
offsetLeft - The offset into the array. Must be positive
right - The right array to compare
offsetRight - the offset into the right array. Must be positive
length - The length of the section of the array to compare
Returns:
true if the two arrays, starting at their respective offsets, are equal
See Also:
Arrays.equals(char[], char[])

equals

public static boolean equals(int[] left,
                             int offsetLeft,
                             int[] right,
                             int offsetRight,
                             int length)
See if two array slices are the same.

Parameters:
left - The left array to compare
offsetLeft - The offset into the array. Must be positive
right - The right array to compare
offsetRight - the offset into the right array. Must be positive
length - The length of the section of the array to compare
Returns:
true if the two arrays, starting at their respective offsets, are equal
See Also:
Arrays.equals(char[], char[])

toIntArray

public static int[] toIntArray(Collection<Integer> ints)

quickSort

public static <T> void quickSort(T[] a,
                                 int fromIndex,
                                 int toIndex,
                                 Comparator<? super T> comp)
Sorts the given array slice using the Comparator. This method uses the quick sort algorithm, but falls back to insertion sort for small arrays.

Parameters:
fromIndex - start index (inclusive)
toIndex - end index (exclusive)

quickSort

public static <T> void quickSort(T[] a,
                                 Comparator<? super T> comp)
Sorts the given array using the Comparator. This method uses the quick sort algorithm, but falls back to insertion sort for small arrays.

quickSort

public static <T extends Comparable<? super T>> void quickSort(T[] a,
                                                               int fromIndex,
                                                               int toIndex)
Sorts the given array slice in natural order. This method uses the quick sort algorithm, but falls back to insertion sort for small arrays.

Parameters:
fromIndex - start index (inclusive)
toIndex - end index (exclusive)

quickSort

public static <T extends Comparable<? super T>> void quickSort(T[] a)
Sorts the given array in natural order. This method uses the quick sort algorithm, but falls back to insertion sort for small arrays.

mergeSort

public static <T> void mergeSort(T[] a,
                                 int fromIndex,
                                 int toIndex,
                                 Comparator<? super T> comp)
Sorts the given array slice using the Comparator. This method uses the merge sort algorithm, but falls back to insertion sort for small arrays.

Parameters:
fromIndex - start index (inclusive)
toIndex - end index (exclusive)

mergeSort

public static <T> void mergeSort(T[] a,
                                 Comparator<? super T> comp)
Sorts the given array using the Comparator. This method uses the merge sort algorithm, but falls back to insertion sort for small arrays.

mergeSort

public static <T extends Comparable<? super T>> void mergeSort(T[] a,
                                                               int fromIndex,
                                                               int toIndex)
Sorts the given array slice in natural order. This method uses the merge sort algorithm, but falls back to insertion sort for small arrays.

Parameters:
fromIndex - start index (inclusive)
toIndex - end index (exclusive)

mergeSort

public static <T extends Comparable<? super T>> void mergeSort(T[] a)
Sorts the given array in natural order. This method uses the merge sort algorithm, but falls back to insertion sort for small arrays.

insertionSort

public static <T> void insertionSort(T[] a,
                                     int fromIndex,
                                     int toIndex,
                                     Comparator<? super T> comp)
Sorts the given array slice using the Comparator. This method uses the insertion sort algorithm. It is only recommended to use this algorithm for partially sorted small arrays!

Parameters:
fromIndex - start index (inclusive)
toIndex - end index (exclusive)

insertionSort

public static <T> void insertionSort(T[] a,
                                     Comparator<? super T> comp)
Sorts the given array using the Comparator. This method uses the insertion sort algorithm. It is only recommended to use this algorithm for partially sorted small arrays!

insertionSort

public static <T extends Comparable<? super T>> void insertionSort(T[] a,
                                                                   int fromIndex,
                                                                   int toIndex)
Sorts the given array slice in natural order. This method uses the insertion sort algorithm. It is only recommended to use this algorithm for partially sorted small arrays!

Parameters:
fromIndex - start index (inclusive)
toIndex - end index (exclusive)

insertionSort

public static <T extends Comparable<? super T>> void insertionSort(T[] a)
Sorts the given array in natural order. This method uses the insertion sort algorithm. It is only recommended to use this algorithm for partially sorted small arrays!

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Attribute

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Interface Attribute

All Known Subinterfaces:
AllowLeadingWildcardAttribute, AnalyzerAttribute, BaseFormAttribute, BaseTokenStreamTestCase.CheckClearAttributesAttribute, BoostAttribute, CategoryAttribute, CharTermAttribute, DateResolutionAttribute, DefaultOperatorAttribute, DefaultPhraseSlopAttribute, FieldBoostMapAttribute, FieldDateResolutionMapAttribute, FlagsAttribute, FuzzyAttribute, InflectionAttribute, KeywordAttribute, LocaleAttribute, LowercaseExpandedTermsAttribute, MultiFieldAttribute, MultiTermRewriteMethodAttribute, OffsetAttribute, PartOfSpeechAttribute, PayloadAttribute, PositionIncrementAttribute, PositionIncrementsAttribute, PositionLengthAttribute, RangeCollatorAttribute, ReadingAttribute, ScriptAttribute, TermAttribute, TypeAttribute
All Known Implementing Classes:
AllowLeadingWildcardAttributeImpl, AnalyzerAttributeImpl, AttributeImpl, BaseFormAttributeImpl, BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl, BoostAttributeImpl, CategoryAttributeImpl, CharTermAttributeImpl, DateResolutionAttributeImpl, DefaultOperatorAttributeImpl, DefaultPhraseSlopAttributeImpl, FieldBoostMapAttributeImpl, FieldDateResolutionMapAttributeImpl, FlagsAttributeImpl, FuzzyAttributeImpl, InflectionAttributeImpl, KeywordAttributeImpl, LocaleAttributeImpl, LowercaseExpandedTermsAttributeImpl, MultiFieldAttributeImpl, MultiTermRewriteMethodAttributeImpl, OffsetAttributeImpl, PartOfSpeechAttributeImpl, PayloadAttributeImpl, PositionIncrementAttributeImpl, PositionIncrementsAttributeImpl, PositionLengthAttributeImpl, RangeCollatorAttributeImpl, ReadingAttributeImpl, ScriptAttributeImpl, TermAttributeImpl, Token, TypeAttributeImpl
public interface Attribute

Base interface for attributes.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AttributeImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class AttributeImpl

java.lang.Object
    extended by  org.apache.lucene.util.AttributeImpl
All Implemented Interfaces:
Serializable, Cloneable, Attribute
Direct Known Subclasses:
AllowLeadingWildcardAttributeImpl, AnalyzerAttributeImpl, BaseFormAttributeImpl, BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl, BoostAttributeImpl, CategoryAttributeImpl, CharTermAttributeImpl, DateResolutionAttributeImpl, DefaultOperatorAttributeImpl, DefaultPhraseSlopAttributeImpl, FieldBoostMapAttributeImpl, FieldDateResolutionMapAttributeImpl, FlagsAttributeImpl, FuzzyAttributeImpl, InflectionAttributeImpl, KeywordAttributeImpl, LocaleAttributeImpl, LowercaseExpandedTermsAttributeImpl, MultiFieldAttributeImpl, MultiTermRewriteMethodAttributeImpl, OffsetAttributeImpl, PartOfSpeechAttributeImpl, PayloadAttributeImpl, PositionIncrementAttributeImpl, PositionIncrementsAttributeImpl, PositionLengthAttributeImpl, RangeCollatorAttributeImpl, ReadingAttributeImpl, ScriptAttributeImpl, TypeAttributeImpl
public abstract class AttributeImpl
extends Object
implements Cloneable, Serializable, Attribute

Base class for Attributes that can be added to a AttributeSource.

Attributes are used to add data in a dynamic, yet type-safe way to a source of usually streamed objects, e. g. a TokenStream.

See Also:
Serialized Form

Field Summary
protected  boolean enableBackwards
Deprecated. this will be removed in Lucene 4.0.
Constructor Summary
AttributeImpl()
Method Summary
abstract void | clear() Clears the values in this AttributeImpl and resets it to its default value.
Object | clone() Shallow clone.
abstract void | copyTo(AttributeImpl target) Copies the values from this Attribute into the passed-in target attribute.
String | reflectAsString(boolean prependAttClass) This method returns the current attribute values as a string in the following format by calling the reflectWith(AttributeReflector) method: iff prependAttClass=true: "AttributeClass#key=value,AttributeClass#key=value" iff prependAttClass=false: "key=value,key=value"
void | reflectWith(AttributeReflector reflector) This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.
String | toString() Returns a string representation of the object.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

enableBackwards

@Deprecated
protected boolean enableBackwards
Deprecated. this will be removed in Lucene 4.0.
When true (default), if a subclass overrides toString(), its output is parsed by reflectWith(org.apache.lucene.util.AttributeReflector) and used for attribute reflection. This is added to enable attribute implementations from Lucene 2.9 or 3.0 to work correctly with reflection.

Constructor Detail

AttributeImpl

public AttributeImpl()
Method Detail

clear

public abstract void clear()
Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.

toString

public String toString()
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as return reflectAsString(false). In Lucene 4.0 this default implementation will be removed. The reason for this is the problem of CharTermAttributeImpl.toString() that must return a string representation of the term's char sequence.

It is recommeneded to use reflectAsString(boolean) or reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeImpl's internals.

Overrides:
toString in class Object

reflectAsString

public final String reflectAsString(boolean prependAttClass)
This method returns the current attribute values as a string in the following format by calling the reflectWith(AttributeReflector) method:
  • iff prependAttClass=true: "AttributeClass#key=value,AttributeClass#key=value"
  • iff prependAttClass=false: "key=value,key=value"

See Also:
reflectWith(AttributeReflector), toString()

reflectWith

public void reflectWith(AttributeReflector reflector)
This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.

The default implementation calls AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) for all non-static fields from the implementing class, using the field name as key and the field value as value. The Attribute class is also determined by reflection. Please note that the default implementation can only handle single-Attribute implementations.

Custom implementations look like this (e.g. for a combined attribute implementation):

   public void reflectWith(AttributeReflector reflector) {
     reflector.reflect(CharTermAttribute.class, "term", term());
     reflector.reflect(PositionIncrementAttribute.class, "positionIncrement", getPositionIncrement());
   }

If you implement this method, make sure that for each invocation, the same set of Attribute interfaces and keys are passed to AttributeReflector.reflect(java.lang.Class, java.lang.String, java.lang.Object) in the same order, but possibly different values. So don't automatically exclude e.g. null properties!

See Also:
reflectAsString(boolean)

copyTo

public abstract void copyTo(AttributeImpl target)
Copies the values from this Attribute into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports.

clone

public Object clone()
Shallow clone. Subclasses must override this if they need to clone any members deeply,

Overrides:
clone in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AttributeReflector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Interface AttributeReflector

public interface AttributeReflector

This interface is used to reflect contents of AttributeSource or AttributeImpl.

Method Summary
 void reflect(Class<? extends Attribute> attClass, String key, Object value)
This method gets called for every property in an AttributeImpl/AttributeSource passing the class name of the Attribute, a key and the actual value.

Method Detail

reflect

void reflect(Class<? extends Attribute> attClass,
             String key,
             Object value)
This method gets called for every property in an AttributeImpl/AttributeSource passing the class name of the Attribute, a key and the actual value. E.g., an invocation of CharTermAttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) would call this method once using org.apache.lucene.analysis.tokenattributes.CharTermAttribute.class as attribute class, "term" as key and the actual value as a String.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AttributeSource.AttributeFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class AttributeSource.AttributeFactory

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource.AttributeFactory
Direct Known Subclasses:
Token.TokenAttributeFactory
Enclosing class:
AttributeSource
public abstract static class AttributeSource.AttributeFactory
extends Object

An AttributeFactory creates instances of AttributeImpls.

Field Summary
static AttributeSource.AttributeFactory DEFAULT_ATTRIBUTE_FACTORY
This is the default factory that creates AttributeImpls using the class name of the supplied Attribute interface class by appending Impl to it.
Constructor Summary
AttributeSource.AttributeFactory()
Method Summary
abstract  AttributeImpl createAttributeInstance(Class<? extends Attribute> attClass)
returns an AttributeImpl for the supplied Attribute interface class.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_ATTRIBUTE_FACTORY

public static final AttributeSource.AttributeFactory DEFAULT_ATTRIBUTE_FACTORY
This is the default factory that creates AttributeImpls using the class name of the supplied Attribute interface class by appending Impl to it.

Constructor Detail

AttributeSource.AttributeFactory

public AttributeSource.AttributeFactory()
Method Detail

createAttributeInstance

public abstract AttributeImpl createAttributeInstance(Class<? extends Attribute> attClass)
returns an AttributeImpl for the supplied Attribute interface class.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AttributeSource

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class AttributeSource

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource
Direct Known Subclasses:
AbstractQueryConfig, TokenStream
public class AttributeSource
extends Object

An AttributeSource contains a list of different AttributeImpls, and methods to add and get them. There can only be a single instance of an attribute in the same AttributeSource instance. This is ensured by passing in the actual type of the Attribute (Class<Attribute>) to the addAttribute(Class), which then checks if an instance of that type is already present. If yes, it returns the instance, otherwise it creates a new instance and returns it.

Nested Class Summary
static class | AttributeSource.AttributeFactory An AttributeFactory creates instances of AttributeImpls.
static class | AttributeSource.State This class holds the state of an AttributeSource.
Constructor Summary
AttributeSource()
An AttributeSource using the default attribute factory AttributeSource.AttributeFactory.DEFAULT_ATTRIBUTE_FACTORY.
AttributeSource(AttributeSource.AttributeFactory factory)
An AttributeSource using the supplied AttributeSource.AttributeFactory for creating new Attribute instances.
AttributeSource(AttributeSource input)
An AttributeSource that uses the same attributes as the supplied one.
Method Summary
<A extends Attribute>
A
addAttribute(Class<A> attClass)
The caller must pass in a Class<? extends Attribute> value.
 void addAttributeImpl(AttributeImpl att)
Expert: Adds a custom AttributeImpl instance with one or more Attribute interfaces.
 AttributeSource.State captureState()
Captures the state of all Attributes.
 void clearAttributes()
Resets all Attributes in this AttributeSource by calling AttributeImpl.clear() on each Attribute implementation.
 AttributeSource cloneAttributes()
Performs a clone of all AttributeImpl instances returned in a new AttributeSource instance.
 void copyTo(AttributeSource target)
Copies the contents of this AttributeSource to the given target AttributeSource.
 boolean equals(Object obj)
<A extends Attribute>
A
getAttribute(Class<A> attClass)
The caller must pass in a Class<? extends Attribute> value.
 Iterator<Class<? extends Attribute>> getAttributeClassesIterator()
Returns a new iterator that iterates the attribute classes in the same order they were added in.
 AttributeSource.AttributeFactory getAttributeFactory()
returns the used AttributeFactory.
 Iterator<AttributeImpl> getAttributeImplsIterator()
Returns a new iterator that iterates all unique Attribute implementations.
 boolean hasAttribute(Class<? extends Attribute> attClass)
The caller must pass in a Class<? extends Attribute> value.
 boolean hasAttributes()
Returns true, iff this AttributeSource has any attributes
 int hashCode()
 String reflectAsString(boolean prependAttClass)
This method returns the current attribute values as a string in the following format by calling the reflectWith(AttributeReflector) method: iff prependAttClass=true: "AttributeClass#key=value,AttributeClass#key=value" iff prependAttClass=false: "key=value,key=value"
 void reflectWith(AttributeReflector reflector)
This method is for introspection of attributes, it should simply add the key/values this AttributeSource holds to the given AttributeReflector.
 void restoreState(AttributeSource.State state)
Restores this state by copying the values of all attribute implementations that this state contains into the attributes implementations of the targetStream.
 String toString()
Returns a string representation of the object.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

AttributeSource

public AttributeSource()
An AttributeSource using the default attribute factory AttributeSource.AttributeFactory.DEFAULT_ATTRIBUTE_FACTORY.

AttributeSource

public AttributeSource(AttributeSource input)
An AttributeSource that uses the same attributes as the supplied one.

AttributeSource

public AttributeSource(AttributeSource.AttributeFactory factory)
An AttributeSource using the supplied AttributeSource.AttributeFactory for creating new Attribute instances.

Method Detail

getAttributeFactory

public AttributeSource.AttributeFactory getAttributeFactory()
returns the used AttributeFactory.

getAttributeClassesIterator

public Iterator<Class<? extends Attribute>> getAttributeClassesIterator()
Returns a new iterator that iterates the attribute classes in the same order they were added in.

getAttributeImplsIterator

public Iterator<AttributeImpl> getAttributeImplsIterator()
Returns a new iterator that iterates all unique Attribute implementations. This iterator may contain less entries that getAttributeClassesIterator(), if one instance implements more than one Attribute interface.

addAttributeImpl

public void addAttributeImpl(AttributeImpl att)
Expert: Adds a custom AttributeImpl instance with one or more Attribute interfaces.

Please note: It is not guaranteed, that att is added to the AttributeSource, because the provided attributes may already exist. You should always retrieve the wanted attributes using getAttribute(java.lang.Class ) after adding with this method and cast to your class. The recommended way to use custom implementations is using an AttributeSource.AttributeFactory.

addAttribute

public <A extends Attribute> A addAttribute(Class<A> attClass)
The caller must pass in a Class<? extends Attribute> value. This method first checks if an instance of that class is already in this AttributeSource and returns it. Otherwise a new instance is created, added to this AttributeSource and returned.

hasAttributes

public boolean hasAttributes()
Returns true, iff this AttributeSource has any attributes

hasAttribute

public boolean hasAttribute(Class<? extends Attribute> attClass)
The caller must pass in a Class<? extends Attribute> value. Returns true, iff this AttributeSource contains the passed-in Attribute.

getAttribute

public <A extends Attribute> A getAttribute(Class<A> attClass)
The caller must pass in a Class<? extends Attribute> value. Returns the instance of the passed in Attribute contained in this AttributeSource

Throws:
IllegalArgumentException - if this AttributeSource does not contain the Attribute. It is recommended to always use addAttribute(java.lang.Class ) even in consumers of TokenStreams, because you cannot know if a specific TokenStream really uses a specific Attribute. addAttribute(java.lang.Class ) will automatically make the attribute available. If you want to only use the attribute, if it is available (to optimize consuming), use hasAttribute(java.lang.Class).

clearAttributes

public void clearAttributes()
Resets all Attributes in this AttributeSource by calling AttributeImpl.clear() on each Attribute implementation.

captureState

public AttributeSource.State captureState()
Captures the state of all Attributes. The return value can be passed to restoreState(org.apache.lucene.util.AttributeSource.State) to restore the state of this or another AttributeSource.

restoreState

public void restoreState(AttributeSource.State state)
Restores this state by copying the values of all attribute implementations that this state contains into the attributes implementations of the targetStream. The targetStream must contain a corresponding instance for each argument contained in this state (e.g. it is not possible to restore the state of an AttributeSource containing a TermAttribute into a AttributeSource using a Token instance as implementation).

Note that this method does not affect attributes of the targetStream that are not contained in this state. In other words, if for example the targetStream contains an OffsetAttribute, but this state doesn't, then the value of the OffsetAttribute remains unchanged. It might be desirable to reset its value to the default, in which case the caller should first call clearAttributes() on the targetStream.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object.

WARNING: For backwards compatibility this method is implemented as in Lucene 2.9/3.0. In Lucene 4.0 this default implementation will be removed.

It is recommeneded to use reflectAsString(boolean) or reflectWith(org.apache.lucene.util.AttributeReflector) to get a well-defined output of AttributeSource's internals.

Overrides:
toString in class Object

reflectAsString

public final String reflectAsString(boolean prependAttClass)
This method returns the current attribute values as a string in the following format by calling the reflectWith(AttributeReflector) method:
  • iff prependAttClass=true: "AttributeClass#key=value,AttributeClass#key=value"
  • iff prependAttClass=false: "key=value,key=value"

See Also:
reflectWith(AttributeReflector)

reflectWith

public final void reflectWith(AttributeReflector reflector)
This method is for introspection of attributes, it should simply add the key/values this AttributeSource holds to the given AttributeReflector.

This method iterates over all Attribute implementations and calls the corresponding AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector) method.

See Also:
AttributeImpl.reflectWith(org.apache.lucene.util.AttributeReflector)

cloneAttributes

public AttributeSource cloneAttributes()
Performs a clone of all AttributeImpl instances returned in a new AttributeSource instance. This method can be used to e.g. create another TokenStream with exactly the same attributes (using AttributeSource(AttributeSource)). You can also use it as a (non-performant) replacement for captureState(), if you need to look into / modify the captured state.

copyTo

public final void copyTo(AttributeSource target)
Copies the contents of this AttributeSource to the given target AttributeSource. The given instance has to provide all Attributes this instance contains. The actual attribute implementations must be identical in both AttributeSource instances; ideally both AttributeSource instances should use the same AttributeSource.AttributeFactory. You can use this method as a replacement for restoreState(org.apache.lucene.util.AttributeSource.State), if you use cloneAttributes() instead of captureState().

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


AttributeSource.State

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class AttributeSource.State

java.lang.Object
    extended by  org.apache.lucene.util.AttributeSource.State
All Implemented Interfaces:
Cloneable
Enclosing class:
AttributeSource
public static final class AttributeSource.State
extends Object
implements Cloneable

This class holds the state of an AttributeSource.

See Also:
AttributeSource.captureState(), AttributeSource.restoreState(org.apache.lucene.util.AttributeSource.State)

Constructor Summary
AttributeSource.State()
Method Summary
 Object clone()
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

AttributeSource.State

public AttributeSource.State()
Method Detail

clone

public Object clone()
Overrides:
clone in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Bits

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Interface Bits

All Known Implementing Classes:
Bits.MatchAllBits, Bits.MatchNoBits, BitVector, FixedBitSet, OpenBitSet, OpenBitSetDISI
public interface Bits

Interface for Bitset-like structures.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | Bits.MatchAllBits Bits impl of the specified length with all bits set.
static class | Bits.MatchNoBits Bits impl of the specified length with no bits set.
Field Summary
static Bits[] EMPTY_ARRAY
Method Summary
boolean | get(int index)
int | length()

Field Detail

EMPTY_ARRAY

static final Bits[] EMPTY_ARRAY
Method Detail

get

boolean get(int index)

length

int length()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Bits.MatchAllBits

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class Bits.MatchAllBits

java.lang.Object
    extended by  org.apache.lucene.util.Bits.MatchAllBits
All Implemented Interfaces:
Bits
Enclosing interface:
Bits
public static class Bits.MatchAllBits
extends Object
implements Bits

Bits impl of the specified length with all bits set.

Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.Bits
Bits.MatchAllBits, Bits.MatchNoBits
Field Summary
Fields inherited from interface org.apache.lucene.util.Bits
EMPTY_ARRAY
Constructor Summary
Bits.MatchAllBits(int len)
Method Summary
boolean | get(int index)
int | length()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Bits.MatchAllBits

public Bits.MatchAllBits(int len)
Method Detail

get

public boolean get(int index)
Specified by:
get in interface Bits

length

public int length()
Specified by:
length in interface Bits
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Bits.MatchNoBits

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class Bits.MatchNoBits

java.lang.Object
    extended by  org.apache.lucene.util.Bits.MatchNoBits
All Implemented Interfaces:
Bits
Enclosing interface:
Bits
public static class Bits.MatchNoBits
extends Object
implements Bits

Bits impl of the specified length with no bits set.

Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.Bits
Bits.MatchAllBits, Bits.MatchNoBits
Field Summary
Fields inherited from interface org.apache.lucene.util.Bits
EMPTY_ARRAY
Constructor Summary
Bits.MatchNoBits(int len)
Method Summary
boolean | get(int index)
int | length()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Bits.MatchNoBits

public Bits.MatchNoBits(int len)
Method Detail

get

public boolean get(int index)
Specified by:
get in interface Bits

length

public int length()
Specified by:
length in interface Bits
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BitUtil

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class BitUtil

java.lang.Object
    extended by  org.apache.lucene.util.BitUtil

public final class BitUtil
extends Object

A variety of high efficiency bit twiddling routines.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
static byte[] | nlzTable table of number of leading zeros in a byte
static byte[] | ntzTable table of number of trailing zeros in a byte
Method Summary
static boolean | isPowerOfTwo(int v) returns true if v is a power of two or zero
static boolean | isPowerOfTwo(long v) returns true if v is a power of two or zero
static int | nextHighestPowerOfTwo(int v) returns the next highest power of two, or the current value if it's already a power of two or zero
static long | nextHighestPowerOfTwo(long v) returns the next highest power of two, or the current value if it's already a power of two or zero
static int | nlz(long x) Returns the number of leading zero bits.
static int | ntz(int val) Returns number of trailing zeros in a 32 bit int value.
static int | ntz(long val) Returns number of trailing zeros in a 64 bit long value.
static int | ntz2(long x) returns 0 based index of first set bit (only works for x!=0) This is an alternate implementation of ntz()
static int | ntz3(long x) returns 0 based index of first set bit This is an alternate implementation of ntz()
static long | pop_andnot(long[] A, long[] B, int wordOffset, int numWords) Returns the popcount or cardinality of A & ~B Neither array is modified.
static long | pop_array(long[] A, int wordOffset, int numWords) Returns the number of set bits in an array of longs.
static long | pop_intersect(long[] A, long[] B, int wordOffset, int numWords) Returns the popcount or cardinality of the two sets after an intersection.
static long | pop_union(long[] A, long[] B, int wordOffset, int numWords) Returns the popcount or cardinality of the union of two sets.
static long | pop_xor(long[] A, long[] B, int wordOffset, int numWords)
static int | pop(long x) Returns the number of bits set in the long
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

ntzTable

public static final byte[] ntzTable
table of number of trailing zeros in a byte

nlzTable

public static final byte[] nlzTable
table of number of leading zeros in a byte

Method Detail

pop

public static int pop(long x)
Returns the number of bits set in the long

pop_array

public static long pop_array(long[] A,
                             int wordOffset,
                             int numWords)
Returns the number of set bits in an array of longs.

pop_intersect

public static long pop_intersect(long[] A,
                                 long[] B,
                                 int wordOffset,
                                 int numWords)
Returns the popcount or cardinality of the two sets after an intersection. Neither array is modified.

pop_union

public static long pop_union(long[] A,
                             long[] B,
                             int wordOffset,
                             int numWords)
Returns the popcount or cardinality of the union of two sets. Neither array is modified.

pop_andnot

public static long pop_andnot(long[] A,
                              long[] B,
                              int wordOffset,
                              int numWords)
Returns the popcount or cardinality of A & ~B Neither array is modified.

pop_xor

public static long pop_xor(long[] A,
                           long[] B,
                           int wordOffset,
                           int numWords)

ntz

public static int ntz(long val)
Returns number of trailing zeros in a 64 bit long value.

ntz

public static int ntz(int val)
Returns number of trailing zeros in a 32 bit int value.

ntz2

public static int ntz2(long x)
returns 0 based index of first set bit (only works for x!=0)
This is an alternate implementation of ntz()

ntz3

public static int ntz3(long x)
returns 0 based index of first set bit
This is an alternate implementation of ntz()

nlz

public static int nlz(long x)
Returns the number of leading zero bits.

isPowerOfTwo

public static boolean isPowerOfTwo(int v)
returns true if v is a power of two or zero

isPowerOfTwo

public static boolean isPowerOfTwo(long v)
returns true if v is a power of two or zero

nextHighestPowerOfTwo

public static int nextHighestPowerOfTwo(int v)
returns the next highest power of two, or the current value if it's already a power of two or zero

nextHighestPowerOfTwo

public static long nextHighestPowerOfTwo(long v)
returns the next highest power of two, or the current value if it's already a power of two or zero

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BitVector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class BitVector

java.lang.Object
    extended by  org.apache.lucene.util.BitVector
All Implemented Interfaces:
Cloneable, Bits
public final class BitVector
extends Object
implements Cloneable, Bits

Optimized implementation of a vector of bits. This is more-or-less like java.util.BitSet, but also includes the following:

  • a count() method, which efficiently computes the number of one bits;
  • optimized read from and write to disk;
  • inlinable get() method;
  • store and load, as bit set or d-gaps, depending on sparseness;

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.Bits
Bits.MatchAllBits, Bits.MatchNoBits
Field Summary
Fields inherited from interface org.apache.lucene.util.Bits
EMPTY_ARRAY
Constructor Summary
BitVector(Directory d, String name)
Constructs a bit vector from the file name in Directory d, as written by the write(org.apache.lucene.store.Directory, java.lang.String) method.
BitVector(int n)
Constructs a vector capable of holding n bits.
Method Summary
 void clear(int bit)
Sets the value of bit to zero.
 Object clone()
 int count()
Returns the total number of one bits in this vector.
 boolean get(int bit)
Returns true if bit is one and false if it is zero.
 boolean getAndSet(int bit)
Sets the value of bit to true, and returns true if bit was already set
 int getRecomputedCount()
For testing
 int length()
Returns the number of bits in this vector.
 void set(int bit)
Sets the value of bit to one.
 int size()
Returns the number of bits in this vector.
 void write(Directory d, String name)
Writes this vector to the file name in Directory d, in a format that can be read by the constructor BitVector(Directory, String).
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BitVector

public BitVector(int n)
Constructs a vector capable of holding n bits.

BitVector

public BitVector(Directory d,
                 String name)
          throws IOException
Constructs a bit vector from the file name in Directory d, as written by the write(org.apache.lucene.store.Directory, java.lang.String) method.

Throws:
IOException
Method Detail

clone

public Object clone()
Overrides:
clone in class Object

set

public final void set(int bit)
Sets the value of bit to one.

getAndSet

public final boolean getAndSet(int bit)
Sets the value of bit to true, and returns true if bit was already set

clear

public final void clear(int bit)
Sets the value of bit to zero.

get

public final boolean get(int bit)
Returns true if bit is one and false if it is zero.

Specified by:
get in interface Bits

size

public final int size()
Returns the number of bits in this vector. This is also one greater than the number of the largest valid bit number.

length

public final int length()
Returns the number of bits in this vector. This is also one greater than the number of the largest valid bit number.

Specified by:
length in interface Bits

count

public final int count()
Returns the total number of one bits in this vector. This is efficiently computed and cached, so that, if the vector is not changed, no recomputation is done for repeated calls.

getRecomputedCount

public final int getRecomputedCount()
For testing

write

public final void write(Directory d,
                        String name)
                 throws IOException
Writes this vector to the file name in Directory d, in a format that can be read by the constructor BitVector(Directory, String).

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ByteBlockPool.Allocator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class ByteBlockPool.Allocator

java.lang.Object
    extended by  org.apache.lucene.util.ByteBlockPool.Allocator
Direct Known Subclasses:
ByteBlockPool.DirectAllocator, ByteBlockPool.DirectTrackingAllocator, RecyclingByteBlockAllocator
Enclosing class:
ByteBlockPool
public abstract static class ByteBlockPool.Allocator
extends Object

Abstract class for allocating and freeing byte blocks.

Field Summary
protected  int blockSize
Constructor Summary
ByteBlockPool.Allocator(int blockSize)
Method Summary
byte[] | getByteBlock()
abstract void | recycleByteBlocks(byte[][] blocks, int start, int end)
void | recycleByteBlocks(List<byte[]> blocks)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

blockSize

protected final int blockSize
Constructor Detail

ByteBlockPool.Allocator

public ByteBlockPool.Allocator(int blockSize)
Method Detail

recycleByteBlocks

public abstract void recycleByteBlocks(byte[][] blocks,
                                       int start,
                                       int end)

recycleByteBlocks

public void recycleByteBlocks(List<byte[]> blocks)

getByteBlock

public byte[] getByteBlock()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ByteBlockPool.DirectAllocator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class ByteBlockPool.DirectAllocator

java.lang.Object
    extended by  org.apache.lucene.util.ByteBlockPool.Allocator
        extended by  org.apache.lucene.util.ByteBlockPool.DirectAllocator
Enclosing class:
ByteBlockPool
public static final class ByteBlockPool.DirectAllocator
extends ByteBlockPool.Allocator

A simple ByteBlockPool.Allocator that never recycles.

Field Summary
Fields inherited from class org.apache.lucene.util.ByteBlockPool.Allocator
blockSize
Constructor Summary
ByteBlockPool.DirectAllocator()
ByteBlockPool.DirectAllocator(int blockSize)
Method Summary
 void recycleByteBlocks(byte[][] blocks, int start, int end)
Methods inherited from class org.apache.lucene.util.ByteBlockPool.Allocator
getByteBlock, recycleByteBlocks
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ByteBlockPool.DirectAllocator

public ByteBlockPool.DirectAllocator()

ByteBlockPool.DirectAllocator

public ByteBlockPool.DirectAllocator(int blockSize)
Method Detail

recycleByteBlocks

public void recycleByteBlocks(byte[][] blocks,
                              int start,
                              int end)
Specified by:
recycleByteBlocks in class ByteBlockPool.Allocator
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ByteBlockPool.DirectTrackingAllocator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class ByteBlockPool.DirectTrackingAllocator

java.lang.Object
    extended by  org.apache.lucene.util.ByteBlockPool.Allocator
        extended by  org.apache.lucene.util.ByteBlockPool.DirectTrackingAllocator
Enclosing class:
ByteBlockPool
public static class ByteBlockPool.DirectTrackingAllocator
extends ByteBlockPool.Allocator

A simple ByteBlockPool.Allocator that never recycles, but tracks how much total RAM is in use.

Field Summary
Fields inherited from class org.apache.lucene.util.ByteBlockPool.Allocator
blockSize
Constructor Summary
ByteBlockPool.DirectTrackingAllocator(AtomicLong bytesUsed)
ByteBlockPool.DirectTrackingAllocator(int blockSize, AtomicLong bytesUsed)
Method Summary
byte[] | getByteBlock()
void | recycleByteBlocks(byte[][] blocks, int start, int end)
Methods inherited from class org.apache.lucene.util.ByteBlockPool.Allocator
recycleByteBlocks
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ByteBlockPool.DirectTrackingAllocator

public ByteBlockPool.DirectTrackingAllocator(AtomicLong bytesUsed)

ByteBlockPool.DirectTrackingAllocator

public ByteBlockPool.DirectTrackingAllocator(int blockSize,
                                             AtomicLong bytesUsed)
Method Detail

getByteBlock

public byte[] getByteBlock()
Overrides:
getByteBlock in class ByteBlockPool.Allocator

recycleByteBlocks

public void recycleByteBlocks(byte[][] blocks,
                              int start,
                              int end)
Specified by:
recycleByteBlocks in class ByteBlockPool.Allocator
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ByteBlockPool

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class ByteBlockPool

java.lang.Object
    extended by  org.apache.lucene.util.ByteBlockPool

public final class ByteBlockPool
extends Object

Class that Posting and PostingVector use to write byte streams into shared fixed-size byte[] arrays. The idea is to allocate slices of increasing lengths For example, the first slice is 5 bytes, the next slice is 14, etc. We start by writing our bytes into the first 5 bytes. When we hit the end of the slice, we allocate the next slice and then write the address of the new slice into the last 4 bytes of the previous slice (the "forwarding address"). Each slice is filled with 0's initially, and we mark the end with a non-zero byte. This way the methods that are writing into the slice don't need to record its length and instead allocate a new slice once they hit a non-zero byte.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
static class | ByteBlockPool.Allocator Abstract class for allocating and freeing byte blocks.
static class | ByteBlockPool.DirectAllocator A simple ByteBlockPool.Allocator that never recycles.
static class | ByteBlockPool.DirectTrackingAllocator A simple ByteBlockPool.Allocator that never recycles, but tracks how much total RAM is in use.
Field Summary
byte[] | buffer
byte[][] | buffers
static int | BYTE_BLOCK_MASK
static int | BYTE_BLOCK_SHIFT
static int | BYTE_BLOCK_SIZE
int | byteOffset
int | byteUpto
static int | FIRST_LEVEL_SIZE
static int[] | levelSizeArray
static int[] | nextLevelArray
Constructor Summary
ByteBlockPool(ByteBlockPool.Allocator allocator)
Method Summary
int | allocSlice(byte[] slice, int upto)
void | copy(BytesRef bytes) Copies the given BytesRef at the current positions ( byteUpto across buffer boundaries
BytesRef | copyFrom(BytesRef bytes)
void | dropBuffersAndReset()
int | newSlice(int size)
void | nextBuffer()
void | reset()
BytesRef | setBytesRef(BytesRef term, int textStart)
void | writePool(DataOutput out) Writes the pools content to the given DataOutput
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

BYTE_BLOCK_SHIFT

public static final int BYTE_BLOCK_SHIFT
See Also:
Constant Field Values

BYTE_BLOCK_SIZE

public static final int BYTE_BLOCK_SIZE
See Also:
Constant Field Values

BYTE_BLOCK_MASK

public static final int BYTE_BLOCK_MASK
See Also:
Constant Field Values

buffers

public byte[][] buffers

byteUpto

public int byteUpto

buffer

public byte[] buffer

byteOffset

public int byteOffset

nextLevelArray

public static final int[] nextLevelArray

levelSizeArray

public static final int[] levelSizeArray

FIRST_LEVEL_SIZE

public static final int FIRST_LEVEL_SIZE
Constructor Detail

ByteBlockPool

public ByteBlockPool(ByteBlockPool.Allocator allocator)
Method Detail

dropBuffersAndReset

public void dropBuffersAndReset()

reset

public void reset()

nextBuffer

public void nextBuffer()

newSlice

public int newSlice(int size)

allocSlice

public int allocSlice(byte[] slice,
                      int upto)

setBytesRef

public final BytesRef setBytesRef(BytesRef term,
                                  int textStart)

copy

public final void copy(BytesRef bytes)
Copies the given BytesRef at the current positions ( byteUpto across buffer boundaries

copyFrom

public final BytesRef copyFrom(BytesRef bytes)

writePool

public final void writePool(DataOutput out)
                     throws IOException
Writes the pools content to the given DataOutput

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BytesRef

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class BytesRef

java.lang.Object
    extended by  org.apache.lucene.util.BytesRef
All Implemented Interfaces:
Cloneable, Comparable<BytesRef>
public final class BytesRef
extends Object
implements Comparable<BytesRef>, Cloneable

Represents byte[], as a slice (offset + length) into an existing byte[].

Important note: Unless otherwise noted, Lucene uses this class to represent terms that are encoded as UTF8 bytes in the index. To convert them to a Java String (which is UTF16), use utf8ToString(). Using code like new String(bytes, offset, length) to do this is wrong, as it does not respect the correct character set and may return wrong results (depending on the platform's defaults)!

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
byte[] | bytes The contents of the BytesRef.
static byte[] | EMPTY_BYTES An empty byte array for convenience
int | length Length of used bytes.
int | offset Offset of first valid byte.
Constructor Summary
BytesRef()
Create a BytesRef with EMPTY_BYTES
BytesRef(byte[] bytes)
This instance will directly reference bytes w/o making a copy.
BytesRef(byte[] bytes, int offset, int length)
This instance will directly reference bytes w/o making a copy.
BytesRef(CharSequence text)
Initialize the byte[] from the UTF8 bytes for the provided String.
BytesRef(int capacity)
Create a BytesRef pointing to a new array of size capacity.
Method Summary
void | append(BytesRef other) Appends the bytes from the given BytesRef
boolean | bytesEquals(BytesRef other) Expert: compares the bytes against another BytesRef, returning true if the bytes are equal.
BytesRef | clone()
int | compareTo(BytesRef other) Unsigned byte order comparison
void | copyBytes(BytesRef other) Copies the bytes from the given BytesRef
void | copyChars(char[] text, int offset, int length) Copies the UTF8 bytes for this string.
void | copyChars(CharSequence text) Copies the UTF8 bytes for this string.
static BytesRef | deepCopyOf(BytesRef other) Creates a new BytesRef that points to a copy of the bytes from other
boolean | endsWith(BytesRef other)
boolean | equals(Object other)
static Comparator<BytesRef> | getUTF8SortedAsUnicodeComparator()
static Comparator<BytesRef> | getUTF8SortedAsUTF16Comparator()
void | grow(int newLength) Used to grow the reference array.
int | hashCode() Calculates the hash code as required by TermsHash during indexing.
boolean | startsWith(BytesRef other)
String | toString() Returns hex encoded bytes, eg [0x6c 0x75 0x63 0x65 0x6e 0x65]
String | utf8ToString() Interprets stored bytes as UTF8 bytes, returning the resulting string
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

EMPTY_BYTES

public static final byte[] EMPTY_BYTES
An empty byte array for convenience

bytes

public byte[] bytes
The contents of the BytesRef. Should never be null.

offset

public int offset
Offset of first valid byte.

length

public int length
Length of used bytes.

Constructor Detail

BytesRef

public BytesRef()
Create a BytesRef with EMPTY_BYTES

BytesRef

public BytesRef(byte[] bytes,
                int offset,
                int length)
This instance will directly reference bytes w/o making a copy. bytes should not be null.

BytesRef

public BytesRef(byte[] bytes)
This instance will directly reference bytes w/o making a copy. bytes should not be null

BytesRef

public BytesRef(int capacity)
Create a BytesRef pointing to a new array of size capacity. Offset and length will both be zero.

BytesRef

public BytesRef(CharSequence text)
Initialize the byte[] from the UTF8 bytes for the provided String.

Parameters:
text - This must be well-formed unicode text, with no unpaired surrogates.
Method Detail

copyChars

public void copyChars(CharSequence text)
Copies the UTF8 bytes for this string.

Parameters:
text - Must be well-formed unicode text, with no unpaired surrogates.

copyChars

public void copyChars(char[] text,
                      int offset,
                      int length)
Copies the UTF8 bytes for this string.

Parameters:
text - Must be well-formed unicode text, with no unpaired surrogates.

bytesEquals

public boolean bytesEquals(BytesRef other)
Expert: compares the bytes against another BytesRef, returning true if the bytes are equal.

Parameters:
other - Another BytesRef, should not be null.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

clone

public BytesRef clone()
Overrides:
clone in class Object

startsWith

public boolean startsWith(BytesRef other)

endsWith

public boolean endsWith(BytesRef other)

hashCode

public int hashCode()
Calculates the hash code as required by TermsHash during indexing.

It is defined as:

  int hash = 0;
  for (int i = offset; i < offset + length; i++) {
    hash = 31*hash + bytes[i];
  }

Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

utf8ToString

public String utf8ToString()
Interprets stored bytes as UTF8 bytes, returning the resulting string

toString

public String toString()
Returns hex encoded bytes, eg [0x6c 0x75 0x63 0x65 0x6e 0x65]

Overrides:
toString in class Object

copyBytes

public void copyBytes(BytesRef other)
Copies the bytes from the given BytesRef

NOTE: if this would exceed the array size, this method creates a new reference array.

append

public void append(BytesRef other)
Appends the bytes from the given BytesRef

NOTE: if this would exceed the array size, this method creates a new reference array.

grow

public void grow(int newLength)
Used to grow the reference array. In general this should not be used as it does not take the offset into account.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

compareTo

public int compareTo(BytesRef other)
Unsigned byte order comparison

Specified by:
compareTo in interface Comparable<BytesRef>

getUTF8SortedAsUnicodeComparator

public static Comparator<BytesRef> getUTF8SortedAsUnicodeComparator()

getUTF8SortedAsUTF16Comparator

public static Comparator<BytesRef> getUTF8SortedAsUTF16Comparator()

deepCopyOf

public static BytesRef deepCopyOf(BytesRef other)
Creates a new BytesRef that points to a copy of the bytes from other

The returned BytesRef will have a length of other.length and an offset of zero.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BytesRefHash.BytesStartArray

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class BytesRefHash.BytesStartArray

java.lang.Object
    extended by  org.apache.lucene.util.BytesRefHash.BytesStartArray
Direct Known Subclasses:
BytesRefHash.DirectBytesStartArray, BytesRefHash.TrackingDirectBytesStartArray
Enclosing class:
BytesRefHash
public abstract static class BytesRefHash.BytesStartArray
extends Object

Manages allocation of the per-term addresses.

Constructor Summary
BytesRefHash.BytesStartArray()
Method Summary
abstract AtomicLong | bytesUsed() A AtomicLong reference holding the number of bytes used by this BytesRefHash.BytesStartArray.
abstract int[] | clear() clears the BytesRefHash.BytesStartArray and returns the cleared instance.
abstract int[] | grow() Grows the BytesRefHash.BytesStartArray
abstract int[] | init() Initializes the BytesStartArray.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BytesRefHash.BytesStartArray

public BytesRefHash.BytesStartArray()
Method Detail

init

public abstract int[] init()
Initializes the BytesStartArray. This call will allocate memory

Returns:
the initialized bytes start array

grow

public abstract int[] grow()
Grows the BytesRefHash.BytesStartArray

Returns:
the grown array

clear

public abstract int[] clear()
clears the BytesRefHash.BytesStartArray and returns the cleared instance.

Returns:
the cleared instance, this might be null

bytesUsed

public abstract AtomicLong bytesUsed()
A AtomicLong reference holding the number of bytes used by this BytesRefHash.BytesStartArray. The BytesRefHash uses this reference to track it memory usage

Returns:
a AtomicLong reference holding the number of bytes used by this BytesRefHash.BytesStartArray.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BytesRefHash.DirectBytesStartArray

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class BytesRefHash.DirectBytesStartArray

java.lang.Object
    extended by  org.apache.lucene.util.BytesRefHash.BytesStartArray
        extended by  org.apache.lucene.util.BytesRefHash.DirectBytesStartArray
Enclosing class:
BytesRefHash
public static class BytesRefHash.DirectBytesStartArray
extends BytesRefHash.BytesStartArray

A simple BytesRefHash.BytesStartArray that tracks memory allocation using a private AtomicLong instance.

Field Summary
protected  int initSize
Constructor Summary
BytesRefHash.DirectBytesStartArray(int initSize)
Method Summary
AtomicLong | bytesUsed() A AtomicLong reference holding the number of bytes used by this BytesRefHash.BytesStartArray.
int[] | clear() clears the BytesRefHash.BytesStartArray and returns the cleared instance.
int[] | grow() Grows the BytesRefHash.BytesStartArray
int[] | init() Initializes the BytesStartArray.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

initSize

protected final int initSize
Constructor Detail

BytesRefHash.DirectBytesStartArray

public BytesRefHash.DirectBytesStartArray(int initSize)
Method Detail

clear

public int[] clear()
Description copied from class: BytesRefHash.BytesStartArray
clears the BytesRefHash.BytesStartArray and returns the cleared instance.

Specified by:
clear in class BytesRefHash.BytesStartArray
Returns:
the cleared instance, this might be null

grow

public int[] grow()
Description copied from class: BytesRefHash.BytesStartArray
Grows the BytesRefHash.BytesStartArray

Specified by:
grow in class BytesRefHash.BytesStartArray
Returns:
the grown array

init

public int[] init()
Description copied from class: BytesRefHash.BytesStartArray
Initializes the BytesStartArray. This call will allocate memory

Specified by:
init in class BytesRefHash.BytesStartArray
Returns:
the initialized bytes start array

bytesUsed

public AtomicLong bytesUsed()
Description copied from class: BytesRefHash.BytesStartArray
A AtomicLong reference holding the number of bytes used by this BytesRefHash.BytesStartArray. The BytesRefHash uses this reference to track it memory usage

Specified by:
bytesUsed in class BytesRefHash.BytesStartArray
Returns:
a AtomicLong reference holding the number of bytes used by this BytesRefHash.BytesStartArray.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BytesRefHash

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class BytesRefHash

java.lang.Object
    extended by  org.apache.lucene.util.BytesRefHash

public final class BytesRefHash
extends Object

BytesRefHash is a special purpose hash-map like data-structure optimized for BytesRef instances. BytesRefHash maintains mappings of byte arrays to ordinal (Map) storing the hashed bytes efficiently in continuous storage. The mapping to the ordinal is encapsulated inside BytesRefHash and is guaranteed to be increased for each added BytesRef.

Note: The maximum capacity BytesRef instance passed to add(BytesRef) must not be longer than ByteBlockPool.BYTE_BLOCK_SIZE-2. The internal storage is limited to 2GB total byte storage.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
static class | BytesRefHash.BytesStartArray Manages allocation of the per-term addresses.
static class | BytesRefHash.DirectBytesStartArray A simple BytesRefHash.BytesStartArray that tracks memory allocation using a private AtomicLong instance.
static class | BytesRefHash.MaxBytesLengthExceededException Thrown if a BytesRef exceeds the BytesRefHash limit of ByteBlockPool.BYTE_BLOCK_SIZE-2.
static class | BytesRefHash.TrackingDirectBytesStartArray A simple BytesRefHash.BytesStartArray that tracks all memory allocation using a shared AtomicLong instance.
Field Summary
static int DEFAULT_CAPACITY
Constructor Summary
BytesRefHash()
Creates a new BytesRefHash with a ByteBlockPool using a ByteBlockPool.DirectAllocator.
BytesRefHash(ByteBlockPool pool)
Creates a new BytesRefHash
BytesRefHash(ByteBlockPool pool, int capacity, BytesRefHash.BytesStartArray bytesStartArray)
Creates a new BytesRefHash
Method Summary
 int add(BytesRef bytes)
Adds a new BytesRef
 int add(BytesRef bytes, int code)
Adds a new BytesRef with a pre-calculated hash code.
 int addByPoolOffset(int offset)
 int byteStart(int ord)
Returns the bytesStart offset into the internally used ByteBlockPool for the given ord
 void clear()
 void clear(boolean resetPool)
Clears the BytesRef which maps to the given BytesRef
 void close()
Closes the BytesRefHash and releases all internally used memory
 int[] compact()
Returns the ords array in arbitrary order.
 BytesRef get(int ord, BytesRef ref)
Populates and returns a BytesRef with the bytes for the given ord.
 void reinit()
reinitializes the BytesRefHash after a previous clear() call.
 int size()
Returns the number of BytesRef values in this BytesRefHash.
 int[] sort(Comparator<BytesRef> comp)
Returns the values array sorted by the referenced byte values.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_CAPACITY

public static final int DEFAULT_CAPACITY
See Also:
Constant Field Values
Constructor Detail

BytesRefHash

public BytesRefHash()
Creates a new BytesRefHash with a ByteBlockPool using a ByteBlockPool.DirectAllocator.

BytesRefHash

public BytesRefHash(ByteBlockPool pool)
Creates a new BytesRefHash

BytesRefHash

public BytesRefHash(ByteBlockPool pool,
                    int capacity,
                    BytesRefHash.BytesStartArray bytesStartArray)
Creates a new BytesRefHash

Method Detail

size

public int size()
Returns the number of BytesRef values in this BytesRefHash.

Returns:
the number of BytesRef values in this BytesRefHash.

get

public BytesRef get(int ord,
                    BytesRef ref)
Populates and returns a BytesRef with the bytes for the given ord.

Note: the given ord must be a positive integer less that the current size ( size())

Parameters:
ord - the ord
ref - the BytesRef to populate
Returns:
the given BytesRef instance populated with the bytes for the given ord

compact

public int[] compact()
Returns the ords array in arbitrary order. Valid ords start at offset of 0 and end at a limit of size() - 1

Note: This is a destructive operation. clear() must be called in order to reuse this BytesRefHash instance.

sort

public int[] sort(Comparator<BytesRef> comp)
Returns the values array sorted by the referenced byte values.

Note: This is a destructive operation. clear() must be called in order to reuse this BytesRefHash instance.

Parameters:
comp - the Comparator used for sorting

clear

public void clear(boolean resetPool)
Clears the BytesRef which maps to the given BytesRef

clear

public void clear()

close

public void close()
Closes the BytesRefHash and releases all internally used memory

add

public int add(BytesRef bytes)
Adds a new BytesRef

Parameters:
bytes - the bytes to hash
Returns:
the ord the given bytes are hashed if there was no mapping for the given bytes, otherwise (-(ord)-1). This guarantees that the return value will always be >= 0 if the given bytes haven't been hashed before.
Throws:
BytesRefHash.MaxBytesLengthExceededException - if the given bytes are > 2 + ByteBlockPool.BYTE_BLOCK_SIZE

add

public int add(BytesRef bytes,
               int code)
Adds a new BytesRef with a pre-calculated hash code.

Parameters:
bytes - the bytes to hash
code - the bytes hash code

Hashcode is defined as:

 int hash = 0;
 for (int i = offset; i < offset + length; i++) {
   hash = 31 * hash + bytes[i];
 }
Returns:
the ord the given bytes are hashed if there was no mapping for the given bytes, otherwise (-(ord)-1). This guarantees that the return value will always be >= 0 if the given bytes haven't been hashed before.
Throws:
BytesRefHash.MaxBytesLengthExceededException - if the given bytes are > ByteBlockPool.BYTE_BLOCK_SIZE - 2

addByPoolOffset

public int addByPoolOffset(int offset)

reinit

public void reinit()
reinitializes the BytesRefHash after a previous clear() call. If clear() has not been called previously this method has no effect.

byteStart

public int byteStart(int ord)
Returns the bytesStart offset into the internally used ByteBlockPool for the given ord

Parameters:
ord - the ord to look up
Returns:
the bytesStart offset into the internally used ByteBlockPool for the given ord
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BytesRefHash.MaxBytesLengthExceededException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class BytesRefHash.MaxBytesLengthExceededException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.lang.RuntimeException
                extended by  org.apache.lucene.util.BytesRefHash.MaxBytesLengthExceededException
All Implemented Interfaces:
Serializable
Enclosing class:
BytesRefHash
public static class BytesRefHash.MaxBytesLengthExceededException
extends RuntimeException

Thrown if a BytesRef exceeds the BytesRefHash limit of ByteBlockPool.BYTE_BLOCK_SIZE-2.

See Also:
Serialized Form

Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BytesRefHash.TrackingDirectBytesStartArray

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class BytesRefHash.TrackingDirectBytesStartArray

java.lang.Object
    extended by  org.apache.lucene.util.BytesRefHash.BytesStartArray
        extended by  org.apache.lucene.util.BytesRefHash.TrackingDirectBytesStartArray
Enclosing class:
BytesRefHash
public static class BytesRefHash.TrackingDirectBytesStartArray
extends BytesRefHash.BytesStartArray

A simple BytesRefHash.BytesStartArray that tracks all memory allocation using a shared AtomicLong instance.

Field Summary
protected AtomicLong | bytesUsed
protected int | initSize
Constructor Summary
BytesRefHash.TrackingDirectBytesStartArray(int initSize, AtomicLong bytesUsed)
Method Summary
AtomicLong | bytesUsed() A AtomicLong reference holding the number of bytes used by this BytesRefHash.BytesStartArray.
int[] | clear() clears the BytesRefHash.BytesStartArray and returns the cleared instance.
int[] | grow() Grows the BytesRefHash.BytesStartArray
int[] | init() Initializes the BytesStartArray.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

initSize

protected final int initSize

bytesUsed

protected final AtomicLong bytesUsed
Constructor Detail

BytesRefHash.TrackingDirectBytesStartArray

public BytesRefHash.TrackingDirectBytesStartArray(int initSize,
                                                  AtomicLong bytesUsed)
Method Detail

clear

public int[] clear()
Description copied from class: BytesRefHash.BytesStartArray
clears the BytesRefHash.BytesStartArray and returns the cleared instance.

Specified by:
clear in class BytesRefHash.BytesStartArray
Returns:
the cleared instance, this might be null

grow

public int[] grow()
Description copied from class: BytesRefHash.BytesStartArray
Grows the BytesRefHash.BytesStartArray

Specified by:
grow in class BytesRefHash.BytesStartArray
Returns:
the grown array

init

public int[] init()
Description copied from class: BytesRefHash.BytesStartArray
Initializes the BytesStartArray. This call will allocate memory

Specified by:
init in class BytesRefHash.BytesStartArray
Returns:
the initialized bytes start array

bytesUsed

public AtomicLong bytesUsed()
Description copied from class: BytesRefHash.BytesStartArray
A AtomicLong reference holding the number of bytes used by this BytesRefHash.BytesStartArray. The BytesRefHash uses this reference to track it memory usage

Specified by:
bytesUsed in class BytesRefHash.BytesStartArray
Returns:
a AtomicLong reference holding the number of bytes used by this BytesRefHash.BytesStartArray.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BytesRefIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Interface BytesRefIterator

All Known Subinterfaces:
TermFreqIterator
All Known Implementing Classes:
BufferingTermFreqIteratorWrapper, SortedTermFreqIteratorWrapper, TermFreqIterator.TermFreqIteratorWrapper, UnsortedTermFreqIteratorWrapper
public interface BytesRefIterator

A simple iterator interface for BytesRef iteration.

Field Summary
static BytesRefIterator EMPTY
Singleton BytesRefIterator that iterates over 0 BytesRefs.
Method Summary
Comparator<BytesRef> | getComparator() Return the BytesRef Comparator used to sort terms provided by the iterator.
BytesRef | next() Increments the iteration to the next BytesRef in the iterator.

Field Detail

EMPTY

static final BytesRefIterator EMPTY
Singleton BytesRefIterator that iterates over 0 BytesRefs.

Method Detail

next

BytesRef next()
              throws IOException
Increments the iteration to the next BytesRef in the iterator. Returns the resulting BytesRef or null if the end of the iterator is reached. The returned BytesRef may be re-used across calls to next. After this method returns null, do not call it again: the results are undefined.

Returns:
the next BytesRef in the iterator or null if the end of the iterator is reached.
Throws:
IOException

getComparator

Comparator<BytesRef> getComparator()
Return the BytesRef Comparator used to sort terms provided by the iterator. This may return null if there are no items or the iterator is not sorted. Callers may invoke this method many times, so it's best to cache a single instance & reuse it.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharacterUtils.CharacterBuffer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class CharacterUtils.CharacterBuffer

java.lang.Object
    extended by  org.apache.lucene.util.CharacterUtils.CharacterBuffer
Enclosing class:
CharacterUtils
public static final class CharacterUtils.CharacterBuffer
extends Object

A simple IO buffer to use with CharacterUtils.fill(CharacterBuffer, Reader).

Method Summary
 char[] getBuffer()
Returns the internal buffer
 int getLength()
Return the length of the data in the internal buffer starting at getOffset()
 int getOffset()
Returns the data offset in the internal buffer.
 void reset()
Resets the CharacterBuffer.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getBuffer

public char[] getBuffer()
Returns the internal buffer

Returns:
the buffer

getOffset

public int getOffset()
Returns the data offset in the internal buffer.

Returns:
the offset

getLength

public int getLength()
Return the length of the data in the internal buffer starting at getOffset()

Returns:
the length

reset

public void reset()
Resets the CharacterBuffer. All internals are reset to its default values.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharacterUtils

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class CharacterUtils

java.lang.Object
    extended by  org.apache.lucene.util.CharacterUtils

public abstract class CharacterUtils
extends Object

CharacterUtils provides a unified interface to Character-related operations to implement backwards compatible character operations based on a Version instance.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
static class CharacterUtils.CharacterBuffer
A simple IO buffer to use with fill(CharacterBuffer, Reader).
Constructor Summary
CharacterUtils()
Method Summary
abstract int | codePointAt(char[] chars, int offset) Returns the code point at the given index of the char array.
abstract int | codePointAt(char[] chars, int offset, int limit) Returns the code point at the given index of the char array where only elements with index less than the limit are used.
abstract int | codePointAt(CharSequence seq, int offset) Returns the code point at the given index of the CharSequence.
abstract boolean | fill(CharacterUtils.CharacterBuffer buffer, Reader reader) Fills the CharacterUtils.CharacterBuffer with characters read from the given reader Reader.
static CharacterUtils | getInstance(Version matchVersion) Returns a CharacterUtils implementation according to the given Version instance.
static CharacterUtils.CharacterBuffer | newCharacterBuffer(int bufferSize) Creates a new CharacterUtils.CharacterBuffer and allocates a char[] of the given bufferSize.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CharacterUtils

public CharacterUtils()
Method Detail

getInstance

public static CharacterUtils getInstance(Version matchVersion)
Returns a CharacterUtils implementation according to the given Version instance.

Parameters:
matchVersion - a version instance
Returns:
a CharacterUtils implementation according to the given Version instance.

codePointAt

public abstract int codePointAt(char[] chars,
                                int offset)
Returns the code point at the given index of the char array. Depending on the Version passed to getInstance(Version) this method mimics the behavior of Character.codePointAt(char[], int) as it would have been available on a Java 1.4 JVM or on a later virtual machine version.

Parameters:
chars - a character array
offset - the offset to the char values in the chars array to be converted
Returns:
the Unicode code point at the given index
Throws:
NullPointerException - - if the array is null.
IndexOutOfBoundsException - - if the value offset is negative or not less than the length of the char array.

codePointAt

public abstract int codePointAt(CharSequence seq,
                                int offset)
Returns the code point at the given index of the CharSequence. Depending on the Version passed to getInstance(Version) this method mimics the behavior of Character.codePointAt(char[], int) as it would have been available on a Java 1.4 JVM or on a later virtual machine version.

Parameters:
seq - a character sequence
offset - the offset to the char values in the chars array to be converted
Returns:
the Unicode code point at the given index
Throws:
NullPointerException - - if the sequence is null.
IndexOutOfBoundsException - - if the value offset is negative or not less than the length of the character sequence.

codePointAt

public abstract int codePointAt(char[] chars,
                                int offset,
                                int limit)
Returns the code point at the given index of the char array where only elements with index less than the limit are used. Depending on the Version passed to getInstance(Version) this method mimics the behavior of Character.codePointAt(char[], int) as it would have been available on a Java 1.4 JVM or on a later virtual machine version.

Parameters:
chars - a character array
offset - the offset to the char values in the chars array to be converted
limit - the index afer the last element that should be used to calculate codepoint.
Returns:
the Unicode code point at the given index
Throws:
NullPointerException - - if the array is null.
IndexOutOfBoundsException - - if the value offset is negative or not less than the length of the char array.

newCharacterBuffer

public static CharacterUtils.CharacterBuffer newCharacterBuffer(int bufferSize)
Creates a new CharacterUtils.CharacterBuffer and allocates a char[] of the given bufferSize.

Parameters:
bufferSize - the internal char buffer size, must be >= 2
Returns:
a new CharacterUtils.CharacterBuffer instance.

fill

public abstract boolean fill(CharacterUtils.CharacterBuffer buffer,
                             Reader reader)
                      throws IOException
Fills the CharacterUtils.CharacterBuffer with characters read from the given reader Reader. This method tries to read as many characters into the CharacterUtils.CharacterBuffer as possible, each call to fill will start filling the buffer from offset 0 up to the length of the size of the internal character array.

Depending on the Version passed to getInstance(Version) this method implements supplementary character awareness when filling the given buffer. For all Version > 3.0 fill(CharacterBuffer, Reader) guarantees that the given CharacterUtils.CharacterBuffer will never contain a high surrogate character as the last element in the buffer unless it is the last available character in the reader. In other words, high and low surrogate pairs will always be preserved across buffer boarders.

Parameters:
buffer - the buffer to fill.
reader - the reader to read characters from.
Returns:
true if and only if no more characters are available in the reader, otherwise false.
Throws:
IOException - if the reader throws an IOException.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CharsRef

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class CharsRef

java.lang.Object
    extended by  org.apache.lucene.util.CharsRef
All Implemented Interfaces:
CharSequence, Cloneable, Comparable<CharsRef>
public final class CharsRef
extends Object
implements Comparable<CharsRef>, CharSequence, Cloneable

Represents char[], as a slice (offset + length) into an existing char[]. The chars member should never be null; use EMPTY_CHARS if necessary.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
char[] | chars
static char[] | EMPTY_CHARS
int | length
int | offset
Constructor Summary
CharsRef()
Creates a new CharsRef initialized an empty array zero-length
CharsRef(char[] chars, int offset, int length)
Creates a new CharsRef initialized with the given array, offset and length
CharsRef(int capacity)
Creates a new CharsRef initialized with an array of the given capacity
CharsRef(String string)
Creates a new CharsRef initialized with the given Strings character array
Method Summary
void | append(char[] otherChars, int otherOffset, int otherLength) Appends the given array to this CharsRef
char | charAt(int index)
boolean | charsEquals(CharsRef other)
CharsRef | clone()
int | compareTo(CharsRef other) Signed int order comparison
void | copyChars(char[] otherChars, int otherOffset, int otherLength) Copies the given array into this CharsRef.
void | copyChars(CharsRef other) Copies the given CharsRef referenced content into this instance.
static CharsRef | deepCopyOf(CharsRef other) Creates a new CharsRef that points to a copy of the chars from other
boolean | equals(Object other)
static Comparator<CharsRef> | getUTF16SortedAsUTF8Comparator()
void | grow(int newLength) Used to grow the reference array.
int | hashCode()
int | length()
CharSequence | subSequence(int start, int end)
String | toString()
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

EMPTY_CHARS

public static final char[] EMPTY_CHARS

chars

public char[] chars

offset

public int offset

length

public int length
Constructor Detail

CharsRef

public CharsRef()
Creates a new CharsRef initialized an empty array zero-length

CharsRef

public CharsRef(int capacity)
Creates a new CharsRef initialized with an array of the given capacity

CharsRef

public CharsRef(char[] chars,
                int offset,
                int length)
Creates a new CharsRef initialized with the given array, offset and length

CharsRef

public CharsRef(String string)
Creates a new CharsRef initialized with the given Strings character array

Method Detail

clone

public CharsRef clone()
Overrides:
clone in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

charsEquals

public boolean charsEquals(CharsRef other)

compareTo

public int compareTo(CharsRef other)
Signed int order comparison

Specified by:
compareTo in interface Comparable<CharsRef>

copyChars

public void copyChars(CharsRef other)
Copies the given CharsRef referenced content into this instance.

Parameters:
other - the CharsRef to copy

grow

public void grow(int newLength)
Used to grow the reference array. In general this should not be used as it does not take the offset into account.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

copyChars

public void copyChars(char[] otherChars,
                      int otherOffset,
                      int otherLength)
Copies the given array into this CharsRef.

append

public void append(char[] otherChars,
                   int otherOffset,
                   int otherLength)
Appends the given array to this CharsRef

toString

public String toString()
Specified by:
toString in interface CharSequence
Overrides:
toString in class Object

length

public int length()
Specified by:
length in interface CharSequence

charAt

public char charAt(int index)
Specified by:
charAt in interface CharSequence

subSequence

public CharSequence subSequence(int start,
                                int end)
Specified by:
subSequence in interface CharSequence

getUTF16SortedAsUTF8Comparator

public static Comparator<CharsRef> getUTF16SortedAsUTF8Comparator()

deepCopyOf

public static CharsRef deepCopyOf(CharsRef other)
Creates a new CharsRef that points to a copy of the chars from other

The returned CharsRef will have a length of other.length and an offset of zero.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CloseableThreadLocal

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class CloseableThreadLocal<T>

java.lang.Object
    extended by  org.apache.lucene.util.CloseableThreadLocal<T>
All Implemented Interfaces:
Closeable
public class CloseableThreadLocal<T>
extends Object
implements Closeable

Java's builtin ThreadLocal has a serious flaw: it can take an arbitrarily long amount of time to dereference the things you had stored in it, even once the ThreadLocal instance itself is no longer referenced. This is because there is single, master map stored for each thread, which all ThreadLocals share, and that master map only periodically purges "stale" entries. While not technically a memory leak, because eventually the memory will be reclaimed, it can take a long time and you can easily hit OutOfMemoryError because from the GC's standpoint the stale entries are not reclaimable. This class works around that, by only enrolling WeakReference values into the ThreadLocal, and separately holding a hard reference to each stored value. When you call close(), these hard references are cleared and then GC is freely able to reclaim space by objects stored in it. We can not rely on ThreadLocal.remove() as it only removes the value for the caller thread, whereas close() takes care of all threads. You should not call close() until all threads are done using the instance.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
CloseableThreadLocal()
Method Summary
void | close()
T | get()
protected T | initialValue()
void | set(T object)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CloseableThreadLocal

public CloseableThreadLocal()
Method Detail

initialValue

protected T initialValue()

get

public T get()

set

public void set(T object)

close

public void close()
Specified by:
close in interface Closeable
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CodecUtil

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class CodecUtil

java.lang.Object
    extended by  org.apache.lucene.util.CodecUtil

public final class CodecUtil
extends Object

Utility class for reading and writing versioned headers. This is useful to ensure that a file is in the format you think it is.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
static int | checkHeader(DataInput in, String codec, int minVersion, int maxVersion)
static int | headerLength(String codec)
static DataOutput | writeHeader(DataOutput out, String codec, int version)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

writeHeader

public static DataOutput writeHeader(DataOutput out,
                                     String codec,
                                     int version)
                              throws IOException
Throws:
IOException

headerLength

public static int headerLength(String codec)

checkHeader

public static int checkHeader(DataInput in,
                              String codec,
                              int minVersion,
                              int maxVersion)
                       throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CollectionUtil

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class CollectionUtil

java.lang.Object
    extended by  org.apache.lucene.util.CollectionUtil

public final class CollectionUtil
extends Object

Methods for manipulating (sorting) collections. Sort methods work directly on the supplied lists and don't copy to/from arrays before/after. For medium size collections as used in the Lucene indexer that is much more efficient.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Method Summary
static
<T extends Comparable<? super T>>
void
insertionSort(List<T> list)
Sorts the given random access List in natural order.
static
<T> void
insertionSort(List<T> list, Comparator<? super T> comp)
Sorts the given random access List using the Comparator.
static
<T extends Comparable<? super T>>
void
mergeSort(List<T> list)
Sorts the given random access List in natural order.
static
<T> void
mergeSort(List<T> list, Comparator<? super T> comp)
Sorts the given random access List using the Comparator.
static
<T extends Comparable<? super T>>
void
quickSort(List<T> list)
Sorts the given random access List in natural order.
static
<T> void
quickSort(List<T> list, Comparator<? super T> comp)
Sorts the given random access List using the Comparator.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

quickSort

public static <T> void quickSort(List<T> list,
                                 Comparator<? super T> comp)
Sorts the given random access List using the Comparator. The list must implement RandomAccess. This method uses the quick sort algorithm, but falls back to insertion sort for small lists.

Throws:
IllegalArgumentException - if list is e.g. a linked list without random access.

quickSort

public static <T extends Comparable<? super T>> void quickSort(List<T> list)
Sorts the given random access List in natural order. The list must implement RandomAccess. This method uses the quick sort algorithm, but falls back to insertion sort for small lists.

Throws:
IllegalArgumentException - if list is e.g. a linked list without random access.

mergeSort

public static <T> void mergeSort(List<T> list,
                                 Comparator<? super T> comp)
Sorts the given random access List using the Comparator. The list must implement RandomAccess. This method uses the merge sort algorithm, but falls back to insertion sort for small lists.

Throws:
IllegalArgumentException - if list is e.g. a linked list without random access.

mergeSort

public static <T extends Comparable<? super T>> void mergeSort(List<T> list)
Sorts the given random access List in natural order. The list must implement RandomAccess. This method uses the merge sort algorithm, but falls back to insertion sort for small lists.

Throws:
IllegalArgumentException - if list is e.g. a linked list without random access.

insertionSort

public static <T> void insertionSort(List<T> list,
                                     Comparator<? super T> comp)
Sorts the given random access List using the Comparator. The list must implement RandomAccess. This method uses the insertion sort algorithm. It is only recommended to use this algorithm for partially sorted small lists!

Throws:
IllegalArgumentException - if list is e.g. a linked list without random access.

insertionSort

public static <T extends Comparable<? super T>> void insertionSort(List<T> list)
Sorts the given random access List in natural order. The list must implement RandomAccess. This method uses the insertion sort algorithm. It is only recommended to use this algorithm for partially sorted small lists!

Throws:
IllegalArgumentException - if list is e.g. a linked list without random access.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CommandLineUtil

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class CommandLineUtil

java.lang.Object
    extended by  org.apache.lucene.util.CommandLineUtil

public final class CommandLineUtil
extends Object

Class containing some useful methods used by command line tools

Method Summary
static Class<? extends Directory> | loadDirectoryClass(String clazzName) Loads a specific Directory implementation
static Class<? extends FSDirectory> | loadFSDirectoryClass(String clazzName) Loads a specific FSDirectory implementation
static FSDirectory | newFSDirectory(Class<? extends FSDirectory> clazz, File file) Creates a new specific FSDirectory instance
static FSDirectory | newFSDirectory(String clazzName, File file) Creates a specific FSDirectory instance starting from its class name
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

newFSDirectory

public static FSDirectory newFSDirectory(String clazzName,
                                         File file)
Creates a specific FSDirectory instance starting from its class name

Parameters:
clazzName - The name of the FSDirectory class to load
file - The file to be used as parameter constructor
Returns:
the new FSDirectory instance

loadDirectoryClass

public static Class<? extends Directory> loadDirectoryClass(String clazzName)
                                                     throws ClassNotFoundException
Loads a specific Directory implementation

Parameters:
clazzName - The name of the Directory class to load
Returns:
The Directory class loaded
Throws:
ClassNotFoundException

loadFSDirectoryClass

public static Class<? extends FSDirectory> loadFSDirectoryClass(String clazzName)
                                                         throws ClassNotFoundException
Loads a specific FSDirectory implementation

Parameters:
clazzName - The name of the FSDirectory class to load
Returns:
The FSDirectory class loaded
Throws:
ClassNotFoundException

newFSDirectory

public static FSDirectory newFSDirectory(Class<? extends FSDirectory> clazz,
                                         File file)
                                  throws NoSuchMethodException,
                                         InstantiationException,
                                         IllegalAccessException,
                                         InvocationTargetException
Creates a new specific FSDirectory instance

Parameters:
clazz - The class of the object to be created
file - The file to be used as parameter constructor
Returns:
The new FSDirectory instance
Throws:
NoSuchMethodException
InstantiationException
IllegalAccessException
InvocationTargetException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Constants

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class Constants

java.lang.Object
    extended by  org.apache.lucene.util.Constants

public final class Constants
extends Object

Some useful constants.

Field Summary
static boolean | JAVA_1_1 Deprecated. This constant is useless since Lucene is on Java 5
static boolean | JAVA_1_2 Deprecated. This constant is useless since Lucene is on Java 5
static boolean | JAVA_1_3 Deprecated. This constant is useless since Lucene is on Java 5
static String | JAVA_VENDOR
static String | JAVA_VERSION The value of System.getProperty("java.version").
static boolean | JRE_IS_64BIT True iff running on a 64bit JVM
static boolean | JRE_IS_MINIMUM_JAVA6
static boolean | JRE_IS_MINIMUM_JAVA7
static String | JVM_NAME
static String | JVM_VENDOR JVM vendor info.
static String | JVM_VERSION
static boolean | LINUX True iff running on Linux.
static String | LUCENE_MAIN_VERSION
static String | LUCENE_VERSION
static boolean | MAC_OS_X True iff running on Mac OS X
static String | OS_ARCH
static String | OS_NAME The value of System.getProperty("os.name").
static String | OS_VERSION
static boolean | SUN_OS True iff running on SunOS.
static boolean | WINDOWS True iff running on Windows.
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

JVM_VENDOR

public static final String JVM_VENDOR
JVM vendor info.

JVM_VERSION

public static final String JVM_VERSION

JVM_NAME

public static final String JVM_NAME

JAVA_VERSION

public static final String JAVA_VERSION
The value of System.getProperty("java.version").

JAVA_1_1

@Deprecated
public static final boolean JAVA_1_1
Deprecated. This constant is useless since Lucene is on Java 5
True iff this is Java version 1.1.

JAVA_1_2

@Deprecated
public static final boolean JAVA_1_2
Deprecated. This constant is useless since Lucene is on Java 5
True iff this is Java version 1.2.

JAVA_1_3

@Deprecated
public static final boolean JAVA_1_3
Deprecated. This constant is useless since Lucene is on Java 5
True iff this is Java version 1.3.

OS_NAME

public static final String OS_NAME
The value of System.getProperty("os.name").

LINUX

public static final boolean LINUX
True iff running on Linux.

WINDOWS

public static final boolean WINDOWS
True iff running on Windows.

SUN_OS

public static final boolean SUN_OS
True iff running on SunOS.

MAC_OS_X

public static final boolean MAC_OS_X
True iff running on Mac OS X

OS_ARCH

public static final String OS_ARCH

OS_VERSION

public static final String OS_VERSION

JAVA_VENDOR

public static final String JAVA_VENDOR

JRE_IS_MINIMUM_JAVA6

public static final boolean JRE_IS_MINIMUM_JAVA6

JRE_IS_MINIMUM_JAVA7

public static final boolean JRE_IS_MINIMUM_JAVA7

JRE_IS_64BIT

public static final boolean JRE_IS_64BIT
True iff running on a 64bit JVM

LUCENE_MAIN_VERSION

public static final String LUCENE_MAIN_VERSION

LUCENE_VERSION

public static final String LUCENE_VERSION
Overview  Package   Class  Use  Tree  Deprecated  Index  Help
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Counter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class Counter

java.lang.Object
    extended by  org.apache.lucene.util.Counter

public abstract class Counter
extends Object

Simple counter class

WARNING: This API is experimental and might change in incompatible ways in the next release.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
Counter()
Method Summary
abstract long | addAndGet(long delta) Adds the given delta to the counters current value
abstract long | get() Returns the counters current value
static Counter | newCounter() Returns a new counter.
static Counter | newCounter(boolean threadSafe) Returns a new counter.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Counter

public Counter()
Method Detail

addAndGet

public abstract long addAndGet(long delta)
Adds the given delta to the counters current value

Parameters:
delta - the delta to add
Returns:
the counters updated value

get

public abstract long get()
Returns the counters current value

Returns:
the counters current value

newCounter

public static Counter newCounter()
Returns a new counter. The returned counter is not thread-safe.

newCounter

public static Counter newCounter(boolean threadSafe)
Returns a new counter.

Parameters:
threadSafe - true if the returned counter can be used by multiple threads concurrently.
Returns:
a new counter.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DocIdBitSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class DocIdBitSet

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSet
        extended by  org.apache.lucene.util.DocIdBitSet

public class DocIdBitSet
extends DocIdSet

Simple DocIdSet and DocIdSetIterator backed by a BitSet

Field Summary
Fields inherited from class org.apache.lucene.search.DocIdSet
EMPTY_DOCIDSET
Constructor Summary
DocIdBitSet(BitSet bitSet)
Method Summary
BitSet | getBitSet() Returns the underlying BitSet.
boolean | isCacheable() This DocIdSet implementation is cacheable.
DocIdSetIterator | iterator() Provides a DocIdSetIterator to access the set.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DocIdBitSet

public DocIdBitSet(BitSet bitSet)
Method Detail

iterator

public DocIdSetIterator iterator()
Description copied from class: DocIdSet
Provides a DocIdSetIterator to access the set. This implementation can return null or DocIdSet.EMPTY_DOCIDSET.iterator() if there are no docs that match.

Specified by:
iterator in class DocIdSet

isCacheable

public boolean isCacheable()
This DocIdSet implementation is cacheable.

Overrides:
isCacheable in class DocIdSet

getBitSet

public BitSet getBitSet()
Returns the underlying BitSet.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DoubleBarrelLRUCache.CloneableKey

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class DoubleBarrelLRUCache.CloneableKey

java.lang.Object
    extended by  org.apache.lucene.util.DoubleBarrelLRUCache.CloneableKey
Enclosing class:
DoubleBarrelLRUCache<K extends DoubleBarrelLRUCache.CloneableKey,V>
public abstract static class DoubleBarrelLRUCache.CloneableKey
extends Object

Object providing clone(); the key class must subclass this.

Constructor Summary
DoubleBarrelLRUCache.CloneableKey()
Method Summary
abstract  Object clone()
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DoubleBarrelLRUCache.CloneableKey

public DoubleBarrelLRUCache.CloneableKey()
Method Detail

clone

public abstract Object clone()
Overrides:
clone in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DoubleBarrelLRUCache

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class DoubleBarrelLRUCache<K extends DoubleBarrelLRUCache.CloneableKey,V>

java.lang.Object
    extended by  org.apache.lucene.util.DoubleBarrelLRUCache<K,V>

public final class DoubleBarrelLRUCache<K extends DoubleBarrelLRUCache.CloneableKey,V>
extends Object

Simple concurrent LRU cache, using a "double barrel" approach where two ConcurrentHashMaps record entries.

At any given time, one hash is primary and the other is secondary. get(K) first checks primary, and if that's a miss, checks secondary. If secondary has the entry, it's promoted to primary (NOTE: the key is cloned at this point). Once primary is full, the secondary is cleared and the two are swapped.

This is not as space efficient as other possible concurrent approaches (see LUCENE-2075): to achieve perfect LRU(N) it requires 2*N storage. But, this approach is relatively simple and seems in practice to not grow unbounded in size when under hideously high load.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
static class DoubleBarrelLRUCache.CloneableKey
Object providing clone(); the key class must subclass this.
Constructor Summary
DoubleBarrelLRUCache(int maxSize)
Method Summary
V | get(K key)
void | put(K key, V value)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DoubleBarrelLRUCache

public DoubleBarrelLRUCache(int maxSize)
Method Detail

get

public V get(K key)

put

public void put(K key,
                V value)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DummyConcurrentLock

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class DummyConcurrentLock

java.lang.Object
    extended by  org.apache.lucene.util.DummyConcurrentLock
All Implemented Interfaces:
Lock
public final class DummyConcurrentLock
extends Object
implements Lock

A dummy lock as a replacement for ReentrantLock to disable locking

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
static DummyConcurrentLock INSTANCE
a default instance, can be always used, as this Lock is stateless.
Constructor Summary
DummyConcurrentLock()
Method Summary
void | lock()
void | lockInterruptibly()
Condition | newCondition()
boolean | tryLock()
boolean | tryLock(long time, TimeUnit unit)
void | unlock()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

INSTANCE

public static final DummyConcurrentLock INSTANCE
a default instance, can be always used, as this Lock is stateless.

Constructor Detail

DummyConcurrentLock

public DummyConcurrentLock()
Method Detail

lock

public void lock()
Specified by:
lock in interface Lock

lockInterruptibly

public void lockInterruptibly()
Specified by:
lockInterruptibly in interface Lock

tryLock

public boolean tryLock()
Specified by:
tryLock in interface Lock

tryLock

public boolean tryLock(long time,
                       TimeUnit unit)
Specified by:
tryLock in interface Lock

unlock

public void unlock()
Specified by:
unlock in interface Lock

newCondition

public Condition newCondition()
Specified by:
newCondition in interface Lock
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


English

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class English

java.lang.Object
    extended by  org.apache.lucene.util.English

public final class English
extends Object

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Method Summary
static String | intToEnglish(int i)
static void | intToEnglish(int i, StringBuilder result)
static String | longToEnglish(long i)
static void | longToEnglish(long i, StringBuilder result)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

longToEnglish

public static String longToEnglish(long i)

longToEnglish

public static void longToEnglish(long i,
                                 StringBuilder result)

intToEnglish

public static String intToEnglish(int i)

intToEnglish

public static void intToEnglish(int i,
                                StringBuilder result)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCacheSanityChecker

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class FieldCacheSanityChecker

java.lang.Object
    extended by  org.apache.lucene.util.FieldCacheSanityChecker

public final class FieldCacheSanityChecker
extends Object

Provides methods for sanity checking that entries in the FieldCache are not wasteful or inconsistent.

Lucene 2.9 Introduced numerous enhancements into how the FieldCache is used by the low levels of Lucene searching (for Sorting and ValueSourceQueries) to improve both the speed for Sorting, as well as reopening of IndexReaders. But these changes have shifted the usage of FieldCache from "top level" IndexReaders (frequently a MultiReader or DirectoryReader) down to the leaf level SegmentReaders. As a result, existing applications that directly access the FieldCache may find RAM usage increase significantly when upgrading to 2.9 or Later. This class provides an API for these applications (or their Unit tests) to check at run time if the FieldCache contains "insane" usages of the FieldCache.

See Also:
FieldCache, FieldCacheSanityChecker.Insanity, FieldCacheSanityChecker.InsanityType
WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | FieldCacheSanityChecker.Insanity Simple container for a collection of related CacheEntry objects that in conjunction with each other represent some "insane" usage of the FieldCache.
static class | FieldCacheSanityChecker.InsanityType An Enumeration of the different types of "insane" behavior that may be detected in a FieldCache.
Constructor Summary
FieldCacheSanityChecker()
Method Summary
FieldCacheSanityChecker.Insanity[] | check(FieldCache.CacheEntry... cacheEntries) Tests a CacheEntry[] for indication of "insane" cache usage.
static FieldCacheSanityChecker.Insanity[] | checkSanity(FieldCache.CacheEntry... cacheEntries) Quick and dirty convenience method that instantiates an instance with "good defaults" and uses it to test the CacheEntrys
static FieldCacheSanityChecker.Insanity[] | checkSanity(FieldCache cache) Quick and dirty convenience method
void | setRamUsageEstimator(boolean flag) If set, estimate size for all CacheEntry objects will be calculateed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FieldCacheSanityChecker

public FieldCacheSanityChecker()
Method Detail

setRamUsageEstimator

public void setRamUsageEstimator(boolean flag)
If set, estimate size for all CacheEntry objects will be calculateed.

checkSanity

public static FieldCacheSanityChecker.Insanity[] checkSanity(FieldCache cache)
Quick and dirty convenience method

See Also:
check(org.apache.lucene.search.FieldCache.CacheEntry...)

checkSanity

public static FieldCacheSanityChecker.Insanity[] checkSanity(FieldCache.CacheEntry... cacheEntries)
Quick and dirty convenience method that instantiates an instance with "good defaults" and uses it to test the CacheEntrys

See Also:
check(org.apache.lucene.search.FieldCache.CacheEntry...)

check

public FieldCacheSanityChecker.Insanity[] check(FieldCache.CacheEntry... cacheEntries)
Tests a CacheEntry[] for indication of "insane" cache usage.

NOTE:FieldCache CreationPlaceholder objects are ignored. (:TODO: is this a bad idea? are we masking a real problem?)

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCacheSanityChecker.Insanity

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class FieldCacheSanityChecker.Insanity

java.lang.Object
    extended by  org.apache.lucene.util.FieldCacheSanityChecker.Insanity
Enclosing class:
FieldCacheSanityChecker
public static final class FieldCacheSanityChecker.Insanity
extends Object

Simple container for a collection of related CacheEntry objects that in conjunction with each other represent some "insane" usage of the FieldCache.

Constructor Summary
FieldCacheSanityChecker.Insanity(FieldCacheSanityChecker.InsanityType type, String msg, FieldCache.CacheEntry... entries)
Method Summary
 FieldCache.CacheEntry[] getCacheEntries()
CacheEntry objects which suggest a problem
 String getMsg()
Description of hte insane behavior
 FieldCacheSanityChecker.InsanityType getType()
Type of insane behavior this object represents
 String toString()
Multi-Line representation of this Insanity object, starting with the Type and Msg, followed by each CacheEntry.toString() on it's own line prefaced by a tab character
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FieldCacheSanityChecker.Insanity

public FieldCacheSanityChecker.Insanity(FieldCacheSanityChecker.InsanityType type,
                                        String msg,
                                        FieldCache.CacheEntry... entries)
Method Detail

getType

public FieldCacheSanityChecker.InsanityType getType()
Type of insane behavior this object represents

getMsg

public String getMsg()
Description of hte insane behavior

getCacheEntries

public FieldCache.CacheEntry[] getCacheEntries()
CacheEntry objects which suggest a problem

toString

public String toString()
Multi-Line representation of this Insanity object, starting with the Type and Msg, followed by each CacheEntry.toString() on it's own line prefaced by a tab character

Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FieldCacheSanityChecker.InsanityType

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class FieldCacheSanityChecker.InsanityType

java.lang.Object
    extended by  org.apache.lucene.util.FieldCacheSanityChecker.InsanityType
Enclosing class:
FieldCacheSanityChecker
public static final class FieldCacheSanityChecker.InsanityType
extends Object

An Enumeration of the different types of "insane" behavior that may be detected in a FieldCache.

See Also:
SUBREADER, VALUEMISMATCH, EXPECTED

Field Summary
static FieldCacheSanityChecker.InsanityType | EXPECTED Indicates an expected bit of "insanity".
static FieldCacheSanityChecker.InsanityType | SUBREADER Indicates an overlap in cache usage on a given field in sub/super readers.
static FieldCacheSanityChecker.InsanityType | VALUEMISMATCH Indicates entries have the same reader+fieldname but different cached values.
Method Summary
 String toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

SUBREADER

public static final FieldCacheSanityChecker.InsanityType SUBREADER
Indicates an overlap in cache usage on a given field in sub/super readers.

VALUEMISMATCH

public static final FieldCacheSanityChecker.InsanityType VALUEMISMATCH

Indicates entries have the same reader+fieldname but different cached values. This can happen if different datatypes, or parsers are used -- and while it's not necessarily a bug it's typically an indication of a possible problem.

Only the reader, fieldname, and cached value are actually tested -- if two cache entries have different parsers or datatypes but the cached values are the same Object (== not just equal()) this method does not consider that a red flag. This allows for subtle variations in the way a Parser is specified (null vs DEFAULT_LONG_PARSER, etc...)

EXPECTED

public static final FieldCacheSanityChecker.InsanityType EXPECTED
Indicates an expected bit of "insanity". This may be useful for clients that wish to preserve/log information about insane usage but indicate that it was expected.

Method Detail

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FixedBitSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class FixedBitSet

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSet
        extended by  org.apache.lucene.util.FixedBitSet
All Implemented Interfaces:
Bits
public final class FixedBitSet
extends DocIdSet
implements Bits

BitSet of fixed length (numBits), backed by accessible (getBits()) long[], accessed with an int index, implementing Bits and DocIdSet. Unlike OpenBitSet this bit set does not auto-expand, cannot handle long index, and does not have fastXX/XX variants (just X).

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.Bits
Bits.MatchAllBits, Bits.MatchNoBits
Field Summary
Fields inherited from class org.apache.lucene.search.DocIdSet
EMPTY_DOCIDSET
Fields inherited from interface org.apache.lucene.util.Bits
EMPTY_ARRAY
Constructor Summary
FixedBitSet(FixedBitSet other)
Makes full copy.
FixedBitSet(int numBits)
Method Summary
void | and(DocIdSetIterator iter) Does in-place AND of the bits provided by the iterator.
void | and(FixedBitSet other) this = this AND other
void | andNot(DocIdSetIterator iter) Does in-place AND NOT of the bits provided by the iterator.
void | andNot(FixedBitSet other) this = this AND NOT other
static int | bits2words(int numBits) returns the number of 64 bit words it would take to hold numBits
int | cardinality() Returns number of set bits.
void | clear(int index)
void | clear(int startIndex, int endIndex) Clears a range of bits.
Object | clone()
boolean | equals(Object o) returns true if both sets have the same bits set
void | flip(int startIndex, int endIndex) Flips a range of bits
boolean | get(int index)
boolean | getAndClear(int index)
boolean | getAndSet(int index)
long[] | getBits() Expert.
int | hashCode()
boolean | isCacheable() This DocIdSet implementation is cacheable.
DocIdSetIterator | iterator() Provides a DocIdSetIterator to access the set.
int | length()
int | nextSetBit(int index) Returns the index of the first set bit starting at the index specified.
void | or(DocIdSetIterator iter) Does in-place OR of the bits provided by the iterator.
void | or(FixedBitSet other) this = this OR other
int | prevSetBit(int index) Returns the index of the last set bit before or on the index specified.
void | set(int index)
void | set(int startIndex, int endIndex) Sets a range of bits
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FixedBitSet

public FixedBitSet(int numBits)

FixedBitSet

public FixedBitSet(FixedBitSet other)
Makes full copy.

Method Detail

bits2words

public static int bits2words(int numBits)
returns the number of 64 bit words it would take to hold numBits

iterator

public DocIdSetIterator iterator()
Description copied from class: DocIdSet
Provides a DocIdSetIterator to access the set. This implementation can return null or DocIdSet.EMPTY_DOCIDSET.iterator() if there are no docs that match.

Specified by:
iterator in class DocIdSet

length

public int length()
Specified by:
length in interface Bits

isCacheable

public boolean isCacheable()
This DocIdSet implementation is cacheable.

Overrides:
isCacheable in class DocIdSet

getBits

public long[] getBits()
Expert.

cardinality

public int cardinality()
Returns number of set bits. NOTE: this visits every long in the backing bits array, and the result is not internally cached!

get

public boolean get(int index)
Specified by:
get in interface Bits

set

public void set(int index)

getAndSet

public boolean getAndSet(int index)

clear

public void clear(int index)

getAndClear

public boolean getAndClear(int index)

nextSetBit

public int nextSetBit(int index)
Returns the index of the first set bit starting at the index specified. -1 is returned if there are no more set bits.

prevSetBit

public int prevSetBit(int index)
Returns the index of the last set bit before or on the index specified. -1 is returned if there are no more set bits.

or

public void or(DocIdSetIterator iter)
        throws IOException
Does in-place OR of the bits provided by the iterator.

Throws:
IOException

or

public void or(FixedBitSet other)
this = this OR other

and

public void and(DocIdSetIterator iter)
         throws IOException
Does in-place AND of the bits provided by the iterator.

Throws:
IOException

and

public void and(FixedBitSet other)
this = this AND other

andNot

public void andNot(DocIdSetIterator iter)
            throws IOException
Does in-place AND NOT of the bits provided by the iterator.

Throws:
IOException

andNot

public void andNot(FixedBitSet other)
this = this AND NOT other

flip

public void flip(int startIndex,
                 int endIndex)
Flips a range of bits

Parameters:
startIndex - lower index
endIndex - one-past the last bit to flip

set

public void set(int startIndex,
                int endIndex)
Sets a range of bits

Parameters:
startIndex - lower index
endIndex - one-past the last bit to set

clear

public void clear(int startIndex,
                  int endIndex)
Clears a range of bits.

Parameters:
startIndex - lower index
endIndex - one-past the last bit to clear

clone

public Object clone()
Overrides:
clone in class Object

equals

public boolean equals(Object o)
returns true if both sets have the same bits set

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IndexableBinaryStringTools

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class IndexableBinaryStringTools

java.lang.Object
    extended by  org.apache.lucene.util.IndexableBinaryStringTools

public final class IndexableBinaryStringTools
extends Object

Provides support for converting byte sequences to Strings and back again. The resulting Strings preserve the original byte sequences' sort order.

The Strings are constructed using a Base 8000h encoding of the original binary data - each char of an encoded String represents a 15-bit chunk from the byte sequence. Base 8000h was chosen because it allows for all lower 15 bits of char to be used without restriction; the surrogate range [U+D8000-U+DFFF] does not represent valid chars, and would require complicated handling to avoid them and allow use of char's high bit.

Although unset bits are used as padding in the final char, the original byte sequence could contain trailing bytes with no set bits (null bytes): padding is indistinguishable from valid information. To overcome this problem, a char is appended, indicating the number of encoded bytes in the final content char.

Some methods in this class are defined over CharBuffers and ByteBuffers, but these are deprecated in favor of methods that operate directly on byte[] and char[] arrays. Note that this class calls array() and arrayOffset() on the CharBuffers and ByteBuffers it uses, so only wrapped arrays may be used. This class interprets the arrayOffset() and limit() values returned by its input buffers as beginning and end+1 positions on the wrapped array, respectively; similarly, on the output buffer, arrayOffset() is the first position written to, and limit() is set to one past the final output array position.

WARNING: This means that the deprecated Buffer-based methods only work correctly with buffers that have an offset of 0. For example, they will not correctly interpret buffers returned by ByteBuffer.slice().

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
static void decode(char[] inputArray, int inputOffset, int inputLength, byte[] outputArray, int outputOffset, int outputLength)
Decodes the input char sequence into the output byte sequence.
static ByteBuffer decode(CharBuffer input)
Deprecated. Use decode(char[], int, int, byte[], int, int) instead. This method will be removed in Lucene 4.0
static void decode(CharBuffer input, ByteBuffer output)
Deprecated. Use decode(char[], int, int, byte[], int, int) instead. This method will be removed in Lucene 4.0
static void encode(byte[] inputArray, int inputOffset, int inputLength, char[] outputArray, int outputOffset, int outputLength)
Encodes the input byte sequence into the output char sequence.
static CharBuffer encode(ByteBuffer input)
Deprecated. Use encode(byte[], int, int, char[], int, int) instead. This method will be removed in Lucene 4.0
static void encode(ByteBuffer input, CharBuffer output)
Deprecated. Use encode(byte[], int, int, char[], int, int) instead. This method will be removed in Lucene 4.0
static int getDecodedLength(char[] encoded, int offset, int length)
Returns the number of bytes required to decode the given char sequence.
static int getDecodedLength(CharBuffer encoded)
Deprecated. Use getDecodedLength(char[], int, int) instead. This method will be removed in Lucene 4.0
static int getEncodedLength(byte[] inputArray, int inputOffset, int inputLength)
Returns the number of chars required to encode the given bytes.
static int getEncodedLength(ByteBuffer original)
Deprecated. Use getEncodedLength(byte[], int, int) instead. This method will be removed in Lucene 4.0
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getEncodedLength

@Deprecated
public static int getEncodedLength(ByteBuffer original)
                            throws IllegalArgumentException
Deprecated. Use getEncodedLength(byte[], int, int) instead. This method will be removed in Lucene 4.0

Returns the number of chars required to encode the given byte sequence.

Parameters:
original - The byte sequence to be encoded. Must be backed by an array.
Returns:
The number of chars required to encode the given byte sequence
Throws:
IllegalArgumentException - If the given ByteBuffer is not backed by an array

getEncodedLength

public static int getEncodedLength(byte[] inputArray,
                                   int inputOffset,
                                   int inputLength)
Returns the number of chars required to encode the given bytes.

Parameters:
inputArray - byte sequence to be encoded
inputOffset - initial offset into inputArray
inputLength - number of bytes in inputArray
Returns:
The number of chars required to encode the number of bytes.

getDecodedLength

@Deprecated
public static int getDecodedLength(CharBuffer encoded)
                            throws IllegalArgumentException
Deprecated. Use getDecodedLength(char[], int, int) instead. This method will be removed in Lucene 4.0

Returns the number of bytes required to decode the given char sequence.

Parameters:
encoded - The char sequence to be decoded. Must be backed by an array.
Returns:
The number of bytes required to decode the given char sequence
Throws:
IllegalArgumentException - If the given CharBuffer is not backed by an array

getDecodedLength

public static int getDecodedLength(char[] encoded,
                                   int offset,
                                   int length)
Returns the number of bytes required to decode the given char sequence.

Parameters:
encoded - char sequence to be decoded
offset - initial offset
length - number of characters
Returns:
The number of bytes required to decode the given char sequence

encode

@Deprecated
public static void encode(ByteBuffer input,
                                     CharBuffer output)
Deprecated. Use encode(byte[], int, int, char[], int, int) instead. This method will be removed in Lucene 4.0

Encodes the input byte sequence into the output char sequence. Before calling this method, ensure that the output CharBuffer has sufficient capacity by calling getEncodedLength(java.nio.ByteBuffer).

Parameters:
input - The byte sequence to encode
output - Where the char sequence encoding result will go. The limit is set to one past the position of the final char.
Throws:
IllegalArgumentException - If either the input or the output buffer is not backed by an array

encode

public static void encode(byte[] inputArray,
                          int inputOffset,
                          int inputLength,
                          char[] outputArray,
                          int outputOffset,
                          int outputLength)
Encodes the input byte sequence into the output char sequence. Before calling this method, ensure that the output array has sufficient capacity by calling getEncodedLength(byte[], int, int).

Parameters:
inputArray - byte sequence to be encoded
inputOffset - initial offset into inputArray
inputLength - number of bytes in inputArray
outputArray - char sequence to store encoded result
outputOffset - initial offset into outputArray
outputLength - length of output, must be getEncodedLength

decode

@Deprecated
public static void decode(CharBuffer input,
                                     ByteBuffer output)
Deprecated. Use decode(char[], int, int, byte[], int, int) instead. This method will be removed in Lucene 4.0

Decodes the input char sequence into the output byte sequence. Before calling this method, ensure that the output ByteBuffer has sufficient capacity by calling getDecodedLength(java.nio.CharBuffer).

Parameters:
input - The char sequence to decode
output - Where the byte sequence decoding result will go. The limit is set to one past the position of the final char.
Throws:
IllegalArgumentException - If either the input or the output buffer is not backed by an array

decode

public static void decode(char[] inputArray,
                          int inputOffset,
                          int inputLength,
                          byte[] outputArray,
                          int outputOffset,
                          int outputLength)
Decodes the input char sequence into the output byte sequence. Before calling this method, ensure that the output array has sufficient capacity by calling getDecodedLength(char[], int, int).

Parameters:
inputArray - char sequence to be decoded
inputOffset - initial offset into inputArray
inputLength - number of chars in inputArray
outputArray - byte sequence to store encoded result
outputOffset - initial offset into outputArray
outputLength - length of output, must be getDecodedLength(inputArray, inputOffset, inputLength)

decode

@Deprecated
public static ByteBuffer decode(CharBuffer input)
Deprecated. Use decode(char[], int, int, byte[], int, int) instead. This method will be removed in Lucene 4.0

Decodes the given char sequence, which must have been encoded by encode(java.nio.ByteBuffer) or encode(java.nio.ByteBuffer, java.nio.CharBuffer).

Parameters:
input - The char sequence to decode
Returns:
A byte sequence containing the decoding result. The limit is set to one past the position of the final char.
Throws:
IllegalArgumentException - If the input buffer is not backed by an array

encode

@Deprecated
public static CharBuffer encode(ByteBuffer input)
Deprecated. Use encode(byte[], int, int, char[], int, int) instead. This method will be removed in Lucene 4.0

Encodes the input byte sequence.

Parameters:
input - The byte sequence to encode
Returns:
A char sequence containing the encoding result. The limit is set to one past the position of the final char.
Throws:
IllegalArgumentException - If the input buffer is not backed by an array
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntsRef

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class IntsRef

java.lang.Object
    extended by  org.apache.lucene.util.IntsRef
All Implemented Interfaces:
Cloneable, Comparable<IntsRef>
public final class IntsRef
extends Object
implements Comparable<IntsRef>, Cloneable

Represents int[], as a slice (offset + length) into an existing int[].

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
static int[] | EMPTY_INTS
int[] | ints
int | length
int | offset
Constructor Summary
IntsRef()
IntsRef(int capacity)
IntsRef(int[] ints, int offset, int length)
Method Summary
IntsRef | clone()
int | compareTo(IntsRef other) Signed int order comparison
void | copyInts(IntsRef other)
static IntsRef | deepCopyOf(IntsRef other) Creates a new IntsRef that points to a copy of the ints from other
boolean | equals(Object other)
void | grow(int newLength) Used to grow the reference array.
int | hashCode()
boolean | intsEquals(IntsRef other)
String | toString()
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

EMPTY_INTS

public static final int[] EMPTY_INTS

ints

public int[] ints

offset

public int offset

length

public int length
Constructor Detail

IntsRef

public IntsRef()

IntsRef

public IntsRef(int capacity)

IntsRef

public IntsRef(int[] ints,
               int offset,
               int length)
Method Detail

clone

public IntsRef clone()
Overrides:
clone in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

intsEquals

public boolean intsEquals(IntsRef other)

compareTo

public int compareTo(IntsRef other)
Signed int order comparison

Specified by:
compareTo in interface Comparable<IntsRef>

copyInts

public void copyInts(IntsRef other)

grow

public void grow(int newLength)
Used to grow the reference array. In general this should not be used as it does not take the offset into account.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

toString

public String toString()
Overrides:
toString in class Object

deepCopyOf

public static IntsRef deepCopyOf(IntsRef other)
Creates a new IntsRef that points to a copy of the ints from other

The returned IntsRef will have a length of other.length and an offset of zero.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IOUtils

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class IOUtils

java.lang.Object
    extended by  org.apache.lucene.util.IOUtils

public final class IOUtils
extends Object

This class emulates the new Java 7 "Try-With-Resources" statement. Remove once Lucene is on Java 7.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
static Charset | CHARSET_UTF_8 UTF-8 Charset instance to prevent repeated Charset.forName(String) lookups
static String | UTF_8 UTF-8 charset string
Method Summary
static void close(Closeable... objects)
Closes all given Closeables.
static void close(Iterable<? extends Closeable> objects)
static void closeWhileHandlingException(Closeable... objects)
Closes all given Closeables, suppressing all thrown exceptions.
static
<E extends Exception>
void
closeWhileHandlingException(E priorException, Closeable... objects)
Closes all given Closeables, suppressing all thrown exceptions.
static
<E extends Exception>
void
closeWhileHandlingException(E priorException, Iterable<? extends Closeable> objects)
static void closeWhileHandlingException(Iterable<? extends Closeable> objects)
static Reader getDecodingReader(Class<?> clazz, String resource, Charset charSet)
Opens a Reader for the given resource using a CharsetDecoder.
static Reader getDecodingReader(File file, Charset charSet)
Opens a Reader for the given File using a CharsetDecoder.
static Reader getDecodingReader(InputStream stream, Charset charSet)
Wrapping the given InputStream in a reader using a CharsetDecoder.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

UTF_8

public static final String UTF_8
UTF-8 charset string

See Also:
Charset.forName(String), Constant Field Values

CHARSET_UTF_8

public static final Charset CHARSET_UTF_8
UTF-8 Charset instance to prevent repeated Charset.forName(String) lookups

Method Detail

closeWhileHandlingException

public static <E extends Exception> void closeWhileHandlingException(E priorException,
                                                                     Closeable... objects)
                                        throws E extends Exception,
                                               IOException

Closes all given Closeables, suppressing all thrown exceptions. Some of the Closeables may be null, they are ignored. After everything is closed, method either throws priorException, if one is supplied, or the first of suppressed exceptions, or completes normally.

Sample usage:

 Closeable resource1 = null, resource2 = null, resource3 = null;
 ExpectedException priorE = null;
 try {
   resource1 = ...; resource2 = ...; resource3 = ...; // Acquisition may throw ExpectedException
   ..do..stuff.. // May throw ExpectedException
 } catch (ExpectedException e) {
   priorE = e;
 } finally {
   closeSafely(priorE, resource1, resource2, resource3);
 }

Parameters:
priorException - null or an exception that will be rethrown after method completion
objects - objects to call close() on
Throws:
E extends Exception
IOException

closeWhileHandlingException

public static <E extends Exception> void closeWhileHandlingException(E priorException,
                                                                     Iterable<? extends Closeable> objects)
                                        throws E extends Exception,
                                               IOException
Throws:
E extends Exception
IOException
See Also:
closeWhileHandlingException(Exception, Closeable...)

close

public static void close(Closeable... objects)
                  throws IOException
Closes all given Closeables. Some of the Closeables may be null; they are ignored. After everything is closed, the method either throws the first exception it hit while closing, or completes normally if there were no exceptions.

Parameters:
objects - objects to call close() on
Throws:
IOException

close

public static void close(Iterable<? extends Closeable> objects)
                  throws IOException
Throws:
IOException
See Also:
close(Closeable...)

closeWhileHandlingException

public static void closeWhileHandlingException(Closeable... objects)
                                        throws IOException
Closes all given Closeables, suppressing all thrown exceptions. Some of the Closeables may be null, they are ignored.

Parameters:
objects - objects to call close() on
Throws:
IOException

closeWhileHandlingException

public static void closeWhileHandlingException(Iterable<? extends Closeable> objects)
                                        throws IOException
Throws:
IOException
See Also:
closeWhileHandlingException(Closeable...)

getDecodingReader

public static Reader getDecodingReader(InputStream stream,
                                       Charset charSet)
Wrapping the given InputStream in a reader using a CharsetDecoder. Unlike Java's defaults this reader will throw an exception if your it detects the read charset doesn't match the expected Charset.

Decoding readers are useful to load configuration files, stopword lists or synonym files to detect character set problems. However, its not recommended to use as a common purpose reader.

Parameters:
stream - the stream to wrap in a reader
charSet - the expected charset
Returns:
a wrapping reader

getDecodingReader

public static Reader getDecodingReader(File file,
                                       Charset charSet)
                                throws IOException
Opens a Reader for the given File using a CharsetDecoder. Unlike Java's defaults this reader will throw an exception if your it detects the read charset doesn't match the expected Charset.

Decoding readers are useful to load configuration files, stopword lists or synonym files to detect character set problems. However, its not recommended to use as a common purpose reader.

Parameters:
file - the file to open a reader on
charSet - the expected charset
Returns:
a reader to read the given file
Throws:
IOException

getDecodingReader

public static Reader getDecodingReader(Class<?> clazz,
                                       String resource,
                                       Charset charSet)
                                throws IOException
Opens a Reader for the given resource using a CharsetDecoder. Unlike Java's defaults this reader will throw an exception if your it detects the read charset doesn't match the expected Charset.

Decoding readers are useful to load configuration files, stopword lists or synonym files to detect character set problems. However, its not recommended to use as a common purpose reader.

Parameters:
clazz - the class used to locate the resource
resource - the resource name to load
charSet - the expected charset
Returns:
a reader to read the given file
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LineFileDocs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class LineFileDocs

java.lang.Object
    extended by  org.apache.lucene.util.LineFileDocs
All Implemented Interfaces:
Closeable
public class LineFileDocs
extends Object
implements Closeable

Minimal port of contrib/benchmark's LneDocSource + DocMaker, so tests can enum docs from a line file created by contrib/benchmark's WriteLineDoc task

Constructor Summary
LineFileDocs(Random random)
LineFileDocs(Random random, String path)
If forever is true, we rewind the file at EOF (repeat the docs over and over)
Method Summary
void | close()
Document | nextDoc() Note: Document instance is re-used per-thread
void | reset(Random random)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LineFileDocs

public LineFileDocs(Random random,
                    String path)
             throws IOException
If forever is true, we rewind the file at EOF (repeat the docs over and over)

Throws:
IOException

LineFileDocs

public LineFileDocs(Random random)
             throws IOException
Throws:
IOException
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException

reset

public void reset(Random random)
           throws IOException
Throws:
IOException

nextDoc

public Document nextDoc()
                 throws IOException
Note: Document instance is re-used per-thread

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LuceneJUnitDividingSelector

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class LuceneJUnitDividingSelector

java.lang.Object
    extended by  org.apache.tools.ant.ProjectComponent
        extended by  org.apache.tools.ant.types.DataType
            extended by  org.apache.tools.ant.types.selectors.BaseSelector
                extended by  org.apache.tools.ant.types.selectors.BaseExtendSelector
                    extended by  org.apache.lucene.util.LuceneJUnitDividingSelector
All Implemented Interfaces:
Cloneable, org.apache.tools.ant.types.Parameterizable, org.apache.tools.ant.types.selectors.ExtendFileSelector, org.apache.tools.ant.types.selectors.FileSelector
public class LuceneJUnitDividingSelector
extends org.apache.tools.ant.types.selectors.BaseExtendSelector

Divides filesets into equal groups

Field Summary
Fields inherited from class org.apache.tools.ant.types.selectors.BaseExtendSelector
parameters
Fields inherited from class org.apache.tools.ant.types.DataType
checked, ref
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
Constructor Summary
LuceneJUnitDividingSelector()
Method Summary
boolean | isSelected(File dir, String name, File path)
void | setParameters(org.apache.tools.ant.types.Parameter[] pParameters)
void | verifySettings()
Methods inherited from class org.apache.tools.ant.types.selectors.BaseExtendSelector
getParameters
Methods inherited from class org.apache.tools.ant.types.selectors.BaseSelector
getError, setError, validate
Methods inherited from class org.apache.tools.ant.types.DataType
checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, setRefid, tooManyAttributes, toString
Methods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

LuceneJUnitDividingSelector

public LuceneJUnitDividingSelector()
Method Detail

setParameters

public void setParameters(org.apache.tools.ant.types.Parameter[] pParameters)
Specified by:
setParameters in interface org.apache.tools.ant.types.Parameterizable
Overrides:
setParameters in class org.apache.tools.ant.types.selectors.BaseExtendSelector

verifySettings

public void verifySettings()
Overrides:
verifySettings in class org.apache.tools.ant.types.selectors.BaseSelector

isSelected

public boolean isSelected(File dir,
                          String name,
                          File path)
Specified by:
isSelected in interface org.apache.tools.ant.types.selectors.FileSelector
Specified by:
isSelected in class org.apache.tools.ant.types.selectors.BaseExtendSelector
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LuceneJUnitResultFormatter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class LuceneJUnitResultFormatter

java.lang.Object
    extended by  org.apache.lucene.util.LuceneJUnitResultFormatter
All Implemented Interfaces:
junit.framework.TestListener, org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter, org.apache.tools.ant.taskdefs.optional.junit.JUnitTaskMirror.JUnitResultFormatterMirror
public class LuceneJUnitResultFormatter
extends Object
implements org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter

Just like BriefJUnitResultFormatter "brief" bundled with ant, except all formatted text is buffered until the test suite is finished. At this point, the output is written at once in synchronized fashion. This way tests can run in parallel without interleaving output.

Constructor Summary
LuceneJUnitResultFormatter()
Constructor for LuceneJUnitResultFormatter.
Method Summary
void | addError(junit.framework.Test test, Throwable error) A test caused an error.
void | addFailure(junit.framework.Test test, junit.framework.AssertionFailedError t) Interface TestListener for JUnit > 3.4.
void | addFailure(junit.framework.Test test, Throwable t) Interface TestListener for JUnit <= 3.4.
LuceneJUnitResultFormatter | append(long l)
LuceneJUnitResultFormatter | append(String s)
void | endTest(junit.framework.Test test) A test ended.
void | endTestSuite(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest suite) The whole testsuite ended.
protected void | formatError(String type, junit.framework.Test test, Throwable error) Format an error and print it.
protected String | formatTest(junit.framework.Test test) Format the test for printing..
void | setOutput(OutputStream out) Sets the stream the formatter is supposed to write its results to.
void | setSystemError(String err) .
void | setSystemOutput(String out) .
void | startTest(junit.framework.Test test) A test started.
void | startTestSuite(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest suite) The whole testsuite started.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LuceneJUnitResultFormatter

public LuceneJUnitResultFormatter()
Constructor for LuceneJUnitResultFormatter.

Method Detail

setOutput

public void setOutput(OutputStream out)
Sets the stream the formatter is supposed to write its results to.

Specified by:
setOutput in interface org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter
Specified by:
setOutput in interface org.apache.tools.ant.taskdefs.optional.junit.JUnitTaskMirror.JUnitResultFormatterMirror
Parameters:
out - the output stream to write to

setSystemOutput

public void setSystemOutput(String out)
.

Specified by:
setSystemOutput in interface org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter

setSystemError

public void setSystemError(String err)
.

Specified by:
setSystemError in interface org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter

startTestSuite

public void startTestSuite(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest suite)
The whole testsuite started.

Specified by:
startTestSuite in interface org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter
Parameters:
suite - the test suite

endTestSuite

public void endTestSuite(org.apache.tools.ant.taskdefs.optional.junit.JUnitTest suite)
The whole testsuite ended.

Specified by:
endTestSuite in interface org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter
Parameters:
suite - the test suite

startTest

public void startTest(junit.framework.Test test)
A test started.

Specified by:
startTest in interface junit.framework.TestListener
Parameters:
test - a test

endTest

public void endTest(junit.framework.Test test)
A test ended.

Specified by:
endTest in interface junit.framework.TestListener
Parameters:
test - a test

addFailure

public void addFailure(junit.framework.Test test,
                       Throwable t)
Interface TestListener for JUnit <= 3.4.

A Test failed.

Parameters:
test - a test
t - the exception thrown by the test

addFailure

public void addFailure(junit.framework.Test test,
                       junit.framework.AssertionFailedError t)
Interface TestListener for JUnit > 3.4.

A Test failed.

Specified by:
addFailure in interface junit.framework.TestListener
Parameters:
test - a test
t - the assertion failed by the test

addError

public void addError(junit.framework.Test test,
                     Throwable error)
A test caused an error.

Specified by:
addError in interface junit.framework.TestListener
Parameters:
test - a test
error - the error thrown by the test

formatTest

protected String formatTest(junit.framework.Test test)
Format the test for printing..

Parameters:
test - a test
Returns:
the formatted testname

formatError

protected void formatError(String type,
                           junit.framework.Test test,
                           Throwable error)
Format an error and print it.

Parameters:
type - the type of error
test - the test that failed
error - the exception that the test threw

append

public LuceneJUnitResultFormatter append(String s)

append

public LuceneJUnitResultFormatter append(long l)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LuceneTestCase

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class LuceneTestCase

java.lang.Object
    extended by  org.junit.Assert
        extended by  org.apache.lucene.util.LuceneTestCase
Direct Known Subclasses:
BaseTokenStreamTestCase, CollationTestBase, QueryParserTestBase, SearchEquivalenceTestBase, ThreadedIndexingAndSearchingTestCase
public abstract class LuceneTestCase
extends org.junit.Assert

Base class for all Lucene unit tests, Junit3 or Junit4 variant.

If you override either setUp() or tearDown() in your unit test, make sure you call super.setUp() and super.tearDown()

@After - replaces setup @Before - replaces teardown @Test - any public method with this annotation is a test case, regardless of its name

See Junit4 documentation for a complete list of features.

Import from org.junit rather than junit.framework.

You should be able to use this class anywhere you used LuceneTestCase if you annotate your derived class correctly with the annotations above

See Also:
assertSaneFieldCaches(String)

Nested Class Summary
static interface LuceneTestCase.Nightly
Annotation for tests that should only be run during nightly builds.
Field Summary
static org.junit.rules.TestRule | classRules This controls how suite-level rules are nested.
protected static SmartRandom | random
static int | RANDOM_MULTIPLIER A random multiplier which you should use when writing random tests: multiply it by the number of iterations
org.junit.rules.TestRule | ruleChain This controls how individual test rules are nested.
protected static Map<MockDirectoryWrapper,StackTraceElement[]> | stores
static File | TEMP_DIR Create indexes in this directory, optimally use a subdir, named after the test
static String | TEST_CLEAN_THREADS whether or not to clean threads between test invocations: "false", "perMethod", "perClass"
static String | TEST_DIRECTORY Gets the directory to run tests with
static int | TEST_ITER Get the number of times to run tests
static int | TEST_ITER_MIN Get the minimum number of times to run tests until a failure happens
static String | TEST_LINE_DOCS_FILE the line file used by LineFileDocs
static String | TEST_LOCALE Gets the locale to run tests with
static boolean | TEST_NIGHTLY whether or not nightly tests should run
static String | TEST_SEED Get the random seed for tests
static String | TEST_TIMEZONE Gets the timezone to run tests with
static Version | TEST_VERSION_CURRENT Use this constant when creating Analyzers and any other version-dependent stuff.
protected static boolean | testsFailed
static boolean | VERBOSE true iff tests are run in verbose mode.
Constructor Summary
LuceneTestCase()
Method Summary
static void afterClassLuceneTestCaseJ4()
 void alwaysIgnoredTestMethod()
static void assertEquals(double expected, double actual)
Deprecated.
static void assertEquals(float expected, float actual)
Deprecated.
static void assertEquals(String message, double expected, double actual)
Deprecated.
static void assertEquals(String message, float expected, float actual)
Deprecated.
protected  void assertSaneFieldCaches(String msg)
Asserts that FieldCacheSanityChecker does not detect any problems with FieldCache.DEFAULT.
static
<T> Set<T>
asSet(T... args)
static void assumeFalse(String msg, boolean b)
static void assumeNoException(String msg, Exception e)
static void assumeTrue(String msg, boolean b)
static int atLeast(int i)
static int atLeast(Random random, int i)
Returns a number of at least i
static void beforeClassLuceneTestCaseJ4()
static void dumpArray(String label, Object[] objs, PrintStream stream)
Convenience method for logging an array.
static void dumpIterator(String label, Iterator<?> iter, PrintStream stream)
Convenience method for logging an iterator.
protected  File getDataFile(String name)
Gets a resource from the classpath as File.
 String getName()
static Class<?> getTestClass()
Return the current class being tested.
protected  String getTestLabel()
protected  boolean isTestThread()
Returns true if and only if the calling thread is the primary thread executing the test case.
static Locale localeForName(String localeName)
return a Locale object equivalent to its programmatic name
static MockDirectoryWrapper newDirectory()
Returns a new Directory instance.
static MockDirectoryWrapper newDirectory(Directory d)
Returns a new Directory instance, with contents copied from the provided directory.
static MockDirectoryWrapper newDirectory(Random r)
Returns a new Directory instance, using the specified random.
static MockDirectoryWrapper newDirectory(Random r, Directory d)
Returns a new Directory instance, using the specified random with contents copied from the provided directory.
static Field newField(Random random, String name, String value, Field.Index index)
Returns a new field instance, using the specified random.
static Field newField(Random random, String name, String value, Field.Store store, Field.Index index)
Returns a new field instance, using the specified random.
static Field newField(Random random, String name, String value, Field.Store store, Field.Index index, Field.TermVector tv)
Returns a new field instance, using the specified random.
static Field newField(String name, String value, Field.Index index)
Returns a new field instance.
static Field newField(String name, String value, Field.Store store, Field.Index index)
Returns a new field instance.
static Field newField(String name, String value, Field.Store store, Field.Index index, Field.TermVector tv)
Returns a new Field instance.
static MockDirectoryWrapper newFSDirectory(File f)
Returns a new FSDirectory instance over the given file, which must be a folder.
static MockDirectoryWrapper newFSDirectory(File f, LockFactory lf)
Returns a new FSDirectory instance over the given file, which must be a folder.
static IndexWriterConfig newIndexWriterConfig(Random r, Version v, Analyzer a)
create a new index writer config with random defaults using the specified random
static IndexWriterConfig newIndexWriterConfig(Version v, Analyzer a)
create a new index writer config with random defaults
static LogMergePolicy newLogMergePolicy()
static LogMergePolicy newLogMergePolicy(boolean useCFS)
static LogMergePolicy newLogMergePolicy(boolean useCFS, int mergeFactor)
static LogMergePolicy newLogMergePolicy(int mergeFactor)
static LogMergePolicy newLogMergePolicy(Random r)
static IndexSearcher newSearcher(IndexReader r)
create a new searcher over the reader.
static IndexSearcher newSearcher(IndexReader r, boolean maybeWrap)
create a new searcher over the reader.
static TieredMergePolicy newTieredMergePolicy()
static TieredMergePolicy newTieredMergePolicy(Random r)
protected  void purgeFieldCache(FieldCache fc)
Forcible purges all cache entries from the FieldCache.
static String randomDirectory(Random random)
static Locale randomLocale(Random random)
return a random Locale from the available locales on the system
static TimeZone randomTimeZone(Random random)
return a random TimeZone from the available timezones on the system
static boolean rarely()
static boolean rarely(Random random)
Returns true if something should happen rarely,
 void reportAdditionalFailureInfo()
static void reportPartialFailureInfo()
static void setMergeFactor(MergePolicy mp, int mergeFactor)
 void setUp()
For subclassing only.
static void setUseCompoundFile(MergePolicy mp, boolean useCompound)
 void tearDown()
For subclassing only.
static boolean usually()
static boolean usually(Random random)
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

VERBOSE

public static final boolean VERBOSE
true iff tests are run in verbose mode. Note: if it is false, tests are not expected to print any messages.

TEST_VERSION_CURRENT

public static final Version TEST_VERSION_CURRENT
Use this constant when creating Analyzers and any other version-dependent stuff.

NOTE: Change this when development starts for new Lucene version:

TEMP_DIR

public static final File TEMP_DIR
Create indexes in this directory, optimally use a subdir, named after the test

TEST_LOCALE

public static final String TEST_LOCALE
Gets the locale to run tests with

TEST_TIMEZONE

public static final String TEST_TIMEZONE
Gets the timezone to run tests with

TEST_DIRECTORY

public static final String TEST_DIRECTORY
Gets the directory to run tests with

TEST_ITER

public static final int TEST_ITER
Get the number of times to run tests

TEST_ITER_MIN

public static final int TEST_ITER_MIN
Get the minimum number of times to run tests until a failure happens

TEST_SEED

public static final String TEST_SEED
Get the random seed for tests

TEST_NIGHTLY

public static final boolean TEST_NIGHTLY
whether or not nightly tests should run

TEST_LINE_DOCS_FILE

public static final String TEST_LINE_DOCS_FILE
the line file used by LineFileDocs

TEST_CLEAN_THREADS

public static final String TEST_CLEAN_THREADS
whether or not to clean threads between test invocations: "false", "perMethod", "perClass"

RANDOM_MULTIPLIER

public static final int RANDOM_MULTIPLIER
A random multiplier which you should use when writing random tests: multiply it by the number of iterations

stores

protected static Map<MockDirectoryWrapper,StackTraceElement[]> stores

classRules

public static org.junit.rules.TestRule classRules
This controls how suite-level rules are nested. It is important that _all_ rules declared in LuceneTestCase are executed in proper order if they depend on each other.

ruleChain

public final org.junit.rules.TestRule ruleChain
This controls how individual test rules are nested. It is important that _all_ rules declared in LuceneTestCase are executed in proper order if they depend on each other.

testsFailed

protected static boolean testsFailed

random

protected static final SmartRandom random
Constructor Detail

LuceneTestCase

public LuceneTestCase()
Method Detail

beforeClassLuceneTestCaseJ4

public static void beforeClassLuceneTestCaseJ4()

afterClassLuceneTestCaseJ4

public static void afterClassLuceneTestCaseJ4()

purgeFieldCache

protected void purgeFieldCache(FieldCache fc)
Forcible purges all cache entries from the FieldCache.

This method will be called by tearDown to clean up FieldCache.DEFAULT. If a (poorly written) test has some expectation that the FieldCache will persist across test methods (ie: a static IndexReader) this method can be overridden to do nothing.

See Also:
FieldCache.purgeAllCaches()

getTestLabel

protected String getTestLabel()

setUseCompoundFile

public static void setUseCompoundFile(MergePolicy mp,
                                      boolean useCompound)

setMergeFactor

public static void setMergeFactor(MergePolicy mp,
                                  int mergeFactor)

isTestThread

protected boolean isTestThread()
Returns true if and only if the calling thread is the primary thread executing the test case.

setUp

public void setUp()
           throws Exception
For subclassing only. Overrides must call super.setUp().

Throws:
Exception

tearDown

public void tearDown()
              throws Exception
For subclassing only. Overrides must call super.tearDown().

Throws:
Exception

assertSaneFieldCaches

protected void assertSaneFieldCaches(String msg)
Asserts that FieldCacheSanityChecker does not detect any problems with FieldCache.DEFAULT.

If any problems are found, they are logged to System.err (allong with the msg) when the Assertion is thrown.

This method is called by tearDown after every test method, however IndexReaders scoped inside test methods may be garbage collected prior to this method being called, causing errors to be overlooked. Tests are encouraged to keep their IndexReaders scoped at the class level, or to explicitly call this method directly in the same scope as the IndexReader.

See Also:
FieldCacheSanityChecker

atLeast

public static int atLeast(Random random,
                          int i)
Returns a number of at least i

The actual number returned will be influenced by whether TEST_NIGHTLY is active and RANDOM_MULTIPLIER, but also with some random fudge.

atLeast

public static int atLeast(int i)

rarely

public static boolean rarely(Random random)
Returns true if something should happen rarely,

The actual number returned will be influenced by whether TEST_NIGHTLY is active and RANDOM_MULTIPLIER.

rarely

public static boolean rarely()

usually

public static boolean usually(Random random)

usually

public static boolean usually()

assertEquals

@Deprecated
public static void assertEquals(double expected,
                                           double actual)
Deprecated.

assertEquals

@Deprecated
public static void assertEquals(String message,
                                           double expected,
                                           double actual)
Deprecated.

assertEquals

@Deprecated
public static void assertEquals(float expected,
                                           float actual)
Deprecated.

assertEquals

@Deprecated
public static void assertEquals(String message,
                                           float expected,
                                           float actual)
Deprecated.

assumeTrue

public static void assumeTrue(String msg,
                              boolean b)

assumeFalse

public static void assumeFalse(String msg,
                               boolean b)

assumeNoException

public static void assumeNoException(String msg,
                                     Exception e)

asSet

public static <T> Set<T> asSet(T... args)

dumpIterator

public static void dumpIterator(String label,
                                Iterator<?> iter,
                                PrintStream stream)
Convenience method for logging an iterator.

Parameters:
label - String logged before/after the items in the iterator
iter - Each next() is toString()ed and logged on it's own line. If iter is null this is logged differnetly then an empty iterator.
stream - Stream to log messages to.

dumpArray

public static void dumpArray(String label,
                             Object[] objs,
                             PrintStream stream)
Convenience method for logging an array. Wraps the array in an iterator and delegates

See Also:
dumpIterator(String,Iterator,PrintStream)

newIndexWriterConfig

public static IndexWriterConfig newIndexWriterConfig(Version v,
                                                     Analyzer a)
create a new index writer config with random defaults

newIndexWriterConfig

public static IndexWriterConfig newIndexWriterConfig(Random r,
                                                     Version v,
                                                     Analyzer a)
create a new index writer config with random defaults using the specified random

newLogMergePolicy

public static LogMergePolicy newLogMergePolicy()

newTieredMergePolicy

public static TieredMergePolicy newTieredMergePolicy()

newLogMergePolicy

public static LogMergePolicy newLogMergePolicy(Random r)

newTieredMergePolicy

public static TieredMergePolicy newTieredMergePolicy(Random r)

newLogMergePolicy

public static LogMergePolicy newLogMergePolicy(boolean useCFS)

newLogMergePolicy

public static LogMergePolicy newLogMergePolicy(boolean useCFS,
                                               int mergeFactor)

newLogMergePolicy

public static LogMergePolicy newLogMergePolicy(int mergeFactor)

newDirectory

public static MockDirectoryWrapper newDirectory()
                                         throws IOException
Returns a new Directory instance. Use this when the test does not care about the specific Directory implementation (most tests).

The Directory is wrapped with MockDirectoryWrapper. By default this means it will be picky, such as ensuring that you properly close it and all open files in your test. It will emulate some features of Windows, such as not allowing open files to be overwritten.

Throws:
IOException

newDirectory

public static MockDirectoryWrapper newDirectory(Random r)
                                         throws IOException
Returns a new Directory instance, using the specified random. See newDirectory() for more information.

Throws:
IOException

newDirectory

public static MockDirectoryWrapper newDirectory(Directory d)
                                         throws IOException
Returns a new Directory instance, with contents copied from the provided directory. See newDirectory() for more information.

Throws:
IOException

newFSDirectory

public static MockDirectoryWrapper newFSDirectory(File f)
                                           throws IOException
Returns a new FSDirectory instance over the given file, which must be a folder.

Throws:
IOException

newFSDirectory

public static MockDirectoryWrapper newFSDirectory(File f,
                                                  LockFactory lf)
                                           throws IOException
Returns a new FSDirectory instance over the given file, which must be a folder.

Throws:
IOException

newDirectory

public static MockDirectoryWrapper newDirectory(Random r,
                                                Directory d)
                                         throws IOException
Returns a new Directory instance, using the specified random with contents copied from the provided directory. See newDirectory() for more information.

Throws:
IOException

newField

public static Field newField(String name,
                             String value,
                             Field.Index index)
Returns a new field instance. See newField(String, String, Field.Store, Field.Index, Field.TermVector) for more information

newField

public static Field newField(String name,
                             String value,
                             Field.Store store,
                             Field.Index index)
Returns a new field instance. See newField(String, String, Field.Store, Field.Index, Field.TermVector) for more information

newField

public static Field newField(String name,
                             String value,
                             Field.Store store,
                             Field.Index index,
                             Field.TermVector tv)
Returns a new Field instance. Use this when the test does not care about some specific field settings (most tests)
  • If the store value is set to Store.NO, sometimes the field will be randomly stored.
  • More term vector data than you ask for might be indexed, for example if you choose YES it might index term vectors with offsets too.

newField

public static Field newField(Random random,
                             String name,
                             String value,
                             Field.Index index)
Returns a new field instance, using the specified random. See newField(String, String, Field.Store, Field.Index, Field.TermVector) for more information

newField

public static Field newField(Random random,
                             String name,
                             String value,
                             Field.Store store,
                             Field.Index index)
Returns a new field instance, using the specified random. See newField(String, String, Field.Store, Field.Index, Field.TermVector) for more information

newField

public static Field newField(Random random,
                             String name,
                             String value,
                             Field.Store store,
                             Field.Index index,
                             Field.TermVector tv)
Returns a new field instance, using the specified random. See newField(String, String, Field.Store, Field.Index, Field.TermVector) for more information

randomLocale

public static Locale randomLocale(Random random)
return a random Locale from the available locales on the system

randomTimeZone

public static TimeZone randomTimeZone(Random random)
return a random TimeZone from the available timezones on the system

localeForName

public static Locale localeForName(String localeName)
return a Locale object equivalent to its programmatic name

randomDirectory

public static String randomDirectory(Random random)

newSearcher

public static IndexSearcher newSearcher(IndexReader r)
                                 throws IOException
create a new searcher over the reader. This searcher might randomly use threads.

Throws:
IOException

newSearcher

public static IndexSearcher newSearcher(IndexReader r,
                                        boolean maybeWrap)
                                 throws IOException
create a new searcher over the reader. This searcher might randomly use threads. if maybeWrap is true, this searcher might wrap the reader with one that returns null for getSequentialSubReaders.

Throws:
IOException

getName

public String getName()

getDataFile

protected File getDataFile(String name)
                    throws IOException
Gets a resource from the classpath as File. This method should only be used, if a real file is needed. To get a stream, code should prefer Class.getResourceAsStream(java.lang.String) using this.getClass().

Throws:
IOException

reportPartialFailureInfo

public static void reportPartialFailureInfo()

reportAdditionalFailureInfo

public void reportAdditionalFailureInfo()

getTestClass

public static Class<?> getTestClass()
Return the current class being tested.

alwaysIgnoredTestMethod

public final void alwaysIgnoredTestMethod()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LuceneTestCase.Nightly

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL DETAIL: ELEMENT

org.apache.lucene.util
Annotation Type LuceneTestCase.Nightly

@Documented
@Inherited
@Retention(value=RUNTIME)
public static @interface LuceneTestCase.Nightly

Annotation for tests that should only be run during nightly builds.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL DETAIL: ELEMENT


LuceneTestCaseRunner

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class LuceneTestCaseRunner

java.lang.Object
    extended by  org.junit.runner.Runner
        extended by  org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
            extended by  org.junit.runners.BlockJUnit4ClassRunner
                extended by  org.apache.lucene.util.LuceneTestCaseRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable
public class LuceneTestCaseRunner
extends org.junit.runners.BlockJUnit4ClassRunner

optionally filters the tests to be run by TEST_METHOD

Constructor Summary
LuceneTestCaseRunner(Class<?> clazz)
Method Summary
protected List<org.junit.runners.model.FrameworkMethod> | computeTestMethods()
protected void | runChild(org.junit.runners.model.FrameworkMethod arg0, org.junit.runner.notification.RunNotifier arg1)
Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
collectInitializationErrors, createTest, describeChild, getChildren, getTestRules, methodBlock, methodInvoker, possiblyExpectingExceptions, rules, testName, validateConstructor, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, filter, getDescription, getName, getRunnerAnnotations, getTestClass, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses
Methods inherited from class org.junit.runner.Runner
testCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LuceneTestCaseRunner

public LuceneTestCaseRunner(Class<?> clazz)
                     throws org.junit.runners.model.InitializationError
Throws:
org.junit.runners.model.InitializationError
Method Detail

computeTestMethods

protected List<org.junit.runners.model.FrameworkMethod> computeTestMethods()
Overrides:
computeTestMethods in class org.junit.runners.BlockJUnit4ClassRunner

runChild

protected void runChild(org.junit.runners.model.FrameworkMethod arg0,
                        org.junit.runner.notification.RunNotifier arg1)
Overrides:
runChild in class org.junit.runners.BlockJUnit4ClassRunner
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MapBackedSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class MapBackedSet<E>

java.lang.Object
    extended by  java.util.AbstractCollection<E>
        extended by  java.util.AbstractSet<E>
            extended by  org.apache.lucene.util.MapBackedSet<E>
All Implemented Interfaces:
Serializable, Iterable<E>, Collection<E>, Set<E>
public final class MapBackedSet<E>
extends AbstractSet<E>
implements Serializable

A Set implementation that wraps an actual Map based implementation.

See Also:
Serialized Form
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
This class is only provided with Lucene, as Java 5 does not yet support <E> Set<E> Collections.newSetFromMap(Map<E,Boolean>). It will be removed in Lucene 4.

Constructor Summary
MapBackedSet(Map<E,Boolean> map)
Creates a new instance which wraps the specified map.
Method Summary
boolean | add(E o)
void | clear()
boolean | contains(Object o)
Iterator<E> | iterator()
boolean | remove(Object o)
int | size()
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Set
addAll, containsAll, isEmpty, retainAll, toArray, toArray

Constructor Detail

MapBackedSet

public MapBackedSet(Map<E,Boolean> map)
Creates a new instance which wraps the specified map.

Method Detail

size

public int size()
Specified by:
size in interface Collection<E>
Specified by:
size in interface Set<E>
Specified by:
size in class AbstractCollection<E>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<E>
Specified by:
contains in interface Set<E>
Overrides:
contains in class AbstractCollection<E>

add

public boolean add(E o)
Specified by:
add in interface Collection<E>
Specified by:
add in interface Set<E>
Overrides:
add in class AbstractCollection<E>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<E>
Specified by:
remove in interface Set<E>
Overrides:
remove in class AbstractCollection<E>

clear

public void clear()
Specified by:
clear in interface Collection<E>
Specified by:
clear in interface Set<E>
Overrides:
clear in class AbstractCollection<E>

iterator

public Iterator<E> iterator()
Specified by:
iterator in interface Iterable<E>
Specified by:
iterator in interface Collection<E>
Specified by:
iterator in interface Set<E>
Specified by:
iterator in class AbstractCollection<E>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MapOfSets

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class MapOfSets<K,V>

java.lang.Object
    extended by  org.apache.lucene.util.MapOfSets<K,V>

public class MapOfSets<K,V>
extends Object

Helper class for keeping Lists of Objects associated with keys. WARNING: THIS CLASS IS NOT THREAD SAFE

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
MapOfSets(Map<K,Set<V>> m)
Method Summary
Map<K,Set<V>> | getMap()
int | put(K key, V val) Adds val to the Set associated with key in the Map.
int | putAll(K key, Collection<? extends V> vals) Adds multiple vals to the Set associated with key in the Map.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MapOfSets

public MapOfSets(Map<K,Set<V>> m)
Parameters:
m - the backing store for this object
Method Detail

getMap

public Map<K,Set<V>> getMap()
Returns:
direct access to the map backing this object.

put

public int put(K key,
               V val)
Adds val to the Set associated with key in the Map. If key is not already in the map, a new Set will first be created.

Returns:
the size of the Set associated with key once val is added to it.

putAll

public int putAll(K key,
                  Collection<? extends V> vals)
Adds multiple vals to the Set associated with key in the Map. If key is not already in the map, a new Set will first be created.

Returns:
the size of the Set associated with key once val is added to it.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NamedThreadFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class NamedThreadFactory

java.lang.Object
    extended by  org.apache.lucene.util.NamedThreadFactory
All Implemented Interfaces:
ThreadFactory
public class NamedThreadFactory
extends Object
implements ThreadFactory

A default ThreadFactory implementation that accepts the name prefix of the created threads as a constructor argument. Otherwise, this factory yields the same semantics as the thread factory returned by Executors.defaultThreadFactory().

Constructor Summary
NamedThreadFactory(String threadNamePrefix)
Creates a new NamedThreadFactory instance
Method Summary
 Thread newThread(Runnable r)
Creates a new Thread
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NamedThreadFactory

public NamedThreadFactory(String threadNamePrefix)
Creates a new NamedThreadFactory instance

Parameters:
threadNamePrefix - the name prefix assigned to each thread created.
Method Detail

newThread

public Thread newThread(Runnable r)
Creates a new Thread

Specified by:
newThread in interface ThreadFactory
See Also:
ThreadFactory.newThread(java.lang.Runnable)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericUtils

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class NumericUtils

java.lang.Object
    extended by  org.apache.lucene.util.NumericUtils

public final class NumericUtils
extends Object

This is a helper class to generate prefix-encoded representations for numerical values and supplies converters to represent float/double values as sortable integers/longs.

To quickly execute range queries in Apache Lucene, a range is divided recursively into multiple intervals for searching: The center of the range is searched only with the lowest possible precision in the trie, while the boundaries are matched more exactly. This reduces the number of terms dramatically.

This class generates terms to achieve this: First the numerical integer values need to be converted to strings. For that integer values (32 bit or 64 bit) are made unsigned and the bits are converted to ASCII chars with each 7 bit. The resulting string is sortable like the original integer value. Each value is also prefixed (in the first char) by the shift value (number of bits removed) used during encoding.

To also index floating point numbers, this class supplies two methods to convert them to integer values by changing their bit layout: doubleToSortableLong(double), floatToSortableInt(float). You will have no precision loss by converting floating point numbers to integers and back (only that the integer form is not usable). Other data types like dates can easily converted to longs or ints (e.g. date to long: Date.getTime()).

For easy usage, the trie algorithm is implemented for indexing inside NumericTokenStream that can index int, long, float, and double. For querying, NumericRangeQuery and NumericRangeFilter implement the query part for the same data types.

This class can also be used, to generate lexicographically sortable (according String.compareTo(String)) representations of numeric data types for other usages (e.g. sorting).

Since:
2.9
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
static class | NumericUtils.IntRangeBuilder Expert: Callback for splitIntRange(org.apache.lucene.util.NumericUtils.IntRangeBuilder, int, int, int).
static class | NumericUtils.LongRangeBuilder Expert: Callback for splitLongRange(org.apache.lucene.util.NumericUtils.LongRangeBuilder, int, long, long).
Field Summary
static int | BUF_SIZE_INT Expert: The maximum term length (used for char[] buffer size) for encoding int values.
static int | BUF_SIZE_LONG Expert: The maximum term length (used for char[] buffer size) for encoding long values.
static int | PRECISION_STEP_DEFAULT The default precision step used by NumericField, NumericTokenStream, NumericRangeQuery, and NumericRangeFilter as default
static char | SHIFT_START_INT Expert: Integers are stored at lower precision by shifting off lower bits.
static char | SHIFT_START_LONG Expert: Longs are stored at lower precision by shifting off lower bits.
Method Summary
static String | doubleToPrefixCoded(double val)
static long | doubleToSortableLong(double val) Converts a double value to a sortable signed long.
static String | floatToPrefixCoded(float val)
static int | floatToSortableInt(float val) Converts a float value to a sortable signed int.
static String | intToPrefixCoded(int val)
static String | intToPrefixCoded(int val, int shift)
static int | intToPrefixCoded(int val, int shift, char[] buffer) Expert: Returns prefix coded bits after reducing the precision by shift bits.
static String | longToPrefixCoded(long val)
static String | longToPrefixCoded(long val, int shift)
static int | longToPrefixCoded(long val, int shift, char[] buffer) Expert: Returns prefix coded bits after reducing the precision by shift bits.
static double | prefixCodedToDouble(String val)
static float | prefixCodedToFloat(String val)
static int | prefixCodedToInt(String prefixCoded)
static long | prefixCodedToLong(String prefixCoded)
static float | sortableIntToFloat(int val) Converts a sortable int back to a float.
static double | sortableLongToDouble(long val) Converts a sortable long back to a double.
static void | splitIntRange(NumericUtils.IntRangeBuilder builder, int precisionStep, int minBound, int maxBound) Expert: Splits an int range recursively.
static void | splitLongRange(NumericUtils.LongRangeBuilder builder, int precisionStep, long minBound, long maxBound) Expert: Splits a long range recursively.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

PRECISION_STEP_DEFAULT

public static final int PRECISION_STEP_DEFAULT
The default precision step used by NumericField, NumericTokenStream, NumericRangeQuery, and NumericRangeFilter as default

See Also:
Constant Field Values

SHIFT_START_LONG

public static final char SHIFT_START_LONG
Expert: Longs are stored at lower precision by shifting off lower bits. The shift count is stored as SHIFT_START_LONG+shift in the first character

See Also:
Constant Field Values

BUF_SIZE_LONG

public static final int BUF_SIZE_LONG
Expert: The maximum term length (used for char[] buffer size) for encoding long values.

See Also:
longToPrefixCoded(long,int,char[]), Constant Field Values

SHIFT_START_INT

public static final char SHIFT_START_INT
Expert: Integers are stored at lower precision by shifting off lower bits. The shift count is stored as SHIFT_START_INT+shift in the first character

See Also:
Constant Field Values

BUF_SIZE_INT

public static final int BUF_SIZE_INT
Expert: The maximum term length (used for char[] buffer size) for encoding int values.

See Also:
intToPrefixCoded(int,int,char[]), Constant Field Values
Method Detail

longToPrefixCoded

public static int longToPrefixCoded(long val,
                                    int shift,
                                    char[] buffer)
Expert: Returns prefix coded bits after reducing the precision by shift bits. This is method is used by NumericTokenStream.

Parameters:
val - the numeric value
shift - how many bits to strip from the right
buffer - that will contain the encoded chars, must be at least of BUF_SIZE_LONG length
Returns:
number of chars written to buffer

longToPrefixCoded

public static String longToPrefixCoded(long val,
                                       int shift)

longToPrefixCoded

public static String longToPrefixCoded(long val)

intToPrefixCoded

public static int intToPrefixCoded(int val,
                                   int shift,
                                   char[] buffer)
Expert: Returns prefix coded bits after reducing the precision by shift bits. This is method is used by NumericTokenStream.

Parameters:
val - the numeric value
shift - how many bits to strip from the right
buffer - that will contain the encoded chars, must be at least of BUF_SIZE_INT length
Returns:
number of chars written to buffer

intToPrefixCoded

public static String intToPrefixCoded(int val,
                                      int shift)

intToPrefixCoded

public static String intToPrefixCoded(int val)

prefixCodedToLong

public static long prefixCodedToLong(String prefixCoded)

prefixCodedToInt

public static int prefixCodedToInt(String prefixCoded)

doubleToSortableLong

public static long doubleToSortableLong(double val)
Converts a double value to a sortable signed long. The value is converted by getting their IEEE 754 floating-point "double format" bit layout and then some bits are swapped, to be able to compare the result as long. By this the precision is not reduced, but the value can easily used as a long. The sort order (including Double.NaN) is defined by Double.compareTo(java.lang.Double); NaN is greater than positive infinity.

See Also:
sortableLongToDouble(long)

doubleToPrefixCoded

public static String doubleToPrefixCoded(double val)

sortableLongToDouble

public static double sortableLongToDouble(long val)
Converts a sortable long back to a double.

See Also:
doubleToSortableLong(double)

prefixCodedToDouble

public static double prefixCodedToDouble(String val)

floatToSortableInt

public static int floatToSortableInt(float val)
Converts a float value to a sortable signed int. The value is converted by getting their IEEE 754 floating-point "float format" bit layout and then some bits are swapped, to be able to compare the result as int. By this the precision is not reduced, but the value can easily used as an int. The sort order (including Float.NaN) is defined by Float.compareTo(java.lang.Float); NaN is greater than positive infinity.

See Also:
sortableIntToFloat(int)

floatToPrefixCoded

public static String floatToPrefixCoded(float val)

sortableIntToFloat

public static float sortableIntToFloat(int val)
Converts a sortable int back to a float.

See Also:
floatToSortableInt(float)

prefixCodedToFloat

public static float prefixCodedToFloat(String val)

splitLongRange

public static void splitLongRange(NumericUtils.LongRangeBuilder builder,
                                  int precisionStep,
                                  long minBound,
                                  long maxBound)
Expert: Splits a long range recursively. You may implement a builder that adds clauses to a BooleanQuery for each call to its NumericUtils.LongRangeBuilder.addRange(String,String) method.

This method is used by NumericRangeQuery.

splitIntRange

public static void splitIntRange(NumericUtils.IntRangeBuilder builder,
                                 int precisionStep,
                                 int minBound,
                                 int maxBound)
Expert: Splits an int range recursively. You may implement a builder that adds clauses to a BooleanQuery for each call to its NumericUtils.IntRangeBuilder.addRange(String,String) method.

This method is used by NumericRangeQuery.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericUtils.IntRangeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class NumericUtils.IntRangeBuilder

java.lang.Object
    extended by  org.apache.lucene.util.NumericUtils.IntRangeBuilder
Enclosing class:
NumericUtils
public abstract static class NumericUtils.IntRangeBuilder
extends Object

Expert: Callback for NumericUtils.splitIntRange(org.apache.lucene.util.NumericUtils.IntRangeBuilder, int, int, int). You need to overwrite only one of the methods.

NOTE: This is a very low-level interface, the method signatures may change in later versions.

Constructor Summary
NumericUtils.IntRangeBuilder()
Method Summary
void | addRange(int min, int max, int shift) Overwrite this method, if you like to receive the raw int range bounds.
void | addRange(String minPrefixCoded, String maxPrefixCoded) Overwrite this method, if you like to receive the already prefix encoded range bounds.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NumericUtils.IntRangeBuilder

public NumericUtils.IntRangeBuilder()
Method Detail

addRange

public void addRange(String minPrefixCoded,
                     String maxPrefixCoded)
Overwrite this method, if you like to receive the already prefix encoded range bounds. You can directly build classical range (inclusive) queries from them.

addRange

public void addRange(int min,
                     int max,
                     int shift)
Overwrite this method, if you like to receive the raw int range bounds. You can use this for e.g. debugging purposes (print out range bounds).

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericUtils.LongRangeBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class NumericUtils.LongRangeBuilder

java.lang.Object
    extended by  org.apache.lucene.util.NumericUtils.LongRangeBuilder
Enclosing class:
NumericUtils
public abstract static class NumericUtils.LongRangeBuilder
extends Object

Expert: Callback for NumericUtils.splitLongRange(org.apache.lucene.util.NumericUtils.LongRangeBuilder, int, long, long). You need to overwrite only one of the methods.

NOTE: This is a very low-level interface, the method signatures may change in later versions.

Constructor Summary
NumericUtils.LongRangeBuilder()
Method Summary
void | addRange(long min, long max, int shift) Overwrite this method, if you like to receive the raw long range bounds.
void | addRange(String minPrefixCoded, String maxPrefixCoded) Overwrite this method, if you like to receive the already prefix encoded range bounds.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NumericUtils.LongRangeBuilder

public NumericUtils.LongRangeBuilder()
Method Detail

addRange

public void addRange(String minPrefixCoded,
                     String maxPrefixCoded)
Overwrite this method, if you like to receive the already prefix encoded range bounds. You can directly build classical (inclusive) range queries from them.

addRange

public void addRange(long min,
                     long max,
                     int shift)
Overwrite this method, if you like to receive the raw long range bounds. You can use this for e.g. debugging purposes (print out range bounds).

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OpenBitSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class OpenBitSet

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSet
        extended by  org.apache.lucene.util.OpenBitSet
All Implemented Interfaces:
Serializable, Cloneable, Bits
Direct Known Subclasses:
OpenBitSetDISI
public class OpenBitSet
extends DocIdSet
implements Cloneable, Serializable, Bits

An "open" BitSet implementation that allows direct access to the array of words storing the bits.

Unlike java.util.bitset, the fact that bits are packed into an array of longs is part of the interface. This allows efficient implementation of other algorithms by someone other than the author. It also allows one to efficiently implement alternate serialization or interchange formats.

OpenBitSet is faster than java.util.BitSet in most operations and *much* faster at calculating cardinality of sets and results of set operations. It can also handle sets of larger cardinality (up to 64 * 2**32-1)

The goals of OpenBitSet are the fastest implementation possible, and maximum code reuse. Extra safety and encapsulation may always be built on top, but if that's built in, the cost can never be removed (and hence people re-implement their own version in order to get better performance). If you want a "safe", totally encapsulated (and slower and limited) BitSet class, use java.util.BitSet.

Performance Results

Test system: Pentium 4, Sun Java 1.5_06 -server -Xbatch -Xmx64M
BitSet size = 1,000,000
Results are java.util.BitSet time divided by OpenBitSet time.
 | cardinality | intersect_count | union | nextSetBit | get | iterator
50% full | 3.36 | 3.96 | 1.44 | 1.46 | 1.99 | 1.58
1% full | 3.31 | 3.90 |  | 1.04 |  | 0.99

Test system: AMD Opteron, 64 bit linux, Sun Java 1.5_06 -server -Xbatch -Xmx64M
BitSet size = 1,000,000
Results are java.util.BitSet time divided by OpenBitSet time.
 | cardinality | intersect_count | union | nextSetBit | get | iterator
50% full | 2.50 | 3.50 | 1.00 | 1.03 | 1.12 | 1.25
1% full | 2.51 | 3.49 |  | 1.00 |  | 1.02

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.Bits
Bits.MatchAllBits, Bits.MatchNoBits
Field Summary
protected long[] | bits
protected int | wlen
Fields inherited from class org.apache.lucene.search.DocIdSet
EMPTY_DOCIDSET
Fields inherited from interface org.apache.lucene.util.Bits
EMPTY_ARRAY
Constructor Summary
OpenBitSet()
OpenBitSet(long numBits)
Constructs an OpenBitSet large enough to hold numBits.
OpenBitSet(long[] bits, int numWords)
Constructs an OpenBitSet from an existing long[].
Method Summary
void | and(OpenBitSet other)
void | andNot(OpenBitSet other)
static long | andNotCount(OpenBitSet a, OpenBitSet b) Returns the popcount or cardinality of "a and not b" or "intersection(a, not(b))".
static int | bits2words(long numBits) returns the number of 64 bit words it would take to hold numBits
long | capacity() Returns the current capacity in bits (1 greater than the index of the last bit)
long | cardinality()
void | clear(int startIndex, int endIndex) Clears a range of bits.
void | clear(long index) clears a bit, allowing access beyond the current set size without changing the size.
void | clear(long startIndex, long endIndex) Clears a range of bits.
Object | clone()
void | ensureCapacity(long numBits) Ensure that the long[] is big enough to hold numBits, expanding it if necessary.
void | ensureCapacityWords(int numWords) Expand the long[] with the size given as a number of words (64 bit longs).
boolean | equals(Object o) returns true if both sets have the same bits set
protected int | expandingWordNum(long index)
void | fastClear(int index) clears a bit.
void | fastClear(long index) clears a bit.
void | fastFlip(int index) flips a bit.
void | fastFlip(long index) flips a bit.
boolean | fastGet(int index) Returns true or false for the specified bit index.
boolean | fastGet(long index) Returns true or false for the specified bit index.
void | fastSet(int index) Sets the bit at the specified index.
void | fastSet(long index) Sets the bit at the specified index.
void | flip(long index) flips a bit, expanding the set size if necessary
void | flip(long startIndex, long endIndex) Flips a range of bits, expanding the set size if necessary
boolean | flipAndGet(int index) flips a bit and returns the resulting bit value.
boolean | flipAndGet(long index) flips a bit and returns the resulting bit value.
boolean | get(int index) Returns true or false for the specified bit index.
boolean | get(long index) Returns true or false for the specified bit index
boolean | getAndSet(int index) Sets a bit and returns the previous value.
boolean | getAndSet(long index) Sets a bit and returns the previous value.
int | getBit(int index) returns 1 if the bit is set, 0 if not.
long[] | getBits() Expert: returns the long[] storing the bits
int | getNumWords() Expert: gets the number of longs in the array that are in use
int | hashCode()
void | intersect(OpenBitSet other) this = this AND other
static long | intersectionCount(OpenBitSet a, OpenBitSet b) Returns the popcount or cardinality of the intersection of the two sets.
boolean | intersects(OpenBitSet other) returns true if the sets have any elements in common
boolean | isCacheable() This DocIdSet implementation is cacheable.
boolean | isEmpty() Returns true if there are no set bits
DocIdSetIterator | iterator() Provides a DocIdSetIterator to access the set.
int | length()
int | nextSetBit(int index) Returns the index of the first set bit starting at the index specified.
long | nextSetBit(long index) Returns the index of the first set bit starting at the index specified.
void | or(OpenBitSet other)
int | prevSetBit(int index) Returns the index of the first set bit starting downwards at the index specified.
long | prevSetBit(long index) Returns the index of the first set bit starting downwards at the index specified.
void | remove(OpenBitSet other) Remove all elements set in other.
void | set(long index) sets a bit, expanding the set size if necessary
void | set(long startIndex, long endIndex) Sets a range of bits, expanding the set size if necessary
void | setBits(long[] bits) Expert: sets a new long[] to use as the bit storage
void | setNumWords(int nWords) Expert: sets the number of longs in the array that are in use
long | size() Returns the current capacity of this set.
void | trimTrailingZeros() Lowers numWords, the number of words in use, by checking for trailing zero words.
void | union(OpenBitSet other) this = this OR other
static long | unionCount(OpenBitSet a, OpenBitSet b) Returns the popcount or cardinality of the union of the two sets.
void | xor(OpenBitSet other) this = this XOR other
static long | xorCount(OpenBitSet a, OpenBitSet b) Returns the popcount or cardinality of the exclusive-or of the two sets.
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

bits

protected long[] bits

wlen

protected int wlen
Constructor Detail

OpenBitSet

public OpenBitSet(long numBits)
Constructs an OpenBitSet large enough to hold numBits.

Parameters:
numBits -

OpenBitSet

public OpenBitSet()

OpenBitSet

public OpenBitSet(long[] bits,
                  int numWords)
Constructs an OpenBitSet from an existing long[].
The first 64 bits are in long[0], with bit index 0 at the least significant bit, and bit index 63 at the most significant. Given a bit index, the word containing it is long[index/64], and it is at bit number index%64 within that word.

numWords are the number of elements in the array that contain set bits (non-zero longs). numWords should be <= bits.length, and any existing words in the array at position >= numWords should be zero.

Method Detail

iterator

public DocIdSetIterator iterator()
Description copied from class: DocIdSet
Provides a DocIdSetIterator to access the set. This implementation can return null or DocIdSet.EMPTY_DOCIDSET.iterator() if there are no docs that match.

Specified by:
iterator in class DocIdSet

isCacheable

public boolean isCacheable()
This DocIdSet implementation is cacheable.

Overrides:
isCacheable in class DocIdSet

capacity

public long capacity()
Returns the current capacity in bits (1 greater than the index of the last bit)

size

public long size()
Returns the current capacity of this set. Included for compatibility. This is *not* equal to cardinality()

length

public int length()
Specified by:
length in interface Bits

isEmpty

public boolean isEmpty()
Returns true if there are no set bits

getBits

public long[] getBits()
Expert: returns the long[] storing the bits

setBits

public void setBits(long[] bits)
Expert: sets a new long[] to use as the bit storage

getNumWords

public int getNumWords()
Expert: gets the number of longs in the array that are in use

setNumWords

public void setNumWords(int nWords)
Expert: sets the number of longs in the array that are in use

get

public boolean get(int index)
Returns true or false for the specified bit index.

Specified by:
get in interface Bits

fastGet

public boolean fastGet(int index)
Returns true or false for the specified bit index. The index should be less than the OpenBitSet size

get

public boolean get(long index)
Returns true or false for the specified bit index

fastGet

public boolean fastGet(long index)
Returns true or false for the specified bit index. The index should be less than the OpenBitSet size.

getBit

public int getBit(int index)
returns 1 if the bit is set, 0 if not. The index should be less than the OpenBitSet size

set

public void set(long index)
sets a bit, expanding the set size if necessary

fastSet

public void fastSet(int index)
Sets the bit at the specified index. The index should be less than the OpenBitSet size.

fastSet

public void fastSet(long index)
Sets the bit at the specified index. The index should be less than the OpenBitSet size.

set

public void set(long startIndex,
                long endIndex)
Sets a range of bits, expanding the set size if necessary

Parameters:
startIndex - lower index
endIndex - one-past the last bit to set

expandingWordNum

protected int expandingWordNum(long index)

fastClear

public void fastClear(int index)
clears a bit. The index should be less than the OpenBitSet size.

fastClear

public void fastClear(long index)
clears a bit. The index should be less than the OpenBitSet size.

clear

public void clear(long index)
clears a bit, allowing access beyond the current set size without changing the size.

clear

public void clear(int startIndex,
                  int endIndex)
Clears a range of bits. Clearing past the end does not change the size of the set.

Parameters:
startIndex - lower index
endIndex - one-past the last bit to clear

clear

public void clear(long startIndex,
                  long endIndex)
Clears a range of bits. Clearing past the end does not change the size of the set.

Parameters:
startIndex - lower index
endIndex - one-past the last bit to clear

getAndSet

public boolean getAndSet(int index)
Sets a bit and returns the previous value. The index should be less than the OpenBitSet size.

getAndSet

public boolean getAndSet(long index)
Sets a bit and returns the previous value. The index should be less than the OpenBitSet size.

fastFlip

public void fastFlip(int index)
flips a bit. The index should be less than the OpenBitSet size.

fastFlip

public void fastFlip(long index)
flips a bit. The index should be less than the OpenBitSet size.

flip

public void flip(long index)
flips a bit, expanding the set size if necessary

flipAndGet

public boolean flipAndGet(int index)
flips a bit and returns the resulting bit value. The index should be less than the OpenBitSet size.

flipAndGet

public boolean flipAndGet(long index)
flips a bit and returns the resulting bit value. The index should be less than the OpenBitSet size.

flip

public void flip(long startIndex,
                 long endIndex)
Flips a range of bits, expanding the set size if necessary

Parameters:
startIndex - lower index
endIndex - one-past the last bit to flip

cardinality

public long cardinality()
Returns:
the number of set bits

intersectionCount

public static long intersectionCount(OpenBitSet a,
                                     OpenBitSet b)
Returns the popcount or cardinality of the intersection of the two sets. Neither set is modified.

unionCount

public static long unionCount(OpenBitSet a,
                              OpenBitSet b)
Returns the popcount or cardinality of the union of the two sets. Neither set is modified.

andNotCount

public static long andNotCount(OpenBitSet a,
                               OpenBitSet b)
Returns the popcount or cardinality of "a and not b" or "intersection(a, not(b))". Neither set is modified.

xorCount

public static long xorCount(OpenBitSet a,
                            OpenBitSet b)
Returns the popcount or cardinality of the exclusive-or of the two sets. Neither set is modified.

nextSetBit

public int nextSetBit(int index)
Returns the index of the first set bit starting at the index specified. -1 is returned if there are no more set bits.

nextSetBit

public long nextSetBit(long index)
Returns the index of the first set bit starting at the index specified. -1 is returned if there are no more set bits.

prevSetBit

public int prevSetBit(int index)
Returns the index of the first set bit starting downwards at the index specified. -1 is returned if there are no more set bits.

prevSetBit

public long prevSetBit(long index)
Returns the index of the first set bit starting downwards at the index specified. -1 is returned if there are no more set bits.

clone

public Object clone()
Overrides:
clone in class Object

intersect

public void intersect(OpenBitSet other)
this = this AND other

union

public void union(OpenBitSet other)
this = this OR other

remove

public void remove(OpenBitSet other)
Remove all elements set in other. this = this AND_NOT other

xor

public void xor(OpenBitSet other)
this = this XOR other

and

public void and(OpenBitSet other)

or

public void or(OpenBitSet other)

andNot

public void andNot(OpenBitSet other)

intersects

public boolean intersects(OpenBitSet other)
returns true if the sets have any elements in common

ensureCapacityWords

public void ensureCapacityWords(int numWords)
Expand the long[] with the size given as a number of words (64 bit longs). getNumWords() is unchanged by this call.

ensureCapacity

public void ensureCapacity(long numBits)
Ensure that the long[] is big enough to hold numBits, expanding it if necessary. getNumWords() is unchanged by this call.

trimTrailingZeros

public void trimTrailingZeros()
Lowers numWords, the number of words in use, by checking for trailing zero words.

bits2words

public static int bits2words(long numBits)
returns the number of 64 bit words it would take to hold numBits

equals

public boolean equals(Object o)
returns true if both sets have the same bits set

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OpenBitSetDISI

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class OpenBitSetDISI

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSet
        extended by  org.apache.lucene.util.OpenBitSet
            extended by  org.apache.lucene.util.OpenBitSetDISI
All Implemented Interfaces:
Serializable, Cloneable, Bits
public class OpenBitSetDISI
extends OpenBitSet

OpenBitSet with added methods to bulk-update the bits from a DocIdSetIterator.

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.Bits
Bits.MatchAllBits, Bits.MatchNoBits
Field Summary
Fields inherited from class org.apache.lucene.util.OpenBitSet
bits, wlen
Fields inherited from class org.apache.lucene.search.DocIdSet
EMPTY_DOCIDSET
Fields inherited from interface org.apache.lucene.util.Bits
EMPTY_ARRAY
Constructor Summary
OpenBitSetDISI(DocIdSetIterator disi, int maxSize)
Construct an OpenBitSetDISI with its bits set from the doc ids of the given DocIdSetIterator.
OpenBitSetDISI(int maxSize)
Construct an OpenBitSetDISI with no bits set, and a given maximum size one larger than the largest doc id for which a bit may ever be set on this OpenBitSetDISI.
Method Summary
void | inPlaceAnd(DocIdSetIterator disi) Perform an inplace AND with the doc ids from a given DocIdSetIterator, leaving only the bits set for which the doc ids are in common.
void | inPlaceNot(DocIdSetIterator disi) Perform an inplace NOT with the doc ids from a given DocIdSetIterator, clearing all the bits for each such doc id.
void | inPlaceOr(DocIdSetIterator disi) Perform an inplace OR with the doc ids from a given DocIdSetIterator, setting the bit for each such doc id.
void | inPlaceXor(DocIdSetIterator disi) Perform an inplace XOR with the doc ids from a given DocIdSetIterator, flipping all the bits for each such doc id.
Methods inherited from class org.apache.lucene.util.OpenBitSet
and, andNot, andNotCount, bits2words, capacity, cardinality, clear, clear, clear, clone, ensureCapacity, ensureCapacityWords, equals, expandingWordNum, fastClear, fastClear, fastFlip, fastFlip, fastGet, fastGet, fastSet, fastSet, flip, flip, flipAndGet, flipAndGet, get, get, getAndSet, getAndSet, getBit, getBits, getNumWords, hashCode, intersect, intersectionCount, intersects, isCacheable, isEmpty, iterator, length, nextSetBit, nextSetBit, or, prevSetBit, prevSetBit, remove, set, set, setBits, setNumWords, size, trimTrailingZeros, union, unionCount, xor, xorCount
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

OpenBitSetDISI

public OpenBitSetDISI(DocIdSetIterator disi,
                      int maxSize)
               throws IOException
Construct an OpenBitSetDISI with its bits set from the doc ids of the given DocIdSetIterator. Also give a maximum size one larger than the largest doc id for which a bit may ever be set on this OpenBitSetDISI.

Throws:
IOException

OpenBitSetDISI

public OpenBitSetDISI(int maxSize)
Construct an OpenBitSetDISI with no bits set, and a given maximum size one larger than the largest doc id for which a bit may ever be set on this OpenBitSetDISI.

Method Detail

inPlaceOr

public void inPlaceOr(DocIdSetIterator disi)
               throws IOException
Perform an inplace OR with the doc ids from a given DocIdSetIterator, setting the bit for each such doc id. These doc ids should be smaller than the maximum size passed to the constructor.

Throws:
IOException

inPlaceAnd

public void inPlaceAnd(DocIdSetIterator disi)
                throws IOException
Perform an inplace AND with the doc ids from a given DocIdSetIterator, leaving only the bits set for which the doc ids are in common. These doc ids should be smaller than the maximum size passed to the constructor.

Throws:
IOException

inPlaceNot

public void inPlaceNot(DocIdSetIterator disi)
                throws IOException
Perform an inplace NOT with the doc ids from a given DocIdSetIterator, clearing all the bits for each such doc id. These doc ids should be smaller than the maximum size passed to the constructor.

Throws:
IOException

inPlaceXor

public void inPlaceXor(DocIdSetIterator disi)
                throws IOException
Perform an inplace XOR with the doc ids from a given DocIdSetIterator, flipping all the bits for each such doc id. These doc ids should be smaller than the maximum size passed to the constructor.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


OpenBitSetIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class OpenBitSetIterator

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSetIterator
        extended by  org.apache.lucene.util.OpenBitSetIterator

public class OpenBitSetIterator
extends DocIdSetIterator

An iterator to iterate over set bits in an OpenBitSet. This is faster than nextSetBit() for iterating over the complete set of bits, especially when the density of the bits set is high.

Field Summary
protected static int[] bitlist
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
Constructor Summary
OpenBitSetIterator(long[] bits, int numWords)
OpenBitSetIterator(OpenBitSet obs)
Method Summary
 int advance(int target)
Advances to the first beyond (see NOTE below) the current whose document number is greater than or equal to target.
 int docID()
Returns the following: -1 or DocIdSetIterator.NO_MORE_DOCS if DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) were not called yet.
 int nextDoc()
alternate shift implementations // 32 bit shifts, but a long shift needed at the end private void shift2() { int y = (int)word; if (y==0) {wordShift +=32; y = (int)(word >>>32); } if ((y & 0x0000FFFF) == 0) { wordShift +=16; y>>>=16; } if ((y & 0x000000FF) == 0) { wordShift +=8; y>>>=8; } indexArray = bitlist[y & 0xff]; word >>>= (wordShift +1); } private void shift3() { int lower = (int)word; int lowByte = lower & 0xff; if (lowByte != 0) { indexArray=bitlist[lowByte]; return; } shift(); }
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

bitlist

protected static final int[] bitlist
Constructor Detail

OpenBitSetIterator

public OpenBitSetIterator(OpenBitSet obs)

OpenBitSetIterator

public OpenBitSetIterator(long[] bits,
                          int numWords)
Method Detail

nextDoc

public int nextDoc()
alternate shift implementations // 32 bit shifts, but a long shift needed at the end private void shift2() { int y = (int)word; if (y==0) {wordShift +=32; y = (int)(word >>>32); } if ((y & 0x0000FFFF) == 0) { wordShift +=16; y>>>=16; } if ((y & 0x000000FF) == 0) { wordShift +=8; y>>>=8; } indexArray = bitlist[y & 0xff]; word >>>= (wordShift +1); } private void shift3() { int lower = (int)word; int lowByte = lower & 0xff; if (lowByte != 0) { indexArray=bitlist[lowByte]; return; } shift(); }

Specified by:
nextDoc in class DocIdSetIterator

advance

public int advance(int target)
Description copied from class: DocIdSetIterator
Advances to the first beyond (see NOTE below) the current whose document number is greater than or equal to target. Returns the current document number or DocIdSetIterator.NO_MORE_DOCS if there are no more docs in the set.

Behaves as if written:

 int advance(int target) {
   int doc;
   while ((doc = nextDoc()) < target) {
   }
   return doc;
 }
Some implementations are considerably more efficient than that.

NOTE: when target ≤ current implementations may opt not to advance beyond their current DocIdSetIterator.docID().

NOTE: this method may be called with DocIdSetIterator.NO_MORE_DOCS for efficiency by some Scorers. If your implementation cannot efficiently determine that it should exhaust, it is recommended that you check for that value in each call to this method.

NOTE: after the iterator has exhausted you should not call this method, as it may result in unpredicted behavior.

Specified by:
advance in class DocIdSetIterator

docID

public int docID()
Description copied from class: DocIdSetIterator
Returns the following:
  • -1 or DocIdSetIterator.NO_MORE_DOCS if DocIdSetIterator.nextDoc() or DocIdSetIterator.advance(int) were not called yet.
  • DocIdSetIterator.NO_MORE_DOCS if the iterator has exhausted.
  • Otherwise it should return the doc ID it is currently on.

Specified by:
docID in class DocIdSetIterator
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.util
Interfaces
Attribute
AttributeReflector
Bits
BytesRefIterator
RollingBuffer.Resettable
TwoPhaseCommit
Classes
_TestUtil
ArrayUtil
AttributeImpl
AttributeSource
AttributeSource.AttributeFactory
AttributeSource.State
Bits.MatchAllBits
Bits.MatchNoBits
BitUtil
BitVector
ByteBlockPool
ByteBlockPool.Allocator
ByteBlockPool.DirectAllocator
ByteBlockPool.DirectTrackingAllocator
BytesRef
BytesRefHash
BytesRefHash.BytesStartArray
BytesRefHash.DirectBytesStartArray
BytesRefHash.TrackingDirectBytesStartArray
CharacterUtils
CharacterUtils.CharacterBuffer
CharsRef
CloseableThreadLocal
CodecUtil
CollectionUtil
CommandLineUtil
Constants
Counter
DocIdBitSet
DoubleBarrelLRUCache
DoubleBarrelLRUCache.CloneableKey
DummyConcurrentLock
English
FieldCacheSanityChecker
FieldCacheSanityChecker.Insanity
FieldCacheSanityChecker.InsanityType
FixedBitSet
IndexableBinaryStringTools
IntsRef
IOUtils
LineFileDocs
LuceneJUnitDividingSelector
LuceneJUnitResultFormatter
LuceneTestCase
LuceneTestCaseRunner
MapBackedSet
MapOfSets
NamedThreadFactory
NumericUtils
NumericUtils.IntRangeBuilder
NumericUtils.LongRangeBuilder
OpenBitSet
OpenBitSetDISI
OpenBitSetIterator
PagedBytes
PagedBytes.Reader
Parameter
PriorityQueue
RamUsageEstimator
ReaderUtil
ReaderUtil.Gather
RecyclingByteBlockAllocator
Rethrow
RollingBuffer
RollingCharBuffer
ScorerDocQueue
SetOnce
SimpleStringInterner
SmallFloat
SmartRandom
SortedVIntList
SorterTemplate
StoreClassNameRule
StringHelper
StringInterner
SystemPropertiesInvariantRule
SystemPropertiesRestoreRule
ThrottledIndexOutput
ToStringUtils
TwoPhaseCommitTool
TwoPhaseCommitTool.TwoPhaseCommitWrapper
UncaughtExceptionsRule
UncaughtExceptionsRule.UncaughtExceptionEntry
UnicodeUtil
UnicodeUtil.UTF16Result
UnicodeUtil.UTF8Result
UnsafeByteArrayInputStream
UnsafeByteArrayOutputStream
Vint8
Vint8.Position
VirtualMethod
WeakIdentityMap
Enums
RamUsageEstimator.JvmFeature
Version
Exceptions
BytesRefHash.MaxBytesLengthExceededException
SetOnce.AlreadySetException
ThreadInterruptedException
TwoPhaseCommitTool.CommitFailException
TwoPhaseCommitTool.PrepareCommitFailException
Annotation Types
LuceneTestCase.Nightly


org.apache.lucene.util

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.util

Some utility classes.

See:
Description

Interface Summary
Attribute | Base interface for attributes.
AttributeReflector | This interface is used to reflect contents of AttributeSource or AttributeImpl.
Bits | Interface for Bitset-like structures.
BytesRefIterator | A simple iterator interface for BytesRef iteration.
RollingBuffer.Resettable |
TwoPhaseCommit | An interface for implementations that support 2-phase commit.

Class Summary
_TestUtil | General utility methods for Lucene unit tests.
ArrayUtil | Methods for manipulating arrays.
AttributeImpl | Base class for Attributes that can be added to a AttributeSource.
AttributeSource | An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
AttributeSource.AttributeFactory | An AttributeFactory creates instances of AttributeImpls.
AttributeSource.State | This class holds the state of an AttributeSource.
Bits.MatchAllBits | Bits impl of the specified length with all bits set.
Bits.MatchNoBits | Bits impl of the specified length with no bits set.
BitUtil | A variety of high efficiency bit twiddling routines.
BitVector | Optimized implementation of a vector of bits.
ByteBlockPool | Class that Posting and PostingVector use to write byte streams into shared fixed-size byte[] arrays.
ByteBlockPool.Allocator | Abstract class for allocating and freeing byte blocks.
ByteBlockPool.DirectAllocator | A simple ByteBlockPool.Allocator that never recycles.
ByteBlockPool.DirectTrackingAllocator | A simple ByteBlockPool.Allocator that never recycles, but tracks how much total RAM is in use.
BytesRef | Represents byte[], as a slice (offset + length) into an existing byte[].
BytesRefHash | BytesRefHash is a special purpose hash-map like data-structure optimized for BytesRef instances.
BytesRefHash.BytesStartArray | Manages allocation of the per-term addresses.
BytesRefHash.DirectBytesStartArray | A simple BytesRefHash.BytesStartArray that tracks memory allocation using a private AtomicLong instance.
BytesRefHash.TrackingDirectBytesStartArray | A simple BytesRefHash.BytesStartArray that tracks all memory allocation using a shared AtomicLong instance.
CharacterUtils | CharacterUtils provides a unified interface to Character-related operations to implement backwards compatible character operations based on a Version instance.
CharacterUtils.CharacterBuffer | A simple IO buffer to use with CharacterUtils.fill(CharacterBuffer, Reader).
CharsRef | Represents char[], as a slice (offset + length) into an existing char[].
CloseableThreadLocal<T> | Java's builtin ThreadLocal has a serious flaw: it can take an arbitrarily long amount of time to dereference the things you had stored in it, even once the ThreadLocal instance itself is no longer referenced.
CodecUtil | Utility class for reading and writing versioned headers.
CollectionUtil | Methods for manipulating (sorting) collections.
CommandLineUtil | Class containing some useful methods used by command line tools
Constants | Some useful constants.
Counter | Simple counter class
DocIdBitSet | Simple DocIdSet and DocIdSetIterator backed by a BitSet
DoubleBarrelLRUCache<K extends DoubleBarrelLRUCache.CloneableKey,V> | Simple concurrent LRU cache, using a "double barrel" approach where two ConcurrentHashMaps record entries.
DoubleBarrelLRUCache.CloneableKey | Object providing clone(); the key class must subclass this.
DummyConcurrentLock | A dummy lock as a replacement for ReentrantLock to disable locking
English |
FieldCacheSanityChecker | Provides methods for sanity checking that entries in the FieldCache are not wasteful or inconsistent.
FieldCacheSanityChecker.Insanity | Simple container for a collection of related CacheEntry objects that in conjunction with each other represent some "insane" usage of the FieldCache.
FieldCacheSanityChecker.InsanityType | An Enumeration of the different types of "insane" behavior that may be detected in a FieldCache.
FixedBitSet | BitSet of fixed length (numBits), backed by accessible (FixedBitSet.getBits()) long[], accessed with an int index, implementing Bits and DocIdSet.
IndexableBinaryStringTools | Provides support for converting byte sequences to Strings and back again.
IntsRef | Represents int[], as a slice (offset + length) into an existing int[].
IOUtils | This class emulates the new Java 7 "Try-With-Resources" statement.
LineFileDocs | Minimal port of contrib/benchmark's LneDocSource + DocMaker, so tests can enum docs from a line file created by contrib/benchmark's WriteLineDoc task
LuceneJUnitDividingSelector | Divides filesets into equal groups
LuceneJUnitResultFormatter | Just like BriefJUnitResultFormatter "brief" bundled with ant, except all formatted text is buffered until the test suite is finished.
LuceneTestCase | Base class for all Lucene unit tests, Junit3 or Junit4 variant.
LuceneTestCaseRunner | optionally filters the tests to be run by TEST_METHOD
MapBackedSet<E> | A Set implementation that wraps an actual Map based implementation.
MapOfSets<K,V> | Helper class for keeping Lists of Objects associated with keys.
NamedThreadFactory | A default ThreadFactory implementation that accepts the name prefix of the created threads as a constructor argument.
NumericUtils | This is a helper class to generate prefix-encoded representations for numerical values and supplies converters to represent float/double values as sortable integers/longs.
NumericUtils.IntRangeBuilder | Expert: Callback for NumericUtils.splitIntRange(org.apache.lucene.util.NumericUtils.IntRangeBuilder, int, int, int).
NumericUtils.LongRangeBuilder | Expert: Callback for NumericUtils.splitLongRange(org.apache.lucene.util.NumericUtils.LongRangeBuilder, int, long, long).
OpenBitSet | An "open" BitSet implementation that allows direct access to the array of words storing the bits.
OpenBitSetDISI | OpenBitSet with added methods to bulk-update the bits from a DocIdSetIterator.
OpenBitSetIterator | An iterator to iterate over set bits in an OpenBitSet.
PagedBytes | Represents a logical byte[] as a series of pages.
PagedBytes.Reader | Provides methods to read BytesRefs from a frozen PagedBytes.
Parameter | Deprecated. Use Java 5 enum, will be removed in a later Lucene 3.x release.
PriorityQueue<T> | A PriorityQueue maintains a partial ordering of its elements such that the least element can always be found in constant time.
RamUsageEstimator | Estimates the size (memory representation) of Java objects.
ReaderUtil | Common util methods for dealing with IndexReaders.
ReaderUtil.Gather | Recursively visits all sub-readers of a reader.
RecyclingByteBlockAllocator | A ByteBlockPool.Allocator implementation that recycles unused byte blocks in a buffer and reuses them in subsequent calls to RecyclingByteBlockAllocator.getByteBlock().
Rethrow | Sneaky: rethrowing checked exceptions as unchecked ones.
RollingBuffer<T extends RollingBuffer.Resettable> | Acts like forever growing T[], but internally uses a circular buffer to reuse instances of T.
RollingCharBuffer | Acts like a forever growing char[] as you read characters into it from the provided reader, but internally it uses a circular buffer to only hold the characters that haven't been freed yet.
ScorerDocQueue | A ScorerDocQueue maintains a partial ordering of its Scorers such that the least Scorer can always be found in constant time.
SetOnce<T> | A convenient class which offers a semi-immutable object wrapper implementation which allows one to set the value of an object exactly once, and retrieve it many times.
SimpleStringInterner | Simple lockless and memory barrier free String intern cache that is guaranteed to return the same String instance as String.intern() does.
SmallFloat | Floating point numbers smaller than 32 bits.
SmartRandom | A random that tracks if its been initialized properly, and throws an exception if it hasn't.
SortedVIntList | Stores and iterate on sorted integers in compressed form in RAM.
SorterTemplate | This class was inspired by CGLIB, but provides a better QuickSort algorithm without additional InsertionSort at the end.
StoreClassNameRule |
StringHelper | Methods for manipulating strings.
StringInterner | Subclasses of StringInterner are required to return the same single String object for all equal strings.
SystemPropertiesInvariantRule |
SystemPropertiesRestoreRule | Restore system properties from before the nested Statement.
ThrottledIndexOutput | Intentionally slow IndexOutput for testing.
ToStringUtils | Helper methods to ease implementing Object.toString().
TwoPhaseCommitTool | A utility for executing 2-phase commit on several objects.
TwoPhaseCommitTool.TwoPhaseCommitWrapper | A wrapper of a TwoPhaseCommit, which delegates all calls to the wrapped object, passing the specified commitData.
UncaughtExceptionsRule | Subscribes to Thread.setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler) and causes test/ suite failures if uncaught exceptions are detected.
UncaughtExceptionsRule.UncaughtExceptionEntry |
UnicodeUtil | Class to encode java's UTF16 char[] into UTF8 byte[] without always allocating a new byte[] as String.getBytes("UTF-8") does.
UnicodeUtil.UTF16Result | Holds decoded UTF16 code units.
UnicodeUtil.UTF8Result | Holds decoded UTF8 code units.
UnsafeByteArrayInputStream | This class, much like ByteArrayInputStream uses a given buffer as a source of an InputStream.
UnsafeByteArrayOutputStream | This class is used as a wrapper to a byte array, extending OutputStream.
Vint8 | Variable-length encoding of 32-bit integers, into 8-bit bytes.
Vint8.Position | Because Java lacks call-by-reference, this class boxes the decoding position, which is initially set by the caller, and returned after decoding, incremented by the number of bytes processed.
VirtualMethod<C> | A utility for keeping backwards compatibility on previously abstract methods (or similar replacements).
WeakIdentityMap<K,V> | Implements a combination of WeakHashMap and IdentityHashMap.

Enum Summary
RamUsageEstimator.JvmFeature | JVM diagnostic features.
Version | Use by certain classes to match version compatibility across releases of Lucene.

Exception Summary
BytesRefHash.MaxBytesLengthExceededException | Thrown if a BytesRef exceeds the BytesRefHash limit of ByteBlockPool.BYTE_BLOCK_SIZE-2.
SetOnce.AlreadySetException | Thrown when SetOnce.set(Object) is called more than once.
ThreadInterruptedException | Thrown by lucene on detecting that Thread.interrupt() had been called.
TwoPhaseCommitTool.CommitFailException | Thrown by TwoPhaseCommitTool.execute(TwoPhaseCommit...) when an object fails to commit().
TwoPhaseCommitTool.PrepareCommitFailException | Thrown by TwoPhaseCommitTool.execute(TwoPhaseCommit...) when an object fails to prepareCommit().

Annotation Types Summary
LuceneTestCase.Nightly Annotation for tests that should only be run during nightly builds.

Package org.apache.lucene.util Description

Some utility classes.


org.apache.lucene.util Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.util

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util._TestUtil
    • java.util.AbstractCollection<E> (implements java.util.Collection<E>)
      • java.util.AbstractSet<E> (implements java.util.Set<E>)
        • org.apache.lucene.util.MapBackedSet<E> (implements java.io.Serializable)
    • org.apache.lucene.util.ArrayUtil
    • org.junit.Assert
      • org.apache.lucene.util.LuceneTestCase
    • org.apache.lucene.util.AttributeImpl (implements org.apache.lucene.util.Attribute, java.lang.Cloneable, java.io.Serializable)
    • org.apache.lucene.util.AttributeSource
    • org.apache.lucene.util.AttributeSource.AttributeFactory
    • org.apache.lucene.util.AttributeSource.State (implements java.lang.Cloneable)
    • org.apache.lucene.util.Bits.MatchAllBits (implements org.apache.lucene.util.Bits)
    • org.apache.lucene.util.Bits.MatchNoBits (implements org.apache.lucene.util.Bits)
    • org.apache.lucene.util.BitUtil
    • org.apache.lucene.util.BitVector (implements org.apache.lucene.util.Bits, java.lang.Cloneable)
    • org.apache.lucene.util.ByteBlockPool
    • org.apache.lucene.util.ByteBlockPool.Allocator
      • org.apache.lucene.util.ByteBlockPool.DirectAllocator
      • org.apache.lucene.util.ByteBlockPool.DirectTrackingAllocator
      • org.apache.lucene.util.RecyclingByteBlockAllocator
    • org.apache.lucene.util.BytesRef (implements java.lang.Cloneable, java.lang.Comparable<T>)
    • org.apache.lucene.util.BytesRefHash
    • org.apache.lucene.util.BytesRefHash.BytesStartArray
      • org.apache.lucene.util.BytesRefHash.DirectBytesStartArray
      • org.apache.lucene.util.BytesRefHash.TrackingDirectBytesStartArray
    • org.apache.lucene.util.CharacterUtils
    • org.apache.lucene.util.CharacterUtils.CharacterBuffer
    • org.apache.lucene.util.CharsRef (implements java.lang.CharSequence, java.lang.Cloneable, java.lang.Comparable<T>)
    • org.apache.lucene.util.CloseableThreadLocal<T> (implements java.io.Closeable)
    • org.apache.lucene.util.CodecUtil
    • org.apache.lucene.util.CollectionUtil
    • org.apache.lucene.util.CommandLineUtil
    • org.apache.lucene.util.Constants
    • org.apache.lucene.util.Counter
    • org.apache.lucene.store.DataInput (implements java.lang.Cloneable)
      • org.apache.lucene.util.PagedBytes.PagedBytesDataInput
    • org.apache.lucene.store.DataOutput
      • org.apache.lucene.store.IndexOutput (implements java.io.Closeable)
        • org.apache.lucene.util.ThrottledIndexOutput
      • org.apache.lucene.util.PagedBytes.PagedBytesDataOutput
    • org.apache.lucene.search.DocIdSet
      • org.apache.lucene.util.DocIdBitSet
      • org.apache.lucene.util.FixedBitSet (implements org.apache.lucene.util.Bits)
      • org.apache.lucene.util.OpenBitSet (implements org.apache.lucene.util.Bits, java.lang.Cloneable, java.io.Serializable)
        • org.apache.lucene.util.OpenBitSetDISI
      • org.apache.lucene.util.SortedVIntList
    • org.apache.lucene.search.DocIdSetIterator
      • org.apache.lucene.util.OpenBitSetIterator
    • org.apache.lucene.util.DoubleBarrelLRUCache<K,V>
    • org.apache.lucene.util.DoubleBarrelLRUCache.CloneableKey
    • org.apache.lucene.util.DummyConcurrentLock (implements java.util.concurrent.locks.Lock)
    • org.apache.lucene.util.English
    • org.apache.lucene.util.FieldCacheSanityChecker
    • org.apache.lucene.util.FieldCacheSanityChecker.Insanity
    • org.apache.lucene.util.FieldCacheSanityChecker.InsanityType
    • org.apache.lucene.util.IndexableBinaryStringTools
    • java.io.InputStream (implements java.io.Closeable)
      • org.apache.lucene.util.UnsafeByteArrayInputStream
    • org.apache.lucene.util.IntsRef (implements java.lang.Cloneable, java.lang.Comparable<T>)
    • org.apache.lucene.util.IOUtils
    • org.apache.lucene.util.LineFileDocs (implements java.io.Closeable)
    • org.apache.lucene.util.LuceneJUnitResultFormatter (implements org.apache.tools.ant.taskdefs.optional.junit.JUnitResultFormatter)
    • org.apache.lucene.util.MapOfSets<K,V>
    • org.apache.lucene.util.NamedThreadFactory (implements java.util.concurrent.ThreadFactory)
    • org.apache.lucene.util.NumericUtils
    • org.apache.lucene.util.NumericUtils.IntRangeBuilder
    • org.apache.lucene.util.NumericUtils.LongRangeBuilder
    • java.io.OutputStream (implements java.io.Closeable, java.io.Flushable)
      • org.apache.lucene.util.UnsafeByteArrayOutputStream
    • org.apache.lucene.util.PagedBytes
    • org.apache.lucene.util.PagedBytes.Reader
    • org.apache.lucene.util.Parameter (implements java.io.Serializable)
    • org.apache.lucene.util.PriorityQueue<T>
    • org.apache.tools.ant.ProjectComponent (implements java.lang.Cloneable)
      • org.apache.tools.ant.types.DataType (implements java.lang.Cloneable)
        • org.apache.tools.ant.types.selectors.BaseSelector (implements org.apache.tools.ant.types.selectors.FileSelector)
          • org.apache.tools.ant.types.selectors.BaseExtendSelector (implements org.apache.tools.ant.types.selectors.ExtendFileSelector)
            • org.apache.lucene.util.LuceneJUnitDividingSelector
    • org.apache.lucene.util.RamUsageEstimator
    • java.util.Random (implements java.io.Serializable)
      • org.apache.lucene.util.SmartRandom
    • org.apache.lucene.util.ReaderUtil
    • org.apache.lucene.util.ReaderUtil.Gather
    • org.apache.lucene.util.Rethrow
    • org.apache.lucene.util.RollingBuffer<T>
    • org.apache.lucene.util.RollingCharBuffer
    • org.junit.runner.Runner (implements org.junit.runner.Describable)
      • org.junit.runners.ParentRunner<T> (implements org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable)
        • org.junit.runners.BlockJUnit4ClassRunner
          • org.apache.lucene.util.LuceneTestCaseRunner
    • org.apache.lucene.util.ScorerDocQueue
    • org.apache.lucene.util.SetOnce<T>
    • org.apache.lucene.util.SmallFloat
    • org.apache.lucene.util.SorterTemplate
    • org.apache.lucene.util.StoreClassNameRule (implements org.junit.rules.TestRule)
    • org.apache.lucene.util.StringHelper
    • org.apache.lucene.util.StringInterner
      • org.apache.lucene.util.SimpleStringInterner
    • org.apache.lucene.util.SystemPropertiesInvariantRule (implements org.junit.rules.TestRule)
    • org.apache.lucene.util.SystemPropertiesRestoreRule (implements org.junit.rules.TestRule)
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • java.io.IOException
          • org.apache.lucene.util.TwoPhaseCommitTool.CommitFailException
          • org.apache.lucene.util.TwoPhaseCommitTool.PrepareCommitFailException
        • java.lang.RuntimeException
          • org.apache.lucene.util.BytesRefHash.MaxBytesLengthExceededException
          • org.apache.lucene.util.SetOnce.AlreadySetException
          • org.apache.lucene.util.ThreadInterruptedException
    • org.apache.lucene.util.ToStringUtils
    • org.apache.lucene.util.TwoPhaseCommitTool
    • org.apache.lucene.util.TwoPhaseCommitTool.TwoPhaseCommitWrapper (implements org.apache.lucene.util.TwoPhaseCommit)
    • org.apache.lucene.util.UncaughtExceptionsRule (implements org.junit.rules.TestRule)
    • org.apache.lucene.util.UncaughtExceptionsRule.UncaughtExceptionEntry
    • org.apache.lucene.util.UnicodeUtil
    • org.apache.lucene.util.UnicodeUtil.UTF16Result
    • org.apache.lucene.util.UnicodeUtil.UTF8Result
    • org.apache.lucene.util.Vint8
    • org.apache.lucene.util.Vint8.Position
    • org.apache.lucene.util.VirtualMethod<C>
    • org.apache.lucene.util.WeakIdentityMap<K,V>

Interface Hierarchy

  • org.apache.lucene.util.Attribute
  • org.apache.lucene.util.AttributeReflector
  • org.apache.lucene.util.Bits
  • org.apache.lucene.util.BytesRefIterator
  • org.apache.lucene.util.RollingBuffer.Resettable
  • org.apache.lucene.util.TwoPhaseCommit

Annotation Type Hierarchy

  • org.apache.lucene.util.LuceneTestCase.Nightly (implements java.lang.annotation.Annotation)

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.util.Version
      • org.apache.lucene.util.RamUsageEstimator.JvmFeature


Uses of Package org.apache.lucene.util

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.util

Packages that use org.apache.lucene.util
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ar | Analyzer for Arabic.
org.apache.lucene.analysis.bg | Analyzer for Bulgarian.
org.apache.lucene.analysis.br | Analyzer for Brazilian Portuguese.
org.apache.lucene.analysis.ca | Analyzer for Catalan.
org.apache.lucene.analysis.cjk | Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).
org.apache.lucene.analysis.cn | Analyzer for Chinese, which indexes unigrams (individual chinese characters).
org.apache.lucene.analysis.cn.smart | Analyzer for Simplified Chinese, which indexes words.
org.apache.lucene.analysis.compound | A filter that decomposes compound words you find in many Germanic languages into the word parts.
org.apache.lucene.analysis.cz | Analyzer for Czech.
org.apache.lucene.analysis.da | Analyzer for Danish.
org.apache.lucene.analysis.de | Analyzer for German.
org.apache.lucene.analysis.el | Analyzer for Greek.
org.apache.lucene.analysis.en | Analyzer for English.
org.apache.lucene.analysis.es | Analyzer for Spanish.
org.apache.lucene.analysis.eu | Analyzer for Basque.
org.apache.lucene.analysis.fa | Analyzer for Persian.
org.apache.lucene.analysis.fi | Analyzer for Finnish.
org.apache.lucene.analysis.fr | Analyzer for French.
org.apache.lucene.analysis.ga | Analysis for Irish.
org.apache.lucene.analysis.gl | Analyzer for Galician.
org.apache.lucene.analysis.hi | Analyzer for Hindi.
org.apache.lucene.analysis.hu | Analyzer for Hungarian.
org.apache.lucene.analysis.hunspell | Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.
org.apache.lucene.analysis.hy | Analyzer for Armenian.
org.apache.lucene.analysis.icu | Analysis components based on ICU
org.apache.lucene.analysis.icu.segmentation | Tokenizer that breaks text into words with the Unicode Text Segmentation algorithm.
org.apache.lucene.analysis.icu.tokenattributes | Additional ICU-specific Attributes for text analysis.
org.apache.lucene.analysis.id | Analyzer for Indonesian.
org.apache.lucene.analysis.in | Analysis components for Indian languages.
org.apache.lucene.analysis.it | Analyzer for Italian.
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.ja.dict | Kuromoji dictionary implementation.
org.apache.lucene.analysis.ja.tokenattributes | Additional Kuromoji-specific Attributes for text analysis.
org.apache.lucene.analysis.lv | Analyzer for Latvian.
org.apache.lucene.analysis.miscellaneous | Miscellaneous TokenStreams
org.apache.lucene.analysis.ngram | Character n-gram tokenizers and filters.
org.apache.lucene.analysis.nl | Analyzer for Dutch.
org.apache.lucene.analysis.no | Analyzer for Norwegian.
org.apache.lucene.analysis.path | Analysis components for path-like strings such as filenames.
org.apache.lucene.analysis.payloads | Provides various convenience classes for creating payloads on Tokens.
org.apache.lucene.analysis.phonetic | Analysis components for phonetic search.
org.apache.lucene.analysis.pl | Analyzer for Polish.
org.apache.lucene.analysis.position | Filter for assigning position increments.
org.apache.lucene.analysis.pt | Analyzer for Portuguese.
org.apache.lucene.analysis.query | Automatically filter high-frequency stopwords.
org.apache.lucene.analysis.reverse | Filter to reverse token text.
org.apache.lucene.analysis.ro | Analyzer for Romanian.
org.apache.lucene.analysis.ru | Analyzer for Russian.
org.apache.lucene.analysis.shingle | Word n-gram filters
org.apache.lucene.analysis.sinks | Implementations of the SinkTokenizer that might be useful.
org.apache.lucene.analysis.snowball | TokenFilter and Analyzer implementations that use Snowball stemmers.
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.stempel | Stempel: Algorithmic Stemmer
org.apache.lucene.analysis.sv | Analyzer for Swedish.
org.apache.lucene.analysis.synonym | Analysis components for Synonyms.
org.apache.lucene.analysis.th | Analyzer for Thai.
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.
org.apache.lucene.analysis.tr | Analyzer for Turkish.
org.apache.lucene.analysis.wikipedia | Tokenizer that is aware of Wikipedia syntax.
org.apache.lucene.collation | CollationKeyFilter converts each token into its binary CollationKey using the provided Collator, and then encode the CollationKey as a String using IndexableBinaryStringTools, to allow it to be stored as an index term.
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index.attributes | Category attributes and their properties for indexing
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.facet.taxonomy | Taxonomy of Categories
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.analyzing | QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.
org.apache.lucene.queryParser.complexPhrase | QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
org.apache.lucene.queryParser.core.config | Contains the base classes used to configure the query processing
org.apache.lucene.queryParser.ext | Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.grouping | This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.search.similar | Document similarity query generators.
org.apache.lucene.search.spell | Suggest alternate spellings for words.
org.apache.lucene.search.suggest | Support for Autocomplete/Autosuggest
org.apache.lucene.search.suggest.fst | Finite-state based autosuggest.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.
org.apache.lucene.util | Some utility classes.
org.apache.lucene.util.fst | Finite state transducers

Classes in org.apache.lucene.util used by org.apache.lucene.analysis
Attribute
Base interface for attributes.
AttributeImpl
Base class for Attributes that can be added to a AttributeSource.
AttributeReflector
This interface is used to reflect contents of AttributeSource or AttributeImpl.
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
AttributeSource.AttributeFactory
An AttributeFactory creates instances of AttributeImpls.
AttributeSource.State
This class holds the state of an AttributeSource.
LuceneTestCase
Base class for all Lucene unit tests, Junit3 or Junit4 variant.
RollingBuffer
Acts like forever growing T[], but internally uses a circular buffer to reuse instances of T.
RollingBuffer.Resettable
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.ar
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
AttributeSource.AttributeFactory
An AttributeFactory creates instances of AttributeImpls.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.bg
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.br
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.ca
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.cjk
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
AttributeSource.AttributeFactory
An AttributeFactory creates instances of AttributeImpls.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.cn
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
AttributeSource.AttributeFactory
An AttributeFactory creates instances of AttributeImpls.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.cn.smart
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
AttributeSource.AttributeFactory
An AttributeFactory creates instances of AttributeImpls.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.compound
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.cz
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.da
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.de
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.el
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.en
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.es
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.eu
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.fa
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.fi
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.fr
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.ga
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.gl
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.hi
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.hu
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.hunspell
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.hy
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.icu
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.icu.segmentation
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.icu.tokenattributes
Attribute
Base interface for attributes.
AttributeImpl
Base class for Attributes that can be added to a AttributeSource.
AttributeReflector
This interface is used to reflect contents of AttributeSource or AttributeImpl.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.id
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.in
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
AttributeSource.AttributeFactory
An AttributeFactory creates instances of AttributeImpls.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.it
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.ja
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.ja.dict
IntsRef
Represents int[], as a slice (offset + length) into an existing int[].

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.ja.tokenattributes
Attribute
Base interface for attributes.
AttributeImpl
Base class for Attributes that can be added to a AttributeSource.
AttributeReflector
This interface is used to reflect contents of AttributeSource or AttributeImpl.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.lv
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.miscellaneous
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.ngram
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
AttributeSource.AttributeFactory
An AttributeFactory creates instances of AttributeImpls.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.nl
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.no
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.path
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.payloads
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.phonetic
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
AttributeSource.State
This class holds the state of an AttributeSource.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.pl
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.position
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.pt
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.query
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.reverse
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.ro
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.ru
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
AttributeSource.AttributeFactory
An AttributeFactory creates instances of AttributeImpls.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.shingle
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.sinks
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.snowball
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.standard
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
AttributeSource.AttributeFactory
An AttributeFactory creates instances of AttributeImpls.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.stempel
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.sv
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.synonym
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
BytesRef
Represents byte[], as a slice (offset + length) into an existing byte[].
BytesRefHash
BytesRefHash is a special purpose hash-map like data-structure optimized for BytesRef instances.
CharsRef
Represents char[], as a slice (offset + length) into an existing char[].

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.th
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.tokenattributes
Attribute
Base interface for attributes.
AttributeImpl
Base class for Attributes that can be added to a AttributeSource.
AttributeReflector
This interface is used to reflect contents of AttributeSource or AttributeImpl.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.tr
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.analysis.wikipedia
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
AttributeSource.AttributeFactory
An AttributeFactory creates instances of AttributeImpls.

Classes in org.apache.lucene.util used by org.apache.lucene.collation
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.

Classes in org.apache.lucene.util used by org.apache.lucene.facet.enhancements
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.

Classes in org.apache.lucene.util used by org.apache.lucene.facet.enhancements.association
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.

Classes in org.apache.lucene.util used by org.apache.lucene.facet.index.attributes
Attribute
Base interface for attributes.
AttributeImpl
Base class for Attributes that can be added to a AttributeSource.

Classes in org.apache.lucene.util used by org.apache.lucene.facet.index.streaming
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.

Classes in org.apache.lucene.util used by org.apache.lucene.facet.search
OpenBitSet
An "open" BitSet implementation that allows direct access to the array of words storing the bits.

Classes in org.apache.lucene.util used by org.apache.lucene.facet.taxonomy
TwoPhaseCommit
An interface for implementations that support 2-phase commit.

Classes in org.apache.lucene.util used by org.apache.lucene.facet.taxonomy.directory
TwoPhaseCommit
An interface for implementations that support 2-phase commit.

Classes in org.apache.lucene.util used by org.apache.lucene.index
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
BitVector
Optimized implementation of a vector of bits.
LuceneTestCase
Base class for all Lucene unit tests, Junit3 or Junit4 variant.
SetOnce
A convenient class which offers a semi-immutable object wrapper implementation which allows one to set the value of an object exactly once, and retrieve it many times.
TwoPhaseCommit
An interface for implementations that support 2-phase commit.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.queryParser
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
LuceneTestCase
Base class for all Lucene unit tests, Junit3 or Junit4 variant.
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.queryParser.analyzing
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.queryParser.complexPhrase
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.queryParser.core.config
Attribute
Base interface for attributes.
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.

Classes in org.apache.lucene.util used by org.apache.lucene.queryParser.ext
Version
Use by certain classes to match version compatibility across releases of Lucene.

Classes in org.apache.lucene.util used by org.apache.lucene.queryParser.standard.config
Attribute
Base interface for attributes.
AttributeImpl
Base class for Attributes that can be added to a AttributeSource.
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.

Classes in org.apache.lucene.util used by org.apache.lucene.search
Bits
Interface for Bitset-like structures.
Counter
Simple counter class
LuceneTestCase
Base class for all Lucene unit tests, Junit3 or Junit4 variant.
OpenBitSetDISI
OpenBitSet with added methods to bulk-update the bits from a DocIdSetIterator.
PriorityQueue
A PriorityQueue maintains a partial ordering of its elements such that the least element can always be found in constant time.

Classes in org.apache.lucene.util used by org.apache.lucene.search.grouping
FixedBitSet
BitSet of fixed length (numBits), backed by accessible (FixedBitSet.getBits()) long[], accessed with an int index, implementing Bits and DocIdSet.

Classes in org.apache.lucene.util used by org.apache.lucene.search.highlight
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.

Classes in org.apache.lucene.util used by org.apache.lucene.search.similar
PriorityQueue
A PriorityQueue maintains a partial ordering of its elements such that the least element can always be found in constant time.

Classes in org.apache.lucene.util used by org.apache.lucene.search.spell
BytesRef
Represents byte[], as a slice (offset + length) into an existing byte[].
BytesRefIterator
A simple iterator interface for BytesRef iteration.
PriorityQueue
A PriorityQueue maintains a partial ordering of its elements such that the least element can always be found in constant time.

Classes in org.apache.lucene.util used by org.apache.lucene.search.suggest
BytesRef
Represents byte[], as a slice (offset + length) into an existing byte[].
BytesRefIterator
A simple iterator interface for BytesRef iteration.
PriorityQueue
A PriorityQueue maintains a partial ordering of its elements such that the least element can always be found in constant time.

Classes in org.apache.lucene.util used by org.apache.lucene.search.suggest.fst
BytesRef
Represents byte[], as a slice (offset + length) into an existing byte[].
BytesRefIterator
A simple iterator interface for BytesRef iteration.

Classes in org.apache.lucene.util used by org.apache.lucene.store.instantiated
BitVector
Optimized implementation of a vector of bits.

Classes in org.apache.lucene.util used by org.apache.lucene.util
Attribute
Base interface for attributes.
AttributeImpl
Base class for Attributes that can be added to a AttributeSource.
AttributeReflector
This interface is used to reflect contents of AttributeSource or AttributeImpl.
AttributeSource
An AttributeSource contains a list of different AttributeImpls, and methods to add and get them.
AttributeSource.AttributeFactory
An AttributeFactory creates instances of AttributeImpls.
AttributeSource.State
This class holds the state of an AttributeSource.
Bits
Interface for Bitset-like structures.
ByteBlockPool
Class that Posting and PostingVector use to write byte streams into shared fixed-size byte[] arrays.
ByteBlockPool.Allocator
Abstract class for allocating and freeing byte blocks.
BytesRef
Represents byte[], as a slice (offset + length) into an existing byte[].
BytesRefHash.BytesStartArray
Manages allocation of the per-term addresses.
BytesRefIterator
A simple iterator interface for BytesRef iteration.
CharacterUtils
CharacterUtils provides a unified interface to Character-related operations to implement backwards compatible character operations based on a Version instance.
CharacterUtils.CharacterBuffer
A simple IO buffer to use with CharacterUtils.fill(CharacterBuffer, Reader).
CharsRef
Represents char[], as a slice (offset + length) into an existing char[].
Counter
Simple counter class
DoubleBarrelLRUCache.CloneableKey
Object providing clone(); the key class must subclass this.
DummyConcurrentLock
A dummy lock as a replacement for ReentrantLock to disable locking
FieldCacheSanityChecker.Insanity
Simple container for a collection of related CacheEntry objects that in conjunction with each other represent some "insane" usage of the FieldCache.
FieldCacheSanityChecker.InsanityType
An Enumeration of the different types of "insane" behavior that may be detected in a FieldCache.
FixedBitSet
BitSet of fixed length (numBits), backed by accessible (FixedBitSet.getBits()) long[], accessed with an int index, implementing Bits and DocIdSet.
IntsRef
Represents int[], as a slice (offset + length) into an existing int[].
LuceneJUnitResultFormatter
Just like BriefJUnitResultFormatter "brief" bundled with ant, except all formatted text is buffered until the test suite is finished.
LuceneTestCase
Base class for all Lucene unit tests, Junit3 or Junit4 variant.
NumericUtils.IntRangeBuilder
Expert: Callback for NumericUtils.splitIntRange(org.apache.lucene.util.NumericUtils.IntRangeBuilder, int, int, int).
NumericUtils.LongRangeBuilder
Expert: Callback for NumericUtils.splitLongRange(org.apache.lucene.util.NumericUtils.LongRangeBuilder, int, long, long).
OpenBitSet
An "open" BitSet implementation that allows direct access to the array of words storing the bits.
PagedBytes
Represents a logical byte[] as a series of pages.
PagedBytes.PagedBytesDataInput
PagedBytes.PagedBytesDataOutput
PagedBytes.Reader
Provides methods to read BytesRefs from a frozen PagedBytes.
RamUsageEstimator.JvmFeature
JVM diagnostic features.
RollingBuffer.Resettable
SmartRandom
A random that tracks if its been initialized properly, and throws an exception if it hasn't.
StringInterner
Subclasses of StringInterner are required to return the same single String object for all equal strings.
ThrottledIndexOutput
Intentionally slow IndexOutput for testing.
TwoPhaseCommit
An interface for implementations that support 2-phase commit.
TwoPhaseCommitTool.CommitFailException
Thrown by TwoPhaseCommitTool.execute(TwoPhaseCommit...) when an object fails to commit().
TwoPhaseCommitTool.PrepareCommitFailException
Thrown by TwoPhaseCommitTool.execute(TwoPhaseCommit...) when an object fails to prepareCommit().
UnicodeUtil.UTF16Result
Holds decoded UTF16 code units.
UnicodeUtil.UTF8Result
Holds decoded UTF8 code units.
Version
Use by certain classes to match version compatibility across releases of Lucene.
Vint8.Position
Because Java lacks call-by-reference, this class boxes the decoding position, which is initially set by the caller, and returned after decoding, incremented by the number of bytes processed.
VirtualMethod
A utility for keeping backwards compatibility on previously abstract methods (or similar replacements).
WeakIdentityMap
Implements a combination of WeakHashMap and IdentityHashMap.

Classes in org.apache.lucene.util used by org.apache.lucene.util.fst
BytesRef
Represents byte[], as a slice (offset + length) into an existing byte[].
IntsRef
Represents int[], as a slice (offset + length) into an existing int[].

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PagedBytes

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class PagedBytes

java.lang.Object
    extended by  org.apache.lucene.util.PagedBytes

public final class PagedBytes
extends Object

Represents a logical byte[] as a series of pages. You can write-once into the logical byte[] (append only), using copy, and then retrieve slices (BytesRef) into it using fill.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
class | PagedBytes.PagedBytesDataInput
class | PagedBytes.PagedBytesDataOutput
static class | PagedBytes.Reader Provides methods to read BytesRefs from a frozen PagedBytes.
Constructor Summary
PagedBytes(int blockBits)
1<
Method Summary
void | copy(BytesRef bytes) Copy BytesRef in
void | copy(BytesRef bytes, BytesRef out) Copy BytesRef in, setting BytesRef out to the result.
void | copy(IndexInput in, long byteCount) Read this many bytes from in
long | copyUsingLengthPrefix(BytesRef bytes) Copy bytes in, writing the length as a 1 or 2 byte vInt prefix.
PagedBytes.Reader | freeze(boolean trim) Commits final byte[], trimming it if necessary and if trim=true
PagedBytes.PagedBytesDataInput | getDataInput() Returns a DataInput to read values from this PagedBytes instance.
PagedBytes.PagedBytesDataOutput | getDataOutput() Returns a DataOutput that you may use to write into this PagedBytes instance.
long | getPointer()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PagedBytes

public PagedBytes(int blockBits)
1<
Method Detail

copy

public void copy(IndexInput in,
                 long byteCount)
          throws IOException
Read this many bytes from in

Throws:
IOException

copy

public void copy(BytesRef bytes)
          throws IOException
Copy BytesRef in

Throws:
IOException

copy

public void copy(BytesRef bytes,
                 BytesRef out)
          throws IOException
Copy BytesRef in, setting BytesRef out to the result. Do not use this if you will use freeze(true). This only supports bytes.length <= blockSize

Throws:
IOException

freeze

public PagedBytes.Reader freeze(boolean trim)
Commits final byte[], trimming it if necessary and if trim=true

getPointer

public long getPointer()

copyUsingLengthPrefix

public long copyUsingLengthPrefix(BytesRef bytes)
                           throws IOException
Copy bytes in, writing the length as a 1 or 2 byte vInt prefix.

Throws:
IOException

getDataInput

public PagedBytes.PagedBytesDataInput getDataInput()
Returns a DataInput to read values from this PagedBytes instance.

getDataOutput

public PagedBytes.PagedBytesDataOutput getDataOutput()
Returns a DataOutput that you may use to write into this PagedBytes instance. If you do this, you should not call the other writing methods (eg, copy); results are undefined.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PagedBytes.PagedBytesDataInput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class PagedBytes.PagedBytesDataInput

java.lang.Object
    extended by  org.apache.lucene.store.DataInput
        extended by  org.apache.lucene.util.PagedBytes.PagedBytesDataInput
All Implemented Interfaces:
Cloneable
Enclosing class:
PagedBytes
public final class PagedBytes.PagedBytesDataInput
extends DataInput

Method Summary
Object | clone() Returns a clone of this stream.
long | getPosition() Returns the current byte position.
byte | readByte() Reads and returns a single byte.
void | readBytes(byte[] b, int offset, int len) Reads a specified number of bytes into an array at the specified offset.
void | setPosition(long pos) Seek to a position previously obtained from getPosition().
Methods inherited from class org.apache.lucene.store.DataInput
readBytes, readChars, readInt, readLong, readShort, readString, readStringStringMap, readVInt, readVLong, setModifiedUTF8StringsMode
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

clone

public Object clone()
Description copied from class: DataInput
Returns a clone of this stream.

Clones of a stream access the same data, and are positioned at the same point as the stream they were cloned from.

Expert: Subclasses must ensure that clones may be positioned at different points in the input from each other and from the stream they were cloned from.

Overrides:
clone in class DataInput

getPosition

public long getPosition()
Returns the current byte position.

setPosition

public void setPosition(long pos)
Seek to a position previously obtained from getPosition().

readByte

public byte readByte()
Description copied from class: DataInput
Reads and returns a single byte.

Specified by:
readByte in class DataInput
See Also:
DataOutput.writeByte(byte)

readBytes

public void readBytes(byte[] b,
                      int offset,
                      int len)
Description copied from class: DataInput
Reads a specified number of bytes into an array at the specified offset.

Specified by:
readBytes in class DataInput
Parameters:
b - the array to read bytes into
offset - the offset in the array to start storing bytes
len - the number of bytes to read
See Also:
DataOutput.writeBytes(byte[],int)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PagedBytes.PagedBytesDataOutput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class PagedBytes.PagedBytesDataOutput

java.lang.Object
    extended by  org.apache.lucene.store.DataOutput
        extended by  org.apache.lucene.util.PagedBytes.PagedBytesDataOutput
Enclosing class:
PagedBytes
public final class PagedBytes.PagedBytesDataOutput
extends DataOutput

Constructor Summary
PagedBytes.PagedBytesDataOutput()
Method Summary
long | getPosition() Return the current byte position.
void | writeByte(byte b) Writes a single byte.
void | writeBytes(byte[] b, int offset, int length) Writes an array of bytes.
Methods inherited from class org.apache.lucene.store.DataOutput
copyBytes, writeBytes, writeChars, writeChars, writeInt, writeLong, writeShort, writeString, writeStringStringMap, writeVInt, writeVLong
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PagedBytes.PagedBytesDataOutput

public PagedBytes.PagedBytesDataOutput()
Method Detail

writeByte

public void writeByte(byte b)
Description copied from class: DataOutput
Writes a single byte.

Specified by:
writeByte in class DataOutput
See Also:
DataInput.readByte()

writeBytes

public void writeBytes(byte[] b,
                       int offset,
                       int length)
                throws IOException
Description copied from class: DataOutput
Writes an array of bytes.

Specified by:
writeBytes in class DataOutput
Parameters:
b - the bytes to write
offset - the offset in the byte array
length - the number of bytes to write
Throws:
IOException
See Also:
DataInput.readBytes(byte[],int,int)

getPosition

public long getPosition()
Return the current byte position.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PagedBytes.Reader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class PagedBytes.Reader

java.lang.Object
    extended by  org.apache.lucene.util.PagedBytes.Reader
Enclosing class:
PagedBytes
public static final class PagedBytes.Reader
extends Object

Provides methods to read BytesRefs from a frozen PagedBytes.

See Also:
PagedBytes.freeze(boolean)

Constructor Summary
PagedBytes.Reader(PagedBytes pagedBytes)
Method Summary
BytesRef | fill(BytesRef b, long start) Reads length as 1 or 2 byte vInt prefix, starting at start.
int | fillAndGetIndex(BytesRef b, long start) Reads length as 1 or 2 byte vInt prefix, starting at start.
long | fillAndGetStart(BytesRef b, long start) Reads length as 1 or 2 byte vInt prefix, starting at start and returns the start offset of the next part, suitable as start parameter on next call to sequentially read all BytesRef.
BytesRef | fillSlice(BytesRef b, long start, int length) Gets a slice out of PagedBytes starting at start with a given length.
BytesRef | fillSliceWithPrefix(BytesRef b, long start) Gets a slice out of PagedBytes starting at start, the length is read as 1 or 2 byte vInt prefix.
int[] | getBlockEnds()
byte[][] | getBlocks()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PagedBytes.Reader

public PagedBytes.Reader(PagedBytes pagedBytes)
Method Detail

fillSlice

public BytesRef fillSlice(BytesRef b,
                          long start,
                          int length)
Gets a slice out of PagedBytes starting at start with a given length. Iff the slice spans across a block border this method will allocate sufficient resources and copy the paged data.

Slices spanning more than one block are not supported.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

fill

public BytesRef fill(BytesRef b,
                     long start)
Reads length as 1 or 2 byte vInt prefix, starting at start.

Note: this method does not support slices spanning across block borders.

Returns:
the given BytesRef
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

fillAndGetIndex

public int fillAndGetIndex(BytesRef b,
                           long start)
Reads length as 1 or 2 byte vInt prefix, starting at start. *

Note: this method does not support slices spanning across block borders.

Returns:
the internal block number of the slice.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

fillAndGetStart

public long fillAndGetStart(BytesRef b,
                            long start)
Reads length as 1 or 2 byte vInt prefix, starting at start and returns the start offset of the next part, suitable as start parameter on next call to sequentially read all BytesRef.

Note: this method does not support slices spanning across block borders.

Returns:
the start offset of the next part, suitable as start parameter on next call to sequentially read all BytesRef.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

fillSliceWithPrefix

public BytesRef fillSliceWithPrefix(BytesRef b,
                                    long start)
Gets a slice out of PagedBytes starting at start, the length is read as 1 or 2 byte vInt prefix. Iff the slice spans across a block border this method will allocate sufficient resources and copy the paged data.

Slices spanning more than one block are not supported.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

getBlocks

public byte[][] getBlocks()
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

getBlockEnds

public int[] getBlockEnds()
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Parameter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class Parameter

java.lang.Object
    extended by  org.apache.lucene.util.Parameter
All Implemented Interfaces:
Serializable
Deprecated. Use Java 5 enum, will be removed in a later Lucene 3.x release.

@Deprecated
public abstract class Parameter
extends Object
implements Serializable

A serializable Enum class.

See Also:
Serialized Form
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
protected Parameter(String name)
Deprecated.
Method Summary
protected  Object readResolve()
Deprecated. Resolves the deserialized instance to the local reference for accurate equals() and == comparisons.
 String toString()
Deprecated.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Parameter

protected Parameter(String name)
Deprecated.
Method Detail

toString

public String toString()
Deprecated.
Overrides:
toString in class Object

readResolve

protected Object readResolve()
                      throws ObjectStreamException
Deprecated.
Resolves the deserialized instance to the local reference for accurate equals() and == comparisons.

Returns:
a reference to Parameter as resolved in the local VM
Throws:
ObjectStreamException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PriorityQueue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class PriorityQueue<T>

java.lang.Object
    extended by  org.apache.lucene.util.PriorityQueue<T>
Direct Known Subclasses:
FieldValueHitQueue, Lookup.LookupPriorityQueue, SuggestWordQueue
public abstract class PriorityQueue<T>
extends Object

A PriorityQueue maintains a partial ordering of its elements such that the least element can always be found in constant time. Put()'s and pop()'s require log(size) time.

NOTE: This class pre-allocates a full array of length maxSize+1, in initialize(int).

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
PriorityQueue()
Method Summary
T | add(T element) Adds an Object to a PriorityQueue in log(size) time.
void | clear() Removes all entries from the PriorityQueue.
protected Object[] | getHeapArray() This method returns the internal heap array as Object[].
protected T | getSentinelObject() This method can be overridden by extending classes to return a sentinel object which will be used by initialize(int) to fill the queue, so that the code which uses that queue can always assume it's full and only change the top without attempting to insert any new object. Those sentinel values should always compare worse than any non-sentinel value (i.e., lessThan(T, T) should always favor the non-sentinel values). By default, this method returns false, which means the queue will not be filled with sentinel values.
protected void | initialize(int maxSize) Subclass constructors must call this.
T | insertWithOverflow(T element) Adds an Object to a PriorityQueue in log(size) time.
protected abstract boolean | lessThan(T a, T b) Determines the ordering of objects in this priority queue.
T | pop() Removes and returns the least element of the PriorityQueue in log(size) time.
int | size() Returns the number of elements currently stored in the PriorityQueue.
T | top() Returns the least element of the PriorityQueue in constant time.
T | updateTop() Should be called when the Object at top changes values.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PriorityQueue

public PriorityQueue()
Method Detail

lessThan

protected abstract boolean lessThan(T a,
                                    T b)
Determines the ordering of objects in this priority queue. Subclasses must define this one method.

Returns:
true iff parameter a is less than parameter b.

getSentinelObject

protected T getSentinelObject()
This method can be overridden by extending classes to return a sentinel object which will be used by initialize(int) to fill the queue, so that the code which uses that queue can always assume it's full and only change the top without attempting to insert any new object.
Those sentinel values should always compare worse than any non-sentinel value (i.e., lessThan(T, T) should always favor the non-sentinel values).
By default, this method returns false, which means the queue will not be filled with sentinel values. Otherwise, the value returned will be used to pre-populate the queue. Adds sentinel values to the queue.
If this method is extended to return a non-null value, then the following usage pattern is recommended:
 // extends getSentinelObject() to return a non-null value.
 PriorityQueue pq = new MyQueue(numHits);
 // save the 'top' element, which is guaranteed to not be null.
 MyObject pqTop = pq.top();
 <...>
 // now in order to add a new element, which is 'better' than top (after
 // you've verified it is better), it is as simple as:
 pqTop.change().
 pqTop = pq.updateTop();
NOTE: if this method returns a non-null value, it will be called by initialize(int) size() times, relying on a new object to be returned and will not check if it's null again. Therefore you should ensure any call to this method creates a new instance and behaves consistently, e.g., it cannot return null if it previously returned non-null.

Returns:
the sentinel object to use to pre-populate the queue, or null if sentinel objects are not supported.

initialize

protected final void initialize(int maxSize)
Subclass constructors must call this.

add

public final T add(T element)
Adds an Object to a PriorityQueue in log(size) time. If one tries to add more objects than maxSize from initialize an ArrayIndexOutOfBoundsException is thrown.

Returns:
the new 'top' element in the queue.

insertWithOverflow

public T insertWithOverflow(T element)
Adds an Object to a PriorityQueue in log(size) time. It returns the object (if any) that was dropped off the heap because it was full. This can be the given parameter (in case it is smaller than the full heap's minimum, and couldn't be added), or another object that was previously the smallest value in the heap and now has been replaced by a larger one, or null if the queue wasn't yet full with maxSize elements.

top

public final T top()
Returns the least element of the PriorityQueue in constant time.

pop

public final T pop()
Removes and returns the least element of the PriorityQueue in log(size) time.

updateTop

public final T updateTop()
Should be called when the Object at top changes values. Still log(n) worst case, but it's at least twice as fast to
 pq.top().change();
 pq.updateTop();
instead of
 o = pq.pop();
 o.change();
 pq.push(o);

Returns:
the new 'top' element.

size

public final int size()
Returns the number of elements currently stored in the PriorityQueue.

clear

public final void clear()
Removes all entries from the PriorityQueue.

getHeapArray

protected final Object[] getHeapArray()
This method returns the internal heap array as Object[].

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RamUsageEstimator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class RamUsageEstimator

java.lang.Object
    extended by  org.apache.lucene.util.RamUsageEstimator

public final class RamUsageEstimator
extends Object

Estimates the size (memory representation) of Java objects.

NOTE: Starting with Lucene 3.6, creating instances of this class is deprecated. If you still do this, please note, that instances of RamUsageEstimator are not thread-safe! It is also deprecated to enable checking of String intern-ness, the new static method no longer allow to do this. Interned strings will be counted as any other object and count for memory usage.

In Lucene 3.6, custom MemoryModels were completely removed. The new implementation is now using Hotspot™ internals to get the correct scale factors and offsets for calculating memory usage.

See Also:
sizeOf(Object), shallowSizeOf(Object), shallowSizeOfInstance(Class)
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
static class RamUsageEstimator.JvmFeature
JVM diagnostic features.
Field Summary
static String | JVM_INFO_STRING JVM info string for debugging and reports.
static int | NUM_BYTES_ARRAY_HEADER Number of bytes to represent an array header (no content, but with alignments).
static int | NUM_BYTES_BOOLEAN
static int | NUM_BYTES_BYTE
static int | NUM_BYTES_CHAR
static int | NUM_BYTES_DOUBLE
static int | NUM_BYTES_FLOAT
static int | NUM_BYTES_INT
static int | NUM_BYTES_LONG
static int | NUM_BYTES_OBJECT_ALIGNMENT A constant specifying the object alignment boundary inside the JVM.
static int | NUM_BYTES_OBJECT_HEADER Number of bytes to represent an object header (no fields, no alignments).
static int | NUM_BYTES_OBJECT_REF Number of bytes this jvm uses to represent an object reference.
static int | NUM_BYTES_SHORT
static long | ONE_GB One gigabyte bytes.
static long | ONE_KB One kilobyte bytes.
static long | ONE_MB One megabyte bytes.
Constructor Summary
RamUsageEstimator()
Deprecated. Don't create instances of this class, instead use the static sizeOf(Object) method that has no intern checking, too.
RamUsageEstimator(boolean checkInterned)
Deprecated. Don't create instances of this class, instead use the static sizeOf(Object) method.
Method Summary
static long | alignObjectSize(long size) Aligns an object size to be the next multiple of NUM_BYTES_OBJECT_ALIGNMENT.
long | estimateRamUsage(Object obj) Deprecated. Don't create instances of this class, instead use the static sizeOf(Object) method.
static EnumSet<RamUsageEstimator.JvmFeature> | getSupportedFeatures() Return the set of supported JVM features that improve the estimation.
static EnumSet<RamUsageEstimator.JvmFeature> | getUnsupportedFeatures() Return the set of unsupported JVM features that improve the estimation.
static String | humanReadableUnits(long bytes) Returns size in human-readable units (GB, MB, KB or bytes).
static String | humanReadableUnits(long bytes, DecimalFormat df) Returns size in human-readable units (GB, MB, KB or bytes).
static String | humanSizeOf(Object object) Return a human-readable size of a given object.
static boolean | isSupportedJVM() Returns true, if the current JVM is fully supported by RamUsageEstimator.
static long | shallowSizeOf(Object obj) Estimates a "shallow" memory usage of the given object.
static long | shallowSizeOfInstance(Class<?> clazz) Returns the shallow instance size in bytes an instance of the given class would occupy.
static long | sizeOf(boolean[] arr) Returns the size in bytes of the boolean[] object.
static long | sizeOf(byte[] arr) Returns the size in bytes of the byte[] object.
static long | sizeOf(char[] arr) Returns the size in bytes of the char[] object.
static long | sizeOf(double[] arr) Returns the size in bytes of the double[] object.
static long | sizeOf(float[] arr) Returns the size in bytes of the float[] object.
static long | sizeOf(int[] arr) Returns the size in bytes of the int[] object.
static long | sizeOf(long[] arr) Returns the size in bytes of the long[] object.
static long | sizeOf(Object obj) Estimates the RAM usage by the given object.
static long | sizeOf(short[] arr) Returns the size in bytes of the short[] object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

JVM_INFO_STRING

public static final String JVM_INFO_STRING
JVM info string for debugging and reports.

ONE_KB

public static final long ONE_KB
One kilobyte bytes.

See Also:
Constant Field Values

ONE_MB

public static final long ONE_MB
One megabyte bytes.

See Also:
Constant Field Values

ONE_GB

public static final long ONE_GB
One gigabyte bytes.

See Also:
Constant Field Values

NUM_BYTES_BOOLEAN

public static final int NUM_BYTES_BOOLEAN
See Also:
Constant Field Values

NUM_BYTES_BYTE

public static final int NUM_BYTES_BYTE
See Also:
Constant Field Values

NUM_BYTES_CHAR

public static final int NUM_BYTES_CHAR
See Also:
Constant Field Values

NUM_BYTES_SHORT

public static final int NUM_BYTES_SHORT
See Also:
Constant Field Values

NUM_BYTES_INT

public static final int NUM_BYTES_INT
See Also:
Constant Field Values

NUM_BYTES_FLOAT

public static final int NUM_BYTES_FLOAT
See Also:
Constant Field Values

NUM_BYTES_LONG

public static final int NUM_BYTES_LONG
See Also:
Constant Field Values

NUM_BYTES_DOUBLE

public static final int NUM_BYTES_DOUBLE
See Also:
Constant Field Values

NUM_BYTES_OBJECT_REF

public static final int NUM_BYTES_OBJECT_REF
Number of bytes this jvm uses to represent an object reference.

NUM_BYTES_OBJECT_HEADER

public static final int NUM_BYTES_OBJECT_HEADER
Number of bytes to represent an object header (no fields, no alignments).

NUM_BYTES_ARRAY_HEADER

public static final int NUM_BYTES_ARRAY_HEADER
Number of bytes to represent an array header (no content, but with alignments).

NUM_BYTES_OBJECT_ALIGNMENT

public static final int NUM_BYTES_OBJECT_ALIGNMENT
A constant specifying the object alignment boundary inside the JVM. Objects will always take a full multiple of this constant, possibly wasting some space.

Constructor Detail

RamUsageEstimator

@Deprecated
public RamUsageEstimator()
Deprecated. Don't create instances of this class, instead use the static sizeOf(Object) method that has no intern checking, too.

Creates a new instance of RamUsageEstimator with intern checking enabled. Don't ever use this method, as intern checking is deprecated, because it is not free of side-effects and strains the garbage collector additionally.

RamUsageEstimator

@Deprecated
public RamUsageEstimator(boolean checkInterned)
Deprecated. Don't create instances of this class, instead use the static sizeOf(Object) method.

Creates a new instance of RamUsageEstimator.

Parameters:
checkInterned - check if Strings are interned and don't add to size if they are. Defaults to true but if you know the objects you are checking won't likely contain many interned Strings, it will be faster to turn off intern checking. Intern checking is deprecated altogether, as it is not free of side-effects and strains the garbage collector additionally.
Method Detail

isSupportedJVM

public static boolean isSupportedJVM()
Returns true, if the current JVM is fully supported by RamUsageEstimator. If this method returns false you are maybe using a 3rd party Java VM that is not supporting Oracle/Sun private APIs. The memory estimates can be imprecise then (no way of detecting compressed references, alignments, etc.). Lucene still tries to use sensible defaults.

alignObjectSize

public static long alignObjectSize(long size)
Aligns an object size to be the next multiple of NUM_BYTES_OBJECT_ALIGNMENT.

sizeOf

public static long sizeOf(byte[] arr)
Returns the size in bytes of the byte[] object.

sizeOf

public static long sizeOf(boolean[] arr)
Returns the size in bytes of the boolean[] object.

sizeOf

public static long sizeOf(char[] arr)
Returns the size in bytes of the char[] object.

sizeOf

public static long sizeOf(short[] arr)
Returns the size in bytes of the short[] object.

sizeOf

public static long sizeOf(int[] arr)
Returns the size in bytes of the int[] object.

sizeOf

public static long sizeOf(float[] arr)
Returns the size in bytes of the float[] object.

sizeOf

public static long sizeOf(long[] arr)
Returns the size in bytes of the long[] object.

sizeOf

public static long sizeOf(double[] arr)
Returns the size in bytes of the double[] object.

sizeOf

public static long sizeOf(Object obj)
Estimates the RAM usage by the given object. It will walk the object tree and sum up all referenced objects.

Resource Usage: This method internally uses a set of every object seen during traversals so it does allocate memory (it isn't side-effect free). After the method exits, this memory should be GCed.

shallowSizeOf

public static long shallowSizeOf(Object obj)
Estimates a "shallow" memory usage of the given object. For arrays, this will be the memory taken by array storage (no subreferences will be followed). For objects, this will be the memory taken by the fields. JVM object alignments are also applied.

shallowSizeOfInstance

public static long shallowSizeOfInstance(Class<?> clazz)
Returns the shallow instance size in bytes an instance of the given class would occupy. This works with all conventional classes and primitive types, but not with arrays (the size then depends on the number of elements and varies from object to object).

Throws:
IllegalArgumentException - if clazz is an array class.
See Also:
shallowSizeOf(Object)

getUnsupportedFeatures

public static EnumSet<RamUsageEstimator.JvmFeature> getUnsupportedFeatures()
Return the set of unsupported JVM features that improve the estimation.

getSupportedFeatures

public static EnumSet<RamUsageEstimator.JvmFeature> getSupportedFeatures()
Return the set of supported JVM features that improve the estimation.

humanReadableUnits

public static String humanReadableUnits(long bytes)
Returns size in human-readable units (GB, MB, KB or bytes).

humanReadableUnits

public static String humanReadableUnits(long bytes,
                                        DecimalFormat df)
Returns size in human-readable units (GB, MB, KB or bytes).

humanSizeOf

public static String humanSizeOf(Object object)
Return a human-readable size of a given object.

See Also:
sizeOf(Object), humanReadableUnits(long)

estimateRamUsage

@Deprecated
public long estimateRamUsage(Object obj)
Deprecated. Don't create instances of this class, instead use the static sizeOf(Object) method.

Creates a new istance of RamUsageEstimator.

See Also:
sizeOf(Object)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RamUsageEstimator.JvmFeature

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.util
Enum RamUsageEstimator.JvmFeature

java.lang.Object
    extended by  java.lang.Enum<RamUsageEstimator.JvmFeature>
        extended by  org.apache.lucene.util.RamUsageEstimator.JvmFeature
All Implemented Interfaces:
Serializable, Comparable<RamUsageEstimator.JvmFeature>
Enclosing class:
RamUsageEstimator
public static enum RamUsageEstimator.JvmFeature
extends Enum<RamUsageEstimator.JvmFeature>

JVM diagnostic features.

Enum Constant Summary
ARRAY_HEADER_SIZE
FIELD_OFFSETS
OBJECT_ALIGNMENT
OBJECT_REFERENCE_SIZE
Field Summary
 String description
Method Summary
String | toString()
static RamUsageEstimator.JvmFeature | valueOf(String name) Returns the enum constant of this type with the specified name.
static RamUsageEstimator.JvmFeature[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

OBJECT_REFERENCE_SIZE

public static final RamUsageEstimator.JvmFeature OBJECT_REFERENCE_SIZE

ARRAY_HEADER_SIZE

public static final RamUsageEstimator.JvmFeature ARRAY_HEADER_SIZE

FIELD_OFFSETS

public static final RamUsageEstimator.JvmFeature FIELD_OFFSETS

OBJECT_ALIGNMENT

public static final RamUsageEstimator.JvmFeature OBJECT_ALIGNMENT
Field Detail

description

public final String description
Method Detail

values

public static final RamUsageEstimator.JvmFeature[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(RamUsageEstimator.JvmFeature c : RamUsageEstimator.JvmFeature.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static RamUsageEstimator.JvmFeature valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

toString

public String toString()
Overrides:
toString in class Enum<RamUsageEstimator.JvmFeature>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


ReaderUtil.Gather

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class ReaderUtil.Gather

java.lang.Object
    extended by  org.apache.lucene.util.ReaderUtil.Gather
Enclosing class:
ReaderUtil
public abstract static class ReaderUtil.Gather
extends Object

Recursively visits all sub-readers of a reader. You should subclass this and override the add method to gather what you need.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ReaderUtil.Gather(IndexReader r)
Method Summary
protected abstract void | add(int base, IndexReader r)
int | run()
int | run(int docBase)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ReaderUtil.Gather

public ReaderUtil.Gather(IndexReader r)
Method Detail

run

public int run()
        throws IOException
Throws:
IOException

run

public int run(int docBase)
        throws IOException
Throws:
IOException

add

protected abstract void add(int base,
                            IndexReader r)
                     throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ReaderUtil

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class ReaderUtil

java.lang.Object
    extended by  org.apache.lucene.util.ReaderUtil

public final class ReaderUtil
extends Object

Common util methods for dealing with IndexReaders.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
static class ReaderUtil.Gather
Recursively visits all sub-readers of a reader.
Method Summary
static void | gatherSubReaders(List<IndexReader> allSubReaders, IndexReader reader) Gathers sub-readers from reader into a List.
static Collection<String> | getIndexedFields(IndexReader reader)
static FieldInfos | getMergedFieldInfos(IndexReader reader) Call this to get the (merged) FieldInfos for a composite reader
static int | subIndex(int n, int[] docStarts) Returns index of the searcher/reader for document n in the array used to construct this searcher/reader.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

gatherSubReaders

public static void gatherSubReaders(List<IndexReader> allSubReaders,
                                    IndexReader reader)
Gathers sub-readers from reader into a List.

Parameters:
allSubReaders -
reader -

subIndex

public static int subIndex(int n,
                           int[] docStarts)
Returns index of the searcher/reader for document n in the array used to construct this searcher/reader.

getIndexedFields

public static Collection<String> getIndexedFields(IndexReader reader)

getMergedFieldInfos

public static FieldInfos getMergedFieldInfos(IndexReader reader)
Call this to get the (merged) FieldInfos for a composite reader

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RecyclingByteBlockAllocator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class RecyclingByteBlockAllocator

java.lang.Object
    extended by  org.apache.lucene.util.ByteBlockPool.Allocator
        extended by  org.apache.lucene.util.RecyclingByteBlockAllocator

public final class RecyclingByteBlockAllocator
extends ByteBlockPool.Allocator

A ByteBlockPool.Allocator implementation that recycles unused byte blocks in a buffer and reuses them in subsequent calls to getByteBlock().

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
static int DEFAULT_BUFFERED_BLOCKS
Fields inherited from class org.apache.lucene.util.ByteBlockPool.Allocator
blockSize
Constructor Summary
RecyclingByteBlockAllocator()
Creates a new RecyclingByteBlockAllocator with a block size of ByteBlockPool.BYTE_BLOCK_SIZE, upper buffered docs limit of DEFAULT_BUFFERED_BLOCKS (64) and a DummyConcurrentLock instance.
RecyclingByteBlockAllocator(int blockSize, int maxBufferedBlocks)
Creates a new RecyclingByteBlockAllocator with a DummyConcurrentLock instance.
RecyclingByteBlockAllocator(int blockSize, int maxBufferedBlocks, AtomicLong bytesUsed)
Creates a new RecyclingByteBlockAllocator
Method Summary
long | bytesUsed()
int | freeBlocks(int num) Removes the given number of byte blocks from the buffer if possible.
byte[] | getByteBlock()
int | maxBufferedBlocks()
int | numBufferedBlocks()
void | recycleByteBlocks(byte[][] blocks, int start, int end)
Methods inherited from class org.apache.lucene.util.ByteBlockPool.Allocator
recycleByteBlocks
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_BUFFERED_BLOCKS

public static final int DEFAULT_BUFFERED_BLOCKS
See Also:
Constant Field Values
Constructor Detail

RecyclingByteBlockAllocator

public RecyclingByteBlockAllocator(int blockSize,
                                   int maxBufferedBlocks,
                                   AtomicLong bytesUsed)
Creates a new RecyclingByteBlockAllocator

Parameters:
blockSize - the block size in bytes
maxBufferedBlocks - maximum number of buffered byte block
bytesUsed - AtomicLong reference counting internally allocated bytes
See Also:
DummyConcurrentLock

RecyclingByteBlockAllocator

public RecyclingByteBlockAllocator(int blockSize,
                                   int maxBufferedBlocks)
Creates a new RecyclingByteBlockAllocator with a DummyConcurrentLock instance.

Parameters:
blockSize - the block size in bytes
maxBufferedBlocks - maximum number of buffered byte block

RecyclingByteBlockAllocator

public RecyclingByteBlockAllocator()
Creates a new RecyclingByteBlockAllocator with a block size of ByteBlockPool.BYTE_BLOCK_SIZE, upper buffered docs limit of DEFAULT_BUFFERED_BLOCKS (64) and a DummyConcurrentLock instance.

Method Detail

getByteBlock

public byte[] getByteBlock()
Overrides:
getByteBlock in class ByteBlockPool.Allocator

recycleByteBlocks

public void recycleByteBlocks(byte[][] blocks,
                              int start,
                              int end)
Specified by:
recycleByteBlocks in class ByteBlockPool.Allocator

numBufferedBlocks

public int numBufferedBlocks()
Returns:
the number of currently buffered blocks

bytesUsed

public long bytesUsed()
Returns:
the number of bytes currently allocated by this ByteBlockPool.Allocator

maxBufferedBlocks

public int maxBufferedBlocks()
Returns:
the maximum number of buffered byte blocks

freeBlocks

public int freeBlocks(int num)
Removes the given number of byte blocks from the buffer if possible.

Parameters:
num - the number of byte blocks to remove
Returns:
the number of actually removed buffers
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Rethrow

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class Rethrow

java.lang.Object
    extended by  org.apache.lucene.util.Rethrow

public final class Rethrow
extends Object

Sneaky: rethrowing checked exceptions as unchecked ones. Eh, it is sometimes useful...

Pulled from http://www.javapuzzlers.com (I think?).

Constructor Summary
Rethrow()
Method Summary
static void rethrow(Throwable t)
Rethrows t (identical object).
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Rethrow

public Rethrow()
Method Detail

rethrow

public static void rethrow(Throwable t)
Rethrows t (identical object).

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RollingBuffer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class RollingBuffer<T extends RollingBuffer.Resettable>

java.lang.Object
    extended by  org.apache.lucene.util.RollingBuffer<T>

public abstract class RollingBuffer<T extends RollingBuffer.Resettable>
extends Object

Acts like forever growing T[], but internally uses a circular buffer to reuse instances of T.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
static interface RollingBuffer.Resettable
Constructor Summary
RollingBuffer()
Method Summary
void | freeBefore(int pos)
T | get(int pos) Get T instance for this absolute position; this is allowed to be arbitrarily far "in the future" but cannot be before the last freeBefore.
protected abstract T | newInstance()
void | reset()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RollingBuffer

public RollingBuffer()
Method Detail

newInstance

protected abstract T newInstance()

reset

public void reset()

get

public T get(int pos)
Get T instance for this absolute position; this is allowed to be arbitrarily far "in the future" but cannot be before the last freeBefore.

freeBefore

public void freeBefore(int pos)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RollingBuffer.Resettable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Interface RollingBuffer.Resettable

All Known Implementing Classes:
LookaheadTokenFilter.Position
Enclosing class:
RollingBuffer<T extends RollingBuffer.Resettable>
public static interface RollingBuffer.Resettable

Method Summary
 void reset()

Method Detail

reset

void reset()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RollingCharBuffer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class RollingCharBuffer

java.lang.Object
    extended by  org.apache.lucene.util.RollingCharBuffer

public final class RollingCharBuffer
extends Object

Acts like a forever growing char[] as you read characters into it from the provided reader, but internally it uses a circular buffer to only hold the characters that haven't been freed yet. This is like a PushbackReader, except you don't have to specify up-front the max size of the buffer, but you do have to periodically call freeBefore(int).

Constructor Summary
RollingCharBuffer()
Method Summary
void | freeBefore(int pos) Call this to notify us that no chars before this absolute position are needed anymore.
int | get(int pos)
char[] | get(int posStart, int length)
void | reset(Reader reader) Clear array and switch to new reader.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RollingCharBuffer

public RollingCharBuffer()
Method Detail

reset

public void reset(Reader reader)
Clear array and switch to new reader.

get

public int get(int pos)
        throws IOException
Throws:
IOException

get

public char[] get(int posStart,
                  int length)

freeBefore

public void freeBefore(int pos)
Call this to notify us that no chars before this absolute position are needed anymore.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ScorerDocQueue

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class ScorerDocQueue

java.lang.Object
    extended by  org.apache.lucene.util.ScorerDocQueue

public class ScorerDocQueue
extends Object

A ScorerDocQueue maintains a partial ordering of its Scorers such that the least Scorer can always be found in constant time. Put()'s and pop()'s require log(size) time. The ordering is by Scorer.doc().

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
ScorerDocQueue(int maxSize)
Create a ScorerDocQueue with a maximum size.
Method Summary
 void adjustTop()
Should be called when the scorer at top changes doc() value.
 void clear()
Removes all entries from the ScorerDocQueue.
 boolean insert(Scorer scorer)
Adds a Scorer to the ScorerDocQueue in log(size) time if either the ScorerDocQueue is not full, or not lessThan(scorer, top()).
 Scorer pop()
Removes and returns the least scorer of the ScorerDocQueue in log(size) time.
 void put(Scorer scorer)
Adds a Scorer to a ScorerDocQueue in log(size) time.
 int size()
Returns the number of scorers currently stored in the ScorerDocQueue.
 Scorer top()
Returns the least Scorer of the ScorerDocQueue in constant time.
 int topDoc()
Returns document number of the least Scorer of the ScorerDocQueue in constant time.
 boolean topNextAndAdjustElsePop()
 float topScore()
 boolean topSkipToAndAdjustElsePop(int target)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ScorerDocQueue

public ScorerDocQueue(int maxSize)
Create a ScorerDocQueue with a maximum size.

Method Detail

put

public final void put(Scorer scorer)
Adds a Scorer to a ScorerDocQueue in log(size) time. If one tries to add more Scorers than maxSize a RuntimeException (ArrayIndexOutOfBound) is thrown.

insert

public boolean insert(Scorer scorer)
Adds a Scorer to the ScorerDocQueue in log(size) time if either the ScorerDocQueue is not full, or not lessThan(scorer, top()).

Parameters:
scorer -
Returns:
true if scorer is added, false otherwise.

top

public final Scorer top()
Returns the least Scorer of the ScorerDocQueue in constant time. Should not be used when the queue is empty.

topDoc

public final int topDoc()
Returns document number of the least Scorer of the ScorerDocQueue in constant time. Should not be used when the queue is empty.

topScore

public final float topScore()
                     throws IOException
Throws:
IOException

topNextAndAdjustElsePop

public final boolean topNextAndAdjustElsePop()
                                      throws IOException
Throws:
IOException

topSkipToAndAdjustElsePop

public final boolean topSkipToAndAdjustElsePop(int target)
                                        throws IOException
Throws:
IOException

pop

public final Scorer pop()
Removes and returns the least scorer of the ScorerDocQueue in log(size) time. Should not be used when the queue is empty.

adjustTop

public final void adjustTop()
Should be called when the scorer at top changes doc() value. Still log(n) worst case, but it's at least twice as fast to
  { pq.top().change(); pq.adjustTop(); }
instead of
  { o = pq.pop(); o.change(); pq.push(o); }

size

public final int size()
Returns the number of scorers currently stored in the ScorerDocQueue.

clear

public final void clear()
Removes all entries from the ScorerDocQueue.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SetOnce.AlreadySetException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class SetOnce.AlreadySetException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.lang.RuntimeException
                extended by  org.apache.lucene.util.SetOnce.AlreadySetException
All Implemented Interfaces:
Serializable
Enclosing class:
SetOnce<T>
public static final class SetOnce.AlreadySetException
extends RuntimeException

Thrown when SetOnce.set(Object) is called more than once.

See Also:
Serialized Form

Constructor Summary
SetOnce.AlreadySetException()
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SetOnce.AlreadySetException

public SetOnce.AlreadySetException()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SetOnce

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class SetOnce<T>

java.lang.Object
    extended by  org.apache.lucene.util.SetOnce<T>

public final class SetOnce<T>
extends Object

A convenient class which offers a semi-immutable object wrapper implementation which allows one to set the value of an object exactly once, and retrieve it many times. If set(Object) is called more than once, SetOnce.AlreadySetException is thrown and the operation will fail.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class SetOnce.AlreadySetException
Thrown when set(Object) is called more than once.
Constructor Summary
SetOnce()
A default constructor which does not set the internal object, and allows setting it by calling set(Object).
SetOnce(T obj)
Creates a new instance with the internal object set to the given object.
Method Summary
T | get() Returns the object set by set(Object).
void | set(T obj) Sets the given object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SetOnce

public SetOnce()
A default constructor which does not set the internal object, and allows setting it by calling set(Object).

SetOnce

public SetOnce(T obj)
Creates a new instance with the internal object set to the given object. Note that any calls to set(Object) afterwards will result in SetOnce.AlreadySetException

Throws:
SetOnce.AlreadySetException - if called more than once
See Also:
set(Object)
Method Detail

set

public final void set(T obj)
Sets the given object. If the object has already been set, an exception is thrown.

get

public final T get()
Returns the object set by set(Object).

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleStringInterner

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class SimpleStringInterner

java.lang.Object
    extended by  org.apache.lucene.util.StringInterner
        extended by  org.apache.lucene.util.SimpleStringInterner

public class SimpleStringInterner
extends StringInterner

Simple lockless and memory barrier free String intern cache that is guaranteed to return the same String instance as String.intern() does.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
SimpleStringInterner(int tableSize, int maxChainLength)
Method Summary
 String intern(String s)
Returns a single object instance for each equal string.
Methods inherited from class org.apache.lucene.util.StringInterner
intern
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SimpleStringInterner

public SimpleStringInterner(int tableSize,
                            int maxChainLength)
Parameters:
tableSize - Size of the hash table, should be a power of two.
maxChainLength - Maximum length of each bucket, after which the oldest item inserted is dropped.
Method Detail

intern

public String intern(String s)
Description copied from class: StringInterner
Returns a single object instance for each equal string.

Overrides:
intern in class StringInterner
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SmallFloat

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class SmallFloat

java.lang.Object
    extended by  org.apache.lucene.util.SmallFloat

public class SmallFloat
extends Object

Floating point numbers smaller than 32 bits.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
SmallFloat()
Method Summary
static float | byte315ToFloat(byte b) byteToFloat(b, mantissaBits=3, zeroExponent=15)
static float | byte52ToFloat(byte b) byteToFloat(b, mantissaBits=5, zeroExponent=2)
static float | byteToFloat(byte b, int numMantissaBits, int zeroExp) Converts an 8 bit float to a 32 bit float.
static byte | floatToByte(float f, int numMantissaBits, int zeroExp) Converts a 32 bit float to an 8 bit float.
static byte | floatToByte315(float f) floatToByte(b, mantissaBits=3, zeroExponent=15) smallest non-zero value = 5.820766E-10 largest value = 7.5161928E9 epsilon = 0.125
static byte | floatToByte52(float f) floatToByte(b, mantissaBits=5, zeroExponent=2) smallest nonzero value = 0.033203125 largest value = 1984.0 epsilon = 0.03125
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SmallFloat

public SmallFloat()
Method Detail

floatToByte

public static byte floatToByte(float f,
                               int numMantissaBits,
                               int zeroExp)
Converts a 32 bit float to an 8 bit float.
Values less than zero are all mapped to zero.
Values are truncated (rounded down) to the nearest 8 bit value.
Values between zero and the smallest representable value are rounded up.

Parameters:
f - the 32 bit float to be converted to an 8 bit float (byte)
numMantissaBits - the number of mantissa bits to use in the byte, with the remainder to be used in the exponent
zeroExp - the zero-point in the range of exponent values
Returns:
the 8 bit float representation

byteToFloat

public static float byteToFloat(byte b,
                                int numMantissaBits,
                                int zeroExp)
Converts an 8 bit float to a 32 bit float.

floatToByte315

public static byte floatToByte315(float f)
floatToByte(b, mantissaBits=3, zeroExponent=15)
smallest non-zero value = 5.820766E-10
largest value = 7.5161928E9
epsilon = 0.125

byte315ToFloat

public static float byte315ToFloat(byte b)
byteToFloat(b, mantissaBits=3, zeroExponent=15)

floatToByte52

public static byte floatToByte52(float f)
floatToByte(b, mantissaBits=5, zeroExponent=2)
smallest nonzero value = 0.033203125
largest value = 1984.0
epsilon = 0.03125

byte52ToFloat

public static float byte52ToFloat(byte b)
byteToFloat(b, mantissaBits=5, zeroExponent=2)

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SmartRandom

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class SmartRandom

java.lang.Object
    extended by  java.util.Random
        extended by  org.apache.lucene.util.SmartRandom
All Implemented Interfaces:
Serializable
public class SmartRandom
extends Random

A random that tracks if its been initialized properly, and throws an exception if it hasn't.

See Also:
Serialized Form

Method Summary
protected  int next(int bits)
Methods inherited from class java.util.Random
nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

next

protected int next(int bits)
Overrides:
next in class Random
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SortedVIntList

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class SortedVIntList

java.lang.Object
    extended by  org.apache.lucene.search.DocIdSet
        extended by  org.apache.lucene.util.SortedVIntList

public class SortedVIntList
extends DocIdSet

Stores and iterate on sorted integers in compressed form in RAM.
The code for compressing the differences between ascending integers was borrowed from IndexInput and IndexOutput.

NOTE: this class assumes the stored integers are doc Ids (hence why it extends DocIdSet). Therefore its iterator() assumes DocIdSetIterator.NO_MORE_DOCS can be used as sentinel. If you intent to use this value, then make sure it's not used during search flow.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.search.DocIdSet
EMPTY_DOCIDSET
Constructor Summary
SortedVIntList(BitSet bits)
Create a SortedVIntList from a BitSet.
SortedVIntList(DocIdSetIterator docIdSetIterator)
Create a SortedVIntList.
SortedVIntList(int... sortedInts)
Create a SortedVIntList from all elements of an array of integers.
SortedVIntList(int[] sortedInts, int inputSize)
Create a SortedVIntList from an array of integers.
Method Summary
int | getByteSize()
boolean | isCacheable() This DocIdSet implementation is cacheable.
DocIdSetIterator | iterator() Provides a DocIdSetIterator to access the set.
int | size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SortedVIntList

public SortedVIntList(int... sortedInts)
Create a SortedVIntList from all elements of an array of integers.

Parameters:
sortedInts - A sorted array of non negative integers.

SortedVIntList

public SortedVIntList(int[] sortedInts,
                      int inputSize)
Create a SortedVIntList from an array of integers.

Parameters:
sortedInts - An array of sorted non negative integers.
inputSize - The number of integers to be used from the array.

SortedVIntList

public SortedVIntList(BitSet bits)
Create a SortedVIntList from a BitSet.

Parameters:
bits - A bit set representing a set of integers.

SortedVIntList

public SortedVIntList(DocIdSetIterator docIdSetIterator)
               throws IOException
Create a SortedVIntList.

Parameters:
docIdSetIterator - An iterator providing document numbers as a set of integers. This DocIdSetIterator is iterated completely when this constructor is called and it must provide the integers in non decreasing order.
Throws:
IOException
Method Detail

size

public int size()
Returns:
The total number of sorted integers.

getByteSize

public int getByteSize()
Returns:
The size of the byte array storing the compressed sorted integers.

isCacheable

public boolean isCacheable()
This DocIdSet implementation is cacheable.

Overrides:
isCacheable in class DocIdSet

iterator

public DocIdSetIterator iterator()
Description copied from class: DocIdSet
Provides a DocIdSetIterator to access the set. This implementation can return null or DocIdSet.EMPTY_DOCIDSET.iterator() if there are no docs that match.

Specified by:
iterator in class DocIdSet
Returns:
An iterator over the sorted integers.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SorterTemplate

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class SorterTemplate

java.lang.Object
    extended by  org.apache.lucene.util.SorterTemplate

public abstract class SorterTemplate
extends Object

This class was inspired by CGLIB, but provides a better QuickSort algorithm without additional InsertionSort at the end. To use, subclass and override the four abstract methods which compare and modify your data. Allows custom swap so that two arrays can be sorted at the same time.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
SorterTemplate()
Method Summary
protected abstract  int compare(int i, int j)
Compares slots i and j of you data.
protected abstract  int comparePivot(int j)
Implements the compare function for the previously stored pivot value.
 void insertionSort(int lo, int hi)
Sorts via stable in-place InsertionSort algorithm (ideal for small collections which are mostly presorted).
 void mergeSort(int lo, int hi)
Sorts via stable in-place MergeSort algorithm For small collections falls back to insertionSort(int,int).
 void quickSort(int lo, int hi)
Sorts via in-place, but unstable, QuickSort algorithm.
protected abstract  void setPivot(int i)
Implement this method, that stores the value of slot i as pivot value
protected abstract  void swap(int i, int j)
Implement this method, that swaps slots i and j in your data
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SorterTemplate

public SorterTemplate()
Method Detail

swap

protected abstract void swap(int i,
                             int j)
Implement this method, that swaps slots i and j in your data

compare

protected abstract int compare(int i,
                               int j)
Compares slots i and j of you data. Should be implemented like valueOf(i).compareTo(valueOf(j))

setPivot

protected abstract void setPivot(int i)
Implement this method, that stores the value of slot i as pivot value

comparePivot

protected abstract int comparePivot(int j)
Implements the compare function for the previously stored pivot value. Should be implemented like pivot.compareTo(valueOf(j))

insertionSort

public final void insertionSort(int lo,
                                int hi)
Sorts via stable in-place InsertionSort algorithm (ideal for small collections which are mostly presorted).

quickSort

public final void quickSort(int lo,
                            int hi)
Sorts via in-place, but unstable, QuickSort algorithm. For small collections falls back to insertionSort(int,int).

mergeSort

public final void mergeSort(int lo,
                            int hi)
Sorts via stable in-place MergeSort algorithm For small collections falls back to insertionSort(int,int).

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StoreClassNameRule

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class StoreClassNameRule

java.lang.Object
    extended by  org.apache.lucene.util.StoreClassNameRule
All Implemented Interfaces:
org.junit.rules.TestRule
public class StoreClassNameRule
extends Object
implements org.junit.rules.TestRule

Constructor Summary
StoreClassNameRule()
Method Summary
org.junit.runners.model.Statement | apply(org.junit.runners.model.Statement s, org.junit.runner.Description d)
Class<?> | getTestClass() Returns the test class currently executing in this rule.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StoreClassNameRule

public StoreClassNameRule()
Method Detail

apply

public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement s,
                                               org.junit.runner.Description d)
Specified by:
apply in interface org.junit.rules.TestRule

getTestClass

public Class<?> getTestClass()
Returns the test class currently executing in this rule.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StringHelper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class StringHelper

java.lang.Object
    extended by  org.apache.lucene.util.StringHelper

public abstract class StringHelper
extends Object

Methods for manipulating strings.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
static StringInterner interner
Expert: The StringInterner implementation used by Lucene.
Method Summary
static int | bytesDifference(byte[] bytes1, int len1, byte[] bytes2, int len2) Compares two byte[] arrays, element by element, and returns the number of elements common to both arrays.
static Comparator<String> | getVersionComparator()
static String | intern(String s) Return the same string object for all equal strings
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

interner

public static StringInterner interner
Expert: The StringInterner implementation used by Lucene. This shouldn't be changed to an incompatible implementation after other Lucene APIs have been used.

Method Detail

intern

public static String intern(String s)
Return the same string object for all equal strings

bytesDifference

public static final int bytesDifference(byte[] bytes1,
                                        int len1,
                                        byte[] bytes2,
                                        int len2)
Compares two byte[] arrays, element by element, and returns the number of elements common to both arrays.

Parameters:
bytes1 - The first byte[] to compare
bytes2 - The second byte[] to compare
Returns:
The number of common elements.

getVersionComparator

public static Comparator<String> getVersionComparator()
Returns:
a Comparator over versioned strings such as X.YY.Z
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


StringInterner

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class StringInterner

java.lang.Object
    extended by  org.apache.lucene.util.StringInterner
Direct Known Subclasses:
SimpleStringInterner
public class StringInterner
extends Object

Subclasses of StringInterner are required to return the same single String object for all equal strings. Depending on the implementation, this may not be the same object returned as String.intern(). This StringInterner base class simply delegates to String.intern().

Constructor Summary
StringInterner()
Method Summary
String | intern(char[] arr, int offset, int len) Returns a single object instance for each equal string.
String | intern(String s) Returns a single object instance for each equal string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StringInterner

public StringInterner()
Method Detail

intern

public String intern(String s)
Returns a single object instance for each equal string.

intern

public String intern(char[] arr,
                     int offset,
                     int len)
Returns a single object instance for each equal string.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SystemPropertiesInvariantRule

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class SystemPropertiesInvariantRule

java.lang.Object
    extended by  org.apache.lucene.util.SystemPropertiesInvariantRule
All Implemented Interfaces:
org.junit.rules.TestRule
public class SystemPropertiesInvariantRule
extends Object
implements org.junit.rules.TestRule

Constructor Summary
SystemPropertiesInvariantRule()
Cares about all properties.
SystemPropertiesInvariantRule(Set<String> ignoredProperties)
Don't care about the given set of properties.
SystemPropertiesInvariantRule(String... ignoredProperties)
Don't care about the given set of properties.
Method Summary
 org.junit.runners.model.Statement apply(org.junit.runners.model.Statement s, org.junit.runner.Description d)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SystemPropertiesInvariantRule

public SystemPropertiesInvariantRule()
Cares about all properties.

SystemPropertiesInvariantRule

public SystemPropertiesInvariantRule(String... ignoredProperties)
Don't care about the given set of properties.

SystemPropertiesInvariantRule

public SystemPropertiesInvariantRule(Set<String> ignoredProperties)
Don't care about the given set of properties.

Method Detail

apply

public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement s,
                                               org.junit.runner.Description d)
Specified by:
apply in interface org.junit.rules.TestRule
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SystemPropertiesRestoreRule

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class SystemPropertiesRestoreRule

java.lang.Object
    extended by  org.apache.lucene.util.SystemPropertiesRestoreRule
All Implemented Interfaces:
org.junit.rules.TestRule
public class SystemPropertiesRestoreRule
extends Object
implements org.junit.rules.TestRule

Restore system properties from before the nested Statement.

Constructor Summary
SystemPropertiesRestoreRule()
Restores all properties.
SystemPropertiesRestoreRule(Set<String> ignoredProperties)
SystemPropertiesRestoreRule(String... ignoredProperties)
Method Summary
 org.junit.runners.model.Statement apply(org.junit.runners.model.Statement s, org.junit.runner.Description d)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SystemPropertiesRestoreRule

public SystemPropertiesRestoreRule()
Restores all properties.

SystemPropertiesRestoreRule

public SystemPropertiesRestoreRule(Set<String> ignoredProperties)
Parameters:
ignoredProperties - Properties that will be ignored (and will not be restored).

SystemPropertiesRestoreRule

public SystemPropertiesRestoreRule(String... ignoredProperties)
Parameters:
ignoredProperties - Properties that will be ignored (and will not be restored).
Method Detail

apply

public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement s,
                                               org.junit.runner.Description d)
Specified by:
apply in interface org.junit.rules.TestRule
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ThreadInterruptedException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class ThreadInterruptedException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.lang.RuntimeException
                extended by  org.apache.lucene.util.ThreadInterruptedException
All Implemented Interfaces:
Serializable
public final class ThreadInterruptedException
extends RuntimeException

Thrown by lucene on detecting that Thread.interrupt() had been called. Unlike Java's InterruptedException, this exception is not checked..

See Also:
Serialized Form

Constructor Summary
ThreadInterruptedException(InterruptedException ie)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ThreadInterruptedException

public ThreadInterruptedException(InterruptedException ie)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ThrottledIndexOutput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class ThrottledIndexOutput

java.lang.Object
    extended by  org.apache.lucene.store.DataOutput
        extended by  org.apache.lucene.store.IndexOutput
            extended by  org.apache.lucene.util.ThrottledIndexOutput
All Implemented Interfaces:
Closeable
public class ThrottledIndexOutput
extends IndexOutput

Intentionally slow IndexOutput for testing.

Field Summary
static int DEFAULT_MIN_WRITTEN_BYTES
Constructor Summary
ThrottledIndexOutput(int bytesPerSecond, long delayInMillis, IndexOutput delegate)
ThrottledIndexOutput(int bytesPerSecond, long delays, int minBytesWritten, IndexOutput delegate)
ThrottledIndexOutput(int bytesPerSecond, long flushDelayMillis, long closeDelayMillis, long seekDelayMillis, long minBytesWritten, IndexOutput delegate)
Method Summary
void | close() Closes this stream to further operations.
void | copyBytes(DataInput input, long numBytes) Copy numBytes bytes from input to ourself.
void | flush() Forces any buffered output to be written.
protected long | getDelay(boolean closing)
long | getFilePointer() Returns the current position in this file, where the next write will occur.
long | length() The number of bytes in the file.
static int | mBitsToBytes(int mbits)
ThrottledIndexOutput | newFromDelegate(IndexOutput output)
void | seek(long pos) Sets current position in this file, where the next write will occur.
void | setLength(long length) Set the file length.
void | writeByte(byte b) Writes a single byte.
void | writeBytes(byte[] b, int offset, int length) Writes an array of bytes.
Methods inherited from class org.apache.lucene.store.DataOutput
writeBytes, writeChars, writeChars, writeInt, writeLong, writeShort, writeString, writeStringStringMap, writeVInt, writeVLong
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_MIN_WRITTEN_BYTES

public static final int DEFAULT_MIN_WRITTEN_BYTES
See Also:
Constant Field Values
Constructor Detail

ThrottledIndexOutput

public ThrottledIndexOutput(int bytesPerSecond,
                            long delayInMillis,
                            IndexOutput delegate)

ThrottledIndexOutput

public ThrottledIndexOutput(int bytesPerSecond,
                            long delays,
                            int minBytesWritten,
                            IndexOutput delegate)

ThrottledIndexOutput

public ThrottledIndexOutput(int bytesPerSecond,
                            long flushDelayMillis,
                            long closeDelayMillis,
                            long seekDelayMillis,
                            long minBytesWritten,
                            IndexOutput delegate)
Method Detail

newFromDelegate

public ThrottledIndexOutput newFromDelegate(IndexOutput output)

mBitsToBytes

public static final int mBitsToBytes(int mbits)

flush

public void flush()
           throws IOException
Description copied from class: IndexOutput
Forces any buffered output to be written.

Specified by:
flush in class IndexOutput
Throws:
IOException

close

public void close()
           throws IOException
Description copied from class: IndexOutput
Closes this stream to further operations.

Specified by:
close in interface Closeable
Specified by:
close in class IndexOutput
Throws:
IOException

getFilePointer

public long getFilePointer()
Description copied from class: IndexOutput
Returns the current position in this file, where the next write will occur.

Specified by:
getFilePointer in class IndexOutput
See Also:
IndexOutput.seek(long)

seek

public void seek(long pos)
          throws IOException
Description copied from class: IndexOutput
Sets current position in this file, where the next write will occur.

Specified by:
seek in class IndexOutput
Throws:
IOException
See Also:
IndexOutput.getFilePointer()

length

public long length()
            throws IOException
Description copied from class: IndexOutput
The number of bytes in the file.

Specified by:
length in class IndexOutput
Throws:
IOException

writeByte

public void writeByte(byte b)
               throws IOException
Description copied from class: DataOutput
Writes a single byte.

Specified by:
writeByte in class DataOutput
Throws:
IOException
See Also:
DataInput.readByte()

writeBytes

public void writeBytes(byte[] b,
                       int offset,
                       int length)
                throws IOException
Description copied from class: DataOutput
Writes an array of bytes.

Specified by:
writeBytes in class DataOutput
Parameters:
b - the bytes to write
offset - the offset in the byte array
length - the number of bytes to write
Throws:
IOException
See Also:
DataInput.readBytes(byte[],int,int)

getDelay

protected long getDelay(boolean closing)

setLength

public void setLength(long length)
               throws IOException
Description copied from class: IndexOutput
Set the file length. By default, this method does nothing (it's optional for a Directory to implement it). But, certain Directory implementations (for example @see FSDirectory) can use this to inform the underlying IO system to pre-allocate the file to the specified size. If the length is longer than the current file length, the bytes added to the file are undefined. Otherwise the file is truncated.

Overrides:
setLength in class IndexOutput
Parameters:
length - file length
Throws:
IOException

copyBytes

public void copyBytes(DataInput input,
                      long numBytes)
               throws IOException
Description copied from class: DataOutput
Copy numBytes bytes from input to ourself.

Overrides:
copyBytes in class DataOutput
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ToStringUtils

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class ToStringUtils

java.lang.Object
    extended by  org.apache.lucene.util.ToStringUtils

public final class ToStringUtils
extends Object

Helper methods to ease implementing Object.toString().

Method Summary
static String | boost(float boost) for printing boost only if not 1.0
static void | byteArray(StringBuilder buffer, byte[] bytes)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

boost

public static String boost(float boost)
for printing boost only if not 1.0

byteArray

public static void byteArray(StringBuilder buffer,
                             byte[] bytes)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TwoPhaseCommit

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Interface TwoPhaseCommit

All Known Subinterfaces:
TaxonomyWriter
All Known Implementing Classes:
DirectoryTaxonomyWriter, IndexWriter, TwoPhaseCommitTool.TwoPhaseCommitWrapper
public interface TwoPhaseCommit

An interface for implementations that support 2-phase commit. You can use TwoPhaseCommitTool to execute a 2-phase commit algorithm over several TwoPhaseCommits.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 void commit()
The second phase of a 2-phase commit.
 void commit(Map<String,String> commitData)
Like commit(), but takes an additional commit data to be included w/ the commit.
 void prepareCommit()
The first stage of a 2-phase commit.
 void prepareCommit(Map<String,String> commitData)
Like commit(), but takes an additional commit data to be included w/ the commit.
 void rollback()
Discards any changes that have occurred since the last commit.

Method Detail

prepareCommit

void prepareCommit()
                   throws IOException
The first stage of a 2-phase commit. Implementations should do as much work as possible in this method, but avoid actual committing changes. If the 2-phase commit fails, rollback() is called to discard all changes since last successful commit.

Throws:
IOException

prepareCommit

void prepareCommit(Map<String,String> commitData)
                   throws IOException
Like commit(), but takes an additional commit data to be included w/ the commit.

NOTE: some implementations may not support any custom data to be included w/ the commit and may discard it altogether. Consult the actual implementation documentation for verifying if this is supported.

Throws:
IOException
See Also:
prepareCommit()

commit

void commit()
            throws IOException
The second phase of a 2-phase commit. Implementations should ideally do very little work in this method (following prepareCommit(), and after it returns, the caller can assume that the changes were successfully committed to the underlying storage.

Throws:
IOException

commit

void commit(Map<String,String> commitData)
            throws IOException
Like commit(), but takes an additional commit data to be included w/ the commit.

Throws:
IOException
See Also:
commit(), prepareCommit(Map)

rollback

void rollback()
              throws IOException
Discards any changes that have occurred since the last commit. In a 2-phase commit algorithm, where one of the objects failed to commit() or prepareCommit(), this method is used to roll all other objects back to their previous state.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TwoPhaseCommitTool.CommitFailException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class TwoPhaseCommitTool.CommitFailException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.io.IOException
                extended by  org.apache.lucene.util.TwoPhaseCommitTool.CommitFailException
All Implemented Interfaces:
Serializable
Enclosing class:
TwoPhaseCommitTool
public static class TwoPhaseCommitTool.CommitFailException
extends IOException

Thrown by TwoPhaseCommitTool.execute(TwoPhaseCommit...) when an object fails to commit().

See Also:
Serialized Form

Constructor Summary
TwoPhaseCommitTool.CommitFailException(Throwable cause, TwoPhaseCommit obj)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TwoPhaseCommitTool.CommitFailException

public TwoPhaseCommitTool.CommitFailException(Throwable cause,
                                              TwoPhaseCommit obj)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TwoPhaseCommitTool

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class TwoPhaseCommitTool

java.lang.Object
    extended by  org.apache.lucene.util.TwoPhaseCommitTool

public final class TwoPhaseCommitTool
extends Object

A utility for executing 2-phase commit on several objects.

See Also:
TwoPhaseCommit
WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | TwoPhaseCommitTool.CommitFailException Thrown by execute(TwoPhaseCommit...) when an object fails to commit().
static class | TwoPhaseCommitTool.PrepareCommitFailException Thrown by execute(TwoPhaseCommit...) when an object fails to prepareCommit().
static class | TwoPhaseCommitTool.TwoPhaseCommitWrapper A wrapper of a TwoPhaseCommit, which delegates all calls to the wrapped object, passing the specified commitData.
Constructor Summary
TwoPhaseCommitTool()
Method Summary
static void execute(TwoPhaseCommit... objects)
Executes a 2-phase commit algorithm by first TwoPhaseCommit.prepareCommit() all objects and only if all succeed, it proceeds with TwoPhaseCommit.commit().
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TwoPhaseCommitTool

public TwoPhaseCommitTool()
Method Detail

execute

public static void execute(TwoPhaseCommit... objects)
                    throws TwoPhaseCommitTool.PrepareCommitFailException,
                           TwoPhaseCommitTool.CommitFailException
Executes a 2-phase commit algorithm by first TwoPhaseCommit.prepareCommit() all objects and only if all succeed, it proceeds with TwoPhaseCommit.commit(). If any of the objects fail on either the preparation or actual commit, it terminates and TwoPhaseCommit.rollback() all of them.

NOTE: it may happen that an object fails to commit, after few have already successfully committed. This tool will still issue a rollback instruction on them as well, but depending on the implementation, it may not have any effect.

NOTE: if any of the objects are null, this method simply skips over them.

Throws:
TwoPhaseCommitTool.PrepareCommitFailException - if any of the objects fail to TwoPhaseCommit.prepareCommit()
TwoPhaseCommitTool.PrepareCommitFailException - if any of the objects fail to TwoPhaseCommit.commit()
TwoPhaseCommitTool.CommitFailException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TwoPhaseCommitTool.PrepareCommitFailException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class TwoPhaseCommitTool.PrepareCommitFailException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  java.io.IOException
                extended by  org.apache.lucene.util.TwoPhaseCommitTool.PrepareCommitFailException
All Implemented Interfaces:
Serializable
Enclosing class:
TwoPhaseCommitTool
public static class TwoPhaseCommitTool.PrepareCommitFailException
extends IOException

Thrown by TwoPhaseCommitTool.execute(TwoPhaseCommit...) when an object fails to prepareCommit().

See Also:
Serialized Form

Constructor Summary
TwoPhaseCommitTool.PrepareCommitFailException(Throwable cause, TwoPhaseCommit obj)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

TwoPhaseCommitTool.PrepareCommitFailException

public TwoPhaseCommitTool.PrepareCommitFailException(Throwable cause,
                                                     TwoPhaseCommit obj)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TwoPhaseCommitTool.TwoPhaseCommitWrapper

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class TwoPhaseCommitTool.TwoPhaseCommitWrapper

java.lang.Object
    extended by  org.apache.lucene.util.TwoPhaseCommitTool.TwoPhaseCommitWrapper
All Implemented Interfaces:
TwoPhaseCommit
Enclosing class:
TwoPhaseCommitTool
public static final class TwoPhaseCommitTool.TwoPhaseCommitWrapper
extends Object
implements TwoPhaseCommit

A wrapper of a TwoPhaseCommit, which delegates all calls to the wrapped object, passing the specified commitData. This object is useful for use with TwoPhaseCommitTool.execute(TwoPhaseCommit...) if one would like to store commitData as part of the commit.

Constructor Summary
TwoPhaseCommitTool.TwoPhaseCommitWrapper(TwoPhaseCommit tpc, Map<String,String> commitData)
Method Summary
 void commit()
The second phase of a 2-phase commit.
 void commit(Map<String,String> commitData)
Like TwoPhaseCommit.commit(), but takes an additional commit data to be included w/ the commit.
 void prepareCommit()
The first stage of a 2-phase commit.
 void prepareCommit(Map<String,String> commitData)
Like TwoPhaseCommit.commit(), but takes an additional commit data to be included w/ the commit.
 void rollback()
Discards any changes that have occurred since the last commit.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TwoPhaseCommitTool.TwoPhaseCommitWrapper

public TwoPhaseCommitTool.TwoPhaseCommitWrapper(TwoPhaseCommit tpc,
                                                Map<String,String> commitData)
Method Detail

prepareCommit

public void prepareCommit()
                   throws IOException
Description copied from interface: TwoPhaseCommit
The first stage of a 2-phase commit. Implementations should do as much work as possible in this method, but avoid actual committing changes. If the 2-phase commit fails, TwoPhaseCommit.rollback() is called to discard all changes since last successful commit.

Specified by:
prepareCommit in interface TwoPhaseCommit
Throws:
IOException

prepareCommit

public void prepareCommit(Map<String,String> commitData)
                   throws IOException
Description copied from interface: TwoPhaseCommit
Like TwoPhaseCommit.commit(), but takes an additional commit data to be included w/ the commit.

NOTE: some implementations may not support any custom data to be included w/ the commit and may discard it altogether. Consult the actual implementation documentation for verifying if this is supported.

Specified by:
prepareCommit in interface TwoPhaseCommit
Throws:
IOException
See Also:
TwoPhaseCommit.prepareCommit()

commit

public void commit()
            throws IOException
Description copied from interface: TwoPhaseCommit
The second phase of a 2-phase commit. Implementations should ideally do very little work in this method (following TwoPhaseCommit.prepareCommit(), and after it returns, the caller can assume that the changes were successfully committed to the underlying storage.

Specified by:
commit in interface TwoPhaseCommit
Throws:
IOException

commit

public void commit(Map<String,String> commitData)
            throws IOException
Description copied from interface: TwoPhaseCommit
Like TwoPhaseCommit.commit(), but takes an additional commit data to be included w/ the commit.

Specified by:
commit in interface TwoPhaseCommit
Throws:
IOException
See Also:
TwoPhaseCommit.commit(), TwoPhaseCommit.prepareCommit(Map)

rollback

public void rollback()
              throws IOException
Description copied from interface: TwoPhaseCommit
Discards any changes that have occurred since the last commit. In a 2-phase commit algorithm, where one of the objects failed to TwoPhaseCommit.commit() or TwoPhaseCommit.prepareCommit(), this method is used to roll all other objects back to their previous state.

Specified by:
rollback in interface TwoPhaseCommit
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UncaughtExceptionsRule

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class UncaughtExceptionsRule

java.lang.Object
    extended by  org.apache.lucene.util.UncaughtExceptionsRule
All Implemented Interfaces:
org.junit.rules.TestRule
public class UncaughtExceptionsRule
extends Object
implements org.junit.rules.TestRule

Subscribes to Thread.setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler) and causes test/ suite failures if uncaught exceptions are detected.

Nested Class Summary
static class UncaughtExceptionsRule.UncaughtExceptionEntry
Constructor Summary
UncaughtExceptionsRule(LuceneTestCase ltc)
Method Summary
org.junit.runners.model.Statement | apply(org.junit.runners.model.Statement s, org.junit.runner.Description d)
boolean | hasUncaughtExceptions() Just a check if anything's been caught.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

UncaughtExceptionsRule

public UncaughtExceptionsRule(LuceneTestCase ltc)
Method Detail

apply

public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement s,
                                               org.junit.runner.Description d)
Specified by:
apply in interface org.junit.rules.TestRule

hasUncaughtExceptions

public boolean hasUncaughtExceptions()
Just a check if anything's been caught.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UncaughtExceptionsRule.UncaughtExceptionEntry

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class UncaughtExceptionsRule.UncaughtExceptionEntry

java.lang.Object
    extended by  org.apache.lucene.util.UncaughtExceptionsRule.UncaughtExceptionEntry
Enclosing class:
UncaughtExceptionsRule
public static class UncaughtExceptionsRule.UncaughtExceptionEntry
extends Object

Field Summary
Throwable | exception
Thread | thread
Constructor Summary
UncaughtExceptionsRule.UncaughtExceptionEntry(Thread thread, Throwable exception)
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

thread

public final Thread thread

exception

public final Throwable exception
Constructor Detail

UncaughtExceptionsRule.UncaughtExceptionEntry

public UncaughtExceptionsRule.UncaughtExceptionEntry(Thread thread,
                                                     Throwable exception)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnicodeUtil

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class UnicodeUtil

java.lang.Object
    extended by  org.apache.lucene.util.UnicodeUtil

public final class UnicodeUtil
extends Object

Class to encode java's UTF16 char[] into UTF8 byte[] without always allocating a new byte[] as String.getBytes("UTF-8") does.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
static class | UnicodeUtil.UTF16Result Holds decoded UTF16 code units.
static class | UnicodeUtil.UTF8Result Holds decoded UTF8 code units.
Field Summary
static int | UNI_REPLACEMENT_CHAR
static int | UNI_SUR_HIGH_END
static int | UNI_SUR_HIGH_START
static int | UNI_SUR_LOW_END
static int | UNI_SUR_LOW_START
Method Summary
static String newString(int[] codePoints, int offset, int count)
Cover JDK 1.5 API.
static void UTF16toUTF8(char[] source, int offset, int length, BytesRef result)
Encode characters from a char[] source, starting at offset for length chars.
static void UTF16toUTF8(char[] source, int offset, int length, UnicodeUtil.UTF8Result result)
Encode characters from a char[] source, starting at offset for length chars.
static void UTF16toUTF8(char[] source, int offset, UnicodeUtil.UTF8Result result)
Encode characters from a char[] source, starting at offset and stopping when the character 0xffff is seen.
static void UTF16toUTF8(CharSequence s, int offset, int length, BytesRef result)
Encode characters from this String, starting at offset for length characters.
static void UTF16toUTF8(String s, int offset, int length, UnicodeUtil.UTF8Result result)
Encode characters from this String, starting at offset for length characters.
static int UTF16toUTF8WithHash(char[] source, int offset, int length, BytesRef result)
Encode characters from a char[] source, starting at offset for length chars.
static void UTF8toUTF16(byte[] utf8, int offset, int length, CharsRef chars)
Interprets the given byte array as UTF-8 and converts to UTF-16.
static void UTF8toUTF16(byte[] utf8, int offset, int length, UnicodeUtil.UTF16Result result)
Convert UTF8 bytes into UTF16 characters.
static void UTF8toUTF16(BytesRef bytesRef, CharsRef chars)
Utility method for UTF8toUTF16(byte[], int, int, CharsRef)
static boolean validUTF16String(CharSequence s)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

UNI_SUR_HIGH_START

public static final int UNI_SUR_HIGH_START
See Also:
Constant Field Values

UNI_SUR_HIGH_END

public static final int UNI_SUR_HIGH_END
See Also:
Constant Field Values

UNI_SUR_LOW_START

public static final int UNI_SUR_LOW_START
See Also:
Constant Field Values

UNI_SUR_LOW_END

public static final int UNI_SUR_LOW_END
See Also:
Constant Field Values

UNI_REPLACEMENT_CHAR

public static final int UNI_REPLACEMENT_CHAR
See Also:
Constant Field Values
Method Detail

UTF16toUTF8WithHash

public static int UTF16toUTF8WithHash(char[] source,
                                      int offset,
                                      int length,
                                      BytesRef result)
Encode characters from a char[] source, starting at offset for length chars. Returns a hash of the resulting bytes. After encoding, result.offset will always be 0.

UTF16toUTF8

public static void UTF16toUTF8(char[] source,
                               int offset,
                               UnicodeUtil.UTF8Result result)
Encode characters from a char[] source, starting at offset and stopping when the character 0xffff is seen. Returns the number of bytes written to bytesOut.

UTF16toUTF8

public static void UTF16toUTF8(char[] source,
                               int offset,
                               int length,
                               UnicodeUtil.UTF8Result result)
Encode characters from a char[] source, starting at offset for length chars. Returns the number of bytes written to bytesOut.

UTF16toUTF8

public static void UTF16toUTF8(String s,
                               int offset,
                               int length,
                               UnicodeUtil.UTF8Result result)
Encode characters from this String, starting at offset for length characters. Returns the number of bytes written to bytesOut.

UTF16toUTF8

public static void UTF16toUTF8(CharSequence s,
                               int offset,
                               int length,
                               BytesRef result)
Encode characters from this String, starting at offset for length characters. After encoding, result.offset will always be 0.

UTF16toUTF8

public static void UTF16toUTF8(char[] source,
                               int offset,
                               int length,
                               BytesRef result)
Encode characters from a char[] source, starting at offset for length chars. After encoding, result.offset will always be 0.

UTF8toUTF16

public static void UTF8toUTF16(byte[] utf8,
                               int offset,
                               int length,
                               UnicodeUtil.UTF16Result result)
Convert UTF8 bytes into UTF16 characters. If offset is non-zero, conversion starts at that starting point in utf8, re-using the results from the previous call up until offset.

newString

public static String newString(int[] codePoints,
                               int offset,
                               int count)
Cover JDK 1.5 API. Create a String from an array of codePoints.

Parameters:
codePoints - The code array
offset - The start of the text in the code point array
count - The number of code points
Returns:
a String representing the code points between offset and count
Throws:
IllegalArgumentException - If an invalid code point is encountered
IndexOutOfBoundsException - If the offset or count are out of bounds.

UTF8toUTF16

public static void UTF8toUTF16(byte[] utf8,
                               int offset,
                               int length,
                               CharsRef chars)
Interprets the given byte array as UTF-8 and converts to UTF-16. The CharsRef will be extended if it doesn't provide enough space to hold the worst case of each byte becoming a UTF-16 codepoint.

NOTE: Full characters are read, even if this reads past the length passed (and can result in an ArrayOutOfBoundsException if invalid UTF-8 is passed). Explicit checks for valid UTF-8 are not performed.

UTF8toUTF16

public static void UTF8toUTF16(BytesRef bytesRef,
                               CharsRef chars)
Utility method for UTF8toUTF16(byte[], int, int, CharsRef)

See Also:
UTF8toUTF16(byte[], int, int, CharsRef)

validUTF16String

public static boolean validUTF16String(CharSequence s)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnicodeUtil.UTF16Result

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class UnicodeUtil.UTF16Result

java.lang.Object
    extended by  org.apache.lucene.util.UnicodeUtil.UTF16Result
Enclosing class:
UnicodeUtil
public static final class UnicodeUtil.UTF16Result
extends Object

Holds decoded UTF16 code units.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
int | length
int[] | offsets
char[] | result
Constructor Summary
UnicodeUtil.UTF16Result()
Method Summary
void | copyText(UnicodeUtil.UTF16Result other)
void | setLength(int newLength)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

result

public char[] result

offsets

public int[] offsets

length

public int length
Constructor Detail

UnicodeUtil.UTF16Result

public UnicodeUtil.UTF16Result()
Method Detail

setLength

public void setLength(int newLength)

copyText

public void copyText(UnicodeUtil.UTF16Result other)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnicodeUtil.UTF8Result

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class UnicodeUtil.UTF8Result

java.lang.Object
    extended by  org.apache.lucene.util.UnicodeUtil.UTF8Result
Enclosing class:
UnicodeUtil
public static final class UnicodeUtil.UTF8Result
extends Object

Holds decoded UTF8 code units.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
int | length
byte[] | result
Constructor Summary
UnicodeUtil.UTF8Result()
Method Summary
 void setLength(int newLength)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

result

public byte[] result

length

public int length
Constructor Detail

UnicodeUtil.UTF8Result

public UnicodeUtil.UTF8Result()
Method Detail

setLength

public void setLength(int newLength)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnsafeByteArrayInputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class UnsafeByteArrayInputStream

java.lang.Object
    extended by  java.io.InputStream
        extended by  org.apache.lucene.util.UnsafeByteArrayInputStream
All Implemented Interfaces:
Closeable
public class UnsafeByteArrayInputStream
extends InputStream

This class, much like ByteArrayInputStream uses a given buffer as a source of an InputStream. Unlike ByteArrayInputStream, this class does not "waste" memory by creating a local copy of the given buffer, but rather uses the given buffer as is. Hence the name Unsafe. While using this class one should remember that the byte[] buffer memory is shared and might be changed from outside. For reuse-ability, a call for reInit(byte[]) can be called, and initialize the stream with a new buffer.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
UnsafeByteArrayInputStream()
Creates a new instance by not using any byte[] up front.
UnsafeByteArrayInputStream(byte[] buffer)
Creates an UnsafeByteArrayInputStream which uses a given byte array as the source of the stream.
UnsafeByteArrayInputStream(byte[] buffer, int startPos, int endPos)
Creates an UnsafeByteArrayInputStream which uses a given byte array as the source of the stream, at the specific range: [startPos, endPos)
Method Summary
int | available()
void | mark(int readlimit)
boolean | markSupported()
int | read() Read a byte.
void | reInit(byte[] buffer) Initialize the stream with a given buffer, using the default limits of [0, buffer.length)
void | reInit(byte[] buffer, int startPos, int endPos) Initialize the stream with a given byte array as the source of the stream, at the specific range: [startPos, endPos)
void | reset() Resets the stream back to its original state.
Methods inherited from class java.io.InputStream
close, read, read, skip
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

UnsafeByteArrayInputStream

public UnsafeByteArrayInputStream()
Creates a new instance by not using any byte[] up front. If you use this constructor, you MUST call either of the reInit methods before you consume any byte from this instance.
This constructor is for convenience purposes only, so that if one does not have the byte[] at the moment of creation, one is not forced to pass a new byte[0] or something. Obviously in that case, one will call either reInit methods before using the class.

UnsafeByteArrayInputStream

public UnsafeByteArrayInputStream(byte[] buffer)
Creates an UnsafeByteArrayInputStream which uses a given byte array as the source of the stream. Default range is [0 , buffer.length)

Parameters:
buffer - byte array used as the source of this stream

UnsafeByteArrayInputStream

public UnsafeByteArrayInputStream(byte[] buffer,
                                  int startPos,
                                  int endPos)
Creates an UnsafeByteArrayInputStream which uses a given byte array as the source of the stream, at the specific range: [startPos, endPos)

Parameters:
buffer - byte array used as the source of this stream
startPos - first index (inclusive) to the data lying in the given buffer
endPos - an index (exclusive) where the data ends. data @ buffer[endPos] will never be read
Method Detail

mark

public void mark(int readlimit)
Overrides:
mark in class InputStream

markSupported

public boolean markSupported()
Overrides:
markSupported in class InputStream

reInit

public void reInit(byte[] buffer)
Initialize the stream with a given buffer, using the default limits of [0, buffer.length)

Parameters:
buffer - byte array used as the source of this stream

reInit

public void reInit(byte[] buffer,
                   int startPos,
                   int endPos)
Initialize the stream with a given byte array as the source of the stream, at the specific range: [startPos, endPos)

Parameters:
buffer - byte array used as the source of this stream
startPos - first index (inclusive) to the data lying in the given buffer
endPos - an index (exclusive) where the data ends. data @ buffer[endPos] will never be read

available

public int available()
              throws IOException
Overrides:
available in class InputStream
Throws:
IOException

read

public int read()
         throws IOException
Read a byte. Data returned as an integer [0,255] If end of stream reached, returns -1

Specified by:
read in class InputStream
Throws:
IOException

reset

public void reset()
           throws IOException
Resets the stream back to its original state. Basically - moving the index back to start position.

Overrides:
reset in class InputStream
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UnsafeByteArrayOutputStream

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class UnsafeByteArrayOutputStream

java.lang.Object
    extended by  java.io.OutputStream
        extended by  org.apache.lucene.util.UnsafeByteArrayOutputStream
All Implemented Interfaces:
Closeable, Flushable
public class UnsafeByteArrayOutputStream
extends OutputStream

This class is used as a wrapper to a byte array, extending OutputStream. Data is written in the given byte[] buffer, until its length is insufficient. Than the buffer size is doubled and the data is written. This class is Unsafe as it is using a buffer which potentially can be changed from the outside. Moreover, when toByteArray() is called, the buffer itself is returned, and not a copy.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
UnsafeByteArrayOutputStream()
Constructs a new output stream, with a default allocated buffer which can later be obtained via toByteArray().
UnsafeByteArrayOutputStream(byte[] buffer)
Constructs a new output stream, with a given buffer.
UnsafeByteArrayOutputStream(byte[] buffer, int startPos)
Constructs a new output stream, with a given buffer.
Method Summary
int | getStartPos() Returns the start position data was written to.
int | length() Returns the number of relevant bytes.
void | reInit(byte[] buffer) For reuse-ability, this stream object can be re-initialized with another given buffer, using 0 as default starting position.
void | reInit(byte[] buffer, int startPos) For reuse-ability, this stream object can be re-initialized with another given buffer and starting position.
byte[] | toByteArray() Returns the byte array saved within the buffer AS IS.
void | write(byte[] b, int off, int len) writes a given byte[], with offset and length to the buffer.
void | write(int value) writes a given byte(at the form of an int) to the buffer.
Methods inherited from class java.io.OutputStream
close, flush, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

UnsafeByteArrayOutputStream

public UnsafeByteArrayOutputStream()
Constructs a new output stream, with a default allocated buffer which can later be obtained via toByteArray().

UnsafeByteArrayOutputStream

public UnsafeByteArrayOutputStream(byte[] buffer)
Constructs a new output stream, with a given buffer. Writing will start at index 0 as a default.

Parameters:
buffer - some space to which writing will be made

UnsafeByteArrayOutputStream

public UnsafeByteArrayOutputStream(byte[] buffer,
                                   int startPos)
Constructs a new output stream, with a given buffer. Writing will start at a given index.

Parameters:
buffer - some space to which writing will be made.
startPos - an index (inclusive) from white data will be written.
Method Detail

reInit

public void reInit(byte[] buffer,
                   int startPos)
For reuse-ability, this stream object can be re-initialized with another given buffer and starting position.

Parameters:
buffer - some space to which writing will be made.
startPos - an index (inclusive) from white data will be written.

reInit

public void reInit(byte[] buffer)
For reuse-ability, this stream object can be re-initialized with another given buffer, using 0 as default starting position.

Parameters:
buffer - some space to which writing will be made.

write

public void write(int value)
           throws IOException
writes a given byte(at the form of an int) to the buffer. If the buffer's empty space is insufficient, the buffer is doubled.

Specified by:
write in class OutputStream
Parameters:
value - byte value to be written
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
writes a given byte[], with offset and length to the buffer. If the buffer's empty space is insufficient, the buffer is doubled until it could contain all the data.

Overrides:
write in class OutputStream
Parameters:
b - byte buffer, containing the source data to be written
off - index from which data from the buffer b should be written
len - number of bytes that should be written
Throws:
IOException

toByteArray

public byte[] toByteArray()
Returns the byte array saved within the buffer AS IS.

Returns:
the actual inner buffer - not a copy of it.

length

public int length()
Returns the number of relevant bytes. This objects makes sure the buffer is at least the size of it's data. But it can also be twice as big. The user would want to process the relevant bytes only. For that he would need the count.

Returns:
number of relevant bytes

getStartPos

public int getStartPos()
Returns the start position data was written to. This is useful in case you used reInit(byte[], int) or UnsafeByteArrayOutputStream(byte[], int) and passed a start position which is not 0.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Version

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.util
Enum Version

java.lang.Object
    extended by  java.lang.Enum<Version>
        extended by  org.apache.lucene.util.Version
All Implemented Interfaces:
Serializable, Comparable<Version>
public enum Version
extends Enum<Version>

Use by certain classes to match version compatibility across releases of Lucene.

WARNING: When changing the version parameter that you supply to components in Lucene, do not simply change the version at search-time, but instead also adjust your indexing code to match, and re-index.

Enum Constant Summary
LUCENE_20
Deprecated. (3.1) Use latest
LUCENE_21
Deprecated. (3.1) Use latest
LUCENE_22
Deprecated. (3.1) Use latest
LUCENE_23
Deprecated. (3.1) Use latest
LUCENE_24
Deprecated. (3.1) Use latest
LUCENE_29
Deprecated. (3.1) Use latest
LUCENE_30
Match settings and bugs in Lucene's 3.0 release.
LUCENE_31
Match settings and bugs in Lucene's 3.1 release.
LUCENE_32
Match settings and bugs in Lucene's 3.2 release.
LUCENE_33
Match settings and bugs in Lucene's 3.3 release.
LUCENE_34
Match settings and bugs in Lucene's 3.4 release.
LUCENE_35
Match settings and bugs in Lucene's 3.5 release.
LUCENE_36
Match settings and bugs in Lucene's 3.6 release.
LUCENE_CURRENT
Deprecated. Use an actual version instead.
Method Summary
boolean | onOrAfter(Version other)
static Version | valueOf(String name) Returns the enum constant of this type with the specified name.
static Version[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

LUCENE_20

@Deprecated
public static final Version LUCENE_20
Deprecated. (3.1) Use latest
Match settings and bugs in Lucene's 2.0 release.

LUCENE_21

@Deprecated
public static final Version LUCENE_21
Deprecated. (3.1) Use latest
Match settings and bugs in Lucene's 2.1 release.

LUCENE_22

@Deprecated
public static final Version LUCENE_22
Deprecated. (3.1) Use latest
Match settings and bugs in Lucene's 2.2 release.

LUCENE_23

@Deprecated
public static final Version LUCENE_23
Deprecated. (3.1) Use latest
Match settings and bugs in Lucene's 2.3 release.

LUCENE_24

@Deprecated
public static final Version LUCENE_24
Deprecated. (3.1) Use latest
Match settings and bugs in Lucene's 2.4 release.

LUCENE_29

@Deprecated
public static final Version LUCENE_29
Deprecated. (3.1) Use latest
Match settings and bugs in Lucene's 2.9 release.

LUCENE_30

public static final Version LUCENE_30
Match settings and bugs in Lucene's 3.0 release.

LUCENE_31

public static final Version LUCENE_31
Match settings and bugs in Lucene's 3.1 release.

LUCENE_32

public static final Version LUCENE_32
Match settings and bugs in Lucene's 3.2 release.

LUCENE_33

public static final Version LUCENE_33
Match settings and bugs in Lucene's 3.3 release.

LUCENE_34

public static final Version LUCENE_34
Match settings and bugs in Lucene's 3.4 release.

LUCENE_35

public static final Version LUCENE_35
Match settings and bugs in Lucene's 3.5 release.

LUCENE_36

public static final Version LUCENE_36
Match settings and bugs in Lucene's 3.6 release.

Use this to get the latest & greatest settings, bug fixes, etc, for Lucene.

LUCENE_CURRENT

@Deprecated
public static final Version LUCENE_CURRENT
Deprecated. Use an actual version instead.

WARNING: if you use this setting, and then upgrade to a newer release of Lucene, sizable changes may happen. If backwards compatibility is important then you should instead explicitly specify an actual version.

If you use this constant then you may need to re-index all of your documents when upgrading Lucene, as the way text is indexed may have changed. Additionally, you may need to re-test your entire application to ensure it behaves as expected, as some defaults may have changed and may break functionality in your application.

Method Detail

values

public static final Version[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Version c : Version.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static Version valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

onOrAfter

public boolean onOrAfter(Version other)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


Vint8

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class Vint8

java.lang.Object
    extended by  org.apache.lucene.util.Vint8

public class Vint8
extends Object

Variable-length encoding of 32-bit integers, into 8-bit bytes. A number is encoded as follows:

  • If it is less than 127 and non-negative (i.e., if the number uses only 7 bits), it is encoded as as single byte: 0bbbbbbb.
  • If its highest nonzero bit is greater than bit 6 (0x40), it is represented as a series of bytes, each byte's 7 LSB containing bits from the original value, with the MSB set for all but the last byte. The first encoded byte contains the highest nonzero bits from the original; the second byte contains the next 7 MSB; and so on, with the last byte containing the 7 LSB of the original.
Examples:
  1. n = 117 = 1110101: This has fewer than 8 significant bits, and so is encoded as 01110101 = 0x75.
  2. n = 100000 = (binary) 11000011010100000. This has 17 significant bits, and so needs three Vint8 bytes. Left-zero-pad it to a multiple of 7 bits, then split it into chunks of 7 and add an MSB, 0 for the last byte, 1 for the others: 1|0000110 1|0001101 0|0100000 = 0x86 0x8D 0x20.
This encoder/decoder will correctly handle any 32-bit integer, but for negative numbers, and positive numbers with more than 28 significant bits, encoding requires 5 bytes; this is not an efficient encoding scheme for large positive numbers or any negative number.

Compatibility:
This class has been used in products that have shipped to customers, and is needed to decode legacy data. Do not modify this class in ways that will break compatibility.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class Vint8.Position
Because Java lacks call-by-reference, this class boxes the decoding position, which is initially set by the caller, and returned after decoding, incremented by the number of bytes processed.
Field Summary
static int MAXIMUM_BYTES_NEEDED
The maximum number of bytes needed to encode a number using Vint8.
Method Summary
static int | bytesNeeded(int number) Returns the number of bytes needed to encode number.
static int | decode(byte[] bytes, Vint8.Position pos) Decodes a 32-bit integer from bytes, beginning at offset pos.pos.
static int | decode(InputStream in) Decodes a 32-bit integer from bytes read from in.
static int | encode(int number, byte[] dest, int start) Encodes number into dest, starting at offset start from the beginning of the array.
static void | encode(int number, OutputStream out) Encodes number to out.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

MAXIMUM_BYTES_NEEDED

public static final int MAXIMUM_BYTES_NEEDED
The maximum number of bytes needed to encode a number using Vint8.

See Also:
Constant Field Values
Method Detail

bytesNeeded

public static int bytesNeeded(int number)
Returns the number of bytes needed to encode number.

Parameters:
number - The number whose encoded length is needed.
Returns:
The number of bytes needed to encode number.

encode

public static void encode(int number,
                          OutputStream out)
                   throws IOException
Encodes number to out.

Parameters:
number - The value to be written in encoded form, to out.
out - The output stream receiving the encoded bytes.
Throws:
IOException - If there is a problem writing to out.

encode

public static int encode(int number,
                         byte[] dest,
                         int start)
Encodes number into dest, starting at offset start from the beginning of the array. This method assumes dest is large enough to hold the required number of bytes.

Parameters:
number - The number to be encoded.
dest - The destination array.
start - The starting offset in the array.
Returns:
The number of bytes used in the array.

decode

public static int decode(byte[] bytes,
                         Vint8.Position pos)
Decodes a 32-bit integer from bytes, beginning at offset pos.pos. The decoded value is returned, and pos.pos is incremented by the number of bytes processed.

Parameters:
bytes - The byte array containing an encoded value.
pos - On entry, the starting position in the array; on return, one greater than the position of the last byte decoded in the call.
Returns:
The decoded value.

decode

public static int decode(InputStream in)
                  throws IOException
Decodes a 32-bit integer from bytes read from in. Bytes are read, one at a time, from in, and it is assumed they represent a 32-bit integer encoded using this class's encoding scheme. The decoded value is returned.

Parameters:
in - The input stream containing the encoded bytes.
Returns:
The decoded value.
Throws:
EOFException - If the stream ends before a value has been decoded.
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Vint8.Position

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class Vint8.Position

java.lang.Object
    extended by  org.apache.lucene.util.Vint8.Position
Enclosing class:
Vint8
public static class Vint8.Position
extends Object

Because Java lacks call-by-reference, this class boxes the decoding position, which is initially set by the caller, and returned after decoding, incremented by the number of bytes processed.

Field Summary
 int pos
The value passed by reference.
Constructor Summary
Vint8.Position()
Creates a position value set to zero.
Vint8.Position(int initialPosition)
Creates a position set to initialPosition.
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

pos

public int pos
The value passed by reference.

Constructor Detail

Vint8.Position

public Vint8.Position()
Creates a position value set to zero.

Vint8.Position

public Vint8.Position(int initialPosition)
Creates a position set to initialPosition.

Parameters:
initialPosition - The starting decoding position in the source buffer.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VirtualMethod

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class VirtualMethod<C>

java.lang.Object
    extended by  org.apache.lucene.util.VirtualMethod<C>

public final class VirtualMethod<C>
extends Object

A utility for keeping backwards compatibility on previously abstract methods (or similar replacements).

Before the replacement method can be made abstract, the old method must kept deprecated. If somebody still overrides the deprecated method in a non-final class, you must keep track, of this and maybe delegate to the old method in the subclass. The cost of reflection is minimized by the following usage of this class:

Define static final fields in the base class (BaseClass), where the old and new method are declared:

  static final VirtualMethod<BaseClass> newMethod =
   new VirtualMethod<BaseClass>(BaseClass.class, "newName", parameters...);
  static final VirtualMethod<BaseClass> oldMethod =
   new VirtualMethod<BaseClass>(BaseClass.class, "oldName", parameters...);

This enforces the singleton status of these objects, as the maintenance of the cache would be too costly else. If you try to create a second instance of for the same method/baseClass combination, an exception is thrown.

To detect if e.g. the old method was overridden by a more far subclass on the inheritance path to the current instance's class, use a non-static field:

  final boolean isDeprecatedMethodOverridden =
   oldMethod.getImplementationDistance(this.getClass()) > newMethod.getImplementationDistance(this.getClass());

  // alternatively (more readable):
  final boolean isDeprecatedMethodOverridden =
   VirtualMethod.compareImplementationDistance(this.getClass(), oldMethod, newMethod) > 0

getImplementationDistance(java.lang.Class) returns the distance of the subclass that overrides this method. The one with the larger distance should be used preferable. This way also more complicated method rename scenarios can be handled (think of 2.9 TokenStream deprecations).

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Constructor Summary
VirtualMethod(Class<C> baseClass, String method, Class<?>... parameters)
Creates a new instance for the given baseClass and method declaration.
Method Summary
static
<C> int
compareImplementationDistance(Class<? extends C> clazz, VirtualMethod<C> m1, VirtualMethod<C> m2)
Utility method that compares the implementation/override distance of two methods.
 int getImplementationDistance(Class<? extends C> subclazz)
Returns the distance from the baseClass in which this method is overridden/implemented in the inheritance path between baseClass and the given subclass subclazz.
 boolean isOverriddenAsOf(Class<? extends C> subclazz)
Returns, if this method is overridden/implemented in the inheritance path between baseClass and the given subclass subclazz.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

VirtualMethod

public VirtualMethod(Class<C> baseClass,
                     String method,
                     Class<?>... parameters)
Creates a new instance for the given baseClass and method declaration.

Throws:
UnsupportedOperationException - if you create a second instance of the same baseClass and method declaration combination. This enforces the singleton status.
IllegalArgumentException - if baseClass does not declare the given method.
Method Detail

getImplementationDistance

public int getImplementationDistance(Class<? extends C> subclazz)
Returns the distance from the baseClass in which this method is overridden/implemented in the inheritance path between baseClass and the given subclass subclazz.

Returns:
0 iff not overridden, else the distance to the base class

isOverriddenAsOf

public boolean isOverriddenAsOf(Class<? extends C> subclazz)
Returns, if this method is overridden/implemented in the inheritance path between baseClass and the given subclass subclazz.

You can use this method to detect if a method that should normally be final was overridden by the given instance's class.

Returns:
false iff not overridden

compareImplementationDistance

public static <C> int compareImplementationDistance(Class<? extends C> clazz,
                                                    VirtualMethod<C> m1,
                                                    VirtualMethod<C> m2)
Utility method that compares the implementation/override distance of two methods.

Returns:
  • > 1, iff m1 is overridden/implemented in a subclass of the class overriding/declaring m2
  • < 1, iff m2 is overridden in a subclass of the class overriding/declaring m1
  • 0, iff both methods are overridden in the same class (or are not overridden at all)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


WeakIdentityMap

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util
Class WeakIdentityMap<K,V>

java.lang.Object
    extended by  org.apache.lucene.util.WeakIdentityMap<K,V>

public final class WeakIdentityMap<K,V>
extends Object

Implements a combination of WeakHashMap and IdentityHashMap. Useful for caches that need to key off of a == comparison instead of a .equals.

This class is not a general-purpose Map implementation! It intentionally violates Map's general contract, which mandates the use of the equals method when comparing objects. This class is designed for use only in the rare cases wherein reference-equality semantics are required.

This implementation was forked from Apache CXF but modified to not implement the Map interface and without any set views on it, as those are error-prone and inefficient, if not implemented carefully. The map only contains Iterator implementations on the values and not-GCed keys. Lucene's implementation also supports null keys, but those are never weak!

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Method Summary
 void clear()
 boolean containsKey(Object key)
 V get(Object key)
 boolean isEmpty()
 Iterator<K> keyIterator()
Returns an iterator over all weak keys of this map.
static
<K,V> WeakIdentityMap<K,V>
newConcurrentHashMap()
Creates a new WeakIdentityMap based on a ConcurrentHashMap.
static
<K,V> WeakIdentityMap<K,V>
newHashMap()
Creates a new WeakIdentityMap based on a non-synchronized HashMap.
 V put(K key, V value)
 V remove(Object key)
 int size()
 Iterator<V> valueIterator()
Returns an iterator over all values of this map.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

newHashMap

public static final <K,V> WeakIdentityMap<K,V> newHashMap()
Creates a new WeakIdentityMap based on a non-synchronized HashMap.

newConcurrentHashMap

public static final <K,V> WeakIdentityMap<K,V> newConcurrentHashMap()
Creates a new WeakIdentityMap based on a ConcurrentHashMap.

clear

public void clear()

containsKey

public boolean containsKey(Object key)

get

public V get(Object key)

put

public V put(K key,
             V value)

isEmpty

public boolean isEmpty()

remove

public V remove(Object key)

size

public int size()

keyIterator

public Iterator<K> keyIterator()
Returns an iterator over all weak keys of this map. Keys already garbage collected will not be returned. This Iterator does not support removals.

valueIterator

public Iterator<V> valueIterator()
Returns an iterator over all values of this map. This iterator may return values whose key is already garbage collected while iterator is consumed.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.util._TestUtil

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util._TestUtil

No usage of org.apache.lucene.util._TestUtil

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.ArrayUtil

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.ArrayUtil

No usage of org.apache.lucene.util.ArrayUtil

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.util.Attribute

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.util.Attribute

Packages that use Attribute
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.icu.tokenattributes | Additional ICU-specific Attributes for text analysis.
org.apache.lucene.analysis.ja.tokenattributes | Additional Kuromoji-specific Attributes for text analysis.
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.
org.apache.lucene.facet.index.attributes | Category attributes and their properties for indexing
org.apache.lucene.queryParser.core.config | Contains the base classes used to configure the query processing
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration
org.apache.lucene.util | Some utility classes.

Uses of Attribute in org.apache.lucene.analysis

Subinterfaces of Attribute in org.apache.lucene.analysis
static interface BaseTokenStreamTestCase.CheckClearAttributesAttribute
Attribute that records if it was cleared or not.

Classes in org.apache.lucene.analysis that implement Attribute
static class | BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl Attribute that records if it was cleared or not.
class | Token A Token is an occurrence of a term from the text of a field.

Method parameters in org.apache.lucene.analysis with type arguments of type Attribute
 AttributeImpl Token.TokenAttributeFactory.createAttributeInstance(Class<? extends Attribute> attClass)

Uses of Attribute in org.apache.lucene.analysis.icu.tokenattributes

Subinterfaces of Attribute in org.apache.lucene.analysis.icu.tokenattributes
 interface ScriptAttribute
This attribute stores the UTR #24 script value for a token of text.

Classes in org.apache.lucene.analysis.icu.tokenattributes that implement Attribute
 class ScriptAttributeImpl
Implementation of ScriptAttribute that stores the script as an integer.

Uses of Attribute in org.apache.lucene.analysis.ja.tokenattributes

Subinterfaces of Attribute in org.apache.lucene.analysis.ja.tokenattributes
interface | BaseFormAttribute Attribute for Token.getBaseForm().
interface | InflectionAttribute Attribute for Kuromoji inflection data.
interface | PartOfSpeechAttribute Attribute for Token.getPartOfSpeech().
interface | ReadingAttribute Attribute for Kuromoji reading data

Classes in org.apache.lucene.analysis.ja.tokenattributes that implement Attribute
class | BaseFormAttributeImpl Attribute for Token.getBaseForm().
class | InflectionAttributeImpl Attribute for Kuromoji inflection data.
class | PartOfSpeechAttributeImpl Attribute for Token.getPartOfSpeech().
class | ReadingAttributeImpl Attribute for Kuromoji reading data

Uses of Attribute in org.apache.lucene.analysis.tokenattributes

Subinterfaces of Attribute in org.apache.lucene.analysis.tokenattributes
interface | CharTermAttribute The term text of a Token.
interface | FlagsAttribute This attribute can be used to pass different flags down the Tokenizer chain, eg from one TokenFilter to another one.
interface | KeywordAttribute This attribute can be used to mark a token as a keyword.
interface | OffsetAttribute The start and end character offset of a Token.
interface | PayloadAttribute The payload of a Token.
interface | PositionIncrementAttribute The positionIncrement determines the position of this token relative to the previous Token in a TokenStream, used in phrase searching.
interface | PositionLengthAttribute The positionLength determines how many positions this token spans.
interface | TermAttribute Deprecated. Use CharTermAttribute instead.
interface | TypeAttribute A Token's lexical type.

Classes in org.apache.lucene.analysis.tokenattributes that implement Attribute
class | CharTermAttributeImpl The term text of a Token.
class | FlagsAttributeImpl This attribute can be used to pass different flags down the tokenizer chain, eg from one TokenFilter to another one.
class | KeywordAttributeImpl This attribute can be used to mark a token as a keyword.
class | OffsetAttributeImpl The start and end character offset of a Token.
class | PayloadAttributeImpl The payload of a Token.
class | PositionIncrementAttributeImpl The positionIncrement determines the position of this token relative to the previous Token in a TokenStream, used in phrase searching.
class | PositionLengthAttributeImpl See PositionLengthAttribute.
class | TermAttributeImpl Deprecated. This class is not used anymore. The backwards layer in AttributeFactory uses the replacement implementation.
class | TypeAttributeImpl A Token's lexical type.

Uses of Attribute in org.apache.lucene.facet.index.attributes

Subinterfaces of Attribute in org.apache.lucene.facet.index.attributes
 interface CategoryAttribute
An attribute which contains for a certain category the CategoryPath and additional properties.

Classes in org.apache.lucene.facet.index.attributes that implement Attribute
 class CategoryAttributeImpl
An implementation of CategoryAttribute.

Uses of Attribute in org.apache.lucene.queryParser.core.config

Methods in org.apache.lucene.queryParser.core.config with type parameters of type Attribute
<A extends Attribute>
A
AbstractQueryConfig.addAttribute(Class<A> attClass)

Uses of Attribute in org.apache.lucene.queryParser.standard.config

Subinterfaces of Attribute in org.apache.lucene.queryParser.standard.config
interface | AllowLeadingWildcardAttribute Deprecated.
interface | AnalyzerAttribute Deprecated.
interface | BoostAttribute Deprecated.
interface | DateResolutionAttribute Deprecated.
interface | DefaultOperatorAttribute Deprecated.
interface | DefaultPhraseSlopAttribute Deprecated.
interface | FieldBoostMapAttribute Deprecated.
interface | FieldDateResolutionMapAttribute Deprecated.
interface | FuzzyAttribute Deprecated.
interface | LocaleAttribute Deprecated.
interface | LowercaseExpandedTermsAttribute Deprecated.
interface | MultiFieldAttribute Deprecated.
interface | MultiTermRewriteMethodAttribute Deprecated.
interface | PositionIncrementsAttribute Deprecated.
interface | RangeCollatorAttribute Deprecated.

Classes in org.apache.lucene.queryParser.standard.config that implement Attribute
class | AllowLeadingWildcardAttributeImpl Deprecated.
class | AnalyzerAttributeImpl Deprecated.
class | BoostAttributeImpl Deprecated.
class | DateResolutionAttributeImpl Deprecated.
class | DefaultOperatorAttributeImpl Deprecated.
class | DefaultPhraseSlopAttributeImpl Deprecated.
class | FieldBoostMapAttributeImpl Deprecated.
class | FieldDateResolutionMapAttributeImpl Deprecated.
class | FuzzyAttributeImpl Deprecated.
class | LocaleAttributeImpl Deprecated.
class | LowercaseExpandedTermsAttributeImpl Deprecated.
class | MultiFieldAttributeImpl Deprecated.
class | MultiTermRewriteMethodAttributeImpl Deprecated.
class | PositionIncrementsAttributeImpl Deprecated.
class | RangeCollatorAttributeImpl Deprecated.

Uses of Attribute in org.apache.lucene.util

Classes in org.apache.lucene.util that implement Attribute
 class AttributeImpl
Base class for Attributes that can be added to a AttributeSource.

Methods in org.apache.lucene.util with type parameters of type Attribute
<A extends Attribute>
A
AttributeSource.addAttribute(Class<A> attClass)
The caller must pass in a Class<? extends Attribute> value.
<A extends Attribute>
A
AttributeSource.getAttribute(Class<A> attClass)
The caller must pass in a Class<? extends Attribute> value.

Methods in org.apache.lucene.util that return types with arguments of type Attribute
 Iterator<Class<? extends Attribute>> AttributeSource.getAttributeClassesIterator()
Returns a new iterator that iterates the attribute classes in the same order they were added in.

Method parameters in org.apache.lucene.util with type arguments of type Attribute
abstract AttributeImpl | AttributeSource.AttributeFactory.createAttributeInstance(Class<? extends Attribute> attClass) returns an AttributeImpl for the supplied Attribute interface class.
boolean | AttributeSource.hasAttribute(Class<? extends Attribute> attClass) The caller must pass in a Class<? extends Attribute> value.
void | AttributeReflector.reflect(Class<? extends Attribute> attClass, String key, Object value) This method gets called for every property in an AttributeImpl/AttributeSource passing the class name of the Attribute, a key and the actual value.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.AttributeImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.AttributeImpl

Packages that use AttributeImpl
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.icu.tokenattributes | Additional ICU-specific Attributes for text analysis.
org.apache.lucene.analysis.ja.tokenattributes | Additional Kuromoji-specific Attributes for text analysis.
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.
org.apache.lucene.facet.index.attributes | Category attributes and their properties for indexing
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration
org.apache.lucene.util | Some utility classes.

Uses of AttributeImpl in org.apache.lucene.analysis

Subclasses of AttributeImpl in org.apache.lucene.analysis
static class | BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl Attribute that records if it was cleared or not.
class | Token A Token is an occurrence of a term from the text of a field.

Methods in org.apache.lucene.analysis that return AttributeImpl
 AttributeImpl Token.TokenAttributeFactory.createAttributeInstance(Class<? extends Attribute> attClass)

Methods in org.apache.lucene.analysis with parameters of type AttributeImpl
void | BaseTokenStreamTestCase.CheckClearAttributesAttributeImpl.copyTo(AttributeImpl target)
void | Token.copyTo(AttributeImpl target)

Uses of AttributeImpl in org.apache.lucene.analysis.icu.tokenattributes

Subclasses of AttributeImpl in org.apache.lucene.analysis.icu.tokenattributes
 class ScriptAttributeImpl
Implementation of ScriptAttribute that stores the script as an integer.

Methods in org.apache.lucene.analysis.icu.tokenattributes with parameters of type AttributeImpl
 void ScriptAttributeImpl.copyTo(AttributeImpl target)

Uses of AttributeImpl in org.apache.lucene.analysis.ja.tokenattributes

Subclasses of AttributeImpl in org.apache.lucene.analysis.ja.tokenattributes
class | BaseFormAttributeImpl Attribute for Token.getBaseForm().
class | InflectionAttributeImpl Attribute for Kuromoji inflection data.
class | PartOfSpeechAttributeImpl Attribute for Token.getPartOfSpeech().
class | ReadingAttributeImpl Attribute for Kuromoji reading data

Methods in org.apache.lucene.analysis.ja.tokenattributes with parameters of type AttributeImpl
void | InflectionAttributeImpl.copyTo(AttributeImpl target)
void | PartOfSpeechAttributeImpl.copyTo(AttributeImpl target)
void | BaseFormAttributeImpl.copyTo(AttributeImpl target)
void | ReadingAttributeImpl.copyTo(AttributeImpl target)

Uses of AttributeImpl in org.apache.lucene.analysis.tokenattributes

Subclasses of AttributeImpl in org.apache.lucene.analysis.tokenattributes
class | CharTermAttributeImpl The term text of a Token.
class | FlagsAttributeImpl This attribute can be used to pass different flags down the tokenizer chain, eg from one TokenFilter to another one.
class | KeywordAttributeImpl This attribute can be used to mark a token as a keyword.
class | OffsetAttributeImpl The start and end character offset of a Token.
class | PayloadAttributeImpl The payload of a Token.
class | PositionIncrementAttributeImpl The positionIncrement determines the position of this token relative to the previous Token in a TokenStream, used in phrase searching.
class | PositionLengthAttributeImpl See PositionLengthAttribute.
class | TermAttributeImpl Deprecated. This class is not used anymore. The backwards layer in AttributeFactory uses the replacement implementation.
class | TypeAttributeImpl A Token's lexical type.

Methods in org.apache.lucene.analysis.tokenattributes with parameters of type AttributeImpl
void | KeywordAttributeImpl.copyTo(AttributeImpl target)
void | OffsetAttributeImpl.copyTo(AttributeImpl target)
void | TypeAttributeImpl.copyTo(AttributeImpl target)
void | FlagsAttributeImpl.copyTo(AttributeImpl target)
void | CharTermAttributeImpl.copyTo(AttributeImpl target)
void | PayloadAttributeImpl.copyTo(AttributeImpl target)
void | PositionLengthAttributeImpl.copyTo(AttributeImpl target)
void | PositionIncrementAttributeImpl.copyTo(AttributeImpl target)

Uses of AttributeImpl in org.apache.lucene.facet.index.attributes

Subclasses of AttributeImpl in org.apache.lucene.facet.index.attributes
 class CategoryAttributeImpl
An implementation of CategoryAttribute.

Methods in org.apache.lucene.facet.index.attributes with parameters of type AttributeImpl
 void CategoryAttributeImpl.copyTo(AttributeImpl target)

Uses of AttributeImpl in org.apache.lucene.queryParser.standard.config

Subclasses of AttributeImpl in org.apache.lucene.queryParser.standard.config
class | AllowLeadingWildcardAttributeImpl Deprecated.
class | AnalyzerAttributeImpl Deprecated.
class | BoostAttributeImpl Deprecated.
class | DateResolutionAttributeImpl Deprecated.
class | DefaultOperatorAttributeImpl Deprecated.
class | DefaultPhraseSlopAttributeImpl Deprecated.
class | FieldBoostMapAttributeImpl Deprecated.
class | FieldDateResolutionMapAttributeImpl Deprecated.
class | FuzzyAttributeImpl Deprecated.
class | LocaleAttributeImpl Deprecated.
class | LowercaseExpandedTermsAttributeImpl Deprecated.
class | MultiFieldAttributeImpl Deprecated.
class | MultiTermRewriteMethodAttributeImpl Deprecated.
class | PositionIncrementsAttributeImpl Deprecated.
class | RangeCollatorAttributeImpl Deprecated.

Methods in org.apache.lucene.queryParser.standard.config with parameters of type AttributeImpl
void | DefaultOperatorAttributeImpl.copyTo(AttributeImpl target) Deprecated.
void | AnalyzerAttributeImpl.copyTo(AttributeImpl target) Deprecated.
void | FieldBoostMapAttributeImpl.copyTo(AttributeImpl target) Deprecated.
void | PositionIncrementsAttributeImpl.copyTo(AttributeImpl target) Deprecated.
void | BoostAttributeImpl.copyTo(AttributeImpl target) Deprecated.
void | FuzzyAttributeImpl.copyTo(AttributeImpl target) Deprecated.
void | AllowLeadingWildcardAttributeImpl.copyTo(AttributeImpl target) Deprecated.
void | MultiFieldAttributeImpl.copyTo(AttributeImpl target) Deprecated.
void | LocaleAttributeImpl.copyTo(AttributeImpl target) Deprecated.
void | DateResolutionAttributeImpl.copyTo(AttributeImpl target) Deprecated.
void | DefaultPhraseSlopAttributeImpl.copyTo(AttributeImpl target) Deprecated.
void | LowercaseExpandedTermsAttributeImpl.copyTo(AttributeImpl target) Deprecated.
void | FieldDateResolutionMapAttributeImpl.copyTo(AttributeImpl target) Deprecated.
void | RangeCollatorAttributeImpl.copyTo(AttributeImpl target) Deprecated.
void | MultiTermRewriteMethodAttributeImpl.copyTo(AttributeImpl target) Deprecated.

Uses of AttributeImpl in org.apache.lucene.util

Methods in org.apache.lucene.util that return AttributeImpl
abstract  AttributeImpl AttributeSource.AttributeFactory.createAttributeInstance(Class<? extends Attribute> attClass)
returns an AttributeImpl for the supplied Attribute interface class.

Methods in org.apache.lucene.util that return types with arguments of type AttributeImpl
 Iterator<AttributeImpl> AttributeSource.getAttributeImplsIterator()
Returns a new iterator that iterates all unique Attribute implementations.

Methods in org.apache.lucene.util with parameters of type AttributeImpl
 void AttributeSource.addAttributeImpl(AttributeImpl att)
Expert: Adds a custom AttributeImpl instance with one or more Attribute interfaces.
static
<T> void
_TestUtil.assertAttributeReflection(AttributeImpl att, Map<String,T> reflectedValues)
Checks some basic behaviour of an AttributeImpl
abstract  void AttributeImpl.copyTo(AttributeImpl target)
Copies the values from this Attribute into the passed-in target attribute.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.util.AttributeReflector

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.util.AttributeReflector

Packages that use AttributeReflector
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.icu.tokenattributes | Additional ICU-specific Attributes for text analysis.
org.apache.lucene.analysis.ja.tokenattributes | Additional Kuromoji-specific Attributes for text analysis.
org.apache.lucene.analysis.tokenattributes | Useful Attributes for text analysis.
org.apache.lucene.util | Some utility classes.

Uses of AttributeReflector in org.apache.lucene.analysis

Methods in org.apache.lucene.analysis with parameters of type AttributeReflector
 void Token.reflectWith(AttributeReflector reflector)

Uses of AttributeReflector in org.apache.lucene.analysis.icu.tokenattributes

Methods in org.apache.lucene.analysis.icu.tokenattributes with parameters of type AttributeReflector
 void ScriptAttributeImpl.reflectWith(AttributeReflector reflector)

Uses of AttributeReflector in org.apache.lucene.analysis.ja.tokenattributes

Methods in org.apache.lucene.analysis.ja.tokenattributes with parameters of type AttributeReflector
void | InflectionAttributeImpl.reflectWith(AttributeReflector reflector)
void | PartOfSpeechAttributeImpl.reflectWith(AttributeReflector reflector)
void | BaseFormAttributeImpl.reflectWith(AttributeReflector reflector)
void | ReadingAttributeImpl.reflectWith(AttributeReflector reflector)

Uses of AttributeReflector in org.apache.lucene.analysis.tokenattributes

Methods in org.apache.lucene.analysis.tokenattributes with parameters of type AttributeReflector
 void CharTermAttributeImpl.reflectWith(AttributeReflector reflector)

Uses of AttributeReflector in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type AttributeReflector
void | AttributeImpl.reflectWith(AttributeReflector reflector) This method is for introspection of attributes, it should simply add the key/values this attribute holds to the given AttributeReflector.
void | AttributeSource.reflectWith(AttributeReflector reflector) This method is for introspection of attributes, it should simply add the key/values this AttributeSource holds to the given AttributeReflector.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.AttributeSource.AttributeFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.AttributeSource.AttributeFactory

Packages that use AttributeSource.AttributeFactory
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ar | Analyzer for Arabic.
org.apache.lucene.analysis.cjk | Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).
org.apache.lucene.analysis.cn | Analyzer for Chinese, which indexes unigrams (individual chinese characters).
org.apache.lucene.analysis.cn.smart | Analyzer for Simplified Chinese, which indexes words.
org.apache.lucene.analysis.in | Analysis components for Indian languages.
org.apache.lucene.analysis.ngram | Character n-gram tokenizers and filters.
org.apache.lucene.analysis.ru | Analyzer for Russian.
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.wikipedia | Tokenizer that is aware of Wikipedia syntax.
org.apache.lucene.util | Some utility classes.

Uses of AttributeSource.AttributeFactory in org.apache.lucene.analysis

Subclasses of AttributeSource.AttributeFactory in org.apache.lucene.analysis
static class Token.TokenAttributeFactory
Expert: Creates a TokenAttributeFactory returning Token as instance for the basic attributes and for all other attributes calls the given delegate factory.

Fields in org.apache.lucene.analysis declared as AttributeSource.AttributeFactory
static AttributeSource.AttributeFactory Token.TOKEN_ATTRIBUTE_FACTORY
Convenience factory that returns Token as implementation for the basic attributes and return the default impl (with "Impl" appended) for all other attributes.

Constructors in org.apache.lucene.analysis with parameters of type AttributeSource.AttributeFactory
CharTokenizer(AttributeSource.AttributeFactory factory, Reader input)
Deprecated. use CharTokenizer.CharTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
CharTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader input)
Creates a new CharTokenizer instance
KeywordTokenizer(AttributeSource.AttributeFactory factory, Reader input, int bufferSize)
LetterTokenizer(AttributeSource.AttributeFactory factory, Reader in)
Deprecated. use LetterTokenizer.LetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
LetterTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader in)
Construct a new LetterTokenizer using a given AttributeSource.AttributeFactory.
LowerCaseTokenizer(AttributeSource.AttributeFactory factory, Reader in)
Deprecated. use LowerCaseTokenizer.LowerCaseTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
LowerCaseTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader in)
Construct a new LowerCaseTokenizer using a given AttributeSource.AttributeFactory.
MockTokenizer(AttributeSource.AttributeFactory factory, Reader input, int pattern, boolean lowerCase, int maxTokenLength)
NumericTokenStream(AttributeSource.AttributeFactory factory, int precisionStep)
Expert: Creates a token stream for numeric values with the specified precisionStep using the given AttributeSource.AttributeFactory.
Token.TokenAttributeFactory(AttributeSource.AttributeFactory delegate)
Expert: Creates an AttributeFactory returning Token as instance for the basic attributes and for all other attributes calls the given delegate factory.
Tokenizer(AttributeSource.AttributeFactory factory)
Deprecated. use Tokenizer.Tokenizer(AttributeSource.AttributeFactory, Reader) instead.
Tokenizer(AttributeSource.AttributeFactory factory, Reader input)
Construct a token stream processing the given input using the given AttributeFactory.
TokenStream(AttributeSource.AttributeFactory factory)
A TokenStream using the supplied AttributeFactory for creating new Attribute instances.
WhitespaceTokenizer(AttributeSource.AttributeFactory factory, Reader in)
Deprecated. use WhitespaceTokenizer.WhitespaceTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
WhitespaceTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader in)
Construct a new WhitespaceTokenizer using a given AttributeSource.AttributeFactory.

Uses of AttributeSource.AttributeFactory in org.apache.lucene.analysis.ar

Constructors in org.apache.lucene.analysis.ar with parameters of type AttributeSource.AttributeFactory
ArabicLetterTokenizer(AttributeSource.AttributeFactory factory, Reader in)
Deprecated. use ArabicLetterTokenizer.ArabicLetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
ArabicLetterTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader in)
Deprecated. Construct a new ArabicLetterTokenizer using a given AttributeSource.AttributeFactory.

Uses of AttributeSource.AttributeFactory in org.apache.lucene.analysis.cjk

Constructors in org.apache.lucene.analysis.cjk with parameters of type AttributeSource.AttributeFactory
CJKTokenizer(AttributeSource.AttributeFactory factory, Reader in)
Deprecated.

Uses of AttributeSource.AttributeFactory in org.apache.lucene.analysis.cn

Constructors in org.apache.lucene.analysis.cn with parameters of type AttributeSource.AttributeFactory
ChineseTokenizer(AttributeSource.AttributeFactory factory, Reader in)
Deprecated.

Uses of AttributeSource.AttributeFactory in org.apache.lucene.analysis.cn.smart

Constructors in org.apache.lucene.analysis.cn.smart with parameters of type AttributeSource.AttributeFactory
SentenceTokenizer(AttributeSource.AttributeFactory factory, Reader reader)

Uses of AttributeSource.AttributeFactory in org.apache.lucene.analysis.in

Constructors in org.apache.lucene.analysis.in with parameters of type AttributeSource.AttributeFactory
IndicTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader input)
Deprecated.

Uses of AttributeSource.AttributeFactory in org.apache.lucene.analysis.ngram

Constructors in org.apache.lucene.analysis.ngram with parameters of type AttributeSource.AttributeFactory
EdgeNGramTokenizer(AttributeSource.AttributeFactory factory, Reader input, EdgeNGramTokenizer.Side side, int minGram, int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
EdgeNGramTokenizer(AttributeSource.AttributeFactory factory, Reader input, String sideLabel, int minGram, int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
NGramTokenizer(AttributeSource.AttributeFactory factory, Reader input, int minGram, int maxGram)
Creates NGramTokenizer with given min and max n-grams.

Uses of AttributeSource.AttributeFactory in org.apache.lucene.analysis.ru

Constructors in org.apache.lucene.analysis.ru with parameters of type AttributeSource.AttributeFactory
RussianLetterTokenizer(AttributeSource.AttributeFactory factory, Reader in)
Deprecated. use RussianLetterTokenizer.RussianLetterTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead. This will be removed in Lucene 4.0.
RussianLetterTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader in)
Deprecated. Construct a new RussianLetterTokenizer using a given AttributeSource.AttributeFactory.

Uses of AttributeSource.AttributeFactory in org.apache.lucene.analysis.standard

Constructors in org.apache.lucene.analysis.standard with parameters of type AttributeSource.AttributeFactory
ClassicTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader input)
Creates a new ClassicTokenizer with a given AttributeSource.AttributeFactory
StandardTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader input)
Creates a new StandardTokenizer with a given AttributeSource.AttributeFactory
UAX29URLEmailTokenizer(AttributeSource.AttributeFactory factory, Reader input)
Deprecated. use UAX29URLEmailTokenizer.UAX29URLEmailTokenizer(Version, AttributeSource.AttributeFactory, Reader) instead.
UAX29URLEmailTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader input)
Creates a new UAX29URLEmailTokenizer with a given AttributeSource.AttributeFactory

Uses of AttributeSource.AttributeFactory in org.apache.lucene.analysis.wikipedia

Constructors in org.apache.lucene.analysis.wikipedia with parameters of type AttributeSource.AttributeFactory
WikipediaTokenizer(AttributeSource.AttributeFactory factory, Reader input, int tokenOutput, Set<String> untokenizedTypes)
Creates a new instance of the WikipediaTokenizer.

Uses of AttributeSource.AttributeFactory in org.apache.lucene.util

Fields in org.apache.lucene.util declared as AttributeSource.AttributeFactory
static AttributeSource.AttributeFactory AttributeSource.AttributeFactory.DEFAULT_ATTRIBUTE_FACTORY
This is the default factory that creates AttributeImpls using the class name of the supplied Attribute interface class by appending Impl to it.

Methods in org.apache.lucene.util that return AttributeSource.AttributeFactory
 AttributeSource.AttributeFactory AttributeSource.getAttributeFactory()
returns the used AttributeFactory.

Constructors in org.apache.lucene.util with parameters of type AttributeSource.AttributeFactory
AttributeSource(AttributeSource.AttributeFactory factory)
An AttributeSource using the supplied AttributeSource.AttributeFactory for creating new Attribute instances.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.AttributeSource

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.AttributeSource

Packages that use AttributeSource
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ar | Analyzer for Arabic.
org.apache.lucene.analysis.bg | Analyzer for Bulgarian.
org.apache.lucene.analysis.br | Analyzer for Brazilian Portuguese.
org.apache.lucene.analysis.cjk | Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).
org.apache.lucene.analysis.cn | Analyzer for Chinese, which indexes unigrams (individual chinese characters).
org.apache.lucene.analysis.cn.smart | Analyzer for Simplified Chinese, which indexes words.
org.apache.lucene.analysis.compound | A filter that decomposes compound words you find in many Germanic languages into the word parts.
org.apache.lucene.analysis.cz | Analyzer for Czech.
org.apache.lucene.analysis.de | Analyzer for German.
org.apache.lucene.analysis.el | Analyzer for Greek.
org.apache.lucene.analysis.en | Analyzer for English.
org.apache.lucene.analysis.es | Analyzer for Spanish.
org.apache.lucene.analysis.fa | Analyzer for Persian.
org.apache.lucene.analysis.fi | Analyzer for Finnish.
org.apache.lucene.analysis.fr | Analyzer for French.
org.apache.lucene.analysis.ga | Analysis for Irish.
org.apache.lucene.analysis.gl | Analyzer for Galician.
org.apache.lucene.analysis.hi | Analyzer for Hindi.
org.apache.lucene.analysis.hu | Analyzer for Hungarian.
org.apache.lucene.analysis.hunspell | Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.
org.apache.lucene.analysis.icu | Analysis components based on ICU
org.apache.lucene.analysis.icu.segmentation | Tokenizer that breaks text into words with the Unicode Text Segmentation algorithm.
org.apache.lucene.analysis.id | Analyzer for Indonesian.
org.apache.lucene.analysis.in | Analysis components for Indian languages.
org.apache.lucene.analysis.it | Analyzer for Italian.
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.lv | Analyzer for Latvian.
org.apache.lucene.analysis.miscellaneous | Miscellaneous TokenStreams
org.apache.lucene.analysis.ngram | Character n-gram tokenizers and filters.
org.apache.lucene.analysis.nl | Analyzer for Dutch.
org.apache.lucene.analysis.no | Analyzer for Norwegian.
org.apache.lucene.analysis.path | Analysis components for path-like strings such as filenames.
org.apache.lucene.analysis.payloads | Provides various convenience classes for creating payloads on Tokens.
org.apache.lucene.analysis.phonetic | Analysis components for phonetic search.
org.apache.lucene.analysis.position | Filter for assigning position increments.
org.apache.lucene.analysis.pt | Analyzer for Portuguese.
org.apache.lucene.analysis.reverse | Filter to reverse token text.
org.apache.lucene.analysis.ru | Analyzer for Russian.
org.apache.lucene.analysis.shingle | Word n-gram filters
org.apache.lucene.analysis.sinks | Implementations of the SinkTokenizer that might be useful.
org.apache.lucene.analysis.snowball | TokenFilter and Analyzer implementations that use Snowball stemmers.
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.stempel | Stempel: Algorithmic Stemmer
org.apache.lucene.analysis.sv | Analyzer for Swedish.
org.apache.lucene.analysis.synonym | Analysis components for Synonyms.
org.apache.lucene.analysis.th | Analyzer for Thai.
org.apache.lucene.analysis.tr | Analyzer for Turkish.
org.apache.lucene.analysis.wikipedia | Tokenizer that is aware of Wikipedia syntax.
org.apache.lucene.collation | CollationKeyFilter converts each token into its binary CollationKey using the provided Collator, and then encode the CollationKey as a String using IndexableBinaryStringTools, to allow it to be stored as an index term.
org.apache.lucene.facet.enhancements | Enhanced category features
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.index.streaming | Expert: attributes streaming definition for indexing facets
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.core.config | Contains the base classes used to configure the query processing
org.apache.lucene.queryParser.standard.config | Standard Lucene Query Configuration
org.apache.lucene.search.highlight | The highlight package contains classes to provide "keyword in context" features typically used to highlight search terms in the text of results pages.
org.apache.lucene.util | Some utility classes.

Uses of AttributeSource in org.apache.lucene.analysis

Subclasses of AttributeSource in org.apache.lucene.analysis
class | ASCIIFoldingFilter This class converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if one exists.
class | CachingTokenFilter This class can be used if the token attributes of a TokenStream are intended to be consumed more than once.
class | CannedTokenStream TokenStream from a canned list of Tokens.
class | CharTokenizer An abstract base class for simple, character-oriented tokenizers.
class | EmptyTokenizer Emits no tokens
class | FilteringTokenFilter Abstract base class for TokenFilters that may remove tokens.
class | ISOLatin1AccentFilter Deprecated. If you build a new index, use ASCIIFoldingFilter which covers a superset of Latin 1. This class is included for use with existing indexes and will be removed in a future release (possibly Lucene 4.0).
class | KeywordMarkerFilter Marks terms as keywords via the KeywordAttribute.
class | KeywordTokenizer Emits the entire input as a single token.
class | LengthFilter Removes words that are too long or too short from the stream.
class | LetterTokenizer A LetterTokenizer is a tokenizer that divides text at non-letters.
class | LimitTokenCountFilter This TokenFilter limits the number of tokens while indexing.
class | LookaheadTokenFilter<T extends LookaheadTokenFilter.Position> An abstract TokenFilter to make it easier to build graph token filters requiring some lookahead.
class | LowerCaseFilter Normalizes token text to lower case.
class | LowerCaseTokenizer LowerCaseTokenizer performs the function of LetterTokenizer and LowerCaseFilter together.
class | MockFixedLengthPayloadFilter TokenFilter that adds random fixed-length payloads.
class | MockGraphTokenFilter Randomly inserts overlapped (posInc=0) tokens with posLength sometimes > 1.
class | MockHoleInjectingTokenFilter
class | MockRandomLookaheadTokenFilter Uses LookaheadTokenFilter to randomly peek at future tokens.
class | MockTokenizer Tokenizer for testing.
class | MockVariableLengthPayloadFilter TokenFilter that adds random variable-length payloads.
class | NumericTokenStream Expert: This class provides a TokenStream for indexing numeric values that can be used by NumericRangeQuery or NumericRangeFilter.
class | PorterStemFilter Transforms the token stream as per the Porter stemming algorithm.
class | StopFilter Removes stop words from a token stream.
class | TeeSinkTokenFilter This TokenFilter provides the ability to set aside attribute states that have already been analyzed.
static class | TeeSinkTokenFilter.SinkTokenStream TokenStream output from a tee with optional filtering.
class | TokenFilter A TokenFilter is a TokenStream whose input is another TokenStream.
class | Tokenizer A Tokenizer is a TokenStream whose input is a Reader.
class | TokenStream A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text.
class | TypeTokenFilter Removes tokens whose types appear in a set of blocked types from a token stream.
class | ValidatingTokenFilter A TokenFilter that checks consistency of the tokens (eg offsets are consistent with one another).
class | WhitespaceTokenizer A WhitespaceTokenizer is a tokenizer that divides text at whitespace.

Methods in org.apache.lucene.analysis with parameters of type AttributeSource
abstract  boolean TeeSinkTokenFilter.SinkFilter.accept(AttributeSource source)
Returns true, iff the current state of the passed-in AttributeSource shall be stored in the sink.

Constructors in org.apache.lucene.analysis with parameters of type AttributeSource
CharTokenizer(AttributeSource source, Reader input)
Deprecated. use CharTokenizer.CharTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
CharTokenizer(Version matchVersion, AttributeSource source, Reader input)
Creates a new CharTokenizer instance
KeywordTokenizer(AttributeSource source, Reader input, int bufferSize)
LetterTokenizer(AttributeSource source, Reader in)
Deprecated. use LetterTokenizer.LetterTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
LetterTokenizer(Version matchVersion, AttributeSource source, Reader in)
Construct a new LetterTokenizer using a given AttributeSource.
LowerCaseTokenizer(AttributeSource source, Reader in)
Deprecated. use LowerCaseTokenizer.LowerCaseTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
LowerCaseTokenizer(Version matchVersion, AttributeSource source, Reader in)
Construct a new LowerCaseTokenizer using a given AttributeSource.
NumericTokenStream(AttributeSource source, int precisionStep)
Expert: Creates a token stream for numeric values with the specified precisionStep using the given AttributeSource.
Tokenizer(AttributeSource source)
Deprecated. use Tokenizer.Tokenizer(AttributeSource, Reader) instead.
Tokenizer(AttributeSource source, Reader input)
Construct a token stream processing the given input using the given AttributeSource.
TokenStream(AttributeSource input)
A TokenStream that uses the same attributes as the supplied one.
WhitespaceTokenizer(AttributeSource source, Reader in)
Deprecated. use WhitespaceTokenizer.WhitespaceTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
WhitespaceTokenizer(Version matchVersion, AttributeSource source, Reader in)
Construct a new WhitespaceTokenizer using a given AttributeSource.

Uses of AttributeSource in org.apache.lucene.analysis.ar

Subclasses of AttributeSource in org.apache.lucene.analysis.ar
class | ArabicLetterTokenizer Deprecated. (3.1) Use StandardTokenizer instead.
class | ArabicNormalizationFilter A TokenFilter that applies ArabicNormalizer to normalize the orthography.
class | ArabicStemFilter A TokenFilter that applies ArabicStemmer to stem Arabic words..

Constructors in org.apache.lucene.analysis.ar with parameters of type AttributeSource
ArabicLetterTokenizer(AttributeSource source, Reader in)
Deprecated. use ArabicLetterTokenizer.ArabicLetterTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
ArabicLetterTokenizer(Version matchVersion, AttributeSource source, Reader in)
Deprecated. Construct a new ArabicLetterTokenizer using a given AttributeSource.

Uses of AttributeSource in org.apache.lucene.analysis.bg

Subclasses of AttributeSource in org.apache.lucene.analysis.bg
 class BulgarianStemFilter
A TokenFilter that applies BulgarianStemmer to stem Bulgarian words.

Uses of AttributeSource in org.apache.lucene.analysis.br

Subclasses of AttributeSource in org.apache.lucene.analysis.br
 class BrazilianStemFilter
A TokenFilter that applies BrazilianStemmer.

Uses of AttributeSource in org.apache.lucene.analysis.cjk

Subclasses of AttributeSource in org.apache.lucene.analysis.cjk
class | CJKBigramFilter Forms bigrams of CJK terms that are generated from StandardTokenizer or ICUTokenizer.
class | CJKTokenizer Deprecated. Use StandardTokenizer, CJKWidthFilter, CJKBigramFilter, and LowerCaseFilter instead.
class | CJKWidthFilter A TokenFilter that normalizes CJK width differences: Folds fullwidth ASCII variants into the equivalent basic latin Folds halfwidth Katakana variants into the equivalent kana

Constructors in org.apache.lucene.analysis.cjk with parameters of type AttributeSource
CJKTokenizer(AttributeSource source, Reader in)
Deprecated.

Uses of AttributeSource in org.apache.lucene.analysis.cn

Subclasses of AttributeSource in org.apache.lucene.analysis.cn
class | ChineseFilter Deprecated. Use StopFilter instead, which has the same functionality. This filter will be removed in Lucene 5.0
class | ChineseTokenizer Deprecated. Use StandardTokenizer instead, which has the same functionality. This filter will be removed in Lucene 5.0

Constructors in org.apache.lucene.analysis.cn with parameters of type AttributeSource
ChineseTokenizer(AttributeSource source, Reader in)
Deprecated.

Uses of AttributeSource in org.apache.lucene.analysis.cn.smart

Subclasses of AttributeSource in org.apache.lucene.analysis.cn.smart
class | SentenceTokenizer Tokenizes input text into sentences.
class | WordTokenFilter A TokenFilter that breaks sentences into words.

Constructors in org.apache.lucene.analysis.cn.smart with parameters of type AttributeSource
SentenceTokenizer(AttributeSource source, Reader reader)

Uses of AttributeSource in org.apache.lucene.analysis.compound

Subclasses of AttributeSource in org.apache.lucene.analysis.compound
class | CompoundWordTokenFilterBase Base class for decomposition token filters.
class | DictionaryCompoundWordTokenFilter A TokenFilter that decomposes compound words found in many Germanic languages.
class | HyphenationCompoundWordTokenFilter A TokenFilter that decomposes compound words found in many Germanic languages.

Uses of AttributeSource in org.apache.lucene.analysis.cz

Subclasses of AttributeSource in org.apache.lucene.analysis.cz
 class CzechStemFilter
A TokenFilter that applies CzechStemmer to stem Czech words.

Uses of AttributeSource in org.apache.lucene.analysis.de

Subclasses of AttributeSource in org.apache.lucene.analysis.de
class | GermanLightStemFilter A TokenFilter that applies GermanLightStemmer to stem German words.
class | GermanMinimalStemFilter A TokenFilter that applies GermanMinimalStemmer to stem German words.
class | GermanNormalizationFilter Normalizes German characters according to the heuristics of the German2 snowball algorithm.
class | GermanStemFilter A TokenFilter that stems German words.

Uses of AttributeSource in org.apache.lucene.analysis.el

Subclasses of AttributeSource in org.apache.lucene.analysis.el
class | GreekLowerCaseFilter Normalizes token text to lower case, removes some Greek diacritics, and standardizes final sigma to sigma.
class | GreekStemFilter A TokenFilter that applies GreekStemmer to stem Greek words.

Uses of AttributeSource in org.apache.lucene.analysis.en

Subclasses of AttributeSource in org.apache.lucene.analysis.en
class | EnglishMinimalStemFilter A TokenFilter that applies EnglishMinimalStemmer to stem English words.
class | EnglishPossessiveFilter TokenFilter that removes possessives (trailing 's) from words.
class | KStemFilter A high-performance kstem filter for english.

Uses of AttributeSource in org.apache.lucene.analysis.es

Subclasses of AttributeSource in org.apache.lucene.analysis.es
 class SpanishLightStemFilter
A TokenFilter that applies SpanishLightStemmer to stem Spanish words.

Uses of AttributeSource in org.apache.lucene.analysis.fa

Subclasses of AttributeSource in org.apache.lucene.analysis.fa
 class PersianNormalizationFilter
A TokenFilter that applies PersianNormalizer to normalize the orthography.

Uses of AttributeSource in org.apache.lucene.analysis.fi

Subclasses of AttributeSource in org.apache.lucene.analysis.fi
 class FinnishLightStemFilter
A TokenFilter that applies FinnishLightStemmer to stem Finnish words.

Uses of AttributeSource in org.apache.lucene.analysis.fr

Subclasses of AttributeSource in org.apache.lucene.analysis.fr
class | ElisionFilter Removes elisions from a TokenStream.
class | FrenchLightStemFilter A TokenFilter that applies FrenchLightStemmer to stem French words.
class | FrenchMinimalStemFilter A TokenFilter that applies FrenchMinimalStemmer to stem French words.
class | FrenchStemFilter Deprecated. Use SnowballFilter with FrenchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0

Uses of AttributeSource in org.apache.lucene.analysis.ga

Subclasses of AttributeSource in org.apache.lucene.analysis.ga
 class IrishLowerCaseFilter
Normalises token text to lower case, handling t-prothesis and n-eclipsis (i.e., that 'nAthair' should become 'n-athair')

Uses of AttributeSource in org.apache.lucene.analysis.gl

Subclasses of AttributeSource in org.apache.lucene.analysis.gl
class | GalicianMinimalStemFilter A TokenFilter that applies GalicianMinimalStemmer to stem Galician words.
class | GalicianStemFilter A TokenFilter that applies GalicianStemmer to stem Galician words.

Uses of AttributeSource in org.apache.lucene.analysis.hi

Subclasses of AttributeSource in org.apache.lucene.analysis.hi
class | HindiNormalizationFilter A TokenFilter that applies HindiNormalizer to normalize the orthography.
class | HindiStemFilter A TokenFilter that applies HindiStemmer to stem Hindi words.

Uses of AttributeSource in org.apache.lucene.analysis.hu

Subclasses of AttributeSource in org.apache.lucene.analysis.hu
 class HungarianLightStemFilter
A TokenFilter that applies HungarianLightStemmer to stem Hungarian words.

Uses of AttributeSource in org.apache.lucene.analysis.hunspell

Subclasses of AttributeSource in org.apache.lucene.analysis.hunspell
 class HunspellStemFilter
TokenFilter that uses hunspell affix rules and words to stem tokens.

Uses of AttributeSource in org.apache.lucene.analysis.icu

Subclasses of AttributeSource in org.apache.lucene.analysis.icu
class | ICUFoldingFilter A TokenFilter that applies search term folding to Unicode text, applying foldings from UTR#30 Character Foldings.
class | ICUNormalizer2Filter Normalize token text with ICU's Normalizer2
class | ICUTransformFilter A TokenFilter that transforms text with ICU.

Uses of AttributeSource in org.apache.lucene.analysis.icu.segmentation

Subclasses of AttributeSource in org.apache.lucene.analysis.icu.segmentation
 class ICUTokenizer
Breaks text into words according to UAX #29: Unicode Text Segmentation (http://www.unicode.org/reports/tr29/)

Uses of AttributeSource in org.apache.lucene.analysis.id

Subclasses of AttributeSource in org.apache.lucene.analysis.id
 class IndonesianStemFilter
A TokenFilter that applies IndonesianStemmer to stem Indonesian words.

Uses of AttributeSource in org.apache.lucene.analysis.in

Subclasses of AttributeSource in org.apache.lucene.analysis.in
class | IndicNormalizationFilter A TokenFilter that applies IndicNormalizer to normalize text in Indian Languages.
class | IndicTokenizer Deprecated. (3.6) Use StandardTokenizer instead.

Constructors in org.apache.lucene.analysis.in with parameters of type AttributeSource
IndicTokenizer(Version matchVersion, AttributeSource source, Reader input)
Deprecated.

Uses of AttributeSource in org.apache.lucene.analysis.it

Subclasses of AttributeSource in org.apache.lucene.analysis.it
 class ItalianLightStemFilter
A TokenFilter that applies ItalianLightStemmer to stem Italian words.

Uses of AttributeSource in org.apache.lucene.analysis.ja

Subclasses of AttributeSource in org.apache.lucene.analysis.ja
class | JapaneseBaseFormFilter Replaces term text with the BaseFormAttribute.
class | JapaneseKatakanaStemFilter A TokenFilter that normalizes common katakana spelling variations ending in a long sound character by removing this character (U+30FC).
class | JapanesePartOfSpeechStopFilter Removes tokens that match a set of part-of-speech tags.
class | JapaneseReadingFormFilter A TokenFilter that replaces the term attribute with the reading of a token in either katakana or romaji form.
class | JapaneseTokenizer Tokenizer for Japanese that uses morphological analysis.

Uses of AttributeSource in org.apache.lucene.analysis.lv

Subclasses of AttributeSource in org.apache.lucene.analysis.lv
 class LatvianStemFilter
A TokenFilter that applies LatvianStemmer to stem Latvian words.

Uses of AttributeSource in org.apache.lucene.analysis.miscellaneous

Subclasses of AttributeSource in org.apache.lucene.analysis.miscellaneous
class | EmptyTokenStream An always exhausted token stream.
class | PrefixAndSuffixAwareTokenFilter Links two PrefixAwareTokenFilter.
class | PrefixAwareTokenFilter Joins two token streams and leaves the last token of the first stream available to be used when updating the token values in the second stream based on that token.
class | SingleTokenTokenStream A TokenStream containing a single token.
class | StemmerOverrideFilter Provides the ability to override any KeywordAttribute aware stemmer with custom dictionary-based stemming.

Uses of AttributeSource in org.apache.lucene.analysis.ngram

Subclasses of AttributeSource in org.apache.lucene.analysis.ngram
class | EdgeNGramTokenFilter Tokenizes the given token into n-grams of given size(s).
class | EdgeNGramTokenizer Tokenizes the input from an edge into n-grams of given size(s).
class | NGramTokenFilter Tokenizes the input into n-grams of the given size(s).
class | NGramTokenizer Tokenizes the input into n-grams of the given size(s).

Constructors in org.apache.lucene.analysis.ngram with parameters of type AttributeSource
EdgeNGramTokenizer(AttributeSource source, Reader input, EdgeNGramTokenizer.Side side, int minGram, int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
EdgeNGramTokenizer(AttributeSource source, Reader input, String sideLabel, int minGram, int maxGram)
Creates EdgeNGramTokenizer that can generate n-grams in the sizes of the given range
NGramTokenizer(AttributeSource source, Reader input, int minGram, int maxGram)
Creates NGramTokenizer with given min and max n-grams.

Uses of AttributeSource in org.apache.lucene.analysis.nl

Subclasses of AttributeSource in org.apache.lucene.analysis.nl
 class DutchStemFilter
Deprecated. Use SnowballFilter with DutchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0

Uses of AttributeSource in org.apache.lucene.analysis.no

Subclasses of AttributeSource in org.apache.lucene.analysis.no
class | NorwegianLightStemFilter A TokenFilter that applies NorwegianLightStemmer to stem Norwegian words.
class | NorwegianMinimalStemFilter A TokenFilter that applies NorwegianMinimalStemmer to stem Norwegian words.

Uses of AttributeSource in org.apache.lucene.analysis.path

Subclasses of AttributeSource in org.apache.lucene.analysis.path
class | PathHierarchyTokenizer Tokenizer for path-like hierarchies.
class | ReversePathHierarchyTokenizer Tokenizer for domain-like hierarchies.

Uses of AttributeSource in org.apache.lucene.analysis.payloads

Subclasses of AttributeSource in org.apache.lucene.analysis.payloads
class | DelimitedPayloadTokenFilter Characters before the delimiter are the "token", those after are the payload.
class | NumericPayloadTokenFilter Assigns a payload to a token based on the Token.type()
class | TokenOffsetPayloadTokenFilter Adds the Token.setStartOffset(int) and Token.setEndOffset(int) First 4 bytes are the start
class | TypeAsPayloadTokenFilter Makes the Token.type() a payload.

Uses of AttributeSource in org.apache.lucene.analysis.phonetic

Subclasses of AttributeSource in org.apache.lucene.analysis.phonetic
class | BeiderMorseFilter TokenFilter for Beider-Morse phonetic encoding.
class | DoubleMetaphoneFilter Filter for DoubleMetaphone (supporting secondary codes)
class | PhoneticFilter Create tokens for phonetic matches.

Uses of AttributeSource in org.apache.lucene.analysis.position

Subclasses of AttributeSource in org.apache.lucene.analysis.position
 class PositionFilter
Set the positionIncrement of all tokens to the "positionIncrement", except the first return token which retains its original positionIncrement value.

Uses of AttributeSource in org.apache.lucene.analysis.pt

Subclasses of AttributeSource in org.apache.lucene.analysis.pt
class | PortugueseLightStemFilter A TokenFilter that applies PortugueseLightStemmer to stem Portuguese words.
class | PortugueseMinimalStemFilter A TokenFilter that applies PortugueseMinimalStemmer to stem Portuguese words.
class | PortugueseStemFilter A TokenFilter that applies PortugueseStemmer to stem Portuguese words.

Uses of AttributeSource in org.apache.lucene.analysis.reverse

Subclasses of AttributeSource in org.apache.lucene.analysis.reverse
 class ReverseStringFilter
Reverse token string, for example "country" => "yrtnuoc".

Uses of AttributeSource in org.apache.lucene.analysis.ru

Subclasses of AttributeSource in org.apache.lucene.analysis.ru
class | RussianLetterTokenizer Deprecated. Use StandardTokenizer instead, which has the same functionality. This filter will be removed in Lucene 5.0
class | RussianLightStemFilter A TokenFilter that applies RussianLightStemmer to stem Russian words.
class | RussianLowerCaseFilter Deprecated. Use LowerCaseFilter instead, which has the same functionality. This filter will be removed in Lucene 4.0
class | RussianStemFilter Deprecated. Use SnowballFilter with RussianStemmer instead, which has the same functionality. This filter will be removed in Lucene 4.0

Constructors in org.apache.lucene.analysis.ru with parameters of type AttributeSource
RussianLetterTokenizer(AttributeSource source, Reader in)
Deprecated. use RussianLetterTokenizer.RussianLetterTokenizer(Version, AttributeSource, Reader) instead. This will be removed in Lucene 4.0.
RussianLetterTokenizer(Version matchVersion, AttributeSource source, Reader in)
Deprecated. Construct a new RussianLetterTokenizer using a given AttributeSource.

Uses of AttributeSource in org.apache.lucene.analysis.shingle

Subclasses of AttributeSource in org.apache.lucene.analysis.shingle
class | ShingleFilter A ShingleFilter constructs shingles (token n-grams) from a token stream.
class | ShingleMatrixFilter Deprecated. Will be removed in Lucene 4.0. This filter is unmaintained and might not behave correctly if used with custom Attributes, i.e. Attributes other than the ones located in org.apache.lucene.analysis.tokenattributes. It also uses hardcoded payload encoders which makes it not easily adaptable to other use-cases.

Uses of AttributeSource in org.apache.lucene.analysis.sinks

Methods in org.apache.lucene.analysis.sinks with parameters of type AttributeSource
boolean | DateRecognizerSinkFilter.accept(AttributeSource source)
boolean | TokenRangeSinkFilter.accept(AttributeSource source)
boolean | TokenTypeSinkFilter.accept(AttributeSource source)

Uses of AttributeSource in org.apache.lucene.analysis.snowball

Subclasses of AttributeSource in org.apache.lucene.analysis.snowball
 class SnowballFilter
A filter that stems words using a Snowball-generated stemmer.

Uses of AttributeSource in org.apache.lucene.analysis.standard

Subclasses of AttributeSource in org.apache.lucene.analysis.standard
class | ClassicFilter Normalizes tokens extracted with ClassicTokenizer.
class | ClassicTokenizer A grammar-based tokenizer constructed with JFlex
class | StandardFilter Normalizes tokens extracted with StandardTokenizer.
class | StandardTokenizer A grammar-based tokenizer constructed with JFlex.
class | UAX29URLEmailTokenizer This class implements Word Break rules from the Unicode Text Segmentation algorithm, as specified in Unicode Standard Annex #29 URLs and email addresses are also tokenized according to the relevant RFCs.

Constructors in org.apache.lucene.analysis.standard with parameters of type AttributeSource
ClassicTokenizer(Version matchVersion, AttributeSource source, Reader input)
Creates a new ClassicTokenizer with a given AttributeSource.
StandardTokenizer(Version matchVersion, AttributeSource source, Reader input)
Creates a new StandardTokenizer with a given AttributeSource.
UAX29URLEmailTokenizer(AttributeSource source, Reader input)
Deprecated. use UAX29URLEmailTokenizer.UAX29URLEmailTokenizer(Version, AttributeSource, Reader) instead.
UAX29URLEmailTokenizer(Version matchVersion, AttributeSource source, Reader input)
Creates a new UAX29URLEmailTokenizer with a given AttributeSource.

Uses of AttributeSource in org.apache.lucene.analysis.stempel

Subclasses of AttributeSource in org.apache.lucene.analysis.stempel
 class StempelFilter
Transforms the token stream as per the stemming algorithm.

Uses of AttributeSource in org.apache.lucene.analysis.sv

Subclasses of AttributeSource in org.apache.lucene.analysis.sv
 class SwedishLightStemFilter
A TokenFilter that applies SwedishLightStemmer to stem Swedish words.

Uses of AttributeSource in org.apache.lucene.analysis.synonym

Subclasses of AttributeSource in org.apache.lucene.analysis.synonym
 class SynonymFilter
Matches single or multi word synonyms in a token stream.

Uses of AttributeSource in org.apache.lucene.analysis.th

Subclasses of AttributeSource in org.apache.lucene.analysis.th
 class ThaiWordFilter
TokenFilter that use BreakIterator to break each Token that is Thai into separate Token(s) for each Thai word.

Uses of AttributeSource in org.apache.lucene.analysis.tr

Subclasses of AttributeSource in org.apache.lucene.analysis.tr
 class TurkishLowerCaseFilter
Normalizes Turkish token text to lower case.

Uses of AttributeSource in org.apache.lucene.analysis.wikipedia

Subclasses of AttributeSource in org.apache.lucene.analysis.wikipedia
 class WikipediaTokenizer
Extension of StandardTokenizer that is aware of Wikipedia syntax.

Constructors in org.apache.lucene.analysis.wikipedia with parameters of type AttributeSource
WikipediaTokenizer(AttributeSource source, Reader input, int tokenOutput, Set<String> untokenizedTypes)
Creates a new instance of the WikipediaTokenizer.

Uses of AttributeSource in org.apache.lucene.collation

Subclasses of AttributeSource in org.apache.lucene.collation
class | CollationKeyFilter Converts each token into its CollationKey, and then encodes the CollationKey with IndexableBinaryStringTools, to allow it to be stored as an index term.
class | ICUCollationKeyFilter Converts each token into its CollationKey, and then encodes the CollationKey with IndexableBinaryStringTools, to allow it to be stored as an index term.

Uses of AttributeSource in org.apache.lucene.facet.enhancements

Subclasses of AttributeSource in org.apache.lucene.facet.enhancements
 class EnhancementsCategoryTokenizer
A tokenizer which adds to each category token payload according to the CategoryEnhancements defined in the given EnhancementsIndexingParams.

Uses of AttributeSource in org.apache.lucene.facet.enhancements.association

Subclasses of AttributeSource in org.apache.lucene.facet.enhancements.association
 class AssociationListTokenizer
Tokenizer for associations of a category

Uses of AttributeSource in org.apache.lucene.facet.index.streaming

Subclasses of AttributeSource in org.apache.lucene.facet.index.streaming
class | CategoryAttributesStream An attribute stream built from an Iterable of CategoryAttribute.
class | CategoryListTokenizer A base class for category list tokenizers, which add category list tokens to category streams.
class | CategoryParentsStream This class adds parents to a CategoryAttributesStream.
class | CategoryTokenizer Basic class for setting the CharTermAttributes and PayloadAttributes of category tokens.
class | CategoryTokenizerBase A base class for all token filters which add term and payload attributes to tokens and are to be used in CategoryDocumentBuilder.
class | CountingListTokenizer CategoryListTokenizer for facet counting

Uses of AttributeSource in org.apache.lucene.index

Methods in org.apache.lucene.index that return AttributeSource
 AttributeSource FieldInvertState.getAttributeSource()

Uses of AttributeSource in org.apache.lucene.queryParser

Subclasses of AttributeSource in org.apache.lucene.queryParser
static class QueryParserTestBase.QPTestFilter
Filter which discards the token 'stop' and which expands the token 'phrase' into 'phrase1 phrase2'

Uses of AttributeSource in org.apache.lucene.queryParser.core.config

Subclasses of AttributeSource in org.apache.lucene.queryParser.core.config
class | AbstractQueryConfig This class is the base of QueryConfigHandler and FieldConfig.
class | FieldConfig This class represents a field configuration.
class | QueryConfigHandler This class can be used to hold any query configuration and no field configuration.

Uses of AttributeSource in org.apache.lucene.queryParser.standard.config

Subclasses of AttributeSource in org.apache.lucene.queryParser.standard.config
 class StandardQueryConfigHandler
This query configuration handler is used for almost every processor defined in the StandardQueryNodeProcessorPipeline processor pipeline.

Uses of AttributeSource in org.apache.lucene.search.highlight

Subclasses of AttributeSource in org.apache.lucene.search.highlight
class | OffsetLimitTokenFilter This TokenFilter limits the number of tokens while indexing by adding up the current offset.
class | TokenStreamFromTermPositionVector

Uses of AttributeSource in org.apache.lucene.util

Methods in org.apache.lucene.util that return AttributeSource
 AttributeSource AttributeSource.cloneAttributes()
Performs a clone of all AttributeImpl instances returned in a new AttributeSource instance.

Methods in org.apache.lucene.util with parameters of type AttributeSource
 void AttributeSource.copyTo(AttributeSource target)
Copies the contents of this AttributeSource to the given target AttributeSource.

Constructors in org.apache.lucene.util with parameters of type AttributeSource
AttributeSource(AttributeSource input)
An AttributeSource that uses the same attributes as the supplied one.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.AttributeSource.State

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.AttributeSource.State

Packages that use AttributeSource.State
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.phonetic | Analysis components for phonetic search.
org.apache.lucene.util | Some utility classes.

Uses of AttributeSource.State in org.apache.lucene.analysis

Fields in org.apache.lucene.analysis with type parameters of type AttributeSource.State
 List<AttributeSource.State> LookaheadTokenFilter.Position.inputTokens

Methods in org.apache.lucene.analysis that return AttributeSource.State
 AttributeSource.State LookaheadTokenFilter.Position.nextState()

Methods in org.apache.lucene.analysis with parameters of type AttributeSource.State
 void LookaheadTokenFilter.Position.add(AttributeSource.State state)

Uses of AttributeSource.State in org.apache.lucene.analysis.phonetic

Fields in org.apache.lucene.analysis.phonetic declared as AttributeSource.State
protected  AttributeSource.State PhoneticFilter.save

Uses of AttributeSource.State in org.apache.lucene.util

Methods in org.apache.lucene.util that return AttributeSource.State
 AttributeSource.State AttributeSource.captureState()
Captures the state of all Attributes.

Methods in org.apache.lucene.util with parameters of type AttributeSource.State
 void AttributeSource.restoreState(AttributeSource.State state)
Restores this state by copying the values of all attribute implementations that this state contains into the attributes implementations of the targetStream.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.util.Bits

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.util.Bits

Packages that use Bits
org.apache.lucene.search | Code to search indices.
org.apache.lucene.util | Some utility classes.

Uses of Bits in org.apache.lucene.search

Fields in org.apache.lucene.search declared as Bits
protected  Bits FieldComparator.NumericComparator.docsWithField

Methods in org.apache.lucene.search that return Bits
 Bits FieldCache.getDocsWithField(IndexReader reader, String field)
Checks the internal cache for an appropriate entry, and if none is found, reads the terms in field and returns a bit set at the size of reader.maxDoc(), with turned on bits for each docid that does have a value for this field.

Uses of Bits in org.apache.lucene.util

Classes in org.apache.lucene.util that implement Bits
static class | Bits.MatchAllBits Bits impl of the specified length with all bits set.
static class | Bits.MatchNoBits Bits impl of the specified length with no bits set.
class | BitVector Optimized implementation of a vector of bits.
class | FixedBitSet BitSet of fixed length (numBits), backed by accessible (FixedBitSet.getBits()) long[], accessed with an int index, implementing Bits and DocIdSet.
class | OpenBitSet An "open" BitSet implementation that allows direct access to the array of words storing the bits.
class | OpenBitSetDISI OpenBitSet with added methods to bulk-update the bits from a DocIdSetIterator.

Fields in org.apache.lucene.util declared as Bits
static Bits[] Bits.EMPTY_ARRAY

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.Bits.MatchAllBits

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.Bits.MatchAllBits

No usage of org.apache.lucene.util.Bits.MatchAllBits

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.Bits.MatchNoBits

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.Bits.MatchNoBits

No usage of org.apache.lucene.util.Bits.MatchNoBits

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.BitUtil

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.BitUtil

No usage of org.apache.lucene.util.BitUtil

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.BitVector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.BitVector

Packages that use BitVector
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.store.instantiated | InstantiatedIndex, alternative RAM store for small corpora.

Uses of BitVector in org.apache.lucene.index

Fields in org.apache.lucene.index declared as BitVector
 BitVector SegmentWriteState.deletedDocs

Methods in org.apache.lucene.index that return BitVector
protected  BitVector SegmentReader.cloneDeletedDocs(BitVector bv)
Deprecated.

Methods in org.apache.lucene.index with parameters of type BitVector
protected  BitVector SegmentReader.cloneDeletedDocs(BitVector bv)
Deprecated.

Uses of BitVector in org.apache.lucene.store.instantiated

Methods in org.apache.lucene.store.instantiated that return BitVector
 BitVector InstantiatedIndex.getDeletedDocuments()
Deprecated.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.ByteBlockPool.Allocator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.ByteBlockPool.Allocator

Packages that use ByteBlockPool.Allocator
org.apache.lucene.util Some utility classes.

Uses of ByteBlockPool.Allocator in org.apache.lucene.util

Subclasses of ByteBlockPool.Allocator in org.apache.lucene.util
static class | ByteBlockPool.DirectAllocator A simple ByteBlockPool.Allocator that never recycles.
static class | ByteBlockPool.DirectTrackingAllocator A simple ByteBlockPool.Allocator that never recycles, but tracks how much total RAM is in use.
class | RecyclingByteBlockAllocator A ByteBlockPool.Allocator implementation that recycles unused byte blocks in a buffer and reuses them in subsequent calls to RecyclingByteBlockAllocator.getByteBlock().

Constructors in org.apache.lucene.util with parameters of type ByteBlockPool.Allocator
ByteBlockPool(ByteBlockPool.Allocator allocator)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.ByteBlockPool.DirectAllocator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.ByteBlockPool.DirectAllocator

No usage of org.apache.lucene.util.ByteBlockPool.DirectAllocator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.ByteBlockPool.DirectTrackingAllocator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.ByteBlockPool.DirectTrackingAllocator

No usage of org.apache.lucene.util.ByteBlockPool.DirectTrackingAllocator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.ByteBlockPool

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.ByteBlockPool

Packages that use ByteBlockPool
org.apache.lucene.util Some utility classes.

Uses of ByteBlockPool in org.apache.lucene.util

Constructors in org.apache.lucene.util with parameters of type ByteBlockPool
BytesRefHash(ByteBlockPool pool)
Creates a new BytesRefHash
BytesRefHash(ByteBlockPool pool, int capacity, BytesRefHash.BytesStartArray bytesStartArray)
Creates a new BytesRefHash

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.BytesRef

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.BytesRef

Packages that use BytesRef
org.apache.lucene.analysis.synonym | Analysis components for Synonyms.
org.apache.lucene.search.spell | Suggest alternate spellings for words.
org.apache.lucene.search.suggest | Support for Autocomplete/Autosuggest
org.apache.lucene.search.suggest.fst | Finite-state based autosuggest.
org.apache.lucene.util | Some utility classes.
org.apache.lucene.util.fst | Finite state transducers

Uses of BytesRef in org.apache.lucene.analysis.synonym

Fields in org.apache.lucene.analysis.synonym with type parameters of type BytesRef
 FST<BytesRef> SynonymMap.fst
map>

Constructor parameters in org.apache.lucene.analysis.synonym with type arguments of type BytesRef
SynonymMap(FST<BytesRef> fst, BytesRefHash words, int maxHorizontalContext)

Uses of BytesRef in org.apache.lucene.search.spell

Methods in org.apache.lucene.search.spell that return BytesRef
 BytesRef TermFreqIterator.TermFreqIteratorWrapper.next()

Methods in org.apache.lucene.search.spell that return types with arguments of type BytesRef
 Comparator<BytesRef> TermFreqIterator.TermFreqIteratorWrapper.getComparator()

Uses of BytesRef in org.apache.lucene.search.suggest

Methods in org.apache.lucene.search.suggest that return BytesRef
BytesRef | BytesRefList.get(BytesRef spare, int ord) Returns the n'th element of this BytesRefList
BytesRef | UnsortedTermFreqIteratorWrapper.next()
BytesRef | BufferingTermFreqIteratorWrapper.next()
BytesRef | SortedTermFreqIteratorWrapper.next()

Methods in org.apache.lucene.search.suggest that return types with arguments of type BytesRef
Comparator<BytesRef> | BufferingTermFreqIteratorWrapper.getComparator()
Comparator<BytesRef> | SortedTermFreqIteratorWrapper.getComparator()

Methods in org.apache.lucene.search.suggest with parameters of type BytesRef
int | BytesRefList.append(BytesRef bytes) Appends a copy of the given BytesRef to this BytesRefList.
protected long | SortedTermFreqIteratorWrapper.decode(BytesRef scratch, ByteArrayDataInput tmpInput)
protected void | SortedTermFreqIteratorWrapper.encode(Sort.ByteSequencesWriter writer, ByteArrayDataOutput output, byte[] buffer, BytesRef spare, long weight)
BytesRef | BytesRefList.get(BytesRef spare, int ord) Returns the n'th element of this BytesRefList

Method parameters in org.apache.lucene.search.suggest with type arguments of type BytesRef
 BytesRefIterator BytesRefList.iterator(Comparator<BytesRef> comp)
Returns a BytesRefIterator with point in time semantics.

Constructor parameters in org.apache.lucene.search.suggest with type arguments of type BytesRef
SortedTermFreqIteratorWrapper(TermFreqIterator source, Comparator<BytesRef> comparator)
SortedTermFreqIteratorWrapper(TermFreqIterator source, Comparator<BytesRef> comparator, boolean compareRawBytes)

Uses of BytesRef in org.apache.lucene.search.suggest.fst

Fields in org.apache.lucene.search.suggest.fst declared as BytesRef
 BytesRef FSTCompletion.Completion.utf8

Fields in org.apache.lucene.search.suggest.fst with type parameters of type BytesRef
static Comparator<BytesRef> Sort.DEFAULT_COMPARATOR

Methods in org.apache.lucene.search.suggest.fst that return types with arguments of type BytesRef
Comparator<BytesRef> | InMemorySorter.getComparator()
Comparator<BytesRef> | ExternalRefSorter.getComparator()
Comparator<BytesRef> | Sort.getComparator()
Comparator<BytesRef> | BytesRefSorter.getComparator()

Methods in org.apache.lucene.search.suggest.fst with parameters of type BytesRef
void | InMemorySorter.add(BytesRef utf8)
void | ExternalRefSorter.add(BytesRef utf8)
void | BytesRefSorter.add(BytesRef utf8) Adds a single suggestion entry (possibly compound with its bucket).
void | FSTCompletionBuilder.add(BytesRef utf8, int bucket) Appends a single suggestion and its weight to the internal buffers.
boolean | Sort.ByteSequencesReader.read(BytesRef ref) Reads the next entry into the provided BytesRef.
void | Sort.ByteSequencesWriter.write(BytesRef ref)

Constructor parameters in org.apache.lucene.search.suggest.fst with type arguments of type BytesRef
InMemorySorter(Comparator<BytesRef> comparator)
Sort(Comparator<BytesRef> comparator)
Sort(Comparator<BytesRef> comparator, Sort.BufferSize ramBufferSize, File tempDirectory, int maxTempfiles)
All-details constructor.

Uses of BytesRef in org.apache.lucene.util

Methods in org.apache.lucene.util that return BytesRef
BytesRef | BytesRef.clone()
BytesRef | ByteBlockPool.copyFrom(BytesRef bytes)
static BytesRef | BytesRef.deepCopyOf(BytesRef other) Creates a new BytesRef that points to a copy of the bytes from other
BytesRef | PagedBytes.Reader.fill(BytesRef b, long start) Reads length as 1 or 2 byte vInt prefix, starting at start.
BytesRef | PagedBytes.Reader.fillSlice(BytesRef b, long start, int length) Gets a slice out of PagedBytes starting at start with a given length.
BytesRef | PagedBytes.Reader.fillSliceWithPrefix(BytesRef b, long start) Gets a slice out of PagedBytes starting at start, the length is read as 1 or 2 byte vInt prefix.
BytesRef | BytesRefHash.get(int ord, BytesRef ref) Populates and returns a BytesRef with the bytes for the given ord.
BytesRef | BytesRefIterator.next() Increments the iteration to the next BytesRef in the iterator.
BytesRef | ByteBlockPool.setBytesRef(BytesRef term, int textStart)

Methods in org.apache.lucene.util that return types with arguments of type BytesRef
Comparator<BytesRef> | BytesRefIterator.getComparator() Return the BytesRef Comparator used to sort terms provided by the iterator.
static Comparator<BytesRef> | BytesRef.getUTF8SortedAsUnicodeComparator()
static Comparator<BytesRef> | BytesRef.getUTF8SortedAsUTF16Comparator()

Methods in org.apache.lucene.util with parameters of type BytesRef
 int BytesRefHash.add(BytesRef bytes)
Adds a new BytesRef
 int BytesRefHash.add(BytesRef bytes, int code)
Adds a new BytesRef with a pre-calculated hash code.
 void BytesRef.append(BytesRef other)
Appends the bytes from the given BytesRef
 boolean BytesRef.bytesEquals(BytesRef other)
Expert: compares the bytes against another BytesRef, returning true if the bytes are equal.
static CharSequence _TestUtil.bytesToCharSequence(BytesRef ref, Random random)
 int BytesRef.compareTo(BytesRef other)
Unsigned byte order comparison
 void ByteBlockPool.copy(BytesRef bytes)
Copies the given BytesRef at the current positions ( ByteBlockPool.byteUpto across buffer boundaries
 void PagedBytes.copy(BytesRef bytes)
Copy BytesRef in
 void PagedBytes.copy(BytesRef bytes, BytesRef out)
Copy BytesRef in, setting BytesRef out to the result.
 void BytesRef.copyBytes(BytesRef other)
Copies the bytes from the given BytesRef
 BytesRef ByteBlockPool.copyFrom(BytesRef bytes)
 long PagedBytes.copyUsingLengthPrefix(BytesRef bytes)
Copy bytes in, writing the length as a 1 or 2 byte vInt prefix.
static BytesRef BytesRef.deepCopyOf(BytesRef other)
Creates a new BytesRef that points to a copy of the bytes from other
 boolean BytesRef.endsWith(BytesRef other)
 BytesRef PagedBytes.Reader.fill(BytesRef b, long start)
Reads length as 1 or 2 byte vInt prefix, starting at start.
 int PagedBytes.Reader.fillAndGetIndex(BytesRef b, long start)
Reads length as 1 or 2 byte vInt prefix, starting at start.
 long PagedBytes.Reader.fillAndGetStart(BytesRef b, long start)
Reads length as 1 or 2 byte vInt prefix, starting at start and returns the start offset of the next part, suitable as start parameter on next call to sequentially read all BytesRef.
 BytesRef PagedBytes.Reader.fillSlice(BytesRef b, long start, int length)
Gets a slice out of PagedBytes starting at start with a given length.
 BytesRef PagedBytes.Reader.fillSliceWithPrefix(BytesRef b, long start)
Gets a slice out of PagedBytes starting at start, the length is read as 1 or 2 byte vInt prefix.
 BytesRef BytesRefHash.get(int ord, BytesRef ref)
Populates and returns a BytesRef with the bytes for the given ord.
 BytesRef ByteBlockPool.setBytesRef(BytesRef term, int textStart)
 boolean BytesRef.startsWith(BytesRef other)
static void UnicodeUtil.UTF16toUTF8(char[] source, int offset, int length, BytesRef result)
Encode characters from a char[] source, starting at offset for length chars.
static void UnicodeUtil.UTF16toUTF8(CharSequence s, int offset, int length, BytesRef result)
Encode characters from this String, starting at offset for length characters.
static int UnicodeUtil.UTF16toUTF8WithHash(char[] source, int offset, int length, BytesRef result)
Encode characters from a char[] source, starting at offset for length chars.
static void UnicodeUtil.UTF8toUTF16(BytesRef bytesRef, CharsRef chars)
Utility method for UnicodeUtil.UTF8toUTF16(byte[], int, int, CharsRef)

Method parameters in org.apache.lucene.util with type arguments of type BytesRef
 int[] BytesRefHash.sort(Comparator<BytesRef> comp)
Returns the values array sorted by the referenced byte values.

Uses of BytesRef in org.apache.lucene.util.fst

Fields in org.apache.lucene.util.fst declared as BytesRef
 BytesRef BytesRefFSTEnum.InputOutput.input

Methods in org.apache.lucene.util.fst that return BytesRef
BytesRef | ByteSequenceOutputs.add(BytesRef prefix, BytesRef output)
BytesRef | ByteSequenceOutputs.common(BytesRef output1, BytesRef output2)
BytesRef | ByteSequenceOutputs.getNoOutput()
BytesRef | ByteSequenceOutputs.read(DataInput in)
BytesRef | ByteSequenceOutputs.subtract(BytesRef output, BytesRef inc)
static BytesRef | Util.toBytesRef(IntsRef input, BytesRef scratch) Just converts IntsRef to BytesRef; you must ensure the int values fit into a byte.

Methods in org.apache.lucene.util.fst with parameters of type BytesRef
 BytesRef ByteSequenceOutputs.add(BytesRef prefix, BytesRef output)
 BytesRef ByteSequenceOutputs.common(BytesRef output1, BytesRef output2)
static
<T> T
Util.get(FST<T> fst, BytesRef input)
Looks up the output for this input, or null if the input is not accepted
 String ByteSequenceOutputs.outputToString(BytesRef output)
 BytesRefFSTEnum.InputOutput<T> BytesRefFSTEnum.seekCeil(BytesRef target)
Seeks to smallest term that's >= target.
 BytesRefFSTEnum.InputOutput<T> BytesRefFSTEnum.seekExact(BytesRef target)
Seeks to exactly this term, returning null if the term doesn't exist.
 BytesRefFSTEnum.InputOutput<T> BytesRefFSTEnum.seekFloor(BytesRef target)
Seeks to biggest term that's <= target.
 BytesRef ByteSequenceOutputs.subtract(BytesRef output, BytesRef inc)
static BytesRef Util.toBytesRef(IntsRef input, BytesRef scratch)
Just converts IntsRef to BytesRef; you must ensure the int values fit into a byte.
static IntsRef Util.toIntsRef(BytesRef input, IntsRef scratch)
Just takes unsigned byte values from the BytesRef and converts into an IntsRef.
 void ByteSequenceOutputs.write(BytesRef prefix, DataOutput out)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.BytesRefHash.BytesStartArray

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.BytesRefHash.BytesStartArray

Packages that use BytesRefHash.BytesStartArray
org.apache.lucene.util Some utility classes.

Uses of BytesRefHash.BytesStartArray in org.apache.lucene.util

Subclasses of BytesRefHash.BytesStartArray in org.apache.lucene.util
static class | BytesRefHash.DirectBytesStartArray A simple BytesRefHash.BytesStartArray that tracks memory allocation using a private AtomicLong instance.
static class | BytesRefHash.TrackingDirectBytesStartArray A simple BytesRefHash.BytesStartArray that tracks all memory allocation using a shared AtomicLong instance.

Constructors in org.apache.lucene.util with parameters of type BytesRefHash.BytesStartArray
BytesRefHash(ByteBlockPool pool, int capacity, BytesRefHash.BytesStartArray bytesStartArray)
Creates a new BytesRefHash

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.BytesRefHash.DirectBytesStartArray

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.BytesRefHash.DirectBytesStartArray

No usage of org.apache.lucene.util.BytesRefHash.DirectBytesStartArray

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.BytesRefHash

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.BytesRefHash

Packages that use BytesRefHash
org.apache.lucene.analysis.synonym Analysis components for Synonyms.

Uses of BytesRefHash in org.apache.lucene.analysis.synonym

Fields in org.apache.lucene.analysis.synonym declared as BytesRefHash
 BytesRefHash SynonymMap.words
map

Constructors in org.apache.lucene.analysis.synonym with parameters of type BytesRefHash
SynonymMap(FST<BytesRef> fst, BytesRefHash words, int maxHorizontalContext)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.BytesRefHash.MaxBytesLengthExceededException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.BytesRefHash.MaxBytesLengthExceededException

No usage of org.apache.lucene.util.BytesRefHash.MaxBytesLengthExceededException

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.BytesRefHash.TrackingDirectBytesStartArray

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.BytesRefHash.TrackingDirectBytesStartArray

No usage of org.apache.lucene.util.BytesRefHash.TrackingDirectBytesStartArray

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.util.BytesRefIterator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.util.BytesRefIterator

Packages that use BytesRefIterator
org.apache.lucene.search.spell | Suggest alternate spellings for words.
org.apache.lucene.search.suggest | Support for Autocomplete/Autosuggest
org.apache.lucene.search.suggest.fst | Finite-state based autosuggest.
org.apache.lucene.util | Some utility classes.

Uses of BytesRefIterator in org.apache.lucene.search.spell

Subinterfaces of BytesRefIterator in org.apache.lucene.search.spell
 interface TermFreqIterator
Interface for enumerating term,weight pairs.

Classes in org.apache.lucene.search.spell that implement BytesRefIterator
static class TermFreqIterator.TermFreqIteratorWrapper
Wraps a BytesRefIterator as a TermFreqIterator, with all weights set to 1

Methods in org.apache.lucene.search.spell that return BytesRefIterator
BytesRefIterator | HighFrequencyDictionary.getWordsIterator()
BytesRefIterator | PlainTextDictionary.getWordsIterator()
BytesRefIterator | LuceneDictionary.getWordsIterator()
BytesRefIterator | Dictionary.getWordsIterator() Return all words present in the dictionary

Constructors in org.apache.lucene.search.spell with parameters of type BytesRefIterator
TermFreqIterator.TermFreqIteratorWrapper(BytesRefIterator wrapped)

Uses of BytesRefIterator in org.apache.lucene.search.suggest

Classes in org.apache.lucene.search.suggest that implement BytesRefIterator
class | BufferingTermFreqIteratorWrapper This wrapper buffers incoming elements.
class | SortedTermFreqIteratorWrapper This wrapper buffers incoming elements and makes sure they are sorted based on given comparator.
class | UnsortedTermFreqIteratorWrapper This wrapper buffers the incoming elements and makes sure they are in random order.

Methods in org.apache.lucene.search.suggest that return BytesRefIterator
 BytesRefIterator BytesRefList.iterator()
sugar for BytesRefList.iterator(Comparator) with a null comparator
 BytesRefIterator BytesRefList.iterator(Comparator<BytesRef> comp)
Returns a BytesRefIterator with point in time semantics.

Uses of BytesRefIterator in org.apache.lucene.search.suggest.fst

Methods in org.apache.lucene.search.suggest.fst that return BytesRefIterator
 BytesRefIterator InMemorySorter.iterator()
 BytesRefIterator ExternalRefSorter.iterator()
 BytesRefIterator BytesRefSorter.iterator()
Sorts the entries added in BytesRefSorter.add(BytesRef) and returns an iterator over all sorted entries.

Uses of BytesRefIterator in org.apache.lucene.util

Fields in org.apache.lucene.util declared as BytesRefIterator
static BytesRefIterator BytesRefIterator.EMPTY
Singleton BytesRefIterator that iterates over 0 BytesRefs.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.CharacterUtils.CharacterBuffer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.CharacterUtils.CharacterBuffer

Packages that use CharacterUtils.CharacterBuffer
org.apache.lucene.util Some utility classes.

Uses of CharacterUtils.CharacterBuffer in org.apache.lucene.util

Methods in org.apache.lucene.util that return CharacterUtils.CharacterBuffer
static CharacterUtils.CharacterBuffer CharacterUtils.newCharacterBuffer(int bufferSize)
Creates a new CharacterUtils.CharacterBuffer and allocates a char[] of the given bufferSize.

Methods in org.apache.lucene.util with parameters of type CharacterUtils.CharacterBuffer
abstract  boolean CharacterUtils.fill(CharacterUtils.CharacterBuffer buffer, Reader reader)
Fills the CharacterUtils.CharacterBuffer with characters read from the given reader Reader.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.CharacterUtils

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.CharacterUtils

Packages that use CharacterUtils
org.apache.lucene.util Some utility classes.

Uses of CharacterUtils in org.apache.lucene.util

Methods in org.apache.lucene.util that return CharacterUtils
static CharacterUtils CharacterUtils.getInstance(Version matchVersion)
Returns a CharacterUtils implementation according to the given Version instance.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.CharsRef

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.CharsRef

Packages that use CharsRef
org.apache.lucene.analysis.synonym | Analysis components for Synonyms.
org.apache.lucene.util | Some utility classes.

Uses of CharsRef in org.apache.lucene.analysis.synonym

Methods in org.apache.lucene.analysis.synonym that return CharsRef
static CharsRef | SynonymMap.Builder.analyze(Analyzer analyzer, String text, CharsRef reuse) Sugar: analyzes the text with the analyzer and separates by SynonymMap.WORD_SEPARATOR.
static CharsRef | SynonymMap.Builder.join(String[] words, CharsRef reuse) Sugar: just joins the provided terms with SynonymMap.WORD_SEPARATOR.

Methods in org.apache.lucene.analysis.synonym with parameters of type CharsRef
 void SynonymMap.Builder.add(CharsRef input, CharsRef output, boolean includeOrig)
Add a phrase->phrase synonym mapping.
static CharsRef SynonymMap.Builder.analyze(Analyzer analyzer, String text, CharsRef reuse)
Sugar: analyzes the text with the analyzer and separates by SynonymMap.WORD_SEPARATOR.
static CharsRef SynonymMap.Builder.join(String[] words, CharsRef reuse)
Sugar: just joins the provided terms with SynonymMap.WORD_SEPARATOR.

Uses of CharsRef in org.apache.lucene.util

Methods in org.apache.lucene.util that return CharsRef
CharsRef | CharsRef.clone()
static CharsRef | CharsRef.deepCopyOf(CharsRef other) Creates a new CharsRef that points to a copy of the chars from other

Methods in org.apache.lucene.util that return types with arguments of type CharsRef
static Comparator<CharsRef> CharsRef.getUTF16SortedAsUTF8Comparator()

Methods in org.apache.lucene.util with parameters of type CharsRef
 boolean CharsRef.charsEquals(CharsRef other)
 int CharsRef.compareTo(CharsRef other)
Signed int order comparison
 void CharsRef.copyChars(CharsRef other)
Copies the given CharsRef referenced content into this instance.
static CharsRef CharsRef.deepCopyOf(CharsRef other)
Creates a new CharsRef that points to a copy of the chars from other
static void UnicodeUtil.UTF8toUTF16(byte[] utf8, int offset, int length, CharsRef chars)
Interprets the given byte array as UTF-8 and converts to UTF-16.
static void UnicodeUtil.UTF8toUTF16(BytesRef bytesRef, CharsRef chars)
Utility method for UnicodeUtil.UTF8toUTF16(byte[], int, int, CharsRef)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.CloseableThreadLocal

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.CloseableThreadLocal

No usage of org.apache.lucene.util.CloseableThreadLocal

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.CodecUtil

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.CodecUtil

No usage of org.apache.lucene.util.CodecUtil

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.CollectionUtil

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.CollectionUtil

No usage of org.apache.lucene.util.CollectionUtil

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.CommandLineUtil

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.CommandLineUtil

No usage of org.apache.lucene.util.CommandLineUtil

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.Constants

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.Constants

No usage of org.apache.lucene.util.Constants

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.Counter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.Counter

Packages that use Counter
org.apache.lucene.search | Code to search indices.
org.apache.lucene.util | Some utility classes.

Uses of Counter in org.apache.lucene.search

Methods in org.apache.lucene.search that return Counter
static Counter TimeLimitingCollector.getGlobalCounter()
Returns the global TimerThreads Counter

Constructors in org.apache.lucene.search with parameters of type Counter
TimeLimitingCollector.TimerThread(Counter counter)
TimeLimitingCollector.TimerThread(long resolution, Counter counter)
TimeLimitingCollector(Collector collector, Counter clock, long ticksAllowed)
Create a TimeLimitedCollector wrapper over another Collector with a specified timeout.

Uses of Counter in org.apache.lucene.util

Methods in org.apache.lucene.util that return Counter
static Counter | Counter.newCounter() Returns a new counter.
static Counter | Counter.newCounter(boolean threadSafe) Returns a new counter.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.DocIdBitSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.DocIdBitSet

No usage of org.apache.lucene.util.DocIdBitSet

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.DoubleBarrelLRUCache.CloneableKey

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.DoubleBarrelLRUCache.CloneableKey

Packages that use DoubleBarrelLRUCache.CloneableKey
org.apache.lucene.util Some utility classes.

Uses of DoubleBarrelLRUCache.CloneableKey in org.apache.lucene.util

Classes in org.apache.lucene.util with type parameters of type DoubleBarrelLRUCache.CloneableKey
 class DoubleBarrelLRUCache<K extends DoubleBarrelLRUCache.CloneableKey,V>
Simple concurrent LRU cache, using a "double barrel" approach where two ConcurrentHashMaps record entries.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.DoubleBarrelLRUCache

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.DoubleBarrelLRUCache

No usage of org.apache.lucene.util.DoubleBarrelLRUCache

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.DummyConcurrentLock

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.DummyConcurrentLock

Packages that use DummyConcurrentLock
org.apache.lucene.util Some utility classes.

Uses of DummyConcurrentLock in org.apache.lucene.util

Fields in org.apache.lucene.util declared as DummyConcurrentLock
static DummyConcurrentLock DummyConcurrentLock.INSTANCE
a default instance, can be always used, as this Lock is stateless.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.English

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.English

No usage of org.apache.lucene.util.English

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.FieldCacheSanityChecker

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.FieldCacheSanityChecker

No usage of org.apache.lucene.util.FieldCacheSanityChecker

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.FieldCacheSanityChecker.Insanity

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.FieldCacheSanityChecker.Insanity

Packages that use FieldCacheSanityChecker.Insanity
org.apache.lucene.util Some utility classes.

Uses of FieldCacheSanityChecker.Insanity in org.apache.lucene.util

Methods in org.apache.lucene.util that return FieldCacheSanityChecker.Insanity
FieldCacheSanityChecker.Insanity[] | FieldCacheSanityChecker.check(FieldCache.CacheEntry... cacheEntries) Tests a CacheEntry[] for indication of "insane" cache usage.
static FieldCacheSanityChecker.Insanity[] | FieldCacheSanityChecker.checkSanity(FieldCache.CacheEntry... cacheEntries) Quick and dirty convenience method that instantiates an instance with "good defaults" and uses it to test the CacheEntrys
static FieldCacheSanityChecker.Insanity[] | FieldCacheSanityChecker.checkSanity(FieldCache cache) Quick and dirty convenience method

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.FieldCacheSanityChecker.InsanityType

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.FieldCacheSanityChecker.InsanityType

Packages that use FieldCacheSanityChecker.InsanityType
org.apache.lucene.util Some utility classes.

Uses of FieldCacheSanityChecker.InsanityType in org.apache.lucene.util

Fields in org.apache.lucene.util declared as FieldCacheSanityChecker.InsanityType
static FieldCacheSanityChecker.InsanityType | FieldCacheSanityChecker.InsanityType.EXPECTED Indicates an expected bit of "insanity".
static FieldCacheSanityChecker.InsanityType | FieldCacheSanityChecker.InsanityType.SUBREADER Indicates an overlap in cache usage on a given field in sub/super readers.
static FieldCacheSanityChecker.InsanityType | FieldCacheSanityChecker.InsanityType.VALUEMISMATCH Indicates entries have the same reader+fieldname but different cached values.

Methods in org.apache.lucene.util that return FieldCacheSanityChecker.InsanityType
 FieldCacheSanityChecker.InsanityType FieldCacheSanityChecker.Insanity.getType()
Type of insane behavior this object represents

Constructors in org.apache.lucene.util with parameters of type FieldCacheSanityChecker.InsanityType
FieldCacheSanityChecker.Insanity(FieldCacheSanityChecker.InsanityType type, String msg, FieldCache.CacheEntry... entries)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.FixedBitSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.FixedBitSet

Packages that use FixedBitSet
org.apache.lucene.search.grouping | This module enables search result grouping with Lucene, where hits with the same value in the specified single-valued group field are grouped together.
org.apache.lucene.util | Some utility classes.

Uses of FixedBitSet in org.apache.lucene.search.grouping

Methods in org.apache.lucene.search.grouping that return FixedBitSet
 FixedBitSet AbstractAllGroupHeadsCollector.retrieveGroupHeads(int maxDoc)

Uses of FixedBitSet in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type FixedBitSet
void | FixedBitSet.and(FixedBitSet other) this = this AND other
void | FixedBitSet.andNot(FixedBitSet other) this = this AND NOT other
void | FixedBitSet.or(FixedBitSet other) this = this OR other

Constructors in org.apache.lucene.util with parameters of type FixedBitSet
FixedBitSet(FixedBitSet other)
Makes full copy.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.IndexableBinaryStringTools

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.IndexableBinaryStringTools

No usage of org.apache.lucene.util.IndexableBinaryStringTools

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.IntsRef

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.IntsRef

Packages that use IntsRef
org.apache.lucene.analysis.ja.dict | Kuromoji dictionary implementation.
org.apache.lucene.util | Some utility classes.
org.apache.lucene.util.fst | Finite state transducers

Uses of IntsRef in org.apache.lucene.analysis.ja.dict

Methods in org.apache.lucene.analysis.ja.dict with parameters of type IntsRef
 void BinaryDictionary.lookupWordIds(int sourceId, IntsRef ref)

Uses of IntsRef in org.apache.lucene.util

Methods in org.apache.lucene.util that return IntsRef
IntsRef | IntsRef.clone()
static IntsRef | IntsRef.deepCopyOf(IntsRef other) Creates a new IntsRef that points to a copy of the ints from other

Methods in org.apache.lucene.util with parameters of type IntsRef
int | IntsRef.compareTo(IntsRef other) Signed int order comparison
void | IntsRef.copyInts(IntsRef other)
static IntsRef | IntsRef.deepCopyOf(IntsRef other) Creates a new IntsRef that points to a copy of the ints from other
boolean | IntsRef.intsEquals(IntsRef other)

Uses of IntsRef in org.apache.lucene.util.fst

Fields in org.apache.lucene.util.fst declared as IntsRef
IntsRef | Util.MinResult.input
IntsRef | IntsRefFSTEnum.InputOutput.input

Methods in org.apache.lucene.util.fst that return IntsRef
IntsRef | IntSequenceOutputs.add(IntsRef prefix, IntsRef output)
IntsRef | IntSequenceOutputs.common(IntsRef output1, IntsRef output2)
static IntsRef | Util.getByOutput(FST<Long> fst, long targetOutput) Reverse lookup (lookup by output instead of by input), in the special case when your FSTs outputs are strictly ascending.
IntsRef | IntSequenceOutputs.getNoOutput()
IntsRef | IntSequenceOutputs.read(DataInput in)
IntsRef | IntSequenceOutputs.subtract(IntsRef output, IntsRef inc)
static IntsRef | Util.toIntsRef(BytesRef input, IntsRef scratch) Just takes unsigned byte values from the BytesRef and converts into an IntsRef.
static IntsRef | Util.toUTF32(char[] s, int offset, int length, IntsRef scratch) Decodes the Unicode codepoints from the provided char[] and places them in the provided scratch IntsRef, which must not be null, returning it.
static IntsRef | Util.toUTF32(CharSequence s, IntsRef scratch) Decodes the Unicode codepoints from the provided CharSequence and places them in the provided scratch IntsRef, which must not be null, returning it.

Methods in org.apache.lucene.util.fst with parameters of type IntsRef
 IntsRef IntSequenceOutputs.add(IntsRef prefix, IntsRef output)
 void Builder.add(IntsRef input, T output)
It's OK to add the same input twice in a row with different outputs, as long as outputs impls the merge method.
 IntsRef IntSequenceOutputs.common(IntsRef output1, IntsRef output2)
abstract  void Builder.FreezeTail.freeze(Builder.UnCompiledNode<T>[] frontier, int prefixLenPlus1, IntsRef prevInput)
static
<T> T
Util.get(FST<T> fst, IntsRef input)
Looks up the output for this input, or null if the input is not accepted.
 String IntSequenceOutputs.outputToString(IntsRef output)
 IntsRefFSTEnum.InputOutput<T> IntsRefFSTEnum.seekCeil(IntsRef target)
Seeks to smallest term that's >= target.
 IntsRefFSTEnum.InputOutput<T> IntsRefFSTEnum.seekExact(IntsRef target)
Seeks to exactly this term, returning null if the term doesn't exist.
 IntsRefFSTEnum.InputOutput<T> IntsRefFSTEnum.seekFloor(IntsRef target)
Seeks to biggest term that's <= target.
 IntsRef IntSequenceOutputs.subtract(IntsRef output, IntsRef inc)
static BytesRef Util.toBytesRef(IntsRef input, BytesRef scratch)
Just converts IntsRef to BytesRef; you must ensure the int values fit into a byte.
static IntsRef Util.toIntsRef(BytesRef input, IntsRef scratch)
Just takes unsigned byte values from the BytesRef and converts into an IntsRef.
static IntsRef Util.toUTF32(char[] s, int offset, int length, IntsRef scratch)
Decodes the Unicode codepoints from the provided char[] and places them in the provided scratch IntsRef, which must not be null, returning it.
static IntsRef Util.toUTF32(CharSequence s, IntsRef scratch)
Decodes the Unicode codepoints from the provided CharSequence and places them in the provided scratch IntsRef, which must not be null, returning it.
 void IntSequenceOutputs.write(IntsRef prefix, DataOutput out)

Constructors in org.apache.lucene.util.fst with parameters of type IntsRef
Util.MinResult(IntsRef input, T output, Comparator<T> comparator)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.IOUtils

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.IOUtils

No usage of org.apache.lucene.util.IOUtils

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.LineFileDocs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.LineFileDocs

No usage of org.apache.lucene.util.LineFileDocs

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.LuceneJUnitDividingSelector

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.LuceneJUnitDividingSelector

No usage of org.apache.lucene.util.LuceneJUnitDividingSelector

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.LuceneJUnitResultFormatter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.LuceneJUnitResultFormatter

Packages that use LuceneJUnitResultFormatter
org.apache.lucene.util Some utility classes.

Uses of LuceneJUnitResultFormatter in org.apache.lucene.util

Methods in org.apache.lucene.util that return LuceneJUnitResultFormatter
LuceneJUnitResultFormatter | LuceneJUnitResultFormatter.append(long l)
LuceneJUnitResultFormatter | LuceneJUnitResultFormatter.append(String s)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.LuceneTestCase

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.LuceneTestCase

Packages that use LuceneTestCase
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.search | Code to search indices.
org.apache.lucene.util | Some utility classes.

Uses of LuceneTestCase in org.apache.lucene.analysis

Subclasses of LuceneTestCase in org.apache.lucene.analysis
class | BaseTokenStreamTestCase Base class for all Lucene unit tests that use TokenStreams.
class | CollationTestBase Base test class for testing Unicode collation.

Uses of LuceneTestCase in org.apache.lucene.index

Subclasses of LuceneTestCase in org.apache.lucene.index
 class ThreadedIndexingAndSearchingTestCase
Utility class that spawns multiple indexing and searching threads.

Uses of LuceneTestCase in org.apache.lucene.queryParser

Subclasses of LuceneTestCase in org.apache.lucene.queryParser
 class QueryParserTestBase
Base Test class for QueryParser subclasses

Uses of LuceneTestCase in org.apache.lucene.search

Subclasses of LuceneTestCase in org.apache.lucene.search
 class SearchEquivalenceTestBase
Simple base class for checking search equivalence.

Uses of LuceneTestCase in org.apache.lucene.util

Constructors in org.apache.lucene.util with parameters of type LuceneTestCase
UncaughtExceptionsRule(LuceneTestCase ltc)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.LuceneTestCase.Nightly

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.LuceneTestCase.Nightly

No usage of org.apache.lucene.util.LuceneTestCase.Nightly

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.LuceneTestCaseRunner

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.LuceneTestCaseRunner

No usage of org.apache.lucene.util.LuceneTestCaseRunner

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.MapBackedSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.MapBackedSet

No usage of org.apache.lucene.util.MapBackedSet

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.MapOfSets

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.MapOfSets

No usage of org.apache.lucene.util.MapOfSets

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.NamedThreadFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.NamedThreadFactory

No usage of org.apache.lucene.util.NamedThreadFactory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.NumericUtils

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.NumericUtils

No usage of org.apache.lucene.util.NumericUtils

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.NumericUtils.IntRangeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.NumericUtils.IntRangeBuilder

Packages that use NumericUtils.IntRangeBuilder
org.apache.lucene.util Some utility classes.

Uses of NumericUtils.IntRangeBuilder in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type NumericUtils.IntRangeBuilder
static void NumericUtils.splitIntRange(NumericUtils.IntRangeBuilder builder, int precisionStep, int minBound, int maxBound)
Expert: Splits an int range recursively.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.NumericUtils.LongRangeBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.NumericUtils.LongRangeBuilder

Packages that use NumericUtils.LongRangeBuilder
org.apache.lucene.util Some utility classes.

Uses of NumericUtils.LongRangeBuilder in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type NumericUtils.LongRangeBuilder
static void NumericUtils.splitLongRange(NumericUtils.LongRangeBuilder builder, int precisionStep, long minBound, long maxBound)
Expert: Splits a long range recursively.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.OpenBitSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.OpenBitSet

Packages that use OpenBitSet
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.util | Some utility classes.

Uses of OpenBitSet in org.apache.lucene.facet.search

Fields in org.apache.lucene.facet.search declared as OpenBitSet
protected  OpenBitSet ScoredDocIdCollector.docIds

Uses of OpenBitSet in org.apache.lucene.util

Subclasses of OpenBitSet in org.apache.lucene.util
 class OpenBitSetDISI
OpenBitSet with added methods to bulk-update the bits from a DocIdSetIterator.

Methods in org.apache.lucene.util with parameters of type OpenBitSet
void | OpenBitSet.and(OpenBitSet other)
void | OpenBitSet.andNot(OpenBitSet other)
static long | OpenBitSet.andNotCount(OpenBitSet a, OpenBitSet b) Returns the popcount or cardinality of "a and not b" or "intersection(a, not(b))".
void | OpenBitSet.intersect(OpenBitSet other) this = this AND other
static long | OpenBitSet.intersectionCount(OpenBitSet a, OpenBitSet b) Returns the popcount or cardinality of the intersection of the two sets.
boolean | OpenBitSet.intersects(OpenBitSet other) returns true if the sets have any elements in common
void | OpenBitSet.or(OpenBitSet other)
void | OpenBitSet.remove(OpenBitSet other) Remove all elements set in other.
void | OpenBitSet.union(OpenBitSet other) this = this OR other
static long | OpenBitSet.unionCount(OpenBitSet a, OpenBitSet b) Returns the popcount or cardinality of the union of the two sets.
void | OpenBitSet.xor(OpenBitSet other) this = this XOR other
static long | OpenBitSet.xorCount(OpenBitSet a, OpenBitSet b) Returns the popcount or cardinality of the exclusive-or of the two sets.

Constructors in org.apache.lucene.util with parameters of type OpenBitSet
OpenBitSetIterator(OpenBitSet obs)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.OpenBitSetDISI

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.OpenBitSetDISI

Packages that use OpenBitSetDISI
org.apache.lucene.search Code to search indices.

Uses of OpenBitSetDISI in org.apache.lucene.search

Methods in org.apache.lucene.search with parameters of type OpenBitSetDISI
protected  DocIdSet ChainedFilter.finalResult(OpenBitSetDISI result, int maxDocs)
Deprecated. Either use CachingWrapperFilter, or switch to a different DocIdSet implementation yourself. This method will be removed in Lucene 4.0

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.OpenBitSetIterator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.OpenBitSetIterator

No usage of org.apache.lucene.util.OpenBitSetIterator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.PagedBytes

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.PagedBytes

Packages that use PagedBytes
org.apache.lucene.util Some utility classes.

Uses of PagedBytes in org.apache.lucene.util

Constructors in org.apache.lucene.util with parameters of type PagedBytes
PagedBytes.Reader(PagedBytes pagedBytes)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.PagedBytes.PagedBytesDataInput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.PagedBytes.PagedBytesDataInput

Packages that use PagedBytes.PagedBytesDataInput
org.apache.lucene.util Some utility classes.

Uses of PagedBytes.PagedBytesDataInput in org.apache.lucene.util

Methods in org.apache.lucene.util that return PagedBytes.PagedBytesDataInput
 PagedBytes.PagedBytesDataInput PagedBytes.getDataInput()
Returns a DataInput to read values from this PagedBytes instance.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.PagedBytes.PagedBytesDataOutput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.PagedBytes.PagedBytesDataOutput

Packages that use PagedBytes.PagedBytesDataOutput
org.apache.lucene.util Some utility classes.

Uses of PagedBytes.PagedBytesDataOutput in org.apache.lucene.util

Methods in org.apache.lucene.util that return PagedBytes.PagedBytesDataOutput
 PagedBytes.PagedBytesDataOutput PagedBytes.getDataOutput()
Returns a DataOutput that you may use to write into this PagedBytes instance.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.PagedBytes.Reader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.PagedBytes.Reader

Packages that use PagedBytes.Reader
org.apache.lucene.util Some utility classes.

Uses of PagedBytes.Reader in org.apache.lucene.util

Methods in org.apache.lucene.util that return PagedBytes.Reader
 PagedBytes.Reader PagedBytes.freeze(boolean trim)
Commits final byte[], trimming it if necessary and if trim=true

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.Parameter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.Parameter

No usage of org.apache.lucene.util.Parameter

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.PriorityQueue

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.PriorityQueue

Packages that use PriorityQueue
org.apache.lucene.search | Code to search indices.
org.apache.lucene.search.similar | Document similarity query generators.
org.apache.lucene.search.spell | Suggest alternate spellings for words.
org.apache.lucene.search.suggest | Support for Autocomplete/Autosuggest

Uses of PriorityQueue in org.apache.lucene.search

Subclasses of PriorityQueue in org.apache.lucene.search
 class FieldValueHitQueue<T extends FieldValueHitQueue.Entry>
Expert: A hit queue for sorting by hits by terms in more than one field.

Fields in org.apache.lucene.search declared as PriorityQueue
protected  PriorityQueue<T> TopDocsCollector.pq
The priority queue which holds the top documents.

Constructors in org.apache.lucene.search with parameters of type PriorityQueue
TopDocsCollector(PriorityQueue<T> pq)

Uses of PriorityQueue in org.apache.lucene.search.similar

Methods in org.apache.lucene.search.similar that return PriorityQueue
 PriorityQueue<Object[]> MoreLikeThis.retrieveTerms(int docNum)
Find words for a more-like-this query former.
 PriorityQueue<Object[]> MoreLikeThis.retrieveTerms(Reader r)
Deprecated. use MoreLikeThis.retrieveTerms(Reader, String) instead
 PriorityQueue<Object[]> MoreLikeThis.retrieveTerms(Reader r, String fieldName)
Find words for a more-like-this query former.

Uses of PriorityQueue in org.apache.lucene.search.spell

Subclasses of PriorityQueue in org.apache.lucene.search.spell
 class SuggestWordQueue
Sorts SuggestWord instances

Uses of PriorityQueue in org.apache.lucene.search.suggest

Subclasses of PriorityQueue in org.apache.lucene.search.suggest
static class Lookup.LookupPriorityQueue
A PriorityQueue collecting a fixed size of high priority Lookup.LookupResult

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.RamUsageEstimator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.RamUsageEstimator

No usage of org.apache.lucene.util.RamUsageEstimator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.RamUsageEstimator.JvmFeature

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.RamUsageEstimator.JvmFeature

Packages that use RamUsageEstimator.JvmFeature
org.apache.lucene.util Some utility classes.

Uses of RamUsageEstimator.JvmFeature in org.apache.lucene.util

Methods in org.apache.lucene.util that return RamUsageEstimator.JvmFeature
static RamUsageEstimator.JvmFeature | RamUsageEstimator.JvmFeature.valueOf(String name) Returns the enum constant of this type with the specified name.
static RamUsageEstimator.JvmFeature[] | RamUsageEstimator.JvmFeature.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.util that return types with arguments of type RamUsageEstimator.JvmFeature
static EnumSet<RamUsageEstimator.JvmFeature> | RamUsageEstimator.getSupportedFeatures() Return the set of supported JVM features that improve the estimation.
static EnumSet<RamUsageEstimator.JvmFeature> | RamUsageEstimator.getUnsupportedFeatures() Return the set of unsupported JVM features that improve the estimation.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.ReaderUtil.Gather

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.ReaderUtil.Gather

No usage of org.apache.lucene.util.ReaderUtil.Gather

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.ReaderUtil

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.ReaderUtil

No usage of org.apache.lucene.util.ReaderUtil

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.RecyclingByteBlockAllocator

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.RecyclingByteBlockAllocator

No usage of org.apache.lucene.util.RecyclingByteBlockAllocator

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.Rethrow

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.Rethrow

No usage of org.apache.lucene.util.Rethrow

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.RollingBuffer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.RollingBuffer

Packages that use RollingBuffer
org.apache.lucene.analysis API and code to convert text into indexable/searchable tokens.

Uses of RollingBuffer in org.apache.lucene.analysis

Fields in org.apache.lucene.analysis declared as RollingBuffer
protected  RollingBuffer<T> LookaheadTokenFilter.positions

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.util.RollingBuffer.Resettable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.util.RollingBuffer.Resettable

Packages that use RollingBuffer.Resettable
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.util | Some utility classes.

Uses of RollingBuffer.Resettable in org.apache.lucene.analysis

Classes in org.apache.lucene.analysis that implement RollingBuffer.Resettable
protected static class LookaheadTokenFilter.Position
Holds all state for a single position; subclass this to record other state at each position.

Uses of RollingBuffer.Resettable in org.apache.lucene.util

Classes in org.apache.lucene.util with type parameters of type RollingBuffer.Resettable
 class RollingBuffer<T extends RollingBuffer.Resettable>
Acts like forever growing T[], but internally uses a circular buffer to reuse instances of T.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.RollingCharBuffer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.RollingCharBuffer

No usage of org.apache.lucene.util.RollingCharBuffer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.ScorerDocQueue

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.ScorerDocQueue

No usage of org.apache.lucene.util.ScorerDocQueue

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.SetOnce.AlreadySetException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.SetOnce.AlreadySetException

No usage of org.apache.lucene.util.SetOnce.AlreadySetException

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.SetOnce

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.SetOnce

Packages that use SetOnce
org.apache.lucene.index Code to maintain and access indices.

Uses of SetOnce in org.apache.lucene.index

Fields in org.apache.lucene.index declared as SetOnce
protected  SetOnce<IndexWriter> MergePolicy.writer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.SimpleStringInterner

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.SimpleStringInterner

No usage of org.apache.lucene.util.SimpleStringInterner

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.SmallFloat

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.SmallFloat

No usage of org.apache.lucene.util.SmallFloat

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.SmartRandom

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.SmartRandom

Packages that use SmartRandom
org.apache.lucene.util Some utility classes.

Uses of SmartRandom in org.apache.lucene.util

Fields in org.apache.lucene.util declared as SmartRandom
protected static SmartRandom LuceneTestCase.random

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.SortedVIntList

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.SortedVIntList

No usage of org.apache.lucene.util.SortedVIntList

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.SorterTemplate

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.SorterTemplate

No usage of org.apache.lucene.util.SorterTemplate

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.StoreClassNameRule

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.StoreClassNameRule

No usage of org.apache.lucene.util.StoreClassNameRule

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.StringHelper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.StringHelper

No usage of org.apache.lucene.util.StringHelper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.StringInterner

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.StringInterner

Packages that use StringInterner
org.apache.lucene.util Some utility classes.

Uses of StringInterner in org.apache.lucene.util

Subclasses of StringInterner in org.apache.lucene.util
 class SimpleStringInterner
Simple lockless and memory barrier free String intern cache that is guaranteed to return the same String instance as String.intern() does.

Fields in org.apache.lucene.util declared as StringInterner
static StringInterner StringHelper.interner
Expert: The StringInterner implementation used by Lucene.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.SystemPropertiesInvariantRule

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.SystemPropertiesInvariantRule

No usage of org.apache.lucene.util.SystemPropertiesInvariantRule

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.SystemPropertiesRestoreRule

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.SystemPropertiesRestoreRule

No usage of org.apache.lucene.util.SystemPropertiesRestoreRule

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.ThreadInterruptedException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.ThreadInterruptedException

No usage of org.apache.lucene.util.ThreadInterruptedException

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.ThrottledIndexOutput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.ThrottledIndexOutput

Packages that use ThrottledIndexOutput
org.apache.lucene.util Some utility classes.

Uses of ThrottledIndexOutput in org.apache.lucene.util

Methods in org.apache.lucene.util that return ThrottledIndexOutput
 ThrottledIndexOutput ThrottledIndexOutput.newFromDelegate(IndexOutput output)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.ToStringUtils

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.ToStringUtils

No usage of org.apache.lucene.util.ToStringUtils

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.util.TwoPhaseCommit

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.util.TwoPhaseCommit

Packages that use TwoPhaseCommit
org.apache.lucene.facet.taxonomy | Taxonomy of Categories
org.apache.lucene.facet.taxonomy.directory | Taxonomy implemented using a Lucene-Index
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.util | Some utility classes.

Uses of TwoPhaseCommit in org.apache.lucene.facet.taxonomy

Subinterfaces of TwoPhaseCommit in org.apache.lucene.facet.taxonomy
 interface TaxonomyWriter
TaxonomyWriter is the interface which the faceted-search library uses to dynamically build the taxonomy at indexing time.

Uses of TwoPhaseCommit in org.apache.lucene.facet.taxonomy.directory

Classes in org.apache.lucene.facet.taxonomy.directory that implement TwoPhaseCommit
 class DirectoryTaxonomyWriter
TaxonomyWriter which uses a Directory to store the taxonomy information on disk, and keeps an additional in-memory cache of some or all categories.

Uses of TwoPhaseCommit in org.apache.lucene.index

Classes in org.apache.lucene.index that implement TwoPhaseCommit
 class IndexWriter
An IndexWriter creates and maintains an index.

Uses of TwoPhaseCommit in org.apache.lucene.util

Classes in org.apache.lucene.util that implement TwoPhaseCommit
static class TwoPhaseCommitTool.TwoPhaseCommitWrapper
A wrapper of a TwoPhaseCommit, which delegates all calls to the wrapped object, passing the specified commitData.

Methods in org.apache.lucene.util with parameters of type TwoPhaseCommit
static void TwoPhaseCommitTool.execute(TwoPhaseCommit... objects)
Executes a 2-phase commit algorithm by first prepareCommit() all objects and only if all succeed, it proceeds with commit().

Constructors in org.apache.lucene.util with parameters of type TwoPhaseCommit
TwoPhaseCommitTool.CommitFailException(Throwable cause, TwoPhaseCommit obj)
TwoPhaseCommitTool.PrepareCommitFailException(Throwable cause, TwoPhaseCommit obj)
TwoPhaseCommitTool.TwoPhaseCommitWrapper(TwoPhaseCommit tpc, Map<String,String> commitData)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.TwoPhaseCommitTool.CommitFailException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.TwoPhaseCommitTool.CommitFailException

Packages that use TwoPhaseCommitTool.CommitFailException
org.apache.lucene.util Some utility classes.

Uses of TwoPhaseCommitTool.CommitFailException in org.apache.lucene.util

Methods in org.apache.lucene.util that throw TwoPhaseCommitTool.CommitFailException
static void TwoPhaseCommitTool.execute(TwoPhaseCommit... objects)
Executes a 2-phase commit algorithm by first TwoPhaseCommit.prepareCommit() all objects and only if all succeed, it proceeds with TwoPhaseCommit.commit().

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.TwoPhaseCommitTool

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.TwoPhaseCommitTool

No usage of org.apache.lucene.util.TwoPhaseCommitTool

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.TwoPhaseCommitTool.PrepareCommitFailException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.TwoPhaseCommitTool.PrepareCommitFailException

Packages that use TwoPhaseCommitTool.PrepareCommitFailException
org.apache.lucene.util Some utility classes.

Uses of TwoPhaseCommitTool.PrepareCommitFailException in org.apache.lucene.util

Methods in org.apache.lucene.util that throw TwoPhaseCommitTool.PrepareCommitFailException
static void TwoPhaseCommitTool.execute(TwoPhaseCommit... objects)
Executes a 2-phase commit algorithm by first TwoPhaseCommit.prepareCommit() all objects and only if all succeed, it proceeds with TwoPhaseCommit.commit().

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.TwoPhaseCommitTool.TwoPhaseCommitWrapper

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.TwoPhaseCommitTool.TwoPhaseCommitWrapper

No usage of org.apache.lucene.util.TwoPhaseCommitTool.TwoPhaseCommitWrapper

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.UncaughtExceptionsRule

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.UncaughtExceptionsRule

No usage of org.apache.lucene.util.UncaughtExceptionsRule

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.UncaughtExceptionsRule.UncaughtExceptionEntry

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.UncaughtExceptionsRule.UncaughtExceptionEntry

No usage of org.apache.lucene.util.UncaughtExceptionsRule.UncaughtExceptionEntry

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.UnicodeUtil

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.UnicodeUtil

No usage of org.apache.lucene.util.UnicodeUtil

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.UnicodeUtil.UTF16Result

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.UnicodeUtil.UTF16Result

Packages that use UnicodeUtil.UTF16Result
org.apache.lucene.util Some utility classes.

Uses of UnicodeUtil.UTF16Result in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type UnicodeUtil.UTF16Result
void | UnicodeUtil.UTF16Result.copyText(UnicodeUtil.UTF16Result other)
static void | UnicodeUtil.UTF8toUTF16(byte[] utf8, int offset, int length, UnicodeUtil.UTF16Result result) Convert UTF8 bytes into UTF16 characters.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.UnicodeUtil.UTF8Result

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.UnicodeUtil.UTF8Result

Packages that use UnicodeUtil.UTF8Result
org.apache.lucene.util Some utility classes.

Uses of UnicodeUtil.UTF8Result in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type UnicodeUtil.UTF8Result
static void | UnicodeUtil.UTF16toUTF8(char[] source, int offset, int length, UnicodeUtil.UTF8Result result) Encode characters from a char[] source, starting at offset for length chars.
static void | UnicodeUtil.UTF16toUTF8(char[] source, int offset, UnicodeUtil.UTF8Result result) Encode characters from a char[] source, starting at offset and stopping when the character 0xffff is seen.
static void | UnicodeUtil.UTF16toUTF8(String s, int offset, int length, UnicodeUtil.UTF8Result result) Encode characters from this String, starting at offset for length characters.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.UnsafeByteArrayInputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.UnsafeByteArrayInputStream

No usage of org.apache.lucene.util.UnsafeByteArrayInputStream

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.UnsafeByteArrayOutputStream

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.UnsafeByteArrayOutputStream

No usage of org.apache.lucene.util.UnsafeByteArrayOutputStream

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.Version

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.Version

Packages that use Version
org.apache.lucene.analysis | API and code to convert text into indexable/searchable tokens.
org.apache.lucene.analysis.ar | Analyzer for Arabic.
org.apache.lucene.analysis.bg | Analyzer for Bulgarian.
org.apache.lucene.analysis.br | Analyzer for Brazilian Portuguese.
org.apache.lucene.analysis.ca | Analyzer for Catalan.
org.apache.lucene.analysis.cjk | Analyzer for Chinese, Japanese, and Korean, which indexes bigrams (overlapping groups of two adjacent Han characters).
org.apache.lucene.analysis.cn.smart | Analyzer for Simplified Chinese, which indexes words.
org.apache.lucene.analysis.compound | A filter that decomposes compound words you find in many Germanic languages into the word parts.
org.apache.lucene.analysis.cz | Analyzer for Czech.
org.apache.lucene.analysis.da | Analyzer for Danish.
org.apache.lucene.analysis.de | Analyzer for German.
org.apache.lucene.analysis.el | Analyzer for Greek.
org.apache.lucene.analysis.en | Analyzer for English.
org.apache.lucene.analysis.es | Analyzer for Spanish.
org.apache.lucene.analysis.eu | Analyzer for Basque.
org.apache.lucene.analysis.fa | Analyzer for Persian.
org.apache.lucene.analysis.fi | Analyzer for Finnish.
org.apache.lucene.analysis.fr | Analyzer for French.
org.apache.lucene.analysis.ga | Analysis for Irish.
org.apache.lucene.analysis.gl | Analyzer for Galician.
org.apache.lucene.analysis.hi | Analyzer for Hindi.
org.apache.lucene.analysis.hu | Analyzer for Hungarian.
org.apache.lucene.analysis.hunspell | Stemming TokenFilter using a Java implementation of the Hunspell stemming algorithm.
org.apache.lucene.analysis.hy | Analyzer for Armenian.
org.apache.lucene.analysis.id | Analyzer for Indonesian.
org.apache.lucene.analysis.in | Analysis components for Indian languages.
org.apache.lucene.analysis.it | Analyzer for Italian.
org.apache.lucene.analysis.ja | Analyzer for Japanese.
org.apache.lucene.analysis.lv | Analyzer for Latvian.
org.apache.lucene.analysis.miscellaneous | Miscellaneous TokenStreams
org.apache.lucene.analysis.nl | Analyzer for Dutch.
org.apache.lucene.analysis.no | Analyzer for Norwegian.
org.apache.lucene.analysis.pl | Analyzer for Polish.
org.apache.lucene.analysis.pt | Analyzer for Portuguese.
org.apache.lucene.analysis.query | Automatically filter high-frequency stopwords.
org.apache.lucene.analysis.reverse | Filter to reverse token text.
org.apache.lucene.analysis.ro | Analyzer for Romanian.
org.apache.lucene.analysis.ru | Analyzer for Russian.
org.apache.lucene.analysis.shingle | Word n-gram filters
org.apache.lucene.analysis.snowball | TokenFilter and Analyzer implementations that use Snowball stemmers.
org.apache.lucene.analysis.standard | Standards-based analyzers implemented with JFlex.
org.apache.lucene.analysis.sv | Analyzer for Swedish.
org.apache.lucene.analysis.th | Analyzer for Thai.
org.apache.lucene.analysis.tr | Analyzer for Turkish.
org.apache.lucene.index | Code to maintain and access indices.
org.apache.lucene.queryParser | A simple query parser implemented with JavaCC.
org.apache.lucene.queryParser.analyzing | QueryParser that passes Fuzzy-, Prefix-, Range-, and WildcardQuerys through the given analyzer.
org.apache.lucene.queryParser.complexPhrase | QueryParser which permits complex phrase query syntax eg "(john jon jonathan~) peters*"
org.apache.lucene.queryParser.ext | Extendable QueryParser provides a simple and flexible extension mechanism by overloading query field names.
org.apache.lucene.util | Some utility classes.

Uses of Version in org.apache.lucene.analysis

Fields in org.apache.lucene.analysis declared as Version
protected  Version StopwordAnalyzerBase.matchVersion

Methods in org.apache.lucene.analysis with parameters of type Version
static
<V> CharArrayMap<V>
CharArrayMap.copy(Version matchVersion, Map<?,? extends V> map)
Returns a copy of the given map as a CharArrayMap.
static CharArraySet CharArraySet.copy(Version matchVersion, Set<?> set)
Returns a copy of the given set as a CharArraySet.
static boolean StopFilter.getEnablePositionIncrementsVersionDefault(Version matchVersion)
Deprecated. use StopFilter.StopFilter(Version, TokenStream, Set) instead
static CharArraySet WordlistLoader.getSnowballWordSet(Reader reader, Version matchVersion)
Reads stopwords from a stopword list in Snowball format.
static CharArraySet WordlistLoader.getWordSet(Reader reader, String comment, Version matchVersion)
Reads lines from a Reader and adds every non-comment line as an entry to a CharArraySet (omitting leading and trailing whitespace).
static CharArraySet WordlistLoader.getWordSet(Reader reader, Version matchVersion)
Reads lines from a Reader and adds every line as an entry to a CharArraySet (omitting leading and trailing whitespace).
protected static CharArraySet StopwordAnalyzerBase.loadStopwordSet(File stopwords, Version matchVersion)
Creates a CharArraySet from a file.
protected static CharArraySet StopwordAnalyzerBase.loadStopwordSet(Reader stopwords, Version matchVersion)
Creates a CharArraySet from a file.
static Set<Object> StopFilter.makeStopSet(Version matchVersion, List<?> stopWords)
Builds a Set from an array of stop words, appropriate for passing into the StopFilter constructor.
static Set<Object> StopFilter.makeStopSet(Version matchVersion, List<?> stopWords, boolean ignoreCase)
Creates a stopword set from the given stopword list.
static Set<Object> StopFilter.makeStopSet(Version matchVersion, String... stopWords)
Builds a Set from an array of stop words, appropriate for passing into the StopFilter constructor.
static Set<Object> StopFilter.makeStopSet(Version matchVersion, String[] stopWords, boolean ignoreCase)
Creates a stopword set from the given stopword array.

Constructors in org.apache.lucene.analysis with parameters of type Version
CharArrayMap(Version matchVersion, int startSize, boolean ignoreCase)
Create map with enough capacity to hold startSize terms
CharArrayMap(Version matchVersion, Map<?,? extends V> c, boolean ignoreCase)
Creates a map from the mappings in another map.
CharArraySet(Version matchVersion, Collection<?> c, boolean ignoreCase)
Creates a set from a Collection of objects.
CharArraySet(Version matchVersion, int startSize, boolean ignoreCase)
Create set with enough capacity to hold startSize terms
CharTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader input)
Creates a new CharTokenizer instance
CharTokenizer(Version matchVersion, AttributeSource source, Reader input)
Creates a new CharTokenizer instance
CharTokenizer(Version matchVersion, Reader input)
Creates a new CharTokenizer instance
LetterTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader in)
Construct a new LetterTokenizer using a given AttributeSource.AttributeFactory.
LetterTokenizer(Version matchVersion, AttributeSource source, Reader in)
Construct a new LetterTokenizer using a given AttributeSource.
LetterTokenizer(Version matchVersion, Reader in)
Construct a new LetterTokenizer.
LowerCaseFilter(Version matchVersion, TokenStream in)
Create a new LowerCaseFilter, that normalizes token text to lower case.
LowerCaseTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader in)
Construct a new LowerCaseTokenizer using a given AttributeSource.AttributeFactory.
LowerCaseTokenizer(Version matchVersion, AttributeSource source, Reader in)
Construct a new LowerCaseTokenizer using a given AttributeSource.
LowerCaseTokenizer(Version matchVersion, Reader in)
Construct a new LowerCaseTokenizer.
SimpleAnalyzer(Version matchVersion)
Creates a new SimpleAnalyzer
StopAnalyzer(Version matchVersion)
Builds an analyzer which removes words in StopAnalyzer.ENGLISH_STOP_WORDS_SET.
StopAnalyzer(Version matchVersion, File stopwordsFile)
Builds an analyzer with the stop words from the given file.
StopAnalyzer(Version matchVersion, Reader stopwords)
Builds an analyzer with the stop words from the given reader.
StopAnalyzer(Version matchVersion, Set<?> stopWords)
Builds an analyzer with the stop words from the given set.
StopFilter(Version matchVersion, TokenStream in, Set<?> stopWords)
Constructs a filter which removes words from the input TokenStream that are named in the Set.
StopFilter(Version matchVersion, TokenStream input, Set<?> stopWords, boolean ignoreCase)
Deprecated. Use StopFilter.StopFilter(Version, TokenStream, Set) instead
StopwordAnalyzerBase(Version version)
Creates a new Analyzer with an empty stopword set
StopwordAnalyzerBase(Version version, Set<?> stopwords)
Creates a new instance initialized with the given stopword set
WhitespaceAnalyzer(Version matchVersion)
Creates a new WhitespaceAnalyzer
WhitespaceTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader in)
Construct a new WhitespaceTokenizer using a given AttributeSource.AttributeFactory.
WhitespaceTokenizer(Version matchVersion, AttributeSource source, Reader in)
Construct a new WhitespaceTokenizer using a given AttributeSource.
WhitespaceTokenizer(Version matchVersion, Reader in)
Construct a new WhitespaceTokenizer.

Uses of Version in org.apache.lucene.analysis.ar

Constructors in org.apache.lucene.analysis.ar with parameters of type Version
ArabicAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: ArabicAnalyzer.DEFAULT_STOPWORD_FILE.
ArabicAnalyzer(Version matchVersion, File stopwords)
Deprecated. use ArabicAnalyzer.ArabicAnalyzer(Version, Set) instead
ArabicAnalyzer(Version matchVersion, Hashtable<?,?> stopwords)
Deprecated. use ArabicAnalyzer.ArabicAnalyzer(Version, Set) instead
ArabicAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
ArabicAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop word.
ArabicAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use ArabicAnalyzer.ArabicAnalyzer(Version, Set) instead
ArabicLetterTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader in)
Deprecated. Construct a new ArabicLetterTokenizer using a given AttributeSource.AttributeFactory.
ArabicLetterTokenizer(Version matchVersion, AttributeSource source, Reader in)
Deprecated. Construct a new ArabicLetterTokenizer using a given AttributeSource.
ArabicLetterTokenizer(Version matchVersion, Reader in)
Deprecated. Construct a new ArabicLetterTokenizer.

Uses of Version in org.apache.lucene.analysis.bg

Constructors in org.apache.lucene.analysis.bg with parameters of type Version
BulgarianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: BulgarianAnalyzer.DEFAULT_STOPWORD_FILE.
BulgarianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
BulgarianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words and a stem exclusion set.

Uses of Version in org.apache.lucene.analysis.br

Constructors in org.apache.lucene.analysis.br with parameters of type Version
BrazilianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (BrazilianAnalyzer.getDefaultStopSet()).
BrazilianAnalyzer(Version matchVersion, File stopwords)
Deprecated. use BrazilianAnalyzer.BrazilianAnalyzer(Version, Set) instead
BrazilianAnalyzer(Version matchVersion, Map<?,?> stopwords)
Deprecated. use BrazilianAnalyzer.BrazilianAnalyzer(Version, Set) instead
BrazilianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
BrazilianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words and stemming exclusion words
BrazilianAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use BrazilianAnalyzer.BrazilianAnalyzer(Version, Set) instead

Uses of Version in org.apache.lucene.analysis.ca

Constructors in org.apache.lucene.analysis.ca with parameters of type Version
CatalanAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: CatalanAnalyzer.DEFAULT_STOPWORD_FILE.
CatalanAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
CatalanAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.cjk

Constructors in org.apache.lucene.analysis.cjk with parameters of type Version
CJKAnalyzer(Version matchVersion)
Builds an analyzer which removes words in CJKAnalyzer.getDefaultStopSet().
CJKAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
CJKAnalyzer(Version matchVersion, String... stopWords)
Deprecated. use CJKAnalyzer.CJKAnalyzer(Version, Set) instead

Uses of Version in org.apache.lucene.analysis.cn.smart

Constructors in org.apache.lucene.analysis.cn.smart with parameters of type Version
SmartChineseAnalyzer(Version matchVersion)
Create a new SmartChineseAnalyzer, using the default stopword list.
SmartChineseAnalyzer(Version matchVersion, boolean useDefaultStopWords)
Create a new SmartChineseAnalyzer, optionally using the default stopword list.
SmartChineseAnalyzer(Version matchVersion, Set stopWords)
Create a new SmartChineseAnalyzer, using the provided Set of stopwords.

Uses of Version in org.apache.lucene.analysis.compound

Methods in org.apache.lucene.analysis.compound with parameters of type Version
static CharArraySet CompoundWordTokenFilterBase.makeDictionary(Version matchVersion, String[] dictionary)
Deprecated. Only available for backwards compatibility.

Constructors in org.apache.lucene.analysis.compound with parameters of type Version
CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, Set<?> dictionary)
CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, Set<?> dictionary, boolean onlyLongestMatch)
CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, String[] dictionary)
CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, String[] dictionary, boolean onlyLongestMatch)
CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, Set<?> dictionary)
Creates a new DictionaryCompoundWordTokenFilter
DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Creates a new DictionaryCompoundWordTokenFilter
DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, String[] dictionary)
Deprecated. Use the constructors taking Set
DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. Use the constructors taking Set
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator)
Create a HyphenationCompoundWordTokenFilter with no dictionary.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, int minWordSize, int minSubwordSize, int maxSubwordSize)
Create a HyphenationCompoundWordTokenFilter with no dictionary.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, Set<?> dictionary)
Creates a new HyphenationCompoundWordTokenFilter instance.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, Set<?> dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Creates a new HyphenationCompoundWordTokenFilter instance.
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, String[] dictionary)
Deprecated. Use the constructors taking Set
HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, String[] dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, boolean onlyLongestMatch)
Deprecated. Use the constructors taking Set

Uses of Version in org.apache.lucene.analysis.cz

Constructors in org.apache.lucene.analysis.cz with parameters of type Version
CzechAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (CzechAnalyzer.getDefaultStopSet()).
CzechAnalyzer(Version matchVersion, File stopwords)
Deprecated. use CzechAnalyzer.CzechAnalyzer(Version, Set) instead
CzechAnalyzer(Version matchVersion, HashSet<?> stopwords)
Deprecated. use CzechAnalyzer.CzechAnalyzer(Version, Set) instead
CzechAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
CzechAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionTable)
Builds an analyzer with the given stop words and a set of work to be excluded from the CzechStemFilter.
CzechAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use CzechAnalyzer.CzechAnalyzer(Version, Set) instead

Uses of Version in org.apache.lucene.analysis.da

Constructors in org.apache.lucene.analysis.da with parameters of type Version
DanishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: DanishAnalyzer.DEFAULT_STOPWORD_FILE.
DanishAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
DanishAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.de

Constructors in org.apache.lucene.analysis.de with parameters of type Version
GermanAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: GermanAnalyzer.getDefaultStopSet().
GermanAnalyzer(Version matchVersion, File stopwords)
Deprecated. use GermanAnalyzer.GermanAnalyzer(Version, Set)
GermanAnalyzer(Version matchVersion, Map<?,?> stopwords)
Deprecated. use GermanAnalyzer.GermanAnalyzer(Version, Set)
GermanAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
GermanAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words
GermanAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use GermanAnalyzer.GermanAnalyzer(Version, Set)

Uses of Version in org.apache.lucene.analysis.el

Constructors in org.apache.lucene.analysis.el with parameters of type Version
GreekAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words.
GreekAnalyzer(Version matchVersion, Map<?,?> stopwords)
Deprecated. use GreekAnalyzer.GreekAnalyzer(Version, Set) instead
GreekAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
GreekAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use GreekAnalyzer.GreekAnalyzer(Version, Set) instead
GreekLowerCaseFilter(Version matchVersion, TokenStream in)
Create a GreekLowerCaseFilter that normalizes Greek token text.

Uses of Version in org.apache.lucene.analysis.en

Constructors in org.apache.lucene.analysis.en with parameters of type Version
EnglishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: EnglishAnalyzer.getDefaultStopSet().
EnglishAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
EnglishAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.
EnglishPossessiveFilter(Version version, TokenStream input)

Uses of Version in org.apache.lucene.analysis.es

Constructors in org.apache.lucene.analysis.es with parameters of type Version
SpanishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: SpanishAnalyzer.DEFAULT_STOPWORD_FILE.
SpanishAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
SpanishAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.eu

Constructors in org.apache.lucene.analysis.eu with parameters of type Version
BasqueAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: BasqueAnalyzer.DEFAULT_STOPWORD_FILE.
BasqueAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
BasqueAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.fa

Constructors in org.apache.lucene.analysis.fa with parameters of type Version
PersianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: PersianAnalyzer.DEFAULT_STOPWORD_FILE.
PersianAnalyzer(Version matchVersion, File stopwords)
Deprecated. use PersianAnalyzer.PersianAnalyzer(Version, Set) instead
PersianAnalyzer(Version matchVersion, Hashtable<?,?> stopwords)
Deprecated. use PersianAnalyzer.PersianAnalyzer(Version, Set) instead
PersianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
PersianAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use PersianAnalyzer.PersianAnalyzer(Version, Set) instead

Uses of Version in org.apache.lucene.analysis.fi

Constructors in org.apache.lucene.analysis.fi with parameters of type Version
FinnishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: FinnishAnalyzer.DEFAULT_STOPWORD_FILE.
FinnishAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
FinnishAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.fr

Methods in org.apache.lucene.analysis.fr with parameters of type Version
 void ElisionFilter.setArticles(Version matchVersion, Set<?> articles)
Deprecated. use ElisionFilter.ElisionFilter(Version, TokenStream, Set) instead

Constructors in org.apache.lucene.analysis.fr with parameters of type Version
ElisionFilter(Version matchVersion, TokenStream input)
Constructs an elision filter with standard stop words
ElisionFilter(Version matchVersion, TokenStream input, Set<?> articles)
Constructs an elision filter with a Set of stop words
FrenchAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (FrenchAnalyzer.getDefaultStopSet()).
FrenchAnalyzer(Version matchVersion, File stopwords)
Deprecated. use FrenchAnalyzer.FrenchAnalyzer(Version, Set) instead
FrenchAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
FrenchAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclutionSet)
Builds an analyzer with the given stop words
FrenchAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use FrenchAnalyzer.FrenchAnalyzer(Version, Set) instead

Uses of Version in org.apache.lucene.analysis.ga

Constructors in org.apache.lucene.analysis.ga with parameters of type Version
IrishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: IrishAnalyzer.DEFAULT_STOPWORD_FILE.
IrishAnalyzer(Version matchVersion, CharArraySet stopwords)
Builds an analyzer with the given stop words.
IrishAnalyzer(Version matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.gl

Constructors in org.apache.lucene.analysis.gl with parameters of type Version
GalicianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: GalicianAnalyzer.DEFAULT_STOPWORD_FILE.
GalicianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
GalicianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.hi

Constructors in org.apache.lucene.analysis.hi with parameters of type Version
HindiAnalyzer(Version version)
Builds an analyzer with the default stop words: HindiAnalyzer.DEFAULT_STOPWORD_FILE.
HindiAnalyzer(Version version, Set<?> stopwords)
Builds an analyzer with the given stop words
HindiAnalyzer(Version version, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words

Uses of Version in org.apache.lucene.analysis.hu

Constructors in org.apache.lucene.analysis.hu with parameters of type Version
HungarianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: HungarianAnalyzer.DEFAULT_STOPWORD_FILE.
HungarianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
HungarianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.hunspell

Methods in org.apache.lucene.analysis.hunspell that return Version
 Version HunspellDictionary.getVersion()

Constructors in org.apache.lucene.analysis.hunspell with parameters of type Version
HunspellDictionary(InputStream affix, InputStream dictionary, Version version)
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files.
HunspellDictionary(InputStream affix, InputStream dictionary, Version version, boolean ignoreCase)
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files.
HunspellDictionary(InputStream affix, List<InputStream> dictionaries, Version version, boolean ignoreCase)
Creates a new HunspellDictionary containing the information read from the provided InputStreams to hunspell affix and dictionary files.

Uses of Version in org.apache.lucene.analysis.hy

Constructors in org.apache.lucene.analysis.hy with parameters of type Version
ArmenianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: ArmenianAnalyzer.DEFAULT_STOPWORD_FILE.
ArmenianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
ArmenianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.id

Constructors in org.apache.lucene.analysis.id with parameters of type Version
IndonesianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: IndonesianAnalyzer.DEFAULT_STOPWORD_FILE.
IndonesianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
IndonesianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop word.

Uses of Version in org.apache.lucene.analysis.in

Constructors in org.apache.lucene.analysis.in with parameters of type Version
IndicTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader input)
Deprecated.
IndicTokenizer(Version matchVersion, AttributeSource source, Reader input)
Deprecated.
IndicTokenizer(Version matchVersion, Reader input)
Deprecated.

Uses of Version in org.apache.lucene.analysis.it

Constructors in org.apache.lucene.analysis.it with parameters of type Version
ItalianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: ItalianAnalyzer.DEFAULT_STOPWORD_FILE.
ItalianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
ItalianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.ja

Constructors in org.apache.lucene.analysis.ja with parameters of type Version
JapaneseAnalyzer(Version matchVersion)
JapaneseAnalyzer(Version matchVersion, UserDictionary userDict, JapaneseTokenizer.Mode mode, CharArraySet stopwords, Set<String> stoptags)

Uses of Version in org.apache.lucene.analysis.lv

Constructors in org.apache.lucene.analysis.lv with parameters of type Version
LatvianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: LatvianAnalyzer.DEFAULT_STOPWORD_FILE.
LatvianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
LatvianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.miscellaneous

Constructors in org.apache.lucene.analysis.miscellaneous with parameters of type Version
PatternAnalyzer(Version matchVersion, Pattern pattern, boolean toLowerCase, Set<?> stopWords)
Constructs a new instance with the given parameters.
StemmerOverrideFilter(Version matchVersion, TokenStream input, Map<?,String> dictionary)
Create a new StemmerOverrideFilter, performing dictionary-based stemming with the provided dictionary.

Uses of Version in org.apache.lucene.analysis.nl

Constructors in org.apache.lucene.analysis.nl with parameters of type Version
DutchAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (DutchAnalyzer.getDefaultStopSet()) and a few default entries for the stem exclusion table.
DutchAnalyzer(Version matchVersion, File stopwords)
Deprecated. use DutchAnalyzer.DutchAnalyzer(Version, Set) instead
DutchAnalyzer(Version matchVersion, HashSet<?> stopwords)
Deprecated. use DutchAnalyzer.DutchAnalyzer(Version, Set) instead
DutchAnalyzer(Version matchVersion, Set<?> stopwords)
DutchAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionTable)
DutchAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionTable, CharArrayMap<String> stemOverrideDict)
DutchAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use DutchAnalyzer.DutchAnalyzer(Version, Set) instead

Uses of Version in org.apache.lucene.analysis.no

Constructors in org.apache.lucene.analysis.no with parameters of type Version
NorwegianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: NorwegianAnalyzer.DEFAULT_STOPWORD_FILE.
NorwegianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
NorwegianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.pl

Constructors in org.apache.lucene.analysis.pl with parameters of type Version
PolishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: PolishAnalyzer.DEFAULT_STOPWORD_FILE.
PolishAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
PolishAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.pt

Constructors in org.apache.lucene.analysis.pt with parameters of type Version
PortugueseAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: PortugueseAnalyzer.DEFAULT_STOPWORD_FILE.
PortugueseAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
PortugueseAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.query

Constructors in org.apache.lucene.analysis.query with parameters of type Version
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate)
Deprecated. Stopwords should be calculated at instantiation using one of the other constructors
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency percentage greater than QueryAutoStopWordAnalyzer.defaultMaxDocFreqPercent
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, Collection<String> fields, float maxPercentDocs)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for the given selection of fields from terms with a document frequency percentage greater than the given maxPercentDocs
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, Collection<String> fields, int maxDocFreq)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for the given selection of fields from terms with a document frequency greater than the given maxDocFreq
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, float maxPercentDocs)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency percentage greater than the given maxPercentDocs
QueryAutoStopWordAnalyzer(Version matchVersion, Analyzer delegate, IndexReader indexReader, int maxDocFreq)
Creates a new QueryAutoStopWordAnalyzer with stopwords calculated for all indexed fields from terms with a document frequency greater than the given maxDocFreq

Uses of Version in org.apache.lucene.analysis.reverse

Methods in org.apache.lucene.analysis.reverse with parameters of type Version
static void | ReverseStringFilter.reverse(Version matchVersion, char[] buffer) Reverses the given input buffer in-place
static void | ReverseStringFilter.reverse(Version matchVersion, char[] buffer, int len) Partially reverses the given input buffer in-place from offset 0 up to the given length.
static void | ReverseStringFilter.reverse(Version matchVersion, char[] buffer, int start, int len) Partially reverses the given input buffer in-place from the given offset up to the given length.
static String | ReverseStringFilter.reverse(Version matchVersion, String input) Reverses the given input string

Constructors in org.apache.lucene.analysis.reverse with parameters of type Version
ReverseStringFilter(Version matchVersion, TokenStream in)
Create a new ReverseStringFilter that reverses all tokens in the supplied TokenStream.
ReverseStringFilter(Version matchVersion, TokenStream in, char marker)
Create a new ReverseStringFilter that reverses and marks all tokens in the supplied TokenStream.

Uses of Version in org.apache.lucene.analysis.ro

Constructors in org.apache.lucene.analysis.ro with parameters of type Version
RomanianAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: RomanianAnalyzer.DEFAULT_STOPWORD_FILE.
RomanianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
RomanianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.ru

Constructors in org.apache.lucene.analysis.ru with parameters of type Version
RussianAnalyzer(Version matchVersion)
RussianAnalyzer(Version matchVersion, Map<?,?> stopwords)
Deprecated. use RussianAnalyzer.RussianAnalyzer(Version, Set) instead
RussianAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
RussianAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words
RussianAnalyzer(Version matchVersion, String... stopwords)
Deprecated. use RussianAnalyzer.RussianAnalyzer(Version, Set) instead
RussianLetterTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader in)
Deprecated. Construct a new RussianLetterTokenizer using a given AttributeSource.AttributeFactory.
RussianLetterTokenizer(Version matchVersion, AttributeSource source, Reader in)
Deprecated. Construct a new RussianLetterTokenizer using a given AttributeSource.
RussianLetterTokenizer(Version matchVersion, Reader in)
Deprecated. Construct a new RussianLetterTokenizer.

Uses of Version in org.apache.lucene.analysis.shingle

Constructors in org.apache.lucene.analysis.shingle with parameters of type Version
ShingleAnalyzerWrapper(Version matchVersion)
Wraps StandardAnalyzer.
ShingleAnalyzerWrapper(Version matchVersion, int minShingleSize, int maxShingleSize)
Wraps StandardAnalyzer.

Uses of Version in org.apache.lucene.analysis.snowball

Constructors in org.apache.lucene.analysis.snowball with parameters of type Version
SnowballAnalyzer(Version matchVersion, String name)
Deprecated. Builds the named analyzer with no stop words.
SnowballAnalyzer(Version matchVersion, String name, Set<?> stopWords)
Deprecated. Builds the named analyzer with the given stop words.
SnowballAnalyzer(Version matchVersion, String name, String[] stopWords)
Deprecated. Use SnowballAnalyzer.SnowballAnalyzer(Version, String, Set) instead.

Uses of Version in org.apache.lucene.analysis.standard

Constructors in org.apache.lucene.analysis.standard with parameters of type Version
ClassicAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (ClassicAnalyzer.STOP_WORDS_SET).
ClassicAnalyzer(Version matchVersion, File stopwords)
Deprecated. Use ClassicAnalyzer.ClassicAnalyzer(Version, Reader) instead.
ClassicAnalyzer(Version matchVersion, Reader stopwords)
Builds an analyzer with the stop words from the given reader.
ClassicAnalyzer(Version matchVersion, Set<?> stopWords)
Builds an analyzer with the given stop words.
ClassicTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader input)
Creates a new ClassicTokenizer with a given AttributeSource.AttributeFactory
ClassicTokenizer(Version matchVersion, AttributeSource source, Reader input)
Creates a new ClassicTokenizer with a given AttributeSource.
ClassicTokenizer(Version matchVersion, Reader input)
Creates a new instance of the ClassicTokenizer.
StandardAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (StandardAnalyzer.STOP_WORDS_SET).
StandardAnalyzer(Version matchVersion, File stopwords)
Deprecated. Use StandardAnalyzer.StandardAnalyzer(Version, Reader) instead.
StandardAnalyzer(Version matchVersion, Reader stopwords)
Builds an analyzer with the stop words from the given reader.
StandardAnalyzer(Version matchVersion, Set<?> stopWords)
Builds an analyzer with the given stop words.
StandardFilter(Version matchVersion, TokenStream in)
StandardTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader input)
Creates a new StandardTokenizer with a given AttributeSource.AttributeFactory
StandardTokenizer(Version matchVersion, AttributeSource source, Reader input)
Creates a new StandardTokenizer with a given AttributeSource.
StandardTokenizer(Version matchVersion, Reader input)
Creates a new instance of the StandardTokenizer.
UAX29URLEmailAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words (UAX29URLEmailAnalyzer.STOP_WORDS_SET).
UAX29URLEmailAnalyzer(Version matchVersion, Reader stopwords)
Builds an analyzer with the stop words from the given reader.
UAX29URLEmailAnalyzer(Version matchVersion, Set<?> stopWords)
Builds an analyzer with the given stop words.
UAX29URLEmailTokenizer(Version matchVersion, AttributeSource.AttributeFactory factory, Reader input)
Creates a new UAX29URLEmailTokenizer with a given AttributeSource.AttributeFactory
UAX29URLEmailTokenizer(Version matchVersion, AttributeSource source, Reader input)
Creates a new UAX29URLEmailTokenizer with a given AttributeSource.
UAX29URLEmailTokenizer(Version matchVersion, Reader input)
Creates a new instance of the UAX29URLEmailTokenizer.

Uses of Version in org.apache.lucene.analysis.sv

Constructors in org.apache.lucene.analysis.sv with parameters of type Version
SwedishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: SwedishAnalyzer.DEFAULT_STOPWORD_FILE.
SwedishAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
SwedishAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.analysis.th

Constructors in org.apache.lucene.analysis.th with parameters of type Version
ThaiAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words.
ThaiAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
ThaiWordFilter(Version matchVersion, TokenStream input)
Creates a new ThaiWordFilter with the specified match version.

Uses of Version in org.apache.lucene.analysis.tr

Constructors in org.apache.lucene.analysis.tr with parameters of type Version
TurkishAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words: TurkishAnalyzer.DEFAULT_STOPWORD_FILE.
TurkishAnalyzer(Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words.
TurkishAnalyzer(Version matchVersion, Set<?> stopwords, Set<?> stemExclusionSet)
Builds an analyzer with the given stop words.

Uses of Version in org.apache.lucene.index

Methods in org.apache.lucene.index with parameters of type Version
 void MultiPassIndexSplitter.split(Version version, IndexReader input, Directory[] outputs, boolean seq)
Split source index into multiple parts.

Constructors in org.apache.lucene.index with parameters of type Version
IndexUpgrader(Directory dir, Version matchVersion)
Creates index upgrader on the given directory, using an IndexWriter using the given matchVersion.
IndexUpgrader(Directory dir, Version matchVersion, PrintStream infoStream, boolean deletePriorCommits)
Creates index upgrader on the given directory, using an IndexWriter using the given matchVersion.
IndexWriterConfig(Version matchVersion, Analyzer analyzer)
Creates a new config that with defaults that match the specified Version as well as the default Analyzer.
PersistentSnapshotDeletionPolicy(IndexDeletionPolicy primary, Directory dir, IndexWriterConfig.OpenMode mode, Version matchVersion)
PersistentSnapshotDeletionPolicy wraps another IndexDeletionPolicy to enable flexible snapshotting.
PKIndexSplitter(Version version, Directory input, Directory dir1, Directory dir2, Filter docsInFirstIndex)
Split an index based on a Filter.
PKIndexSplitter(Version version, Directory input, Directory dir1, Directory dir2, Term midTerm)
Split an index based on a given primary key term and a 'middle' term.
RandomIndexWriter(Random r, Directory dir, Version v, Analyzer a)
create a RandomIndexWriter with a random config

Uses of Version in org.apache.lucene.queryParser

Methods in org.apache.lucene.queryParser with parameters of type Version
static Query | MultiFieldQueryParser.parse(Version matchVersion, String[] queries, String[] fields, Analyzer analyzer) Parses a query which searches on the fields specified.
static Query | MultiFieldQueryParser.parse(Version matchVersion, String[] queries, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.
static Query | MultiFieldQueryParser.parse(Version matchVersion, String query, String[] fields, BooleanClause.Occur[] flags, Analyzer analyzer) Parses a query, searching on the fields specified.

Constructors in org.apache.lucene.queryParser with parameters of type Version
MultiFieldQueryParser(Version matchVersion, String[] fields, Analyzer analyzer)
Creates a MultiFieldQueryParser.
MultiFieldQueryParser(Version matchVersion, String[] fields, Analyzer analyzer, Map<String,Float> boosts)
Creates a MultiFieldQueryParser.
QueryParser(Version matchVersion, String f, Analyzer a)
Constructs a query parser.

Uses of Version in org.apache.lucene.queryParser.analyzing

Constructors in org.apache.lucene.queryParser.analyzing with parameters of type Version
AnalyzingQueryParser(Version matchVersion, String field, Analyzer analyzer)
Constructs a query parser.

Uses of Version in org.apache.lucene.queryParser.complexPhrase

Constructors in org.apache.lucene.queryParser.complexPhrase with parameters of type Version
ComplexPhraseQueryParser(Version matchVersion, String f, Analyzer a)

Uses of Version in org.apache.lucene.queryParser.ext

Constructors in org.apache.lucene.queryParser.ext with parameters of type Version
ExtendableQueryParser(Version matchVersion, String f, Analyzer a)
Creates a new ExtendableQueryParser instance
ExtendableQueryParser(Version matchVersion, String f, Analyzer a, Extensions ext)
Creates a new ExtendableQueryParser instance

Uses of Version in org.apache.lucene.util

Fields in org.apache.lucene.util declared as Version
static Version LuceneTestCase.TEST_VERSION_CURRENT
Use this constant when creating Analyzers and any other version-dependent stuff.

Methods in org.apache.lucene.util that return Version
static Version | Version.valueOf(String name) Returns the enum constant of this type with the specified name.
static Version[] | Version.values() Returns an array containing the constants of this enum type, in the order they're declared.

Methods in org.apache.lucene.util with parameters of type Version
static CharacterUtils | CharacterUtils.getInstance(Version matchVersion) Returns a CharacterUtils implementation according to the given Version instance.
static IndexWriterConfig | LuceneTestCase.newIndexWriterConfig(Random r, Version v, Analyzer a) create a new index writer config with random defaults using the specified random
static IndexWriterConfig | LuceneTestCase.newIndexWriterConfig(Version v, Analyzer a) create a new index writer config with random defaults
boolean | Version.onOrAfter(Version other)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.Vint8

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.Vint8

No usage of org.apache.lucene.util.Vint8

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.Vint8.Position

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.Vint8.Position

Packages that use Vint8.Position
org.apache.lucene.util Some utility classes.

Uses of Vint8.Position in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type Vint8.Position
static int Vint8.decode(byte[] bytes, Vint8.Position pos)
Decodes a 32-bit integer from bytes, beginning at offset pos.pos.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.VirtualMethod

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.VirtualMethod

Packages that use VirtualMethod
org.apache.lucene.util Some utility classes.

Uses of VirtualMethod in org.apache.lucene.util

Methods in org.apache.lucene.util with parameters of type VirtualMethod
static
<C> int
VirtualMethod.compareImplementationDistance(Class<? extends C> clazz, VirtualMethod<C> m1, VirtualMethod<C> m2)
Utility method that compares the implementation/override distance of two methods.
static
<C> int
VirtualMethod.compareImplementationDistance(Class<? extends C> clazz, VirtualMethod<C> m1, VirtualMethod<C> m2)
Utility method that compares the implementation/override distance of two methods.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.WeakIdentityMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.WeakIdentityMap

Packages that use WeakIdentityMap
org.apache.lucene.util Some utility classes.

Uses of WeakIdentityMap in org.apache.lucene.util

Methods in org.apache.lucene.util that return WeakIdentityMap
static
<K,V> WeakIdentityMap<K,V>
WeakIdentityMap.newConcurrentHashMap()
Creates a new WeakIdentityMap based on a ConcurrentHashMap.
static
<K,V> WeakIdentityMap<K,V>
WeakIdentityMap.newHashMap()
Creates a new WeakIdentityMap based on a non-synchronized HashMap.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ArrayHashMap

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.collections
Class ArrayHashMap<K,V>

java.lang.Object
    extended by  org.apache.lucene.util.collections.ArrayHashMap<K,V>
All Implemented Interfaces:
Iterable<V>
public class ArrayHashMap<K,V>
extends Object
implements Iterable<V>

An Array-based hashtable which maps, similar to Java's HashMap, only performance tests showed it performs better.

The hashtable is constructed with a given capacity, or 16 as a default. In case there's not enough room for new pairs, the hashtable grows. Capacity is adjusted to a power of 2, and there are 2 * capacity entries for the hash. The pre allocated arrays (for keys, values) are at length of capacity + 1, where index 0 is used as 'Ground' or 'NULL'.

The arrays are allocated ahead of hash operations, and form an 'empty space' list, to which the <key,value> pair is allocated.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ArrayHashMap()
Constructs a map with default capacity.
ArrayHashMap(int capacity)
Constructs a map with given capacity.
Method Summary
protected int | calcBaseHashIndex(K key) Calculating the baseHash index using the internal internal hashFactor.
void | clear() Empties the map.
boolean | containsKey(K key) Returns true iff the key exists in the map.
boolean | containsValue(Object o) Returns true iff the object exists in the map.
boolean | equals(Object o)
protected int | find(K key) Returns the index of the given key, or zero if the key wasn't found.
V | get(K key) Returns the object mapped with the given key, or null if the key wasn't found.
protected void | grow() Allocates a new map of double the capacity, and fast-insert the old key-value pairs.
int | hashCode()
boolean | isEmpty() Returns true iff the map is empty.
Iterator<V> | iterator() Returns an iterator on the mapped objects.
Iterator<K> | keyIterator() Returns an iterator on the map keys.
V | put(K key, V e) Inserts the <key,value> pair into the map.
V | remove(K key) Removes a <key,value> pair from the map and returns the mapped value, or null if the none existed.
int | size() Returns number of pairs currently in the map.
Object[] | toArray() Translates the mapped pairs' values into an array of Objects
V[] | toArray(V[] a) Translates the mapped pairs' values into an array of V
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ArrayHashMap

public ArrayHashMap()
Constructs a map with default capacity.

ArrayHashMap

public ArrayHashMap(int capacity)
Constructs a map with given capacity. Capacity is adjusted to a native power of 2, with minimum of 16.

Parameters:
capacity - minimum capacity for the map.
Method Detail

calcBaseHashIndex

protected int calcBaseHashIndex(K key)
Calculating the baseHash index using the internal internal hashFactor.

clear

public void clear()
Empties the map. Generates the "Empty" space list for later allocation.

containsKey

public boolean containsKey(K key)
Returns true iff the key exists in the map.

containsValue

public boolean containsValue(Object o)
Returns true iff the object exists in the map.

find

protected int find(K key)
Returns the index of the given key, or zero if the key wasn't found.

get

public V get(K key)
Returns the object mapped with the given key, or null if the key wasn't found.

grow

protected void grow()
Allocates a new map of double the capacity, and fast-insert the old key-value pairs.

isEmpty

public boolean isEmpty()
Returns true iff the map is empty.

iterator

public Iterator<V> iterator()
Returns an iterator on the mapped objects.

Specified by:
iterator in interface Iterable<V>

keyIterator

public Iterator<K> keyIterator()
Returns an iterator on the map keys.

put

public V put(K key,
             V e)
Inserts the <key,value> pair into the map. If the key already exists, this method updates the mapped value to the given one, returning the old mapped value.

Returns:
the old mapped value, or null if the key didn't exist.

remove

public V remove(K key)
Removes a <key,value> pair from the map and returns the mapped value, or null if the none existed.

Parameters:
key - used to find the value to remove
Returns:
the removed value or null if none existed.

size

public int size()
Returns number of pairs currently in the map.

toArray

public Object[] toArray()
Translates the mapped pairs' values into an array of Objects

Returns:
an object array of all the values currently in the map.

toArray

public V[] toArray(V[] a)
Translates the mapped pairs' values into an array of V

Parameters:
a - the array into which the elements of the list are to be stored, if it is big enough; otherwise, use as much space as it can.
Returns:
an array containing the elements of the list

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DoubleIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.collections
Interface DoubleIterator

public interface DoubleIterator

Iterator interface for primitive double iteration. *

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
boolean | hasNext()
double | next()
void | remove()

Method Detail

hasNext

boolean hasNext()

next

double next()

remove

void remove()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FloatIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.collections
Interface FloatIterator

public interface FloatIterator

Iterator interface for primitive int iteration. *

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
boolean | hasNext()
float | next()
void | remove()

Method Detail

hasNext

boolean hasNext()

next

float next()

remove

void remove()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FloatToObjectMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.collections
Class FloatToObjectMap<T>

java.lang.Object
    extended by  org.apache.lucene.util.collections.FloatToObjectMap<T>
All Implemented Interfaces:
Iterable<T>
public class FloatToObjectMap<T>
extends Object
implements Iterable<T>

An Array-based hashtable which maps primitive float to Objects of generic type T.
The hashtable is constracted with a given capacity, or 16 as a default. In case there's not enough room for new pairs, the hashtable grows.
Capacity is adjusted to a power of 2, and there are 2 * capacity entries for the hash. The pre allocated arrays (for keys, values) are at length of capacity + 1, when index 0 is used as 'Ground' or 'NULL'.
The arrays are allocated ahead of hash operations, and form an 'empty space' list, to which the key,value pair is allocated.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
FloatToObjectMap()
Constructs a map with default capacity.
FloatToObjectMap(int capacity)
Constructs a map with given capacity.
Method Summary
protected int | calcBaseHashIndex(float key) Calculating the baseHash index using the internal hashFactor.
void | clear() Empties the map.
boolean | containsKey(float key) Checks if a given key exists in the map.
boolean | containsValue(Object o) Checks if the given object exists in the map. This method iterates over the collection, trying to find an equal object.
boolean | equals(Object o)
protected int | find(float key) Find the actual index of a given key.
T | get(float key) Returns the object mapped with the given key.
protected void | grow() Grows the map.
int | hashCode()
boolean | isEmpty()
Iterator<T> | iterator() Returns a new iterator for the mapped objects.
FloatIterator | keyIterator() Returns an iterator on the map keys.
T | put(float key, T e) Inserts the <key,value> pair into the map.
T | remove(float key) Removes a <key,value> pair from the map and returns the mapped value, or null if the none existed.
int | size()
Object[] | toArray() Translates the mapped pairs' values into an array of Objects
T[] | toArray(T[] a) Translates the mapped pairs' values into an array of T
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

FloatToObjectMap

public FloatToObjectMap()
Constructs a map with default capacity.

FloatToObjectMap

public FloatToObjectMap(int capacity)
Constructs a map with given capacity. Capacity is adjusted to a native power of 2, with minimum of 16.

Parameters:
capacity - minimum capacity for the map.
Method Detail

calcBaseHashIndex

protected int calcBaseHashIndex(float key)
Calculating the baseHash index using the internal hashFactor.

Parameters:
key -

clear

public void clear()
Empties the map. Generates the "Empty" space list for later allocation.

containsKey

public boolean containsKey(float key)
Checks if a given key exists in the map.

Parameters:
key - that is checked against the map data.
Returns:
true if the key exists in the map. false otherwise.

containsValue

public boolean containsValue(Object o)
Checks if the given object exists in the map.
This method iterates over the collection, trying to find an equal object.

Parameters:
o - object that is checked against the map data.
Returns:
true if the object exists in the map (in .equals() meaning). false otherwise.

find

protected int find(float key)
Find the actual index of a given key.

Parameters:
key -
Returns:
index of the key. zero if the key wasn't found.

get

public T get(float key)
Returns the object mapped with the given key.

Parameters:
key - int who's mapped object we're interested in.
Returns:
an object mapped by the given key. null if the key wasn't found.

grow

protected void grow()
Grows the map. Allocates a new map of double the capacity, and fast-insert the old key-value pairs.

isEmpty

public boolean isEmpty()
Returns:
true if the map is empty. false otherwise.

iterator

public Iterator<T> iterator()
Returns a new iterator for the mapped objects.

Specified by:
iterator in interface Iterable<T>

keyIterator

public FloatIterator keyIterator()
Returns an iterator on the map keys.

put

public T put(float key,
             T e)
Inserts the <key,value> pair into the map. If the key already exists, this method updates the mapped value to the given one, returning the old mapped value.

Returns:
the old mapped value, or null if the key didn't exist.

remove

public T remove(float key)
Removes a <key,value> pair from the map and returns the mapped value, or null if the none existed.

Parameters:
key - used to find the value to remove
Returns:
the removed value or null if none existed.

size

public int size()
Returns:
number of pairs currently in the map

toArray

public Object[] toArray()
Translates the mapped pairs' values into an array of Objects

Returns:
an object array of all the values currently in the map.

toArray

public T[] toArray(T[] a)
Translates the mapped pairs' values into an array of T

Parameters:
a - the array into which the elements of the list are to be stored, if it is big enough; otherwise, use whatever space we have, setting the one after the true data as null.
Returns:
an array containing the elements of the list

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntArray

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.collections
Class IntArray

java.lang.Object
    extended by  org.apache.lucene.util.collections.IntArray

public class IntArray
extends Object

A Class wrapper for a grow-able int[] which can be sorted and intersect with other IntArrays.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
IntArray()
Construct a default IntArray, size 0 and surly a sort should not occur.
Method Summary
void | addToArray(int value) Adds a value to the array.
void | clear(boolean resize) Clear the IntArray (set all elements to zero).
boolean | equals(Object o) Equals method.
int | get(int i) Get an element from a specific index.
int | hashCode() Calculates a hash-code for HashTables
void | intersect(IntArray other) Intersects the data with a given IntArray
void | intersect(IntHashSet set) Intersects the data with a given IntHashSet.
void | set(int idx, int value)
int | size() Return the size of the Array.
void | sort() Sorts the data.
String | toString() toString or not toString.
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

IntArray

public IntArray()
Construct a default IntArray, size 0 and surly a sort should not occur.

Method Detail

intersect

public void intersect(IntHashSet set)
Intersects the data with a given IntHashSet.

Parameters:
set - A given ArrayHashSetInt which holds the data to be intersected against

intersect

public void intersect(IntArray other)
Intersects the data with a given IntArray

Parameters:
other - A given IntArray which holds the data to be intersected agains

size

public int size()
Return the size of the Array. Not the allocated size, but the number of values actually set.

Returns:
the (filled) size of the array

addToArray

public void addToArray(int value)
Adds a value to the array.

Parameters:
value - value to be added

equals

public boolean equals(Object o)
Equals method. Checking the sizes, than the values from the last index to the first (Statistically for random should be the same but for our specific use would find differences faster).

Overrides:
equals in class Object

sort

public void sort()
Sorts the data. If it is needed.

hashCode

public int hashCode()
Calculates a hash-code for HashTables

Overrides:
hashCode in class Object

get

public int get(int i)
Get an element from a specific index.

Parameters:
i - index of which element should be retrieved.

set

public void set(int idx,
                int value)

toString

public String toString()
toString or not toString. That is the question!

Overrides:
toString in class Object

clear

public void clear(boolean resize)
Clear the IntArray (set all elements to zero).

Parameters:
resize - - if resize is true, then clear actually allocates a new array of size 0, essentially 'clearing' the array and freeing memory.
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntHashSet

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.collections
Class IntHashSet

java.lang.Object
    extended by  org.apache.lucene.util.collections.IntHashSet

public class IntHashSet
extends Object

A Set or primitive int. Implemented as a HashMap of int->int. *

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
IntHashSet()
Constructs a map with default capacity.
IntHashSet(int capacity)
Constructs a map with given capacity.
Method Summary
boolean | add(int value) Add a mapping int key -> int value.
protected int | calcBaseHashIndex(int key) Calculating the baseHash index using the internal hashFactor .
void | clear() Empties the map.
boolean | contains(int value) Checks if a given key exists in the map.
protected int | find(int key) Find the actual index of a given key.
protected void | grow() Grows the map.
boolean | isEmpty()
IntIterator | iterator() Returns a new iterator for the mapped objects.
void | printBaseHash() Prints the baseHash array, used for debug purposes.
boolean | remove(int value) Remove a pair from the map, specified by it's key.
int | size()
int[] | toArray() Translates the mapped pairs' values into an array of Objects
int[] | toArray(int[] a) Translates the mapped pairs' values into an array of ints
String | toHashString()
String | toString() I have no idea why would anyone call it - but for debug purposes. Prints the entire map, including the index, key, object, next and prev.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

IntHashSet

public IntHashSet()
Constructs a map with default capacity.

IntHashSet

public IntHashSet(int capacity)
Constructs a map with given capacity. Capacity is adjusted to a native power of 2, with minimum of 16.

Parameters:
capacity - minimum capacity for the map.
Method Detail

calcBaseHashIndex

protected int calcBaseHashIndex(int key)
Calculating the baseHash index using the internal hashFactor .

Parameters:
key -

clear

public void clear()
Empties the map. Generates the "Empty" space list for later allocation.

contains

public boolean contains(int value)
Checks if a given key exists in the map.

Parameters:
value - that is checked against the map data.
Returns:
true if the key exists in the map. false otherwise.

find

protected int find(int key)
Find the actual index of a given key.

Parameters:
key -
Returns:
index of the key. zero if the key wasn't found.

grow

protected void grow()
Grows the map. Allocates a new map of double the capacity, and fast-insert the old key-value pairs.

isEmpty

public boolean isEmpty()
Returns:
true if the map is empty. false otherwise.

iterator

public IntIterator iterator()
Returns a new iterator for the mapped objects.

printBaseHash

public void printBaseHash()
Prints the baseHash array, used for debug purposes.

add

public boolean add(int value)
Add a mapping int key -> int value.

If the key was already inside just updating the value it refers to as the given object.

Otherwise if the map is full, first grow() the map.

Parameters:
value - integer which maps the given value
Returns:
true always.

remove

public boolean remove(int value)
Remove a pair from the map, specified by it's key.

Parameters:
value - specify the value to be removed
Returns:
true if the map was changed (the key was found and removed). false otherwise.

size

public int size()
Returns:
number of pairs currently in the map

toArray

public int[] toArray()
Translates the mapped pairs' values into an array of Objects

Returns:
an object array of all the values currently in the map.

toArray

public int[] toArray(int[] a)
Translates the mapped pairs' values into an array of ints

Parameters:
a - the array into which the elements of the map are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
an array containing the values stored in the map

toString

public String toString()
I have no idea why would anyone call it - but for debug purposes.
Prints the entire map, including the index, key, object, next and prev.

Overrides:
toString in class Object

toHashString

public String toHashString()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntIterator

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.collections
Interface IntIterator

public interface IntIterator

Iterator interface for primitive int iteration. *

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
boolean | hasNext()
int | next()
void | remove()

Method Detail

hasNext

boolean hasNext()

next

int next()

remove

void remove()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntToDoubleMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.collections
Class IntToDoubleMap

java.lang.Object
    extended by  org.apache.lucene.util.collections.IntToDoubleMap

public class IntToDoubleMap
extends Object

An Array-based hashtable which maps primitive int to a primitive double.
The hashtable is constracted with a given capacity, or 16 as a default. In case there's not enough room for new pairs, the hashtable grows.
Capacity is adjusted to a power of 2, and there are 2 * capacity entries for the hash. The pre allocated arrays (for keys, values) are at length of capacity + 1, when index 0 is used as 'Ground' or 'NULL'.
The arrays are allocated ahead of hash operations, and form an 'empty space' list, to which the key,value pair is allocated.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static double GROUND
Constructor Summary
IntToDoubleMap()
Constructs a map with default capacity.
IntToDoubleMap(int capacity)
Constructs a map with given capacity.
Method Summary
protected int | calcBaseHashIndex(int key) Calculating the baseHash index using the internal hashFactor .
void | clear() Empties the map.
boolean | containsKey(int key) Checks if a given key exists in the map.
boolean | containsValue(double value) Checks if the given value exists in the map. This method iterates over the collection, trying to find an equal object.
boolean | equals(Object o)
protected int | find(int key) Find the actual index of a given key.
double | get(int key) Returns the value mapped with the given key.
protected void | grow() Grows the map.
int | hashCode()
boolean | isEmpty()
DoubleIterator | iterator() Returns a new iterator for the mapped double values.
IntIterator | keyIterator() Returns an iterator on the map keys.
double | put(int key, double v) Inserts the <key,value> pair into the map.
double | remove(int key) Removes a <key,value> pair from the map and returns the mapped value, or Double.NaN if the none existed.
int | size()
double[] | toArray() Translates the mapped pairs' values into an array of Objects
double[] | toArray(double[] a) Translates the mapped pairs' values into an array of T
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

GROUND

public static final double GROUND
See Also:
Constant Field Values
Constructor Detail

IntToDoubleMap

public IntToDoubleMap()
Constructs a map with default capacity.

IntToDoubleMap

public IntToDoubleMap(int capacity)
Constructs a map with given capacity. Capacity is adjusted to a native power of 2, with minimum of 16.

Parameters:
capacity - minimum capacity for the map.
Method Detail

calcBaseHashIndex

protected int calcBaseHashIndex(int key)
Calculating the baseHash index using the internal hashFactor .

Parameters:
key -

clear

public void clear()
Empties the map. Generates the "Empty" space list for later allocation.

containsKey

public boolean containsKey(int key)
Checks if a given key exists in the map.

Parameters:
key - that is checked against the map data.
Returns:
true if the key exists in the map. false otherwise.

containsValue

public boolean containsValue(double value)
Checks if the given value exists in the map.
This method iterates over the collection, trying to find an equal object.

Parameters:
value - double value that is checked against the map data.
Returns:
true if the value exists in the map, false otherwise.

find

protected int find(int key)
Find the actual index of a given key.

Parameters:
key -
Returns:
index of the key. zero if the key wasn't found.

get

public double get(int key)
Returns the value mapped with the given key.

Parameters:
key - int who's mapped object we're interested in.
Returns:
a double value mapped by the given key. Double.NaN if the key wasn't found.

grow

protected void grow()
Grows the map. Allocates a new map of double the capacity, and fast-insert the old key-value pairs.

isEmpty

public boolean isEmpty()
Returns:
true if the map is empty. false otherwise.

iterator

public DoubleIterator iterator()
Returns a new iterator for the mapped double values.

keyIterator

public IntIterator keyIterator()
Returns an iterator on the map keys.

put

public double put(int key,
                  double v)
Inserts the <key,value> pair into the map. If the key already exists, this method updates the mapped value to the given one, returning the old mapped value.

Returns:
the old mapped value, or Double.NaN if the key didn't exist.

remove

public double remove(int key)
Removes a <key,value> pair from the map and returns the mapped value, or Double.NaN if the none existed.

Parameters:
key - used to find the value to remove
Returns:
the removed value or Double.NaN if none existed.

size

public int size()
Returns:
number of pairs currently in the map

toArray

public double[] toArray()
Translates the mapped pairs' values into an array of Objects

Returns:
a double array of all the values currently in the map.

toArray

public double[] toArray(double[] a)
Translates the mapped pairs' values into an array of T

Parameters:
a - the array into which the elements of the list are to be stored. If it is big enough use whatever space we need, setting the one after the true data as Double.NaN.
Returns:
an array containing the elements of the list, using the given parameter if big enough, otherwise allocate an appropriate array and return it.

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntToIntMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.collections
Class IntToIntMap

java.lang.Object
    extended by  org.apache.lucene.util.collections.IntToIntMap

public class IntToIntMap
extends Object

An Array-based hashtable which maps primitive int to primitive int.
The hashtable is constracted with a given capacity, or 16 as a default. In case there's not enough room for new pairs, the hashtable grows.
Capacity is adjusted to a power of 2, and there are 2 * capacity entries for the hash. The pre allocated arrays (for keys, values) are at length of capacity + 1, when index 0 is used as 'Ground' or 'NULL'.
The arrays are allocated ahead of hash operations, and form an 'empty space' list, to which the key,value pair is allocated.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static int GROUD
Constructor Summary
IntToIntMap()
Constructs a map with default capacity.
IntToIntMap(int capacity)
Constructs a map with given capacity.
Method Summary
protected int | calcBaseHashIndex(int key) Calculating the baseHash index using the internal hashFactor.
void | clear() Empties the map.
boolean | containsKey(int key) Checks if a given key exists in the map.
boolean | containsValue(int v) Checks if the given object exists in the map. This method iterates over the collection, trying to find an equal object.
boolean | equals(Object o)
protected int | find(int key) Find the actual index of a given key.
int | get(int key) Returns the object mapped with the given key.
protected void | grow() Grows the map.
int | hashCode()
boolean | isEmpty()
IntIterator | iterator() Returns a new iterator for the mapped objects.
IntIterator | keyIterator() Returns an iterator on the map keys.
int | put(int key, int e) Inserts the <key,value> pair into the map.
int | remove(int key) Removes a <key,value> pair from the map and returns the mapped value, or 0 if the none existed.
int | size()
int[] | toArray() Translates the mapped pairs' values into an array of Objects
int[] | toArray(int[] a) Translates the mapped pairs' values into an array of ints
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

GROUD

public static final int GROUD
See Also:
Constant Field Values
Constructor Detail

IntToIntMap

public IntToIntMap()
Constructs a map with default capacity.

IntToIntMap

public IntToIntMap(int capacity)
Constructs a map with given capacity. Capacity is adjusted to a native power of 2, with minimum of 16.

Parameters:
capacity - minimum capacity for the map.
Method Detail

calcBaseHashIndex

protected int calcBaseHashIndex(int key)
Calculating the baseHash index using the internal hashFactor.

Parameters:
key -

clear

public void clear()
Empties the map. Generates the "Empty" space list for later allocation.

containsKey

public boolean containsKey(int key)
Checks if a given key exists in the map.

Parameters:
key - that is checked against the map data.
Returns:
true if the key exists in the map. false otherwise.

containsValue

public boolean containsValue(int v)
Checks if the given object exists in the map.
This method iterates over the collection, trying to find an equal object.

Parameters:
v - value that is checked against the map data.
Returns:
true if the value exists in the map (in .equals() meaning). false otherwise.

find

protected int find(int key)
Find the actual index of a given key.

Parameters:
key -
Returns:
index of the key. zero if the key wasn't found.

get

public int get(int key)
Returns the object mapped with the given key.

Parameters:
key - int who's mapped object we're interested in.
Returns:
an object mapped by the given key. null if the key wasn't found.

grow

protected void grow()
Grows the map. Allocates a new map of double the capacity, and fast-insert the old key-value pairs.

isEmpty

public boolean isEmpty()
Returns:
true if the map is empty. false otherwise.

iterator

public IntIterator iterator()
Returns a new iterator for the mapped objects.

keyIterator

public IntIterator keyIterator()
Returns an iterator on the map keys.

put

public int put(int key,
               int e)
Inserts the <key,value> pair into the map. If the key already exists, this method updates the mapped value to the given one, returning the old mapped value.

Returns:
the old mapped value, or 0 if the key didn't exist.

remove

public int remove(int key)
Removes a <key,value> pair from the map and returns the mapped value, or 0 if the none existed.

Parameters:
key - used to find the value to remove
Returns:
the removed value or 0 if none existed.

size

public int size()
Returns:
number of pairs currently in the map

toArray

public int[] toArray()
Translates the mapped pairs' values into an array of Objects

Returns:
an object array of all the values currently in the map.

toArray

public int[] toArray(int[] a)
Translates the mapped pairs' values into an array of ints

Parameters:
a - the array into which the elements of the map are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
Returns:
an array containing the values stored in the map

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntToObjectMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.collections
Class IntToObjectMap<T>

java.lang.Object
    extended by  org.apache.lucene.util.collections.IntToObjectMap<T>
All Implemented Interfaces:
Iterable<T>
public class IntToObjectMap<T>
extends Object
implements Iterable<T>

An Array-based hashtable which maps primitive int to Objects of generic type T.
The hashtable is constracted with a given capacity, or 16 as a default. In case there's not enough room for new pairs, the hashtable grows.
Capacity is adjusted to a power of 2, and there are 2 * capacity entries for the hash. The pre allocated arrays (for keys, values) are at length of capacity + 1, when index 0 is used as 'Ground' or 'NULL'.
The arrays are allocated ahead of hash operations, and form an 'empty space' list, to which the key,value pair is allocated.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
IntToObjectMap()
Constructs a map with default capacity.
IntToObjectMap(int capacity)
Constructs a map with given capacity.
Method Summary
protected int | calcBaseHashIndex(int key) Calculating the baseHash index using the internal hashFactor.
void | clear() Empties the map.
boolean | containsKey(int key) Checks if a given key exists in the map.
boolean | containsValue(Object o) Checks if the given object exists in the map. This method iterates over the collection, trying to find an equal object.
boolean | equals(Object o)
protected int | find(int key) Find the actual index of a given key.
T | get(int key) Returns the object mapped with the given key.
protected void | grow() Grows the map.
int | hashCode()
boolean | isEmpty()
Iterator<T> | iterator() Returns a new iterator for the mapped objects.
IntIterator | keyIterator() Returns an iterator on the map keys.
T | put(int key, T e) Inserts the <key,value> pair into the map.
T | remove(int key) Removes a <key,value> pair from the map and returns the mapped value, or null if the none existed.
int | size()
Object[] | toArray() Translates the mapped pairs' values into an array of Objects
T[] | toArray(T[] a) Translates the mapped pairs' values into an array of T
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

IntToObjectMap

public IntToObjectMap()
Constructs a map with default capacity.

IntToObjectMap

public IntToObjectMap(int capacity)
Constructs a map with given capacity. Capacity is adjusted to a native power of 2, with minimum of 16.

Parameters:
capacity - minimum capacity for the map.
Method Detail

calcBaseHashIndex

protected int calcBaseHashIndex(int key)
Calculating the baseHash index using the internal hashFactor.

Parameters:
key -

clear

public void clear()
Empties the map. Generates the "Empty" space list for later allocation.

containsKey

public boolean containsKey(int key)
Checks if a given key exists in the map.

Parameters:
key - that is checked against the map data.
Returns:
true if the key exists in the map. false otherwise.

containsValue

public boolean containsValue(Object o)
Checks if the given object exists in the map.
This method iterates over the collection, trying to find an equal object.

Parameters:
o - object that is checked against the map data.
Returns:
true if the object exists in the map (in .equals() meaning). false otherwise.

find

protected int find(int key)
Find the actual index of a given key.

Parameters:
key -
Returns:
index of the key. zero if the key wasn't found.

get

public T get(int key)
Returns the object mapped with the given key.

Parameters:
key - int who's mapped object we're interested in.
Returns:
an object mapped by the given key. null if the key wasn't found.

grow

protected void grow()
Grows the map. Allocates a new map of double the capacity, and fast-insert the old key-value pairs.

isEmpty

public boolean isEmpty()
Returns:
true if the map is empty. false otherwise.

iterator

public Iterator<T> iterator()
Returns a new iterator for the mapped objects.

Specified by:
iterator in interface Iterable<T>

keyIterator

public IntIterator keyIterator()
Returns an iterator on the map keys.

put

public T put(int key,
             T e)
Inserts the <key,value> pair into the map. If the key already exists, this method updates the mapped value to the given one, returning the old mapped value.

Returns:
the old mapped value, or null if the key didn't exist.

remove

public T remove(int key)
Removes a <key,value> pair from the map and returns the mapped value, or null if the none existed.

Parameters:
key - used to find the value to remove
Returns:
the removed value or null if none existed.

size

public int size()
Returns:
number of pairs currently in the map

toArray

public Object[] toArray()
Translates the mapped pairs' values into an array of Objects

Returns:
an object array of all the values currently in the map.

toArray

public T[] toArray(T[] a)
Translates the mapped pairs' values into an array of T

Parameters:
a - the array into which the elements of the list are to be stored, if it is big enough; otherwise, use whatever space we have, setting the one after the true data as null.
Returns:
an array containing the elements of the list

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LRUHashMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.collections
Class LRUHashMap<K,V>

java.lang.Object
    extended by  java.util.AbstractMap<K,V>
        extended by  java.util.HashMap<K,V>
            extended by  java.util.LinkedHashMap<K,V>
                extended by  org.apache.lucene.util.collections.LRUHashMap<K,V>
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>
public class LRUHashMap<K,V>
extends LinkedHashMap<K,V>

LRUHashMap is an extension of Java's HashMap, which has a bounded size(); When it reaches that size, each time a new element is added, the least recently used (LRU) entry is removed.

Java makes it very easy to implement LRUHashMap - all its functionality is already available from LinkedHashMap, and we just need to configure that properly.

Note that like HashMap, LRUHashMap is unsynchronized, and the user MUST synchronize the access to it if used from several threads. Moreover, while with HashMap this is only a concern if one of the threads is modifies the map, with LURHashMap every read is a modification (because the LRU order needs to be remembered) so proper synchronization is always necessary.

With the usual synchronization mechanisms available to the user, this unfortunately means that LRUHashMap will probably perform sub-optimally under heavy contention: while one thread uses the hash table (reads or writes), any other thread will be blocked from using it - or even just starting to use it (e.g., calculating the hash function). A more efficient approach would be not to use LinkedHashMap at all, but rather to use a non-locking (as much as possible) thread-safe solution, something along the lines of java.util.concurrent.ConcurrentHashMap (though that particular class does not support the additional LRU semantics, which will need to be added separately using a concurrent linked list or additional storage of timestamps (in an array or inside the entry objects), or whatever).

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
LRUHashMap(int maxSize)
Create a new hash map with a bounded size and with least recently used entries removed.
Method Summary
int | getMaxSize() Return the max size
protected boolean | removeEldestEntry(Map.Entry<K,V> eldest)
void | setMaxSize(int maxSize) setMaxSize() allows changing the map's maximal number of elements which was defined at construction time.
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values

Constructor Detail

LRUHashMap

public LRUHashMap(int maxSize)
Create a new hash map with a bounded size and with least recently used entries removed.

Parameters:
maxSize - the maximum size (in number of entries) to which the map can grow before the least recently used entries start being removed.
Setting maxSize to a very large value, like Integer.MAX_VALUE is allowed, but is less efficient than using HashMap because our class needs to keep track of the use order (via an additional doubly-linked list) which is not used when the map's size is always below the maximum size.
Method Detail

getMaxSize

public int getMaxSize()
Return the max size

setMaxSize

public void setMaxSize(int maxSize)
setMaxSize() allows changing the map's maximal number of elements which was defined at construction time.

Note that if the map is already larger than maxSize, the current implementation does not shrink it (by removing the oldest elements); Rather, the map remains in its current size as new elements are added, and will only start shrinking (until settling again on the give maxSize) if existing elements are explicitly deleted.

removeEldestEntry

protected boolean removeEldestEntry(Map.Entry<K,V> eldest)
Overrides:
removeEldestEntry in class LinkedHashMap<K,V>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectToFloatMap

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.collections
Class ObjectToFloatMap<K>

java.lang.Object
    extended by  org.apache.lucene.util.collections.ObjectToFloatMap<K>

public class ObjectToFloatMap<K>
extends Object

An Array-based hashtable which maps Objects of generic type T to primitive float values.
The hashtable is constructed with a given capacity, or 16 as a default. In case there's not enough room for new pairs, the hashtable grows.
Capacity is adjusted to a power of 2, and there are 2 * capacity entries for the hash. The pre allocated arrays (for keys, values) are at length of capacity + 1, when index 0 is used as 'Ground' or 'NULL'.
The arrays are allocated ahead of hash operations, and form an 'empty space' list, to which the key,value pair is allocated.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ObjectToFloatMap()
Constructs a map with default capacity.
ObjectToFloatMap(int capacity)
Constructs a map with given capacity.
Method Summary
protected int | calcBaseHashIndex(K key) Calculating the baseHash index using the internal hashFactor.
void | clear() Empties the map.
boolean | containsKey(K key) Checks if a given key exists in the map.
boolean | containsValue(float o) Checks if the given object exists in the map. This method iterates over the collection, trying to find an equal object.
boolean | equals(Object o)
protected int | find(K key) Find the actual index of a given key.
float | get(K key) Returns the float mapped with the given key.
protected void | grow() Grows the map.
int | hashCode()
boolean | isEmpty()
FloatIterator | iterator() Returns a new iterator for the mapped floats.
Iterator<K> | keyIterator() Returns an iterator on the map keys.
float | put(K key, float e) Inserts the <key,value> pair into the map.
float | remove(K key) Removes a <key,value> pair from the map and returns the mapped value, or Float.NaN if the none existed.
int | size()
float[] | toArray() Translates the mapped pairs' values into an array of Objects
float[] | toArray(float[] a) Translates the mapped pairs' values into an array of T
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ObjectToFloatMap

public ObjectToFloatMap()
Constructs a map with default capacity.

ObjectToFloatMap

public ObjectToFloatMap(int capacity)
Constructs a map with given capacity. Capacity is adjusted to a native power of 2, with minimum of 16.

Parameters:
capacity - minimum capacity for the map.
Method Detail

calcBaseHashIndex

protected int calcBaseHashIndex(K key)
Calculating the baseHash index using the internal hashFactor.

Parameters:
key -

clear

public void clear()
Empties the map. Generates the "Empty" space list for later allocation.

containsKey

public boolean containsKey(K key)
Checks if a given key exists in the map.

Parameters:
key - that is checked against the map data.
Returns:
true if the key exists in the map. false otherwise.

containsValue

public boolean containsValue(float o)
Checks if the given object exists in the map.
This method iterates over the collection, trying to find an equal object.

Parameters:
o - object that is checked against the map data.
Returns:
true if the object exists in the map (in .equals() meaning). false otherwise.

find

protected int find(K key)
Find the actual index of a given key.

Parameters:
key -
Returns:
index of the key. zero if the key wasn't found.

get

public float get(K key)
Returns the float mapped with the given key.

Parameters:
key - object who's mapped float we're interested in.
Returns:
a float mapped by the given key. Float.NaN if the key wasn't found.

grow

protected void grow()
Grows the map. Allocates a new map of double the capacity, and fast-insert the old key-value pairs.

isEmpty

public boolean isEmpty()
Returns:
true if the map is empty. false otherwise.

iterator

public FloatIterator iterator()
Returns a new iterator for the mapped floats.

keyIterator

public Iterator<K> keyIterator()
Returns an iterator on the map keys.

put

public float put(K key,
                 float e)
Inserts the <key,value> pair into the map. If the key already exists, this method updates the mapped value to the given one, returning the old mapped value.

Returns:
the old mapped value, or Float.NaN if the key didn't exist.

remove

public float remove(K key)
Removes a <key,value> pair from the map and returns the mapped value, or Float.NaN if the none existed.

Parameters:
key - used to find the value to remove
Returns:
the removed value or Float.NaN if none existed.

size

public int size()
Returns:
number of pairs currently in the map

toArray

public float[] toArray()
Translates the mapped pairs' values into an array of Objects

Returns:
an object array of all the values currently in the map.

toArray

public float[] toArray(float[] a)
Translates the mapped pairs' values into an array of T

Parameters:
a - the array into which the elements of the list are to be stored, if it is big enough; otherwise, use as much space as it can.
Returns:
an array containing the elements of the list

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ObjectToIntMap

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.collections
Class ObjectToIntMap<K>

java.lang.Object
    extended by  org.apache.lucene.util.collections.ObjectToIntMap<K>

public class ObjectToIntMap<K>
extends Object

An Array-based hashtable which maps Objects of generic type T to primitive int values.
The hashtable is constructed with a given capacity, or 16 as a default. In case there's not enough room for new pairs, the hashtable grows.
Capacity is adjusted to a power of 2, and there are 2 * capacity entries for the hash. The pre allocated arrays (for keys, values) are at length of capacity + 1, when index 0 is used as 'Ground' or 'NULL'.
The arrays are allocated ahead of hash operations, and form an 'empty space' list, to which the key,value pair is allocated.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
ObjectToIntMap()
Constructs a map with default capacity.
ObjectToIntMap(int capacity)
Constructs a map with given capacity.
Method Summary
protected int | calcBaseHashIndex(K key) Calculating the baseHash index using the internal hashFactor.
void | clear() Empties the map.
boolean | containsKey(K key) Checks if a given key exists in the map.
boolean | containsValue(int o) Checks if the given object exists in the map. This method iterates over the collection, trying to find an equal object.
boolean | equals(Object o)
protected int | find(K key) Find the actual index of a given key.
int | get(K key) Returns the int mapped with the given key.
protected void | grow() Grows the map.
int | hashCode()
boolean | isEmpty()
IntIterator | iterator() Returns a new iterator for the mapped objects.
Iterator<K> | keyIterator()
int | put(K key, int e) Inserts the <key,value> pair into the map.
int | remove(K key) Removes a <key,value> pair from the map and returns the mapped value, or 0 if the none existed.
int | size()
int[] | toArray() Translates the mapped pairs' values into an array of Objects
int[] | toArray(int[] a) Translates the mapped pairs' values into an array of T
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail

ObjectToIntMap

public ObjectToIntMap()
Constructs a map with default capacity.

ObjectToIntMap

public ObjectToIntMap(int capacity)
Constructs a map with given capacity. Capacity is adjusted to a native power of 2, with minimum of 16.

Parameters:
capacity - minimum capacity for the map.
Method Detail

calcBaseHashIndex

protected int calcBaseHashIndex(K key)
Calculating the baseHash index using the internal hashFactor.

Parameters:
key -

clear

public void clear()
Empties the map. Generates the "Empty" space list for later allocation.

containsKey

public boolean containsKey(K key)
Checks if a given key exists in the map.

Parameters:
key - that is checked against the map data.
Returns:
true if the key exists in the map. false otherwise.

containsValue

public boolean containsValue(int o)
Checks if the given object exists in the map.
This method iterates over the collection, trying to find an equal object.

Parameters:
o - object that is checked against the map data.
Returns:
true if the object exists in the map (in .equals() meaning). false otherwise.

find

protected int find(K key)
Find the actual index of a given key.

Parameters:
key -
Returns:
index of the key. zero if the key wasn't found.

get

public int get(K key)
Returns the int mapped with the given key.

Parameters:
key - int who's mapped object we're interested in.
Returns:
an object mapped by the given key. null if the key wasn't found.

grow

protected void grow()
Grows the map. Allocates a new map of double the capacity, and fast-insert the old key-value pairs.

isEmpty

public boolean isEmpty()
Returns:
true if the map is empty. false otherwise.

iterator

public IntIterator iterator()
Returns a new iterator for the mapped objects.

keyIterator

public Iterator<K> keyIterator()

put

public int put(K key,
               int e)
Inserts the <key,value> pair into the map. If the key already exists, this method updates the mapped value to the given one, returning the old mapped value.

Returns:
the old mapped value, or 0 if the key didn't exist.

remove

public int remove(K key)
Removes a <key,value> pair from the map and returns the mapped value, or 0 if the none existed.

Parameters:
key - used to find the value to remove
Returns:
the removed value or 0 if none existed.

size

public int size()
Returns:
number of pairs currently in the map

toArray

public int[] toArray()
Translates the mapped pairs' values into an array of Objects

Returns:
an object array of all the values currently in the map.

toArray

public int[] toArray(int[] a)
Translates the mapped pairs' values into an array of T

Parameters:
a - the array into which the elements of the list are to be stored, if it is big enough; otherwise, use as much space as it can.
Returns:
an array containing the elements of the list

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.util.collections
Interfaces
DoubleIterator
FloatIterator
IntIterator
Classes
ArrayHashMap
FloatToObjectMap
IntArray
IntHashSet
IntToDoubleMap
IntToIntMap
IntToObjectMap
LRUHashMap
ObjectToFloatMap
ObjectToIntMap


org.apache.lucene.util.collections

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.util.collections

Various optimized Collections implementations.

See:
Description

Interface Summary
DoubleIterator | Iterator interface for primitive double iteration.
FloatIterator | Iterator interface for primitive int iteration.
IntIterator | Iterator interface for primitive int iteration.

Class Summary
ArrayHashMap<K,V> | An Array-based hashtable which maps, similar to Java's HashMap, only performance tests showed it performs better.
FloatToObjectMap<T> | An Array-based hashtable which maps primitive float to Objects of generic type T. The hashtable is constracted with a given capacity, or 16 as a default.
IntArray | A Class wrapper for a grow-able int[] which can be sorted and intersect with other IntArrays.
IntHashSet | A Set or primitive int.
IntToDoubleMap | An Array-based hashtable which maps primitive int to a primitive double. The hashtable is constracted with a given capacity, or 16 as a default.
IntToIntMap | An Array-based hashtable which maps primitive int to primitive int. The hashtable is constracted with a given capacity, or 16 as a default.
IntToObjectMap<T> | An Array-based hashtable which maps primitive int to Objects of generic type T. The hashtable is constracted with a given capacity, or 16 as a default.
LRUHashMap<K,V> | LRUHashMap is an extension of Java's HashMap, which has a bounded size(); When it reaches that size, each time a new element is added, the least recently used (LRU) entry is removed.
ObjectToFloatMap<K> | An Array-based hashtable which maps Objects of generic type T to primitive float values. The hashtable is constructed with a given capacity, or 16 as a default.
ObjectToIntMap<K> | An Array-based hashtable which maps Objects of generic type T to primitive int values. The hashtable is constructed with a given capacity, or 16 as a default.

Package org.apache.lucene.util.collections Description

Various optimized Collections implementations.


org.apache.lucene.util.collections Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.util.collections

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • java.util.AbstractMap<K,V> (implements java.util.Map<K,V>)
      • java.util.HashMap<K,V> (implements java.lang.Cloneable, java.util.Map<K,V>, java.io.Serializable)
        • java.util.LinkedHashMap<K,V> (implements java.util.Map<K,V>)
          • org.apache.lucene.util.collections.LRUHashMap<K,V>
    • org.apache.lucene.util.collections.ArrayHashMap<K,V> (implements java.lang.Iterable<T>)
    • org.apache.lucene.util.collections.FloatToObjectMap<T> (implements java.lang.Iterable<T>)
    • org.apache.lucene.util.collections.IntArray
    • org.apache.lucene.util.collections.IntHashSet
    • org.apache.lucene.util.collections.IntToDoubleMap
    • org.apache.lucene.util.collections.IntToIntMap
    • org.apache.lucene.util.collections.IntToObjectMap<T> (implements java.lang.Iterable<T>)
    • org.apache.lucene.util.collections.ObjectToFloatMap<K>
    • org.apache.lucene.util.collections.ObjectToIntMap<K>

Interface Hierarchy

  • org.apache.lucene.util.collections.DoubleIterator
  • org.apache.lucene.util.collections.FloatIterator
  • org.apache.lucene.util.collections.IntIterator


Uses of Package org.apache.lucene.util.collections

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.util.collections

Packages that use org.apache.lucene.util.collections
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.util.collections | Various optimized Collections implementations.

Classes in org.apache.lucene.util.collections used by org.apache.lucene.facet.enhancements.association
IntIterator
Iterator interface for primitive int iteration.

Classes in org.apache.lucene.util.collections used by org.apache.lucene.facet.search
IntToObjectMap
An Array-based hashtable which maps primitive int to Objects of generic type T.
The hashtable is constracted with a given capacity, or 16 as a default.

Classes in org.apache.lucene.util.collections used by org.apache.lucene.util.collections
DoubleIterator
Iterator interface for primitive double iteration.
FloatIterator
Iterator interface for primitive int iteration.
IntArray
A Class wrapper for a grow-able int[] which can be sorted and intersect with other IntArrays.
IntHashSet
A Set or primitive int.
IntIterator
Iterator interface for primitive int iteration.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.collections.ArrayHashMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.collections.ArrayHashMap

No usage of org.apache.lucene.util.collections.ArrayHashMap

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.util.collections.DoubleIterator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.util.collections.DoubleIterator

Packages that use DoubleIterator
org.apache.lucene.util.collections Various optimized Collections implementations.

Uses of DoubleIterator in org.apache.lucene.util.collections

Methods in org.apache.lucene.util.collections that return DoubleIterator
 DoubleIterator IntToDoubleMap.iterator()
Returns a new iterator for the mapped double values.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.util.collections.FloatIterator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.util.collections.FloatIterator

Packages that use FloatIterator
org.apache.lucene.util.collections Various optimized Collections implementations.

Uses of FloatIterator in org.apache.lucene.util.collections

Methods in org.apache.lucene.util.collections that return FloatIterator
FloatIterator | ObjectToFloatMap.iterator() Returns a new iterator for the mapped floats.
FloatIterator | FloatToObjectMap.keyIterator() Returns an iterator on the map keys.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.collections.FloatToObjectMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.collections.FloatToObjectMap

No usage of org.apache.lucene.util.collections.FloatToObjectMap

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.collections.IntArray

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.collections.IntArray

Packages that use IntArray
org.apache.lucene.util.collections Various optimized Collections implementations.

Uses of IntArray in org.apache.lucene.util.collections

Methods in org.apache.lucene.util.collections with parameters of type IntArray
 void IntArray.intersect(IntArray other)
Intersects the data with a given IntArray

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.collections.IntHashSet

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.collections.IntHashSet

Packages that use IntHashSet
org.apache.lucene.util.collections Various optimized Collections implementations.

Uses of IntHashSet in org.apache.lucene.util.collections

Methods in org.apache.lucene.util.collections with parameters of type IntHashSet
 void IntArray.intersect(IntHashSet set)
Intersects the data with a given IntHashSet.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.util.collections.IntIterator

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.util.collections.IntIterator

Packages that use IntIterator
org.apache.lucene.facet.enhancements.association | Association category enhancements
org.apache.lucene.util.collections | Various optimized Collections implementations.

Uses of IntIterator in org.apache.lucene.facet.enhancements.association

Methods in org.apache.lucene.facet.enhancements.association that return IntIterator
 IntIterator AssociationsPayloadIterator.getAssociatedOrdinals()
Get an iterator over the ordinals which has an association for the document set by AssociationsPayloadIterator.setNextDoc(int).

Uses of IntIterator in org.apache.lucene.util.collections

Methods in org.apache.lucene.util.collections that return IntIterator
IntIterator | ObjectToIntMap.iterator() Returns a new iterator for the mapped objects.
IntIterator | IntToIntMap.iterator() Returns a new iterator for the mapped objects.
IntIterator | IntHashSet.iterator() Returns a new iterator for the mapped objects.
IntIterator | IntToDoubleMap.keyIterator() Returns an iterator on the map keys.
IntIterator | IntToIntMap.keyIterator() Returns an iterator on the map keys.
IntIterator | IntToObjectMap.keyIterator() Returns an iterator on the map keys.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.collections.IntToDoubleMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.collections.IntToDoubleMap

No usage of org.apache.lucene.util.collections.IntToDoubleMap

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.collections.IntToIntMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.collections.IntToIntMap

No usage of org.apache.lucene.util.collections.IntToIntMap

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.collections.IntToObjectMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.collections.IntToObjectMap

Packages that use IntToObjectMap
org.apache.lucene.facet.search Faceted Search API

Uses of IntToObjectMap in org.apache.lucene.facet.search

Fields in org.apache.lucene.facet.search declared as IntToObjectMap
protected  IntToObjectMap<org.apache.lucene.facet.search.TopKInEachNodeHandler.AACO> TopKInEachNodeHandler.IntermediateFacetResultWithHash.mapToAACOs

Constructors in org.apache.lucene.facet.search with parameters of type IntToObjectMap
TopKInEachNodeHandler.IntermediateFacetResultWithHash(FacetRequest facetReq, IntToObjectMap<org.apache.lucene.facet.search.TopKInEachNodeHandler.AACO> mapToAACOs)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.collections.LRUHashMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.collections.LRUHashMap

No usage of org.apache.lucene.util.collections.LRUHashMap

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.collections.ObjectToFloatMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.collections.ObjectToFloatMap

No usage of org.apache.lucene.util.collections.ObjectToFloatMap

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.collections.ObjectToIntMap

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.collections.ObjectToIntMap

No usage of org.apache.lucene.util.collections.ObjectToIntMap

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ChunksIntEncoder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class ChunksIntEncoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntEncoder
        extended by  org.apache.lucene.util.encoding.ChunksIntEncoder
Direct Known Subclasses:
EightFlagsIntEncoder, FourFlagsIntEncoder
public abstract class ChunksIntEncoder
extends IntEncoder

An IntEncoder which encodes values in chunks. Implementations of this class assume the data which needs encoding consists of small, consecutive values, and therefore the encoder is able to compress them better. You can read more on the two implementations FourFlagsIntEncoder and EightFlagsIntEncoder.

Extensions of this class need to implement IntEncoder.encode(int) in order to build the proper indicator (flags). When enough values were accumulated (typically the batch size), extensions can call encodeChunk() to flush the indicator and the rest of the values.

NOTE: flags encoders do not accept values ≤ 0 (zero) in their IntEncoder.encode(int). For performance reasons they do not check that condition, however if such value is passed the result stream may be corrupt or an exception will be thrown. Also, these encoders perform the best when there are many consecutive small values (depends on the encoder implementation). If that is not the case, the encoder will occupy 1 more byte for every batch number of integers, over whatever VInt8IntEncoder would have occupied. Therefore make sure to check whether your data fits into the conditions of the specific encoder.

For the reasons mentioned above, these encoders are usually chained with UniqueValuesIntEncoder and DGapIntEncoder in the following manner:

 IntEncoder fourFlags =
         new SortingEncoderFilter(new UniqueValuesIntEncoder(new DGapIntEncoder(new FlagsIntEncoderImpl())));

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected int[] | encodeQueue Holds the values which must be encoded, outside the indicator.
protected int | encodeQueueSize
protected IntEncoder | encoder Encoder used to encode values outside the indicator.
protected int | indicator Represents bits flag byte.
protected byte | ordinal Counts the current ordinal of the encoded value.
Fields inherited from class org.apache.lucene.util.encoding.IntEncoder
out
Constructor Summary
protected ChunksIntEncoder(int chunkSize)
Method Summary
void | close() Instructs the encoder to finish the encoding process.
protected void | encodeChunk() Encodes the values of the current chunk.
void | reInit(OutputStream out) Reinitializes the encoder with the give OutputStream.
Methods inherited from class org.apache.lucene.util.encoding.IntEncoder
createMatchingDecoder, encode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

encodeQueue

protected final int[] encodeQueue
Holds the values which must be encoded, outside the indicator.

encodeQueueSize

protected int encodeQueueSize

encoder

protected final IntEncoder encoder
Encoder used to encode values outside the indicator.

indicator

protected int indicator
Represents bits flag byte.

ordinal

protected byte ordinal
Counts the current ordinal of the encoded value.

Constructor Detail

ChunksIntEncoder

protected ChunksIntEncoder(int chunkSize)
Method Detail

encodeChunk

protected void encodeChunk()
                    throws IOException
Encodes the values of the current chunk. First it writes the indicator, and then it encodes the values outside the indicator.

Throws:
IOException

close

public void close()
           throws IOException
Description copied from class: IntEncoder
Instructs the encoder to finish the encoding process. This method closes the output stream which was specified by reInit. An implementation may do here additional cleanup required to complete the encoding, such as flushing internal buffers, etc.
Once this method was called, no further calls to encode should be made before first calling reInit.

NOTE: overriding classes should make sure they either call super.close() or close the output stream themselves.

Overrides:
close in class IntEncoder
Throws:
IOException

reInit

public void reInit(OutputStream out)
Description copied from class: IntEncoder
Reinitializes the encoder with the give OutputStream. For re-usability it can be changed without the need to reconstruct a new object.

NOTE: after calling IntEncoder.close(), one must call this method even if the output stream itself hasn't changed. An example case is that the output stream wraps a byte[], and the output stream itself is reset, but its instance hasn't changed. Some implementations of IntEncoder may write some metadata about themselves to the output stream, and therefore it is imperative that one calls this method before encoding any data.

Overrides:
reInit in class IntEncoder
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


DGapIntDecoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class DGapIntDecoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntDecoder
        extended by  org.apache.lucene.util.encoding.DGapIntDecoder

public class DGapIntDecoder
extends IntDecoder

An IntDecoder which wraps another IntDecoder and reverts the d-gap that was encoded by DGapIntEncoder. The wrapped decoder performs the actual decoding, while this class simply adds the decoded value to the previous value.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.util.encoding.IntDecoder
EOS, in
Constructor Summary
DGapIntDecoder(IntDecoder decoder)
Method Summary
long | decode() Decodes data received from the input stream, and returns one decoded integer.
void | reInit(InputStream in) Sets the input stream from which the encoded data is read.
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DGapIntDecoder

public DGapIntDecoder(IntDecoder decoder)
Method Detail

decode

public long decode()
            throws IOException
Description copied from class: IntDecoder
Decodes data received from the input stream, and returns one decoded integer. If end of stream is reached, IntDecoder.EOS is returned.

Specified by:
decode in class IntDecoder
Returns:
one decoded integer as long or IntDecoder.EOS if end-of-stream reached.
Throws:
IOException - if an I/O error occurs

reInit

public void reInit(InputStream in)
Description copied from class: IntDecoder
Sets the input stream from which the encoded data is read.

Overrides:
reInit in class IntDecoder

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DGapIntEncoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class DGapIntEncoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntEncoder
        extended by  org.apache.lucene.util.encoding.IntEncoderFilter
            extended by  org.apache.lucene.util.encoding.DGapIntEncoder

public class DGapIntEncoder
extends IntEncoderFilter

An IntEncoderFilter which encodes the gap between the given values, rather than the values themselves. This encoder usually yields better encoding performance space-wise (i.e., the final encoded values consume less space) if the values are 'close' to each other.

NOTE: this encoder assumes the values are given to encode(int) in an ascending sorted manner, which ensures only positive values are encoded and thus yields better performance. If you are not sure whether the values are sorted or not, it is possible to chain this encoder with SortingIntEncoder to ensure the values will be sorted before encoding.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.util.encoding.IntEncoderFilter
encoder
Fields inherited from class org.apache.lucene.util.encoding.IntEncoder
out
Constructor Summary
DGapIntEncoder(IntEncoder encoder)
Initializes with the given encoder.
Method Summary
IntDecoder | createMatchingDecoder() Returns an IntDecoder which matches this encoder.
void | encode(int value) Encodes an integer to the output stream given in reInit
void | reInit(OutputStream out) Reinitializes the encoder with the give OutputStream.
String | toString()
Methods inherited from class org.apache.lucene.util.encoding.IntEncoderFilter
close
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

DGapIntEncoder

public DGapIntEncoder(IntEncoder encoder)
Initializes with the given encoder.

Method Detail

encode

public void encode(int value)
            throws IOException
Description copied from class: IntEncoder
Encodes an integer to the output stream given in reInit

Specified by:
encode in class IntEncoder
Throws:
IOException

createMatchingDecoder

public IntDecoder createMatchingDecoder()
Description copied from class: IntEncoder
Returns an IntDecoder which matches this encoder. Every encoder must return an IntDecoder and null is not a valid value. If an encoder is just a filter, it should at least return its wrapped encoder's matching decoder.

NOTE: this method should create a new instance of the matching decoder and leave the instance sharing to the caller. Returning the same instance over and over is risky because encoders and decoders are not thread safe.

Specified by:
createMatchingDecoder in class IntEncoder

reInit

public void reInit(OutputStream out)
Description copied from class: IntEncoder
Reinitializes the encoder with the give OutputStream. For re-usability it can be changed without the need to reconstruct a new object.

NOTE: after calling IntEncoder.close(), one must call this method even if the output stream itself hasn't changed. An example case is that the output stream wraps a byte[], and the output stream itself is reset, but its instance hasn't changed. Some implementations of IntEncoder may write some metadata about themselves to the output stream, and therefore it is imperative that one calls this method before encoding any data.

Overrides:
reInit in class IntEncoderFilter

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EightFlagsIntDecoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class EightFlagsIntDecoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntDecoder
        extended by  org.apache.lucene.util.encoding.EightFlagsIntDecoder

public class EightFlagsIntDecoder
extends IntDecoder

Decodes data which was encoded by EightFlagsIntEncoder. Scans the indicator, one flag (1-bits) at a time, and decodes extra data using VInt8IntDecoder.

See Also:
EightFlagsIntEncoder
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.util.encoding.IntDecoder
EOS, in
Constructor Summary
EightFlagsIntDecoder()
Method Summary
long | decode() Decodes data received from the input stream, and returns one decoded integer.
void | reInit(InputStream in) Sets the input stream from which the encoded data is read.
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

EightFlagsIntDecoder

public EightFlagsIntDecoder()
Method Detail

decode

public long decode()
            throws IOException
Description copied from class: IntDecoder
Decodes data received from the input stream, and returns one decoded integer. If end of stream is reached, IntDecoder.EOS is returned.

Specified by:
decode in class IntDecoder
Returns:
one decoded integer as long or IntDecoder.EOS if end-of-stream reached.
Throws:
IOException - if an I/O error occurs

reInit

public void reInit(InputStream in)
Description copied from class: IntDecoder
Sets the input stream from which the encoded data is read.

Overrides:
reInit in class IntDecoder

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EightFlagsIntEncoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class EightFlagsIntEncoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntEncoder
        extended by  org.apache.lucene.util.encoding.ChunksIntEncoder
            extended by  org.apache.lucene.util.encoding.EightFlagsIntEncoder

public class EightFlagsIntEncoder
extends ChunksIntEncoder

A ChunksIntEncoder which encodes data in chunks of 8. Every group starts with a single byte (called indicator) which represents 8 - 1 bit flags, where the value:

  • 1 means the encoded value is '1'
  • 0 means the value is encoded using VInt8IntEncoder, and the encoded bytes follow the indicator.
    Since value 0 is illegal, and 1 is encoded in the indicator, the actual value that is encoded is value-2, which saves some more bits.
Encoding example:
  • Original values: 6, 16, 5, 9, 7, 1
  • After sorting: 1, 5, 6, 7, 9, 16
  • D-Gap computing: 1, 4, 1, 1, 2, 5 (so far - done by DGapIntEncoder)
  • Encoding: 1,0,1,1,0,0,0,0 as the indicator, by 2 (4-2), 0 (2-2), 3 (5-2).
  • Binary encode: 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 00000010 00000000 00000011 (indicator is underlined).
    NOTE: the order of the values in the indicator is lsb ⇒ msb, which allows for more efficient decoding.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.util.encoding.ChunksIntEncoder
encodeQueue, encodeQueueSize, encoder, indicator, ordinal
Fields inherited from class org.apache.lucene.util.encoding.IntEncoder
out
Constructor Summary
EightFlagsIntEncoder()
Method Summary
IntDecoder | createMatchingDecoder() Returns an IntDecoder which matches this encoder.
void | encode(int data) Encodes an integer to the output stream given in reInit
String | toString()
Methods inherited from class org.apache.lucene.util.encoding.ChunksIntEncoder
close, encodeChunk, reInit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

EightFlagsIntEncoder

public EightFlagsIntEncoder()
Method Detail

encode

public void encode(int data)
            throws IOException
Description copied from class: IntEncoder
Encodes an integer to the output stream given in reInit

Specified by:
encode in class IntEncoder
Throws:
IOException

createMatchingDecoder

public IntDecoder createMatchingDecoder()
Description copied from class: IntEncoder
Returns an IntDecoder which matches this encoder. Every encoder must return an IntDecoder and null is not a valid value. If an encoder is just a filter, it should at least return its wrapped encoder's matching decoder.

NOTE: this method should create a new instance of the matching decoder and leave the instance sharing to the caller. Returning the same instance over and over is risky because encoders and decoders are not thread safe.

Specified by:
createMatchingDecoder in class IntEncoder

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FourFlagsIntDecoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class FourFlagsIntDecoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntDecoder
        extended by  org.apache.lucene.util.encoding.FourFlagsIntDecoder
Direct Known Subclasses:
NOnesIntDecoder
public class FourFlagsIntDecoder
extends IntDecoder

Decodes data which was encoded by FourFlagsIntEncoder. Scans the indicator, one flag (1-bits) at a time, and decodes extra data using VInt8IntDecoder.

See Also:
FourFlagsIntEncoder
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.util.encoding.IntDecoder
EOS, in
Constructor Summary
FourFlagsIntDecoder()
Method Summary
long | decode() Decodes data received from the input stream, and returns one decoded integer.
void | reInit(InputStream in) Sets the input stream from which the encoded data is read.
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FourFlagsIntDecoder

public FourFlagsIntDecoder()
Method Detail

decode

public long decode()
            throws IOException
Description copied from class: IntDecoder
Decodes data received from the input stream, and returns one decoded integer. If end of stream is reached, IntDecoder.EOS is returned.

Specified by:
decode in class IntDecoder
Returns:
one decoded integer as long or IntDecoder.EOS if end-of-stream reached.
Throws:
IOException - if an I/O error occurs

reInit

public void reInit(InputStream in)
Description copied from class: IntDecoder
Sets the input stream from which the encoded data is read.

Overrides:
reInit in class IntDecoder

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FourFlagsIntEncoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class FourFlagsIntEncoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntEncoder
        extended by  org.apache.lucene.util.encoding.ChunksIntEncoder
            extended by  org.apache.lucene.util.encoding.FourFlagsIntEncoder
Direct Known Subclasses:
NOnesIntEncoder
public class FourFlagsIntEncoder
extends ChunksIntEncoder

A ChunksIntEncoder which encodes values in chunks of 4. Every group starts with a single byte (called indicator) which represents 4 - 2 bit flags, where the values:

  • 1, 2 or 3 mean the encoded value is '1', '2' or '3' respectively.
  • 0 means the value is encoded using VInt8IntEncoder, and the encoded bytes follow the indicator.
    Since value 0 is illegal, and 1-3 are encoded in the indicator, the actual value that is encoded is value-4, which saves some more bits.
Encoding example:
  • Original values: 6, 16, 5, 9, 7, 1, 11
  • After sorting: 1, 5, 6, 7, 9, 11, 16
  • D-Gap computing: 1, 4, 1, 1, 2, 5 (so far - done by DGapIntEncoder)
  • Encoding: 1,0,1,1 as the first indicator, followed by 0 (4-4), than 2,0,0,0 as the second indicator, followed by 1 (5-4) encoded with.
  • Binary encode: 01 | 01 | 00 | 01 00000000 00 | 00 | 00 | 10 00000001 (indicators are underlined).
    NOTE: the order of the values in the indicator is lsb ⇒ msb, which allows for more efficient decoding.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.util.encoding.ChunksIntEncoder
encodeQueue, encodeQueueSize, encoder, indicator, ordinal
Fields inherited from class org.apache.lucene.util.encoding.IntEncoder
out
Constructor Summary
FourFlagsIntEncoder()
Method Summary
IntDecoder | createMatchingDecoder() Returns an IntDecoder which matches this encoder.
void | encode(int data) Small values (<=3) are stored in the indicator while larger values are saved for later encoding in the ChunksIntEncoder.encodeQueue.
String | toString()
Methods inherited from class org.apache.lucene.util.encoding.ChunksIntEncoder
close, encodeChunk, reInit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

FourFlagsIntEncoder

public FourFlagsIntEncoder()
Method Detail

encode

public void encode(int data)
            throws IOException
Small values (<=3) are stored in the indicator while larger values are saved for later encoding in the ChunksIntEncoder.encodeQueue. Since Vint8 will only encode values larger or equal to 4, the values saves for encoded are transformed to (value - 4).
When a chunk is ready (got 4 values), the ChunksIntEncoder.encodeChunk() takes control.

Specified by:
encode in class IntEncoder
Throws:
IOException

createMatchingDecoder

public IntDecoder createMatchingDecoder()
Description copied from class: IntEncoder
Returns an IntDecoder which matches this encoder. Every encoder must return an IntDecoder and null is not a valid value. If an encoder is just a filter, it should at least return its wrapped encoder's matching decoder.

NOTE: this method should create a new instance of the matching decoder and leave the instance sharing to the caller. Returning the same instance over and over is risky because encoders and decoders are not thread safe.

Specified by:
createMatchingDecoder in class IntEncoder

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntDecoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class IntDecoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntDecoder
Direct Known Subclasses:
DGapIntDecoder, EightFlagsIntDecoder, FourFlagsIntDecoder, SimpleIntDecoder, VInt8IntDecoder
public abstract class IntDecoder
extends Object

Decodes integers from a set InputStream. For re-usability, the decoder's input stream can be set by (reInit(InputStream)). By design, Decoders are NOT thread-safe.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static long | EOS A special long value which is used to indicate end-of-stream has reached.
protected InputStream | in Input stream from which the encoded bytes are read
Constructor Summary
IntDecoder()
Method Summary
abstract long | decode() Decodes data received from the input stream, and returns one decoded integer.
void | reInit(InputStream in) Sets the input stream from which the encoded data is read.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

EOS

public static final long EOS
A special long value which is used to indicate end-of-stream has reached.

See Also:
Constant Field Values

in

protected InputStream in
Input stream from which the encoded bytes are read

Constructor Detail

IntDecoder

public IntDecoder()
Method Detail

reInit

public void reInit(InputStream in)
Sets the input stream from which the encoded data is read.

decode

public abstract long decode()
                     throws IOException
Decodes data received from the input stream, and returns one decoded integer. If end of stream is reached, EOS is returned.

Returns:
one decoded integer as long or EOS if end-of-stream reached.
Throws:
IOException - if an I/O error occurs
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntEncoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class IntEncoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntEncoder
Direct Known Subclasses:
ChunksIntEncoder, IntEncoderFilter, SimpleIntEncoder, VInt8IntEncoder
public abstract class IntEncoder
extends Object

Encodes integers to a set OutputStream. Extending classes need to override encode(int) to encode the value using their encoding algorithm. The default implementation of close() closes the set OutputStream.

The default constructor is provided for convenience only. One must call reInit(OutputStream) before calling encode(int) or close().

For convenience, each encoder implements createMatchingDecoder() for easy access to the matching decoder.

NOTE: some implementations may buffer the encoded values in memory (such as IntEncoderFilter implementations) and encoding will happen only upon calling close(). Therefore it is important to always call close() on the encoder at hand.

NOTE: encoders are usually not thread safe, unless specifically documented otherwise by an implementation.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected  OutputStream out
Constructor Summary
IntEncoder()
Default constructor, provided here for robustness: if in the future a constructor with parameters will be added, this might break custom implementations of this class which call this implicit constructor.
Method Summary
void | close() Instructs the encoder to finish the encoding process.
abstract IntDecoder | createMatchingDecoder() Returns an IntDecoder which matches this encoder.
abstract void | encode(int value) Encodes an integer to the output stream given in reInit
void | reInit(OutputStream out) Reinitializes the encoder with the give OutputStream.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

out

protected OutputStream out
Constructor Detail

IntEncoder

public IntEncoder()
Default constructor, provided here for robustness: if in the future a constructor with parameters will be added, this might break custom implementations of this class which call this implicit constructor. So we make it explicit to avoid any such issue in the future.

Method Detail

close

public void close()
           throws IOException
Instructs the encoder to finish the encoding process. This method closes the output stream which was specified by reInit. An implementation may do here additional cleanup required to complete the encoding, such as flushing internal buffers, etc.
Once this method was called, no further calls to encode should be made before first calling reInit.

NOTE: overriding classes should make sure they either call super.close() or close the output stream themselves.

Throws:
IOException

encode

public abstract void encode(int value)
                     throws IOException
Encodes an integer to the output stream given in reInit

Throws:
IOException

createMatchingDecoder

public abstract IntDecoder createMatchingDecoder()
Returns an IntDecoder which matches this encoder. Every encoder must return an IntDecoder and null is not a valid value. If an encoder is just a filter, it should at least return its wrapped encoder's matching decoder.

NOTE: this method should create a new instance of the matching decoder and leave the instance sharing to the caller. Returning the same instance over and over is risky because encoders and decoders are not thread safe.

reInit

public void reInit(OutputStream out)
Reinitializes the encoder with the give OutputStream. For re-usability it can be changed without the need to reconstruct a new object.

NOTE: after calling close(), one must call this method even if the output stream itself hasn't changed. An example case is that the output stream wraps a byte[], and the output stream itself is reset, but its instance hasn't changed. Some implementations of IntEncoder may write some metadata about themselves to the output stream, and therefore it is imperative that one calls this method before encoding any data.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntEncoderFilter

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class IntEncoderFilter

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntEncoder
        extended by  org.apache.lucene.util.encoding.IntEncoderFilter
Direct Known Subclasses:
DGapIntEncoder, SortingIntEncoder, UniqueValuesIntEncoder
public abstract class IntEncoderFilter
extends IntEncoder

An abstract implementation of IntEncoder which is served as a filter on the values to encode. An encoder filter wraps another IntEncoder which does the actual encoding. This allows for chaining filters and encoders, such as:

 new UniqueValuesIntEncoder(new DGapIntEncoder(new VInt8IntEnoder()));
 UniqueValuesIntEncoder followed by DGapIntEncoder

The default implementation implements close() by closing the wrapped encoder and reInit(OutputStream) by re-initializing the wrapped encoder.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected  IntEncoder encoder
Fields inherited from class org.apache.lucene.util.encoding.IntEncoder
out
Constructor Summary
protected IntEncoderFilter(IntEncoder encoder)
Method Summary
void | close() Instructs the encoder to finish the encoding process.
void | reInit(OutputStream out) Reinitializes the encoder with the give OutputStream.
Methods inherited from class org.apache.lucene.util.encoding.IntEncoder
createMatchingDecoder, encode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

encoder

protected final IntEncoder encoder
Constructor Detail

IntEncoderFilter

protected IntEncoderFilter(IntEncoder encoder)
Method Detail

close

public void close()
           throws IOException
Description copied from class: IntEncoder
Instructs the encoder to finish the encoding process. This method closes the output stream which was specified by reInit. An implementation may do here additional cleanup required to complete the encoding, such as flushing internal buffers, etc.
Once this method was called, no further calls to encode should be made before first calling reInit.

NOTE: overriding classes should make sure they either call super.close() or close the output stream themselves.

Overrides:
close in class IntEncoder
Throws:
IOException

reInit

public void reInit(OutputStream out)
Description copied from class: IntEncoder
Reinitializes the encoder with the give OutputStream. For re-usability it can be changed without the need to reconstruct a new object.

NOTE: after calling IntEncoder.close(), one must call this method even if the output stream itself hasn't changed. An example case is that the output stream wraps a byte[], and the output stream itself is reset, but its instance hasn't changed. Some implementations of IntEncoder may write some metadata about themselves to the output stream, and therefore it is imperative that one calls this method before encoding any data.

Overrides:
reInit in class IntEncoder
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NOnesIntDecoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class NOnesIntDecoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntDecoder
        extended by  org.apache.lucene.util.encoding.FourFlagsIntDecoder
            extended by  org.apache.lucene.util.encoding.NOnesIntDecoder

public class NOnesIntDecoder
extends FourFlagsIntDecoder

Decodes data which was encoded by NOnesIntEncoder. Uses a FourFlagsIntDecoder to perform the actual encoding and translates the values back as described in NOnesIntEncoder.

See Also:
NOnesIntEncoder
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.util.encoding.IntDecoder
EOS, in
Constructor Summary
NOnesIntDecoder(int n)
Constructs a decoder with a given N (Number of consecutive '1's which are translated into a single target value '2'.
Method Summary
long | decode() Decodes data received from the input stream, and returns one decoded integer.
void | reInit(InputStream in) Sets the input stream from which the encoded data is read.
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NOnesIntDecoder

public NOnesIntDecoder(int n)
Constructs a decoder with a given N (Number of consecutive '1's which are translated into a single target value '2'.

Method Detail

decode

public long decode()
            throws IOException
Description copied from class: IntDecoder
Decodes data received from the input stream, and returns one decoded integer. If end of stream is reached, IntDecoder.EOS is returned.

Overrides:
decode in class FourFlagsIntDecoder
Returns:
one decoded integer as long or IntDecoder.EOS if end-of-stream reached.
Throws:
IOException - if an I/O error occurs

reInit

public void reInit(InputStream in)
Description copied from class: IntDecoder
Sets the input stream from which the encoded data is read.

Overrides:
reInit in class FourFlagsIntDecoder

toString

public String toString()
Overrides:
toString in class FourFlagsIntDecoder
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NOnesIntEncoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class NOnesIntEncoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntEncoder
        extended by  org.apache.lucene.util.encoding.ChunksIntEncoder
            extended by  org.apache.lucene.util.encoding.FourFlagsIntEncoder
                extended by  org.apache.lucene.util.encoding.NOnesIntEncoder

public class NOnesIntEncoder
extends FourFlagsIntEncoder

A variation of FourFlagsIntEncoder which translates the data as follows:

  • Values ≥ 2 are trnalsated to value+1 (2 ⇒ 3, 3 ⇒ 4 and so forth).
  • Any N occurrences of 1 are encoded as a single 2.
  • Otherwise, each 1 is encoded as 1.

Encoding examples:

  • N = 4: the data 1,1,1,1,1 is translated to: 2, 1
  • N = 3: the data 1,2,3,4,1,1,1,1,5 is translated to 1,3,4,5,2,1,6
NOTE: this encoder does not support values ≤ 0 and Integer.MAX_VALUE. 0 is not supported because it's not supported by FourFlagsIntEncoder and Integer.MAX_VALUE because this encoder translates N to N+1, which will cause an overflow and Integer.MAX_VALUE will become a negative number, which is not supported as well.
This does not mean you cannot encode Integer.MAX_VALUE. If it is not the first value to encode, and you wrap this encoder with DGapIntEncoder, then the value that will be sent to this encoder will be MAX_VAL - prev.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.util.encoding.ChunksIntEncoder
encodeQueue, encodeQueueSize, encoder, indicator, ordinal
Fields inherited from class org.apache.lucene.util.encoding.IntEncoder
out
Constructor Summary
NOnesIntEncoder(int n)
Constructs an encoder with a given value of N (N: Number of consecutive '1's to be translated into single target value '2').
Method Summary
void | close() Instructs the encoder to finish the encoding process.
IntDecoder | createMatchingDecoder() Returns an IntDecoder which matches this encoder.
void | encode(int value) Small values (<=3) are stored in the indicator while larger values are saved for later encoding in the ChunksIntEncoder.encodeQueue.
void | reInit(OutputStream out) Reinitializes the encoder with the give OutputStream.
String | toString()
Methods inherited from class org.apache.lucene.util.encoding.ChunksIntEncoder
encodeChunk
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

NOnesIntEncoder

public NOnesIntEncoder(int n)
Constructs an encoder with a given value of N (N: Number of consecutive '1's to be translated into single target value '2').

Method Detail

close

public void close()
           throws IOException
Description copied from class: IntEncoder
Instructs the encoder to finish the encoding process. This method closes the output stream which was specified by reInit. An implementation may do here additional cleanup required to complete the encoding, such as flushing internal buffers, etc.
Once this method was called, no further calls to encode should be made before first calling reInit.

NOTE: overriding classes should make sure they either call super.close() or close the output stream themselves.

Overrides:
close in class ChunksIntEncoder
Throws:
IOException

encode

public void encode(int value)
            throws IOException
Description copied from class: FourFlagsIntEncoder
Small values (<=3) are stored in the indicator while larger values are saved for later encoding in the ChunksIntEncoder.encodeQueue. Since Vint8 will only encode values larger or equal to 4, the values saves for encoded are transformed to (value - 4).
When a chunk is ready (got 4 values), the ChunksIntEncoder.encodeChunk() takes control.

Overrides:
encode in class FourFlagsIntEncoder
Throws:
IOException

createMatchingDecoder

public IntDecoder createMatchingDecoder()
Description copied from class: IntEncoder
Returns an IntDecoder which matches this encoder. Every encoder must return an IntDecoder and null is not a valid value. If an encoder is just a filter, it should at least return its wrapped encoder's matching decoder.

NOTE: this method should create a new instance of the matching decoder and leave the instance sharing to the caller. Returning the same instance over and over is risky because encoders and decoders are not thread safe.

Overrides:
createMatchingDecoder in class FourFlagsIntEncoder

reInit

public void reInit(OutputStream out)
Description copied from class: IntEncoder
Reinitializes the encoder with the give OutputStream. For re-usability it can be changed without the need to reconstruct a new object.

NOTE: after calling IntEncoder.close(), one must call this method even if the output stream itself hasn't changed. An example case is that the output stream wraps a byte[], and the output stream itself is reset, but its instance hasn't changed. Some implementations of IntEncoder may write some metadata about themselves to the output stream, and therefore it is imperative that one calls this method before encoding any data.

Overrides:
reInit in class ChunksIntEncoder

toString

public String toString()
Overrides:
toString in class FourFlagsIntEncoder
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.util.encoding
Classes
ChunksIntEncoder
DGapIntDecoder
DGapIntEncoder
EightFlagsIntDecoder
EightFlagsIntEncoder
FourFlagsIntDecoder
FourFlagsIntEncoder
IntDecoder
IntEncoder
IntEncoderFilter
NOnesIntDecoder
NOnesIntEncoder
SimpleIntDecoder
SimpleIntEncoder
SortingIntEncoder
UniqueValuesIntEncoder
VInt8IntDecoder
VInt8IntEncoder


org.apache.lucene.util.encoding

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.util.encoding

Offers various encoders and decoders for integers, as well as the mechanisms to create new ones.

See:
Description

Class Summary
ChunksIntEncoder | An IntEncoder which encodes values in chunks.
DGapIntDecoder | An IntDecoder which wraps another IntDecoder and reverts the d-gap that was encoded by DGapIntEncoder.
DGapIntEncoder | An IntEncoderFilter which encodes the gap between the given values, rather than the values themselves.
EightFlagsIntDecoder | Decodes data which was encoded by EightFlagsIntEncoder.
EightFlagsIntEncoder | A ChunksIntEncoder which encodes data in chunks of 8.
FourFlagsIntDecoder | Decodes data which was encoded by FourFlagsIntEncoder.
FourFlagsIntEncoder | A ChunksIntEncoder which encodes values in chunks of 4.
IntDecoder | Decodes integers from a set InputStream.
IntEncoder | Encodes integers to a set OutputStream.
IntEncoderFilter | An abstract implementation of IntEncoder which is served as a filter on the values to encode.
NOnesIntDecoder | Decodes data which was encoded by NOnesIntEncoder.
NOnesIntEncoder | A variation of FourFlagsIntEncoder which translates the data as follows: Values ≥ 2 are trnalsated to value+1 (2 ⇒ 3, 3 ⇒ 4 and so forth).
SimpleIntDecoder | A simple stream decoder which can decode values encoded with SimpleIntEncoder.
SimpleIntEncoder | A simple IntEncoder, writing an integer as 4 raw bytes.
SortingIntEncoder | An IntEncoderFilter which sorts the values to encode in ascending order before encoding them.
UniqueValuesIntEncoder | An IntEncoderFilter which ensures only unique values are encoded.
VInt8IntDecoder | An IntDecoder which can decode values encoded by VInt8IntEncoder.
VInt8IntEncoder | An IntEncoder which implements variable length encoding.

Package org.apache.lucene.util.encoding Description

Offers various encoders and decoders for integers, as well as the mechanisms to create new ones. The super class for all encoders is IntEncoder and for most of the encoders there is a matching IntDecoder implementation (not all encoders need a decoder).

An encoder encodes the integers that are passed to encode into a set output stream (see reInit). One should always call close when all integers have been encoded, to ensure proper finish by the encoder. Some encoders buffer values in-memory and encode in batches in order to optimize the encoding, and not closing them may result in loss of information or corrupt stream.

A proper and typical usage of an encoder looks like this:

int[] data = <the values to encode>
IntEncoder encoder = new VInt8IntEncoder();
OutputStream out = new ByteArrayOutputStream();
encoder.reInit(out);
for (int val : data) {
  encoder.encode(val);
}
encoder.close();

// Print the bytes in binary
byte[] bytes = out.toByteArray();
for (byte b : bytes) {
  System.out.println(Integer.toBinaryString(b));
}
Each encoder also implements createMatchingDecoder which returns the matching decoder for this encoder. As mentioned above, not all encoders have a matching decoder (like some encoder filters which are explained next), however every encoder should return a decoder following a call to that method. To complete the example above, one can easily iterate over the decoded values like this:

IntDecoder d = e.createMatchingDecoder();
d.reInit(new ByteArrayInputStream(bytes));
long val;
while ((val = d.decode()) != IntDecoder.EOS) {
  System.out.println(val);
}

Some encoders don't perform any encoding at all, or do not include an encoding logic. Those are called IntEncoderFilters. A filter is an encoder which delegates the encoding task to a given encoder, however performs additional logic before the values are sent for encoding. An example is DGapIntEncoder which encodes the gaps between values rather than the values themselves. Another example is SortingIntEncoder which sorts all the values in ascending order before they are sent for encoding. This encoder aggregates the values in its encode implementation and decoding only happens upon calling close.

Extending IntEncoder

Extending IntEncoder is a very easy task. One only needs to implement encode and createMatchingDecoder as the base implementation takes care of re-initializing the output stream and closing it. The following example illustrates how can one write an encoder (and a matching decoder) which 'tags' the stream with type/ID of the encoder. Such tagging is important in scenarios where an application uses different encoders for different streams, and wants to manage some sort of mapping between an encoder ID to an IntEncoder/Decoder implementation, so a proper decoder will be initialized on the fly:

public class TaggingIntEncoder extends IntEncoderFilter {

  public TaggingIntEncoder(IntEncoder encoder) {
    super(encoder);
  }

  @Override
  public void encode(int value) throws IOException {
    encoder.encode(value);
  }

  @Override
  public IntDecoder createMatchingDecoder() {
    return new TaggingIntDecoder();
  }

  @Override
  public void reInit(OutputStream out) {
    super.reInit(os);
    // Assumes the application has a static EncodersMap class which is able to
    // return a unique ID for a given encoder.
    int encoderID = EncodersMap.getID(encoder);
    this.out.write(encoderID);
  }

  @Override
  public String toString() {
    return "Tagging (" + encoder.toString() + ")";
  }

}
And the matching decoder:

public class TaggingIntDecoder extends IntDecoder {

  // Will be initialized upon calling reInit.
  private IntDecoder decoder;

  @Override
  public void reInit(InputStream in) {
    super.reInit(in);

    // Read the ID of the encoder that tagged this stream.
    int encoderID = in.read();

    // Assumes EncodersMap can return the proper IntEncoder given the ID.
    decoder = EncodersMap.getEncoder(encoderID).createMatchingDecoder();
  }

  @Override
  public long decode() throws IOException {
    return decoder.decode();
  }

  @Override
  public String toString() {
    return "Tagging (" + decoder == null ? "none" : decoder.toString() + ")";
  }

}
The example implements TaggingIntEncoder as a filter over another encoder. Even though it does not do any filtering on the actual values, it feels right to present it as a filter. Anyway, this is just an example code and one can choose to implement it however it makes sense to the application. For simplicity, error checking was omitted from the sample code.


org.apache.lucene.util.encoding Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.util.encoding

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.encoding.IntDecoder
      • org.apache.lucene.util.encoding.DGapIntDecoder
      • org.apache.lucene.util.encoding.EightFlagsIntDecoder
      • org.apache.lucene.util.encoding.FourFlagsIntDecoder
        • org.apache.lucene.util.encoding.NOnesIntDecoder
      • org.apache.lucene.util.encoding.SimpleIntDecoder
      • org.apache.lucene.util.encoding.VInt8IntDecoder
    • org.apache.lucene.util.encoding.IntEncoder
      • org.apache.lucene.util.encoding.ChunksIntEncoder
        • org.apache.lucene.util.encoding.EightFlagsIntEncoder
        • org.apache.lucene.util.encoding.FourFlagsIntEncoder
          • org.apache.lucene.util.encoding.NOnesIntEncoder
      • org.apache.lucene.util.encoding.IntEncoderFilter
        • org.apache.lucene.util.encoding.DGapIntEncoder
        • org.apache.lucene.util.encoding.SortingIntEncoder
        • org.apache.lucene.util.encoding.UniqueValuesIntEncoder
      • org.apache.lucene.util.encoding.SimpleIntEncoder
      • org.apache.lucene.util.encoding.VInt8IntEncoder


Uses of Package org.apache.lucene.util.encoding

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.util.encoding

Packages that use org.apache.lucene.util.encoding
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.util.encoding | Offers various encoders and decoders for integers, as well as the mechanisms to create new ones.

Classes in org.apache.lucene.util.encoding used by org.apache.lucene.facet.index
IntEncoder
Encodes integers to a set OutputStream.

Classes in org.apache.lucene.util.encoding used by org.apache.lucene.facet.index.params
IntEncoder
Encodes integers to a set OutputStream.

Classes in org.apache.lucene.util.encoding used by org.apache.lucene.facet.search
IntDecoder
Decodes integers from a set InputStream.

Classes in org.apache.lucene.util.encoding used by org.apache.lucene.util.encoding
ChunksIntEncoder
An IntEncoder which encodes values in chunks.
FourFlagsIntDecoder
Decodes data which was encoded by FourFlagsIntEncoder.
FourFlagsIntEncoder
A ChunksIntEncoder which encodes values in chunks of 4.
IntDecoder
Decodes integers from a set InputStream.
IntEncoder
Encodes integers to a set OutputStream.
IntEncoderFilter
An abstract implementation of IntEncoder which is served as a filter on the values to encode.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SimpleIntDecoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class SimpleIntDecoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntDecoder
        extended by  org.apache.lucene.util.encoding.SimpleIntDecoder

public class SimpleIntDecoder
extends IntDecoder

A simple stream decoder which can decode values encoded with SimpleIntEncoder.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.util.encoding.IntDecoder
EOS, in
Constructor Summary
SimpleIntDecoder()
Method Summary
long | decode() Decodes data received from the input stream, and returns one decoded integer.
String | toString()
Methods inherited from class org.apache.lucene.util.encoding.IntDecoder
reInit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SimpleIntDecoder

public SimpleIntDecoder()
Method Detail

decode

public long decode()
            throws IOException
Description copied from class: IntDecoder
Decodes data received from the input stream, and returns one decoded integer. If end of stream is reached, IntDecoder.EOS is returned.

Specified by:
decode in class IntDecoder
Returns:
one decoded integer as long or IntDecoder.EOS if end-of-stream reached.
Throws:
IOException - if an I/O error occurs

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SimpleIntEncoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class SimpleIntEncoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntEncoder
        extended by  org.apache.lucene.util.encoding.SimpleIntEncoder

public class SimpleIntEncoder
extends IntEncoder

A simple IntEncoder, writing an integer as 4 raw bytes. *

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.util.encoding.IntEncoder
out
Constructor Summary
SimpleIntEncoder()
Method Summary
IntDecoder | createMatchingDecoder() Returns an IntDecoder which matches this encoder.
void | encode(int value) This method makes sure the value wasn't previously encoded by checking against the Set.
String | toString()
Methods inherited from class org.apache.lucene.util.encoding.IntEncoder
close, reInit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SimpleIntEncoder

public SimpleIntEncoder()
Method Detail

encode

public void encode(int value)
            throws IOException
This method makes sure the value wasn't previously encoded by checking against the Set. If the value wasn't encoded, it's added to the Set, and encoded with {#link Vint8#encode}

Specified by:
encode in class IntEncoder
Parameters:
value - an integer to be encoded
Throws:
IOException - possibly thrown by the OutputStream

createMatchingDecoder

public IntDecoder createMatchingDecoder()
Description copied from class: IntEncoder
Returns an IntDecoder which matches this encoder. Every encoder must return an IntDecoder and null is not a valid value. If an encoder is just a filter, it should at least return its wrapped encoder's matching decoder.

NOTE: this method should create a new instance of the matching decoder and leave the instance sharing to the caller. Returning the same instance over and over is risky because encoders and decoders are not thread safe.

Specified by:
createMatchingDecoder in class IntEncoder

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SortingIntEncoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class SortingIntEncoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntEncoder
        extended by  org.apache.lucene.util.encoding.IntEncoderFilter
            extended by  org.apache.lucene.util.encoding.SortingIntEncoder

public class SortingIntEncoder
extends IntEncoderFilter

An IntEncoderFilter which sorts the values to encode in ascending order before encoding them. Encoding therefore happens upon calling close(). Since this encoder is usually chained with another encoder that relies on sorted values, it does not offer a default constructor.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.util.encoding.IntEncoderFilter
encoder
Fields inherited from class org.apache.lucene.util.encoding.IntEncoder
out
Constructor Summary
SortingIntEncoder(IntEncoder encoder)
Initializes with the given encoder.
Method Summary
void | close() Instructs the encoder to finish the encoding process.
IntDecoder | createMatchingDecoder() Returns an IntDecoder which matches this encoder.
void | encode(int value) Encodes an integer to the output stream given in reInit
void | reInit(OutputStream out) Reinitializes the encoder with the give OutputStream.
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

SortingIntEncoder

public SortingIntEncoder(IntEncoder encoder)
Initializes with the given encoder.

Method Detail

close

public void close()
           throws IOException
Description copied from class: IntEncoder
Instructs the encoder to finish the encoding process. This method closes the output stream which was specified by reInit. An implementation may do here additional cleanup required to complete the encoding, such as flushing internal buffers, etc.
Once this method was called, no further calls to encode should be made before first calling reInit.

NOTE: overriding classes should make sure they either call super.close() or close the output stream themselves.

Overrides:
close in class IntEncoderFilter
Throws:
IOException

encode

public void encode(int value)
            throws IOException
Description copied from class: IntEncoder
Encodes an integer to the output stream given in reInit

Specified by:
encode in class IntEncoder
Throws:
IOException

createMatchingDecoder

public IntDecoder createMatchingDecoder()
Description copied from class: IntEncoder
Returns an IntDecoder which matches this encoder. Every encoder must return an IntDecoder and null is not a valid value. If an encoder is just a filter, it should at least return its wrapped encoder's matching decoder.

NOTE: this method should create a new instance of the matching decoder and leave the instance sharing to the caller. Returning the same instance over and over is risky because encoders and decoders are not thread safe.

Specified by:
createMatchingDecoder in class IntEncoder

reInit

public void reInit(OutputStream out)
Description copied from class: IntEncoder
Reinitializes the encoder with the give OutputStream. For re-usability it can be changed without the need to reconstruct a new object.

NOTE: after calling IntEncoder.close(), one must call this method even if the output stream itself hasn't changed. An example case is that the output stream wraps a byte[], and the output stream itself is reset, but its instance hasn't changed. Some implementations of IntEncoder may write some metadata about themselves to the output stream, and therefore it is imperative that one calls this method before encoding any data.

Overrides:
reInit in class IntEncoderFilter

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UniqueValuesIntEncoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class UniqueValuesIntEncoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntEncoder
        extended by  org.apache.lucene.util.encoding.IntEncoderFilter
            extended by  org.apache.lucene.util.encoding.UniqueValuesIntEncoder

public final class UniqueValuesIntEncoder
extends IntEncoderFilter

An IntEncoderFilter which ensures only unique values are encoded. The implementation assumes the values given to encode(int) are sorted. If this is not the case, you can chain this encoder with SortingIntEncoder.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.util.encoding.IntEncoderFilter
encoder
Fields inherited from class org.apache.lucene.util.encoding.IntEncoder
out
Constructor Summary
UniqueValuesIntEncoder(IntEncoder encoder)
Constructs a new instance with the given encoder.
Method Summary
IntDecoder | createMatchingDecoder() Returns an IntDecoder which matches this encoder.
void | encode(int value) Encodes an integer to the output stream given in reInit
void | reInit(OutputStream out) Reinitializes the encoder with the give OutputStream.
String | toString()
Methods inherited from class org.apache.lucene.util.encoding.IntEncoderFilter
close
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UniqueValuesIntEncoder

public UniqueValuesIntEncoder(IntEncoder encoder)
Constructs a new instance with the given encoder.

Method Detail

encode

public void encode(int value)
            throws IOException
Description copied from class: IntEncoder
Encodes an integer to the output stream given in reInit

Specified by:
encode in class IntEncoder
Throws:
IOException

createMatchingDecoder

public IntDecoder createMatchingDecoder()
Description copied from class: IntEncoder
Returns an IntDecoder which matches this encoder. Every encoder must return an IntDecoder and null is not a valid value. If an encoder is just a filter, it should at least return its wrapped encoder's matching decoder.

NOTE: this method should create a new instance of the matching decoder and leave the instance sharing to the caller. Returning the same instance over and over is risky because encoders and decoders are not thread safe.

Specified by:
createMatchingDecoder in class IntEncoder

reInit

public void reInit(OutputStream out)
Description copied from class: IntEncoder
Reinitializes the encoder with the give OutputStream. For re-usability it can be changed without the need to reconstruct a new object.

NOTE: after calling IntEncoder.close(), one must call this method even if the output stream itself hasn't changed. An example case is that the output stream wraps a byte[], and the output stream itself is reset, but its instance hasn't changed. Some implementations of IntEncoder may write some metadata about themselves to the output stream, and therefore it is imperative that one calls this method before encoding any data.

Overrides:
reInit in class IntEncoderFilter

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VInt8IntDecoder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class VInt8IntDecoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntDecoder
        extended by  org.apache.lucene.util.encoding.VInt8IntDecoder

public class VInt8IntDecoder
extends IntDecoder

An IntDecoder which can decode values encoded by VInt8IntEncoder.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.util.encoding.IntDecoder
EOS, in
Constructor Summary
VInt8IntDecoder()
Method Summary
long | decode() Decodes data received from the input stream, and returns one decoded integer.
String | toString()
Methods inherited from class org.apache.lucene.util.encoding.IntDecoder
reInit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

VInt8IntDecoder

public VInt8IntDecoder()
Method Detail

decode

public long decode()
            throws IOException
Description copied from class: IntDecoder
Decodes data received from the input stream, and returns one decoded integer. If end of stream is reached, IntDecoder.EOS is returned.

Specified by:
decode in class IntDecoder
Returns:
one decoded integer as long or IntDecoder.EOS if end-of-stream reached.
Throws:
IOException - if an I/O error occurs

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


VInt8IntEncoder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.encoding
Class VInt8IntEncoder

java.lang.Object
    extended by  org.apache.lucene.util.encoding.IntEncoder
        extended by  org.apache.lucene.util.encoding.VInt8IntEncoder

public class VInt8IntEncoder
extends IntEncoder

An IntEncoder which implements variable length encoding. A number is encoded as follows:

  • If it is less than 127 and non-negative, i.e. uses only 7 bits, it is encoded as a single byte: 0bbbbbbb.
  • If it occupies more than 7 bits, it is represented as a series of bytes, each byte carrying 7 bits. All but the last byte have the MSB set, the last one has it unset.
Example:
  1. n = 117 = 01110101: This has less than 8 significant bits, therefore is encoded as 01110101 = 0x75.
  2. n = 100000 = (binary) 11000011010100000. This has 17 significant bits, thus needs three Vint8 bytes. Pad it to a multiple of 7 bits, then split it into chunks of 7 and add an MSB, 0 for the last byte, 1 for the others: 1|0000110 1|0001101 0|0100000 = 0x86 0x8D 0x20.
NOTE: although this encoder is not limited to values ≥ 0, it is not recommended for use with negative values, as their encoding will result in 5 bytes written to the output stream, rather than 4. For such values, either use SimpleIntEncoder or write your own version of variable length encoding, which can better handle negative values.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
Fields inherited from class org.apache.lucene.util.encoding.IntEncoder
out
Constructor Summary
VInt8IntEncoder()
Method Summary
IntDecoder | createMatchingDecoder() Returns an IntDecoder which matches this encoder.
void | encode(int value) Encodes an integer to the output stream given in reInit
String | toString()
Methods inherited from class org.apache.lucene.util.encoding.IntEncoder
close, reInit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

VInt8IntEncoder

public VInt8IntEncoder()
Method Detail

encode

public void encode(int value)
            throws IOException
Description copied from class: IntEncoder
Encodes an integer to the output stream given in reInit

Specified by:
encode in class IntEncoder
Throws:
IOException

createMatchingDecoder

public IntDecoder createMatchingDecoder()
Description copied from class: IntEncoder
Returns an IntDecoder which matches this encoder. Every encoder must return an IntDecoder and null is not a valid value. If an encoder is just a filter, it should at least return its wrapped encoder's matching decoder.

NOTE: this method should create a new instance of the matching decoder and leave the instance sharing to the caller. Returning the same instance over and over is risky because encoders and decoders are not thread safe.

Specified by:
createMatchingDecoder in class IntEncoder

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.util.encoding.ChunksIntEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.ChunksIntEncoder

Packages that use ChunksIntEncoder
org.apache.lucene.util.encoding Offers various encoders and decoders for integers, as well as the mechanisms to create new ones.

Uses of ChunksIntEncoder in org.apache.lucene.util.encoding

Subclasses of ChunksIntEncoder in org.apache.lucene.util.encoding
class | EightFlagsIntEncoder A ChunksIntEncoder which encodes data in chunks of 8.
class | FourFlagsIntEncoder A ChunksIntEncoder which encodes values in chunks of 4.
class | NOnesIntEncoder A variation of FourFlagsIntEncoder which translates the data as follows: Values ≥ 2 are trnalsated to value+1 (2 ⇒ 3, 3 ⇒ 4 and so forth).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.DGapIntDecoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.DGapIntDecoder

No usage of org.apache.lucene.util.encoding.DGapIntDecoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.DGapIntEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.DGapIntEncoder

No usage of org.apache.lucene.util.encoding.DGapIntEncoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.EightFlagsIntDecoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.EightFlagsIntDecoder

No usage of org.apache.lucene.util.encoding.EightFlagsIntDecoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.EightFlagsIntEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.EightFlagsIntEncoder

No usage of org.apache.lucene.util.encoding.EightFlagsIntEncoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.FourFlagsIntDecoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.FourFlagsIntDecoder

Packages that use FourFlagsIntDecoder
org.apache.lucene.util.encoding Offers various encoders and decoders for integers, as well as the mechanisms to create new ones.

Uses of FourFlagsIntDecoder in org.apache.lucene.util.encoding

Subclasses of FourFlagsIntDecoder in org.apache.lucene.util.encoding
 class NOnesIntDecoder
Decodes data which was encoded by NOnesIntEncoder.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.FourFlagsIntEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.FourFlagsIntEncoder

Packages that use FourFlagsIntEncoder
org.apache.lucene.util.encoding Offers various encoders and decoders for integers, as well as the mechanisms to create new ones.

Uses of FourFlagsIntEncoder in org.apache.lucene.util.encoding

Subclasses of FourFlagsIntEncoder in org.apache.lucene.util.encoding
 class NOnesIntEncoder
A variation of FourFlagsIntEncoder which translates the data as follows: Values ≥ 2 are trnalsated to value+1 (2 ⇒ 3, 3 ⇒ 4 and so forth).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.IntDecoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.IntDecoder

Packages that use IntDecoder
org.apache.lucene.facet.search | Faceted Search API
org.apache.lucene.util.encoding | Offers various encoders and decoders for integers, as well as the mechanisms to create new ones.

Uses of IntDecoder in org.apache.lucene.facet.search

Constructors in org.apache.lucene.facet.search with parameters of type IntDecoder
PayloadIntDecodingIterator(IndexReader indexReader, Term term, IntDecoder decoder)
PayloadIntDecodingIterator(IndexReader indexReader, Term term, IntDecoder decoder, byte[] buffer)

Uses of IntDecoder in org.apache.lucene.util.encoding

Subclasses of IntDecoder in org.apache.lucene.util.encoding
class | DGapIntDecoder An IntDecoder which wraps another IntDecoder and reverts the d-gap that was encoded by DGapIntEncoder.
class | EightFlagsIntDecoder Decodes data which was encoded by EightFlagsIntEncoder.
class | FourFlagsIntDecoder Decodes data which was encoded by FourFlagsIntEncoder.
class | NOnesIntDecoder Decodes data which was encoded by NOnesIntEncoder.
class | SimpleIntDecoder A simple stream decoder which can decode values encoded with SimpleIntEncoder.
class | VInt8IntDecoder An IntDecoder which can decode values encoded by VInt8IntEncoder.

Methods in org.apache.lucene.util.encoding that return IntDecoder
IntDecoder | EightFlagsIntEncoder.createMatchingDecoder()
IntDecoder | DGapIntEncoder.createMatchingDecoder()
IntDecoder | NOnesIntEncoder.createMatchingDecoder()
IntDecoder | VInt8IntEncoder.createMatchingDecoder()
IntDecoder | SortingIntEncoder.createMatchingDecoder()
abstract IntDecoder | IntEncoder.createMatchingDecoder() Returns an IntDecoder which matches this encoder.
IntDecoder | SimpleIntEncoder.createMatchingDecoder()
IntDecoder | UniqueValuesIntEncoder.createMatchingDecoder()
IntDecoder | FourFlagsIntEncoder.createMatchingDecoder()

Constructors in org.apache.lucene.util.encoding with parameters of type IntDecoder
DGapIntDecoder(IntDecoder decoder)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.IntEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.IntEncoder

Packages that use IntEncoder
org.apache.lucene.facet.index | Indexing of document categories
org.apache.lucene.facet.index.params | Indexing-time specifications for handling facets
org.apache.lucene.util.encoding | Offers various encoders and decoders for integers, as well as the mechanisms to create new ones.

Uses of IntEncoder in org.apache.lucene.facet.index

Constructors in org.apache.lucene.facet.index with parameters of type IntEncoder
CategoryListPayloadStream(IntEncoder encoder)
Creates a Payload stream using the specified encoder.

Uses of IntEncoder in org.apache.lucene.facet.index.params

Methods in org.apache.lucene.facet.index.params that return IntEncoder
 IntEncoder CategoryListParams.createEncoder()
Allows to override how categories are encoded and decoded.

Uses of IntEncoder in org.apache.lucene.util.encoding

Subclasses of IntEncoder in org.apache.lucene.util.encoding
class | ChunksIntEncoder An IntEncoder which encodes values in chunks.
class | DGapIntEncoder An IntEncoderFilter which encodes the gap between the given values, rather than the values themselves.
class | EightFlagsIntEncoder A ChunksIntEncoder which encodes data in chunks of 8.
class | FourFlagsIntEncoder A ChunksIntEncoder which encodes values in chunks of 4.
class | IntEncoderFilter An abstract implementation of IntEncoder which is served as a filter on the values to encode.
class | NOnesIntEncoder A variation of FourFlagsIntEncoder which translates the data as follows: Values ≥ 2 are trnalsated to value+1 (2 ⇒ 3, 3 ⇒ 4 and so forth).
class | SimpleIntEncoder A simple IntEncoder, writing an integer as 4 raw bytes.
class | SortingIntEncoder An IntEncoderFilter which sorts the values to encode in ascending order before encoding them.
class | UniqueValuesIntEncoder An IntEncoderFilter which ensures only unique values are encoded.
class | VInt8IntEncoder An IntEncoder which implements variable length encoding.

Fields in org.apache.lucene.util.encoding declared as IntEncoder
protected IntEncoder | IntEncoderFilter.encoder
protected IntEncoder | ChunksIntEncoder.encoder Encoder used to encode values outside the indicator.

Constructors in org.apache.lucene.util.encoding with parameters of type IntEncoder
DGapIntEncoder(IntEncoder encoder)
Initializes with the given encoder.
IntEncoderFilter(IntEncoder encoder)
SortingIntEncoder(IntEncoder encoder)
Initializes with the given encoder.
UniqueValuesIntEncoder(IntEncoder encoder)
Constructs a new instance with the given encoder.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.IntEncoderFilter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.IntEncoderFilter

Packages that use IntEncoderFilter
org.apache.lucene.util.encoding Offers various encoders and decoders for integers, as well as the mechanisms to create new ones.

Uses of IntEncoderFilter in org.apache.lucene.util.encoding

Subclasses of IntEncoderFilter in org.apache.lucene.util.encoding
class | DGapIntEncoder An IntEncoderFilter which encodes the gap between the given values, rather than the values themselves.
class | SortingIntEncoder An IntEncoderFilter which sorts the values to encode in ascending order before encoding them.
class | UniqueValuesIntEncoder An IntEncoderFilter which ensures only unique values are encoded.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.NOnesIntDecoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.NOnesIntDecoder

No usage of org.apache.lucene.util.encoding.NOnesIntDecoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.NOnesIntEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.NOnesIntEncoder

No usage of org.apache.lucene.util.encoding.NOnesIntEncoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.SimpleIntDecoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.SimpleIntDecoder

No usage of org.apache.lucene.util.encoding.SimpleIntDecoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.SimpleIntEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.SimpleIntEncoder

No usage of org.apache.lucene.util.encoding.SimpleIntEncoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.SortingIntEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.SortingIntEncoder

No usage of org.apache.lucene.util.encoding.SortingIntEncoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.UniqueValuesIntEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.UniqueValuesIntEncoder

No usage of org.apache.lucene.util.encoding.UniqueValuesIntEncoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.VInt8IntDecoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.VInt8IntDecoder

No usage of org.apache.lucene.util.encoding.VInt8IntDecoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.encoding.VInt8IntEncoder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.encoding.VInt8IntEncoder

No usage of org.apache.lucene.util.encoding.VInt8IntEncoder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Builder.Arc

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class Builder.Arc<T>

java.lang.Object
    extended by  org.apache.lucene.util.fst.Builder.Arc<T>
Enclosing class:
Builder<T>
public static class Builder.Arc<T>
extends Object

Expert: holds a pending (seen but not yet serialized) arc.

Field Summary
boolean | isFinal
int | label
T | nextFinalOutput
T | output
org.apache.lucene.util.fst.Builder.Node | target
Constructor Summary
Builder.Arc()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

label

public int label

target

public org.apache.lucene.util.fst.Builder.Node target

isFinal

public boolean isFinal

output

public T output

nextFinalOutput

public T nextFinalOutput
Constructor Detail

Builder.Arc

public Builder.Arc()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Builder.FreezeTail

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class Builder.FreezeTail<T>

java.lang.Object
    extended by  org.apache.lucene.util.fst.Builder.FreezeTail<T>
Enclosing class:
Builder<T>
public abstract static class Builder.FreezeTail<T>
extends Object

Expert: this is invoked by Builder whenever a suffix is serialized.

Constructor Summary
Builder.FreezeTail()
Method Summary
abstract  void freeze(Builder.UnCompiledNode<T>[] frontier, int prefixLenPlus1, IntsRef prevInput)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Builder.FreezeTail

public Builder.FreezeTail()
Method Detail

freeze

public abstract void freeze(Builder.UnCompiledNode<T>[] frontier,
                            int prefixLenPlus1,
                            IntsRef prevInput)
                     throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Builder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class Builder<T>

java.lang.Object
    extended by  org.apache.lucene.util.fst.Builder<T>

public class Builder<T>
extends Object

Builds a minimal FST (maps an IntsRef term to an arbitrary output) from pre-sorted terms with outputs. The FST becomes an FSA if you use NoOutputs. The FST is written on-the-fly into a compact serialized format byte array, which can be saved to / loaded from a Directory or used directly for traversal. The FST is always finite (no cycles).

NOTE: The algorithm is described at http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.24.3698

The parameterized type T is the output type. See the subclasses of Outputs.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | Builder.Arc<T> Expert: holds a pending (seen but not yet serialized) arc.
static class | Builder.FreezeTail<T> Expert: this is invoked by Builder whenever a suffix is serialized.
static class | Builder.UnCompiledNode<T> Expert: holds a pending (seen but not yet serialized) Node.
Constructor Summary
Builder(FST.INPUT_TYPE inputType, int minSuffixCount1, int minSuffixCount2, boolean doShareSuffix, boolean doShareNonSingletonNodes, int shareMaxTailLength, Outputs<T> outputs, Builder.FreezeTail<T> freezeTail, boolean willPackFST)
Instantiates an FST/FSA builder with all the possible tuning and construction tweaks.
Builder(FST.INPUT_TYPE inputType, Outputs<T> outputs)
Instantiates an FST/FSA builder without any pruning.
Method Summary
void | add(IntsRef input, T output) It's OK to add the same input twice in a row with different outputs, as long as outputs impls the merge method.
FST<T> | finish() Returns final FST.
int | getMappedStateCount()
long | getTermCount()
int | getTotStateCount()
void | setAllowArrayArcs(boolean b) Pass false to disable the array arc optimization while building the FST; this will make the resulting FST smaller but slower to traverse.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Builder

public Builder(FST.INPUT_TYPE inputType,
               Outputs<T> outputs)
Instantiates an FST/FSA builder without any pruning. A shortcut to Builder(FST.INPUT_TYPE, int, int, boolean, boolean, int, Outputs, FreezeTail, boolean) with pruning options turned off.

Builder

public Builder(FST.INPUT_TYPE inputType,
               int minSuffixCount1,
               int minSuffixCount2,
               boolean doShareSuffix,
               boolean doShareNonSingletonNodes,
               int shareMaxTailLength,
               Outputs<T> outputs,
               Builder.FreezeTail<T> freezeTail,
               boolean willPackFST)
Instantiates an FST/FSA builder with all the possible tuning and construction tweaks. Read parameter documentation carefully.

Parameters:
inputType - The input type (transition labels). Can be anything from FST.INPUT_TYPE enumeration. Shorter types will consume less memory. Strings (character sequences) are represented as FST.INPUT_TYPE.BYTE4 (full unicode codepoints).
minSuffixCount1 - If pruning the input graph during construction, this threshold is used for telling if a node is kept or pruned. If transition_count(node) >= minSuffixCount1, the node is kept.
minSuffixCount2 - (Note: only Mike McCandless knows what this one is really doing...)
doShareSuffix - If true, the shared suffixes will be compacted into unique paths. This requires an additional hash map for lookups in memory. Setting this parameter to false creates a single path for all input sequences. This will result in a larger graph, but may require less memory and will speed up construction.
doShareNonSingletonNodes - Only used if doShareSuffix is true. Set this to true to ensure FST is fully minimal, at cost of more CPU and more RAM during building.
shareMaxTailLength - Only used if doShareSuffix is true. Set this to Integer.MAX_VALUE to ensure FST is fully minimal, at cost of more CPU and more RAM during building.
outputs - The output type for each input sequence. Applies only if building an FST. For FSA, use NoOutputs.getSingleton() and NoOutputs.getNoOutput() as the singleton output object.
willPackFST - Pass true if you will pack the FST before saving. This causes the FST to create additional data structures internally to facilitate packing, but it means the resulting FST cannot be saved: it must first be packed using FST.pack(int, int)}.
Method Detail

getTotStateCount

public int getTotStateCount()

getTermCount

public long getTermCount()

getMappedStateCount

public int getMappedStateCount()

setAllowArrayArcs

public void setAllowArrayArcs(boolean b)
Pass false to disable the array arc optimization while building the FST; this will make the resulting FST smaller but slower to traverse.

add

public void add(IntsRef input,
                T output)
         throws IOException
It's OK to add the same input twice in a row with different outputs, as long as outputs impls the merge method.

Throws:
IOException

finish

public FST<T> finish()
              throws IOException
Returns final FST. NOTE: this will return null if nothing is accepted by the FST.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Builder.UnCompiledNode

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class Builder.UnCompiledNode<T>

java.lang.Object
    extended by  org.apache.lucene.util.fst.Builder.UnCompiledNode<T>
Enclosing class:
Builder<T>
public static final class Builder.UnCompiledNode<T>
extends Object

Expert: holds a pending (seen but not yet serialized) Node.

Field Summary
Builder.Arc<T>[] | arcs
int | depth This node's depth, starting from the automaton root.
long | inputCount
boolean | isFinal
int | numArcs
T | output
Constructor Summary
Builder.UnCompiledNode(Builder<T> owner, int depth)
Method Summary
void | addArc(int label, org.apache.lucene.util.fst.Builder.Node target)
void | clear()
void | deleteLast(int label, org.apache.lucene.util.fst.Builder.Node target)
T | getLastOutput(int labelToMatch)
boolean | isCompiled()
void | prependOutput(T outputPrefix)
void | replaceLast(int labelToMatch, org.apache.lucene.util.fst.Builder.Node target, T nextFinalOutput, boolean isFinal)
void | setLastOutput(int labelToMatch, T newOutput)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

numArcs

public int numArcs

arcs

public Builder.Arc<T>[] arcs

output

public T output

isFinal

public boolean isFinal

inputCount

public long inputCount

depth

public final int depth
This node's depth, starting from the automaton root.

Constructor Detail

Builder.UnCompiledNode

public Builder.UnCompiledNode(Builder<T> owner,
                              int depth)
Parameters:
depth - The node's depth starting from the automaton root. Needed for LUCENE-2934 (node expansion based on conditions other than the fanout size).
Method Detail

isCompiled

public boolean isCompiled()

clear

public void clear()

getLastOutput

public T getLastOutput(int labelToMatch)

addArc

public void addArc(int label,
                   org.apache.lucene.util.fst.Builder.Node target)

replaceLast

public void replaceLast(int labelToMatch,
                        org.apache.lucene.util.fst.Builder.Node target,
                        T nextFinalOutput,
                        boolean isFinal)

deleteLast

public void deleteLast(int label,
                       org.apache.lucene.util.fst.Builder.Node target)

setLastOutput

public void setLastOutput(int labelToMatch,
                          T newOutput)

prependOutput

public void prependOutput(T outputPrefix)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ByteSequenceOutputs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class ByteSequenceOutputs

java.lang.Object
    extended by  org.apache.lucene.util.fst.Outputs<BytesRef>
        extended by  org.apache.lucene.util.fst.ByteSequenceOutputs

public final class ByteSequenceOutputs
extends Outputs<BytesRef>

An FST Outputs implementation where each output is a sequence of bytes.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 BytesRef add(BytesRef prefix, BytesRef output)
Eg add("foo", "bar") -> "foobar"
 BytesRef common(BytesRef output1, BytesRef output2)
Eg common("foo", "foobar") -> "foo"
 BytesRef getNoOutput()
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output
static ByteSequenceOutputs getSingleton()
 String outputToString(BytesRef output)
 BytesRef read(DataInput in)
 BytesRef subtract(BytesRef output, BytesRef inc)
Eg subtract("foobar", "foo") -> "bar"
 void write(BytesRef prefix, DataOutput out)
Methods inherited from class org.apache.lucene.util.fst.Outputs
merge
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getSingleton

public static ByteSequenceOutputs getSingleton()

common

public BytesRef common(BytesRef output1,
                       BytesRef output2)
Description copied from class: Outputs
Eg common("foo", "foobar") -> "foo"

Specified by:
common in class Outputs<BytesRef>

subtract

public BytesRef subtract(BytesRef output,
                         BytesRef inc)
Description copied from class: Outputs
Eg subtract("foobar", "foo") -> "bar"

Specified by:
subtract in class Outputs<BytesRef>

add

public BytesRef add(BytesRef prefix,
                    BytesRef output)
Description copied from class: Outputs
Eg add("foo", "bar") -> "foobar"

Specified by:
add in class Outputs<BytesRef>

write

public void write(BytesRef prefix,
                  DataOutput out)
           throws IOException
Specified by:
write in class Outputs<BytesRef>
Throws:
IOException

read

public BytesRef read(DataInput in)
              throws IOException
Specified by:
read in class Outputs<BytesRef>
Throws:
IOException

getNoOutput

public BytesRef getNoOutput()
Description copied from class: Outputs
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output

Specified by:
getNoOutput in class Outputs<BytesRef>

outputToString

public String outputToString(BytesRef output)
Specified by:
outputToString in class Outputs<BytesRef>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BytesRefFSTEnum

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class BytesRefFSTEnum<T>

java.lang.Object
    extended by  org.apache.lucene.util.fst.BytesRefFSTEnum<T>

public final class BytesRefFSTEnum<T>
extends Object

Enumerates all input (BytesRef) + output pairs in an FST.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class BytesRefFSTEnum.InputOutput<T>
Holds a single input (BytesRef) + output pair.
Field Summary
protected FST.Arc<T>[] | arcs
protected FST<T> | fst
protected T | NO_OUTPUT
protected T[] | output
protected FST.Arc<T> | scratchArc
protected int | targetLength
protected int | upto
Constructor Summary
BytesRefFSTEnum(FST<T> fst)
doFloor controls the behavior of advance: if it's true doFloor is true, advance positions to the biggest term before target.
Method Summary
BytesRefFSTEnum.InputOutput<T> | current()
protected void | doNext()
protected void | doSeekCeil() Seeks to smallest term that's >= target.
protected boolean | doSeekExact() Seeks to exactly target term.
protected void | doSeekFloor() Seeks to largest term that's <= target.
protected int | getCurrentLabel()
protected int | getTargetLabel()
protected void | grow()
BytesRefFSTEnum.InputOutput<T> | next()
protected void | rewindPrefix() Rewinds enum state to match the shared prefix between current term and target term
BytesRefFSTEnum.InputOutput<T> | seekCeil(BytesRef target) Seeks to smallest term that's >= target.
BytesRefFSTEnum.InputOutput<T> | seekExact(BytesRef target) Seeks to exactly this term, returning null if the term doesn't exist.
BytesRefFSTEnum.InputOutput<T> | seekFloor(BytesRef target) Seeks to biggest term that's <= target.
protected void | setCurrentLabel(int label)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

fst

protected final FST<T> fst

arcs

protected FST.Arc<T>[] arcs

output

protected T[] output

NO_OUTPUT

protected final T NO_OUTPUT

scratchArc

protected final FST.Arc<T> scratchArc

upto

protected int upto

targetLength

protected int targetLength
Constructor Detail

BytesRefFSTEnum

public BytesRefFSTEnum(FST<T> fst)
doFloor controls the behavior of advance: if it's true doFloor is true, advance positions to the biggest term before target.

Method Detail

current

public BytesRefFSTEnum.InputOutput<T> current()

next

public BytesRefFSTEnum.InputOutput<T> next()
                                    throws IOException
Throws:
IOException

seekCeil

public BytesRefFSTEnum.InputOutput<T> seekCeil(BytesRef target)
                                        throws IOException
Seeks to smallest term that's >= target.

Throws:
IOException

seekFloor

public BytesRefFSTEnum.InputOutput<T> seekFloor(BytesRef target)
                                         throws IOException
Seeks to biggest term that's <= target.

Throws:
IOException

seekExact

public BytesRefFSTEnum.InputOutput<T> seekExact(BytesRef target)
                                         throws IOException
Seeks to exactly this term, returning null if the term doesn't exist. This is faster than using seekFloor(org.apache.lucene.util.BytesRef) or seekCeil(org.apache.lucene.util.BytesRef) because it short-circuits as soon the match is not found.

Throws:
IOException

getTargetLabel

protected int getTargetLabel()

getCurrentLabel

protected int getCurrentLabel()

setCurrentLabel

protected void setCurrentLabel(int label)

grow

protected void grow()

rewindPrefix

protected final void rewindPrefix()
                           throws IOException
Rewinds enum state to match the shared prefix between current term and target term

Throws:
IOException

doNext

protected void doNext()
               throws IOException
Throws:
IOException

doSeekCeil

protected void doSeekCeil()
                   throws IOException
Seeks to smallest term that's >= target.

Throws:
IOException

doSeekFloor

protected void doSeekFloor()
                    throws IOException
Seeks to largest term that's <= target.

Throws:
IOException

doSeekExact

protected boolean doSeekExact()
                       throws IOException
Seeks to exactly target term.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BytesRefFSTEnum.InputOutput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class BytesRefFSTEnum.InputOutput<T>

java.lang.Object
    extended by  org.apache.lucene.util.fst.BytesRefFSTEnum.InputOutput<T>
Enclosing class:
BytesRefFSTEnum<T>
public static class BytesRefFSTEnum.InputOutput<T>
extends Object

Holds a single input (BytesRef) + output pair.

Field Summary
BytesRef | input
T | output
Constructor Summary
BytesRefFSTEnum.InputOutput()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

input

public BytesRef input

output

public T output
Constructor Detail

BytesRefFSTEnum.InputOutput

public BytesRefFSTEnum.InputOutput()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FST.Arc

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class FST.Arc<T>

java.lang.Object
    extended by  org.apache.lucene.util.fst.FST.Arc<T>
Enclosing class:
FST<T>
public static final class FST.Arc<T>
extends Object

Represents a single arc.

Field Summary
int | label
T | nextFinalOutput
T | output
int | target
Constructor Summary
FST.Arc()
Method Summary
FST.Arc<T> | copyFrom(FST.Arc<T> other) Returns this
boolean | isFinal()
boolean | isLast()
String | toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

label

public int label

output

public T output

target

public int target

nextFinalOutput

public T nextFinalOutput
Constructor Detail

FST.Arc

public FST.Arc()
Method Detail

copyFrom

public FST.Arc<T> copyFrom(FST.Arc<T> other)
Returns this

isLast

public boolean isLast()

isFinal

public boolean isFinal()

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FST.BytesReader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class FST.BytesReader

java.lang.Object
    extended by  org.apache.lucene.store.DataInput
        extended by  org.apache.lucene.util.fst.FST.BytesReader
All Implemented Interfaces:
Cloneable
Enclosing class:
FST<T>
public abstract static class FST.BytesReader
extends DataInput

Reads the bytes from this FST. Use FST.getBytesReader(int) to obtain an instance for this FST; re-use across calls (but only within a single thread) for better performance.

Field Summary
protected byte[] | bytes
protected int | pos
Constructor Summary
protected FST.BytesReader(byte[] bytes, int pos)
Method Summary
Methods inherited from class org.apache.lucene.store.DataInput
clone, readByte, readBytes, readBytes, readChars, readInt, readLong, readShort, readString, readStringStringMap, readVInt, readVLong, setModifiedUTF8StringsMode
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

pos

protected int pos

bytes

protected final byte[] bytes
Constructor Detail

FST.BytesReader

protected FST.BytesReader(byte[] bytes,
                          int pos)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FST

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class FST<T>

java.lang.Object
    extended by  org.apache.lucene.util.fst.FST<T>

public final class FST<T>
extends Object

Represents an finite state machine (FST), using a compact byte[] format.

The format is similar to what's used by Morfologik (http://sourceforge.net/projects/morfologik).

NOTE: the FST cannot be larger than ~2.1 GB because it uses int to address the byte[].

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class | FST.Arc<T> Represents a single arc.
static class | FST.BytesReader Reads the bytes from this FST.
static class | FST.INPUT_TYPE Specifies allowed range of each int input label for this FST.
Field Summary
int | arcCount
int | arcWithOutputCount
static int | END_LABEL
FST.INPUT_TYPE | inputType
int | nodeCount
Outputs<T> | outputs
Constructor Summary
FST(DataInput in, Outputs<T> outputs)
Load a previously saved FST.
Method Summary
 FST.Arc<T> findTargetArc(int labelToMatch, FST.Arc<T> follow, FST.Arc<T> arc, FST.BytesReader in)
Finds an arc leaving the incoming arc, replacing the arc in place.
 int getArcCount()
 int getArcWithOutputCount()
 FST.BytesReader getBytesReader(int pos)
 T getEmptyOutput()
 FST.Arc<T> getFirstArc(FST.Arc<T> arc)
Fills virtual 'start' arc, ie, an empty incoming arc to the FST's start node
 FST.INPUT_TYPE getInputType()
 int getNodeCount()
 FST<T> pack(int minInCountDeref, int maxDerefNodes)
Expert: creates an FST by packing this one.
static
<T> FST<T>
read(File file, Outputs<T> outputs)
Reads an automaton from a file.
 FST.Arc<T> readFirstRealTargetArc(int node, FST.Arc<T> arc, FST.BytesReader in)
 FST.Arc<T> readFirstTargetArc(FST.Arc<T> follow, FST.Arc<T> arc)
Follow the follow arc and read the first arc of its target; this changes the provided arc (2nd arg) in-place and returns it.
 FST.Arc<T> readLastTargetArc(FST.Arc<T> follow, FST.Arc<T> arc)
Follows the follow arc and reads the last arc of its target; this changes the provided arc (2nd arg) in-place and returns it.
 FST.Arc<T> readNextArc(FST.Arc<T> arc)
In-place read; returns the arc.
 int readNextArcLabel(FST.Arc<T> arc)
Peeks at next arc's label; does not alter arc.
 FST.Arc<T> readNextRealArc(FST.Arc<T> arc, FST.BytesReader in)
Never returns null, but you should never call this if arc.isLast() is true.
 void save(DataOutput out)
 void save(File file)
Writes an automaton to a file.
 void setAllowArrayArcs(boolean v)
 int sizeInBytes()
Returns bytes used to represent the FST
static
<T> boolean
targetHasArcs(FST.Arc<T> arc)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

inputType

public final FST.INPUT_TYPE inputType

outputs

public final Outputs<T> outputs

nodeCount

public int nodeCount

arcCount

public int arcCount

arcWithOutputCount

public int arcWithOutputCount

END_LABEL

public static final int END_LABEL
See Also:
Constant Field Values
Constructor Detail

FST

public FST(DataInput in,
           Outputs<T> outputs)
    throws IOException
Load a previously saved FST.

Throws:
IOException
Method Detail

getInputType

public FST.INPUT_TYPE getInputType()

sizeInBytes

public int sizeInBytes()
Returns bytes used to represent the FST

getEmptyOutput

public T getEmptyOutput()

save

public void save(DataOutput out)
          throws IOException
Throws:
IOException

save

public void save(File file)
          throws IOException
Writes an automaton to a file.

Throws:
IOException

read

public static <T> FST<T> read(File file,
                              Outputs<T> outputs)
                   throws IOException
Reads an automaton from a file.

Throws:
IOException

targetHasArcs

public static <T> boolean targetHasArcs(FST.Arc<T> arc)

getFirstArc

public FST.Arc<T> getFirstArc(FST.Arc<T> arc)
Fills virtual 'start' arc, ie, an empty incoming arc to the FST's start node

readLastTargetArc

public FST.Arc<T> readLastTargetArc(FST.Arc<T> follow,
                                    FST.Arc<T> arc)
                             throws IOException
Follows the follow arc and reads the last arc of its target; this changes the provided arc (2nd arg) in-place and returns it.

Returns:
Returns the second argument (arc).
Throws:
IOException

readFirstTargetArc

public FST.Arc<T> readFirstTargetArc(FST.Arc<T> follow,
                                     FST.Arc<T> arc)
                              throws IOException
Follow the follow arc and read the first arc of its target; this changes the provided arc (2nd arg) in-place and returns it.

Returns:
Returns the second argument (arc).
Throws:
IOException

readFirstRealTargetArc

public FST.Arc<T> readFirstRealTargetArc(int node,
                                         FST.Arc<T> arc,
                                         FST.BytesReader in)
                                  throws IOException
Throws:
IOException

readNextArc

public FST.Arc<T> readNextArc(FST.Arc<T> arc)
                       throws IOException
In-place read; returns the arc.

Throws:
IOException

readNextArcLabel

public int readNextArcLabel(FST.Arc<T> arc)
                     throws IOException
Peeks at next arc's label; does not alter arc. Do not call this if arc.isLast()!

Throws:
IOException

readNextRealArc

public FST.Arc<T> readNextRealArc(FST.Arc<T> arc,
                                  FST.BytesReader in)
                           throws IOException
Never returns null, but you should never call this if arc.isLast() is true.

Throws:
IOException

findTargetArc

public FST.Arc<T> findTargetArc(int labelToMatch,
                                FST.Arc<T> follow,
                                FST.Arc<T> arc,
                                FST.BytesReader in)
                         throws IOException
Finds an arc leaving the incoming arc, replacing the arc in place. This returns null if the arc was not found, else the incoming arc.

Throws:
IOException

getNodeCount

public int getNodeCount()

getArcCount

public int getArcCount()

getArcWithOutputCount

public int getArcWithOutputCount()

setAllowArrayArcs

public void setAllowArrayArcs(boolean v)

getBytesReader

public final FST.BytesReader getBytesReader(int pos)

pack

public FST<T> pack(int minInCountDeref,
                   int maxDerefNodes)
            throws IOException
Expert: creates an FST by packing this one. This process requires substantial additional RAM (currently ~8 bytes per node), but then should produce a smaller FST.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FST.INPUT_TYPE

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD

org.apache.lucene.util.fst
Enum FST.INPUT_TYPE

java.lang.Object
    extended by  java.lang.Enum<FST.INPUT_TYPE>
        extended by  org.apache.lucene.util.fst.FST.INPUT_TYPE
All Implemented Interfaces:
Serializable, Comparable<FST.INPUT_TYPE>
Enclosing class:
FST<T>
public static enum FST.INPUT_TYPE
extends Enum<FST.INPUT_TYPE>

Specifies allowed range of each int input label for this FST.

Enum Constant Summary
BYTE1
BYTE2
BYTE4
Method Summary
static FST.INPUT_TYPE | valueOf(String name) Returns the enum constant of this type with the specified name.
static FST.INPUT_TYPE[] | values() Returns an array containing the constants of this enum type, in the order they're declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Enum Constant Detail

BYTE1

public static final FST.INPUT_TYPE BYTE1

BYTE2

public static final FST.INPUT_TYPE BYTE2

BYTE4

public static final FST.INPUT_TYPE BYTE4
Method Detail

values

public static final FST.INPUT_TYPE[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(FST.INPUT_TYPE c : FST.INPUT_TYPE.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static FST.INPUT_TYPE valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD DETAIL: ENUM CONSTANTS | FIELD | METHOD


IntSequenceOutputs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class IntSequenceOutputs

java.lang.Object
    extended by  org.apache.lucene.util.fst.Outputs<IntsRef>
        extended by  org.apache.lucene.util.fst.IntSequenceOutputs

public final class IntSequenceOutputs
extends Outputs<IntsRef>

An FST Outputs implementation where each output is a sequence of ints.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 IntsRef add(IntsRef prefix, IntsRef output)
Eg add("foo", "bar") -> "foobar"
 IntsRef common(IntsRef output1, IntsRef output2)
Eg common("foo", "foobar") -> "foo"
 IntsRef getNoOutput()
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output
static IntSequenceOutputs getSingleton()
 String outputToString(IntsRef output)
 IntsRef read(DataInput in)
 IntsRef subtract(IntsRef output, IntsRef inc)
Eg subtract("foobar", "foo") -> "bar"
 void write(IntsRef prefix, DataOutput out)
Methods inherited from class org.apache.lucene.util.fst.Outputs
merge
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getSingleton

public static IntSequenceOutputs getSingleton()

common

public IntsRef common(IntsRef output1,
                      IntsRef output2)
Description copied from class: Outputs
Eg common("foo", "foobar") -> "foo"

Specified by:
common in class Outputs<IntsRef>

subtract

public IntsRef subtract(IntsRef output,
                        IntsRef inc)
Description copied from class: Outputs
Eg subtract("foobar", "foo") -> "bar"

Specified by:
subtract in class Outputs<IntsRef>

add

public IntsRef add(IntsRef prefix,
                   IntsRef output)
Description copied from class: Outputs
Eg add("foo", "bar") -> "foobar"

Specified by:
add in class Outputs<IntsRef>

write

public void write(IntsRef prefix,
                  DataOutput out)
           throws IOException
Specified by:
write in class Outputs<IntsRef>
Throws:
IOException

read

public IntsRef read(DataInput in)
             throws IOException
Specified by:
read in class Outputs<IntsRef>
Throws:
IOException

getNoOutput

public IntsRef getNoOutput()
Description copied from class: Outputs
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output

Specified by:
getNoOutput in class Outputs<IntsRef>

outputToString

public String outputToString(IntsRef output)
Specified by:
outputToString in class Outputs<IntsRef>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntsRefFSTEnum

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class IntsRefFSTEnum<T>

java.lang.Object
    extended by  org.apache.lucene.util.fst.IntsRefFSTEnum<T>

public final class IntsRefFSTEnum<T>
extends Object

Enumerates all input (IntsRef) + output pairs in an FST.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class IntsRefFSTEnum.InputOutput<T>
Holds a single input (IntsRef) + output pair.
Field Summary
protected FST.Arc<T>[] | arcs
protected FST<T> | fst
protected T | NO_OUTPUT
protected T[] | output
protected FST.Arc<T> | scratchArc
protected int | targetLength
protected int | upto
Constructor Summary
IntsRefFSTEnum(FST<T> fst)
doFloor controls the behavior of advance: if it's true doFloor is true, advance positions to the biggest term before target.
Method Summary
IntsRefFSTEnum.InputOutput<T> | current()
protected void | doNext()
protected void | doSeekCeil() Seeks to smallest term that's >= target.
protected boolean | doSeekExact() Seeks to exactly target term.
protected void | doSeekFloor() Seeks to largest term that's <= target.
protected int | getCurrentLabel()
protected int | getTargetLabel()
protected void | grow()
IntsRefFSTEnum.InputOutput<T> | next()
protected void | rewindPrefix() Rewinds enum state to match the shared prefix between current term and target term
IntsRefFSTEnum.InputOutput<T> | seekCeil(IntsRef target) Seeks to smallest term that's >= target.
IntsRefFSTEnum.InputOutput<T> | seekExact(IntsRef target) Seeks to exactly this term, returning null if the term doesn't exist.
IntsRefFSTEnum.InputOutput<T> | seekFloor(IntsRef target) Seeks to biggest term that's <= target.
protected void | setCurrentLabel(int label)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

fst

protected final FST<T> fst

arcs

protected FST.Arc<T>[] arcs

output

protected T[] output

NO_OUTPUT

protected final T NO_OUTPUT

scratchArc

protected final FST.Arc<T> scratchArc

upto

protected int upto

targetLength

protected int targetLength
Constructor Detail

IntsRefFSTEnum

public IntsRefFSTEnum(FST<T> fst)
doFloor controls the behavior of advance: if it's true doFloor is true, advance positions to the biggest term before target.

Method Detail

current

public IntsRefFSTEnum.InputOutput<T> current()

next

public IntsRefFSTEnum.InputOutput<T> next()
                                   throws IOException
Throws:
IOException

seekCeil

public IntsRefFSTEnum.InputOutput<T> seekCeil(IntsRef target)
                                       throws IOException
Seeks to smallest term that's >= target.

Throws:
IOException

seekFloor

public IntsRefFSTEnum.InputOutput<T> seekFloor(IntsRef target)
                                        throws IOException
Seeks to biggest term that's <= target.

Throws:
IOException

seekExact

public IntsRefFSTEnum.InputOutput<T> seekExact(IntsRef target)
                                        throws IOException
Seeks to exactly this term, returning null if the term doesn't exist. This is faster than using seekFloor(org.apache.lucene.util.IntsRef) or seekCeil(org.apache.lucene.util.IntsRef) because it short-circuits as soon the match is not found.

Throws:
IOException

getTargetLabel

protected int getTargetLabel()

getCurrentLabel

protected int getCurrentLabel()

setCurrentLabel

protected void setCurrentLabel(int label)

grow

protected void grow()

rewindPrefix

protected final void rewindPrefix()
                           throws IOException
Rewinds enum state to match the shared prefix between current term and target term

Throws:
IOException

doNext

protected void doNext()
               throws IOException
Throws:
IOException

doSeekCeil

protected void doSeekCeil()
                   throws IOException
Seeks to smallest term that's >= target.

Throws:
IOException

doSeekFloor

protected void doSeekFloor()
                    throws IOException
Seeks to largest term that's <= target.

Throws:
IOException

doSeekExact

protected boolean doSeekExact()
                       throws IOException
Seeks to exactly target term.

Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IntsRefFSTEnum.InputOutput

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class IntsRefFSTEnum.InputOutput<T>

java.lang.Object
    extended by  org.apache.lucene.util.fst.IntsRefFSTEnum.InputOutput<T>
Enclosing class:
IntsRefFSTEnum<T>
public static class IntsRefFSTEnum.InputOutput<T>
extends Object

Holds a single input (IntsRef) + output pair.

Field Summary
IntsRef | input
T | output
Constructor Summary
IntsRefFSTEnum.InputOutput()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

input

public IntsRef input

output

public T output
Constructor Detail

IntsRefFSTEnum.InputOutput

public IntsRefFSTEnum.InputOutput()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NoOutputs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class NoOutputs

java.lang.Object
    extended by  org.apache.lucene.util.fst.Outputs<Object>
        extended by  org.apache.lucene.util.fst.NoOutputs

public final class NoOutputs
extends Outputs<Object>

A null FST Outputs implementation; use this if you just want to build an FSA.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 Object add(Object prefix, Object output)
Eg add("foo", "bar") -> "foobar"
 Object common(Object output1, Object output2)
Eg common("foo", "foobar") -> "foo"
 Object getNoOutput()
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output
static NoOutputs getSingleton()
 String outputToString(Object output)
 Object read(DataInput in)
 Object subtract(Object output, Object inc)
Eg subtract("foobar", "foo") -> "bar"
 void write(Object prefix, DataOutput out)
Methods inherited from class org.apache.lucene.util.fst.Outputs
merge
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getSingleton

public static NoOutputs getSingleton()

common

public Object common(Object output1,
                     Object output2)
Description copied from class: Outputs
Eg common("foo", "foobar") -> "foo"

Specified by:
common in class Outputs<Object>

subtract

public Object subtract(Object output,
                       Object inc)
Description copied from class: Outputs
Eg subtract("foobar", "foo") -> "bar"

Specified by:
subtract in class Outputs<Object>

add

public Object add(Object prefix,
                  Object output)
Description copied from class: Outputs
Eg add("foo", "bar") -> "foobar"

Specified by:
add in class Outputs<Object>

write

public void write(Object prefix,
                  DataOutput out)
Specified by:
write in class Outputs<Object>

read

public Object read(DataInput in)
Specified by:
read in class Outputs<Object>

getNoOutput

public Object getNoOutput()
Description copied from class: Outputs
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output

Specified by:
getNoOutput in class Outputs<Object>

outputToString

public String outputToString(Object output)
Specified by:
outputToString in class Outputs<Object>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Outputs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class Outputs<T>

java.lang.Object
    extended by  org.apache.lucene.util.fst.Outputs<T>
Direct Known Subclasses:
ByteSequenceOutputs, IntSequenceOutputs, NoOutputs, PairOutputs, PositiveIntOutputs, UpToTwoPositiveIntOutputs
public abstract class Outputs<T>
extends Object

Represents the outputs for an FST, providing the basic algebra required for building and traversing the FST.

Note that any operation that returns NO_OUTPUT must return the same singleton object from getNoOutput().

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
Outputs()
Method Summary
abstract  T add(T prefix, T output)
Eg add("foo", "bar") -> "foobar"
abstract  T common(T output1, T output2)
Eg common("foo", "foobar") -> "foo"
abstract  T getNoOutput()
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output
 T merge(T first, T second)
abstract  String outputToString(T output)
abstract  T read(DataInput in)
abstract  T subtract(T output, T inc)
Eg subtract("foobar", "foo") -> "bar"
abstract  void write(T output, DataOutput out)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Outputs

public Outputs()
Method Detail

common

public abstract T common(T output1,
                         T output2)
Eg common("foo", "foobar") -> "foo"

subtract

public abstract T subtract(T output,
                           T inc)
Eg subtract("foobar", "foo") -> "bar"

add

public abstract T add(T prefix,
                      T output)
Eg add("foo", "bar") -> "foobar"

write

public abstract void write(T output,
                           DataOutput out)
                    throws IOException
Throws:
IOException

read

public abstract T read(DataInput in)
                throws IOException
Throws:
IOException

getNoOutput

public abstract T getNoOutput()
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output

outputToString

public abstract String outputToString(T output)

merge

public T merge(T first,
               T second)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.util.fst
Classes
Builder
Builder.Arc
Builder.FreezeTail
Builder.UnCompiledNode
ByteSequenceOutputs
BytesRefFSTEnum
BytesRefFSTEnum.InputOutput
FST
FST.Arc
FST.BytesReader
IntSequenceOutputs
IntsRefFSTEnum
IntsRefFSTEnum.InputOutput
NoOutputs
Outputs
PairOutputs
PairOutputs.Pair
PositiveIntOutputs
UpToTwoPositiveIntOutputs
UpToTwoPositiveIntOutputs.TwoLongs
Util
Util.MinResult
Enums
FST.INPUT_TYPE


org.apache.lucene.util.fst

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.util.fst

Finite state transducers

See:
Description

Class Summary
Builder<T> | Builds a minimal FST (maps an IntsRef term to an arbitrary output) from pre-sorted terms with outputs.
Builder.Arc<T> | Expert: holds a pending (seen but not yet serialized) arc.
Builder.FreezeTail<T> | Expert: this is invoked by Builder whenever a suffix is serialized.
Builder.UnCompiledNode<T> | Expert: holds a pending (seen but not yet serialized) Node.
ByteSequenceOutputs | An FST Outputs implementation where each output is a sequence of bytes.
BytesRefFSTEnum<T> | Enumerates all input (BytesRef) + output pairs in an FST.
BytesRefFSTEnum.InputOutput<T> | Holds a single input (BytesRef) + output pair.
FST<T> | Represents an finite state machine (FST), using a compact byte[] format.
FST.Arc<T> | Represents a single arc.
FST.BytesReader | Reads the bytes from this FST.
IntSequenceOutputs | An FST Outputs implementation where each output is a sequence of ints.
IntsRefFSTEnum<T> | Enumerates all input (IntsRef) + output pairs in an FST.
IntsRefFSTEnum.InputOutput<T> | Holds a single input (IntsRef) + output pair.
NoOutputs | A null FST Outputs implementation; use this if you just want to build an FSA.
Outputs<T> | Represents the outputs for an FST, providing the basic algebra required for building and traversing the FST.
PairOutputs<A,B> | An FST Outputs implementation, holding two other outputs.
PairOutputs.Pair<A,B> | Holds a single pair of two outputs.
PositiveIntOutputs | An FST Outputs implementation where each output is a non-negative long value.
UpToTwoPositiveIntOutputs | An FST Outputs implementation where each output is one or two non-negative long values.
UpToTwoPositiveIntOutputs.TwoLongs | Holds two long outputs.
Util | Static helper methods.
Util.MinResult<T> | Holds a single input (IntsRef) + output, returned by Util.shortestPaths(org.apache.lucene.util.fst.FST, org.apache.lucene.util.fst.FST.Arc, java.util.Comparator, int).

Enum Summary
FST.INPUT_TYPE Specifies allowed range of each int input label for this FST.

Package org.apache.lucene.util.fst Description

Finite state transducers


org.apache.lucene.util.fst Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.util.fst

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.fst.Builder<T>
    • org.apache.lucene.util.fst.Builder.Arc<T>
    • org.apache.lucene.util.fst.Builder.FreezeTail<T>
    • org.apache.lucene.util.fst.Builder.UnCompiledNode<T>
    • org.apache.lucene.util.fst.BytesRefFSTEnum<T>
    • org.apache.lucene.util.fst.BytesRefFSTEnum.InputOutput<T>
    • org.apache.lucene.store.DataInput (implements java.lang.Cloneable)
      • org.apache.lucene.util.fst.FST.BytesReader
    • org.apache.lucene.util.fst.FST<T>
    • org.apache.lucene.util.fst.FST.Arc<T>
    • org.apache.lucene.util.fst.IntsRefFSTEnum<T>
    • org.apache.lucene.util.fst.IntsRefFSTEnum.InputOutput<T>
    • org.apache.lucene.util.fst.Outputs<T>
      • org.apache.lucene.util.fst.ByteSequenceOutputs
      • org.apache.lucene.util.fst.IntSequenceOutputs
      • org.apache.lucene.util.fst.NoOutputs
      • org.apache.lucene.util.fst.PairOutputs<A,B>
      • org.apache.lucene.util.fst.PositiveIntOutputs
      • org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs
    • org.apache.lucene.util.fst.PairOutputs.Pair<A,B>
    • org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs.TwoLongs
    • org.apache.lucene.util.fst.Util
    • org.apache.lucene.util.fst.Util.MinResult<T> (implements java.lang.Comparable<T>)

Enum Hierarchy

  • java.lang.Object
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)
      • org.apache.lucene.util.fst.FST.INPUT_TYPE


Uses of Package org.apache.lucene.util.fst

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.util.fst

Packages that use org.apache.lucene.util.fst
org.apache.lucene.analysis.ja.dict | Kuromoji dictionary implementation.
org.apache.lucene.analysis.synonym | Analysis components for Synonyms.
org.apache.lucene.search.suggest.fst | Finite-state based autosuggest.
org.apache.lucene.util.fst | Finite state transducers

Classes in org.apache.lucene.util.fst used by org.apache.lucene.analysis.ja.dict
FST
Represents an finite state machine (FST), using a compact byte[] format.
FST.Arc
Represents a single arc.
FST.BytesReader
Reads the bytes from this FST.

Classes in org.apache.lucene.util.fst used by org.apache.lucene.analysis.synonym
FST
Represents an finite state machine (FST), using a compact byte[] format.

Classes in org.apache.lucene.util.fst used by org.apache.lucene.search.suggest.fst
FST
Represents an finite state machine (FST), using a compact byte[] format.

Classes in org.apache.lucene.util.fst used by org.apache.lucene.util.fst
Builder
Builds a minimal FST (maps an IntsRef term to an arbitrary output) from pre-sorted terms with outputs.
Builder.Arc
Expert: holds a pending (seen but not yet serialized) arc.
Builder.FreezeTail
Expert: this is invoked by Builder whenever a suffix is serialized.
Builder.UnCompiledNode
Expert: holds a pending (seen but not yet serialized) Node.
ByteSequenceOutputs
An FST Outputs implementation where each output is a sequence of bytes.
BytesRefFSTEnum.InputOutput
Holds a single input (BytesRef) + output pair.
FST
Represents an finite state machine (FST), using a compact byte[] format.
FST.Arc
Represents a single arc.
FST.BytesReader
Reads the bytes from this FST.
FST.INPUT_TYPE
Specifies allowed range of each int input label for this FST.
IntSequenceOutputs
An FST Outputs implementation where each output is a sequence of ints.
IntsRefFSTEnum.InputOutput
Holds a single input (IntsRef) + output pair.
NoOutputs
A null FST Outputs implementation; use this if you just want to build an FSA.
Outputs
Represents the outputs for an FST, providing the basic algebra required for building and traversing the FST.
PairOutputs.Pair
Holds a single pair of two outputs.
PositiveIntOutputs
An FST Outputs implementation where each output is a non-negative long value.
UpToTwoPositiveIntOutputs
An FST Outputs implementation where each output is one or two non-negative long values.
UpToTwoPositiveIntOutputs.TwoLongs
Holds two long outputs.
Util.MinResult
Holds a single input (IntsRef) + output, returned by Util.shortestPaths(org.apache.lucene.util.fst.FST, org.apache.lucene.util.fst.FST.Arc, java.util.Comparator, int).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PairOutputs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class PairOutputs<A,B>

java.lang.Object
    extended by  org.apache.lucene.util.fst.Outputs<PairOutputs.Pair<A,B>>
        extended by  org.apache.lucene.util.fst.PairOutputs<A,B>

public class PairOutputs<A,B>
extends Outputs<PairOutputs.Pair<A,B>>

An FST Outputs implementation, holding two other outputs.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class PairOutputs.Pair<A,B>
Holds a single pair of two outputs.
Constructor Summary
PairOutputs(Outputs<A> outputs1, Outputs<B> outputs2)
Method Summary
 PairOutputs.Pair<A,B> add(PairOutputs.Pair<A,B> prefix, PairOutputs.Pair<A,B> output)
Eg add("foo", "bar") -> "foobar"
 PairOutputs.Pair<A,B> common(PairOutputs.Pair<A,B> pair1, PairOutputs.Pair<A,B> pair2)
Eg common("foo", "foobar") -> "foo"
 PairOutputs.Pair<A,B> getNoOutput()
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output
 PairOutputs.Pair<A,B> newPair(A a, B b)
Create a new Pair
 String outputToString(PairOutputs.Pair<A,B> output)
 PairOutputs.Pair<A,B> read(DataInput in)
 PairOutputs.Pair<A,B> subtract(PairOutputs.Pair<A,B> output, PairOutputs.Pair<A,B> inc)
Eg subtract("foobar", "foo") -> "bar"
 String toString()
 void write(PairOutputs.Pair<A,B> output, DataOutput writer)
Methods inherited from class org.apache.lucene.util.fst.Outputs
merge
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

PairOutputs

public PairOutputs(Outputs<A> outputs1,
                   Outputs<B> outputs2)
Method Detail

newPair

public PairOutputs.Pair<A,B> newPair(A a,
                                     B b)
Create a new Pair

common

public PairOutputs.Pair<A,B> common(PairOutputs.Pair<A,B> pair1,
                                    PairOutputs.Pair<A,B> pair2)
Description copied from class: Outputs
Eg common("foo", "foobar") -> "foo"

Specified by:
common in class Outputs<PairOutputs.Pair<A,B>>

subtract

public PairOutputs.Pair<A,B> subtract(PairOutputs.Pair<A,B> output,
                                      PairOutputs.Pair<A,B> inc)
Description copied from class: Outputs
Eg subtract("foobar", "foo") -> "bar"

Specified by:
subtract in class Outputs<PairOutputs.Pair<A,B>>

add

public PairOutputs.Pair<A,B> add(PairOutputs.Pair<A,B> prefix,
                                 PairOutputs.Pair<A,B> output)
Description copied from class: Outputs
Eg add("foo", "bar") -> "foobar"

Specified by:
add in class Outputs<PairOutputs.Pair<A,B>>

write

public void write(PairOutputs.Pair<A,B> output,
                  DataOutput writer)
           throws IOException
Specified by:
write in class Outputs<PairOutputs.Pair<A,B>>
Throws:
IOException

read

public PairOutputs.Pair<A,B> read(DataInput in)
                           throws IOException
Specified by:
read in class Outputs<PairOutputs.Pair<A,B>>
Throws:
IOException

getNoOutput

public PairOutputs.Pair<A,B> getNoOutput()
Description copied from class: Outputs
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output

Specified by:
getNoOutput in class Outputs<PairOutputs.Pair<A,B>>

outputToString

public String outputToString(PairOutputs.Pair<A,B> output)
Specified by:
outputToString in class Outputs<PairOutputs.Pair<A,B>>

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PairOutputs.Pair

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class PairOutputs.Pair<A,B>

java.lang.Object
    extended by  org.apache.lucene.util.fst.PairOutputs.Pair<A,B>
Enclosing class:
PairOutputs<A,B>
public static class PairOutputs.Pair<A,B>
extends Object

Holds a single pair of two outputs.

Field Summary
A | output1
B | output2
Method Summary
boolean | equals(Object other)
int | hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

output1

public final A output1

output2

public final B output2
Method Detail

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PositiveIntOutputs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class PositiveIntOutputs

java.lang.Object
    extended by  org.apache.lucene.util.fst.Outputs<Long>
        extended by  org.apache.lucene.util.fst.PositiveIntOutputs

public final class PositiveIntOutputs
extends Outputs<Long>

An FST Outputs implementation where each output is a non-negative long value.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Method Summary
 Long add(Long prefix, Long output)
Eg add("foo", "bar") -> "foobar"
 Long common(Long output1, Long output2)
Eg common("foo", "foobar") -> "foo"
 Long getNoOutput()
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output
static PositiveIntOutputs getSingleton(boolean doShare)
 String outputToString(Long output)
 Long read(DataInput in)
 Long subtract(Long output, Long inc)
Eg subtract("foobar", "foo") -> "bar"
 String toString()
 void write(Long output, DataOutput out)
Methods inherited from class org.apache.lucene.util.fst.Outputs
merge
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Method Detail

getSingleton

public static PositiveIntOutputs getSingleton(boolean doShare)

common

public Long common(Long output1,
                   Long output2)
Description copied from class: Outputs
Eg common("foo", "foobar") -> "foo"

Specified by:
common in class Outputs<Long>

subtract

public Long subtract(Long output,
                     Long inc)
Description copied from class: Outputs
Eg subtract("foobar", "foo") -> "bar"

Specified by:
subtract in class Outputs<Long>

add

public Long add(Long prefix,
                Long output)
Description copied from class: Outputs
Eg add("foo", "bar") -> "foobar"

Specified by:
add in class Outputs<Long>

write

public void write(Long output,
                  DataOutput out)
           throws IOException
Specified by:
write in class Outputs<Long>
Throws:
IOException

read

public Long read(DataInput in)
          throws IOException
Specified by:
read in class Outputs<Long>
Throws:
IOException

getNoOutput

public Long getNoOutput()
Description copied from class: Outputs
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output

Specified by:
getNoOutput in class Outputs<Long>

outputToString

public String outputToString(Long output)
Specified by:
outputToString in class Outputs<Long>

toString

public String toString()
Overrides:
toString in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UpToTwoPositiveIntOutputs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class UpToTwoPositiveIntOutputs

java.lang.Object
    extended by  org.apache.lucene.util.fst.Outputs<Object>
        extended by  org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs

public final class UpToTwoPositiveIntOutputs
extends Outputs<Object>

An FST Outputs implementation where each output is one or two non-negative long values. If it's a single output, Long is returned; else, TwoLongs. Order is preserved in the TwoLongs case, ie .first is the first input/output added to Builder, and .second is the second. You cannot store 0 output with this (that's reserved to mean "no output")! NOTE: the resulting FST is not guaranteed to be minimal! See Builder.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class UpToTwoPositiveIntOutputs.TwoLongs
Holds two long outputs.
Method Summary
 Object add(Object _prefix, Object _output)
Eg add("foo", "bar") -> "foobar"
 Long common(Object _output1, Object _output2)
Eg common("foo", "foobar") -> "foo"
 Long get(long v)
 UpToTwoPositiveIntOutputs.TwoLongs get(long first, long second)
 Object getNoOutput()
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output
static UpToTwoPositiveIntOutputs getSingleton(boolean doShare)
 Object merge(Object first, Object second)
 String outputToString(Object output)
 Object read(DataInput in)
 Long subtract(Object _output, Object _inc)
Eg subtract("foobar", "foo") -> "bar"
 void write(Object _output, DataOutput out)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getSingleton

public static UpToTwoPositiveIntOutputs getSingleton(boolean doShare)

get

public Long get(long v)

get

public UpToTwoPositiveIntOutputs.TwoLongs get(long first,
                                              long second)

common

public Long common(Object _output1,
                   Object _output2)
Description copied from class: Outputs
Eg common("foo", "foobar") -> "foo"

Specified by:
common in class Outputs<Object>

subtract

public Long subtract(Object _output,
                     Object _inc)
Description copied from class: Outputs
Eg subtract("foobar", "foo") -> "bar"

Specified by:
subtract in class Outputs<Object>

add

public Object add(Object _prefix,
                  Object _output)
Description copied from class: Outputs
Eg add("foo", "bar") -> "foobar"

Specified by:
add in class Outputs<Object>

write

public void write(Object _output,
                  DataOutput out)
           throws IOException
Specified by:
write in class Outputs<Object>
Throws:
IOException

read

public Object read(DataInput in)
            throws IOException
Specified by:
read in class Outputs<Object>
Throws:
IOException

getNoOutput

public Object getNoOutput()
Description copied from class: Outputs
NOTE: this output is compared with == so you must ensure that all methods return the single object if it's really no output

Specified by:
getNoOutput in class Outputs<Object>

outputToString

public String outputToString(Object output)
Specified by:
outputToString in class Outputs<Object>

merge

public Object merge(Object first,
                    Object second)
Overrides:
merge in class Outputs<Object>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UpToTwoPositiveIntOutputs.TwoLongs

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class UpToTwoPositiveIntOutputs.TwoLongs

java.lang.Object
    extended by  org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs.TwoLongs
Enclosing class:
UpToTwoPositiveIntOutputs
public static final class UpToTwoPositiveIntOutputs.TwoLongs
extends Object

Holds two long outputs.

Field Summary
long | first
long | second
Constructor Summary
UpToTwoPositiveIntOutputs.TwoLongs(long first, long second)
Method Summary
boolean | equals(Object _other)
int | hashCode()
String | toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

first

public final long first

second

public final long second
Constructor Detail

UpToTwoPositiveIntOutputs.TwoLongs

public UpToTwoPositiveIntOutputs.TwoLongs(long first,
                                          long second)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object _other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Util

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class Util

java.lang.Object
    extended by  org.apache.lucene.util.fst.Util

public final class Util
extends Object

Static helper methods.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
static class Util.MinResult<T>
Holds a single input (IntsRef) + output, returned by shortestPaths(org.apache.lucene.util.fst.FST, org.apache.lucene.util.fst.FST.Arc, java.util.Comparator, int).
Method Summary
static
<T> T
get(FST<T> fst, BytesRef input)
Looks up the output for this input, or null if the input is not accepted
static
<T> T
get(FST<T> fst, IntsRef input)
Looks up the output for this input, or null if the input is not accepted.
static IntsRef getByOutput(FST<Long> fst, long targetOutput)
Reverse lookup (lookup by output instead of by input), in the special case when your FSTs outputs are strictly ascending.
static
<T> Util.MinResult<T>[]
shortestPaths(FST<T> fst, FST.Arc<T> fromNode, Comparator<T> comparator, int topN)
Starting from node, find the top N min cost completions to a final node.
static BytesRef toBytesRef(IntsRef input, BytesRef scratch)
Just converts IntsRef to BytesRef; you must ensure the int values fit into a byte.
static
<T> void
toDot(FST<T> fst, Writer out, boolean sameRank, boolean labelStates)
Dumps an FST to a GraphViz's dot language description for visualization.
static IntsRef toIntsRef(BytesRef input, IntsRef scratch)
Just takes unsigned byte values from the BytesRef and converts into an IntsRef.
static IntsRef toUTF32(char[] s, int offset, int length, IntsRef scratch)
Decodes the Unicode codepoints from the provided char[] and places them in the provided scratch IntsRef, which must not be null, returning it.
static IntsRef toUTF32(CharSequence s, IntsRef scratch)
Decodes the Unicode codepoints from the provided CharSequence and places them in the provided scratch IntsRef, which must not be null, returning it.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

get

public static <T> T get(FST<T> fst,
                        IntsRef input)
             throws IOException
Looks up the output for this input, or null if the input is not accepted.

Throws:
IOException

get

public static <T> T get(FST<T> fst,
                        BytesRef input)
             throws IOException
Looks up the output for this input, or null if the input is not accepted

Throws:
IOException

getByOutput

public static IntsRef getByOutput(FST<Long> fst,
                                  long targetOutput)
                           throws IOException
Reverse lookup (lookup by output instead of by input), in the special case when your FSTs outputs are strictly ascending. This locates the input/output pair where the output is equal to the target, and will return null if that output does not exist.

NOTE: this only works with FST, only works when the outputs are ascending in order with the inputs and only works when you shared the outputs (pass doShare=true to PositiveIntOutputs.getSingleton(boolean)). For example, simple ordinals (0, 1, 2, ...), or file offets (when appending to a file) fit this.

Throws:
IOException

shortestPaths

public static <T> Util.MinResult<T>[] shortestPaths(FST<T> fst,
                                                    FST.Arc<T> fromNode,
                                                    Comparator<T> comparator,
                                                    int topN)
                                         throws IOException
Starting from node, find the top N min cost completions to a final node.

NOTE: you must share the outputs when you build the FST (pass doShare=true to PositiveIntOutputs.getSingleton(boolean)).

Throws:
IOException

toDot

public static <T> void toDot(FST<T> fst,
                             Writer out,
                             boolean sameRank,
                             boolean labelStates)
                  throws IOException
Dumps an FST to a GraphViz's dot language description for visualization. Example of use:
 PrintWriter pw = new PrintWriter("out.dot");
 Util.toDot(fst, pw, true, true);
 pw.close();
and then, from command line:
 dot -Tpng -o out.png out.dot

Note: larger FSTs (a few thousand nodes) won't even render, don't bother.

Parameters:
sameRank - If true, the resulting dot file will try to order states in layers of breadth-first traversal. This may mess up arcs, but makes the output FST's structure a bit clearer.
labelStates - If true states will have labels equal to their offsets in their binary format. Expands the graph considerably.
Throws:
IOException
See Also:
"http://www.graphviz.org/"

toUTF32

public static IntsRef toUTF32(CharSequence s,
                              IntsRef scratch)
Decodes the Unicode codepoints from the provided CharSequence and places them in the provided scratch IntsRef, which must not be null, returning it.

toUTF32

public static IntsRef toUTF32(char[] s,
                              int offset,
                              int length,
                              IntsRef scratch)
Decodes the Unicode codepoints from the provided char[] and places them in the provided scratch IntsRef, which must not be null, returning it.

toIntsRef

public static IntsRef toIntsRef(BytesRef input,
                                IntsRef scratch)
Just takes unsigned byte values from the BytesRef and converts into an IntsRef.

toBytesRef

public static BytesRef toBytesRef(IntsRef input,
                                  BytesRef scratch)
Just converts IntsRef to BytesRef; you must ensure the int values fit into a byte.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Util.MinResult

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.fst
Class Util.MinResult<T>

java.lang.Object
    extended by  org.apache.lucene.util.fst.Util.MinResult<T>
All Implemented Interfaces:
Comparable<Util.MinResult<T>>
Enclosing class:
Util
public static final class Util.MinResult<T>
extends Object
implements Comparable<Util.MinResult<T>>

Holds a single input (IntsRef) + output, returned by Util.shortestPaths(org.apache.lucene.util.fst.FST, org.apache.lucene.util.fst.FST.Arc, java.util.Comparator, int).

Field Summary
IntsRef | input
T | output
Constructor Summary
Util.MinResult(IntsRef input, T output, Comparator<T> comparator)
Method Summary
 int compareTo(Util.MinResult<T> other)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

input

public final IntsRef input

output

public final T output
Constructor Detail

Util.MinResult

public Util.MinResult(IntsRef input,
                      T output,
                      Comparator<T> comparator)
Method Detail

compareTo

public int compareTo(Util.MinResult<T> other)
Specified by:
compareTo in interface Comparable<Util.MinResult<T>>
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.util.fst.Builder.Arc

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.Builder.Arc

Packages that use Builder.Arc
org.apache.lucene.util.fst Finite state transducers

Uses of Builder.Arc in org.apache.lucene.util.fst

Fields in org.apache.lucene.util.fst declared as Builder.Arc
 Builder.Arc<T>[] Builder.UnCompiledNode.arcs

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.Builder.FreezeTail

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.Builder.FreezeTail

Packages that use Builder.FreezeTail
org.apache.lucene.util.fst Finite state transducers

Uses of Builder.FreezeTail in org.apache.lucene.util.fst

Constructors in org.apache.lucene.util.fst with parameters of type Builder.FreezeTail
Builder(FST.INPUT_TYPE inputType, int minSuffixCount1, int minSuffixCount2, boolean doShareSuffix, boolean doShareNonSingletonNodes, int shareMaxTailLength, Outputs<T> outputs, Builder.FreezeTail<T> freezeTail, boolean willPackFST)
Instantiates an FST/FSA builder with all the possible tuning and construction tweaks.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.Builder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.Builder

Packages that use Builder
org.apache.lucene.util.fst Finite state transducers

Uses of Builder in org.apache.lucene.util.fst

Constructors in org.apache.lucene.util.fst with parameters of type Builder
Builder.UnCompiledNode(Builder<T> owner, int depth)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.Builder.UnCompiledNode

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.Builder.UnCompiledNode

Packages that use Builder.UnCompiledNode
org.apache.lucene.util.fst Finite state transducers

Uses of Builder.UnCompiledNode in org.apache.lucene.util.fst

Methods in org.apache.lucene.util.fst with parameters of type Builder.UnCompiledNode
abstract  void Builder.FreezeTail.freeze(Builder.UnCompiledNode<T>[] frontier, int prefixLenPlus1, IntsRef prevInput)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.ByteSequenceOutputs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.ByteSequenceOutputs

Packages that use ByteSequenceOutputs
org.apache.lucene.util.fst Finite state transducers

Uses of ByteSequenceOutputs in org.apache.lucene.util.fst

Methods in org.apache.lucene.util.fst that return ByteSequenceOutputs
static ByteSequenceOutputs ByteSequenceOutputs.getSingleton()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.BytesRefFSTEnum

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.BytesRefFSTEnum

No usage of org.apache.lucene.util.fst.BytesRefFSTEnum

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.BytesRefFSTEnum.InputOutput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.BytesRefFSTEnum.InputOutput

Packages that use BytesRefFSTEnum.InputOutput
org.apache.lucene.util.fst Finite state transducers

Uses of BytesRefFSTEnum.InputOutput in org.apache.lucene.util.fst

Methods in org.apache.lucene.util.fst that return BytesRefFSTEnum.InputOutput
BytesRefFSTEnum.InputOutput<T> | BytesRefFSTEnum.current()
BytesRefFSTEnum.InputOutput<T> | BytesRefFSTEnum.next()
BytesRefFSTEnum.InputOutput<T> | BytesRefFSTEnum.seekCeil(BytesRef target) Seeks to smallest term that's >= target.
BytesRefFSTEnum.InputOutput<T> | BytesRefFSTEnum.seekExact(BytesRef target) Seeks to exactly this term, returning null if the term doesn't exist.
BytesRefFSTEnum.InputOutput<T> | BytesRefFSTEnum.seekFloor(BytesRef target) Seeks to biggest term that's <= target.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.FST.Arc

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.FST.Arc

Packages that use FST.Arc
org.apache.lucene.analysis.ja.dict | Kuromoji dictionary implementation.
org.apache.lucene.util.fst | Finite state transducers

Uses of FST.Arc in org.apache.lucene.analysis.ja.dict

Methods in org.apache.lucene.analysis.ja.dict that return FST.Arc
FST.Arc<Long> | TokenInfoFST.findTargetArc(int ch, FST.Arc<Long> follow, FST.Arc<Long> arc, boolean useCache, FST.BytesReader fstReader)
FST.Arc<Long> | TokenInfoFST.getFirstArc(FST.Arc<Long> arc)

Methods in org.apache.lucene.analysis.ja.dict with parameters of type FST.Arc
FST.Arc<Long> | TokenInfoFST.findTargetArc(int ch, FST.Arc<Long> follow, FST.Arc<Long> arc, boolean useCache, FST.BytesReader fstReader)
FST.Arc<Long> | TokenInfoFST.findTargetArc(int ch, FST.Arc<Long> follow, FST.Arc<Long> arc, boolean useCache, FST.BytesReader fstReader)
FST.Arc<Long> | TokenInfoFST.getFirstArc(FST.Arc<Long> arc)

Uses of FST.Arc in org.apache.lucene.util.fst

Methods in org.apache.lucene.util.fst that return FST.Arc
 FST.Arc<T> FST.Arc.copyFrom(FST.Arc<T> other)
Returns this
 FST.Arc<T> FST.findTargetArc(int labelToMatch, FST.Arc<T> follow, FST.Arc<T> arc, FST.BytesReader in)
Finds an arc leaving the incoming arc, replacing the arc in place.
 FST.Arc<T> FST.getFirstArc(FST.Arc<T> arc)
Fills virtual 'start' arc, ie, an empty incoming arc to the FST's start node
 FST.Arc<T> FST.readFirstRealTargetArc(int node, FST.Arc<T> arc, FST.BytesReader in)
 FST.Arc<T> FST.readFirstTargetArc(FST.Arc<T> follow, FST.Arc<T> arc)
Follow the follow arc and read the first arc of its target; this changes the provided arc (2nd arg) in-place and returns it.
 FST.Arc<T> FST.readLastTargetArc(FST.Arc<T> follow, FST.Arc<T> arc)
Follows the follow arc and reads the last arc of its target; this changes the provided arc (2nd arg) in-place and returns it.
 FST.Arc<T> FST.readNextArc(FST.Arc<T> arc)
In-place read; returns the arc.
 FST.Arc<T> FST.readNextRealArc(FST.Arc<T> arc, FST.BytesReader in)
Never returns null, but you should never call this if arc.isLast() is true.

Methods in org.apache.lucene.util.fst with parameters of type FST.Arc
 FST.Arc<T> FST.Arc.copyFrom(FST.Arc<T> other)
Returns this
 FST.Arc<T> FST.findTargetArc(int labelToMatch, FST.Arc<T> follow, FST.Arc<T> arc, FST.BytesReader in)
Finds an arc leaving the incoming arc, replacing the arc in place.
 FST.Arc<T> FST.findTargetArc(int labelToMatch, FST.Arc<T> follow, FST.Arc<T> arc, FST.BytesReader in)
Finds an arc leaving the incoming arc, replacing the arc in place.
 FST.Arc<T> FST.getFirstArc(FST.Arc<T> arc)
Fills virtual 'start' arc, ie, an empty incoming arc to the FST's start node
 FST.Arc<T> FST.readFirstRealTargetArc(int node, FST.Arc<T> arc, FST.BytesReader in)
 FST.Arc<T> FST.readFirstTargetArc(FST.Arc<T> follow, FST.Arc<T> arc)
Follow the follow arc and read the first arc of its target; this changes the provided arc (2nd arg) in-place and returns it.
 FST.Arc<T> FST.readFirstTargetArc(FST.Arc<T> follow, FST.Arc<T> arc)
Follow the follow arc and read the first arc of its target; this changes the provided arc (2nd arg) in-place and returns it.
 FST.Arc<T> FST.readLastTargetArc(FST.Arc<T> follow, FST.Arc<T> arc)
Follows the follow arc and reads the last arc of its target; this changes the provided arc (2nd arg) in-place and returns it.
 FST.Arc<T> FST.readLastTargetArc(FST.Arc<T> follow, FST.Arc<T> arc)
Follows the follow arc and reads the last arc of its target; this changes the provided arc (2nd arg) in-place and returns it.
 FST.Arc<T> FST.readNextArc(FST.Arc<T> arc)
In-place read; returns the arc.
 int FST.readNextArcLabel(FST.Arc<T> arc)
Peeks at next arc's label; does not alter arc.
 FST.Arc<T> FST.readNextRealArc(FST.Arc<T> arc, FST.BytesReader in)
Never returns null, but you should never call this if arc.isLast() is true.
static
<T> Util.MinResult<T>[]
Util.shortestPaths(FST<T> fst, FST.Arc<T> fromNode, Comparator<T> comparator, int topN)
Starting from node, find the top N min cost completions to a final node.
static
<T> boolean
FST.targetHasArcs(FST.Arc<T> arc)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.FST.BytesReader

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.FST.BytesReader

Packages that use FST.BytesReader
org.apache.lucene.analysis.ja.dict | Kuromoji dictionary implementation.
org.apache.lucene.util.fst | Finite state transducers

Uses of FST.BytesReader in org.apache.lucene.analysis.ja.dict

Methods in org.apache.lucene.analysis.ja.dict that return FST.BytesReader
 FST.BytesReader TokenInfoFST.getBytesReader(int pos)

Methods in org.apache.lucene.analysis.ja.dict with parameters of type FST.BytesReader
 FST.Arc<Long> TokenInfoFST.findTargetArc(int ch, FST.Arc<Long> follow, FST.Arc<Long> arc, boolean useCache, FST.BytesReader fstReader)

Uses of FST.BytesReader in org.apache.lucene.util.fst

Methods in org.apache.lucene.util.fst that return FST.BytesReader
 FST.BytesReader FST.getBytesReader(int pos)

Methods in org.apache.lucene.util.fst with parameters of type FST.BytesReader
 FST.Arc<T> FST.findTargetArc(int labelToMatch, FST.Arc<T> follow, FST.Arc<T> arc, FST.BytesReader in)
Finds an arc leaving the incoming arc, replacing the arc in place.
 FST.Arc<T> FST.readFirstRealTargetArc(int node, FST.Arc<T> arc, FST.BytesReader in)
 FST.Arc<T> FST.readNextRealArc(FST.Arc<T> arc, FST.BytesReader in)
Never returns null, but you should never call this if arc.isLast() is true.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.FST

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.FST

Packages that use FST
org.apache.lucene.analysis.ja.dict | Kuromoji dictionary implementation.
org.apache.lucene.analysis.synonym | Analysis components for Synonyms.
org.apache.lucene.search.suggest.fst | Finite-state based autosuggest.
org.apache.lucene.util.fst | Finite state transducers

Uses of FST in org.apache.lucene.analysis.ja.dict

Constructors in org.apache.lucene.analysis.ja.dict with parameters of type FST
TokenInfoFST(FST<Long> fst, boolean fasterButMoreRam)

Uses of FST in org.apache.lucene.analysis.synonym

Fields in org.apache.lucene.analysis.synonym declared as FST
 FST<BytesRef> SynonymMap.fst
map>

Constructors in org.apache.lucene.analysis.synonym with parameters of type FST
SynonymMap(FST<BytesRef> fst, BytesRefHash words, int maxHorizontalContext)

Uses of FST in org.apache.lucene.search.suggest.fst

Methods in org.apache.lucene.search.suggest.fst that return FST
 FST<Object> FSTCompletion.getFST()
Returns the internal automaton.

Constructors in org.apache.lucene.search.suggest.fst with parameters of type FST
FSTCompletion(FST<Object> automaton)
Defaults to higher weights first and exact first.
FSTCompletion(FST<Object> automaton, boolean higherWeightsFirst, boolean exactFirst)

Uses of FST in org.apache.lucene.util.fst

Methods in org.apache.lucene.util.fst that return FST
 FST<T> Builder.finish()
Returns final FST.
 FST<T> FST.pack(int minInCountDeref, int maxDerefNodes)
Expert: creates an FST by packing this one.
static
<T> FST<T>
FST.read(File file, Outputs<T> outputs)
Reads an automaton from a file.

Methods in org.apache.lucene.util.fst with parameters of type FST
static
<T> T
Util.get(FST<T> fst, BytesRef input)
Looks up the output for this input, or null if the input is not accepted
static
<T> T
Util.get(FST<T> fst, IntsRef input)
Looks up the output for this input, or null if the input is not accepted.
static IntsRef Util.getByOutput(FST<Long> fst, long targetOutput)
Reverse lookup (lookup by output instead of by input), in the special case when your FSTs outputs are strictly ascending.
static
<T> Util.MinResult<T>[]
Util.shortestPaths(FST<T> fst, FST.Arc<T> fromNode, Comparator<T> comparator, int topN)
Starting from node, find the top N min cost completions to a final node.
static
<T> void
Util.toDot(FST<T> fst, Writer out, boolean sameRank, boolean labelStates)
Dumps an FST to a GraphViz's dot language description for visualization.

Constructors in org.apache.lucene.util.fst with parameters of type FST
BytesRefFSTEnum(FST<T> fst)
doFloor controls the behavior of advance: if it's true doFloor is true, advance positions to the biggest term before target.
IntsRefFSTEnum(FST<T> fst)
doFloor controls the behavior of advance: if it's true doFloor is true, advance positions to the biggest term before target.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.FST.INPUT_TYPE

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.FST.INPUT_TYPE

Packages that use FST.INPUT_TYPE
org.apache.lucene.util.fst Finite state transducers

Uses of FST.INPUT_TYPE in org.apache.lucene.util.fst

Fields in org.apache.lucene.util.fst declared as FST.INPUT_TYPE
 FST.INPUT_TYPE FST.inputType

Methods in org.apache.lucene.util.fst that return FST.INPUT_TYPE
FST.INPUT_TYPE | FST.getInputType()
static FST.INPUT_TYPE | FST.INPUT_TYPE.valueOf(String name) Returns the enum constant of this type with the specified name.
static FST.INPUT_TYPE[] | FST.INPUT_TYPE.values() Returns an array containing the constants of this enum type, in the order they're declared.

Constructors in org.apache.lucene.util.fst with parameters of type FST.INPUT_TYPE
Builder(FST.INPUT_TYPE inputType, int minSuffixCount1, int minSuffixCount2, boolean doShareSuffix, boolean doShareNonSingletonNodes, int shareMaxTailLength, Outputs<T> outputs, Builder.FreezeTail<T> freezeTail, boolean willPackFST)
Instantiates an FST/FSA builder with all the possible tuning and construction tweaks.
Builder(FST.INPUT_TYPE inputType, Outputs<T> outputs)
Instantiates an FST/FSA builder without any pruning.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.IntSequenceOutputs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.IntSequenceOutputs

Packages that use IntSequenceOutputs
org.apache.lucene.util.fst Finite state transducers

Uses of IntSequenceOutputs in org.apache.lucene.util.fst

Methods in org.apache.lucene.util.fst that return IntSequenceOutputs
static IntSequenceOutputs IntSequenceOutputs.getSingleton()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.IntsRefFSTEnum

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.IntsRefFSTEnum

No usage of org.apache.lucene.util.fst.IntsRefFSTEnum

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.IntsRefFSTEnum.InputOutput

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.IntsRefFSTEnum.InputOutput

Packages that use IntsRefFSTEnum.InputOutput
org.apache.lucene.util.fst Finite state transducers

Uses of IntsRefFSTEnum.InputOutput in org.apache.lucene.util.fst

Methods in org.apache.lucene.util.fst that return IntsRefFSTEnum.InputOutput
IntsRefFSTEnum.InputOutput<T> | IntsRefFSTEnum.current()
IntsRefFSTEnum.InputOutput<T> | IntsRefFSTEnum.next()
IntsRefFSTEnum.InputOutput<T> | IntsRefFSTEnum.seekCeil(IntsRef target) Seeks to smallest term that's >= target.
IntsRefFSTEnum.InputOutput<T> | IntsRefFSTEnum.seekExact(IntsRef target) Seeks to exactly this term, returning null if the term doesn't exist.
IntsRefFSTEnum.InputOutput<T> | IntsRefFSTEnum.seekFloor(IntsRef target) Seeks to biggest term that's <= target.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.NoOutputs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.NoOutputs

Packages that use NoOutputs
org.apache.lucene.util.fst Finite state transducers

Uses of NoOutputs in org.apache.lucene.util.fst

Methods in org.apache.lucene.util.fst that return NoOutputs
static NoOutputs NoOutputs.getSingleton()

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.Outputs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.Outputs

Packages that use Outputs
org.apache.lucene.util.fst Finite state transducers

Uses of Outputs in org.apache.lucene.util.fst

Subclasses of Outputs in org.apache.lucene.util.fst
class | ByteSequenceOutputs An FST Outputs implementation where each output is a sequence of bytes.
class | IntSequenceOutputs An FST Outputs implementation where each output is a sequence of ints.
class | NoOutputs A null FST Outputs implementation; use this if you just want to build an FSA.
class | PairOutputs<A,B> An FST Outputs implementation, holding two other outputs.
class | PositiveIntOutputs An FST Outputs implementation where each output is a non-negative long value.
class | UpToTwoPositiveIntOutputs An FST Outputs implementation where each output is one or two non-negative long values.

Fields in org.apache.lucene.util.fst declared as Outputs
 Outputs<T> FST.outputs

Methods in org.apache.lucene.util.fst with parameters of type Outputs
static
<T> FST<T>
FST.read(File file, Outputs<T> outputs)
Reads an automaton from a file.

Constructors in org.apache.lucene.util.fst with parameters of type Outputs
Builder(FST.INPUT_TYPE inputType, int minSuffixCount1, int minSuffixCount2, boolean doShareSuffix, boolean doShareNonSingletonNodes, int shareMaxTailLength, Outputs<T> outputs, Builder.FreezeTail<T> freezeTail, boolean willPackFST)
Instantiates an FST/FSA builder with all the possible tuning and construction tweaks.
Builder(FST.INPUT_TYPE inputType, Outputs<T> outputs)
Instantiates an FST/FSA builder without any pruning.
FST(DataInput in, Outputs<T> outputs)
Load a previously saved FST.
PairOutputs(Outputs<A> outputs1, Outputs<B> outputs2)
PairOutputs(Outputs<A> outputs1, Outputs<B> outputs2)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.PairOutputs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.PairOutputs

No usage of org.apache.lucene.util.fst.PairOutputs

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.PairOutputs.Pair

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.PairOutputs.Pair

Packages that use PairOutputs.Pair
org.apache.lucene.util.fst Finite state transducers

Uses of PairOutputs.Pair in org.apache.lucene.util.fst

Methods in org.apache.lucene.util.fst that return PairOutputs.Pair
PairOutputs.Pair<A,B> | PairOutputs.add(PairOutputs.Pair<A,B> prefix, PairOutputs.Pair<A,B> output)
PairOutputs.Pair<A,B> | PairOutputs.common(PairOutputs.Pair<A,B> pair1, PairOutputs.Pair<A,B> pair2)
PairOutputs.Pair<A,B> | PairOutputs.getNoOutput()
PairOutputs.Pair<A,B> | PairOutputs.newPair(A a, B b) Create a new Pair
PairOutputs.Pair<A,B> | PairOutputs.read(DataInput in)
PairOutputs.Pair<A,B> | PairOutputs.subtract(PairOutputs.Pair<A,B> output, PairOutputs.Pair<A,B> inc)

Methods in org.apache.lucene.util.fst with parameters of type PairOutputs.Pair
PairOutputs.Pair<A,B> | PairOutputs.add(PairOutputs.Pair<A,B> prefix, PairOutputs.Pair<A,B> output)
PairOutputs.Pair<A,B> | PairOutputs.add(PairOutputs.Pair<A,B> prefix, PairOutputs.Pair<A,B> output)
PairOutputs.Pair<A,B> | PairOutputs.common(PairOutputs.Pair<A,B> pair1, PairOutputs.Pair<A,B> pair2)
PairOutputs.Pair<A,B> | PairOutputs.common(PairOutputs.Pair<A,B> pair1, PairOutputs.Pair<A,B> pair2)
String | PairOutputs.outputToString(PairOutputs.Pair<A,B> output)
PairOutputs.Pair<A,B> | PairOutputs.subtract(PairOutputs.Pair<A,B> output, PairOutputs.Pair<A,B> inc)
PairOutputs.Pair<A,B> | PairOutputs.subtract(PairOutputs.Pair<A,B> output, PairOutputs.Pair<A,B> inc)
void | PairOutputs.write(PairOutputs.Pair<A,B> output, DataOutput writer)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.PositiveIntOutputs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.PositiveIntOutputs

Packages that use PositiveIntOutputs
org.apache.lucene.util.fst Finite state transducers

Uses of PositiveIntOutputs in org.apache.lucene.util.fst

Methods in org.apache.lucene.util.fst that return PositiveIntOutputs
static PositiveIntOutputs PositiveIntOutputs.getSingleton(boolean doShare)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs

Packages that use UpToTwoPositiveIntOutputs
org.apache.lucene.util.fst Finite state transducers

Uses of UpToTwoPositiveIntOutputs in org.apache.lucene.util.fst

Methods in org.apache.lucene.util.fst that return UpToTwoPositiveIntOutputs
static UpToTwoPositiveIntOutputs UpToTwoPositiveIntOutputs.getSingleton(boolean doShare)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs.TwoLongs

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.UpToTwoPositiveIntOutputs.TwoLongs

Packages that use UpToTwoPositiveIntOutputs.TwoLongs
org.apache.lucene.util.fst Finite state transducers

Uses of UpToTwoPositiveIntOutputs.TwoLongs in org.apache.lucene.util.fst

Methods in org.apache.lucene.util.fst that return UpToTwoPositiveIntOutputs.TwoLongs
 UpToTwoPositiveIntOutputs.TwoLongs UpToTwoPositiveIntOutputs.get(long first, long second)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.Util

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.Util

No usage of org.apache.lucene.util.fst.Util

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.fst.Util.MinResult

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.fst.Util.MinResult

Packages that use Util.MinResult
org.apache.lucene.util.fst Finite state transducers

Uses of Util.MinResult in org.apache.lucene.util.fst

Methods in org.apache.lucene.util.fst that return Util.MinResult
static
<T> Util.MinResult<T>[]
Util.shortestPaths(FST<T> fst, FST.Arc<T> fromNode, Comparator<T> comparator, int topN)
Starting from node, find the top N min cost completions to a final node.

Methods in org.apache.lucene.util.fst with parameters of type Util.MinResult
 int Util.MinResult.compareTo(Util.MinResult<T> other)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


GrowableWriter

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.packed
Class GrowableWriter

java.lang.Object
    extended by  org.apache.lucene.util.packed.GrowableWriter
All Implemented Interfaces:
PackedInts.Mutable, PackedInts.Reader
public class GrowableWriter
extends Object
implements PackedInts.Mutable

Implements PackedInts.Mutable, but grows the bit count of the underlying packed ints on-demand.

@lucene.internal

Constructor Summary
GrowableWriter(int startBitsPerValue, int valueCount, boolean roundFixedSize)
Method Summary
void | clear() Sets all values to 0.
long | get(int index)
Object | getArray() Expert: if the bit-width of this reader matches one of java's native types, returns the underlying array (ie, byte[], short[], int[], long[]); else, returns null.
int | getBitsPerValue()
PackedInts.Mutable | getMutable()
boolean | hasArray() Returns true if this implementation is backed by a native java array.
GrowableWriter | resize(int newSize)
void | set(int index, long value) Set the value at the given index in the array.
int | size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GrowableWriter

public GrowableWriter(int startBitsPerValue,
                      int valueCount,
                      boolean roundFixedSize)
Method Detail

get

public long get(int index)
Specified by:
get in interface PackedInts.Reader
Parameters:
index - the position of the wanted value.
Returns:
the value at the stated index.

size

public int size()
Specified by:
size in interface PackedInts.Reader
Returns:
the number of values.

getBitsPerValue

public int getBitsPerValue()
Specified by:
getBitsPerValue in interface PackedInts.Reader
Returns:
the number of bits used to store any given value. Note: This does not imply that memory usage is bitsPerValue * #values as implementations are free to use non-space-optimal packing of bits.

getMutable

public PackedInts.Mutable getMutable()

getArray

public Object getArray()
Description copied from interface: PackedInts.Reader
Expert: if the bit-width of this reader matches one of java's native types, returns the underlying array (ie, byte[], short[], int[], long[]); else, returns null. Note that when accessing the array you must upgrade the type (bitwise AND with all ones), to interpret the full value as unsigned. Ie, bytes[idx]&0xFF, shorts[idx]&0xFFFF, etc.

Specified by:
getArray in interface PackedInts.Reader

hasArray

public boolean hasArray()
Description copied from interface: PackedInts.Reader
Returns true if this implementation is backed by a native java array.

Specified by:
hasArray in interface PackedInts.Reader
See Also:
PackedInts.Reader.getArray()

set

public void set(int index,
                long value)
Description copied from interface: PackedInts.Mutable
Set the value at the given index in the array.

Specified by:
set in interface PackedInts.Mutable
Parameters:
index - where the value should be positioned.
value - a value conforming to the constraints set by the array.

clear

public void clear()
Description copied from interface: PackedInts.Mutable
Sets all values to 0.

Specified by:
clear in interface PackedInts.Mutable

resize

public GrowableWriter resize(int newSize)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.util.packed
Interfaces
PackedInts.Mutable
PackedInts.Reader
Classes
GrowableWriter
PackedInts
PackedInts.ReaderImpl
PackedInts.Writer


org.apache.lucene.util.packed

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.util.packed

The packed package provides random access capable arrays of positive longs.

See:
Description

Interface Summary
PackedInts.Mutable | A packed integer array that can be modified.
PackedInts.Reader | A read-only random access array of positive integers.

Class Summary
GrowableWriter | Implements PackedInts.Mutable, but grows the bit count of the underlying packed ints on-demand.
PackedInts | Simplistic compression for array of unsigned long values.
PackedInts.ReaderImpl | A simple base for Readers that keeps track of valueCount and bitsPerValue.
PackedInts.Writer | A write-once Writer.

Package org.apache.lucene.util.packed Description

The packed package provides random access capable arrays of positive longs. The implementations provides different trade offs between memory usage and access speed. The standard usage scenario is replacing large int or long arrays in order to reduce the memory footprint.

The main access point is the PackedInts factory.


org.apache.lucene.util.packed Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.util.packed

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.util.packed.GrowableWriter (implements org.apache.lucene.util.packed.PackedInts.Mutable)
    • org.apache.lucene.util.packed.PackedInts
    • org.apache.lucene.util.packed.PackedInts.ReaderImpl (implements org.apache.lucene.util.packed.PackedInts.Reader)
    • org.apache.lucene.util.packed.PackedInts.Writer

Interface Hierarchy

  • org.apache.lucene.util.packed.PackedInts.Reader
    • org.apache.lucene.util.packed.PackedInts.Mutable


Uses of Package org.apache.lucene.util.packed

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.util.packed

Packages that use org.apache.lucene.util.packed
org.apache.lucene.util.packed The packed package provides random access capable arrays of positive longs.

Classes in org.apache.lucene.util.packed used by org.apache.lucene.util.packed
GrowableWriter
Implements PackedInts.Mutable, but grows the bit count of the underlying packed ints on-demand.
PackedInts.Mutable
A packed integer array that can be modified.
PackedInts.Reader
A read-only random access array of positive integers.
PackedInts.Writer
A write-once Writer.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PackedInts

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.packed
Class PackedInts

java.lang.Object
    extended by  org.apache.lucene.util.packed.PackedInts

public class PackedInts
extends Object

Simplistic compression for array of unsigned long values. Each value is >= 0 and <= a specified maximum value. The values are stored as packed ints, with each value consuming a fixed number of bits.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Nested Class Summary
static interface | PackedInts.Mutable A packed integer array that can be modified.
static interface | PackedInts.Reader A read-only random access array of positive integers.
static class | PackedInts.ReaderImpl A simple base for Readers that keeps track of valueCount and bitsPerValue.
static class | PackedInts.Writer A write-once Writer.
Constructor Summary
PackedInts()
Method Summary
static int | bitsRequired(long maxValue) Returns how many bits are required to hold values up to and including maxValue
static PackedInts.Mutable | getMutable(int valueCount, int bitsPerValue) Create a packed integer array with the given amount of values initialized to 0.
static int | getNextFixedSize(int bitsPerValue) Rounds bitsPerValue up to 8, 16, 32 or 64.
static PackedInts.Reader | getReader(DataInput in) Retrieve PackedInt data from the DataInput and return a packed int structure based on it.
static int | getRoundedFixedSize(int bitsPerValue) Possibly wastes some storage in exchange for faster lookups
static PackedInts.Writer | getWriter(DataOutput out, int valueCount, int bitsPerValue) Create a packed integer array writer for the given number of values at the given bits/value.
static long | maxValue(int bitsPerValue) Calculates the maximum unsigned long that can be expressed with the given number of bits.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PackedInts

public PackedInts()
Method Detail

getReader

public static PackedInts.Reader getReader(DataInput in)
                                   throws IOException
Retrieve PackedInt data from the DataInput and return a packed int structure based on it.

Parameters:
in - positioned at the beginning of a stored packed int structure.
Returns:
a read only random access capable array of positive integers.
Throws:
IOException - if the structure could not be retrieved.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

getMutable

public static PackedInts.Mutable getMutable(int valueCount,
                                            int bitsPerValue)
Create a packed integer array with the given amount of values initialized to 0. the valueCount and the bitsPerValue cannot be changed after creation. All Mutables known by this factory are kept fully in RAM.

Parameters:
valueCount - the number of elements.
bitsPerValue - the number of bits available for any given value.
Returns:
a mutable packed integer array.
Throws:
IOException - if the Mutable could not be created. With the current implementations, this never happens, but the method signature allows for future persistence-backed Mutables.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

getWriter

public static PackedInts.Writer getWriter(DataOutput out,
                                          int valueCount,
                                          int bitsPerValue)
                                   throws IOException
Create a packed integer array writer for the given number of values at the given bits/value. Writers append to the given IndexOutput and has very low memory overhead.

Parameters:
out - the destination for the produced bits.
valueCount - the number of elements.
bitsPerValue - the number of bits available for any given value.
Returns:
a Writer ready for receiving values.
Throws:
IOException - if bits could not be written to out.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

bitsRequired

public static int bitsRequired(long maxValue)
Returns how many bits are required to hold values up to and including maxValue

Parameters:
maxValue - the maximum value that should be representable.
Returns:
the amount of bits needed to represent values from 0 to maxValue.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

maxValue

public static long maxValue(int bitsPerValue)
Calculates the maximum unsigned long that can be expressed with the given number of bits.

Parameters:
bitsPerValue - the number of bits available for any given value.
Returns:
the maximum value for the given bits.
NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

getNextFixedSize

public static int getNextFixedSize(int bitsPerValue)
Rounds bitsPerValue up to 8, 16, 32 or 64.

getRoundedFixedSize

public static int getRoundedFixedSize(int bitsPerValue)
Possibly wastes some storage in exchange for faster lookups

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PackedInts.Mutable

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.packed
Interface PackedInts.Mutable

All Superinterfaces:
PackedInts.Reader
All Known Implementing Classes:
GrowableWriter
Enclosing class:
PackedInts
public static interface PackedInts.Mutable
extends PackedInts.Reader

A packed integer array that can be modified.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Method Summary
void | clear() Sets all values to 0.
void | set(int index, long value) Set the value at the given index in the array.
Methods inherited from interface org.apache.lucene.util.packed.PackedInts.Reader
get, getArray, getBitsPerValue, hasArray, size

Method Detail

set

void set(int index,
         long value)
Set the value at the given index in the array.

Parameters:
index - where the value should be positioned.
value - a value conforming to the constraints set by the array.

clear

void clear()
Sets all values to 0.

Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PackedInts.Reader

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.packed
Interface PackedInts.Reader

All Known Subinterfaces:
PackedInts.Mutable
All Known Implementing Classes:
GrowableWriter, PackedInts.ReaderImpl
Enclosing class:
PackedInts
public static interface PackedInts.Reader

A read-only random access array of positive integers.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Method Summary
long | get(int index)
Object | getArray() Expert: if the bit-width of this reader matches one of java's native types, returns the underlying array (ie, byte[], short[], int[], long[]); else, returns null.
int | getBitsPerValue()
boolean | hasArray() Returns true if this implementation is backed by a native java array.
int | size()

Method Detail

get

long get(int index)
Parameters:
index - the position of the wanted value.
Returns:
the value at the stated index.

getBitsPerValue

int getBitsPerValue()
Returns:
the number of bits used to store any given value. Note: This does not imply that memory usage is bitsPerValue * #values as implementations are free to use non-space-optimal packing of bits.

size

int size()
Returns:
the number of values.

getArray

Object getArray()
Expert: if the bit-width of this reader matches one of java's native types, returns the underlying array (ie, byte[], short[], int[], long[]); else, returns null. Note that when accessing the array you must upgrade the type (bitwise AND with all ones), to interpret the full value as unsigned. Ie, bytes[idx]&0xFF, shorts[idx]&0xFFFF, etc.

hasArray

boolean hasArray()
Returns true if this implementation is backed by a native java array.

See Also:
getArray()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PackedInts.ReaderImpl

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.packed
Class PackedInts.ReaderImpl

java.lang.Object
    extended by  org.apache.lucene.util.packed.PackedInts.ReaderImpl
All Implemented Interfaces:
PackedInts.Reader
Enclosing class:
PackedInts
public abstract static class PackedInts.ReaderImpl
extends Object
implements PackedInts.Reader

A simple base for Readers that keeps track of valueCount and bitsPerValue.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
protected int | bitsPerValue
protected int | valueCount
Constructor Summary
protected PackedInts.ReaderImpl(int valueCount, int bitsPerValue)
Method Summary
Object | getArray() Expert: if the bit-width of this reader matches one of java's native types, returns the underlying array (ie, byte[], short[], int[], long[]); else, returns null.
int | getBitsPerValue()
long | getMaxValue()
boolean | hasArray() Returns true if this implementation is backed by a native java array.
int | size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.util.packed.PackedInts.Reader
get

Field Detail

bitsPerValue

protected final int bitsPerValue

valueCount

protected final int valueCount
Constructor Detail

PackedInts.ReaderImpl

protected PackedInts.ReaderImpl(int valueCount,
                                int bitsPerValue)
Method Detail

getBitsPerValue

public int getBitsPerValue()
Specified by:
getBitsPerValue in interface PackedInts.Reader
Returns:
the number of bits used to store any given value. Note: This does not imply that memory usage is bitsPerValue * #values as implementations are free to use non-space-optimal packing of bits.

size

public int size()
Specified by:
size in interface PackedInts.Reader
Returns:
the number of values.

getMaxValue

public long getMaxValue()

getArray

public Object getArray()
Description copied from interface: PackedInts.Reader
Expert: if the bit-width of this reader matches one of java's native types, returns the underlying array (ie, byte[], short[], int[], long[]); else, returns null. Note that when accessing the array you must upgrade the type (bitwise AND with all ones), to interpret the full value as unsigned. Ie, bytes[idx]&0xFF, shorts[idx]&0xFFFF, etc.

Specified by:
getArray in interface PackedInts.Reader

hasArray

public boolean hasArray()
Description copied from interface: PackedInts.Reader
Returns true if this implementation is backed by a native java array.

Specified by:
hasArray in interface PackedInts.Reader
See Also:
PackedInts.Reader.getArray()
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PackedInts.Writer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.util.packed
Class PackedInts.Writer

java.lang.Object
    extended by  org.apache.lucene.util.packed.PackedInts.Writer
Enclosing class:
PackedInts
public abstract static class PackedInts.Writer
extends Object

A write-once Writer.

NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.

Field Summary
protected int | bitsPerValue
protected DataOutput | out
protected int | valueCount
Constructor Summary
protected PackedInts.Writer(DataOutput out, int valueCount, int bitsPerValue)
Method Summary
abstract void | add(long v)
abstract void | finish()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

out

protected final DataOutput out

bitsPerValue

protected final int bitsPerValue

valueCount

protected final int valueCount
Constructor Detail

PackedInts.Writer

protected PackedInts.Writer(DataOutput out,
                            int valueCount,
                            int bitsPerValue)
                     throws IOException
Throws:
IOException
Method Detail

add

public abstract void add(long v)
                  throws IOException
Throws:
IOException

finish

public abstract void finish()
                     throws IOException
Throws:
IOException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.util.packed.GrowableWriter

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.packed.GrowableWriter

Packages that use GrowableWriter
org.apache.lucene.util.packed The packed package provides random access capable arrays of positive longs.

Uses of GrowableWriter in org.apache.lucene.util.packed

Methods in org.apache.lucene.util.packed that return GrowableWriter
 GrowableWriter GrowableWriter.resize(int newSize)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.packed.PackedInts

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.packed.PackedInts

No usage of org.apache.lucene.util.packed.PackedInts

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.util.packed.PackedInts.Mutable

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.util.packed.PackedInts.Mutable

Packages that use PackedInts.Mutable
org.apache.lucene.util.packed The packed package provides random access capable arrays of positive longs.

Uses of PackedInts.Mutable in org.apache.lucene.util.packed

Classes in org.apache.lucene.util.packed that implement PackedInts.Mutable
 class GrowableWriter
Implements PackedInts.Mutable, but grows the bit count of the underlying packed ints on-demand.

Methods in org.apache.lucene.util.packed that return PackedInts.Mutable
PackedInts.Mutable | GrowableWriter.getMutable()
static PackedInts.Mutable | PackedInts.getMutable(int valueCount, int bitsPerValue) Create a packed integer array with the given amount of values initialized to 0.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.util.packed.PackedInts.Reader

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.util.packed.PackedInts.Reader

Packages that use PackedInts.Reader
org.apache.lucene.util.packed The packed package provides random access capable arrays of positive longs.

Uses of PackedInts.Reader in org.apache.lucene.util.packed

Subinterfaces of PackedInts.Reader in org.apache.lucene.util.packed
static interface PackedInts.Mutable
A packed integer array that can be modified.

Classes in org.apache.lucene.util.packed that implement PackedInts.Reader
class | GrowableWriter Implements PackedInts.Mutable, but grows the bit count of the underlying packed ints on-demand.
static class | PackedInts.ReaderImpl A simple base for Readers that keeps track of valueCount and bitsPerValue.

Methods in org.apache.lucene.util.packed that return PackedInts.Reader
static PackedInts.Reader PackedInts.getReader(DataInput in)
Retrieve PackedInt data from the DataInput and return a packed int structure based on it.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.packed.PackedInts.ReaderImpl

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.packed.PackedInts.ReaderImpl

No usage of org.apache.lucene.util.packed.PackedInts.ReaderImpl

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.util.packed.PackedInts.Writer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.util.packed.PackedInts.Writer

Packages that use PackedInts.Writer
org.apache.lucene.util.packed The packed package provides random access capable arrays of positive longs.

Uses of PackedInts.Writer in org.apache.lucene.util.packed

Methods in org.apache.lucene.util.packed that return PackedInts.Writer
static PackedInts.Writer PackedInts.getWriter(DataOutput out, int valueCount, int bitsPerValue)
Create a packed integer array writer for the given number of values at the given bits/value.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


CoreParser

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser
Class CoreParser

java.lang.Object
    extended by  org.apache.lucene.xmlparser.CoreParser
All Implemented Interfaces:
QueryBuilder
Direct Known Subclasses:
CorePlusExtensionsParser
public class CoreParser
extends Object
implements QueryBuilder

Assembles a QueryBuilder which uses only core Lucene Query objects

Field Summary
protected Analyzer | analyzer
protected FilterBuilderFactory | filterFactory
static int | maxNumCachedFilters
protected QueryParser | parser
protected QueryBuilderFactory | queryFactory
Constructor Summary
 | CoreParser(Analyzer analyzer, QueryParser parser) Construct an XML parser that uses a single instance QueryParser for handling UserQuery tags - all parse operations are synchronised on this parser
 | CoreParser(String defaultField, Analyzer analyzer) Constructs an XML parser that creates a QueryParser for each UserQuery request.
protected | CoreParser(String defaultField, Analyzer analyzer, QueryParser parser)
Method Summary
void | addFilterBuilder(String nodeName, FilterBuilder builder)
void | addQueryBuilder(String nodeName, QueryBuilder builder)
Query | getQuery(Element e)
Query | parse(InputStream xmlStream)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

analyzer

protected Analyzer analyzer

parser

protected QueryParser parser

queryFactory

protected QueryBuilderFactory queryFactory

filterFactory

protected FilterBuilderFactory filterFactory

maxNumCachedFilters

public static int maxNumCachedFilters
Constructor Detail

CoreParser

public CoreParser(Analyzer analyzer,
                  QueryParser parser)
Construct an XML parser that uses a single instance QueryParser for handling UserQuery tags - all parse operations are synchronised on this parser

Parameters:
analyzer -
parser - A QueryParser which will be synchronized on during parse calls.

CoreParser

public CoreParser(String defaultField,
                  Analyzer analyzer)
Constructs an XML parser that creates a QueryParser for each UserQuery request.

Parameters:
defaultField - The default field name used by QueryParsers constructed for UserQuery tags
analyzer -

CoreParser

protected CoreParser(String defaultField,
                     Analyzer analyzer,
                     QueryParser parser)
Method Detail

parse

public Query parse(InputStream xmlStream)
            throws ParserException
Throws:
ParserException

addQueryBuilder

public void addQueryBuilder(String nodeName,
                            QueryBuilder builder)

addFilterBuilder

public void addFilterBuilder(String nodeName,
                             FilterBuilder builder)

getQuery

public Query getQuery(Element e)
               throws ParserException
Specified by:
getQuery in interface QueryBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


CorePlusExtensionsParser

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser
Class CorePlusExtensionsParser

java.lang.Object
    extended by  org.apache.lucene.xmlparser.CoreParser
        extended by  org.apache.lucene.xmlparser.CorePlusExtensionsParser
All Implemented Interfaces:
QueryBuilder
public class CorePlusExtensionsParser
extends CoreParser

Field Summary
Fields inherited from class org.apache.lucene.xmlparser.CoreParser
analyzer, filterFactory, maxNumCachedFilters, parser, queryFactory
Constructor Summary
CorePlusExtensionsParser(Analyzer analyzer, QueryParser parser)
Construct an XML parser that uses a single instance QueryParser for handling UserQuery tags - all parse operations are synchronized on this parser
CorePlusExtensionsParser(String defaultField, Analyzer analyzer)
Constructs an XML parser that creates a QueryParser for each UserQuery request.
Method Summary
Methods inherited from class org.apache.lucene.xmlparser.CoreParser
addFilterBuilder, addQueryBuilder, getQuery, parse
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CorePlusExtensionsParser

public CorePlusExtensionsParser(Analyzer analyzer,
                                QueryParser parser)
Construct an XML parser that uses a single instance QueryParser for handling UserQuery tags - all parse operations are synchronized on this parser

Parameters:
analyzer -
parser - A QueryParser which will be synchronized on during parse calls.

CorePlusExtensionsParser

public CorePlusExtensionsParser(String defaultField,
                                Analyzer analyzer)
Constructs an XML parser that creates a QueryParser for each UserQuery request.

Parameters:
defaultField - The default field name used by QueryParsers constructed for UserQuery tags
analyzer -
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DOMUtils

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser
Class DOMUtils

java.lang.Object
    extended by  org.apache.lucene.xmlparser.DOMUtils

public class DOMUtils
extends Object

Constructor Summary
DOMUtils()
Method Summary
static boolean | getAttribute(Element element, String attributeName, boolean deflt)
static float | getAttribute(Element element, String attributeName, float deflt)
static int | getAttribute(Element element, String attributeName, int deflt)
static String | getAttribute(Element element, String attributeName, String deflt)
static String | getAttributeOrFail(Element e, String name)
static String | getAttributeWithInheritance(Element element, String attributeName) Returns an attribute value from this node, or first parent node with this attribute defined
static String | getAttributeWithInheritanceOrFail(Element e, String name)
static Element | getChildByTagName(Element e, String name)
static Element | getChildByTagOrFail(Element e, String name)
static String | getChildTextByTagName(Element e, String tagName)
static Element | getFirstChildElement(Element element)
static Element | getFirstChildOrFail(Element e)
static String | getNonBlankTextOrFail(Element e)
static String | getText(Node e)
static Element | insertChild(Element parent, String tagName, String text)
static Document | loadXML(Reader is) Helper method to parse an XML file into a DOM tree, given a reader.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DOMUtils

public DOMUtils()
Method Detail

getChildByTagOrFail

public static Element getChildByTagOrFail(Element e,
                                          String name)
                                   throws ParserException
Throws:
ParserException

getFirstChildOrFail

public static Element getFirstChildOrFail(Element e)
                                   throws ParserException
Throws:
ParserException

getAttributeOrFail

public static String getAttributeOrFail(Element e,
                                        String name)
                                 throws ParserException
Throws:
ParserException

getAttributeWithInheritanceOrFail

public static String getAttributeWithInheritanceOrFail(Element e,
                                                       String name)
                                                throws ParserException
Throws:
ParserException

getNonBlankTextOrFail

public static String getNonBlankTextOrFail(Element e)
                                    throws ParserException
Throws:
ParserException

getChildByTagName

public static Element getChildByTagName(Element e,
                                        String name)

getAttributeWithInheritance

public static String getAttributeWithInheritance(Element element,
                                                 String attributeName)
Returns an attribute value from this node, or first parent node with this attribute defined

Parameters:
element -
attributeName -
Returns:
A non-zero-length value if defined, otherwise null

getChildTextByTagName

public static String getChildTextByTagName(Element e,
                                           String tagName)

insertChild

public static Element insertChild(Element parent,
                                  String tagName,
                                  String text)

getAttribute

public static String getAttribute(Element element,
                                  String attributeName,
                                  String deflt)

getAttribute

public static float getAttribute(Element element,
                                 String attributeName,
                                 float deflt)

getAttribute

public static int getAttribute(Element element,
                               String attributeName,
                               int deflt)

getAttribute

public static boolean getAttribute(Element element,
                                   String attributeName,
                                   boolean deflt)

getText

public static String getText(Node e)

getFirstChildElement

public static Element getFirstChildElement(Element element)

loadXML

public static Document loadXML(Reader is)
Helper method to parse an XML file into a DOM tree, given a reader.

Parameters:
is - reader of the XML file to be parsed
Returns:
an org.w3c.dom.Document object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser
Interface FilterBuilder

All Known Implementing Classes:
BooleanFilterBuilder, CachedFilterBuilder, DuplicateFilterBuilder, FilterBuilderFactory, NumericRangeFilterBuilder, RangeFilterBuilder, TermsFilterBuilder
public interface FilterBuilder

Method Summary
 Filter getFilter(Element e)

Method Detail

getFilter

Filter getFilter(Element e)
                 throws ParserException
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilterBuilderFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser
Class FilterBuilderFactory

java.lang.Object
    extended by  org.apache.lucene.xmlparser.FilterBuilderFactory
All Implemented Interfaces:
FilterBuilder
public class FilterBuilderFactory
extends Object
implements FilterBuilder

Constructor Summary
FilterBuilderFactory()
Method Summary
void | addBuilder(String nodeName, FilterBuilder builder)
Filter | getFilter(Element n)
FilterBuilder | getFilterBuilder(String nodeName)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FilterBuilderFactory

public FilterBuilderFactory()
Method Detail

getFilter

public Filter getFilter(Element n)
                 throws ParserException
Specified by:
getFilter in interface FilterBuilder
Throws:
ParserException

addBuilder

public void addBuilder(String nodeName,
                       FilterBuilder builder)

getFilterBuilder

public FilterBuilder getFilterBuilder(String nodeName)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.xmlparser
Interfaces
FilterBuilder
QueryBuilder
Classes
CoreParser
CorePlusExtensionsParser
DOMUtils
FilterBuilderFactory
QueryBuilderFactory
QueryTemplateManager
Exceptions
ParserException


org.apache.lucene.xmlparser

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.xmlparser

Parser that produces Lucene Query objects from XML streams.

See:
Description

Interface Summary
FilterBuilder |
QueryBuilder | Implemented by objects that produce Lucene Query objects from XML streams.

Class Summary
CoreParser | Assembles a QueryBuilder which uses only core Lucene Query objects
CorePlusExtensionsParser |
DOMUtils |
FilterBuilderFactory |
QueryBuilderFactory |
QueryTemplateManager | Provides utilities for turning query form input (such as from a web page or Swing gui) into Lucene XML queries by using XSL templates.

Exception Summary
ParserException

Package org.apache.lucene.xmlparser Description

Parser that produces Lucene Query objects from XML streams.


org.apache.lucene.xmlparser Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.xmlparser

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.xmlparser.CoreParser (implements org.apache.lucene.xmlparser.QueryBuilder)
      • org.apache.lucene.xmlparser.CorePlusExtensionsParser
    • org.apache.lucene.xmlparser.DOMUtils
    • org.apache.lucene.xmlparser.FilterBuilderFactory (implements org.apache.lucene.xmlparser.FilterBuilder)
    • org.apache.lucene.xmlparser.QueryBuilderFactory (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.xmlparser.QueryTemplateManager
    • java.lang.Throwable (implements java.io.Serializable)
      • java.lang.Exception
        • org.apache.lucene.xmlparser.ParserException

Interface Hierarchy

  • org.apache.lucene.xmlparser.FilterBuilder
  • org.apache.lucene.xmlparser.QueryBuilder


Uses of Package org.apache.lucene.xmlparser

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.xmlparser

Packages that use org.apache.lucene.xmlparser
org.apache.lucene.xmlparser | Parser that produces Lucene Query objects from XML streams.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Classes in org.apache.lucene.xmlparser used by org.apache.lucene.xmlparser
CoreParser
Assembles a QueryBuilder which uses only core Lucene Query objects
FilterBuilder
FilterBuilderFactory
ParserException
QueryBuilder
Implemented by objects that produce Lucene Query objects from XML streams.
QueryBuilderFactory

Classes in org.apache.lucene.xmlparser used by org.apache.lucene.xmlparser.builders
FilterBuilder
FilterBuilderFactory
ParserException
QueryBuilder
Implemented by objects that produce Lucene Query objects from XML streams.
QueryBuilderFactory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ParserException

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser
Class ParserException

java.lang.Object
    extended by  java.lang.Throwable
        extended by  java.lang.Exception
            extended by  org.apache.lucene.xmlparser.ParserException
All Implemented Interfaces:
Serializable
public class ParserException
extends Exception

See Also:
Serialized Form

Constructor Summary
ParserException()
ParserException(String message)
ParserException(String message, Throwable cause)
ParserException(Throwable cause)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ParserException

public ParserException()

ParserException

public ParserException(String message)
Parameters:
message -

ParserException

public ParserException(String message,
                       Throwable cause)
Parameters:
message -
cause -

ParserException

public ParserException(Throwable cause)
Parameters:
cause -
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser
Interface QueryBuilder

All Known Subinterfaces:
SpanQueryBuilder
All Known Implementing Classes:
BooleanQueryBuilder, BoostingQueryBuilder, BoostingTermBuilder, ConstantScoreQueryBuilder, CoreParser, CorePlusExtensionsParser, FilteredQueryBuilder, FuzzyLikeThisQueryBuilder, LikeThisQueryBuilder, MatchAllDocsQueryBuilder, NumericRangeQueryBuilder, QueryBuilderFactory, SpanBuilderBase, SpanFirstBuilder, SpanNearBuilder, SpanNotBuilder, SpanOrBuilder, SpanOrTermsBuilder, SpanQueryBuilderFactory, SpanTermBuilder, TermQueryBuilder, TermsQueryBuilder, UserInputQueryBuilder
public interface QueryBuilder

Implemented by objects that produce Lucene Query objects from XML streams. Implementations are expected to be thread-safe so that they can be used to simultaneously parse multiple XML documents.

Method Summary
 Query getQuery(Element e)

Method Detail

getQuery

Query getQuery(Element e)
               throws ParserException
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryBuilderFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser
Class QueryBuilderFactory

java.lang.Object
    extended by  org.apache.lucene.xmlparser.QueryBuilderFactory
All Implemented Interfaces:
QueryBuilder
public class QueryBuilderFactory
extends Object
implements QueryBuilder

Constructor Summary
QueryBuilderFactory()
Method Summary
void | addBuilder(String nodeName, QueryBuilder builder)
Query | getQuery(Element n)
QueryBuilder | getQueryBuilder(String nodeName)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

QueryBuilderFactory

public QueryBuilderFactory()
Method Detail

getQuery

public Query getQuery(Element n)
               throws ParserException
Specified by:
getQuery in interface QueryBuilder
Throws:
ParserException

addBuilder

public void addBuilder(String nodeName,
                       QueryBuilder builder)

getQueryBuilder

public QueryBuilder getQueryBuilder(String nodeName)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


QueryTemplateManager

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser
Class QueryTemplateManager

java.lang.Object
    extended by  org.apache.lucene.xmlparser.QueryTemplateManager

public class QueryTemplateManager
extends Object

Provides utilities for turning query form input (such as from a web page or Swing gui) into Lucene XML queries by using XSL templates. This approach offers a convenient way of externalizing and changing how user input is turned into Lucene queries. Database applications often adopt similar practices by externalizing SQL in template files that can be easily changed/optimized by a DBA. The static methods can be used on their own or by creating an instance of this class you can store and re-use compiled stylesheets for fast use (e.g. in a server environment)

Constructor Summary
QueryTemplateManager()
QueryTemplateManager(InputStream xslIs)
Method Summary
void | addDefaultQueryTemplate(InputStream xslIs)
void | addQueryTemplate(String name, InputStream xslIs)
Document | getQueryAsDOM(Properties formProperties)
static Document | getQueryAsDOM(Properties formProperties, InputStream xslIs) Slow means of constructing query - parses stylesheet from input stream
Document | getQueryAsDOM(Properties formProperties, String queryTemplateName)
static Document | getQueryAsDOM(Properties formProperties, Templates template) Fast means of constructing query using a cached,precompiled stylesheet
String | getQueryAsXmlString(Properties formProperties)
static String | getQueryAsXmlString(Properties formProperties, InputStream xslIs) Slow means of constructing query parsing a stylesheet from an input stream
String | getQueryAsXmlString(Properties formProperties, String queryTemplateName)
static String | getQueryAsXmlString(Properties formProperties, Templates template) Fast means of constructing query using a precompiled stylesheet
static Templates | getTemplates(InputStream xslIs) Parses a query stylesheet for repeated use
static void | transformCriteria(Properties formProperties, InputStream xslIs, Result result) Slower transformation using an uncompiled stylesheet (suitable for development environment)
static void | transformCriteria(Properties formProperties, Templates template, Result result) Fast transformation using a pre-compiled stylesheet (suitable for production environments)
static void | transformCriteria(Properties formProperties, Transformer transformer, Result result)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

QueryTemplateManager

public QueryTemplateManager()

QueryTemplateManager

public QueryTemplateManager(InputStream xslIs)
                     throws TransformerConfigurationException,
                            ParserConfigurationException,
                            SAXException,
                            IOException
Throws:
TransformerConfigurationException
ParserConfigurationException
SAXException
IOException
Method Detail

addDefaultQueryTemplate

public void addDefaultQueryTemplate(InputStream xslIs)
                             throws TransformerConfigurationException,
                                    ParserConfigurationException,
                                    SAXException,
                                    IOException
Throws:
TransformerConfigurationException
ParserConfigurationException
SAXException
IOException

addQueryTemplate

public void addQueryTemplate(String name,
                             InputStream xslIs)
                      throws TransformerConfigurationException,
                             ParserConfigurationException,
                             SAXException,
                             IOException
Throws:
TransformerConfigurationException
ParserConfigurationException
SAXException
IOException

getQueryAsXmlString

public String getQueryAsXmlString(Properties formProperties,
                                  String queryTemplateName)
                           throws SAXException,
                                  IOException,
                                  ParserConfigurationException,
                                  TransformerException
Throws:
SAXException
IOException
ParserConfigurationException
TransformerException

getQueryAsDOM

public Document getQueryAsDOM(Properties formProperties,
                              String queryTemplateName)
                       throws SAXException,
                              IOException,
                              ParserConfigurationException,
                              TransformerException
Throws:
SAXException
IOException
ParserConfigurationException
TransformerException

getQueryAsXmlString

public String getQueryAsXmlString(Properties formProperties)
                           throws SAXException,
                                  IOException,
                                  ParserConfigurationException,
                                  TransformerException
Throws:
SAXException
IOException
ParserConfigurationException
TransformerException

getQueryAsDOM

public Document getQueryAsDOM(Properties formProperties)
                       throws SAXException,
                              IOException,
                              ParserConfigurationException,
                              TransformerException
Throws:
SAXException
IOException
ParserConfigurationException
TransformerException

getQueryAsXmlString

public static String getQueryAsXmlString(Properties formProperties,
                                         Templates template)
                                  throws SAXException,
                                         IOException,
                                         ParserConfigurationException,
                                         TransformerException
Fast means of constructing query using a precompiled stylesheet

Throws:
SAXException
IOException
ParserConfigurationException
TransformerException

getQueryAsXmlString

public static String getQueryAsXmlString(Properties formProperties,
                                         InputStream xslIs)
                                  throws SAXException,
                                         IOException,
                                         ParserConfigurationException,
                                         TransformerException
Slow means of constructing query parsing a stylesheet from an input stream

Throws:
SAXException
IOException
ParserConfigurationException
TransformerException

getQueryAsDOM

public static Document getQueryAsDOM(Properties formProperties,
                                     Templates template)
                              throws SAXException,
                                     IOException,
                                     ParserConfigurationException,
                                     TransformerException
Fast means of constructing query using a cached,precompiled stylesheet

Throws:
SAXException
IOException
ParserConfigurationException
TransformerException

getQueryAsDOM

public static Document getQueryAsDOM(Properties formProperties,
                                     InputStream xslIs)
                              throws SAXException,
                                     IOException,
                                     ParserConfigurationException,
                                     TransformerException
Slow means of constructing query - parses stylesheet from input stream

Throws:
SAXException
IOException
ParserConfigurationException
TransformerException

transformCriteria

public static void transformCriteria(Properties formProperties,
                                     InputStream xslIs,
                                     Result result)
                              throws SAXException,
                                     IOException,
                                     ParserConfigurationException,
                                     TransformerException
Slower transformation using an uncompiled stylesheet (suitable for development environment)

Throws:
SAXException
IOException
ParserConfigurationException
TransformerException

transformCriteria

public static void transformCriteria(Properties formProperties,
                                     Templates template,
                                     Result result)
                              throws SAXException,
                                     IOException,
                                     ParserConfigurationException,
                                     TransformerException
Fast transformation using a pre-compiled stylesheet (suitable for production environments)

Throws:
SAXException
IOException
ParserConfigurationException
TransformerException

transformCriteria

public static void transformCriteria(Properties formProperties,
                                     Transformer transformer,
                                     Result result)
                              throws SAXException,
                                     IOException,
                                     ParserConfigurationException,
                                     TransformerException
Throws:
SAXException
IOException
ParserConfigurationException
TransformerException

getTemplates

public static Templates getTemplates(InputStream xslIs)
                              throws ParserConfigurationException,
                                     SAXException,
                                     IOException,
                                     TransformerConfigurationException
Parses a query stylesheet for repeated use

Throws:
ParserConfigurationException
SAXException
IOException
TransformerConfigurationException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BooleanFilterBuilder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class BooleanFilterBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.BooleanFilterBuilder
All Implemented Interfaces:
FilterBuilder
public class BooleanFilterBuilder
extends Object
implements FilterBuilder

Constructor Summary
BooleanFilterBuilder(FilterBuilder factory)
Method Summary
 Filter getFilter(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BooleanFilterBuilder

public BooleanFilterBuilder(FilterBuilder factory)
Method Detail

getFilter

public Filter getFilter(Element e)
                 throws ParserException
Specified by:
getFilter in interface FilterBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BooleanQueryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class BooleanQueryBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.BooleanQueryBuilder
All Implemented Interfaces:
QueryBuilder
public class BooleanQueryBuilder
extends Object
implements QueryBuilder

Constructor Summary
BooleanQueryBuilder(QueryBuilder factory)
Method Summary
 Query getQuery(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BooleanQueryBuilder

public BooleanQueryBuilder(QueryBuilder factory)
Method Detail

getQuery

public Query getQuery(Element e)
               throws ParserException
Specified by:
getQuery in interface QueryBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BoostingQueryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class BoostingQueryBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.BoostingQueryBuilder
All Implemented Interfaces:
QueryBuilder
public class BoostingQueryBuilder
extends Object
implements QueryBuilder

Constructor Summary
BoostingQueryBuilder(QueryBuilder factory)
Method Summary
 Query getQuery(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BoostingQueryBuilder

public BoostingQueryBuilder(QueryBuilder factory)
Method Detail

getQuery

public Query getQuery(Element e)
               throws ParserException
Specified by:
getQuery in interface QueryBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


BoostingTermBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class BoostingTermBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.SpanBuilderBase
        extended by  org.apache.lucene.xmlparser.builders.BoostingTermBuilder
All Implemented Interfaces:
SpanQueryBuilder, QueryBuilder
public class BoostingTermBuilder
extends SpanBuilderBase

Constructor Summary
BoostingTermBuilder()
Method Summary
 SpanQuery getSpanQuery(Element e)
Methods inherited from class org.apache.lucene.xmlparser.builders.SpanBuilderBase
getQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BoostingTermBuilder

public BoostingTermBuilder()
Method Detail

getSpanQuery

public SpanQuery getSpanQuery(Element e)
                       throws ParserException
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CachedFilterBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class CachedFilterBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.CachedFilterBuilder
All Implemented Interfaces:
FilterBuilder
public class CachedFilterBuilder
extends Object
implements FilterBuilder

Filters are cached in an LRU Cache keyed on the contained query or filter object. Using this will speed up overall performance for repeated uses of the same expensive query/filter. The sorts of queries/filters likely to benefit from caching need not necessarily be complex - e.g. simple TermQuerys with a large DF (document frequency) can be expensive on large indexes. A good example of this might be a term query on a field with only 2 possible values - "true" or "false". In a large index, querying or filtering on this field requires reading millions of document ids from disk which can more usefully be cached as a filter bitset. For Queries/Filters to be cached and reused the object must implement hashcode and equals methods correctly so that duplicate queries/filters can be detected in the cache. The CoreParser.maxNumCachedFilters property can be used to control the size of the LRU Cache established during the construction of CoreParser instances.

Constructor Summary
CachedFilterBuilder(QueryBuilderFactory queryFactory, FilterBuilderFactory filterFactory, int cacheSize)
Method Summary
 Filter getFilter(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CachedFilterBuilder

public CachedFilterBuilder(QueryBuilderFactory queryFactory,
                           FilterBuilderFactory filterFactory,
                           int cacheSize)
Method Detail

getFilter

public Filter getFilter(Element e)
                 throws ParserException
Specified by:
getFilter in interface FilterBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ConstantScoreQueryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class ConstantScoreQueryBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.ConstantScoreQueryBuilder
All Implemented Interfaces:
QueryBuilder
public class ConstantScoreQueryBuilder
extends Object
implements QueryBuilder

Constructor Summary
ConstantScoreQueryBuilder(FilterBuilderFactory filterFactory)
Method Summary
 Query getQuery(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ConstantScoreQueryBuilder

public ConstantScoreQueryBuilder(FilterBuilderFactory filterFactory)
Method Detail

getQuery

public Query getQuery(Element e)
               throws ParserException
Specified by:
getQuery in interface QueryBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DuplicateFilterBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class DuplicateFilterBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.DuplicateFilterBuilder
All Implemented Interfaces:
FilterBuilder
public class DuplicateFilterBuilder
extends Object
implements FilterBuilder

Constructor Summary
DuplicateFilterBuilder()
Method Summary
 Filter getFilter(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DuplicateFilterBuilder

public DuplicateFilterBuilder()
Method Detail

getFilter

public Filter getFilter(Element e)
                 throws ParserException
Specified by:
getFilter in interface FilterBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FilteredQueryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class FilteredQueryBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.FilteredQueryBuilder
All Implemented Interfaces:
QueryBuilder
public class FilteredQueryBuilder
extends Object
implements QueryBuilder

Constructor Summary
FilteredQueryBuilder(FilterBuilder filterFactory, QueryBuilder queryFactory)
Method Summary
 Query getQuery(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FilteredQueryBuilder

public FilteredQueryBuilder(FilterBuilder filterFactory,
                            QueryBuilder queryFactory)
Method Detail

getQuery

public Query getQuery(Element e)
               throws ParserException
Specified by:
getQuery in interface QueryBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FuzzyLikeThisQueryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class FuzzyLikeThisQueryBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.FuzzyLikeThisQueryBuilder
All Implemented Interfaces:
QueryBuilder
public class FuzzyLikeThisQueryBuilder
extends Object
implements QueryBuilder

Constructor Summary
FuzzyLikeThisQueryBuilder(Analyzer analyzer)
Method Summary
 Query getQuery(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FuzzyLikeThisQueryBuilder

public FuzzyLikeThisQueryBuilder(Analyzer analyzer)
Method Detail

getQuery

public Query getQuery(Element e)
               throws ParserException
Specified by:
getQuery in interface QueryBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LikeThisQueryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class LikeThisQueryBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.LikeThisQueryBuilder
All Implemented Interfaces:
QueryBuilder
public class LikeThisQueryBuilder
extends Object
implements QueryBuilder

Constructor Summary
LikeThisQueryBuilder(Analyzer analyzer, String[] defaultFieldNames)
Method Summary
 Query getQuery(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LikeThisQueryBuilder

public LikeThisQueryBuilder(Analyzer analyzer,
                            String[] defaultFieldNames)
Method Detail

getQuery

public Query getQuery(Element e)
               throws ParserException
Specified by:
getQuery in interface QueryBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MatchAllDocsQueryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class MatchAllDocsQueryBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.MatchAllDocsQueryBuilder
All Implemented Interfaces:
QueryBuilder
public class MatchAllDocsQueryBuilder
extends Object
implements QueryBuilder

Constructor Summary
MatchAllDocsQueryBuilder()
Method Summary
 Query getQuery(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MatchAllDocsQueryBuilder

public MatchAllDocsQueryBuilder()
Method Detail

getQuery

public Query getQuery(Element e)
               throws ParserException
Specified by:
getQuery in interface QueryBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericRangeFilterBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class NumericRangeFilterBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.NumericRangeFilterBuilder
All Implemented Interfaces:
FilterBuilder
public class NumericRangeFilterBuilder
extends Object
implements FilterBuilder

Creates a NumericRangeFilter. The table below specifies the required attributes and the defaults if optional attributes are omitted. For more detail on what each of the attributes actually do, consult the documentation for NumericRangeFilter:

Attribute name | Values | Required | Default
fieldName | String | Yes | N/A
lowerTerm | Specified by type | Yes | N/A
upperTerm | Specified by type | Yes | N/A
type | int, long, float, double | No | int
includeLower | true, false | No | true
includeUpper | true, false | No | true
precisionStep | Integer | No | 4

If an error occurs parsing the supplied lowerTerm or upperTerm into the numeric type specified by type, then the error will be silently ignored and the resulting filter will not match any documents.

Constructor Summary
NumericRangeFilterBuilder()
Method Summary
Filter | getFilter(Element e)
void | setStrictMode(boolean strictMode) Specifies how this NumericRangeFilterBuilder will handle errors.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NumericRangeFilterBuilder

public NumericRangeFilterBuilder()
Method Detail

setStrictMode

public void setStrictMode(boolean strictMode)
Specifies how this NumericRangeFilterBuilder will handle errors.

If this is set to true, getFilter(Element) will throw a ParserException if it is unable to parse the lowerTerm or upperTerm into the appropriate numeric type. If this is set to false, then this exception will be silently ignored and the resulting filter will not match any documents.

Defaults to false.

Parameters:
strictMode -

getFilter

public Filter getFilter(Element e)
                 throws ParserException
Specified by:
getFilter in interface FilterBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NumericRangeQueryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class NumericRangeQueryBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.NumericRangeQueryBuilder
All Implemented Interfaces:
QueryBuilder
public class NumericRangeQueryBuilder
extends Object
implements QueryBuilder

Creates a NumericRangeQuery. The table below specifies the required attributes and the defaults if optional attributes are omitted. For more detail on what each of the attributes actually do, consult the documentation for NumericRangeQuery:

Attribute name | Values | Required | Default
fieldName | String | Yes | N/A
lowerTerm | Specified by type | Yes | N/A
upperTerm | Specified by type | Yes | N/A
type | int, long, float, double | No | int
includeLower | true, false | No | true
includeUpper | true, false | No | true
precisionStep | Integer | No | 4

A ParserException will be thrown if an error occurs parsing the supplied lowerTerm or upperTerm into the numeric type specified by type.

Constructor Summary
NumericRangeQueryBuilder()
Method Summary
 Query getQuery(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NumericRangeQueryBuilder

public NumericRangeQueryBuilder()
Method Detail

getQuery

public Query getQuery(Element e)
               throws ParserException
Specified by:
getQuery in interface QueryBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.apache.lucene.xmlparser.builders
Interfaces
SpanQueryBuilder
Classes
BooleanFilterBuilder
BooleanQueryBuilder
BoostingQueryBuilder
BoostingTermBuilder
CachedFilterBuilder
ConstantScoreQueryBuilder
DuplicateFilterBuilder
FilteredQueryBuilder
FuzzyLikeThisQueryBuilder
LikeThisQueryBuilder
MatchAllDocsQueryBuilder
NumericRangeFilterBuilder
NumericRangeQueryBuilder
RangeFilterBuilder
SpanBuilderBase
SpanFirstBuilder
SpanNearBuilder
SpanNotBuilder
SpanOrBuilder
SpanOrTermsBuilder
SpanQueryBuilderFactory
SpanTermBuilder
TermQueryBuilder
TermsFilterBuilder
TermsQueryBuilder
UserInputQueryBuilder


org.apache.lucene.xmlparser.builders

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.apache.lucene.xmlparser.builders

Builders to support various Lucene queries.

See:
Description

Interface Summary
SpanQueryBuilder

Class Summary
BooleanFilterBuilder |
BooleanQueryBuilder |
BoostingQueryBuilder |
BoostingTermBuilder |
CachedFilterBuilder | Filters are cached in an LRU Cache keyed on the contained query or filter object.
ConstantScoreQueryBuilder |
DuplicateFilterBuilder |
FilteredQueryBuilder |
FuzzyLikeThisQueryBuilder |
LikeThisQueryBuilder |
MatchAllDocsQueryBuilder |
NumericRangeFilterBuilder | Creates a NumericRangeFilter.
NumericRangeQueryBuilder | Creates a NumericRangeQuery.
RangeFilterBuilder |
SpanBuilderBase |
SpanFirstBuilder |
SpanNearBuilder |
SpanNotBuilder |
SpanOrBuilder |
SpanOrTermsBuilder |
SpanQueryBuilderFactory |
SpanTermBuilder |
TermQueryBuilder |
TermsFilterBuilder |
TermsQueryBuilder | Builds a BooleanQuery from all of the terms found in the XML element using the choice of analyzer
UserInputQueryBuilder | UserInputQueryBuilder uses 1 of 2 strategies for thread-safe parsing: 1) Synchronizing access to "parse" calls on a previously supplied QueryParser or..

Package org.apache.lucene.xmlparser.builders Description

Builders to support various Lucene queries.


org.apache.lucene.xmlparser.builders Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.apache.lucene.xmlparser.builders

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.apache.lucene.xmlparser.builders.BooleanFilterBuilder (implements org.apache.lucene.xmlparser.FilterBuilder)
    • org.apache.lucene.xmlparser.builders.BooleanQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.xmlparser.builders.BoostingQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.xmlparser.builders.CachedFilterBuilder (implements org.apache.lucene.xmlparser.FilterBuilder)
    • org.apache.lucene.xmlparser.builders.ConstantScoreQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.xmlparser.builders.DuplicateFilterBuilder (implements org.apache.lucene.xmlparser.FilterBuilder)
    • org.apache.lucene.xmlparser.builders.FilteredQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.xmlparser.builders.FuzzyLikeThisQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.xmlparser.builders.LikeThisQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.xmlparser.builders.MatchAllDocsQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.xmlparser.builders.NumericRangeFilterBuilder (implements org.apache.lucene.xmlparser.FilterBuilder)
    • org.apache.lucene.xmlparser.builders.NumericRangeQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.xmlparser.builders.RangeFilterBuilder (implements org.apache.lucene.xmlparser.FilterBuilder)
    • org.apache.lucene.xmlparser.builders.SpanBuilderBase (implements org.apache.lucene.xmlparser.builders.SpanQueryBuilder)
      • org.apache.lucene.xmlparser.builders.BoostingTermBuilder
      • org.apache.lucene.xmlparser.builders.SpanFirstBuilder
      • org.apache.lucene.xmlparser.builders.SpanNearBuilder
      • org.apache.lucene.xmlparser.builders.SpanNotBuilder
      • org.apache.lucene.xmlparser.builders.SpanOrBuilder
      • org.apache.lucene.xmlparser.builders.SpanOrTermsBuilder
      • org.apache.lucene.xmlparser.builders.SpanTermBuilder
    • org.apache.lucene.xmlparser.builders.SpanQueryBuilderFactory (implements org.apache.lucene.xmlparser.builders.SpanQueryBuilder)
    • org.apache.lucene.xmlparser.builders.TermQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.xmlparser.builders.TermsFilterBuilder (implements org.apache.lucene.xmlparser.FilterBuilder)
    • org.apache.lucene.xmlparser.builders.TermsQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)
    • org.apache.lucene.xmlparser.builders.UserInputQueryBuilder (implements org.apache.lucene.xmlparser.QueryBuilder)

Interface Hierarchy

  • org.apache.lucene.xmlparser.QueryBuilder
    • org.apache.lucene.xmlparser.builders.SpanQueryBuilder


Uses of Package org.apache.lucene.xmlparser.builders

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.apache.lucene.xmlparser.builders

Packages that use org.apache.lucene.xmlparser.builders
org.apache.lucene.xmlparser.builders Builders to support various Lucene queries.

Classes in org.apache.lucene.xmlparser.builders used by org.apache.lucene.xmlparser.builders
SpanBuilderBase
SpanQueryBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


RangeFilterBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class RangeFilterBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.RangeFilterBuilder
All Implemented Interfaces:
FilterBuilder
public class RangeFilterBuilder
extends Object
implements FilterBuilder

Constructor Summary
RangeFilterBuilder()
Method Summary
 Filter getFilter(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RangeFilterBuilder

public RangeFilterBuilder()
Method Detail

getFilter

public Filter getFilter(Element e)
                 throws ParserException
Specified by:
getFilter in interface FilterBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanBuilderBase

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class SpanBuilderBase

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.SpanBuilderBase
All Implemented Interfaces:
SpanQueryBuilder, QueryBuilder
Direct Known Subclasses:
BoostingTermBuilder, SpanFirstBuilder, SpanNearBuilder, SpanNotBuilder, SpanOrBuilder, SpanOrTermsBuilder, SpanTermBuilder
public abstract class SpanBuilderBase
extends Object
implements SpanQueryBuilder

Constructor Summary
SpanBuilderBase()
Method Summary
 Query getQuery(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.xmlparser.builders.SpanQueryBuilder
getSpanQuery

Constructor Detail

SpanBuilderBase

public SpanBuilderBase()
Method Detail

getQuery

public Query getQuery(Element e)
               throws ParserException
Specified by:
getQuery in interface QueryBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanFirstBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class SpanFirstBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.SpanBuilderBase
        extended by  org.apache.lucene.xmlparser.builders.SpanFirstBuilder
All Implemented Interfaces:
SpanQueryBuilder, QueryBuilder
public class SpanFirstBuilder
extends SpanBuilderBase

Constructor Summary
SpanFirstBuilder(SpanQueryBuilder factory)
Method Summary
 SpanQuery getSpanQuery(Element e)
Methods inherited from class org.apache.lucene.xmlparser.builders.SpanBuilderBase
getQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanFirstBuilder

public SpanFirstBuilder(SpanQueryBuilder factory)
Method Detail

getSpanQuery

public SpanQuery getSpanQuery(Element e)
                       throws ParserException
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanNearBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class SpanNearBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.SpanBuilderBase
        extended by  org.apache.lucene.xmlparser.builders.SpanNearBuilder
All Implemented Interfaces:
SpanQueryBuilder, QueryBuilder
public class SpanNearBuilder
extends SpanBuilderBase

Constructor Summary
SpanNearBuilder(SpanQueryBuilder factory)
Method Summary
 SpanQuery getSpanQuery(Element e)
Methods inherited from class org.apache.lucene.xmlparser.builders.SpanBuilderBase
getQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanNearBuilder

public SpanNearBuilder(SpanQueryBuilder factory)
Method Detail

getSpanQuery

public SpanQuery getSpanQuery(Element e)
                       throws ParserException
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanNotBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class SpanNotBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.SpanBuilderBase
        extended by  org.apache.lucene.xmlparser.builders.SpanNotBuilder
All Implemented Interfaces:
SpanQueryBuilder, QueryBuilder
public class SpanNotBuilder
extends SpanBuilderBase

Constructor Summary
SpanNotBuilder(SpanQueryBuilder factory)
Method Summary
 SpanQuery getSpanQuery(Element e)
Methods inherited from class org.apache.lucene.xmlparser.builders.SpanBuilderBase
getQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanNotBuilder

public SpanNotBuilder(SpanQueryBuilder factory)
Parameters:
factory -
Method Detail

getSpanQuery

public SpanQuery getSpanQuery(Element e)
                       throws ParserException
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanOrBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class SpanOrBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.SpanBuilderBase
        extended by  org.apache.lucene.xmlparser.builders.SpanOrBuilder
All Implemented Interfaces:
SpanQueryBuilder, QueryBuilder
public class SpanOrBuilder
extends SpanBuilderBase

Constructor Summary
SpanOrBuilder(SpanQueryBuilder factory)
Method Summary
 SpanQuery getSpanQuery(Element e)
Methods inherited from class org.apache.lucene.xmlparser.builders.SpanBuilderBase
getQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanOrBuilder

public SpanOrBuilder(SpanQueryBuilder factory)
Method Detail

getSpanQuery

public SpanQuery getSpanQuery(Element e)
                       throws ParserException
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanOrTermsBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class SpanOrTermsBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.SpanBuilderBase
        extended by  org.apache.lucene.xmlparser.builders.SpanOrTermsBuilder
All Implemented Interfaces:
SpanQueryBuilder, QueryBuilder
public class SpanOrTermsBuilder
extends SpanBuilderBase

Constructor Summary
SpanOrTermsBuilder(Analyzer analyzer)
Method Summary
 SpanQuery getSpanQuery(Element e)
Methods inherited from class org.apache.lucene.xmlparser.builders.SpanBuilderBase
getQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanOrTermsBuilder

public SpanOrTermsBuilder(Analyzer analyzer)
Parameters:
analyzer -
Method Detail

getSpanQuery

public SpanQuery getSpanQuery(Element e)
                       throws ParserException
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanQueryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Interface SpanQueryBuilder

All Superinterfaces:
QueryBuilder
All Known Implementing Classes:
BoostingTermBuilder, SpanBuilderBase, SpanFirstBuilder, SpanNearBuilder, SpanNotBuilder, SpanOrBuilder, SpanOrTermsBuilder, SpanQueryBuilderFactory, SpanTermBuilder
public interface SpanQueryBuilder
extends QueryBuilder

Method Summary
 SpanQuery getSpanQuery(Element e)
Methods inherited from interface org.apache.lucene.xmlparser.QueryBuilder
getQuery

Method Detail

getSpanQuery

SpanQuery getSpanQuery(Element e)
                       throws ParserException
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanQueryBuilderFactory

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class SpanQueryBuilderFactory

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.SpanQueryBuilderFactory
All Implemented Interfaces:
SpanQueryBuilder, QueryBuilder
public class SpanQueryBuilderFactory
extends Object
implements SpanQueryBuilder

Constructor Summary
SpanQueryBuilderFactory()
Method Summary
void | addBuilder(String nodeName, SpanQueryBuilder builder)
Query | getQuery(Element e)
SpanQuery | getSpanQuery(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanQueryBuilderFactory

public SpanQueryBuilderFactory()
Method Detail

getQuery

public Query getQuery(Element e)
               throws ParserException
Specified by:
getQuery in interface QueryBuilder
Throws:
ParserException

addBuilder

public void addBuilder(String nodeName,
                       SpanQueryBuilder builder)

getSpanQuery

public SpanQuery getSpanQuery(Element e)
                       throws ParserException
Specified by:
getSpanQuery in interface SpanQueryBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanTermBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class SpanTermBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.SpanBuilderBase
        extended by  org.apache.lucene.xmlparser.builders.SpanTermBuilder
All Implemented Interfaces:
SpanQueryBuilder, QueryBuilder
public class SpanTermBuilder
extends SpanBuilderBase

Constructor Summary
SpanTermBuilder()
Method Summary
 SpanQuery getSpanQuery(Element e)
Methods inherited from class org.apache.lucene.xmlparser.builders.SpanBuilderBase
getQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanTermBuilder

public SpanTermBuilder()
Method Detail

getSpanQuery

public SpanQuery getSpanQuery(Element e)
                       throws ParserException
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermQueryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class TermQueryBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.TermQueryBuilder
All Implemented Interfaces:
QueryBuilder
public class TermQueryBuilder
extends Object
implements QueryBuilder

Constructor Summary
TermQueryBuilder()
Method Summary
 Query getQuery(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TermQueryBuilder

public TermQueryBuilder()
Method Detail

getQuery

public Query getQuery(Element e)
               throws ParserException
Specified by:
getQuery in interface QueryBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermsFilterBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class TermsFilterBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.TermsFilterBuilder
All Implemented Interfaces:
FilterBuilder
public class TermsFilterBuilder
extends Object
implements FilterBuilder

Constructor Summary
TermsFilterBuilder(Analyzer analyzer)
Method Summary
 Filter getFilter(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TermsFilterBuilder

public TermsFilterBuilder(Analyzer analyzer)
Parameters:
analyzer -
Method Detail

getFilter

public Filter getFilter(Element e)
                 throws ParserException
Specified by:
getFilter in interface FilterBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TermsQueryBuilder

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class TermsQueryBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.TermsQueryBuilder
All Implemented Interfaces:
QueryBuilder
public class TermsQueryBuilder
extends Object
implements QueryBuilder

Builds a BooleanQuery from all of the terms found in the XML element using the choice of analyzer

Constructor Summary
TermsQueryBuilder(Analyzer analyzer)
Method Summary
 Query getQuery(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TermsQueryBuilder

public TermsQueryBuilder(Analyzer analyzer)
Method Detail

getQuery

public Query getQuery(Element e)
               throws ParserException
Specified by:
getQuery in interface QueryBuilder
Throws:
ParserException
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


UserInputQueryBuilder

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.apache.lucene.xmlparser.builders
Class UserInputQueryBuilder

java.lang.Object
    extended by  org.apache.lucene.xmlparser.builders.UserInputQueryBuilder
All Implemented Interfaces:
QueryBuilder
public class UserInputQueryBuilder
extends Object
implements QueryBuilder

UserInputQueryBuilder uses 1 of 2 strategies for thread-safe parsing: 1) Synchronizing access to "parse" calls on a previously supplied QueryParser or.. 2) creating a new QueryParser object for each parse request

Constructor Summary
UserInputQueryBuilder(QueryParser parser)
This constructor has the disadvantage of not being able to change choice of default field name
UserInputQueryBuilder(String defaultField, Analyzer analyzer)
Method Summary
protected QueryParser | createQueryParser(String fieldName, Analyzer analyzer) Method to create a QueryParser - designed to be overridden
Query | getQuery(Element e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

UserInputQueryBuilder

public UserInputQueryBuilder(QueryParser parser)
This constructor has the disadvantage of not being able to change choice of default field name

Parameters:
parser - thread un-safe query parser

UserInputQueryBuilder

public UserInputQueryBuilder(String defaultField,
                             Analyzer analyzer)
Method Detail

getQuery

public Query getQuery(Element e)
               throws ParserException
Specified by:
getQuery in interface QueryBuilder
Throws:
ParserException

createQueryParser

protected QueryParser createQueryParser(String fieldName,
                                        Analyzer analyzer)
Method to create a QueryParser - designed to be overridden

Parameters:
fieldName -
analyzer -
Returns:
QueryParser
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.apache.lucene.xmlparser.builders.BooleanFilterBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.BooleanFilterBuilder

No usage of org.apache.lucene.xmlparser.builders.BooleanFilterBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.BooleanQueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.BooleanQueryBuilder

No usage of org.apache.lucene.xmlparser.builders.BooleanQueryBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.BoostingQueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.BoostingQueryBuilder

No usage of org.apache.lucene.xmlparser.builders.BoostingQueryBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.BoostingTermBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.BoostingTermBuilder

No usage of org.apache.lucene.xmlparser.builders.BoostingTermBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.CachedFilterBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.CachedFilterBuilder

No usage of org.apache.lucene.xmlparser.builders.CachedFilterBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.ConstantScoreQueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.ConstantScoreQueryBuilder

No usage of org.apache.lucene.xmlparser.builders.ConstantScoreQueryBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.DuplicateFilterBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.DuplicateFilterBuilder

No usage of org.apache.lucene.xmlparser.builders.DuplicateFilterBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.FilteredQueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.FilteredQueryBuilder

No usage of org.apache.lucene.xmlparser.builders.FilteredQueryBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.FuzzyLikeThisQueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.FuzzyLikeThisQueryBuilder

No usage of org.apache.lucene.xmlparser.builders.FuzzyLikeThisQueryBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.LikeThisQueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.LikeThisQueryBuilder

No usage of org.apache.lucene.xmlparser.builders.LikeThisQueryBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.MatchAllDocsQueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.MatchAllDocsQueryBuilder

No usage of org.apache.lucene.xmlparser.builders.MatchAllDocsQueryBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.NumericRangeFilterBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.NumericRangeFilterBuilder

No usage of org.apache.lucene.xmlparser.builders.NumericRangeFilterBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.NumericRangeQueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.NumericRangeQueryBuilder

No usage of org.apache.lucene.xmlparser.builders.NumericRangeQueryBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.RangeFilterBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.RangeFilterBuilder

No usage of org.apache.lucene.xmlparser.builders.RangeFilterBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.SpanBuilderBase

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.SpanBuilderBase

Packages that use SpanBuilderBase
org.apache.lucene.xmlparser.builders Builders to support various Lucene queries.

Uses of SpanBuilderBase in org.apache.lucene.xmlparser.builders

Subclasses of SpanBuilderBase in org.apache.lucene.xmlparser.builders
class | BoostingTermBuilder
class | SpanFirstBuilder
class | SpanNearBuilder
class | SpanNotBuilder
class | SpanOrBuilder
class | SpanOrTermsBuilder
class | SpanTermBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.SpanFirstBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.SpanFirstBuilder

No usage of org.apache.lucene.xmlparser.builders.SpanFirstBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.SpanNearBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.SpanNearBuilder

No usage of org.apache.lucene.xmlparser.builders.SpanNearBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.SpanNotBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.SpanNotBuilder

No usage of org.apache.lucene.xmlparser.builders.SpanNotBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.SpanOrBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.SpanOrBuilder

No usage of org.apache.lucene.xmlparser.builders.SpanOrBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.SpanOrTermsBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.SpanOrTermsBuilder

No usage of org.apache.lucene.xmlparser.builders.SpanOrTermsBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.xmlparser.builders.SpanQueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.xmlparser.builders.SpanQueryBuilder

Packages that use SpanQueryBuilder
org.apache.lucene.xmlparser.builders Builders to support various Lucene queries.

Uses of SpanQueryBuilder in org.apache.lucene.xmlparser.builders

Classes in org.apache.lucene.xmlparser.builders that implement SpanQueryBuilder
class | BoostingTermBuilder
class | SpanBuilderBase
class | SpanFirstBuilder
class | SpanNearBuilder
class | SpanNotBuilder
class | SpanOrBuilder
class | SpanOrTermsBuilder
class | SpanQueryBuilderFactory
class | SpanTermBuilder

Methods in org.apache.lucene.xmlparser.builders with parameters of type SpanQueryBuilder
 void SpanQueryBuilderFactory.addBuilder(String nodeName, SpanQueryBuilder builder)

Constructors in org.apache.lucene.xmlparser.builders with parameters of type SpanQueryBuilder
SpanFirstBuilder(SpanQueryBuilder factory)
SpanNearBuilder(SpanQueryBuilder factory)
SpanNotBuilder(SpanQueryBuilder factory)
SpanOrBuilder(SpanQueryBuilder factory)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.SpanQueryBuilderFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.SpanQueryBuilderFactory

No usage of org.apache.lucene.xmlparser.builders.SpanQueryBuilderFactory

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.SpanTermBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.SpanTermBuilder

No usage of org.apache.lucene.xmlparser.builders.SpanTermBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.TermQueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.TermQueryBuilder

No usage of org.apache.lucene.xmlparser.builders.TermQueryBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.TermsFilterBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.TermsFilterBuilder

No usage of org.apache.lucene.xmlparser.builders.TermsFilterBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.TermsQueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.TermsQueryBuilder

No usage of org.apache.lucene.xmlparser.builders.TermsQueryBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.builders.UserInputQueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.builders.UserInputQueryBuilder

No usage of org.apache.lucene.xmlparser.builders.UserInputQueryBuilder

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.CoreParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.CoreParser

Packages that use CoreParser
org.apache.lucene.xmlparser Parser that produces Lucene Query objects from XML streams.

Uses of CoreParser in org.apache.lucene.xmlparser

Subclasses of CoreParser in org.apache.lucene.xmlparser
 class CorePlusExtensionsParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.CorePlusExtensionsParser

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.CorePlusExtensionsParser

No usage of org.apache.lucene.xmlparser.CorePlusExtensionsParser

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.DOMUtils

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.DOMUtils

No usage of org.apache.lucene.xmlparser.DOMUtils

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.xmlparser.FilterBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.xmlparser.FilterBuilder

Packages that use FilterBuilder
org.apache.lucene.xmlparser | Parser that produces Lucene Query objects from XML streams.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Uses of FilterBuilder in org.apache.lucene.xmlparser

Classes in org.apache.lucene.xmlparser that implement FilterBuilder
 class FilterBuilderFactory

Methods in org.apache.lucene.xmlparser that return FilterBuilder
 FilterBuilder FilterBuilderFactory.getFilterBuilder(String nodeName)

Methods in org.apache.lucene.xmlparser with parameters of type FilterBuilder
void | FilterBuilderFactory.addBuilder(String nodeName, FilterBuilder builder)
void | CoreParser.addFilterBuilder(String nodeName, FilterBuilder builder)

Uses of FilterBuilder in org.apache.lucene.xmlparser.builders

Classes in org.apache.lucene.xmlparser.builders that implement FilterBuilder
class | BooleanFilterBuilder
class | CachedFilterBuilder Filters are cached in an LRU Cache keyed on the contained query or filter object.
class | DuplicateFilterBuilder
class | NumericRangeFilterBuilder Creates a NumericRangeFilter.
class | RangeFilterBuilder
class | TermsFilterBuilder

Constructors in org.apache.lucene.xmlparser.builders with parameters of type FilterBuilder
BooleanFilterBuilder(FilterBuilder factory)
FilteredQueryBuilder(FilterBuilder filterFactory, QueryBuilder queryFactory)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.FilterBuilderFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.FilterBuilderFactory

Packages that use FilterBuilderFactory
org.apache.lucene.xmlparser | Parser that produces Lucene Query objects from XML streams.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Uses of FilterBuilderFactory in org.apache.lucene.xmlparser

Fields in org.apache.lucene.xmlparser declared as FilterBuilderFactory
protected  FilterBuilderFactory CoreParser.filterFactory

Uses of FilterBuilderFactory in org.apache.lucene.xmlparser.builders

Constructors in org.apache.lucene.xmlparser.builders with parameters of type FilterBuilderFactory
CachedFilterBuilder(QueryBuilderFactory queryFactory, FilterBuilderFactory filterFactory, int cacheSize)
ConstantScoreQueryBuilder(FilterBuilderFactory filterFactory)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.ParserException

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.ParserException

Packages that use ParserException
org.apache.lucene.xmlparser | Parser that produces Lucene Query objects from XML streams.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Uses of ParserException in org.apache.lucene.xmlparser

Methods in org.apache.lucene.xmlparser that throw ParserException
static String | DOMUtils.getAttributeOrFail(Element e, String name)
static String | DOMUtils.getAttributeWithInheritanceOrFail(Element e, String name)
static Element | DOMUtils.getChildByTagOrFail(Element e, String name)
Filter | FilterBuilderFactory.getFilter(Element n)
Filter | FilterBuilder.getFilter(Element e)
static Element | DOMUtils.getFirstChildOrFail(Element e)
static String | DOMUtils.getNonBlankTextOrFail(Element e)
Query | QueryBuilder.getQuery(Element e)
Query | QueryBuilderFactory.getQuery(Element n)
Query | CoreParser.getQuery(Element e)
Query | CoreParser.parse(InputStream xmlStream)

Uses of ParserException in org.apache.lucene.xmlparser.builders

Methods in org.apache.lucene.xmlparser.builders that throw ParserException
Filter | TermsFilterBuilder.getFilter(Element e)
Filter | BooleanFilterBuilder.getFilter(Element e)
Filter | CachedFilterBuilder.getFilter(Element e)
Filter | RangeFilterBuilder.getFilter(Element e)
Filter | NumericRangeFilterBuilder.getFilter(Element e)
Filter | DuplicateFilterBuilder.getFilter(Element e)
Query | NumericRangeQueryBuilder.getQuery(Element e)
Query | BoostingQueryBuilder.getQuery(Element e)
Query | TermsQueryBuilder.getQuery(Element e)
Query | ConstantScoreQueryBuilder.getQuery(Element e)
Query | FuzzyLikeThisQueryBuilder.getQuery(Element e)
Query | BooleanQueryBuilder.getQuery(Element e)
Query | SpanBuilderBase.getQuery(Element e)
Query | UserInputQueryBuilder.getQuery(Element e)
Query | TermQueryBuilder.getQuery(Element e)
Query | LikeThisQueryBuilder.getQuery(Element e)
Query | MatchAllDocsQueryBuilder.getQuery(Element e)
Query | FilteredQueryBuilder.getQuery(Element e)
Query | SpanQueryBuilderFactory.getQuery(Element e)
SpanQuery | SpanNotBuilder.getSpanQuery(Element e)
SpanQuery | BoostingTermBuilder.getSpanQuery(Element e)
SpanQuery | SpanTermBuilder.getSpanQuery(Element e)
SpanQuery | SpanQueryBuilder.getSpanQuery(Element e)
SpanQuery | SpanOrTermsBuilder.getSpanQuery(Element e)
SpanQuery | SpanOrBuilder.getSpanQuery(Element e)
SpanQuery | SpanNearBuilder.getSpanQuery(Element e)
SpanQuery | SpanFirstBuilder.getSpanQuery(Element e)
SpanQuery | SpanQueryBuilderFactory.getSpanQuery(Element e)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Interface org.apache.lucene.xmlparser.QueryBuilder

PREV NEXT FRAMES NO FRAMES

Uses of Interface
org.apache.lucene.xmlparser.QueryBuilder

Packages that use QueryBuilder
org.apache.lucene.xmlparser | Parser that produces Lucene Query objects from XML streams.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Uses of QueryBuilder in org.apache.lucene.xmlparser

Classes in org.apache.lucene.xmlparser that implement QueryBuilder
class | CoreParser Assembles a QueryBuilder which uses only core Lucene Query objects
class | CorePlusExtensionsParser
class | QueryBuilderFactory

Methods in org.apache.lucene.xmlparser that return QueryBuilder
 QueryBuilder QueryBuilderFactory.getQueryBuilder(String nodeName)

Methods in org.apache.lucene.xmlparser with parameters of type QueryBuilder
void | QueryBuilderFactory.addBuilder(String nodeName, QueryBuilder builder)
void | CoreParser.addQueryBuilder(String nodeName, QueryBuilder builder)

Uses of QueryBuilder in org.apache.lucene.xmlparser.builders

Subinterfaces of QueryBuilder in org.apache.lucene.xmlparser.builders
 interface SpanQueryBuilder

Classes in org.apache.lucene.xmlparser.builders that implement QueryBuilder
class | BooleanQueryBuilder
class | BoostingQueryBuilder
class | BoostingTermBuilder
class | ConstantScoreQueryBuilder
class | FilteredQueryBuilder
class | FuzzyLikeThisQueryBuilder
class | LikeThisQueryBuilder
class | MatchAllDocsQueryBuilder
class | NumericRangeQueryBuilder Creates a NumericRangeQuery.
class | SpanBuilderBase
class | SpanFirstBuilder
class | SpanNearBuilder
class | SpanNotBuilder
class | SpanOrBuilder
class | SpanOrTermsBuilder
class | SpanQueryBuilderFactory
class | SpanTermBuilder
class | TermQueryBuilder
class | TermsQueryBuilder Builds a BooleanQuery from all of the terms found in the XML element using the choice of analyzer
class | UserInputQueryBuilder UserInputQueryBuilder uses 1 of 2 strategies for thread-safe parsing: 1) Synchronizing access to "parse" calls on a previously supplied QueryParser or..

Constructors in org.apache.lucene.xmlparser.builders with parameters of type QueryBuilder
BooleanQueryBuilder(QueryBuilder factory)
BoostingQueryBuilder(QueryBuilder factory)
FilteredQueryBuilder(FilterBuilder filterFactory, QueryBuilder queryFactory)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.QueryBuilderFactory

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.QueryBuilderFactory

Packages that use QueryBuilderFactory
org.apache.lucene.xmlparser | Parser that produces Lucene Query objects from XML streams.
org.apache.lucene.xmlparser.builders | Builders to support various Lucene queries.

Uses of QueryBuilderFactory in org.apache.lucene.xmlparser

Fields in org.apache.lucene.xmlparser declared as QueryBuilderFactory
protected  QueryBuilderFactory CoreParser.queryFactory

Uses of QueryBuilderFactory in org.apache.lucene.xmlparser.builders

Constructors in org.apache.lucene.xmlparser.builders with parameters of type QueryBuilderFactory
CachedFilterBuilder(QueryBuilderFactory queryFactory, FilterBuilderFactory filterFactory, int cacheSize)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.apache.lucene.xmlparser.QueryTemplateManager

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.apache.lucene.xmlparser.QueryTemplateManager

No usage of org.apache.lucene.xmlparser.QueryTemplateManager

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Compile

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.egothor.stemmer
Class Compile

java.lang.Object
    extended by  org.egothor.stemmer.Compile

public class Compile
extends Object

The Compile class is used to compile a stemmer table.

Constructor Summary
Compile()
Method Summary
static void main(String[] args)
Entry point to the Compile application.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Compile

public Compile()
Method Detail

main

public static void main(String[] args)
Entry point to the Compile application.

This program takes any number of arguments: the first is the name of the desired stemming algorithm to use (a list is available in the package description) , all of the rest should be the path or paths to a file or files containing a stemmer table to compile.

Parameters:
args - the command line arguments
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Diff

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.egothor.stemmer
Class Diff

java.lang.Object
    extended by  org.egothor.stemmer.Diff

public class Diff
extends Object

The Diff object generates a patch string.

A patch string is actually a command to a stemmer telling it how to reduce a word to its root. For example, to reduce the word teacher to its root teach the patch string Db would be generated. This command tells the stemmer to delete the last 2 characters from the word teacher to reach the stem (the patch commands are applied starting from the last character in order to save

Constructor Summary
Diff()
Constructor for the Diff object.
Diff(int ins, int del, int rep, int noop)
Constructor for the Diff object
Method Summary
static void | apply(StringBuilder dest, CharSequence diff) Apply the given patch string diff to the given string dest.
String | exec(String a, String b) Construct a patch string that transforms a to b.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Diff

public Diff()
Constructor for the Diff object.

Diff

public Diff(int ins,
            int del,
            int rep,
            int noop)
Constructor for the Diff object

Parameters:
ins - Description of the Parameter
del - Description of the Parameter
rep - Description of the Parameter
noop - Description of the Parameter
Method Detail

apply

public static void apply(StringBuilder dest,
                         CharSequence diff)
Apply the given patch string diff to the given string dest.

Parameters:
dest - Destination string
diff - Patch string

exec

public String exec(String a,
                   String b)
Construct a patch string that transforms a to b.

Parameters:
a - String 1st string
b - String 2nd string
Returns:
String
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DiffIt

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.egothor.stemmer
Class DiffIt

java.lang.Object
    extended by  org.egothor.stemmer.DiffIt

public class DiffIt
extends Object

The DiffIt class is a means generate patch commands from an already prepared stemmer table.

Constructor Summary
DiffIt()
Method Summary
static void main(String[] args)
Entry point to the DiffIt application.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DiffIt

public DiffIt()
Method Detail

main

public static void main(String[] args)
Entry point to the DiffIt application.

This application takes one argument, the path to a file containing a stemmer table. The program reads the file and generates the patch commands for the stems.

Parameters:
args - the path to a file containing a stemmer table
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Gener

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.egothor.stemmer
Class Gener

java.lang.Object
    extended by  org.egothor.stemmer.Reduce
        extended by  org.egothor.stemmer.Gener

public class Gener
extends Reduce

The Gener object helps in the discarding of nodes which break the reduction effort and defend the structure against large reductions.

Constructor Summary
Gener()
Constructor for the Gener object.
Method Summary
boolean | eat(Row in, int[] remap) Test whether the given Row of Cells in a Trie should be included in an optimized Trie.
Trie | optimize(Trie orig) Return a Trie with infrequent values occurring in the given Trie removed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Gener

public Gener()
Constructor for the Gener object.

Method Detail

optimize

public Trie optimize(Trie orig)
Return a Trie with infrequent values occurring in the given Trie removed.

Overrides:
optimize in class Reduce
Parameters:
orig - the Trie to optimize
Returns:
a new optimized Trie

eat

public boolean eat(Row in,
                   int[] remap)
Test whether the given Row of Cells in a Trie should be included in an optimized Trie.

Parameters:
in - the Row to test
remap - Description of the Parameter
Returns:
true if the Row should remain, false otherwise
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Lift

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.egothor.stemmer
Class Lift

java.lang.Object
    extended by  org.egothor.stemmer.Reduce
        extended by  org.egothor.stemmer.Lift

public class Lift
extends Reduce

The Lift class is a data structure that is a variation of a Patricia trie.

Lift's raison d'etre is to implement reduction of the trie via the Lift-Up method., which makes the data structure less liable to overstemming.

Constructor Summary
Lift(boolean changeSkip)
Constructor for the Lift object.
Method Summary
void | liftUp(Row in, List<Row> nodes) Reduce the trie using Lift-Up reduction.
Trie | optimize(Trie orig) Optimize (eliminate rows with no content) the given Trie and return the reduced Trie.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Lift

public Lift(boolean changeSkip)
Constructor for the Lift object.

Parameters:
changeSkip - when set to true, comparison of two Cells takes a skip command into account
Method Detail

optimize

public Trie optimize(Trie orig)
Optimize (eliminate rows with no content) the given Trie and return the reduced Trie.

Overrides:
optimize in class Reduce
Parameters:
orig - the Trie to optimized
Returns:
the reduced Trie

liftUp

public void liftUp(Row in,
                   List<Row> nodes)
Reduce the trie using Lift-Up reduction.

The Lift-Up reduction propagates all leaf-values (patch commands), where possible, to higher levels which are closer to the root of the trie.

Parameters:
in - the Row to consider when optimizing
nodes - contains the patch commands
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTrie

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.egothor.stemmer
Class MultiTrie

java.lang.Object
    extended by  org.egothor.stemmer.Trie
        extended by  org.egothor.stemmer.MultiTrie
Direct Known Subclasses:
MultiTrie2
public class MultiTrie
extends Trie

The MultiTrie is a Trie of Tries. It stores words and their associated patch commands. The MultiTrie handles patch commmands individually (each command by itself).

Constructor Summary
MultiTrie(boolean forward)
Constructor for the MultiTrie object
MultiTrie(DataInput is)
Constructor for the MultiTrie object.
Method Summary
void | add(CharSequence key, CharSequence cmd) Add an element to this structure consisting of the given key and patch command.
CharSequence | getFully(CharSequence key) Return the element that is stored in a cell associated with the given key.
CharSequence | getLastOnPath(CharSequence key) Return the element that is stored as last on a path belonging to the given key.
void | printInfo(CharSequence prefix) Print the given prefix and the position(s) in the Trie where it appears.
Trie | reduce(Reduce by) Remove empty rows from the given Trie and return the newly reduced Trie.
void | store(DataOutput os) Write this data structure to the given output stream.
Methods inherited from class org.egothor.stemmer.Trie
getAll, getCells, getCellsPnt, getCellsVal
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MultiTrie

public MultiTrie(DataInput is)
          throws IOException
Constructor for the MultiTrie object.

Parameters:
is - the input stream
Throws:
IOException - if an I/O error occurs

MultiTrie

public MultiTrie(boolean forward)
Constructor for the MultiTrie object

Parameters:
forward - set to true if the elements should be read left to right
Method Detail

getFully

public CharSequence getFully(CharSequence key)
Return the element that is stored in a cell associated with the given key.

Overrides:
getFully in class Trie
Parameters:
key - the key to the cell holding the desired element
Returns:
the element

getLastOnPath

public CharSequence getLastOnPath(CharSequence key)
Return the element that is stored as last on a path belonging to the given key.

Overrides:
getLastOnPath in class Trie
Parameters:
key - the key associated with the desired element
Returns:
the element that is stored as last on a path

store

public void store(DataOutput os)
           throws IOException
Write this data structure to the given output stream.

Overrides:
store in class Trie
Parameters:
os - the output stream
Throws:
IOException - if an I/O error occurs

add

public void add(CharSequence key,
                CharSequence cmd)
Add an element to this structure consisting of the given key and patch command.

This method will return without executing if the cmd parameter's length is 0.

Overrides:
add in class Trie
Parameters:
key - the key
cmd - the patch command

reduce

public Trie reduce(Reduce by)
Remove empty rows from the given Trie and return the newly reduced Trie.

Overrides:
reduce in class Trie
Parameters:
by - the Trie to reduce
Returns:
the newly reduced Trie

printInfo

public void printInfo(CharSequence prefix)
Print the given prefix and the position(s) in the Trie where it appears.

Overrides:
printInfo in class Trie
Parameters:
prefix - the desired prefix
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


MultiTrie2

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.egothor.stemmer
Class MultiTrie2

java.lang.Object
    extended by  org.egothor.stemmer.Trie
        extended by  org.egothor.stemmer.MultiTrie
            extended by  org.egothor.stemmer.MultiTrie2

public class MultiTrie2
extends MultiTrie

The MultiTrie is a Trie of Tries.

It stores words and their associated patch commands. The MultiTrie handles patch commmands broken into their constituent parts, as a MultiTrie does, but the commands are delimited by the skip command.

Constructor Summary
MultiTrie2(boolean forward)
Constructor for the MultiTrie2 object
MultiTrie2(DataInput is)
Constructor for the MultiTrie object.
Method Summary
void | add(CharSequence key, CharSequence cmd) Add an element to this structure consisting of the given key and patch command.
CharSequence[] | decompose(CharSequence cmd) Break the given patch command into its constituent pieces.
CharSequence | getFully(CharSequence key) Return the element that is stored in a cell associated with the given key.
CharSequence | getLastOnPath(CharSequence key) Return the element that is stored as last on a path belonging to the given key.
Trie | reduce(Reduce by) Remove empty rows from the given Trie and return the newly reduced Trie.
void | store(DataOutput os) Write this data structure to the given output stream.
Methods inherited from class org.egothor.stemmer.MultiTrie
printInfo
Methods inherited from class org.egothor.stemmer.Trie
getAll, getCells, getCellsPnt, getCellsVal
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

MultiTrie2

public MultiTrie2(DataInput is)
           throws IOException
Constructor for the MultiTrie object.

Parameters:
is - the input stream
Throws:
IOException - if an I/O error occurs

MultiTrie2

public MultiTrie2(boolean forward)
Constructor for the MultiTrie2 object

Parameters:
forward - set to true if the elements should be read left to right
Method Detail

getFully

public CharSequence getFully(CharSequence key)
Return the element that is stored in a cell associated with the given key.

Overrides:
getFully in class MultiTrie
Parameters:
key - the key to the cell holding the desired element
Returns:
the element

getLastOnPath

public CharSequence getLastOnPath(CharSequence key)
Return the element that is stored as last on a path belonging to the given key.

Overrides:
getLastOnPath in class MultiTrie
Parameters:
key - the key associated with the desired element
Returns:
the element that is stored as last on a path

store

public void store(DataOutput os)
           throws IOException
Write this data structure to the given output stream.

Overrides:
store in class MultiTrie
Parameters:
os - the output stream
Throws:
IOException - if an I/O error occurs

add

public void add(CharSequence key,
                CharSequence cmd)
Add an element to this structure consisting of the given key and patch command.

This method will return without executing if the cmd parameter's length is 0.

Overrides:
add in class MultiTrie
Parameters:
key - the key
cmd - the patch command

decompose

public CharSequence[] decompose(CharSequence cmd)
Break the given patch command into its constituent pieces. The pieces are delimited by NOOP commands.

Parameters:
cmd - the patch command
Returns:
an array containing the pieces of the command

reduce

public Trie reduce(Reduce by)
Remove empty rows from the given Trie and return the newly reduced Trie.

Overrides:
reduce in class MultiTrie
Parameters:
by - the Trie to reduce
Returns:
the newly reduced Trie
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Optimizer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.egothor.stemmer
Class Optimizer

java.lang.Object
    extended by  org.egothor.stemmer.Reduce
        extended by  org.egothor.stemmer.Optimizer
Direct Known Subclasses:
Optimizer2
public class Optimizer
extends Reduce

The Optimizer class is a Trie that will be reduced (have empty rows removed).

The reduction will be made by joining two rows where the first is a subset of the second.

Constructor Summary
Optimizer()
Constructor for the Optimizer object.
Method Summary
org.egothor.stemmer.Cell | merge(org.egothor.stemmer.Cell m, org.egothor.stemmer.Cell e) Merge the given Cells and return the resulting Cell.
Row | merge(Row master, Row existing) Merge the given rows and return the resulting Row.
Trie | optimize(Trie orig) Optimize (remove empty rows) from the given Trie and return the resulting Trie.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Optimizer

public Optimizer()
Constructor for the Optimizer object.

Method Detail

optimize

public Trie optimize(Trie orig)
Optimize (remove empty rows) from the given Trie and return the resulting Trie.

Overrides:
optimize in class Reduce
Parameters:
orig - the Trie to consolidate
Returns:
the newly consolidated Trie

merge

public Row merge(Row master,
                 Row existing)
Merge the given rows and return the resulting Row.

Parameters:
master - the master Row
existing - the existing Row
Returns:
the resulting Row, or null if the operation cannot be realized

merge

public org.egothor.stemmer.Cell merge(org.egothor.stemmer.Cell m,
                                      org.egothor.stemmer.Cell e)
Merge the given Cells and return the resulting Cell.

Parameters:
m - the master Cell
e - the existing Cell
Returns:
the resulting Cell, or null if the operation cannot be realized
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Optimizer2

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.egothor.stemmer
Class Optimizer2

java.lang.Object
    extended by  org.egothor.stemmer.Reduce
        extended by  org.egothor.stemmer.Optimizer
            extended by  org.egothor.stemmer.Optimizer2

public class Optimizer2
extends Optimizer

The Optimizer class is a Trie that will be reduced (have empty rows removed).

This is the result of allowing a joining of rows when there is no collision between non-null values in the rows. Information loss, resulting in the stemmer not being able to recognize words (as in Optimizer), is curtailed, allowing the stemmer to recognize words for which the original trie was built. Use of this class allows the stemmer to be self-teaching.

Constructor Summary
Optimizer2()
Constructor for the Optimizer2 object.
Method Summary
 org.egothor.stemmer.Cell merge(org.egothor.stemmer.Cell m, org.egothor.stemmer.Cell e)
Merge the given Cells and return the resulting Cell.
Methods inherited from class org.egothor.stemmer.Optimizer
merge, optimize
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Optimizer2

public Optimizer2()
Constructor for the Optimizer2 object.

Method Detail

merge

public org.egothor.stemmer.Cell merge(org.egothor.stemmer.Cell m,
                                      org.egothor.stemmer.Cell e)
Merge the given Cells and return the resulting Cell.

Overrides:
merge in class Optimizer
Parameters:
m - the master Cell
e - the existing Cell
Returns:
the resulting Cell, or null if the operation cannot be realized
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.egothor.stemmer
Classes
Compile
Diff
DiffIt
Gener
Lift
MultiTrie
MultiTrie2
Optimizer
Optimizer2
Reduce
Row
Trie


org.egothor.stemmer

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.egothor.stemmer

Egothor stemmer API.

See:
Description

Class Summary
Compile | The Compile class is used to compile a stemmer table.
Diff | The Diff object generates a patch string.
DiffIt | The DiffIt class is a means generate patch commands from an already prepared stemmer table.
Gener | The Gener object helps in the discarding of nodes which break the reduction effort and defend the structure against large reductions.
Lift | The Lift class is a data structure that is a variation of a Patricia trie.
MultiTrie | The MultiTrie is a Trie of Tries.
MultiTrie2 | The MultiTrie is a Trie of Tries.
Optimizer | The Optimizer class is a Trie that will be reduced (have empty rows removed).
Optimizer2 | The Optimizer class is a Trie that will be reduced (have empty rows removed).
Reduce | The Reduce object is used to remove gaps in a Trie which stores a dictionary.
Row | The Row class represents a row in a matrix representation of a trie.
Trie | A Trie is used to store a dictionary of words and their stems.

Package org.egothor.stemmer Description

Egothor stemmer API.


org.egothor.stemmer Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.egothor.stemmer

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.egothor.stemmer.Compile
    • org.egothor.stemmer.Diff
    • org.egothor.stemmer.DiffIt
    • org.egothor.stemmer.Reduce
      • org.egothor.stemmer.Gener
      • org.egothor.stemmer.Lift
      • org.egothor.stemmer.Optimizer
        • org.egothor.stemmer.Optimizer2
    • org.egothor.stemmer.Row
    • org.egothor.stemmer.Trie
      • org.egothor.stemmer.MultiTrie
        • org.egothor.stemmer.MultiTrie2


Uses of Package org.egothor.stemmer

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.egothor.stemmer

Packages that use org.egothor.stemmer
org.apache.lucene.analysis.stempel | Stempel: Algorithmic Stemmer
org.egothor.stemmer | Egothor stemmer API.

Classes in org.egothor.stemmer used by org.apache.lucene.analysis.stempel
Trie
A Trie is used to store a dictionary of words and their stems.

Classes in org.egothor.stemmer used by org.egothor.stemmer
MultiTrie
The MultiTrie is a Trie of Tries.
Optimizer
The Optimizer class is a Trie that will be reduced (have empty rows removed).
Reduce
The Reduce object is used to remove gaps in a Trie which stores a dictionary.
Row
The Row class represents a row in a matrix representation of a trie.
Trie
A Trie is used to store a dictionary of words and their stems.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Reduce

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.egothor.stemmer
Class Reduce

java.lang.Object
    extended by  org.egothor.stemmer.Reduce
Direct Known Subclasses:
Gener, Lift, Optimizer
public class Reduce
extends Object

The Reduce object is used to remove gaps in a Trie which stores a dictionary.

Constructor Summary
Reduce()
Constructor for the Reduce object.
Method Summary
 Trie optimize(Trie orig)
Optimize (remove holes in the rows) the given Trie and return the restructured Trie.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Reduce

public Reduce()
Constructor for the Reduce object.

Method Detail

optimize

public Trie optimize(Trie orig)
Optimize (remove holes in the rows) the given Trie and return the restructured Trie.

Parameters:
orig - the Trie to optimize
Returns:
the restructured Trie
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Row

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.egothor.stemmer
Class Row

java.lang.Object
    extended by  org.egothor.stemmer.Row

public class Row
extends Object

The Row class represents a row in a matrix representation of a trie.

Constructor Summary
Row()
The default constructor for the Row object.
Row(DataInput is)
Construct a Row object from input carried in via the given input stream.
Row(Row old)
Construct a Row using the cells of the given Row.
Method Summary
int | getCells() Return the number of cells in use.
int | getCellsPnt() Return the number of references (how many transitions) to other rows.
int | getCellsVal() Return the number of patch commands saved in this Row.
int | getCmd(Character way) Return the command in the Cell associated with the given Character.
int | getCnt(Character way) Return the number of patch commands were in the Cell associated with the given Character before the Trie containing this Row was reduced.
int | getRef(Character way) Return the reference to the next Row in the Cell associated with the given Character.
void | print() Write the contents of this Row to stdout.
void | setCmd(Character way, int cmd) Set the command in the Cell of the given Character to the given integer.
void | setRef(Character way, int ref) Set the reference to the next row in the Cell of the given Character to the given integer.
void | store(DataOutput os) Write the contents of this Row to the given output stream.
int | uniformCmd(boolean eqSkip) Return the number of identical Cells (containing patch commands) in this Row.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Row

public Row(DataInput is)
    throws IOException
Construct a Row object from input carried in via the given input stream.

Parameters:
is - the input stream
Throws:
IOException - if an I/O error occurs

Row

public Row()
The default constructor for the Row object.

Row

public Row(Row old)
Construct a Row using the cells of the given Row.

Parameters:
old - the Row to copy
Method Detail

setCmd

public void setCmd(Character way,
                   int cmd)
Set the command in the Cell of the given Character to the given integer.

Parameters:
way - the Character defining the Cell
cmd - the new command

setRef

public void setRef(Character way,
                   int ref)
Set the reference to the next row in the Cell of the given Character to the given integer.

Parameters:
way - the Character defining the Cell
ref - The new ref value

getCells

public int getCells()
Return the number of cells in use.

Returns:
the number of cells in use

getCellsPnt

public int getCellsPnt()
Return the number of references (how many transitions) to other rows.

Returns:
the number of references

getCellsVal

public int getCellsVal()
Return the number of patch commands saved in this Row.

Returns:
the number of patch commands

getCmd

public int getCmd(Character way)
Return the command in the Cell associated with the given Character.

Parameters:
way - the Character associated with the Cell holding the desired command
Returns:
the command

getCnt

public int getCnt(Character way)
Return the number of patch commands were in the Cell associated with the given Character before the Trie containing this Row was reduced.

Parameters:
way - the Character associated with the desired Cell
Returns:
the number of patch commands before reduction

getRef

public int getRef(Character way)
Return the reference to the next Row in the Cell associated with the given Character.

Parameters:
way - the Character associated with the desired Cell
Returns:
the reference, or -1 if the Cell is null,/tt>

store

public void store(DataOutput os)
           throws IOException
Write the contents of this Row to the given output stream.

Parameters:
os - the output stream
Throws:
IOException - if an I/O error occurs

uniformCmd

public int uniformCmd(boolean eqSkip)
Return the number of identical Cells (containing patch commands) in this Row.

Parameters:
eqSkip - when set to false the removed patch commands are considered
Returns:
the number of identical Cells, or -1 if there are (at least) two different cells

print

public void print()
Write the contents of this Row to stdout.

Overview  Package   Class  Use  Tree  Deprecated  Index  Help
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


Trie

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.egothor.stemmer
Class Trie

java.lang.Object
    extended by  org.egothor.stemmer.Trie
Direct Known Subclasses:
MultiTrie
public class Trie
extends Object

A Trie is used to store a dictionary of words and their stems.

Actually, what is stored are words with their respective patch commands. A trie can be termed forward (keys read from left to right) or backward (keys read from right to left). This property will vary depending on the language for which a Trie is constructed.

Constructor Summary
Trie(boolean forward)
Constructor for the Trie object.
Trie(boolean forward, int root, List<CharSequence> cmds, List<Row> rows)
Constructor for the Trie object.
Trie(DataInput is)
Constructor for the Trie object.
Method Summary
void | add(CharSequence key, CharSequence cmd) Add the given key associated with the given patch command.
CharSequence[] | getAll(CharSequence key) Gets the all attribute of the Trie object
int | getCells() Return the number of cells in this Trie object.
int | getCellsPnt() Gets the cellsPnt attribute of the Trie object
int | getCellsVal() Gets the cellsVal attribute of the Trie object
CharSequence | getFully(CharSequence key) Return the element that is stored in a cell associated with the given key.
CharSequence | getLastOnPath(CharSequence key) Return the element that is stored as last on a path associated with the given key.
void | printInfo(CharSequence prefix)
Trie | reduce(Reduce by) Remove empty rows from the given Trie and return the newly reduced Trie.
void | store(DataOutput os) Write this Trie to the given output stream.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Trie

public Trie(DataInput is)
     throws IOException
Constructor for the Trie object.

Parameters:
is - the input stream
Throws:
IOException - if an I/O error occurs

Trie

public Trie(boolean forward)
Constructor for the Trie object.

Parameters:
forward - set to true

Trie

public Trie(boolean forward,
            int root,
            List<CharSequence> cmds,
            List<Row> rows)
Constructor for the Trie object.

Parameters:
forward - true if read left to right, false if read right to left
root - index of the row that is the root node
cmds - the patch commands to store
rows - a Vector of Vectors. Each inner Vector is a node of this Trie
Method Detail

getAll

public CharSequence[] getAll(CharSequence key)
Gets the all attribute of the Trie object

Parameters:
key - Description of the Parameter
Returns:
The all value

getCells

public int getCells()
Return the number of cells in this Trie object.

Returns:
the number of cells

getCellsPnt

public int getCellsPnt()
Gets the cellsPnt attribute of the Trie object

Returns:
The cellsPnt value

getCellsVal

public int getCellsVal()
Gets the cellsVal attribute of the Trie object

Returns:
The cellsVal value

getFully

public CharSequence getFully(CharSequence key)
Return the element that is stored in a cell associated with the given key.

Parameters:
key - the key
Returns:
the associated element

getLastOnPath

public CharSequence getLastOnPath(CharSequence key)
Return the element that is stored as last on a path associated with the given key.

Parameters:
key - the key associated with the desired element
Returns:
the last on path element

store

public void store(DataOutput os)
           throws IOException
Write this Trie to the given output stream.

Parameters:
os - the output stream
Throws:
IOException - if an I/O error occurs

add

public void add(CharSequence key,
                CharSequence cmd)
Add the given key associated with the given patch command. If either parameter is null this method will return without executing.

Parameters:
key - the key
cmd - the patch command

reduce

public Trie reduce(Reduce by)
Remove empty rows from the given Trie and return the newly reduced Trie.

Parameters:
by - the Trie to reduce
Returns:
the newly reduced Trie

printInfo

public void printInfo(CharSequence prefix)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.egothor.stemmer.Compile

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.egothor.stemmer.Compile

No usage of org.egothor.stemmer.Compile

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.egothor.stemmer.Diff

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.egothor.stemmer.Diff

No usage of org.egothor.stemmer.Diff

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.egothor.stemmer.DiffIt

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.egothor.stemmer.DiffIt

No usage of org.egothor.stemmer.DiffIt

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.egothor.stemmer.Gener

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.egothor.stemmer.Gener

No usage of org.egothor.stemmer.Gener

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.egothor.stemmer.Lift

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.egothor.stemmer.Lift

No usage of org.egothor.stemmer.Lift

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.egothor.stemmer.MultiTrie

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.egothor.stemmer.MultiTrie

Packages that use MultiTrie
org.egothor.stemmer Egothor stemmer API.

Uses of MultiTrie in org.egothor.stemmer

Subclasses of MultiTrie in org.egothor.stemmer
 class MultiTrie2
The MultiTrie is a Trie of Tries.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.egothor.stemmer.MultiTrie2

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.egothor.stemmer.MultiTrie2

No usage of org.egothor.stemmer.MultiTrie2

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.egothor.stemmer.Optimizer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.egothor.stemmer.Optimizer

Packages that use Optimizer
org.egothor.stemmer Egothor stemmer API.

Uses of Optimizer in org.egothor.stemmer

Subclasses of Optimizer in org.egothor.stemmer
 class Optimizer2
The Optimizer class is a Trie that will be reduced (have empty rows removed).

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.egothor.stemmer.Optimizer2

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.egothor.stemmer.Optimizer2

No usage of org.egothor.stemmer.Optimizer2

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.egothor.stemmer.Reduce

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.egothor.stemmer.Reduce

Packages that use Reduce
org.egothor.stemmer Egothor stemmer API.

Uses of Reduce in org.egothor.stemmer

Subclasses of Reduce in org.egothor.stemmer
class | Gener The Gener object helps in the discarding of nodes which break the reduction effort and defend the structure against large reductions.
class | Lift The Lift class is a data structure that is a variation of a Patricia trie.
class | Optimizer The Optimizer class is a Trie that will be reduced (have empty rows removed).
class | Optimizer2 The Optimizer class is a Trie that will be reduced (have empty rows removed).

Methods in org.egothor.stemmer with parameters of type Reduce
Trie | MultiTrie.reduce(Reduce by) Remove empty rows from the given Trie and return the newly reduced Trie.
Trie | Trie.reduce(Reduce by) Remove empty rows from the given Trie and return the newly reduced Trie.
Trie | MultiTrie2.reduce(Reduce by) Remove empty rows from the given Trie and return the newly reduced Trie.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.egothor.stemmer.Row

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.egothor.stemmer.Row

Packages that use Row
org.egothor.stemmer Egothor stemmer API.

Uses of Row in org.egothor.stemmer

Methods in org.egothor.stemmer that return Row
 Row Optimizer.merge(Row master, Row existing)
Merge the given rows and return the resulting Row.

Methods in org.egothor.stemmer with parameters of type Row
boolean | Gener.eat(Row in, int[] remap) Test whether the given Row of Cells in a Trie should be included in an optimized Trie.
void | Lift.liftUp(Row in, List<Row> nodes) Reduce the trie using Lift-Up reduction.
Row | Optimizer.merge(Row master, Row existing) Merge the given rows and return the resulting Row.

Method parameters in org.egothor.stemmer with type arguments of type Row
 void Lift.liftUp(Row in, List<Row> nodes)
Reduce the trie using Lift-Up reduction.

Constructors in org.egothor.stemmer with parameters of type Row
Row(Row old)
Construct a Row using the cells of the given Row.

Constructor parameters in org.egothor.stemmer with type arguments of type Row
Trie(boolean forward, int root, List<CharSequence> cmds, List<Row> rows)
Constructor for the Trie object.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.egothor.stemmer.Trie

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.egothor.stemmer.Trie

Packages that use Trie
org.apache.lucene.analysis.stempel | Stempel: Algorithmic Stemmer
org.egothor.stemmer | Egothor stemmer API.

Uses of Trie in org.apache.lucene.analysis.stempel

Methods in org.apache.lucene.analysis.stempel that return Trie
static Trie StempelStemmer.load(InputStream stemmerTable)
Load a stemmer table from an inputstream.

Constructors in org.apache.lucene.analysis.stempel with parameters of type Trie
StempelStemmer(Trie stemmer)
Create a Stemmer using pre-loaded stemmer table

Uses of Trie in org.egothor.stemmer

Subclasses of Trie in org.egothor.stemmer
class | MultiTrie The MultiTrie is a Trie of Tries.
class | MultiTrie2 The MultiTrie is a Trie of Tries.

Methods in org.egothor.stemmer that return Trie
Trie | Lift.optimize(Trie orig) Optimize (eliminate rows with no content) the given Trie and return the reduced Trie.
Trie | Reduce.optimize(Trie orig) Optimize (remove holes in the rows) the given Trie and return the restructured Trie.
Trie | Gener.optimize(Trie orig) Return a Trie with infrequent values occurring in the given Trie removed.
Trie | Optimizer.optimize(Trie orig) Optimize (remove empty rows) from the given Trie and return the resulting Trie.
Trie | MultiTrie.reduce(Reduce by) Remove empty rows from the given Trie and return the newly reduced Trie.
Trie | Trie.reduce(Reduce by) Remove empty rows from the given Trie and return the newly reduced Trie.
Trie | MultiTrie2.reduce(Reduce by) Remove empty rows from the given Trie and return the newly reduced Trie.

Methods in org.egothor.stemmer with parameters of type Trie
Trie | Lift.optimize(Trie orig) Optimize (eliminate rows with no content) the given Trie and return the reduced Trie.
Trie | Reduce.optimize(Trie orig) Optimize (remove holes in the rows) the given Trie and return the restructured Trie.
Trie | Gener.optimize(Trie orig) Return a Trie with infrequent values occurring in the given Trie removed.
Trie | Optimizer.optimize(Trie orig) Optimize (remove empty rows) from the given Trie and return the resulting Trie.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Among

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball
Class Among

java.lang.Object
    extended by  org.tartarus.snowball.Among

public class Among
extends Object

Field Summary
Method | method
SnowballProgram | methodobject
int | result
char[] | s
int | s_size
int | substring_i
Constructor Summary
Among(String s, int substring_i, int result, String methodname, SnowballProgram methodobject)
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

s_size

public final int s_size

s

public final char[] s

substring_i

public final int substring_i

result

public final int result

method

public final Method method

methodobject

public final SnowballProgram methodobject
Constructor Detail

Among

public Among(String s,
             int substring_i,
             int result,
             String methodname,
             SnowballProgram methodobject)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


 org.tartarus.snowball
Classes
Among
SnowballProgram
TestApp


org.tartarus.snowball

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.tartarus.snowball

Snowball stemmer API.

See:
Description

Class Summary
Among |
SnowballProgram | This is the rev 502 of the Snowball SVN trunk, but modified: made abstract and introduced abstract method stem to avoid expensive reflection in filter class.
TestApp |

Package org.tartarus.snowball Description

Snowball stemmer API.


org.tartarus.snowball Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.tartarus.snowball

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.tartarus.snowball.Among
    • org.tartarus.snowball.SnowballProgram
    • org.tartarus.snowball.TestApp


Uses of Package org.tartarus.snowball

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.tartarus.snowball

Packages that use org.tartarus.snowball
org.apache.lucene.analysis.snowball | TokenFilter and Analyzer implementations that use Snowball stemmers.
org.tartarus.snowball | Snowball stemmer API.
org.tartarus.snowball.ext | Autogenerated snowball stemmer implementations.

Classes in org.tartarus.snowball used by org.apache.lucene.analysis.snowball
SnowballProgram
This is the rev 502 of the Snowball SVN trunk, but modified: made abstract and introduced abstract method stem to avoid expensive reflection in filter class.

Classes in org.tartarus.snowball used by org.tartarus.snowball
Among
SnowballProgram
This is the rev 502 of the Snowball SVN trunk, but modified: made abstract and introduced abstract method stem to avoid expensive reflection in filter class.

Classes in org.tartarus.snowball used by org.tartarus.snowball.ext
SnowballProgram
This is the rev 502 of the Snowball SVN trunk, but modified: made abstract and introduced abstract method stem to avoid expensive reflection in filter class.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


SnowballProgram

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball
Class SnowballProgram

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
Direct Known Subclasses:
ArmenianStemmer, BasqueStemmer, CatalanStemmer, DanishStemmer, DutchStemmer, EnglishStemmer, FinnishStemmer, FrenchStemmer, German2Stemmer, GermanStemmer, HungarianStemmer, IrishStemmer, ItalianStemmer, KpStemmer, LovinsStemmer, NorwegianStemmer, PorterStemmer, PortugueseStemmer, RomanianStemmer, RussianStemmer, SpanishStemmer, SwedishStemmer, TurkishStemmer
public abstract class SnowballProgram
extends Object

This is the rev 502 of the Snowball SVN trunk, but modified: made abstract and introduced abstract method stem to avoid expensive reflection in filter class. refactored StringBuffers to StringBuilder uses char[] as buffer instead of StringBuffer/StringBuilder eq_s,eq_s_b,insert,replace_s take CharSequence like eq_v and eq_v_b reflection calls (Lovins, etc) use EMPTY_ARGS/EMPTY_PARAMS

Field Summary
protected int | bra
protected int | cursor
protected int | ket
protected int | limit
protected int | limit_backward
Constructor Summary
protected SnowballProgram()
Method Summary
protected  StringBuilder assign_to(StringBuilder s)
protected  void copy_from(SnowballProgram other)
protected  boolean eq_s_b(int s_size, CharSequence s)
protected  boolean eq_s_b(int s_size, String s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0
protected  boolean eq_s(int s_size, CharSequence s)
protected  boolean eq_s(int s_size, String s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0
protected  boolean eq_v_b(CharSequence s)
protected  boolean eq_v_b(StringBuilder s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0
protected  boolean eq_v(CharSequence s)
protected  boolean eq_v(StringBuilder s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0
protected  int find_among_b(Among[] v, int v_size)
protected  int find_among(Among[] v, int v_size)
 String getCurrent()
Get the current string.
 char[] getCurrentBuffer()
Get the current buffer containing the stem.
 int getCurrentBufferLength()
Get the valid length of the character array in getCurrentBuffer().
protected  boolean in_grouping_b(char[] s, int min, int max)
protected  boolean in_grouping(char[] s, int min, int max)
protected  boolean in_range_b(int min, int max)
protected  boolean in_range(int min, int max)
protected  void insert(int c_bra, int c_ket, CharSequence s)
protected  void insert(int c_bra, int c_ket, String s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0
protected  void insert(int c_bra, int c_ket, StringBuilder s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0
protected  boolean out_grouping_b(char[] s, int min, int max)
protected  boolean out_grouping(char[] s, int min, int max)
protected  boolean out_range_b(int min, int max)
protected  boolean out_range(int min, int max)
protected  int replace_s(int c_bra, int c_ket, CharSequence s)
protected  int replace_s(int c_bra, int c_ket, String s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0
 void setCurrent(char[] text, int length)
Set the current string.
 void setCurrent(String value)
Set the current string.
protected  void slice_check()
protected  void slice_del()
protected  void slice_from(CharSequence s)
protected  void slice_from(String s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0
protected  void slice_from(StringBuilder s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0
protected  StringBuilder slice_to(StringBuilder s)
abstract  boolean stem()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

cursor

protected int cursor

limit

protected int limit

limit_backward

protected int limit_backward

bra

protected int bra

ket

protected int ket
Constructor Detail

SnowballProgram

protected SnowballProgram()
Method Detail

stem

public abstract boolean stem()

setCurrent

public void setCurrent(String value)
Set the current string.

getCurrent

public String getCurrent()
Get the current string.

setCurrent

public void setCurrent(char[] text,
                       int length)
Set the current string.

Parameters:
text - character array containing input
length - valid length of text.

getCurrentBuffer

public char[] getCurrentBuffer()
Get the current buffer containing the stem.

NOTE: this may be a reference to a different character array than the one originally provided with setCurrent, in the exceptional case that stemming produced a longer intermediate or result string.

It is necessary to use getCurrentBufferLength() to determine the valid length of the returned buffer. For example, many words are stemmed simply by subtracting from the length to remove suffixes.

See Also:
getCurrentBufferLength()

getCurrentBufferLength

public int getCurrentBufferLength()
Get the valid length of the character array in getCurrentBuffer().

Returns:
valid length of the array.

copy_from

protected void copy_from(SnowballProgram other)

in_grouping

protected boolean in_grouping(char[] s,
                              int min,
                              int max)

in_grouping_b

protected boolean in_grouping_b(char[] s,
                                int min,
                                int max)

out_grouping

protected boolean out_grouping(char[] s,
                               int min,
                               int max)

out_grouping_b

protected boolean out_grouping_b(char[] s,
                                 int min,
                                 int max)

in_range

protected boolean in_range(int min,
                           int max)

in_range_b

protected boolean in_range_b(int min,
                             int max)

out_range

protected boolean out_range(int min,
                            int max)

out_range_b

protected boolean out_range_b(int min,
                              int max)

eq_s

protected boolean eq_s(int s_size,
                       CharSequence s)

eq_s

@Deprecated
protected boolean eq_s(int s_size,
                                  String s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0

eq_s_b

protected boolean eq_s_b(int s_size,
                         CharSequence s)

eq_s_b

@Deprecated
protected boolean eq_s_b(int s_size,
                                    String s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0

eq_v

protected boolean eq_v(CharSequence s)

eq_v

@Deprecated
protected boolean eq_v(StringBuilder s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0

eq_v_b

protected boolean eq_v_b(CharSequence s)

eq_v_b

@Deprecated
protected boolean eq_v_b(StringBuilder s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0

find_among

protected int find_among(Among[] v,
                         int v_size)

find_among_b

protected int find_among_b(Among[] v,
                           int v_size)

replace_s

protected int replace_s(int c_bra,
                        int c_ket,
                        CharSequence s)

replace_s

@Deprecated
protected int replace_s(int c_bra,
                                   int c_ket,
                                   String s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0

slice_check

protected void slice_check()

slice_from

protected void slice_from(CharSequence s)

slice_from

@Deprecated
protected void slice_from(String s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0

slice_from

@Deprecated
protected void slice_from(StringBuilder s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0

slice_del

protected void slice_del()

insert

protected void insert(int c_bra,
                      int c_ket,
                      CharSequence s)

insert

@Deprecated
protected void insert(int c_bra,
                                 int c_ket,
                                 String s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0

insert

@Deprecated
protected void insert(int c_bra,
                                 int c_ket,
                                 StringBuilder s)
Deprecated. for binary back compat. Will be removed in Lucene 4.0

slice_to

protected StringBuilder slice_to(StringBuilder s)

assign_to

protected StringBuilder assign_to(StringBuilder s)
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TestApp

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball
Class TestApp

java.lang.Object
    extended by  org.tartarus.snowball.TestApp

public class TestApp
extends Object

Constructor Summary
TestApp()
Method Summary
static void main(String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TestApp

public TestApp()
Method Detail

main

public static void main(String[] args)
                 throws Throwable
Throws:
Throwable
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.tartarus.snowball.Among

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.Among

Packages that use Among
org.tartarus.snowball Snowball stemmer API.

Uses of Among in org.tartarus.snowball

Methods in org.tartarus.snowball with parameters of type Among
protected int | SnowballProgram.find_among_b(Among[] v, int v_size)
protected int | SnowballProgram.find_among(Among[] v, int v_size)

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.SnowballProgram

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.SnowballProgram

Packages that use SnowballProgram
org.apache.lucene.analysis.snowball | TokenFilter and Analyzer implementations that use Snowball stemmers.
org.tartarus.snowball | Snowball stemmer API.
org.tartarus.snowball.ext | Autogenerated snowball stemmer implementations.

Uses of SnowballProgram in org.apache.lucene.analysis.snowball

Constructors in org.apache.lucene.analysis.snowball with parameters of type SnowballProgram
SnowballFilter(TokenStream input, SnowballProgram stemmer)

Uses of SnowballProgram in org.tartarus.snowball

Fields in org.tartarus.snowball declared as SnowballProgram
 SnowballProgram Among.methodobject

Methods in org.tartarus.snowball with parameters of type SnowballProgram
protected  void SnowballProgram.copy_from(SnowballProgram other)

Constructors in org.tartarus.snowball with parameters of type SnowballProgram
Among(String s, int substring_i, int result, String methodname, SnowballProgram methodobject)

Uses of SnowballProgram in org.tartarus.snowball.ext

Subclasses of SnowballProgram in org.tartarus.snowball.ext
class | ArmenianStemmer This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.
class | BasqueStemmer This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.
class | CatalanStemmer This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.
class | DanishStemmer Generated class implementing code defined by a snowball script.
class | DutchStemmer Generated class implementing code defined by a snowball script.
class | EnglishStemmer Generated class implementing code defined by a snowball script.
class | FinnishStemmer Generated class implementing code defined by a snowball script.
class | FrenchStemmer Generated class implementing code defined by a snowball script.
class | German2Stemmer Generated class implementing code defined by a snowball script.
class | GermanStemmer Generated class implementing code defined by a snowball script.
class | HungarianStemmer Generated class implementing code defined by a snowball script.
class | IrishStemmer This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.
class | ItalianStemmer Generated class implementing code defined by a snowball script.
class | KpStemmer Generated class implementing code defined by a snowball script.
class | LovinsStemmer Generated class implementing code defined by a snowball script.
class | NorwegianStemmer Generated class implementing code defined by a snowball script.
class | PorterStemmer Generated class implementing code defined by a snowball script.
class | PortugueseStemmer Generated class implementing code defined by a snowball script.
class | RomanianStemmer Generated class implementing code defined by a snowball script.
class | RussianStemmer Generated class implementing code defined by a snowball script.
class | SpanishStemmer Generated class implementing code defined by a snowball script.
class | SwedishStemmer Generated class implementing code defined by a snowball script.
class | TurkishStemmer Generated class implementing code defined by a snowball script.

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.TestApp

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.TestApp

No usage of org.tartarus.snowball.TestApp

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


ArmenianStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class ArmenianStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.ArmenianStemmer

public class ArmenianStemmer
extends SnowballProgram

This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
ArmenianStemmer()
Method Summary
boolean | equals(Object o)
int | hashCode()
boolean | stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ArmenianStemmer

public ArmenianStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


BasqueStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class BasqueStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.BasqueStemmer

public class BasqueStemmer
extends SnowballProgram

This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
BasqueStemmer()
Method Summary
boolean | equals(Object o)
int | hashCode()
boolean | stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

BasqueStemmer

public BasqueStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


CatalanStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class CatalanStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.CatalanStemmer

public class CatalanStemmer
extends SnowballProgram

This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
CatalanStemmer()
Method Summary
boolean | equals(Object o)
int | hashCode()
boolean | stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

CatalanStemmer

public CatalanStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DanishStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class DanishStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.DanishStemmer

public class DanishStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
DanishStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DanishStemmer

public DanishStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


DutchStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class DutchStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.DutchStemmer

public class DutchStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
DutchStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

DutchStemmer

public DutchStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


EnglishStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class EnglishStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.EnglishStemmer

public class EnglishStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
EnglishStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EnglishStemmer

public EnglishStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FinnishStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class FinnishStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.FinnishStemmer

public class FinnishStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
FinnishStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FinnishStemmer

public FinnishStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


FrenchStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class FrenchStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.FrenchStemmer

public class FrenchStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
FrenchStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

FrenchStemmer

public FrenchStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


German2Stemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class German2Stemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.German2Stemmer

public class German2Stemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
German2Stemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

German2Stemmer

public German2Stemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


GermanStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class GermanStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.GermanStemmer

public class GermanStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
GermanStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GermanStemmer

public GermanStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


HungarianStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class HungarianStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.HungarianStemmer

public class HungarianStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
HungarianStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

HungarianStemmer

public HungarianStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


IrishStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class IrishStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.IrishStemmer

public class IrishStemmer
extends SnowballProgram

This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
IrishStemmer()
Method Summary
boolean | equals(Object o)
int | hashCode()
boolean | stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

IrishStemmer

public IrishStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


ItalianStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class ItalianStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.ItalianStemmer

public class ItalianStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
ItalianStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

ItalianStemmer

public ItalianStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


KpStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class KpStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.KpStemmer

public class KpStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
KpStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

KpStemmer

public KpStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


LovinsStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class LovinsStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.LovinsStemmer

public class LovinsStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
LovinsStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LovinsStemmer

public LovinsStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


NorwegianStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class NorwegianStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.NorwegianStemmer

public class NorwegianStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
NorwegianStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

NorwegianStemmer

public NorwegianStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 org.tartarus.snowball.ext
Classes
ArmenianStemmer
BasqueStemmer
CatalanStemmer
DanishStemmer
DutchStemmer
EnglishStemmer
FinnishStemmer
FrenchStemmer
German2Stemmer
GermanStemmer
HungarianStemmer
IrishStemmer
ItalianStemmer
KpStemmer
LovinsStemmer
NorwegianStemmer
PorterStemmer
PortugueseStemmer
RomanianStemmer
RussianStemmer
SpanishStemmer
SwedishStemmer
TurkishStemmer


org.tartarus.snowball.ext

PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES

Package org.tartarus.snowball.ext

Autogenerated snowball stemmer implementations.

See:
Description

Class Summary
ArmenianStemmer | This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.
BasqueStemmer | This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.
CatalanStemmer | This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.
DanishStemmer | Generated class implementing code defined by a snowball script.
DutchStemmer | Generated class implementing code defined by a snowball script.
EnglishStemmer | Generated class implementing code defined by a snowball script.
FinnishStemmer | Generated class implementing code defined by a snowball script.
FrenchStemmer | Generated class implementing code defined by a snowball script.
German2Stemmer | Generated class implementing code defined by a snowball script.
GermanStemmer | Generated class implementing code defined by a snowball script.
HungarianStemmer | Generated class implementing code defined by a snowball script.
IrishStemmer | This class was automatically generated by a Snowball to Java compiler It implements the stemming algorithm defined by a snowball script.
ItalianStemmer | Generated class implementing code defined by a snowball script.
KpStemmer | Generated class implementing code defined by a snowball script.
LovinsStemmer | Generated class implementing code defined by a snowball script.
NorwegianStemmer | Generated class implementing code defined by a snowball script.
PorterStemmer | Generated class implementing code defined by a snowball script.
PortugueseStemmer | Generated class implementing code defined by a snowball script.
RomanianStemmer | Generated class implementing code defined by a snowball script.
RussianStemmer | Generated class implementing code defined by a snowball script.
SpanishStemmer | Generated class implementing code defined by a snowball script.
SwedishStemmer | Generated class implementing code defined by a snowball script.
TurkishStemmer | Generated class implementing code defined by a snowball script.

Package org.tartarus.snowball.ext Description

Autogenerated snowball stemmer implementations.

Overview Package Class Use Tree Deprecated Index Help
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES


org.tartarus.snowball.ext Class Hierarchy

PREV NEXT FRAMES NO FRAMES

Hierarchy For Package org.tartarus.snowball.ext

Package Hierarchies:
All Packages

Class Hierarchy

  • java.lang.Object
    • org.tartarus.snowball.SnowballProgram
      • org.tartarus.snowball.ext.ArmenianStemmer
      • org.tartarus.snowball.ext.BasqueStemmer
      • org.tartarus.snowball.ext.CatalanStemmer
      • org.tartarus.snowball.ext.DanishStemmer
      • org.tartarus.snowball.ext.DutchStemmer
      • org.tartarus.snowball.ext.EnglishStemmer
      • org.tartarus.snowball.ext.FinnishStemmer
      • org.tartarus.snowball.ext.FrenchStemmer
      • org.tartarus.snowball.ext.German2Stemmer
      • org.tartarus.snowball.ext.GermanStemmer
      • org.tartarus.snowball.ext.HungarianStemmer
      • org.tartarus.snowball.ext.IrishStemmer
      • org.tartarus.snowball.ext.ItalianStemmer
      • org.tartarus.snowball.ext.KpStemmer
      • org.tartarus.snowball.ext.LovinsStemmer
      • org.tartarus.snowball.ext.NorwegianStemmer
      • org.tartarus.snowball.ext.PorterStemmer
      • org.tartarus.snowball.ext.PortugueseStemmer
      • org.tartarus.snowball.ext.RomanianStemmer
      • org.tartarus.snowball.ext.RussianStemmer
      • org.tartarus.snowball.ext.SpanishStemmer
      • org.tartarus.snowball.ext.SwedishStemmer
      • org.tartarus.snowball.ext.TurkishStemmer
Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Package org.tartarus.snowball.ext

PREV NEXT FRAMES NO FRAMES

Uses of Package
org.tartarus.snowball.ext

No usage of org.tartarus.snowball.ext

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


PorterStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class PorterStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.PorterStemmer

public class PorterStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
PorterStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PorterStemmer

public PorterStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


PortugueseStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class PortugueseStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.PortugueseStemmer

public class PortugueseStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
PortugueseStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PortugueseStemmer

public PortugueseStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RomanianStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class RomanianStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.RomanianStemmer

public class RomanianStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
RomanianStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RomanianStemmer

public RomanianStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


RussianStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class RussianStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.RussianStemmer

public class RussianStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
RussianStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

RussianStemmer

public RussianStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SpanishStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class SpanishStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.SpanishStemmer

public class SpanishStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
SpanishStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SpanishStemmer

public SpanishStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


SwedishStemmer

PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class SwedishStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.SwedishStemmer

public class SwedishStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
SwedishStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

SwedishStemmer

public SwedishStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


TurkishStemmer

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

org.tartarus.snowball.ext
Class TurkishStemmer

java.lang.Object
    extended by  org.tartarus.snowball.SnowballProgram
        extended by  org.tartarus.snowball.ext.TurkishStemmer

public class TurkishStemmer
extends SnowballProgram

Generated class implementing code defined by a snowball script.

Field Summary
Fields inherited from class org.tartarus.snowball.SnowballProgram
bra, cursor, ket, limit, limit_backward
Constructor Summary
TurkishStemmer()
Method Summary
 boolean stem()
Methods inherited from class org.tartarus.snowball.SnowballProgram
assign_to, copy_from, eq_s_b, eq_s_b, eq_s, eq_s, eq_v_b, eq_v_b, eq_v, eq_v, find_among_b, find_among, getCurrent, getCurrentBuffer, getCurrentBufferLength, in_grouping_b, in_grouping, in_range_b, in_range, insert, insert, insert, out_grouping_b, out_grouping, out_range_b, out_range, replace_s, replace_s, setCurrent, setCurrent, slice_check, slice_del, slice_from, slice_from, slice_from, slice_to
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

TurkishStemmer

public TurkishStemmer()
Method Detail

stem

public boolean stem()
Specified by:
stem in class SnowballProgram
Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD


Uses of Class org.tartarus.snowball.ext.ArmenianStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.ArmenianStemmer

No usage of org.tartarus.snowball.ext.ArmenianStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.BasqueStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.BasqueStemmer

No usage of org.tartarus.snowball.ext.BasqueStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.CatalanStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.CatalanStemmer

No usage of org.tartarus.snowball.ext.CatalanStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.DanishStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.DanishStemmer

No usage of org.tartarus.snowball.ext.DanishStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.DutchStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.DutchStemmer

No usage of org.tartarus.snowball.ext.DutchStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.EnglishStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.EnglishStemmer

No usage of org.tartarus.snowball.ext.EnglishStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.FinnishStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.FinnishStemmer

No usage of org.tartarus.snowball.ext.FinnishStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.FrenchStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.FrenchStemmer

No usage of org.tartarus.snowball.ext.FrenchStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.German2Stemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.German2Stemmer

No usage of org.tartarus.snowball.ext.German2Stemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.GermanStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.GermanStemmer

No usage of org.tartarus.snowball.ext.GermanStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.HungarianStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.HungarianStemmer

No usage of org.tartarus.snowball.ext.HungarianStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.IrishStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.IrishStemmer

No usage of org.tartarus.snowball.ext.IrishStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.ItalianStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.ItalianStemmer

No usage of org.tartarus.snowball.ext.ItalianStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.KpStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.KpStemmer

No usage of org.tartarus.snowball.ext.KpStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.LovinsStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.LovinsStemmer

No usage of org.tartarus.snowball.ext.LovinsStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.NorwegianStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.NorwegianStemmer

No usage of org.tartarus.snowball.ext.NorwegianStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.PorterStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.PorterStemmer

No usage of org.tartarus.snowball.ext.PorterStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.PortugueseStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.PortugueseStemmer

No usage of org.tartarus.snowball.ext.PortugueseStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.RomanianStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.RomanianStemmer

No usage of org.tartarus.snowball.ext.RomanianStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.RussianStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.RussianStemmer

No usage of org.tartarus.snowball.ext.RussianStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.SpanishStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.SpanishStemmer

No usage of org.tartarus.snowball.ext.SpanishStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.SwedishStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.SwedishStemmer

No usage of org.tartarus.snowball.ext.SwedishStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES


Uses of Class org.tartarus.snowball.ext.TurkishStemmer

PREV NEXT FRAMES NO FRAMES

Uses of Class
org.tartarus.snowball.ext.TurkishStemmer

No usage of org.tartarus.snowball.ext.TurkishStemmer

Overview Package Class Use Tree Deprecated Index Help
PREV NEXT FRAMES NO FRAMES